/* Sai's Exam Quest. Thai text uses Mali (looped, rounded: easy for a P2 reader). */
:root {
  --ink: #1e293b;
  --muted: #64748b;
  --card: #ffffff;
  --go: #22c55e;
  --go-d: #15803d;
  --purple: #8b5cf6;
  --purple-d: #6d28d9;
  --orange: #f97316;
  --sky1: #bae6fd;
  --sky2: #e9d5ff;
  --noun: #f59e0b;
  --pronoun: #a855f7;
  --verb: #22c55e;
  --adverb: #ec4899;
  --r: 22px;
  --shadow: 0 6px 0 rgba(15, 23, 42, 0.12), 0 12px 28px rgba(15, 23, 42, 0.1);
  --font: 'Mali', 'Fredoka', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(160deg, var(--sky1), #fef9c3 55%, var(--sky2));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font-family: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
img { -webkit-user-drag: none; user-select: none; }
#app { max-width: 1040px; margin: 0 auto; padding: 14px 14px 60px; }
.nohelp .help { display: none !important; }
.help { color: var(--muted); font-family: 'Fredoka', var(--font); font-weight: 500; }
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 18px; font-size: 20px; font-weight: 700;
  background: #fff; box-shadow: 0 5px 0 #cbd5e1; transition: transform 0.08s, box-shadow 0.08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #cbd5e1; }
.btn .help { color: inherit; opacity: 0.8; font-size: 0.8em; }
.btn.go { background: var(--go); color: #fff; box-shadow: 0 5px 0 var(--go-d); }
.btn.go:active { box-shadow: 0 1px 0 var(--go-d); }
.btn.purple { background: var(--purple); color: #fff; box-shadow: 0 5px 0 var(--purple-d); }
.btn.danger { background: #ef4444; color: #fff; box-shadow: 0 5px 0 #b91c1c; }
.btn.ghost { background: rgba(255, 255, 255, 0.75); }
.btn.big { font-size: 24px; padding: 16px 30px; border-radius: 22px; }
.btn.small { font-size: 15px; padding: 8px 14px; border-radius: 12px; box-shadow: 0 3px 0 #cbd5e1; }
.btn.small.go { box-shadow: 0 3px 0 var(--go-d); }
.btn:disabled { opacity: 0.4; }
.iconbtn { width: 46px; height: 46px; border-radius: 14px; background: #fff; font-size: 22px; box-shadow: 0 4px 0 #cbd5e1; flex: none; }
.spk { font-size: 20px; padding: 2px 6px; border-radius: 10px; vertical-align: middle; transition: transform 0.15s; }
.spk:hover { transform: scale(1.15); }
.spk.small { font-size: 15px; }
.spk.mini { font-size: 15px; opacity: 0.65; position: absolute; top: 6px; right: 8px; }
.spk.speaking, .speaking .spk { animation: pulse 0.6s infinite; }

/* ---------- animations ---------- */
@keyframes pulse { 50% { transform: scale(1.25); } }
@keyframes floaty { 50% { transform: translateY(-8px) rotate(-1deg); } }
@keyframes bounce { 0%, 100% { transform: translateY(0) scale(1); } 40% { transform: translateY(-18px) scale(1.03, 0.97); } 60% { transform: translateY(0) scale(1.04, 0.96); } }
@keyframes popin { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes glow { 50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.35), 0 5px 0 var(--go-d); } }
@keyframes wiggle { 25% { transform: rotate(-12deg) scale(1.2); } 75% { transform: rotate(12deg) scale(1.2); } }
@keyframes starin { 0% { transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.4) rotate(10deg); } 100% { transform: scale(1); } }
@keyframes beat { 50% { transform: scale(1.35); background: #fde047; } }
.float { animation: floaty 3s ease-in-out infinite; }
.bounce { animation: bounce 1.6s ease-in-out infinite; }
.pop-in { animation: popin 0.4s ease-out both; }
.slide-in { animation: slidein 0.35s ease-out both; }
.shake { animation: shake 0.4s; }
.wiggle { animation: wiggle 0.5s; }

/* ---------- splash ---------- */
.splash { min-height: 86vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.sp-art { width: min(300px, 62vw); filter: drop-shadow(0 18px 20px rgba(30, 64, 175, 0.25)); }
.splash h1 { font-family: 'Fredoka', var(--font); font-size: clamp(34px, 6vw, 56px); color: #1e3a8a; text-shadow: 0 4px 0 #fff; }
.sp-th { font-size: 24px; margin: 0 0 18px; color: #334155; }
.viewer-note { color: var(--muted); }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.topbar h1 { font-size: 24px; flex: 1; }
.me { display: flex; align-items: center; gap: 8px; font-size: 22px; margin-right: auto; }
.me img { width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; box-shadow: 0 3px 0 #cbd5e1; }
.stats { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 17px; box-shadow: 0 3px 0 #cbd5e1; white-space: nowrap; font-family: 'Fredoka', var(--font); }
.pill.tickets.has { background: #fef3c7; animation: pulse 2s infinite; }
.langbtn { font-family: var(--font); font-size: 15px; }

/* ---------- journey map ---------- */
.journey { position: relative; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); background: url(../img/art/world.webp) center/cover; margin-bottom: 18px; }
.jscroll { overflow-x: auto; scrollbar-width: none; }
.jscroll::-webkit-scrollbar { display: none; }
.jmap { position: relative; height: 230px; min-width: 640px; }
.jpath { position: absolute; inset: 0; width: 100%; height: 100%; }
.jpath polyline { fill: none; stroke: #fff; stroke-width: 1.6; stroke-dasharray: 2 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-width: 6; opacity: 0.85; }
.jnode { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.jdot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-weight: 700; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18); font-family: 'Fredoka'; color: #0369a1; font-size: 16px; }
.jdate { font-size: 12px; background: rgba(255, 255, 255, 0.85); border-radius: 8px; padding: 0 6px; font-family: 'Fredoka'; white-space: nowrap; }
.jnode.past .jdot { background: #e2e8f0; color: #94a3b8; }
.jnode.done .jdot { background: #fde047; font-size: 20px; }
.jnode.today .jdot { width: 74px; height: 74px; background: #fff; border: 4px solid var(--orange); animation: bounce 1.8s infinite; }
.jnode.today .jdot img { width: 62px; height: 62px; object-fit: contain; }
.jnode.today .jdate { background: var(--orange); color: #fff; font-weight: 700; }
.jnode.exam .jdot { width: 86px; height: 86px; background: none; box-shadow: none; }
.jnode.exam .jdot img { width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.3)); }
.jnode.exam .jdate { background: #facc15; font-weight: 700; }
.countdown { position: absolute; left: 14px; top: 12px; background: rgba(255, 255, 255, 0.92); border-radius: 16px; padding: 8px 14px; font-size: 18px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1); max-width: calc(100% - 28px); }
.countdown b { font-size: 30px; color: var(--orange); font-family: 'Fredoka'; }

/* ---------- today ---------- */
.mochi-say { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 12px; }
.mochi-say img { width: 96px; flex: none; }
.bubble { position: relative; background: #fff; border-radius: 22px; padding: 12px 16px; font-size: 20px; box-shadow: var(--shadow); margin-bottom: 26px; }
.bubble::before { content: ''; position: absolute; left: -10px; bottom: 16px; border: 10px solid transparent; border-right-color: #fff; border-left: 0; }
.bubble .help { display: block; font-size: 16px; }
.sec { font-size: 24px; margin: 8px 0 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sec.small { font-size: 20px; }
.sec .help { font-size: 0.7em; }
.sec .count { margin-left: auto; background: #fff; border-radius: 999px; padding: 2px 12px; font-size: 16px; font-family: 'Fredoka'; }
.missions { display: grid; gap: 12px; }
.mcard { display: flex; align-items: center; gap: 14px; text-align: left; background: #fff; border-radius: var(--r); padding: 12px 16px; box-shadow: 0 6px 0 #cbd5e1; border: 3px solid transparent; transition: transform 0.1s; }
.mcard:active { transform: translateY(4px); box-shadow: 0 2px 0 #cbd5e1; }
.mcard.next { border-color: var(--go); animation: glow 1.8s infinite; }
.mcard.done { background: #f0fdf4; opacity: 0.85; }
.mc-art { width: 72px; height: 72px; object-fit: contain; flex: none; }
.mc-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mc-kind { font-size: 14px; color: var(--muted); }
.mc-title { font-size: 22px; line-height: 1.3; }
.mc-en { font-size: 15px; }
.mc-go { font-size: 30px; color: var(--go); display: flex; flex-direction: column; align-items: center; }
.mc-check { width: 40px; height: 40px; border-radius: 50%; background: var(--go); color: #fff; display: grid; place-items: center; font-size: 22px; }
.mc-stars { font-size: 13px; margin-top: 2px; }
.bonus { background: #facc15; color: #713f12; border-radius: 6px; padding: 0 6px; font-size: 11px; font-family: 'Fredoka'; font-weight: 700; }
.bonus-wrap { margin-top: 14px; }
.empty { background: #fff; border-radius: var(--r); padding: 18px; font-size: 20px; text-align: center; }
.more { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0; }
.bigtile { background: #fff; border-radius: var(--r); padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 6px 0 #cbd5e1; }
.bigtile span { font-size: 36px; }
.bigtile b { font-size: 17px; }
.bigtile small { font-size: 13px; color: var(--muted); font-family: 'Fredoka'; text-align: center; }
.bigtile.t-break:not(.locked) { background: linear-gradient(135deg, #fde68a, #fbcfe8); }
.bigtile.locked { opacity: 0.6; }
.examlist { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.exam { background: #fff; border-radius: 16px; padding: 8px 12px; display: flex; gap: 10px; align-items: center; border-left: 6px solid var(--c); flex: none; box-shadow: 0 3px 0 #cbd5e1; }
.ex-d { font-family: 'Fredoka'; font-size: 14px; color: var(--muted); }
.ex-n { font-size: 16px; }

/* ---------- word-type colours ---------- */
.wt-noun { --wt: var(--noun); }
.wt-pronoun { --wt: var(--pronoun); }
.wt-verb { --wt: var(--verb); }
.wt-adverb { --wt: var(--adverb); }
.wt-hl { --wt: #f97316; }

/* ---------- lesson ---------- */
.qbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dots { display: flex; gap: 6px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, 0.8); }
.dots i.on { background: var(--orange); width: 28px; border-radius: 8px; }
.dots i.past { background: #fdba74; }
.ltitle { margin-left: auto; font-size: 18px; background: #fff; border-radius: 999px; padding: 6px 14px; }
.slide { background: #fff; border-radius: 28px; padding: 22px; box-shadow: var(--shadow); border-top: 10px solid var(--wt, #38bdf8); }
.sl-top { display: flex; gap: 18px; align-items: center; }
.sl-art { width: 160px; max-height: 170px; object-fit: contain; flex: none; }
.sl-text { flex: 1; }
.bi-p { font-size: 26px; line-height: 1.6; }
.bi-p b, .bi-s b { color: var(--wt, #ea580c); }
.bi-s { font-size: 19px; line-height: 1.45; margin-top: 6px; }
.ul { text-decoration: underline 3px #ef4444; text-underline-offset: 5px; }
.lnav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.lnav .l-next { flex: 1; max-width: 520px; margin-left: auto; }
.counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.countcard { background: #f0f9ff; border-radius: 20px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 4px 0 #bae6fd; }
.cc-e { font-size: 40px; }
.cc-w { font-size: 34px; font-weight: 700; }
.cc-read { display: flex; gap: 4px; justify-content: center; }
.cc-read i, .syll { font-style: normal; background: #fff; border: 3px solid #38bdf8; border-radius: 12px; padding: 2px 8px; font-size: 21px; white-space: nowrap; }
.cc-read i.beat { animation: beat 0.35s; }
.cc-n { font-size: 16px; color: #0369a1; font-weight: 700; }
.cc-en { font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.chip { background: #fff; border: 3px solid var(--wt, #e2e8f0); border-radius: 18px; padding: 8px 14px; display: flex; flex-direction: column; align-items: center; min-width: 96px; box-shadow: 0 4px 0 #e2e8f0; }
.chip.special { border-color: #facc15; background: #fefce8; }
.ch-e { font-size: 32px; }
.ch-w { font-size: 22px; font-weight: 700; }
.ch-en { font-size: 13px; }
.group { margin-top: 16px; }
.g-head { font-size: 22px; font-weight: 700; }
.sents { display: grid; gap: 12px; margin-top: 16px; }
.sent { background: #f8fafc; border-radius: 18px; padding: 10px 14px; }
.sentence { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tok { font-size: 24px; padding: 6px 10px; border-radius: 12px; background: #fff; border: 2px solid #e2e8f0; display: inline-flex; flex-direction: column; align-items: center; line-height: 1.3; }
.tok small { font-size: 12px; font-weight: 700; color: #fff; background: var(--wt); border-radius: 6px; padding: 0 6px; }
.tok.hl { background: var(--wt); color: #fff; border-color: var(--wt); font-weight: 700; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15); }
.sent-en { font-size: 15px; margin-top: 4px; }
.combo { display: flex; align-items: stretch; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.cpart, .cword { border-radius: 20px; padding: 12px 18px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 130px; max-width: 240px; text-align: center; }
.cpart b, .cword b { font-size: 34px; }
.cpart.none { background: #fef2f2; border: 3px dashed #fca5a5; }
.cpart.has { background: #f0fdf4; border: 3px solid #86efac; }
.cword { background: #fefce8; border: 3px solid #facc15; }
.cw-e { font-size: 36px; }
.op { align-self: center; font-size: 40px; font-weight: 700; color: var(--orange); }
.pairs { display: grid; gap: 10px; margin-top: 16px; }
.pair { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.arrow { font-size: 26px; color: var(--orange); }
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.typecard { display: flex; gap: 10px; align-items: center; border-radius: 20px; padding: 10px; border: 4px solid var(--wt); background: #fff; }
.typecard img { width: 72px; height: 72px; object-fit: contain; }
.typecard b { font-size: 22px; color: var(--wt); }
.tc-d { font-size: 15px; }
.tc-ex { font-size: 17px; font-weight: 700; margin-top: 4px; }

/* ---------- quiz ---------- */
.prog { flex: 1; height: 18px; background: rgba(255, 255, 255, 0.8); border-radius: 999px; overflow: hidden; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, #4ade80, #22c55e); border-radius: 999px; transition: width 0.4s; }
.qcount, .qcoins { font-family: 'Fredoka'; font-size: 18px; background: #fff; border-radius: 999px; padding: 5px 12px; }
.paper-head { text-align: center; font-size: 18px; margin-bottom: 8px; }
.qbody { background: #fff; border-radius: 28px; padding: 22px; box-shadow: var(--shadow); min-height: 340px; }
.quiz.mock .qbody { border: 3px solid #cbd5e1; box-shadow: none; background: #fffef8; }
.qprompt .bi-p { font-size: 27px; }
.again { background: #fef3c7; border-radius: 12px; padding: 4px 12px; display: inline-block; margin-bottom: 10px; font-size: 15px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.choices.tf .choice { justify-content: center; font-size: 26px; padding: 22px; }
.choice .big { font-size: 34px; }
.choice { position: relative; display: flex; align-items: center; gap: 10px; text-align: left; background: #f8fafc; border: 3px solid #e2e8f0; border-radius: 20px; padding: 16px 18px; font-size: 24px; box-shadow: 0 5px 0 #e2e8f0; min-height: 76px; transition: transform 0.08s; }
.choice:active { transform: translateY(3px); }
.choice.wt-noun, .choice.wt-pronoun, .choice.wt-verb, .choice.wt-adverb { border-left: 10px solid var(--wt); }
.ct { display: flex; flex-direction: column; padding-right: 22px; }
.c-en { font-size: 15px; }
.letter { font-weight: 700; color: var(--muted); }
.choice.right, .num.right, .tok.right { background: #dcfce7 !important; border-color: #22c55e !important; color: #14532d; }
.choice.wrong, .num.wrong, .tok.wrong { background: #fee2e2 !important; border-color: #ef4444 !important; animation: shake 0.4s; }
.choice.show-right, .tok.show-right, .bin.show-right { border-color: #22c55e !important; animation: glow 1s infinite; }
.choice.picked, .num.picked, .tok.picked { background: #e0e7ff; border-color: #6366f1; }
.wordcard { background: #f0f9ff; border-radius: 24px; padding: 18px; text-align: center; margin: 16px auto 0; max-width: 520px; }
.wc-e { font-size: 64px; line-height: 1.1; }
.wc-w { font-size: 52px; font-weight: 700; }
.wc-en { font-size: 18px; }
.sylls { display: flex; gap: 8px; justify-content: center; margin-top: 10px; min-height: 44px; }
.numpad { display: flex; justify-content: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.num { width: 78px; height: 78px; border-radius: 50%; background: #fff; border: 4px solid #e2e8f0; font-size: 36px; font-weight: 700; font-family: 'Fredoka'; box-shadow: 0 5px 0 #cbd5e1; }
.sentence.big { justify-content: center; gap: 10px; margin-top: 26px; }
.sentence.big .tok { font-size: 32px; padding: 10px 16px; box-shadow: 0 4px 0 #e2e8f0; }
.hint { text-align: center; margin-top: 10px; }
.sort-stage { display: flex; justify-content: center; min-height: 150px; align-items: center; margin: 10px 0; }
.sort-card { background: #fff; border: 4px solid #38bdf8; border-radius: 24px; padding: 12px 26px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 6px 0 #bae6fd; min-width: 180px; transition: transform 0.3s, opacity 0.3s; }
.sort-card.fly { transform: translateY(120px) scale(0.3); opacity: 0; }
.sc-e { font-size: 50px; }
.sc-w { font-size: 40px; font-weight: 700; }
.sc-en { font-size: 16px; }
.bins { display: grid; gap: 10px; grid-template-columns: repeat(var(--n, 3), 1fr); }
.bins.n2 { --n: 2; } .bins.n3 { --n: 3; } .bins.n4 { --n: 4; } .bins.n5 { --n: 5; }
.bin { background: #fff; border: 4px solid var(--wt, #cbd5e1); border-radius: 20px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 5px 0 #e2e8f0; position: relative; min-height: 110px; justify-content: center; }
.bin img { width: 64px; height: 64px; object-fit: contain; }
.be { font-size: 36px; }
.bt { font-size: 19px; font-weight: 700; text-align: center; line-height: 1.25; }
.ben { font-size: 12px; text-align: center; }
.bc { position: absolute; top: -10px; right: -8px; background: var(--wt, #64748b); color: #fff; border-radius: 999px; min-width: 28px; height: 28px; display: grid; place-items: center; font-family: 'Fredoka'; font-size: 15px; }
.bin.flash { background: #dcfce7; }
.wc-mean .bi-p { font-size: 22px; }
.slots { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 12px; transition: gap 0.4s; }
.slots.joined { gap: 0; }
.slots.joined .plus { display: none; }
.slots.joined .slot { border-radius: 0; border-left: 0; border-right: 0; background: #fde68a; }
.slot { min-width: 96px; height: 70px; border: 4px dashed #94a3b8; border-radius: 16px; display: grid; place-items: center; font-size: 36px; font-weight: 700; background: #fff; }
.slot.filled { border-style: solid; border-color: #f59e0b; }
.plus { font-size: 30px; color: var(--orange); font-weight: 700; }
.tiles { display: flex; justify-content: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.tile { font-size: 34px; font-weight: 700; padding: 12px 22px; border-radius: 16px; background: linear-gradient(#fff, #f1f5f9); border: 3px solid #cbd5e1; box-shadow: 0 5px 0 #cbd5e1; min-width: 90px; }
.tile.used { opacity: 0.25; }
[hidden] { display: none !important; }
.qfeed { position: fixed; left: 0; right: 0; bottom: 0; transform: translateY(110%); transition: transform 0.3s; z-index: 20; padding: 0 12px 12px; }
.qfeed.show { transform: none; }
.fb-row { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; gap: 14px; border-radius: 26px; padding: 12px 18px; box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15); }
.qfeed.good .fb-row { background: #dcfce7; border: 3px solid #22c55e; }
.qfeed.bad .fb-row { background: #fff7ed; border: 3px solid #fb923c; }
.fb-mochi { width: 84px; flex: none; }
.fb-text { flex: 1; min-width: 0; }
.fb-title { font-size: 24px; font-weight: 700; }
.fb-ans { font-size: 22px; color: #15803d; margin: 4px 0; }
.fb-why .bi-p { font-size: 19px; }
.fb-why .bi-s { font-size: 15px; }
.fb-tap { font-size: 17px; color: #c2410c; font-weight: 700; margin-top: 4px; }
.next-btn { flex: none; }

/* ---------- results ---------- */
.result, .mockintro, .timeup { background: #fff; border-radius: 30px; padding: 26px; box-shadow: var(--shadow); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.res-art, .mi-art, .tu-art { width: 180px; }
.result h1, .mockintro h1, .timeup h1 { font-size: 32px; }
.result h1 .help { display: block; font-size: 18px; }
.res-stars { display: flex; gap: 8px; }
.rs { font-size: 60px; filter: grayscale(1) opacity(0.3); }
.rs.on { filter: none; animation: starin 0.6s both; }
.res-score { font-size: 30px; font-family: 'Fredoka'; font-weight: 700; }
.res-rewards { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.rw { background: #fef3c7; border-radius: 16px; padding: 8px 16px; font-size: 22px; font-family: 'Fredoka'; display: flex; flex-direction: column; align-items: center; }
.sticker-new { font-size: 50px; background: #fae8ff; animation: wiggle 0.6s 1s 2; }
.sticker-new small { font-size: 13px; }
.res-btns { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 460px; margin-top: 8px; }
.mock-review { width: 100%; max-width: 720px; text-align: left; background: #fff7ed; border-radius: 20px; padding: 12px 16px; }
.mr-row { border-bottom: 1px dashed #fdba74; padding: 8px 0; }
.mr-q { font-size: 18px; }
.mr-a { font-size: 16px; color: #9a3412; }
.mr-a b { color: #15803d; }
.rules { text-align: left; font-size: 19px; line-height: 1.8; }
.tu-score { font-size: 28px; font-family: 'Fredoka'; }

/* ---------- breaks ---------- */
.br-head { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, #fde68a, #fbcfe8); border-radius: 28px; padding: 14px 20px; box-shadow: var(--shadow); }
.br-art { width: 130px; }
.br-head h1 { font-size: 34px; }
.br-sub { font-size: 17px; margin: 4px 0 0; font-family: 'Fredoka'; }
.gamegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gamecard { border-radius: 24px; padding: 18px 10px; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2); position: relative; overflow: hidden; }
.gamecard .help { color: rgba(255, 255, 255, 0.85); }
.ge { font-size: 56px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3)); }
.gn { font-size: 21px; font-weight: 700; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.gb { position: absolute; top: 8px; right: 10px; font-size: 13px; background: rgba(0, 0, 0, 0.25); border-radius: 999px; padding: 2px 8px; font-family: 'Fredoka'; }
.gamecard.ext { background: #fff; color: var(--ink); padding: 0 0 10px; }
.gamecard.ext img { width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: top; margin-bottom: 6px; }
.gamecard.ext .gn { font-size: 17px; text-shadow: none; }
.gamecard.ext .help { color: var(--muted); }
.br-foot { text-align: center; margin-top: 22px; }
.gameview { position: fixed; inset: 0; display: flex; flex-direction: column; background: #0f172a; z-index: 30; }
.gbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #1e293b; color: #fff; flex-wrap: wrap; }
.gbar .btn.ghost { color: var(--ink); background: #fff; }
.gtitle { flex: 1; font-size: 18px; }
.timepill { background: #fff; color: var(--ink); border-radius: 999px; padding: 5px 14px; font-family: 'Fredoka'; font-size: 20px; }
.timepill.hurry { background: #fca5a5; animation: pulse 0.8s infinite; }
.gscore { font-family: 'Fredoka'; font-size: 20px; }
.gstage { flex: 1; position: relative; touch-action: none; }
.gstage canvas { display: block; touch-action: none; }
.gframe { flex: 1; border: 0; width: 100%; background: #fff; }

/* ---------- library / stickers ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; }
.tab { background: #fff; border-radius: 999px; padding: 8px 14px; white-space: nowrap; font-family: 'Fredoka'; font-size: 16px; border: 3px solid transparent; }
.tab.on { border-color: var(--c); background: #fff7ed; }
.unit { background: rgba(255, 255, 255, 0.7); border-radius: 26px; padding: 16px; margin-bottom: 14px; }
.unit h2 { font-size: 22px; margin-bottom: 10px; }
.unit.soon { border: 3px dashed #94a3b8; }
.soon-tag { display: inline-block; background: #e2e8f0; border-radius: 999px; padding: 4px 12px; font-family: 'Fredoka'; }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tcard { background: #fff; border-radius: 20px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 5px 0 #cbd5e1; border-top: 6px solid var(--wt, #38bdf8); text-align: center; }
.tcard img { width: 70px; height: 70px; object-fit: contain; }
.tcard b { font-size: 18px; line-height: 1.3; }
.tcard .help { font-size: 13px; }
.tstars i { font-style: normal; color: #e2e8f0; font-size: 20px; }
.tstars i.on { color: #facc15; }
.tbar { display: inline-block; width: 100%; max-width: 140px; height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; vertical-align: middle; }
.tbar i { display: block; height: 100%; background: #22c55e; }
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.sheet { background: #fff; border-radius: 28px; padding: 22px; width: min(480px, 100%); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.sh-art { width: 110px; margin: 0 auto; }
.gate-in { font-size: 30px; text-align: center; padding: 10px; border-radius: 14px; border: 3px solid #cbd5e1; font-family: 'Fredoka'; }
.gate-btns { display: flex; gap: 10px; justify-content: center; }
.stgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 12px; }
.stk { aspect-ratio: 1; background: #fff; border-radius: 22px; font-size: 52px; box-shadow: 0 5px 0 #cbd5e1; filter: grayscale(1); opacity: 0.4; }
.stk.have { filter: drop-shadow(0 0 0 #fff); opacity: 1; background: linear-gradient(135deg, #fff, #fdf4ff); }
.st-note { font-size: 18px; }
.toast { position: fixed; left: 50%; top: 20px; transform: translateX(-50%); background: #1e293b; color: #fff; padding: 12px 20px; border-radius: 16px; z-index: 99; text-align: center; transition: opacity 0.4s, transform 0.4s; font-size: 17px; }
.toast.out { opacity: 0; transform: translate(-50%, -20px); }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 90; }

/* ---------- parents ---------- */
body[data-screen='parents'] { background: #f1f5f9; }
.parents { font-family: 'Fredoka', var(--font); font-size: 16px; }
.ptop { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ptop h1 { flex: 1; font-size: 24px; }
.ptabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; }
.ptabs button { background: #fff; border-radius: 12px; padding: 8px 14px; white-space: nowrap; border: 2px solid #e2e8f0; font-size: 15px; }
.ptabs button.on { background: #1e293b; color: #fff; border-color: #1e293b; }
.pbody { background: #fff; border-radius: 20px; padding: 18px; }
.pbody h3 { margin: 18px 0 8px; font-size: 18px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pcard { display: flex; gap: 12px; align-items: center; background: #f8fafc; border-radius: 16px; padding: 12px; }
.pcard.hero { background: #fff7ed; }
.pcard .big { font-size: 32px; font-weight: 700; min-width: 64px; text-align: center; }
.pcard small { color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 16px; }
.barcol { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.barcol i { width: 100%; max-width: 30px; background: linear-gradient(#60a5fa, #3b82f6); border-radius: 6px 6px 0 0; min-height: 2px; }
.bv { font-size: 11px; color: var(--muted); }
.bl { font-size: 11px; color: var(--muted); }
.weak .wk { display: grid; grid-template-columns: 1fr 140px 44px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
.missing li { margin: 4px 0; }
.plan { display: grid; gap: 4px; }
.planrow { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 8px; border-radius: 10px; align-items: center; }
.planrow.today { background: #fff7ed; border: 2px solid #fdba74; }
.planrow.past { opacity: 0.7; }
.pm { display: flex; gap: 6px; flex-wrap: wrap; }
.pmi { background: #f1f5f9; border-radius: 8px; padding: 3px 8px; font-size: 14px; }
.pmi.done { background: #dcfce7; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable th { text-align: left; color: var(--muted); font-weight: 500; border-bottom: 2px solid #e2e8f0; padding: 6px; }
.ptable td { border-bottom: 1px solid #f1f5f9; padding: 6px; vertical-align: top; font-family: var(--font); }
.ptable tr.bad td { background: #fff7f7; }
.tag { background: #e0e7ff; border-radius: 6px; padding: 0 6px; font-size: 11px; }
.exday h4 { margin: 12px 0 6px; }
.exrow { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; padding: 6px 10px; border-left: 5px solid var(--c); background: #f8fafc; border-radius: 8px; margin-bottom: 4px; }
.notes { color: var(--muted); }
.srow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.srow.col { flex-direction: column; align-items: stretch; }
.srow input[type='checkbox'] { width: 26px; height: 26px; accent-color: var(--go); }
.srow select, .srow input:not([type='checkbox']) { font-size: 16px; padding: 6px 10px; border-radius: 10px; border: 2px solid #e2e8f0; font-family: inherit; }
.chk { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.warnbox { background: #fef3c7; border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  #app { padding: 10px 10px 60px; }
  .more { grid-template-columns: 1fr 1fr; }
  .choices { grid-template-columns: 1fr; }
  .sl-top { flex-direction: column; text-align: center; }
  .sl-art { width: 120px; }
  .bi-p { font-size: 22px; }
  .qprompt .bi-p { font-size: 23px; }
  .choice { font-size: 21px; min-height: 64px; }
  .gamegrid { grid-template-columns: 1fr 1fr; }
  .bins { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
  .fb-mochi { width: 56px; }
  .fb-title { font-size: 20px; }
  .fb-row { flex-wrap: wrap; }
  .next-btn { width: 100%; }
  .mc-art { width: 56px; height: 56px; }
  .mc-title { font-size: 19px; }
  .wc-w { font-size: 42px; }
  .num { width: 62px; height: 62px; font-size: 30px; }
  .sentence.big .tok { font-size: 26px; padding: 8px 12px; }
  .br-art { width: 86px; }
  .br-head h1 { font-size: 26px; }
  .planrow { grid-template-columns: 1fr; }
  /* phone: countdown sits above the map, and the map scrolls sideways (it starts at today) */
  .journey { display: flex; flex-direction: column-reverse; }
  .countdown { position: static; margin: 10px 10px 0; font-size: 16px; max-width: none; }
  .countdown b { font-size: 26px; }
  .jmap { height: 190px; min-width: 720px; }
}
