:root {
  --bg: #17161c;
  --panel: #211f28;
  --panel2: #2a2733;
  --line: #3a3646;
  --text: #ece9f5;
  --muted: #a9a3bb;
  --accent: #8675e7;
  --gold: #ffd15c;
  --cta: #ec409e;
  --bad: #ff6b6b;
  --good: #6fd38f;
  color-scheme: dark;
}
* { box-sizing: border-box; border-radius: 0; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--gold); }
h1 { font-size: 18px; margin: 0; letter-spacing: .02em; }
h2 { font-size: 13px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
header { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
header .spacer { flex: 1; }
header .who { color: var(--muted); }
button, .button { background: var(--panel2); color: var(--text); border: 1px solid var(--line); padding: 7px 12px; font: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { border-color: var(--accent); }
button.primary { background: var(--cta); border-color: var(--cta); color: #fff; font-weight: 600; }
button:disabled { opacity: .45; cursor: default; }
input, select, textarea { background: var(--bg); color: var(--text); border: 1px solid var(--line); padding: 5px 7px; font: inherit; }
input[type=range] { padding: 0; accent-color: var(--accent); }
input[type=checkbox] { accent-color: var(--accent); }
main { display: grid; grid-template-columns: 330px minmax(0, 1fr) 320px; gap: 0; min-height: calc(100vh - 51px); }
.col { padding: 14px 16px; border-right: 1px solid var(--line); overflow: auto; }
.col:last-child { border-right: 0; }
section { margin-bottom: 18px; }
.row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 52px; align-items: center; gap: 8px; margin: 6px 0; }
.row.two { grid-template-columns: 96px minmax(0, 1fr); }
.row label { color: var(--muted); }
.row output { text-align: right; color: var(--gold); font-variant-numeric: tabular-nums; }
.drop { display: block; border: 1px dashed var(--line); padding: 18px 12px; text-align: center; color: var(--muted); cursor: pointer; }
.drop.over { border-color: var(--accent); color: var(--text); }
.drop strong { color: var(--text); }
.hint { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.stage { display: flex; flex-direction: column; align-items: center; gap: 10px; }
canvas#view { image-rendering: auto; border: 1px solid var(--line); max-width: 100%; background: #2b2f26; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.controls input[type=range] { width: 220px; }
.status { min-height: 20px; color: var(--muted); text-align: center; }
.status.err { color: var(--bad); }
table.report { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.report td { padding: 3px 0; border-bottom: 1px solid var(--line); }
table.report td:last-child { text-align: right; color: var(--text); }
table.report td:first-child { color: var(--muted); }
.qa { padding: 8px 10px; margin: 10px 0; border: 1px solid var(--line); }
.qa.pass { border-color: var(--good); color: var(--good); }
.qa.fail { border-color: var(--bad); color: var(--bad); }
.qa ul { margin: 6px 0 0; padding-left: 18px; color: var(--text); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
textarea { width: 100%; min-height: 54px; resize: vertical; }
.subs { list-style: none; margin: 0; padding: 0; }
.subs li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.subs .meta { color: var(--muted); font-size: 12px; }
.subs .note { font-size: 12px; white-space: pre-wrap; }
.boot { position: fixed; inset: 51px 0 0 0; display: flex; align-items: center; justify-content: center; background: rgba(23, 22, 28, .86); color: var(--muted); z-index: 5; }
.boot[hidden] { display: none; }
details summary { cursor: pointer; color: var(--muted); }
.login { max-width: 360px; margin: 14vh auto; padding: 24px; background: var(--panel); border: 1px solid var(--line); }
.login input { width: 100%; margin: 10px 0; }
@media (max-width: 1100px) {
  main { grid-template-columns: 1fr; }
  .col { border-right: 0; border-bottom: 1px solid var(--line); }
}
