/* ============================================================
   Zoo Phonics Adventure — 高品质儿童绘本游戏风格样式系统
   优先适配 iPad & 手机横屏，同时完美兼容手机竖屏与桌面端
   ============================================================ */

:root {
  --sky-top: #9bdcff;
  --sky-mid: #d6f3ff;
  --grass-light: #a6e377;
  --grass-deep: #5eb956;
  --cream: #fffdf7;
  --cream-soft: #fff7e6;
  --ink: #2c3547;
  --ink-soft: #5f6c85;
  --sun: #ffbe3b;
  --sun-dark: #d98e00;
  --coral: #ff6b8b;
  --coral-dark: #d84064;
  --mint: #2ec492;
  --mint-dark: #19946b;
  --ocean: #36a9f4;
  --ocean-dark: #0f7cc2;
  --grape: #8a63e6;
  --grape-dark: #5f3dc4;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow-card: 0 10px 26px rgba(36, 70, 102, 0.12);
  --shadow-btn: 0 5px 0 rgba(0, 0, 0, 0.16);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  font-family: "SF Pro Rounded", "PingFang SC", "Hiragino Maru Gothic ProN", "Nunito", "Comic Sans MS", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #b8e8ff 0%, #e7f8e8 58%, #cdeea6 100%);
  overflow-x: hidden;
  user-select: none;
}

button, input, select {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

.hidden {
  display: none !important;
}

/* 启动屏 */
.boot-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.boot-badge {
  font-size: 72px;
  animation: floatBob 2s ease-in-out infinite;
}

/* 通用 3D 游戏感按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #ffb938 0%, #ff9818 100%);
  box-shadow: 0 5px 0 #c97200, 0 8px 16px rgba(201, 114, 0, 0.24);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.04); }
.btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #c97200;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.btn-lg {
  min-height: 56px;
  padding: 12px 28px;
  font-size: 19px;
}
.btn-sm {
  min-height: 40px;
  padding: 7px 15px;
  font-size: 14px;
}
.btn-mint {
  background: linear-gradient(180deg, #43d9a2 0%, #24b482 100%);
  box-shadow: 0 5px 0 #15825b, 0 8px 16px rgba(21, 130, 91, 0.22);
}
.btn-mint:active { box-shadow: 0 1px 0 #15825b; }
.btn-ocean {
  background: linear-gradient(180deg, #52c3ff 0%, #2496eb 100%);
  box-shadow: 0 5px 0 #116bb3, 0 8px 16px rgba(17, 107, 179, 0.22);
}
.btn-ocean:active { box-shadow: 0 1px 0 #116bb3; }
.btn-coral {
  background: linear-gradient(180deg, #ff85a2 0%, #f15279 100%);
  box-shadow: 0 5px 0 #be2d52, 0 8px 16px rgba(190, 45, 82, 0.22);
}
.btn-coral:active { box-shadow: 0 1px 0 #be2d52; }
.btn-grape {
  background: linear-gradient(180deg, #a682ff 0%, #7a52e0 100%);
  box-shadow: 0 5px 0 #5331ad, 0 8px 16px rgba(83, 49, 173, 0.22);
}
.btn-grape:active { box-shadow: 0 1px 0 #5331ad; }
.btn-cream {
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #fff4dc 100%);
  border: 2px solid #f2dfc0;
  box-shadow: 0 4px 0 #dfc59a;
}
.btn-cream:active { box-shadow: 0 1px 0 #dfc59a; }

/* 顶部导航栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 253, 247, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid #f0e3c6;
  box-shadow: 0 4px 14px rgba(56, 86, 118, 0.08);
}

.brand-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.brand-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff2cc;
  border: 3px solid #ffb732;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-text h1 {
  font-size: 18px;
  line-height: 1.15;
  color: #e67700;
}
.brand-text span {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 700;
}

.topbar-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff8e1;
  border: 2px solid #ffe08a;
  font-weight: 800;
  font-size: 15px;
  color: #8f5600;
}
.stat-chip.coins { background: #fff3d6; border-color: #ffca63; }
.stat-chip.animals { background: #e8faef; border-color: #9ae5b4; color: #1d7543; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 主内容容器 */
.page-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 16px 36px;
}

/* 登录 / 家庭建档页 */
.auth-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  align-items: center;
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px;
}
.auth-hero {
  background: linear-gradient(160deg, #fffdf7 0%, #e7f9e5 100%);
  border: 4px solid #fff;
  border-radius: 34px;
  padding: 26px;
  box-shadow: var(--shadow-card);
  text-align: center;
}
.auth-hero h1 {
  font-size: 32px;
  color: #e67700;
  margin-top: 8px;
}
.auth-hero .en-sub {
  font-size: 15px;
  font-weight: 800;
  color: var(--ocean-dark);
  letter-spacing: 0.4px;
}
.auth-hero p {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}
.auth-badges-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.mini-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid #d5f0d8;
  font-size: 13px;
  font-weight: 700;
  color: #2b6e44;
}

.auth-card {
  background: var(--cream);
  border: 4px solid #fff;
  border-radius: 32px;
  padding: 26px;
  box-shadow: var(--shadow-card);
}
.tab-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f2ece0;
  padding: 5px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.tab-switch button {
  padding: 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink-soft);
  transition: all 0.2s;
}
.tab-switch button.active {
  background: #fff;
  color: #e67700;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.form-group {
  margin-bottom: 13px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 5px;
}
.form-group input, .form-group select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 2px solid #e6dcc7;
  background: #fff;
  font-size: 15px;
  color: var(--ink);
  outline: none;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--ocean);
  box-shadow: 0 0 0 4px rgba(54, 169, 244, 0.16);
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.avatar-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.avatar-opt {
  padding: 8px 4px;
  border-radius: 16px;
  border: 3px solid #eee4cf;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}
.avatar-opt.selected {
  border-color: #ff9f1a;
  background: #fff8e3;
  color: #c96c00;
}

/* ==================== 动物园全景首页 ==================== */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(300px, 0.92fr);
  gap: 16px;
  align-items: start;
}
.home-grid > * {
  min-width: 0;
}

.zoo-map-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.zoo-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.zoo-map-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 30px;
  background: linear-gradient(180deg, #9ad9ff 0%, #c8eeff 32%, #8ed871 33%, #73c75a 100%);
  border: 5px solid #fff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
@supports not (aspect-ratio: 16 / 10) {
  .zoo-map-card {
    height: 420px;
  }
}
.zoo-map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 地图上的 6 大主题区域入口浮岛按钮 */
.map-zone-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  z-index: 6;
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1);
}
.map-zone-node:hover {
  transform: translate(-50%, -55%) scale(1.06);
}
.map-zone-island {
  width: 82px;
  height: 70px;
  border-radius: 24px;
  border: 4px solid #fff;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18), 0 10px 18px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.map-zone-island svg {
  width: 60px;
  height: 60px;
}
.map-zone-node.locked .map-zone-island {
  filter: grayscale(0.55) brightness(0.92);
}
.zone-lock-pill {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ffcf40;
  color: #6b4300;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
  border: 2px solid #fff;
}
.map-zone-label {
  background: rgba(255, 253, 247, 0.96);
  padding: 4px 11px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.14);
  text-align: center;
  white-space: nowrap;
}
.map-zone-label strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.15;
}
.map-zone-label small {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: var(--mint-dark);
}

/* 地图上的动物园已摆放装饰与探险角色 */
.map-deco-item {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,0.16));
}
.map-explorer-walker {
  position: absolute;
  left: 50%;
  top: 84%;
  transform: translate(-50%, -50%);
  width: 66px;
  height: 66px;
  z-index: 7;
  animation: floatBob 2.8s ease-in-out infinite;
  cursor: pointer;
}
.map-voice-fab {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 9;
}
.map-deco-fab {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 9;
}

/* 右侧儿童任务栏 */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card {
  background: var(--cream);
  border: 4px solid #fff;
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 900;
  margin-bottom: 10px;
}
.mission-box {
  background: linear-gradient(135deg, #fff5d6 0%, #ffe4b5 100%);
  border-radius: 22px;
  padding: 14px;
  border: 2px solid #ffd480;
}
.mission-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mission-animal {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.mission-animal svg { width: 56px; height: 56px; }

.quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.game-mini-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 18px;
  background: #fff;
  border: 2px solid #ece3d1;
  box-shadow: 0 4px 0 #e2d5bc;
  text-align: left;
  transition: transform 0.14s;
  width: 100%;
}
.game-mini-card:hover { transform: translateY(-2px); }
.game-mini-card:active { transform: translateY(2px); }
.game-mini-card .icon-box {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.game-mini-card strong { display: block; font-size: 14px; color: var(--ink); }
.game-mini-card span { display: block; font-size: 12px; color: var(--ink-soft); }

.animals-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 6px;
}
.animal-chip {
  min-width: 68px;
  padding: 8px 6px;
  border-radius: 16px;
  background: #fff;
  border: 2px solid #e7f4e4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}
.animal-chip svg { width: 42px; height: 42px; }
.animal-chip span { font-size: 12px; font-weight: 800; color: var(--ink); }

/* 园区关卡地图页 */
.zone-hero {
  border-radius: 28px;
  padding: 20px 24px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}
.zone-hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.zone-mascot-box {
  width: 82px;
  height: 82px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.25);
  border: 3px solid rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}
.zone-mascot-box svg { width: 70px; height: 70px; }

.lessons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.lesson-card {
  background: var(--cream);
  border: 4px solid #fff;
  border-radius: 24px;
  padding: 16px 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.16s;
  position: relative;
}
.lesson-card:hover:not(.locked) { transform: translateY(-4px); }
.lesson-card.locked { opacity: 0.62; cursor: not-allowed; }
.lesson-card.completed { border-color: #7ee29a; }
.lesson-card .art { width: 78px; height: 78px; }
.lesson-card .word { font-size: 22px; font-weight: 900; color: var(--ocean-dark); }
.lesson-card .phoneme {
  font-size: 13px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fff2d6;
  color: #b56500;
}
.lesson-card .cn { font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.lesson-stars { font-size: 16px; letter-spacing: 2px; }
.week-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: #3465a4;
}

/* ==================== 单节课程 6 步交互学习页 ==================== */
.lesson-shell {
  max-width: 980px;
  margin: 0 auto;
}
.stage-stepper {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.step-pill {
  padding: 9px 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid #e6dec8;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
}
.step-pill.active {
  background: #ffbe3b;
  color: #fff;
  border-color: #ff9c00;
  box-shadow: 0 4px 10px rgba(255, 156, 0, 0.25);
}
.step-pill.done {
  background: #dff8e7;
  color: #1c7c45;
  border-color: #7ee29a;
}

.stage-card {
  background: var(--cream);
  border: 5px solid #fff;
  border-radius: 32px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.stage-two-col {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 22px;
  align-items: center;
}
.big-art-stage {
  background: radial-gradient(circle at 50% 40%, #fffdf5 0%, #e7f6ff 100%);
  border: 3px solid #d5ecff;
  border-radius: 28px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
}
.big-art-stage svg {
  width: 170px;
  height: 170px;
}
.big-word {
  font-size: 54px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #1c6cc7;
  line-height: 1.1;
}
.big-ipa {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  background: #fff1cc;
  color: #a85c00;
  font-size: 20px;
  font-weight: 800;
}
.speed-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.speed-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid #dfe7f2;
  background: #fff;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink-soft);
}
.speed-btn.active {
  background: #e3f4ff;
  border-color: var(--ocean);
  color: var(--ocean-dark);
}

/* 辨音选项与拼读音素块 */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.choice-card {
  background: #fff;
  border: 3px solid #e9e0cc;
  border-radius: 22px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 5px 0 #e0d3ba;
  transition: transform 0.14s, border-color 0.14s;
}
.choice-card:hover { transform: translateY(-3px); }
.choice-card.correct { border-color: #2ec492; background: #e8fbf3; }
.choice-card.wrong { border-color: #ff6b8b; background: #fff0f4; animation: wiggle 0.35s; }
.choice-card svg { width: 68px; height: 68px; }

.phoneme-tray, .blend-slots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.phoneme-tile {
  min-width: 82px;
  padding: 12px 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff 0%, #fff4d6 100%);
  border: 3px solid #ffc95c;
  box-shadow: 0 5px 0 #e09c1c;
  text-align: center;
  cursor: pointer;
  transition: transform 0.14s;
}
.phoneme-tile:hover { transform: translateY(-3px); }
.phoneme-tile.used { opacity: 0.35; pointer-events: none; }
.phoneme-tile .letters { display: block; font-size: 30px; font-weight: 900; color: #c75b00; }
.phoneme-tile .ph { display: block; font-size: 14px; font-weight: 800; color: var(--ink-soft); }

.blend-slot {
  min-width: 88px;
  min-height: 82px;
  border-radius: 20px;
  border: 3px dashed #82c4f8;
  background: #f0f9ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.blend-slot.filled {
  border-style: solid;
  border-color: #2ec492;
  background: #e6fbf3;
}

/* 语音评测与录音盒 */
.speech-box {
  background: #f7fbff;
  border: 3px solid #d4ebff;
  border-radius: 24px;
  padding: 16px;
}
.speech-status-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 16px;
  background: #fff7e0;
  border: 2px solid #ffd67a;
  font-size: 13px;
  line-height: 1.5;
  color: #7a4b00;
  margin-bottom: 12px;
}
.speech-status-banner.enabled {
  background: #e7faf2;
  border-color: #84e1bc;
  color: #136846;
}
.mic-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mic-pulse {
  animation: micPulse 1.1s ease-in-out infinite;
}
.speech-result-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 2px solid #dbe7f4;
}

/* 大象拼读桥可视化 */
.bridge-scene {
  background: linear-gradient(180deg, #b8e8ff 0%, #e1f6ff 55%, #59c2f0 56%, #2b9ad6 100%);
  border-radius: 24px;
  padding: 18px;
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 3px solid #fff;
}
.bridge-walker {
  position: relative;
  width: 74px;
  height: 74px;
  transition: transform 0.7s cubic-bezier(.34,1.3,.64,1);
}
.bridge-planks {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}
.bridge-plank {
  width: 78px;
  height: 54px;
  border-radius: 14px;
  border: 3px dashed rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
}
.bridge-plank.built {
  border-style: solid;
  border-color: #b46a20;
  background: linear-gradient(180deg, #f3ba6d 0%, #d48938 100%);
  color: #fff;
  box-shadow: 0 4px 0 #945214;
}

/* 家长后台 */
.parent-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.kpi-card {
  background: var(--cream);
  border: 3px solid #fff;
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.kpi-card .kpi-label { font-size: 13px; color: var(--ink-soft); font-weight: 800; }
.kpi-card .kpi-value { font-size: 28px; font-weight: 900; color: var(--ink); margin-top: 4px; }
.kpi-card .kpi-sub { font-size: 12px; color: var(--mint-dark); font-weight: 700; margin-top: 2px; }

.parent-two-col {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}
.skill-bar-row {
  margin-bottom: 12px;
}
.skill-bar-top {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 5px;
}
.progress-track {
  height: 14px;
  border-radius: 999px;
  background: #ece7da;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #43d9a2 0%, #29b6f6 100%);
  transition: width 0.4s ease;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: #e8faef;
  color: #1d7543;
}
.tag-chip.weak {
  background: #fff0f4;
  color: #be2d52;
}

/* Toast 与 Modal */
.toast-root {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast-msg {
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(36, 46, 66, 0.94);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  animation: fadeSlideUp 0.22s ease;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(25, 36, 56, 0.48);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-box {
  width: 100%;
  max-width: 520px;
  background: var(--cream);
  border: 4px solid #fff;
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  max-height: 90vh;
  overflow-y: auto;
}

/* ==================== 动物待机与交互动画 ==================== */
@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(241, 82, 121, 0.55); }
  50% { box-shadow: 0 0 0 14px rgba(241, 82, 121, 0); }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes animalBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.1); }
}
@keyframes tailWag {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(10deg); }
}
@keyframes trunkSwing {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(7deg); }
}
@keyframes wingFlap {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-12deg); }
}
@keyframes cloudDrift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(18px); }
}
@keyframes mouthAnimate {
  0%, 100% { transform: scaleY(0.86); }
  50% { transform: scaleY(1.12); }
}

.anim-blink { transform-box: fill-box; transform-origin: center; animation: animalBlink 4.2s infinite; }
.anim-tail { transform-box: fill-box; transform-origin: left center; animation: tailWag 2.1s ease-in-out infinite; }
.anim-trunk { transform-box: fill-box; transform-origin: top center; animation: trunkSwing 2.8s ease-in-out infinite; }
.anim-wing { transform-box: fill-box; transform-origin: right center; animation: wingFlap 1.9s ease-in-out infinite; }
.anim-cloud { animation: cloudDrift 10s ease-in-out infinite; }
.anim-mouth { transform-box: fill-box; transform-origin: center; animation: mouthAnimate 1.5s ease-in-out infinite; }

/* ==================== 响应式：优先 iPad/横屏，兼容手机竖屏 ==================== */
@media (max-width: 1120px) {
  .home-grid {
    grid-template-columns: minmax(0, 1.38fr) minmax(290px, 0.92fr);
  }
  .map-zone-island {
    width: 72px;
    height: 62px;
    border-radius: 20px;
  }
  .map-zone-island svg { width: 52px; height: 52px; }
  .lessons-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .parent-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .auth-stage {
    grid-template-columns: 1fr;
    padding: 16px 14px;
  }
  .home-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .zoo-map-card {
    aspect-ratio: 4 / 3.1;
  }
  .map-zone-island {
    width: 58px;
    height: 50px;
    border-radius: 16px;
    border-width: 3px;
  }
  .map-zone-island svg { width: 42px; height: 42px; }
  .map-zone-label { padding: 2px 7px; }
  .map-zone-label strong { font-size: 11px; }
  .map-zone-label small { font-size: 9px; }
  .zone-lock-pill { font-size: 9px; padding: 1px 5px; top: -6px; right: -6px; }
  .map-explorer-walker { width: 48px; height: 48px; top: 87%; }
  .lessons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stage-two-col, .parent-two-col {
    grid-template-columns: 1fr;
  }
  .stage-stepper {
    grid-template-columns: repeat(3, 1fr);
  }
  .big-word {
    font-size: 42px;
  }
  .topbar {
    flex-wrap: wrap;
    padding: 8px 12px;
  }
  .brand-text h1 { font-size: 16px; }
}

@media (max-width: 520px) {
  .choice-grid {
    grid-template-columns: 1fr;
  }
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
  .parent-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}
