/* ============================================================
   Pronoun Parade - Stylesheet
   ============================================================ */

/* ============================================================
   1. VARIABLES & RESET
   ============================================================ */
:root {
  --sky: #c9f0ff;
  --sea: #79d6f9;
  --leaf: #82d173;
  --sun: #ffd166;
  --coral: #ff8c6b;
  --ink: #24415a;
  --paper: rgba(255, 255, 255, 0.86);
  --paper-strong: #ffffff;
  --shadow: 0 18px 45px rgba(36, 65, 90, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 209, 102, 0.45), transparent 25%),
    linear-gradient(160deg, #9be4ff 0%, #b8f6d2 50%, #fff3c4 100%);
  background-size: 100% 100%, 100% 100%, 180% 180%;
  animation: dreamySky 18s ease-in-out infinite;
}

button {
  font: inherit;
}

/* ============================================================
   2. BACKGROUND EFFECTS (Sky, Sparkles, Particles)
   ============================================================ */
.sky-glow {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.65;
  z-index: 0;
  pointer-events: none;
  animation: glowFloat 10s ease-in-out infinite;
}

.sky-glow-left {
  top: -100px;
  left: -80px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(121, 214, 249, 0.38) 45%, transparent 72%);
}

.sky-glow-right {
  right: -90px;
  bottom: 12%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 140, 107, 0.3) 42%, transparent 72%);
  animation-delay: -4s;
}

.floating-sparkles,
.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.floating-sparkles {
  z-index: 0;
}

.sparkle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 209, 102, 0.85) 35%, transparent 75%);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.8);
  animation: sparkleFloat 8s linear infinite;
}

.sparkle::before,
.sparkle::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.85);
  transform: translate(-50%, -50%);
}

.sparkle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.sparkle-1 { top: 9%; left: 10%; animation-duration: 10s; }
.sparkle-2 { top: 18%; right: 14%; animation-duration: 12s; animation-delay: -2s; }
.sparkle-3 { top: 44%; left: 7%; animation-duration: 9s; animation-delay: -4s; }
.sparkle-4 { top: 60%; right: 9%; animation-duration: 11s; animation-delay: -6s; }
.sparkle-5 { top: 78%; left: 18%; animation-duration: 13s; animation-delay: -1s; }
.sparkle-6 { top: 72%; right: 24%; animation-duration: 9s; animation-delay: -5s; }

.fx-layer {
  z-index: 30;
}

.particle-burst {
  position: fixed;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  opacity: 0.95;
  animation: particleFly 900ms ease-out forwards;
}

.particle-burst.star {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 92%, 50% 71%, 21% 92%, 32% 57%, 2% 35%, 39% 35%);
}

.particle-burst.confetti {
  border-radius: 6px;
}

/* ============================================================
   3. LAYOUT (Page Shell, Hero, Game Layout)
   ============================================================ */
.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.hero-copy,
.hero-card,
.card {
  background: var(--paper);
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-copy {
  padding: 28px;
}

.hero-copy::after,
.hero-card::after,
.card::after,
.result-card::after,
.question-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.4), transparent 32%, transparent 66%, rgba(255, 255, 255, 0.28));
  opacity: 0.85;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #1b6f8f;
}

h1,
h2 {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  margin: 0;
}

h1 {
  font-size: clamp(2.6rem, 4vw, 4.5rem);
  line-height: 0.95;
  color: #114b6b;
}

.hero-text {
  margin: 16px 0 0;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.hero-card {
  padding: 22px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(237, 252, 255, 0.95)),
    repeating-linear-gradient(135deg, rgba(121, 214, 249, 0.08) 0 18px, rgba(255, 255, 255, 0) 18px 36px);
}

.mascot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.mascot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(36, 65, 90, 0.12);
  animation: mascotBob 3.4s ease-in-out infinite;
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.mascot.happy {
  animation: mascotHappy 600ms ease;
  box-shadow: 0 8px 24px rgba(130, 209, 115, 0.4);
}

.mascot.sad {
  animation: mascotSad 600ms ease;
  box-shadow: 0 8px 24px rgba(255, 140, 107, 0.3);
}

.mascot.excited {
  animation: mascotExcited 800ms ease;
  box-shadow: 0 8px 28px rgba(255, 209, 102, 0.5);
}

.mascot:nth-child(2) { animation-delay: -0.7s; }
.mascot:nth-child(3) { animation-delay: -1.1s; }
.mascot:nth-child(4) { animation-delay: -1.8s; }
.mascot:nth-child(5) { animation-delay: -2.4s; }

.speech-bubble {
  margin: 18px 0 0;
  padding: 12px 18px;
  border-radius: 18px;
  background: #ffffff;
  font-size: 1.05rem;
  text-align: center;
  transition: transform 300ms ease, opacity 300ms ease;
}

.speech-bubble.pop {
  animation: speechPop 400ms ease;
}

.game-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr 0.9fr;
  gap: 22px;
}

.card {
  padding: 22px;
}

/* ============================================================
   4. BUTTONS
   ============================================================ */
.primary-button,
.ghost-button,
.answer-button {
  border: none;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button,
.ghost-button {
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: 600;
}

.primary-button {
  color: #12324b;
  background: linear-gradient(180deg, #ffe08a 0%, #ffc44d 100%);
  box-shadow: 0 10px 20px rgba(255, 196, 77, 0.35);
}

.ghost-button {
  color: #13526d;
  background: rgba(255, 255, 255, 0.75);
  border: 2px solid rgba(19, 82, 109, 0.15);
}

.primary-button:hover,
.ghost-button:hover,
.answer-button:hover:enabled {
  transform: translateY(-2px);
}

.primary-button:hover,
.audio-button:hover:enabled,
.answer-button:hover:enabled {
  box-shadow: 0 16px 26px rgba(36, 65, 90, 0.14);
}

.primary-button:disabled,
.ghost-button:disabled,
.answer-button:disabled {
  cursor: default;
  opacity: 0.6;
  transform: none;
}

.audio-button {
  padding: 10px 14px;
  border: 2px solid rgba(19, 82, 109, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: #13526d;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.audio-button:hover:enabled {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(36, 65, 90, 0.08);
}

.audio-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.lesson-audio {
  min-width: 54px;
}

/* ============================================================
   5. LESSON PANEL
   ============================================================ */
.section-heading p {
  margin: 4px 0 0;
  color: #547085;
}

.audio-support-note {
  min-height: 24px;
  margin: 14px 0 0;
  color: #456579;
  font-size: 0.95rem;
}

.lesson-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.lesson-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 10px 18px rgba(36, 65, 90, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.lesson-item:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 16px 26px rgba(36, 65, 90, 0.1);
}

.lesson-icon {
  font-size: 2rem;
}

.lesson-pronoun {
  margin: 0;
  font-size: 1.3rem;
  color: #0d5876;
}

.lesson-example {
  margin: 4px 0 0;
  color: #476377;
}

/* ============================================================
   6. GAME PANEL (Status, Level, Question, Answers)
   ============================================================ */
.status-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.status-bar > div {
  padding: 12px 14px;
  border-radius: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.status-label {
  margin: 0;
  font-size: 0.9rem;
  color: #5c7a8f;
}

.status-value {
  margin: 5px 0 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.streak-glow {
  animation: streakPulse 1s ease-in-out infinite;
}

.level-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 24px rgba(36, 65, 90, 0.07);
}

.level-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.xp-text-group {
  text-align: right;
}

.xp-bar {
  width: 100%;
  height: 16px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(19, 82, 109, 0.12);
}

.xp-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #79d6f9 0%, #82d173 55%, #ffd166 100%);
  transition: width 260ms ease;
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.35);
}

.level-message {
  margin: 10px 0 0;
  min-height: 24px;
  color: #36586f;
  font-size: 0.98rem;
}

.question-card {
  margin-top: 18px;
  padding: 20px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 222, 0.92));
  min-height: 280px;
  box-shadow: 0 18px 34px rgba(36, 65, 90, 0.12);
}

.emoji-scene {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  text-shadow: 0 10px 24px rgba(36, 65, 90, 0.18);
}

.question-tag {
  display: inline-block;
  margin: 14px 0 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(121, 214, 249, 0.2);
  color: #0d5876;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.question-text {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.1;
}

.question-hint {
  margin: 12px 0 0;
  font-size: 1rem;
  line-height: 1.55;
  color: #547085;
}

.audio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.answer-button {
  padding: 16px 12px;
  min-height: 72px;
  font-size: 1.35rem;
  font-weight: 600;
  color: #15435c;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 18px rgba(36, 65, 90, 0.08);
  position: relative;
  overflow: hidden;
}

.answer-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.55) 42%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 280ms ease;
}

.answer-button:hover:enabled::after {
  transform: translateX(110%);
}

.answer-button.correct {
  background: linear-gradient(180deg, #a7f3b0, #76d67c);
  color: #174c20;
  animation: correctFlash 300ms ease;
}

.answer-button.wrong {
  background: linear-gradient(180deg, #ffc8b8, #ff9379);
  color: #6d1f12;
  animation: wrongShake 300ms ease;
}

.feedback-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.feedback-text {
  margin: 0;
  min-height: 28px;
  font-size: 1rem;
  color: #36586f;
}

/* ============================================================
   7. SUMMARY PANEL
   ============================================================ */
.goal-list {
  margin: 18px 0 0;
  padding-left: 20px;
  line-height: 1.7;
}

.result-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #eefdf8);
  box-shadow: 0 18px 34px rgba(36, 65, 90, 0.1);
}

.result-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.result-subtitle {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #164860;
}

#result-text {
  margin: 8px 0 16px;
  color: #476377;
  line-height: 1.6;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.summary-chip {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  text-align: center;
  box-shadow: 0 10px 18px rgba(36, 65, 90, 0.06);
}

.summary-chip-label {
  display: block;
  margin-bottom: 4px;
  color: #5c7a8f;
  font-size: 0.92rem;
}

.accuracy-panel {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(121, 214, 249, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.accuracy-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #476377;
  line-height: 1.6;
}

/* ============================================================
   8. DIALOG
   ============================================================ */
.how-dialog {
  border: none;
  border-radius: 28px;
  padding: 0;
  box-shadow: var(--shadow);
  max-width: min(520px, calc(100% - 24px));
}

.how-dialog::backdrop {
  background: rgba(17, 75, 107, 0.28);
}

.dialog-content {
  padding: 24px;
}

.dialog-content ol {
  line-height: 1.8;
  color: #476377;
}

/* ============================================================
   9. ANIMATIONS
   ============================================================ */
.celebrate {
  animation: celebrate 480ms ease;
}

.question-arrive {
  animation: questionArrive 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-finale {
  animation: heroFinale 1.2s ease;
}

@keyframes dreamySky {
  0%, 100% { background-position: 0% 0%, 100% 100%, 0% 50%; }
  50% { background-position: 0% 0%, 100% 100%, 100% 50%; }
}

@keyframes glowFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -10px, 0) scale(1.08); }
}

@keyframes sparkleFloat {
  0% { transform: translateY(0) scale(0.9) rotate(0deg); opacity: 0.35; }
  50% { opacity: 1; }
  100% { transform: translateY(-18px) scale(1.15) rotate(90deg); opacity: 0.35; }
}

@keyframes speechPop {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes streakPulse {
  0%, 100% { text-shadow: 0 0 8px rgba(255, 140, 107, 0.4); }
  50% { text-shadow: 0 0 18px rgba(255, 140, 107, 0.9); }
}

@keyframes celebrate {
  0% { transform: scale(1); }
  40% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes mascotBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

@keyframes mascotHappy {
  0% { transform: scale(1) translateY(0); }
  30% { transform: scale(1.15) translateY(-12px); }
  60% { transform: scale(1.05) translateY(-6px); }
  100% { transform: scale(1) translateY(0); }
}

@keyframes mascotSad {
  0% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(4px) rotate(-5deg); }
  50% { transform: translateY(2px) rotate(3deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes mascotExcited {
  0% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.2) rotate(-8deg); }
  40% { transform: scale(1.15) rotate(8deg); }
  60% { transform: scale(1.2) rotate(-5deg); }
  80% { transform: scale(1.1) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes questionArrive {
  0% { opacity: 0; transform: translateY(18px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes heroFinale {
  0% { transform: scale(1); box-shadow: 0 18px 34px rgba(36, 65, 90, 0.1); }
  30% { transform: scale(1.02); box-shadow: 0 24px 44px rgba(255, 209, 102, 0.35); }
  100% { transform: scale(1); box-shadow: 0 18px 34px rgba(36, 65, 90, 0.1); }
}

@keyframes particleFly {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(0.9) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--tx), var(--ty), 0) scale(1.35) rotate(var(--rot));
  }
}

@keyframes correctFlash {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ============================================================
   10. RESPONSIVE DESIGN
   ============================================================ */

/* Tablet (768px - 980px) */
@media (max-width: 980px) {
  .hero,
  .game-layout {
    grid-template-columns: 1fr;
  }

  .hero-card {
    order: -1;
  }

  .answer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .mascot-row {
    gap: 8px;
  }

  .mascot {
    width: 64px;
    height: 64px;
  }

  h1 {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .hero-text {
    font-size: 1rem;
  }
}

/* Mobile (481px - 768px) */
@media (max-width: 768px) {
  .page-shell {
    width: min(100% - 24px, 100%);
    padding: 16px 0 32px;
  }

  .hero {
    gap: 16px;
    margin-bottom: 16px;
  }

  .hero-copy {
    padding: 20px;
  }

  .hero-card {
    padding: 16px;
  }

  .card {
    padding: 16px;
  }

  .game-layout {
    gap: 16px;
  }

  .status-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .status-bar > div {
    padding: 10px 8px;
  }

  .status-label {
    font-size: 0.8rem;
  }

  .status-value {
    font-size: 1.1rem;
  }

  .level-panel {
    padding: 12px;
  }

  .question-card {
    padding: 16px;
    min-height: 220px;
  }

  .question-text {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
  }

  .emoji-scene {
    font-size: clamp(2rem, 8vw, 3rem);
    min-height: 60px;
  }

  .answer-button {
    padding: 14px 10px;
    min-height: 60px;
    font-size: 1.2rem;
  }

  .mascot {
    width: 56px;
    height: 56px;
  }

  .mascot-row {
    gap: 6px;
  }

  .speech-bubble {
    font-size: 0.95rem;
    padding: 10px 14px;
  }
}

/* Small Mobile (361px - 480px) */
@media (max-width: 480px) {
  .page-shell {
    width: 100%;
    padding: 12px 0 24px;
  }

  .hero-copy,
  .hero-card,
  .card {
    border-radius: 20px;
  }

  .hero-copy {
    padding: 16px;
  }

  .hero-card {
    padding: 14px;
  }

  .card {
    padding: 14px;
  }

  h1 {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .eyebrow {
    font-size: 0.8rem;
  }

  .hero-text {
    font-size: 0.9rem;
  }

  .hero-actions {
    gap: 8px;
  }

  .primary-button,
  .ghost-button {
    padding: 12px 16px;
    font-size: 0.9rem;
    min-height: 44px;
  }

  .mascot {
    width: 48px;
    height: 48px;
  }

  .mascot-row {
    gap: 4px;
  }

  .speech-bubble {
    font-size: 0.85rem;
    padding: 8px 12px;
  }

  .status-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .status-bar > div {
    padding: 8px 6px;
    border-radius: 14px;
  }

  .status-label {
    font-size: 0.75rem;
  }

  .status-value {
    font-size: 1rem;
  }

  .level-panel {
    padding: 10px;
    border-radius: 16px;
  }

  .level-header {
    gap: 12px;
  }

  .xp-bar {
    height: 12px;
  }

  .level-message {
    font-size: 0.85rem;
  }

  .question-card {
    padding: 14px;
    min-height: 200px;
    border-radius: 18px;
  }

  .question-tag {
    font-size: 0.8rem;
    padding: 4px 10px;
  }

  .question-text {
    font-size: clamp(1.1rem, 6vw, 1.5rem);
  }

  .question-hint {
    font-size: 0.85rem;
  }

  .emoji-scene {
    font-size: clamp(1.8rem, 10vw, 2.5rem);
    min-height: 50px;
    gap: 8px;
  }

  .audio-actions {
    gap: 8px;
  }

  .audio-button {
    padding: 10px 12px;
    font-size: 0.85rem;
    min-height: 44px;
    width: 100%;
  }

  .answer-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .answer-button {
    padding: 14px 12px;
    min-height: 56px;
    font-size: 1.1rem;
    border-radius: 14px;
  }

  .feedback-row {
    flex-direction: column;
    gap: 12px;
  }

  .feedback-text {
    font-size: 0.9rem;
  }

  .primary-button {
    width: 100%;
    min-height: 48px;
  }

  .lesson-item {
    padding: 10px 12px;
    gap: 10px;
  }

  .lesson-icon {
    font-size: 1.6rem;
  }

  .lesson-pronoun {
    font-size: 1.1rem;
  }

  .lesson-example {
    font-size: 0.85rem;
  }

  .result-card {
    padding: 14px;
    border-radius: 18px;
  }

  .summary-chip {
    padding: 10px 12px;
  }

  .how-dialog {
    max-width: calc(100% - 16px);
    border-radius: 20px;
  }

  .dialog-content {
    padding: 16px;
  }

  .dialog-content h2 {
    font-size: 1.2rem;
  }

  .dialog-content ol {
    font-size: 0.9rem;
  }

  .sky-glow {
    width: 200px;
    height: 200px;
  }

  .sparkle {
    width: 10px;
    height: 10px;
  }
}

/* Very Small Mobile (up to 360px) */
@media (max-width: 360px) {
  .page-shell {
    padding: 8px 0 20px;
  }

  .hero-copy {
    padding: 12px;
  }

  .hero-card {
    padding: 12px;
  }

  .card {
    padding: 12px;
  }

  h1 {
    font-size: clamp(1.5rem, 9vw, 2rem);
  }

  .eyebrow {
    font-size: 0.7rem;
  }

  .hero-text {
    font-size: 0.8rem;
  }

  .mascot {
    width: 42px;
    height: 42px;
  }

  .mascot-row {
    gap: 3px;
  }

  .speech-bubble {
    font-size: 0.75rem;
    padding: 6px 10px;
  }

  .status-bar > div {
    padding: 6px 4px;
  }

  .status-label {
    font-size: 0.65rem;
  }

  .status-value {
    font-size: 0.85rem;
  }

  .question-text {
    font-size: clamp(1rem, 7vw, 1.3rem);
  }

  .emoji-scene {
    font-size: clamp(1.5rem, 12vw, 2rem);
  }

  .answer-button {
    font-size: 1rem;
    min-height: 50px;
  }

  .audio-button {
    font-size: 0.8rem;
    padding: 8px 10px;
  }

  .primary-button,
  .ghost-button {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
  }

  .hero-copy {
    padding: 12px;
  }

  .hero-card {
    padding: 10px;
  }

  .mascot {
    width: 48px;
    height: 48px;
  }

  .mascot-row {
    gap: 4px;
  }

  .speech-bubble {
    margin: 8px 0 0;
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .game-layout {
    gap: 12px;
  }

  .card {
    padding: 12px;
  }

  .question-card {
    min-height: 150px;
    padding: 12px;
  }

  .emoji-scene {
    min-height: 40px;
    font-size: 1.8rem;
  }

  .question-text {
    font-size: 1.2rem;
  }

  .answer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .answer-button {
    padding: 10px 8px;
    min-height: 48px;
  }
}

/* Touch-friendly: ensure minimum tap targets */
@media (hover: none) and (pointer: coarse) {
  .primary-button,
  .ghost-button,
  .answer-button,
  .audio-button {
    min-height: 44px;
    min-width: 44px;
  }

  .lesson-item {
    min-height: 44px;
  }

  .status-bar > div {
    min-height: 44px;
  }
}

/* Print styles */
@media print {
  .sky-glow,
  .floating-sparkles,
  .fx-layer,
  .audio-actions,
  .hero-actions,
  .feedback-row button {
    display: none;
  }

  body {
    background: white;
    animation: none;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

