:root {
  --ink: #243b6b;
  --ink-soft: #5b6f96;
  --paper: #fffdf7;
  --white: #ffffff;
  --pink: #ff8fab;
  --mint: #35c79a;
  --blue: #4d96ff;
  --lilac: #9b5de5;
  --sun: #ffd166;
  --line: rgba(36, 59, 107, 0.1);
  --shadow: 0 14px 0 rgba(84, 133, 179, 0.08), 0 22px 44px rgba(84, 133, 179, 0.16);
  --font-round: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-letter: "Arial Rounded MT Bold", "Trebuchet MS", "Verdana", var(--font-round);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-round);
  background:
    radial-gradient(circle at 12% 4%, #fff3b8 0 8%, transparent 8.5%),
    radial-gradient(circle at 88% 10%, #ffd6e7 0 10%, transparent 10.5%),
    linear-gradient(180deg, #d8f3ff 0%, #eefbff 34%, #fffaf0 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

button { font: inherit; color: inherit; }

button:focus-visible,
a:focus-visible {
  outline: 4px solid #1d4ed8;
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.deco {
  position: absolute;
  opacity: 0.72;
  filter: drop-shadow(0 6px 8px rgba(36, 59, 107, 0.08));
  animation: bob 6s ease-in-out infinite;
}

.d1 { top: 26px; left: 3%; font-size: clamp(38px, 8vw, 74px); }
.d2 { top: 120px; right: 8%; font-size: clamp(34px, 7vw, 64px); animation-delay: -1.8s; }
.d3 { top: 46vh; left: 6%; font-size: clamp(26px, 5vw, 48px); animation-delay: -3.2s; }
.d4 { bottom: 16vh; right: 5%; font-size: clamp(30px, 6vw, 52px); animation-delay: -0.8s; }
.d5 { top: 36%; right: 14%; font-size: clamp(20px, 4vw, 34px); animation-delay: -2.4s; }
.d6 { bottom: 8vh; left: 12%; font-size: clamp(24px, 5vw, 40px); animation-delay: -4.1s; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 22px 20px 56px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 24px 26px;
  background: rgba(255, 255, 255, 0.82);
  border: 4px solid rgba(255, 255, 255, 0.95);
  border-radius: 34px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px dashed rgba(77, 150, 255, 0.18);
  border-radius: 26px;
  pointer-events: none;
}

.mascot {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ffffff, #e8f7ff 62%, #cdeeff);
  border: 4px dashed #8ecdf5;
  box-shadow: inset 0 -8px 0 rgba(142, 205, 245, 0.22);
  animation: mascotFloat 4.5s ease-in-out infinite;
}

.mascot-face { font-size: 64px; line-height: 1; }

.mascot-hi {
  position: absolute;
  right: -46px;
  bottom: -4px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  color: #45536f;
  white-space: nowrap;
  background: #fff;
  border: 2px solid #ffd166;
  border-radius: 999px;
  box-shadow: 0 4px 0 rgba(240, 193, 79, 0.4);
  transform: rotate(-3deg);
}

@keyframes mascotFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.eyebrow {
  margin: 0 0 4px;
  font-size: clamp(12px, 1.6vw, 14px);
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #d4618b;
}

.title {
  margin: 0 0 6px;
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.18;
  text-shadow: 0 3px 0 #fff, 0 6px 0 rgba(36, 59, 107, 0.08);
}

.title span { color: var(--c); }

.lead {
  margin: 0 0 12px;
  max-width: 46em;
  font-size: clamp(14px, 1.8vw, 17px);
  font-weight: 600;
  line-height: 1.65;
  color: var(--ink-soft);
}

.quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quick-facts li {
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 800;
  color: #46618f;
  background: #eef7ff;
  border: 1px solid #d7ebff;
  border-radius: 999px;
}

.sound-toggle {
  align-self: start;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  color: #38527f;
  background: #fff;
  border: 2px solid #d8e8fb;
  border-radius: 999px;
  box-shadow: 0 4px 0 #d8e8fb;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}

.sound-toggle:active { transform: translateY(3px); box-shadow: 0 1px 0 #d8e8fb; }
.sound-toggle[aria-pressed="false"] { color: #8b96aa; background: #f3f4f7; border-color: #e1e4ea; box-shadow: 0 4px 0 #e1e4ea; }

.tabs {
  position: sticky;
  top: 8px;
  z-index: 30;
  display: flex;
  gap: 8px;
  margin: 18px 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.8);
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(84, 133, 179, 0.16);
  backdrop-filter: blur(12px);
}

.tab {
  flex: 1 1 0;
  min-height: 50px;
  padding: 10px 8px;
  font-size: clamp(14px, 2vw, 17px);
  font-weight: 900;
  color: #5a6f94;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.14s, background 0.18s, color 0.18s, box-shadow 0.18s;
}

.tab small {
  display: inline-block;
  min-width: 20px;
  padding: 1px 5px;
  margin-left: 2px;
  font-size: 11px;
  font-weight: 800;
  color: inherit;
  background: rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  vertical-align: 1px;
}

.tab:hover { background: #f0f7ff; }

.tab[aria-selected="true"] { color: #fff; transform: translateY(-1px); }
.tab[data-group="initials"][aria-selected="true"] { background: linear-gradient(135deg, #ffb3c7, #ff7a9e); box-shadow: 0 4px 0 #dd5a80; }
.tab[data-group="finals"][aria-selected="true"] { background: linear-gradient(135deg, #8fe9cc, #2fc39a); box-shadow: 0 4px 0 #1e9d7a; }
.tab[data-group="whole"][aria-selected="true"] { background: linear-gradient(135deg, #cdbaff, #8f6cf0); box-shadow: 0 4px 0 #6f4bcc; }

.panel {
  scroll-margin-top: 86px;
  padding: 24px;
  background: rgba(255, 253, 247, 0.92);
  border: 3px solid #fff;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.section-intro h2 {
  margin: 0 0 4px;
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 900;
  letter-spacing: 1px;
}

.section-intro h2::before {
  content: "✏️";
  display: inline-block;
  margin-right: 7px;
  font-size: 0.82em;
  transform: rotate(-8deg);
}

.section-intro p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

.section-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: min(330px, 100%);
}

.read-all {
  min-height: 44px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #5aa7ff, #3c7be8);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 4px 0 #2b5fbb;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, filter 0.2s;
}

.read-all:hover { filter: brightness(1.05); }
.read-all:active { transform: translateY(3px); box-shadow: 0 1px 0 #2b5fbb; }
.read-all.is-reading { background: linear-gradient(135deg, #ff9b8a, #ef6a58); box-shadow: 0 4px 0 #c84a3a; }

.progress { width: 100%; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 12px; font-weight: 800; color: #6a7d9e; }
.progress-label strong { color: #d4618b; font-size: 13px; }

.progress-track {
  height: 13px;
  overflow: hidden;
  background: #edf0f5;
  border-radius: 999px;
  box-shadow: inset 0 2px 3px rgba(36, 59, 107, 0.08);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #ffd166, #ff9f43, #ff8fab);
  border-radius: inherit;
  transition: width 0.35s ease;
}

.letter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 13px;
  margin-top: 18px;
}

.letter-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  padding: 4px;
  color: #23395d;
  font-family: var(--font-letter);
  background:
    radial-gradient(circle at 78% 16%, rgba(255, 255, 255, 0.85), transparent 42%),
    var(--card, #ffe28a);
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  box-shadow: 0 6px 0 var(--edge, #edc14f), 0 10px 16px rgba(36, 59, 107, 0.08);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s;
  -webkit-tap-highlight-color: transparent;
}

.letter-card:nth-child(6n+1) { --card: #ffe28a; --edge: #edc14f; }
.letter-card:nth-child(6n+2) { --card: #ffc2d6; --edge: #f08aab; }
.letter-card:nth-child(6n+3) { --card: #b8f0d8; --edge: #79d3ac; }
.letter-card:nth-child(6n+4) { --card: #bfe3ff; --edge: #7cbdf0; }
.letter-card:nth-child(6n+5) { --card: #ddd0ff; --edge: #b39af0; }
.letter-card:nth-child(6n) { --card: #ffd4b0; --edge: #f2a76e; }

.letter-card .glyph {
  font-size: clamp(25px, 4.4vw, 35px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.5px;
}

.letter-card.len-3 .glyph { font-size: clamp(20px, 3.6vw, 28px); letter-spacing: -0.3px; }
.letter-card.len-4 .glyph { font-size: clamp(17px, 3vw, 24px); letter-spacing: -0.5px; }

.letter-card .pron {
  max-width: 100%;
  margin-top: 4px;
  padding: 2px 6px;
  overflow: hidden;
  font-family: var(--font-round);
  font-size: clamp(12px, 2.1vw, 14px);
  font-weight: 800;
  line-height: 1.1;
  color: #3f5578;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.62);
  border-radius: 999px;
}

.letter-card .star {
  position: absolute;
  top: 5px;
  right: 7px;
  font-size: 13px;
  line-height: 1;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.9));
}

.letter-card.is-learned {
  box-shadow: 0 6px 0 var(--edge), 0 10px 16px rgba(36, 59, 107, 0.08), inset 0 0 0 3px rgba(255, 255, 255, 0.55);
}

.letter-card.is-speaking {
  transform: translateY(-4px) scale(1.04);
  filter: saturate(1.12);
  outline: 4px solid #2b66d9;
  outline-offset: 1px;
}

@media (hover: hover) {
  .letter-card:hover { transform: translateY(-4px); box-shadow: 0 9px 0 var(--edge), 0 14px 20px rgba(36, 59, 107, 0.14); }
  .letter-card.is-speaking:hover { transform: translateY(-4px) scale(1.04); }
}

.letter-card:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--edge); }

.section-footnote {
  margin: 18px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #7a8aa8;
  text-align: center;
}

.game-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 24px;
  margin-top: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #fff0f6 0%, #eaf8ff 55%, #f1fff8 100%);
  border: 3px dashed #ffb3c7;
  border-radius: 32px;
  box-shadow: 0 14px 0 rgba(255, 143, 171, 0.08);
}

.game-kicker {
  display: inline-block;
  margin: 0 0 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #d4517c;
  background: #fff;
  border-radius: 999px;
}

.game-copy h2 { margin: 0 0 6px; font-size: clamp(22px, 3vw, 28px); font-weight: 900; }
.game-copy p:not(.game-kicker) { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.7; color: var(--ink-soft); }

.game-stage {
  position: relative;
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid #fff;
  border-radius: 24px;
}

.game-stage::before {
  content: "b   p   m   f";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  font-family: var(--font-letter);
  font-size: 62px;
  font-weight: 900;
  letter-spacing: 6px;
  color: rgba(77, 150, 255, 0.06);
  text-align: center;
  pointer-events: none;
}

.game-idle {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.game-idle-emoji { font-size: 54px; line-height: 1; animation: bob 3.6s ease-in-out infinite; }
.game-idle-text { margin: 0; font-size: 13px; font-weight: 800; color: #7a8aa8; }

.game-start {
  min-height: 56px;
  padding: 14px 26px;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #ff8fab, #f25f8b);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 6px 0 #c9446c;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}

.game-start:active { transform: translateY(4px); box-shadow: 0 2px 0 #c9446c; }

.game-round { width: 100%; text-align: center; }
.game-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.game-step { font-size: 13px; font-weight: 900; color: #6a7d9e; }
.game-score { font-size: 14px; letter-spacing: 1px; }
.game-score .dim { opacity: 0.22; }

.speak-btn {
  width: 72px;
  height: 72px;
  margin: 2px auto 10px;
  font-size: 32px;
  background: radial-gradient(circle at 35% 30%, #ffffff, #d9f0ff 65%, #b9e3ff);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 6px 0 #8ecdf5, 0 12px 18px rgba(77, 150, 255, 0.2);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}

.speak-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #8ecdf5; }

.game-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.game-option {
  min-height: 62px;
  font-family: var(--font-letter);
  font-size: 28px;
  font-weight: 900;
  color: #23395d;
  background: #fff;
  border: 3px solid #e6eef9;
  border-radius: 18px;
  box-shadow: 0 5px 0 #dfe8f5;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) { .game-option:hover:not(:disabled) { border-color: #9ecbff; background: #f5faff; } }
.game-option:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #dfe8f5; }
.game-option:disabled { cursor: default; }
.game-option.correct { color: #0c6b4f; background: #c9f7e5; border-color: #5bd6aa; box-shadow: 0 5px 0 #5bd6aa; }
.game-option.wrong { color: #a52a3f; background: #ffe0e5; border-color: #ff9aab; box-shadow: 0 5px 0 #ff9aab; animation: shake 0.4s ease; }

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

.hint-btn {
  margin: 0 auto 8px;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 800;
  color: #8a6500;
  background: #fff8df;
  border: 2px dashed #e8c65e;
  border-radius: 999px;
  cursor: pointer;
}

.hint-btn:active { transform: translateY(1px); }

.game-hint {
  max-width: 300px;
  margin: 0 auto 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #5b6f96;
  background: #fff;
  border: 2px solid #eef0f6;
  border-radius: 12px;
}

.game-feedback { min-height: 22px; margin: 10px 0 0; font-size: 13px; font-weight: 800; color: #4b6389; }

.game-result { text-align: center; }
.game-result .result-emoji { display: block; font-size: 60px; line-height: 1.1; margin-bottom: 4px; animation: pop 0.4s ease; }
.game-result h3 { margin: 0 0 4px; font-size: 24px; font-weight: 900; }
.game-result p { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.btn-soft {
  min-height: 46px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 800;
  color: #38527f;
  background: #fff;
  border: 2px solid #d8e8fb;
  border-radius: 999px;
  box-shadow: 0 4px 0 #d8e8fb;
  cursor: pointer;
}

.btn-soft:active { transform: translateY(3px); box-shadow: 0 1px 0 #d8e8fb; }

@keyframes pop {
  0% { transform: scale(0.4); }
  70% { transform: scale(1.14); }
  100% { transform: scale(1); }
}

.parent-tip {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 18px 22px;
  background: #fff6dd;
  border: 3px solid #ffe08a;
  border-radius: 26px;
  box-shadow: 0 10px 0 rgba(240, 193, 79, 0.14);
}

.tip-emoji { font-size: 30px; line-height: 1.2; flex: none; }
.parent-tip h2 { margin: 0 0 4px; font-size: 16px; font-weight: 900; color: #7a5a00; }
.parent-tip p { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.7; color: #826a2c; }

.footer { margin-top: 30px; text-align: center; color: #7a8aa8; }
.footer p { margin: 0 0 4px; font-size: 13px; font-weight: 700; }
.footer .footer-small { font-size: 11px; font-weight: 600; opacity: 0.8; }

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(20, 40, 80, 0.38);
  backdrop-filter: blur(4px);
}

.sheet {
  position: relative;
  width: min(540px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 26px 22px calc(20px + env(safe-area-inset-bottom));
  text-align: center;
  background: var(--paper);
  border-radius: 30px 30px 0 0;
  box-shadow: 0 -14px 50px rgba(20, 40, 80, 0.25);
  animation: sheetUp 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
  -webkit-overflow-scrolling: touch;
}

@keyframes sheetUp {
  from { transform: translateY(48px); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  font-size: 18px;
  font-weight: 900;
  color: #66789a;
  background: #eef4fb;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.sheet-emoji { display: block; font-size: 54px; line-height: 1.1; margin-top: 2px; }

.sheet-letter {
  margin: 0;
  font-family: var(--font-letter);
  font-size: clamp(58px, 14vw, 82px);
  font-weight: 900;
  line-height: 1.1;
  color: #243b6b;
  letter-spacing: 1px;
}

.sheet-speak { margin: 2px 0 12px; font-size: 16px; font-weight: 700; color: #6a7d9e; }
.sheet-speak strong { color: #d4517c; font-size: 18px; }

.sheet-tip {
  margin: 0 0 14px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
  color: #4c6284;
  text-align: left;
  background: #eef7ff;
  border-radius: 16px;
}

.example {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  background: #fff;
  border: 2px solid #eef0f6;
  border-radius: 18px;
}

.example-emoji { font-size: 36px; line-height: 1; flex: none; }
.example-text { flex: 1; min-width: 0; }
.example-text strong { display: block; font-size: 20px; font-weight: 900; }
.example-text span { display: block; margin-top: 1px; font-family: var(--font-letter); font-size: 15px; font-weight: 700; color: #6a7d9e; }

.example-play {
  width: 44px;
  height: 44px;
  font-size: 19px;
  background: #eef7ff;
  border: 2px solid #d7ebff;
  border-radius: 50%;
  cursor: pointer;
}

.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

.btn-primary,
.btn-learn {
  min-height: 52px;
  padding: 11px 12px;
  font-size: 15px;
  font-weight: 900;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.2s;
}

.btn-primary { color: #fff; background: linear-gradient(135deg, #ff8fab, #f25f8b); box-shadow: 0 5px 0 #c9446c; }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #c9446c; }

.btn-learn { color: #8a6500; background: #ffe9a8; box-shadow: 0 5px 0 #e8c65e; }
.btn-learn:active { transform: translateY(3px); box-shadow: 0 2px 0 #e8c65e; }
.btn-learn.is-learned { color: #0c6b4f; background: #c9f7e5; box-shadow: 0 5px 0 #5bd6aa; }

.sheet-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.sheet-nav button {
  min-height: 44px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  color: #38527f;
  background: #f2f6fc;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.sheet-nav span { font-size: 12px; font-weight: 800; color: #93a1b9; }

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 200;
  max-width: min(88vw, 460px);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  background: rgba(36, 59, 107, 0.94);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(20, 40, 80, 0.28);
  transform: translate(-50%, -24px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s, opacity 0.2s;
}

.toast.show { transform: translate(-50%, 0); opacity: 1; }

.confetti {
  position: fixed;
  top: -30px;
  z-index: 300;
  font-size: 22px;
  pointer-events: none;
  animation: fall 1.5s ease-in forwards;
}

@keyframes fall {
  to { transform: translateY(105vh) rotate(320deg); opacity: 0; }
}

@media (min-width: 720px) {
  .sheet-backdrop { align-items: center; padding: 24px; }
  .sheet { border-radius: 30px; padding: 30px 30px 24px; }
}

@media (min-width: 761px) {
  .mascot-hi { left: 50%; right: auto; bottom: -17px; transform: translateX(-50%) rotate(-3deg); }
}

@media (max-width: 760px) {
  .wrap { padding: 12px 12px 44px; }
  .hero { grid-template-columns: 1fr; gap: 8px; padding: 42px 14px 16px; text-align: center; }
  .hero::after { inset: 6px; border-radius: 26px; }
  .mascot { width: 82px; height: 82px; margin: 0 auto; }
  .mascot-face { font-size: 47px; }
  .mascot-hi { right: -32px; bottom: -6px; font-size: 10px; padding: 4px 7px; }
  .lead { margin: 0 auto 9px; font-size: 13px; line-height: 1.55; }
  .quick-facts { justify-content: center; gap: 6px; }
  .quick-facts li { padding: 4px 8px; font-size: 11px; }
  .sound-toggle { position: absolute; top: 10px; right: 10px; padding: 7px 10px; font-size: 11px; box-shadow: 0 3px 0 #d8e8fb; }
  .tabs { top: 4px; gap: 4px; padding: 6px; margin: 14px 0; }
  .tab { min-height: 46px; padding: 8px 4px; font-size: 13px; }
  .tab small { display: none; }
  .panel { padding: 16px; border-radius: 26px; }
  .section-head { align-items: stretch; gap: 12px; }
  .section-tools { min-width: 100%; align-items: stretch; }
  .read-all { width: 100%; }
  .letter-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 9px; margin-top: 14px; }
  .letter-card { border-radius: 18px; border-width: 2px; box-shadow: 0 4px 0 var(--edge); }
  .letter-card:nth-child(n) { box-shadow: 0 4px 0 var(--edge), 0 7px 10px rgba(36, 59, 107, 0.07); }
  .letter-card.is-speaking { box-shadow: 0 4px 0 var(--edge), 0 0 0 4px #2b66d9; outline: 0; }
  .letter-card .star { top: 3px; right: 5px; font-size: 11px; }
  .game-card { grid-template-columns: 1fr; gap: 14px; padding: 18px; border-radius: 26px; }
  .game-stage { min-height: 205px; padding: 12px; }
  .game-stage::before { font-size: 46px; bottom: -6px; }
  .game-idle-emoji { font-size: 46px; }
  .game-options { gap: 8px; }
  .game-option { min-height: 56px; font-size: 25px; border-radius: 15px; }
  .speak-btn { width: 62px; height: 62px; font-size: 27px; }
  .parent-tip { padding: 15px 16px; border-radius: 22px; }
  .example-emoji { font-size: 30px; }
  .sheet { width: 100%; }
}

@media (max-width: 380px) {
  .letter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .letter-card .glyph { font-size: 26px; }
  .letter-card.len-3 .glyph { font-size: 21px; }
  .letter-card.len-4 .glyph { font-size: 18px; }
  .tab { font-size: 12px; }
  .sheet-actions { grid-template-columns: 1fr; }
}

@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;
  }
}
