/* Math Sprint only. Everything else comes from ../shared/game.css. */
canvas#world{touch-action:none}
canvas#world:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
/* Number pad: one row of twelve on wide screens, a 3 × 4 phone-style pad on narrow ones. Big targets, no scrolling. */
.numpad[hidden]{display:none}
#distanceLine{white-space:pre-line;line-height:1.7}
.numpad{display:grid;grid-template-columns:repeat(12,1fr);gap:8px}
.nk{font:800 22px/1 "Bricolage Grotesque",system-ui,sans-serif;color:var(--ink);background:linear-gradient(#1d1830,#15121f);
  border:2px solid var(--line);border-radius:12px;padding:0;height:54px;cursor:pointer;touch-action:manipulation;
  box-shadow:0 3px 0 #0b0a10;transition:transform .06s ease,border-color .06s ease,background .06s ease}
.nk.fn{font:12px "Press Start 2P",ui-monospace,monospace;color:var(--muted)}
.nk[data-key=back]{font:22px/1 system-ui,sans-serif}
.nk:active,.nk.hit{transform:translateY(2px);box-shadow:0 1px 0 #0b0a10;border-color:var(--cyan);background:#232040}
.nk:focus-visible{outline:3px solid var(--cyan);outline-offset:2px}
@media (max-width:700px) and (orientation:portrait){
  .numpad{grid-template-columns:repeat(3,1fr);gap:7px}
  .nk{height:52px;font-size:26px}
  /* phone order: 1 2 3 / 4 5 6 / 7 8 9 / ⌫ 0 CLR */
  .nk[data-key="0"]{order:11}.nk[data-key=back]{order:10}.nk[data-key=clear]{order:12}
}
@media (max-width:700px) and (orientation:portrait) and (max-height:700px){.nk{height:44px;font-size:22px}.numpad{gap:5px}}
@media (orientation:landscape) and (max-height:520px){.nk{height:40px;font-size:18px;border-radius:9px}.numpad{gap:5px}}
/* the level-clear stars sit low, over the track, so the next question is never hidden */
#screen .progress-toast{top:auto;bottom:6%}
