/* ==========================================================================
   幼儿数学思维启蒙 · math-magic-kids
   糖果缤纷风格：高明度多彩 · 圆润形状 · 波点装饰 · 轻快动效
   ========================================================================== */

:root {
  /* —— 品牌配色（严格遵循规范色值） —— */
  --c-primary: #92c021;      /* 主色：活力草绿 */
  --c-primary-soft: #eef6dd; /* 主色淡底 */
  --c-primary-deep: #6f9417; /* 主色加深（按压/描边） */
  --c-accent: #3ba4ce;       /* 辅助色：清新天蓝 */
  --c-accent-soft: #e3f3fa;
  --c-accent-deep: #2a7fa3;
  --c-cta: #9818e7;          /* 强调色（CTA/高亮）：葡萄紫 */
  --c-cta-soft: #f3e5fc;
  --c-cta-deep: #7a10b8;
  --c-bg: #fbfbf8;           /* 页面背景 */
  --c-card: #ffffff;         /* 卡片/表面 */
  --c-text: #272c1b;         /* 正文 */
  --c-text-2: #727a5c;       /* 次要文字 */
  --c-border: #e3e6db;       /* 描边 */

  /* —— 装饰糖果色（仅作趣味点缀，不喧宾夺主） —— */
  --c-candy-pink: #ff8fb3;
  --c-candy-pink-soft: #ffe3ee;
  --c-candy-orange: #ffb64d;
  --c-candy-orange-soft: #fff0da;
  --c-candy-yellow: #ffd23f;
  --c-candy-yellow-soft: #fff8dc;

  /* —— 圆角 / 阴影 —— */
  --radius: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 6px rgba(39, 44, 27, 0.06);
  --shadow-md: 0 8px 20px rgba(39, 44, 27, 0.10);
  --shadow-pop: 0 14px 30px rgba(152, 24, 231, 0.22);

  /* —— 字体 —— */
  --font-title: 'Quicksand', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
}

/* ===================== 基础重置 ===================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--c-text);
  background-color: var(--c-bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(146, 192, 33, 0.16) 0 14px, transparent 15px),
    radial-gradient(circle at 88% 14%, rgba(59, 164, 206, 0.16) 0 18px, transparent 19px),
    radial-gradient(circle at 6% 88%, rgba(255, 143, 179, 0.16) 0 16px, transparent 17px),
    radial-gradient(circle at 94% 84%, rgba(255, 210, 63, 0.20) 0 12px, transparent 13px),
    radial-gradient(circle at 46% 2%, rgba(152, 24, 231, 0.07) 0 10px, transparent 11px),
    radial-gradient(circle at 70% 96%, rgba(255, 182, 77, 0.14) 0 14px, transparent 15px);
  background-size: 260px 260px, 320px 320px, 300px 300px, 240px 240px, 220px 220px, 280px 280px;
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, .display {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

/* ===================== 布局容器 ===================== */
.shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 18px 48px;
  position: relative;
}

/* ===================== 顶部导航 ===================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 4px 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--c-text);
  letter-spacing: 0.02em;
}

.brand .badge {
  width: 40px; height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  display: grid; place-items: center;
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 6px 14px rgba(146, 192, 33, 0.35);
  transform: rotate(-6deg);
  animation: wiggle 5s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 88%, 100% { transform: rotate(-6deg); }
  92% { transform: rotate(-2deg); }
  95% { transform: rotate(-9deg); }
  98% { transform: rotate(-4deg); }
}

.topbar .mini-nav {
  display: flex;
  gap: 8px;
}

.mini-nav a {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--c-text-2);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--c-card);
  border: 2px solid var(--c-border);
  transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.mini-nav a:hover { transform: translateY(-2px); color: var(--c-text); }
.mini-nav a.on {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
  box-shadow: 0 6px 14px rgba(146, 192, 33, 0.35);
}

/* ===================== 通用卡片 ===================== */
.card {
  background: var(--c-card);
  border: 3px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px;
}

/* ===================== 按钮（糖果 3D 按压） ===================== */
.btn {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  color: #fff;
  background: var(--c-primary);
  border-bottom: 6px solid var(--c-primary-deep);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-bottom-width 0.12s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 22px rgba(111, 148, 23, 0.3); }
.btn:active { transform: translateY(3px); border-bottom-width: 2px; }

.btn.blue  { background: var(--c-accent); border-bottom-color: var(--c-accent-deep); }
.btn.blue:hover  { box-shadow: 0 12px 22px rgba(59, 164, 206, 0.3); }
.btn.purple{ background: var(--c-cta);   border-bottom-color: var(--c-cta-deep); }
.btn.purple:hover{ box-shadow: 0 12px 22px rgba(152, 24, 231, 0.3); }
.btn.pink  { background: var(--c-candy-pink); border-bottom-color: #e86f98; }
.btn.orange{ background: var(--c-candy-orange); border-bottom-color: #df9133; }
.btn.ghost {
  background: var(--c-card);
  color: var(--c-text-2);
  border: 2px solid var(--c-border);
  box-shadow: none;
}
.btn.ghost:hover { color: var(--c-text); border-color: var(--c-text-2); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

/* ===================== 首页 Hero ===================== */
.hero {
  position: relative;
  margin: 22px 0 26px;
  padding: 30px 26px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 255, 255, 0.5) 0 40px, transparent 41px),
    linear-gradient(120deg, var(--c-primary) 0%, var(--c-accent) 100%);
  color: #fff;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
}

.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 6px dashed rgba(255, 255, 255, 0.35);
  pointer-events: none;
}
.hero::before { width: 90px; height: 90px; right: 34%; top: -34px; }
.hero::after  { width: 60px; height: 60px; left: -22px; bottom: -18px; }

.hero h1 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); margin-bottom: 8px; }
.hero p  { font-size: 1rem; opacity: 0.95; max-width: 30em; }

.hero .hero-mascot {
  width: 110px; height: 110px;
  background: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 3.4rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  animation: bounce 2.4s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  45% { transform: translateY(-14px) rotate(4deg); }
  60% { transform: translateY(0) rotate(0); }
}

/* 每日游戏提示条 */
.daily-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--c-card);
  border: 3px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 14px 18px;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
}
.daily-card .flag {
  flex: none;
  font-size: 2rem;
  background: var(--c-candy-yellow-soft);
  border-radius: 16px;
  padding: 10px;
  animation: spin-slow 8s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

.daily-card .daily-info { flex: 1; }
.daily-card .daily-info .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--c-cta);
  background: var(--c-cta-soft);
  border-radius: var(--radius-pill);
  padding: 3px 12px;
  margin-bottom: 4px;
}
.daily-card .daily-info h3 { font-size: 1.12rem; }
.daily-card .daily-info p { font-size: 0.88rem; color: var(--c-text-2); }

/* ===================== 区块标题 ===================== */
.sec-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 30px 0 14px;
}
.sec-title .dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--c-candy-pink);
  box-shadow: 0 0 0 6px var(--c-candy-pink-soft);
}
.sec-title h2 { font-size: 1.35rem; }

/* ===================== 游戏卡片网格 ===================== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.game-card {
  background: var(--c-card);
  border: 3px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.game-card:hover { transform: translateY(-6px) rotate(-0.5deg); box-shadow: var(--shadow-md); }

.game-card .icon {
  width: 84px; height: 84px;
  margin: 0 auto 12px;
  border-radius: 26px;
  display: grid; place-items: center;
  font-size: 2.6rem;
  transition: transform 0.25s ease;
}
.game-card:hover .icon { transform: scale(1.12) rotate(-6deg); }

.game-card h3 { font-size: 1.18rem; margin-bottom: 6px; }
.game-card p { font-size: 0.88rem; color: var(--c-text-2); min-height: 2.6em; }

.game-card .stars {
  margin: 10px 0 12px;
  font-size: 1.05rem;
  letter-spacing: 2px;
}
.game-card .stars .star { display: inline-block; color: #ddd; }
.game-card .stars .star.got { color: var(--c-candy-yellow); text-shadow: 0 0 6px rgba(255, 210, 63, 0.5); }

.game-card a.btn { margin-top: 4px; font-size: 0.95rem; padding: 10px 20px; }

.icon.green { background: var(--c-primary-soft); }
.icon.blue  { background: var(--c-accent-soft); }
.icon.purple{ background: var(--c-cta-soft); }
.icon.pink  { background: var(--c-candy-pink-soft); }
.icon.orange{ background: var(--c-candy-orange-soft); }
.icon.yellow{ background: var(--c-candy-yellow-soft); }

/* ===================== 游戏页顶栏 ===================== */
.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 20px;
  flex-wrap: wrap;
}
.page-head .back {
  width: 46px; height: 46px;
  border-radius: 16px;
  background: var(--c-card);
  border: 3px solid var(--c-border);
  display: grid; place-items: center;
  font-size: 1.3rem;
  transition: transform 0.15s ease, background 0.15s ease;
  flex: none;
}
.page-head .back:hover { transform: translateX(-3px); background: var(--c-primary-soft); }
.page-head h1 { font-size: 1.5rem; }
.page-head .sub { color: var(--c-text-2); font-size: 0.9rem; }

/* 进度星星条 */
.star-row {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.star-row .star {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.2rem;
  background: var(--c-card);
  border: 2px dashed var(--c-border);
  color: transparent;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.star-row .star.got {
  background: var(--c-candy-yellow-soft);
  border: 2px solid var(--c-candy-yellow);
  color: #c9960a;
  transform: scale(1.05);
}

/* ===================== 游戏舞台 ===================== */
.stage {
  background: var(--c-card);
  border: 3px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 26px 20px 30px;
  text-align: center;
  position: relative;
}

.stage .prompt {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.stage .hint { font-size: 0.9rem; color: var(--c-text-2); margin-top: 18px; }

/* 数字认知：数一数 */
.count-area {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 120px;
  padding: 18px;
  background: var(--c-candy-yellow-soft);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.count-item {
  font-size: 2.4rem;
  animation: pop-in 0.4s cubic-bezier(.34,1.56,.64,1) backwards;
}
@keyframes pop-in {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.option {
  width: 76px; height: 76px;
  border-radius: 24px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.9rem;
  color: var(--c-text);
  background: var(--c-card);
  border: 3px solid var(--c-border);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.option:hover { transform: translateY(-4px) scale(1.04); }
.option:active { transform: scale(0.92); }
.option.right {
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
  box-shadow: 0 0 0 6px rgba(146, 192, 33, 0.25);
  animation: correct-bounce 0.5s cubic-bezier(.34,1.56,.64,1);
}
.option.wrong {
  border-color: var(--c-candy-pink);
  background: var(--c-candy-pink-soft);
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  50% { transform: translateX(8px); }
  75% { transform: translateX(-5px); }
}
@keyframes correct-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1.06); }
}

/* 形状配对：配对卡 */
.match-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 620px) {
  .match-layout { grid-template-columns: 1fr; }
}

.shape-target {
  background: var(--c-accent-soft);
  border-radius: var(--radius);
  padding: 26px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  border: 3px dashed var(--c-accent);
}
.shape-target .big { font-size: 4.6rem; line-height: 1; animation: bounce-soft 2.6s ease-in-out infinite; }
@keyframes bounce-soft {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.shape-target .name { font-family: var(--font-title); font-weight: 700; color: var(--c-accent-deep); font-size: 1.15rem; }

.shape-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 14px;
}
.shape-opt {
  background: var(--c-card);
  border: 3px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.shape-opt .s { font-size: 2.8rem; line-height: 1; }
.shape-opt .lbl { font-size: 0.85rem; font-weight: 700; color: var(--c-text-2); }
.shape-opt:hover { transform: translateY(-5px) rotate(-2deg); }
.shape-opt:active { transform: scale(0.92); }
.shape-opt.right {
  border-color: var(--c-primary);
  background: var(--c-primary-soft);
  animation: correct-bounce 0.5s cubic-bezier(.34,1.56,.64,1);
}
.shape-opt.wrong {
  border-color: var(--c-candy-pink);
  background: var(--c-candy-pink-soft);
  animation: shake 0.4s ease;
}

/* 比较游戏：比一比 */
.compare-zone {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}
@media (max-width: 520px) {
  .compare-zone { grid-template-columns: 1fr; }
  .compare-zone .vs { grid-row: auto; }
}
.compare-box {
  background: var(--c-candy-pink-soft);
  border: 3px dashed var(--c-candy-pink);
  border-radius: var(--radius);
  padding: 20px 12px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.compare-box.pick {
  transform: scale(1.05);
  box-shadow: 0 0 0 6px rgba(59, 164, 206, 0.25);
  border-style: solid;
  border-color: var(--c-accent);
  background: var(--c-accent-soft);
}
.compare-box .set { font-size: 2.1rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.compare-box .cap { font-family: var(--font-title); font-weight: 800; font-size: 1.15rem; }
.vs {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--c-cta);
  background: var(--c-cta-soft);
  border-radius: 50%;
  width: 64px; height: 64px;
  display: grid; place-items: center;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* 反馈浮层 */
.feedback {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(39, 44, 27, 0.35);
  backdrop-filter: blur(3px);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.feedback.show { opacity: 1; pointer-events: auto; }
.feedback .panel {
  background: var(--c-card);
  border-radius: var(--radius-lg);
  border: 4px solid var(--c-border);
  box-shadow: var(--shadow-pop);
  padding: 34px 30px 28px;
  text-align: center;
  max-width: 340px;
  width: calc(100% - 40px);
  transform: translateY(24px) scale(0.9);
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.feedback.show .panel { transform: translateY(0) scale(1); }
.feedback .emoji { font-size: 3.4rem; margin-bottom: 8px; animation: bounce 1.4s ease-in-out infinite; }
.feedback h2 { font-size: 1.6rem; margin-bottom: 6px; }
.feedback p { color: var(--c-text-2); font-size: 0.95rem; margin-bottom: 18px; }

/* ===================== 进度页 ===================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.stat {
  background: var(--c-card);
  border: 3px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  text-align: center;
}
.stat .num {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  color: var(--c-cta);
}
.stat .lbl { font-size: 0.82rem; color: var(--c-text-2); margin-top: 2px; }
.stat.green .num { color: var(--c-primary-deep); }
.stat.blue .num { color: var(--c-accent-deep); }

.skill-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--c-card);
  border: 3px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.skill-item .ico {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 1.6rem;
}
.skill-item .meta { flex: 1; }
.skill-item .meta .top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.skill-item .meta .top b { font-family: var(--font-title); font-size: 1.05rem; }
.skill-item .meta .top span { font-size: 0.85rem; color: var(--c-text-2); }
.bar {
  height: 14px;
  background: var(--c-bg);
  border: 2px solid var(--c-border);
  border-radius: var(--radius-pill);
  margin-top: 8px;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  width: 0;
  transition: width 0.8s cubic-bezier(.22,1,.36,1);
}

/* 连续打卡 */
.streak-strip {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 8px;
}
.streak-day {
  flex: 1;
  text-align: center;
  padding: 8px 2px;
  border-radius: 14px;
  background: var(--c-bg);
  border: 2px dashed var(--c-border);
  font-size: 0.75rem;
  color: var(--c-text-2);
}
.streak-day.done {
  background: var(--c-primary-soft);
  border: 2px solid var(--c-primary);
  color: var(--c-primary-deep);
  font-weight: 700;
}
.streak-day .d { font-size: 1rem; }

/* ===================== 家长页 ===================== */
.parent-panel {
  background: var(--c-card);
  border: 3px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
  margin-bottom: 18px;
}
.parent-panel h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.2rem;
  margin-bottom: 14px;
}
.parent-panel h2 .dot { width: 14px; height: 14px; border-radius: 50%; }

.child-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.child-tag {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--c-bg);
  border: 2px solid var(--c-border);
  font-weight: 600;
}
.child-tag .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1rem;
}
.child-tag.on {
  background: var(--c-cta-soft);
  border-color: var(--c-cta);
}

.mastery-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.mastery-row .lbl { width: 96px; font-size: 0.9rem; font-weight: 600; color: var(--c-text-2); flex: none; }
.mastery-row .bar { flex: 1; margin-top: 0; }
.mastery-row .val { width: 44px; text-align: right; font-family: var(--font-title); font-weight: 800; font-size: 0.95rem; }

.advice-list { display: grid; gap: 10px; }
.advice {
  display: flex; gap: 12px;
  background: var(--c-candy-yellow-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  border-left: 6px solid var(--c-candy-yellow);
}
.advice .em { font-size: 1.4rem; flex: none; }
.advice p { font-size: 0.92rem; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 2px dashed var(--c-border);
}
.setting-row:last-child { border-bottom: none; }
.setting-row .info b { display: block; font-size: 0.98rem; }
.setting-row .info span { font-size: 0.85rem; color: var(--c-text-2); }

/* 开关 */
.switch {
  position: relative;
  width: 56px; height: 32px;
  border-radius: var(--radius-pill);
  background: var(--c-border);
  transition: background 0.2s ease;
  flex: none;
}
.switch::after {
  content: "";
  position: absolute;
  top: 4px; left: 4px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1);
}
.switch.on { background: var(--c-primary); }
.switch.on::after { transform: translateX(24px); }

/* ===================== 彩纸屑 / 星星雨 ===================== */
.confetti-piece {
  position: fixed;
  top: -20px;
  width: 12px; height: 12px;
  border-radius: 3px;
  z-index: 90;
  pointer-events: none;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0.7; }
}

.star-burst {
  position: fixed;
  font-size: 1.4rem;
  z-index: 95;
  pointer-events: none;
  animation: burst 0.9s ease-out forwards;
}
@keyframes burst {
  from { transform: translate(0,0) scale(0.4); opacity: 1; }
  to   { transform: translate(var(--dx, 0), var(--dy, -70px)) scale(1.3); opacity: 0; }
}

/* ===================== 无障碍 / 细节 ===================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}

@media (max-width: 640px) {
  .shell { padding: 0 14px 40px; }
  .mini-nav a { padding: 7px 11px; font-size: 0.8rem; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero .hero-mascot { margin: 0 auto; width: 96px; height: 96px; font-size: 2.9rem; }
  .page-head h1 { font-size: 1.25rem; }
  .option { width: 66px; height: 66px; font-size: 1.6rem; }
}
