/* ============================================================
   单词大冒险 · 玻璃拟态设计系统
   参考：透明玻璃风格（backdrop-filter 模糊 + 白描边 + 顶部内高光）
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --glass-bg: rgba(251, 242, 216, .96);
  --glass-bg-strong: rgba(251, 242, 216, .98);
  --glass-bg-soft: rgba(251, 242, 216, .9);
  --glass-border: rgba(107, 68, 35, .55);
  --glass-blur: blur(18px) saturate(140%);
  --shadow-card: 0 6px 14px rgba(50, 80, 30, .35);
  --highlight-top: inset 0 1px 0 rgba(255, 255, 255, .9);

  --accent: #FFD94E;
  --accent-2: #F5A623;
  --accent-ink: #5A3A18;
  --good: #22C55E;
  --good-glow: rgba(5, 150, 105, .85);
  --bad: #F43F5E;
  --bad-glow: rgba(251, 113, 133, .75);

  --ink: #4A3014;
  --ink-soft: rgba(74, 48, 20, .74);
  --ink-faint: rgba(74, 48, 20, .45);
  --ink-rgb: 74, 48, 20;

  --wood-hi: #C79A62;
  --wood: #A97C44;
  --wood-dark: #6B4423;
  --cream-hi: #FBF2D8;
  --cream: #F1E3B8;
  --grass-1: #7EC850;
  --grass-2: #6BB93F;
  --white-ink: #FFFFFF;

  --radius: 24px;
  --radius-sm: 16px;
  --radius-xs: 12px;

  --font-round: "Comic Sans MS", "Chalkboard SE", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font-round);
  color: var(--ink);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

::selection { background: rgba(255, 214, 0, .45); }

/* ---------- 3. 场景背景（山丘/木屋/篱笆 SVG + 草坪条纹衔接） ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 460' preserveAspectRatio='xMidYMid slice'%3E%3Cdefs%3E%3ClinearGradient id='sky' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%238FD3FF'/%3E%3Cstop offset='1' stop-color='%23C9EDFF'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='900' height='370' fill='url(%23sky)'/%3E%3Cellipse cx='230' cy='350' rx='340' ry='115' fill='%23A8DB8A'/%3E%3Cellipse cx='720' cy='370' rx='330' ry='135' fill='%2394CE79'/%3E%3Cg fill='%235B9A3C'%3E%3Cellipse cx='340' cy='300' rx='26' ry='22'/%3E%3Cellipse cx='386' cy='294' rx='22' ry='19'/%3E%3Cellipse cx='620' cy='302' rx='26' ry='22'/%3E%3Cellipse cx='666' cy='296' rx='22' ry='19'/%3E%3C/g%3E%3Cg fill='%236B4423'%3E%3Crect x='336' y='318' width='8' height='18'/%3E%3Crect x='382' y='312' width='8' height='20'/%3E%3Crect x='616' y='320' width='8' height='18'/%3E%3Crect x='662' y='314' width='8' height='20'/%3E%3C/g%3E%3Crect x='96' y='216' width='22' height='56' fill='%23A97C44'/%3E%3Crect x='90' y='206' width='34' height='14' rx='4' fill='%236B4423'/%3E%3Crect x='60' y='272' width='190' height='98' rx='4' fill='%23C79A62'/%3E%3Crect x='60' y='356' width='190' height='14' fill='%23A97C44'/%3E%3Cpolygon points='42,276 155,200 268,276' fill='%236B4423'/%3E%3Crect x='78' y='294' width='34' height='34' rx='6' fill='%23FBF2D8' stroke='%236B4423' stroke-width='4'/%3E%3Crect x='93' y='296' width='4' height='30' fill='%236B4423'/%3E%3Crect x='80' y='309' width='30' height='4' fill='%236B4423'/%3E%3Crect x='198' y='294' width='34' height='34' rx='6' fill='%23FBF2D8' stroke='%236B4423' stroke-width='4'/%3E%3Crect x='213' y='296' width='4' height='30' fill='%236B4423'/%3E%3Crect x='200' y='309' width='30' height='4' fill='%236B4423'/%3E%3Crect x='140' y='306' width='40' height='64' rx='12' fill='%23A97C44' stroke='%236B4423' stroke-width='4'/%3E%3Ccircle cx='172' cy='338' r='3.5' fill='%23FFD94E'/%3E%3Crect x='0' y='330' width='900' height='40' fill='%23A97C44'/%3E%3Crect x='0' y='338' width='900' height='6' fill='%23C79A62'/%3E%3Crect x='0' y='358' width='900' height='6' fill='%23C79A62'/%3E%3Cg fill='%236B4423'%3E%3Crect x='30' y='326' width='12' height='54'/%3E%3Crect x='120' y='326' width='12' height='54'/%3E%3Crect x='210' y='326' width='12' height='54'/%3E%3Crect x='300' y='326' width='12' height='54'/%3E%3Crect x='390' y='326' width='12' height='54'/%3E%3Crect x='480' y='326' width='12' height='54'/%3E%3Crect x='570' y='326' width='12' height='54'/%3E%3Crect x='660' y='326' width='12' height='54'/%3E%3Crect x='750' y='326' width='12' height='54'/%3E%3Crect x='840' y='326' width='12' height='54'/%3E%3C/g%3E%3Crect x='0' y='370' width='900' height='90' fill='%237EC850'/%3E%3Crect x='0' y='370' width='900' height='46' fill='%236BB93F'/%3E%3Cg transform='translate(320 432)'%3E%3Cellipse cx='0' cy='0' rx='26' ry='16' fill='%234E8C33'/%3E%3Cellipse cx='24' cy='4' rx='18' ry='12' fill='%234E8C33'/%3E%3C/g%3E%3Cg transform='translate(560 432)'%3E%3Crect x='-2' y='-26' width='4' height='26' fill='%236BB93F'/%3E%3Cpath d='M-2 -9 Q-13 -15 -9 -2 Q-5 -4 -2 -5 Z' fill='%236BB93F'/%3E%3Cpath d='M2 -9 Q13 -15 9 -2 Q5 -4 2 -5 Z' fill='%236BB93F'/%3E%3Crect x='-8' y='-29' width='16' height='13' rx='6' fill='%23E4573D'/%3E%3Ccircle cx='-5' cy='-28' r='5' fill='%23E4573D'/%3E%3Ccircle cx='5' cy='-28' r='5' fill='%23E4573D'/%3E%3Ccircle cx='0' cy='-32' r='5' fill='%23E4573D'/%3E%3C/g%3E%3Cg transform='translate(848 444)'%3E%3Crect x='-2' y='-22' width='4' height='22' fill='%236BB93F'/%3E%3Crect x='-7' y='-25' width='14' height='12' rx='5' fill='%23F5A623'/%3E%3Ccircle cx='-4' cy='-24' r='4' fill='%23F5A623'/%3E%3Ccircle cx='4' cy='-24' r='4' fill='%23F5A623'/%3E%3Ccircle cx='0' cy='-27' r='4' fill='%23F5A623'/%3E%3C/g%3E%3Cg transform='translate(700 428)'%3E%3Crect x='-5' y='-9' width='10' height='9' rx='3' fill='%23FBF2D8'/%3E%3Cpath d='M-14 -7 Q0 -26 14 -7 Z' fill='%23D9534F'/%3E%3Ccircle cx='-5' cy='-12' r='2.2' fill='%23FBF2D8'/%3E%3Ccircle cx='5' cy='-11' r='1.8' fill='%23FBF2D8'/%3E%3C/g%3E%3Cg transform='translate(780 408)'%3E%3Crect x='-16' y='-24' width='32' height='28' rx='8' fill='%239AA3AD' stroke='%236B4423' stroke-width='4'/%3E%3Crect x='-9' y='-17' width='18' height='5' rx='2.5' fill='%237C8794'/%3E%3C/g%3E%3Cg transform='translate(90 438)'%3E%3Ccircle cx='-11' cy='0' r='9' fill='%23FFFFFF'/%3E%3Ccircle cx='11' cy='0' r='9' fill='%23FFFFFF'/%3E%3Ccircle cx='0' cy='-11' r='9' fill='%23FFFFFF'/%3E%3Ccircle cx='0' cy='11' r='9' fill='%23FFFFFF'/%3E%3Ccircle cx='0' cy='0' r='8' fill='%23F5A623'/%3E%3C/g%3E%3Cg fill='%23CBC1A0'%3E%3Cellipse cx='420' cy='448' rx='10' ry='5'/%3E%3Cellipse cx='510' cy='442' rx='8' ry='4'/%3E%3C/g%3E%3C/svg%3E")
    top center / 100% auto no-repeat,
    repeating-linear-gradient(180deg, var(--grass-2) 0 44px, var(--grass-1) 44px 88px);
  overflow: hidden;
}

.cloud, .sun {
  position: absolute;
  z-index: 1;
  filter: drop-shadow(0 3px 4px rgba(60, 120, 40, .25));
  will-change: transform;
}
.blob-a { top: 5%; left: -8%; font-size: 44px; animation: cloud-drift 80s linear infinite; }
.blob-a::after { content: '☁️'; }
.blob-b { top: 15%; left: 52%; font-size: 30px; animation: cloud-drift 110s linear infinite reverse; }
.blob-b::after { content: '☁️'; }
.blob-c { top: 3%; right: 7%; font-size: 40px; animation: sun-glow 6s ease-in-out infinite alternate; }
.blob-c::after { content: '☀️'; }
.blob-d { display: none; }
@keyframes cloud-drift { from { transform: translateX(0); } to { transform: translateX(34vw); } }
@keyframes sun-glow { from { opacity: .85; } to { opacity: 1; } }

.starfield {
  position: absolute;
  inset: 0;
  animation: twinkle 4.5s ease-in-out infinite;
}

.starfield-a {
  background-image:
    radial-gradient(2px 2px at 12% 18%, rgba(255,196,84,.55) 50%, transparent 51%),
    radial-gradient(2.5px 2.5px at 68% 8%, rgba(255,196,84,.5) 50%, transparent 51%),
    radial-gradient(2px 2px at 42% 62%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(3px 3px at 88% 44%, rgba(255,196,84,.4) 50%, transparent 51%),
    radial-gradient(2px 2px at 25% 82%, rgba(255,196,84,.5) 50%, transparent 51%),
    radial-gradient(2.5px 2.5px at 78% 78%, rgba(255,255,255,.6) 50%, transparent 51%);
}

.starfield-b {
  background-image:
    radial-gradient(2px 2px at 55% 30%, rgba(255,196,84,.5) 50%, transparent 51%),
    radial-gradient(2px 2px at 8% 52%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(3px 3px at 92% 88%, rgba(255,196,84,.45) 50%, transparent 51%),
    radial-gradient(2px 2px at 35% 92%, rgba(255,196,84,.5) 50%, transparent 51%),
    radial-gradient(2.5px 2.5px at 15% 4%, rgba(255,255,255,.55) 50%, transparent 51%);
  animation-delay: 2.2s;
}

@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: .8; } }

/* ---------- 4. 布局容器 ---------- */
#app {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 16px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#fx-layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

/* ---------- 5. 玻璃卡片 ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 3px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card), var(--highlight-top);
}

.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 3px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card), var(--highlight-top);
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 14px 30px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .04em;
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
  user-select: none;
}

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

.btn-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  color: var(--accent-ink);
  border: 3px solid var(--wood-dark);
  box-shadow: 0 5px 0 rgba(90, 55, 20, .9), 0 10px 18px rgba(90, 50, 10, .4), inset 0 2px 0 rgba(255, 255, 255, .65);
}

.btn-primary:hover { filter: brightness(1.06); }

.btn-glass {
  background: linear-gradient(180deg, var(--wood-hi), var(--wood));
  border: 2px solid var(--wood-dark);
  color: #FFF8E8;
  text-shadow: 0 1px 0 rgba(70, 40, 10, .5);
  box-shadow: var(--highlight-top), 0 4px 10px rgba(60, 35, 10, .3);
  padding: 12px 24px;
  font-size: 16px;
}

.btn-icon {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
  /* 视觉微调：图标整体上提 2px（内容盒中心随 padding-bottom 上移） */
  padding-bottom: 4px;
}

.btn-big { font-size: 22px; padding: 18px 44px; }

.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- 7. 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  margin-bottom: 14px;
  position: sticky;
  top: 10px;
  z-index: 50;
  background: linear-gradient(180deg, var(--wood-hi), var(--wood));
  border: 3px solid var(--wood-dark);
  border-radius: 14px;
  color: #FFF8E8;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -4px 8px rgba(90, 55, 20, .35), 0 5px 12px rgba(60, 35, 10, .35);
}

.topbar::before, .topbar::after {
  content: '';
  position: absolute;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #E8CFA0, #7A5426 70%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .3);
}

.topbar::before { left: 8px; }
.topbar::after { right: 8px; }

.topbar-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFE9A8, #FFC55C);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 4px 10px rgba(214, 122, 0, .3);
  flex: none;
}

.topbar-info { flex: 1; min-width: 0; }

.topbar-name {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-level {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 11.5px;
  color: #F5E3BE;
}

.topbar-level .xpbar {
  flex: 1;
  max-width: 130px;
  height: 7px;
  border-radius: 99px;
  background: rgba(var(--ink-rgb), .14);
  overflow: hidden;
}

.topbar-level .xpbar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .5s ease;
}

.topbar-stats { display: flex; gap: 6px; flex: none; }

.stat-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 248, 232, .25);
  border: 1px solid rgba(255, 248, 232, .4);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.stat-chip small { font-weight: 400; color: #F5E3BE; font-size: 11px; }

.topbar-actions { display: flex; gap: 8px; flex: none; }

/* ---------- 8. 冒险地图 ---------- */
.view-header {
  text-align: center;
  margin: 6px 0 16px;
}

.view-title {
  font-size: 26px;
  font-weight: 800;
  text-shadow: -1px -1px 0 #FFF8E8, 1px -1px 0 #FFF8E8, -1px 1px 0 #FFF8E8, 1px 1px 0 #FFF8E8, 0 3px 0 rgba(90, 55, 20, .25);
  letter-spacing: .06em;
}

.view-sub { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }

.book-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.book-tab {
  flex: 1;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg-soft);
  border: 1px solid var(--glass-border);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  transition: all .18s ease;
  text-align: center;
}

.book-tab.active {
  background: var(--glass-bg-strong);
  color: var(--ink);
  box-shadow: var(--highlight-top), 0 6px 18px rgba(50, 80, 30, .18);
}

.unit-card { padding: 16px 18px; margin-bottom: 14px; }

.unit-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.unit-emoji { font-size: 28px; }

.unit-name { font-size: 17px; font-weight: 800; flex: 1; }

.unit-stars { font-size: 14px; color: var(--ink-soft); font-weight: 700; }

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

.stage-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px 10px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--cream-hi), var(--cream));
  border: 2.5px solid #7FA653;
  transition: transform .15s ease, background .2s ease;
}

.stage-node:active { transform: scale(.93); }

.stage-node .stage-icon { font-size: 26px; line-height: 1; }

.stage-node .stage-name { font-size: 12px; font-weight: 700; color: var(--ink-soft); }

.stage-node .stage-stars { font-size: 11px; letter-spacing: 1px; min-height: 14px; }

.stage-node .stage-stars .got { filter: drop-shadow(0 1px 2px rgba(255, 180, 0, .8)); }

.stage-node.next {
  background: var(--glass-bg-strong);
  animation: breathe 2s ease-in-out infinite;
}

/* 用阴影脉动做呼吸感，不用 transform（transform 无限动画会让元素持续位移） */
@keyframes breathe {
  0%, 100% { box-shadow: var(--highlight-top), 0 0 0 2px rgba(255, 214, 0, .65), 0 8px 20px rgba(255, 190, 60, .35); }
  50% { box-shadow: var(--highlight-top), 0 0 0 5px rgba(255, 214, 0, .85), 0 10px 26px rgba(255, 190, 60, .5); }
}

.stage-node.locked { opacity: .45; filter: saturate(.3); }

.stage-node.locked .stage-icon { filter: grayscale(1); }

.stage-node.locked .stage-name::after { content: '（未解锁）'; font-size: 10px; }

.lock-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  font-size: 19px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35));
}

/* ---------- 8b. 冒险小路（横向连线） ---------- */
.map-track {
  overflow-x: auto;
  padding: 2px 0 8px;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}

.track-inner {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 12px;
  min-width: 100%;
  padding: 6px 2px;
}

.path-node {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  font-family: inherit;
  text-align: center;
  background: linear-gradient(180deg, var(--cream-hi), var(--cream));
  border: 2.5px solid var(--wood-dark);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 0 var(--wood-dark);
  cursor: pointer;
  transition: transform .12s;
}

.path-node:hover { transform: translateY(-3px); }

.path-node.pn-active {
  background: linear-gradient(180deg, #FFE58A, var(--accent));
  box-shadow: 0 4px 0 var(--wood-dark), inset 0 0 0 2px #FFF8E8;
  transform: translateY(-4px);
}

.pn-emoji {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  flex: none;
  background: linear-gradient(180deg, #E4F4CC, #CBE8A8);
  border: 3px solid #7FA653;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 29px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35);
}

.pn-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}

.pn-stars { font-size: 12px; letter-spacing: 1px; min-height: 15px; }

.pn-bar {
  width: 84%;
  height: 8px;
  border-radius: 99px;
  background: rgba(74, 48, 20, .15);
  border: 1px solid rgba(74, 48, 20, .25);
  overflow: hidden;
}

.pn-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--grass-1), var(--grass-2));
  transition: width .5s ease;
}

.pn-flag {
  position: absolute;
  top: -13px;
  right: -5px;
  font-size: 21px;
  filter: drop-shadow(0 2px 2px rgba(40, 80, 20, .4));
}

.pn-lock {
  position: absolute;
  top: -11px;
  left: -5px;
  font-size: 17px;
}

/* ---------- 8c. 期末考试节点（木牌 + 金边，与 path-node 呼应） ---------- */
.exam-node {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  font-family: inherit;
  text-align: center;
  background: linear-gradient(180deg, var(--wood-hi), var(--wood));
  border: 2.5px solid var(--wood-dark);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 0 var(--wood-dark), inset 0 0 0 2px var(--accent);
  cursor: pointer;
  transition: transform .12s;
}

.exam-node:hover { transform: translateY(-3px); }

.exam-node.locked { opacity: .55; filter: saturate(.5); }

.exam-node .pn-emoji {
  background: linear-gradient(180deg, #FFF3C4, var(--accent));
  border-color: var(--accent-2);
}

.exam-stars { font-size: 12px; letter-spacing: 1px; min-height: 15px; font-weight: 800; color: var(--wood-dark); }

.exam-progress { font-size: 11px; font-weight: 700; min-height: 15px; color: var(--wood-dark); }

.map-detail { margin-top: 4px; padding: 14px 16px; }

.station-current {
  border-color: #F0A028;
  box-shadow: 0 0 0 3px rgba(255, 196, 60, .4), var(--shadow-card), var(--highlight-top);
  animation: breathe 2s ease-in-out infinite;
}

.station-locked { opacity: .62; filter: saturate(.5); }

.station-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }

.station-emoji {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex: none;
  background: linear-gradient(180deg, var(--wood-hi), var(--wood));
  border: 2px solid var(--wood-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35);
}

.station-name { font-size: 16.5px; font-weight: 800; flex: 1; min-width: 0; }

.station-flag { flex: none; font-size: 20px; }

.station-progress { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }

.sp-label { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); flex: none; }

.sp-bar {
  flex: 1;
  height: 10px;
  border-radius: 99px;
  background: rgba(74, 48, 20, .15);
  border: 1px solid rgba(74, 48, 20, .25);
  overflow: hidden;
}

.sp-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--grass-1), var(--grass-2));
  transition: width .5s ease;
}

.stat-sun {
  background: rgba(255, 217, 78, .35);
  border-color: rgba(255, 217, 78, .7);
  text-shadow: 0 1px 0 rgba(70, 40, 10, .5);
}

/* ---------- 9. 翻卡学一学 ---------- */
.learn-wrap { display: flex; flex-direction: column; gap: 14px; flex: 1; }

/* 学一学页按钮整体缩一号 */
.learn-wrap .btn { padding: 9px 18px; font-size: 15px; }
.learn-wrap .btn-big { padding: 11px 26px; font-size: 16.5px; align-self: center; }

.learn-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 700;
  padding: 0 4px;
}

.flashcard-scene {
  perspective: 1400px;
  flex: 1;
  display: flex;
  min-height: 380px;
  max-height: 520px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.flashcard {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.4, 1.4, .5, 1);
}

.flashcard.flipped { transform: rotateY(180deg); }

.flashcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px;
  text-align: center;
}

.flashcard-face.back { transform: rotateY(180deg); }

.fc-emoji {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 78px;
  line-height: 1;
  background: linear-gradient(180deg, #E4F4CC, #CBE8A8);
  border: 3px solid #7FA653;
  box-shadow: inset 0 3px 8px rgba(90, 140, 60, .25), 0 6px 14px rgba(50, 80, 30, .25);
}

.fc-word { font-size: 42px; font-weight: 800; letter-spacing: .04em; }

.fc-phonetic { font-size: 18px; color: var(--ink-soft); font-family: "Segoe UI", "Lucida Sans Unicode", var(--font-round); }

.fc-cn { font-size: 30px; font-weight: 800; }

.fc-sentence { font-size: 17px; color: var(--ink-soft); line-height: 1.6; max-width: 92%; }

.fc-sentence b { color: var(--ink); text-decoration: underline wavy rgba(255, 180, 0, .8); text-underline-offset: 4px; }

.fc-speak {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--wood-hi), var(--wood));
  border: 2px solid var(--wood-dark);
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
  /* 与顶栏 .btn-icon 同款：图标整体上提 2px 修正视觉偏下 */
  padding-bottom: 4px;
  box-shadow: var(--highlight-top);
}

.fc-speak.fc-slow { right: 66px; /* 🐢 是贴地字形，比 🔊 再上提 6px */ padding-bottom: 16px; }

.learn-nav { display: flex; gap: 12px; justify-content: center; align-items: center; }

.learn-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

.learn-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(var(--ink-rgb), .2);
  transition: all .25s ease;
}

.learn-dot.seen { background: var(--good); }
.learn-dot.current { background: var(--accent); transform: scale(1.45); box-shadow: 0 0 8px rgba(255, 200, 0, .9); }

/* ---------- 10. 答题 ---------- */
.quiz-wrap { display: flex; flex-direction: column; gap: 14px; flex: 1; }

.quiz-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-back {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 18px;
  flex: none;
  box-shadow: var(--highlight-top);
}

.quiz-progress {
  flex: 1;
  height: 14px;
  border-radius: 99px;
  background: var(--glass-bg-soft);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 99px;
  transition: width .4s ease;
}

.quiz-count { font-size: 14px; font-weight: 800; color: var(--ink-soft); flex: none; }

.combo-badge {
  position: fixed;
  top: 16%;
  right: 8px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--highlight-top), 0 0 24px rgba(255, 140, 0, .35);
  animation: combo-pop .35s cubic-bezier(.3, 1.6, .5, 1);
  pointer-events: none;
}

.combo-badge .combo-num { font-size: 26px; font-weight: 900; color: #FF6A00; text-shadow: 0 1px 0 #fff; }
.combo-badge .combo-label { font-size: 11px; font-weight: 700; color: var(--ink-soft); }

@keyframes combo-pop { 0% { transform: scale(.4) rotate(-8deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }

.question-card { padding: 26px 22px; text-align: center; position: relative; }

.question-type {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 99px;
  background: rgba(var(--ink-rgb), .1);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.question-main { font-size: 30px; font-weight: 800; line-height: 1.35; word-break: break-word; }

/* 阅读理解短文卡片（句型关） */
.reading-passage {
  background: linear-gradient(180deg, var(--cream-hi), var(--cream));
  border: 2px solid rgba(var(--ink-rgb), .18);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 4px auto 14px;
  max-width: 92%;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  line-height: 1.7;
  letter-spacing: 0;
  word-break: break-word;
}

.question-main .q-emoji { font-size: 56px; display: block; margin-bottom: 10px; }

.question-listen-btn {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 0 rgba(214, 122, 0, .55), 0 14px 30px rgba(255, 152, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .7);
  font-size: 38px;
  margin: 6px auto 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-shadow 2.2s ease-in-out infinite;
}

@keyframes pulse-shadow {
  0%, 100% { box-shadow: 0 6px 0 rgba(214, 122, 0, .55), 0 14px 30px rgba(255, 152, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .7); }
  50% { box-shadow: 0 6px 0 rgba(214, 122, 0, .55), 0 20px 44px rgba(255, 152, 0, .68), inset 0 1px 0 rgba(255, 255, 255, .7); }
}

.question-hint { margin-top: 12px; font-size: 14px; color: var(--ink-soft); }

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

.option {
  padding: 18px 14px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 2px solid var(--glass-border);
  box-shadow: var(--highlight-top);
  font-size: 20px;
  font-weight: 700;
  transition: transform .12s ease, border-color .15s ease, background .15s ease;
  text-align: center;
  word-break: break-word;
}

.option:active { transform: scale(.95); }

.option .opt-mark { display: block; font-size: 14px; margin-top: 4px; font-weight: 400; color: var(--ink-soft); }

/* 反馈态（参考图：正确绿光 / 错误红光抖动） */
.option.is-correct {
  border-color: var(--good);
  background: rgba(52, 211, 153, .28);
  box-shadow: 0 0 0 3px var(--good-glow), 0 0 30px rgba(52, 211, 153, .5), var(--highlight-top);
  animation: pop-correct .35s ease;
}

.option.is-wrong {
  border-color: var(--bad);
  background: rgba(251, 113, 133, .28);
  box-shadow: 0 0 0 3px var(--bad-glow), 0 0 30px rgba(251, 113, 133, .5), var(--highlight-top);
  animation: shake .4s ease;
}

@keyframes pop-correct { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.option.dim { opacity: .45; pointer-events: none; }

/* 拼写题 */
.spell-slots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 16px auto 6px;
  max-width: 100%;
}

.spell-slot {
  width: 46px;
  height: 52px;
  border-radius: var(--radius-xs);
  background: var(--glass-bg-soft);
  border: 2px dashed rgba(var(--ink-rgb), .3);
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.spell-slot.filled {
  border-style: solid;
  border-color: var(--glass-border);
  background: var(--glass-bg-strong);
  box-shadow: var(--highlight-top);
}

.spell-slot.is-correct { border-color: var(--good); background: rgba(52, 211, 153, .3); box-shadow: 0 0 0 3px var(--good-glow); }
.spell-slot.is-wrong { border-color: var(--bad); background: rgba(251, 113, 133, .3); animation: shake .4s ease; }

.spell-pool {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  margin-top: 14px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg-soft);
  border: 1px solid var(--glass-border);
}

.letter-tile {
  width: 48px;
  height: 52px;
  border-radius: var(--radius-xs);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--highlight-top), 0 4px 10px rgba(50, 80, 30, .18);
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  transition: transform .1s ease, opacity .15s ease;
}

.letter-tile:active { transform: scale(.9); }

.letter-tile.used { opacity: .18; pointer-events: none; }

.spell-sentence { font-size: 16px; color: var(--ink-soft); line-height: 1.7; margin-top: 8px; }
.spell-sentence .blank {
  display: inline-block;
  min-width: 90px;
  border-bottom: 3px dotted rgba(var(--ink-rgb), .45);
  color: var(--ink);
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
}

/* ---------- 11. 结算页 ---------- */
.result-wrap { text-align: center; padding: 30px 22px; }

.result-emoji { font-size: 76px; animation: pop-correct .6s ease; filter: drop-shadow(0 10px 20px rgba(50,80,30,.38)); }

.result-title { font-size: 30px; font-weight: 900; margin: 8px 0 2px; text-shadow: 0 2px 0 rgba(255,255,255,.5); }

.result-sub { color: var(--ink-soft); font-size: 15px; }

.result-stars { display: flex; justify-content: center; gap: 14px; margin: 20px 0 8px; min-height: 74px; }

.result-star {
  font-size: 58px;
  filter: grayscale(1) opacity(.3);
  transform: scale(.4);
}

.result-star.lit {
  filter: drop-shadow(0 4px 10px rgba(255, 180, 0, .85));
  animation: star-pop .55s cubic-bezier(.3, 1.9, .5, 1) forwards;
}

@keyframes star-pop {
  0% { transform: scale(.2) rotate(-40deg); opacity: 0; }
  60% { transform: scale(1.25) rotate(8deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.result-stats {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 22px;
}

.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- 12. 勋章墙 ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

.badge-card {
  padding: 16px 10px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg-soft);
  border: 1px solid var(--glass-border);
  text-align: center;
  transition: transform .15s ease;
}

.badge-card:hover { transform: translateY(-3px); }

.badge-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  background: linear-gradient(180deg, #FFE9A8, #FFC55C);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 6px 14px rgba(214, 122, 0, .35);
}

.badge-card.locked .badge-icon {
  background: rgba(var(--ink-rgb), .12);
  box-shadow: none;
  filter: grayscale(1);
}

.badge-card.locked { opacity: .6; }

.badge-name { font-size: 14.5px; font-weight: 800; }

.badge-desc { font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.45; }

/* ---------- 13. 单词本 ---------- */
.wb-tabs { display: flex; gap: 10px; margin-bottom: 14px; }

.wb-tab {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg-soft);
  border: 1px solid var(--glass-border);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
}

.wb-tab.active {
  background: var(--glass-bg-strong);
  color: var(--ink);
  box-shadow: var(--highlight-top);
}

.word-list { display: flex; flex-direction: column; gap: 8px; }

.word-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

.word-row .wr-emoji { font-size: 26px; flex: none; }

.word-row .wr-body { flex: 1; min-width: 0; }

.word-row .wr-word { font-size: 18px; font-weight: 800; }

.word-row .wr-word .wr-phon {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 400;
  margin-left: 6px;
  font-family: "Segoe UI", "Lucida Sans Unicode", var(--font-round);
}

.word-row .wr-cn { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

.word-row .wr-speak {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  font-size: 17px;
  flex: none;
  box-shadow: var(--highlight-top);
}

.word-row .wr-master { flex: none; font-size: 15px; filter: drop-shadow(0 1px 2px rgba(255,180,0,.7)); }

.word-row .wr-master.no { filter: grayscale(1) opacity(.35); }

.wb-section-title { font-size: 15px; font-weight: 800; margin: 16px 4px 10px; display: flex; align-items: center; gap: 8px; }

.empty-tip { text-align: center; color: var(--ink-soft); padding: 30px 10px; font-size: 14.5px; line-height: 1.8; }

/* 空年级占位卡（地图/本子：报名年级暂无内容） */
.empty-state-card { max-width: 460px; margin: 18px auto 0; padding: 44px 24px; text-align: center; }
.empty-state-emoji { font-size: 52px; margin-bottom: 10px; }
.empty-state-title { font-size: 20px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.empty-state-sub { font-size: 14.5px; color: var(--ink-soft); line-height: 1.8; }

/* ---------- 14. 个人设置 ---------- */
.profile-card { padding: 22px 20px; display: flex; flex-direction: column; gap: 18px; }

.field label { display: block; font-size: 14px; font-weight: 800; margin-bottom: 8px; }

.field input[type="text"] {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--glass-border);
  background: rgba(255, 255, 255, .5);
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  box-shadow: var(--highlight-top);
}

.field input[type="text"]:focus { border-color: var(--accent); }

.field input[type="range"] { width: 100%; accent-color: var(--accent-2); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.toggle {
  position: relative;
  width: 58px;
  height: 32px;
  border-radius: 99px;
  background: rgba(var(--ink-rgb), .2);
  transition: background .2s ease;
  flex: none;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
  transition: left .2s ease;
}

.toggle.on { background: var(--good); }
.toggle.on::after { left: 29px; }

.danger-zone { border-top: 1px dashed rgba(var(--ink-rgb), .25); padding-top: 16px; }

.btn-danger {
  background: rgba(251, 113, 133, .2);
  border: 2px solid var(--bad);
  color: #B82545;
  border-radius: 999px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
}

/* ---------- 15. 模态（勋章弹窗 / 确认框） ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(var(--ink-rgb), .55);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in .25s ease;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  max-width: 360px;
  width: 100%;
  padding: 30px 24px;
  text-align: center;
  animation: modal-pop .45s cubic-bezier(.3, 1.6, .5, 1);
}

@keyframes modal-pop { 0% { transform: scale(.5) translateY(30px); opacity: 0; } 100% { transform: scale(1) translateY(0); opacity: 1; } }

.modal-badge-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  background: linear-gradient(180deg, #FFE9A8, #FFC55C);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.85), 0 10px 28px rgba(214, 122, 0, .45);
  animation: badge-shine 1.6s ease-in-out infinite;
}

@keyframes badge-shine { 0%, 100% { transform: rotate(-4deg) scale(1); } 50% { transform: rotate(4deg) scale(1.06); } }

.modal-title { font-size: 24px; font-weight: 900; margin-bottom: 6px; }

.modal-sub { color: rgba(var(--ink-rgb), .86); font-size: 14.5px; line-height: 1.6; margin-bottom: 20px; }

/* ---------- 16. Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 110;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--highlight-top), 0 10px 26px rgba(50, 80, 30, .28);
  font-size: 15px;
  font-weight: 700;
  animation: toast-in .3s ease, fade-out .4s ease 1.8s forwards;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes toast-in { from { transform: translateX(-50%) translateY(16px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }

/* ---------- 17. 首屏欢迎 ---------- */
.hero { text-align: center; padding: 34px 20px; margin-bottom: 18px; }

.hero .hero-emoji { font-size: 72px; filter: drop-shadow(0 10px 22px rgba(50,80,30,.38)); animation: float-y 3s ease-in-out infinite; }

@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.hero-title { font-size: 32px; font-weight: 900; margin-top: 10px; text-shadow: -1px -1px 0 #FFF8E8, 1px -1px 0 #FFF8E8, -1px 1px 0 #FFF8E8, 1px 1px 0 #FFF8E8, 0 3px 0 rgba(90, 55, 20, .25); letter-spacing: .08em; }

.hero-sub { color: var(--ink-soft); margin-top: 6px; font-size: 15px; }

.quick-entries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }

.quick-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 6px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--highlight-top);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
  transition: transform .15s ease;
}

.quick-entry:active { transform: scale(.93); }

.quick-entry .qe-icon { font-size: 30px; }

/* ---------- 18. 响应式 ---------- */
@media (max-width: 480px) {
  #app { padding: 10px 10px 34px; }

  .view-title { font-size: 22px; }

  .topbar { padding: 8px 10px; gap: 8px; }
  .topbar-avatar { width: 38px; height: 38px; font-size: 20px; }
  .topbar-name { font-size: 13.5px; }
  .stat-chip { padding: 6px 9px; font-size: 12.5px; }
  .stat-chip small { display: none; }

  .stages { grid-template-columns: repeat(2, 1fr); }

  .path-node { flex: 0 0 126px; padding: 10px 5px 8px; }
  .pn-emoji { width: 46px; height: 46px; font-size: 25px; }
  .pn-name { font-size: 11px; }
  .exam-node { flex: 0 0 126px; padding: 10px 5px 8px; }
  .exam-node .pn-emoji { width: 46px; height: 46px; font-size: 25px; }
  .exam-progress { font-size: 10px; }
  .station-name { font-size: 14.5px; }

  .fc-word { font-size: 34px; }
  .fc-cn { font-size: 25px; }
  .fc-emoji { width: 108px; height: 108px; font-size: 56px; }

  .question-main { font-size: 24px; }
  .question-main .q-emoji { font-size: 44px; }

  .options { grid-template-columns: 1fr; }
  .option { padding: 15px 12px; font-size: 18px; }

  .spell-slot { width: 38px; height: 46px; font-size: 21px; }
  .letter-tile { width: 42px; height: 46px; font-size: 21px; }

  .result-star { font-size: 46px; }
  .btn { padding: 12px 22px; font-size: 16.5px; }
  .btn-big { font-size: 19px; padding: 15px 34px; }

  .badge-grid { grid-template-columns: repeat(2, 1fr); }

  .flashcard-scene { min-height: 340px; }
}

@media (min-width: 900px) {
  #app { max-width: 860px; }
  .options { grid-template-columns: 1fr 1fr; }
}

/* ---------- 19. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  .blob-a, .blob-b, .blob-c, .starfield, .stage-node.next, .station-current, .question-listen-btn, .hero .hero-emoji, .modal-badge-icon, .login-card, .lp-packet.shake, .lb-cloud, .lb-butterfly, .lb-leaf, .lb-sun-glow, .lb-grass span { animation: none !important; }
  .flashcard { transition-duration: .01s; }
}

/* ---------- 20. 登录入口（PvZ 风格） ---------- */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow-y: auto;
}

/* hidden 属性会被上面的 display:flex 覆盖，这里补回隐藏 */
.login-screen[hidden] { display: none; }

/* 背景图：内联 SVG 草坪场景（晴空/太阳光芒/云朵/山丘/树丛/篱笆/木屋/石板小径/花草/墓碑），离线可用 */
.login-bg {
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 900 640' preserveAspectRatio='xMidYMid slice'%3E%3Cdefs%3E%3ClinearGradient id='sky' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%238FD3FF'/%3E%3Cstop offset='1' stop-color='%23C9EDFF'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='900' height='440' fill='url(%23sky)'/%3E%3Cg stroke='%23F5A623' stroke-width='7' stroke-linecap='round' opacity='.5'%3E%3Cline x1='755' y1='6' x2='755' y2='28'/%3E%3Cline x1='755' y1='6' x2='755' y2='28' transform='rotate(36 755 92)'/%3E%3Cline x1='755' y1='6' x2='755' y2='28' transform='rotate(72 755 92)'/%3E%3Cline x1='755' y1='6' x2='755' y2='28' transform='rotate(108 755 92)'/%3E%3Cline x1='755' y1='6' x2='755' y2='28' transform='rotate(144 755 92)'/%3E%3Cline x1='755' y1='6' x2='755' y2='28' transform='rotate(180 755 92)'/%3E%3Cline x1='755' y1='6' x2='755' y2='28' transform='rotate(216 755 92)'/%3E%3Cline x1='755' y1='6' x2='755' y2='28' transform='rotate(252 755 92)'/%3E%3Cline x1='755' y1='6' x2='755' y2='28' transform='rotate(288 755 92)'/%3E%3Cline x1='755' y1='6' x2='755' y2='28' transform='rotate(324 755 92)'/%3E%3C/g%3E%3Ccircle cx='755' cy='92' r='78' fill='%23FFD94E' opacity='.32'/%3E%3Ccircle cx='755' cy='92' r='54' fill='%23FFD94E'/%3E%3Cg fill='%23FFFFFF' opacity='.92'%3E%3Cellipse cx='170' cy='96' rx='66' ry='24'/%3E%3Cellipse cx='222' cy='84' rx='44' ry='19'/%3E%3C/g%3E%3Cg fill='%23FFFFFF' opacity='.9'%3E%3Cellipse cx='410' cy='62' rx='58' ry='21'/%3E%3Cellipse cx='456' cy='52' rx='38' ry='16'/%3E%3Cellipse cx='368' cy='54' rx='30' ry='13'/%3E%3C/g%3E%3Cg fill='%23FFFFFF' opacity='.92'%3E%3Cellipse cx='560' cy='150' rx='52' ry='18'/%3E%3Cellipse cx='600' cy='140' rx='34' ry='14'/%3E%3C/g%3E%3Cg fill='%23FFFFFF' opacity='.85'%3E%3Cellipse cx='70' cy='196' rx='40' ry='15'/%3E%3Cellipse cx='100' cy='188' rx='26' ry='12'/%3E%3C/g%3E%3Cg fill='%23FFFFFF' opacity='.88'%3E%3Cellipse cx='640' cy='236' rx='44' ry='15'/%3E%3Cellipse cx='676' cy='228' rx='28' ry='11'/%3E%3C/g%3E%3Cellipse cx='210' cy='458' rx='340' ry='140' fill='%23A8DB8A'/%3E%3Cellipse cx='740' cy='484' rx='330' ry='166' fill='%2394CE79'/%3E%3Cg fill='%235B9A3C'%3E%3Cellipse cx='80' cy='356' rx='26' ry='22'/%3E%3Cellipse cx='130' cy='350' rx='22' ry='19'/%3E%3Cellipse cx='470' cy='352' rx='26' ry='22'/%3E%3Cellipse cx='516' cy='346' rx='22' ry='19'/%3E%3Cellipse cx='650' cy='354' rx='26' ry='22'/%3E%3Cellipse cx='698' cy='348' rx='22' ry='19'/%3E%3C/g%3E%3Cg fill='%236B4423'%3E%3Crect x='76' y='372' width='8' height='18'/%3E%3Crect x='126' y='366' width='8' height='20'/%3E%3Crect x='466' y='368' width='8' height='20'/%3E%3Crect x='512' y='362' width='8' height='20'/%3E%3Crect x='646' y='370' width='8' height='18'/%3E%3Crect x='694' y='364' width='8' height='20'/%3E%3C/g%3E%3Crect x='0' y='382' width='900' height='52' fill='%23A97C44'/%3E%3Crect x='0' y='392' width='900' height='7' fill='%23C79A62'/%3E%3Crect x='0' y='418' width='900' height='7' fill='%23C79A62'/%3E%3Cg fill='%236B4423'%3E%3Crect x='36' y='378' width='12' height='60'/%3E%3Crect x='126' y='378' width='12' height='60'/%3E%3Crect x='216' y='378' width='12' height='60'/%3E%3Crect x='306' y='378' width='12' height='60'/%3E%3Crect x='396' y='378' width='12' height='60'/%3E%3Crect x='486' y='378' width='12' height='60'/%3E%3Crect x='576' y='378' width='12' height='60'/%3E%3Crect x='666' y='378' width='12' height='60'/%3E%3Crect x='756' y='378' width='12' height='60'/%3E%3Crect x='846' y='378' width='12' height='60'/%3E%3C/g%3E%3Crect x='0' y='434' width='900' height='206' fill='%237EC850'/%3E%3Cg fill='%236BB93F'%3E%3Crect x='0' y='434' width='900' height='52'/%3E%3Crect x='0' y='538' width='900' height='52'/%3E%3C/g%3E%3Crect x='288' y='322' width='22' height='60' fill='%23A97C44'/%3E%3Crect x='282' y='312' width='34' height='14' rx='4' fill='%236B4423'/%3E%3Crect x='130' y='396' width='190' height='110' rx='4' fill='%23C79A62'/%3E%3Crect x='130' y='492' width='190' height='14' fill='%23A97C44'/%3E%3Cpolygon points='112,400 225,318 338,400' fill='%236B4423'/%3E%3Crect x='150' y='424' width='36' height='36' rx='6' fill='%23FBF2D8' stroke='%236B4423' stroke-width='4'/%3E%3Crect x='166' y='426' width='4' height='32' fill='%236B4423'/%3E%3Crect x='152' y='440' width='32' height='4' fill='%236B4423'/%3E%3Crect x='262' y='424' width='36' height='36' rx='6' fill='%23FBF2D8' stroke='%236B4423' stroke-width='4'/%3E%3Crect x='278' y='426' width='4' height='32' fill='%236B4423'/%3E%3Crect x='264' y='440' width='32' height='4' fill='%236B4423'/%3E%3Crect x='204' y='440' width='42' height='66' rx='14' fill='%23A97C44' stroke='%236B4423' stroke-width='4'/%3E%3Ccircle cx='236' cy='474' r='3.5' fill='%23FFD94E'/%3E%3Cellipse cx='238' cy='514' rx='14' ry='6' fill='%23F1E3B8'/%3E%3Cellipse cx='268' cy='528' rx='15' ry='6.5' fill='%23F1E3B8'/%3E%3Cellipse cx='300' cy='544' rx='16' ry='7' fill='%23F1E3B8'/%3E%3Cellipse cx='334' cy='562' rx='17' ry='7.5' fill='%23F1E3B8'/%3E%3Cellipse cx='370' cy='580' rx='18' ry='8' fill='%23F1E3B8'/%3E%3Cellipse cx='408' cy='598' rx='20' ry='8.5' fill='%23F1E3B8'/%3E%3Cellipse cx='448' cy='616' rx='21' ry='9' fill='%23F1E3B8'/%3E%3Cellipse cx='486' cy='630' rx='22' ry='9.5' fill='%23F1E3B8'/%3E%3Cg transform='translate(560 470)'%3E%3Crect x='-20' y='-30' width='40' height='34' rx='8' fill='%239AA3AD' stroke='%236B4423' stroke-width='4'/%3E%3Crect x='-11' y='-21' width='22' height='6' rx='3' fill='%237C8794'/%3E%3C/g%3E%3Cg fill='%234E8C33'%3E%3Cellipse cx='58' cy='486' rx='26' ry='16'/%3E%3Cellipse cx='84' cy='490' rx='18' ry='12'/%3E%3C/g%3E%3Cg fill='%234E8C33'%3E%3Cellipse cx='614' cy='592' rx='26' ry='16'/%3E%3Cellipse cx='590' cy='596' rx='18' ry='12'/%3E%3C/g%3E%3Cg transform='translate(320 612)'%3E%3Crect x='-2' y='-28' width='4' height='28' fill='%236BB93F'/%3E%3Cpath d='M-2 -10 Q-14 -16 -10 -2 Q-6 -4 -2 -6 Z' fill='%236BB93F'/%3E%3Cpath d='M2 -10 Q14 -16 10 -2 Q6 -4 2 -6 Z' fill='%236BB93F'/%3E%3Crect x='-9' y='-32' width='18' height='14' rx='6' fill='%23E4573D'/%3E%3Ccircle cx='-6' cy='-31' r='6' fill='%23E4573D'/%3E%3Ccircle cx='6' cy='-31' r='6' fill='%23E4573D'/%3E%3Ccircle cx='0' cy='-35' r='6' fill='%23E4573D'/%3E%3C/g%3E%3Cg transform='translate(545 606)'%3E%3Crect x='-2' y='-28' width='4' height='28' fill='%236BB93F'/%3E%3Cpath d='M-2 -10 Q-14 -16 -10 -2 Q-6 -4 -2 -6 Z' fill='%236BB93F'/%3E%3Cpath d='M2 -10 Q14 -16 10 -2 Q6 -4 2 -6 Z' fill='%236BB93F'/%3E%3Crect x='-9' y='-32' width='18' height='14' rx='6' fill='%23E4573D'/%3E%3Ccircle cx='-6' cy='-31' r='6' fill='%23E4573D'/%3E%3Ccircle cx='6' cy='-31' r='6' fill='%23E4573D'/%3E%3Ccircle cx='0' cy='-35' r='6' fill='%23E4573D'/%3E%3C/g%3E%3Cg transform='translate(852 548)'%3E%3Crect x='-2' y='-24' width='4' height='24' fill='%236BB93F'/%3E%3Cpath d='M-2 -8 Q-12 -14 -9 -2 Q-5 -4 -2 -5 Z' fill='%236BB93F'/%3E%3Cpath d='M2 -8 Q12 -14 9 -2 Q5 -4 2 -5 Z' fill='%236BB93F'/%3E%3Crect x='-8' y='-27' width='16' height='13' rx='5' fill='%23F5A623'/%3E%3Ccircle cx='-5' cy='-26' r='5' fill='%23F5A623'/%3E%3Ccircle cx='5' cy='-26' r='5' fill='%23F5A623'/%3E%3Ccircle cx='0' cy='-30' r='5' fill='%23F5A623'/%3E%3C/g%3E%3Cg transform='translate(160 624)'%3E%3Crect x='-5' y='-10' width='10' height='10' rx='3' fill='%23FBF2D8'/%3E%3Cpath d='M-15 -8 Q0 -30 15 -8 Z' fill='%23D9534F'/%3E%3Ccircle cx='-6' cy='-13' r='2.5' fill='%23FBF2D8'/%3E%3Ccircle cx='5' cy='-12' r='2' fill='%23FBF2D8'/%3E%3C/g%3E%3Cg transform='translate(515 486)'%3E%3Crect x='-5' y='-10' width='10' height='10' rx='3' fill='%23FBF2D8'/%3E%3Cpath d='M-13 -8 Q0 -26 13 -8 Z' fill='%23A97C44'/%3E%3C/g%3E%3Cg fill='%23CBC1A0'%3E%3Cellipse cx='655' cy='620' rx='10' ry='5'/%3E%3Cellipse cx='672' cy='612' rx='7' ry='4'/%3E%3Cellipse cx='66' cy='510' rx='9' ry='5'/%3E%3Cellipse cx='828' cy='468' rx='8' ry='4'/%3E%3C/g%3E%3Cg transform='translate(120 560)'%3E%3Ccircle cx='-14' cy='0' r='11' fill='%23FFFFFF'/%3E%3Ccircle cx='14' cy='0' r='11' fill='%23FFFFFF'/%3E%3Ccircle cx='0' cy='-14' r='11' fill='%23FFFFFF'/%3E%3Ccircle cx='0' cy='14' r='11' fill='%23FFFFFF'/%3E%3Ccircle cx='0' cy='0' r='10' fill='%23F5A623'/%3E%3C/g%3E%3Cg transform='translate(790 600)'%3E%3Ccircle cx='-13' cy='0' r='10' fill='%23FFFFFF'/%3E%3Ccircle cx='13' cy='0' r='10' fill='%23FFFFFF'/%3E%3Ccircle cx='0' cy='-13' r='10' fill='%23FFFFFF'/%3E%3Ccircle cx='0' cy='13' r='10' fill='%23FFFFFF'/%3E%3Ccircle cx='0' cy='0' r='9' fill='%23F5A623'/%3E%3C/g%3E%3Cg transform='translate(700 505)'%3E%3Crect x='-34' y='-52' width='68' height='58' rx='10' fill='%239AA3AD' stroke='%236B4423' stroke-width='5'/%3E%3Crect x='-20' y='-38' width='40' height='8' rx='4' fill='%237C8794'/%3E%3Crect x='-20' y='-22' width='26' height='8' rx='4' fill='%237C8794'/%3E%3C/g%3E%3C/svg%3E")
    center / cover no-repeat,
    repeating-linear-gradient(180deg, var(--grass-1) 0 44px, var(--grass-2) 44px 88px);
}

.login-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(107, 68, 35, .16);
}

.login-card {
  position: relative;
  z-index: 2; /* 压在环境装饰层（lb-）之上，保证交互与可读性 */
  width: min(94vw, 470px);
  padding: 26px 24px 22px;
  text-align: center;
  animation: login-pop .45s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes login-pop {
  from { transform: scale(.72) rotate(-2deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}

.login-logo { font-size: 34px; letter-spacing: 6px; }

.login-title {
  font-size: 34px;
  color: var(--wood-dark);
  text-shadow: 0 2px 0 rgba(255, 255, 255, .55), 0 4px 10px rgba(50, 80, 30, .3);
  margin-top: 2px;
}

.login-sub { font-size: 14.5px; color: var(--ink-soft); margin: 6px 0 16px; }

.login-field { margin-bottom: 14px; text-align: center; }

.login-label {
  display: inline-block;
  font-size: 14px;
  font-weight: bold;
  color: var(--cream-hi);
  background: var(--wood);
  border: 2px solid var(--wood-dark);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 8px;
  box-shadow: 0 3px 0 var(--wood-dark);
}

.login-packets { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.lp-packet {
  font-family: inherit;
  font-size: 15px;
  font-weight: bold;
  color: var(--ink);
  background: linear-gradient(180deg, var(--cream-hi), var(--cream));
  border: 2.5px solid var(--wood-dark);
  border-radius: 12px;
  padding: 8px 13px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--wood-dark);
  transition: transform .12s, box-shadow .12s, background .12s;
}

.lp-packet:hover { transform: translateY(-2px); }

.lp-packet.active {
  background: linear-gradient(180deg, #FFE58A, var(--accent));
  box-shadow: 0 3px 0 var(--wood-dark), inset 0 0 0 2px #FFF8E8;
  transform: translateY(-2px);
}

.lp-packet.locked {
  background: linear-gradient(180deg, #D8D2C2, #BFB8A5);
  color: rgba(var(--ink-rgb), .55);
  cursor: not-allowed;
  filter: saturate(.4);
}

.lp-packet.shake { animation: login-shake .3s; }

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

.login-start { width: 100%; margin-top: 6px; font-size: 20px; }

.login-hint { font-size: 12px; color: var(--ink-faint); margin-top: 10px; }

@media (max-width: 480px) {
  .login-card { padding: 20px 14px 16px; }
  .login-title { font-size: 28px; }
  .lp-packet { font-size: 13.5px; padding: 7px 10px; }
}

/* ---------- 20b. 登录页环境动效（飘云/蝴蝶/落叶/光晕/草摇） ---------- */
/* 裁剪容器：绝对定位铺满 .login-screen（尺寸一致，内部 top/left 百分比语义不变），
   把动画终点的 translateX(115vw)/translateY(112vh) 裁在层内——装饰盒不再计入滚动溢出区，
   消除滚动条周期性闪现与卡片抖动。层级压在暗化层之上、卡片（z-index:2）之下，纯装饰不拦截交互 */
.lb-fx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

/* 各装饰元素仍在容器内定位；层级由容器统一承担，自身不再设 z-index */
.lb-cloud, .lb-butterfly, .lb-leaf, .lb-sun-glow, .lb-grass {
  position: absolute;
  pointer-events: none;
}

/* will-change 只留给实际执行 transform 动画的元素（容器与草的父盒自身无动画） */
.lb-cloud, .lb-butterfly, .lb-leaf, .lb-sun-glow, .lb-grass span { will-change: transform; }

/* 飘云：left:0 锚定左缘（否则 flex 容器内静态位置会落到屏中），整屏横移后从另一侧回绕（-15vw 与 115vw 均在屏外，衔接无缝）。
   静态 transform 仅在动画停用（reduced-motion）时生效，错开停驻点避免三朵云堆在左缘 */
.lb-cloud { left: 0; filter: drop-shadow(0 3px 4px rgba(60, 120, 40, .2)); }
.lb-cloud.c1 { top: 6%; font-size: 34px; transform: translateX(10vw); animation: lb-cloud-drift 46s linear infinite; animation-delay: -12s; }
.lb-cloud.c2 { top: 17%; font-size: 25px; opacity: .9; transform: translateX(45vw); animation: lb-cloud-drift 58s linear infinite; animation-delay: -31s; }
.lb-cloud.c3 { top: 27%; font-size: 42px; transform: translateX(74vw); animation: lb-cloud-drift 38s linear infinite; animation-delay: -20s; }

@keyframes lb-cloud-drift {
  from { transform: translateX(-15vw); }
  to { transform: translateX(115vw); }
}

/* 蝴蝶：不规则折线漂浮 + 轻微摆动旋转；b2 反向播放且起点不同，路径错开 */
.lb-butterfly { font-size: 26px; filter: drop-shadow(0 2px 3px rgba(60, 120, 40, .25)); }
.lb-butterfly.b1 { left: 16%; top: 56%; animation: lb-butterfly 9s ease-in-out infinite alternate; }
.lb-butterfly.b2 { left: 60%; top: 24%; font-size: 22px; animation: lb-butterfly 13s ease-in-out infinite alternate-reverse; }

@keyframes lb-butterfly {
  0%   { transform: translate(0, 0) rotate(-10deg); }
  30%  { transform: translate(7vw, -5vh) rotate(12deg); }
  65%  { transform: translate(13vw, 3vh) rotate(-8deg); }
  100% { transform: translate(6vw, 7vh) rotate(10deg); }
}

/* 落叶：从屏顶缓落到屏底，旋转 160°，两端渐隐渐现；水平起点/时长/延迟错开 */
.lb-leaf { filter: drop-shadow(0 2px 2px rgba(40, 90, 30, .2)); }
.lb-leaf.l1 { left: 8%; top: -6vh; font-size: 19px; animation: lb-leaf-fall 11s linear infinite; animation-delay: -2s; }
.lb-leaf.l2 { left: 42%; top: -6vh; font-size: 23px; animation: lb-leaf-fall 14s linear infinite; animation-delay: -8s; }
.lb-leaf.l3 { left: 74%; top: -6vh; font-size: 17px; animation: lb-leaf-fall 17s linear infinite; animation-delay: -13s; }

@keyframes lb-leaf-fall {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  8%   { opacity: .95; }
  88%  { opacity: .95; }
  100% { transform: translate(5vw, 112vh) rotate(160deg); opacity: 0; }
}

/* 右上角金色光晕：呼应背景太阳（SVG cx=755 cy=92，slice+居中裁剪）。
   宽屏（宽高受限）下太阳盘面恒位于距右 16.1%、距顶 5% 处，光晕中心用 calc 锚到该点，
   380px 半径 190px，常见桌面分辨率（1280-1920 宽）下与太阳盘面明显重叠 */
.lb-sun-glow {
  top: calc(5% - 190px);
  right: calc(16.1% - 190px);
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(255, 217, 78, .5) 0%, rgba(255, 217, 78, 0) 68%);
  animation: lb-sun-breath 5s ease-in-out infinite alternate;
}

/* 竖屏下 SVG 太阳被 slice 裁出画面，光晕不「无本体发光」：缩成柔和的角落氛围光并降低存在感 */
@media (orientation: portrait) {
  .lb-sun-glow {
    top: -70px;
    right: -70px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(255, 217, 78, .3) 0%, rgba(255, 217, 78, 0) 70%);
  }
}

@keyframes lb-sun-breath {
  from { transform: scale(.92); opacity: .75; }
  to { transform: scale(1.1); opacity: 1; }
}

/* 底部一排草叶：贴地轻摇，transform-origin 在根部，各株节奏错开 */
.lb-grass {
  left: 0;
  right: 0;
  bottom: -4px;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  line-height: 1;
}

.lb-grass span { font-size: 30px; transform-origin: bottom center; animation: lb-sway 3.4s ease-in-out infinite alternate; }
.lb-grass span:nth-child(1) { font-size: 26px; animation: lb-sway 3.2s ease-in-out infinite alternate; animation-delay: -.5s; }
.lb-grass span:nth-child(2) { font-size: 34px; animation: lb-sway 3.8s ease-in-out infinite alternate; animation-delay: -1.4s; }
.lb-grass span:nth-child(3) { font-size: 28px; animation: lb-sway 3.6s ease-in-out infinite alternate; animation-delay: -2.3s; }
.lb-grass span:nth-child(4) { font-size: 31px; animation: lb-sway 3.3s ease-in-out infinite alternate; animation-delay: -2.9s; }

@keyframes lb-sway {
  from { transform: rotate(-4deg); }
  to { transform: rotate(4deg); }
}

/* ---------- 云端接入：同步状态点 / 登录卡输入 ---------- */

/* 同步状态点：hidden（无） / pending（黄，呼吸） / error（红，含掉线） */
.sync-dot {
  position: fixed;
  top: 12px;
  right: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(107, 68, 35, .55);
  box-shadow: 0 2px 6px rgba(50, 80, 30, .35);
  z-index: 60;
  pointer-events: none;
}

.sync-dot-pending {
  background: var(--accent);
  animation: sync-breathe 1.1s ease-in-out infinite alternate;
}

.sync-dot-error { background: var(--bad); }

@keyframes sync-breathe {
  from { opacity: .35; transform: scale(.82); }
  to { opacity: 1; transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .sync-dot-pending { animation: none; }
}

/* 登录卡输入框（复用 glass 卡片风格） */
.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 17px;
  color: var(--ink);
  background: linear-gradient(180deg, var(--cream-hi), var(--cream));
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-xs);
  outline: none;
  text-align: center;
}

.auth-input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(245, 166, 35, .25); }

.auth-input::placeholder { color: var(--ink-faint); }

.auth-error {
  margin: 4px 0 8px;
  font-size: 13px;
  font-weight: bold;
  color: var(--bad);
  text-align: center;
}

/* ---------- 数学科目：口算表达式 / 答案显示 / 数字键盘 ---------- */
.math-expr {
  font-size: 44px;
  font-weight: 900;
  text-align: center;
  letter-spacing: .04em;
  margin: 18px 0 6px;
  font-variant-numeric: tabular-nums;
}
.math-expr .math-qmark { color: var(--accent-2); }

.math-display {
  min-height: 64px;
  margin: 12px auto 4px;
  max-width: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: var(--glass-bg-strong);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--highlight-top);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.math-display .math-placeholder { opacity: .3; }
.math-display.is-correct { border-color: var(--good); box-shadow: 0 0 0 3px var(--good-glow); }
.math-display.is-wrong { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-glow); }

.math-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 320px;
  margin: 14px auto 4px;
}
.math-key {
  height: 58px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--highlight-top), 0 4px 10px rgba(50, 80, 30, .18);
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  transition: transform .1s ease;
}
.math-key:active { transform: scale(.92); }
.math-key-fn { font-size: 22px; }
.math-key-ok {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  border-color: var(--accent-2);
}

/* ---------- 拼一拼手动选词 ---------- */
.pick-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pick-tool { padding: 7px 14px; font-size: 13.5px; }
.pick-count { margin-left: auto; font-size: 13px; font-weight: 800; color: rgba(var(--ink-rgb), .82); }
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 44vh; overflow: auto; margin-bottom: 14px; padding: 2px; }
.pick-word { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px 7px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .55); cursor: pointer; font-family: inherit; transition: transform .08s; }
.pick-word:active { transform: scale(.96); }
.pick-word.on { border-color: var(--accent); background: rgba(247, 183, 49, .28); box-shadow: 0 0 0 2px rgba(247, 183, 49, .3); }
.pw-check { position: absolute; top: 3px; right: 5px; font-size: 13px; }
.pw-emoji { font-size: 22px; }
.pw-word { font-weight: 900; font-size: 13.5px; color: var(--ink); }
.pw-cn { font-size: 10.5px; color: rgba(var(--ink-rgb), .75); line-height: 1.3; text-align: center; }
.pick-word.no-spell { opacity: .45; cursor: not-allowed; filter: grayscale(.5); }
.pick-word.no-spell .pw-word { text-decoration: line-through solid rgba(74, 48, 20, .35); }
.pw-split { position: absolute; top: 3px; left: 5px; font-size: 10px; font-weight: 800; background: rgba(74, 48, 20, .13); color: rgba(var(--ink-rgb), .85); border-radius: 8px; padding: 1px 5px; }

/* 拼写槽位两侧的固定段（如 hard- / -working） */
.spell-fixed { font-size: 24px; font-weight: 900; color: rgba(var(--ink-rgb), .5); letter-spacing: 1px; padding: 0 3px; align-self: center; }

/* 宽弹层（拼一拼选词） */
.modal-box-wide { max-width: 820px; }
.modal-box-wide .pick-grid { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 560px) {
  .modal-box-wide { max-width: 94vw; }
  .modal-box-wide .pick-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 挖空题：整词序列里固定不动的字符（含连字符） */
.spell-fixed-ch {
  min-width: 30px; height: 40px; margin: 0 1.5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; color: rgba(var(--ink-rgb), .48);
  background: rgba(255, 255, 255, .35); border-radius: 9px;
}

/* 句型题答错后的答案解析：放大醒目 */
.question-hint.hint-big {
  font-size: 19.5px;
  line-height: 1.65;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 229, 168, .62);
  border: 1.5px solid rgba(214, 122, 0, .25);
  border-radius: 14px;
  padding: 10px 16px;
  max-width: 96%;
}
