/* ==========================================================================
   Momo's Souq Adventure — Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Quicksand:wght@400;500;600;700&display=swap');

:root {
  /* Colour tokens */
  --sand: #F7ECD9;
  --sand-dark: #EDDFBE;
  --saffron: #F4A623;
  --saffron-dark: #D98A0B;
  --teal: #0E6E6E;
  --teal-dark: #0A5252;
  --teal-light: #E4F3F1;
  --indigo: #1B3A4B;
  --pomegranate: #C1443C;
  --mint: #4FAE8E;
  --white: #FFFFFF;
  --shadow-color: rgba(27, 58, 75, 0.18);

  /* Type tokens */
  --font-display: 'Baloo 2', cursive;
  --font-body: 'Quicksand', sans-serif;

  /* Spacing / shape */
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --section-pad: clamp(48px, 8vw, 96px);
  --container-w: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--sand);
  color: var(--indigo);
  line-height: 1.55;
  overflow-x: hidden;
}

h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  color: var(--indigo);
  margin: 0 0 0.4em;
  line-height: 1.15;
}

p { margin: 0 0 1em; }

img { max-width: 100%; display: block; }

a { color: inherit; }

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--pomegranate);
  outline-offset: 3px;
}

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-pad) 0;
  scroll-margin-top: 76px;
}
#home { scroll-margin-top: 0; }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-light);
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.section-heading {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  max-width: 640px;
}

.section-sub {
  max-width: 640px;
  font-size: 1.05rem;
  color: #3c5a68;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px 30px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 8px 0 rgba(0,0,0,0.08);
}
.btn:active { transform: translateY(4px); box-shadow: 0 4px 0 rgba(0,0,0,0.08); }

.btn-primary {
  background: var(--pomegranate);
  color: var(--white);
}
.btn-primary:hover { background: #a8362f; transform: translateY(-2px); }

.btn-secondary {
  background: var(--white);
  color: var(--teal-dark);
  border: 2px solid var(--teal);
}
.btn-secondary:hover { background: var(--teal-light); transform: translateY(-2px); }

.btn-small {
  padding: 8px 18px;
  font-size: 0.9rem;
  box-shadow: 0 5px 0 rgba(0,0,0,0.08);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(247, 236, 217, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--sand-dark);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--indigo);
  text-decoration: none;
}
.brand-emoji { font-size: 1.8rem; }

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  text-decoration: none;
  font-weight: 600;
  color: var(--indigo);
  padding: 10px 14px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
  font-size: 0.95rem;
}
.nav-links a:hover { background: var(--sand-dark); }
.nav-links a.active { background: var(--teal); color: var(--white); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.hamburger span {
  width: 26px;
  height: 3px;
  background: var(--indigo);
  border-radius: 3px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(50px, 9vw, 100px) 0 60px;
  background: linear-gradient(180deg, #FBE7C4 0%, var(--sand) 70%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.floaty {
  position: absolute;
  animation: floaty 6s ease-in-out infinite;
  opacity: 0.9;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.08));
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(4deg); }
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-copy .section-eyebrow { background: var(--white); }

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 3.6rem);
}

.hero h1 span { color: var(--pomegranate); }

.hero-sub {
  font-size: 1.15rem;
  max-width: 480px;
  color: #3c5a68;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-lantern-frame {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFDFA0, var(--saffron) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 30px 50px -20px rgba(196, 106, 20, 0.55);
  animation: bob 5s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.hero-lantern-frame .mouse-emoji {
  font-size: 8rem;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,0.25));
}

/* ==========================================================================
   Stat strip
   ========================================================================== */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 56px;
  position: relative;
  z-index: 2;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-align: center;
  box-shadow: 0 14px 30px -18px var(--shadow-color);
}
.stat-card .stat-num {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--teal-dark);
}
.stat-card .stat-label {
  font-size: 0.85rem;
  color: #5a7481;
}

/* ==========================================================================
   About
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.about-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 20px 40px -24px var(--shadow-color);
}
.about-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 14px;
}
.about-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 500;
}
.about-list .emoji { font-size: 1.4rem; }

/* ==========================================================================
   Chapter Path (signature element)
   ========================================================================== */
.path-wrap {
  position: relative;
  margin-top: 40px;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  position: relative;
}

.chapter-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 26px 22px 22px;
  box-shadow: 0 16px 34px -22px var(--shadow-color);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  transform: translateY(24px);
}
.chapter-card.in-view {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.chapter-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 44px -22px var(--shadow-color);
}

.chapter-card .stall-roof {
  position: absolute;
  top: -14px;
  left: 20px;
  right: 20px;
  height: 26px;
  background: repeating-linear-gradient(90deg, var(--pomegranate) 0 18px, var(--saffron) 18px 36px);
  border-radius: 14px 14px 0 0;
  clip-path: polygon(0 100%, 0 30%, 5% 0, 10% 30%,15% 0,20% 30%,25% 0,30% 30%,35% 0,40% 30%,45% 0,50% 30%,55% 0,60% 30%,65% 0,70% 30%,75% 0,80% 30%,85% 0,90% 30%,95% 0,100% 30%,100% 100%);
}

.chapter-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.chapter-icon {
  font-size: 2.4rem;
  margin: 6px 0 10px;
}

.chapter-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.chapter-card p { font-size: 0.92rem; color: #4d6672; margin-bottom: 16px; }

.chapter-status {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 1.2rem;
}

/* ==========================================================================
   Stories
   ========================================================================== */
.story-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}
.story-card {
  background: var(--teal-light);
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: transform 0.2s ease;
}
.story-card:hover { transform: translateY(-6px); }
.story-icon {
  font-size: 3rem;
  flex-shrink: 0;
}
.story-card h3 { margin-bottom: 8px; }
.story-card p.excerpt { color: #375a63; font-size: 0.95rem; }

/* ==========================================================================
   Activities
   ========================================================================== */
.activity-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.activity-tab {
  background: var(--white);
  border-radius: 999px;
  padding: 10px 20px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--indigo);
  box-shadow: 0 8px 18px -14px var(--shadow-color);
}
.activity-tab.active { background: var(--saffron); color: var(--white); }

.activity-panel { display: none; }
.activity-panel.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 640px;
}
.memory-card {
  aspect-ratio: 1;
  background: var(--teal);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px -14px var(--shadow-color);
  transition: transform 0.2s ease;
  user-select: none;
  text-align: center;
  padding: 6px;
}
.memory-card.flipped {
  background: var(--white);
  color: var(--indigo);
  border: 3px solid var(--saffron);
}
.memory-card.matched {
  background: var(--mint);
  color: var(--white);
  cursor: default;
}
.memory-card:active { transform: scale(0.95); }

.sort-game {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.sort-pool, .sort-basket {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px;
  min-height: 220px;
  box-shadow: 0 10px 24px -18px var(--shadow-color);
}
.sort-basket h4 {
  font-size: 1rem;
  color: var(--teal-dark);
  margin-bottom: 10px;
}
.sort-basket.drag-over { outline: 3px dashed var(--saffron); }

.sort-tile {
  display: inline-block;
  background: var(--sand-dark);
  border-radius: 999px;
  padding: 8px 16px;
  margin: 4px;
  font-weight: 600;
  cursor: grab;
}
.sort-tile:active { cursor: grabbing; }

/* ==========================================================================
   Quiz / Games
   ========================================================================== */
.quiz-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 34px;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: 0 20px 44px -24px var(--shadow-color);
}
.quiz-progress-bar {
  height: 12px;
  background: var(--sand-dark);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 24px;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--saffron), var(--pomegranate));
  border-radius: 999px;
  width: 0%;
  transition: width 0.4s ease;
}
.quiz-question { font-size: 1.2rem; margin-bottom: 20px; }
.quiz-options { display: grid; gap: 12px; }
.quiz-option {
  background: var(--sand);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.15s ease;
}
.quiz-option:hover { background: var(--sand-dark); transform: translateX(4px); }
.quiz-option.correct { background: var(--mint); color: var(--white); }
.quiz-option.incorrect { background: var(--pomegranate); color: var(--white); }
.quiz-feedback {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  min-height: 1.4em;
}
.quiz-feedback.correct-text { color: var(--teal-dark); }
.quiz-feedback.incorrect-text { color: var(--pomegranate); }

.quiz-result {
  text-align: center;
}
.quiz-result .big-score {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--saffron-dark);
}
.badge-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 18px 0;
}
.badge {
  font-size: 2.2rem;
  filter: grayscale(1) opacity(0.35);
}
.badge.earned {
  filter: none;
  animation: pop 0.5s ease;
}
@keyframes pop {
  0% { transform: scale(0.4); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   Characters
   ========================================================================== */
.character-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.character-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  box-shadow: 0 16px 34px -22px var(--shadow-color);
  transition: transform 0.2s ease;
}
.character-card:hover { transform: translateY(-8px) rotate(-1deg); }
.character-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
}
.character-role {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

/* ==========================================================================
   Progress
   ========================================================================== */
.progress-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
}
.progress-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 20px 44px -24px var(--shadow-color);
}
.progress-row { margin-bottom: 22px; }
.progress-row-head {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 8px;
}
.progress-bar-track {
  height: 16px;
  background: var(--sand-dark);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  transition: width 0.8s ease;
  background: linear-gradient(90deg, var(--teal), var(--mint));
}
.stars-row { display: flex; gap: 6px; font-size: 1.4rem; }
.badges-earned { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.badges-earned .badge { font-size: 1.8rem; }

.reset-note {
  font-size: 0.85rem;
  color: #6a8189;
  margin-top: 18px;
}

/* ==========================================================================
   Contact / Parents
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: 0 16px 34px -22px var(--shadow-color);
}
.contact-card h3 { margin-bottom: 12px; }
.parent-tip-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.parent-tip-list li { display: flex; gap: 10px; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background: var(--indigo);
  color: var(--sand);
  padding: 40px 0;
  text-align: center;
  font-size: 0.9rem;
}
footer a { color: var(--saffron); text-decoration: none; }

/* ==========================================================================
   Sound toggle (floating)
   ========================================================================== */
.sound-toggle {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 600;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--white);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px -10px rgba(0,0,0,0.4);
}

/* ==========================================================================
   Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 58, 75, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--sand);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  animation: modalIn 0.35s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--white);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.2rem;
  box-shadow: 0 8px 16px -10px rgba(0,0,0,0.3);
}
.modal-box h2 { padding-right: 40px; }

.vocab-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.vocab-list li {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.vocab-list b { color: var(--teal-dark); }

.grammar-box {
  background: var(--teal-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 16px 0;
}
.grammar-box ul { margin: 8px 0 0; padding-left: 20px; }

.dialogue-box {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 16px 0;
  display: grid;
  gap: 10px;
}
.dialogue-line b { color: var(--pomegranate); }

.mini-quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

/* ==========================================================================
   Lock Screen (password gate)
   ========================================================================== */
#lockScreen {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: linear-gradient(180deg, #FBE7C4 0%, var(--sand) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#lockScreen.hidden { display: none; }
.lock-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 34px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 50px -20px var(--shadow-color);
}
.lock-emoji { font-size: 3rem; margin-bottom: 6px; }
.lock-card h2 { margin-bottom: 8px; }
.lock-card p { font-size: 0.95rem; color: #5a7481; margin-bottom: 22px; }
.lock-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--sand-dark);
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 14px;
  text-align: center;
  background: var(--sand);
  color: var(--indigo);
}
.lock-input:focus { outline: none; border-color: var(--saffron); }
.lock-error {
  color: var(--pomegranate);
  font-size: 0.9rem;
  min-height: 1.2em;
  margin-bottom: 10px;
  font-weight: 600;
}
.lock-submit { width: 100%; }

/* ==========================================================================
   Confetti / celebration
   ========================================================================== */
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
}

.toast {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--indigo);
  color: var(--white);
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  z-index: 1500;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,0.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   Reveal-on-scroll utility
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .chapter-grid { grid-template-columns: repeat(2, 1fr); }
  .story-grid { grid-template-columns: 1fr; }
  .character-grid { grid-template-columns: 1fr; }
  .progress-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .sort-game { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--sand);
    flex-direction: column;
    padding: 12px;
    border-bottom: 3px solid var(--sand-dark);
    transform: translateY(-130%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px; }
  .hamburger { display: flex; }
  .chapter-grid { grid-template-columns: 1fr; }
  .memory-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}
