:root {
  --white: #ffffff;
  --bg: #fffafd;
  --pink: #ff5fa2;
  --pink-dark: #e0437f;
  --pink-soft: #ffe3f0;
  --pink-faint: #fff2f8;
  --purple: #8b5cf6;
  --purple-dark: #6d3fd8;
  --purple-soft: #ede5ff;
  --purple-faint: #f7f3ff;
  --ink: #3b2a55;
  --muted: #8a7a9e;
  --gold: #ffc83d;
  --yellow: #ffd23f;
  --yellow-soft: #fff4c2;
  --yellow-faint: #fffbea;
  --teal: #14b8a6;
  --teal-dark: #0f8f82;
  --teal-soft: #ccf5ee;
  --teal-faint: #effcf9;
  --line: #f1e4f3;
  --radius: 22px;
  --shadow: 0 6px 0 rgba(139, 92, 246, 0.12), 0 10px 30px rgba(255, 95, 162, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Fredoka", "Comic Sans MS", "Chalkboard SE", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.45;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 8px; }
h1 { font-size: 2rem; color: var(--purple-dark); }
h2 { font-size: 1.45rem; color: var(--purple-dark); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 10px; }
a { color: var(--purple-dark); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
code { background: var(--purple-faint); padding: 1px 6px; border-radius: 6px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 20px;
  background: var(--white);
  border-bottom: 3px solid var(--pink-soft);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.3rem; color: var(--purple-dark); }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(135deg, var(--pink), var(--purple)); color: var(--white); font-size: 1.7rem; font-weight: 700;
}
.counters { display: flex; gap: 8px; }
.pill-dots { background: var(--purple-faint); font-size: 1.5rem; font-weight: 700; line-height: 1; padding: 6px 12px; }
.pill-dots:hover { background: var(--purple-soft); }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; line-height: 1; }
.brand-mark.avatar { border-radius: 50%; font-size: 1.6rem; color: inherit; }
.avatar-big { width: 84px; height: 84px; font-size: 3rem; background: var(--purple-faint); border: 4px solid var(--white); box-shadow: var(--glow-teal); flex: none; }
.me-card { display: flex; align-items: center; gap: 18px; }
.me-card h2 { margin: 0; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.avatar-pick { width: 64px; height: 64px; font-size: 2.1rem; border: 3px solid transparent; cursor: pointer; padding: 0; }
.avatar-pick:hover { transform: scale(1.08); }
.avatar-pick.chosen { border-color: var(--pink); box-shadow: var(--glow-pink); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  font-size: 1.1rem; text-decoration: none; color: var(--ink);
}
.pill-coins { background: #fff6d6; }
.pill-streak { background: var(--pink-soft); }
.pill-chest { background: var(--purple-soft); }

.tabs {
  display: flex; gap: 6px; justify-content: center; padding: 10px 12px 0;
  background: var(--white); border-bottom: 3px solid var(--pink-soft);
}
.tabs a {
  padding: 10px 20px; border-radius: 16px 16px 0 0; text-decoration: none; font-weight: 600;
  color: var(--muted); font-size: 1.1rem;
}
.tabs a.on { background: var(--pink-soft); color: var(--pink-dark); }

.wrap { max-width: 1000px; margin: 0 auto; padding: 24px 16px 40px; }
.foot { display: flex; justify-content: center; gap: 20px; padding: 20px; font-size: 0.9rem; }
.version { position: relative; z-index: 1; margin: 0; padding: 0 16px 16px; text-align: center; font-size: 0.75rem; color: var(--muted); }
.foot a { color: var(--muted); }
.version a { color: var(--muted); }
.privacy-page { max-width: 760px; margin: 0 auto; padding: 28px 18px 40px; position: relative; z-index: 1; }
.privacy-page h1 { margin-bottom: 4px; }
.privacy-page h2 { margin: 26px 0 8px; font-size: 1.25rem; }
.privacy-page li { margin: 6px 0; }
.privacy-page .step { margin-top: 18px; }
.donate { position: relative; z-index: 1; margin: 0; padding: 0 16px 10px; text-align: center; font-size: 1.1rem; color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 16px; padding: 12px 20px; min-height: 48px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--pink); color: var(--white);
  box-shadow: 0 4px 0 var(--pink-dark);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--pink-dark); }
.btn-soft { background: var(--purple-soft); color: var(--purple-dark); box-shadow: 0 4px 0 #d6c8fb; }
.btn-soft:active { box-shadow: 0 1px 0 #d6c8fb; }
.btn-big { font-size: 1.35rem; padding: 16px 30px; min-height: 60px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.link-btn { background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; padding: 0; }
.back { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 600; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #fff6d6; font-size: 0.85rem; font-weight: 600; color: #8a6400; }
.tag-wait { background: var(--purple-soft); color: var(--purple-dark); }

/* ---------- home ---------- */
.hero {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center;
  padding: 28px; border-radius: 30px; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--pink-faint), var(--purple-faint));
  border: 3px solid var(--pink-soft);
}
.hero h1 { font-size: 2.3rem; }
.hero-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat {
  background: var(--white); border-radius: 18px; padding: 12px 18px; min-width: 120px;
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
}
.stat b { font-size: 1.8rem; color: var(--pink-dark); }
.stat span { font-size: 0.85rem; color: var(--muted); }
.stat-link { border: 2px dashed var(--pink); }

.how { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center; margin: 0 0 22px; color: var(--muted); font-size: 0.95rem; }
.how-step { background: var(--white); border: 2px solid var(--purple-soft); border-radius: 999px; padding: 4px 12px; color: var(--purple-dark); font-weight: 600; }

.stage { margin-bottom: 26px; }
.stage-emoji { font-size: 1.6rem; }
.island-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; margin-top: 10px; }
.island {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 18px 10px; border-radius: var(--radius); text-decoration: none; color: var(--ink);
  background: var(--white); border: 3px solid var(--purple-soft); box-shadow: var(--shadow);
  transition: transform .15s;
}
a.island:hover { transform: translateY(-4px) rotate(-1deg); }
.island-num { font-size: 2rem; font-weight: 700; color: var(--purple-dark); }
.island-stars { font-size: 1.1rem; letter-spacing: 2px; }
.star-empty { color: #d9cdea; }
.island-sticker { position: absolute; top: -12px; right: -8px; font-size: 1.8rem; }
.island-next { border-color: var(--pink); background: var(--pink-faint); animation: glow 1.8s ease-in-out infinite; }
.island-done { border-color: var(--gold); }
.island-flag { position: absolute; bottom: -12px; background: var(--pink); color: var(--white); font-size: 0.75rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.island-locked { opacity: .5; box-shadow: none; background: #faf7fc; }
@keyframes glow { 50% { box-shadow: 0 0 0 8px rgba(255, 95, 162, 0.18); } }

/* ---------- table page ---------- */
.table-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.big-badge {
  display: grid; place-items: center; width: 120px; height: 120px; border-radius: 36px;
  background: linear-gradient(135deg, var(--pink), var(--purple)); color: var(--white);
  font-size: 2.8rem; font-weight: 700; box-shadow: var(--shadow);
}
.star-track { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.star-step {
  display: flex; flex-direction: column; align-items: center; text-align: center; width: 120px;
  padding: 10px; border-radius: 18px; background: var(--white); border: 2px dashed var(--purple-soft);
}
.star-step.got { border: 2px solid var(--gold); background: #fffbea; }
.star-step small { font-size: 0.72rem; color: var(--muted); line-height: 1.2; }
.star-icon { font-size: 1.8rem; }

.trick {
  display: flex; gap: 14px; align-items: center; padding: 16px 20px; margin-bottom: 18px;
  background: #fffbea; border: 3px solid #ffe9a3; border-radius: var(--radius);
}
.trick p { margin: 0; }
.trick-icon { font-size: 2rem; }
.trick div { flex: 1; }

.step {
  background: var(--white); border-radius: 28px; padding: 22px; margin-bottom: 20px;
  border: 3px solid var(--line); box-shadow: var(--shadow);
}
.step-alert { border-color: var(--pink); }
.step-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.step-num {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--purple); color: var(--white); font-weight: 700; font-size: 1.3rem;
}
.step-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }

.seg { display: inline-flex; background: var(--purple-faint); border-radius: 16px; padding: 4px; }
.seg button { border: 0; background: none; font: inherit; padding: 8px 14px; border-radius: 12px; cursor: pointer; color: var(--muted); font-weight: 600; }
.seg button.on { background: var(--white); color: var(--purple-dark); box-shadow: 0 2px 6px rgba(139, 92, 246, .15); }

.fact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; align-content: start; }
.fact {
  font: inherit; font-size: 1.2rem; text-align: left; padding: 10px 14px; border-radius: 14px; cursor: pointer;
  background: var(--purple-faint); border: 2px solid transparent; color: var(--ink);
}
.fact:hover { border-color: var(--purple-soft); }
.fact.active { background: var(--pink-soft); border-color: var(--pink); }
.fact .ans { color: var(--pink-dark); }
.covered .fact .ans { color: transparent; background: var(--purple-soft); border-radius: 8px; padding: 0 6px; }
.covered .fact.peek .ans { color: var(--pink-dark); background: none; }

.picture {
  min-height: 240px; border-radius: 20px; background: var(--pink-faint); padding: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  position: sticky; top: 12px; align-self: start;
}
.picture .pic-title { font-size: 1.7rem; font-weight: 700; color: var(--purple-dark); }
.dots { display: flex; flex-direction: column; gap: 4px; margin: 12px 0; }
.dot-row { display: flex; gap: 4px; align-items: center; }
.dot { width: var(--d, 14px); height: var(--d, 14px); border-radius: 50%; background: var(--pink); }
.dot.ten { background: var(--purple); }
.dot-row .row-label { font-size: 0.75rem; color: var(--muted); margin-left: 6px; min-width: 24px; }

.voice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.voice-card { padding: 16px; border-radius: 20px; background: var(--purple-faint); }
.voice-card audio, .my-recordings audio { width: 100%; margin-top: 8px; }
.recorder { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rec-btn {
  font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: 12px 20px; cursor: pointer;
  background: var(--pink); color: var(--white); min-height: 48px;
}
.rec-btn.small { padding: 6px 12px; min-height: 36px; font-size: 0.9rem; }
.rec-btn.recording { background: #e23d6d; animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(226, 61, 109, .2); } }

/* skip-count train */
.train { display: flex; flex-wrap: wrap; gap: 8px 4px; align-items: flex-end; padding: 10px 0; }
.engine { font-size: 2.6rem; line-height: 1; }
.carriage {
  position: relative; min-width: 64px; height: 56px; padding: 0 8px; border-radius: 12px 12px 6px 6px;
  display: grid; place-items: center; font-size: 1.35rem; font-weight: 700; font: inherit; font-weight: 700;
  background: var(--purple-soft); color: var(--purple-dark); border: 3px solid var(--purple); cursor: default;
}
.carriage::after { content: "● ●"; position: absolute; bottom: -14px; font-size: 0.7rem; color: var(--ink); letter-spacing: 12px; }
.carriage.blank { background: var(--white); border-style: dashed; border-color: var(--pink); color: var(--pink); cursor: pointer; }
.carriage.selected { background: var(--pink-soft); animation: glow 1.2s infinite; }
.carriage.filled { background: var(--pink-soft); border-color: var(--pink); color: var(--pink-dark); }
.choices { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 10px; min-height: 60px; }
.choice {
  font: inherit; font-size: 1.6rem; font-weight: 700; min-width: 90px; min-height: 60px; border-radius: 18px; cursor: pointer;
  background: var(--white); color: var(--purple-dark); border: 3px solid var(--purple-soft);
}
.choice:hover { border-color: var(--purple); }
.choice.nope { opacity: .35; }

.game-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.game-card {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 18px; border-radius: 22px;
  text-decoration: none; color: var(--ink); background: var(--pink-faint); border: 3px solid var(--pink-soft);
  transition: transform .15s;
}
.game-card:hover { transform: translateY(-4px); border-color: var(--pink); }
.game-card b { font-size: 1.25rem; color: var(--purple-dark); }
.game-card small { color: var(--muted); flex: 1; }
.game-emoji { font-size: 2.4rem; }

/* ---------- games ---------- */
.play { text-align: center; }
.play-intro { margin: 30px auto; max-width: 520px; padding: 26px; border-radius: 28px; background: var(--white); border: 3px solid var(--line); box-shadow: var(--shadow); }
.play-intro p { font-size: 1.2rem; }
.hud { display: flex; justify-content: center; gap: 12px; margin: 10px 0 18px; flex-wrap: wrap; }
.hud .pill { background: var(--purple-faint); font-weight: 600; }
.progress-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; }
.progress-dots span { width: 18px; height: 18px; border-radius: 50%; background: var(--purple-soft); }
.progress-dots span.ok { background: var(--pink); }
.progress-dots span.miss { background: #c9b8f0; }
.progress-dots span.now { outline: 3px solid var(--purple); }

.question {
  display: inline-block; font-size: 3.4rem; font-weight: 700; color: var(--purple-dark);
  padding: 16px 34px; border-radius: 28px; background: var(--white); border: 3px solid var(--purple-soft); box-shadow: var(--shadow);
}
.say-btn { vertical-align: middle; margin-left: 10px; }
.bubbles { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin: 30px 0; }
.bubble {
  width: 130px; height: 130px; border-radius: 50%; font: inherit; font-size: 2.2rem; font-weight: 700; cursor: pointer;
  border: 0; color: var(--purple-dark);
  background: radial-gradient(circle at 30% 30%, #ffffff 0 18%, var(--pink-soft) 45%, #f2c4ff 100%);
  box-shadow: inset -6px -8px 16px rgba(139, 92, 246, .25), 0 8px 20px rgba(255, 95, 162, .2);
  animation: float 3s ease-in-out infinite;
}
.bubble:nth-child(2) { animation-delay: -1s; }
.bubble:nth-child(3) { animation-delay: -2s; }
.bubble.pop { animation: pop .35s forwards; }
.bubble.wrong { opacity: .35; animation: none; }
.bubble.right { background: radial-gradient(circle at 30% 30%, #fff 0 18%, #ffd6e8 45%, var(--pink) 100%); color: var(--white); }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes pop { to { transform: scale(1.4); opacity: 0; } }

.feedback { min-height: 40px; font-size: 1.35rem; font-weight: 600; }
.feedback.good { color: var(--pink-dark); }
.feedback.gentle { color: var(--purple-dark); }

.timer { height: 18px; border-radius: 999px; background: var(--purple-soft); overflow: hidden; max-width: 520px; margin: 0 auto 16px; }
.timer span { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--purple)); transition: width 1s linear; }
.answer-box {
  display: inline-block; min-width: 160px; font-size: 2.6rem; font-weight: 700; padding: 6px 20px; margin: 16px 0;
  border-radius: 20px; border: 3px dashed var(--pink); color: var(--pink-dark); min-height: 72px;
}
.numpad { display: grid; grid-template-columns: repeat(3, 84px); gap: 10px; justify-content: center; }
.numpad button {
  font: inherit; font-size: 1.8rem; font-weight: 700; height: 70px; border-radius: 18px; cursor: pointer;
  border: 0; background: var(--purple-faint); color: var(--purple-dark); box-shadow: 0 4px 0 var(--purple-soft);
}
.numpad button:active { transform: translateY(3px); box-shadow: none; }
.numpad .go { background: var(--pink); color: var(--white); box-shadow: 0 4px 0 var(--pink-dark); }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 620px; margin: 10px auto; perspective: 800px; }
.card {
  height: 110px; border: 0; padding: 0; background: none; cursor: pointer; font: inherit;
  position: relative; transform-style: preserve-3d; transition: transform .4s;
}
.card.flip, .card.matched { transform: rotateY(180deg); }
.card .face {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 18px; backface-visibility: hidden;
  font-size: 1.5rem; font-weight: 700;
}
.card .front { background: linear-gradient(135deg, var(--pink), var(--purple)); color: var(--white); font-size: 2rem; }
.card .back { background: var(--white); border: 3px solid var(--purple-soft); color: var(--purple-dark); transform: rotateY(180deg); }
.card.matched .back { border-color: var(--pink); background: var(--pink-faint); }

.result { margin: 20px auto; max-width: 520px; padding: 26px; border-radius: 28px; background: var(--white); border: 3px solid var(--pink-soft); box-shadow: var(--shadow); }
.result .score { font-size: 3rem; font-weight: 700; color: var(--pink-dark); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(59, 42, 85, .35); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card {
  background: var(--white); border-radius: 30px; padding: 28px; max-width: 420px; width: 100%; text-align: center;
  border: 4px solid var(--pink-soft); animation: bounce-in .4s;
}
.modal-card .big { font-size: 4rem; line-height: 1.1; }
.modal-card .line { font-size: 1.2rem; margin: 6px 0; }
@keyframes bounce-in { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.05); } 100% { transform: scale(1); opacity: 1; } }

.confetti { position: fixed; top: -40px; font-size: 1.8rem; pointer-events: none; z-index: 60; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

/* ---------- revise / rewards ---------- */
.revise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--purple-faint); font-weight: 600; color: var(--purple-dark); }

.chest-box { display: flex; gap: 22px; align-items: center; background: linear-gradient(135deg, #fffbea, var(--pink-faint)); }
.chest-box > div:last-child { flex: 1; }
.chest-art { font-size: 5rem; }
.wiggle { animation: wiggle 1.4s ease-in-out infinite; display: inline-block; }
@keyframes wiggle { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-10deg); } 80% { transform: rotate(10deg); } 90% { transform: rotate(-6deg); } }
.meter { height: 20px; border-radius: 999px; background: var(--white); border: 2px solid var(--pink-soft); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--pink)); }

.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin: 12px 0; }
.prize {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px;
  border-radius: 22px; background: var(--purple-faint); border: 3px solid transparent; opacity: .75;
}
.prize.can { background: var(--pink-faint); border-color: var(--pink); opacity: 1; }
.prize-emoji { font-size: 2.6rem; }
.price { font-weight: 700; color: #8a6400; background: #fff6d6; padding: 2px 12px; border-radius: 999px; }

.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.trophy { text-align: center; padding: 14px 8px; border-radius: 20px; background: #faf7fc; display: flex; flex-direction: column; gap: 2px; opacity: .6; }
.trophy.got { background: #fffbea; border: 2px solid var(--gold); opacity: 1; }
.trophy small { color: var(--muted); font-size: 0.75rem; line-height: 1.2; }
.trophy-emoji { font-size: 2.2rem; }

.stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.sticker { display: flex; flex-direction: column; align-items: center; padding: 10px; border-radius: 50%; aspect-ratio: 1; justify-content: center; border: 3px dashed var(--purple-soft); color: var(--muted); }
.sticker span { font-size: 2rem; }
.sticker.got { border: 3px solid var(--pink); background: var(--pink-faint); color: var(--ink); }

.claims { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.claims li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-radius: 14px; background: var(--purple-faint); }

/* ---------- grown-ups ---------- */
.gate { max-width: 460px; margin: 30px auto; text-align: center; }
.gate-form { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.gate-q { font-size: 1.8rem; font-weight: 700; }
input, select { font: inherit; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--purple-soft); background: var(--white); color: var(--ink); min-height: 46px; }
input:focus, select:focus { outline: 3px solid var(--pink-soft); border-color: var(--pink); }
.gate input { width: 130px; font-size: 1.4rem; }
.oops { color: var(--pink-dark); margin-top: 10px; }
.helper-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.inline { display: inline-flex; gap: 8px; align-items: center; margin: 0; flex-wrap: wrap; }
.bonus { margin-top: 14px; }
.year-switch { margin-top: 12px; }
.year-switch label { font-weight: 600; }
.plan { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; font-size: 1rem; }
.plan ol, .plan ul { padding-left: 20px; margin: 0 0 10px; }
.plan li { margin-bottom: 8px; }
.routine { border-collapse: collapse; width: 100%; margin-bottom: 8px; }
.routine td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.routine td:first-child { font-weight: 700; color: var(--pink-dark); white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.progress-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.progress-table th, .progress-table td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; }
.progress-table th { color: var(--muted); font-weight: 500; }
.progress-table tr.locked { color: var(--muted); }
.progress-table audio { height: 36px; max-width: 220px; }
.rec-item { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.rec-item audio { height: 36px; }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.form-row input[name=title] { flex: 1; min-width: 200px; }
.form-row input[name=cost] { width: 110px; }
.settings { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.settings label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.settings label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; }
.settings input[type=checkbox] { width: 22px; height: 22px; min-height: 0; }
.activity { padding-left: 18px; font-size: 1rem; }

/* ---------- yellow & teal accents ---------- */
.topbar { border-bottom-color: var(--yellow-soft); }
.pill-coins { background: var(--yellow-soft); }
.pill-streak { background: var(--teal-soft); color: var(--teal-dark); }
.tabs a:nth-child(2).on { background: var(--teal-soft); color: var(--teal-dark); }
.tabs a:nth-child(3).on { background: var(--yellow-soft); color: #8a6400; }
.hero { background: linear-gradient(135deg, var(--pink-faint), var(--yellow-faint) 50%, var(--teal-faint)); }
.stat:nth-child(2) b { color: var(--teal-dark); }
.stat:nth-child(3) b { color: var(--purple-dark); }
.how-step:nth-of-type(2) { border-color: var(--teal-soft); color: var(--teal-dark); }
.how-step:nth-of-type(3) { border-color: var(--yellow-soft); color: #8a6400; }
.stage:nth-of-type(2n) .island { border-color: var(--teal-soft); }
.stage:nth-of-type(2n) .island-num { color: var(--teal-dark); }
.stage:nth-of-type(3n) .island { border-color: var(--yellow-soft); }
.step:nth-of-type(2) .step-num { background: var(--teal); }
.step:nth-of-type(3) .step-num { background: var(--pink); }
.step:nth-of-type(4) .step-num { background: var(--yellow); color: var(--ink); }
.btn-teal { background: var(--teal); box-shadow: 0 4px 0 var(--teal-dark); }
.btn-teal:active { box-shadow: 0 1px 0 var(--teal-dark); }
.voice-card:last-child { background: var(--teal-faint); }
.carriage:nth-child(3n) { background: var(--teal-soft); border-color: var(--teal); color: var(--teal-dark); }
.carriage:nth-child(3n+1) { background: var(--yellow-soft); border-color: var(--gold); color: #8a6400; }
.carriage.blank { background: var(--white); border-color: var(--pink); color: var(--pink); }
.carriage.filled { background: var(--pink-soft); border-color: var(--pink); color: var(--pink-dark); }
.choice:nth-child(2) { border-color: var(--teal-soft); color: var(--teal-dark); }
.choice:nth-child(3) { border-color: var(--yellow-soft); color: #8a6400; }
.game-card:nth-child(2) { background: var(--teal-faint); border-color: var(--teal-soft); }
.game-card:nth-child(2):hover { border-color: var(--teal); }
.game-card:nth-child(3) { background: var(--yellow-faint); border-color: var(--yellow-soft); }
.game-card:nth-child(3):hover { border-color: var(--gold); }
.bubble:nth-child(2) { background: radial-gradient(circle at 30% 30%, #fff 0 18%, var(--teal-soft) 45%, #8ee6d8 100%); color: var(--teal-dark); }
.bubble:nth-child(3) { background: radial-gradient(circle at 30% 30%, #fff 0 18%, var(--yellow-soft) 45%, var(--yellow) 100%); color: #7a5600; }
.bubble.right { background: radial-gradient(circle at 30% 30%, #fff 0 18%, #ffd6e8 45%, var(--pink) 100%); color: var(--white); }
.progress-dots span.ok { background: var(--teal); }
.numpad .go { background: var(--teal); box-shadow: 0 4px 0 var(--teal-dark); }
.timer span { background: linear-gradient(90deg, var(--teal), var(--yellow), var(--pink)); }
.chip:nth-child(3n+2) { background: var(--teal-faint); color: var(--teal-dark); }
.chip:nth-child(3n) { background: var(--yellow-faint); color: #8a6400; }
.chest-box { background: linear-gradient(135deg, var(--yellow-faint), var(--teal-faint)); border-color: var(--yellow-soft); }
.picture { background: linear-gradient(160deg, var(--pink-faint), var(--teal-faint)); }
.dot.ten { background: var(--teal); }
.trick { background: var(--yellow-faint); border-color: var(--yellow-soft); }
.modal-card { border-color: var(--yellow-soft); }

/* ---------- prize tiers & goals ---------- */
.tier-head { margin: 18px 0 4px; color: var(--purple-dark); }
.prize { position: relative; }
.prize.goal { border-color: var(--teal); background: var(--teal-faint); opacity: 1; }
.goal-flag { position: absolute; top: -12px; background: var(--teal); color: var(--white); font-size: 0.75rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.meter-small { width: 100%; height: 12px; }
.meter span { transition: width .6s; }
.goal-banner {
  display: flex; gap: 16px; align-items: center; padding: 14px 20px; margin-bottom: 18px; border-radius: 22px;
  text-decoration: none; color: var(--ink); background: var(--teal-faint); border: 3px solid var(--teal-soft);
}
.goal-banner > div { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.goal-emoji { font-size: 2.6rem; }
.goal-empty { justify-content: center; background: var(--yellow-faint); border-color: var(--yellow-soft); }

/* ---------- phones ---------- */
@media (max-width: 720px) {
  .tray-sticker { width: 54px; height: 54px; font-size: 1.8rem; }
  body { font-size: 17px; }
  .fact-layout, .voice-row, .revise-grid, .plan { grid-template-columns: 1fr; }
  .game-cards { grid-template-columns: 1fr; }
  .picture { position: static; }
  .question { font-size: 2.5rem; padding: 12px 22px; }
  .bubble { width: 100px; height: 100px; font-size: 1.8rem; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .card { height: 90px; }
  .card .face { font-size: 1.2rem; }
  .big-badge { width: 90px; height: 90px; font-size: 2.1rem; }
  .hero { padding: 20px; }
  .hero h1 { font-size: 1.9rem; }
  .chest-box { flex-direction: column; text-align: center; }
  .tabs a { padding: 10px 12px; }
}

/* ---------- scrapbook ---------- */
.scrap-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.scrap-nav, .scrap-tools, .mode-panel, .item-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.page-title { flex: 1; min-width: 160px; font-size: 1.2rem; font-weight: 600; color: var(--purple-dark); text-align: center; }
.scrap-tools { justify-content: space-between; }
.mode-panel { padding: 12px; border-radius: 18px; background: var(--purple-faint); }
#write-text { flex: 1; min-width: 200px; font-size: 1.1rem; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 3px solid var(--white); background: var(--sw); box-shadow: 0 0 0 2px var(--line);
}
.swatch.on { box-shadow: 0 0 0 3px var(--ink), 0 0 12px var(--sw, var(--pink)); transform: scale(1.1); }
.swatch-bg { border-radius: 10px; position: relative; overflow: hidden; }
.swatch-bg.bg-stars::before { font-size: 9px; letter-spacing: 2px; line-height: 1.4; }

.scrap-page {
  position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden;
  border: 3px solid var(--pink-soft); touch-action: none; user-select: none; -webkit-user-select: none;
}
.bg-white { background: #ffffff; }
.bg-pink { background: #ffe6f2; }
.bg-purple { background: #f0e6ff; }
.bg-teal { background: #dcfaf6; }
.bg-yellow { background: #fff6cc; }
.bg-dots { background: #fff radial-gradient(circle, #ffc2e0 2px, transparent 2.5px) 0 0 / 22px 22px; }
.bg-stars { background: linear-gradient(160deg, #f6eeff, #e6fbf8); }
.bg-stars::before { content: "✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧"; position: absolute; inset: 0; color: rgba(162, 75, 255, .18); font-size: 26px; line-height: 2.2; letter-spacing: 14px; word-break: break-all; pointer-events: none; }
#scrap-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.scrap-items { position: absolute; inset: 0; z-index: 2; }
.mode-draw #scrap-canvas { pointer-events: auto; cursor: crosshair; }
.mode-draw .scrap-items { pointer-events: none; }
.scrap-empty { position: absolute; inset: auto 0 20px; text-align: center; z-index: 0; font-size: 1.1rem; }
.scrap-item {
  position: absolute; line-height: 1; cursor: grab; white-space: nowrap; touch-action: none;
  filter: drop-shadow(0 2px 3px rgba(59, 42, 85, .25));
}
.scrap-item:active { cursor: grabbing; }
.scrap-text { font-weight: 700; white-space: pre-wrap; max-width: 80%; text-align: center; line-height: 1.15; filter: none; text-shadow: 0 0 1px #fff, 0 2px 0 rgba(255, 255, 255, .8); }
.scrap-item.selected { outline: 3px dashed var(--pink); outline-offset: 6px; border-radius: 8px; }
.item-tools { justify-content: center; margin-top: 12px; }
.save-status { min-height: 1.2em; }

.tray { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tray-sticker {
  width: 64px; height: 64px; font-size: 2.2rem; border-radius: 18px; cursor: pointer; border: 3px solid var(--pink-soft);
  background: var(--white); display: grid; place-items: center; padding: 0; transition: transform .12s;
}
.tray-sticker:hover { transform: scale(1.12) rotate(-6deg); border-color: var(--pink); }
.tray-sticker.locked { background: #f6f2fa; border-style: dashed; border-color: var(--line); }
.tray-sticker.locked span { filter: grayscale(1) opacity(.3); }
.tray-sticker.locked:hover { transform: none; }

/* ---------- neon glow ---------- */
:root {
  --pink: #ff2e9a;
  --pink-dark: #d4147a;
  --purple: #a24bff;
  --purple-dark: #7a2cf0;
  --teal: #00d9c8;
  --teal-dark: #00a99b;
  --yellow: #ffe14d;
  --gold: #ffd21f;
  --glow-pink: 0 0 10px rgba(255, 46, 154, .55), 0 0 26px rgba(255, 46, 154, .3);
  --glow-purple: 0 0 10px rgba(162, 75, 255, .5), 0 0 26px rgba(162, 75, 255, .28);
  --glow-teal: 0 0 10px rgba(0, 217, 200, .55), 0 0 26px rgba(0, 217, 200, .3);
  --glow-yellow: 0 0 10px rgba(255, 210, 31, .6), 0 0 26px rgba(255, 210, 31, .32);
}

h1 {
  background: linear-gradient(90deg, var(--pink), var(--purple) 55%, var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 8px rgba(162, 75, 255, .35));
}
h2 { text-shadow: 0 0 12px rgba(162, 75, 255, .3); }

.brand-mark { box-shadow: var(--glow-pink); }
.topbar { border-bottom: 3px solid transparent; border-image: linear-gradient(90deg, var(--pink), var(--purple), var(--teal), var(--yellow)) 1; }
.tabs a.on { box-shadow: 0 -2px 14px rgba(255, 46, 154, .35); }

.btn { box-shadow: 0 4px 0 var(--pink-dark), var(--glow-pink); }
.btn:hover { box-shadow: 0 4px 0 var(--pink-dark), 0 0 14px rgba(255, 46, 154, .75), 0 0 36px rgba(255, 46, 154, .4); }
.btn-soft { box-shadow: 0 4px 0 #d6c8fb, 0 0 12px rgba(162, 75, 255, .25); }
.btn-soft:hover { box-shadow: 0 4px 0 #d6c8fb, var(--glow-purple); }
.btn-big { animation: neon-pulse 2.4s ease-in-out infinite; }

.pill-coins { box-shadow: var(--glow-yellow); }
.pill-streak { box-shadow: var(--glow-teal); }
.pill-chest { box-shadow: var(--glow-purple); }

.hero { border-color: var(--pink); box-shadow: var(--glow-pink); }
.stat { box-shadow: 0 0 0 2px var(--purple-soft), var(--glow-purple); }
.stat b { text-shadow: 0 0 10px currentColor; }

.island { box-shadow: 0 0 14px rgba(162, 75, 255, .22); }
a.island:hover { box-shadow: var(--glow-purple); border-color: var(--purple); }
.island-next { border-color: var(--pink); animation: neon-pulse 1.8s ease-in-out infinite; }
.island-done { border-color: var(--gold); box-shadow: var(--glow-yellow); }
.island-num { text-shadow: 0 0 12px rgba(162, 75, 255, .45); }
.island-flag { box-shadow: var(--glow-pink); }
.island-locked { box-shadow: none; }

.big-badge { box-shadow: var(--glow-pink), 0 0 50px rgba(162, 75, 255, .35); }
.star-step.got { box-shadow: var(--glow-yellow); }
.step { box-shadow: 0 0 0 1px rgba(162, 75, 255, .08), 0 0 26px rgba(255, 46, 154, .12); }
.step-num { box-shadow: 0 0 12px currentColor; }
.step:nth-of-type(2) .step-num { box-shadow: var(--glow-teal); }
.step:nth-of-type(3) .step-num { box-shadow: var(--glow-pink); }
.step:nth-of-type(4) .step-num { box-shadow: var(--glow-yellow); }
.trick { box-shadow: var(--glow-yellow); }

.fact.active { box-shadow: var(--glow-pink); }
.dot { box-shadow: 0 0 6px rgba(255, 46, 154, .7); }
.dot.ten { box-shadow: 0 0 6px rgba(0, 217, 200, .8); }
.carriage { box-shadow: 0 0 10px rgba(162, 75, 255, .35); }
.carriage:nth-child(3n) { box-shadow: var(--glow-teal); }
.carriage:nth-child(3n+1) { box-shadow: var(--glow-yellow); }
.carriage.blank { box-shadow: var(--glow-pink); }
.choice:hover { box-shadow: var(--glow-purple); }
.game-card { box-shadow: 0 0 16px rgba(255, 46, 154, .2); }
.game-card:hover { box-shadow: var(--glow-pink); }
.game-card:nth-child(2):hover { box-shadow: var(--glow-teal); }
.game-card:nth-child(3):hover { box-shadow: var(--glow-yellow); }

.question { box-shadow: var(--glow-purple); text-shadow: 0 0 14px rgba(162, 75, 255, .45); }
.bubble { box-shadow: inset -6px -8px 16px rgba(162, 75, 255, .25), 0 0 18px rgba(255, 46, 154, .55), 0 0 40px rgba(255, 46, 154, .25); }
.bubble:nth-child(2) { box-shadow: inset -6px -8px 16px rgba(0, 169, 155, .25), var(--glow-teal); }
.bubble:nth-child(3) { box-shadow: inset -6px -8px 16px rgba(200, 150, 0, .25), var(--glow-yellow); }
.bubble.right { box-shadow: 0 0 22px var(--pink), 0 0 50px rgba(255, 46, 154, .5); }
.progress-dots span.ok { box-shadow: var(--glow-teal); }
.timer { box-shadow: 0 0 12px rgba(162, 75, 255, .25); }
.timer span { box-shadow: 0 0 14px rgba(255, 46, 154, .6); }
.answer-box { box-shadow: var(--glow-pink); }
.numpad .go { box-shadow: 0 4px 0 var(--teal-dark), var(--glow-teal); }
.card .front { box-shadow: var(--glow-purple); }
.card.matched .back { box-shadow: var(--glow-pink); }

.meter span { box-shadow: 0 0 12px rgba(255, 46, 154, .7); }
.chest-box { box-shadow: var(--glow-yellow); }
.chest-art { filter: drop-shadow(0 0 14px rgba(255, 210, 31, .8)); }
.prize.can { box-shadow: var(--glow-pink); }
.prize.goal { box-shadow: var(--glow-teal); }
.goal-flag { box-shadow: var(--glow-teal); }
.goal-banner { box-shadow: var(--glow-teal); }
.scrap-page { box-shadow: var(--glow-pink); }
.tray-sticker:not(.locked) { box-shadow: 0 0 10px rgba(255, 46, 154, .3); }
.tray-sticker:not(.locked):hover { box-shadow: var(--glow-pink); }
.price { box-shadow: 0 0 8px rgba(255, 210, 31, .6); }
.trophy.got { box-shadow: var(--glow-yellow); }
.trophy.got .trophy-emoji, .sticker.got span { filter: drop-shadow(0 0 8px rgba(255, 210, 31, .9)); }
.sticker.got { box-shadow: var(--glow-pink); }
.modal-card { box-shadow: var(--glow-pink), 0 0 80px rgba(162, 75, 255, .35); }
.confetti { filter: drop-shadow(0 0 6px rgba(255, 46, 154, .8)); }

@keyframes neon-pulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 46, 154, .45)); }
  50% { filter: drop-shadow(0 0 14px rgba(255, 46, 154, .85)) drop-shadow(0 0 24px rgba(162, 75, 255, .45)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- bubbles ---------- */
.topbar, .tabs, .wrap, .foot { position: relative; z-index: 1; }
.bubble-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.float-bubble, .burst-bubble {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .95) 0 12%, rgba(255, 255, 255, .25) 30%, var(--fb) 100%);
  box-shadow: inset -3px -4px 8px rgba(255, 255, 255, .5), 0 0 14px var(--fb-glow);
}
.float-bubble { bottom: -100px; opacity: .55; animation: bubble-rise linear infinite; }
.float-star { position: absolute; bottom: -100px; display: grid; place-items: center; line-height: 1; opacity: .8; animation: bubble-rise linear infinite; filter: drop-shadow(0 0 8px rgba(255, 210, 31, .8)); }
.burst-emoji { background: none; box-shadow: none; line-height: 1; display: grid; place-items: center; }
.star-says {
  position: fixed; z-index: 71; pointer-events: none; transform: translate(-50%, -100%); max-width: 220px;
  padding: 6px 12px; border-radius: 16px; background: var(--white); border: 2px solid var(--yellow); color: #5a4300;
  font-weight: 600; font-size: .95rem; text-align: center; box-shadow: var(--glow-yellow); animation: star-says 2.2s ease-out forwards;
}
@keyframes star-says {
  0%   { opacity: 0; transform: translate(-50%, -80%) scale(.6); }
  12%  { opacity: 1; transform: translate(-50%, -100%) scale(1); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -160%) scale(1); }
}
.burst-bubble { position: fixed; z-index: 70; pointer-events: none; transform: translate(-50%, -50%); animation: bubble-burst 1.2s ease-out forwards; }
.fb-teal   { --fb: rgba(0, 217, 200, .45);  --fb-glow: rgba(0, 217, 200, .6); }
.fb-yellow { --fb: rgba(255, 210, 31, .5);  --fb-glow: rgba(255, 210, 31, .65); }
.fb-pink   { --fb: rgba(255, 46, 154, .35); --fb-glow: rgba(255, 46, 154, .5); }
.fb-purple { --fb: rgba(162, 75, 255, .35); --fb-glow: rgba(162, 75, 255, .5); }
@keyframes bubble-rise {
  0%   { transform: translate(0, 0) scale(.8); }
  50%  { transform: translate(var(--drift), -60vh) scale(1); }
  100% { transform: translate(calc(var(--drift) * -1), -125vh) scale(1.1); }
}
@keyframes bubble-burst {
  0%   { transform: translate(-50%, -50%) scale(.3); opacity: 1; }
  80%  { opacity: .9; }
  100% { transform: translate(calc(-50% + var(--bx)), calc(-50% + var(--by))) scale(1.15); opacity: 0; }
}

/* ---------- more teal & yellow ---------- */
body {
  background:
    radial-gradient(1200px 600px at -10% -10%, rgba(0, 217, 200, .14), transparent 60%),
    radial-gradient(1000px 600px at 110% 110%, rgba(255, 210, 31, .18), transparent 60%),
    #fffefd;
  background-attachment: fixed;
}
h1 { background: linear-gradient(90deg, var(--teal-dark), var(--purple) 50%, var(--pink)); -webkit-background-clip: text; background-clip: text; }
h2 { color: var(--teal-dark); text-shadow: 0 0 12px rgba(0, 217, 200, .3); }
.topbar { border-image: linear-gradient(90deg, var(--teal), var(--yellow), var(--pink), var(--teal)) 1; }
.brand { color: var(--teal-dark); }
.brand-mark { background: linear-gradient(135deg, var(--teal), var(--yellow)); color: #5a4300; box-shadow: var(--glow-teal); }
.tabs a.on { background: var(--teal-soft); color: var(--teal-dark); box-shadow: 0 -2px 14px rgba(0, 217, 200, .4); }
.tabs a:nth-child(3).on { background: var(--yellow-soft); color: #8a6400; box-shadow: 0 -2px 14px rgba(255, 210, 31, .5); }

.btn-big {
  background: linear-gradient(135deg, var(--teal), #3fe8db); color: #003d38;
  box-shadow: 0 4px 0 var(--teal-dark), var(--glow-teal);
}
.btn-big:hover { box-shadow: 0 4px 0 var(--teal-dark), 0 0 16px rgba(0, 217, 200, .8), 0 0 40px rgba(0, 217, 200, .45); }
.btn-big:active { box-shadow: 0 1px 0 var(--teal-dark); }
.btn-soft { background: var(--yellow-soft); color: #7a5600; box-shadow: 0 4px 0 #f2d67a, 0 0 12px rgba(255, 210, 31, .35); }
.btn-soft:hover { box-shadow: 0 4px 0 #f2d67a, var(--glow-yellow); }
.btn-soft:active { box-shadow: 0 1px 0 #f2d67a; }

.hero { background: linear-gradient(135deg, var(--teal-faint), #fffdf3 50%, var(--yellow-faint)); border-color: var(--teal); box-shadow: var(--glow-teal); }
.stat b { color: var(--teal-dark); }
.stat:nth-child(2) b { color: #c99700; }
.stat { box-shadow: 0 0 0 2px var(--teal-soft), var(--glow-teal); }
.how-step { border-color: var(--teal-soft); color: var(--teal-dark); }

.island { border-color: var(--teal-soft); box-shadow: 0 0 14px rgba(0, 217, 200, .25); }
.stage:nth-of-type(2n) .island { border-color: var(--yellow-soft); box-shadow: 0 0 14px rgba(255, 210, 31, .3); }
.island-num { color: var(--teal-dark); text-shadow: 0 0 12px rgba(0, 217, 200, .45); }
.stage:nth-of-type(2n) .island-num { color: #b88600; text-shadow: 0 0 12px rgba(255, 210, 31, .5); }
a.island:hover { border-color: var(--teal); box-shadow: var(--glow-teal); }
.island-next { border-color: var(--yellow); background: var(--yellow-faint); }
.island-flag { background: var(--teal); color: #003d38; box-shadow: var(--glow-teal); }
.island-locked { box-shadow: none; }

.big-badge { background: linear-gradient(135deg, var(--teal), var(--yellow)); color: #3d2e00; box-shadow: var(--glow-teal), 0 0 50px rgba(255, 210, 31, .4); }
.step { border-color: var(--teal-soft); box-shadow: 0 0 26px rgba(0, 217, 200, .14); }
.step:nth-of-type(even) { border-color: var(--yellow-soft); box-shadow: 0 0 26px rgba(255, 210, 31, .18); }
.step-num { background: var(--teal); }
.fact { background: var(--teal-faint); }
.fact:hover { border-color: var(--teal-soft); }
.fact.active { background: var(--yellow-soft); border-color: var(--yellow); box-shadow: var(--glow-yellow); }
.fact .ans { color: var(--teal-dark); }
.seg { background: var(--teal-faint); }
.seg button.on { color: var(--teal-dark); box-shadow: 0 0 10px rgba(0, 217, 200, .35); }
.picture { background: linear-gradient(160deg, var(--yellow-faint), var(--teal-faint)); }
.voice-card { background: var(--yellow-faint); }
.game-card:nth-child(1) { background: var(--teal-faint); border-color: var(--teal-soft); }
.game-card:nth-child(1):hover { border-color: var(--teal); box-shadow: var(--glow-teal); }

.question { border-color: var(--teal); box-shadow: var(--glow-teal); color: var(--teal-dark); text-shadow: 0 0 14px rgba(0, 217, 200, .45); }
.progress-dots span { background: var(--yellow-soft); }
.progress-dots span.now { outline-color: var(--teal); }
.answer-box { border-color: var(--teal); color: var(--teal-dark); box-shadow: var(--glow-teal); }
.numpad button { background: var(--yellow-faint); box-shadow: 0 4px 0 var(--yellow-soft); }
.card .front { background: linear-gradient(135deg, var(--teal), var(--yellow)); box-shadow: var(--glow-teal); }
.result { border-color: var(--teal); box-shadow: var(--glow-teal); }
.result .score { color: var(--teal-dark); text-shadow: 0 0 14px rgba(0, 217, 200, .5); }
.modal-card { border-color: var(--teal); box-shadow: var(--glow-teal), 0 0 80px rgba(255, 210, 31, .35); }

.meter span { background: linear-gradient(90deg, var(--teal), var(--yellow)); box-shadow: 0 0 12px rgba(0, 217, 200, .7); }
.prize { background: var(--yellow-faint); }
.prize.can { border-color: var(--teal); background: var(--teal-faint); box-shadow: var(--glow-teal); }
.chip { background: var(--teal-faint); color: var(--teal-dark); }
.scrap-page { border-color: var(--teal); box-shadow: var(--glow-teal); }
.tray-sticker { border-color: var(--yellow-soft); }
.tray-sticker:not(.locked):hover { border-color: var(--teal); box-shadow: var(--glow-teal); }
.scrap-item.selected { outline-color: var(--teal); }

/* ---------- reset coins whirlpool ---------- */
.reset-box { display: flex; gap: 20px; align-items: center; background: linear-gradient(135deg, var(--teal-faint), var(--yellow-faint)); }
.reset-coin { font-size: 4rem; animation: coin-spin 3s linear infinite; filter: drop-shadow(0 0 14px rgba(255, 210, 31, .9)); }
@keyframes coin-spin { to { transform: rotateY(360deg); } }
.btn-reset { background: linear-gradient(135deg, var(--purple), var(--teal)); box-shadow: 0 4px 0 #5a24b8, var(--glow-purple); }
.btn-reset:active { box-shadow: 0 1px 0 #5a24b8; }
.vortex {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle, rgba(59, 42, 85, .55), rgba(20, 10, 40, .85));
}
.vortex[hidden] { display: none; }
.vortex-swirl {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: conic-gradient(var(--teal), var(--yellow), var(--pink), var(--purple), var(--teal));
  -webkit-mask: radial-gradient(circle, transparent 18%, #000 20%, transparent 70%);
          mask: radial-gradient(circle, transparent 18%, #000 20%, transparent 70%);
  filter: blur(2px) drop-shadow(0 0 30px rgba(0, 217, 200, .8));
  animation: swirl 1.1s linear infinite;
}
.vortex.done .vortex-swirl { animation: swirl 1.1s linear infinite, swirl-shrink .9s ease-in forwards; }
@keyframes swirl { to { transform: rotate(360deg); } }
@keyframes swirl-shrink { to { transform: scale(0) rotate(720deg); opacity: 0; } }
.vortex-count {
  position: relative; font-size: 5rem; font-weight: 700; color: #fff;
  text-shadow: 0 0 18px var(--yellow), 0 0 40px var(--teal);
}
.vortex-label { position: absolute; bottom: 22%; color: #fff; font-size: 1.6rem; font-weight: 600; text-shadow: 0 0 14px var(--pink); }
.vortex.done .vortex-count { animation: pop-in .5s ease-out; }
@keyframes pop-in { 0% { transform: scale(.4); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
.vortex-coin {
  position: absolute; left: 50%; top: 50%; font-size: 2rem; opacity: 0;
  animation: coin-suck 1.3s ease-in forwards;
}
@keyframes coin-suck {
  0% { transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) rotate(0) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(900deg) scale(0); opacity: 0; }
}
@media (max-width: 720px) { .reset-box { flex-direction: column; text-align: center; } .vortex-swirl { width: 300px; height: 300px; } }

/* ---------- homework ---------- */
.badge {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--pink); color: #fff; font-size: 0.8rem; box-shadow: var(--glow-pink); margin-left: 2px;
}
.hw-card, .hw-prompt { display: flex; gap: 18px; align-items: flex-start; }
.hw-emoji { font-size: 3.2rem; line-height: 1; filter: drop-shadow(0 0 10px rgba(0, 217, 200, .6)); }
.hw-body { flex: 1; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.hw-body h2 { margin: 0; }
.hw-goal { font-size: 1.2rem; font-weight: 600; margin: 0; }
.hw-instructions { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--yellow-faint); border-left: 4px solid var(--yellow); }
.hw-feedback { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--teal-faint); border-left: 4px solid var(--teal); }
.hw-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hw-handin { display: flex; gap: 10px; flex-wrap: wrap; width: 100%; }
.hw-note { flex: 1; min-width: 200px; }
.hw-waiting { opacity: .85; }
.hw-overdue { border-color: var(--pink) !important; }
.tag-late { background: var(--pink-soft); color: var(--pink-dark); }
.hw-empty { text-align: center; }
.hw-banner { background: var(--yellow-faint); border-color: var(--yellow); box-shadow: var(--glow-yellow); }
.island-hw { opacity: .8; border-style: dashed; border-color: var(--pink) !important; }
.hw-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 8px; border-radius: 14px; background: var(--teal-faint); }
.hw-check { background: var(--yellow-faint); border: 2px solid var(--yellow); }
.hw-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.hw-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.hw-form label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; }
.hw-form .hw-wide { grid-column: 1 / -1; }
.hw-form textarea { font: inherit; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--purple-soft); }
.gate-stack { flex-direction: column; align-items: stretch; max-width: 320px; margin: 0 auto; }
.gate-stack label { display: flex; flex-direction: column; gap: 4px; text-align: left; font-weight: 600; }
.gate input[type=password] { width: 100%; font-size: 1.2rem; }
.gate-form > input[type=password] { width: 220px; }

/* ---------- skip-count train: a cross on a wrong answer ---------- */
.choice { position: relative; }
.choice.nope { opacity: 1; color: #c9bfd6; border-color: #f3c6d6 !important; background: #fff5f8; cursor: default; box-shadow: none; animation: shake .35s; }
.choice.nope::after {
  content: "✗"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 2.6rem; font-weight: 700; color: #ff3b6b; text-shadow: 0 0 10px rgba(255, 59, 107, .45);
}
@keyframes shake { 20% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 80% { transform: translateX(-3px); } }

/* ---------- voice picker ---------- */
.voice-list { display: grid; gap: 8px; margin: 10px 0; }
.voice-option { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: var(--teal-faint); border: 2px solid transparent; flex-wrap: wrap; }
.voice-option:has(input:checked) { border-color: var(--teal); box-shadow: var(--glow-teal); background: #fff; }
.voice-option label { flex: 1; display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; min-width: 200px; }
.voice-option input[type=radio] { width: 22px; height: 22px; min-height: 0; accent-color: var(--teal-dark); }

/* ---------- deleting recordings ---------- */
.rec-clip { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.rec-clip audio { flex: 1; min-width: 160px; margin-top: 0 !important; }
.del-rec { border: 0; background: var(--pink-faint); border-radius: 12px; width: 40px; height: 40px; font-size: 1.1rem; cursor: pointer; }
.del-rec:hover { background: var(--pink-soft); box-shadow: var(--glow-pink); }

/* ---------- treasure map ---------- */
.tmap {
  position: relative; aspect-ratio: 16 / 9; min-height: 480px; margin: 6px 0 14px; border-radius: 30px; overflow: hidden;
  border: 5px dashed #e0b24a;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .7), transparent 30%),
    radial-gradient(circle at 80% 85%, rgba(255, 255, 255, .5), transparent 35%),
    repeating-linear-gradient(135deg, rgba(0, 169, 155, .05) 0 14px, transparent 14px 28px),
    linear-gradient(160deg, #c9f5ee, #e9fbf7 45%, #fff3c9);
  box-shadow: var(--glow-yellow), inset 0 0 60px rgba(224, 178, 74, .25);
}
.tmap-title {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap;
  padding: 4px 18px; border-radius: 999px; background: #fff8e1; border: 2px solid #e0b24a; color: #8a6400; font-weight: 700;
}
.tmap-trail { position: absolute; inset: 0; width: 100%; height: 100%; }
.tmap-trail polyline {
  fill: none; stroke: #d19a2a; stroke-width: 4px; stroke-dasharray: 2 12; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke; animation: trail 1.6s linear infinite;
}
@keyframes trail { to { stroke-dashoffset: -14; } }
.tmap-deco { position: absolute; font-size: 1.8rem; opacity: .75; animation: bob 4s ease-in-out infinite; }
.tmap-deco:nth-of-type(even) { animation-delay: -2s; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-4deg); } }
.tisland {
  position: absolute; transform: translate(-50%, -50%); z-index: 2; width: 150px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1px;
  text-decoration: none; color: var(--ink); line-height: 1.15;
}
.tisland-land {
  position: relative; display: grid; place-items: center; width: 92px; height: 78px; margin-bottom: 4px;
  border-radius: 58% 42% 55% 45% / 55% 50% 50% 45%;
  background: radial-gradient(circle at 40% 35%, #fff6cf, #ffe08a 70%, #f4c95a);
  border: 3px solid #fff; box-shadow: 0 0 0 5px rgba(0, 217, 200, .28), 0 0 22px rgba(255, 210, 31, .65);
  transition: transform .18s;
}
.tisland:hover .tisland-land { transform: scale(1.12) rotate(-4deg); box-shadow: 0 0 0 6px rgba(0, 217, 200, .45), var(--glow-teal); }
.tisland-emoji { font-size: 2.3rem; }
.tisland-flag { position: absolute; top: -16px; right: -6px; font-size: 1.5rem; }
.tisland b { font-size: 0.95rem; color: var(--teal-dark); background: rgba(255, 255, 255, .85); padding: 1px 8px; border-radius: 999px; }
.tisland-topic { font-size: 0.72rem; color: var(--muted); }
.tisland-count { font-size: 0.78rem; font-weight: 600; background: #fff; border-radius: 999px; padding: 1px 8px; box-shadow: 0 0 8px rgba(255, 210, 31, .5); }
.tisland-done .tisland-land { background: radial-gradient(circle at 40% 35%, #eafff9, #9ff0e3 70%, #4fd9c8); }
.ttreasure { width: 120px; }
.ttreasure .tisland-land { background: radial-gradient(circle at 40% 35%, #fff, #ffe9f4 70%, #ffc2e0); animation: neon-pulse 2.4s ease-in-out infinite; }
.tisland-x { position: absolute; bottom: -8px; right: -4px; color: #ff3b6b; font-size: 1.6rem; font-weight: 700; text-shadow: 0 0 8px rgba(255, 59, 107, .5); }

/* island page */
.mountain-cards { grid-template-columns: repeat(2, 1fr); margin-bottom: 18px; }
.stops { display: grid; gap: 10px; }
.stop {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; text-decoration: none; color: var(--ink);
  background: var(--teal-faint); border: 3px solid var(--teal-soft); transition: transform .15s;
}
a.stop:hover { transform: translateX(6px); border-color: var(--teal); box-shadow: var(--glow-teal); }
.stop-mark { font-size: 2rem; width: 46px; text-align: center; }
.stop-text { flex: 1; display: flex; flex-direction: column; }
.stop-text b { font-size: 1.15rem; }
.stop-text small { color: var(--muted); }
.stop-done { background: var(--yellow-faint); border-color: var(--yellow); }
.stop-locked { opacity: .55; background: #f6f2fa; border-style: dashed; border-color: var(--line); }

/* quiz */
.tq-card {
  max-width: 640px; margin: 0 auto 16px; padding: 20px; border-radius: 26px; background: #fff;
  border: 3px solid var(--teal); box-shadow: var(--glow-teal);
}
.tq-question { font-size: 1.5rem; font-weight: 600; margin: 0; color: var(--ink); white-space: pre-wrap; }
.tq-picture:not(:empty) { margin-top: 14px; display: flex; justify-content: center; }
.tq-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 640px; margin: 0 auto 12px; }
.tq-option {
  position: relative; font: inherit; font-size: 1.4rem; font-weight: 700; min-height: 72px; padding: 10px 14px; border-radius: 20px; cursor: pointer;
  background: var(--yellow-faint); color: var(--ink); border: 3px solid var(--yellow-soft); box-shadow: 0 4px 0 var(--yellow-soft);
}
.tq-option:nth-child(2), .tq-option:nth-child(3) { background: var(--teal-faint); border-color: var(--teal-soft); box-shadow: 0 4px 0 var(--teal-soft); }
.tq-option:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--teal); }
.tq-option:disabled { cursor: default; }
.tq-option.right { background: #dcfff4; border-color: #19c98f; box-shadow: 0 0 16px rgba(25, 201, 143, .55); }
.tq-option.right::after { content: "✓"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #0fa873; font-size: 1.8rem; }
.tq-option.nope { background: #fff5f8; border-color: #f3c6d6; color: #b9aec8; box-shadow: none; animation: shake .35s; }
.tq-option.nope::after { content: "✗"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: #ff3b6b; font-size: 1.9rem; text-shadow: 0 0 10px rgba(255, 59, 107, .45); }
.tq-next { margin-top: 6px; }

/* pictures inside questions */
.pic-line, .pic-shape, .pic-bars { width: 100%; max-width: 520px; height: auto; }
.pic-shape { max-width: 320px; }
.pic-bars { max-width: 380px; }
.pic-line .ln { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.pic-line .lbl, .pic-shape .lbl, .pic-bars .lbl { font: 600 17px "Fredoka", sans-serif; fill: var(--ink); text-anchor: middle; }
.pic-line .arrow { font-size: 26px; text-anchor: middle; fill: var(--pink); }
.pic-shape .shape { fill: var(--teal-soft); stroke: var(--teal-dark); stroke-width: 3; stroke-linejoin: round; }
.pic-bars .grid { stroke: #e6dcee; stroke-width: 1; }
.pic-bars .bar { rx: 6; }
.pic-bars .b0 { fill: var(--teal); } .pic-bars .b1 { fill: var(--yellow); } .pic-bars .b2 { fill: var(--pink); } .pic-bars .b3 { fill: var(--purple); }
.pic-bars .lbl { font-size: 13px; }
.pic-bar { display: flex; width: 100%; max-width: 420px; height: 56px; border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; }
.pic-bar span { flex: 1; border-right: 3px solid var(--ink); background: #fff; }
.pic-bar span:last-child { border-right: 0; }
.pic-bar span.on { background: var(--teal); box-shadow: inset 0 0 12px rgba(255, 255, 255, .5); }
.pic-sum { font: 700 2rem/1.25 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .25em; margin: 0; text-align: right; color: var(--ink); }
.pic-sum .rule { color: var(--teal-dark); letter-spacing: 0; }
.pic-chart { text-align: left; min-width: 260px; }
.pic-key { display: inline-block; margin-bottom: 8px; padding: 2px 12px; border-radius: 999px; background: var(--yellow-soft); font-weight: 600; }
.pic-row { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); font-size: 1.35rem; }
.pic-row b { font-size: 1rem; }
.pic-row .half { display: inline-block; width: .62em; overflow: hidden; vertical-align: bottom; font-style: normal; }
/* squared paper, coordinate grids and line graphs (Years 4 and 5) */
.pic-grid { width: 100%; height: auto; }
.pic-grid .grid { stroke: #cfd8e3; stroke-width: 1; }
.pic-grid .fill { fill: var(--teal-soft); stroke: var(--teal-dark); stroke-width: 3; }
.pic-coords { max-width: 330px; }
.pic-coords .axis { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.pic-coords .lbl { font: 600 13px "Fredoka", sans-serif; fill: var(--ink); text-anchor: middle; }
.pic-coords .dot, .pic-graph .dot { fill: var(--pink); stroke: #fff; stroke-width: 2; }
.pic-coords .name { font: 700 17px "Fredoka", sans-serif; fill: var(--pink); text-anchor: middle; }
.pic-coords .mirror { stroke: var(--purple); stroke-width: 3; stroke-dasharray: 6 6; }
.pic-graph { max-width: 440px; }
.pic-graph .trace { fill: none; stroke: var(--teal); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }

/* pictures for the youngest children (Years 1 and 2) */
.tq-card { position: relative; }
.tq-say { position: absolute; top: 10px; right: 10px; width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--yellow); background: var(--yellow-faint); font-size: 1.3rem; cursor: pointer; }
.tq-say:hover { transform: scale(1.08); }
.tq-say + .tq-question { padding-right: 52px; }
.tq-options.three { grid-template-columns: repeat(3, 1fr); }
.pic-things { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 2px; max-width: 430px; font-size: 2rem; line-height: 1.15; }
.pic-things .gap { margin-right: 16px; }
.pic-things i { font-style: normal; }
.pic-things .gone { position: relative; }
.pic-things .gone i { opacity: .3; }
.pic-things .gone::after { content: "✕"; position: absolute; inset: 0; display: grid; place-items: center; color: #e11d48; font-size: 1.7rem; font-weight: 700; }
.pic-groups { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; }
.pic-groups > div { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 18px; border: 3px dashed var(--teal-soft); background: var(--teal-faint); }
.pic-groups > div > b { font-size: 1.5rem; color: var(--teal-dark); }
.pic-groups > div > b:empty { display: none; }
.pic-groups .pic-things { max-width: 190px; font-size: 1.7rem; }
.pic-frames { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.pic-frame { display: grid; grid-template-columns: repeat(5, 38px); border: 3px solid var(--ink); border-radius: 8px; overflow: hidden; background: #fff; }
.pic-frame span { height: 38px; border: 1.5px solid var(--ink); display: grid; place-items: center; }
.pic-frame span.on::after { content: ""; width: 24px; height: 24px; border-radius: 50%; background: var(--pink); box-shadow: inset -3px -3px 5px rgba(0, 0, 0, .18); }
.pic-array { font-size: 1.8rem; line-height: 1.25; letter-spacing: 4px; text-align: center; }
.pic-track { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pic-track span { min-width: 58px; padding: 10px 8px; border-radius: 14px; border: 3px solid var(--teal-soft); background: var(--teal-faint); font-size: 1.6rem; font-weight: 700; text-align: center; }
.pic-track span.ask, .pic-pattern .ask { border: 3px dashed var(--pink); background: var(--pink-faint); color: var(--pink); }
.pic-clock { width: 190px; height: 190px; }
.pic-clock .face { fill: #fff; stroke: var(--teal-dark); stroke-width: 6; }
.pic-clock .lbl { font: 700 19px "Fredoka", sans-serif; fill: var(--ink); text-anchor: middle; }
.pic-clock .hour { stroke: var(--ink); stroke-width: 8; stroke-linecap: round; }
.pic-clock .minute { stroke: var(--pink); stroke-width: 5; stroke-linecap: round; }
.pic-clock .pin { fill: var(--ink); }
.pic-coins { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.coin { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; font-weight: 700; font-size: 1.15rem; color: #4a3200; background: radial-gradient(circle at 32% 28%, #f6f6f6, #b9bdc4 70%); border: 3px solid #8d929b; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .45); }
.coin-1, .coin-2 { background: radial-gradient(circle at 32% 28%, #f1b98a, #b56a35 72%); border-color: #8a4b1f; color: #3d1d05; }
.coin-1 { width: 50px; height: 50px; font-size: 1rem; }
.coin-5 { width: 46px; height: 46px; font-size: .95rem; }
.coin-10 { width: 60px; height: 60px; }
.coin-20 { width: 54px; height: 54px; border-radius: 34%; }
.coin-50 { width: 68px; height: 68px; border-radius: 36%; }
.coin-100 { width: 58px; height: 58px; background: radial-gradient(circle at 32% 28%, #fff1b0, #d6a419 72%); border-color: #a87a05; }
.coin-200 { width: 70px; height: 70px; background: radial-gradient(circle at 50% 50%, #e9e9ec 0 48%, #d6a419 52%); border-color: #a87a05; }
.pic-flat { max-width: 190px; }
.pic-pizza { width: 180px; height: 180px; }
.pic-pizza .on { fill: var(--teal); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.pic-pizza .off { fill: #fff; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.pic-sticks { width: 100%; max-width: 440px; display: grid; gap: 14px; }
.pic-sticks > div { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 8px; text-align: left; }
.pic-sticks span { display: block; height: 26px; border-radius: 13px; border: 3px solid var(--ink); }
.pic-sticks .red { background: #ff5a6e; } .pic-sticks .blue { background: #4d8dff; }
.pic-base { display: flex; align-items: flex-end; justify-content: center; gap: 7px; flex-wrap: wrap; }
.pic-base .ten { width: 16px; height: 120px; border-radius: 4px; border: 2px solid var(--teal-dark); background: repeating-linear-gradient(var(--teal-soft) 0 10px, var(--teal-dark) 10px 12px); }
.pic-base .ones { display: grid; grid-template-columns: repeat(3, 16px); gap: 5px; margin-left: 14px; }
.pic-base .ones i { width: 16px; height: 16px; border-radius: 4px; border: 2px solid #b8860b; background: var(--yellow); }
.pic-tally td { font: 700 1.5rem ui-monospace, Menlo, monospace; letter-spacing: 3px; text-align: left; white-space: nowrap; }
.pic-tally .five { text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: var(--pink); }
.pic-big { font-size: 5.5rem; line-height: 1.1; }
.pic-queue { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 2.6rem; flex-wrap: wrap; }
.pic-queue b { font-size: 1rem; color: var(--teal-dark); }
.pic-pattern { font-size: 2.3rem; letter-spacing: 6px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; }
.pic-pattern .ask { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; font-size: 1.5rem; font-weight: 700; letter-spacing: 0; }
@media (max-width: 520px) { .tq-options.three { grid-template-columns: 1fr; } .pic-things { font-size: 1.6rem; } }
.pic-table { border-collapse: collapse; font-size: 1.15rem; }
.pic-table th, .pic-table td { border: 2px solid var(--teal-soft); padding: 6px 16px; text-align: center; }
.pic-table thead th { background: var(--teal-soft); color: var(--teal-dark); }
.pic-table tbody th { text-align: left; background: var(--yellow-faint); }

/* ---------- the studio ---------- */
.studio {
  position: relative; max-width: 560px; margin: 0 auto; padding: 22px 16px 26px; border-radius: 30px; overflow: hidden;
  background: radial-gradient(circle at 50% 0%, #4b2a8a, #24103f 70%); color: #fff;
  box-shadow: 0 0 0 4px var(--teal), var(--glow-teal), 0 0 60px rgba(162, 75, 255, .5);
}
.studio.beat { animation: beat .25s ease-out; }
@keyframes beat { 30% { box-shadow: 0 0 0 4px var(--yellow), 0 0 50px rgba(255, 225, 77, .9), 0 0 90px rgba(0, 217, 200, .7); } }
.studio-lights { position: absolute; inset: 0 0 auto; display: flex; justify-content: space-around; pointer-events: none; }
.studio-lights span { width: 14px; height: 14px; margin-top: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 14px var(--yellow), 0 30px 60px 24px rgba(255, 225, 77, .12); animation: twinkle 1.2s ease-in-out infinite; }
.studio-lights span:nth-child(2n) { background: var(--teal); box-shadow: 0 0 14px var(--teal), 0 30px 60px 24px rgba(0, 217, 200, .12); animation-delay: -.6s; }
.studio-lights span:nth-child(3n) { background: var(--pink); box-shadow: 0 0 14px var(--pink); animation-delay: -.3s; }
@keyframes twinkle { 50% { opacity: .35; } }
.studio .hud { margin-top: 18px; }
.studio .hud .pill { background: rgba(255, 255, 255, .12); color: #fff; }
.studio .timer { background: rgba(255, 255, 255, .15); }
.studio-q { font-size: 3.2rem; font-weight: 700; margin: 10px 0; text-shadow: 0 0 16px var(--teal), 0 0 40px rgba(0, 217, 200, .6); }
.studio-eq { opacity: .6; }
.studio-ans { display: inline-block; min-width: 2.2ch; padding: 0 12px; border-bottom: 4px solid var(--yellow); color: var(--yellow); text-shadow: 0 0 16px var(--yellow); min-height: 1.2em; vertical-align: bottom; }
.studio-ans.wrong { color: #ff7a9c; border-color: #ff3b6b; text-decoration: line-through; text-shadow: 0 0 14px #ff3b6b; }
.studio .feedback { color: #ffd0dc; }
.studio .numpad button { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 0 10px rgba(162, 75, 255, .5); }
.studio .numpad .go { background: var(--teal); color: #003d38; box-shadow: 0 4px 0 var(--teal-dark), var(--glow-teal); }
.studio-status { display: flex; gap: 14px; align-items: center; text-align: left; padding: 12px 16px; margin: 12px 0; border-radius: 18px; background: linear-gradient(135deg, #2b1552, #4b2a8a); color: #fff; box-shadow: var(--glow-purple); }
.studio-status > div { display: flex; flex-direction: column; }
.studio-status .muted { color: #d9cdf5; }
.studio-rank { font-size: 2.6rem; filter: drop-shadow(0 0 10px var(--yellow)); }
.rank-list { text-align: left; margin-bottom: 14px; font-size: 0.95rem; }
.rank-list summary { cursor: pointer; color: var(--muted); }
.rank-list ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }

@media (max-width: 720px) {
  .tq-question { font-size: 1.25rem; }
  .tq-option { font-size: 1.15rem; min-height: 60px; }
  .studio-q { font-size: 2.4rem; }
  .mountain-cards { grid-template-columns: 1fr; }
  .pic-sum { font-size: 1.6rem; }
}

/* ---------- homework files ---------- */
.hw-files { display: flex; flex-wrap: wrap; gap: 10px; }
.hw-files:empty { display: none; }
.hw-file { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.hw-file a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: 14px; background: #fff; border: 2px solid var(--teal-soft); text-decoration: none; max-width: 150px; }
.hw-file a:hover { border-color: var(--teal); box-shadow: var(--glow-teal); }
.hw-file img { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; }
.hw-doc { font-size: 2.6rem; }
.hw-file-name { font-size: 0.75rem; color: var(--muted); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hw-upload { display: flex; flex-direction: column; gap: 6px; font-weight: 600; width: 100%; padding: 12px; border-radius: 16px; border: 3px dashed var(--teal-soft); background: var(--teal-faint); cursor: pointer; }
input[type=file] { font: inherit; font-size: 0.95rem; padding: 8px; min-height: 0; max-width: 100%; }
.chip-done { background: var(--yellow-soft) !important; color: #7a5600 !important; }
.progress-table .chip { display: inline-block; margin: 2px 0; font-weight: 500; font-size: 0.8rem; padding: 2px 8px; }

/* ---------- treasure map: long winding trail ---------- */
.tmap { aspect-ratio: auto; min-height: 0; }
.tmap-trail polyline { stroke-width: 5px; stroke-dasharray: 2 14; }
.tisland { width: 210px; }
.tisland-land { width: 140px; height: 118px; margin-bottom: 6px; border-width: 4px; box-shadow: 0 0 0 7px rgba(0, 217, 200, .28), 0 0 30px rgba(255, 210, 31, .7); }
.tisland-emoji { font-size: 3.6rem; }
.tisland b { font-size: 1.2rem; padding: 2px 12px; }
.tisland-topic { font-size: 0.85rem; }
.tisland-count { font-size: 0.9rem; padding: 2px 10px; margin-top: 2px; }
.tisland-flag { font-size: 2rem; top: -22px; }
.ttreasure { width: 190px; }
.tbead {
  position: absolute; transform: translate(-50%, -50%); z-index: 2; width: 30px; height: 30px; border-radius: 50%;
  background: #fff8e1; border: 4px solid #e0b24a; box-shadow: 0 0 0 4px rgba(255, 255, 255, .7);
}
.tbead-lit { background: var(--teal); border-color: #fff; box-shadow: 0 0 0 4px rgba(0, 217, 200, .35), var(--glow-teal); }
.tbead:hover { transform: translate(-50%, -50%) scale(1.25); }

/* ---------- island trail: small stops and bigger main tasks ---------- */
.trail-key { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-bottom: 14px; color: var(--muted); font-size: 0.95rem; }
.trail-key > span { display: inline-flex; align-items: center; gap: 8px; }
.trail { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 30px 0; padding: 12px 0 6px; overflow: hidden; }
.tstop {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px;
  width: 118px; padding: 0 6px; text-decoration: none; color: var(--ink); line-height: 1.15;
}
/* the dotted path joining each stop to the one before it (every dot's centre sits on one line) */
.tstop + .tstop::before { content: ""; position: absolute; top: 46px; left: -50%; width: 100%; border-top: 5px dotted #e0b24a; z-index: 0; }
.tstop-dot {
  position: relative; z-index: 1; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-size: 1.4rem;
  margin: 22px 0 22px;   /* lines the small dots up with the middle of the big ones */
  background: #fff8e1; border: 4px solid #e0b24a; transition: transform .15s;
}
.tstop b { font-size: 0.82rem; font-weight: 600; }
.tstop small { font-size: 0.72rem; color: var(--muted); }
.tstop-meta { font-size: 0.75rem; font-weight: 600; color: #8a6400; background: var(--yellow-soft); border-radius: 999px; padding: 1px 8px; }
a.tstop:hover .tstop-dot { transform: scale(1.14); box-shadow: var(--glow-yellow); }
/* main tasks are much bigger */
.tstop-big { width: 200px; }
.tstop-big .tstop-dot {
  width: 96px; height: 96px; margin: 0; font-size: 2.6rem; border-width: 5px; border-color: var(--teal);
  background: radial-gradient(circle at 40% 35%, #fff, #dffaf6 70%, #9ff0e3); box-shadow: 0 0 0 6px rgba(0, 217, 200, .22), var(--glow-teal);
}
.tstop-big b { font-size: 1.08rem; font-weight: 700; color: var(--teal-dark); }
.tstop-done .tstop-dot { background: var(--yellow-soft); border-color: var(--gold); box-shadow: var(--glow-yellow); }
.tstop-done.tstop-big .tstop-dot { background: radial-gradient(circle at 40% 35%, #fff, #fff3b8 70%, #ffd84d); border-color: var(--gold); }
.tstop-next .tstop-dot { animation: neon-pulse 1.8s ease-in-out infinite; border-color: var(--pink); }
.tstop .island-flag { position: static; margin-top: 2px; }
.tstop-locked { opacity: .5; }
.tstop-locked .tstop-dot { background: #f6f2fa; border-color: var(--line); border-style: dashed; box-shadow: none; }
.key-dot { width: 22px; height: 22px; border-width: 3px; margin: 0; }
.key-big { width: 34px; height: 34px; border-color: var(--teal); background: #dffaf6; }

@media (max-width: 720px) {
  .tisland { width: 150px; }
  .ttreasure { width: 140px; }
  .tisland-land { width: 100px; height: 86px; }
  .tisland-emoji { font-size: 2.6rem; }
  .tisland b { font-size: 0.95rem; }
  .tstop { width: 96px; }
  .tstop-big { width: 150px; }
  .tstop-big .tstop-dot { width: 78px; height: 78px; font-size: 2.1rem; }
  .tstop-dot { margin: 13px 0; }
  .tstop + .tstop::before { top: 37px; }
}

/* ---------- login ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 420px; padding: 30px 28px; border-radius: 32px; text-align: center; background: #fff;
  border: 4px solid var(--teal); box-shadow: var(--glow-teal), 0 0 80px rgba(255, 210, 31, .3);
}
.login-logo { font-size: 4rem; line-height: 1; filter: drop-shadow(0 0 14px rgba(255, 210, 31, .8)); animation: bob 4s ease-in-out infinite; }
.login-form { display: flex; flex-direction: column; gap: 14px; margin: 18px 0 14px; text-align: left; }
.login-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.login-form input { font-size: 1.25rem; padding: 12px 14px; border-color: var(--teal-soft); }
.login-form .btn { margin-top: 6px; }

/* ---------- children (admin) ---------- */
.children { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 12px 0; }
.child-card { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.child-card > form { margin: 0; flex: 1; }
.child-pick {
  width: 100%; height: 100%; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left;
  font: inherit; color: var(--ink); cursor: pointer; padding: 14px 16px; border-radius: 20px;
  background: var(--teal-faint); border: 3px solid var(--teal-soft);
}
.child-pick b { font-size: 1.3rem; color: var(--teal-dark); }
.child-pick:hover { border-color: var(--teal); box-shadow: var(--glow-teal); }
.child-card.selected .child-pick { background: var(--yellow-faint); border-color: var(--yellow); box-shadow: var(--glow-yellow); cursor: default; }
.add-child summary, .delete-child summary { display: inline-flex; list-style: none; cursor: pointer; }
.add-child summary::-webkit-details-marker, .delete-child summary::-webkit-details-marker { display: none; }
.add-child[open] summary, .delete-child[open] summary { margin-bottom: 10px; }
.delete-child input { width: 100%; }

/* ---------- login: admin or student? ---------- */
.login-ask { font-size: 1.35rem; font-weight: 600; margin: 14px 0; color: var(--ink); }
.login-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.login-choice {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 10px; border-radius: 24px;
  text-decoration: none; color: var(--ink); background: var(--teal-faint); border: 3px solid var(--teal-soft); transition: transform .15s;
}
.login-choice:nth-child(2) { background: var(--yellow-faint); border-color: var(--yellow-soft); }
.login-choice span { font-size: 3rem; line-height: 1; }
.login-choice b { font-size: 1.4rem; color: var(--teal-dark); }
.login-choice:nth-child(2) b { color: #8a6400; }
.login-choice small { color: var(--muted); }
.login-choice:hover { transform: translateY(-4px); border-color: var(--teal); box-shadow: var(--glow-teal); }
.login-choice:nth-child(2):hover { border-color: var(--yellow); box-shadow: var(--glow-yellow); }
.login-card .back { margin: 6px 0 0; }

/* ---------- homework link ---------- */
.hw-link { align-self: flex-start; font-size: 1.15rem; }
.hw-link .small { font-weight: 400; opacity: .85; }

/* ---------- admin viewing the app as a child ---------- */
.admin-bar { position: relative; z-index: 1; text-align: center; padding: 8px 14px; background: var(--yellow-soft); color: #5a4300; border-bottom: 2px solid var(--yellow); font-size: 0.95rem; }
.admin-bar a { font-weight: 600; margin-left: 8px; }

.pill-admin { background: var(--yellow-soft); color: #5a4300; box-shadow: var(--glow-yellow); }

/* ---------- account details to share ---------- */
.share-card { margin: 12px 0; padding: 16px 18px; border-radius: 20px; background: var(--yellow-faint); border: 3px solid var(--yellow); box-shadow: var(--glow-yellow); }
.share-card h3 { margin-bottom: 10px; }
.share-card pre { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 2px dashed #e0b24a; font: 500 1.05rem/1.6 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
.add-child input { flex: 1; min-width: 150px; }

/* ---------- XP, five a day, SATs, leagues, feedback ---------- */
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { font-size: .78rem; font-weight: 500; color: var(--muted); }
.pill-xp { background: var(--purple-faint); color: var(--purple-dark); }
.tip-box { padding: 12px 16px; border-radius: 18px; background: var(--yellow-faint); border: 2px dashed var(--yellow); font-size: 1.05rem !important; text-align: left; }
.week { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.week-day { display: grid; place-items: center; gap: 2px; width: 54px; padding: 8px 0; border-radius: 16px; background: var(--purple-faint); border: 2px solid transparent; }
.week-day span { font-size: 1.5rem; line-height: 1.2; color: var(--muted); }
.week-day.done { background: var(--yellow-faint); border-color: var(--yellow); }
.week-day.today { border-color: var(--teal); box-shadow: var(--glow-teal); }
.week-day small { font-size: .8rem; color: var(--muted); }
.daily-choices { display: flex; flex-wrap: wrap; gap: 12px; }
.daily-choices .btn { display: grid; place-items: center; min-width: 96px; font-size: 2rem; line-height: 1.1; text-decoration: none; }
.daily-choices .btn small { font-size: .8rem; font-weight: 500; }
.sats-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.sats-step { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 20px; background: var(--white); border: 3px solid var(--teal-soft); text-decoration: none; color: var(--ink); }
.sats-step:hover { transform: translateY(-2px); border-color: var(--teal); }
.sats-step.done { background: var(--yellow-faint); border-color: var(--yellow); }
.sats-step.next { border-color: var(--pink); box-shadow: var(--glow-pink); }
.sats-num { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--teal-soft); font-weight: 700; color: var(--teal-dark); }
.sats-emoji { font-size: 1.8rem; }
.sats-name { display: flex; flex-direction: column; line-height: 1.2; }
.sats-name small { color: var(--muted); }
.paper-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.paper-card { display: grid; gap: 4px; padding: 16px; border-radius: 20px; background: var(--white); border: 3px solid var(--purple-soft); text-decoration: none; color: var(--ink); }
.paper-card:hover { transform: translateY(-2px); border-color: var(--purple); }
.paper-card small { color: var(--muted); }
.paper-icon { font-size: 2.2rem; }
.paper-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.paper-tools h1 { margin: 0 0 4px; }
.two-up { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.league-card { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin-bottom: 10px; border-radius: 20px; background: var(--white); border: 3px solid var(--yellow-soft); text-decoration: none; color: var(--ink); }
.league-card:hover { border-color: var(--yellow); transform: translateY(-2px); }
.league-rank { font-size: 1.6rem; font-weight: 700; color: var(--purple-dark); min-width: 52px; }
.league-name { display: flex; flex-direction: column; flex: 1; line-height: 1.25; }
.league-name small { color: var(--muted); }
.pin-input { text-transform: uppercase; letter-spacing: .3em; font-weight: 700; font-size: 1.4rem !important; text-align: center; }
.pin-show { display: inline-block; margin: 4px 0 0; padding: 8px 22px; border-radius: 16px; background: var(--white); border: 3px dashed var(--teal); font: 700 2rem ui-monospace, Menlo, monospace; letter-spacing: .25em; color: var(--teal-dark); user-select: all; }
.league-table { width: 100%; border-collapse: collapse; }
.league-table th { text-align: left; font-size: .85rem; color: var(--muted); padding: 4px 8px; }
.league-table td { padding: 8px; border-top: 2px solid var(--purple-faint); vertical-align: middle; }
.league-table tr.me td { background: var(--yellow-faint); }
.league-table .rank { font-size: 1.4rem; font-weight: 700; width: 48px; text-align: center; }
.league-table .player { display: flex; align-items: center; gap: 10px; }
.league-table .player > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.league-table small { color: var(--muted); }
.avatar-small { width: 40px; height: 40px; font-size: 1.4rem; background: var(--purple-faint); flex: none; }
.chat-log { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 18px; background: var(--purple-faint); margin-bottom: 12px; }
.chat-line { display: flex; align-items: flex-end; gap: 8px; }
.chat-line.mine { flex-direction: row-reverse; }
.chat-bubble { display: flex; flex-direction: column; padding: 8px 14px; border-radius: 18px; background: var(--white); font-size: 1.1rem; max-width: 80%; }
.chat-line.mine .chat-bubble { background: var(--teal-soft); }
.chat-bubble small { font-size: .72rem; color: var(--muted); }
.chat-keys { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-key { font: inherit; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--yellow); background: var(--yellow-faint); cursor: pointer; }
.chat-key:hover { background: var(--yellow-soft); transform: translateY(-1px); }
.feedback-form { max-width: 620px; }
.feedback-form textarea { font: inherit; padding: 12px 14px; border-radius: 16px; border: 3px solid var(--purple-soft); resize: vertical; }

/* the three tiny pop counters */
.pop-bars { position: fixed; left: 10px; bottom: 10px; z-index: 60; display: grid; gap: 4px; pointer-events: none; }
.pop-bar { position: relative; width: 92px; height: 20px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .85); border: 2px solid var(--purple-soft); font-size: .72rem; }
.pop-bar b { position: relative; display: block; text-align: center; line-height: 16px; color: var(--ink); }
.pop-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--yellow-soft); transition: width .25s; }
.pop-bubbles .pop-fill { background: var(--teal-soft); }
.pop-speed .pop-fill { background: #ffc2e0; }
.pop-bar.bump { animation: pop-bump .3s; }
@keyframes pop-bump { 40% { transform: scale(1.12); } }

/* ---------- printable practice papers ---------- */
.paper { max-width: 800px; margin: 0 auto; padding: 28px 32px; background: #fff; border-radius: 12px; border: 2px solid var(--line); color: #111; position: relative; z-index: 1; }
.paper-head { border-bottom: 3px solid #111; padding-bottom: 12px; margin-bottom: 18px; }
.paper-head h1 { margin: 0; font-size: 1.6rem; color: #111; text-shadow: none; }
.paper-head p { margin: 2px 0 10px; }
.paper-who { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: .95rem; }
.paper-questions { margin: 0; padding-left: 0; list-style: none; counter-reset: q; }
.paper-q { position: relative; counter-increment: q; padding: 14px 70px 14px 44px; border-bottom: 1px solid #bbb; break-inside: avoid; }
.paper-q::before { content: counter(q); position: absolute; left: 0; top: 14px; width: 30px; height: 30px; border: 2px solid #111; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .95rem; }
.paper-text { margin: 2px 0 8px; font-size: 1.15rem; white-space: pre-wrap; }
.paper-questions.arithmetic { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.paper-questions.arithmetic .paper-text { font-size: 1.3rem; font-weight: 600; }
.paper-pic { display: flex; justify-content: flex-start; margin: 6px 0 10px; }
.paper-pic > * { max-width: 360px; }
.paper-box { width: 190px; height: 46px; border: 2px solid #111; border-radius: 6px; margin-top: 8px; }
.paper-questions.arithmetic .paper-box { height: 64px; width: 100%; max-width: 230px; }
.paper-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 4px 0; font-size: 1.05rem; }
.paper-choices span { padding: 4px 8px; border: 1px solid #888; border-radius: 6px; white-space: pre-wrap; }
.paper-hint { margin: 4px 0 0; font-size: .8rem; color: #555; }
.paper-mark { position: absolute; right: 0; bottom: 14px; font-size: .75rem; color: #444; border: 1px solid #888; border-radius: 4px; padding: 1px 6px; }
.paper-answers { margin-top: 28px; padding-top: 16px; border-top: 3px solid #111; break-before: page; }
.paper-answers h2 { color: #111; text-shadow: none; }
.paper-key { columns: 3; column-gap: 24px; padding-left: 26px; }
.paper-key li { break-inside: avoid; padding: 2px 0; }
@media print {
  .topbar, .tabs, .foot, .version, .donate, .admin-bar, .bubble-layer, .pop-bars, .no-print, .modal { display: none !important; }
  body { background: #fff !important; }
  .wrap { max-width: none; padding: 0; }
  .paper { border: 0; border-radius: 0; padding: 0; max-width: none; }
  .paper-pic svg, .paper-pic * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  @page { margin: 14mm; }
}
@media (max-width: 560px) { .paper { padding: 16px; } .paper-questions.arithmetic { grid-template-columns: 1fr; } .paper-key { columns: 2; } }
/* the row of tabs is long now: keep each on one line and let a narrow screen scroll sideways */
.tabs { justify-content: safe center; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; flex: none; }
.paper-head h1, .paper-answers h2 { background: none; -webkit-text-fill-color: #111; filter: none; text-shadow: none; }

/* ---------- SATs tracker and on-screen papers ---------- */
.tracker-link { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 14px 18px; border-radius: 22px; background: linear-gradient(135deg, var(--purple-faint), var(--teal-faint)); border: 3px solid var(--purple-soft); text-decoration: none; color: var(--ink); }
.tracker-link:hover { border-color: var(--purple); transform: translateY(-2px); }
.tracker-link > span:first-child { font-size: 2.2rem; }
.tracker-link > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.tracker-link small { color: var(--muted); }
.tracker-papers { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.tracker-paper { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 20px; background: var(--white); border: 3px solid var(--teal-soft); }
.tracker-paper.tp-1 { border-color: var(--yellow-soft); } .tracker-paper.tp-2 { border-color: #ffc2e0; }
.tracker-paper .btn { margin-top: auto; text-align: center; }
.tracker-big { font-size: 2.4rem; font-weight: 700; color: var(--purple-dark); line-height: 1; }
.tracker-paper small { color: var(--muted); }
.up { color: #0fa873; font-weight: 700; } .down { color: #e11d48; font-weight: 700; }
.tracker-chart { width: 100%; height: auto; }
.tracker-chart .grid { stroke: #e6dcee; stroke-width: 1; }
.tracker-chart .lbl { font: 600 12px "Fredoka", sans-serif; fill: var(--muted); }
.tracker-chart .trace { fill: none; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.tracker-chart .dot { stroke: #fff; stroke-width: 2; }
.tc-0 { stroke: var(--teal); fill: var(--teal); background: var(--teal); }
.tc-1 { stroke: #e0a800; fill: #e0a800; background: #e0a800; }
.tc-2 { stroke: var(--pink); fill: var(--pink); background: var(--pink); }
.tracker-chart polyline.tc-0, .tracker-chart polyline.tc-1, .tracker-chart polyline.tc-2 { fill: none; }
.tracker-key { display: flex; flex-wrap: wrap; gap: 14px; font-size: .9rem; }
.tracker-key i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 6px; vertical-align: -2px; }
.topic-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) 2fr 48px; align-items: center; gap: 10px; padding: 6px 0; }
.topic-bar { height: 14px; border-radius: 999px; background: var(--purple-faint); overflow: hidden; }
.topic-bar span { display: block; height: 100%; border-radius: 999px; }
.topic-bar .good { background: #19c98f; } .topic-bar .ok { background: var(--yellow); } .topic-bar .low { background: var(--pink); }
.paper-record { padding: 12px 18px; }
.paper-record .form-row { align-items: center; }
.paper-record input { width: 80px; }
.paper-timer { position: sticky; top: 8px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 800px; margin: 0 auto 12px; padding: 10px 16px; border-radius: 18px; background: var(--white); border: 3px solid var(--teal); box-shadow: var(--glow-teal); font-size: 1.2rem; }
.paper-timer.hurry { border-color: var(--pink); box-shadow: var(--glow-pink); }
.paper.on-screen .paper-choices.screen { grid-template-columns: 1fr 1fr; }
.paper-choice { font: inherit; font-size: 1.05rem; text-align: left; padding: 8px 12px; border-radius: 10px; border: 2px solid #aaa; background: #fff; cursor: pointer; white-space: pre-wrap; }
.paper-choice:hover:not(:disabled) { border-color: var(--teal); }
.paper-choice.chosen { border-color: var(--purple); background: var(--purple-faint); font-weight: 600; }
.paper-choice.right { border-color: #19c98f; background: #dcfff4; }
.paper-q.marked-right::after { content: "✓"; position: absolute; right: 6px; top: 10px; color: #0fa873; font-size: 1.8rem; font-weight: 700; }
.paper-q.marked-wrong::after { content: "✗"; position: absolute; right: 6px; top: 10px; color: #e11d48; font-size: 1.8rem; font-weight: 700; }
.paper-q.marked-wrong .paper-choice.chosen { border-color: #e11d48; background: #fff1f3; }
.paper-why { margin: 6px 0 0; font-size: .95rem; color: #555; }
.paper-result { margin-bottom: 16px; }
.result-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
@media print { .paper-record, .paper-timer, .paper-result { display: none !important; } }
.paper-count { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.paper-count select { font: inherit; padding: 6px 10px; border-radius: 12px; border: 2px solid var(--purple-soft); }

/* the 100-task SATs journey */
.badge-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.sbadge { display: grid; place-items: center; gap: 2px; padding: 10px 6px; border-radius: 18px; background: #f4f1f8; border: 2px dashed var(--line); text-align: center; opacity: .7; }
.sbadge.won { opacity: 1; background: var(--yellow-faint); border: 3px solid var(--yellow); box-shadow: var(--glow-yellow); }
.sbadge.final { border-color: var(--purple-soft); }
.sbadge.final.won { background: linear-gradient(135deg, #fff3b8, #ffe0f0); border-color: var(--pink); box-shadow: var(--glow-pink); }
.badge-emoji { font-size: 2.2rem; line-height: 1.1; }
.sbadge b { font-size: .85rem; line-height: 1.15; }
.sbadge small { font-size: .72rem; color: var(--muted); }
.stage summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.stage summary::-webkit-details-marker { display: none; }
.stage[open] summary { margin-bottom: 12px; }
.stage-emoji { font-size: 2rem; }
.stage-name { display: flex; flex-direction: column; flex: 1; line-height: 1.2; }
.stage-name small { color: var(--muted); }
.stage-bar { width: 120px; height: 12px; border-radius: 999px; background: var(--purple-faint); overflow: hidden; flex: none; }
.stage-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--yellow)); }
.stage.locked { opacity: .65; }
.sats-step.locked { border-style: dashed; color: var(--muted); cursor: default; }
.certificate { text-align: center; background: linear-gradient(135deg, #fff3b8, #ffe0f0, #dcfaf6); border: 4px solid var(--yellow); }
