@charset "UTF-8";
/* Reference-aligned layout (DESIGN.md, 2026-10-16 parity round). Components are independently written. */
@font-face{font-family:Outfit;src:url(fonts/outfit-variable.ttf) format("truetype");font-weight:100 900;font-style:normal;font-display:swap}

:root{
  color-scheme:dark;
  --bg:#151517;--raised:#1e1e20;--surface:#2a2a2c;--surface-strong:#323235;--border:#3a3a3c;
  --text:#d7dadc;--muted:#818384;--muted-strong:#9a9c9e;
  --accent:#818cf8;--accent-soft:#818cf82e;--primary:#5f63e6;--on-primary:#ffffff;
  --arc:#fb923c;--ray:#d7dadc;--target:#818cf8;
  --ok:#4ade80;--ok-soft:#4ade8033;--error:#ef4444;--error-soft:#ef444433;
  --near:#a78bfa;--hot:#facc15;--warm:#fb923c;--cold:#d4d4d8;
  --on-state:#151517;
  --backdrop:#000000a6;
  font-family:Outfit,system-ui,-apple-system,"Segoe UI",sans-serif;font-synthesis:none;
  font-size:16px;line-height:1.5;color:var(--text);background:var(--bg);
  -webkit-text-size-adjust:100%;text-size-adjust:100%
}
:root[data-theme=light]{
  color-scheme:light;
  --bg:#faf9f7;--raised:#ffffff;--surface:#efedea;--surface-strong:#e6e3df;--border:#d9d6d1;
  --text:#1a1a1b;--muted:#6b6e70;--muted-strong:#55585a;
  --accent:#4f46e5;--accent-soft:#4f46e51f;--primary:#4f46e5;--on-primary:#ffffff;
  --arc:#c2410c;--ray:#1a1a1b;--target:#4f46e5;
  --ok:#15803d;--ok-soft:#15803d26;--error:#b91c1c;--error-soft:#b91c1c22;
  --near:#7c3aed;--hot:#a16207;--warm:#c2410c;--cold:#52525b;
  --on-state:#ffffff;
  --backdrop:#1a1a1b66
}
/* Colour-blind mode: right = blue, wrong = orange. Text, icons and arrows still carry the meaning. */
:root[data-cb=on]{--ok:#60a5fa;--ok-soft:#60a5fa33;--error:#fb923c;--error-soft:#fb923c33;--hot:#fde047;--warm:#f97316;--cold:#e4e4e7;--near:#c4b5fd}
:root[data-theme=light][data-cb=on]{--ok:#1d4ed8;--ok-soft:#1d4ed826;--error:#c2410c;--error-soft:#c2410c22;--hot:#854d0e;--warm:#c2410c;--cold:#3f3f46;--near:#6d28d9}

/* Base */
*{box-sizing:border-box}
body{margin:0;min-height:100vh;display:flex;flex-direction:column;background:var(--bg)}
h1,h2,h3,h4,p{margin:0}
h1,h2,h3,h4{font-weight:600;line-height:1.25;letter-spacing:-.01em}
ul,ol{padding:0;margin:0;list-style:none}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit;color:inherit}
button{background:none;border:0;padding:0;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:background-color .15s,border-color .15s,color .15s,opacity .15s}
button:disabled,button[aria-disabled=true]{cursor:default}
svg{display:block}
svg.icon{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.hidden{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip{position:absolute;left:12px;top:-60px;z-index:50;background:var(--surface);color:var(--text);padding:10px 14px;border-radius:6px}
.skip:focus{top:8px}
/* Touch devices get touch wording; keyboard shortcuts are shown only with a fine pointer. */
.pointer-coarse{display:none}
@media (hover:none),(pointer:coarse){.pointer-fine{display:none!important}.pointer-coarse{display:inline}}

/* Header: 49px, 512px column */
.site-header{height:49px;border-bottom:1px solid var(--border);flex:none}
.header-inner{max-width:512px;height:100%;margin:0 auto;padding:0 16px;display:flex;align-items:center;gap:16px}
.brand{margin-right:auto;font-size:22px;font-weight:700;letter-spacing:-.02em;white-space:nowrap;line-height:1;display:flex;align-items:center}
.brand-game{font-weight:400;color:var(--muted-strong)}
.brand-degree{color:var(--accent);font-size:.75em;vertical-align:.45em;margin-left:1px}
.brand-mark{display:none;width:32px;height:32px;border-radius:8px;border:1px solid var(--border);background:var(--surface);align-items:center;justify-content:center;font-size:18px;font-weight:600}
.brand-mark .brand-degree{font-size:.7em;vertical-align:.6em}
.nav{display:flex;align-items:center;gap:16px}
.nav a,.nav button{font-size:15px;color:var(--muted-strong);white-space:nowrap;padding:2px 0;border-bottom:2px solid transparent}
.nav a:hover,.nav button:hover{color:var(--text)}
.nav a[aria-current=page]{color:var(--accent);border-bottom-color:var(--accent)}
.icon-button{min-width:32px;height:32px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;color:var(--text)}
.icon-button:hover{background:var(--surface)}

/* Game column: fills the first screen, so page copy starts below it */
.page{flex:1;width:100%;padding:0 16px 48px}
.game-card{max-width:480px;margin:0 auto;scroll-margin-top:8px;min-height:calc(100vh - 49px);min-height:calc(100svh - 49px)}
.game-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:7px;min-height:42px}
.toolbar-title{display:none;font-size:20px;font-weight:500;color:var(--accent)}
.toolbar-title:focus{outline:none}
.is-summary .toolbar-title{display:block}
.is-summary .mode-tabs{display:none}
.mode-tabs{display:flex;align-items:center;gap:2px;padding:3px;background:var(--surface);border-radius:999px;min-width:0}
.mode-tab{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 11px 0 5px;border:2px solid transparent;border-radius:999px;font-size:14px;color:var(--muted-strong);white-space:nowrap}
.mode-tab:hover{color:var(--text)}
.mode-tab[aria-selected=true]{border-color:var(--accent);color:var(--text);font-weight:600;background:var(--bg)}
.mode-index{flex:none;width:20px;height:20px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;background:var(--border);color:var(--text);font-variant-numeric:tabular-nums}
.mode-tab[aria-selected=true] .mode-index{background:var(--accent);color:#151517}
.tab-check{display:none;color:var(--ok);font-size:12px;margin-left:-3px}
.mode-tab.done{border-color:color-mix(in srgb,var(--ok) 55%,transparent)}
.mode-tab.done .mode-index{background:var(--ok);color:var(--on-state)}
.mode-tab.done .tab-check{display:inline}
.mode-tab.done[aria-selected=true]{border-color:var(--accent)}
.progress-button{gap:5px;padding:0 4px;font-size:14px;color:var(--muted-strong);font-variant-numeric:tabular-nums}
.game-meta{margin-top:20px;text-align:center;font-size:15px;color:var(--muted-strong);font-variant-numeric:tabular-nums;min-height:22px}
.compare-meta{font-size:13px;line-height:22px}
.board{padding-bottom:8px}

/* Angle diagrams: 140px rays, 3px rays, 3.5px arc, light wedge */
.angle-wrap{width:min(100%,360px);margin:14px auto 0}
.angle-svg{width:100%;height:auto;aspect-ratio:1;overflow:visible}
.angle-svg .ray{stroke:var(--ray);stroke-width:3;stroke-linecap:round}
.angle-svg .arc{stroke:var(--arc);stroke-width:3.5;fill:none;stroke-linecap:round}
.angle-svg .arc-head{fill:var(--arc)}
.angle-svg .wedge{fill:var(--arc);fill-opacity:.12}
.angle-svg .origin{fill:var(--ray)}
.angle-svg .angle-label{fill:var(--muted-strong);font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
.angle-svg .angle-label.revealed{fill:var(--muted-strong);font-size:12px;font-weight:500}
.angle-svg .drawing-guide{fill:none;stroke:var(--border);stroke-width:1.2}
.angle-svg .handle{fill:var(--accent)}
.angle-svg .hit-target{stroke:transparent;stroke-width:36}
.angle-svg .ghost-ray{stroke:var(--target);stroke-width:3;stroke-dasharray:8 7;stroke-linecap:round}
.angle-svg .target-label{fill:var(--target);font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
.angle-svg .error-band{fill-opacity:.22}
.angle-svg .error-band.hit{fill:var(--ok)}
.angle-svg .error-band.miss{fill:var(--error)}
.kind-draw-live .wedge,.kind-draw-result .wedge{fill-opacity:.2}
.kind-card .ray,.kind-card .arc,.kind-mini .ray,.kind-mini .arc,.kind-mini .ghost-ray{vector-effect:non-scaling-stroke}
.kind-card .ray{stroke-width:2}
.kind-card .arc{stroke-width:2.25}
.kind-card .wedge{fill-opacity:.22}
.kind-mini .ray{stroke-width:1.5}.kind-mini .arc{stroke-width:1.75}.kind-mini .ghost-ray{stroke-width:1.5;stroke-dasharray:4 3}.kind-mini .target-label,.kind-mini .arc-head{display:none}

/* Guess form */
/* Measured 1360×900 (Codex, real browser): reference field y553, Guess button y609. */
#guess-form{margin-top:10px;text-align:center}
#guess-form .submit{margin-top:8px}
.input-label{display:block;font-size:15px;color:var(--muted-strong);margin-bottom:10px}
.number-row{display:grid;grid-template-columns:repeat(3,minmax(0,40px)) minmax(64px,80px) repeat(3,minmax(0,40px));gap:6px;justify-content:center;align-items:center}
.step{height:40px;border-radius:6px;background:var(--surface);border:1px solid var(--border);font-size:15px;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.step:hover{background:var(--surface-strong)}
.number-field{position:relative}
.number-field input{display:block;width:100%;height:48px;border-radius:6px;border:1px solid var(--border);background:var(--surface);color:var(--text);text-align:center;font-size:20px;font-weight:600;font-variant-numeric:tabular-nums;padding:0 6px}
.number-field input::placeholder{color:var(--muted);font-weight:500;opacity:1}
.number-field input:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 1px var(--accent)}
.number-field input[aria-invalid=true]{border-color:var(--error);box-shadow:0 0 0 1px var(--error)}
.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:8px 18px;border-radius:8px;font-size:16px;font-weight:600;white-space:nowrap}
.primary{background:var(--primary);color:var(--on-primary)}
.primary:hover:not([aria-disabled=true]){filter:brightness(1.1)}
.primary[aria-disabled=true]{opacity:.5}
.secondary{background:var(--surface);border:1px solid var(--border);color:var(--text)}
.secondary:hover{border-color:var(--accent)}
.primary svg.icon,.secondary svg.icon{width:18px;height:18px}
.submit{display:flex;width:min(100%,320px);margin:12px auto 0}
/* Continue buttons after feedback size to their label (reference ≈142×40); primary Submit stays 320×40. */
.submit.compact{width:fit-content;max-width:100%;padding:8px 20px}
.result-actions .primary.compact{flex:0 0 auto;max-width:100%;padding:8px 20px}
.error{font-size:14px;color:var(--error);text-align:center;margin-top:8px;font-weight:500}
.error:empty{margin:0}
.keyboard-note{text-align:center;color:var(--muted);font-size:13px;margin-top:10px}
.key{display:inline-block;border:1px solid var(--border);border-radius:4px;padding:0 5px;font-size:12px;line-height:18px}
.text-button{font-size:14px;color:var(--accent);padding:4px 2px}
.text-button:hover{text-decoration:underline;text-underline-offset:3px}

/* Guess history: compact rows, temperature icon + word + direction */
.guess-history{display:flex;flex-direction:column;gap:6px;width:min(100%,256px);margin:16px auto 0}
.guess-row{display:grid;grid-template-columns:auto auto 1fr auto;align-items:center;gap:8px;height:34px;padding:0 10px;border-radius:7px;background:var(--surface);border:1px solid var(--border);font-size:13px;font-variant-numeric:tabular-nums}
.guess-num{color:var(--muted);font-size:10px}
.guess-value{font-size:17px;font-weight:600}
.clue{justify-self:end;display:inline-flex;align-items:center;gap:5px;color:var(--muted-strong);font-weight:500}
.clue-icon{font-size:14px;line-height:1}
.clue-text{white-space:nowrap}
.direction{display:inline-flex;align-items:center;gap:3px;font-size:11px;color:var(--muted-strong)}
.dir-icon{font-size:15px;line-height:1}
.dir-correct .dir-text{color:var(--ok)}
.band-exact,.band-near{border-color:color-mix(in srgb,var(--ok) 60%,var(--border))}
.band-exact .clue,.band-exact .dir-text{color:var(--ok)}
.band-near .clue{color:var(--near)}
.band-hot .clue{color:var(--hot)}
.band-warm .clue{color:var(--warm)}
.band-cold .clue{color:var(--cold)}
.guess-ended .guess-end-grid{display:grid;grid-template-columns:minmax(0,190px) minmax(0,256px);gap:20px;justify-content:center;align-items:center;margin-top:10px}
.guess-ended .angle-wrap.compact{margin:0;width:100%}
.guess-ended .guess-history{margin:0;width:100%}

/* Results shared by all modes */
.round-result{width:min(100%,400px);margin:22px auto 0;text-align:center}
.result-title{font-size:26px;font-weight:500;color:var(--accent)}
.result-title:focus{outline:none}
.round-result.lost .result-title{color:var(--text)}
.round-result.review{width:min(100%,420px)}
.round-result p{font-size:15px;color:var(--muted-strong);margin-top:4px}
.round-result p strong{color:var(--text)}
.points-line{font-variant-numeric:tabular-nums}
.result-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:16px}
.result-actions.start{justify-content:flex-start}
.result-actions .primary,.result-actions .secondary{flex:1 1 150px;max-width:240px}
.result-actions .primary.wide{max-width:none}
.auto-note{font-size:13px;color:var(--muted-strong);text-align:center;margin-top:8px}
.mini-stats{display:flex;justify-content:center;gap:28px;margin:18px 0 0}
.mini-stats div{display:flex;flex-direction:column-reverse;align-items:center}
.mini-stats dd{margin:0;font-size:24px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--text)}
.mini-stats dt{font-size:12px;color:var(--muted-strong);text-transform:uppercase;letter-spacing:.06em}
.keep-playing{margin-top:22px;text-align:left}
.keep-playing h3{font-size:15px;color:var(--muted-strong);text-align:center;margin-bottom:10px}
.keep-playing ul{display:grid;gap:8px}
.keep-card{width:100%;display:grid;grid-template-columns:1fr auto;column-gap:12px;text-align:left;padding:12px 14px;border-radius:10px;background:var(--surface);border:1px solid var(--border)}
.keep-card:hover{border-color:var(--accent)}
.keep-name{font-weight:600}
.keep-blurb{grid-column:1;font-size:13px;color:var(--muted-strong)}
.keep-go{grid-column:2;grid-row:1/3;align-self:center;display:inline-flex;align-items:center;gap:4px;color:var(--accent);font-size:14px;font-weight:600}
.keep-go .icon{width:16px;height:16px}
.mark{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;color:var(--on-state);flex:none}
.mark .icon{width:14px;height:14px;stroke-width:3}
.mark.hit{background:var(--ok)}
.mark.miss{background:var(--error)}

/* Draw */
.draw-prompt{text-align:center;margin-top:12px;font-size:20px;line-height:1.2;color:var(--muted-strong)}
.draw-prompt strong{font-size:30px;font-weight:700;color:var(--text);font-variant-numeric:tabular-nums}
.draw-surface{background:var(--surface);border:2px solid var(--border);border-radius:12px}
.draw-surface.state-hit{border-color:var(--ok)}
.draw-surface.state-miss{border-color:var(--error)}
.draw-board{touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab;border-radius:10px}
.draw-board:active{cursor:grabbing}
.draw-board:focus-visible{outline-offset:-3px}
.draw-note{text-align:center;color:var(--muted-strong);font-size:15px;margin-top:16px}
.draw-adjustments{display:flex;justify-content:center;align-items:center;gap:6px;margin-top:12px;flex-wrap:wrap}
.draw-adjustments span{font-size:12px;color:var(--muted);margin-right:2px}
.draw-adjustments button{min-width:40px;height:28px;padding:0 6px;border-radius:6px;background:transparent;border:1px solid var(--border);font-size:12px;font-weight:600;color:var(--muted-strong);font-variant-numeric:tabular-nums}
.draw-adjustments button:hover{color:var(--text);background:var(--surface)}
.draw-feedback{margin:14px auto 0;text-align:center}
.feedback-title{display:inline-flex;align-items:center;gap:8px;font-size:20px;font-weight:600}
.draw-feedback.miss .feedback-title{color:var(--text)}
.feedback-detail{font-size:14px;color:var(--muted-strong);margin-top:2px;font-variant-numeric:tabular-nums}
.review-list{display:grid;gap:8px;margin-top:16px;text-align:left}
.review-row{display:grid;grid-template-columns:64px 1fr auto;align-items:center;gap:12px;padding:8px 12px 8px 8px;border-radius:10px;background:var(--surface);border:1px solid var(--border);border-left:4px solid var(--border)}
.review-row.hit{border-left-color:var(--ok)}
.review-row.miss{border-left-color:var(--error)}
.review-thumb{width:64px;height:64px}
.review-thumb .angle-svg{width:64px;height:64px}
.review-text strong{display:block;font-size:15px}
.review-text span{font-size:13px;color:var(--muted-strong);font-variant-numeric:tabular-nums}

/* Higher or lower */
.compare-prompt{text-align:center;margin-top:10px;font-size:16px;line-height:24px;font-weight:400;color:var(--accent)}
.compare-sub{text-align:center;font-size:12px;line-height:18px;color:var(--muted-strong);margin-top:2px}
.comparison{display:grid;grid-template-columns:repeat(2,minmax(0,190px));gap:20px;justify-content:center;margin-top:10px}
.angle-choice{position:relative;display:flex;flex-direction:column;align-items:center;aspect-ratio:190/218;padding:12px 12px 10px;border:2px solid var(--border);border-radius:14px;background:var(--surface);min-width:0}
.angle-choice:hover:not([aria-disabled=true]){border-color:var(--accent)}
.angle-choice .angle-svg{flex:1;min-height:0;width:100%;aspect-ratio:auto}
.choice-value{flex:none;height:32px;display:flex;align-items:center;font-size:22px;font-weight:700;font-variant-numeric:tabular-nums}
.unknown-badge{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--accent-soft);color:var(--accent);font-size:16px;font-weight:700}
.angle-choice.picked{border-color:var(--text);box-shadow:0 0 14px color-mix(in srgb,var(--text) 25%,transparent)}
.angle-choice.picked.right{background:color-mix(in srgb,var(--ok) 14%,var(--surface))}
.angle-choice.picked.wrong{background:color-mix(in srgb,var(--error) 14%,var(--surface))}
.angle-choice.bigger{border-color:var(--ok)}
.pick-mark{position:absolute;left:50%;top:44%;width:52px;height:52px;margin:-26px 0 0 -26px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--on-state);animation:pop .25s ease-out}
.pick-mark .icon{width:26px;height:26px;stroke-width:3}
.pick-mark.hit{background:var(--ok);color:var(--on-state)}
.pick-mark.miss{background:var(--error)}
.compare-feedback{text-align:center;font-size:17px;font-weight:600;margin:14px auto 0;max-width:420px;min-height:26px;font-variant-numeric:tabular-nums}
.compare-feedback.hit strong{color:var(--ok)}
.compare-feedback.miss strong{color:var(--error)}
@keyframes pop{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}
/* The new card slides into the known (left) slot; the next hidden card enters on the right. */
.comparison.advancing .angle-choice:first-child{animation:slide-left .38s cubic-bezier(.2,.7,.2,1)}
.comparison.advancing .angle-choice:last-child{animation:enter-right .38s ease-out}
@keyframes slide-left{from{transform:translateX(calc(100% + 20px))}to{transform:none}}
@keyframes enter-right{from{transform:translateX(24px);opacity:0}to{transform:none;opacity:1}}
.run-marks{display:flex;justify-content:center;gap:8px;margin-top:14px}
.run-marks .mark{width:26px;height:26px}
.sequence{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px;margin-top:12px;font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
.sequence span{padding:2px 6px;border-radius:6px;background:var(--surface)}
.sequence .sequence-arrow{background:none;color:var(--muted);padding:0}
.question-list{display:grid;gap:6px;margin-top:14px;text-align:left}
.question-list li{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:8px 12px;border-radius:8px;background:var(--surface);border-left:4px solid var(--border);font-size:13px;font-variant-numeric:tabular-nums}
.question-list li>span:first-child{color:var(--muted-strong)}
.question-list li.hit{border-left-color:var(--ok)}
.question-list li.miss{border-left-color:var(--error)}
.question-list li.hit strong{color:var(--ok)}
.question-list li.miss strong{color:var(--error)}

/* Daily summary */
.summary{margin-top:14px}
.summary-card{padding:18px 12px 12px;background:var(--surface);border-radius:16px}
.big-score{text-align:center;font-weight:700;line-height:1;font-variant-numeric:tabular-nums}
.big-score span{font-size:52px;letter-spacing:-.02em}
.big-score small{font-size:20px;color:var(--muted-strong);margin-left:2px;font-weight:500}
.summary-caption{text-align:center;font-size:14px;color:var(--muted-strong);margin-top:6px}
.summary-rows{display:grid;gap:8px;margin-top:16px}
.summary-row{width:100%;display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:10px;padding:12px;border-radius:10px;background:var(--bg);text-align:left}
.summary-row:hover{outline:1px solid var(--border)}
.row-index{width:22px;height:22px;border-radius:50%;background:var(--ok);color:var(--on-state);display:flex;align-items:center;justify-content:center}
.row-index .icon{width:13px;height:13px;stroke-width:3}
.row-main{min-width:0}
.row-name{display:block;font-weight:600}
.row-cells{display:flex;align-items:center;gap:4px;margin-top:4px}
.cell{width:13px;height:13px;border-radius:3px;background:var(--border)}
.cell.hit,.cell.band-exact{background:var(--ok)}
.cell.miss{background:var(--error)}
.cell.band-near{background:var(--near)}.cell.band-hot{background:var(--hot)}.cell.band-warm{background:var(--warm)}.cell.band-cold{background:var(--cold)}
.row-detail{font-size:12px;color:var(--muted-strong);margin-left:6px;font-variant-numeric:tabular-nums}
.row-score{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}
.row-score small{font-size:12px;color:var(--muted-strong);font-weight:500}
.summary-actions .primary,.summary-actions .secondary{min-height:46px;border-radius:999px}
.spoiler-note{text-align:center;font-size:12px;color:var(--muted);margin-top:8px}
.tomorrow{text-align:center;margin-top:20px}
.tomorrow p:first-child{font-size:16px}
.tomorrow-label{font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted-strong);margin-top:10px}
.countdown{display:inline-flex;align-items:center;gap:3px;margin-top:6px}
.countdown .digit{width:26px;height:34px;display:inline-flex;align-items:center;justify-content:center;border-radius:5px;background:var(--surface);border:1px solid var(--border);font-size:20px;font-weight:600;font-variant-numeric:tabular-nums}
.countdown .colon{font-weight:600;color:var(--muted-strong)}
.streak-line{display:inline-flex;align-items:center;gap:6px;font-size:14px;color:var(--muted-strong);margin-top:10px}
.streak-line .icon{width:16px;height:16px;color:var(--accent)}
.how-played{margin-top:24px;padding-top:18px;border-top:1px solid var(--border)}
.how-played h3{text-align:center;font-size:17px;font-weight:500;color:var(--accent)}
.summary-panel{margin-top:10px}
.summary-panel .guess-history{width:min(100%,300px)}
.crowd-note,.stats-caption{font-size:12px;color:var(--muted);text-align:center;margin-top:12px}

/* Chips and segmented controls */
.chip-tabs{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin-top:12px}
.chip{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px 0 5px;border-radius:999px;border:2px solid transparent;background:var(--surface);font-size:13px;color:var(--muted-strong)}
.chip.active{border-color:var(--accent);color:var(--text);font-weight:600}
.chip-index{width:18px;height:18px;border-radius:50%;background:var(--border);display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;color:var(--text)}
.chip.active .chip-index{background:var(--accent);color:#151517}
.segmented{display:grid;grid-template-columns:1fr 1fr;padding:3px;border-radius:999px;background:var(--surface);margin-top:14px}
.segmented button{height:34px;border-radius:999px;font-size:14px;color:var(--muted-strong);font-weight:500}
.segmented button[aria-selected=true]{background:var(--bg);color:var(--text);font-weight:600}
.scope-row{display:flex;justify-content:center;gap:6px;margin-top:14px}
.scope{height:28px;padding:0 12px;border-radius:999px;border:1px solid var(--border);font-size:12px;color:var(--muted-strong)}
.scope.active{border-color:var(--accent);color:var(--text);background:var(--accent-soft)}

/* Below the game: page title, progress, guide (narrow column like the reference) */
.below-game{max-width:464px;margin:40px auto 0;padding-top:36px;border-top:1px solid var(--border)}
.eyebrow,.section-caption,.example-label{font-size:12px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--accent)}
.eyebrow{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.status-dot{width:6px;height:6px;border-radius:50%;background:var(--accent)}
.intro h1{font-size:20px}
.intro p{font-size:15px;color:var(--muted-strong);margin-top:8px}
.date-label{font-size:14px;color:var(--muted);margin-top:8px}
.practice-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-top:20px;padding:12px 14px;background:var(--surface);border:1px solid var(--border);border-radius:12px}
.practice-controls label{display:flex;align-items:center;gap:10px;font-size:15px;color:var(--muted-strong)}
.practice-controls select{height:36px;padding:0 8px;border-radius:6px;border:1px solid var(--border);background:var(--bg);color:var(--text);font-size:14px}
.range-key{font-size:14px;color:var(--muted-strong)}
.rail{display:grid;gap:10px;margin-top:16px}
.rail-section{padding:14px 16px;background:var(--surface);border:1px solid var(--border);border-radius:12px;min-width:0}
.rail-section h2{font-size:15px;margin-bottom:8px}
.rail-section p{font-size:14px;color:var(--muted-strong);margin-top:6px}
.journey{display:flex;flex-direction:column;gap:10px}
.journey li{display:flex;align-items:center;gap:10px}
.journey-icon{flex:none;width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;background:var(--border)}
.journey-icon.complete{background:transparent;box-shadow:inset 0 0 0 1.5px var(--ok);color:var(--ok)}
.journey-icon .icon{width:14px;height:14px}
.journey .label{font-size:14px;font-weight:500;display:block;line-height:1.3}
.journey small{display:block;font-size:12px;color:var(--muted-strong)}
.reset-number{font-size:26px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.2}
.reset-caption{font-size:13px;color:var(--muted-strong);margin-top:4px}
.stat-inline{display:flex;gap:24px;flex-wrap:wrap}
.stat-inline strong{display:block;font-size:24px;font-weight:600;line-height:1.2;font-variant-numeric:tabular-nums}
.stat-inline span{font-size:13px;color:var(--muted-strong)}
.practice-dots{display:flex;gap:4px;margin-top:12px}
.practice-dots span{flex:1;height:8px;border-radius:3px;background:var(--border)}
.practice-dots span.played{background:var(--accent)}
.local-note{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.local-note .icon{width:15px;height:15px}
.rail .text-button{margin-top:8px}
.overview{margin-top:40px}
.overview h2,.example-section h2{font-size:19px;margin-top:6px}
.mode-overview{display:grid;gap:10px;margin-top:16px}
.mode-overview li{display:grid;grid-template-columns:40px 1fr;column-gap:14px;padding:14px;background:var(--surface);border:1px solid var(--border);border-radius:12px;font-size:14px;color:var(--muted-strong)}
.mode-overview h3{font-size:15px;color:var(--text);margin-bottom:2px}
.mini-angle{grid-row:1/3;width:40px;height:40px;color:var(--ray)}
.mini-angle svg{width:100%;height:100%}
.example-section{display:grid;gap:18px;margin-top:40px}
.example-section p{font-size:15px;color:var(--muted-strong);margin-top:8px}
.example-section .text-button{margin-top:8px}
.example-steps{display:flex;flex-direction:column;gap:14px;border-left:2px solid var(--border);padding-left:20px}
.example-steps li{position:relative;font-size:14px;color:var(--muted-strong)}
.example-steps li::before{content:"";position:absolute;left:-26px;top:5px;width:10px;height:10px;border-radius:50%;background:var(--bg);border:2px solid var(--accent)}
.example-steps strong{display:block;font-size:15px;color:var(--text)}

/* Static rules and practice guidance remain below the playable game. */
.content-nav{display:flex;flex-wrap:wrap;gap:8px 16px;padding:14px 0;margin-top:12px;border-bottom:1px solid var(--border);font-size:13px}
.content-nav a,.inline-link{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.inline-link{display:inline-block;max-width:100%}
.content-nav a:hover,.inline-link:hover{color:var(--text)}
.content-heading{scroll-margin-top:44px}
.section-intro{font-size:15px;line-height:1.6;color:var(--muted-strong);margin-top:10px}
.hint-ranges,.range-list{display:grid;gap:0;padding:4px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface);font-size:14px}
.hint-ranges div,.range-list div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:10px;padding:10px 0;border-bottom:1px solid var(--border)}
.hint-ranges div:last-child,.range-list div:last-child{border:0}
.hint-ranges dt,.range-list dt{font-weight:500}
.hint-ranges dd,.range-list dd{margin:0;color:var(--muted-strong)}
.practice-guide,.page-questions{margin-top:40px}
.practice-guide h2,.page-questions h2{font-size:19px;margin-top:6px}
.practice-guide .range-list,.practice-guide .example-steps{margin-top:18px}
.practice-example{margin-top:20px;padding:16px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.practice-example h3{font-size:15px;margin:8px 0}
.practice-example p{font-size:14px;line-height:1.6;color:var(--muted-strong)}
.practice-example strong{color:var(--text);font-weight:500}
.mode-table{width:100%;table-layout:fixed;border-collapse:collapse;margin-top:14px;font-size:13px;line-height:1.5}
.mode-table caption{text-align:left;font-size:12px;color:var(--muted);margin-bottom:10px}
.mode-table th,.mode-table td{padding:12px 8px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top;overflow-wrap:anywhere}
.mode-table th{font-weight:500;color:var(--text)}
.mode-table td{color:var(--muted-strong)}
.mode-table thead{background:var(--surface)}
.mode-table th:first-child{width:33%}
.page-questions details{border-bottom:1px solid var(--border)}
.page-questions summary{padding:16px 0;font-size:15px;font-weight:500;cursor:pointer}
.page-questions details p{padding-bottom:16px;font-size:14px;line-height:1.6;color:var(--muted-strong)}

/* Site information uses the same palette and font without loading a game. */
.support-page{width:100%;max-width:688px;margin:0 auto;padding:48px 24px 64px;flex:1;overflow-wrap:anywhere}
.support-page h1{font-size:clamp(27px,5vw,36px);margin:8px 0 18px}
.support-lead{font-size:17px;line-height:1.65;color:var(--muted-strong)}
.support-date{font-size:12px;color:var(--muted);margin-top:16px}
.support-page section{margin-top:40px}
.support-page h2{font-size:21px;margin-bottom:16px}
.support-page section p{font-size:15px;line-height:1.75;color:var(--muted-strong);margin-top:14px}
.support-page a:not(.primary):not(.secondary){color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.support-page strong{color:var(--text);font-weight:500}
.support-list{margin:0;padding:0;border-top:1px solid var(--border);font-size:15px}
.support-list div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:16px;padding:16px 0;border-bottom:1px solid var(--border)}
.support-list dt{font-weight:500}.support-list dd{margin:0;color:var(--muted-strong);line-height:1.65}
.error-links{display:flex;gap:12px;flex-wrap:wrap;margin-top:32px}.error-links a{display:flex;align-items:center;justify-content:center;min-height:48px;padding:12px 20px;border-radius:9px}
.release-note{padding:12px;border:1px solid var(--border);border-radius:8px}
.support-points{list-style:disc;padding-left:20px;margin-top:14px;font-size:15px;line-height:1.75;color:var(--muted-strong)}
.support-points li+li{margin-top:8px}
@media(max-width:400px){.support-page{padding:32px 16px 48px}.support-list div{grid-template-columns:1fr;gap:6px}}

/* Footer */
.site-footer{max-width:464px;width:100%;margin:0 auto;padding:24px 16px 32px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:12px;font-size:13px;color:var(--muted)}
.site-footer strong{color:var(--text);font-weight:600}
.footer-links{display:flex;flex-wrap:wrap;gap:16px}
.footer-links a,.footer-links button{font-size:13px;color:var(--muted-strong)}
.footer-links a:hover,.footer-links button:hover{color:var(--text);text-decoration:underline;text-underline-offset:3px}

/* Dialogs: content scrolls inside, header stays put */
dialog{width:min(384px,calc(100% - 32px));max-height:min(88dvh,760px);padding:0;border:1px solid var(--border);border-radius:16px;background:var(--raised);color:var(--text);box-shadow:0 24px 80px #0008;overflow:hidden}
dialog[open]{display:flex;flex-direction:column}
dialog.wide{width:min(420px,calc(100% - 24px))}
dialog::backdrop{background:var(--backdrop)}
.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 20px 8px;flex:none}
.dialog-head h2{font-size:20px}
.dialog-content{padding:4px 20px 20px;overflow-y:auto;overscroll-behavior:contain}
.dialog-content p{font-size:15px;color:var(--muted-strong);margin:8px 0}
.dialog-content p strong{color:var(--text)}
.dialog-content h3{font-size:15px;margin-top:16px}
.dialog-content h4{font-size:14px;margin-top:14px}
.help-intro{display:grid;grid-template-columns:96px 1fr;gap:14px;align-items:center}
.help-figure{width:96px;height:72px}
.help-figure .fig-ray{stroke:var(--ray);stroke-width:2.2;stroke-linecap:round;fill:none}
.help-figure .fig-arc{stroke:var(--arc);stroke-width:2.4;fill:none;stroke-linecap:round}
.help-figure .fig-wedge{fill:var(--arc);fill-opacity:.15}
.help-figure .fig-text{fill:var(--muted-strong);font-size:12px;font-weight:600}
.help-figure .fig-small{fill:var(--text);font-size:11px;font-weight:700;text-anchor:middle}
.help-figure .fig-small.accent{fill:var(--accent)}
.help-figure .fig-board{fill:var(--surface);stroke:var(--border);stroke-width:1.2}
.help-figure .fig-board.accent{stroke:var(--accent)}
.help-figure .fig-guide{fill:none;stroke:var(--border)}
.help-figure .fig-ghost{stroke:var(--target);stroke-width:2;stroke-dasharray:4 3;stroke-linecap:round}
.help-figure .fig-band{fill:var(--error);fill-opacity:.25}
.help-figure .fig-handle{fill:var(--accent)}
.guess-history.sample{width:100%;margin:10px 0 0}
.sample-note{font-size:12px!important;color:var(--muted)!important;margin:4px 0 0!important}
.help-list{display:grid;gap:6px;margin-top:8px;font-size:14px;color:var(--muted-strong)}
.help-list li{display:grid;grid-template-columns:22px 1fr;gap:8px;align-items:start}
.help-list strong{color:var(--text)}
.swatch{display:inline-block;width:18px;height:10px;margin-top:5px;border-radius:2px}
.swatch.dashed{background:repeating-linear-gradient(90deg,var(--target) 0 5px,transparent 5px 8px);height:3px;margin-top:9px}
.swatch.band{background:var(--error);opacity:.5}
.help-keys{font-size:13px!important;margin-top:12px!important}
.full-rules{margin-top:16px;border-top:1px solid var(--border);padding-top:10px}
.full-rules summary{cursor:pointer;font-size:14px;font-weight:600;color:var(--accent)}
.legend{display:flex;flex-direction:column;margin:8px 0}
.legend li{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:6px 0;border-bottom:1px solid var(--border);font-size:14px}
.legend li span{color:var(--muted-strong)}
.switch-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 0}
.switch-row label{font-size:15px;font-weight:500}
.switch-row p{font-size:12px!important;margin:2px 0 0!important}
.switch{position:relative;flex:none;width:44px;height:24px;border-radius:999px;background:var(--border)}
.switch-thumb{position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .15s}
.switch[aria-checked=true]{background:var(--primary)}
.switch[aria-checked=true] .switch-thumb{transform:translateX(20px)}
.settings-note{font-size:13px!important}
.progress-head{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:14px 10px 10px;border-radius:12px;background:var(--surface);text-align:center}
.progress-head>div{display:flex;flex-direction:column;align-items:center;gap:4px}
.progress-head p{grid-column:1/-1;font-size:13px!important;margin:4px 0 0!important}
.ph-value{display:inline-flex;align-items:center;gap:4px;height:44px;font-size:28px;font-weight:700;font-variant-numeric:tabular-nums}
.ph-value .icon{width:20px;height:20px;color:var(--accent)}
.ph-label{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted-strong)}
.ring{width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:conic-gradient(var(--accent) var(--ring),var(--border) 0)}
.ring span{width:36px;height:36px;border-radius:50%;background:var(--surface);display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700;font-variant-numeric:tabular-nums}
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(70px,1fr));gap:8px;margin:14px 0 0}
.tiles div{display:flex;flex-direction:column;align-items:center;padding:10px 4px;border-radius:10px;background:var(--surface)}
.tiles dd{margin:0;font-size:22px;font-weight:700;font-variant-numeric:tabular-nums}
.tiles dt{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted-strong);text-align:center}
.dist-title{font-size:11px!important;letter-spacing:.08em;text-transform:uppercase;color:var(--muted-strong);margin-top:16px!important}
.distribution{display:flex;flex-direction:column;gap:5px;margin-top:8px}
.distribution li{display:grid;grid-template-columns:16px 1fr;align-items:center;gap:8px;font-size:13px;font-variant-numeric:tabular-nums}
.bar-track{display:block}
.bar-label{text-align:right;color:var(--muted-strong);font-weight:600}
.distribution .bar{display:block;min-width:24px;padding:1px 7px;border-radius:4px;background:var(--border);text-align:right;font-size:12px;font-weight:600}
.distribution .bar.filled{background:var(--accent);color:#151517}
.distribution .bar.today{background:var(--ok);color:var(--on-state)}
.progress-body{margin-top:4px}
.ach-group{margin-top:16px}
.ach-group h3{display:flex;justify-content:space-between;font-size:14px!important;margin:0!important}
.ach-group h3 span{font-size:12px;color:var(--muted-strong);font-weight:500}
.ach-group ul{display:grid;gap:6px;margin-top:8px}
.ach{display:grid;grid-template-columns:30px 1fr auto;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;background:var(--surface)}
.ach-icon{font-size:20px;text-align:center}
.ach.locked .ach-icon{filter:grayscale(1);opacity:.45}
.ach-text strong{display:block;font-size:14px}
.ach-text span{font-size:12px;color:var(--muted-strong)}
.ach-state{font-size:12px;color:var(--muted-strong);font-variant-numeric:tabular-nums;white-space:nowrap}
.ach.unlocked{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ok) 50%,transparent)}
.ach.unlocked .ach-state{color:var(--ok)}
.ach-state .icon{width:18px;height:18px;stroke-width:2.6}
.copy-text{width:100%;min-height:150px;resize:vertical;padding:12px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font-size:14px}
.toast{position:fixed;left:50%;bottom:24px;z-index:60;max-width:calc(100% - 32px);padding:10px 16px;border-radius:8px;background:var(--text);color:var(--bg);font-size:14px;font-weight:500;opacity:0;pointer-events:none;transform:translate(-50%,16px);transition:opacity .15s,transform .15s}
.toast.visible{opacity:1;transform:translate(-50%,0)}
.save-warning{margin-top:14px;padding:10px 14px;border:1px solid var(--warm);border-radius:8px;font-size:14px;color:var(--text)}
.js-failure{padding:24px;text-align:center;color:var(--muted-strong)}

/* Phone */
@media (max-width:520px){
  .guess-ended .guess-end-grid{grid-template-columns:minmax(0,150px) minmax(0,1fr);gap:12px}
  .comparison{grid-template-columns:repeat(2,minmax(0,158px));gap:12px}
  .angle-choice{aspect-ratio:158/186;padding:10px 10px 8px}
  .game-meta{margin-top:16px}
}
/* Long brand gives way to a compact mark; How to Play and the current mode name stay. */
@media (max-width:480px){.comparison + .keyboard-note{display:none}}
@media (max-width:440px){
  .header-inner{gap:12px}
  .brand-full{display:none}
  .brand-mark{display:inline-flex}
  .nav{gap:12px}
  .nav a,.nav button{font-size:14px}
  .mode-tab{padding:0 5px}
  .mode-tab .tab-label,.mode-tab .tab-check{display:none}
  .mode-tab[aria-selected=true]{padding-right:11px}
  .mode-tab[aria-selected=true] .tab-label{display:inline}
  .progress-button .achievement-count{display:none}
}
@media (max-width:360px){
  .page{padding-left:12px;padding-right:12px}
  .header-inner{padding:0 12px;gap:10px}
  .nav{gap:10px}
  .game-toolbar{gap:4px}
  .number-row{gap:4px}
  .step{font-size:13px}
  .number-field input{font-size:18px}
  .comparison{gap:10px}
  .choice-value{font-size:19px}
  .draw-prompt strong{font-size:26px}
  .guess-ended .guess-end-grid{grid-template-columns:1fr}
  .guess-ended .angle-wrap.compact{width:150px;margin:0 auto}
  .result-actions .primary,.result-actions .secondary{max-width:none}
  .help-intro{grid-template-columns:72px 1fr}
  .help-figure{width:72px;height:54px}
}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
