/* =========================================================
   棒棒糖专注力 365 · 绘本蜡笔风响应式样式表
   设计基调：参考图奶油亚麻纸纹 + 7色蜡笔棒棒糖 + 温暖童趣圆角
   ========================================================= */

:root {
  --bg-paper: #FAF6EE;
  --bg-card: rgba(255, 253, 248, 0.94);
  --bg-soft: #F4EFE4;
  --text-main: #262422;
  --text-sub: #6B6359;
  --text-muted: #9A9083;

  /* 参考图7大核心点缀色 */
  --c-red: #EB4B4B;
  --c-coral: #F06A6A;
  --c-orange: #F39237;
  --c-orange-text: #D97B1A;
  --c-yellow: #F4B41A;
  --c-green: #6CC24A;
  --c-forest: #1D9A6C;
  --c-blue: #2E97D8;
  --c-purple: #9B6BB8;
  --c-pink: #EE5A9A;

  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 10px 28px rgba(105, 84, 56, 0.08), 0 2px 6px rgba(105, 84, 56, 0.04);
  --shadow-float: 0 14px 36px rgba(235, 75, 75, 0.16);
  --font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Rounded Mplus 1c", -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: var(--bg-paper);
  /* 细腻亚麻纸质底纹 */
  background-image:
    radial-gradient(rgba(195, 178, 152, 0.16) 1px, transparent 1px),
    radial-gradient(rgba(195, 178, 152, 0.1) 1px, transparent 1px);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  overflow-x: hidden;
  line-height: 1.55;
}

button, input {
  font-family: inherit;
}

/* 背景蜡笔棒棒糖装饰层 */
.crayon-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.deco {
  position: absolute;
  opacity: 0.72;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.04));
}

.deco-top-left { top: -36px; left: -34px; width: 140px; }
.deco-top-right { top: -32px; right: 6%; width: 175px; }
.deco-mid-left { top: 24%; left: -56px; width: 145px; }
.deco-mid-right { top: 44%; right: -56px; width: 155px; }
.deco-bot-left { bottom: -36px; left: -24px; width: 170px; }
.deco-bot-right { bottom: -36px; right: -20px; width: 180px; }

@media (max-width: 640px) {
  .deco { opacity: 0.42; }
  .deco-top-left { width: 100px; top: -28px; left: -28px; }
  .deco-top-right { width: 120px; top: -24px; right: -10px; }
  .deco-mid-left { width: 92px; left: -46px; }
  .deco-mid-right { width: 96px; right: -46px; }
  .deco-bot-left { width: 120px; }
  .deco-bot-right { width: 125px; }
}

/* 应用主框架 */
.app-shell {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 16px 96px;
}

@media (min-width: 768px) {
  .app-shell {
    padding: 24px 28px 48px;
  }
}

/* 顶部栏 */
.top-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.brand-left > div {
  min-width: 0;
  overflow: hidden;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FF7575, #F39237);
  display: grid;
  place-items: center;
  font-size: 24px;
  box-shadow: 0 6px 14px rgba(235, 75, 75, 0.24);
  flex-shrink: 0;
}

.brand-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--c-red);
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.badge-365 {
  font-size: 10.5px;
  font-weight: 700;
  background: var(--c-yellow);
  color: #5A3B00;
  padding: 1px 6px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--c-orange-text);
  font-weight: 600;
  line-height: 1.3;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.icon-pill {
  width: 34px;
  height: 34px;
  border-radius: 99px;
  border: 2px solid #EFE6D8;
  background: #FFFDF9;
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.icon-pill:active { transform: scale(0.92); }

.baby-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  max-width: 110px;
  padding: 0 10px;
  border-radius: 99px;
  border: 2px solid #F6D8AE;
  background: #FFF9EE;
  color: #5A3D1B;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.baby-pill #babyNameDisplay {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 68px;
}

@media (max-width: 400px) {
  .brand-logo { width: 34px; height: 34px; font-size: 19px; border-radius: 11px; }
  .brand-title { font-size: 15px; gap: 4px; }
  .badge-365 { font-size: 10px; padding: 1px 5px; }
  .brand-sub { font-size: 10.5px; }
  .icon-pill { width: 30px; height: 30px; font-size: 14px; }
  .baby-pill { height: 30px; padding: 0 8px; font-size: 11.5px; }
  .game-tabs { gap: 5px; }
  .game-tab { padding: 8px 3px; border-radius: 13px; }
  .gt-name { font-size: 11px; }
}

.edit-dot {
  font-size: 11px;
  opacity: 0.65;
}

/* 年龄段切换条 */
.age-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(255, 252, 245, 0.85);
  padding: 6px;
  border-radius: 18px;
  border: 1.5px solid #EFE5D5;
  box-shadow: 0 4px 12px rgba(105, 84, 56, 0.05);
}

.age-chip {
  border: 2px solid transparent;
  background: transparent;
  border-radius: 13px;
  padding: 8px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: all 0.2s ease;
  color: var(--text-sub);
}

.age-chip-title {
  font-size: 14px;
  font-weight: 800;
}

.age-chip-sub {
  font-size: 11px;
  opacity: 0.8;
}

.age-chip.active[data-age="3-4"] {
  background: #EEF9E8;
  border-color: var(--c-green);
  color: #2D6E18;
}

.age-chip.active[data-age="4-5"] {
  background: #FFF3E3;
  border-color: var(--c-orange);
  color: #A8570A;
}

.age-chip.active[data-age="5-7"] {
  background: #F5EEFA;
  border-color: var(--c-purple);
  color: #653B82;
}

/* 主导航：手机端固定底部，平板/桌面端居顶 */
.main-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1.5px solid #EFE5D6;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 20px rgba(95, 76, 48, 0.07);
}

.nav-btn {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 14px;
  color: var(--text-sub);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-icon { font-size: 20px; line-height: 1.1; }

.nav-btn.active {
  color: var(--c-red);
  background: #FFF0EE;
}

@media (min-width: 768px) {
  .main-nav {
    position: static;
    max-width: 460px;
    margin: 0 auto 18px;
    border-radius: 99px;
    border: 1.5px solid #EFE5D6;
    padding: 5px;
    box-shadow: var(--shadow-card);
  }
  .nav-btn {
    flex-direction: row;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    padding: 9px 14px;
    border-radius: 99px;
  }
  .nav-icon { font-size: 17px; }
}

/* 通用卡片 */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 2px solid #F2E8D8;
  box-shadow: var(--shadow-card);
  padding: 18px;
  margin-bottom: 16px;
  backdrop-filter: blur(6px);
}

@media (min-width: 768px) {
  .card { padding: 24px 26px; }
}

.view-section { display: none; animation: fadeIn 0.25s ease; }
.view-section.active { display: block; }

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

.hidden { display: none !important; }
.muted { color: var(--text-sub); font-size: 13px; }

/* 顶部今日概览卡片 */
.day-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.day-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--c-red);
  padding: 3px 10px;
  border-radius: 99px;
  margin-bottom: 6px;
}

.day-theme-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
}

.day-theme-desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-sub);
}

.day-status-ring {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  background: linear-gradient(145deg, #FFF5E6, #FFE6C7);
  border: 2px solid #F6C384;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.day-status-ring.done {
  background: linear-gradient(145deg, #E8F9E1, #C9F0B9);
  border-color: var(--c-green);
}

.ring-num {
  font-size: 19px;
  font-weight: 900;
  color: var(--c-red);
  line-height: 1.1;
}

.day-status-ring.done .ring-num { color: #267B13; }

.ring-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-sub);
}

/* 7天快速切换条 */
.week-strip-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1.5px dashed #ECE2D2;
}

.week-strip-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.week-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.week-nav-btns {
  display: flex;
  align-items: center;
  gap: 5px;
}

.week-arrow-btn {
  border: 1.5px solid #E8DAC5;
  background: #FFFDF8;
  color: var(--text-main);
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.week-arrow-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.week-jump-btn {
  border: 1.5px solid #F6B9A8;
  background: #FFF1EE;
  color: var(--c-red);
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.streak-pill {
  background: #FFF0E0;
  color: #C75D08;
  padding: 2px 9px;
  border-radius: 99px;
  font-weight: 800;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.week-day-btn {
  border: 2px solid #EFE6D8;
  background: #FFFDF8;
  border-radius: 14px;
  padding: 7px 2px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
  transition: all 0.18s ease;
}

.week-day-btn .wd-emoji { font-size: 18px; line-height: 1.1; }
.week-day-btn .wd-num { font-size: 11px; font-weight: 800; color: var(--text-sub); }
.week-day-btn .wd-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E2D9CB;
}

.week-day-btn.completed .wd-dot { background: var(--c-green); }
.week-day-btn.completed { border-color: #BBE5A8; background: #F4FCF0; }

.week-day-btn.active {
  border-color: var(--day-color, var(--c-red));
  background: #FFF5F5;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(235, 75, 75, 0.15);
}

.week-day-btn.active .wd-num { color: var(--text-main); }

.age-tip-banner {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.age-tip-banner > span:first-child {
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 800;
}

/* 四大题型切换Tabs */
.game-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.game-tab {
  border: 2px solid #EFE5D5;
  background: rgba(255, 253, 248, 0.9);
  border-radius: 16px;
  padding: 10px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  transition: all 0.2s ease;
  color: var(--text-sub);
}

.gt-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #F0E7D8;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 900;
  display: grid;
  place-items: center;
}

.gt-name {
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.gt-check {
  position: absolute;
  top: 5px;
  right: 6px;
  font-size: 12px;
}

.game-tab.active {
  border-color: var(--c-red);
  background: #FFF3F1;
  color: var(--c-red);
  box-shadow: 0 6px 14px rgba(235, 75, 75, 0.14);
}

.game-tab.active .gt-num {
  background: var(--c-red);
  color: #fff;
}

.game-tab.done-tab {
  border-color: #B4E3A0;
}

/* 题目互动主舞台 */
.game-stage-card {
  min-height: 360px;
}

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

.stage-title {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  color: var(--c-coral);
  letter-spacing: 0.5px;
}

.stage-subtitle {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-orange-text);
}

/* 语音播报与家长辅助工具栏 */
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border-radius: 16px;
}

/* 按钮体系 */
.btn {
  border: none;
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.14s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:active { transform: scale(0.95); }

.btn-primary {
  background: linear-gradient(135deg, #F06262, #EB4B4B);
  color: #fff;
  box-shadow: 0 6px 14px rgba(235, 75, 75, 0.25);
}

.btn-secondary {
  background: #FFF3E2;
  color: #B65D0B;
  border: 1.5px solid #F6CE9A;
}

.btn-green {
  background: linear-gradient(135deg, #74CE51, #55B334);
  color: #fff;
  box-shadow: 0 6px 14px rgba(108, 194, 74, 0.25);
}

.btn-blue {
  background: linear-gradient(135deg, #43A9E6, #2E97D8);
  color: #fff;
  box-shadow: 0 6px 14px rgba(46, 151, 216, 0.24);
}

.btn-ghost {
  background: #FFFDF9;
  color: var(--text-sub);
  border: 1.5px solid #E5DAC8;
}

.btn-outline-danger {
  background: transparent;
  color: var(--c-red);
  border: 1.5px solid #F3BDBD;
  font-size: 13px;
  padding: 8px 14px;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 11px;
}

.btn-lg {
  padding: 13px 22px;
  font-size: 16px;
  border-radius: 16px;
}

.btn-block { width: 100%; }

/* 题型1：听词做动作 */
.action-focus-box {
  background: #FFF9EE;
  border: 2px dashed #F4C27F;
  border-radius: 20px;
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
}

.focus-word-display {
  font-size: 40px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: 3px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.focus-word-tag {
  font-size: 13px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
}

.focus-word-tag.target { background: #FFE6E6; color: var(--c-red); }
.focus-word-tag.secondary { background: #F1E6FA; color: var(--c-purple); }

.action-counter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (min-width: 768px) {
  .word-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
  }
}

.word-chip {
  background: #FFFDF9;
  border: 2px solid #EFE5D5;
  border-radius: 14px;
  padding: 10px 4px;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  position: relative;
  transition: all 0.16s ease;
  user-select: none;
}

.word-chip:hover { border-color: #E3C9A2; }

.word-chip.speaking {
  background: #FFF0D4;
  border-color: var(--c-orange);
  transform: scale(1.06);
  box-shadow: 0 6px 14px rgba(243, 146, 55, 0.24);
  z-index: 2;
}

.word-chip.done-word {
  opacity: 0.55;
  background: #F4EFE6;
}

/* 家长暗标：目标词右上角小圆点，方便家长不漏看 */
.word-chip.show-hint.is-target::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-red);
}

.word-chip.show-hint.is-secondary::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-purple);
}

/* 题型2：正听反说 */
.reverse-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reverse-group-card {
  background: #FFFDF9;
  border: 2px solid #EFE5D5;
  border-radius: 18px;
  padding: 12px 14px;
}

.reverse-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.group-badge {
  font-size: 14px;
  font-weight: 800;
  color: var(--c-orange-text);
  background: #FFF3E0;
  padding: 3px 10px;
  border-radius: 99px;
}

.num-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (min-width: 768px) {
  .num-row {
    grid-template-columns: repeat(8, 1fr);
  }
  .num-row.digits-3 {
    grid-template-columns: repeat(6, 1fr);
  }
}

.num-card {
  background: #FAF5EB;
  border: 2px solid #EAE0CF;
  border-radius: 14px;
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.num-main {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: 1px;
}

.num-ans {
  font-size: 12px;
  font-weight: 800;
  color: var(--c-blue);
  margin-top: 2px;
  min-height: 17px;
}

.num-card.speaking {
  background: #FFF0D4;
  border-color: var(--c-orange);
  transform: scale(1.06);
}

.num-card.passed {
  background: #EEF9E8;
  border-color: var(--c-green);
}

.num-card.passed .num-main { color: #2B7316; }

/* 题型3：听觉干扰 */
.interfere-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.interfere-card {
  background: #FFFDF9;
  border: 2px solid #EFE5D5;
  border-radius: 18px;
  padding: 14px 16px;
}

.interfere-card.solved {
  border-color: #AEE29A;
  background: #F7FDF4;
}

.interfere-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.interfere-words {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 12px;
  background: #FAF5EB;
  border-radius: 14px;
  margin-bottom: 12px;
  position: relative;
}

.interfere-words.masked .i-word {
  color: transparent;
  background: #E8DFCE;
  border-color: transparent;
  user-select: none;
}

.interfere-words.masked::after {
  content: "🙈 防偷看已开启（点「朗读本组」用耳朵听）";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-sub);
  background: rgba(250, 245, 235, 0.82);
  border-radius: 14px;
}

.i-word {
  font-size: 16px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1.5px solid #EAE0CF;
  transition: all 0.15s ease;
}

.i-word.speaking {
  background: #FFE8C2;
  border-color: var(--c-orange);
  transform: scale(1.08);
}

.interfere-q {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0 0 10px;
}

.count-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.count-btn {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  border: 2px solid #E8DEC9;
  background: #fff;
  font-size: 18px;
  font-weight: 900;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.16s ease;
}

.count-btn:active { transform: scale(0.92); }
.count-btn.correct { background: var(--c-green); border-color: var(--c-green); color: #fff; }
.count-btn.wrong { background: #FFE8E8; border-color: var(--c-red); color: var(--c-red); animation: shake 0.3s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* 题型4：逻辑推理 */
.logic-scene-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.logic-scene-icon {
  font-size: 42px;
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: #FFF3E0;
  display: grid;
  place-items: center;
  border: 2px solid #F7D19C;
}

.clues-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.clue-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FFFDF9;
  border: 2px solid #EFE5D5;
  border-radius: 16px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.clue-card.speaking {
  background: #FFF2D9;
  border-color: var(--c-orange);
}

.clue-letter {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c-blue);
  color: #fff;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.clue-text {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  flex: 1;
}

.logic-questions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.logic-q-card {
  background: #FAF5EB;
  border: 2px solid #EAE0CF;
  border-radius: 16px;
  padding: 14px;
}

.logic-q-card.solved {
  background: #F4FCF0;
  border-color: #B4E3A0;
}

.logic-q-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 10px;
  color: var(--text-main);
}

.logic-q-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.logic-answer-box {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 11px;
  background: #fff;
  border-left: 4px solid var(--c-green);
  font-size: 14px;
  font-weight: 700;
  color: #2B6D16;
}

/* 关卡底部完成按钮栏 */
.stage-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1.5px dashed #EAE0D0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* 当日完结庆祝卡片 */
.celebrate-card {
  text-align: center;
  background: linear-gradient(180deg, #FFFDF8 0%, #FFF3E4 100%);
  border-color: #F6C384;
}

.celebrate-icon { font-size: 46px; margin-bottom: 6px; }
.celebrate-card h3 { margin: 0 0 6px; font-size: 20px; color: var(--c-red); }
.celebrate-card p { margin: 0 0 16px; font-size: 14px; color: var(--text-sub); }
.celebrate-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ==================== 365天棒棒糖地图 ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-box {
  background: #FFFDF9;
  border: 2px solid #F0E6D6;
  border-radius: 18px;
  padding: 14px 10px;
  text-align: center;
}

.stat-val {
  font-size: 28px;
  font-weight: 900;
  color: var(--accent, var(--c-red));
  line-height: 1.1;
}

.stat-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
  margin-top: 4px;
}

.year-progress-track {
  height: 14px;
  border-radius: 99px;
  background: #EFE7D8;
  overflow: hidden;
}

.year-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #EB4B4B, #F39237, #F4B41A, #6CC24A);
  transition: width 0.4s ease;
}

.year-progress-note {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
  margin-top: 6px;
}

.section-head h3 { margin: 0 0 4px; font-size: 18px; }

.month-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 2px 12px;
  scrollbar-width: none;
}
.month-pills::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
  .month-pills {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

.month-pill {
  flex-shrink: 0;
  border: 2px solid #EFE5D5;
  background: #FFFDF9;
  border-radius: 99px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-sub);
  cursor: pointer;
}

.month-pill.active {
  background: var(--c-red);
  border-color: var(--c-red);
  color: #fff;
}

.month-banner {
  background: #FAF5EB;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.days-lollipop-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

@media (min-width: 640px) {
  .days-lollipop-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
  }
}

.lolli-cell {
  border: 2px solid #EFE5D5;
  background: #FFFDF9;
  border-radius: 16px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.15s ease;
  position: relative;
}

.lolli-cell:active { transform: scale(0.95); }

.lolli-ball {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: #fff;
  font-weight: 900;
  position: relative;
}

.lolli-stick {
  width: 4px;
  height: 10px;
  border-radius: 4px;
  background: #E2D5C1;
  margin-top: -5px;
}

.lolli-day { font-size: 11px; font-weight: 800; color: var(--text-main); }
.lolli-status { font-size: 10px; font-weight: 700; color: var(--text-muted); }

.lolli-cell.available { border-color: #F4C892; }
.lolli-cell.completed {
  border-color: var(--c-green);
  background: #F4FCF0;
}
.lolli-cell.completed .lolli-status { color: #2D7A17; }

.lolli-cell.locked {
  opacity: 0.62;
  background: #F7F3EB;
}

/* ==================== 宝妈指南 ==================== */
.guide-hero h2 { margin: 0 0 8px; font-size: 20px; color: var(--c-red); }
.guide-hero p { margin: 0; font-size: 14px; color: var(--text-sub); }

.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .guide-grid { grid-template-columns: repeat(3, 1fr); }
}

.age-guide-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px solid #EFE5D5;
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.age-guide-card h4 { margin: 0 0 4px; font-size: 16px; }
.age-guide-meta { font-size: 12px; font-weight: 800; margin-bottom: 8px; }
.age-guide-card p { font-size: 13px; color: var(--text-sub); margin: 0 0 10px; }
.age-guide-card ul { margin: 0; padding-left: 16px; font-size: 12.5px; color: var(--text-main); }
.age-guide-card li { margin-bottom: 4px; }

.principle-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 768px) {
  .principle-list { grid-template-columns: repeat(2, 1fr); }
}

.principle-item {
  display: flex;
  gap: 12px;
  background: #FAF5EB;
  padding: 14px;
  border-radius: 16px;
}

.p-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.principle-item h4 { margin: 0 0 4px; font-size: 15px; }
.principle-item p { margin: 0; font-size: 13px; color: var(--text-sub); }

.tip-ul {
  margin: 10px 0 16px;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-main);
}
.tip-ul li { margin-bottom: 8px; }

.data-manage-row {
  display: flex;
  justify-content: flex-end;
}

/* 弹窗：移动端/平板软键盘弹出友好，支持顺畅上下滚动，绝不遮挡输入框 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(38, 30, 20, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 20px 14px 46vh;
}

@media (min-height: 780px) {
  .modal-backdrop {
    align-items: center;
    padding: 24px 16px;
  }
}

.modal-box {
  width: 100%;
  max-width: 410px;
  background: #FFFDF8;
  border-radius: 24px;
  border: 2px solid #F0E5D5;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.poster-modal-box {
  max-width: 440px;
}

.poster-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.poster-modal-head h3 { margin: 0; }

.close-x {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #F3ECE0;
  font-size: 16px;
  cursor: pointer;
}

.poster-hint { margin: 6px 0 12px; }

.poster-preview-wrap {
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #EFE5D5;
  margin-bottom: 14px;
  background: #FAF6EE;
}

.poster-preview-wrap img {
  width: 100%;
  display: block;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin: 12px 0 6px;
}

.text-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 2px solid #E8DEC9;
  font-size: 15px;
  outline: none;
  background: #fff;
}

.text-input:focus { border-color: var(--c-orange); }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* Toast 轻提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(38, 36, 34, 0.9);
  color: #fff;
  padding: 10px 18px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 90;
  max-width: 90vw;
  text-align: center;
}

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

/* 庆祝彩带画布 */
.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 95;
}


/* ==================== 会员、激活码、客服与微信分享扩展样式 ==================== */
.status-promo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(255, 253, 248, 0.9);
  border: 1.5px solid #EFE5D5;
  border-radius: 14px;
  padding: 7px 10px;
}

.trial-tag {
  font-size: 12px;
  font-weight: 800;
  color: #B45A08;
  background: #FFF3E0;
  padding: 3px 9px;
  border-radius: 99px;
}

.vip-tag {
  font-size: 12px;
  font-weight: 800;
  color: #6B3C00;
  background: linear-gradient(135deg, #FFE07D, #F4B41A);
  padding: 3px 10px;
  border-radius: 99px;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-pill {
  border: none;
  border-radius: 99px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.mini-pill-vip {
  background: #FFEAEA;
  color: var(--c-red);
}

.mini-pill-wx {
  background: #E8F8EC;
  color: #1A8A3C;
}

.btn-wx {
  background: linear-gradient(135deg, #27C15B, #1AA34A);
  color: #fff;
  box-shadow: 0 6px 14px rgba(26, 163, 74, 0.24);
}

.age-chip.active[data-age="5-8"] {
  background: #F5EEFA;
  border-color: var(--c-purple);
  color: #653B82;
}

.week-day-btn.locked-day {
  opacity: 0.68;
  background: #F7F2E9;
}

/* 登录/注册切换 */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #F4EFE4;
  padding: 4px;
  border-radius: 14px;
  margin: 12px 0;
}

.auth-tab {
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-sub);
  cursor: pointer;
}

.auth-tab.active {
  background: #fff;
  color: var(--c-red);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.member-status-card {
  background: #FAF5EB;
  border-radius: 16px;
  padding: 12px 14px;
  margin: 12px 0;
  font-size: 13.5px;
}

/* 激活码解锁区 */
.unlock-notice {
  background: #FFF6E6;
  border: 1.5px solid #F6CF96;
  border-radius: 16px;
  padding: 12px 14px;
  margin: 12px 0;
  font-size: 13px;
}

.unlock-notice p { margin: 0 0 10px; }

.redeem-row {
  display: flex;
  gap: 8px;
  margin: 10px 0 14px;
}

.code-input {
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 1px;
  flex: 1;
}

/* 客服卡片 */
.cs-box-inline {
  background: #FAF5EB;
  border: 1.5px dashed #E2D3BC;
  border-radius: 18px;
  padding: 14px;
  margin-top: 10px;
}

.cs-box-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
}

.cs-inline-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cs-qr-thumb {
  width: 104px;
  height: 104px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid #EFE5D5;
  background: #fff;
  flex-shrink: 0;
}

.cs-inline-right {
  flex: 1;
  min-width: 0;
}

.wx-id-line {
  font-size: 13.5px;
  line-height: 1.5;
}

.wx-id-line strong {
  display: inline-block;
  background: #FFF3E0;
  color: #9B4E06;
  padding: 2px 8px;
  border-radius: 8px;
  white-space: nowrap;
  margin-top: 3px;
}

.cs-qr-large-wrap {
  width: 210px;
  height: 210px;
  margin: 0 auto 12px;
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid #F2E6D4;
  background: #fff;
  padding: 6px;
}

.cs-qr-large-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
}

.wx-id-pill-lg {
  display: inline-block;
  background: #FFF4E4;
  color: #9A4E08;
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 15px;
  margin-bottom: 4px;
}

/* 指南页客服卡片 */
.cs-guide-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

@media (min-width: 640px) {
  .cs-guide-flex {
    flex-direction: row;
    align-items: center;
  }
}

.cs-qr-box img {
  width: 148px;
  height: 148px;
  border-radius: 18px;
  border: 2px solid #EFE5D5;
  background: #fff;
  object-fit: contain;
}

.cs-info-col { flex: 1; }
.cs-info-col h3 { margin: 0 0 6px; color: var(--c-red); }
.wx-copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.wx-id-badge {
  background: #FFF3E0;
  color: #9B4E06;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.cs-action-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 微信分享弹窗 */
.share-textarea {
  resize: none;
  font-size: 13.5px;
  line-height: 1.55;
  background: #FAF5EB;
  margin-bottom: 12px;
}

.share-btn-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 480px) {
  .share-btn-grid {
    grid-template-columns: 1fr 1fr;
  }
}


/* ==================== 多宝宝档案切换条与管理样式 ==================== */
.children-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 1px;
  scrollbar-width: none;
}
.children-bar::-webkit-scrollbar { display: none; }

.child-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 99px;
  border: 1.5px solid #EADCC6;
  background: rgba(255, 253, 248, 0.92);
  color: var(--text-sub);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
}

.child-chip.active {
  background: #FFF0EE;
  border-color: var(--c-red);
  color: var(--c-red);
  box-shadow: 0 3px 10px rgba(235, 75, 75, 0.14);
}

.child-chip-add {
  border-style: dashed;
  border-color: #D8C5A8;
  color: var(--c-orange-text);
  background: #FFF9EE;
}

.avatar-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0 12px;
}

.avatar-opt {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 2px solid #EAE0CF;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.avatar-opt.active {
  border-color: var(--c-red);
  background: #FFF0EE;
  transform: scale(1.08);
}

.children-manage-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 14px;
}

.child-manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 14px;
  background: #FAF5EB;
  border: 1.5px solid #EAE0CF;
}

.child-manage-row.active {
  background: #FFF4F2;
  border-color: #F4B3AD;
}

.child-manage-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.child-manage-meta {
  font-size: 11.5px;
  color: var(--text-sub);
}
