:root {
  --bg: #07080b;
  --panel: #0f1117;
  --ink: #e9e6df;
  --dim: #9a978f;
  --amber: #f0b454;
  --cyan: #6fd3ff;
  --line: #262a33;
  --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", Menlo, monospace;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--amber); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.mono { font-family: var(--mono); }
.top { border-bottom: 1px solid var(--line); padding: 32px 0 20px; }
.top h1 { font-weight: 300; letter-spacing: 0.32em; text-transform: uppercase; margin: 0 0 8px; font-size: 34px; }
.lede { color: var(--dim); max-width: 760px; margin: 0 0 14px; }
nav { display: flex; flex-wrap: wrap; gap: 18px; }
nav a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--amber); }
section { padding: 40px 16px 8px; }
h2 { font-weight: 400; letter-spacing: 0.04em; font-size: 22px; margin: 0 0 14px; }
h3 { font-weight: 600; font-size: 16px; margin: 0 0 6px; color: var(--amber); }
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); pointer-events: none; }
.stage:fullscreen { border: 0; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.controls input[type=range] { flex: 1 1 240px; accent-color: var(--amber); }
button { background: var(--panel); color: var(--ink); border: 1px solid var(--line); padding: 7px 14px;
  font: inherit; cursor: pointer; border-radius: 3px; }
button:hover { border-color: var(--amber); }
button[aria-selected=true] { border-color: var(--amber); color: var(--amber); }
.note { color: var(--dim); font-size: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.ab { position: relative; width: min(100%, 768px); aspect-ratio: 1; user-select: none; touch-action: none;
  border: 1px solid var(--line); background: #000; cursor: ew-resize; }
.ab canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.ab-bar { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--amber); left: 50%; }
.ab-bar span { position: absolute; top: 50%; left: -13px; width: 28px; height: 28px; margin-top: -14px;
  border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.5); }
.ab-label { position: absolute; top: 10px; padding: 3px 8px; background: rgba(0, 0, 0, 0.7); font-size: 14px; }
.ab-label.left { left: 10px; }
.ab-label.right { right: 10px; }
.caption { color: var(--dim); max-width: 768px; }
.roll { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.roll canvas { width: min(100%, 480px); aspect-ratio: 1; border: 1px solid var(--line); background: #000;
  image-rendering: pixelated; }
.roll-side { flex: 1 1 280px; }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
footer { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 16px; padding-bottom: 32px;
  color: var(--dim); font-size: 14px; }

/* ?solo: the stage alone, filling the window, for screen recording */
body.solo { overflow: hidden; }
body.solo > header, body.solo > footer, body.solo main > section:not(#watch),
body.solo #watch > h2, body.solo #watch > .note, body.solo #watch > .controls { display: none; }
body.solo #watch { padding: 0; max-width: none; }
body.solo .stage { width: 100vw; height: 100vh; aspect-ratio: auto; border: 0; }
body.solo .stage canvas { object-fit: contain; }
