/* Star Bot Math Adventures: styles shared by the play pages (run, later trophies and grown-ups). Loaded after site.css and before each page's own css/<page>.css. */
:root{
  --board:#a8dcb6; --floor:#f7fbff; --floor2:#eaf3fb;
  --run:#ff6b35; --run-ink:#fff; --run-shadow:#c94d1c; --btn:#ffffff; --btn-ink:#1b2a4a; --ok:#27ae60; --bad:#e04848; --glow:#ffe066;
  --hint:#fff6cc; --hint-ink:#6b5200; --soft:#f3f8fe; --dot:#2d9cdb; --dot2:#f39c2b; --dot-off:#d5e6f5; --board-ink:#1b2a4a;
  --gK:#2d9cdb; --g1:#12a596; --g2:#6bbf3a; --g3:#f39c2b; --g4:#7c4dff; --g5:#d93a3f;
  --shadow:0 6px 18px rgba(27,42,74,.10);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --board:#24543a; --floor:#2a3a57; --floor2:#233350;
    --btn:#243452; --btn-ink:#eaf2ff; --ok:#4cd37f; --bad:#ff7b7b; --shadow:0 6px 18px rgba(0,0,0,.35);
    --hint:#3b3416; --hint-ink:#ffe8a3; --soft:#1f2f4f; --dot:#5cb8ff; --dot2:#ffb54d; --dot-off:#3a5a48; --board-ink:#eaf2ff;
  }
}
:root[data-theme="dark"]{
  --board:#24543a; --floor:#2a3a57; --floor2:#233350;
  --btn:#243452; --btn-ink:#eaf2ff; --ok:#4cd37f; --bad:#ff7b7b; --shadow:0 6px 18px rgba(0,0,0,.35);
  --hint:#3b3416; --hint-ink:#ffe8a3; --soft:#1f2f4f; --dot:#5cb8ff; --dot2:#ffb54d; --dot-off:#3a5a48; --board-ink:#eaf2ff;
}
body{-webkit-tap-highlight-color:transparent}
button{font-family:inherit;font-weight:800;cursor:pointer;border:0;color:inherit}
button:focus-visible{outline:3px solid var(--run);outline-offset:2px}
.app{padding-block:14px 40px}
header{margin-bottom:14px}
.spacer{flex:1}
h1 .pill{color:#fff;border-radius:10px;padding:0 10px;font-size:20px;line-height:1.5;font-family:Nunito,sans-serif;font-weight:800}
a.chip{text-decoration:none}
.chip{background:var(--btn);color:var(--btn-ink);border-radius:999px;padding:10px 16px;font-size:16px;box-shadow:var(--shadow);display:inline-flex;align-items:center;gap:6px}
.chip.icon{width:44px;height:44px;padding:0;justify-content:center;font-size:20px}
@media (max-width:640px){header h1{font-size:24px}header h1 svg{width:32px;height:32px}h1 .pill{font-size:15px}}
@media (max-width:520px){.chip.home .lbl{display:none}.chip.home{width:44px;height:44px;padding:0;justify-content:center;font-size:20px}}
.cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
@media (max-width:860px){.cols{grid-template-columns:1fr}}

/* Robo's speech bubble beside his face */
.prompt{padding:14px 16px;display:flex;gap:12px;align-items:center}
.prompt > svg{width:48px;height:48px;flex:none}
.say{font-family:Fredoka,Nunito,sans-serif;font-size:21px;font-weight:500;line-height:1.3;margin:0}
.say.good{color:var(--ok)}.say.bad{color:var(--bad)}
.say small{display:block;font-family:Nunito,sans-serif;font-size:15px;font-weight:700;color:var(--muted);margin-top:4px}

/* The board: the classroom model for the problem */
.board{background:var(--board);border-radius:18px;padding:12px;box-shadow:var(--shadow);display:flex;flex-direction:column;align-items:center;gap:8px}
.board svg{width:auto;height:auto;max-width:min(100%,340px);max-height:300px;display:block}
.board svg.arr{width:100%}
.board .cap{font-size:14px;color:#1b2a4a;background:rgba(255,255,255,.75);border-radius:999px;padding:3px 12px}
.arr .d{fill:var(--dot);transition:fill .25s,opacity .25s}
.arr .d.off{fill:var(--dot-off)}
.arr .d.b{fill:var(--dot2)}
.arr .rowbg{fill:var(--floor);opacity:.85}
.arr .lbl{font-family:Fredoka,sans-serif;font-size:13px;font-weight:600;fill:#1b2a4a}
.arr .rod{stroke:#1b2a4a;stroke-opacity:.25;stroke-width:1}
/* number line */
.board svg.nl,.board svg.sq,.board svg.bk-svg{width:100%;max-height:none}
.board svg.cl{width:auto;max-width:min(100%,260px);height:auto}
.nl-axis{stroke:var(--board-ink);stroke-width:4;stroke-linecap:round}
.nl-tick{stroke:var(--board-ink);stroke-width:2}
.nl-lbl{font-family:Fredoka,sans-serif;font-size:15px;font-weight:600;fill:var(--board-ink)}
.nl-lbl.mid{opacity:.7;font-size:12px}
.nl-dot{fill:var(--run);stroke:#fff;stroke-width:2.5}
.nl-mark{font-family:Fredoka,sans-serif;font-size:18px;font-weight:700;fill:var(--board-ink)}
.nl-seg{stroke-width:9;stroke-linecap:round;opacity:.75}
.nl-seg.lo{stroke:var(--dot)}.nl-seg.hi{stroke:var(--dot2)}
.nl-seg.win{opacity:1;stroke-width:11}
/* sequence stones */
.sq-stone{fill:var(--floor);stroke:#1b2a4a;stroke-opacity:.2;stroke-width:2}
.sq-stone.gap{fill:none;stroke:var(--run);stroke-opacity:1;stroke-dasharray:6 5;stroke-width:3}
.sq-num{font-family:Fredoka,sans-serif;font-size:22px;font-weight:600;fill:var(--ink)}
.sq-arc{fill:none;stroke:var(--run);stroke-width:3;stroke-linecap:round}
.sq-step{font-family:Fredoka,sans-serif;font-size:16px;font-weight:700;fill:var(--board-ink)}
/* base-ten blocks */
.bk-num,.bk-op{font-family:Fredoka,sans-serif;font-size:18px;font-weight:700;fill:var(--board-ink)}
.bk-op{font-size:22px}
.bk.h rect,.bk.t,.bk.o{fill:var(--dot);stroke:#1b2a4a;stroke-opacity:.3;stroke-width:1}
.bk.h path{stroke:#1b2a4a;stroke-opacity:.18;stroke-width:1;fill:none}
.bk{transition:opacity .25s}
.pv-head{font-family:Nunito,sans-serif;font-size:11px;font-weight:700;fill:var(--board-ink);opacity:.75}
.cb-face{stroke:var(--board-ink);stroke-width:2.5;stroke-linejoin:round}.cb-face.front{fill:#4fb3ff}.cb-face.top{fill:#9fd4ff}.cb-face.right{fill:#2d8fd6}
.cb-edge{stroke:var(--board-ink);stroke-width:2.5;stroke-linecap:round}.cb-edge.hid{stroke-dasharray:6 5;opacity:.8}
.cb-back{fill:#4fb3ff;opacity:.12;stroke:none}
.cb-lit{fill:var(--dot2);opacity:.55;stroke:var(--run);stroke-width:3}.cb-lit-edge{stroke:var(--run);stroke-width:5;stroke-linecap:round}
.cb-dot{fill:var(--run);stroke:#fff;stroke-width:2}.cb-num{font-family:Fredoka,sans-serif;font-size:14px;font-weight:700;fill:var(--board-ink)}
.board svg.cb{width:100%;max-height:none}
.ru-body{fill:#ffd98a;stroke:#b07a12;stroke-width:1.5}
.ru-tick{stroke:#5a3a00;stroke-width:1.6}
.ru-num{font-family:Fredoka,sans-serif;font-size:12px;font-weight:600;fill:#5a3a00}
.ru-unit{font-family:Nunito,sans-serif;font-size:11px;font-weight:700;fill:var(--board-ink);opacity:.8}
.ru-guide{stroke:var(--board-ink);stroke-opacity:.45;stroke-dasharray:3 3}
.ru-space{fill:var(--dot);opacity:.55}.ru-space.alt{fill:var(--dot2)}.ru-space.more{fill:var(--run);opacity:.75}.ru-space.part{fill:var(--dot2)}
.board svg.ru,.board svg.cns{width:100%;max-width:100%;max-height:none}
.cn circle,.cn rect{stroke-width:2}.cn .in{fill:none;stroke-opacity:.35}
.cn.ag circle{fill:#d9dde3;stroke:#6b7280}.cn.cu circle{fill:#e9a07c;stroke:#8a3f1d}
.cn.bl rect{fill:#c7e6a3;stroke:#3b6d11}.cn.bl .in{stroke:#3b6d11}
.cn text{font-family:Fredoka,sans-serif;font-weight:700;fill:#2c2c2a;font-size:20px}.cn.cu text{fill:#4a1b0c}.cn.bl text{fill:#27500a}
.cn{transition:opacity .25s}.cns:has(.lit) .cn:not(.lit){opacity:.35}
.coin-icon{height:auto;width:100%;max-height:96px}
.ol-step{font-family:Fredoka,sans-serif;font-size:15px;font-weight:700;fill:var(--board-ink)}
.ol-step.sm{font-size:11px}
.nl-dot.end{fill:var(--dot2)}
.nl-dot.base{fill:none;stroke:var(--run);stroke-width:3}
.cl-d.lit{fill:var(--run)}
.pv-line{stroke:var(--board-ink);stroke-opacity:.3;stroke-width:1.5}
.bk-svg:has(.lit) .bk:not(.lit){opacity:.3}
.bk.lit rect,.bk.lit.t,.bk.lit.o{fill:var(--dot2)}
/* Grade 2 pictures (D41): ten frames, pairs */
.board svg.tf,.board svg.pr{width:100%;max-height:none}
.tf-frame{fill:var(--floor);stroke:var(--board-ink);stroke-opacity:.5;stroke-width:2.5}
.tf-line{stroke:var(--board-ink);stroke-opacity:.35;stroke-width:1.5}
.tf-dot circle{stroke:#1b2a4a;stroke-opacity:.25;stroke-width:1}
.tf-a circle{fill:var(--dot)}.tf-b circle{fill:#ff8ac8}.tf-c circle{fill:#ffd23f}
.eq-box{fill:var(--floor);stroke:var(--board-ink);stroke-opacity:.5;stroke-width:2.5}
.eq-t{font-family:Fredoka,sans-serif;font-size:26px;font-weight:600;fill:var(--board-ink)}
.eq-mid{font-size:34px}
.eq-v{font-family:Fredoka,sans-serif;font-size:17px;font-weight:600;fill:var(--run)}
.tf-dot.gone circle{opacity:.45}.tf-x{stroke:#e04848;stroke-width:3;stroke-linecap:round}
.tf-dot.lit circle{stroke:var(--board-ink);stroke-opacity:.9;stroke-width:3}
.pr-ic{font-size:28px}
.pr-pair{fill:none;stroke:var(--board-ink);stroke-opacity:.7;stroke-width:2.5;stroke-dasharray:5 4}
.pr-left{fill:none;stroke:#e04848;stroke-width:3}
/* fractions: stacked like on paper, wherever they appear */
.frac{display:inline-flex;flex-direction:column;align-items:center;vertical-align:middle;line-height:1;font-variant-numeric:tabular-nums}
.frac > span{padding:0 .12em}
.frac > span:first-child{border-bottom:.08em solid currentColor;padding-bottom:.06em}
.frac > span:last-child{padding-top:.06em}
.eq .frac{font-size:.8em}
.choice .frac{font-size:.85em}
.slot .frac{font-size:.75em}
.eqrobo{width:1.1em;height:1.1em;vertical-align:middle}
.choices.cmp{grid-template-columns:repeat(3,minmax(0,1fr))}
.choices.cmp .choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.choices.cmp .sym{font-size:40px;line-height:1}
.choices.cmp small{font-family:Nunito,sans-serif;font-size:13px;font-weight:800;color:var(--muted)}
.taprow{display:flex;padding:12px 14px}
/* Grades 4–5 (D57): the pad's extra keys (. / and R) on their own row; a mixed number's whole part; tap-all buttons. */
.padx{grid-column:1/-1;display:flex;gap:10px}.padx .key{flex:1}.padx[hidden],.padx .key[hidden]{display:none}
.whole{margin-right:.12em}
.choice.on{outline:4px solid var(--accent);outline-offset:-4px}
.taprow .key{flex:1}
/* fraction bars */
.board svg.fb,.board svg.fl{width:100%;max-height:none}
.fb-part{fill:var(--floor);stroke:#1b2a4a;stroke-opacity:.45;stroke-width:2;transition:fill .2s}
.fb-part.on.b0{fill:#ff8ac8}.fb-part.on.b1{fill:#4fb3ff}
.fb-part.on.b2,.fb-part.on.b3{fill:#ff8ac8}
.fb-part.tap{cursor:pointer}
.fb-part.tap:hover{fill:color-mix(in srgb,#ff8ac8 35%,var(--floor))}
.fb-part.tap.on:hover{fill:#ff8ac8}
.fb-frame{fill:none;stroke:#1b2a4a;stroke-width:3}
.fb-num{font-family:Fredoka,sans-serif;font-size:16px;font-weight:700;fill:#1b2a4a;pointer-events:none}
.fpic-board .fb-part{stroke:var(--ink);stroke-opacity:.8;stroke-width:2.5}
.frac-icon{height:52px;width:auto;max-width:100%}
.slot .frac-icon{height:1em;vertical-align:middle}
.frac-icon .fp-part{fill:var(--btn);stroke:var(--btn-ink);stroke-width:2;stroke-linejoin:round}
.frac-icon .fp-part.on{fill:#ff8ac8}
.fb-guide-line{stroke:var(--run);stroke-width:3;stroke-dasharray:6 4}
/* fraction number line */
.fl-hit{fill:transparent;cursor:pointer}
.fl-hit.sel{fill:color-mix(in srgb,var(--run) 18%,transparent)}
.fl-jump{fill:none;stroke:var(--run);stroke-width:2.5}
.fl-lbl{font-family:Fredoka,sans-serif;font-size:12px;font-weight:700;fill:var(--board-ink)}
.fl-robo{pointer-events:none;transition:transform .25s ease}
/* clock */
.board svg.ck{width:min(100%,240px)}
.ck-face{fill:var(--floor);stroke:#1b2a4a;stroke-width:4}
.ck-tick{stroke:#1b2a4a;stroke-opacity:.35;stroke-width:1.5}
.ck-tick.five{stroke-opacity:.8;stroke-width:3}
.ck-tick.lit{stroke:var(--run);stroke-opacity:1;stroke-width:4}
.ck-num{font-family:Fredoka,sans-serif;font-size:19px;font-weight:600;fill:var(--ink)}
.ck-num.lit{fill:var(--run);font-size:22px}
.ck-hour{stroke:#1b2a4a;stroke-width:8;stroke-linecap:round}
.ck-min{stroke:var(--dot);stroke-width:5;stroke-linecap:round}
.ck-pin{fill:#1b2a4a}
:root[data-theme="dark"] .ck-hour,:root[data-theme="dark"] .ck-pin{stroke:#eaf2ff;fill:#eaf2ff}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .ck-hour{stroke:#eaf2ff}:root:not([data-theme="light"]) .ck-pin{fill:#eaf2ff}:root:not([data-theme="light"]) .ck-face{stroke:#eaf2ff}:root:not([data-theme="light"]) .ck-tick{stroke:#eaf2ff}}
/* picture graph (HTML) */
.pic{background:var(--floor);border-radius:12px;padding:10px 12px;width:100%;color:var(--ink)}
.pic-title{font-family:Fredoka,sans-serif;font-weight:600;font-size:16px;margin-bottom:6px;text-align:center}
.pic-row{display:flex;align-items:center;gap:8px;padding:4px 6px;border-radius:10px;border-bottom:1px solid var(--line)}
.pic-row.lit{background:color-mix(in srgb,var(--run) 14%,transparent)}
.pic-lbl{width:84px;flex:none;font-size:14px;color:var(--muted);text-transform:capitalize}
.pic-pics{display:flex;flex-wrap:wrap;gap:2px;font-size:24px;line-height:1.1}
.pic-pic{display:inline-block}
.pic-pic.half{width:.5em;overflow:hidden;white-space:nowrap}
.pic-pic.counted{outline:2px solid var(--run);border-radius:6px}
.pic-key{margin-top:8px;font-size:13px;color:var(--muted);text-align:center;font-weight:800}
/* bar graph, line plot */
.board svg.bg,.board svg.lp{width:100%;max-height:none;background:var(--floor);border-radius:12px}
.bg-title{font-family:Fredoka,sans-serif;font-size:13px;font-weight:600;fill:var(--ink)}
.bg-grid{stroke:var(--line);stroke-width:1}
.bg-axis{stroke:var(--ink);stroke-width:2}
.bg-num{font-family:Nunito,sans-serif;font-size:11px;font-weight:800;fill:var(--muted)}
.bg-bar{fill:var(--dot)}.bg-bar.b1{fill:var(--dot2)}.bg-bar.b2{fill:#12a596}.bg-bar.b3{fill:#e8619b}
.bg-icon{font-size:16px}
.bg-lbl{font-family:Nunito,sans-serif;font-size:10px;font-weight:800;fill:var(--muted)}
.bg-readline{stroke:var(--run);stroke-width:2.5;stroke-dasharray:6 4}
.lp-lbl{font-family:Fredoka,sans-serif;font-size:13px;font-weight:600;fill:var(--ink)}
.lp-lbl.small{font-size:11px;fill:var(--muted)}
.lp-x{font-size:18px;font-weight:800;fill:var(--dot)}
.lp-x.lit{fill:var(--run)}
.lp-col{fill:color-mix(in srgb,var(--run) 16%,transparent)}
/* grids for area, rectangles A and B */
.board svg.gd{width:100%;max-height:300px}
.gd-sq{fill:color-mix(in srgb,var(--dot) 30%,var(--floor));stroke:#1b2a4a;stroke-opacity:.3;stroke-width:1}
.gd-sq.blank{fill:var(--floor);stroke-opacity:.08}
.gd-sq.lit{fill:var(--dot);stroke-opacity:.4}
.gd-sq.lit2{fill:var(--dot2);stroke-opacity:.4}
.gd-outline{fill:none;stroke:#1b2a4a;stroke-width:3}
.gd-lbl,.gd-name{font-family:Fredoka,sans-serif;font-size:18px;font-weight:700;fill:var(--board-ink)}
.gd-area{font-family:Fredoka,sans-serif;font-size:13px;font-weight:600;fill:#1b2a4a}
/* polygons */
.board svg.poly{width:min(100%,260px)}
.pg-shape{fill:color-mix(in srgb,var(--dot) 25%,var(--floor));stroke:none}
.pg-side{stroke:#1b2a4a;stroke-width:2.5;stroke-linecap:round}
.pg-side.lit{stroke:var(--run);stroke-width:4}
.pg-lbl{font-family:Fredoka,sans-serif;font-size:9px;font-weight:700;fill:var(--board-ink)}
.pg-lbl.filled{fill:var(--run)}
.pg-right{fill:none;stroke:var(--run);stroke-width:1.6}
/* shape pictures on choice buttons */
.choice.pic{padding:8px}
.choices.words .choice{font-size:26px;padding:0 4px}
@media (max-width:480px){.choices.words .choice{font-size:20px}}
.shape-icon{height:52px;width:auto;max-width:100%}
.slot .shape-icon{height:.9em;vertical-align:middle}
.shape-icon polygon{fill:color-mix(in srgb,var(--dot) 35%,var(--btn));stroke:var(--btn-ink);stroke-width:2.5;stroke-linejoin:round}
/* columns like on paper */
.cl{background:var(--floor);border-radius:12px}
.cl-head{font-family:Nunito,sans-serif;font-size:12px;font-weight:900;fill:var(--muted);letter-spacing:1px}
.cl-d,.cl-ans{font-family:Fredoka,sans-serif;font-size:34px;font-weight:600;fill:var(--ink)}
.cl-ans{fill:var(--ok)}
.cl-d.struck{opacity:.35;text-decoration:line-through}
.cl-carry,.cl-trade{font-family:Fredoka,sans-serif;font-size:18px;font-weight:700;fill:var(--run)}
.cl-line{stroke:var(--ink);stroke-width:3}

/* Answer card: the equation with its slot, the number pad, the choices */
.eq{display:flex;align-items:center;justify-content:center;gap:10px;font-family:Fredoka,Nunito,sans-serif;font-size:clamp(32px,6vw,44px);font-weight:600;padding:14px 10px 6px;flex-wrap:wrap;font-variant-numeric:tabular-nums}
.slot{min-width:92px;min-height:1.3em;text-align:center;border-radius:14px;border:3px dashed var(--accent);padding:0 12px;color:var(--accent)}
.slot.good{border-style:solid;border-color:var(--ok);color:var(--ok)}
.slot.bad{border-color:var(--bad);color:var(--bad);animation:shake .35s}
@keyframes shake{25%{translate:-6px 0}50%{translate:6px 0}75%{translate:-3px 0}}
.pad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:12px 14px}
.key{background:var(--btn);color:var(--btn-ink);border-radius:16px;box-shadow:0 4px 0 var(--line);font-family:Fredoka,Nunito,sans-serif;font-size:28px;font-weight:600;min-height:58px;touch-action:manipulation}
.key:active{transform:translateY(3px);box-shadow:0 1px 0 var(--line)}
.key.del{color:var(--bad)}
.key.go{grid-column:1/-1;background:var(--run);color:var(--run-ink);box-shadow:0 5px 0 var(--run-shadow);font-size:24px}
.key.go:active{box-shadow:0 2px 0 var(--run-shadow)}
.key:disabled{opacity:.45;cursor:default;transform:none}
.choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px 14px}
.choice{background:var(--btn);color:var(--btn-ink);border-radius:18px;box-shadow:0 5px 0 var(--line);font-family:Fredoka,Nunito,sans-serif;font-size:32px;font-weight:600;min-height:76px;border:3px solid transparent;touch-action:manipulation}
.choice:active{transform:translateY(3px);box-shadow:0 2px 0 var(--line)}
.choice.bad{border-color:var(--bad);color:var(--bad);opacity:.55;cursor:default}
.choice.good{border-color:var(--ok);background:color-mix(in srgb,var(--ok) 15%,var(--btn))}
.hintbar{display:flex;gap:10px;flex-wrap:wrap;padding:0 14px 14px}
.hintbtn{background:var(--hint);color:var(--hint-ink);border-radius:999px;padding:10px 16px;font-size:15px;min-height:44px}
.hintbtn:disabled{opacity:.5;cursor:default}
.hintbtn.stop{margin-left:auto;background:var(--soft);color:var(--muted)}

/* Run bar, Robo's path, milestone meter */
.runbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 16px}
.tierchip{background:var(--soft);border-radius:999px;padding:5px 12px;font-size:14px}
.nextchip{background:var(--soft);color:var(--muted);border-radius:999px;padding:5px 12px;font-size:14px}
.nextchip[hidden]{display:none}
.streak{background:var(--hint);color:var(--hint-ink);border-radius:999px;padding:5px 12px;font-size:14px}
.runbar .muted{color:var(--muted);font-size:14px}
.endless{position:relative;height:88px;background:var(--board);border-radius:16px;overflow:hidden;margin:0 12px}
.endless svg{width:100%;height:100%;display:block}
.endless .stone{fill:var(--floor)}
/* Path themes from Robo's workshop (D35) */
.endless.path-orchard{background:#7cc36a}.endless.path-orchard .stone{fill:#c98a5a}
.endless.path-garden{background:#bfe8a8}.endless.path-garden .stone{fill:#ffd1e8}
.endless.path-space{background:#1b1f45}.endless.path-space .stone{fill:#3a3f7a}
.endless .robo{transition:transform .5s ease}
.endless .robo.hop{animation:hop .5s}
@keyframes hop{0%,100%{translate:0 0}50%{translate:0 -10px}}
.goal{padding:12px 16px;display:flex;flex-direction:column;gap:6px}
.goal .gtop{display:flex;justify-content:space-between;font-size:14px;gap:8px;flex-wrap:wrap}
.meter{height:14px;border-radius:999px;background:var(--soft);overflow:hidden}
.meter i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--g3),var(--run));transition:width .4s}

/* Overlays: checkpoint, wait card */
.overlay{position:fixed;inset:0;background:rgba(15,26,46,.6);display:flex;align-items:center;justify-content:center;padding:16px;z-index:20}
#waitOverlay{z-index:30}
.ring{width:54px;height:54px;border-radius:50%;border:6px solid var(--line);border-top-color:var(--accent,#2d9cdb);margin:0 auto 12px;animation:ring 1s linear infinite}
@keyframes ring{to{rotate:360deg}}
#waitOverlay.down .ring{animation-duration:3s;border-top-color:#f5a623}
.modal{background:var(--card);border-radius:22px;padding:24px;max-width:460px;width:100%;box-shadow:0 20px 60px rgba(0,0,0,.35);text-align:center;display:flex;flex-direction:column;align-items:center;gap:12px}
.modal > svg{width:64px;height:64px}
.modal h2{font-family:Fredoka,Nunito,sans-serif;font-weight:700;font-size:32px;margin:0;text-wrap:balance}
.modal p{color:var(--muted);margin:0;font-size:16px}
.ckstats{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;width:100%}
.ckstats div{background:var(--soft);border-radius:12px;padding:6px 12px;font-size:13px;color:var(--muted)}
.ckstats b{display:block;font-family:Fredoka,Nunito,sans-serif;font-size:22px;color:var(--ink);font-variant-numeric:tabular-nums}
.unlock{display:flex;gap:12px;align-items:center;background:var(--soft);border-radius:16px;padding:10px 12px;width:100%;text-align:left}
.unlock > span:first-child{font-size:34px;line-height:1;flex:none}
.unlock b{font-family:Fredoka,Nunito,sans-serif;font-weight:600;font-size:17px;display:block}
.unlock span{font-size:13px;color:var(--muted)}
.unlock a{font-size:14px;color:var(--accent);font-weight:700}
.btnrow{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;width:100%}
.sec{background:var(--btn);color:var(--btn-ink);border-radius:16px;font-size:17px;padding:12px 18px;box-shadow:var(--shadow)}
.run{background:var(--run);color:var(--run-ink);border-radius:16px;font-family:Fredoka,Nunito,sans-serif;font-size:24px;padding:12px 28px;box-shadow:0 5px 0 var(--run-shadow);flex:1;min-width:150px}
.run:active{transform:translateY(3px);box-shadow:0 2px 0 var(--run-shadow)}
.confetti{position:fixed;top:-20px;font-size:26px;animation:fall linear forwards;pointer-events:none;z-index:30}
@keyframes fall{to{transform:translateY(110vh) rotate(720deg)}}
.toasts{position:fixed;left:50%;bottom:20px;translate:-50% 0;display:flex;flex-direction:column;align-items:center;gap:8px;z-index:25;pointer-events:none;width:max-content;max-width:calc(100vw - 24px)}
.toast{background:var(--card);color:var(--ink);border-radius:999px;padding:10px 18px;box-shadow:var(--shadow);font-size:15px;text-align:center}

@media (prefers-reduced-motion:reduce){.endless .robo,.meter i,.arr .d{transition:none}.endless .robo.hop,.slot.bad,.confetti,.ring{animation:none}}
/* Touch polish: no long-press menus or text selection on play surfaces, no double-tap zoom on buttons */
.board,.pad,.choices,.endless,.eq{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
button{touch-action:manipulation}

/* grade 1 pictures (D51) */
.ln-start{stroke:var(--board-ink);stroke-opacity:.5;stroke-dasharray:3 3}
.ln-end{stroke:var(--run);stroke-width:2;stroke-dasharray:4 3}
.ln-cube{fill:#7be07b;stroke:#2f7a2f;stroke-width:1.2}.ln-cube.c1{fill:#6fd0ff;stroke:#1f6f9a}
.ln-clip{fill:none;stroke:#c3cad6;stroke-width:2.2}
.ln-unit.lit,.ln-unit.lit .ln-clip{stroke:var(--run);stroke-width:3}
.obj-icon{height:30px;width:auto;max-width:100%}.msr-icon{height:54px;width:auto;max-width:100%}
.slot .obj-icon,.slot .msr-icon{height:.9em;vertical-align:middle}
.fill1{fill:#ff8ac8}.fill2{fill:#6fd0ff}.fill3{fill:#ffd23f}.fill4{fill:#7be07b}.fill5{fill:#c49bff}
.pg-shape.fill1,.pg-shape.fill2,.pg-shape.fill3,.pg-shape.fill4,.pg-shape.fill5{stroke:none}
.pg-round{stroke:#1b2a4a;stroke-width:2.5}
.sd{width:100%;max-width:220px;height:auto}
.sd-face{stroke:#1b2a4a;stroke-width:2.2;stroke-linejoin:round}.sd-face.fill0{fill:color-mix(in srgb,var(--dot) 35%,var(--btn));stroke:var(--btn-ink)}
.sd-shade{fill:#000;stroke:none}.sd-edge{fill:none;stroke:#1b2a4a;stroke-width:1.6;stroke-dasharray:4 3;opacity:.7}
.solid-icon{height:56px;width:auto;max-width:100%}.slot .solid-icon{height:1em;vertical-align:middle}
.clock-icon svg{height:72px;width:72px}.slot .clock-icon svg{height:1.1em;width:1.1em;vertical-align:middle}
.tl{width:100%;height:auto}.tl-bg{fill:none}.tl-row.lit .tl-bg{fill:color-mix(in srgb,var(--run) 14%,transparent)}
.tl-lbl{font-family:Nunito,sans-serif;font-size:16px;font-weight:700;fill:var(--board-ink)}
.tl-mark{stroke:var(--board-ink);stroke-width:3;stroke-linecap:round}.tl-mark.counted{stroke:var(--run)}
.fb-pair-lbl{font-family:Fredoka,sans-serif;font-size:17px;font-weight:600;fill:var(--board-ink)}
.ln-clue{fill:color-mix(in srgb,var(--floor) 60%,transparent);stroke:var(--board-ink);stroke-opacity:.35;stroke-width:1.5}
.ln-clue-t{font-family:Nunito,sans-serif;font-size:11px;font-weight:700;fill:var(--board-ink);opacity:.7}

/* kindergarten objects (D53) */
.obj{width:100%;height:auto}
.ob-apple .ob-body{fill:#ff5a5f;stroke:#a3262b;stroke-width:1.5}.ob-stem{fill:none;stroke:#6b4423;stroke-width:2;stroke-linecap:round}.ob-leaf{fill:#4caf50}
.ob-star .ob-body{fill:#ffd23f;stroke:#b88a00;stroke-width:1.5;stroke-linejoin:round}
.ob-petal{fill:#ff8ac8;stroke:#c2417f;stroke-width:1}.ob-mid{fill:#ffd23f;stroke:#b88a00;stroke-width:1}
.ob-bug .ob-body{fill:#e53935;stroke:#1b1b1b;stroke-width:1.5}.ob-head,.ob-dot{fill:#1b1b1b}.ob-line{stroke:#1b1b1b;stroke-width:1.4}
.ob-shell .ob-body{fill:#ffc9a8;stroke:#c27a4a;stroke-width:1.5;stroke-linejoin:round}.ob-ridge{stroke:#c27a4a;stroke-width:1.2}
.ob-plate{fill:#f4f6fa;stroke:#c3cad6;stroke-width:2}.ob-plate-in{fill:none;stroke:#dfe4ec;stroke-width:1.5}
.ob-one.lit{filter:drop-shadow(0 0 3px var(--run))}.ob-one.left{filter:drop-shadow(0 0 5px var(--run))}
.ob-num{font-family:Fredoka,sans-serif;font-size:13px;font-weight:600;fill:var(--board-ink)}
.ob-pair{stroke:var(--board-ink);stroke-opacity:.6;stroke-width:1.6;stroke-dasharray:3 3}
.grp-icon{height:44px;width:auto;max-width:100%}.slot .grp-icon{height:1em;vertical-align:middle}
.mf{display:inline-flex;flex-direction:column;align-items:center;gap:2px;line-height:1.1}.mf svg{height:26px;width:auto}
.mf-a{fill:#ff8ac8}.mf-b{fill:#6fd0ff}.slot .mf svg{display:none}

.ob-op{font-family:Fredoka,sans-serif;font-size:30px;font-weight:600;fill:var(--board-ink)}
.ob-one.gone{opacity:.5}.ob-x{stroke:#1b2a4a;stroke-width:3.5;stroke-linecap:round}
.ob-grp.two .ob-one:not(.alt) .ob-petal{fill:#ff5a5f;stroke:#a3262b}
.ob-one.alt .ob-petal{fill:#ffd23f;stroke:#b88a00}.ob-one.alt .ob-mid{fill:#ff9f1c}
.tf-dot.empty{opacity:0}

/* kindergarten measuring, sorting, shapes (D55) */
.up-ground{stroke:var(--board-ink);stroke-width:2.5;stroke-linecap:round}
.bl{width:100%;height:auto}.bl-stand{fill:#c49bff;stroke:#5b3f99;stroke-width:2}.bl-beam{stroke:#5b3f99;stroke-width:6;stroke-linecap:round}
.bl-pin{fill:#ffd23f;stroke:#5b3f99;stroke-width:2}.bl-string{stroke:var(--board-ink);stroke-opacity:.6;stroke-width:1.5}
.bl-dish{fill:#e7ebf2;stroke:#8a96a8;stroke-width:1.5}.bl-pan.lit .bl-dish{fill:color-mix(in srgb,var(--run) 45%,#e7ebf2)}
.sort{width:100%;height:auto}.sc-box{fill:color-mix(in srgb,var(--floor) 70%,transparent);stroke:var(--board-ink);stroke-opacity:.25}
.sc-red{fill:#e53935}.sc-blue{fill:#1e88e5}.sc-yellow{fill:#ffd23f}.sc-green{fill:#43a047}
.sc-one>circle:first-child,.sc-one>rect,.sc-one>path{stroke:#1b1b1b;stroke-width:1.5}
.sc-one.dim{opacity:.18}
.shape-round{fill:color-mix(in srgb,var(--dot) 35%,var(--btn));stroke:var(--btn-ink);stroke-width:2.5}
.thing-icon{height:44px}.flat-solid{height:28px;width:auto}
/* ---------- grades 4–5 pictures (D58) ---------- */
.dg{max-width:100%;height:auto}
.dg-col{fill:var(--floor);stroke:#1b2a4a;stroke-opacity:.12;stroke-width:1.5}
.dg-col.lit{fill:var(--hint);stroke:var(--run);stroke-opacity:1;stroke-width:3}
.dg-head{font-family:Nunito,sans-serif;font-size:10.5px;font-weight:800;fill:var(--muted)}
.dg-d{font-family:Fredoka,sans-serif;font-size:30px;font-weight:600;fill:var(--ink)}
.dg-col.lit~.dg-d{fill:var(--ink)}
.dg-pt,.lc-pt{fill:var(--ink)}.lc-pt.ans{fill:var(--ok)}
.dg-arrow{fill:var(--run)}
.lc{max-width:100%;height:auto}
.lc-d{font-family:Fredoka,sans-serif;font-size:30px;font-weight:600;fill:var(--ink)}
.lc-d.ghost{opacity:.4}
.lc-d.struck{opacity:.35;text-decoration:line-through}
.fp{max-width:100%;height:auto}
.fp-n{font-family:Fredoka,sans-serif;font-size:26px;font-weight:700;fill:var(--ink)}
.fp-pair{font-family:Fredoka,sans-serif;font-size:22px;font-weight:600;fill:var(--board-ink)}
.rs-n.lit{fill:var(--run)}
.cb,.am,.ds{max-width:100%;height:auto}
.cb-name{font-family:Nunito,sans-serif;font-size:15px;font-weight:800;fill:var(--board-ink)}
.cb-bar{stroke:#1b2a4a;stroke-opacity:.25;stroke-width:1.5}.cb-bar.a{fill:#9fd3ff}.cb-bar.b{fill:#ffc56b}.cb-bar.lit{fill:#6fe0a8}
.cb-v{font-family:Fredoka,sans-serif;font-size:18px;font-weight:600;fill:#1b2a4a}.cb-v.sm{font-size:14px}
.cb-q{font-family:Fredoka,sans-serif;font-size:20px;font-weight:700;fill:var(--board-ink)}
.cb-cut{stroke:#1b2a4a;stroke-width:2;stroke-dasharray:4 3}
.am-l{font-family:Fredoka,sans-serif;font-size:17px;font-weight:600;fill:var(--board-ink)}
.am-cell{fill:var(--floor);stroke:#1b2a4a;stroke-opacity:.35;stroke-width:2}.am-cell.lit{fill:var(--hint)}
.am-p{font-family:Fredoka,sans-serif;font-size:18px;font-weight:700;fill:var(--ink)}
.ds-top{font-family:Fredoka,sans-serif;font-size:28px;font-weight:700;fill:var(--board-ink)}
.ds-step,.ds-left{font-family:Fredoka,sans-serif;font-size:19px;font-weight:600;fill:var(--board-ink)}.ds-left{fill:var(--run)}
.hg,.dl{max-width:100%;height:auto}
.hg-c{fill:var(--floor);stroke:#1b2a4a;stroke-opacity:.18;stroke-width:1}.hg-c.on{fill:#9fd3ff}.hg-c.on.t{fill:#5aa9e6}.hg-c.lit{stroke:var(--run);stroke-opacity:1;stroke-width:1.5}
.hg-l{font-family:Fredoka,sans-serif;font-size:16px;font-weight:700;fill:var(--board-ink)}
.ct,.rc,.fpl,.pr,.sa,.fg,.sh{max-width:100%;height:auto}
.ct-head{fill:var(--run)}.ct-h{font-family:Nunito,sans-serif;font-size:16px;font-weight:900;fill:var(--run-ink)}
.ct-row{fill:var(--floor);stroke:#1b2a4a;stroke-opacity:.2}.ct-mid{stroke:#1b2a4a;stroke-opacity:.2}
.ct-v{font-family:Fredoka,sans-serif;font-size:19px;font-weight:600;fill:var(--ink)}.ct-v.lit{fill:var(--run)}
.rc-r{fill:var(--floor);stroke:var(--board-ink);stroke-width:3}.rc-l{font-family:Fredoka,sans-serif;font-size:18px;font-weight:600;fill:var(--board-ink)}
.rc-in{font-family:Fredoka,sans-serif;font-size:16px;font-weight:600;fill:var(--ink)}.rc-walk{stroke:var(--run);stroke-width:7;stroke-linecap:round}
.fpl-t{font-family:Nunito,sans-serif;font-size:14px;font-weight:800;fill:var(--board-ink)}
.fpl-f{font-family:Fredoka,sans-serif;font-size:12px;font-weight:600;fill:var(--board-ink)}.fpl-bar{stroke:var(--board-ink);stroke-width:1.5}
.fpl-x{font-family:Fredoka,sans-serif;font-size:26px;font-weight:700;fill:var(--board-ink)}.fpl-x.lit{fill:var(--run)}
.pr-body{fill:#eef6ff;stroke:#1b2a4a;stroke-width:2}.pr-tick{stroke:#1b2a4a;stroke-width:1.2}
.pr-o{font-family:Nunito,sans-serif;font-size:12px;font-weight:900;fill:#1b2a4a}.pr-i{font-family:Nunito,sans-serif;font-size:10.5px;font-weight:800;fill:#c0392b}
.pr-ray{stroke:var(--run);stroke-width:4;stroke-linecap:round}.pr-ray.mid{stroke:var(--dot)}.pr-c{fill:var(--run)}.pr-arc{fill:none;stroke:var(--ok);stroke-width:4}
.sa-l{font-family:Fredoka,sans-serif;font-size:17px;font-weight:700;fill:var(--board-ink)}.sa-sq{fill:none;stroke:var(--board-ink);stroke-width:2}
.fg-line{fill:none;stroke:var(--board-ink);stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.fg-head{fill:var(--board-ink)}
.fg-dot{fill:var(--run);stroke:var(--board-ink);stroke-width:1.5}.fg-arc{fill:none;stroke:var(--run);stroke-width:3}
.sh-p{fill:#9fd3ff;stroke:#1b2a4a;stroke-width:2.5;stroke-linejoin:round}.sh-l{font-family:Fredoka,sans-serif;font-size:20px;font-weight:700;fill:var(--board-ink)}
.sh-line{stroke:#c0392b;stroke-width:3;stroke-dasharray:9 6}
.co{max-width:100%;height:auto}
.co-g{stroke:var(--board-ink);stroke-opacity:.22;stroke-width:1}.co-ax{stroke:var(--board-ink);stroke-width:3;stroke-linecap:round}
.co-n{font-family:Fredoka,sans-serif;font-size:12px;font-weight:600;fill:var(--board-ink)}.co-l{font-family:Fredoka,sans-serif;font-size:15px;font-weight:700;fill:var(--board-ink)}
.co-p{fill:var(--run);stroke:#fff;stroke-width:2}.co-pl{font-family:Fredoka,sans-serif;font-size:15px;font-weight:700;fill:var(--board-ink)}
.co-path{stroke:var(--dot);stroke-width:4;stroke-dasharray:6 4}.co-walk{stroke:var(--ok);stroke-width:4;stroke-linecap:round}
.co-hit{fill:transparent;cursor:pointer}.co-hit:hover{fill:var(--run);fill-opacity:.25}.co-me{fill:var(--ok)}
.fa{max-width:100%;height:auto}
.fa-c{fill:#f7fbff;stroke:#1b2a4a;stroke-opacity:.3;stroke-width:1}.fa-c.col{fill:#9fd3ff}.fa-c.row{fill:#ffe08a}.fa-c.col.row{fill:#7fd6a0}.fa-c.lit{fill:#2fbf71}
.fa-out{fill:none;stroke:#1b2a4a;stroke-width:3}.fa-l{font-family:Fredoka,sans-serif;font-size:17px;font-weight:700;fill:var(--board-ink)}
.bx,.ft{max-width:100%;height:auto}
.bx-f{stroke:#1b2a4a;stroke-width:2;stroke-linejoin:round}.bx-f.front.a{fill:#9fd3ff}.bx-f.top.a{fill:#cbe8ff}.bx-f.side.a{fill:#6fb7ef}
.bx-f.front.b{fill:#ffc56b}.bx-f.top.b{fill:#ffe0a8}.bx-f.side.b{fill:#f0a63c}.bx-c{stroke:#1b2a4a;stroke-opacity:.45;stroke-width:1}
.bx-l{font-family:Fredoka,sans-serif;font-size:17px;font-weight:700;fill:var(--board-ink)}
.ft-e{stroke:var(--board-ink);stroke-width:2.5}.ft-n{fill:var(--floor);stroke:var(--board-ink);stroke-width:2}.ft-n.lit{fill:var(--hint);stroke:var(--run);stroke-width:3}
.ft-t{font-family:Fredoka,sans-serif;font-size:15px;font-weight:600;fill:var(--ink)}
