/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: #f0f4ff;
  color: #333;
  display: flex;
  min-height: 100vh;
}

/* ========== Sidebar ========== */
.sidebar {
  width: 250px;
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-header {
  padding: 28px 20px 12px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.sidebar-header h2 { font-size: 1.3rem; }
.sidebar-header .tagline { font-size: 0.75rem; opacity: 0.85; margin-top: 4px; }

.menu {
  list-style: none;
  padding: 12px 0;
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}
.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; cursor: pointer;
  font-weight: 600; font-size: 1rem;
  transition: background 0.2s;
}
.menu-item:hover, .menu-item.active { background: rgba(255,255,255,0.15); }
.menu-icon { font-size: 1.2rem; }
.menu-label { flex: 1; }
.arrow { font-size: 0.7rem; transition: transform 0.3s; }
.menu-item.active .arrow { transform: rotate(180deg); }

.submenu {
  list-style: none;
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease;
}
.submenu.open { max-height: 1000px; }
.submenu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px 10px 36px;
  cursor: pointer; font-size: 0.9rem;
  transition: background 0.2s;
}
.submenu-item:hover { background: rgba(255,255,255,0.1); }
.submenu-item.active { background: rgba(255,255,255,0.2); font-weight: 600; }
.sub-icon { font-size: 1rem; }

.sidebar-footer {
  margin-top: auto; padding: 16px 20px;
  text-align: center; font-size: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.2);
}

/* Mobile toggle */
.menu-toggle {
  display: none;
  position: fixed; top: 12px; left: 12px; z-index: 200;
  background: #6c5ce7; color: #fff; border: none;
  font-size: 1.5rem; padding: 6px 12px; border-radius: 8px;
  cursor: pointer;
}

/* ========== Content ========== */
.content {
  margin-left: 250px;
  flex: 1;
  padding: 32px 40px;
  min-height: 100vh;
}

/* Views */
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.8rem; color: #888; margin-bottom: 16px;
}
.breadcrumb a { color: #6c5ce7; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ========== Dashboard ========== */
.welcome-banner {
  background: linear-gradient(135deg, #6c5ce7, #fd79a8);
  color: #fff; border-radius: 16px; padding: 36px 32px;
  margin-bottom: 28px;
}
.welcome-banner h1 { font-size: 1.8rem; margin-bottom: 6px; }
.welcome-banner p { font-size: 1rem; opacity: 0.9; }

.section-title { font-size: 1.2rem; margin-bottom: 16px; color: #555; }

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.topic-card {
  background: #fff; border-radius: 16px;
  padding: 28px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden;
}
.topic-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.card-emoji { font-size: 2.5rem; margin-bottom: 12px; }
.topic-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.topic-card p { font-size: 0.85rem; color: #666; margin-bottom: 12px; }
.card-tags {
  list-style: none; display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.card-tags li {
  background: #f0f4ff; color: #6c5ce7; padding: 4px 12px;
  border-radius: 20px; font-size: 0.7rem; font-weight: 600;
}
.card-count {
  position: absolute; top: 16px; right: 16px;
  background: #6c5ce7; color: #fff; font-size: 0.7rem;
  padding: 4px 10px; border-radius: 12px; font-weight: 600;
}

/* ========== Stories Grid ========== */
.page-title { font-size: 1.5rem; margin-bottom: 8px; }
.page-desc { font-size: 0.85rem; color: #888; margin-bottom: 24px; }

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.story-card {
  background: #fff; border-radius: 14px; padding: 20px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  text-align: center;
}
.story-card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(0,0,0,0.1); }
.story-card .story-thumb { font-size: 3rem; margin-bottom: 10px; }
.story-card h3 { font-size: 1rem; margin-bottom: 6px; color: #333; }
.story-card p { font-size: 0.75rem; color: #999; }

/* ========== Story Detail ========== */
.story-container {
  background: #fff; border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  margin-bottom: 24px;
  max-width: 1100px;
}
.story-container h1 {
  font-size: 1.6rem; text-align: center; margin-bottom: 8px; color: #6c5ce7;
}

/* Paragraph block: illustration + lines side by side */
.story-para {
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 28px; padding: 16px 0;
  border-bottom: 1px dashed #eee;
}
.story-para:last-child { border-bottom: none; margin-bottom: 0; }
.story-para.left { flex-direction: row; }
.story-para.right { flex-direction: row-reverse; }

.para-illustration {
  flex: 0 0 360px; max-width: 360px;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 3px 16px rgba(0,0,0,0.10);
}
.para-illustration svg { display: block; width: 100%; height: auto; border-radius: 14px; }

.para-lines { flex: 1; min-width: 0; }

.story-line {
  padding: 7px 0;
  font-size: 1.15rem;
  line-height: 1.7;
  border-radius: 8px;
  transition: background 0.3s;
}
.story-line.line-highlight {
  animation: lineGlow 1.5s ease;
}
@keyframes lineGlow {
  0% { background: #e8e4ff; }
  100% { background: transparent; }
}

.story-line .line-text {
  font-weight: 500; color: #444;
}

/* Clickable words for speech */
.speak-hint {
  text-align: center; font-size: 0.8rem; color: #a29bfe;
  margin-bottom: 20px; font-style: italic;
}
.speak-word {
  cursor: pointer;
  padding: 2px 5px; border-radius: 6px;
  transition: background 0.15s, color 0.15s, transform 0.15s;
  display: inline-block;
}
.speak-word:hover {
  background: #e8e4ff; color: #6c5ce7;
  transform: scale(1.1);
}
.speak-word.speaking {
  animation: wordPulse 0.5s ease;
  background: #6c5ce7; color: #fff; border-radius: 6px;
}
@keyframes wordPulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.2); }
  100% { transform: scale(1); background: transparent; color: #444; }
}

/* Read Full Story controls */
.story-controls {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px; max-width: 1100px;
}
.btn-read {
  background: linear-gradient(135deg, #00b894, #00cec9);
  color: #fff; font-size: 1rem; padding: 12px 28px;
  border-radius: 12px; border: none; cursor: pointer;
  font-weight: 700; box-shadow: 0 3px 12px rgba(0,184,148,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-read:hover { transform: translateY(-2px); box-shadow: 0 5px 18px rgba(0,184,148,0.4); }
.btn-stop {
  background: #e17055; color: #fff; font-size: 1rem; padding: 12px 28px;
  border-radius: 12px; border: none; cursor: pointer;
  font-weight: 700; box-shadow: 0 3px 12px rgba(225,112,85,0.3);
}
.btn-stop:hover { background: #d63031; }
.hidden { display: none !important; }
.read-status {
  font-size: 0.85rem; color: #6c5ce7; font-weight: 600;
  font-style: italic;
}

/* Word-by-word reading highlight */
.speak-word.word-reading {
  background: #6c5ce7;
  color: #fff;
  border-radius: 6px;
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(108,92,231,0.4);
  transition: all 0.15s ease;
}

/* Active line during reading */
.story-line.reading-active {
  background: #ede7f6;
  border-radius: 8px;
  padding-left: 8px;
  padding-right: 8px;
  transition: background 0.3s;
}

/* Active illustration glow during reading */
.para-illustration.illust-active {
  box-shadow: 0 0 20px rgba(108,92,231,0.4), 0 0 40px rgba(108,92,231,0.15);
  transform: scale(1.02);
  transition: all 0.5s ease;
}

.story-nav {
  display: flex; gap: 16px; max-width: 1100px;
}

/* ========== Buttons ========== */
.btn {
  padding: 10px 24px; border: none; border-radius: 10px;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn-prev { background: #dfe6e9; color: #555; }
.btn-prev:hover { background: #b2bec3; }
.btn-next { background: #6c5ce7; color: #fff; }
.btn-next:hover { background: #5a4bd1; }
.btn-new-q { background: #00b894; color: #fff; margin-top: 16px; }
.btn-new-q:hover { background: #00a381; }

/* ========== Word Learning ========== */
.words-tabs {
  display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap;
}
.words-tab {
  padding: 12px 24px; border: 2px solid #ddd; border-radius: 12px;
  background: #fff; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.words-tab.active { border-color: #6c5ce7; background: #6c5ce7; color: #fff; }
.words-tab:hover:not(.active) { border-color: #a29bfe; }

.words-panel { display: none; }
.words-panel.active { display: block; animation: fadeIn 0.3s ease; }

.word-card-display {
  background: #fff; border-radius: 20px;
  box-shadow: 0 6px 30px rgba(0,0,0,0.08);
  padding: 40px; text-align: center;
  max-width: 550px;
  margin: 0 auto 24px;
}
.word-card-display .word-image {
  width: 320px; height: 320px; margin: 0 auto 28px;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.word-card-display .word-image svg {
  display: block; width: 100%; height: 100%;
}
.word-card-display .word-text {
  font-size: 4rem; font-weight: 800;
  letter-spacing: 18px; color: #6c5ce7;
  cursor: pointer; display: inline-block;
  padding: 12px 24px; border-radius: 16px;
  transition: background 0.2s, transform 0.15s;
  user-select: none;
}
.word-card-display .word-text:hover {
  background: #ede7f6; transform: scale(1.05);
}
.word-card-display .word-text:active {
  background: #6c5ce7; color: #fff; transform: scale(1.1);
}
.word-card-display .word-hint {
  font-size: 0.85rem; color: #a29bfe; margin-top: 10px; font-style: italic;
}

.word-nav {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  max-width: 550px; margin: 0 auto;
}
.word-counter {
  font-size: 0.9rem; color: #888; font-weight: 600; min-width: 60px; text-align: center;
}

/* ========== Maths ========== */
.maths-tabs {
  display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap;
}
.maths-tab {
  padding: 10px 20px; border: 2px solid #ddd; border-radius: 10px;
  background: #fff; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.maths-tab.active { border-color: #6c5ce7; background: #6c5ce7; color: #fff; }
.maths-tab:hover:not(.active) { border-color: #a29bfe; }

.maths-panel { display: none; }
.maths-panel.active { display: block; animation: fadeIn 0.3s ease; }
.maths-panel h2 { font-size: 1.3rem; margin-bottom: 8px; }
.maths-instruction { font-size: 0.85rem; color: #888; margin-bottom: 20px; }

.quiz-area {
  background: #fff; border-radius: 14px; padding: 28px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  text-align: center; min-height: 200px;
}
.quiz-question {
  font-size: 2rem; font-weight: 700; margin-bottom: 16px; color: #333;
}
.quiz-objects {
  font-size: 2.2rem; letter-spacing: 6px; margin-bottom: 20px;
  line-height: 1.8; word-break: break-all;
}
.quiz-options {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.quiz-option {
  width: 64px; height: 64px; border-radius: 50%;
  border: 3px solid #ddd; background: #fff;
  font-size: 1.5rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.quiz-option:hover { border-color: #6c5ce7; background: #f0f4ff; }
.quiz-option.correct { border-color: #00b894; background: #d4fce8; }
.quiz-option.wrong { border-color: #e17055; background: #ffe0d6; }

.quiz-qnum {
  font-size: 0.8rem; color: #a29bfe; font-weight: 600; margin-bottom: 8px;
}
.quiz-feedback {
  margin-top: 16px; font-size: 1.3rem; font-weight: 700;
  min-height: 40px;
}

/* Progress bar */
.quiz-progress { margin-bottom: 16px; }
.prog-bar {
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px;
}
.prog-dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  background: #e0e0e0; color: #999;
  transition: all 0.3s;
}
.prog-dot.current { background: #6c5ce7; color: #fff; transform: scale(1.15); box-shadow: 0 2px 8px rgba(108,92,231,0.4); }
.prog-dot.done { background: #00b894; color: #fff; }
.prog-score { font-size: 0.85rem; color: #666; text-align: center; font-weight: 600; }

/* Result card */
.quiz-result { text-align: center; }
.result-card {
  background: #fff; border-radius: 20px; padding: 36px;
  box-shadow: 0 6px 30px rgba(0,0,0,0.08);
  max-width: 400px; margin: 0 auto;
  animation: fadeIn 0.4s ease;
}
.result-emoji { font-size: 4rem; margin-bottom: 12px; }
.result-score { font-size: 2.5rem; font-weight: 800; color: #6c5ce7; margin-bottom: 8px; }
.result-message { font-size: 1.1rem; color: #555; margin-bottom: 20px; font-weight: 600; }
.result-bar-container {
  background: #e0e0e0; border-radius: 10px; height: 18px;
  overflow: hidden; margin-bottom: 8px;
}
.result-bar {
  height: 100%; border-radius: 10px;
  background: linear-gradient(90deg, #00b894, #00cec9);
  transition: width 0.8s ease;
}
.result-pct { font-size: 0.9rem; color: #888; margin-bottom: 20px; font-weight: 600; }
.btn-retry {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  color: #fff; font-size: 1rem; padding: 12px 28px;
  border-radius: 12px; border: none; cursor: pointer;
  font-weight: 700; transition: transform 0.15s;
}
.btn-retry:hover { transform: translateY(-2px); }
.hidden { display: none !important; }

/* ========== Colouring ========== */
.col-tabs {
  display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.col-tab {
  padding: 10px 20px; border: 2px solid #ddd; border-radius: 10px;
  background: #fff; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.col-tab.active { border-color: #6c5ce7; background: #6c5ce7; color: #fff; }
.col-tab:hover:not(.active) { border-color: #a29bfe; }

.col-progress {
  margin-bottom: 16px;
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
}
.col-progress .prog-dot { cursor: pointer; }

.col-card {
  background: #fff; border-radius: 16px; padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  max-width: 700px; margin: 0 auto;
}
.col-title { font-size: 1.25rem; text-align: center; margin-bottom: 4px; color: #333; }
.col-hint  { font-size: 0.9rem; text-align: center; color: #888; margin-bottom: 16px; }

.col-canvas {
  background: #fafaff;
  border: 3px dashed #d6cfff;
  border-radius: 14px;
  padding: 10px;
  display: flex; justify-content: center; align-items: center;
  min-height: 320px;
  margin-bottom: 16px;
}
.col-canvas svg {
  width: 100%; max-width: 460px; height: auto;
  user-select: none;
}
.col-canvas svg .fillable {
  cursor: pointer;
  transition: fill 0.2s, filter 0.15s;
}
.col-canvas svg .fillable:hover {
  filter: brightness(1.05) drop-shadow(0 0 4px rgba(108,92,231,0.4));
}

/* Hard-mode painting overlay */
.col-canvas-stack {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 460px;
  line-height: 0;
}
.col-canvas-stack svg {
  width: 100%; height: auto; display: block;
  pointer-events: none;
}
.col-paint-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  cursor: crosshair;
  touch-action: none;
}
.col-mode-tip {
  text-align: center;
  font-size: 0.85rem;
  color: #6c5ce7;
  font-style: italic;
  margin-bottom: 8px;
}

.col-palette {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
}
.col-swatch {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  padding: 0;
}
.col-swatch:hover { transform: scale(1.12); }
.col-swatch.selected {
  transform: scale(1.18);
  box-shadow: 0 0 0 3px #6c5ce7, 0 2px 6px rgba(0,0,0,0.2);
}
.col-swatch.col-eraser {
  background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 50% / 16px 16px;
}

.col-selected {
  text-align: center; font-size: 0.85rem; color: #888;
  margin-bottom: 12px; font-weight: 600;
}

.col-celebrate {
  text-align: center;
  font-size: 1.05rem;
  color: #00b894;
  font-weight: 700;
  min-height: 1.6rem;
  margin-bottom: 12px;
}

.col-controls {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.col-controls .btn {
  padding: 10px 20px; border-radius: 12px; border: none;
  font-weight: 700; cursor: pointer; font-size: 0.95rem;
  transition: transform 0.12s, box-shadow 0.12s;
}
.col-controls .btn-prev, .col-controls .btn-next {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe); color: #fff;
  box-shadow: 0 3px 10px rgba(108,92,231,0.3);
}
.col-controls .btn-reset {
  background: #fff; color: #6c5ce7; border: 2px solid #d6cfff;
}
.col-controls .btn:hover { transform: translateY(-2px); }

/* ========== Matching ========== */
.match-tabs {
  display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.match-tab {
  padding: 10px 20px; border: 2px solid #ddd; border-radius: 10px;
  background: #fff; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.match-tab.active { border-color: #6c5ce7; background: #6c5ce7; color: #fff; }
.match-tab:hover:not(.active) { border-color: #a29bfe; }

.match-progress {
  margin-bottom: 16px;
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
}
.match-progress .prog-dot { cursor: pointer; }

.match-card-wrap {
  background: #fff; border-radius: 16px; padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  max-width: 760px; margin: 0 auto;
}
.match-title { font-size: 1.25rem; text-align: center; margin-bottom: 4px; color: #333; }
.match-hint  { font-size: 0.9rem; text-align: center; color: #888; margin-bottom: 18px; }

.match-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 14px;
}
.match-col { display: flex; flex-direction: column; gap: 10px; }

.match-card {
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 1.4rem;
  text-align: center;
  cursor: pointer;
  min-height: 60px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  font-family: inherit;
  word-break: break-word;
  line-height: 1.2;
}
.match-card:hover:not(.matched) {
  border-color: #6c5ce7;
  background: #f0f4ff;
  transform: scale(1.02);
}
.match-card.selected {
  border-color: #6c5ce7;
  background: #e8e4ff;
  box-shadow: 0 0 0 4px rgba(108,92,231,0.18);
}
.match-card.matched {
  background: #d4fce8;
  border-color: #00b894;
  cursor: default;
  opacity: 0.85;
}
.match-card.matched::after {
  content: " ✓";
  color: #00b894;
  font-size: 1rem;
  margin-left: 6px;
}
.match-card.wrong {
  background: #ffe0d6;
  border-color: #e17055;
  animation: matchShake 0.3s;
}
@keyframes matchShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.match-celebrate {
  text-align: center;
  font-size: 1.05rem;
  color: #00b894;
  font-weight: 700;
  min-height: 1.6rem;
  margin-bottom: 12px;
}

.match-controls {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.match-controls .btn {
  padding: 10px 20px; border-radius: 12px; border: none;
  font-weight: 700; cursor: pointer; font-size: 0.95rem;
  transition: transform 0.12s;
}
.match-controls .btn-prev, .match-controls .btn-next {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe); color: #fff;
  box-shadow: 0 3px 10px rgba(108,92,231,0.3);
}
.match-controls .btn-reset {
  background: #fff; color: #6c5ce7; border: 2px solid #d6cfff;
}
.match-controls .btn:hover { transform: translateY(-2px); }

@media (max-width: 600px) {
  .match-board { gap: 10px; }
  .match-card { font-size: 1.1rem; min-height: 52px; padding: 8px 10px; }
}

/* ===== Nesting (drag to stack) ===== */
.nest-progress {
  margin-bottom: 16px;
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
}
.nest-progress .prog-dot { cursor: pointer; }

.nest-card-wrap {
  background: #fff; border-radius: 16px; padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  max-width: 720px; margin: 0 auto;
}
.nest-title { font-size: 1.25rem; text-align: center; margin-bottom: 4px; color: #333; }
.nest-hint  { font-size: 0.9rem;  text-align: center; color: #888; margin-bottom: 18px; }

.nest-celebrate {
  text-align: center;
  font-size: 1.05rem;
  color: #00b894;
  font-weight: 700;
  min-height: 1.6rem;
  margin: 14px 0 6px;
}

.nest-controls {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-top: 6px;
}
.nest-controls .btn {
  padding: 10px 20px; border-radius: 12px; border: none;
  font-weight: 700; cursor: pointer; font-size: 0.95rem;
  transition: transform 0.12s;
}
.nest-controls .btn-prev, .nest-controls .btn-next {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe); color: #fff;
  box-shadow: 0 3px 10px rgba(108,92,231,0.3);
}
.nest-controls .btn-reset {
  background: #fff; color: #6c5ce7; border: 2px solid #d6cfff;
}
.nest-controls .btn:hover { transform: translateY(-2px); }

.nest-canvas {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  height: 380px;
  background: linear-gradient(135deg, #fafaff 0%, #f0f4ff 100%);
  border: 2px dashed #d6cfff;
  border-radius: 16px;
  overflow: hidden;
  touch-action: none;
}
.nest-item {
  position: absolute;
  border-radius: 50%;
  border: 3px solid #444;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: grab;
  user-select: none;
  font-weight: 700;
  background: #ffe0b2;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  transition: box-shadow 0.15s, transform 0.15s, outline-color 0.15s;
  touch-action: none;
  text-align: center;
}
.nest-item[data-size="1"] { width: 56px;  height: 56px;  background: #ffccbc; }
.nest-item[data-size="2"] { width: 76px;  height: 76px;  background: #c8e6c9; }
.nest-item[data-size="3"] { width: 96px;  height: 96px;  background: #fff59d; }
.nest-item[data-size="4"] { width: 116px; height: 116px; background: #b3e5fc; }
.nest-item[data-size="5"] { width: 136px; height: 136px; background: #e1bee7; }
.nest-item[data-size="1"] .nest-emoji { font-size: 1.4rem; }
.nest-item[data-size="2"] .nest-emoji { font-size: 1.9rem; }
.nest-item[data-size="3"] .nest-emoji { font-size: 2.4rem; }
.nest-item[data-size="4"] .nest-emoji { font-size: 2.9rem; }
.nest-item[data-size="5"] .nest-emoji { font-size: 3.4rem; }
.nest-emoji { line-height: 1; }
.nest-label {
  font-size: 0.7rem;
  color: #333;
  margin-top: 2px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.nest-item:hover { box-shadow: 0 5px 14px rgba(0,0,0,0.2); }
.nest-item.dragging {
  cursor: grabbing;
  box-shadow: 0 10px 24px rgba(108,92,231,0.4);
  z-index: 100;
  transform: scale(1.04);
}
.nest-item.target-valid {
  outline: 4px dashed #00b894;
  outline-offset: 3px;
  animation: nestPulse 0.7s infinite ease-in-out;
}
.nest-item.target-invalid {
  outline: 4px dashed #e17055;
  outline-offset: 3px;
}
@keyframes nestPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
.nest-contains {
  position: absolute;
  top: -6px; right: -6px;
  background: #00b894; color: #fff;
  border-radius: 50%;
  min-width: 24px; height: 24px;
  padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 800;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

@media (max-width: 600px) {
  .nest-canvas { height: 340px; }
  .nest-item[data-size="5"] { width: 120px; height: 120px; }
  .nest-item[data-size="4"] { width: 104px; height: 104px; }
}

/* ===== Missing Item ===== */
.miss-progress {
  margin-bottom: 16px;
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
}
.miss-progress .prog-dot { cursor: pointer; }

.miss-card-wrap {
  background: #fff; border-radius: 16px; padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  max-width: 720px; margin: 0 auto;
}
.miss-title { font-size: 1.25rem; text-align: center; margin-bottom: 4px; color: #333; }
.miss-hint  { font-size: 0.9rem;  text-align: center; color: #888; margin-bottom: 14px; }
.miss-qnum  { font-size: 0.85rem; text-align: center; color: #a29bfe; font-weight: 700; margin-bottom: 14px; }

.miss-board { margin-bottom: 18px; }
.miss-picture {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: #6c5ce7;
  font-weight: 700;
}
.miss-row {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px;
}
.miss-cell {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 62px; height: 62px;
  background: #f0f4ff;
  border: 2px solid #d6cfff;
  border-radius: 12px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #333;
  padding: 0 10px;
}
.miss-cell.miss-blank {
  background: #fff9c4;
  border: 2px dashed #f1c40f;
  color: #e67e22;
  font-size: 2rem;
}

.miss-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  max-width: 480px;
  margin-left: auto; margin-right: auto;
}
.miss-opt {
  padding: 14px;
  background: #fff;
  border: 3px solid #ddd;
  border-radius: 14px;
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  color: #333;
  min-height: 56px;
}
.miss-opt:hover:not(:disabled) {
  border-color: #6c5ce7;
  background: #f0f4ff;
  transform: scale(1.04);
}
.miss-opt:disabled { cursor: default; }
.miss-opt.correct { border-color: #00b894; background: #d4fce8; }
.miss-opt.wrong   { border-color: #e17055; background: #ffe0d6; }

.miss-feedback {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  min-height: 1.6rem;
  margin-bottom: 8px;
}

.miss-result { margin: 12px 0; }
.miss-result-card {
  background: #fafaff; border-radius: 16px; padding: 24px;
  text-align: center;
  box-shadow: inset 0 0 0 2px #d6cfff;
}
.miss-result-emoji { font-size: 3.5rem; }
.miss-result-score { font-size: 2.2rem; font-weight: 800; color: #6c5ce7; margin: 4px 0; }
.miss-result-message { font-size: 1rem; color: #555; margin-bottom: 14px; font-weight: 600; }
.miss-result-bar {
  background: #e0e0e0; border-radius: 8px; height: 14px; overflow: hidden;
  margin: 8px auto; max-width: 240px;
}
.miss-result-fill {
  height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, #00b894, #00cec9);
  transition: width 0.6s ease;
}
.miss-result-pct { font-size: 0.85rem; color: #888; font-weight: 600; }

.miss-controls {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-top: 12px;
}
.miss-controls .btn {
  padding: 10px 20px; border-radius: 12px; border: none;
  font-weight: 700; cursor: pointer; font-size: 0.95rem;
  transition: transform 0.12s;
}
.miss-controls .btn-prev, .miss-controls .btn-next {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe); color: #fff;
  box-shadow: 0 3px 10px rgba(108,92,231,0.3);
}
.miss-controls .btn-reset {
  background: #fff; color: #6c5ce7; border: 2px solid #d6cfff;
}
.miss-controls .btn:hover { transform: translateY(-2px); }

@media (max-width: 600px) {
  .miss-cell { min-width: 48px; height: 48px; font-size: 1.2rem; }
  .miss-cell.miss-blank { font-size: 1.5rem; }
  .miss-opt { font-size: 1.2rem; min-height: 50px; padding: 10px; }
}

/* ===== Memory Flip ===== */
.mem-progress {
  margin-bottom: 16px;
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
}
.mem-progress .prog-dot { cursor: pointer; }

.mem-card-wrap {
  background: #fff; border-radius: 16px; padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  max-width: 560px; margin: 0 auto;
}
.mem-title { font-size: 1.25rem; text-align: center; margin-bottom: 6px; color: #333; }
.mem-stats {
  text-align: center; color: #888; font-weight: 600;
  font-size: 0.85rem; margin-bottom: 16px;
}

.mem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 420px;
  margin: 0 auto 14px;
}
.mem-card {
  aspect-ratio: 1;
  perspective: 700px;
  cursor: pointer;
}
.mem-card-inner {
  position: relative;
  width: 100%; height: 100%;
  transition: transform 0.4s;
  transform-style: preserve-3d;
}
.mem-card.flipped .mem-card-inner { transform: rotateY(180deg); }
.mem-card-front, .mem-card-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  font-size: 2.2rem;
}
.mem-card-front {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  color: #fff;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.25);
}
.mem-card-back {
  background: #fafaff;
  border: 3px solid #d6cfff;
  transform: rotateY(180deg);
}
.mem-card.matched .mem-card-back {
  background: #d4fce8;
  border-color: #00b894;
}
.mem-card.matched { cursor: default; }
.mem-card:not(.matched):not(.flipped):hover .mem-card-front {
  filter: brightness(1.08);
}

.mem-celebrate {
  text-align: center;
  font-size: 1.05rem;
  color: #00b894;
  font-weight: 700;
  min-height: 1.6rem;
  margin-bottom: 12px;
}

.mem-controls {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.mem-controls .btn {
  padding: 10px 20px; border-radius: 12px; border: none;
  font-weight: 700; cursor: pointer; font-size: 0.95rem;
  transition: transform 0.12s;
}
.mem-controls .btn-prev, .mem-controls .btn-next {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe); color: #fff;
  box-shadow: 0 3px 10px rgba(108,92,231,0.3);
}
.mem-controls .btn-reset {
  background: #fff; color: #6c5ce7; border: 2px solid #d6cfff;
}
.mem-controls .btn:hover { transform: translateY(-2px); }

@media (max-width: 600px) {
  .mem-card-front, .mem-card-back { font-size: 1.7rem; }
  .mem-grid { gap: 7px; }
}

/* ===== Sorting Bins ===== */
.sort-progress {
  margin-bottom: 16px;
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
}
.sort-progress .prog-dot { cursor: pointer; }

.sort-card-wrap {
  background: #fff; border-radius: 16px; padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  max-width: 580px; margin: 0 auto;
}
.sort-title { font-size: 1.25rem; text-align: center; margin-bottom: 4px; color: #333; }
.sort-hint  { font-size: 0.9rem;  text-align: center; color: #888; margin-bottom: 16px; }

.sort-tray {
  position: relative;
  height: 220px;
  background: linear-gradient(135deg, #fff7e6, #f0f4ff);
  border: 2px dashed #ffd9a0;
  border-radius: 14px;
  margin-bottom: 14px;
}
.sort-item {
  position: absolute;
  width: 80px; height: 80px;
  background: #fff;
  border: 2px solid #6c5ce7;
  border-radius: 12px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}
.sort-item .sort-emoji { font-size: 1.9rem; line-height: 1; }
.sort-item .sort-label { font-size: 0.6rem; color: #555; margin-top: 3px; font-weight: 600; }
.sort-item.dragging {
  cursor: grabbing;
  box-shadow: 0 10px 22px rgba(108,92,231,0.4);
  transform: scale(1.05);
}

.sort-bins {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.sort-bin {
  min-height: 130px;
  border: 3px dashed #d6cfff;
  border-radius: 14px;
  background: #fafaff;
  padding: 10px;
  display: flex; flex-direction: column; align-items: center;
  transition: border-color 0.15s, background 0.15s;
}
.sort-bin.bin-valid   { border-color: #00b894; background: #d4fce8; }
.sort-bin.bin-invalid { border-color: #e17055; background: #ffe0d6; }
.sort-bin-head {
  font-weight: 800; color: #6c5ce7; font-size: 0.95rem;
  margin-bottom: 8px; text-align: center;
}
.sort-bin-items {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
}
.sort-chip {
  font-size: 1.8rem;
  background: #fff;
  border-radius: 8px;
  padding: 2px 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.sort-celebrate {
  text-align: center;
  font-size: 1.05rem;
  color: #00b894;
  font-weight: 700;
  min-height: 1.6rem;
  margin: 14px 0 6px;
}

.sort-controls {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.sort-controls .btn {
  padding: 10px 20px; border-radius: 12px; border: none;
  font-weight: 700; cursor: pointer; font-size: 0.95rem;
  transition: transform 0.12s;
}
.sort-controls .btn-prev, .sort-controls .btn-next {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe); color: #fff;
  box-shadow: 0 3px 10px rgba(108,92,231,0.3);
}
.sort-controls .btn-reset {
  background: #fff; color: #6c5ce7; border: 2px solid #d6cfff;
}
.sort-controls .btn:hover { transform: translateY(-2px); }

@media (max-width: 600px) {
  .sort-item { width: 66px; height: 66px; }
  .sort-item .sort-emoji { font-size: 1.6rem; }
  .sort-chip { font-size: 1.5rem; }
}

/* ===== Story Order (sequencing) ===== */
.seq-progress {
  margin-bottom: 16px;
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
}
.seq-progress .prog-dot { cursor: pointer; }

.seq-card-wrap {
  background: #fff; border-radius: 16px; padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  max-width: 640px; margin: 0 auto;
}
.seq-title { font-size: 1.25rem; text-align: center; margin-bottom: 4px; color: #333; }
.seq-hint  { font-size: 0.9rem;  text-align: center; color: #888; margin-bottom: 18px; }

.seq-slots {
  display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 6px;
  margin-bottom: 20px;
}
.seq-slot {
  position: relative;
  width: 92px; min-height: 92px;
  border: 3px dashed #d6cfff;
  border-radius: 14px;
  background: #fafaff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 6px;
}
.seq-slot.next { border-color: #6c5ce7; background: #f0ecff; }
.seq-slot.filled { border-style: solid; border-color: #00b894; background: #d4fce8; }
.seq-slot-num {
  position: absolute; top: -10px; left: -10px;
  width: 24px; height: 24px;
  background: #6c5ce7; color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 800;
  border: 2px solid #fff;
}
.seq-blank { font-size: 1.8rem; color: #c9c2ec; font-weight: 800; }
.seq-arrow { color: #a29bfe; font-size: 1.2rem; font-weight: 800; }

.seq-cards {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
}
.seq-card {
  width: 104px; min-height: 104px;
  border: 3px solid #ddd;
  border-radius: 14px;
  background: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
}
.seq-card:hover { border-color: #6c5ce7; background: #f0f4ff; transform: translateY(-3px); }
.seq-card.shake { animation: seqShake 0.4s; border-color: #e17055; background: #ffe0d6; }
@keyframes seqShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

.seq-emoji { font-size: 2.4rem; line-height: 1; }
.seq-label { font-size: 0.72rem; color: #555; font-weight: 600; margin-top: 5px; text-align: center; }

.seq-celebrate {
  text-align: center;
  font-size: 1.05rem;
  color: #00b894;
  font-weight: 700;
  min-height: 1.6rem;
  margin: 16px 0 8px;
}

.seq-controls {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.seq-controls .btn {
  padding: 10px 20px; border-radius: 12px; border: none;
  font-weight: 700; cursor: pointer; font-size: 0.95rem;
  transition: transform 0.12s;
}
.seq-controls .btn-prev, .seq-controls .btn-next {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe); color: #fff;
  box-shadow: 0 3px 10px rgba(108,92,231,0.3);
}
.seq-controls .btn-reset {
  background: #fff; color: #6c5ce7; border: 2px solid #d6cfff;
}
.seq-controls .btn:hover { transform: translateY(-2px); }

@media (max-width: 600px) {
  .seq-slot { width: 70px; min-height: 70px; }
  .seq-card { width: 84px; min-height: 84px; }
  .seq-emoji { font-size: 1.9rem; }
  .seq-arrow { font-size: 0.9rem; }
}

/* ===== Spot the Difference ===== */
.spot-progress {
  margin-bottom: 16px;
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
}
.spot-progress .prog-dot { cursor: pointer; }

.spot-card-wrap {
  background: #fff; border-radius: 16px; padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  max-width: 600px; margin: 0 auto;
}
.spot-title { font-size: 1.25rem; text-align: center; margin-bottom: 4px; color: #333; }
.spot-counter {
  text-align: center; font-size: 0.9rem; font-weight: 700;
  color: #6c5ce7; margin-bottom: 16px;
}

.spot-board {
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 12px;
}
.spot-scene-label {
  text-align: center; font-weight: 700; color: #888;
  font-size: 0.85rem; margin-bottom: 6px;
}
.spot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: #fafaff;
  border: 3px solid #d6cfff;
  border-radius: 12px;
  padding: 8px;
}
.spot-cell {
  position: relative;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.1s;
  font-family: inherit;
}
.spot-cell:hover { transform: scale(1.08); border-color: #d6cfff; }
.spot-cell.found {
  border-color: #00b894;
  background: #d4fce8;
  box-shadow: 0 0 0 3px rgba(0,184,148,0.35) inset;
  cursor: default;
}
.spot-cell.found::after {
  content: "✓";
  position: absolute;
  font-size: 0.7rem;
  color: #00b894;
  transform: translate(16px, -16px);
  font-weight: 800;
}
.spot-cell.wrong {
  animation: spotWrong 0.4s;
  border-color: #e17055;
  background: #ffe0d6;
}
@keyframes spotWrong {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.spot-celebrate {
  text-align: center;
  font-size: 1.05rem;
  color: #00b894;
  font-weight: 700;
  min-height: 1.6rem;
  margin: 12px 0 8px;
}

.spot-controls {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.spot-controls .btn {
  padding: 10px 20px; border-radius: 12px; border: none;
  font-weight: 700; cursor: pointer; font-size: 0.95rem;
  transition: transform 0.12s;
}
.spot-controls .btn-prev, .spot-controls .btn-next {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe); color: #fff;
  box-shadow: 0 3px 10px rgba(108,92,231,0.3);
}
.spot-controls .btn-reset {
  background: #fff; color: #6c5ce7; border: 2px solid #d6cfff;
}
.spot-controls .btn:hover { transform: translateY(-2px); }

@media (max-width: 600px) {
  .spot-cell { width: 42px; height: 42px; font-size: 1.35rem; }
  .spot-board { gap: 10px; }
}

/* ===== Odd One Out ===== */
.odd-progress {
  margin-bottom: 16px;
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
}
.odd-progress .prog-dot { cursor: pointer; }

.odd-card-wrap {
  background: #fff; border-radius: 16px; padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  max-width: 600px; margin: 0 auto;
}
.odd-title { font-size: 1.25rem; text-align: center; margin-bottom: 4px; color: #333; }
.odd-hint  { font-size: 0.9rem;  text-align: center; color: #888; margin-bottom: 12px; }
.odd-qnum  { font-size: 0.85rem; text-align: center; color: #a29bfe; font-weight: 700; margin-bottom: 16px; }

.odd-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 480px;
  margin: 0 auto 12px;
}
.odd-item {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem;
  background: #fafaff;
  border: 3px solid #ddd;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
  font-family: inherit;
  font-weight: 800;
  color: #333;
}
.odd-item:hover:not(:disabled) {
  border-color: #6c5ce7; background: #f0f4ff; transform: scale(1.05);
}
.odd-item:disabled { cursor: default; }
.odd-item.correct { border-color: #00b894; background: #d4fce8; }
.odd-item.wrong   { border-color: #e17055; background: #ffe0d6; }

.odd-feedback {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  min-height: 1.6rem;
  margin-bottom: 8px;
}

.odd-result { margin: 12px 0; }
.odd-result-card {
  background: #fafaff; border-radius: 16px; padding: 24px;
  text-align: center;
  box-shadow: inset 0 0 0 2px #d6cfff;
}
.odd-result-emoji { font-size: 3.5rem; }
.odd-result-score { font-size: 2.2rem; font-weight: 800; color: #6c5ce7; margin: 4px 0; }
.odd-result-message { font-size: 1rem; color: #555; margin-bottom: 14px; font-weight: 600; }
.odd-result-bar {
  background: #e0e0e0; border-radius: 8px; height: 14px; overflow: hidden;
  margin: 8px auto; max-width: 240px;
}
.odd-result-fill {
  height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, #00b894, #00cec9);
  transition: width 0.6s ease;
}
.odd-result-pct { font-size: 0.85rem; color: #888; font-weight: 600; }

.odd-controls {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-top: 12px;
}
.odd-controls .btn {
  padding: 10px 20px; border-radius: 12px; border: none;
  font-weight: 700; cursor: pointer; font-size: 0.95rem;
  transition: transform 0.12s;
}
.odd-controls .btn-prev, .odd-controls .btn-next {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe); color: #fff;
  box-shadow: 0 3px 10px rgba(108,92,231,0.3);
}
.odd-controls .btn-reset {
  background: #fff; color: #6c5ce7; border: 2px solid #d6cfff;
}
.odd-controls .btn:hover { transform: translateY(-2px); }

@media (max-width: 600px) {
  .odd-item { font-size: 2rem; border-radius: 12px; }
  .odd-board { gap: 8px; }
}

/* ===== Sound Game ===== */
.snd-progress {
  margin-bottom: 16px;
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
}
.snd-progress .prog-dot { cursor: pointer; }

.snd-card-wrap {
  background: #fff; border-radius: 16px; padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  max-width: 600px; margin: 0 auto;
}
.snd-title { font-size: 1.25rem; text-align: center; margin-bottom: 4px; color: #333; }
.snd-qnum  { font-size: 0.85rem; text-align: center; color: #a29bfe; font-weight: 700; margin-bottom: 14px; }

.snd-prompt-row {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 18px;
}
.snd-hear {
  background: linear-gradient(135deg, #00b894, #00cec9);
  color: #fff; border: none;
  padding: 12px 22px; border-radius: 999px;
  font-size: 1rem; font-weight: 800; cursor: pointer;
  font-family: inherit;
  box-shadow: 0 3px 12px rgba(0,184,148,0.35);
  transition: transform 0.12s;
}
.snd-hear:hover { transform: scale(1.05); }
.snd-hear:active { transform: scale(0.97); }
.snd-prompt {
  font-size: 1rem; font-weight: 700; color: #555;
}

.snd-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 480px;
  margin: 0 auto 12px;
}
.snd-item {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem;
  background: #fafaff;
  border: 3px solid #ddd;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
  font-family: inherit;
}
.snd-item:hover:not(:disabled) {
  border-color: #6c5ce7; background: #f0f4ff; transform: scale(1.05);
}
.snd-item:disabled { cursor: default; }
.snd-item.correct { border-color: #00b894; background: #d4fce8; }
.snd-item.wrong   { border-color: #e17055; background: #ffe0d6; }

.snd-feedback {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  min-height: 1.6rem;
  margin-bottom: 8px;
}

.snd-result { margin: 12px 0; }
.snd-result-card {
  background: #fafaff; border-radius: 16px; padding: 24px;
  text-align: center;
  box-shadow: inset 0 0 0 2px #d6cfff;
}
.snd-result-emoji { font-size: 3.5rem; }
.snd-result-score { font-size: 2.2rem; font-weight: 800; color: #6c5ce7; margin: 4px 0; }
.snd-result-message { font-size: 1rem; color: #555; margin-bottom: 14px; font-weight: 600; }
.snd-result-bar {
  background: #e0e0e0; border-radius: 8px; height: 14px; overflow: hidden;
  margin: 8px auto; max-width: 240px;
}
.snd-result-fill {
  height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, #00b894, #00cec9);
  transition: width 0.6s ease;
}
.snd-result-pct { font-size: 0.85rem; color: #888; font-weight: 600; }

.snd-controls {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-top: 12px;
}
.snd-controls .btn {
  padding: 10px 20px; border-radius: 12px; border: none;
  font-weight: 700; cursor: pointer; font-size: 0.95rem;
  transition: transform 0.12s;
}
.snd-controls .btn-prev, .snd-controls .btn-next {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe); color: #fff;
  box-shadow: 0 3px 10px rgba(108,92,231,0.3);
}
.snd-controls .btn-reset {
  background: #fff; color: #6c5ce7; border: 2px solid #d6cfff;
}
.snd-controls .btn:hover { transform: translateY(-2px); }

@media (max-width: 600px) {
  .snd-item { font-size: 2rem; border-radius: 12px; }
  .snd-board { gap: 8px; }
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: block; }
  .content { margin-left: 0; padding: 20px 16px; padding-top: 56px; }
  .welcome-banner { padding: 24px 20px; }
  .welcome-banner h1 { font-size: 1.3rem; }
  .story-container { padding: 20px 14px; }
  .story-para { flex-direction: column !important; gap: 12px; }
  .para-illustration { flex: 0 0 auto; max-width: 100%; width: 100%; }
  .story-line { font-size: 1rem; }
}
