/* ==========================================================================
   《教考大冒险》全局样式
   规范见 docs/02-ui-design.md（Supercell/Duolingo 卡通风：高饱和、大圆角、3D按压）
   只用 transform/opacity 做动画，保证 iPhone 流畅
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --c-primary: #58CC02;
  --c-primary-dark: #46A302;
  --c-accent: #FF9600;
  --c-accent-dark: #DB7800;
  --c-gold: #FFC800;
  --c-gem: #1CB0F6;
  --c-gem-dark: #0E8FD6;
  --c-danger: #FF4B4B;
  --c-danger-dark: #D63B3B;
  --c-purple: #CE82FF;
  --c-bg-top: #7FD4FF;
  --c-bg-bottom: #E8F9FF;
  --c-card: #FFFFFF;
  --c-text: #3C3C3C;
  --c-text-soft: #8A8A8A;
  --c-line: #E5E5E5;

  --radius-s: 12px;
  --radius-m: 16px;
  --radius-l: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 2px 8px rgba(0, 0, 0, .08);
  --spring: cubic-bezier(.34, 1.56, .64, 1);  /* 弹性回弹曲线 */

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- 2. 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;              /* 禁止橡皮筋滚动穿透 */
  touch-action: manipulation;             /* 干掉双击缩放延迟 */
  user-select: none; -webkit-user-select: none;
}

body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--c-text);
  background: linear-gradient(180deg, var(--c-bg-top) 0%, var(--c-bg-bottom) 70%);
  font-size: 15px;
}

#app { height: 100%; max-width: 480px; margin: 0 auto; position: relative; }

/* ---------- 3. 屏幕容器与切换动画 ---------- */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding-top: var(--safe-top);
  animation: screen-in .25s ease-out;
}
@keyframes screen-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

.scroll-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 16px calc(20px + var(--safe-bottom));
}

/* ---------- 4. 通用组件：游戏按钮（3D 按压） ---------- */
.btn-game {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; outline: none; cursor: pointer;
  font-family: inherit; font-size: 17px; font-weight: 800; color: #fff;
  padding: 14px 24px; border-radius: var(--radius-m);
  background: var(--c-primary);
  box-shadow: 0 4px 0 var(--c-primary-dark);
  transition: transform .1s var(--spring), box-shadow .1s;
}
.btn-game:active { transform: translateY(4px); box-shadow: 0 0 0 var(--c-primary-dark); }

.btn-game--orange { background: var(--c-accent); box-shadow: 0 4px 0 var(--c-accent-dark); }
.btn-game--orange:active { box-shadow: 0 0 0 var(--c-accent-dark); }
.btn-game--blue   { background: var(--c-gem); box-shadow: 0 4px 0 var(--c-gem-dark); }
.btn-game--blue:active { box-shadow: 0 0 0 var(--c-gem-dark); }
.btn-game--red    { background: var(--c-danger); box-shadow: 0 4px 0 var(--c-danger-dark); }
.btn-game--red:active { box-shadow: 0 0 0 var(--c-danger-dark); }
.btn-game--ghost {
  background: #fff; color: var(--c-text-soft);
  box-shadow: 0 4px 0 var(--c-line);
}
.btn-game--ghost:active { box-shadow: 0 0 0 var(--c-line); }
.btn-game--block { display: flex; width: 100%; }

/* ---------- 5. 通用组件：卡片 / 货币胶囊 / 进度条 ---------- */
.card {
  background: var(--c-card); border-radius: var(--radius-l);
  box-shadow: var(--shadow-card); padding: 16px;
}

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255, 255, 255, .9); border-radius: 999px;
  padding: 4px 10px; font-weight: 800; font-size: 13px;
  box-shadow: var(--shadow-card);
  font-variant-numeric: tabular-nums;
}

.bar { height: 14px; border-radius: 999px; background: rgba(0, 0, 0, .12); overflow: hidden; position: relative; }
.bar__fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(180deg, #7DE83C, var(--c-primary));
  transition: width .4s ease-out;
  position: relative;
}
/* 高光条纹，让条看起来"会动" */
.bar__fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .45) 50%, transparent 60%);
  animation: bar-shine 2.2s linear infinite;
}
@keyframes bar-shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- 6. 首页 ---------- */
.home-status {
  display: flex; align-items: center; gap: 10px;
  padding: calc(8px + var(--safe-top)) 16px 8px;
}
.avatar {
  position: relative; width: 56px; height: 56px; flex-shrink: 0;
  background: #fff; border-radius: 50%; border: 3px solid #fff;
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.avatar__lv {
  position: absolute; bottom: -4px; right: -6px;
  background: var(--c-purple); color: #fff;
  font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 999px;
  border: 2px solid #fff;
}
.home-status__info { flex: 1; min-width: 0; }
.home-status__name { font-weight: 800; font-size: 15px; margin-bottom: 4px; display: flex; gap: 6px; align-items: baseline; }
.home-status__title { font-size: 11px; color: #fff; background: var(--c-accent); padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.home-wallet { display: flex; gap: 6px; padding: 4px 16px 0; }

.hero { text-align: center; padding: 18px 16px 8px; position: relative; }
.hero__char { font-size: 84px; display: inline-block; animation: hero-float 2.4s ease-in-out infinite; filter: drop-shadow(0 8px 8px rgba(0,0,0,.15)); }
@keyframes hero-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero__bubble {
  display: inline-block; margin-top: 6px;
  background: #fff; border-radius: var(--radius-m);
  padding: 8px 14px; font-size: 13px; font-weight: 700;
  box-shadow: var(--shadow-card); position: relative;
  animation: bubble-pop .5s var(--spring);
}
.hero__bubble::before {
  content: ""; position: absolute; top: -6px; left: 50%; margin-left: -6px;
  border: 6px solid transparent; border-bottom-color: #fff; border-top: 0;
}
@keyframes bubble-pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.review-badge {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  background: var(--c-purple); color: #fff; font-size: 12px; font-weight: 800;
  padding: 4px 12px; border-radius: 999px;
  animation: badge-pulse 1.6s ease-in-out infinite;
}
@keyframes badge-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }

.home-cta { padding: 10px 20px 4px; }
.home-cta .btn-game { font-size: 20px; padding: 16px; border-radius: var(--radius-l); }

.menu-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  padding: 16px 20px calc(24px + var(--safe-bottom));
}
.icon-btn {
  background: var(--c-card); border: none; border-radius: var(--radius-l);
  box-shadow: 0 4px 0 var(--c-line);
  padding: 12px 4px 10px; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform .12s var(--spring), box-shadow .12s;
}
.icon-btn:active { transform: translateY(4px) scale(.96); box-shadow: 0 0 0 var(--c-line); }
.icon-btn__emoji { font-size: 30px; line-height: 1.3; }
.icon-btn__label { font-size: 12px; font-weight: 700; color: var(--c-text); }
.icon-btn__sub { font-size: 10px; color: var(--c-text-soft); font-weight: 600; }

/* 漂浮云朵（动态背景） */
.cloud { position: absolute; font-size: 40px; opacity: .85; animation: cloud-drift linear infinite; pointer-events: none; }
@keyframes cloud-drift { from { transform: translateX(-80px); } to { transform: translateX(480px); } }

/* ---------- 7. 顶部导航条（子页面通用） ---------- */
.nav-bar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
}
.nav-bar__back {
  width: 40px; height: 40px; border: none; border-radius: 14px;
  background: #fff; box-shadow: 0 3px 0 var(--c-line);
  font-size: 18px; cursor: pointer;
  transition: transform .1s var(--spring), box-shadow .1s;
}
.nav-bar__back:active { transform: translateY(3px); box-shadow: 0 0 0 var(--c-line); }
.nav-bar__title { font-size: 19px; font-weight: 800; }

/* ---------- 8. 地图页 ---------- */
.map-path { position: relative; padding: 8px 0 32px; }
.map-node {
  display: flex; align-items: center; gap: 14px;
  margin: 18px 0; position: relative;
}
.map-node:nth-child(even) { flex-direction: row-reverse; text-align: right; }
.map-node:nth-child(even) .map-node__meta { align-items: flex-end; }
.map-node__circle {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 34px;
  border: 4px solid #fff; box-shadow: 0 4px 0 rgba(0,0,0,.15), var(--shadow-card);
  cursor: pointer; position: relative;
  transition: transform .15s var(--spring);
  animation: node-breathe 2.8s ease-in-out infinite;
}
@keyframes node-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.map-node__circle:active { transform: scale(.9); }
.map-node--locked .map-node__circle { filter: grayscale(.9); opacity: .7; animation: none; }
.map-node__lock {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: rgba(60,60,60,.35); border-radius: 50%;
}
.map-node__meta { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.map-node__name { font-weight: 800; font-size: 16px; }
.map-node__title { font-size: 12px; color: var(--c-text-soft); font-weight: 600; }
.map-node__progress { width: 130px; }
.map-node:nth-child(even) .map-node__progress { align-self: flex-end; }
.map-node--final .map-node__circle { width: 88px; height: 88px; font-size: 42px; border-color: var(--c-gold); }

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

/* ---------- 9. 弹窗 / Toast（特效层） ---------- */
#fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 99; }
#fx-layer > * { pointer-events: auto; }

.modal-mask {
  position: absolute; inset: 0;
  background: rgba(30, 40, 60, .45);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: mask-in .2s ease-out;
}
@keyframes mask-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 480px;
  background: var(--c-card); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px 20px calc(24px + var(--safe-bottom));
  animation: modal-up .3s var(--spring);
  text-align: center;
}
@keyframes modal-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal__emoji { font-size: 56px; display: block; margin-bottom: 8px; animation: hero-float 2s ease-in-out infinite; }
.modal__title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.modal__desc { font-size: 14px; color: var(--c-text-soft); line-height: 1.6; margin-bottom: 18px; }

.toast {
  position: absolute; left: 50%; top: 18%;
  transform: translateX(-50%);
  background: rgba(60, 60, 60, .92); color: #fff;
  font-size: 14px; font-weight: 700;
  padding: 10px 18px; border-radius: 999px;
  animation: toast-in .25s var(--spring);
  white-space: nowrap; max-width: 86%;
}
@keyframes toast-in { from { transform: translateX(-50%) translateY(-14px) scale(.8); opacity: 0; } to { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; } }

/* ---------- 10. 设置页 ---------- */
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 2px; border-bottom: 2px solid #F2F2F2;
}
.setting-row:last-child { border-bottom: none; }
.setting-row__label { font-weight: 700; font-size: 15px; }
.setting-row__desc { font-size: 12px; color: var(--c-text-soft); margin-top: 2px; }

.switch {
  width: 52px; height: 32px; border-radius: 999px; border: none; cursor: pointer;
  background: #E5E5E5; position: relative; transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 26px; height: 26px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
  transition: transform .2s var(--spring);
}
.switch--on { background: var(--c-primary); }
.switch--on::after { transform: translateX(20px); }

/* ---------- 11. 施工中页 ---------- */
.wip { text-align: center; padding-top: 18vh; }
.wip__emoji { font-size: 72px; display: block; animation: hero-float 2.2s ease-in-out infinite; }
.wip__title { font-size: 20px; font-weight: 800; margin: 12px 0 6px; }
.wip__desc { color: var(--c-text-soft); font-size: 14px; }

/* ---------- 12. 章节关卡选择页 ---------- */
.level-node {
  display: flex; align-items: center; gap: 12px;
  background: var(--c-card); border-radius: var(--radius-l);
  box-shadow: 0 4px 0 var(--c-line); padding: 14px; margin-bottom: 12px;
  cursor: pointer; transition: transform .12s var(--spring), box-shadow .12s;
}
.level-node:active { transform: translateY(4px); box-shadow: 0 0 0 var(--c-line); }
.level-node--empty { opacity: .55; }
.level-node--locked { opacity: .75; }
.level-node__badge {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 18px;
  border: 3px solid #fff; box-shadow: var(--shadow-card);
}
.level-node--boss { border: 2px dashed var(--c-danger); }
.level-node__badge--boss { font-size: 24px; background: #fff; }
.level-node__meta { flex: 1; min-width: 0; }
.level-node__title { font-weight: 800; font-size: 15px; }
.level-node__sub { font-size: 12px; color: var(--c-text-soft); margin-top: 2px; }
.level-node__arrow { font-size: 20px; }

/* ---------- 13. 战斗屏：场景区 ---------- */
.battle-screen { padding-top: 0; }
.battle-scene {
  position: relative; padding: calc(8px + var(--safe-top)) 14px 10px;
  min-height: 218px; overflow: hidden;
}
.battle-top { display: flex; justify-content: space-between; align-items: flex-start; }
.battle-exit {
  width: 36px; height: 36px; border: none; border-radius: 12px;
  background: rgba(255,255,255,.9); box-shadow: 0 3px 0 rgba(0,0,0,.12);
  font-size: 15px; font-weight: 800; color: var(--c-text-soft); cursor: pointer;
}
.battle-exit:active { transform: translateY(3px); box-shadow: none; }

.combo-badge {
  background: linear-gradient(135deg, #FF9600, #FF5E3A); color: #fff;
  font-weight: 800; font-size: 14px; padding: 6px 12px; border-radius: 999px;
  box-shadow: var(--shadow-card); text-align: center;
}
.combo-badge__label { font-size: 10px; letter-spacing: 1px; color: #FFE9A8; }
.combo-badge--pop { animation: combo-pop .25s var(--spring); }
@keyframes combo-pop { 0% { transform: scale(1.4); } 100% { transform: scale(1); } }

.boss-bar-wrap { margin: 6px 4px 0; }
.boss-bar__name { font-size: 12px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.3); margin-bottom: 3px; }
.bar--boss { height: 16px; background: rgba(0,0,0,.25); }
.bar--boss .bar__fill { background: linear-gradient(180deg, #E1A4FF, var(--c-purple)); }

/* 怪物 */
.monster-zone { text-align: center; margin-top: 4px; position: relative; }
.monster { display: inline-block; }
.monster__emoji { font-size: 72px; display: block; filter: drop-shadow(0 6px 6px rgba(0,0,0,.2)); animation: hero-float 2.2s ease-in-out infinite; }
.monster__name {
  display: inline-block; margin-top: 2px;
  background: rgba(255,255,255,.92); border-radius: 999px;
  font-size: 12px; font-weight: 800; padding: 4px 12px;
  box-shadow: var(--shadow-card);
}
.monster--enter { animation: monster-in .45s var(--spring); }
@keyframes monster-in { from { transform: translateX(120%) scale(.6); opacity: 0; } to { transform: translateX(0) scale(1); opacity: 1; } }
.monster--hit .monster__emoji { animation: monster-hit .3s; }
@keyframes monster-hit { 0% { transform: translateX(0); filter: brightness(3); } 30% { transform: translateX(-14px) rotate(-8deg); } 60% { transform: translateX(8px); } 100% { transform: translateX(0); } }
.monster--die { animation: monster-die .5s ease-in forwards; }
@keyframes monster-die { to { transform: scale(.1) rotate(40deg); opacity: 0; } }
.monster--attack .monster__emoji { animation: monster-attack .45s ease-in-out; }
@keyframes monster-attack { 0% { transform: translate(0,0); } 40% { transform: translate(-30px, 26px) scale(1.25); } 100% { transform: translate(0,0); } }

.battle-progress { font-size: 11px; font-weight: 800; color: rgba(255,255,255,.95); text-shadow: 0 1px 2px rgba(0,0,0,.25); margin-top: 4px; }

/* 玩家血条（场景左下角） */
.player-hp { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.player-hp__avatar {
  width: 34px; height: 34px; background: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  border: 2px solid #fff; box-shadow: var(--shadow-card); flex-shrink: 0;
}
.player-hp__right { flex: 1; display: flex; align-items: center; gap: 8px; }
.bar--hp { flex: 1; height: 12px; background: rgba(0,0,0,.2); }
.bar--hp .bar__fill { background: linear-gradient(180deg, #FF8A8A, var(--c-danger)); }
.player-hp__num { font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.player-hp--hurt { animation: hp-hurt .4s; }
@keyframes hp-hurt { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); filter: saturate(3); } 75% { transform: translateX(-3px); } }

/* 飘字 */
.float-text {
  position: absolute; font-weight: 800; font-size: 18px; pointer-events: none;
  text-shadow: 0 2px 3px rgba(0,0,0,.25);
  animation: float-up .95s ease-out forwards; z-index: 5;
}
.float-text--dmg { color: #fff; font-size: 22px; }
.float-text--crit { color: #FFE234; font-size: 30px; }
.float-text--critword { color: #FFE234; font-size: 16px; letter-spacing: 2px; }
.float-text--gold { color: var(--c-gold); font-size: 15px; }
.float-text--exp { color: #C6FF7A; font-size: 14px; }
.float-text--card { color: var(--c-purple); font-size: 15px; }
@keyframes float-up { from { transform: translateY(0) scale(.7); opacity: 0; } 20% { opacity: 1; transform: translateY(-12px) scale(1.1); } to { transform: translateY(-56px) scale(1); opacity: 0; } }

/* ---------- 14. 战斗屏：答题区 ---------- */
.battle-panel { flex: 1; display: flex; flex-direction: column; padding: 4px 14px calc(14px + var(--safe-bottom)); overflow-y: auto; }
.question-card {
  background: var(--c-card); border-radius: var(--radius-l);
  box-shadow: var(--shadow-card); padding: 14px 16px; margin-bottom: 12px;
  animation: screen-in .25s ease-out;
}
.q-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.q-badge { background: var(--c-gem); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.q-stars { font-size: 11px; }
.q-text { font-size: 17px; font-weight: 700; line-height: 1.55; }

.options { display: flex; flex-direction: column; gap: 10px; }
.option-btn {
  display: flex; align-items: center; gap: 10px; text-align: left;
  background: var(--c-card); border: 3px solid var(--c-line);
  border-radius: var(--radius-m); padding: 12px 14px;
  font-family: inherit; font-size: 15px; font-weight: 700; color: var(--c-text);
  cursor: pointer; box-shadow: 0 3px 0 var(--c-line);
  transition: transform .1s var(--spring), box-shadow .1s, border-color .15s, background .15s;
}
.option-btn:active { transform: translateY(3px); box-shadow: none; }
.option-btn__letter {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: #F0F0F0; color: var(--c-text-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
}
.option-btn.is-picked { border-color: var(--c-gem); background: #EAF6FE; }
.option-btn.is-picked .option-btn__letter { background: var(--c-gem); color: #fff; }
.option-btn.is-correct { border-color: var(--c-primary); background: #EEFBE4; animation: opt-pop .3s var(--spring); }
.option-btn.is-correct .option-btn__letter { background: var(--c-primary); color: #fff; }
.option-btn.is-wrong { border-color: var(--c-danger); background: #FFEDED; animation: shake .4s; }
.option-btn.is-wrong .option-btn__letter { background: var(--c-danger); color: #fff; }
@keyframes opt-pop { 0% { transform: scale(1); } 50% { transform: scale(1.04); } 100% { transform: scale(1); } }

/* 解析面板（答错后） */
.analysis-card {
  margin-top: 12px; background: #FFF8E6; border: 2px solid #FFE0A3;
  border-radius: var(--radius-m); padding: 12px 14px;
  animation: modal-up .3s var(--spring);
}
.analysis-card__cheer { font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.analysis-card__mantra { background: var(--c-accent); color: #fff; font-size: 12px; padding: 1px 8px; border-radius: 999px; }
.analysis-card__text { font-size: 13px; line-height: 1.7; color: #6B5B33; }

/* ---------- 15. 结算屏 ---------- */
.result-wrap { padding-top: calc(28px + var(--safe-top)); }
.result-banner {
  text-align: center; font-size: 24px; font-weight: 800;
  margin-bottom: 14px; animation: bubble-pop .5s var(--spring);
}
.result-unlock {
  font-size: 14px; color: var(--c-accent-dark); background: #FFF3D6;
  display: inline-block; margin-top: 8px; padding: 4px 14px; border-radius: 999px;
}
.result-stats { margin-bottom: 14px; }
.result-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 2px; border-bottom: 2px solid #F2F2F2; font-size: 14px;
}
.result-row:last-child { border-bottom: none; }
.result-row b { font-variant-numeric: tabular-nums; }

.result-cards-title { font-weight: 800; font-size: 14px; margin: 6px 0 10px; }
.result-cards { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; }

/* 知识卡（可翻面） */
.kcard { width: 120px; height: 168px; flex-shrink: 0; perspective: 600px; cursor: pointer; }
.kcard__inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transition: transform .5s var(--spring);
}
.kcard.flipped .kcard__inner { transform: rotateY(180deg); }
.kcard__face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 14px; padding: 10px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 6px;
  box-shadow: var(--shadow-card);
}
.kcard__front { background: linear-gradient(160deg, #fff, #EEF3FF); border: 3px solid var(--c-gem); }
.kcard--SR .kcard__front { border-color: var(--c-purple); }
.kcard--SSR .kcard__front { border-color: var(--c-gold); background: linear-gradient(160deg, #fff, #FFF6D6); }
.kcard__back { background: #FFF8E6; border: 3px solid var(--c-accent); transform: rotateY(180deg); justify-content: flex-start; }
.kcard__quality { font-size: 11px; font-weight: 800; color: #fff; background: var(--c-gem); padding: 1px 8px; border-radius: 999px; }
.kcard--SR .kcard__quality { background: var(--c-purple); }
.kcard--SSR .kcard__quality { background: var(--c-accent-dark); }
.kcard__name { font-size: 14px; font-weight: 800; }
.kcard__stars { font-size: 11px; color: var(--c-gold); }
.kcard__mantra { font-size: 12px; font-weight: 800; color: var(--c-accent-dark); }
.kcard__tip { font-size: 10px; color: #6B5B33; line-height: 1.5; text-align: left; }

.result-btns { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }

/* ---------- 16. 战斗屏补充：收藏/计时器 ---------- */
.fav-btn {
  border: none; background: none; font-size: 22px; cursor: pointer;
  color: #CCC; transition: transform .15s var(--spring); line-height: 1;
}
.fav-btn:active { transform: scale(1.3); }
.fav-btn--on { color: var(--c-gold); }

.battle-timer {
  background: rgba(255,255,255,.92); border-radius: 999px;
  font-weight: 800; font-size: 15px; padding: 6px 14px;
  box-shadow: var(--shadow-card); font-variant-numeric: tabular-nums;
}
.battle-timer--urgent { background: var(--c-danger); color: #fff; animation: badge-pulse .8s ease-in-out infinite; }

/* ---------- 17. 今日任务 ---------- */
.signin-card { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #FFF3D6, #fff); }
.signin-card__flame { font-size: 36px; animation: badge-pulse 1.6s ease-in-out infinite; }
.signin-card__day { text-align: center; font-size: 10px; font-weight: 800; color: var(--c-accent-dark); }
.signin-card__day b { font-size: 22px; }

.task-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding: 12px 14px; }
.task-row__icon { font-size: 26px; flex-shrink: 0; }
.task-row__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.task-row__name { font-weight: 800; font-size: 14px; }
.task-row__reward { font-size: 11px; color: var(--c-accent-dark); font-weight: 700; }
.task-row__num { font-size: 11px; color: var(--c-text-soft); font-weight: 700; }
.task-row__btn { padding: 8px 14px; font-size: 13px; flex-shrink: 0; }

/* ---------- 18. 成就殿堂 ---------- */
.ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ach-item {
  background: var(--c-card); border-radius: var(--radius-m);
  box-shadow: var(--shadow-card); padding: 14px 12px; text-align: center;
}
.ach-item--locked { opacity: .45; filter: grayscale(1); }
.ach-item__icon { font-size: 30px; }
.ach-item__name { font-weight: 800; font-size: 13px; margin-top: 6px; }
.ach-item__desc { font-size: 11px; color: var(--c-text-soft); margin-top: 3px; line-height: 1.4; }
.ach-item__reward { font-size: 11px; color: var(--c-accent-dark); font-weight: 700; margin-top: 5px; }

/* ---------- 19. 背包 / 宝箱 ---------- */
.chest-card { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #F3E9FF, #fff); }
.chest-card__emoji { font-size: 40px; animation: hero-float 2.4s ease-in-out infinite; }
.chest-shake { animation: chest-shake .12s linear infinite; display: inline-block; }
@keyframes chest-shake { 0%,100% { transform: rotate(-8deg) scale(1.1); } 50% { transform: rotate(8deg) scale(1.15); } }

.bag-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.bag-item {
  min-width: 56px; height: 56px; padding: 0 12px;
  background: var(--c-card); border: 3px solid var(--c-line); border-radius: var(--radius-m);
  font-size: 26px; font-weight: 800; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s var(--spring);
}
.bag-item:active { transform: scale(.9); }
.bag-item--on { border-color: var(--c-primary); background: #EEFBE4; font-size: 18px; }

/* ---------- 20. 卡牌图鉴 ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cards-grid .kcard { width: 100%; height: 150px; }
.kcard--locked { cursor: default; }

/* ---------- 21. 统计中心 ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats-card { padding: 10px 4px; text-align: center; }
.stats-card__icon { font-size: 20px; }
.stats-card__v { font-weight: 800; font-size: 14px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stats-card__l { font-size: 10px; color: var(--c-text-soft); margin-top: 1px; }

.heatmap { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 3px; justify-content: center; }
.heat-cell { width: 14px; height: 14px; border-radius: 3px; background: #EBEDF0; }
.heat--1 { background: transparent; border: 2px dashed #EBEDF0; }
.heat-1 { background: #C6E48B; }
.heat-2 { background: #7BC96F; }
.heat-3 { background: #58CC02; }
.heat-4 { background: #2F7D00; }
.heat-legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 8px; font-size: 10px; color: var(--c-text-soft); }

/* ---------- 22. 技能树 ---------- */
.skill-branch { margin-bottom: 12px; }
.skill-tiers { display: flex; gap: 6px; margin: 12px 0; }
.skill-tier { flex: 1; text-align: center; }
.skill-tier__dot {
  width: 34px; height: 34px; margin: 0 auto; border-radius: 50%;
  background: #F0F0F0; color: var(--c-text-soft);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; border: 3px solid transparent;
}
.skill-tier--on .skill-tier__dot { background: var(--c-primary); color: #fff; }
.skill-tier--next .skill-tier__dot { border-color: var(--c-primary); color: var(--c-primary); animation: badge-pulse 1.6s ease-in-out infinite; }
.skill-tier__label { font-size: 10px; color: var(--c-text-soft); margin-top: 4px; font-weight: 700; }

/* ---------- 23. 登录页 ---------- */
.login {
  min-height: 100%;
  padding: calc(var(--safe-top) + 40px) 26px calc(var(--safe-bottom) + 30px);
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    radial-gradient(circle at 50% -10%, #BDEBFF 0%, rgba(189,235,255,0) 55%),
    linear-gradient(180deg, var(--c-bg-top) 0%, var(--c-bg-bottom) 100%);
}
.login__hero { text-align: center; margin-bottom: 28px; }
.login__logo {
  font-size: 68px;
  filter: drop-shadow(0 6px 0 rgba(0,0,0,.12));
  animation: float-bob 2.4s var(--spring) infinite;
}
.login__title {
  font-size: 30px; font-weight: 900; color: #fff;
  margin-top: 6px; letter-spacing: 1px;
  text-shadow: 0 3px 0 var(--c-primary-dark);
}
.login__sub {
  font-size: 13px; color: #2E6B8A; margin-top: 8px; font-weight: 700;
}

.login__form {
  width: 100%; max-width: 320px;
  background: var(--c-card);
  border-radius: var(--radius-l);
  padding: 22px 20px;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  border-bottom: 4px solid rgba(0,0,0,.08);
}
.login__input {
  width: 100%;
  height: 48px;
  border: 3px solid var(--c-line);
  border-radius: var(--radius-m);
  padding: 0 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--c-text);
  background: #FAFAFA;
  margin-bottom: 14px;
  outline: none;
  transition: border-color .15s, background .15s;
}
.login__input:focus { border-color: var(--c-primary); background: #fff; }
.login__input::placeholder { color: #B5B5B5; }

.login__hint {
  text-align: center; font-size: 12px; color: var(--c-text-soft);
  margin-top: 12px; font-weight: 700;
}
.login__register {
  text-align: center; font-size: 13px; color: var(--c-gem-dark);
  margin-top: 12px; font-weight: 800; cursor: pointer;
}

.login__session {
  width: 100%; max-width: 320px;
  background: rgba(255,255,255,.85);
  border-radius: var(--radius-m);
  padding: 12px 16px;
  text-align: center;
  font-size: 14px; color: var(--c-text);
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.login__foot {
  margin-top: auto; padding-top: 26px;
  font-size: 11px; color: rgba(46,107,138,.7); font-weight: 700;
}
@keyframes float-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

/* ---------- 99. 教考精灵（AI 陪练助手） ---------- */
.sprite-dock { position: fixed; z-index: 9999; display: none; }

/* 浮动精灵按钮（右下角，3D 按压 + 呼吸浮动） */
.sprite-btn {
  position: fixed; right: 16px; bottom: calc(18px + var(--safe-bottom));
  width: 60px; height: 60px; border: none; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #B6F36A, var(--c-primary) 62%, var(--c-primary-dark));
  box-shadow: 0 6px 0 var(--c-primary-dark), 0 10px 18px rgba(0,0,0,.22);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .15s var(--spring), box-shadow .15s, opacity .2s;
  animation: sprite-bob 2.6s ease-in-out infinite;
}
.sprite-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--c-primary-dark), 0 6px 12px rgba(0,0,0,.2); }
.sprite-btn.is-hidden { opacity: 0; transform: scale(.4); pointer-events: none; }
.sprite-btn__emoji { font-size: 32px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); animation: sprite-blink 3s ease-in-out infinite; }
.sprite-btn__ping {
  position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c-primary);
  animation: sprite-ping 2s ease-out infinite; pointer-events: none;
}
@keyframes sprite-bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-7px);} }
@keyframes sprite-blink { 0%,92%,100%{ transform: scale(1);} 96%{ transform: scale(1.12);} }
@keyframes sprite-ping { 0%{ transform: scale(1); opacity:.7;} 100%{ transform: scale(1.6); opacity:0;} }

/* 聊天面板：从底部滑入 */
.sprite-panel {
  position: fixed; right: 0; bottom: 0; width: 100%; max-width: 480px; height: 84vh;
  background: #fff; border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -8px 30px rgba(0,0,0,.18);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(110%); opacity: 0; pointer-events: none;
  transition: transform .28s var(--spring), opacity .2s;
  z-index: 10000;
}
.sprite-panel.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }

.sprite-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + var(--safe-top)) 14px 10px;
  background: linear-gradient(180deg, var(--c-primary), var(--c-primary-dark));
  color: #fff;
}
.sprite-panel__title { font-size: 17px; font-weight: 800; }
.sprite-panel__tools { display: flex; gap: 6px; }
.sprite-ico {
  width: 34px; height: 34px; border: none; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.22); color: #fff; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .1s var(--spring), background .15s;
}
.sprite-ico:active { transform: translateY(2px); background: rgba(255,255,255,.34); }
.sprite-ico.is-off { opacity: .55; }

.sprite-msgs {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 14px 6px; background: var(--c-bg-bottom);
  display: flex; flex-direction: column; gap: 10px;
}
.sprite-msg { display: flex; }
.sprite-msg--user { justify-content: flex-end; }
.sprite-msg--ai { justify-content: flex-start; }
.sprite-msg__bubble {
  max-width: 82%; padding: 10px 13px; border-radius: 16px;
  font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
  box-shadow: var(--shadow-card);
}
.sprite-msg--user .sprite-msg__bubble { background: var(--c-gem); color: #fff; border-bottom-right-radius: 4px; }
.sprite-msg--ai .sprite-msg__bubble { background: #fff; color: var(--c-text); border-bottom-left-radius: 4px; }

/* 正在输入：三点动画 */
.sprite-msg--typing .sprite-msg__bubble { display: inline-flex; gap: 4px; padding: 12px 14px; }
.sprite-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-text-soft); animation: sprite-typing 1.2s infinite ease-in-out; }
.sprite-dot:nth-child(2){ animation-delay: .2s; }
.sprite-dot:nth-child(3){ animation-delay: .4s; }
@keyframes sprite-typing { 0%,60%,100%{ transform: translateY(0); opacity:.4;} 30%{ transform: translateY(-5px); opacity:1;} }

/* 输入栏 */
.sprite-inputbar {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: #fff; border-top: 1px solid var(--c-line);
}
.sprite-input {
  flex: 1; resize: none; border: 2px solid var(--c-line); border-radius: 16px;
  padding: 10px 12px; font-family: inherit; font-size: 15px; line-height: 1.4;
  color: var(--c-text); max-height: 120px; outline: none; transition: border-color .15s;
}
.sprite-input:focus { border-color: var(--c-primary); }
.sprite-mic, .sprite-send {
  flex-shrink: 0; width: 44px; height: 44px; border: none; border-radius: 50%; cursor: pointer;
  font-size: 19px; display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 3px 0 rgba(0,0,0,.18); transition: transform .1s var(--spring), box-shadow .1s;
}
.sprite-mic { background: var(--c-gem); box-shadow: 0 3px 0 var(--c-gem-dark); }
.sprite-send { background: var(--c-primary); box-shadow: 0 3px 0 var(--c-primary-dark); }
.sprite-mic:active, .sprite-send:active { transform: translateY(3px); box-shadow: 0 0 0 rgba(0,0,0,.18); }
.sprite-mic.is-on { background: var(--c-danger); box-shadow: 0 3px 0 var(--c-danger-dark); animation: sprite-rec 1s ease-in-out infinite; }
@keyframes sprite-rec { 0%,100%{ transform: scale(1);} 50%{ transform: scale(1.08);} }

.sprite-hint { padding: 6px 14px 8px; font-size: 11px; color: var(--c-text-soft); text-align: center; background: #fff; }

/* 桌面预览：让精灵与面板对齐 480 居中的 #app */
@media (min-width: 520px) {
  .sprite-btn { right: 50%; transform: translateX(232px); }
  .sprite-btn:active { transform: translateX(232px) translateY(4px); }
  .sprite-btn.is-hidden { transform: translateX(232px) scale(.4); }
  .sprite-panel { left: 50%; right: auto; transform: translateX(-50%) translateY(110%); }
  .sprite-panel.is-open { transform: translateX(-50%) translateY(0); }
}

/* 设置页输入框（语音服务等） */
.setting-input {
  width: 100%; border: 2px solid var(--c-line); border-radius: 12px;
  padding: 10px 12px; font-family: inherit; font-size: 14px; color: var(--c-text);
  outline: none; transition: border-color .15s;
}
.setting-input:focus { border-color: var(--c-primary); }

/* ============================================================
   §GenAI AI 画廊（图片/视频生成插槽）
   统一骨架屏 / 生成中 / 出错重试 / 成品展示
   ============================================================ */
.ga-slot {
  position: relative; border-radius: 14px; overflow: hidden; background: #fff;
  display: flex; align-items: center; justify-content: center;
  min-height: 120px; border: 2px dashed rgba(0,0,0,.1);
  transition: border-color .2s;
}
.ga-slot.is-filled { border-style: solid; border-color: transparent; cursor: zoom-in; }
.ga-slot img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }

.ga-pending {
  font-size: 12px; color: var(--c-text-soft); text-align: center; padding: 12px;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.ga-pending::before {
  content: ""; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(88,204,2,.25); border-top-color: var(--c-primary);
  animation: ga-spin .8s linear infinite;
}
@keyframes ga-spin { to { transform: rotate(360deg); } }
.ga-err { font-size: 12px; color: var(--c-danger, #D9534F); text-align: center; padding: 12px; cursor: pointer; line-height: 1.5; }

/* F3 地图节点：主题插画垫底，emoji 浮在上面 */
.map-node__circle { position: relative; }
.map-node__art { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; z-index: 0; }
.map-node__art img { width: 100%; height: 100%; object-fit: cover; }
.map-node__emoji { position: relative; z-index: 1; text-shadow: 0 1px 3px rgba(255,255,255,.95), 0 -1px 3px rgba(255,255,255,.95); }
.map-node__lock { position: relative; z-index: 2; }

/* F1 章节头 Boss 立绘 */
.chapter-head__row { display: flex; gap: 12px; align-items: flex-start; }
.chapter-boss-slot { width: 96px; height: 132px; flex: none; min-height: 0; }
.chapter-boss-slot img { object-fit: cover; }

/* F7 登场 CG 按钮（章节页 Boss 下方） */
.chapter-cg-slot { margin-top: 12px; min-height: 44px; }
.ga-cg-btn { width: 100%; }

/* F6 三星通关勋章（战斗结算） */
.result-medal-card { text-align: center; margin-top: 14px; }
.result-medal-title { font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.result-medal-card .ga-slot { max-width: 220px; margin: 0 auto; min-height: 150px; }
.result-medal-card .ga-slot img { object-fit: cover; }
.result-medal-sub { font-size: 11px; color: var(--c-text-soft); margin-top: 8px; }

/* CG 全屏播放层（战前仪式感） */
.ga-cg-mask {
  position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.86);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; padding: 16px;
}
.ga-cg video { width: min(92vw, 720px); max-height: 70vh; border-radius: 14px; background: #000; }
.ga-cg-close { padding: 10px 22px; }

/* F11 精灵配图气泡 */
.sprite-msg__bubble .ga-slot { min-height: 96px; width: 100%; }
.sprite-msg__bubble .ga-slot img { max-height: 220px; object-fit: contain; }
.sprite-msg__bubble .ga-slot[data-ga-kind="video"].is-filled { cursor: pointer; }

/* ===================== 历年真题库 + 题库导入 ===================== */
.seg-tabs { display: flex; gap: 8px; margin: 4px 0 12px; }
.seg-tab {
  flex: 1; border: none; cursor: pointer; font-family: inherit; font-weight: 800; font-size: 14px;
  padding: 10px 0; border-radius: var(--radius-s); background: #fff; color: var(--c-text-soft);
  box-shadow: 0 2px 0 var(--c-line); transition: transform .08s var(--spring), box-shadow .08s;
}
.seg-tab--on { background: var(--c-primary); color: #fff; box-shadow: 0 2px 0 var(--c-primary-dark); }
.seg-tab:active { transform: translateY(2px); box-shadow: 0 0 0 var(--c-line); }

/* 真题库列表 */
.pp-summary { font-size: 12px; color: var(--c-text-soft); margin-bottom: 8px; text-align: center; }
.pp-list { display: flex; flex-direction: column; gap: 12px; }
.pp-paper { cursor: pointer; transition: transform .1s var(--spring); }
.pp-paper:active { transform: scale(.985); }
.pp-paper__top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pp-paper__badge {
  background: var(--c-gold); color: #6b4e00; font-weight: 800; font-size: 13px;
  padding: 3px 10px; border-radius: 999px;
}
.pp-paper__type { font-weight: 800; font-size: 14px; }
.pp-paper__src { font-size: 12px; color: var(--c-text-soft); margin-bottom: 8px; }
.pp-paper__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-tag { font-size: 11px; background: #F0F7FF; color: var(--c-gem-dark); padding: 2px 8px; border-radius: 999px; }
.pp-paper__go { margin-top: 8px; font-size: 13px; font-weight: 800; color: var(--c-primary-dark); text-align: right; }

/* 真题详情 */
.pp-back { border: none; background: none; color: var(--c-primary-dark); font-family: inherit;
  font-weight: 800; font-size: 14px; cursor: pointer; margin: 4px 0 10px; padding: 4px 0; }
.pp-head { margin-bottom: 12px; }
.pp-qs { display: flex; flex-direction: column; gap: 12px; }
.pp-q { display: flex; gap: 10px; background: var(--c-card); border-radius: var(--radius-m);
  box-shadow: var(--shadow-card); padding: 14px; }
.pp-q__no { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--c-primary);
  color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.pp-q__body { flex: 1; min-width: 0; }
.pp-q__type { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; margin-bottom: 6px; }
.pp-q__type--single { background: #E7F6FF; color: var(--c-gem-dark); }
.pp-q__type--judge { background: #FFEFE0; color: var(--c-accent-dark); }
.pp-q__type--short, .pp-q__type--material { background: #F0E9FF; color: #6F4FD8; }
.pp-q__text { font-size: 15px; line-height: 1.55; font-weight: 600; }
.pp-opts { margin-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.pp-opt { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding: 8px 10px;
  border-radius: 10px; background: #F7F9FB; border: 1.5px solid transparent; }
.pp-opt__letter { flex: none; width: 20px; height: 20px; border-radius: 6px; background: #E2E8EE;
  color: var(--c-text); font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.pp-opt--ans { background: #E8FBE8; border-color: var(--c-primary); }
.pp-opt--ans .pp-opt__letter { background: var(--c-primary); color: #fff; }
.pp-judge { margin-top: 8px; font-size: 14px; }
.pp-judge__val { color: var(--c-primary-dark); }
.pp-reveal { margin-top: 10px; border: none; cursor: pointer; font-family: inherit; font-weight: 800;
  font-size: 13px; color: var(--c-gem-dark); background: #EAF6FF; padding: 8px 12px; border-radius: 10px; width: 100%; }
.pp-reveal--on { background: #DCEEFB; }
.pp-answer { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--c-line); }
.pp-answer__key { font-weight: 800; font-size: 14px; color: var(--c-primary-dark); margin-bottom: 6px; }
.pp-answer__text { font-size: 13.5px; line-height: 1.6; color: var(--c-text); white-space: pre-wrap; }
.pp-sub { margin-top: 8px; padding: 8px 10px; background: #F7F9FB; border-radius: 10px; }
.pp-sub__q { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.pp-sub__a { font-size: 13px; line-height: 1.6; color: var(--c-text-soft); white-space: pre-wrap; }

/* 题库导入 */
.imp-note { font-size: 12.5px; line-height: 1.6; color: var(--c-text-soft); background: #FFF7E8;
  border: 1px solid #FFE2B0; border-radius: var(--radius-s); padding: 10px 12px; margin-bottom: 12px; }
.imp-area { width: 100%; min-height: 170px; border: 2px solid var(--c-line); border-radius: var(--radius-m);
  padding: 12px; font-family: inherit; font-size: 13px; line-height: 1.5; resize: vertical;
  background: #fff; color: var(--c-text); }
.imp-area:focus { outline: none; border-color: var(--c-gem); }
.imp-btns { display: flex; gap: 8px; margin-top: 10px; }
.imp-btns .btn-game { flex: 1; font-size: 14px; padding: 12px 8px; }
.imp-hint { font-size: 12px; color: var(--c-text-soft); margin-top: 10px; line-height: 1.5; }
.imp-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.imp-item { display: flex; gap: 8px; align-items: center; background: #fff; border-radius: 10px;
  box-shadow: var(--shadow-card); padding: 8px 10px; }
.imp-item__t { flex: none; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px;
  background: #E7F6FF; color: var(--c-gem-dark); }
.imp-item__q { font-size: 13px; color: var(--c-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-more { text-align: center; font-size: 12px; color: var(--c-text-soft); margin-top: 4px; }
.imp-help__h { font-weight: 800; font-size: 14px; margin: 10px 0 6px; }
.imp-pre { background: #2B2B33; color: #E6E6E6; border-radius: 10px; padding: 12px; font-size: 11.5px;
  line-height: 1.5; white-space: pre-wrap; overflow-x: auto; font-family: "SF Mono", Menlo, Consolas, monospace; }
.imp-tips { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.7; color: var(--c-text-soft); }

/* ============ 科目切换（首页） ============ */
.subject-switch { margin: 14px 12px 4px; }
.subject-switch__label { font-size: 12px; color: var(--c-text-soft); font-weight: 700; margin-bottom: 8px; }
.subject-chips { display: flex; gap: 8px; }
.subject-chip { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 4px; border-radius: 14px; background: #fff; border: 2px solid transparent;
  box-shadow: var(--shadow-card); cursor: pointer; font-family: inherit; transition: transform .12s; }
.subject-chip:active { transform: scale(.96); }
.subject-chip__emoji { font-size: 22px; line-height: 1; }
.subject-chip__txt { font-size: 11px; font-weight: 800; color: var(--c-text); text-align: center; }
.subject-chip--on .subject-chip__txt { color: #1a1a1a; }

/* ============ 图形题（图片渲染） ============ */
.rich-img {
  display: block; max-width: 100%; max-height: 240px;
  margin: 10px auto; border-radius: 10px;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  background: #fff;
}
.q-text .rich-img { margin: 10px auto 6px; }
.option-btn .rich-img { margin: 6px auto; }
.option-btn .opt-img { max-height: 96px; }
.pp-q__text .rich-img { margin: 10px 0; }
.pp-opt .opt-img, .pp-opt .rich-img { margin: 6px 0; max-height: 110px; }
.pp-answer__text .rich-img, .pp-sub__a .rich-img, .pp-sub__q .rich-img { margin: 8px 0; }
.option-btn span { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ============ 课程视频弹层（B站播放器） ============ */
.cv-overlay { position: fixed; inset: 0; z-index: 200; display: none; }
.cv-overlay--on { display: block; }
.cv-overlay__mask { position: absolute; inset: 0; background: rgba(0,0,0,.66); }
.cv-overlay__box {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(92vw, 720px); max-height: 88vh; display: flex; flex-direction: column;
  background: var(--c-bg, #fff); border-radius: 14px; overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.cv-overlay__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid rgba(0,0,0,.08); }
.cv-close { background: none; border: none; font-size: 18px; color: var(--c-text-soft, #888); cursor: pointer; padding: 4px 8px; }
.cv-overlay__player { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; }
.cv-overlay__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cv-overlay__list { max-height: 34vh; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.cv-ep { display: flex; gap: 10px; align-items: center; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 13px; color: var(--c-text, #333); }
.cv-ep:hover { background: rgba(0,0,0,.05); }
.cv-ep--on { background: rgba(28,176,246,.12); color: #1CB0F6; font-weight: 700; }
.cv-ep__no { flex: none; min-width: 44px; text-align: center; background: rgba(0,0,0,.06); border-radius: 6px; padding: 2px 6px; font-size: 12px; }
.cv-ep--on .cv-ep__no { background: #1CB0F6; color: #fff; }

/* ============ 真题解析视频按钮 ============ */
.pp-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pp-reveal, .pp-video { border: 0; border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.pp-reveal { background: rgba(0,0,0,.06); color: var(--c-text, #333); }
.pp-video { background: rgba(28,176,246,.12); color: #1CB0F6; font-weight: 700; }
.cv-overlay__player video { display: block; }

/* ============ 刷试卷按钮 ============ */
.pp-paper__actions { margin-top: 8px; display: flex; }
.pp-sheet {
  flex: 1; border: 0; border-radius: 8px; padding: 9px 12px; font-size: 14px; font-weight: 700;
  background: rgba(88,204,2,.14); color: #58CC02; cursor: pointer;
  transition: transform .08s;
}
.pp-sheet:active { transform: scale(.97); }
