:root { --bg: #0f172a; --card: #1e293b; --line: #334155; --accent: #3b82f6; --text: #f8fafc; --muted: #94a3b8; }
* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); margin: 0; line-height: 1.6; }
a { color: var(--accent); }
header { border-bottom: 1px solid var(--line); }
header .in { max-width: 1000px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 1.5rem; }
header nav { display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; }
header nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
header nav a:hover, header nav a[aria-current] { color: var(--text); }
.logo { font-weight: 700; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }
main { max-width: 820px; margin: 2.5rem auto; padding: 0 1rem; }
h1 { text-align: center; line-height: 1.25; margin: 0 0 .5rem; }
.lead { text-align: center; color: var(--muted); margin: 0 0 1.5rem; }
.controls { display: flex; gap: 1rem 1.5rem; justify-content: center; align-items: center; flex-wrap: wrap; background: var(--card); padding: 1rem; border-radius: 12px; }
.controls:empty { display: none; }
input[type=range], input[type=checkbox] { accent-color: var(--accent); }
select, input[type=number], input[type=color] { background: var(--bg); color: var(--text); border: 1px solid #475569; padding: .35rem .6rem; border-radius: 6px; font: inherit; }
input[type=number] { width: 6.5rem; }
input[type=color] { padding: 0 .2rem; height: 2rem; width: 3rem; vertical-align: middle; }
.dropzone { border: 2px dashed #475569; background: var(--card); border-radius: 16px; padding: 3rem 1.5rem; cursor: pointer; transition: .2s; margin-top: 1.25rem; text-align: center; }
.dropzone:hover, .dropzone:focus, .dropzone.over { border-color: var(--accent); background: #263349; outline: none; }
.dropzone p { margin: 0; }
.hint { color: var(--muted); font-size: .85rem; margin-top: .4rem !important; }
#list { margin-top: 1.25rem; display: grid; gap: .75rem; }
.row { background: var(--card); border-radius: 12px; padding: .75rem; display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #0b1222; }
.thumb.cmp { cursor: zoom-in; }
.meta { flex: 1 1 220px; min-width: 0; }
.meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta span { color: var(--muted); font-size: .9rem; }
.links { display: flex; flex-wrap: wrap; gap: .4rem; }
.btn { background: var(--accent); color: #fff; border: none; padding: .7rem 1.4rem; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.sm { padding: .4rem .8rem; font-size: .85rem; }
.btn.ghost { background: transparent; border: 1px solid #475569; color: var(--text); }
.b64, .snip { flex-basis: 100%; }
.b64 { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: start; }
textarea { width: 100%; height: 4.5rem; background: var(--bg); color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: .5rem; font: .8rem ui-monospace, Consolas, monospace; resize: vertical; word-break: break-all; }
.snip { height: 6rem; }
#summary { margin-top: 1rem; display: flex; gap: .75rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
#summary[hidden] { display: none; }
#total { margin-right: auto; color: var(--muted); }
dialog { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; max-width: min(92vw, 900px); }
dialog::backdrop { background: rgba(2, 6, 23, .8); }
.cmpbox { position: relative; line-height: 0; }
.cmpbox img { width: 100%; max-height: 70vh; object-fit: contain; background: repeating-conic-gradient(#334155 0 25%, #1e293b 0 50%) 0 0 / 16px 16px; }
#cmpB { position: absolute; inset: 0; height: 100%; }
#cmpR { width: 100%; margin-top: .75rem; }
.cmpcap { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; }
article { margin-top: 3rem; }
article h2 { font-size: 1.3rem; margin-top: 2rem; }
article h3 { font-size: 1.05rem; margin-bottom: .25rem; }
article p, article li { color: #cbd5e1; }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; margin-top: 1rem; }
.tools a { background: var(--card); border-radius: 10px; padding: .8rem 1rem; text-decoration: none; color: var(--text); }
.tools a small { display: block; color: var(--muted); }
footer { text-align: center; color: var(--muted); font-size: .85rem; margin: 4rem 1rem 2rem; }
footer a { color: var(--muted); }
