/* The shared chrome (top bar, buttons, dialogs, stats grid, week strip, toast) is in
   hub/game.css, linked before this file. This sets the tokens it uses and the town. */
:root {
  color-scheme: light dark;
  --bg: #eef3f7;
  --bg-2: #e1e9f0;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --ink: #142231;
  --muted: #536476;
  --line: rgba(20, 34, 49, 0.13);
  --accent: #2b6cb0; /* white text on it is 5.0:1 */
  --accent-deep: #1f5490;
  --accent-ink: #ffffff;
  --block: #cfd9e3;
  --ground: #e6ecf2;
  --street: #ffffff;
  --river: #7fb7e6;
  --cone: #d0582a;
  --stop: #f2c14e;
  --stop-ink: #3b2a00;
  --route: #2b6cb0;
  --best: #2f8a57;
  --shadow: rgba(20, 50, 90, 0.16);
  --display: Fredoka, 'Arial Rounded MT Bold', system-ui, sans-serif;
  --text: Nunito, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --bg-2: #141b22;
    --panel: rgba(32, 42, 54, 0.78);
    --panel-solid: #1d2631;
    --ink: #e6eef6;
    --muted: #a3b2c2;
    --line: rgba(230, 238, 246, 0.13);
    --accent: #7db4f0;
    --accent-deep: #5d9ee6;
    --accent-ink: #0a1a2c;
    --block: #263240;
    --ground: #18212b;
    --street: #3a4757;
    --river: #2f6c9e;
    --cone: #ff8a5c;
    --stop: #f2c14e;
    --route: #7db4f0;
    --best: #6fd398;
    --shadow: rgba(0, 0, 0, 0.45);
  }
}
body { margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--ink); font: 600 16px/1.4 var(--text); -webkit-font-smoothing: antialiased; background: linear-gradient(180deg, var(--bg), var(--bg-2)) fixed; }
button { -webkit-tap-highlight-color: transparent; }
.app { width: 100%; max-width: 520px; margin: 0 auto; padding: max(10px, env(safe-area-inset-top)) 16px 8px; display: flex; flex-direction: column; gap: 10px; }
.logo { margin: 0; font: 700 2.1rem/1 var(--display); color: var(--accent-deep); }
@media (prefers-color-scheme: dark) { .logo { color: var(--accent); } }
.day { margin: 4px 0 0; font-size: 0.78rem; color: var(--muted); }

.play { display: flex; flex-direction: column; gap: 10px; }
.meta { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; font-size: 0.85rem; color: var(--muted); }
.len b { font: 600 1.25rem/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.town-wrap { display: flex; justify-content: center; }
.town { width: min(100%, 440px, 56vh); aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--ground); box-shadow: 0 14px 40px -22px var(--shadow), inset 0 0 0 1px var(--line); }
.map { width: 100%; height: 100%; display: block; }
.block { fill: var(--block); }
.river { fill: var(--river); opacity: 0.85; }
.street { stroke: var(--street); stroke-width: 3; stroke-linecap: round; }
.street.closed { stroke: var(--block); stroke-dasharray: 1 1.4; stroke-width: 1.2; }
.street.bridge { stroke: #b98457; stroke-width: 3.4; }
.cone { font: 700 3.6px var(--text); fill: var(--cone); }
.route { fill: none; stroke: var(--route); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; opacity: 0.9; }
.best { fill: none; stroke: var(--best); stroke-width: 3.4; stroke-linejoin: round; stroke-linecap: round; opacity: 0.45; }
.depot rect { fill: var(--accent); }
.depot text { font-size: 5.4px; }
.stop { cursor: pointer; }
.stop circle { fill: var(--stop); stroke: var(--panel-solid); stroke-width: 0.8; }
.stop text { font: 700 4.6px var(--display); fill: var(--stop-ink); pointer-events: none; }
.stop.on circle { fill: var(--route); }
.stop.on text { fill: #fff; }
.stop.on .nth { font-size: 3.4px; fill: var(--ink); paint-order: stroke; stroke: var(--panel-solid); stroke-width: 0.8; }
.stop:focus-visible { outline: none; }
.stop:focus-visible circle { stroke: var(--ink); stroke-width: 1.2; }
.order { margin: 0; min-height: 1.4em; text-align: center; font-size: 0.92rem; }
.acts { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.rides { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rides li { display: flex; gap: 8px; align-items: baseline; font-size: 0.9rem; }
.rides .rr { color: var(--muted); font-size: 0.8rem; }
.how-line { margin: 0; min-height: 1.2em; text-align: center; font-size: 0.88rem; color: var(--muted); }
.foot { display: flex; justify-content: flex-end; }
.how { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; text-align: left; font-size: 0.92rem; }
.btn.wide { margin-top: 16px; }
.kicker { color: var(--muted); }
.res-line { margin: 0 0 6px; font-size: 1.05rem; }
.res-row { margin: 0 0 8px; font-size: 1.3rem; letter-spacing: 0.1em; }
.res-note { margin: 0 0 10px; font-size: 0.88rem; color: var(--muted); }
.wd.today i { outline: 2px dashed var(--accent); outline-offset: -2px; }
.wd.great i { background: var(--best); color: #fff; }
.wd.done i { background: var(--block); }
.toast { z-index: 10; }
@media (max-width: 380px) {
  .app { padding-left: 12px; padding-right: 12px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
