:root {
  --bg: #f3efe6;
  --panel: #fbf9f4;
  --ink: #26302c;
  --muted: #6a736e;
  --accent: #2f6f5e;
  --line: #ddd6c6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161a;
    --panel: #171b1f;
    --ink: #e6ece9;
    --muted: #8b9792;
    --accent: #5fb89c;
    --line: #2a3238;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: 0 16px;
}
main { width: 100%; max-width: 520px; margin: auto 0; padding: 16px 0; }
header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
h1 { margin: 0; font-size: 1.9rem; letter-spacing: 0.02em; color: var(--accent); }
.hud { display: flex; gap: 16px; list-style: none; margin: 0; padding: 0; }
.hud li { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.hud span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.hud b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
#status { min-height: 1.5em; margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; }
.help { margin: 4px 0 0; color: var(--muted); font-size: 0.85rem; }
footer { padding: 12px 0 20px; font-size: 0.85rem; }
a { color: var(--accent); }
.prose { max-width: 36rem; margin: auto 0; padding: 32px 0; }
.prose h1 { margin-bottom: 0.5rem; }
