:root {
  color-scheme: light dark;
  --bg: #fbfaf7; --fg: #22201c; --muted: #6b665c; --axis: #b3261e; --stream: #9a6b00;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14130f; --fg: #e8e4da; --muted: #a39d90; --axis: #ff6b5e; --stream: #f2c230; }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
main { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
h1 { font-size: 1rem; font-weight: 600; margin: 0 0 1.5rem; color: var(--muted); }
#view {
  display: block; width: 100%; height: auto; aspect-ratio: 8 / 5;
  image-rendering: pixelated; touch-action: pan-y; cursor: ew-resize;
}
#view:focus-visible { outline: 2px solid var(--stream); outline-offset: 4px; }
.hud { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; margin: 1.5rem 0 0.5rem; }
output { display: inline-block; min-width: 6ch; }
#z { min-width: 14ch; }
button {
  font: inherit; color: inherit; background: transparent;
  border: 1px solid var(--muted); border-radius: 4px; padding: 0.3rem 0.8rem; cursor: pointer;
}
button:focus-visible { outline: 2px solid var(--stream); outline-offset: 2px; }
.zeros, .note { color: var(--muted); font-size: 0.875rem; line-height: 1.6; max-width: 46rem; }
