/* ───────── Cubby — global styles ───────── */
:root {
  /* honey palette — default */
  --c-bg: #FFF6E7;
  --c-bg-sky: #FFE7A8;
  --c-primary: #FF8B42;
  --c-primary-dark: #E66A20;
  --c-secondary: #38B6C4;
  --c-secondary-dark: #1E8896;
  --c-accent: #FFC93C;
  --c-pink: #FF6FA5;
  --c-success: #4CC76A;
  --c-success-dark: #2FA34E;
  --c-purple: #8E73E8;
  --c-ink: #2A2440;
  --c-ink-soft: #5A4F7B;
  --c-cloud: #FFFFFF;
  --c-shadow: 0 6px 0 rgba(40, 28, 70, 0.18);
  --c-shadow-soft: 0 8px 24px rgba(40, 28, 70, 0.18);
  --c-grass: #84D26B;
  --c-grass-dark: #5BB247;
  --c-sky-1: #BEEAF7;
  --c-sky-2: #FFF6E7;
}

[data-palette="berry"] {
  --c-bg: #FFEEF6;
  --c-bg-sky: #FAD4EA;
  --c-primary: #E94A8B;
  --c-primary-dark: #C92F70;
  --c-secondary: #7E5BEF;
  --c-secondary-dark: #5C3CC4;
  --c-accent: #FFC23C;
  --c-pink: #FF8FB7;
  --c-success: #3CC689;
  --c-success-dark: #28A06D;
  --c-purple: #9A6AE4;
  --c-grass: #9EDB7F;
  --c-grass-dark: #6FB458;
  --c-sky-1: #FCE0EE;
  --c-sky-2: #FFEEF6;
}

[data-palette="meadow"] {
  --c-bg: #EDFBE5;
  --c-bg-sky: #C9F0DB;
  --c-primary: #2FA34E;
  --c-primary-dark: #1F7D38;
  --c-secondary: #FF8B42;
  --c-secondary-dark: #E66A20;
  --c-accent: #FFD23C;
  --c-pink: #FF6FA5;
  --c-success: #4CC76A;
  --c-success-dark: #2FA34E;
  --c-grass: #84D26B;
  --c-grass-dark: #5BB247;
  --c-sky-1: #C9F0DB;
  --c-sky-2: #EDFBE5;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overscroll-behavior: none; }
body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--c-bg);
  color: var(--c-ink);
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; }

h1, h2, h3 { font-family: 'Fredoka', sans-serif; font-weight: 600; margin: 0; }

/* ───────── app shell ───────── */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.scene {
  flex: 1; position: relative; display: flex; flex-direction: column;
  background: linear-gradient(to bottom, var(--c-sky-1) 0%, var(--c-sky-2) 70%);
}

/* ───────── Cubby logo ───────── */
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: 'Fredoka', sans-serif; }
.logo-mark {
  width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFD66C, var(--c-primary) 75%);
  display: grid; place-items: center; color: white; font-weight: 700;
  box-shadow: 0 4px 0 rgba(40,28,70,.18);
  position: relative;
}
.logo-mark::after {
  content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,.6); top: 8px; left: 10px; filter: blur(1px);
}
.logo-text {
  font-size: 26px; color: var(--c-primary-dark); font-weight: 600; letter-spacing: -0.5px;
}
.logo-text .ub { color: var(--c-secondary-dark); }

/* ───────── big puffy button ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Fredoka', sans-serif; font-size: 20px; font-weight: 600;
  padding: 14px 28px; border: 0; border-radius: 999px; color: white;
  background: var(--c-primary); cursor: pointer; box-shadow: var(--c-shadow);
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
  position: relative; user-select: none;
}
.btn:hover { background: var(--c-primary-dark); }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(40,28,70,.18); }
.btn.green { background: var(--c-success); } .btn.green:hover { background: var(--c-success-dark); }
.btn.blue  { background: var(--c-secondary); } .btn.blue:hover { background: var(--c-secondary-dark); }
.btn.ghost { background: transparent; color: var(--c-ink-soft); box-shadow: none; }
.btn.ghost:hover { background: rgba(0,0,0,.05); }
.btn.lg { font-size: 26px; padding: 18px 40px; }
.btn.sm { font-size: 16px; padding: 10px 18px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ───────── card / panel ───────── */
.card {
  background: white; border-radius: 24px; padding: 24px;
  box-shadow: 0 8px 0 rgba(40,28,70,.08), 0 16px 30px rgba(40,28,70,.08);
}

/* ───────── decorative bg ───────── */
.bg-clouds {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.cloud {
  position: absolute; background: white; border-radius: 50%;
  filter: drop-shadow(0 6px 0 rgba(40,28,70,.04));
  opacity: 0.85;
}

/* ───────── grass strip ───────── */
.grass {
  position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
  background: linear-gradient(to bottom, var(--c-grass), var(--c-grass-dark));
  border-top-left-radius: 50% 24px;
  border-top-right-radius: 50% 24px;
}

/* ───────── floating sticker (used a lot) ───────── */
.sticker {
  background: white; border-radius: 28px; padding: 14px 18px;
  box-shadow: 0 6px 0 rgba(40,28,70,.12); display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; color: var(--c-ink);
}

/* ───────── pulse animation ───────── */
@keyframes pulse-soft { 0%, 100% { transform: scale(1);} 50% { transform: scale(1.04);} }
.pulse { animation: pulse-soft 1.6s ease-in-out infinite; }

@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-8px);} }
.bob { animation: bob 2.4s ease-in-out infinite; }

@keyframes float-rise {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

@keyframes pop-burst {
  0% { transform: scale(1); opacity: 1; }
  60% { transform: scale(1.4); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes confetti-fall {
  0% { transform: translateY(-100vh) rotate(0); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0.6; }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}
.wiggle { animation: wiggle .5s ease-in-out infinite; }

@keyframes pop-in {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}
.pop-in { animation: pop-in .35s cubic-bezier(.34,1.56,.64,1) both; }

@keyframes gift-reveal {
  0% { transform: scale(.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ───────── speech bubble ───────── */
.bubble {
  position: relative; background: white; border-radius: 28px;
  padding: 18px 26px; font-family: 'Fredoka', sans-serif; font-size: 28px;
  font-weight: 500; color: var(--c-ink); max-width: 460px;
  box-shadow: 0 6px 0 rgba(40,28,70,.12);
}
.bubble::after {
  content: ""; position: absolute; bottom: -14px; left: 38px;
  width: 0; height: 0; border-left: 14px solid transparent;
  border-right: 14px solid transparent; border-top: 16px solid white;
  filter: drop-shadow(0 4px 0 rgba(40,28,70,.06));
}
.bubble.right::after { left: auto; right: 38px; }

/* ───────── top bar ───────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; gap: 16px; position: relative; z-index: 4;
}
.topbar .pill {
  background: white; padding: 8px 16px; border-radius: 999px;
  box-shadow: 0 3px 0 rgba(40,28,70,.1); display: inline-flex; align-items: center;
  gap: 8px; font-weight: 700; color: var(--c-ink);
}

/* ───────── profile-picker ───────── */
.profile-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
  max-width: 1100px; margin: 0 auto;
}
.profile-card {
  background: white; border-radius: 28px; padding: 22px 16px; text-align: center;
  border: 4px solid transparent; cursor: pointer; transition: all .15s ease;
  box-shadow: 0 6px 0 rgba(40,28,70,.12);
}
.profile-card:hover { transform: translateY(-4px); }
.profile-card.active { border-color: var(--c-primary); }
.profile-card .avatar-wrap {
  width: 140px; height: 140px; margin: 0 auto 12px; border-radius: 50%;
  background: linear-gradient(135deg, #FFE5B4, #FFD08A); display: grid; place-items: center;
  overflow: hidden;
}
.profile-card .name { font-family: 'Fredoka', sans-serif; font-size: 22px; font-weight: 600; color: var(--c-ink); }
.profile-card .meta { color: var(--c-ink-soft); font-size: 14px; margin-top: 4px; font-weight: 600; }
.profile-card .lock {
  margin-top: 10px; display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--c-ink-soft); background: #F4F0FA;
  padding: 4px 10px; border-radius: 999px; font-weight: 700;
}

/* ───────── child home program tiles ───────── */
.program-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.program-tile {
  border-radius: 28px; padding: 22px 16px 18px; cursor: pointer; text-align: center;
  color: white; position: relative; transition: transform .15s ease;
  box-shadow: 0 8px 0 rgba(40,28,70,.18);
  min-height: 220px; display: flex; flex-direction: column; justify-content: space-between;
}
.program-tile:hover { transform: translateY(-6px); }
.program-tile .title-row { font-family: 'Fredoka', sans-serif; font-size: 26px; font-weight: 700; line-height: 1; }
.program-tile .age { font-size: 14px; opacity: .9; margin-top: 6px; font-weight: 700; }
.program-tile .icon-area { font-size: 60px; margin: 14px auto; }
.program-tile.recommended::after {
  content: "★ for you"; position: absolute; top: -10px; right: 14px;
  background: var(--c-accent); color: var(--c-ink); font-size: 12px;
  font-weight: 800; padding: 4px 12px; border-radius: 999px; font-family: 'Fredoka', sans-serif;
  letter-spacing: 0.5px;
}

/* ───────── lesson map ───────── */
.map-scene {
  flex: 1; background: linear-gradient(to bottom, #B7E3F8 0%, #84D26B 60%, #5BB247 100%);
  position: relative; overflow: hidden;
}
.map-step {
  position: absolute; width: 64px; height: 64px; border-radius: 50%;
  background: white; display: grid; place-items: center;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 26px;
  color: var(--c-ink-soft); box-shadow: 0 4px 0 rgba(40,28,70,.18);
  cursor: pointer; transition: transform .15s ease;
  border: 4px solid rgba(255,255,255,.7);
}
.map-step:hover { transform: scale(1.08); }
.map-step.done { background: var(--c-success); color: white; }
.map-step.current { background: var(--c-primary); color: white; transform: scale(1.15); box-shadow: 0 6px 0 var(--c-primary-dark); }
.map-step.locked { background: #DCDCEA; color: #B0B0C4; cursor: not-allowed; }

/* ───────── lesson container ───────── */
.lesson-stage {
  position: relative; flex: 1; display: flex; flex-direction: column;
  background: linear-gradient(to bottom, #BEEAF7, #DAF4FC 50%, #84D26B 60%, #5BB247);
  overflow: hidden;
}
.lesson-hud {
  position: absolute; top: 14px; left: 0; right: 0; z-index: 12; display: flex;
  justify-content: space-between; padding: 0 22px; pointer-events: none;
}
.lesson-hud > * { pointer-events: auto; }
.heart-bar {
  display: flex; gap: 4px; background: white; padding: 6px 12px; border-radius: 999px;
  box-shadow: 0 3px 0 rgba(40,28,70,.1); align-items: center;
}
.progress-pill {
  background: white; padding: 6px 14px; border-radius: 999px; font-weight: 800;
  box-shadow: 0 3px 0 rgba(40,28,70,.1); font-family: 'Fredoka', sans-serif;
  display: inline-flex; gap: 8px; align-items: center;
}

/* ───────── balloon ───────── */
.balloon {
  position: absolute; width: 110px; height: 130px; cursor: pointer;
  display: grid; place-items: center;
  transition: transform .1s ease;
}
.balloon:hover { transform: scale(1.06); }
.balloon-body {
  width: 100%; height: 100%; position: relative;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.15));
}
.balloon-letter {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 50px; color: white;
  text-shadow: 0 2px 0 rgba(0,0,0,.15);
}

/* ───────── pop burst ───────── */
.burst {
  position: absolute; inset: 0; pointer-events: none;
  animation: pop-burst .35s ease-out forwards;
}

/* ───────── letter box (round 3) ───────── */
.letter-box {
  width: 140px; height: 140px; border-radius: 28px;
  background: linear-gradient(180deg, #FFD66C, #FFB23C); cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 8px 0 rgba(40,28,70,.18);
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 90px; color: white;
  text-shadow: 0 3px 0 rgba(0,0,0,.2);
  transition: transform .15s ease;
  border: 6px solid white;
}
.letter-box:hover { transform: translateY(-4px); }
.letter-box.wrong { animation: shake .4s; }
.letter-box.correct { background: linear-gradient(180deg, #75E58F, #4CC76A); }
@keyframes shake {
  0%,100%{ transform: translateX(0);}
  20%{ transform: translateX(-10px);} 40%{ transform: translateX(10px);}
  60%{ transform: translateX(-6px);} 80%{ transform: translateX(6px);}
}

/* ───────── picture card (round 4) ───────── */
.pic-card {
  background: white; border-radius: 28px; padding: 18px; cursor: pointer;
  box-shadow: 0 8px 0 rgba(40,28,70,.12); border: 6px solid white;
  transition: transform .15s ease; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.pic-card:hover { transform: translateY(-4px); }
.pic-card.wrong { animation: shake .4s; }
.pic-card.correct { border-color: var(--c-success); }
.pic-card .pic-frame {
  width: 220px; height: 220px; border-radius: 22px;
  background: linear-gradient(180deg, #D7F1FF, #B7E3F8); display: grid; place-items: center;
}
.pic-card .sound-btn {
  width: 56px; height: 56px; border-radius: 50%; background: var(--c-secondary);
  border: 0; color: white; display: grid; place-items: center;
  box-shadow: 0 4px 0 var(--c-secondary-dark); cursor: pointer;
}
.pic-card .sound-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--c-secondary-dark); }

/* ───────── spelling word ───────── */
.word-card {
  background: white; border-radius: 32px; padding: 28px 36px;
  box-shadow: 0 10px 0 rgba(40,28,70,.12); display: inline-flex; gap: 6px; align-items: center;
}
.spell-letter {
  display: inline-grid; place-items: center;
  font-family: 'Fredoka', sans-serif; font-size: 100px; font-weight: 600; color: var(--c-ink);
  cursor: pointer; padding: 0 8px; border-radius: 16px;
  transition: all .12s ease; user-select: none;
}
.spell-letter.target { color: var(--c-primary); }
.spell-letter:hover.target { background: #FFF1E0; }
.spell-letter.found { background: var(--c-success); color: white; }
.spell-letter.wrong { animation: shake .4s; color: var(--c-pink); }

/* ───────── celebration overlay ───────── */
.celebrate {
  position: absolute; inset: 0; pointer-events: none; z-index: 30;
}
.confetti-piece {
  position: absolute; width: 12px; height: 18px; top: -20px;
  animation: confetti-fall 2.4s linear forwards;
}

/* ───────── parent dashboard ───────── */
.dash-grid {
  display: grid; grid-template-columns: 320px 1fr; gap: 24px; padding: 24px;
  max-width: 1280px; margin: 0 auto; width: 100%;
}
.dash-side {
  background: white; border-radius: 24px; padding: 18px;
  box-shadow: 0 8px 0 rgba(40,28,70,.08);
}
.dash-main {
  background: white; border-radius: 24px; padding: 28px;
  box-shadow: 0 8px 0 rgba(40,28,70,.08);
}
.side-profile {
  display: flex; gap: 12px; align-items: center; padding: 12px;
  border-radius: 16px; cursor: pointer; transition: background .15s;
}
.side-profile:hover { background: #FAF6FF; }
.side-profile.active { background: #FFF2E5; }
.side-profile .av {
  width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #FFE5B4, #FFD08A);
  flex-shrink: 0; display: grid; place-items: center;
}
.side-profile .nm { font-weight: 700; font-family: 'Fredoka', sans-serif; font-size: 18px; }
.side-profile .ag { font-size: 13px; color: var(--c-ink-soft); font-weight: 700; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  background: linear-gradient(180deg, #FFF8EC, #FFEFCF); border-radius: 18px;
  padding: 16px; text-align: left;
}
.stat .num { font-family: 'Fredoka', sans-serif; font-size: 36px; font-weight: 700; color: var(--c-primary-dark); }
.stat .label { color: var(--c-ink-soft); font-weight: 700; font-size: 13px; line-height: 1.2; }

.program-row {
  display: grid; grid-template-columns: 1fr 1fr 80px; gap: 14px; align-items: center;
  padding: 14px; border-radius: 16px; background: #FAF6FF; margin-top: 10px;
}
.program-row .name { font-weight: 800; font-family: 'Fredoka', sans-serif; font-size: 18px; }
.program-row .bar { height: 12px; background: #E6E0F4; border-radius: 999px; overflow: hidden; }
.program-row .bar > i { display: block; height: 100%; background: var(--c-success); border-radius: 999px; }

/* ───────── grown-ups door ───────── */
.grownups-door {
  position: absolute; top: 18px; right: 22px; background: white;
  padding: 10px 18px; border-radius: 999px; box-shadow: 0 4px 0 rgba(40,28,70,.12);
  font-family: 'Fredoka', sans-serif; font-weight: 600; color: var(--c-secondary-dark);
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; z-index: 5;
  border: 0;
}
.grownups-door:hover { background: var(--c-secondary); color: white; }

/* ───────── settings list ───────── */
.setting-row {
  display: grid; grid-template-columns: 220px 1fr auto; gap: 16px; align-items: center;
  padding: 16px; border-radius: 16px; transition: background .15s;
}
.setting-row + .setting-row { border-top: 1px solid #F0EBFA; }
.setting-row .lbl { font-weight: 700; color: var(--c-ink); }
.setting-row .val { color: var(--c-ink-soft); }
.setting-row .ctrl input[type="text"] {
  border: 2px solid #E6E0F4; border-radius: 12px; padding: 8px 14px;
  font-family: inherit; font-size: 16px; outline: none; width: 240px;
}
.setting-row .ctrl input[type="text"]:focus { border-color: var(--c-primary); }
.setting-row .ctrl select {
  border: 2px solid #E6E0F4; border-radius: 12px; padding: 8px 14px;
  font-family: inherit; font-size: 16px; outline: none; background: white;
}

/* ───────── parent gate (math challenge for grown-ups) ───────── */
.gate-overlay {
  position: fixed; inset: 0; background: rgba(40,28,70,.5);
  display: grid; place-items: center; z-index: 1000;
}
.gate-card {
  background: white; border-radius: 28px; padding: 32px; max-width: 460px;
  text-align: center; box-shadow: var(--c-shadow-soft);
}
.gate-card h2 { color: var(--c-secondary-dark); font-size: 26px; margin-bottom: 8px; }
.gate-options { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.gate-options button {
  width: 76px; height: 76px; border-radius: 18px; border: 3px solid var(--c-secondary);
  background: white; color: var(--c-secondary-dark); font-family: 'Fredoka', sans-serif;
  font-size: 32px; font-weight: 700; cursor: pointer;
}
.gate-options button:hover { background: var(--c-secondary); color: white; }

/* mascot stage positioning helpers */
.mascot-stage { position: relative; min-height: 320px; }
.mascot-stage .mascot { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); }

/* ───────── responsive ───────── */
@media (max-width: 1100px) {
  .program-grid { grid-template-columns: repeat(3, 1fr); }
  .dash-grid { grid-template-columns: 240px 1fr; padding: 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .topbar { padding: 12px 16px; gap: 10px; flex-wrap: wrap; }
  .logo-text { font-size: 22px; }
  .logo-mark { width: 38px; height: 38px; }

  .profile-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .profile-card { padding: 18px 12px; }
  .profile-card .avatar-wrap { width: 110px; height: 110px; }

  .program-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 16px; }
  .program-tile { min-height: 180px; padding: 16px 12px 14px; }
  .program-tile .title-row { font-size: 22px; }
  .program-tile .icon-area { font-size: 48px; margin: 10px auto; }

  .dash-grid { grid-template-columns: 1fr; padding: 14px; gap: 14px; }
  .dash-main, .dash-side { padding: 18px; }

  .setting-row { grid-template-columns: 1fr; gap: 8px; padding: 14px; }
  .setting-row .ctrl input[type="text"] { width: 100%; }

  .bubble { font-size: 22px; padding: 14px 20px; max-width: 90vw; }
  .btn { font-size: 18px; padding: 12px 22px; }
  .btn.lg { font-size: 22px; padding: 16px 30px; }

  .balloon { width: 84px; height: 100px; }
  .balloon-letter { font-size: 38px; }

  .letter-box { width: 100px; height: 100px; border-radius: 22px; font-size: 64px; border-width: 4px; }

  .pic-card { padding: 12px; border-width: 4px; }
  .pic-card .pic-frame { width: 160px; height: 160px; }
  .pic-card .sound-btn { width: 48px; height: 48px; }

  .word-card { padding: 20px 22px; border-radius: 26px; }
  .spell-letter { font-size: 64px; padding: 0 4px; }

  .map-step { width: 52px; height: 52px; font-size: 20px; border-width: 3px; }

  .grownups-door { top: 12px; right: 14px; padding: 8px 14px; font-size: 14px; }
  .gate-card { padding: 24px; margin: 16px; }
  .gate-options button { width: 60px; height: 60px; font-size: 26px; border-radius: 14px; }

  .lesson-hud { padding: 0 14px; top: 10px; }
}

@media (max-width: 480px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-card .avatar-wrap { width: 96px; height: 96px; }

  .program-grid { grid-template-columns: 1fr; }

  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 12px; }
  .stat .num { font-size: 28px; }

  .program-row { grid-template-columns: 1fr; gap: 8px; padding: 12px; }

  .bubble { font-size: 18px; padding: 12px 16px; border-radius: 22px; }
  .btn { font-size: 16px; padding: 10px 18px; }
  .btn.lg { font-size: 18px; padding: 14px 24px; }

  .balloon { width: 70px; height: 86px; }
  .balloon-letter { font-size: 32px; }

  .letter-box { width: 78px; height: 78px; font-size: 50px; border-radius: 18px; border-width: 3px; }

  .pic-card .pic-frame { width: 130px; height: 130px; border-radius: 18px; }
  .pic-card { gap: 8px; }

  .word-card { padding: 16px; border-radius: 22px; }
  .spell-letter { font-size: 48px; }

  .topbar { padding: 10px 12px; }
  .topbar .pill { padding: 6px 12px; font-size: 14px; }

  .map-step { width: 44px; height: 44px; font-size: 18px; }
}

/* tall-phone landscape — keep lesson elements visible */
@media (max-height: 520px) and (orientation: landscape) {
  .mascot-stage { min-height: 200px; }
  .bubble { font-size: 20px; padding: 12px 18px; }
  .balloon { width: 80px; height: 96px; }
  .letter-box { width: 96px; height: 96px; font-size: 60px; }
}
