/* ============================================================
   英语山海经 · 样式
   东方冒险风：黛青山水 + 朱砂点缀 + 宣纸卷轴
   ============================================================ */

:root {
  --ink: #2c3e50;
  --ink-deep: #1a2a3a;
  --ink-light: #4a6076;
  --paper: #f7f2e7;
  --paper-dark: #efe6d3;
  --cinnabar: #c0392b;
  --cinnabar-bright: #e74c3c;
  --gold: #d4a94e;
  --gold-bright: #f0c866;
  --jade: #4a9e8f;
  --mist: rgba(255, 255, 255, 0.55);
  --shadow: 0 8px 24px rgba(26, 42, 58, 0.18);
  --radius: 16px;
  --font-title: "STKaiti", "Kaiti SC", "KaiTi", "STSong", "SimSun", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html { font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  min-height: 100vh;
  background: linear-gradient(180deg, #dfeaf0 0%, #cfdde6 30%, #c3d4de 60%, #d8e4ea 100%);
  overflow-x: hidden;
}

/* ---------- 山水背景 ---------- */
.scenery { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; pointer-events: none; z-index: 0; }
.scenery svg { width: 100%; height: auto; display: block; }

.cloud {
  position: fixed;
  background: var(--mist);
  border-radius: 999px;
  filter: blur(2px);
  animation: drift linear infinite;
  z-index: 0;
  pointer-events: none;
}
.cloud::before, .cloud::after { content: ''; position: absolute; background: var(--mist); border-radius: 999px; }
.cloud.c1 { width: 160px; height: 42px; top: 12%; animation-duration: 68s; }
.cloud.c1::before { width: 80px; height: 60px; top: -30px; left: 24px; }
.cloud.c1::after { width: 60px; height: 44px; top: -18px; right: 28px; }
.cloud.c2 { width: 120px; height: 34px; top: 26%; animation-duration: 92s; animation-delay: -30s; }
.cloud.c2::before { width: 60px; height: 46px; top: -22px; left: 18px; }
.cloud.c2::after { width: 48px; height: 36px; top: -14px; right: 20px; }
.cloud.c3 { width: 200px; height: 48px; top: 6%; animation-duration: 110s; animation-delay: -60s; opacity: 0.7; }
.cloud.c3::before { width: 100px; height: 70px; top: -34px; left: 32px; }
.cloud.c3::after { width: 70px; height: 50px; top: -22px; right: 36px; }

@keyframes drift {
  from { transform: translateX(-260px); }
  to { transform: translateX(calc(100vw + 260px)); }
}

/* ---------- 通用 ---------- */
.app { position: relative; z-index: 1; max-width: 960px; margin: 0 auto; padding: 16px 20px 120px; }

.screen { display: none; animation: fadeUp 0.45s ease; }
.screen.active { display: block; }

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

.hidden { display: none !important; }

.btn {
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px rgba(26, 42, 58, 0.15);
}
.btn:active { transform: scale(0.95); }
.btn-primary { background: linear-gradient(135deg, var(--cinnabar), var(--cinnabar-bright)); color: #fff; }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(192, 57, 43, 0.35); transform: translateY(-2px); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-bright)); color: #5a4416; }
.btn-gold:hover { box-shadow: 0 6px 18px rgba(212, 169, 78, 0.45); transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,0.7); color: var(--ink); border: 1.5px solid var(--ink-light); }
.btn-jade { background: linear-gradient(135deg, var(--jade), #5fb8a8); color: #fff; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.card {
  background: linear-gradient(160deg, var(--paper) 0%, var(--paper-dark) 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(212, 169, 78, 0.35);
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(212, 169, 78, 0.45);
  border-radius: calc(var(--radius) - 6px);
  pointer-events: none;
}
/* ---------- 顶部栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--font-title);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--ink-deep);
  letter-spacing: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.brand .dragon-logo { font-size: 2.2rem; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.stats-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stat-chip {
  background: rgba(255,255,255,0.82);
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(26,42,58,0.12);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.stat-chip .num { color: var(--cinnabar); font-weight: 800; }
.realm-chip { border: 1.5px solid var(--gold); background: linear-gradient(135deg, #fff8e8, #fbeecd); }

/* ---------- 导航 ---------- */
.nav { display: flex; gap: 10px; margin: 14px 0 22px; flex-wrap: wrap; }
.nav button {
  flex: 1;
  min-width: 110px;
  padding: 12px 8px;
  border: none;
  border-radius: 14px;
  background: rgba(255,255,255,0.65);
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(26,42,58,0.08);
  font-family: var(--font-body);
}
.nav button:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(26,42,58,0.15); }
.nav button.active {
  background: linear-gradient(135deg, var(--ink), var(--ink-deep));
  color: var(--gold-bright);
  box-shadow: 0 6px 16px rgba(26,42,58,0.3);
}

/* ---------- 首页 ---------- */
.hero {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 30px 34px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.hero-dragon { flex-shrink: 0; }
.hero-text h2 { font-family: var(--font-title); font-size: 1.7rem; margin-bottom: 10px; color: var(--ink-deep); }
.hero-text p { line-height: 1.8; color: var(--ink-light); max-width: 520px; }
.speech-bubble {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 14px 20px;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.7;
  box-shadow: 4px 4px 0 rgba(44,62,80,0.15);
  margin-top: 12px;
}
.speech-bubble::before {
  content: '';
  position: absolute;
  left: -14px; top: 24px;
  border: 8px solid transparent;
  border-right-color: var(--ink);
}
.speech-bubble::after {
  content: '';
  position: absolute;
  left: -10px; top: 24px;
  border: 8px solid transparent;
  border-right-color: #fff;
}
@media (max-width: 560px) {
  .speech-bubble::before, .speech-bubble::after { display: none; }
}

.home-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.panel { padding: 22px 24px; }
.panel h3 { font-family: var(--font-title); font-size: 1.25rem; margin-bottom: 14px; color: var(--ink-deep); display: flex; align-items: center; gap: 8px; }
.task-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed rgba(44,62,80,0.15); font-size: 0.95rem; }
.task-item:last-child { border-bottom: none; }
.task-item .t-icon { font-size: 1.2rem; }
.task-item .t-text { flex: 1; }
.task-item .t-progress { font-weight: 700; color: var(--jade); font-size: 0.88rem; }
.task-item .t-claim { padding: 5px 12px; font-size: 0.82rem; border-radius: 999px; border: none; background: var(--gold); color: #5a4416; font-weight: 700; cursor: pointer; }
.task-item.done { opacity: 0.55; }
.time-bar-wrap { margin-top: 8px; }
.time-bar { height: 10px; background: rgba(44,62,80,0.1); border-radius: 99px; overflow: hidden; }
.time-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--jade), var(--gold)); border-radius: 99px; transition: width 1s ease; }
.time-bar-note { font-size: 0.82rem; color: var(--ink-light); margin-top: 6px; }
.badge-shelf { display: flex; flex-wrap: wrap; gap: 10px; }
.badge-item {
  width: 62px; height: 62px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  background: rgba(44,62,80,0.08);
  filter: grayscale(1);
  opacity: 0.45;
  position: relative;
  cursor: default;
  transition: all 0.3s ease;
}
.badge-item.earned {
  background: radial-gradient(circle at 30% 30%, #fff3d6, var(--gold));
  filter: none;
  opacity: 1;
  box-shadow: 0 4px 12px rgba(212,169,78,0.5);
  animation: badgeGlow 2.4s ease-in-out infinite;
}
@keyframes badgeGlow { 0%,100% { box-shadow: 0 4px 12px rgba(212,169,78,0.5);} 50% { box-shadow: 0 4px 20px rgba(240,200,102,0.8);} }
.badge-item .tip {
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink-deep);
  color: #fff;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  display: none;
  z-index: 5;
}
.badge-item:hover .tip { display: block; }

/* ---------- 山海图 ---------- */
.scroll-map { padding: 30px 24px 40px; }
.scroll-map h2, .section-title { font-family: var(--font-title); font-size: 1.6rem; text-align: center; color: var(--ink-deep); letter-spacing: 3px; margin-bottom: 6px; }
.scroll-sub { text-align: center; color: var(--ink-light); font-size: 0.92rem; margin-bottom: 26px; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.mountain-card { padding: 20px 22px; cursor: pointer; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.mountain-card:hover { transform: translateY(-6px); box-shadow: 0 14px 32px rgba(26,42,58,0.25); }
.mountain-card.coming-soon { cursor: default; opacity: 0.85; }
.mountain-card.coming-soon:hover { transform: none; }
.mt-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.mt-icon { font-size: 2.1rem; width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.65); box-shadow: inset 0 0 0 1.5px rgba(212,169,78,0.4); }
.mt-titles h4 { font-family: var(--font-title); font-size: 1.2rem; color: var(--ink-deep); }
.mt-titles .en { font-size: 0.85rem; color: var(--cinnabar); font-weight: 700; }
.mt-story { font-size: 0.86rem; color: var(--ink-light); line-height: 1.7; margin-bottom: 12px; min-height: 44px; }
.mt-progress { display: flex; align-items: center; gap: 10px; }
.mt-progress .bar { flex: 1; height: 8px; background: rgba(44,62,80,0.1); border-radius: 99px; overflow: hidden; }
.mt-progress .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--jade), var(--gold)); }
.mt-progress .txt { font-size: 0.8rem; font-weight: 700; color: var(--jade); white-space: nowrap; }
.mt-seal {
  position: absolute;
  top: 14px; right: 14px;
  font-size: 0.75rem;
  background: var(--cinnabar);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  transform: rotate(6deg);
  font-family: var(--font-title);
  letter-spacing: 2px;
  z-index: 2;
}
.mt-seal.gold { background: var(--gold); color: #5a4416; }

/* ---------- 关卡选择 ---------- */
.back-row { margin: 10px 0 18px; }
.level-list { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }
.level-card { display: flex; align-items: center; gap: 18px; padding: 20px 24px; cursor: pointer; transition: transform 0.2s ease; }
.level-card:hover { transform: translateX(6px); }
.level-card .lv-icon { font-size: 2.2rem; width: 60px; height: 60px; background: rgba(255,255,255,0.6); border-radius: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.level-card .lv-info { flex: 1; }
.level-card h4 { font-size: 1.1rem; font-family: var(--font-title); color: var(--ink-deep); margin-bottom: 4px; }
.level-card .lv-desc { font-size: 0.85rem; color: var(--ink-light); }
.level-card .lv-meta { text-align: right; font-size: 0.85rem; color: var(--ink-light); white-space: nowrap; }
.level-card .lv-stars { font-size: 1.1rem; letter-spacing: 2px; }
.level-card.boss-card { border: 2px solid var(--cinnabar); background: linear-gradient(160deg, #fdf0ec, var(--paper)); }
/* ---------- 闯关 ---------- */
.quiz-wrap { max-width: 720px; margin: 0 auto; }
.quiz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.quiz-title { font-family: var(--font-title); font-size: 1.3rem; color: var(--ink-deep); }
.hearts { font-size: 1.2rem; letter-spacing: 3px; }
.progress-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.progress-dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(44,62,80,0.15); transition: all 0.3s; }
.progress-dots i.cur { background: var(--gold); transform: scale(1.3); }
.progress-dots i.ok { background: var(--jade); }
.progress-dots i.bad { background: var(--cinnabar); }

.boss-bar-wrap { margin-bottom: 14px; padding: 14px 18px; display: flex; align-items: center; gap: 14px; }
.boss-bar-wrap .boss-emoji { font-size: 2rem; animation: bossShake 1.2s ease-in-out infinite; }
@keyframes bossShake { 0%,100% { transform: rotate(-4deg);} 50% { transform: rotate(4deg);} }
.boss-bar { flex: 1; height: 16px; background: rgba(44,62,80,0.12); border-radius: 99px; overflow: hidden; }
.boss-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cinnabar), var(--cinnabar-bright)); border-radius: 99px; transition: width 0.5s ease; }
.boss-name { font-weight: 700; color: var(--cinnabar); font-size: 0.9rem; white-space: nowrap; }

.question-card { padding: 30px 30px 26px; }
.q-text { font-size: 1.18rem; line-height: 1.75; font-weight: 600; color: var(--ink-deep); margin-bottom: 20px; }
.q-text .speak-btn {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 8px;
  border: none;
  background: var(--jade);
  color: #fff;
  border-radius: 999px;
  width: 34px; height: 34px;
  font-size: 1rem;
  cursor: pointer;
  align-items: center; justify-content: center;
  transition: transform 0.15s;
}
.q-text .speak-btn:hover { transform: scale(1.12); }

.options { display: grid; gap: 12px; }
.option-btn {
  text-align: left;
  padding: 14px 18px;
  border-radius: 14px;
  border: 2px solid rgba(44,62,80,0.18);
  background: #fff;
  font-size: 1.02rem;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  color: var(--ink);
}
.option-btn:hover:not(:disabled) { border-color: var(--gold); transform: translateX(4px); box-shadow: 0 4px 12px rgba(212,169,78,0.25); }
.option-btn .opt-tag { width: 28px; height: 28px; border-radius: 50%; background: rgba(44,62,80,0.08); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.option-btn.correct { border-color: var(--jade); background: #eafaf3; }
.option-btn.correct .opt-tag { background: var(--jade); color: #fff; }
.option-btn.wrong { border-color: var(--cinnabar); background: #fdecea; animation: shake 0.4s; }
.option-btn.wrong .opt-tag { background: var(--cinnabar); color: #fff; }
.option-btn:disabled { cursor: default; }
@keyframes shake { 0%,100% { transform: translateX(0);} 25% { transform: translateX(-6px);} 75% { transform: translateX(6px);} }

.spell-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spell-input {
  flex: 1;
  min-width: 200px;
  font-size: 1.3rem;
  letter-spacing: 4px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 2px solid rgba(44,62,80,0.25);
  background: #fff;
  font-family: var(--font-body);
  outline: none;
}
.spell-input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212,169,78,0.2); }

.order-slots, .order-pool { display: flex; flex-wrap: wrap; gap: 10px; min-height: 52px; padding: 12px; border-radius: 14px; margin-bottom: 12px; }
.order-slots { background: rgba(212,169,78,0.12); border: 2px dashed rgba(212,169,78,0.5); }
.order-pool { background: rgba(44,62,80,0.05); }
.token {
  padding: 10px 18px;
  background: #fff;
  border: 2px solid var(--ink-light);
  border-radius: 12px;
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
  color: var(--ink);
  font-family: var(--font-body);
}
.token:hover { transform: translateY(-3px); border-color: var(--gold); }
.order-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.feedback {
  margin-top: 20px;
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 0.95rem;
  line-height: 1.75;
  animation: fadeUp 0.3s ease;
  display: none;
}
.feedback.show { display: block; }
.feedback.good { background: #eafaf3; border-left: 5px solid var(--jade); }
.feedback.bad { background: #fdecea; border-left: 5px solid var(--cinnabar); }
.feedback b.fb-title { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.feedback.good b.fb-title { color: var(--jade); }
.feedback.bad b.fb-title { color: var(--cinnabar); }

.quiz-actions { display: flex; justify-content: space-between; margin-top: 20px; gap: 12px; }
/* ---------- 结算 ---------- */
.result-card { padding: 36px 32px; text-align: center; max-width: 640px; margin: 0 auto; }
.result-card h2 { font-family: var(--font-title); font-size: 1.8rem; color: var(--ink-deep); margin-bottom: 8px; }
.result-stars { font-size: 2.6rem; letter-spacing: 8px; margin: 14px 0; animation: starPop 0.6s ease; }
@keyframes starPop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
.result-stats { display: flex; justify-content: center; gap: 30px; margin: 18px 0 24px; flex-wrap: wrap; }
.result-stats .rs { text-align: center; }
.result-stats .rs .v { font-size: 1.6rem; font-weight: 800; color: var(--cinnabar); }
.result-stats .rs .k { font-size: 0.85rem; color: var(--ink-light); }
.result-btns { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ---------- 错题碑林 ---------- */
.stele-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.stele {
  padding: 18px 22px;
  border-radius: 12px;
  background: linear-gradient(160deg, #e8e2d4, #dcd5c4);
  border: 1px solid #b8af99;
  box-shadow: 0 4px 10px rgba(26,42,58,0.12);
}
.stele .st-q { font-weight: 700; color: var(--ink-deep); margin-bottom: 8px; display: flex; align-items: flex-start; gap: 8px; }
.stele .st-meta { font-size: 0.82rem; color: var(--ink-light); margin-bottom: 6px; }
.stele .st-answer { font-size: 0.9rem; margin-bottom: 4px; }
.stele .st-answer .wrong-a { color: var(--cinnabar); text-decoration: line-through; }
.stele .st-answer .right-a { color: var(--jade); font-weight: 700; }
.stele .st-explain { font-size: 0.85rem; color: var(--ink-light); background: rgba(255,255,255,0.5); border-radius: 8px; padding: 8px 12px; margin-top: 6px; }
.stele .st-actions { margin-top: 10px; display: flex; gap: 10px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-light); }
.empty-state .big { font-size: 3.4rem; margin-bottom: 12px; }

/* ---------- 进度卷轴 ---------- */
.progress-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 18px; }
.unit-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(44,62,80,0.12); font-size: 0.92rem; }
.unit-row:last-child { border-bottom: none; }
.unit-row .u-name { width: 150px; font-weight: 600; flex-shrink: 0; }
.unit-row .u-bar { flex: 1; height: 10px; background: rgba(44,62,80,0.1); border-radius: 99px; overflow: hidden; }
.unit-row .u-bar i { display: block; height: 100%; border-radius: 99px; }
.unit-row .u-pct { width: 44px; text-align: right; font-weight: 700; color: var(--jade); font-size: 0.85rem; }
.radar-wrap { display: flex; justify-content: center; padding: 10px 0; }
.stat-big-row { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 10px; }
.stat-big { text-align: center; padding: 12px 18px; background: rgba(255,255,255,0.55); border-radius: 14px; min-width: 100px; }
.stat-big .v { font-size: 1.5rem; font-weight: 800; color: var(--cinnabar); }
.stat-big .k { font-size: 0.8rem; color: var(--ink-light); }

/* ---------- 家长面板 ---------- */
.parent-panel { max-width: 640px; margin: 0 auto; padding: 30px; }
.parent-panel h2 { font-family: var(--font-title); margin-bottom: 6px; }
.parent-panel .pp-sub { color: var(--ink-light); font-size: 0.88rem; margin-bottom: 20px; }
.pp-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px dashed rgba(44,62,80,0.15); gap: 12px; flex-wrap: wrap; }
.pp-row .pp-label { font-weight: 600; }
.pp-row .pp-note { font-size: 0.82rem; color: var(--ink-light); width: 100%; }
.pp-row select, .pp-row input {
  font-size: 1rem;
  padding: 8px 14px;
  border-radius: 10px;
  border: 2px solid rgba(44,62,80,0.25);
  background: #fff;
  font-family: var(--font-body);
}
.pp-danger { color: var(--cinnabar); font-weight: 700; font-size: 0.85rem; }
.pp-chart { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding: 10px 4px 0; }
.pp-chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.pp-chart .bar-col i { width: 100%; max-width: 42px; background: linear-gradient(180deg, var(--gold), var(--jade)); border-radius: 6px 6px 0 0; min-height: 3px; transition: height 0.5s ease; }
.pp-chart .bar-col span { font-size: 0.72rem; color: var(--ink-light); }
/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(26, 42, 58, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeUp 0.25s ease;
  padding: 20px;
}
.modal { max-width: 460px; width: 100%; padding: 32px 30px; text-align: center; }
.modal h3 { font-family: var(--font-title); font-size: 1.45rem; margin-bottom: 12px; color: var(--ink-deep); }
.modal p { color: var(--ink-light); line-height: 1.8; margin-bottom: 20px; font-size: 0.95rem; }
.modal .big-icon { font-size: 3rem; margin-bottom: 10px; }
.modal .modal-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.rest-count { font-size: 2.4rem; font-weight: 800; color: var(--cinnabar); font-variant-numeric: tabular-nums; }

/* ---------- 彩带画布 ---------- */
#confettiCanvas { position: fixed; inset: 0; pointer-events: none; z-index: 200; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: var(--ink-deep);
  color: #fff;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  z-index: 300;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  max-width: 90vw;
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.gold { background: linear-gradient(135deg, var(--gold), #c99b3f); color: #4a3610; font-weight: 700; }

/* ---------- 首次引导 ---------- */
.onboard-choices { display: flex; gap: 12px; justify-content: center; margin: 16px 0 22px; flex-wrap: wrap; }
.onboard-choices .oc {
  border: 2px solid rgba(44,62,80,0.2);
  background: #fff;
  border-radius: 14px;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.15s;
  color: var(--ink);
  font-family: var(--font-body);
}
.onboard-choices .oc.sel { border-color: var(--cinnabar); background: #fdf0ec; color: var(--cinnabar); }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .brand { font-size: 1.4rem; letter-spacing: 2px; }
  .hero { padding: 20px; gap: 14px; }
  .nav button { min-width: calc(50% - 5px); font-size: 0.9rem; }
  .question-card { padding: 22px 18px; }
  .q-text { font-size: 1.05rem; }
  .unit-row .u-name { width: 110px; font-size: 0.82rem; }
  .result-stats { gap: 16px; }
}
