:root {
  --bg: #0e0f12; --panel: #15171c; --panel-2: #0f1117; --border: #262a32; --text: #e6e8ee; --muted: #8b90a0;
  --accent: #95d600; --accent-dim: #6f9f02; --accent-2: #9147ff; --good: #aef13d; --warn: #ffb454; --bad: #ff6b6b;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--text); font: 15px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--bg); }
.site { max-width: 1100px; margin: 0 auto; padding: 32px 20px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.brand { display: block; line-height: 0; }
.brandLogo { width: min(480px, 86vw); height: auto; display: block; }
.crumbs { font-size: 12px; color: var(--muted); text-align: center; }
.crumbs a, .crumbs a:visited { color: var(--accent); text-decoration: none; }
.crumbs .sep { color: #3a4150; margin: 0 4px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 36px 20px 48px; }
.head h1 { margin: 0 0 8px; font-size: 24px; font-weight: 650; }
.head h1::before { content: ">"; color: var(--accent); margin-right: 10px; }
.head .intro { margin: 0 0 24px; font-size: 13px; color: var(--muted); max-width: 760px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.col-right { position: sticky; top: 16px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } .col-right { position: static; } }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.panel h2 { margin: 0 0 12px; font-size: 15px; font-weight: 650; }
.panel h2::before { content: ">"; color: var(--accent); margin-right: 8px; }
.lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.muted { color: var(--muted); font-weight: 400; }
.small { font-size: 12px; }
.note { font-size: 12px; color: var(--muted); margin: 8px 2px 0; }
.note:empty { display: none; }
.note a { color: var(--accent); }
.note code { color: var(--text); }
.hidden { display: none !important; }
.mt10 { margin-top: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row.center { justify-content: center; }
.row.between { justify-content: space-between; }
.in, .sel { width: 100%; background: var(--panel-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; font: 13px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.in:focus, .sel:focus { outline: none; border-color: var(--accent-dim); }
.in.num { width: 110px; }
.w-auto { width: auto; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; min-height: 24px; }
.check input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.check.small { font-size: 12px; color: var(--muted); }
.color input[type="color"] { width: 34px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: var(--panel-2); cursor: pointer; }
.range { width: 100%; max-width: 260px; accent-color: var(--accent); }
.btn { background: var(--accent); color: #10130a; border: 0; border-radius: 8px; padding: 10px 18px; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; min-height: 40px; }
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); font-weight: 600; }
.btn.sm { padding: 6px 10px; font-size: 12px; min-height: 32px; }
.btn.big { width: 100%; font-size: 16px; padding: 14px; }
.btn.fix { background: transparent; border: 1px solid var(--warn); color: var(--warn); font-size: 11px; padding: 4px 8px; font-weight: 700; min-height: 28px; }
.statusline { color: var(--muted); font-size: 12px; min-height: 18px; }
details.adv { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 10px; }
details.adv summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
details.adv summary:hover { color: var(--text); }

/* intake */
.drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; border: 1px dashed #3a4150; border-radius: 10px; background: var(--panel-2); text-align: center; cursor: pointer; }
.drop:hover, .drop:focus-visible, body.dragging .drop { border-color: var(--accent); outline: none; }
.qtools { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 10px; }
.queue { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow: auto; }
.qitem { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); font-size: 12px; }
.qitem .thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: contain; background: #d8d8d8; background-image: linear-gradient(45deg, #b8b8b8 25%, transparent 25%, transparent 75%, #b8b8b8 75%), linear-gradient(45deg, #b8b8b8 25%, transparent 25%, transparent 75%, #b8b8b8 75%); background-size: 8px 8px; background-position: 0 0, 4px 4px; }
.qitem .thumb.ph { display: flex; align-items: center; justify-content: center; color: #555; font-size: 10px; background: var(--panel); }
.qitem .name { font-weight: 600; overflow-wrap: anywhere; }
.qitem .meta { color: var(--muted); }
.qitem .flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.flag { font-size: 11px; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--border); color: var(--muted); }
.flag.warn { color: var(--warn); border-color: #4a3b1f; }
.flag.block { color: var(--bad); border-color: #4a2626; }
.flag.ok { color: var(--good); border-color: #2c4a1f; }
.qitem .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.qitem .prog { width: 100%; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.qitem .prog i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 0.2s; }
.qitem.done { border-color: #2c4a1f; }
.qitem.failed { border-color: #4a2626; }
.qitem .err { color: var(--bad); margin-top: 4px; }
.qitem .fix { color: var(--warn); }
.qitem .res { color: var(--text); margin-top: 4px; }
.x { background: transparent; border: 0; color: var(--muted); font: inherit; font-size: 16px; cursor: pointer; line-height: 1; padding: 2px 6px; }
.x:hover { color: var(--bad); }
.dl { background: transparent; border: 1px solid var(--border); color: var(--accent); border-radius: 6px; padding: 4px 8px; font: inherit; font-size: 12px; cursor: pointer; text-decoration: none; }
.dl:hover { border-color: var(--accent); }

/* output */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 36px; }
.chip[aria-checked="true"] { border-color: var(--accent); color: var(--accent); background: rgba(149, 214, 0, 0.06); }
.chip:hover { border-color: var(--accent-dim); }
.opts { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.actions { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 12px; }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: 36px; z-index: 5; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 6px; display: flex; flex-direction: column; min-width: 200px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.menu-list button { background: transparent; border: 0; color: var(--text); text-align: left; padding: 8px 10px; font: inherit; font-size: 13px; cursor: pointer; border-radius: 6px; }
.menu-list button:hover { background: var(--panel-2); color: var(--accent); }
.blocks { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.block { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--panel-2); }
.block .bh { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.block .bh span::before { content: "▸ "; color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; border: 0; color: var(--muted); padding: 6px 10px; font: inherit; font-size: 12px; cursor: pointer; min-height: 32px; }
.seg button[aria-pressed="true"] { background: rgba(149, 214, 0, 0.1); color: var(--accent); }

/* plan + results */
.planlist { list-style: none; margin: 0; padding: 0; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.planlist li { color: var(--muted); padding-left: 14px; position: relative; }
.planlist li::before { content: "·"; position: absolute; left: 2px; color: var(--accent); }
.planlist li.warn { color: var(--warn); }
.planlist li.head { color: var(--text); font-weight: 600; padding-left: 0; }
.planlist li.head::before { content: ""; }
.legal { text-align: center; font-size: 11px; color: #5a6070; padding: 0 20px 8px; }
.contact { text-align: center; font-size: 13px; color: var(--accent-2); padding: 0 20px 28px; }
.contact a { color: var(--accent-2); text-decoration: none; }
.how summary { cursor: pointer; list-style: none; }
.how summary::-webkit-details-marker { display: none; }
.how summary h2 { display: inline; margin: 0; }
.how summary::after { content: "  (show)"; color: var(--muted); font-size: 12px; }
.how[open] summary::after { content: "  (hide)"; }
.how[open] summary { margin-bottom: 12px; }
.how p, .how li { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.how h3 { font-size: 13px; margin: 14px 0 6px; color: var(--text); }
.how a { color: var(--accent); }
.how ul { padding-left: 18px; margin: 0 0 8px; }
.doors { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.doors a { font-size: 12px; color: var(--accent); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; text-decoration: none; }
.doors a:hover { border-color: var(--accent); }
@media (max-width: 520px) { .site { padding-top: 24px; } .wrap { padding-top: 28px; } .panel { padding: 16px; } .qitem { grid-template-columns: 36px minmax(0, 1fr); } .qitem .side { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; } }
@media (pointer: coarse) { .in, .sel { font-size: 16px; } .in.num { width: 108px; } }
