:root {
  --bg: #fff8ee; --card: #ffffff; --ink: #1f2a44; --soft: #5d6781; --line: #eadfce;
  --maths: #f2674b; --english: #1c9aa0; --science: #4c9a4a; --reading: #8a5cc7;
  --ok: #2e9e5b; --ok-bg: #e4f6ea; --warn: #c9781a; --warn-bg: #fdf0d9; --bad: #cf4a3c; --bad-bg: #fde7e3;
  --accent: #f2674b; --sun: #ffc83d;
  --r: 20px; --shadow: 0 2px 0 rgba(31, 42, 68, .08), 0 10px 24px -14px rgba(31, 42, 68, .35);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Quicksand", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.5 var(--font); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; text-wrap: balance; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 16px 16px 80px; }
.hide { display: none !important; }

/* shared bits */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 22px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; box-shadow: 0 4px 0 rgba(0, 0, 0, .22); transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .22); }
.btn.go { background: var(--accent); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 var(--line); }
.btn.small { min-height: 40px; padding: 6px 14px; font-size: 15px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; background: #f1eadf; color: var(--soft); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.muted { color: var(--soft); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* worksheet content */
.content p { margin: 0 0 .7em; }
.content img { max-width: 100%; height: auto; display: block; margin: 10px 0; border-radius: 10px; background: #fff; }
.content table { border-collapse: collapse; margin: 10px 0; font-size: .95em; display: block; overflow-x: auto; max-width: 100%; }
.content td { border: 2px solid var(--line); padding: 6px 12px; vertical-align: top; }
.content tr:first-child td { background: #faf3e7; font-weight: 700; }
.fr { display: inline-flex; flex-direction: column; text-align: center; vertical-align: middle; font-size: .85em; line-height: 1.15; margin: 0 3px; }
.fr > span:first-child { border-bottom: 2px solid currentColor; padding: 0 4px; }
.fr > span:last-child { padding: 0 4px; }
.m { white-space: nowrap; }
.rad, .bar { border-top: 2px solid currentColor; }
.sum { font-family: ui-monospace, Menlo, monospace; font-size: 1.25em; line-height: 1.2; text-align: right; display: inline-block; white-space: pre; }

/* kid: top bar */
.top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); }
.top h1 { font-size: 22px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back { width: 48px; height: 48px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); font-size: 22px; flex: none; }
.stars { font-weight: 800; background: #fff; border-radius: 999px; padding: 8px 16px; box-shadow: var(--shadow); white-space: nowrap; }

/* kid: home */
.hello { display: flex; align-items: center; gap: 18px; margin: 8px 0 22px; }
.hello h2 { font-size: clamp(28px, 6vw, 44px); }
.sunface { width: 72px; height: 72px; flex: none; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.tile { border-radius: 26px; padding: 20px 18px; min-height: 140px; color: #fff; text-align: left; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 6px 0 rgba(0, 0, 0, .18); transition: transform .08s, box-shadow .08s; position: relative; overflow: hidden; }
.tile:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.tile b { font-size: 26px; } .tile small { opacity: .9; font-weight: 600; }
.tile .big { position: absolute; right: -6px; top: -14px; font-size: 92px; opacity: .22; font-weight: 900; line-height: 1; }
.t-Maths { background: var(--maths); } .t-English { background: var(--english); } .t-Science { background: var(--science); } .t-Reading { background: var(--reading); }
.section-h { font-size: 20px; margin: 30px 0 12px; display: flex; align-items: center; gap: 10px; }
.hw { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.hwcard { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; }
.hwcard .dot { width: 14px; align-self: stretch; border-radius: 8px; flex: none; }
.hwcard b { display: block; }
.ring { --p: 0; width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: radial-gradient(#fff 55%, transparent 56%), conic-gradient(var(--ok) calc(var(--p) * 1%), #ece3d4 0); }

/* kid: chapter list */
.group-h { font-size: 16px; text-transform: uppercase; letter-spacing: .08em; color: var(--soft); margin: 26px 0 10px; }
.chap { display: flex; gap: 12px; align-items: center; padding: 12px 16px; margin-bottom: 10px; flex-wrap: wrap; }
.chap b { flex: 1 1 220px; }
.lv { min-width: 92px; min-height: 48px; border-radius: 14px; background: #f6efe3; font-weight: 700; font-size: 15px; padding: 4px 10px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.lv small { font-weight: 600; color: var(--soft); font-size: 12px; }
.lv.started { background: var(--warn-bg); } .lv.done { background: var(--ok-bg); color: var(--ok); }
.lv.assigned { box-shadow: inset 0 0 0 3px var(--accent); }

/* kid: worksheet player */
.player { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .player.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .player.two .shared { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; } }
.shared h3 { font-size: 20px; margin-bottom: 10px; } .shared h4 { font-size: 18px; margin: 14px 0 6px; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 16px 14px; }
.dotq { width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--line); font-size: 13px; font-weight: 700; }
.dotq.cur { box-shadow: inset 0 0 0 3px var(--ink); } .dotq.correct { background: var(--ok); color: #fff; box-shadow: none; } .dotq.review { background: var(--sun); box-shadow: none; } .dotq.wrong { background: var(--bad); color: #fff; box-shadow: none; }
.dotq.helpq::after { content: "🙋"; position: absolute; margin: -14px 0 0 8px; font-size: 14px; }
.qcard .qn { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 800; }
.qtext { font-size: 21px; margin: 14px 0; }
.say { width: 44px; height: 44px; border-radius: 50%; background: #f6efe3; font-size: 20px; }
.opts { display: grid; gap: 10px; margin: 14px 0; }
.opt { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 16px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); min-height: 56px; width: 100%; }
.opt .k { width: 36px; height: 36px; border-radius: 50%; background: #f6efe3; display: grid; place-items: center; font-weight: 800; flex: none; }
.opt.sel { box-shadow: inset 0 0 0 3px var(--ink); background: #f3f6ff; } .opt.sel .k { background: var(--ink); color: #fff; }
.opts.letters { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); } .opts.letters .opt { justify-content: center; }
.ans { width: 100%; border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; background: #fffdf9; font-size: 20px; min-height: 56px; resize: vertical; }
.ans:focus { border-color: var(--ink); outline: none; }
.part { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; margin: 12px 0; }
.part .k { height: 40px; border-radius: 12px; background: #f6efe3; display: grid; place-items: center; font-weight: 800; }
.part .ptext { margin-bottom: 6px; }
.note { background: #f3f6ff; border-radius: 14px; padding: 10px 14px; font-size: 16px; margin: 10px 0; }
.fb { border-radius: 16px; padding: 14px 16px; font-weight: 700; margin: 14px 0 0; display: flex; gap: 10px; align-items: center; }
.fb.correct { background: var(--ok-bg); color: var(--ok); } .fb.review { background: var(--warn-bg); color: #8a5a10; } .fb.wrong { background: var(--bad-bg); color: var(--bad); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
.helpbtn.on { background: var(--sun); color: var(--ink); }
.nudge { background: #fff4c9; border-radius: 18px 18px 18px 4px; padding: 12px 16px; margin: 12px 0 0; display: flex; gap: 10px; align-items: center; animation: pop .35s ease; }
.nudge small { display: block; color: var(--soft); font-weight: 700; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.burst { position: fixed; inset: 0; pointer-events: none; display: grid; place-items: center; font-size: 120px; animation: burst .9s ease forwards; z-index: 20; }
@keyframes burst { 0% { transform: scale(.2) rotate(-30deg); opacity: 0; } 40% { transform: scale(1.1) rotate(8deg); opacity: 1; } 100% { transform: scale(1.5) rotate(0); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .burst, .nudge { animation: none; } .burst { display: none; } }
.finish { text-align: center; padding: 40px 20px; } .finish .em { font-size: 80px; }

/* reading */
.passage { max-width: 720px; margin: 0 auto; font-size: 21px; line-height: 1.7; }
.passage h2 { font-size: 30px; margin-bottom: 4px; }
.rlist { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.rlist button { text-align: left; width: 100%; }

/* parent */
body.parent { --bg: #f6f3ee; background: var(--bg); font-size: 16px; --font: system-ui, -apple-system, "Segoe UI", sans-serif; font-family: var(--font); }
.parent .card { border-radius: 14px; padding: 16px; }
.ptabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.ptabs button { padding: 8px 16px; border-radius: 999px; font-weight: 600; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.ptabs button.on { background: var(--ink); color: #fff; box-shadow: none; }
.ptabs .count { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; margin-left: 4px; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat div { background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.item { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); text-align: left; width: 100%; }
.item:first-of-type { border-top: 0; }
.item .grow { flex: 1; min-width: 0; } .item .grow small { display: block; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable td, .ptable th { padding: 6px 8px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.ptable th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--soft); border-top: 0; }
.cell { display: inline-flex; align-items: center; gap: 6px; min-width: 96px; padding: 4px 8px; border-radius: 8px; background: #f3eee5; font-variant-numeric: tabular-nums; font-size: 13px; }
.cell.assigned { box-shadow: inset 0 0 0 2px var(--accent); }
.bar3 { display: inline-flex; width: 46px; height: 8px; border-radius: 4px; overflow: hidden; background: #ded5c5; }
.bar3 i { display: block; height: 100%; } .bar3 .c { background: var(--ok); } .bar3 .r { background: var(--sun); } .bar3 .w { background: var(--bad); }
.tablewrap { overflow-x: auto; }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(560px, 100%); background: #fff; box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .4); padding: 18px; overflow-y: auto; z-index: 30; }
.scrim { position: fixed; inset: 0; background: rgba(31, 42, 68, .35); z-index: 29; }
.drawer h3 { margin: 18px 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); }
.her { background: #f3f6ff; border-radius: 12px; padding: 10px 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.keybox { background: var(--warn-bg); border-radius: 12px; padding: 10px 12px; }
.hintlist { margin: 0; padding-left: 20px; } .hintlist li { margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 999px; background: #fff4c9; font-size: 14px; text-align: left; }
.chip:active { background: var(--sun); }
.field { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; min-height: 42px; }
.days { display: flex; gap: 4px; align-items: flex-end; height: 90px; }
.days div { flex: 1; background: var(--english); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.days div.zero { background: #ded5c5; }
.dayl { display: flex; gap: 4px; font-size: 11px; color: var(--soft); } .dayl span { flex: 1; text-align: center; }
.pin { max-width: 360px; margin: 12vh auto; text-align: center; }
.pin input { text-align: center; font-size: 28px; letter-spacing: .4em; }

/* sign-in */
.login { max-width: 440px; margin: 7vh auto 0; text-align: center; display: grid; gap: 14px; padding: 28px; }
.login svg { margin: 0 auto; } .login h1 { font-size: 32px; }
.login label { text-align: left; display: grid; gap: 6px; font-weight: 700; } .login label span { font-weight: 500; font-size: 14px; }
.field.big { font-size: 26px; text-align: center; min-height: 64px; border-width: 2px; border-radius: 16px; }
.login .pill { justify-self: center; white-space: normal; }
/* voice chooser */
.modal { position: fixed; inset: 0; background: rgba(31, 42, 68, .4); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal .card { width: min(480px, 100%); max-height: 86vh; overflow: auto; }
.vrow { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; margin-top: 8px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); }
.vrow.sel { box-shadow: inset 0 0 0 3px var(--ink); background: #f3f6ff; }
.linkish { text-decoration: underline; color: var(--soft); font-size: 15px; }

/* the word being read aloud */
.rw { border-radius: 5px; transition: background-color .12s, box-shadow .12s; }
.rw.on { background: #ffe27a; box-shadow: 0 0 0 3px #ffe27a; }
@media (prefers-reduced-motion: reduce) { .rw { transition: none; } }

.speeds { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0 8px; }

a.btn { text-decoration: none; }

/* phones */
@media (max-width: 600px) {
  .wrap { padding: 12px 12px 80px; }
  .card { padding: 16px; }
  .top { padding: 10px 12px; } .top h1 { font-size: 19px; }
  .chap { gap: 8px; } .chap b { flex-basis: 100%; }
  .lv { flex: 1 1 0; min-width: 0; font-size: 13px; padding: 4px; }
  .lv small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .dots { flex-wrap: nowrap; overflow-x: auto; margin: 0 0 10px; padding: 4px 12px 8px; scrollbar-width: none; }
  .dots::-webkit-scrollbar { display: none; }
  .dotq { flex: none; width: 40px; height: 40px; }
  .qtext { font-size: 19px; }
  .actions .btn { flex: 1 1 auto; } .actions .spacer { display: none; }
  .passage { font-size: 19px; }
  .drawer { padding: 14px; }
  .ptabs button { padding: 8px 12px; }
  .hello { gap: 12px; } .sunface { width: 56px; height: 56px; }
}
/* touch screens: bigger targets */
@media (pointer: coarse) {
  .dotq { min-width: 40px; min-height: 40px; }
  .cell input[type=checkbox], .pill input[type=checkbox] { width: 20px; height: 20px; }
  .item { padding: 12px 0; }
}

.grid2 > * { min-width: 0; }
.parent .wrap { overflow-x: clip; }

/* homework tile, start pill, progress bar */
.t-Homework { background: #2b3a67; }
.startpill { background: var(--accent); color: #fff; font-weight: 800; border-radius: 999px; padding: 8px 14px; white-space: nowrap; flex: none; }
.pbar { height: 10px; border-radius: 6px; background: #ece3d4; margin: 0 16px 10px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--ok); border-radius: 6px; transition: width .4s ease; }
/* hints */
.hintcard { display: flex; gap: 12px; align-items: flex-start; background: #eef6ff; border-radius: 18px; padding: 12px 16px; margin-top: 12px; animation: pop .3s ease; }
.hintcard small { display: block; font-weight: 800; color: #2b5d9c; }
.hintcard .hic { font-size: 26px; line-height: 1.2; }
.hintcard.thinking { color: var(--soft); align-items: center; }
.dotsanim::after { content: "…"; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.2s steps(4, end) infinite; overflow: hidden; vertical-align: bottom; }
@keyframes dots { from { width: 0; } to { width: 1.2em; } }
.confetti { position: fixed; top: -50px; z-index: 50; pointer-events: none; animation: fall 3s linear forwards; }
@keyframes fall { to { transform: translateY(115vh) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .confetti, .dotsanim::after, .hintcard { animation: none; } .confetti { display: none; } }
@media (max-width: 600px) { .pbar { margin: 0 12px 8px; } }
/* parent: add homework */
.upform { display: grid; gap: 12px; max-width: 560px; }
.upform label { display: grid; gap: 4px; font-weight: 600; } .upform label span { font-weight: 400; color: var(--soft); font-size: 14px; }
.two { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; } @media (max-width: 480px) { .two { grid-template-columns: 1fr; } }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #ded5c5; border-top-color: var(--accent); animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.notebox { background: var(--warn-bg); border-radius: 10px; padding: 8px 12px; font-size: 14px; }

/* animated picture helpers */
.vis { width: 100%; height: auto; display: block; }
.vpop { opacity: 0; transform-box: fill-box; transform-origin: center; animation: vpop .4s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes vpop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
.vdraw { animation: vdraw .6s ease forwards; }
@keyframes vdraw { to { stroke-dashoffset: 0; } }
.vfrog { transform-box: fill-box; animation: vfrog linear .4s forwards; animation-delay: .4s; }
@keyframes vfrog { to { transform: translateX(var(--dx)); } }
.vhand { transform-box: view-box; transform-origin: 75px 75px; animation: vhand 1.4s ease-out forwards; }
@keyframes vhand { from { transform: rotate(0deg); } to { transform: rotate(var(--deg)); } }
.vrow { display: flex; align-items: center; gap: 14px; margin: 8px 0; } .vrow .vis { flex: 1; min-width: 0; }
.vclocks { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; } .vclock { text-align: center; width: 150px; max-width: 30%; } .vclock b { font-size: 20px; }
.piccard { background: #fffdf5; border: 3px dashed #ffd66b; border-radius: 18px; padding: 14px; margin: 12px 0; animation: pop .3s ease; }
.picstage { margin-bottom: 10px; overflow-x: auto; }
/* Sunny the buddy */
.buddy { flex: none; overflow: visible; }
.buddy .rays { transform-box: fill-box; transform-origin: center; animation: spinrays 14s linear infinite; }
.buddy.idle { animation: bob 2.6s ease-in-out infinite; }
.buddy .eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.2s infinite; }
.buddy.happy { animation: jump .7s ease 2; } .buddy.happy .rays { animation-duration: 3s; }
.buddy.think { animation: tilt 1.6s ease-in-out infinite; }
@keyframes spinrays { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(-4px); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes jump { 30% { transform: translateY(-14px) rotate(-8deg); } 60% { transform: translateY(0) rotate(6deg); } }
@keyframes tilt { 50% { transform: rotate(-9deg); } }
.buddybox { display: inline-flex; align-items: center; gap: 8px; }
.bubble { background: #fff4c9; border-radius: 16px 16px 4px 16px; padding: 6px 12px; font-weight: 800; font-size: 15px; max-width: 220px; animation: pop .35s ease; }
/* level, goal, stickers */
.gamebar { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.glevel { flex: 1 1 220px; } .xpbar { height: 14px; border-radius: 8px; background: #ece3d4; overflow: hidden; margin: 6px 0 4px; }
.xpbar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--sun), var(--accent)); transition: width .6s ease; }
.ggoal { text-align: center; display: grid; justify-items: center; gap: 2px; } .ggoal .ring { width: 56px; height: 56px; font-size: 14px; }
.stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 16px; }
.sticker { background: #fff; border-radius: 20px; padding: 14px 10px; text-align: center; box-shadow: var(--shadow); opacity: .55; display: grid; gap: 2px; }
.sticker.got { opacity: 1; box-shadow: 0 0 0 3px var(--sun), var(--shadow); } .sticker .sic { font-size: 44px; line-height: 1.2; } .sticker small { color: var(--soft); font-size: 13px; }
.prize { text-align: center; max-width: 340px; animation: pop .4s ease; } .prizeicon { font-size: 84px; line-height: 1.1; animation: jump .8s ease 2; }
@media (prefers-reduced-motion: reduce) {
  .vpop, .vdraw, .vfrog, .vhand, .buddy, .buddy *, .bubble, .prize, .prizeicon, .piccard { animation: none !important; }
  .vpop { opacity: 1; } .vdraw { stroke-dashoffset: 0 !important; } .vfrog { transform: translateX(var(--dx)); } .vhand { transform: rotate(var(--deg)); }
}
@media (max-width: 600px) { .bubble { max-width: 130px; font-size: 13px; } .buddybox .buddy { width: 48px; height: 48px; } }

.vwide { min-width: 430px; }
/* keep a wide picture scrolling inside its card instead of stretching the page */
.player > * { min-width: 0; max-width: 100%; }
.piccard { display: grid; grid-template-columns: minmax(0, 1fr); }
.picstage { max-width: 100%; contain: inline-size; }

.vhelp { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 6px 0; background: #fff; }
.vhelp summary { font-weight: 600; cursor: pointer; } .vhelp ol { margin: 8px 0 4px; padding-left: 20px; } .vhelp li { margin-bottom: 6px; }

/* place value chart */
.pvchart { border-collapse: separate; border-spacing: 4px; margin: 0 auto; }
.pvchart th { background: #2b3a67; color: #fff; border-radius: 10px; padding: 6px 4px; min-width: 52px; vertical-align: top; }
.pvchart th b { display: block; font-size: 18px; } .pvchart th small { display: block; font-size: 10px; font-weight: 600; line-height: 1.15; opacity: .9; }
.pvchart td { background: #fff; border: 2px solid var(--line); border-radius: 10px; height: 54px; text-align: center; font-size: 30px; font-weight: 800; }
.pvchart td span { display: inline-block; }
.pvchart .pvdot { background: none; border: 0; min-width: 12px; font-size: 30px; font-weight: 800; padding: 0; }

/* science diagrams */
.dflow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; justify-content: center; }
.dbox { display: inline-block; border-radius: 14px; padding: 10px 14px; font-weight: 700; font-size: 17px; line-height: 1.25; box-shadow: inset 0 0 0 2px rgba(31, 42, 68, .12); max-width: 180px; text-align: center; }
.darrow { display: inline-block; font-size: 22px; color: var(--english); }
.dcycle { position: relative; width: min(100%, 420px); aspect-ratio: 1; margin: 0 auto; }
.dcycle svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dcyc { position: absolute; translate: -50% -50%; max-width: 34%; font-size: 14px; padding: 8px 10px; }
.dgroups { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.dgroup { border-radius: 16px; padding: 10px 12px; } .dgroup b { display: block; margin-bottom: 6px; }
.dchip { display: inline-block; background: #fff; border-radius: 999px; padding: 4px 12px; margin: 3px 4px 3px 0; font-weight: 600; font-size: 15px; box-shadow: inset 0 0 0 2px rgba(31, 42, 68, .1); }
.dcompare { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.dcompare th { color: #fff; border-radius: 10px; padding: 8px; font-size: 17px; }
.dcompare td { background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 16px; vertical-align: top; } .dcompare td span { display: inline-block; }
@media (max-width: 600px) { .dbox { font-size: 15px; max-width: 140px; padding: 8px 10px; } .dcyc { font-size: 12px; padding: 6px 7px; } }

/* pen writing pad */
.inkpad { border: 3px solid var(--line); border-radius: 18px; background: #fff; margin: 12px 0; overflow: hidden; }
.inkbar { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px; background: #faf3e7; border-bottom: 2px solid var(--line); }
.inktool { min-height: 44px; padding: 6px 12px; border-radius: 12px; background: #fff; font-weight: 700; font-size: 15px; box-shadow: inset 0 0 0 2px var(--line); }
.inktool.on { background: var(--ink); color: #fff; box-shadow: none; }
.inkcanvas { display: block; width: 100%; height: 250px; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background: repeating-linear-gradient(#fff 0 49px, #dbe7f5 49px 50px); }
.inkthumb { display: block; margin: 10px 0; border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 2px var(--line); background: #fff; padding: 0; max-width: 260px; }
.inkthumb img, .inkimg { display: block; width: 100%; height: auto; }
.inkimg { border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-top: 6px; max-width: 520px; }
