/* =====================================================================
   暖暖水彩启蒙乐园 · 暖色调水彩纸纹护眼视觉系统
   重点适配 iPad 横屏 + 桌面浏览器，完整兼容手机端
   ===================================================================== */

:root {
  --bg-paper: #FAF5EB;
  --bg-paper-deep: #F3EAD8;
  --bg-card: #FFFDF8;
  --ink-primary: #4A3B31;
  --ink-secondary: #7D6B5D;
  --ink-muted: #A69586;
  --accent-warm: #D98A5C;
  --accent-warm-soft: #F7E2D1;
  --accent-sage: #6FA085;
  --accent-sage-soft: #E3F0E8;
  --accent-sky: #6D95BA;
  --accent-sky-soft: #E1EDF7;
  --accent-rose: #C47A85;
  --accent-rose-soft: #F7E3E6;
  --accent-gold: #D9A74A;
  --shadow-soft: 0 8px 26px rgba(96, 72, 52, 0.08);
  --shadow-hover: 0 14px 34px rgba(96, 72, 52, 0.13);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Rounded Mplus 1c", system-ui, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg-paper);
  /* 淡淡水彩冷压纸纹理 */
  background-image:
    radial-gradient(circle at 12% 18%, rgba(244, 214, 180, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 88% 12%, rgba(206, 226, 238, 0.28) 0%, transparent 42%),
    radial-gradient(circle at 80% 88%, rgba(215, 234, 218, 0.25) 0%, transparent 45%),
    radial-gradient(rgba(130, 105, 80, 0.035) 1px, transparent 0);
  background-size: 100% 100%, 100% 100%, 100% 100%, 18px 18px;
  color: var(--ink-primary);
  font-family: var(--font-display);
  line-height: 1.6;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* 夜间护眼暖光滤镜 */
.night-warm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 186, 102, 0.18);
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 9000;
  opacity: 0;
  transition: opacity 0.45s ease;
}

body.night-mode .night-warm-overlay {
  opacity: 1;
}

body.night-mode {
  background-color: #EFE5D3;
}

/* ================= 顶部导航栏 ================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(250, 245, 235, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(130, 105, 80, 0.1);
}

.brand-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 16px;
  text-align: left;
  transition: transform 0.2s ease;
}

.brand-btn:active {
  transform: scale(0.96);
}

.brand-icon {
  font-size: 30px;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FDEBD0, #F7D7B5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(217, 138, 92, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-primary);
  letter-spacing: 0.5px;
}

.brand-sub {
  font-size: 12px;
  color: var(--ink-secondary);
}

/* 分龄胶囊切换 */
.header-center {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-paper-deep);
  padding: 5px;
  border-radius: 999px;
}

.age-pill {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
}

.age-pill:hover {
  color: var(--ink-primary);
}

.age-pill.active {
  background: var(--bg-card);
  color: var(--accent-warm);
  box-shadow: 0 3px 10px rgba(96, 72, 52, 0.1);
}

/* 右侧家长锁（长按 2 秒解锁） */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer-badge {
  background: var(--accent-sage-soft);
  color: var(--accent-sage);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
}

.parent-lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid rgba(217, 138, 92, 0.42);
  background: linear-gradient(135deg, #FFFDF8, #FDF1E2);
  color: var(--ink-primary);
  font-size: 13.5px;
  font-weight: 800;
  padding: 5px 14px 5px 6px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 3px 10px rgba(217, 138, 92, 0.14);
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.parent-lock-btn.holding {
  border-color: var(--accent-warm);
  transform: scale(0.97);
}

.lock-ring-wrap {
  position: relative;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lock-ring {
  position: absolute;
  inset: 0;
  width: 30px;
  height: 30px;
  transform: rotate(-90deg);
}

.lock-ring-bg {
  fill: none;
  stroke: rgba(130, 105, 80, 0.14);
  stroke-width: 3;
}

.lock-ring-progress {
  fill: none;
  stroke: var(--accent-warm);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 94.2;
  stroke-dashoffset: 94.2;
  transition: stroke-dashoffset 0.05s linear;
}

.lock-icon {
  font-size: 14px;
}

/* ================= 主容器与首页双馆 ================= */
.app-main {
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 24px 56px;
}

.hero-banner {
  background: linear-gradient(135deg, #FFFDF8 0%, #FDF2E3 60%, #EEF5F0 100%);
  border: 1px solid rgba(217, 138, 92, 0.16);
  border-radius: var(--radius-xl);
  padding: 26px 32px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-soft);
}

.hero-banner h1 {
  margin: 0 0 8px;
  font-size: 26px;
  color: var(--ink-primary);
}

.hero-banner p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-secondary);
  max-width: 640px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero-chip {
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink-secondary);
  border: 1px solid rgba(130, 105, 80, 0.12);
}

.hero-chip-btn {
  cursor: pointer;
  background: linear-gradient(135deg, #E89F6E, #D98A5C);
  color: #FFFDF8;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(217, 138, 92, 0.28);
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}

.hero-chip-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(217, 138, 92, 0.36);
}

/* 每周上新展示条与角标 */
.weekly-update-strip {
  margin-top: 10px;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 12px;
  background: rgba(227, 240, 232, 0.85);
  color: #3F6D52;
  font-size: 13px;
  border: 1px solid rgba(111, 160, 133, 0.25);
}

.book-new-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6FA085, #57896E);
  color: #FFFDF8;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(87, 137, 110, 0.32);
}

.module-new-dot {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-sage-soft);
  color: #3F6D52;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 28px 0 16px;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-heading .section-hint {
  font-size: 13.5px;
  color: var(--ink-secondary);
}

/* 绘本馆卡片网格 */
.books-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.book-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1.5px solid rgba(130, 105, 80, 0.1);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.28s ease, box-shadow 0.28s ease, opacity 0.25s ease;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.book-card.dimmed {
  opacity: 0.45;
  filter: saturate(0.7);
}

.book-cover-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-paper-deep);
  overflow: hidden;
}

.book-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.book-card:hover .book-cover-wrap img {
  transform: scale(1.03);
}

.book-age-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink-primary);
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.book-featured-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #E89F6E, #D98A5C);
  color: #FFFDF8;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(217, 138, 92, 0.35);
}

.book-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-card-body h3 {
  margin: 0 0 4px;
  font-size: 20px;
  color: var(--ink-primary);
}

.book-card-theme {
  font-size: 12.5px;
  color: var(--accent-warm);
  font-weight: 700;
  margin-bottom: 8px;
}

.book-card-desc {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  flex: 1;
}

.book-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-sky);
}

/* 启蒙点读馆 6 大模块网格 */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.module-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  background: var(--bg-card);
  border: 1.5px solid rgba(130, 105, 80, 0.1);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.24s ease, box-shadow 0.24s ease, opacity 0.24s ease;
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.module-card.recommended {
  border-color: rgba(217, 138, 92, 0.45);
  box-shadow: 0 10px 28px rgba(217, 138, 92, 0.12);
}

.module-card.dimmed {
  opacity: 0.48;
}

.module-icon-box {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
}

.module-info h3 {
  margin: 0 0 3px;
  font-size: 19px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.module-rec-dot {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-warm-soft);
  color: var(--accent-warm);
}

.module-sub {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
  margin-bottom: 5px;
}

.module-desc {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin: 0;
}

/* ================= 绘本阅读器视图 ================= */
.reader-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.view-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid rgba(130, 105, 80, 0.16);
  background: var(--bg-card);
  color: var(--ink-primary);
  font-size: 15px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.back-btn:hover {
  background: var(--bg-paper-deep);
}

.reader-mode-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-toggle {
  border: 1.5px solid rgba(130, 105, 80, 0.16);
  background: var(--bg-card);
  color: var(--ink-secondary);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-toggle.active {
  background: var(--accent-warm);
  border-color: var(--accent-warm);
  color: #FFFDF8;
  box-shadow: 0 4px 14px rgba(217, 138, 92, 0.28);
}

/* 书页舞台（iPad 横屏黄金布局：左图右文 / 大图+温柔故事条） */
.book-stage {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 2px solid rgba(130, 105, 80, 0.1);
  box-shadow: 0 14px 40px rgba(96, 72, 52, 0.1);
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(260px, 0.82fr);
  gap: 24px;
  align-items: center;
  animation: pageFadeIn 0.36s ease;
}

@keyframes pageFadeIn {
  from { opacity: 0.3; transform: translateX(10px) scale(0.99); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.stage-illustration-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg-paper-deep);
  box-shadow: inset 0 0 0 1px rgba(130, 105, 80, 0.08);
}

.stage-illustration-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 轻点读彩蛋热点 */
.hotspot-btn {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 253, 248, 0.9);
  background: rgba(255, 250, 238, 0.72);
  backdrop-filter: blur(4px);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(96, 72, 52, 0.18);
  animation: gentlePulse 2.8s ease-in-out infinite;
  transition: transform 0.2s ease;
}

.hotspot-btn:active,
.hotspot-btn.triggered {
  transform: translate(-50%, -50%) scale(1.22);
}

@keyframes gentlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 245, 220, 0.75), 0 4px 14px rgba(96, 72, 52, 0.15); }
  50% { box-shadow: 0 0 0 12px rgba(255, 245, 220, 0), 0 4px 14px rgba(96, 72, 52, 0.15); }
}

.hotspot-bubble {
  position: absolute;
  transform: translate(-50%, -130%);
  background: rgba(255, 253, 248, 0.96);
  color: var(--ink-primary);
  font-size: 14px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(96, 72, 52, 0.16);
  pointer-events: none;
  animation: bubbleFloat 1.8s ease forwards;
  z-index: 10;
}

@keyframes bubbleFloat {
  0% { opacity: 0; transform: translate(-50%, -100%) scale(0.85); }
  15% { opacity: 1; transform: translate(-50%, -135%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -145%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -165%) scale(0.95); }
}

/* 右侧故事文字区 */
.stage-text-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 8px 6px;
}

.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-muted);
}

.story-sentences {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.story-sentence {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.75;
  color: var(--ink-primary);
  padding: 10px 14px;
  border-radius: 16px;
  transition: background 0.3s ease, color 0.3s ease, transform 0.25s ease;
  cursor: pointer;
}

.story-sentence.speaking {
  background: var(--accent-warm-soft);
  color: #5C3A21;
  transform: scale(1.02);
}

.reader-audio-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-primary {
  border: none;
  background: linear-gradient(135deg, #E3996B, #D38152);
  color: #FFFDF8;
  font-size: 15px;
  font-weight: 800;
  padding: 11px 22px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(211, 129, 82, 0.28);
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}

.btn-primary:active {
  transform: scale(0.96);
}

.btn-soft {
  border: 1.5px solid rgba(130, 105, 80, 0.18);
  background: var(--bg-paper);
  color: var(--ink-primary);
  font-size: 14.5px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-soft:hover {
  background: var(--bg-paper-deep);
}

.reader-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px;
}

.page-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: none;
  background: rgba(130, 105, 80, 0.22);
  cursor: pointer;
  transition: all 0.22s ease;
  padding: 0;
}

.page-dot.active {
  width: 28px;
  background: var(--accent-warm);
}

.book-ending-box {
  background: linear-gradient(135deg, #FFFDF8, #F4F9F5);
  border-radius: 20px;
  padding: 16px 18px;
  border: 1.5px dashed rgba(111, 160, 133, 0.45);
}

.book-ending-box h4 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--accent-sage);
}

.book-ending-box ul {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--ink-secondary);
}

/* ================= 六大启蒙点读与跟读馆 ================= */
.learning-header-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 18px 24px;
  border: 1.5px solid rgba(130, 105, 80, 0.1);
  box-shadow: var(--shadow-soft);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

/* 跟读状态引导条（温和示范 -> 2秒水波纹留白跟读 -> 小红花鼓励） */
.follow-banner {
  position: sticky;
  top: 76px;
  z-index: 120;
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(217, 138, 92, 0.26);
  border-radius: 20px;
  padding: 12px 20px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 8px 24px rgba(96, 72, 52, 0.08);
  transition: all 0.25s ease;
}

.follow-banner.phase-listen {
  border-color: var(--accent-sky);
  background: #F4F9FD;
}

.follow-banner.phase-repeat {
  border-color: var(--accent-warm);
  background: #FFF6EE;
}

.follow-banner.phase-praise {
  border-color: var(--accent-sage);
  background: #F2FAF5;
}

.follow-status-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ripple-orb {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-warm-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  position: relative;
}

.follow-banner.phase-repeat .ripple-orb::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid var(--accent-warm);
  animation: followRipple 1s ease-out infinite;
}

@keyframes followRipple {
  0% { transform: scale(0.85); opacity: 0.9; }
  100% { transform: scale(1.45); opacity: 0; }
}

.follow-status-text {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-primary);
}

.follow-status-sub {
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.follow-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 分类筛选条 */
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.cat-tab {
  border: 1.5px solid rgba(130, 105, 80, 0.14);
  background: var(--bg-card);
  color: var(--ink-secondary);
  font-size: 14px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.cat-tab.active {
  background: var(--ink-primary);
  border-color: var(--ink-primary);
  color: #FFFDF8;
}

/* 启蒙点读卡片网格 */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px;
}

.cards-grid.wide-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.tap-card {
  position: relative;
  background: var(--bg-card);
  border: 2px solid rgba(130, 105, 80, 0.1);
  border-radius: 22px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.tap-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.tap-card:active {
  transform: scale(0.96);
}

.tap-card.active-reading {
  border-color: var(--accent-warm);
  box-shadow: 0 0 0 5px rgba(217, 138, 92, 0.18);
  transform: translateY(-3px) scale(1.02);
}

.card-emoji-circle {
  width: 78px;
  height: 78px;
  margin: 0 auto 10px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  background: var(--bg-paper);
}

/* 认图模块真实高清照片卡片 */
.photo-cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 18px;
}

.photo-tap-card {
  padding: 12px 12px 16px;
}

.card-photo-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: inset 0 0 0 1px rgba(130, 105, 80, 0.08);
}

.card-real-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.photo-tap-card:hover .card-real-photo {
  transform: scale(1.04);
}

/* 简单英语：卡通人物真实情景对话剧场 */
.dialogue-scenes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.scene-card {
  border-radius: 24px;
  padding: 18px 20px;
  border: 1.5px solid rgba(130, 105, 80, 0.12);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scene-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scene-title {
  font-size: 16px;
  font-weight: 800;
}

.scene-play-all-btn {
  border: 1.5px solid rgba(130, 105, 80, 0.18);
  background: rgba(255, 253, 248, 0.9);
  color: var(--ink-primary);
  font-size: 12.5px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.scene-play-all-btn:hover {
  background: #FFFDF8;
  transform: scale(1.03);
}

.dialogue-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dialogue-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.dialogue-row.is-right {
  flex-direction: row-reverse;
}

.char-avatar-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.char-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #FFFDF8;
  border: 2.5px solid rgba(255, 253, 248, 0.98);
  box-shadow: 0 5px 14px rgba(96, 72, 52, 0.14);
  overflow: hidden;
}

.char-avatar img,
.char-avatar svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.char-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.speech-bubble {
  position: relative;
  flex: 1;
  border: 2px solid rgba(130, 105, 80, 0.12);
  background: rgba(255, 253, 248, 0.96);
  border-radius: 20px;
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(96, 72, 52, 0.06);
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dialogue-row.is-left .speech-bubble {
  border-bottom-left-radius: 6px;
}

.dialogue-row.is-right .speech-bubble {
  border-bottom-right-radius: 6px;
  text-align: right;
}

.speech-bubble:hover {
  transform: translateY(-2px);
  border-color: rgba(122, 95, 168, 0.45);
}

.speech-bubble.active-reading {
  border-color: var(--accent-warm);
  background: #FFF9F0;
  box-shadow: 0 0 0 4px rgba(217, 138, 92, 0.2);
}

.bubble-en {
  font-size: 18px;
  font-weight: 800;
  color: #5C4388;
  line-height: 1.35;
}

.bubble-zh {
  font-size: 13px;
  color: var(--ink-secondary);
  margin-top: 3px;
}

.color-swatch-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: var(--bg-paper);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.color-swatch-blob {
  width: 68px;
  height: 68px;
  border-radius: 44% 56% 52% 48% / 48% 45% 55% 52%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12), inset 0 -6px 12px rgba(0, 0, 0, 0.08);
}

@media (max-width: 820px) {
  .dialogue-scenes-grid {
    grid-template-columns: 1fr;
  }
}

.card-big-char {
  font-size: 56px;
  font-weight: 900;
  line-height: 1.15;
  color: var(--ink-primary);
  margin: 4px 0;
}

/* 认字模块：淡淡田字格 + 紧凑贴字象形小图 */
.char-hero-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 8px;
}

.char-tianzige {
  position: relative;
  width: 74px;
  height: 74px;
  border: 1.5px solid rgba(201, 123, 75, 0.28);
  border-radius: 12px;
  background-color: #FFFBF2;
  background-image:
    linear-gradient(to right, transparent calc(50% - 0.5px), rgba(201, 123, 75, 0.16) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(201, 123, 75, 0.16) 50%, transparent calc(50% + 0.5px));
  display: flex;
  align-items: center;
  justify-content: center;
}

.char-tianzige .card-big-char {
  font-size: 50px;
  margin: 0;
  line-height: 1;
}

.char-pictograph-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg-paper);
  border: 1px solid rgba(130, 105, 80, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}

.char-pictograph-badge svg {
  width: 100%;
  height: 100%;
  display: block;
}

.char-assoc-photo {
  width: 74px;
  height: 74px;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid rgba(130, 105, 80, 0.16);
  background: var(--bg-paper);
  box-shadow: 0 3px 10px rgba(96, 72, 52, 0.08);
  flex-shrink: 0;
}

.char-assoc-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-pinyin {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-warm);
  margin-bottom: 2px;
}

.card-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink-primary);
}

.card-sub {
  font-size: 13px;
  color: var(--ink-secondary);
  margin-top: 4px;
}

.card-hint {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* 拼音四声调按钮组 */
.tone-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.tone-btn {
  border: 1.5px solid rgba(77, 139, 91, 0.25);
  background: #F4FAF5;
  color: #3D6E48;
  font-size: 15px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.tone-btn:hover,
.tone-btn:active {
  background: #4D8B5B;
  color: #FFFDF8;
}

/* 古诗词视图 */
.poetry-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.poem-stage {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1.5px solid rgba(130, 105, 80, 0.12);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 1fr);
  gap: 26px;
  align-items: center;
}

.poem-art-wrap {
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg-paper-deep);
}

.poem-art-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poem-header {
  text-align: center;
  margin-bottom: 16px;
}

.poem-header h2 {
  margin: 0 0 4px;
  font-size: 28px;
}

.poem-author {
  font-size: 14px;
  color: var(--ink-secondary);
}

.poem-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poem-line-btn {
  border: 1.5px solid rgba(130, 105, 80, 0.12);
  background: var(--bg-paper);
  border-radius: 16px;
  padding: 10px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.poem-line-btn:hover {
  border-color: var(--accent-rose);
  background: #FFF9FA;
}

.poem-line-btn.active-reading {
  border-color: var(--accent-rose);
  background: var(--accent-rose-soft);
  transform: scale(1.02);
}

.poem-line-pinyin {
  font-size: 13px;
  color: var(--accent-rose);
  font-weight: 700;
}

.poem-line-text {
  font-size: 23px;
  font-weight: 800;
  color: var(--ink-primary);
  letter-spacing: 2px;
}

.poem-story-box {
  margin-top: 14px;
  background: #FBF7EF;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

/* ================= 弹窗（家长角 & 护眼休息） ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(58, 44, 34, 0.42);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(45, 32, 22, 0.25);
  border: 1.5px solid rgba(130, 105, 80, 0.14);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 26px 14px;
  border-bottom: 1px solid rgba(130, 105, 80, 0.1);
}

.modal-header h2 {
  margin: 0;
  font-size: 21px;
}

.modal-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

.icon-close-btn {
  border: none;
  background: var(--bg-paper-deep);
  color: var(--ink-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
}

.modal-body {
  padding: 20px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.parent-section {
  background: var(--bg-paper);
  border-radius: 18px;
  padding: 16px 18px;
}

.parent-section h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.parent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  flex-wrap: wrap;
}

.parent-row + .parent-row {
  border-top: 1px dashed rgba(130, 105, 80, 0.15);
}

.print-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
}

.print-item-btn {
  border: 1.5px solid rgba(130, 105, 80, 0.18);
  background: var(--bg-card);
  color: var(--ink-primary);
  border-radius: 14px;
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.print-item-btn:hover {
  border-color: var(--accent-warm);
  background: #FFF9F2;
}

.print-item-btn small {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-top: 2px;
}

.rest-card {
  max-width: 440px;
  text-align: center;
  padding: 32px 26px;
}

.rest-moon {
  font-size: 56px;
  margin-bottom: 10px;
}

.rest-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-item {
  background: rgba(74, 59, 49, 0.92);
  color: #FFFDF8;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  animation: toastIn 0.25s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 屏幕端隐藏打印容器 */
.print-root {
  display: none;
}

/* ================= 响应式适配（平板竖屏 & 手机） ================= */
@media (max-width: 960px) {
  .books-grid,
  .modules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .book-stage,
  .poem-stage {
    grid-template-columns: 1fr;
  }
  .story-sentence {
    font-size: 21px;
  }
}

@media (max-width: 680px) {
  .app-header {
    padding: 10px 14px;
    flex-wrap: wrap;
  }
  .header-center {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  .age-pill {
    flex: 1;
    text-align: center;
    padding: 7px 8px;
    font-size: 13px;
  }
  .lock-label {
    font-size: 12px;
  }
  .app-main {
    padding: 16px 14px 44px;
  }
  .hero-banner {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
  }
  .books-grid,
  .modules-grid {
    grid-template-columns: 1fr;
  }
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
