/* Zoupala styles. Font: Fredoka (SIL Open Font License, bundled in /fonts). */
@font-face {
  font-family: 'Fredoka';
  src: url('../fonts/Fredoka.woff2') format('woff2');
  font-weight: 300 700; font-stretch: 75% 125%; font-display: swap;
}
:root {
  --sun: #ffd23f; --sun-d: #f5b700;
  --sky: #4cc9f0; --sky-d: #1e7fb8;
  --coral: #ff6b6b; --coral-d: #c93545;
  --mint: #7bdcb5; --mint-d: #1f8a63;
  --grape: #9b5de5; --purple: #6b3fd4; --purple-d: #4b2aa0;
  --ink: #2b2340; --ink-2: #4a4266; --paper: #fffdf7;
  --ok: #1f9d55; --bad: #c93545;
  --r-lg: 28px; --r-md: 20px; --r-sm: 14px;
  --shadow: 0 6px 0 rgba(43, 35, 64, .12), 0 14px 30px rgba(43, 35, 64, .12);
  --tap: 64px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  font-family: 'Fredoka', 'Baloo 2', ui-rounded, 'Comic Sans MS', system-ui, sans-serif;
  font-size: 18px; line-height: 1.4; background: #d9f2ff;
  -webkit-tap-highlight-color: transparent;
}
#bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
#bg svg { width: 100%; height: 100%; display: block; }
.drift { animation: drift 60s linear infinite alternate; }
@keyframes drift { from { transform: translateX(-40px); } to { transform: translateX(60px); } }
.wrap { max-width: 1100px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 16px 120px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 10; font-weight: 600; }
.skip:focus { top: 12px; }
:focus-visible { outline: 4px solid var(--purple); outline-offset: 3px; border-radius: 14px; }
main:focus, h1:focus { outline: none; }
.loading { text-align: center; font-size: 1.4rem; padding: 80px 0; }
svg.ico { width: 1.3em; height: 1.3em; vertical-align: -0.25em; flex: none; }

/* ---------- Top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.6rem; letter-spacing: .3px; }
.brand svg { width: 48px; height: 52px; }
.brand .wm { color: var(--purple); letter-spacing: .5px; display: inline-flex; align-items: flex-start; transform: rotate(-3deg); text-shadow: 0 2px 0 #fff; }
.brand b { color: #c2410c; font-weight: 700; }
.brand .wm i { font-style: normal; color: var(--sun-d); font-size: .6em; margin-left: 2px; text-shadow: none; }
.chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; border: 3px solid #fff; box-shadow: 0 3px 0 rgba(43,35,64,.12); text-decoration: none; }
button.chip, a.chip { cursor: pointer; }
.chip-lang { background: var(--purple); color: #fff; border-color: var(--purple); min-width: 52px; justify-content: center; }
.chip-parents { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.pop { animation: pop .5s ease; }
@keyframes pop { 50% { transform: scale(1.25); } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 20px; border-radius: 999px; border: 0; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); background: #fff; box-shadow: 0 4px 0 rgba(43,35,64,.18); transition: transform .12s ease, box-shadow .12s ease; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(43,35,64,.18); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-big { min-height: var(--tap); font-size: 1.25rem; padding: 12px 28px; }
.btn-next, .btn-check { background: var(--purple); color: #fff; box-shadow: 0 5px 0 var(--purple-d); }
.btn-alt { background: var(--sun); color: #3b2a00; box-shadow: 0 5px 0 var(--sun-d); }
.btn-ghost { background: rgba(255,255,255,.85); }
.btn-round { width: 56px; height: 56px; padding: 0; font-size: 1.6rem; flex: none; }
.btn-tool { min-height: 50px; font-size: 1rem; background: #f1ecff; color: var(--purple-d); box-shadow: 0 3px 0 #d6cbff; }
.btn-fr { background: #e3ecff; color: #1d3a8a; box-shadow: 0 3px 0 #c3d4ff; }
.btn-hint { background: #fff4c7; color: #6a4b00; box-shadow: 0 3px 0 #f2dd88; }

/* ---------- Home / age ---------- */
.hero { text-align: center; padding-top: 8px; }
.guide { display: flex; align-items: flex-end; justify-content: center; gap: 8px; }
.guide .leo { width: 170px; height: 190px; flex: none; }
.bubble { position: relative; max-width: 420px; background: #fff; padding: 16px 20px; border-radius: 26px; font-size: 1.2rem; font-weight: 500; text-align: left; box-shadow: var(--shadow); margin: 0 0 70px; }
.bubble::before { content: ''; position: absolute; left: -14px; bottom: 22px; border: 12px solid transparent; border-right-color: #fff; border-left: 0; }
.mini-say { border: 0; background: #f1ecff; color: var(--purple-d); border-radius: 999px; width: 44px; height: 44px; cursor: pointer; vertical-align: middle; }
.title { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 700; margin: 6px 0 18px; color: var(--ink); text-shadow: 0 3px 0 #fff; }
.age-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 760px; margin: 0 auto; }
.age-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 18px 24px; border: 0; border-radius: var(--r-lg); font: inherit; color: var(--ink); cursor: pointer; box-shadow: var(--shadow); transition: transform .15s ease; position: relative; overflow: hidden; }
.age-card::after { content: ''; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.35); }
.age-3-5 { background: linear-gradient(160deg, #fff3a8, var(--sun) 70%); }
.age-6-8 { background: linear-gradient(160deg, #c9f3ff, var(--sky) 75%); }
.age-card:hover { transform: translateY(-4px) rotate(-1deg); }
.age-card.is-current { outline: 5px solid #fff; }
.age-emo { font-size: 3.6rem; line-height: 1; }
.age-num { font-size: 2.1rem; font-weight: 700; }
.age-name { font-size: 1.3rem; font-weight: 600; background: rgba(255,255,255,.8); padding: 2px 16px; border-radius: 999px; }
.age-desc { font-size: 1rem; color: var(--ink-2); font-weight: 500; }

/* ---------- World map ---------- */
.worlds-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.worlds-head .title { margin: 0 0 6px; }
.worlds-head .btn { margin-left: auto; }
.guide.small .leo { width: 96px; height: 106px; }
.eyebrow { margin: 0; font-weight: 600; color: var(--purple-d); text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.map { position: relative; margin-top: 14px; padding: 18px; border-radius: 36px; background: linear-gradient(180deg, rgba(123,220,181,.55), rgba(76,201,240,.45)); border: 4px dashed rgba(255,255,255,.9); }
.map-path { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.world-grid { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.world { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: #fff; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); border: 5px solid #fff; transition: transform .18s ease; }
.world:hover { transform: translateY(-5px) rotate(.6deg); }
.world-wrap:nth-child(even) .world:hover { transform: translateY(-5px) rotate(-.6deg); }
.world-art { position: relative; display: block; border-radius: 20px; overflow: hidden; aspect-ratio: 3 / 2; }
.world-art svg { display: block; width: 100%; height: 100%; }
.badge { position: absolute; right: 8px; top: 6px; font-size: 2rem; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.world-info { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px 14px; }
.world-name { font-size: 1.45rem; font-weight: 700; line-height: 1.1; }
.world-blurb { font-size: .95rem; color: var(--ink-2); }
.world-meta { font-size: .95rem; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.bar { display: block; height: 12px; border-radius: 999px; background: #eee8ff; overflow: hidden; margin-top: 4px; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--sun), var(--coral)); border-radius: 999px; }
.tone-sun .world-name { color: #8a5a00; } .tone-mint .world-name { color: #17714f; } .tone-sea .world-name { color: #155e8f; }
.tone-coral .world-name { color: #b02a3b; } .tone-grape .world-name { color: #5a2fb8; } .tone-night .world-name { color: #26357f; }
.tone-sun .world { border-color: #ffe789; } .tone-mint .world { border-color: #bdf0d9; } .tone-sea .world { border-color: #b8ecff; }
.tone-coral .world { border-color: #ffc6d0; } .tone-grape .world { border-color: #ddd0ff; } .tone-night .world { border-color: #c8cff5; }
.world.tone-sun { border-color: #ffe789; } .world.tone-mint { border-color: #bdf0d9; } .world.tone-sea { border-color: #b8ecff; }
.world.tone-coral { border-color: #ffc6d0; } .world.tone-grape { border-color: #ddd0ff; } .world.tone-night { border-color: #c8cff5; }
.world.tone-sun .world-name { color: #8a5a00; } .world.tone-mint .world-name { color: #17714f; } .world.tone-sea .world-name { color: #155e8f; }
.world.tone-coral .world-name { color: #b02a3b; } .world.tone-grape .world-name { color: #5a2fb8; } .world.tone-night .world-name { color: #26357f; }

/* ---------- Player ---------- */
.player-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.quest-track { flex: 1; min-width: 0; }
.nodes { list-style: none; display: flex; gap: 6px; padding: 6px 0 0; margin: 0; flex-wrap: wrap; }
.node { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.8); color: var(--ink-2); font-weight: 700; font-size: .95rem; border: 3px solid #fff; }
.node.ok { background: var(--sun); color: #6a4b00; }
.node.cur { background: var(--purple); color: #fff; transform: scale(1.15); box-shadow: 0 0 0 4px rgba(107,63,212,.25); }
.card { position: relative; display: grid; grid-template-columns: 150px 1fr; gap: 10px; background: var(--paper); border-radius: 34px; padding: 22px; box-shadow: var(--shadow); border: 6px solid #fff; }
.tone-sun .card { background: linear-gradient(180deg, #fffbe6, #fff); } .tone-mint .card { background: linear-gradient(180deg, #ecfbf3, #fff); }
.tone-sea .card { background: linear-gradient(180deg, #e8f8ff, #fff); } .tone-coral .card { background: linear-gradient(180deg, #fff0f2, #fff); }
.tone-grape .card { background: linear-gradient(180deg, #f3eeff, #fff); } .tone-night .card { background: linear-gradient(180deg, #edf0ff, #fff); }
.card-guide { align-self: start; position: sticky; top: 10px; }
.card-guide .leo { width: 150px; height: 168px; }
.instr { margin: 0 0 4px; color: var(--ink-2); font-weight: 500; font-size: 1.05rem; }
.prompt { font-size: clamp(1.5rem, 4.2vw, 2.15rem); font-weight: 600; margin: 0 0 10px; line-height: 1.3; }
.blank { display: inline-block; min-width: 2.4em; padding: 0 .3em; text-align: center; border-radius: 12px; background: #fff; border: 3px dashed var(--purple); color: var(--purple); }
.blank.filled { border-style: solid; background: #e9fff2; border-color: var(--ok); color: #146c3b; animation: pop .4s ease; }
.prompt-emoji { font-size: 2.8rem; line-height: 1.2; margin: 0 0 10px; letter-spacing: .1em; }
.prompt-pic-wrap { margin: 0 0 12px; }
.pic.prompt-pic { width: auto; max-width: 100%; height: 130px; display: block; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 12px; }
.hint-box { background: #fff4c7; border: 3px solid #f2dd88; border-radius: var(--r-md); padding: 12px 16px; margin: 0 0 14px; font-size: 1.1rem; animation: rise .3s ease; }

/* choices */
.choices { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.choices.tf { grid-template-columns: 1fr 1fr; }
.choice, .tile, .mt, .slot.filled {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 76px; padding: 12px 18px; width: 100%;
  border-radius: var(--r-md); border: 4px solid #e6defa; background: #fff; color: var(--ink);
  font: inherit; font-size: 1.3rem; font-weight: 600; text-align: left; cursor: pointer;
  box-shadow: 0 5px 0 #e0d7f7; transition: transform .12s ease, background .2s ease, border-color .2s ease;
}
.choice:hover:not([disabled]), .tile:hover:not([disabled]), .mt:hover:not([disabled]) { transform: translateY(-2px); border-color: var(--grape); }
.choice:active:not([disabled]), .tile:active:not([disabled]), .mt:active:not([disabled]) { transform: translateY(3px); box-shadow: 0 2px 0 #e0d7f7; }
.key { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #f1ecff; color: var(--purple-d); font-size: .95rem; }
.opt-emo { font-size: 1.9rem; line-height: 1; flex: none; }
.opt-art .pic { display: block; width: 52px; height: 52px; }
.opt-art .flag { width: 78px; height: 40px; }
.opt-text { flex: 1; }
.choice.right { background: #e3fbe9; border-color: var(--ok); box-shadow: 0 5px 0 #a8e6bd; animation: bounce .6s ease; }
.choice.wrong { background: #ffecee; border-color: #f2a0aa; color: #8a2232; box-shadow: none; opacity: .75; animation: shake .45s ease; cursor: default; }
.choice.wrong .opt-text { text-decoration: line-through; text-decoration-thickness: 3px; }
.choices.tf .choice { justify-content: center; font-size: 1.5rem; min-height: 96px; }
.choices.tf .opt-text { flex: none; }

/* ordering */
.slots { list-style: none; margin: 0 0 14px; padding: 12px; display: grid; gap: 10px; background: #f6f2ff; border-radius: var(--r-md); border: 3px dashed #cdbff5; }
.slot.empty { display: flex; align-items: center; min-height: 64px; padding: 0 18px; border-radius: var(--r-sm); background: rgba(255,255,255,.6); color: #8f84b3; font-weight: 700; font-size: 1.2rem; border: 3px dashed #d8cdfa; }
.slot.filled { min-height: 64px; }
.slot-n { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--purple); color: #fff; font-size: 1rem; }
.slot.filled.locked { background: #e3fbe9; border-color: var(--ok); box-shadow: 0 4px 0 #a8e6bd; cursor: default; opacity: 1; }
.slot.filled.locked .slot-n { background: var(--ok); }
.pool { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tile.used { visibility: hidden; }
.actions, .fb-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; align-items: center; }
.fb-actions.center { justify-content: center; }

/* matching */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.match .col { display: grid; gap: 12px; align-content: start; }
.mt { justify-content: flex-start; }
.mt-r { justify-content: flex-start; }
.mt.sel { border-color: var(--purple); background: #efe8ff; box-shadow: 0 0 0 5px rgba(107,63,212,.25), 0 5px 0 #cdbff5; transform: scale(1.03); }
.pair-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--pc); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--pc); }
.mt.paired { border-color: var(--pc); background: var(--pcb); box-shadow: 0 5px 0 var(--pc); }
.pc1 { --pc: #ff9f1c; --pcb: #fff3e0; } .pc2 { --pc: #3a86ff; --pcb: #e7f0ff; } .pc3 { --pc: #e5487a; --pcb: #ffe9f1; }
.pc4 { --pc: #1f9d55; --pcb: #e3fbe9; } .pc5 { --pc: #9b5de5; --pcb: #f1e9ff; }
.mt.locked { cursor: default; opacity: 1; }
.mt.locked::after { content: '✓'; margin-left: auto; color: var(--ok); font-weight: 700; font-size: 1.4rem; }

/* feedback */
.feedback { margin-top: 18px; border-radius: var(--r-lg); padding: 16px 20px; animation: rise .35s ease; }
.feedback.yay { background: linear-gradient(135deg, #e3fbe9, #fff7cc); border: 4px solid #8fdcaa; }
.feedback.reveal { background: #fff4c7; border: 4px solid #f2dd88; }
.feedback.oops { background: #fff0f2; border: 4px solid #ffc2ca; }
.fb-title { margin: 0; font-size: 1.6rem; font-weight: 700; }
.fb-stars { display: flex; gap: 6px; margin: 6px 0; }
.fb-star svg { width: 44px; height: 44px; filter: grayscale(1) opacity(.3); }
.fb-star.on svg { filter: none; animation: starIn .6s ease both; animation-delay: var(--d); }
.fb-expl { margin: 4px 0 0; font-size: 1.2rem; }

/* done */
.done { display: grid; place-items: center; padding-top: 10px; }
.done-card { text-align: center; background: #fff; border-radius: 40px; padding: 26px 22px; box-shadow: var(--shadow); max-width: 560px; width: 100%; border: 6px solid #fff3a8; }
.done-card .leo { width: 170px; height: 190px; }
.trophy { font-size: 4rem; animation: bounce 1.4s ease infinite; }
.done-msg { font-size: 1.3rem; margin: 0; }
.done-stars { font-size: 1.8rem; font-weight: 700; display: flex; justify-content: center; align-items: center; gap: 6px; }
.done-stars svg { width: 1.6em; height: 1.6em; }

/* animations */
.leo { overflow: visible; }
.leo-wave, .leo-cheer { animation: hop 1.6s ease-in-out infinite; transform-origin: 50% 100%; }
.leo-think { animation: sway 3s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes bounce { 0%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(-8px) scale(1.04); } 60% { transform: translateY(0) scale(.98); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.shake { animation: shake .45s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes starIn { 0% { transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.3) rotate(10deg); } 100% { transform: scale(1); } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.cf { position: absolute; top: -20px; width: 12px; height: 18px; background: var(--c); border-radius: 3px; animation: fall 2s cubic-bezier(.2,.6,.4,1) forwards; }
.cf.star { background: none; color: var(--c); font-size: 26px; width: auto; height: auto; font-style: normal; }
@keyframes fall { to { transform: translate(var(--x), 105vh) rotate(var(--r)); opacity: .9; } }

.dots { display: flex; gap: 8px; flex-wrap: wrap; }
.dots i { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--coral); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.foot { text-align: center; margin-top: 28px; font-size: 1rem; }
.foot a { color: #fff; background: var(--ink); padding: 10px 18px; border-radius: 999px; text-decoration: none; font-weight: 600; display: inline-block; min-height: 44px; }
.foot span { display: inline-block; background: rgba(255,255,255,.85); padding: 6px 12px; border-radius: 999px; margin: 6px 0; }

/* ---------- Parents page ---------- */
.page { background: #fff; border-radius: 34px; padding: 24px 26px; box-shadow: var(--shadow); max-width: 820px; margin: 0 auto; }
.page h1 { margin-top: 0; font-size: 2.2rem; }
.page h2 { color: var(--purple-d); margin: 26px 0 8px; font-size: 1.5rem; }
.page p, .page li { font-size: 1.1rem; }
.page li { margin: 6px 0; }
.page .lead { font-size: 1.25rem; }
.privacy-box { background: #e3fbe9; border: 4px solid #8fdcaa; border-radius: var(--r-md); padding: 14px 18px; }
.page .btn-danger { background: #ffecee; color: #8a2232; box-shadow: 0 4px 0 #f2a0aa; }
.page-head { display: flex; align-items: center; gap: 12px; }
.page-head .leo { width: 110px; height: 122px; flex: none; }
.page a:not(.btn):not(.chip) { color: var(--purple-d); }
.note { color: var(--ink-2); font-size: 1rem !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) { .world-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { padding-left: 12px; padding-right: 12px; }
  .brand { font-size: 1.3rem; } .brand svg { width: 40px; height: 44px; }
  .chip { padding: 6px 10px; min-height: 44px; }
  .chip-parents { display: none; }
  .guide { flex-direction: column; align-items: center; }
  .guide .leo { width: 130px; height: 146px; }
  .bubble { margin: 0 0 8px; text-align: center; font-size: 1.1rem; }
  .bubble::before { left: 50%; top: -12px; bottom: auto; transform: translateX(-50%); border: 12px solid transparent; border-bottom-color: #fff; border-top: 0; }
  .world-grid { gap: 12px; }
  .map { padding: 10px; border-radius: 26px; }
  .world-name { font-size: 1.1rem; } .world-blurb { display: none; }
  .world-info { padding: 8px 10px 10px; }
  .worlds-head .btn { margin-left: 0; }
  .card { grid-template-columns: 1fr; padding: 16px 14px; border-radius: 28px; }
  .card-guide { position: absolute; right: 8px; top: -40px; }
  .card-guide .leo { width: 76px; height: 86px; }
  .instr { padding-right: 70px; }
  .choices { grid-template-columns: 1fr; }
  .choices.tf { grid-template-columns: 1fr 1fr; }
  .pool { grid-template-columns: 1fr 1fr; }
  .match { gap: 10px; }
  .mt { font-size: 1.1rem; padding: 10px 10px; min-height: 68px; gap: 6px; }
  .mt .opt-emo { font-size: 1.5rem; }
  .btn-tool span { font-size: .95rem; }
  .node { width: 28px; height: 28px; font-size: .8rem; }
}
@media (max-width: 380px) { .chip-flame { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .drift, .leo-wave, .leo-cheer, .leo-think, .trophy { animation: none !important; }
}
@media (forced-colors: active) {
  .choice, .tile, .mt, .slot, .btn, .chip { border: 2px solid ButtonText; }
  .mt.sel { outline: 4px solid Highlight; }
}

/* ===== App bar + dropdown menu (pattern after IXL's mobile header; Zoupala's own colours) ===== */
.appbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px; margin: -12px -12px 14px; padding: 8px 12px; background: var(--purple); border-radius: 0 0 22px 22px; box-shadow: 0 4px 0 var(--purple-d), 0 10px 24px rgba(43,35,64,.18); }
.appbar .brand { flex: 0 0 auto; }
.appbar .wm { color: #fff; } .appbar .wm b { color: var(--sun); } .appbar .wm i { color: var(--sun); }
.bar-links { display: none; gap: 4px; margin-left: 8px; }
.bar-links a { color: #fff; font-weight: 700; text-decoration: none; padding: 10px 12px; border-radius: 999px; }
.bar-links a:hover, .bar-links a:focus-visible { background: var(--purple-d); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.appbar .chip { border-color: transparent; box-shadow: none; }
.icon-btn { width: 46px; height: 46px; display: inline-grid; place-items: center; border: 0; border-radius: 14px; background: rgba(255,255,255,.16); color: #fff; cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,.28); }
.icon-btn .ico { width: 26px; height: 26px; }
.icon-btn:focus-visible, .pill:focus-visible, .bar-links a:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--sun); color: var(--ink); font-weight: 800; text-decoration: none; box-shadow: 0 3px 0 var(--sun-d); white-space: nowrap; }
.menu { position: sticky; top: 64px; z-index: 39; margin: -10px -12px 14px; background: #fff; border-radius: 0 0 22px 22px; box-shadow: 0 16px 30px rgba(43,35,64,.2); padding: 10px 0 6px; }
.search { position: relative; margin: 4px 16px 6px; }
.search input { width: 100%; min-height: 54px; padding: 10px 14px 10px 46px; font: inherit; font-size: 1.1rem; border: 3px solid #ddd0ff; border-radius: 16px; color: var(--ink); background: #faf8ff; }
.search input:focus { outline: none; border-color: var(--purple); }
.search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--purple); width: 22px; height: 22px; }
.search-ico .ico { width: 22px; height: 22px; }
.search-results { list-style: none; margin: 0 16px; padding: 0; }
.search-results a { display: flex; flex-direction: column; padding: 10px 6px; color: var(--purple-d); text-decoration: none; border-bottom: 1px solid #ece8f5; }
.search-results small { color: var(--ink-2); }
.search-results .none { padding: 10px 6px; color: var(--ink-2); }
.menu-links { list-style: none; margin: 0; padding: 0; }
.menu-links li + li { border-top: 1px solid #ece8f5; }
.menu-links a { display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 0 22px; font-size: 1.3rem; font-weight: 700; color: #1e6fb8; text-decoration: none; }
.menu-links a:hover, .menu-links a:focus-visible { background: #f0f8ff; outline: none; }
@media (min-width: 900px) { .bar-links { display: flex; } .menu-btn { display: none; } .menu .menu-links { display: none; } }
@media (max-width: 640px) { .appbar .wm { display: none; } .pill { padding: 0 12px; } .appbar .chip-flame { display: none; } }
@media (max-width: 380px) { .appbar .chip-star { display: none; } }

/* ===== World page: banner, tabs, quest path (Khan Academy-style course map + mastery) ===== */
.world-banner { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: center; background: #fff; border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow); }
.wb-art svg { width: 100%; height: auto; border-radius: var(--r-md); }
.wb-info .title { margin: 2px 0 6px; }
.mastery-line { margin: 0 0 6px; }
.bar.big { height: 16px; }
.wb-meta { margin: 8px 0 0; font-weight: 700; color: var(--ink-2); }
.tabs { display: flex; gap: 8px; margin: 16px 0 8px; }
.tabs a { flex: 1; text-align: center; padding: 12px; border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 800; box-shadow: 0 3px 0 rgba(43,35,64,.12); }
.tabs a[aria-selected="true"] { background: var(--purple); color: #fff; box-shadow: 0 3px 0 var(--purple-d); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; padding: 0; margin: 10px 0; font-weight: 600; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.lv-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #b9b2cc; background: #fff; flex: 0 0 auto; vertical-align: middle; }
.lv-dot.lv-tried { background: #ffd8a8; border-color: #e8902a; }
.lv-dot.lv-familiar { background: #a6e3ff; border-color: var(--sky-d); }
.lv-dot.lv-mastered { background: var(--purple); border-color: var(--purple-d); }
.qpath { list-style: none; padding: 10px 0 0; margin: 0 auto; max-width: 520px; position: relative; }
.qpath::before { content: ""; position: absolute; left: 50%; top: 20px; bottom: 30px; border-left: 8px dotted rgba(107,63,212,.25); transform: translateX(-50%); }
.stone-wrap { position: relative; display: flex; margin: 6px 0; }
.stone-wrap.s0 { justify-content: center; } .stone-wrap.s1 { justify-content: flex-start; padding-left: 10%; }
.stone-wrap.s2 { justify-content: center; } .stone-wrap.s3 { justify-content: flex-end; padding-right: 10%; }
.stone { display: grid; justify-items: center; width: 150px; padding: 10px 8px 8px; border-radius: 26px; background: #fff; border: 4px solid #e2dcef; box-shadow: 0 5px 0 rgba(43,35,64,.14); text-decoration: none; color: var(--ink); }
.stone:hover { transform: translateY(-2px); }
.stone-n { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: #f1eef8; font-weight: 800; font-size: 1.3rem; }
.stone-stars { color: var(--sun-d); letter-spacing: 2px; margin-top: 2px; }
.stone-skill { font-size: .85rem; text-align: center; line-height: 1.15; color: var(--ink-2); }
.stone.lv-tried { border-color: #f4b26b; } .stone.lv-tried .stone-n { background: #ffe3c2; }
.stone.lv-familiar { border-color: #7cc8ee; } .stone.lv-familiar .stone-n { background: #cdeeff; }
.stone.lv-mastered { border-color: var(--purple); } .stone.lv-mastered .stone-n { background: var(--purple); color: #fff; }
.center { justify-content: center; margin-top: 18px; }
.empty .guide { display: flex; align-items: center; gap: 12px; max-width: 520px; margin: 10px auto; }
.empty .guide svg { width: 90px; height: 90px; flex: 0 0 auto; }
.head-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Grade view (pattern after IXL "view by grade") ===== */
.grade-note { color: var(--ink-2); font-weight: 600; }
.grade-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grade-grid.six { grid-template-columns: repeat(3, 1fr); }
.grade-card { background: #fff; border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow); border-top: 10px solid var(--sky); display: flex; flex-direction: column; }
.grade-card.band-3-5 { border-top-color: var(--mint); } .grade-card.band-6-8 { border-top-color: var(--coral); }
.grade-card.is-current { outline: 4px solid var(--sun); }
.grade-card header { display: flex; align-items: center; gap: 12px; }
.grade-card h2, .grade-card h3 { margin: 0; font-size: 1.2rem; } .grade-card header p { margin: 2px 0 0; color: var(--ink-2); font-weight: 600; }
.gc-badge { width: 54px; height: 54px; border-radius: 16px; display: inline-grid; place-items: center; font-weight: 800; font-size: 1.2rem; color: #fff; background: var(--sky-d); flex: 0 0 auto; }
.band-3-5 .gc-badge { background: var(--mint-d); } .band-6-8 .gc-badge { background: var(--coral-d); }
.gc-art { width: 72px; flex: 0 0 auto; } .gc-art svg { width: 100%; height: auto; border-radius: 12px; }
.gc-skills { list-style: none; padding: 0; margin: 10px 0; flex: 1; }
.gc-skills a { display: flex; align-items: center; gap: 8px; padding: 7px 2px; color: #1e6fb8; text-decoration: none; font-weight: 600; border-bottom: 1px solid #f0edf6; }
.gc-skills a:hover { text-decoration: underline; }
.gc-more { margin: 0 0 8px; color: var(--ink-2); }
.gc-go { align-self: flex-start; }
.band-block { margin: 18px 0 26px; }
.band-title { display: flex; align-items: center; gap: 12px; } .band-title small { color: var(--ink-2); font-size: 1rem; }
.grade-card.mini { border-top-width: 8px; }
.grade-card.mini.tone-sun { border-top-color: var(--sun); } .grade-card.mini.tone-mint { border-top-color: var(--mint); } .grade-card.mini.tone-sea { border-top-color: var(--sky); }
.grade-card.mini.tone-coral { border-top-color: var(--coral); } .grade-card.mini.tone-grape { border-top-color: var(--grape); } .grade-card.mini.tone-night { border-top-color: #4a5bd4; }
@media (max-width: 900px) { .grade-grid.six { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grade-grid, .grade-grid.six { grid-template-columns: 1fr; } .world-banner { grid-template-columns: 1fr; } .wb-art { max-width: 260px; } .stone { width: 130px; } }

/* ===== Leo's notebook: points, mastery, badges ===== */
.nb-head { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow); }
.nb-head > svg { width: 110px; height: 110px; flex: 0 0 auto; }
.nb-stats { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-weight: 600; }
.nb-stats li { display: inline-flex; align-items: center; gap: 4px; } .nb-stats svg { width: 22px; height: 22px; }
.nb-h { margin: 22px 0 4px; }
.nb-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.nb-row a { display: grid; grid-template-columns: 1.3fr 2fr auto auto; gap: 12px; align-items: center; background: #fff; border-radius: var(--r-md); padding: 12px 14px; text-decoration: none; color: var(--ink); box-shadow: 0 3px 0 rgba(43,35,64,.1); }
.nb-name { font-weight: 800; } .nb-pct { font-weight: 700; } .nb-lv { display: inline-flex; gap: 4px; align-items: center; color: var(--ink-2); }
.bdg-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.bdg { background: #f3f1f8; border-radius: var(--r-md); padding: 12px; text-align: center; display: grid; gap: 2px; color: var(--ink-2); }
.bdg.got { background: linear-gradient(180deg, #fff6cc, #fff); box-shadow: 0 3px 0 var(--sun-d); color: var(--ink); }
.bdg-emo { font-size: 2.2rem; } .bdg:not(.got) .bdg-emo { filter: grayscale(1); opacity: .6; }
@media (max-width: 640px) { .bdg-grid { grid-template-columns: repeat(2, 1fr); } .nb-row a { grid-template-columns: 1fr auto; } .nb-row .bar { grid-column: 1 / -1; grid-row: 2; } .nb-lv { display: none; } }

/* ===== Feedback extras ===== */
.fb-points { font-weight: 800; color: var(--purple-d); margin: 4px 0; }
.toast { display: inline-block; margin: 4px 0; padding: 8px 14px; border-radius: 999px; background: var(--sun); font-weight: 800; color: var(--ink); animation: pop .5s ease-out; }
.level-up { font-weight: 800; color: var(--purple-d); font-size: 1.15rem; }
.done-links a { font-weight: 700; color: #1e6fb8; }
.hint-extra { display: block; margin-top: 6px; font-weight: 700; }
.choice.hinted { opacity: .35; text-decoration: line-through; }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .stone:hover { transform: none; } }

/* ===== Worlds sub-panel (accordion, pattern after Education.com's Subjects menu) ===== */
.menu-sub { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 0 22px; font: inherit; font-size: 1.3rem; font-weight: 700; color: #1e6fb8; background: none; border: 0; cursor: pointer; text-align: left; }
.menu-sub .chev { margin-left: auto; font-size: 1.6rem; }
.sp-head { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 8px; border-bottom: 1px solid #ece8f5; }
.sp-head h2 { margin: 0; font-size: 1.35rem; }
.sp-icon { width: 46px; height: 46px; border: 0; border-radius: 12px; background: #f3f1f8; font-size: 1.3rem; cursor: pointer; color: var(--ink); }
.acc { list-style: none; margin: 0; padding: 0; }
.acc > li { border-bottom: 1px solid #ece8f5; }
.acc-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: 60px; padding: 0 22px; font: inherit; font-size: 1.2rem; font-weight: 700; background: none; border: 0; color: var(--ink); cursor: pointer; }
.acc-sign { font-size: 1.6rem; color: var(--purple); }
.acc-body { list-style: none; margin: 0; padding: 0 22px 10px 34px; }
.acc-body a, .acc-body .soon { display: block; padding: 9px 0; color: #1e6fb8; text-decoration: none; font-weight: 600; }
.acc-body .view-all { font-weight: 800; }
.soon, .acc-body .soon { color: #8a83a0; }
.browse-all { display: block; padding: 16px 22px; font-weight: 800; color: #1e6fb8; text-decoration: none; }
.menu-sub:focus-visible, .acc-btn:focus-visible, .sp-icon:focus-visible { outline: 3px solid var(--purple); outline-offset: -3px; }
@media (min-width: 900px) { .menu .menu-links[hidden] { display: none !important; } .menu .menu-links { display: block; } }

/* ===== Welcome modal ===== */
.modal-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(43,35,64,.55); }
.modal { width: min(440px, 100%); background: #fff; border-radius: 30px; padding: 20px 22px 24px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.3); animation: pop .5s ease-out; }
.w-cast { display: flex; justify-content: center; align-items: flex-end; gap: 6px; }
.w-cast svg { width: 130px; height: 130px; } .w-friend { font-size: 2.6rem; }
.modal h2 { margin: 6px 0; font-size: 2rem; color: var(--purple-d); }
.w-divider { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-weight: 700; }
.w-divider::before, .w-divider::after { content: ""; flex: 1; border-top: 2px solid #ece8f5; }
.modal .btn { width: 100%; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .modal { animation: none; } }

/* ===== Polish pass: search bar in header, full-screen sliding menu, seasonal, ladder ===== */
.menu-btn { display: inline-grid !important; }
.search-btn .sb-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (min-width: 640px) {
  .search-btn { width: auto; flex: 1 1 220px; max-width: 320px; justify-content: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 0 16px; background: #fff; color: var(--ink-2); border-radius: 999px; }
  .search-btn:hover { background: #fff; box-shadow: 0 0 0 3px var(--sun); }
  .search-btn .ico { color: var(--purple); width: 20px; height: 20px; }
  .search-btn .sb-text { position: static; width: auto; height: auto; clip: auto; font-weight: 600; }
  .bar-right { flex: 1; justify-content: flex-end; }
}
@media (max-width: 899px) {
  .menu { position: fixed; inset: 64px 0 0 0; margin: 0; border-radius: 0; overflow-y: auto; overscroll-behavior: contain; }
  body.menu-open { overflow: hidden; }
}
.menu-links .chev, .menu-sub .chev { margin-left: auto; font-size: 1.6rem; color: #9db7d6; }
.subpanel:not([hidden]) { animation: slideIn .25s ease-out; }
.menu-links:not([hidden]) { animation: slideBack .25s ease-out; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
@keyframes slideBack { from { transform: translateX(-30px); opacity: 0; } }
.seasonal { color: #a3430a !important; }
.ladder { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.ladder li { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: var(--r-md); padding: 10px; color: var(--ink-2); font-weight: 700; }
.ladder .gc-badge { background: #b9b2cc; width: 40px; height: 40px; border-radius: 12px; }
.season-hero { text-align: center; border-radius: var(--r-lg); padding: 22px; color: #fff; background: linear-gradient(160deg, #3a2a7a, #6b3fd4 60%, #ff8c42); box-shadow: var(--shadow); }
.season-hero .title { color: #fff; margin: 4px 0; } .sh-emo { font-size: 2.6rem; letter-spacing: 8px; }
.season-grid { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.season-card { display: grid; gap: 4px; justify-items: start; padding: 14px; border-radius: var(--r-lg); background: #fff; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border-top: 8px solid #ff8c42; }
.sc-emo { font-size: 2.4rem; } .season-card small { color: var(--ink-2); } .sc-stars { display: inline-flex; gap: 4px; align-items: center; font-weight: 800; } .sc-stars svg { width: 18px; height: 18px; }
@media (max-width: 900px) { .ladder { grid-template-columns: repeat(2, 1fr); } .season-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .season-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .subpanel:not([hidden]), .menu-links:not([hidden]) { animation: none; } }
.hero { background: linear-gradient(180deg, #ece4ff 0%, #f7f3ff 55%, rgba(255,255,255,0) 100%); border-radius: var(--r-lg); padding: 16px 12px 8px; }
.bar-links a { white-space: nowrap; }
@media (max-width: 1099px) { .bar-links { display: none !important; } }
.ladder li { flex-wrap: wrap; } .ladder li small { flex-basis: 100%; padding-left: 50px; margin-top: -8px; }

/* ===== Human touches: blink, who's playing, session card, stickers, together, grown-up guide ===== */
.leo-eyes { transform-box: fill-box; transform-origin: center; animation: blink 5.5s infinite; }
.leo-think .leo-eyes, .leo-cheer .leo-eyes { animation-delay: 2s; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.12); } }
.card-soft { background: rgba(255,255,255,.9); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow); }
.who { max-width: 640px; margin: 18px auto 6px; text-align: left; }
.who-set { border: 0; margin: 0; padding: 0; }
.who-set legend { font-weight: 800; font-size: 1.15rem; margin-bottom: 8px; }
.who-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.who-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; padding: 8px; font: inherit; font-weight: 800; border-radius: var(--r-md); border: 3px solid #e2dcef; background: #fff; color: var(--ink); cursor: pointer; }
.who-btn span { font-size: 1.6rem; }
.who-btn[aria-pressed="true"] { border-color: var(--purple); background: #f3eeff; box-shadow: 0 3px 0 var(--purple-d); }
.who-btn:focus-visible { outline: 3px solid var(--sun-d); outline-offset: 2px; }
.who-hint { margin: 8px 0 10px; color: var(--ink-2); font-weight: 600; }
.nick-row { display: grid; gap: 4px; }
.nick-row label { font-weight: 800; }
.nick-row input { min-height: 50px; padding: 8px 14px; font: inherit; font-size: 1.1rem; border-radius: 14px; border: 3px solid #ddd0ff; color: var(--ink); }
.nick-row input:focus { outline: none; border-color: var(--purple); }
.nick-row small { color: var(--ink-2); }
.session-card { margin: 12px auto; max-width: 420px; text-align: left; border-radius: 22px; padding: 14px 16px; background: linear-gradient(160deg, #fff8dc, #fff 60%); border: 3px dashed #f5c84b; }
.sc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 8px; font-weight: 800; color: var(--purple-d); }
.sc-head small { color: var(--ink-2); font-weight: 600; }
.sc-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.sc-stats li { background: #fff; border-radius: 16px; padding: 8px 4px; display: grid; justify-items: center; box-shadow: 0 2px 0 rgba(43,35,64,.08); }
.sc-stats svg { width: 24px; height: 24px; } .sc-emo { font-size: 1.3rem; } .sc-stats b { font-size: 1.4rem; } .sc-stats span:last-child { color: var(--ink-2); font-size: .9rem; }
.sc-stickers { margin: 8px 0 0; font-weight: 700; }
.stk-row { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.stk { display: inline-grid; place-items: center; width: 44px; height: 44px; font-size: 1.6rem; background: #fff; border-radius: 50%; box-shadow: 0 2px 0 rgba(43,35,64,.15), inset 0 0 0 3px #fff3c4; transform: rotate(-6deg); }
.stk:nth-child(even) { transform: rotate(5deg); }
.stk-book { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.stk-book .stk { width: 56px; height: 56px; font-size: 2rem; }
.sticker-toast .stk { width: 34px; height: 34px; font-size: 1.3rem; vertical-align: middle; }
.together { background: #eaf7ff; border-radius: 14px; padding: 8px 12px; margin: 6px 0; color: #134d73; }
.grownup { margin: 10px 0; background: #f6f4fb; border-radius: 14px; padding: 8px 12px; }
.grownup summary { cursor: pointer; font-weight: 800; color: var(--purple-d); min-height: 32px; }
.grownup p { margin: 6px 0; }
@media (max-width: 480px) { .who-btn { font-size: .95rem; } }
@media (prefers-reduced-motion: reduce) { .leo-eyes { animation: none; } }
.voice-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0 14px; }
.voice-row label { font-weight: 800; }
.voice-row select { min-height: 48px; max-width: 100%; padding: 6px 10px; font: inherit; border-radius: 12px; border: 3px solid #ddd0ff; background: #fff; color: var(--ink); }
.bar-links a[aria-current="page"] { background: var(--purple-d); box-shadow: inset 0 -3px 0 var(--sun); }
.menu-links a[aria-current="page"] { background: #f3eeff; }

/* ===== Education.com-inspired touches: grade tabs, format tags, sticky CTA, zig-zag dividers, dark footer ===== */
.grade-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 6px; margin: 4px 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.grade-tabs::-webkit-scrollbar { display: none; }
.grade-tabs a { flex: 0 0 auto; scroll-snap-align: start; padding: 10px 18px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 800; text-decoration: none; box-shadow: 0 3px 0 rgba(43,35,64,.12); white-space: nowrap; }
.grade-tabs a[aria-current="page"] { background: #ff8c42; color: #2b1400; box-shadow: 0 3px 0 #c45f1c; }
.season-feed { list-style: none; padding: 0; margin: 8px 0 20px; display: grid; gap: 12px; max-width: 640px; }
.season-feed .season-card { grid-template-columns: auto 1fr auto; display: grid; align-items: center; gap: 14px; }
.sc-body { display: grid; gap: 3px; justify-items: start; }
.fmt-tag { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: #f1eef8; color: var(--ink-2); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.sc-body .fmt-tag { margin-left: 0; }
.season-hero { background: radial-gradient(circle at 85% 20%, #ff8c42 0 60px, transparent 61px), linear-gradient(160deg, #1d1650, #3a2a7a 55%, #6b3fd4); }
.sticky-cta { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 30; transform: translate(-50%, 140%); padding: 14px 26px; border-radius: 999px; background: var(--sun); color: var(--ink); font-weight: 800; text-decoration: none; box-shadow: 0 4px 0 var(--sun-d), 0 10px 24px rgba(43,35,64,.25); transition: transform .3s ease; white-space: nowrap; }
.sticky-cta.show { transform: translate(-50%, 0); }
.zigzag { height: 18px; margin: 18px 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18' viewBox='0 0 36 18'%3E%3Cpath d='M0 14 L9 4 L18 14 L27 4 L36 14' fill='none' stroke='%239b5de5' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") repeat-x center; opacity: .7; }
.foot.dark { margin: 36px -12px -12px; padding: 0 0 22px; background: #241c3f; color: #e9e4f7; text-align: center; border-radius: 26px 26px 0 0; position: relative; }
.foot.dark::before { content: ""; display: block; height: 16px; margin-top: -15px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16' viewBox='0 0 32 16'%3E%3Cpath d='M0 16 L8 4 L16 16 L24 4 L32 16 Z' fill='%23241c3f'/%3E%3C/svg%3E") repeat-x bottom; }
.foot-in { padding: 16px 16px 0; display: grid; gap: 6px; justify-items: center; }
.foot.dark a { background: var(--sun); color: var(--ink); }
.foot.dark p { margin: 0; } .foot.dark .copy { color: #b9b0d6; font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .sticky-cta { transition: none; } }
html, body { overflow-x: clip; } .player, .guide { overflow-x: clip; overflow-y: visible; }
@media (max-width: 640px) { .appbar .wm { display: inline !important; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.appbar .bar-links a, .appbar .bar-links a:visited { color: #fff; }
.menu .menu-links a, .menu .menu-links a:visited, .menu-sub { color: #1e6fb8; }
