/* Bodhana's look (4 Dec 2026, "Bright and friendly"): white pages, Nunito, ONE violet for the thing to
   do next, yellow kept for the streak and the teacher's voice, green for done, and a green chalkboard.
   Night is the same look after dark (data-look="night" on <html>, set by index.html).
   This file: the colours, the base, the class player's parts and the practice test.
   The app's own screens (welcome, home, Ask, Me and the rest) are in bright.css.
   NOTE: --chalk is the chalk FONT (the board and the player read it); the text colour is --ink. */
:root {
  --page: #ffffff; --surface: #ffffff;
  --ink: #1F1A33; --ink-2: #5F5A78; --ink-3: #9A95B5;
  --v: #6C4CF1; --v-d: #4C30C9; --v-ink: #4C30C9; --v-text: #5B3BE0; --v-hi: #9D86FF; --v-soft: #C6B8FF;
  --lilac: #F1EDFF; --lilac-2: #ECE7FB; --lilac-3: #E2DBFA;
  --y: #FFC83D; --y-d: #E3A600; --butter: #FFF1C7; --butter-ink: #3D2A00; --butter-ink-2: #6B4300; --flame: #F59300;
  --done: #D6F5E4; --done-ink: #0B7D49; --on-good: #ffffff;
  --red: #D64545; --red-soft: #FFF0EE;
  --board-bg: radial-gradient(120% 90% at 30% 10%, #2F5445 0%, #20392F 55%, #182B24 100%); --board-edge: #14251F;
  --ui: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif; --chalk: 'Kalam', 'Nunito', cursive; --hand: var(--chalk);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  /* the names the board, the class player and the practice test already use */
  --bg: var(--page); --muted: var(--ink-2); --accent: var(--v); --yellow: var(--y); --pink: #D6336C; --blue: var(--v-text); --kid: #ffc8ec;
  --good: var(--done-ink); --good-ink: var(--done-ink); --bad: var(--red); --warn: var(--red);
  --panel: var(--surface); --panel-2: var(--lilac); --panel-3: var(--lilac-3); --line: var(--lilac-2);
  --slate: var(--page); --chalk-dim: var(--ink-2); --chalk-faint: var(--ink-3); --sun: var(--v); --sun-ink: #ffffff; --ice: var(--v-text);
  --nav-bg: rgba(255,255,255,.96); --saffron-soft: var(--lilac); --brand: var(--v);
  --cover-bg: var(--page); --focus: var(--v);
  --kicker: 800 13px/1.3 var(--ui); --kicker-ls: .02em;
  --r-card: 24px; --r-ctl: 16px;
  color-scheme: light;
}
:root[data-look="night"] {
  --page: #14112A; --surface: #1D1939;
  --ink: #F4F1FF; --ink-2: #B9B3D9; --ink-3: #807AA8;
  --v: #7B5CFF; --v-d: #4A2FC4; --v-ink: #D3C9FF; --v-text: #B9A9FF; --v-hi: #A794FF; --v-soft: #3B3180;
  --lilac: #2A2452; --lilac-2: #332C63; --lilac-3: #40387A;
  --butter: #3A3010; --butter-ink: #FFE9A6; --butter-ink-2: #FFD970;
  --done: #143D2C; --done-ink: #7BE0A8; --on-good: #0e1714;
  --red: #FF8A7A; --red-soft: #3A1C1C;
  --pink: #FF9FB2; --nav-bg: rgba(20,17,42,.96);
  color-scheme: dark;
}

/* everything on a chalkboard keeps chalk colours in both looks */
.login-board, .today-board, .board, .note-board, .answer, .bubble, .cpic, .idea-board, .front-board, .pq-fig { --ink: #f4f1e8; --muted: rgba(244,241,232,.65); --accent: #ffe27a; --yellow: #ffe27a; --blue: #a6d6ea; --pink: #f5a9b8; --good: #7be0a0; --good-ink: #7be0a0; --bad: #ff8a7a; --line: rgba(244,241,232,.12); }
.login-board, .today-board, .board, .note-board, .bubble { color: var(--ink); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--page); color: var(--ink); font-family: var(--ui); }
body { overflow: hidden; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; }
input { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--v); outline-offset: 3px; }
.root { height: 100dvh; position: relative; }
.screen { height: 100%; overflow-y: auto; padding: calc(16px + var(--safe-t)) 20px calc(28px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; }
.screen.loading { align-items: center; justify-content: center; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 5px solid var(--lilac-2); border-top-color: var(--v); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.chalky { font-family: var(--chalk); font-weight: 700; font-size: 34px; color: var(--ink); }
.chalky.small { font-size: 19px; font-weight: 400; } .chalky.y { color: var(--accent); }
.lede { margin: 0; color: var(--ink-2); font-size: 16.5px; line-height: 1.5; font-weight: 700; }
.chip { font-size: 13.5px; font-weight: 800; padding: 7px 12px; border-radius: 12px; background: var(--lilac); color: var(--v-ink); white-space: nowrap; }
/* the ONE main button: violet, with a solid edge under it that it sinks into when pressed */
.go { width: 100%; min-height: 58px; padding: 6px 18px; margin-bottom: 5px; border-radius: 18px; background: var(--v); color: #ffffff; font-weight: 900; font-size: 17.5px; line-height: 1.2; box-shadow: 0 5px 0 var(--v-d); display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; transition: transform .08s, box-shadow .08s; }
.go:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--v-d); }
.go:disabled { background: var(--lilac-2); color: var(--ink-2); box-shadow: 0 5px 0 var(--lilac-3); }
/* the second button: white, outlined, the same solid edge in lilac */
.again { width: 100%; min-height: 54px; padding: 6px 16px; margin-bottom: 4px; border-radius: 18px; background: var(--surface); border: 2px solid var(--lilac-3); color: var(--ink); font-weight: 800; font-size: 16px; line-height: 1.2; box-shadow: 0 4px 0 var(--lilac-3); display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform .08s, box-shadow .08s; }
.again:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--lilac-3); }
.again:disabled { opacity: .55; }
.done-note { margin: 0; font-weight: 800; font-size: 15px; color: var(--done-ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.link { min-height: 44px; padding: 8px 12px; color: var(--v-text); font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.soft-btn { min-height: 54px; border-radius: 18px; background: var(--lilac); color: var(--v-ink); font-weight: 800; font-size: 16px; }

.chalkboard, .login-board, .today-board, .board { background: var(--board-bg); }
.toast { position: fixed; left: 50%; bottom: calc(104px + var(--safe-b)); transform: translate(-50%, 20px); width: max-content; max-width: calc(100% - 32px); padding: 13px 18px; border-radius: 16px; background: #1F1A33; color: #ffffff; font-weight: 800; font-size: 15px; line-height: 1.35; box-shadow: 0 5px 0 rgba(31,26,51,.25); opacity: 0; pointer-events: none; transition: .25s; z-index: 50; }
:root[data-look="night"] .toast { background: #3B3372; box-shadow: 0 5px 0 rgba(0,0,0,.35); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* today's class: the class title on a chalkboard */

.today-board { border-radius: 24px; min-height: 128px; display: grid; place-items: center; padding: 30px 18px 22px; text-align: center; position: relative; box-shadow: 0 6px 0 var(--board-edge); }
.today-board .chalky { font-size: 27px; line-height: 1.2; }
.board-tag { position: absolute; top: 9px; left: 12px; right: 12px; text-align: left; font-weight: 800; font-size: 12px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@keyframes popin { from { transform: scale(0) rotate(-30deg); opacity: 0 } }

@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

/* ---------- the classroom ---------- */
.room { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; position: relative; }
.room-top { padding: calc(10px + var(--safe-t)) 12px 8px; display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: center; }
.round-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); font-weight: 900; color: var(--muted); }
.room-meta { display: flex; gap: 10px; align-items: center; min-width: 0; }
/* the seek bar: drag to any step, like a video */
.seek { grid-column: 1 / -1; position: relative; height: 22px; display: flex; align-items: center; touch-action: none; cursor: pointer; }
.seek.off { pointer-events: none; }
.seek-track { position: relative; flex: 1; height: 5px; border-radius: 5px; background: var(--line); }
.seek.dragging .seek-track { height: 7px; }
.seek-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--good), var(--yellow)); transition: width .5s ease; }
.seek-reach { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: rgba(255,226,122,.22); transition: width .5s ease; }
.seek.dragging .seek-fill, .seek.dragging .seek-thumb { transition: none; }
.seek-thumb { position: absolute; top: 50%; left: 0; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255,226,122,.18); transition: left .5s ease; }
.seek-mark { position: absolute; top: -2px; width: 2px; height: 9px; margin-left: -1px; border-radius: 1px; background: rgba(255,255,255,.28); }
.seek-tip { position: absolute; bottom: 24px; transform: translateX(-50%); max-width: 78%; padding: 7px 11px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 10px 24px rgba(0,0,0,.4); font-weight: 800; font-size: 13px; line-height: 1.3; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 25; pointer-events: none; }
.in-quiz .seek { pointer-events: none; }
.in-quiz .seek-fill { background: linear-gradient(90deg, var(--pink), var(--yellow)); }
.in-quiz .seek-thumb { display: none; }
/* double-tap to skip: a quick flash on that side of the board */
.skip-flash { position: absolute; top: 50%; z-index: 6; transform: translateY(-50%); padding: 10px 16px; border-radius: 999px; background: rgba(0,0,0,.45); color: #fff; font-weight: 900; font-size: 15px; pointer-events: none; }
.skip-flash.left { left: 14px; } .skip-flash.right { right: 14px; }
.room-title { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; padding: 0 10px; }
.board { position: relative; min-height: 0; overflow: hidden; border-radius: 22px; touch-action: manipulation; }
/* the classroom board sits in a wooden frame, like the one on the wall */
.room .board {
  border: 7px solid transparent; border-radius: 16px;
  background:
    radial-gradient(120% 90% at 30% 10%, rgba(255,255,255,.075), transparent 60%) padding-box,
    radial-gradient(140% 120% at 70% 100%, rgba(0,0,0,.35), transparent 60%) padding-box,
    linear-gradient(160deg, #1f3d33, #142a21) padding-box,
    linear-gradient(135deg, #8a5a34, #6b4224 45%, #85552f) border-box;
  box-shadow: inset 0 0 60px rgba(0,0,0,.3), 0 10px 24px rgba(0,0,0,.35);
}
.board-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.board-svg .chalk path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hand { position: absolute; left: 0; top: 0; width: 110px; height: 80px; pointer-events: none; z-index: 3; opacity: 0; transition: opacity .35s; filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)); will-change: transform; }
.hand.on { opacity: 1; }
.rulebox { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 7px 12px; border: 2px dashed rgba(255,226,122,.7); border-radius: 12px; background: rgba(0,0,0,.22); color: var(--accent); font: 700 17px/1.25 var(--chalk); }
.rulebox small { flex: none; font: 900 10px/1 Nunito, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #1f1a08; background: var(--yellow); border-radius: 6px; padding: 4px 6px; }
.bubble { position: absolute; right: 12px; bottom: 12px; z-index: 5; max-width: min(78%, 320px); padding: 10px 14px; border-radius: 18px 18px 4px 18px; background: #2b3d36; border: 1px solid rgba(255,255,255,.12); font-weight: 800; font-size: 14.5px; line-height: 1.35; box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.bubble small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 2px; }
.pinned { position: absolute; right: 12px; bottom: 12px; width: 34%; max-width: 160px; padding: 6px 6px 16px; background: #f6f2e8; border-radius: 4px; transform: rotate(-3deg); box-shadow: 0 12px 24px rgba(0,0,0,.4); z-index: 2; }
.pinned img { width: 100%; display: block; border-radius: 2px; }
.pinned::before { content: ''; position: absolute; top: -9px; left: 50%; width: 54px; height: 18px; margin-left: -27px; background: rgba(255,236,170,.75); transform: rotate(3deg); }
.teacher { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); min-height: 58px; }
.voice { position: relative; width: 38px; height: 38px; flex: none; }
.voice-dot { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b8, var(--yellow) 60%); }
.voice-ring { position: absolute; inset: -4px; border-radius: 50%; border: 3px solid rgba(255,226,122,.55); transform: scale(var(--level, 1)); opacity: calc(var(--level, 1) - .9); transition: transform .08s linear; }
.caption { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 700; color: var(--muted); min-width: 0; }
/* subtitles: only the sentence being said */
.caption .sent { display: none; } .caption .sent.now { display: inline; animation: capin .25s ease-out; }
@keyframes capin { from { opacity: .2; } }
.caption .w { transition: color .15s; } .caption .w.said { color: var(--ink); }
.live-tag { font-size: 10px; font-weight: 900; letter-spacing: .08em; color: #0e1714; background: var(--good); padding: 2px 6px; border-radius: 5px; margin-right: 6px; vertical-align: 2px; }
.thinking::after { content: '…'; display: inline-block; animation: dots 1.2s steps(4) infinite; width: 1.2em; overflow: hidden; vertical-align: bottom; }
@keyframes dots { from { width: 0 } to { width: 1.2em } }
.asking .caption { -webkit-line-clamp: 2; font-size: 13.5px; }
.paused .board-svg { opacity: .55; transition: opacity .3s; }

.panel { margin: 8px 10px 0; padding: 12px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 10px; animation: rise .28s cubic-bezier(.2,.9,.3,1.1); }
@keyframes rise { from { transform: translateY(16px); opacity: 0 } }
.panel-title { margin: 0; text-align: center; font-weight: 900; font-size: 15.5px; }
.choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
.choices:empty { display: none; }
.choice { min-height: 56px; border-radius: 16px; background: var(--panel-2); border: 2px solid var(--line); font-family: var(--chalk); font-size: 21px; font-weight: 700; padding: 6px 10px; line-height: 1.1; transition: transform .1s, border-color .2s, background .2s, opacity .2s; }
.choice:active { transform: scale(.96); }
.choice.wrong { opacity: .35; text-decoration: line-through; text-decoration-color: var(--bad); border-color: transparent; pointer-events: none; }
.choice.right { border-color: var(--good-ink); background: rgba(123,224,160,.14); color: var(--good-ink); }
.shake { animation: shake .4s; }
@keyframes shake { 20%,60% { transform: translateX(-7px) } 40%,80% { transform: translateX(7px) } }
.number-in { display: grid; gap: 8px; }
.answer-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.prefix { font: 700 26px var(--chalk); color: var(--accent); padding-left: 6px; }
.answer { height: 52px; border-radius: 14px; display: grid; place-items: center; background: #1f3d33; border: 2px dashed rgba(255,200,236,.4); color: var(--kid); font: 700 30px var(--chalk); }
.answer:empty::before { content: '?'; color: rgba(255,255,255,.25); }
.answer.right { border: 2px solid var(--good); color: var(--good-ink); }
.say-btn { --lvl: 0; width: 52px; height: 52px; border-radius: 50%; background: var(--panel-2); border: 2px solid rgba(255,200,236,.45); font-size: 22px; position: relative; }
.say-btn.on { background: rgba(255,200,236,.18); }
.say-btn::after, .mic::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--kid); opacity: calc(var(--lvl, 0) * 1.2); transform: scale(calc(1 + var(--lvl, 0) * .35)); transition: transform .08s; }
.numpad { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.key { height: 44px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-size: 19px; font-weight: 800; }
.key:active { background: var(--panel-3); }
.key.ok { grid-column: span 3; background: var(--good); color: #0e1714; font-size: 15px; font-weight: 900; }
.key.ok:disabled { opacity: .35; }
/* physics: ×10^n on the keypad, the unit picker, select-all-that-apply, maths in buttons and boxes */
.key.sci { grid-column: span 2; font-size: 17px; } .key.sci sup { font-size: .7em; }
.units { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.units small { font: 900 10px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.unit { min-width: 52px; height: 38px; padding: 0 12px; border-radius: 11px; background: var(--panel-2); border: 2px solid var(--line); font: 700 19px var(--chalk); display: inline-grid; place-items: center; }
.unit.on { border-color: var(--accent); background: rgba(255,226,122,.14); color: var(--accent); }
.choice.multi.on { border-color: var(--accent); background: rgba(255,226,122,.14); }
.choice.multi.on::before { content: '✓ '; color: var(--accent); }
.multi-go { justify-self: center; min-width: 140px; }
.multi-go:disabled { opacity: .35; }
.answer sup, .choice sup, .unit sup, .givenbox sup { font-size: .62em; line-height: 0; }
.answer sub, .choice sub, .givenbox sub { font-size: .62em; line-height: 0; }
.m-ss { display: inline-flex; flex-direction: column; vertical-align: -.35em; font-size: .62em; line-height: 1; } .m-ss sup, .m-ss sub { font-size: 1em; line-height: 1; }
.m-frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; font-size: .8em; line-height: 1.05; margin: 0 .12em; }
.m-frac > span:first-child { border-bottom: 1.5px solid currentColor; padding: 0 .15em; }
.m-vec { display: inline-block; position: relative; padding-top: .18em; }
.m-vec::before { content: '→'; position: absolute; left: 0; right: 0; top: -.55em; text-align: center; font-size: .7em; line-height: 1; }
.m-sqrt > span { border-top: 1.5px solid currentColor; padding: 0 .1em; }
.givenbox { position: absolute; left: 10px; right: 10px; top: 10px; z-index: 2; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 12px; border: 2px solid rgba(160,210,255,.55); border-radius: 12px; background: rgba(0,0,0,.22); color: var(--ink); font: 700 17px/1.3 var(--chalk); }
.givenbox .gv, .givenbox .fd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.givenbox .fd { color: var(--accent); }
.givenbox small { flex: none; font: 900 10px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: #08182a; background: var(--blue); border-radius: 6px; padding: 4px 6px; align-self: center; }
.givenbox .fd small { background: var(--yellow); color: #1f1a08; }
.asking .givenbox { top: 6px; padding: 3px 8px; font-size: 13.5px; gap: 2px 10px; } /* the board is small while the keypad is up */
.mic { --lvl: 0; width: 84px; height: 84px; border-radius: 50%; background: var(--panel-2); border: 2px solid rgba(255,200,236,.45); font-size: 34px; display: grid; place-items: center; position: relative; justify-self: center; }
.mic.on { background: rgba(255,200,236,.16); }
.say-status { margin: 0; color: var(--muted); font-weight: 700; font-size: 14.5px; text-align: center; }
.typed { display: flex; gap: 8px; }
.typed input { flex: 1; min-width: 0; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font-weight: 700; padding: 0 12px; }
.go-btn { height: 46px; border-radius: 12px; background: var(--good); color: #0e1714; font-weight: 900; padding: 0 18px; }

.dock { display: grid; grid-template-columns: 1fr 1.25fr 1fr .8fr .8fr; gap: 6px; padding: 8px 10px calc(10px + var(--safe-b)); }
.dk { height: 56px; border-radius: 15px; background: var(--panel-2); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; transition: transform .1s, background .2s; }
.dk span { font-size: 19px; line-height: 1; display: grid; place-items: center; } .dk small { font-size: 11px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.dk:active { transform: scale(.95); }
.dk.waiting { background: rgba(255,226,122,.14); border-color: rgba(255,226,122,.5); } .dk.waiting small { color: var(--accent); }
.dk.waiting span { animation: wave 1s ease-in-out infinite; }
.dk.on { background: rgba(123,224,160,.14); border-color: rgba(123,224,160,.5); } .dk.on small { color: var(--good-ink); }
@keyframes wave { 0%,100% { transform: rotate(0) } 30% { transform: rotate(14deg) } 60% { transform: rotate(-8deg) } }

.cover { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: var(--cover-bg); }
.card { width: min(100%, 440px); display: grid; gap: 14px; justify-items: start; }
.card h1 { font-family: var(--chalk); font-weight: 700; font-size: clamp(36px, 10vw, 56px); line-height: 1.05; margin: 2px 0 0; }
.facts { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; flex-wrap: wrap; }
.facts li { padding: 8px 12px; border-radius: 12px; background: rgba(255,255,255,.06); font-weight: 700; color: var(--muted); }
.facts b { color: var(--ink); }
.card .link { justify-self: center; }

@media (min-width: 900px) {
  .room { grid-template-columns: 1fr 360px; grid-template-rows: auto minmax(0, 1fr) auto; column-gap: 16px; padding: 0 16px 16px; }
  .room-top { grid-column: 1 / -1; padding: 16px 0 10px; }
  .stage { grid-column: 1; grid-row: 2 / 4; padding: 0; }
  .panel { grid-column: 2; grid-row: 2; align-self: end; margin: 0; }
  .dock { grid-column: 2; grid-row: 3; padding: 10px 0 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* the class cover: its title on the board */
.cover-board { width: 100%; padding: 22px 16px 18px; gap: 6px; min-height: 150px; }
.cover-board h1 { font-size: clamp(30px, 9vw, 46px); margin: 0; color: var(--ink); text-shadow: 0 0 1px rgba(255,255,255,.4); }
.cover-board .chalky.small { margin: 0; color: var(--accent); font-size: 18px; line-height: 1.3; }

/* notes: every board from a class, to revise */

.notes-list { display: grid; gap: 16px; padding-bottom: 20px; }
.note { position: relative; }
.note-n { position: absolute; top: 10px; left: 12px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 12px; background: rgba(0,0,0,.35); color: var(--accent); }
.note-board { aspect-ratio: 3 / 4; border-radius: 24px; background: var(--board-bg); box-shadow: 0 6px 0 var(--board-edge); }
.note-board .hand { display: none; }

/* ---------- cricket runs: a right answer is a six (first try) or a four (after a hint or a miss) ---------- */
/* the scoreboard is nailed to the top corner of the board's frame, so it never covers the teaching */
.stage { position: relative; }
.runs { position: absolute; top: -11px; right: 22px; z-index: 4; display: flex; align-items: center; gap: 6px; height: 29px; padding: 0 10px 0 4px; border: 3px solid transparent; border-radius: 9px; pointer-events: none;
  background: linear-gradient(160deg, #1f3d33, #142a21) padding-box, linear-gradient(135deg, #8a5a34, #6b4224 45%, #85552f) border-box; box-shadow: 0 4px 10px rgba(0,0,0,.35); color: #f4f1e8; }
.runs small { font: 900 9.5px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: #1f1a08; background: #ffe27a; border-radius: 5px; padding: 3px 5px; }
.runs b { display: inline-block; min-width: 1.3em; text-align: center; font: 700 19px/1 var(--chalk); }
.cricket { position: absolute; inset: 0; z-index: 12; overflow: hidden; pointer-events: none; }
.cricket > * { position: absolute; left: 0; top: 0; will-change: transform, opacity; }
.c-bat { transform-origin: 50% 3%; filter: drop-shadow(0 0 1px rgba(255,255,255,.35)); }
.c-bat.raised { transform-origin: 50% 50%; }
.c-bat svg { display: block; width: 100%; height: 100%; }
.c-ball { filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.c-ball svg { display: block; }
.c-dust { border-radius: 50%; background: rgba(244,241,232,.8); filter: blur(1.5px); }
.c-rope { width: 12px; border-radius: 6px; border-right: 4px dashed #ffe27a; opacity: 0; }
.c-call { display: grid; justify-items: center; font-family: var(--chalk); font-weight: 700; line-height: .9; white-space: nowrap; color: #ffe27a; opacity: 0;
  text-shadow: 0 0 1px rgba(255,255,255,.5), 0 3px 0 rgba(0,0,0,.28), 0 0 22px rgba(20,42,33,.95), 0 0 6px rgba(20,42,33,.9); }
.c-call b { font-size: 1em; letter-spacing: .02em; }
.c-call small { font-size: .3em; font-weight: 700; color: #f4f1e8; margin-top: .12em; }
.c-call.four { color: #9fd8ff; }
.c-call.mile small { font-size: .32em; color: #ffe27a; }
.c-plus { padding: 3px 8px; border-radius: 99px; background: #ffe27a; color: #1b1a10; font: 900 13px/1 var(--ui); box-shadow: 0 4px 10px rgba(0,0,0,.3); opacity: 0; }
.c-star { text-shadow: 0 0 6px currentColor; opacity: 0; }
@media (min-width: 900px) { .runs { right: 12px; } }

 /* marker lines are clean, not chalky */

.dot-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }

@media (prefers-reduced-motion: reduce) { .dot-pulse { animation: none; } }

.ic { display: inline-grid; place-items: center; line-height: 0; }
.ic svg { width: 1em; height: 1em; }

/* class player: line icons on calm buttons, Ask in the brand colour */
.dk .ic { font-size: 22px; color: var(--ink); }
.dk#ask { background: var(--brand); border-color: var(--brand); } .dk#ask .ic, .dk#ask small { color: #fff; }

.round-btn .ic { font-size: 16px; }




/* knowing the child (1 Dec 2026): the placement check and "about you" offers above the route */
.state.offer { margin: 0; }
.state > .offer-acts { grid-column: 1 / -1; }
.offer-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.offer-acts .pill-go { flex: none; }
.screen.pick .opts.three + .name-input { margin-top: 8px; }

/* ---------- JEE Main practice (web/practice.js): the exam's own screen, in the app's colours ---------- */
.pq-intro, .pq-result { max-width: 760px; margin: 0 auto; width: 100%; }
.pq-head { display: flex; align-items: center; gap: 12px; }
.pq-head h1 { font: 900 21px/1.25 var(--ui); margin: 2px 0 0; }
.pq-head .kicker, .pq-sol .kicker { font: var(--kicker); color: var(--v-text); }
.pq-card { border-radius: var(--r-card); padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.pq-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--chalk-dim); font-weight: 700; }
.pq-facts b { color: var(--ink); font-size: 18px; font-weight: 900; }
.pq-marking { display: flex; flex-wrap: wrap; gap: 8px; }
.pq-marking span { padding: 5px 10px; border-radius: 999px; background: var(--lilac); border: 0; font: 800 13px/1.2 var(--ui); color: var(--chalk-dim); }
.pq-marking .good { color: var(--done-ink); background: var(--done); }
.pq-marking .bad { color: var(--red); background: var(--red-soft); }
.pq-note { margin: 0; color: var(--chalk-dim); font-weight: 700; font-size: 14.5px; line-height: 1.5; }
.pq-best { margin: 0; color: var(--chalk-dim); font-weight: 700; }
.pq-best:empty { display: none; }
.pq-best b { color: var(--v-text); }
.pq-test { padding: 0; gap: 0; max-width: 820px; margin: 0 auto; width: 100%; }
.pq-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-t)) 16px 10px; background: var(--page); border-bottom: 2px solid var(--lilac-2); }
.pq-time { display: flex; flex-direction: column; line-height: 1.1; }
.pq-time small { font-size: 12px; font-weight: 800; color: var(--ink-2); }
.pq-clock { font: 900 22px/1.1 var(--ui); font-variant-numeric: tabular-nums; color: var(--ink); }
.pq-clock.low { color: var(--bad); }
.pq-title { flex: 1; min-width: 0; color: var(--chalk-dim); font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pq-submit { min-height: 44px; margin-bottom: 3px; padding: 0 16px; border-radius: 14px; background: var(--v); color: #ffffff; font: 900 14.5px/1 var(--ui); box-shadow: 0 3px 0 var(--v-d); }
.pq-palette { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; scrollbar-width: none; }
.pq-palette::-webkit-scrollbar { display: none; }
.pq-dot { flex: none; width: 44px; height: 44px; border-radius: 14px; border: 2px solid transparent; background: var(--lilac); color: var(--v-ink); font: 800 14px/1 var(--ui); position: relative; }
.pq-dot.answered { background: var(--done); color: var(--done-ink); border-color: transparent; }
.pq-dot.skipped { border-color: var(--bad); color: var(--bad); }
.pq-dot.review { background: var(--butter); border-color: var(--y-d); color: var(--butter-ink-2); }
.pq-dot.answered.review::after { content: ""; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--y); border: 2px solid var(--page); }
.pq-dot.on { border-color: var(--v); }
.pq-q { padding: 4px 16px calc(28px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; }
.pq-qhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pq-kind { font-size: 13px; font-weight: 800; color: var(--ink-2); }
.pq-text { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.6; color: var(--ink); }
.pq-statements { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pq-statements li { padding: 10px 12px; border-radius: 14px; background: var(--lilac); font-weight: 700; line-height: 1.55; }
.pq-statements b { color: var(--v-text); font-weight: 900; }
.pq-fig { position: relative; width: 100%; max-height: 320px; aspect-ratio: 2 / 1; overflow: hidden; border-radius: 22px; background: var(--board-bg); box-shadow: 0 5px 0 var(--board-edge); }
.pq-fig .hand { display: none; }
.pq-options { display: flex; flex-direction: column; gap: 10px; }
.pq-opt { display: flex; align-items: center; gap: 12px; text-align: left; min-height: 56px; padding: 10px 14px; border-radius: 16px; border: 2px solid var(--lilac); background: var(--lilac); color: var(--ink); font: 700 16px/1.45 var(--ui); }
.pq-opt.on { border-color: var(--v); background: var(--surface); }
.pq-letter { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--lilac-3); background: var(--surface); font: 900 13px/1 var(--ui); color: var(--v-ink); }
.pq-opt.on .pq-letter { background: var(--v); border-color: var(--v); color: #ffffff; }
.pq-numrow { display: flex; align-items: center; gap: 10px; }
.pq-num { flex: 1; min-width: 0; max-width: 260px; height: 56px; border-radius: 16px; border: 2px solid var(--lilac-3); background: var(--surface); color: var(--ink); font: 700 22px/1 var(--ui); padding: 0 16px; font-variant-numeric: tabular-nums; }
.pq-num:focus { outline: none; border-color: var(--v); }
.pq-unit { color: var(--chalk-dim); font-weight: 700; font-size: 16px; }
.pq-acts { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 6px; }
.pq-acts .go { grid-column: 1 / -1; }
.pq-acts .ghost.on { background: var(--lilac); color: var(--v-ink); }
@media (min-width: 560px) { .pq-acts { grid-template-columns: auto auto 1fr; } .pq-acts .go { grid-column: auto; } }
.pq-sheet { position: fixed; inset: 0; z-index: 10; display: grid; place-items: end center; padding: 16px 16px calc(16px + var(--safe-b)); background: rgba(31,26,51,.45); }
.pq-sheet .pq-card { width: 100%; max-width: 460px; }
.pq-sheet h2 { margin: 0; font: 900 19px/1.3 var(--ui); }
.pq-sheet p { margin: 0; color: var(--chalk-dim); font-weight: 700; line-height: 1.5; }
.pq-score { align-items: flex-start; }
.pq-big b { font: 900 52px/1 var(--ui); color: var(--v-text); font-variant-numeric: tabular-nums; }
.pq-big span { font-size: 20px; font-weight: 800; color: var(--chalk-dim); }
.pq-row { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.pq-row > * { flex: 1 1 160px; }
.pq-h2 { font: 900 16px/1.3 var(--ui); margin: 8px 0 0; color: var(--chalk-dim); }
.pq-list { display: flex; flex-direction: column; gap: 10px; }
.pq-rev { border-radius: 18px; border: 2px solid var(--lilac-2); background: var(--surface); padding: 0 14px; }
.pq-rev[open] { padding-bottom: 14px; }
.pq-rev summary { display: flex; align-items: center; gap: 10px; min-height: 52px; cursor: pointer; list-style: none; font-weight: 800; }
.pq-rev summary::-webkit-details-marker { display: none; }
.pq-rev summary small { color: var(--ink-2); font-weight: 700; }
.pq-rev summary .pq-idea { margin-left: auto; text-align: right; font-weight: 700; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pq-mark { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: var(--lilac); }
.pq-rev.right .pq-mark { background: var(--done); color: var(--done-ink); }
.pq-rev.wrong .pq-mark { background: var(--red-soft); color: var(--red); }
.pq-rev > * + * { margin-top: 10px; }
.pq-rev .pq-text { font-size: 15.5px; }
.pq-ans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pq-ans > div { padding: 10px 12px; border-radius: 12px; background: var(--lilac); display: flex; flex-direction: column; gap: 4px; }
.pq-ans small { color: var(--ink-2); font-weight: 800; font-size: 12.5px; }
.pq-ans b { font-weight: 800; }
.pq-ans b.good { color: var(--done-ink); }
.pq-sol { padding: 14px; border-radius: 16px; background: var(--lilac); }
.pq-sol p { margin: 6px 0 0; font-weight: 700; line-height: 1.55; }
.pq-trap { margin: 0; color: var(--chalk-dim); font-weight: 700; line-height: 1.5; }
.pq-trap b { color: var(--pink); }
.pq-ask { width: 100%; }
