/* ==========================================================================
   kids_learn — visual design system
   --------------------------------------------------------------------------
   Aesthetic: playful, toy-like. Big rounded shapes. Candy-pastel canvas
   with vibrant accent colours. Chunky shadows that "lift" buttons like
   plastic toys. Wobble + bounce micro-interactions.
   ========================================================================== */

:root {
  /* surfaces */
  --bg-1: #fff7e8;            /* warm cream — main app background */
  --bg-2: #ffeec9;
  --card: #ffffff;
  --ink: #2c2545;             /* deep plum instead of pure black */
  --ink-soft: #6b6388;
  --muted: #f1edff;

  /* module colours — each module owns one */
  --c-numbers:  #ff8a65;       /* coral */
  --c-letters:  #4fc3f7;       /* sky */
  --c-animals:  #7cd992;       /* mint */
  --c-quiz:     #b48cff;       /* lavender */
  --c-rewards:  #ffd84d;       /* sunshine */
  --c-progress: #ff7eb6;       /* bubblegum */

  /* feedback */
  --good: #2ecc71;
  --bad:  #ff7675;

  /* shape system */
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 32px;
  --r-xl: 44px;

  /* shadows — chunky offset to feel like toys */
  --shadow-toy:  0 6px 0 rgba(44, 37, 69, 0.18), 0 12px 28px rgba(44, 37, 69, 0.12);
  --shadow-pop:  0 10px 0 rgba(44, 37, 69, 0.22), 0 20px 40px rgba(44, 37, 69, 0.15);
  --shadow-soft: 0 4px 18px rgba(44, 37, 69, 0.10);
}

/* ---------- base ---------------------------------------------------------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Nunito", "Cairo", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%,  #ffe3f0 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, #d9f4ff 0%, transparent 45%),
    radial-gradient(circle at 50% 100%, #fff3c4 0%, transparent 50%),
    var(--bg-1);
  background-attachment: fixed;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* HTML [hidden] attribute must beat any display:* — user CSS otherwise
   overrides the UA default `[hidden]{display:none}`, which silently
   un-hides elements like .btn[hidden]. */
[hidden] { display: none !important; }

/* Arabic — swap to a font with full Arabic support (Cairo) and slightly
   larger base size so diacritics + dots stay readable for toddlers. */
html[lang="ar"], html[lang="ar"] body {
  font-family: "Cairo", "Tajawal", "Noto Naskh Arabic", system-ui, sans-serif;
}
html[lang="ar"] { font-size: 17px; }

h1, h2, h3, h4, .display {
  font-family: "Fredoka", "Baloo 2", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
/* Display headings in Arabic — Fredoka has no Arabic glyphs, fall back. */
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] .display,
html[lang="ar"] .lesson .word,
html[lang="ar"] .lesson .big,
html[lang="ar"] .tile .label,
html[lang="ar"] .btn,
html[lang="ar"] .option {
  font-family: "Cairo", "Tajawal", "Noto Naskh Arabic", system-ui, sans-serif;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* sprinkled decorative dots on the background */
body::before, body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  width: 280px; height: 280px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  z-index: -1;
}
body::before { background: #ffd6e8; top: -60px; left: -60px; }
body::after  { background: #cfeaff; bottom: -80px; right: -60px; }

/* ---------- layout ------------------------------------------------------- */
.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 18px 80px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  margin-bottom: 22px;
}

.topbar .who {
  display: flex; align-items: center; gap: 12px;
  font-weight: 700;
}
.topbar .avatar {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 26px;
  background: var(--muted);
  border-radius: 50%;
}
.topbar .pill {
  background: linear-gradient(135deg, #ffd84d, #ffb443);
  color: #5b3b00;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 16px;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: var(--shadow-soft);
}

.back-btn, .icon-btn {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--card);
  font-size: 22px;
  box-shadow: var(--shadow-soft);
  transition: transform 120ms ease;
}
.back-btn:active, .icon-btn:active { transform: scale(0.92); }

/* ---------- hero on home page -------------------------------------------- */
.hero {
  text-align: center;
  padding: 28px 14px 8px;
}
.hero .greet {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.1;
}
.hero .greet em {
  font-style: normal;
  background: linear-gradient(135deg, #ff7eb6, #b48cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 18px;
}

/* ---------- big tile grid (home) ----------------------------------------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 22px;
}
@media (min-width: 720px) {
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

.tile {
  --tone: var(--c-numbers);
  display: flex; flex-direction: column;
  justify-content: space-between;
  min-height: 170px;
  padding: 22px 22px 20px;
  border-radius: var(--r-xl);
  background: var(--card);
  border: 4px solid var(--tone);
  box-shadow: var(--shadow-toy);
  transition: transform 160ms cubic-bezier(.34,1.56,.64,1), box-shadow 160ms;
  position: relative;
  overflow: hidden;
}
.tile::before {
  content: "";
  position: absolute; inset: -40% -10% auto auto;
  width: 180px; height: 180px;
  background: var(--tone);
  opacity: 0.18;
  border-radius: 50%;
}
.tile:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: var(--shadow-pop); }
.tile:active { transform: translateY(2px) scale(0.99); }

.tile .icon {
  font-size: 64px;
  line-height: 1;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,0.08));
}
.tile .label {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 24px;
  margin-top: auto;
}
.tile.t-numbers  { --tone: var(--c-numbers); }
.tile.t-letters  { --tone: var(--c-letters); }
.tile.t-animals  { --tone: var(--c-animals); }
.tile.t-quiz     { --tone: var(--c-quiz); }
.tile.t-rewards  { --tone: var(--c-rewards); }
.tile.t-progress { --tone: var(--c-progress); }

/* stagger entrance */
.tile { opacity: 0; transform: translateY(20px); animation: rise 0.6s cubic-bezier(.34,1.56,.64,1) forwards; }
.tile:nth-child(1) { animation-delay: 0.05s; }
.tile:nth-child(2) { animation-delay: 0.12s; }
.tile:nth-child(3) { animation-delay: 0.19s; }
.tile:nth-child(4) { animation-delay: 0.26s; }
.tile:nth-child(5) { animation-delay: 0.33s; }
.tile:nth-child(6) { animation-delay: 0.40s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- lesson card (numbers / letters / animals) -------------------- */
.lesson {
  margin-top: 8px;
  background: var(--card);
  border-radius: var(--r-xl);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-toy);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lesson.l-numbers { background: linear-gradient(180deg, #fff3ec 0%, var(--card) 60%); border: 4px solid var(--c-numbers); }
.lesson.l-letters { background: linear-gradient(180deg, #e8f7ff 0%, var(--card) 60%); border: 4px solid var(--c-letters); }
.lesson.l-animals { background: linear-gradient(180deg, #ecfbef 0%, var(--card) 60%); border: 4px solid var(--c-animals); }

.lesson .big {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: clamp(120px, 28vw, 220px);
  line-height: 1;
  margin: 4px 0 10px;
  background: linear-gradient(180deg, var(--ink) 0%, #5a4d8c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lesson .objects {
  font-size: clamp(36px, 8vw, 64px);
  line-height: 1.2;
  margin-bottom: 16px;
}
.lesson .word {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: clamp(28px, 6vw, 44px);
  color: var(--ink);
}
.lesson .illustration {
  font-size: clamp(110px, 26vw, 200px);
  line-height: 1;
  margin: 10px 0 12px;
  display: inline-block;
  animation: wobble 3.6s ease-in-out infinite;
}
@keyframes wobble {
  0%, 100% { transform: rotate(-4deg); }
  50%      { transform: rotate(4deg); }
}

.lesson .nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  padding: 16px 26px;
  border-radius: 999px;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 22px;
  color: white;
  background: var(--c-quiz);
  box-shadow: var(--shadow-toy);
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,0.18); }
.btn.ghost { background: var(--card); color: var(--ink); }
.btn.ghost.dark { background: var(--muted); }
.btn.repeat { background: var(--c-rewards); color: #5b3b00; }
.btn.play   { background: var(--c-quiz); }
.btn.next   { background: var(--c-animals); color: #1f5230; }
.btn.prev   { background: var(--card); color: var(--ink); }
.btn.big    { font-size: 26px; padding: 18px 32px; }
.btn[disabled] { opacity: 0.4; pointer-events: none; }

/* ---------- quiz --------------------------------------------------------- */
.quiz {
  text-align: center;
  margin-top: 6px;
}
.quiz .prompt {
  background: var(--card);
  border-radius: var(--r-xl);
  padding: 28px 22px;
  box-shadow: var(--shadow-toy);
}
.quiz .prompt h2 {
  font-size: clamp(24px, 5vw, 36px);
  margin-bottom: 12px;
}
.quiz .counters {
  display: flex; justify-content: center; gap: 16px;
  margin: 10px 0 18px;
  font-weight: 800;
  color: var(--ink-soft);
}
.quiz .counters span b {
  color: var(--ink);
  font-size: 22px;
}
.quiz .objects-large { font-size: clamp(48px, 12vw, 88px); }
.quiz .target-letter {
  font-family: "Fredoka", sans-serif;
  font-size: clamp(80px, 18vw, 140px);
  font-weight: 600;
  color: var(--c-letters);
}
.quiz .target-name {
  font-family: "Fredoka", sans-serif;
  font-size: clamp(40px, 9vw, 72px);
  font-weight: 600;
  color: var(--c-animals);
  word-break: keep-all;
}
.quiz .target-sound {
  font-family: "Fredoka", sans-serif;
  font-size: clamp(40px, 8vw, 64px);
}

.options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}
.option {
  background: var(--card);
  border: 4px solid var(--c-quiz);
  border-radius: var(--r-lg);
  padding: 22px 8px;
  box-shadow: var(--shadow-toy);
  font-family: "Fredoka", sans-serif;
  font-size: 28px;
  cursor: pointer;
  transition: transform 140ms cubic-bezier(.34,1.56,.64,1), background 140ms, border-color 140ms;
}
.option .emoji { display:block; font-size: 56px; line-height:1; margin-bottom: 4px; }
.option:hover { transform: translateY(-3px) rotate(-1deg); }
.option:active { transform: translateY(2px); }
.option.correct { background: #d9f7d9; border-color: var(--good); animation: pop 0.5s ease; }
.option.wrong   { background: #ffe1e1; border-color: var(--bad);  animation: shake 0.5s ease; }
.option[disabled] { pointer-events: none; }

@keyframes pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* feedback toast */
.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translate(-50%, 120%);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 14px 26px;
  font-family: "Fredoka", sans-serif;
  font-size: 22px;
  font-weight: 600;
  box-shadow: var(--shadow-pop);
  border: 4px solid var(--c-rewards);
  z-index: 50;
  transition: transform 320ms cubic-bezier(.34,1.56,.64,1);
  max-width: 90vw;
  text-align: center;
}
.toast.show { transform: translate(-50%, 0); }
.toast.good { border-color: var(--good); }
.toast.bad  { border-color: var(--bad); }

/* ---------- rewards page ------------------------------------------------- */
.stars-banner {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(135deg, #ffe27a, #ffb443);
  color: #5b3b00;
  font-family: "Fredoka", sans-serif;
  font-size: 38px;
  padding: 22px;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-toy);
  text-align: center;
}
.stars-banner .star {
  font-size: 56px;
  animation: spin 6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.badge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 22px;
}
@media (min-width: 720px) {
  .badge-grid { grid-template-columns: repeat(3, 1fr); }
}
.badge-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow-toy);
  border: 4px dashed #e6e0f3;
  transition: transform 160ms ease;
}
.badge-card.earned {
  border-style: solid;
  border-color: var(--c-rewards);
  background: linear-gradient(180deg, #fff7d4, var(--card));
}
.badge-card.earned:hover { transform: rotate(-3deg) scale(1.03); }
.badge-card .badge-emoji {
  font-size: 64px; line-height: 1;
  filter: grayscale(1) opacity(0.45);
}
.badge-card.earned .badge-emoji {
  filter: none;
  animation: wobble 4s ease-in-out infinite;
}
.badge-card .badge-name {
  font-family: "Fredoka", sans-serif;
  font-size: 22px;
  margin-top: 8px;
}
.badge-card .badge-req {
  color: var(--ink-soft); font-weight: 700; margin-top: 4px;
}

/* ---------- progress page ------------------------------------------------ */
.progress-section { margin-top: 22px; }
.progress-row {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
}
.progress-row header {
  display: flex; align-items: center; justify-content: space-between;
  font-family: "Fredoka", sans-serif;
  font-size: 22px;
  margin-bottom: 10px;
}
.progress-row .count { color: var(--ink-soft); font-weight: 800; }
.bar {
  height: 18px;
  background: var(--muted);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.bar > span {
  display: block; height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tone, var(--c-quiz)), color-mix(in srgb, var(--tone, var(--c-quiz)) 70%, white));
  transition: width 600ms cubic-bezier(.34,1.56,.64,1);
}
.bar > span.t-numbers  { --tone: var(--c-numbers); background: linear-gradient(90deg, var(--c-numbers), #ffc8a8); }
.bar > span.t-letters  { --tone: var(--c-letters); background: linear-gradient(90deg, var(--c-letters), #b9e6ff); }
.bar > span.t-animals  { --tone: var(--c-animals); background: linear-gradient(90deg, var(--c-animals), #c3edd0); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}
@media (min-width: 720px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.stat .v { font-family: "Fredoka", sans-serif; font-size: 36px; }
.stat .k { color: var(--ink-soft); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- parent area -------------------------------------------------- */
.parent-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
}
.parent-card h3 { margin-bottom: 12px; font-size: 22px; }
.parent-card label { display:block; font-weight: 700; margin-bottom: 6px; }
.parent-card input[type="text"], .parent-card input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid #e6e0f3;
  font-size: 16px;
  font-family: inherit;
}
.parent-card .danger { color: #b3261e; }
.parent-card .row { display: flex; gap: 12px; flex-wrap: wrap; }

.recent-list {
  list-style: none; padding: 0; margin: 0;
  max-height: 320px; overflow-y: auto;
}
.recent-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #ece6f7;
  font-size: 15px;
}
.recent-list li:last-child { border-bottom: none; }
.recent-list .ok  { color: var(--good); font-weight: 800; }
.recent-list .no  { color: var(--bad);  font-weight: 800; }

/* ---------- celebration overlay ----------------------------------------- */
.celebrate {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(44, 37, 69, 0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
}
.celebrate.show { display: flex; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.celebrate .panel {
  background: var(--card);
  border-radius: var(--r-xl);
  padding: 36px 30px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow-pop);
  border: 6px solid var(--c-rewards);
  animation: pop 0.5s ease;
}
.celebrate .panel .emoji {
  font-size: 92px;
  display: inline-block;
  animation: spin 2.4s ease-in-out infinite;
}
.celebrate .panel h2 {
  font-size: 32px;
  margin: 10px 0 6px;
}
.celebrate .panel p { color: var(--ink-soft); font-size: 18px; }

/* ---------- mini stripe at top showing module colour --------------------- */
.module-strip {
  height: 8px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.module-strip.s-numbers { background: var(--c-numbers); }
.module-strip.s-letters { background: var(--c-letters); }
.module-strip.s-animals { background: var(--c-animals); }
.module-strip.s-quiz    { background: var(--c-quiz); }
.module-strip.s-rewards { background: var(--c-rewards); }
.module-strip.s-progress{ background: var(--c-progress); }

/* ---------- accessibility ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

button:focus-visible, a:focus-visible, .option:focus-visible {
  outline: 4px solid var(--c-letters);
  outline-offset: 4px;
}

/* ==========================================================================
   Language switcher (three flag buttons in the topbar)
   ========================================================================== */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--muted);
  border-radius: 999px;
  padding: 4px;
}
.lang-switch a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  transition: transform 120ms ease, background 120ms;
}
.lang-switch a:hover  { transform: scale(1.1); }
.lang-switch a:active { transform: scale(0.92); }
.lang-switch a.active {
  background: var(--card);
  box-shadow: 0 2px 0 rgba(44,37,69,0.1), 0 4px 12px rgba(44,37,69,0.08);
}

/* On narrow screens, hide the "Hi, name!" greeting text but keep the avatar */
@media (max-width: 520px) {
  .topbar .who span:not(.avatar) { display: none; }
  .lang-switch a { width: 34px; height: 34px; font-size: 18px; }
}

/* ==========================================================================
   RTL (Arabic) — direction-aware tweaks
   --------------------------------------------------------------------------
   Most of the layout uses flex/grid which auto-mirrors. These rules only
   adjust the few decorative elements anchored to specific edges.
   ========================================================================== */
[dir="rtl"] .tile::before {
  /* the decorative bubble in the corner of each tile — flip to other side */
  inset: -40% auto auto -10%;
}
[dir="rtl"] .topbar .who { flex-direction: row-reverse; }

/* When the prev/next arrows are wrapped in .arrow, flip them visually
   so they still read "back" / "forward" in RTL contexts. */
[dir="rtl"] .arrow-flip { display: inline-block; transform: scaleX(-1); }

/* Arabic numerals inside .pill — keep them LTR so the star count reads
   naturally regardless of language */
.topbar .pill .count { unicode-bidi: isolate; direction: ltr; }

/* Slightly larger emoji-letter for Arabic (compensates for diacritics) */
html[lang="ar"] .lesson .big {
  font-size: clamp(140px, 32vw, 240px);
  line-height: 1.1;
}

/* ==========================================================================
   Gender-based colour themes (applied via class on <body>)
   --------------------------------------------------------------------------
   theme-neutral → the default colourful palette (no overrides needed)
   theme-boy     → blue-dominant
   theme-girl    → rose-dominant

   Each theme overrides the module-colour CSS variables and the body
   gradient so every tile, button, pill and stat re-tints automatically.
   ========================================================================== */

/* ---------- 💙 Boy ---------- */
body.theme-boy {
  --c-numbers:  #4a9eff;   /* sky blue */
  --c-letters:  #2e7df5;   /* royal blue */
  --c-animals:  #5dd9d9;   /* turquoise */
  --c-quiz:     #6a78ff;   /* indigo */
  --c-rewards:  #ffd84d;   /* keep warm gold for contrast */
  --c-progress: #7ec8ff;   /* ocean */

  background:
    radial-gradient(circle at 10% 0%,  #cfe6ff 0%, transparent 45%),
    radial-gradient(circle at 90% 10%, #b7e0ff 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, #d2f1ff 0%, transparent 55%),
    #eaf4ff;
  background-attachment: fixed;
}

/* ---------- 💗 Girl ---------- */
body.theme-girl {
  --c-numbers:  #ff7eb6;   /* bubblegum */
  --c-letters:  #ff5ea2;   /* hot pink */
  --c-animals:  #c69bff;   /* lavender */
  --c-quiz:     #e94c89;   /* magenta */
  --c-rewards:  #ffb86b;   /* peach */
  --c-progress: #ff8aa3;   /* coral-pink */

  background:
    radial-gradient(circle at 10% 0%,  #ffd6ec 0%, transparent 45%),
    radial-gradient(circle at 90% 10%, #ffe1f0 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, #ffe9f1 0%, transparent 55%),
    #fff0f7;
  background-attachment: fixed;
}

/* The .pill (star count) inherits theme colour for a stronger identity */
body.theme-boy  .pill { background: #e3f0ff; color: #1d4f99; }
body.theme-girl .pill { background: #ffe1ee; color: #9b2c63; }

/* Theme picker (radio cards) for the parent form */
.theme-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.theme-picker label {
  flex: 1; min-width: 110px;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: var(--muted);
  border: 3px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  user-select: none;
  transition: transform 120ms, border-color 120ms, background 120ms;
}
.theme-picker label:hover { transform: translateY(-2px); }
.theme-picker input[type="radio"] { display: none; }
.theme-picker input:checked + label,
.theme-picker label.checked {
  border-color: var(--c-quiz);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.theme-picker .swatch {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.theme-picker .swatch.boy     { background: linear-gradient(135deg, #4a9eff 50%, #6a78ff 50%); }
.theme-picker .swatch.girl    { background: linear-gradient(135deg, #ff5ea2 50%, #c69bff 50%); }
.theme-picker .swatch.neutral { background: conic-gradient(#ff8a65, #4fc3f7, #7cd992, #b48cff, #ffd84d, #ff7eb6); }

/* Speech-speed slider styling */
.speed-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.speed-row input[type="range"] {
  flex: 1; min-width: 200px;
  -webkit-appearance: none; appearance: none;
  height: 10px; border-radius: 99px;
  background: linear-gradient(to right, var(--c-letters), var(--c-quiz));
  outline: none;
}
.speed-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--c-quiz);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}
.speed-row input[type="range"]::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--c-quiz);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}
.speed-row .speed-val {
  min-width: 56px; text-align: center;
  font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 18px;
  color: var(--c-quiz);
}

/* Voice picker layout */
.voice-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.voice-row select {
  flex: 1; min-width: 220px;
  padding: 12px 14px;
  border: 3px solid var(--muted);
  border-radius: 12px;
  font-size: 15px;
  background: var(--card);
  font-family: inherit;
}

/* ==========================================================================
   FIX — class-name mismatch left over from the i18n refactor
   The rewards/progress templates use .badges/.badge and .bars/.fill, but the
   original CSS only had .badge-grid/.badge-card and .progress-row/.bar>span.
   These rules implement the styling that the templates were assuming.
   ========================================================================== */

/* --- rewards page: badge cards --- */
.badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 22px;
}
.badge {
  background: linear-gradient(180deg, #fff7d4, var(--card));
  border: 4px solid var(--c-rewards);
  border-radius: var(--r-lg);
  padding: 22px 14px;
  text-align: center;
  box-shadow: var(--shadow-toy);
  transition: transform 160ms ease;
}
.badge:not(.locked):hover { transform: rotate(-3deg) scale(1.03); }
.badge.locked {
  background: var(--card);
  border-style: dashed;
  border-color: #e6e0f3;
  opacity: 0.75;
}
.badge .ico {
  font-size: 56px;
  line-height: 1;
  margin-bottom: 8px;
  animation: wobble 4s ease-in-out infinite;
}
.badge.locked .ico { animation: none; filter: grayscale(1) opacity(0.55); }
.badge .name {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
}
.badge .hint { color: var(--ink-soft); font-weight: 700; margin-top: 4px; }

/* --- progress page: stacked bars --- */
.bars { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.bars .bar {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
  height: auto;          /* override the 18px .bar from progress-row block */
}
.bars .bar .lbl {
  display: flex; justify-content: space-between;
  font-family: "Fredoka", sans-serif;
  font-size: 20px; font-weight: 600;
  margin-bottom: 10px;
  color: var(--ink);
}
.bars .bar .lbl b { color: var(--c-quiz); }
.bars .bar .track {
  height: 18px;
  background: var(--muted);
  border-radius: 999px;
  overflow: hidden;
}
.bars .bar .fill {
  display: block; height: 100%;
  border-radius: 999px;
  background: var(--c-quiz);
  transition: width 600ms cubic-bezier(.34,1.56,.64,1);
}
.bars .bar .fill.n { background: linear-gradient(90deg, var(--c-numbers), #ffc8a8); }
.bars .bar .fill.l { background: linear-gradient(90deg, var(--c-letters), #b9e6ff); }
.bars .bar .fill.a { background: linear-gradient(90deg, var(--c-animals), #c3edd0); }

/* --- progress page: stat cards .big/.lbl inside .stat-grid --- */
.stat .big {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: clamp(22px, 4vw, 30px);
  color: var(--ink);
}
.stat .lbl {
  margin-top: 4px;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 14px;
}

/* parent dashboard grid wrapper — mobile-first single column */
.parent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 880px;
  margin: 0 auto;
}


/* ==========================================================================
   TABLET-LANDSCAPE LAYER — kicks in on screens ≥ 1024px wide
   --------------------------------------------------------------------------
   Covers iPad mini landscape (1024w), all bigger iPads landscape, and
   common Android tablets landscape (1280×800 etc.). Layers on top of the
   existing mobile-first rules — none of those are overridden when the
   viewport is small, so phones keep their current look.
   ========================================================================== */
@media (min-width: 1024px) {

  /* container: centre with breathing room, but cap so things don't sprawl */
  .app {
    max-width: 1180px;
    padding: 28px 40px 40px;
  }

  /* topbar: more space, larger pill */
  .topbar {
    padding: 14px 22px;
    margin-bottom: 22px;
  }
  .topbar .who { font-size: 22px; }
  .topbar .avatar { width: 54px; height: 54px; font-size: 30px; }
  .topbar .pill { font-size: 20px; padding: 10px 18px; }
  .lang-switch a { width: 44px; height: 44px; font-size: 24px; }

  /* hero: larger, more generous */
  .hero { margin: 18px 0 8px; }
  .hero .greet { font-size: clamp(44px, 5.5vw, 64px); line-height: 1.05; }
  .hero .sub { font-size: 22px; margin-top: 10px; }

  /* home tiles: bigger and roomier */
  .tiles {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 32px;
  }
  .tile {
    min-height: 220px;
    padding: 28px 26px 24px;
  }
  .tile .icon { font-size: clamp(72px, 7vw, 92px); }
  .tile .label { font-size: clamp(22px, 2vw, 26px); }

  /* lesson page: oversize the big character */
  .lesson { padding: 48px 40px 40px; }
  .lesson .big { font-size: clamp(220px, 26vw, 320px); }
  .lesson .illustration { font-size: clamp(120px, 14vw, 180px); }
  .lesson .word { font-size: clamp(34px, 3.5vw, 48px); }
  .lesson .nav { gap: 22px; margin-top: 28px; }
  .lesson .nav .btn { font-size: 22px; padding: 16px 28px; }

  /* The letter/number/animal strip below the lesson — fit nicely on one row */
  .lesson + div .icon-btn { width: 50px; height: 50px; font-size: 22px; }

  /* QUIZ — side-by-side: prompt on the left, options on the right
     The "Back to games" link is the 3rd child of .quiz and spans both cols. */
  .quiz {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(0, 1.4fr);
    grid-template-areas:
      "prompt options"
      "back   back";
    gap: 36px;
    align-items: stretch;
    margin-top: 18px;
  }
  .quiz .prompt {
    grid-area: prompt;
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .quiz .prompt h2 { font-size: clamp(28px, 3.5vw, 44px); margin-bottom: 18px; }
  .quiz .target-letter { font-size: clamp(160px, 18vw, 220px); }
  .quiz .target-name   { font-size: clamp(72px, 11vw, 130px); }
  .quiz .target-sound  { font-size: clamp(56px, 6vw, 80px); }
  .quiz .objects-large { font-size: clamp(80px, 10vw, 120px); }
  .quiz .counters { font-size: 20px; margin-top: 22px; }
  .quiz .counters span b { font-size: 26px; }
  .quiz .options {
    grid-area: options;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 0;
    align-self: center;
  }
  .quiz .option {
    padding: 30px 12px;
    font-size: 36px;
    min-height: 160px;
  }
  .quiz .option .emoji { font-size: 78px; margin-bottom: 6px; }
  .quiz > div:last-child { grid-area: back; text-align: center; margin-top: 8px; }

  /* rewards: badges go 6-wide on a big screen */
  .badges { grid-template-columns: repeat(6, 1fr); gap: 18px; }
  .badge { padding: 26px 14px; }
  .badge .ico { font-size: 64px; }

  /* progress: stat grid stays 4-wide (already does at 720) but bigger */
  .stat-grid { gap: 18px; margin-top: 22px; }
  .stat { padding: 24px 20px; }
  .stat .big { font-size: clamp(28px, 2.8vw, 38px); }
  .bars .bar { padding: 22px 26px; }
  .bars .bar .track { height: 24px; }

  /* parent dashboard: two-column card grid on landscape */
  .parent-grid { grid-template-columns: 1fr 1fr; gap: 24px; max-width: 1080px; }
  /* keep the danger zone + bottom links spanning both columns */
  .parent-grid > div:nth-last-child(-n+2) { grid-column: 1 / -1; }
}

/* Extra-wide landscape (iPad Pro 12.9", desktop): a touch more space */
@media (min-width: 1280px) {
  .app { max-width: 1280px; }
  .tiles { gap: 32px; }
  .tile { min-height: 240px; }
  .lesson .big { font-size: clamp(260px, 24vw, 360px); }
  .quiz { gap: 48px; }
  .quiz .option { min-height: 180px; }
}

/* ==========================================================================
   Custom lessons — parent-authored content
   --------------------------------------------------------------------------
   Covers: wizard stepper, image upload grid, recording UI, slideshow player,
   and lesson-theme palettes that mirror the body theme but apply to a
   specific scope (so a "boy"-themed lesson stays blue even inside a
   neutral-themed profile, and vice versa).
   ========================================================================== */

/* ---- stepper ---------------------------------------------------------- */
.stepper {
  display: flex;
  gap: 8px;
  margin: 16px auto 22px;
  max-width: 720px;
  flex-wrap: wrap;
  justify-content: center;
}
.stepper .step {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--muted);
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  transition: background 120ms;
}
.stepper .step .dot {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: var(--card);
  border-radius: 50%;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
}
.stepper .step.current {
  background: var(--c-quiz);
  color: white;
  box-shadow: var(--shadow-soft);
}
.stepper .step.current .dot { background: rgba(255,255,255,0.25); color: white; }
.stepper .step.done {
  background: #e6f5e3;
  color: #2e7d2e;
}
.stepper .step.done .dot { background: #2e7d2e; color: white; }
.stepper .step.done .dot::after { content: " ✓"; }
.stepper .step.todo { opacity: 0.55; }

/* ---- form ------------------------------------------------------------ */
.lesson-form {
  max-width: 640px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.lesson-form .form-row { display: flex; flex-direction: column; gap: 6px; }
.lesson-form label {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  color: var(--ink);
}
.lesson-form input[type="text"],
.lesson-form input[type="number"],
.lesson-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 3px solid var(--muted);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  background: var(--card);
  color: var(--ink);
  box-sizing: border-box;
}
.lesson-form input:focus,
.lesson-form textarea:focus {
  outline: none;
  border-color: var(--c-quiz);
}
.lesson-form .form-actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px;
}
.lesson-form .form-error {
  background: #fff1f1;
  border: 2px solid #ffcdcd;
  color: #a13030;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
}

/* range slider sized like the speech-rate one */
.lesson-form input[type="range"] {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 10px; border-radius: 99px;
  background: linear-gradient(to right, var(--c-letters), var(--c-quiz));
}
.lesson-form input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px;
  border-radius: 50%; background: var(--card);
  border: 3px solid var(--c-quiz); cursor: pointer;
}
.lesson-form input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%; background: var(--card);
  border: 3px solid var(--c-quiz); cursor: pointer;
}

/* ---- image drop + grid ----------------------------------------------- */
.image-drop {
  display: block;
  max-width: 720px; margin: 0 auto 18px;
  border: 3px dashed var(--c-letters);
  border-radius: var(--r-lg);
  background: var(--card);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  color: var(--ink-soft);
  font-weight: 700;
  transition: background 120ms, border-color 120ms, transform 120ms;
}
.image-drop:hover, .image-drop.drag {
  background: #f0f8ff;
  border-color: var(--c-quiz);
  transform: translateY(-1px);
}
.image-drop.busy { opacity: 0.6; pointer-events: none; }
.image-drop .drop-inner .ico {
  font-size: 56px; line-height: 1; margin-bottom: 10px;
}

.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  max-width: 920px;
  margin: 0 auto;
}
.img-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: var(--muted);
  box-shadow: var(--shadow-soft);
  cursor: grab;
  transition: transform 120ms;
}
.img-card.dragging { opacity: 0.45; transform: scale(0.96); }
.img-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-card .del-btn {
  position: absolute; top: 6px; right: 6px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55); color: white;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  display: grid; place-items: center;
}
.img-card .del-btn:hover { background: #c63838; }
.img-card .audio-badge {
  position: absolute; bottom: 6px; left: 6px;
  background: rgba(46, 125, 46, 0.92); color: white;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px; font-weight: 800;
}

/* ---- record stage ---------------------------------------------------- */
.record-stage {
  max-width: 640px; margin: 0 auto;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.rec-counter {
  font-family: "Fredoka", sans-serif;
  font-weight: 700; font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
/* Image wrapper — flexbox centering (works reliably for <img> children)
   plus a viewport-relative height range so the slide scales with screen.
   .size-small / .size-medium / .size-large set the height ceiling. */
.rec-image-wrap, .lp-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--muted);
  border-radius: var(--r-md);
  overflow: hidden;
  width: 100%;
  margin: 0 auto;
}
.rec-image-wrap.size-small,
.lp-image-wrap.size-small  { height: 30vh; min-height: 220px; }
.rec-image-wrap.size-medium,
.lp-image-wrap.size-medium { height: 48vh; min-height: 280px; }
.rec-image-wrap.size-large,
.lp-image-wrap.size-large  { height: 66vh; min-height: 360px; }

.rec-image-wrap img, .lp-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;     /* belt-and-braces for inline-image edge cases */
  transition: opacity 240ms;
}

/* Image-size picker (radio cards) used in step 1 metadata form */
.size-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.size-picker input[type="radio"] { display: none; }
.size-picker label {
  flex: 1; min-width: 110px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--muted);
  border: 3px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  user-select: none;
  transition: transform 120ms, border-color 120ms, background 120ms;
}
.size-picker label:hover { transform: translateY(-2px); }
.size-picker input:checked + label {
  border-color: var(--c-quiz);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.size-picker .size-preview {
  background: var(--c-quiz);
  border-radius: 4px;
  flex-shrink: 0;
  opacity: 0.6;
}
.size-picker .size-preview.size-small  { width: 18px; height: 14px; }
.size-picker .size-preview.size-medium { width: 26px; height: 20px; }
.size-picker .size-preview.size-large  { width: 34px; height: 26px; }
.rec-state {
  min-height: 22px;
  font-weight: 700;
  color: var(--c-quiz);
  margin: 12px 0 6px;
}
.rec-actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin: 12px 0 8px;
}
.btn.record {
  background: #ff5252;
  color: white;
  font-size: 22px;
}
.btn.record::before {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  background: white; border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
body.is-recording .btn.record { display: none; }
.btn.stop {
  background: #555; color: white; font-size: 20px;
  animation: recPulse 1.1s ease-in-out infinite;
}
@keyframes recPulse {
  0%,100% { box-shadow: 0 6px 18px rgba(255,82,82,0.5); }
  50%     { box-shadow: 0 6px 30px rgba(255,82,82,0.9); }
}
.btn.next-rec { background: var(--c-quiz); color: white; }
.rec-nav {
  display: flex; gap: 10px; justify-content: center;
  margin-top: 10px;
}

/* ---- lesson player (preview + child playback) ----------------------- */
.lesson-player {
  max-width: 880px; margin: 0 auto;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.lp-counter {
  font-family: "Fredoka", sans-serif;
  font-weight: 700; font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.lp-image-wrap { position: relative; }
.lp-end {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--c-rewards), var(--c-quiz));
  color: white;
  display: grid; place-items: center; align-content: center;
  cursor: pointer;
}
.lp-end .emoji { font-size: 88px; line-height: 1; }
.lp-end p {
  margin-top: 6px;
  font-family: "Fredoka", sans-serif;
  font-weight: 600; font-size: 32px;
}

.lp-progress {
  height: 6px; background: var(--muted);
  border-radius: 99px; overflow: hidden;
  margin: 14px 0;
}
.lp-progress > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--c-letters), var(--c-quiz));
  width: 0%;
}
.lp-nav { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- parent lesson list cards --------------------------------------- */
.lesson-cards {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.lesson-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
  border-top: 6px solid var(--c-quiz);
  display: flex; flex-direction: column; gap: 8px;
}
.lesson-card .lc-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.lesson-card h3 {
  font-family: "Fredoka", sans-serif; font-weight: 600;
  font-size: 22px; flex: 1; line-height: 1.2;
}
.lesson-card .lc-status {
  font-size: 12px; font-weight: 800;
  padding: 4px 10px; border-radius: 999px;
  background: var(--muted); color: var(--ink-soft);
  white-space: nowrap;
}
.lesson-card .lc-status.lc-published { background: #e6f5e3; color: #2e7d2e; }
.lesson-card .lc-author { color: var(--ink-soft); font-size: 13px; }
.lesson-card .lc-objective { font-size: 14px; line-height: 1.4; color: var(--ink); }
.lesson-card .lc-meta { color: var(--ink-soft); font-size: 13px; }
.lesson-card .lc-actions {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px;
}
.lesson-card .lc-actions .btn { padding: 8px 14px; font-size: 14px; }

/* ---- lesson-scoped themes -------------------------------------------
   These mirror body.theme-boy / theme-girl but apply only to the scoped
   element, so a "boy" lesson shows blue even when the profile is neutral.
   --------------------------------------------------------------------- */
.lesson-theme-boy {
  --c-numbers:  #4a9eff;
  --c-letters:  #2e7df5;
  --c-animals:  #5dd9d9;
  --c-quiz:     #6a78ff;
  --c-rewards:  #ffd84d;
  --c-progress: #7ec8ff;
}
.lesson-theme-girl {
  --c-numbers:  #ff7eb6;
  --c-letters:  #ff5ea2;
  --c-animals:  #c69bff;
  --c-quiz:     #e94c89;
  --c-rewards:  #ffb86b;
  --c-progress: #ff8aa3;
}
/* lesson-theme-neutral inherits the body theme */

/* ---- tablet-landscape adjustments ----------------------------------- */
@media (min-width: 1024px) {
  .lesson-form { max-width: 720px; padding: 32px; }
  .record-stage { max-width: 760px; padding: 32px; }
  .lesson-player { max-width: 1040px; padding: 28px; }
  .img-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
  .stepper .step { font-size: 16px; padding: 10px 18px; }
  .stepper .step .dot { width: 30px; height: 30px; }
}
