/* ===== TypeUp 全局样式 ===== */

/* --- 默认主题 --- */
:root {
  --bg-primary: #f5f6fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eef0f5;
  --bg-hover: #e8eaf0;
  --text-primary: #1a1a2e;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --accent: #4a6cf7;
  --accent-light: #6b8aff;
  --accent-bg: rgba(74, 108, 247, 0.08);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.12);
  --warning: #f59e0b;
  --border: #e5e7eb;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
  --font-mono: 'SF Mono', 'JetBrains Mono', 'Menlo', 'Consolas', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* --- 护眼绿主题 --- */
.theme-green {
  --bg-primary: #f0f7f0;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e8f5e9;
  --bg-hover: #dcecde;
  --text-primary: #1b3a1b;
  --text-secondary: #4a6741;
  --accent: #2e7d32;
  --accent-light: #4caf50;
  --accent-bg: rgba(46, 125, 50, 0.08);
  --border: #c8e6c9;
}

/* --- 深色模式 --- */
.theme-dark {
  --bg-primary: #1a1a2e;
  --bg-secondary: #232342;
  --bg-tertiary: #2a2a4a;
  --bg-hover: #33335a;
  --text-primary: #e4e4ef;
  --text-secondary: #a0a0c0;
  --text-muted: #707090;
  --accent: #6b8aff;
  --accent-light: #8aa0ff;
  --accent-bg: rgba(107, 138, 255, 0.12);
  --border: #3a3a5a;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
}

/* --- 暖黄主题 --- */
.theme-warm {
  --bg-primary: #fdf8f0;
  --bg-secondary: #fffcf5;
  --bg-tertiary: #f5ede0;
  --bg-hover: #efe5d4;
  --text-primary: #4a3c28;
  --text-secondary: #8a7355;
  --accent: #d4882a;
  --accent-light: #f0a040;
  --accent-bg: rgba(212, 136, 42, 0.10);
  --border: #e8dcc8;
}

/* --- 高对比主题 --- */
.theme-contrast {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #1a1a1a;
  --bg-hover: #2a2a2a;
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #888888;
  --accent: #00ddff;
  --accent-light: #44eeff;
  --accent-bg: rgba(0, 221, 255, 0.15);
  --success: #00ff44;
  --error: #ff3333;
  --border: #333333;
}

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  /* ★ 2026-09-29 微信/移动端适配（三行，原因写在下面）：
     · height:100dvh —— 微信内置浏览器里 `100vh` 指的是**大视口**（工具栏收起时的高度），
       工具栏一出现，页面底部就会被盖住一截（底栏按钮点不到）。dvh 跟随"当前可见高度"。
       ⚠️ 必须**写在 100vh 后面**当渐进增强：不支持 dvh 的内核(Chrome<108/Safari<15.4)仍用 100vh。
     · text-size-adjust —— 不加的话微信与 iOS 会**自动放大正文**，字号脱离设计值、换行与容器对不上。
       ⚠️ 这一条影响全站每一页，是"微信里看起来错乱"最常见的隐形根因之一。 */
  height: 100dvh;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  transition: background var(--transition), color var(--transition);
}

/* ===== 自定义标题栏拖拽区（仅 Electron 显示） ===== */
.titlebar-drag {
  display: none;  /* Web 端默认隐藏 */
}
body.is-electron .titlebar-drag {
  display: block;
  -webkit-app-region: drag;
  height: 38px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
}

/* ===== App 容器 ===== */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;      /* 同 body：微信工具栏出现时不再把底部推出屏幕 */
  padding-top: 0;  /* Web 端不留 titlebar 空间 */
  overflow: hidden;
}
/* 仅 Electron 端为隐藏标题栏留 38px */
body.is-electron #app {
  padding-top: 38px;
}

/* ===== 顶部导航栏 ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.navbar-logo .logo-icon {
  font-size: 24px;
}
.navbar-logo img {
  border-radius: 6px;
}

.navbar-score {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--accent-bg);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  /* economy.js 的 "+N ⭐" 飘字挂在这颗胶囊上（absolute 锚点） */
  position: relative;
}

/* ---- 星星能量 +N 飘字（js/economy.js）----
   结算时从胶囊上方浮起淡出，视线不用离开右上角。
   ⚠️ 只留最新一条（同一个 left/top 堆叠会糊成一团，见 economy.js 的 pop()）。 */
.nsc-pop {
  position: absolute;
  left: 50%;
  top: -4px;
  font-size: 13px;
  font-weight: 800;
  color: #F59E0B;
  text-shadow: 0 1px 0 #fff, 0 0 10px rgba(245, 158, 11, .55);
  pointer-events: none;
  animation: nscPop 1.4s cubic-bezier(.22, 1, .36, 1) forwards;
}
@keyframes nscPop {
  0%   { opacity: 0; transform: translate(-50%, 8px) scale(.7); }
  22%  { opacity: 1; transform: translate(-50%, -4px) scale(1.14); }
  45%  { transform: translate(-50%, -10px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -26px) scale(1); }
}
@keyframes nscFade {
  0%   { opacity: 0; transform: translate(-50%, 0); }
  25%  { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .nsc-pop { animation: nscFade 1.4s linear forwards; }
}

.navbar-nav {
  display: flex;
  gap: 4px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-btn.active { background: var(--accent-bg); color: var(--accent); }

/* ===== 主内容区 ===== */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ===== 页面切换 ===== */
.page { display: none; }
.page.active { display: block; }

/* 登录页：左右分栏全屏布局 */
#page-login.active {
  display: flex;
  flex: 1;
  overflow-y: auto;   /* 移动端（微信内置浏览器）内容超高时可滚动，登录卡不再被截断 */
}
/* 忘记密码页面：与登录页一致的全屏 flex 布局 */
#page-forgot-password.active {
  display: flex;
  flex: 1;
  overflow-y: auto;
}

/* 忘记密码页面布局 */
.forgot-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  padding: 20px;
  background: linear-gradient(135deg, #e8eaf0 0%, #f5f6fa 50%, #eef0f5 100%);
}
.forgot-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(30,36,64,.10), 0 2px 6px rgba(30,36,64,.05);
  padding: 32px 34px 26px;
}
.forgot-head {
  text-align: center;
  margin-bottom: 22px;
}
.forgot-head h2 {
  font-size: 22px;
  font-weight: 900;
  color: #1E293B;
  margin: 0;
}
.forgot-head p {
  font-size: 13px;
  color: #64748B;
  margin: 6px 0 0;
}
.forgot-form {
  width: 100%;
}
.forgot-form .login-field {
  margin-bottom: 14px;
}
.forgot-form .login-btn {
  width: 100%;
}
.forgot-form .login-extra {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}
.forgot-footer {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 11.5px;
  color: #8D93AC;
}
.forgot-footer a {
  color: #8D93AC;
  text-decoration: none;
}
.forgot-footer a:hover {
  color: #3D6FF5;
}
.forgot-footer .police-icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 2px;
}

/* ===== 首页 ===== */
.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: var(--radius);
  color: white;
  margin-bottom: 24px;
}

.home-hero-left h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.home-hero-left p {
  font-size: 15px;
  opacity: 0.9;
  margin-bottom: 20px;
}

.home-hero-stats {
  display: flex;
  gap: 32px;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 24px;
  font-weight: 700;
}

.hero-stat-label {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 2px;
}

.btn-continue {
  padding: 14px 32px;
  background: white;
  color: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-continue:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* 阶段网格 */
.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stage-card {
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.stage-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.stage-card.locked { opacity: 0.5; cursor: not-allowed; }
.stage-card.locked:hover { border-color: var(--border); box-shadow: none; }
.stage-card.current { border-color: var(--accent); background: var(--accent-bg); }

.stage-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stage-card-title {
  font-size: 16px;
  font-weight: 600;
}

.stage-card-badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 500;
}

.stage-card-badge.locked { background: var(--bg-tertiary); color: var(--text-muted); }
.stage-card-badge.completed { background: var(--success-bg); color: var(--success); }

.stage-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.stage-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.stage-card-progress {
  margin-top: 8px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.stage-card-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* 快捷入口 */
.quick-entry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.quick-card {
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 16px;
}

.quick-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }

.quick-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.quick-card-info h3 { font-size: 15px; margin-bottom: 4px; }
.quick-card-info p { font-size: 13px; color: var(--text-secondary); }

/* ===== 阶段选择页 ===== */
.level-select-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.btn-back {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-primary);
  font-size: 14px;
  transition: all var(--transition);
}

.btn-back:hover { background: var(--bg-hover); }

.stage-info-block {
  flex: 1;
}

.stage-info-block h2 { font-size: 22px; margin-bottom: 4px; }
.stage-info-block p { font-size: 14px; color: var(--text-secondary); }

.level-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.level-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.level-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.level-item.locked { opacity: 0.5; cursor: not-allowed; }
.level-item.locked:hover { border-color: var(--border); box-shadow: none; }
.level-item.completed { border-left: 3px solid var(--success); }

.level-item-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.level-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.level-number.completed { background: var(--success-bg); color: var(--success); }
.level-number.locked { background: var(--bg-tertiary); color: var(--text-muted); }

.level-info h3 { font-size: 15px; margin-bottom: 2px; }
.level-info p { font-size: 13px; color: var(--text-secondary); }

.level-item-right {
  text-align: right;
}

.level-score { font-size: 14px; font-weight: 600; color: var(--accent); }
.level-status { font-size: 12px; color: var(--text-muted); }

/* ===== 练习页面 ===== */
.practice-layout {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 98px);
  min-height: 0;
  gap: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  flex: 0 0 auto;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px 12px;
  text-align: center;
}

.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin: 0 0 2px; }
.stat-card .stat-value { font-size: 30px; }
.stat-card .stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.keyboard-area {
  display: flex;
  gap: 12px;
  flex: 0 0 auto;
  align-items: stretch;
}

.keyboard-area .virtual-keyboard { flex: 1; min-width: 0; }

/* ===== 练习文本区：基础结构（让它吃剩余空间，不锁高度，不抢键盘） ===== */
.practice-text-area {
  flex: 0 0 auto;
  max-height: 160px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  position: relative;
}
/* 场景装饰层（固定在背景，不参与滚动） */
.practice-scene-decor { position:absolute; inset:0; pointer-events:none; overflow:hidden; z-index:0; }
/* 顶部任务栏：现在只放进度胶囊，压缩到极致 */
.practice-stage-taskbar { position:relative; z-index:1; margin-bottom: 0; flex-shrink:0; min-height:0; }
.practice-text-display {
  position:relative; z-index:1;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 4px 2px;
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  flex-wrap:wrap;
  align-content:flex-start;
}
.practice-stage-progress-decor { position:relative; z-index:1; margin-top:0 !important; min-height:0 !important; flex-shrink:0; padding:0 !important; height:0 !important; display:none !important; }

.practice-text-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px; position:relative; z-index:2;
  min-height: 0;
}
.practice-level-label { font-size: 18px; font-weight: 600; color: var(--text-secondary); line-height: 1.2; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.practice-timer { font-size: 16px; font-weight: 600; color: var(--accent); font-family: var(--font-mono); }

/* 字符状态通用 + ★ 空格显示可见符 */
.char-correct { color: var(--success); }
.char-incorrect { color: var(--error); background: var(--error-bg); border-radius: 2px; }
.char-pending { color: var(--text-muted); }
.char-current { color: var(--text-primary); border-bottom: 3px solid var(--accent); animation: blink 1s infinite; }
/* 空格可见符：打空格键时显示 ␣，颜色稍淡，提示用户这是需要按的键 */
.space-visible { color: var(--text-muted); opacity: 0.55; font-size: 0.8em; padding: 0 2px; }
.word-space { display: inline; }
@keyframes blink { 0%, 50% { opacity:1; } 51%, 100% { opacity:0.55; } }

/* ============ 通用一行式任务栏：现在只有进度胶囊，不再重复标题 ============ */
.taskbar-row {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.taskbar-row .tb-title { display:none; }
.taskbar-row .tb-right { display:flex; align-items:center; gap:10px; flex-shrink: 0; }
.taskbar-row .tb-extra { display:flex; align-items:center; gap:2px; font-size: 14px; }
.taskbar-row .tb-progress {
  position:relative;
  width: 300px;
  min-width: 200px;
  height: 25px;
  border-radius: 7px;
  overflow:hidden;
  background: #f1f5f9;
}
.taskbar-row .tb-progress-fill { position:absolute; inset:0 auto 0 0; background:linear-gradient(90deg, #60a5fa, #f472b6, #fbbf24); transition:width 0.35s ease; }
.taskbar-row .tb-progress-text { position:relative; text-align:center; line-height:20px; font-size:16px; font-weight:700; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,0.25); }
.taskbar-row .tb-hero { position:relative; font-size: 16px; margin-right: 2px; }
.taskbar-row .tb-hero-item { position:absolute; top:-5px; right:-5px; font-size: 10px; }
/* 各阶段主题色（只改进度胶囊和extra）*/
/* 阶段1进度胶囊科技霓虹风 */
.content-stage-cute .taskbar-row.tb-cute { background: transparent !important; }
.content-stage-cute .taskbar-row.tb-cute .tb-progress {
  background: rgba(15,23,42,0.85) !important;
  border: 1px solid rgba(148,163,184,0.25) !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.45) !important;
}
.content-stage-cute .taskbar-row.tb-cute .tb-progress-fill {
  background: linear-gradient(90deg, #f472b6, #a78bfa, #22d3ee) !important;
  box-shadow: 0 0 12px rgba(244,114,182,0.55), 0 0 18px rgba(34,211,238,0.4) !important;
}
.content-stage-cute .taskbar-row.tb-cute .tb-progress-text {
  color: #f0abfc !important;
  text-shadow: 0 0 4px rgba(240,171,252,0.5);
}
.content-stage-cute .taskbar-row.tb-cute .tb-hero {
  filter: drop-shadow(0 0 4px rgba(244,114,182,0.35)) !important;
}
.taskbar-row.tb-doodle .tb-progress { background:#ffedd5; }
.taskbar-row.tb-doodle .tb-progress-fill { background:linear-gradient(90deg,#fb923c,#facc15); }
.taskbar-row.tb-school .tb-progress { background:#e2e8f0; }
.taskbar-row.tb-school .tb-progress-fill { background:linear-gradient(90deg,#fb923c,#f97316); }
.taskbar-row.tb-tech   .tb-progress { background:#1e293b; border:1px solid #334155; }
.taskbar-row.tb-tech   .tb-progress-fill { background:linear-gradient(90deg,#4ade80,#22d3ee); box-shadow:0 0 6px rgba(74,222,128,0.7); }
.taskbar-row.tb-pro    .tb-progress { background:#0f172a; border:1px solid #1f2937; }
.taskbar-row.tb-pro    .tb-progress-text { font-family:var(--font-mono); }
.taskbar-row.tb-pro    .tb-progress-fill { background:linear-gradient(90deg,#6366f1,#06b6d4); }

/* ============ 阶段1：流式句子（去卡片）============ */
/* 背景场景依旧保留（天空草地）但装饰压低高度避免浪费 */
.content-stage-cute .scene-sky { height: 36%; opacity:0.5; }        /* 从50%压到36% */
.content-stage-cute .scene-mountains { bottom: 28%; font-size:24px; letter-spacing:30px; }   /* 之前是bottom:36%+30px，现在整体靠下移点+小一点 */
.content-stage-cute .scene-fence { bottom: 18%; font-size:14px; letter-spacing:6px; }
.content-stage-cute .scene-grass { font-size:12px; letter-spacing:4px; opacity:0.6; padding-bottom:2px; }
.content-stage-cute .s1-sun { font-size: 30px; top: 8px; right: 14px; }
.content-stage-cute .s1-cloud { font-size: 20px; }

/* 流式句子行：句子与句子之间保留空格，不加卡片 */
.stage1-sentence-flow {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 30px;
  line-height: 1.65;
  padding: 4px 6px;
  color: #0f172a;
  text-align: left;
}
.page-practice.content-stage-cute .s1-word-chunk {
  background: rgba(30,41,59,0.6);
  border: 1px solid rgba(148,163,184,0.22);
  border-radius: 10px;
  padding: 6px 14px;
  color: #e2e8f0;
}
.page-practice.content-stage-cute .s1-word-chunk .wc-item { color: #94a3b8; }
.page-practice.content-stage-cute .s1-word-chunk .wc-item.got { color: #67e8f9; text-shadow: 0 0 6px rgba(103,232,249,0.45); }
.page-practice.content-stage-cute .s1-word-chunk.active {
  background: rgba(244,114,182,0.14);
  border-color: #f472b6;
  box-shadow: 0 0 0 2px rgba(244,114,182,0.25), 0 0 18px rgba(244,114,182,0.55);
  color: #fce7f3;
  animation: word-neon 1.2s ease infinite;
  transform: scale(1.04);
}
@keyframes word-neon {
  0%, 100% { box-shadow: 0 0 0 2px rgba(244,114,182,0.25), 0 0 18px rgba(244,114,182,0.55); }
  50% { box-shadow: 0 0 0 2px rgba(244,114,182,0.4), 0 0 26px rgba(244,114,182,0.85); }
}
.page-practice.content-stage-cute .s1-word-chunk.done {
  background: rgba(34,211,238,0.1);
  border-color: rgba(34,211,238,0.55);
  color: #67e8f9;
  box-shadow: 0 0 10px rgba(34,211,238,0.3);
}

/* 阶段1进度胶囊科技风 */
.page-practice.content-stage-cute .task-capsule,
.page-practice.content-stage-cute .task-track,
.page-practice.content-stage-cute .capsule-track {
  background: rgba(15,23,42,0.8) !important;
  border: 1px solid rgba(148,163,184,0.25) !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.45) !important;
}
.page-practice.content-stage-cute .task-fill,
.page-practice.content-stage-cute .capsule-fill {
  background: linear-gradient(90deg, #f472b6, #a78bfa, #22d3ee) !important;
  box-shadow: 0 0 12px rgba(244,114,182,0.55), 0 0 18px rgba(34,211,238,0.4) !important;
}
.page-practice.content-stage-cute .task-emoji,
.page-practice.content-stage-cute .capsule-emoji {
  filter: drop-shadow(0 0 4px rgba(244,114,182,0.4)) !important;
}

/* 阶段1：萌趣具象风（cute）===== */

/* ============ 阶段2：手账涂鸦内容区（流式） ============ */
.content-stage-doodle, .content-stage-school {
  background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
  border: 1px solid rgba(147,51,234,0.4);
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(244,114,182,0.18), 0 0 24px rgba(244,114,182,0.15), 0 8px 28px rgba(0,0,0,0.35);
  position: relative; overflow: visible;
}
.scene-doodle-corner { position:absolute; font-size:20px; opacity:0.45; filter: drop-shadow(0 0 6px rgba(167,139,250,0.6)); }
.scene-doodle-corner.tl { top:8px; left:10px; transform:rotate(-12deg); }
.scene-doodle-corner.tr { top:10px; right:12px; transform:rotate(15deg); }
.scene-doodle-corner.bl { bottom:10px; left:14px; transform:rotate(8deg); }
.scene-doodle-corner.br { bottom:14px; right:10px; transform:rotate(-20deg); }

/* 阶段2/3 流式句子：科技霓虹风 */
.stage2-sentence-flow {
  width: 100%;
  font-family: 'Consolas','JetBrains Mono',monospace;
  font-size: 28px; font-weight: 600; color: #e2e8f0;
  line-height: 1.7;
  padding: 6px 8px;
  text-align: left;
  text-shadow: 0 0 8px rgba(167,139,250,0.35);
}
.s2-word-chunk {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 6px;
  margin-bottom: 2px;
  transition: all 0.18s ease;
  color: #94a3b8;
}
.s2-word-chunk.active {
  background: rgba(244,114,182,0.18);
  box-shadow: 0 0 0 1.5px rgba(244,114,182,0.7), 0 0 14px rgba(244,114,182,0.45);
  color: #fbcfe8;
  transform: scale(1.03); z-index: 2;
  text-shadow: 0 0 8px rgba(244,114,182,0.6);
}
.s2-word-chunk.done   { background: rgba(34,211,238,0.12); color: #67e8f9; text-shadow: 0 0 6px rgba(103,232,249,0.45); }
.s2-word-chunk .wc-sticker { font-size: 13px; transform: translateY(-4px) rotate(-10deg); margin-right: 1px; }

/* 阶段2 每个已正确输入的字母（含空格）上方显示一根骨头 */
.stage2-sentence-flow .char-pending,
.stage2-sentence-flow .char-correct,
.stage2-sentence-flow .char-incorrect { position: relative; }
.stage2-sentence-flow .char-correct::before {
  content: '🦴';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62em;
  line-height: 1;
  white-space: nowrap;
  filter: drop-shadow(0 0 5px rgba(251,191,36,0.75)) drop-shadow(0 0 10px rgba(244,114,182,0.35));
  pointer-events: none;
}
/* 空格字符：保持词间距，可视符号居中 */
.stage2-sentence-flow .space-char { display: inline-block; margin: 0 3px; }
.stage2-sentence-flow .space-char .space-visible { display: inline-block; }

/* 阶段2 小狗跟随：与字母同高，随输入从左跑到右 */
.s2-dog {
  position: absolute;
  left: 0; top: 0;
  font-size: 28px;
  line-height: 1;
  z-index: 5;
  transform: translate(0, 0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter:
    drop-shadow(0 0 8px rgba(244,114,182,0.65))
    drop-shadow(0 0 14px rgba(34,211,238,0.4))
    drop-shadow(0 2px 3px rgba(0,0,0,0.45));
  pointer-events: none;
  user-select: none;
}

/* ============ 阶段3：校园活力内容区（复用阶段2手账涂鸦风样式，仅词前不显示贴纸图标） ============ */

/* ============ 阶段4：内容区样式与阶段5保持一致 ============ */
.content-stage-minimal .scene-arena-grid, .content-stage-tech .scene-arena-grid, .content-stage-pro .scene-arena-grid { background-size:24px 24px; }
.content-stage-minimal .scene-arena-label, .content-stage-tech .scene-arena-label, .content-stage-pro .scene-arena-label { top:8px; left:10px; font-size:9px; }
.content-stage-minimal .scene-arena-glow, .content-stage-tech .scene-arena-glow, .content-stage-pro .scene-arena-glow { width:180px; height:180px; filter:blur(60px); }
.content-stage-minimal .scene-arena-glow.tl, .content-stage-tech .scene-arena-glow.tl, .content-stage-pro .scene-arena-glow.tl { top:-60px; left:-60px; }
.content-stage-minimal .scene-arena-glow.br, .content-stage-tech .scene-arena-glow.br, .content-stage-pro .scene-arena-glow.br { bottom:-60px; right:-60px; }
.stage5-arena-wrap { width:100%; padding:8px 12px; font-family:'Consolas','JetBrains Mono',monospace; font-size:30px; line-height:1.8; letter-spacing:1.1px; color:#e2e8f0; text-align:left; }

/* ============ 阶段6：内容区样式与阶段5保持一致 ============ */
.content-stage-pro { background:var(--bg-secondary); border:1px solid var(--border); }
.stage6-editor-wrap { width:100%; padding:8px 12px; font-family:'Consolas','JetBrains Mono',monospace; font-size:30px; line-height:1.8; letter-spacing:1.1px; color:#e2e8f0; text-align:left; }

/* 实时统计栏（压缩高度，给键盘腾空间） */
.stats-bar {
  display: flex;
  gap: 20px;
  padding: 10px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex: 0 0 auto;         /* 不参与flex空间分配，自身高度固定 */
  min-height: 0;
}

.stat-item { text-align: center; flex: 1; }
.stat-value { font-size: 20px; font-weight: 700; font-family: var(--font-mono); line-height: 1.1; }
.stat-value.wpm { color: var(--accent); }
.stat-value.accuracy { color: var(--success); }
.stat-value.combo { color: var(--warning); }
.stat-value.time { color: var(--text-secondary); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* 虚拟键盘：高度提高 40px，让按键和图例有更充分的显示空间 */
.virtual-keyboard {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  flex: 0 0 auto;
  min-height: 200px;
  overflow: visible;
  display: flex;
  flex-direction: column;
}
.virtual-keyboard.stage-cute   { --kb-u: 42px; --kb-gap: 6px; min-height: 260px; padding: 14px; }
.virtual-keyboard.stage-doodle  { --kb-u: 40px; --kb-gap: 4px; min-height: 220px; }
.virtual-keyboard.stage-school  { --kb-u: 40px; --kb-gap: 5px; min-height: 220px; }
.virtual-keyboard.stage-minimal { --kb-u: 40px; --kb-gap: 5px; min-height: 200px; }
.virtual-keyboard.stage-tech    { --kb-u: 40px; --kb-gap: 5px; min-height: 200px; }
.virtual-keyboard.stage-pro     { --kb-u: 40px; --kb-gap: 5px; min-height: 200px; }

/* ===== 模拟手型指法引导层 ===== */
.hands-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 6;
}
.hands-overlay {
  filter: drop-shadow(0 3px 8px rgba(30,41,59,0.22));
}
/* 掌与手指的填色由 app.js 生成时【内联】给出（半透明皮肤渐变 #skinveil，
   随手的包围盒垂直渐变：指尖最淡、掌根略深）。这里只留一个兜底色，
   防止某一笔漏掉内联 fill 时整块不渲染 ——
   ⚠️ 原来这里写的是 `fill: url(#handGrad)`，而 #handGrad 在本工程里【从未定义】。
   SVG 里引用一个不存在的 paint server 会让整个元素不渲染（且不报错），
   只是因为内联样式总是赢才没爆出来 —— 一个随时会踩的哑弹。 */
.hands-overlay .hand-palm {
  fill: rgba(233,169,127,.22);
  stroke: rgba(100,116,139,0.5);
  stroke-width: 1.2;
}
.hands-overlay .hand-finger {
  fill: rgba(233,169,127,.22);
  stroke: rgba(100,116,139,0.55);
  stroke-width: 1.2;
  transition: fill 0.15s ease, stroke 0.15s ease, filter 0.15s ease;
}
.hands-overlay .hand-nail {
  fill: rgba(255,255,255,0.4);
  pointer-events: none;
}
/* 各阶段手型风格：低阶（1-3）明显醒目，高阶（4-6）半透明科技感 */
.virtual-keyboard.stage-cute .hands-overlay,
.virtual-keyboard.stage-doodle .hands-overlay { opacity: 0.95; }
.virtual-keyboard.stage-school .hands-overlay { opacity: 0.8; }
.virtual-keyboard.stage-minimal .hands-overlay,
.virtual-keyboard.stage-tech .hands-overlay,
.virtual-keyboard.stage-pro .hands-overlay { opacity: 0.55; }
.keyboard-row {
  display: flex;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  gap: var(--kb-gap, 5px);
  margin-bottom: var(--kb-gap, 5px);
  flex: 0 0 auto;
  min-height: 0;
}
.keyboard-row:last-child { margin-bottom: 0; }

.keyboard-key {
  width: var(--kb-u, 40px);
  height: var(--kb-u, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  transition: all 0.1s ease;
  box-sizing: border-box;
}

/* 真实 US 键盘单位宽度（N × 标准键宽 + 吃掉 1 个 gap，让后续键起点对齐） */
.keyboard-key.tab       { width: calc(var(--kb-u, 40px) * 1.50 + var(--kb-gap, 5px)); }
.keyboard-key.caps      { width: calc(var(--kb-u, 40px) * 1.75 + var(--kb-gap, 5px)); }
.keyboard-key.shift     { width: calc(var(--kb-u, 40px) * 2.25 + var(--kb-gap, 5px)); }
.keyboard-key.return    { width: calc(var(--kb-u, 40px) * 2.25 + var(--kb-gap, 5px)); }
.keyboard-key.backspace { width: calc(var(--kb-u, 40px) * 2.00 + var(--kb-gap, 5px)); }
.keyboard-key.side      { width: calc(var(--kb-u, 40px) * 1.25 + var(--kb-gap, 5px) * 0.5); font-size: 11px; }
.keyboard-key.space-key { width: calc(var(--kb-u, 40px) * 6.00 + var(--kb-gap, 5px) * 2); letter-spacing: 2px; }

/* 旧类名别名（兼容残留引用） */
.keyboard-key.wide       { width: calc(var(--kb-u, 40px) * 1.50 + var(--kb-gap, 5px)); }
.keyboard-key.extra-wide { width: calc(var(--kb-u, 40px) * 6.00 + var(--kb-gap, 5px) * 2); }
.keyboard-key.side-key   { width: calc(var(--kb-u, 40px) * 1.25 + var(--kb-gap, 5px) * 0.5); font-size: 11px; }

.keyboard-key.active {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--accent-bg);
}

.keyboard-key.pressed {
  background: var(--accent);
  color: white;
  transform: translateY(1px);
}

.keyboard-key.next-key {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-bg); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

/* ===== 6阶段键盘主题样式 ===== */
/* 通用键子元素 */
.keyboard-key .kb-main { display: block; font-size: 15px; font-weight: 700; }
.keyboard-key .kb-ip { display: block; font-size: 11px; line-height: 1; margin-top: 2px; opacity: 0.85; }
.keyboard-key .kb-ip-outline { display: block; font-size: 11px; line-height: 1; margin-top: 2px; opacity: 0.45; filter: grayscale(0.3); }
.keyboard-key .kb-finger-dot { position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; }
.keyboard-key { position: relative; }
.keyboard-key.fj-mark::after { content: ''; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%); width: 10px; height: 2px; background: var(--text-muted); border-radius: 1px; }

/* 手指颜色背景映射 */
.finger-bg-lp { background: #e0f2fe; }
.finger-bg-lr { background: #dcfce7; }
.finger-bg-lm { background: #ffedd5; }
.finger-bg-li { background: #dbeafe; }
.finger-bg-ri { background: #fce7f3; }
.finger-bg-rm { background: #f3e8ff; }
.finger-bg-rr { background: #fef3c7; }
.finger-bg-rp { background: #ffe4e6; }

/* ===== 阶段1 输入区：儿童科技霓虹风 ===== */
.page-practice.content-stage-cute .practice-text-area {
  background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
  border: 1px solid rgba(147,51,234,0.4);
  border-radius: 18px;
  padding: 14px 20px;
  box-shadow:
    0 0 0 1px rgba(244,114,182,0.18),
    0 0 24px rgba(244,114,182,0.15),
    0 8px 28px rgba(0,0,0,0.35);
  position: relative;
  overflow: visible;
}
.page-practice.content-stage-cute .practice-text-area::before {
  content: '';
  position: absolute; left: 0; top: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #f472b6, #a78bfa, #22d3ee, #a78bfa, #f472b6);
  border-radius: 18px 18px 0 0;
}
.page-practice.content-stage-cute .practice-level-label {
  color: #f0abfc;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(240,171,252,0.55);
}
.page-practice.content-stage-cute .practice-stage-taskbar {
  margin: 6px 0 10px;
}
.page-practice.content-stage-cute .practice-text-header {
  margin-bottom: 4px;
}
/* ===== 阶段1：萌趣具象风（cute）===== */
.virtual-keyboard.stage-cute {
  --kb-u: 42px; --kb-gap: 6px;
  --neon-pink: #f472b6;
  --neon-cyan: #22d3ee;
  --neon-purple: #a78bfa;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 20px;
  padding: 16px 20px;
  /* 两侧霓虹电路装饰 */
  box-shadow:
    0 0 0 1px rgba(244,114,182,0.12),
    0 0 0 1px rgba(34,211,238,0.08),
    0 10px 40px rgba(0,0,0,0.45);
}
/* 左侧霓虹电路装饰条 */
.virtual-keyboard.stage-cute::before {
  content: '';
  position: absolute;
  left: -28px; top: 24px; bottom: 24px;
  width: 22px;
  background:
    linear-gradient(90deg, transparent, var(--neon-pink) 30%, var(--neon-purple) 60%, var(--neon-cyan) 85%, transparent);
  border-radius: 12px;
  filter: blur(1px);
  opacity: 0.85;
}
/* 右侧霓虹电路装饰条 */
.virtual-keyboard.stage-cute::after {
  content: '';
  position: absolute;
  right: -28px; top: 24px; bottom: 24px;
  width: 22px;
  background:
    linear-gradient(90deg, transparent, var(--neon-cyan) 30%, var(--neon-purple) 60%, var(--neon-pink) 85%, transparent);
  border-radius: 12px;
  filter: blur(1px);
  opacity: 0.85;
}
.virtual-keyboard.stage-cute .keyboard-row { gap: 6px; margin-bottom: 6px; }
.virtual-keyboard.stage-cute .keyboard-key {
  height: var(--kb-u);
  border: 1.5px solid #1e293b;
  border-radius: 8px;
  /* 深色玻璃态按键 */
  background: linear-gradient(180deg, rgba(71,85,105,0.95) 0%, rgba(30,41,59,0.98) 100%);
  box-shadow:
    0 2px 0 rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -2px 4px rgba(0,0,0,0.35);
  font-size: 14px; color: #e2e8f0;
  font-weight: 600;
  transition: all 0.12s ease;
  flex-direction: column;
  padding: 2px 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.virtual-keyboard.stage-cute .keyboard-key .kb-main { font-size: 13px; }
.virtual-keyboard.stage-cute .keyboard-key .kb-ip { font-size: 10px; opacity: 0.65; }

/* 空格键：青色科技感发光 */
.virtual-keyboard.stage-cute .keyboard-key.space-key {
  background: linear-gradient(180deg, #0891b2 0%, #0e7490 100%);
  border-color: #06b6d4;
  color: #ecfeff;
  text-shadow: 0 0 8px rgba(34,211,238,0.6);
  box-shadow:
    0 0 16px rgba(34,211,238,0.35),
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -2px 4px rgba(0,0,0,0.3);
}

/* next-key：粉色霓虹光圈脉冲 */
.virtual-keyboard.stage-cute .keyboard-key.next-key {
  border-color: var(--neon-pink);
  background: linear-gradient(180deg, #fce7f3 0%, #fbcfe8 100%);
  color: #9d174d;
  text-shadow: none;
  animation: neon-pulse 1.2s ease infinite;
  z-index: 3;
}
@keyframes neon-pulse {
  0%, 100% {
    transform: scale(1.06);
    box-shadow:
      0 0 0 0 rgba(244,114,182,0.55),
      0 0 22px rgba(244,114,182,0.75),
      0 2px 0 rgba(0,0,0,0.2);
  }
  50% {
    transform: scale(1.12);
    box-shadow:
      0 0 0 10px rgba(244,114,182,0),
      0 0 32px rgba(244,114,182,0.95),
      0 2px 0 rgba(0,0,0,0.2);
  }
}

.virtual-keyboard.stage-cute .keyboard-key.finger-highlight {
  box-shadow: 0 0 0 2px var(--finger-color, #f472b6), 0 0 14px rgba(244,114,182,0.4);
}

/* 按压反馈：暗下去 + 微下沉 */
.virtual-keyboard.stage-cute .keyboard-key.pressed {
  transform: translateY(2px) scale(0.95);
  background: linear-gradient(180deg, #334155, #1e293b);
  filter: brightness(1.35);
  box-shadow: 0 0 12px rgba(255,255,255,0.35), inset 0 2px 4px rgba(0,0,0,0.5);
}

/* 指法图例 */
.virtual-keyboard.stage-cute .finger-legend {
  display: flex; justify-content: center; gap: 12px; margin-top: 14px; flex-wrap: wrap;
  padding-top: 12px; border-top: 1px solid rgba(148,163,184,0.18);
}
.virtual-keyboard.stage-cute .finger-legend-group {
  display: flex; align-items: center; gap: 6px;
}
.virtual-keyboard.stage-cute .legend-hand {
  font-size: 12px; font-weight: 600; color: #94a3b8; margin-right: 4px;
}
.virtual-keyboard.stage-cute .legend-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 12px; font-size: 11px; color: #cbd5e1;
  background: rgba(30,41,59,0.7);
  border: 1px solid rgba(148,163,184,0.2); font-weight: 500;
}
.virtual-keyboard.stage-cute .legend-dot {
  width: 8px; height: 8px; border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

/* ===== 阶段2：手账涂鸦风 → 儿童科技霓虹风（doodle / 粉色脉冲） ===== */
.virtual-keyboard.stage-doodle {
  --neon-pink: #f472b6;
  --neon-cyan: #22d3ee;
  --neon-purple: #a78bfa;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 20px;
  padding: 16px 20px;
  box-shadow: 0 0 0 1px rgba(244,114,182,0.12), 0 0 0 1px rgba(34,211,238,0.08), 0 10px 40px rgba(0,0,0,0.45);
}
.virtual-keyboard.stage-doodle .keyboard-row { gap: 6px; margin-bottom: 6px; }
.virtual-keyboard.stage-doodle .keyboard-key {
  height: var(--kb-u);
  border: 1.5px solid #1e293b;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(71,85,105,0.95) 0%, rgba(30,41,59,0.98) 100%);
  box-shadow: 0 2px 0 rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -2px 4px rgba(0,0,0,0.35);
  font-size: 14px; color: #e2e8f0;
  font-weight: 600;
  transition: all 0.12s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.virtual-keyboard.stage-doodle .keyboard-key.next-key {
  border-color: var(--neon-pink);
  background: linear-gradient(180deg, #fce7f3 0%, #fbcfe8 100%);
  color: #9d174d;
  text-shadow: none;
  animation: doodle-neon-pulse 1.2s ease infinite;
  z-index: 3;
}
@keyframes doodle-neon-pulse {
  0%, 100% { transform: scale(1.06); box-shadow: 0 0 0 0 rgba(244,114,182,0.55), 0 0 22px rgba(244,114,182,0.75), 0 2px 0 rgba(0,0,0,0.2); }
  50% { transform: scale(1.12); box-shadow: 0 0 0 10px rgba(244,114,182,0), 0 0 32px rgba(244,114,182,0.95), 0 2px 0 rgba(0,0,0,0.2); }
}
.virtual-keyboard.stage-doodle .keyboard-key.finger-highlight {
  box-shadow: 0 0 0 2px var(--finger-color, #f472b6), 0 0 14px rgba(244,114,182,0.4);
}
.virtual-keyboard.stage-doodle .keyboard-key.pressed {
  transform: translateY(2px) scale(0.95);
  background: linear-gradient(180deg, #334155, #1e293b);
  filter: brightness(1.35);
  box-shadow: 0 0 12px rgba(255,255,255,0.35), inset 0 2px 4px rgba(0,0,0,0.5);
}

/* ===== 阶段3：校园活力风 → 儿童科技霓虹风（school / 青色脉冲） ===== */
.virtual-keyboard.stage-school {
  --neon-pink: #f472b6;
  --neon-cyan: #22d3ee;
  --neon-purple: #a78bfa;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 20px;
  padding: 16px 20px;
  box-shadow: 0 0 0 1px rgba(34,211,238,0.12), 0 0 0 1px rgba(167,139,250,0.08), 0 10px 40px rgba(0,0,0,0.45);
}
.virtual-keyboard.stage-school .keyboard-row { gap: 6px; margin-bottom: 6px; }
.virtual-keyboard.stage-school .keyboard-key {
  height: var(--kb-u);
  border: 1.5px solid #1e293b;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(71,85,105,0.95) 0%, rgba(30,41,59,0.98) 100%);
  box-shadow: 0 2px 0 rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -2px 4px rgba(0,0,0,0.35);
  font-size: 14px; color: #e2e8f0;
  font-weight: 600;
  transition: all 0.1s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.virtual-keyboard.stage-school .keyboard-key.next-key {
  border-color: var(--neon-cyan);
  background: linear-gradient(180deg, #cffafe 0%, #a5f3fc 100%);
  color: #155e75;
  text-shadow: none;
  animation: school-neon-pulse 1.2s ease infinite;
  z-index: 3;
}
@keyframes school-neon-pulse {
  0%, 100% { transform: scale(1.06); box-shadow: 0 0 0 0 rgba(34,211,238,0.55), 0 0 22px rgba(34,211,238,0.75), 0 2px 0 rgba(0,0,0,0.2); }
  50% { transform: scale(1.12); box-shadow: 0 0 0 10px rgba(34,211,238,0), 0 0 32px rgba(34,211,238,0.95), 0 2px 0 rgba(0,0,0,0.2); }
}
.virtual-keyboard.stage-school .keyboard-key.finger-highlight {
  box-shadow: 0 0 0 2px var(--finger-color, #22d3ee), 0 0 14px rgba(34,211,238,0.4);
}
.virtual-keyboard.stage-school .keyboard-key.pressed {
  transform: translateY(2px) scale(0.95);
  background: linear-gradient(180deg, #334155, #1e293b);
  filter: brightness(1.35);
  box-shadow: 0 0 12px rgba(255,255,255,0.35), inset 0 2px 4px rgba(0,0,0,0.5);
}
.virtual-keyboard.stage-school .keyboard-key .kb-finger-dot {
  width: 8px; height: 8px;
  box-shadow: 0 0 4px currentColor;
}

/* ===== 阶段4：键盘样式与阶段5保持一致 ===== */
.virtual-keyboard.stage-minimal {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.1), inset 0 0 60px rgba(0,0,0,0.5);
}
.virtual-keyboard.stage-minimal .keyboard-row { gap: 5px; margin-bottom: 5px; }
.virtual-keyboard.stage-minimal .keyboard-key {
  height: var(--kb-u);
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #334155;
  font-size: 12px; color: #94a3b8;
  font-weight: 500;
  box-shadow: inset 0 -3px 0 #1e293b, 0 1px 2px rgba(0,0,0,0.5);
  transition: all 0.08s ease;
}

.virtual-keyboard.stage-minimal .keyboard-key.next-key {
  border-color: #22c55e;
  background: #166534;
  color: #4ade80;
  box-shadow: inset 0 -3px 0 #14532d, 0 0 15px rgba(34, 197, 94, 0.6), 0 0 30px rgba(34, 197, 94, 0.3);
  animation: tech-neon 0.5s ease-in-out infinite;
  text-shadow: 0 0 8px #4ade80;
}
.virtual-keyboard.stage-minimal .keyboard-key.pressed {
  background: #4ade80;
  color: #0f172a;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.3), 0 0 12px rgba(74, 222, 128, 0.6);
  transform: translateY(2px);
}

/* ===== 阶段5：竞技科技风（tech） ===== */
.virtual-keyboard.stage-tech {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.1), inset 0 0 60px rgba(0,0,0,0.5);
}
.virtual-keyboard.stage-tech .keyboard-row { gap: 5px; margin-bottom: 5px; }
.virtual-keyboard.stage-tech .keyboard-key {
  height: var(--kb-u);
  border: 1px solid #38bdf8;
  border-radius: 4px;
  background: #334155;
  font-size: 12px; color: #94a3b8;
  font-weight: 500;
  box-shadow: inset 0 -3px 0 #1e293b, 0 1px 2px rgba(0,0,0,0.5);
  transition: all 0.08s ease;
}

.virtual-keyboard.stage-tech .keyboard-key.next-key {
  border-color: #22c55e;
  background: #166534;
  color: #4ade80;
  box-shadow: inset 0 -3px 0 #14532d, 0 0 15px rgba(34, 197, 94, 0.6), 0 0 30px rgba(34, 197, 94, 0.3);
  animation: tech-neon 0.5s ease-in-out infinite;
  text-shadow: 0 0 8px #4ade80;
}
@keyframes tech-neon {
  0%, 100% { box-shadow: inset 0 -3px 0 #14532d, 0 0 15px rgba(34, 197, 94, 0.6); }
  50% { box-shadow: inset 0 -3px 0 #14532d, 0 0 25px rgba(34, 197, 94, 0.8), 0 0 40px rgba(34, 197, 94, 0.4); }
}
.virtual-keyboard.stage-tech .keyboard-key.tech-highlight {
  border-color: #4ade80;
  box-shadow: inset 0 -3px 0 #14532d, 0 0 12px rgba(34, 197, 94, 0.4);
}
.virtual-keyboard.stage-tech .keyboard-key.pressed {
  background: #4ade80;
  color: #0f172a;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.3), 0 0 12px rgba(74, 222, 128, 0.6);
  transform: translateY(2px);
}

/* ===== 阶段6：键盘样式与阶段5保持一致 ===== */
.virtual-keyboard.stage-pro {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.1), inset 0 0 60px rgba(0,0,0,0.5);
}
.virtual-keyboard.stage-pro .keyboard-row { gap: 5px; margin-bottom: 5px; }
.virtual-keyboard.stage-pro .keyboard-key {
  height: var(--kb-u);
  border: 1px solid #a855f7;
  border-radius: 4px;
  background: #334155;
  font-size: 12px; color: #94a3b8;
  font-weight: 500;
  box-shadow: inset 0 -3px 0 #1e293b, 0 1px 2px rgba(0,0,0,0.5);
  transition: all 0.08s ease;
}

.virtual-keyboard.stage-pro .keyboard-key.next-key {
  border-color: #22c55e;
  background: #166534;
  color: #4ade80;
  box-shadow: inset 0 -3px 0 #14532d, 0 0 15px rgba(34, 197, 94, 0.6), 0 0 30px rgba(34, 197, 94, 0.3);
  animation: tech-neon 0.5s ease-in-out infinite;
  text-shadow: 0 0 8px #4ade80;
}
.virtual-keyboard.stage-pro .keyboard-key.pressed {
  background: #4ade80;
  color: #0f172a;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.3), 0 0 12px rgba(74, 222, 128, 0.6);
  transform: translateY(2px);
}

/* ===== 通用：真实键盘风格（阶段4-6） ===== */
.virtual-keyboard.real-kb .keyboard-key.wide { width: 60px; }

/* ===== 手指图例（阶段1） ===== */
.virtual-keyboard.stage-cute .finger-legend {
  display: flex; justify-content: center; gap: 8px; margin-top: 8px; flex-wrap: wrap;
  padding-top: 8px; border-top: 2px dashed #fcd34d;
}
.virtual-keyboard.stage-cute .finger-legend-group { display: flex; align-items: center; gap: 4px; }
.virtual-keyboard.stage-cute .legend-hand { font-size: 11px; font-weight: 600; color: #64748b; margin-right: 3px; }
.virtual-keyboard.stage-cute .legend-item { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 8px; font-size: 10px; color: #475569; font-weight: 500; }
.virtual-keyboard.stage-cute .legend-dot { width: 6px; height: 6px; border-radius: 50%; }
.virtual-keyboard:not(.stage-cute) .finger-legend { display: none; }


/* 右侧进度面板 */
.progress-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.progress-panel h3 {
  font-size: 15px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.stage-tree {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tree-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: all var(--transition);
}

.tree-item.current { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.tree-item.completed { color: var(--success); }
.tree-item.locked { color: var(--text-muted); }

.tree-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tree-dot.completed { background: var(--success); }
.tree-dot.current { background: var(--accent); }
.tree-dot.locked { background: var(--text-muted); }

.practice-actions {
  flex: 0 0 230px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding-bottom: 6px;
}

.btn-action {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-action:hover { background: var(--bg-hover); }
.btn-action.primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-action.primary:hover { background: var(--accent-light); }

/* ===== 结果页 ===== */
.result-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.result-overlay.show { display: flex; }

.result-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 40px;
  width: 480px;
  max-width: 90vw;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.result-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.result-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-message {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.result-stat {
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.result-stat-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.result-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.score-breakdown {
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 24px;
  text-align: left;
}

.score-breakdown-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.score-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
  color: var(--text-secondary);
}

.score-row.total {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
}

.result-actions {
  display: flex;
  gap: 12px;
}

.result-actions button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-next { background: var(--accent); color: white; }
.btn-next:hover { background: var(--accent-light); }
.btn-retry { background: var(--bg-tertiary); color: var(--text-primary); }
.btn-retry:hover { background: var(--bg-hover); }

/* ===== 数据中心 ===== */
.data-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.data-card {
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.data-card-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent);
}

.data-card-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.chart-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.chart-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.chart-canvas {
  width: 100%;
  height: 200px;
}

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

.error-key-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.error-key-char {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  width: 32px;
  text-align: center;
}

.error-key-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-hover);
  border-radius: 4px;
  overflow: hidden;
}

.error-key-bar-fill {
  height: 100%;
  background: var(--error);
  border-radius: 4px;
}

.error-key-count {
  font-size: 13px;
  color: var(--text-muted);
  width: 60px;
  text-align: right;
}

/* ===== 设置页 ===== */
.settings-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px;
  width: 100%;
}

.settings-list .setting-item {
  width: 100% !important;
  margin-bottom: 0 !important;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.setting-info h3 { font-size: 15px; margin-bottom: 2px; }
.setting-info p { font-size: 13px; color: var(--text-secondary); }

/* Toggle 开关 */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
}

.toggle.on { background: var(--accent); }

.toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
}

.toggle.on::after { transform: translateX(20px); }

/* 主题选择 */
.theme-selector {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.theme-option {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
  min-width: 100px;
}

.theme-option:hover { border-color: var(--accent); }
.theme-option.active { border-color: var(--accent); background: var(--accent-bg); }
.theme-option.locked { opacity: 0.6; }

.theme-option-name { font-size: 14px; font-weight: 500; }
.theme-option-cost { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== 里程碑提示 ===== */
.milestone-toast {
  position: fixed;
  top: 110px;
  right: 24px;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(40px); }
}

/* ===== 准备遮罩 ===== */
.practice-ready-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.7);
  z-index: 10;
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 500;
}

.theme-dark .practice-ready-overlay { background: rgba(26,26,46,0.7); }
.theme-contrast .practice-ready-overlay { background: rgba(0,0,0,0.7); }
.theme-warm .practice-ready-overlay { background: rgba(253,248,240,0.7); }
.theme-green .practice-ready-overlay { background: rgba(240,247,240,0.7); }

/* ===== 每日挑战 ===== */
.daily-banner {
  padding: 24px 32px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  border-radius: var(--radius);
  color: white;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.daily-banner.completed {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.daily-banner-info h2 { font-size: 20px; margin-bottom: 4px; }
.daily-banner-info p { font-size: 14px; opacity: 0.9; }

.daily-start-btn {
  padding: 12px 28px;
  background: white;
  color: #f59e0b;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
}

.daily-start-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.daily-start-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .practice-layout { height: auto; min-height: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .keyboard-area { flex-direction: column; }
  .practice-actions { flex: none; padding-bottom: 0; }
  /* 小屏时为了键盘完整显示，直接按阶段1的最大高度兜底 */
  .virtual-keyboard { min-height: 420px !important; overflow-x: auto; }
  .virtual-keyboard .keyboard-row { justify-content: flex-start; }
  .stage-grid { grid-template-columns: repeat(2, 1fr); }
  .data-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 登录/注册页 ===== */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 20px;
  background: linear-gradient(135deg, #e8eaf0 0%, #f5f6fa 50%, #eef0f5 100%);
}

.auth-card {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 32px 30px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  margin: 20px auto;
}

.auth-logo {
  text-align: center;
  margin-bottom: 8px;
}
.auth-logo .logo-icon { font-size: 40px; display: inline-block; }
.auth-logo .logo-icon img { width: 56px; height: 56px; border-radius: 12px; }
.auth-logo .logo-icon img { width: 56px; height: 56px; }
.auth-logo h1 { font-size: 24px; font-weight: 700; color: var(--text-primary); margin-top: 4px; }

.auth-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 28px;
}

.auth-tabs {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.auth-tab.active {
  background: var(--bg-secondary);
  color: var(--accent);
  box-shadow: var(--shadow);
}

.auth-form .form-group { margin-bottom: 16px; }
.auth-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: var(--transition);
  box-sizing: border-box;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-secondary);
}

.btn-auth {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
  margin-bottom: 4px;
}
.btn-auth:hover { background: var(--accent-light); transform: translateY(-1px); }
.btn-auth:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-error {
  background: var(--error-bg);
  color: var(--error);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
}
/* ⚠️ 「连不上服务器」和「密码错了」必须用两种配色：
   后者是用户在操作上出了错（红），前者是环境问题、用户没做错任何事（琥珀）。
   上一版把两者都塞进红框，登录页一进来就是一条刺眼的红 —— 像是用户把东西弄坏了。 */
.auth-error.warn {
  background: #FFF8E8;
  color: #8A6416;
  border: 1px solid #FFE0A3;
}

/* ===== 验证码输入组合 ===== */
.input-btn-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.input-btn-row input {
  flex: 1;
  width: auto;
  min-width: 0;
}
.btn-send-code {
  padding: 0 14px;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  min-width: 100px;
  line-height: 1;
}
.btn-send-code:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
}
.btn-send-code:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== 登录/注册额外行 ===== */
.auth-extra-row {
  margin-top: 12px;
  text-align: center;
}
.auth-link {
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.auth-link:hover { text-decoration: underline; }

/* ===== 通用弹窗 ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  backdrop-filter: blur(4px);
}
.modal-overlay.show { display: flex; }
.modal-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  width: 440px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalFadeIn 0.2s ease-out;
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; font-size: 17px; font-weight: 600; }
.modal-close {
  width: 28px; height: 28px;
  border: none; background: transparent;
  color: var(--text-muted);
  font-size: 22px; line-height: 1;
  cursor: pointer; border-radius: 6px;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}
.modal-footer .btn-action { min-width: 88px; }

/* 弹窗中的表单样式 */
.modal-body .form-group { margin-bottom: 16px; }
.modal-body label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.modal-body input,
.modal-body select,
.modal-body textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: border-color 0.15s;
  box-sizing: border-box;
  font-family: inherit;
}
.modal-body textarea { resize: vertical; min-height: 100px; line-height: 1.5; }
.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* ===== 按钮通用 ===== */
.btn-action {
  padding: 10px 20px;
  border: 2px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-action:hover { background: var(--bg-hover); }
.btn-action.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-action.primary:hover { background: var(--accent-light); }
.btn-action:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-offline {
  margin-top: 20px;
  text-align: center;
}
.btn-offline {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}
.btn-offline:hover { color: var(--text-secondary); }

.auth-server-config {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.auth-server-config label {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}
.auth-server-config input {
  width: calc(100% - 70px);
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-primary);
  box-sizing: border-box;
}
.btn-sm {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
}
.btn-sm:hover { background: var(--accent-light); }

.auth-company {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ===== 新登录页（左品牌 + 右三标签登录） ===== */
.login-page {
  display: flex;
  width: 100%;
  min-height: 100%;   /* 填满视口；内容更高时随容器滚动（原 100vh 会把内容顶出且不可滚） */
}

/* 左：品牌面板 */
.brand-panel {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
  padding: 44px 50px;
  background: linear-gradient(150deg, #1B2760 0%, #33459F 45%, #4C6EF0 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
}
.brand-panel::before,
.brand-panel::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}
.brand-panel::before {
  width: 520px; height: 520px;
  right: -160px; top: -150px;
  background: radial-gradient(circle, rgba(255,197,61,.28), transparent 65%);
}
.brand-panel::after {
  width: 420px; height: 420px;
  left: -150px; bottom: -170px;
  background: radial-gradient(circle, rgba(110,190,255,.30), transparent 65%);
}
.brand-panel > * { position: relative; z-index: 2; }

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 700;
}
.brand-logo-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, #7EA3FF, #3D6FF5);
  display: grid;
  place-items: center;
  font-size: 19px;
  box-shadow: 0 6px 18px rgba(20,40,120,.45);
}
/* 2026-09-29 二轮删减：`.brand-title`（四个练习场景，共用一套星星能量）
   与 `.brand-sub`（练完都记进同一个账本…）按用户要求整段删除 ——
   logo 下面直接就是「我的练习足迹」，不再用两行大字占位。
   ⚠️ 顺带解决了一个旧隐患：`.brand-sub` 是左栏**唯一**压在最亮渐变档上的正文，
     它的 color 曾被硬性拉高到 .92 才够 4.5:1（探针 ⑧ 量出来的）。现在整块没了，
     左栏最亮处的正文只剩特性点与版权行，对比度余量反而更宽。 */

/* 我的练习足迹（2026-09-28 取代旧版"冒险地图"预览）
   为什么不再画地图：旧版画的是 data.js 里那套早已不用的 15 岛 AdvMap，
   岛名（手指操场 / 基准键小岛…）和站点真正在玩的 island.html（登陆沙滩 → 宝藏岛）
   一个都对不上 —— "登录页显示的还是原来的内容"就是这么来的。
   现在改成产品轮播，数据来自 DataCenter.collect()，与数据中心同源。 */
.brand-mine {
  margin-top: 26px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 20px;
  padding: 18px 18px 17px;
  backdrop-filter: blur(6px);
}
.brand-mine-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.brand-mine-t {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.brand-mine-t b { font-size: 14.5px; }
/* 2026-09-29 二轮删减：`.brand-scope`（仅存本机 / 已同步云端）与 `.brand-who`（⭐ N 星星能量胶囊）
   按用户要求删除，两个规则块一并删掉 —— 这一屏不再显示余额与同步状态。 */
/* ===== 我的练习足迹 · 轮播（2026-09-29 三轮改造）=====
   取代原来的 2×2 文字卡片（`.brand-prodlist` / `.brand-prod*` 整段删除）。
   用户反馈：① 模块要放大；② 四个场景只留主标题，不要进度、不要副标题。
   于是每张 slide = 真实界面截图 + 左下角一个标题，其余信息一律不叠 ——
   进度、关数、范围小字在数据中心里都有，登录页只负责"看见有哪四个场景"。
   ⚠️ 高度是这一屏最紧的资源：`.brand-panel` 是 overflow:hidden，
      超出部分【静默切掉、连滚动条都没有】。1440×900 是最紧的一档
      （左栏最宽 → 3:2 的图最高），所以下面用 max-width 卡死图宽，
      矮视口另有一档收敛（见文件末尾 @media (min-width:901px) and (max-height:840px)）。
   ⚠️ transform 的过渡只挂在 .brand-carousel-tr 上。给 .bc-slide 再加 transition
      会让两层动画互相打架（切换看着"拖影"）。 */
.brand-carousel {
  margin-top: 14px;
  /* 560 → 1440 视口下左栏内容有 716px，图按 3:2 会是 373px 高，
     加上标题栏 28px 仍留得住呼吸余量；再宽就会顶到版权行。 */
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.brand-carousel-vp {
  overflow: hidden;
  border-radius: 14px;
  background: rgba(6, 12, 40, .35);
  box-shadow: 0 8px 22px rgba(6, 14, 44, .30);
}
.brand-carousel-tr {
  display: flex;
  /* 用 transform 平移而不是改 left：整条轨道只做一次合成动画，四张图不会各自重排。
     .5s 是"能看清在换页、又不让人觉得卡"的折中；cubic-bezier 让起步快、落位稳。 */
  transition: transform .5s cubic-bezier(.33, .02, .2, 1);
  will-change: transform;
}
/* 每张 slide 是 <button>（点一下 = 以游客身份进这个模块，见 App.guestTry）。
   font/color 必须显式继承 —— 浏览器给 button 的默认字体是 13.33px Arial，不写就小一圈且不报错。 */
.bc-slide {
  flex: 0 0 100%;
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.bc-slide img {
  display: block;
  width: 100%;
  /* 3:2 与素材一致（1080×720），所以正常视口下不裁切。
     ⚠️ max-height 必须 ≥ max-width÷1.5，否则它会先一步把图压矮 ——
        560 宽的图本该 373 高，卡到 356 就变成 1.57 的比例，
        object-fit:cover 于是裁掉左右各 2.8%（探针 ⑦ 量出来的）。
        373 = 560/1.5，正好让两个约束在同一点收口，谁也不裁谁。
        它的作用只剩"矮视口兜底"：真到放不下时宁可裁左右，也不能把标题挤掉。 */
  aspect-ratio: 3 / 2;
  object-fit: cover;
  max-height: 373px;
}
/* 图加载失败时的占位（app.js 的 renderBrandProducts 在两张降级都失败后换上它）。
   ⚠️ 尺寸约束必须与上面 `.bc-slide img` **逐条一样**（width:100% + 3:2 + 373 上限）：
      占位只要有一样不同，那个 3:2 的框就会跳一下高矮 —— 而这一块正好是左栏
      最紧的高度资源（.brand-panel 是 overflow:hidden，超出静默切掉）。
      也就是说"降级"绝不能把页面变得更糟。 */
.bc-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 373px;
  background: linear-gradient(150deg, #1B2760, #33459F 45%, #4C6EF0);
}
/* 占位里就一个 emoji：给到 54px 才看得出是"这里本来有张图"，
   小了会被当成没加载完的空白。fixed 不加 —— 让它跟着左栏宽度自然缩放。 */
.bc-ph span {
  font-size: 54px;
  line-height: 1;
  filter: drop-shadow(0 6px 14px rgba(4,10,32,.45));
}
/* 底部压暗：截图本身是深色的，但有的产品页（英语同步）中下部较亮，
   不压一层"白字压亮图"就只有 3 点几的对比度。压暗只盖下半，上半个图保持原样。 */
.bc-slide::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(6, 10, 34, 0), rgba(6, 10, 34, .82));
  pointer-events: none;
}
.bc-cap {
  position: absolute;
  left: 16px; right: 16px; bottom: 12px;
  z-index: 1;
  pointer-events: none;
}
/* 主标题（PRODUCTS.brief）。⚠️ 只有这一行 —— 按用户要求不显示副标题与进度。
   字号给到 17px：这是整块最有信息量的一行，小了就白瞎了"放大"这件事。 */
.bc-cap b {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .3px;
  color: #fff;
  /* 图的下半虽然已压暗，但截图内容不可控（有的球体自己会发光），
     再补一层近距离投影，保证任何一帧都能读。 */
  text-shadow: 0 1px 3px rgba(0, 0, 0, .70), 0 0 14px rgba(0, 0, 0, .45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-slide:focus-visible { outline: 2px solid #FFC53D; outline-offset: -3px; }
.bc-slide:hover img { filter: brightness(1.06); }
.bc-slide:hover .bc-ph { filter: brightness(1.06); }   /* 占位也要跟着一起亮（否则悬停反馈断一半） */

/* 指示条：左右箭头 + 圆点。常显（不藏到 hover 里）——
   这是孩子第一次进来就能看见的"这里还有别的"提示，藏起来等于没有。 */
.brand-carousel-bar {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.bc-arrow {
  width: 26px; height: 26px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .10);
  color: #fff;
  font: 700 16px/1 -apple-system, "PingFang SC", sans-serif;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: background .16s, border-color .16s;
}
.bc-arrow:hover, .bc-arrow:focus-visible {
  background: rgba(255, 255, 255, .24);
  border-color: rgba(255, 255, 255, .45);
}
.bc-dots { display: flex; align-items: center; gap: 7px; }
.bc-dot {
  width: 7px; height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .34);
  cursor: pointer;
  transition: width .2s, background .2s;
}
.bc-dot.on {
  width: 18px;
  border-radius: 4px;
  background: #FFD66B;
}
.bc-dot:focus-visible { outline: 2px solid #FFC53D; outline-offset: 3px; }

.brand-prod-fallback {
  font-size: 12px;
  color: rgba(255, 255, 255, .8);
  padding: 6px 0;
}
/* 只在窄屏露出来（见 @media ≤900）：那时轮播被收起，由这一行说明"本机有多少东西等着同步" */
.brand-mine-note { display: none; }

/* 2026-09-29 二轮删减：这一整段被用户砍掉了，包括
     · `.brand-scale`  —— 「4 个场景 · 91 关卡与波次 · 1,862 词与题」规模行
     · `.brand-energy` —— 「练满四个场景能赚 7,380 ⭐」+ 进度条 + 「集齐工坊全部装扮只要 3,270 ⭐」能量卡
   对应 JS（renderBrandEnergy）也一并删除 —— 规则块留着只会让人以为"这块还在用"。
   规模数字与能量闭环改由官网/数据中心承担，登录页不再重复。
   ⚠️ 上面引号里的是**当时的**历史数字：工坊 2026-09-29 换新版后是 1,055、
      同日扩容目录后又变成 1,424。要现值请读 `TypeUpEconomy.RULE.totals`。 */

.brand-points {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.brand-point {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .9);
}
.brand-point i {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-style: normal;
  flex: none;
}
.brand-foot {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 11.5px;
  /* .7 → .9：版权行在最左下，那里是渐变最暗的一段，看着够；
     但探针按元素位置反算底色，量出来只有 4.67:1（刚过 AA）——
     留太窄的余量，换个视口高度就可能掉到线下，直接给足。 */
  color: rgba(255, 255, 255, .9);
}

/* 右：登录面板 */
.login-panel {
  width: 588px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px 44px;
  overflow-y: auto;
}
.login-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 22px 60px rgba(30,36,64,.10), 0 2px 6px rgba(30,36,64,.05);
  padding: 32px 34px 26px;
}
.login-card-title {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.3px;
}
/* 2026-09-29 二轮删减：`.login-lead`（四个练习场景的进度和星星能量一起云端同步…）
   与整个 `.login-guest-tip`（🧳 本机存着一份游客记录…）按用户要求删除。
   登录卡从标题直接进两个标签页 —— 少了两大块正文，卡内留白反而够用了。 */

/* 三标签 */
.login-tabs {
  display: flex;
  gap: 4px;
  margin-top: 20px;
  padding: 4px;
  background: #F1F2F8;
  border-radius: 12px;
}
.login-tab {
  flex: 1;
  height: 36px;
  border-radius: 9px;
  font-size: 13.5px;
  color: #5A6180;
  font-weight: 600;
  transition: .18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: none;
  background: none;
  cursor: pointer;
}
.login-tab.on {
  background: #fff;
  color: #3D6FF5;
  box-shadow: 0 2px 8px rgba(30,36,64,.10);
}
.login-badge {
  font-size: 10px;
  background: linear-gradient(135deg, #FFB020, #FF8A00);
  color: #fff;
  padding: 1px 5px;
  border-radius: 5px;
  font-weight: 700;
}
.login-panel-content { margin-top: 22px; }
.login-panel-content.on { display: block; animation: loginFade .25s; }
.login-panel-content:not(.on) { display: none !important; }
@keyframes loginFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* 微信扫码 */
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.qr-box {
  width: 198px; height: 198px;
  position: relative;
  border-radius: 16px;
  padding: 12px;
  border: 1px solid #E6E8F4;
  background: #fff;
  box-shadow: 0 6px 20px rgba(30,36,64,.07);
}
.qr-box img {
  width: 100%; height: 100%;
  display: block;
  object-fit: contain;
}
.qr-logo-in {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 38px; height: 38px;
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 0 0 3px #fff;
}
.qr-state {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  text-align: center;
}
.qr-state.on { display: flex; }
/* 图标 50 → 30：失败态要塞"图标 + 标题 + 两行说明 + 两个按钮"，
   而 .qr-box 只有 198px 见方（内容区 178px、高 178px）。50px 的圆一占，
   底下两行说明 + 两个按钮就正好顶到边（实测内容高 196 = 可用高 196，零余量）。 */
.qr-state-ic {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: #fff;
}
.qr-state b { font-size: 13.5px; }
.qr-state span { font-size: 12px; color: #5A6180; line-height: 1.5; }
.qr-refresh {
  font-size: 12px;
  color: #3D6FF5;
  font-weight: 600;
  border: 1px solid #3D6FF5;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 1px;
  white-space: nowrap;
}
/* 拉取失败时的两个出口：主按钮（重新获取）描边，次按钮（用邮箱登录）灰底。
   两个平级但不同权重 —— 不这样分，用户会以为"必须重试成功才能登录"。
   ⚠️ 必须**竖排**：.qr-box 只有 198px 宽，减去 padding 之后两个中文按钮并排
      各自会被挤成两行（"重新获 / 取"），读起来像乱码。 */
.qr-fail-act {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 3px;
  width: 100%;
}
.qr-refresh.ghost {
  color: #5A6180;
  border-color: #D7DBEC;
  background: #F6F7FC;
}
.qr-refresh.ghost:hover { border-color: #B9C0DA; color: #3A4160; }
.qr-tip {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #1E2440;
}
.qr-sub {
  margin-top: 6px;
  font-size: 12.5px;
  color: #8D93AC;
  text-align: center;
  line-height: 1.6;
}
.qr-timer {
  margin-top: 9px;
  font-size: 12px;
  color: #8D93AC;
}
/* 表单字段 */
.login-field { margin-bottom: 14px; }
.login-field label {
  display: block;
  font-size: 12.5px;
  color: #5A6180;
  margin-bottom: 7px;
  font-weight: 600;
}
.login-inp {
  display: flex;
  align-items: center;
  height: 48px;
  border: 1px solid #E6E8F4;
  border-radius: 12px;
  padding: 0 14px;
  background: #FBFCFF;
  transition: .18s;
}
.login-inp:focus-within {
  border-color: #3D6FF5;
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(61,111,245,.12);
}
.login-inp input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14.5px;
  color: #1E2440;
}
.login-inp input::placeholder { color: #B6BACD; }
.login-inp-act {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 12.5px;
  color: #3D6FF5;
  font-weight: 600;
  white-space: nowrap;
  padding-left: 8px;
}
.login-inp-act:hover { color: #2B55D4; }
.login-inp-act:disabled { opacity: .5; cursor: not-allowed; }
.login-btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #4C7BFF, #2B55D4);
  box-shadow: 0 8px 20px rgba(61,111,245,.28);
  transition: .18s;
  border: none;
  cursor: pointer;
  margin-top: 4px;
}
.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(61,111,245,.34);
}
.login-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.login-extra {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}
.login-link {
  font-size: 12.5px;
  color: #3D6FF5;
  font-weight: 600;
  cursor: pointer;
}
.login-link:hover { text-decoration: underline; }
.dev-hint {
  color: #3D6FF5;
  font-size: 12px;
  margin-top: 8px;
  text-align: center;
}

/* 登录成功动画 */
.login-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 0 4px;
  animation: loginFade .3s;
}
.login-done-ok {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34D399, #12B76A);
  display: grid;
  place-items: center;
  font-size: 30px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(18,183,106,.3);
  margin-bottom: 16px;
}
.login-done h3 { font-size: 19px; color: #1E2440; }
.login-done p { margin-top: 8px; font-size: 13px; color: #5A6180; line-height: 1.7; }
.login-done-bar {
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: #EEF1FA;
  overflow: hidden;
  margin: 20px 0 14px;
}
.login-done-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4C7BFF, #7EA3FF);
  animation: loginFill 1.6s forwards;
}
@keyframes loginFill { to { width: 100%; } }

/* 底部链接 */
.login-switch {
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid #E6E8F4;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  gap: 10px;
}
.login-try {
  color: #8D93AC;
  font-size: 12.5px;
  cursor: pointer;
  font-weight: 600;
}
.login-try:hover { color: #3D6FF5; }
.login-foot {
  margin-top: 16px;
  font-size: 12px;
  color: #8D93AC;
  display: flex;
  gap: 16px;
}
.login-foot span { cursor: pointer; transition: color .15s; }
.login-foot span:hover { color: #3D6FF5; }

/* 响应式
   ⚠️ .brand-panel 是 overflow:hidden（为了裁掉两个装饰圆），所以内容一旦比面板高
   就会被**静默切掉**、连滚动条都没有。加内容时必须同时给矮视口留收敛档，
   否则在 13 寸笔记本（1280×800 一类的视口高）上，底部的 © 与特性点会直接消失。 */
@media (min-width: 901px) and (max-height: 840px) {
  .brand-panel { padding: 26px 38px; }
  .brand-mine { margin-top: 16px; padding: 13px 14px 12px; border-radius: 16px; }
  .brand-mine-t b { font-size: 13.5px; }
  /* ⚠️ 这里**不要**再压 .bc-slide img 的 max-height。
     曾经写过 320px（想给矮屏省高度），结果 1280×800 的图被压成 560×320、
     比例 1.75 —— object-fit:cover 于是把左右各裁掉 15%，画面里节点的名字被切一半。
     而那一档的呼吸余量实测有 189px，本来就放得下 373 的图，纯属白裁。
     正确的收敛对象是【padding / margin / 字号】，图交给 max-width 与 3:2 自己算：
     左栏窄了图自然就矮（1024×768 实测 446×297，比例 1.5，一点没裁）。 */
  .brand-carousel { margin-top: 10px; }
  .bc-cap b { font-size: 16px; }
  .bc-arrow { width: 24px; height: 24px; font-size: 15px; }
  .brand-points { margin-top: 14px; gap: 8px 16px; }
  .brand-point { font-size: 12px; }
  .brand-foot { padding-top: 14px; }
}
@media (max-width: 1240px) {
  /* 左侧面板收窄 → 轮播按 width:100% 自然变小，主标题跟着降 0.5px 就好，
     不需要再动别的块（图是流式的，不存在"挤"的问题）。 */
  .bc-cap b { font-size: 16.5px; }
}
@media (max-width: 1080px) {
  .login-panel { width: 472px; padding: 30px; }
  /* 这一档左栏内容宽约 508px，轮播图自然缩到 ~339px 高，
     高度比 1440（373px）还宽松，所以这里不需要额外收敛 ——
     原注释里"不能改成单列"说的是旧的 2×2 卡片，轮播已经没有这个问题。 */
}
@media (max-width: 900px) {
  .login-page { flex-direction: column; }
  .brand-panel {
    flex: none;
    padding: 24px 20px 22px;
  }
  /* 竖排后左侧只是"品牌抬头"，主视觉必须让给右边的登录卡：
     产品轮播、版权全部收起，只留"我的练习足迹"这一张薄卡 +
     .brand-mine-note 那句"本机练过几关"（桌面靠轮播表达，窄屏靠这一行）。
     ⚠️ 09-29 三轮：轮播在窄屏整块收起（原来是收起 .brand-prodlist 那 4 张卡）。
        收的是**轮播**不是单张图 —— 一屏只看得见一张图、还没圆点的话，
        "这里有四个场景"这件事就完全传达不到了，不如让位给右侧扫码。 */
  .brand-carousel { display: none; }
  .brand-mine { margin-top: 15px; padding: 12px 14px; border-radius: 15px; }
  .brand-mine-note {
    display: block;
    margin-top: 9px;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .86);
  }
  .brand-mine-note b { color: #FFD66B; font-weight: 800; }
  .brand-foot { display: none; }
  .brand-points { margin-top: 16px; gap: 9px 18px; }
  .login-panel {
    width: 100%;
    padding: 22px 16px 40px;
    justify-content: flex-start;
  }
  .login-card {
    padding: 26px 20px 20px;
    box-shadow: none;
    border: 1px solid #E6E8F4;
  }
}
@media (max-width: 560px) {
  /* 最窄档：连"本机练过几关"那行也让位 —— 小屏上扫码按钮优先级最高。
     （.brand-points 已经在上面 640px 那档收起了，这里不用重复写） */
  .brand-mine-note { display: none; }
}

/* ===== 导航栏用户区 ===== */
.navbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  /* 确保下拉菜单的堆叠上下文正确，不被其他导航元素遮挡 */
  z-index: 100;
  /* 防止 transform 导致的层叠问题 */
  backface-visibility: hidden;
}

.user-avatar-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  background: var(--accent-bg);
}

.user-avatar-wrapper:hover {
  transform: scale(1.08);
}

.user-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar-placeholder {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  /* 默认显示作为 JS 未执行时的兜底 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sync-status {
  font-size: 16px;
  cursor: help;
  transition: var(--transition);
}
.nav-username {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* 用户下拉菜单 */
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  z-index: 1000;
  /* 防止下拉菜单内容被裁剪 */
  overflow: visible;
}

.user-dropdown.show {
  display: block;
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}

.dropdown-header .dropdown-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

/* 邮箱项：不可点击、纯展示 */
.dropdown-email-item {
  cursor: default !important;
  color: var(--text-secondary);
  font-size: 13px;
  pointer-events: none;
}

.dropdown-email-item:hover {
  background: transparent !important;
}

.dropdown-header:hover {
  background: var(--bg-hover);
}

.dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  background: var(--accent-bg);
  /* 防止图片加载失败时显示裂图边框 */
  display: none;
}

/* 下拉菜单头像文字占位符（无自定义头像时显示） */
.dropdown-avatar-placeholder {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-bg);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}



.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: var(--bg-hover);
}

.dropdown-logout {
  color: var(--error);
  justify-content: center;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 10px;
}

/* ===== 排行榜 ===== */
.leaderboard-container {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.leaderboard-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.leaderboard-row:last-child { border-bottom: none; }
.leaderboard-row:hover { background: var(--bg-hover); }
.leaderboard-row.me {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
}
.lb-rank {
  width: 50px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}
.lb-name {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}
.lb-score {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin-right: 16px;
}
.lb-extra {
  font-size: 13px;
  color: var(--text-muted);
  text-align: right;
  width: 160px;
}

/* ===== 底部版权与备案 ===== */
.app-footer {
  flex-shrink: 0;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  user-select: none;
}
.app-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.app-footer a:hover { color: var(--accent); }
.app-footer .footer-divider { color: var(--border); }
.app-footer .police-icon {
  width: 12px;
  height: 12px;
  vertical-align: -2px;
  margin-right: 3px;
}

/* ============================================================
   ===== 儿童冒险模式样式（六次冒险任务） =====================
   ============================================================ */

/* ----- 三层骨架 ----- */
#page-adventure { padding: 10px 16px; }
.adv-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: calc(100vh - 118px);
  min-height: 560px;
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
}
.adv-theater {
  flex: 0 0 26%;
  min-height: 185px;
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(12, 74, 110, 0.12);
  background: linear-gradient(160deg, var(--c-bg-a), var(--c-bg-b));
  color: var(--c-ink);
  border: 4px solid rgba(255,255,255,0.65);
}
.adv-energy { flex: 0 0 auto; }
.adv-keyboard-zone {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px;
  overflow: hidden;
}

/* ----- 六阶段场景色变量 ----- */
.adv-stage-1 { --c-bg-a:#E0F2FE; --c-bg-b:#7DD3FC; --c-accent:#FDE047; --c-accent-deep:#F59E0B; --c-ink:#0C4A6E; --c-card:#FFFFFF; }
.adv-stage-2 { --c-bg-a:#FFF7ED; --c-bg-b:#FED7AA; --c-accent:#B45309; --c-accent-deep:#92400E; --c-ink:#7C2D12; --c-card:#FFFFFF; }
.adv-stage-3 { --c-bg-a:#312E81; --c-bg-b:#1E1B4B; --c-accent:#A78BFA; --c-accent-deep:#FDE047; --c-ink:#EDE9FE; --c-card:#4C1D95; }
.adv-stage-4 { --c-bg-a:#FFF7ED; --c-bg-b:#FED7AA; --c-accent:#FB923C; --c-accent-deep:#F87171; --c-ink:#7C2D12; --c-card:#FFFFFF; }
.adv-stage-5 { --c-bg-a:#ECFDF5; --c-bg-b:#A7F3D0; --c-accent:#34D399; --c-accent-deep:#FBBF24; --c-ink:#064E3B; --c-card:#FFFFFF; }
.adv-stage-6 { --c-bg-a:#F5F3FF; --c-bg-b:#DDD6FE; --c-accent:#7C3AED; --c-accent-deep:#FACC15; --c-ink:#4C1D95; --c-card:#FFFFFF; }

/* ----- 剧场顶栏 ----- */
.adv-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
}
.adv-topbar-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--c-ink);
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
  letter-spacing: 1px;
}
.adv-stage-3 .adv-topbar-title, .adv-stage-6 .adv-topbar-title {
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.adv-ghost-btn {
  border: none;
  background: rgba(255,255,255,0.75);
  color: var(--c-ink);
  font-size: 15px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 44px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.10);
  transition: transform 0.12s ease;
}
.adv-ghost-btn:active { transform: scale(0.94); }
/* 深色剧场（st3 深蓝 / st6 紫金）：白底必须用深色字 */
.adv-stage-3 .adv-ghost-btn,
.adv-stage-6 .adv-ghost-btn {
  background: rgba(255,255,255,0.92);
  color: #1E1B4B;
  box-shadow: 0 3px 12px rgba(0,0,0,0.35);
}
.adv-stage-3 .adv-topbar-title {
  color: #FDE047;
  text-shadow: 0 2px 10px rgba(167,139,250,0.7);
}
.adv-stage-6 .adv-topbar-title {
  color: #FACC15;
  text-shadow: 0 2px 10px rgba(124,58,237,0.6);
}

.adv-theater-body {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 46px 20px 12px;
}

/* ----- 剧场通用元素 ----- */
.adv-task-text {
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 800;
  line-height: 1.6;
  text-align: center;
  margin: 0;
}
.adv-hero-emoji {
  font-size: clamp(56px, 7vw, 84px);
  line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.18));
}
.adv-hero-happy { animation: hero-bounce 0.5s ease; display:inline-block; }
@keyframes hero-bounce {
  0%,100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-18px) scale(1.12) rotate(-6deg); }
  60% { transform: translateY(4px) scale(0.96) rotate(4deg); }
}

/* ----- 阶段1：泡泡字母岛 ----- */
.s1-scene { position:absolute; inset:0; }
.s1-wave {
  position: absolute; bottom: -14px; left: 0; right: 0;
  font-size: 46px; letter-spacing: 18px; white-space: nowrap;
  opacity: 0.55;
}
.s1-content {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  /* 顶部留白避开顶栏（地图/标题/暂停），底部留白避开海浪装饰 */
  padding: 48px 12px 6px;
  box-sizing: border-box;
}
.s1-row {
  display: flex; align-items: center;
  gap: clamp(20px, 5vw, 56px);
  flex: 1 1 auto;
  min-height: 0;
}
.s1-bubble-target {
  height: 100%;          /* 随 s1-row 剩余高度自适应 */
  aspect-ratio: 1 / 1;   /* 保持正圆形 */
  width: auto;
  max-height: clamp(120px, 18vw, 200px);
  min-height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffffff 0%, #FDE047 42%, #F59E0B 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(64px, 10.5vh, 150px);
  font-weight: 900;
  color: #0C4A6E;
  font-family: 'Baloo 2', 'Chalkboard SE', 'PingFang SC', var(--font-sans);
  box-shadow: 0 0 0 8px rgba(255,255,255,0.55), 0 0 42px rgba(253,224,71,0.95), inset -10px -14px 26px rgba(245,158,11,0.45), inset 12px 14px 22px rgba(255,255,255,0.85);
  animation: bubble-float 2.6s ease-in-out infinite;
  user-select: none;
}
@keyframes bubble-float {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.03); }
}
.s1-pop { animation: bubble-pop 0.45s ease forwards !important; }
@keyframes bubble-pop {
  0% { transform: scale(1); opacity: 1; }
  40% { transform: scale(1.35); opacity: 0.95; }
  100% { transform: scale(0.2) translateY(-60px); opacity: 0; }
}
.s1-bear { display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; z-index:2; }
.s1-bear-img {
  height: 100%;
  max-height: clamp(120px, 18vw, 210px);
  min-height: 70px;
  width: auto;
  object-fit: contain;
  border-radius: 18px;
  filter: drop-shadow(0 6px 12px rgba(12,74,110,0.25));
  pointer-events: none;
}
.s1-bear-mouth { font-size: clamp(18px, 2.6vh, 26px); line-height:1; margin-top:-8px; }

/* ----- 阶段2：积木手指镇 ----- */
.s2-scene { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; gap: clamp(10px,2.5vw,28px); }
.s2-puppets { font-size: clamp(22px, 3vw, 36px); display:flex; gap: 5px; line-height:1; }
.s2-target-block {
  width: clamp(52px, 6vw, 76px); height: clamp(52px, 6vw, 76px);
  border-radius: 12px;
  background: linear-gradient(160deg, #D97706, #92400E);
  border: 3px solid #78350F;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.35), 0 6px 12px rgba(124,45,18,0.3);
  display:flex; align-items:center; justify-content:center;
  font-size: clamp(32px, 3.8vw, 48px); font-weight: 900; color: #FFF7ED;
  animation: block-wobble 2.2s ease-in-out infinite;
}
@keyframes block-wobble {
  0%,100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg) translateY(-4px); }
}
.s2-build { font-size: clamp(60px, 2.4vw, 60px); display:flex; align-items:flex-end; gap:3px; line-height:1; }

/* ----- 阶段3：星星词弹弓 ----- */
.s3-scene { position:absolute; inset:0; }
.s3-star { position:absolute; font-size:18px; animation: star-twinkle 2s ease-in-out infinite; }
@keyframes star-twinkle { 0%,100% { opacity:0.25; transform: scale(0.8);} 50% { opacity:0.9; transform: scale(1.15);} }
.s3-comet {
  display:flex; flex-direction:column; align-items:center; gap:6px;
  animation: comet-drift 3.4s ease-in-out infinite;
}
.s3-comet-word {
  font-size: clamp(40px, 5.4vw, 68px);
  font-weight: 900;
  color: #FEF3C7;
  letter-spacing: 3px;
  text-shadow: 0 0 18px rgba(167,139,250,0.95), 0 0 44px rgba(167,139,250,0.6);
  font-family: var(--font-mono);
}
.s3-comet-tail { font-size: 26px; letter-spacing: -6px; opacity: 0.8; }
@keyframes comet-drift {
  0%,100% { transform: translateX(-26px); }
  50% { transform: translateX(26px); }
}
.s3-comet.slow .s3-comet-word { animation: comet-drift 7s ease-in-out infinite; }
.s3-chain { position:absolute; top: 56px; right: 18px; font-size: 22px; letter-spacing: -4px; color:#FDE047; font-weight:800; text-shadow:0 0 10px rgba(253,224,71,0.8); }

/* ----- 阶段4：句子厨房 ----- */
.s4-scene { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; gap: clamp(14px,3vw,36px); padding-top: 8px; }
.s4-order {
  background: #FFFBEB;
  border: 3px dashed #F59E0B;
  border-radius: 16px;
  padding: 12px 20px;
  max-width: 62%;
  box-shadow: 0 8px 18px rgba(180,83,9,0.25);
  transform: rotate(-1.5deg);
}
.s4-order-title { font-size: 14px; font-weight:800; color: #B45309; margin-bottom: 6px; }
.s4-order-text {
  font-family: var(--font-mono);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 800;
  color: #7C2D12;
  line-height: 1.7;
  letter-spacing: 1px;
}
.s4-cake { font-size: clamp(46px,6vw,72px); filter: drop-shadow(0 6px 10px rgba(0,0,0,0.2)); }

/* ----- 阶段5：森林邮局 ----- */
.s5-scene { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; gap: clamp(14px,3vw,34px); }
.s5-letter {
  background: linear-gradient(180deg, #F0FDF4, #DCFCE7);
  border: 3px solid #34D399;
  border-radius: 14px;
  padding: 14px 22px;
  max-width: 66%;
  box-shadow: 0 8px 20px rgba(6,78,59,0.22);
  position: relative;
}
.s5-letter::before { content:'🍃'; position:absolute; top:-18px; left:-14px; font-size:34px; transform: rotate(-20deg); }
.s5-letter-from { font-size: 14px; font-weight:800; color:#047857; margin-bottom: 6px; }
.s5-line {
  font-family: var(--font-mono);
  font-size: clamp(19px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.7;
  color: #064E3B;
  white-space: nowrap;
}
.s5-line.done { opacity: 0.32; }
.s5-line.next { opacity: 0.45; font-size: clamp(15px, 1.9vw, 22px); }
.s5-birdmap { display:flex; flex-direction:column; align-items:center; gap:6px; font-size: clamp(40px,5vw,58px); }

/* ----- 阶段6：星光故事剧场 ----- */
.s6-scene {
  position:absolute; inset:0;
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  gap: 6px;
  padding: 40px 30px 28px;
  box-sizing: border-box;
}
.s6-curtain { position:absolute; top:0; bottom:0; width:70px; font-size:60px; line-height:1; opacity:0.9; overflow:hidden; z-index:1; }
.s6-curtain.left { left:0; } .s6-curtain.right { right:0; }
.s6-lights { font-size: 18px; letter-spacing: 4px; }
.s6-board {
  background: linear-gradient(180deg, #4C1D95, #2E1065);
  border: 3px solid #FACC15;
  border-radius: 14px;
  padding: 10px 18px;
  max-width: 86%;
  width: max-content;
  max-height: 58%;
  overflow: hidden;
  box-shadow: 0 0 34px rgba(250,204,21,0.35), inset 0 0 24px rgba(0,0,0,0.35);
  text-align: left;
  display:flex; flex-direction:column; gap:2px;
}
.s6-line {
  font-family: var(--font-mono);
  font-size: clamp(18px, 2.3vw, 30px);
  font-weight: 800;
  line-height: 1.4;
  color: #FEF9C3;
  white-space: nowrap;
  text-shadow: 0 0 12px rgba(250,204,21,0.5);
}
.s6-line.done { opacity: 0.25; }
.s6-line.next { opacity: 0.55; font-size: clamp(13px, 1.7vw, 20px); }
.s6-line.cur-line {
  transition: transform 0.25s ease-out;
}

/* ----- 中层能量卡 ----- */
.adv-energy {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.energy-card {
  background: var(--c-card, #fff);
  border-radius: 16px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  border: 3px solid rgba(255,255,255,0.7);
  min-height: 56px;
}
.adv-stage-3 .energy-card { border-color: rgba(255,255,255,0.18); box-shadow: 0 4px 14px rgba(0,0,0,0.35); }
.energy-icon { font-size: 26px; line-height: 1; }
.energy-body { display:flex; flex-direction:column; min-width:0; }
.energy-label { font-size: 13px; font-weight:700; color: var(--c-ink); opacity: 0.75; }
.adv-stage-3 .energy-label { color: #C4B5FD; }
.energy-value {
  font-size: 20px;
  font-weight: 900;
  color: var(--c-ink);
  line-height: 1.2;
  white-space: nowrap;
}
.adv-stage-3 .energy-value { color: #FFFFFF; }
.energy-progress {
  grid-column: 1 / -1;
  display:none;
}

/* ----- 下层：魔法键盘 ----- */
.adv-tools { display:flex; gap: 10px; flex-wrap: wrap; justify-content:center; }
.adv-tool-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  min-height: 48px;
  background: var(--c-accent);
  color: var(--c-ink);
  box-shadow: 0 4px 0 rgba(0,0,0,0.15);
  transition: transform 0.1s ease;
}
.adv-tool-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,0.15); }
.adv-tool-btn:disabled { opacity: 0.45; cursor: default; }
.adv-tool-btn.off { opacity: 0.55; }

/* 泡泡候选键（阶段1） */
.bubble-keys { display:flex; gap: clamp(20px, 5vw, 64px); align-items:center; justify-content:center; }
.bubble-key {
  width: clamp(96px, 11vw, 140px);
  height: clamp(96px, 11vw, 140px);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: clamp(56px, 6.5vw, 92px);
  font-weight: 900;
  color: #0C4A6E;
  font-family: 'Baloo 2', 'Chalkboard SE', 'PingFang SC', var(--font-sans);
  background: radial-gradient(circle at 32% 28%, #ffffff 0%, #E0F2FE 45%, #7DD3FC 100%);
  box-shadow: 0 0 0 6px rgba(255,255,255,0.7), 0 10px 22px rgba(12,74,110,0.28), inset 8px 10px 18px rgba(255,255,255,0.9), inset -8px -10px 18px rgba(125,211,252,0.55);
  animation: bubble-key-float 2.8s ease-in-out infinite;
  user-select: none;
  transition: transform 0.08s ease;
}
.bubble-key:nth-child(2) { animation-delay: 0.5s; }
.bubble-key:nth-child(3) { animation-delay: 1s; }
@keyframes bubble-key-float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.bubble-key.pressed { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(255,255,255,0.9), 0 0 34px rgba(253,224,71,0.95), 0 10px 22px rgba(12,74,110,0.28); }

/* 积木键（阶段2）—— 三行真实键位布局 */
.s2-kbd {
  flex: 1 1 auto;
  min-height: 110px;
  display:flex; flex-direction:column;
  gap: 5px;
  align-items:center;
  --s2-gap: 5px;
}
.s2-kbd-row {
  flex: 1 1 auto;
  min-height: 0;
  display:flex; gap: var(--s2-gap); align-items:center;
  width: max-content;
}
/* 三行标准键盘错位 */
.s2-kbd-home { margin-left: auto; padding-left: calc(0.5 * (100% - var(--s2-gap) * 8) / 9); }
.s2-kbd-home { margin-left: calc(var(--s2-key) * 0.5); }
.s2-kbd-bot  { margin-left: calc(var(--s2-key) * 0.25); }
.block-key.block-key-top, .block-key.block-key-bot { background: linear-gradient(160deg, #FBBF24, #D97706); }
.block-keys { display:flex; gap: 14px; align-items:flex-end; justify-content:flex-start; flex-wrap: wrap; max-width: 900px; margin: 0 auto; }
.block-key {
  height: 100%;
  aspect-ratio: 1 / 1;
  width: auto;
  min-width: 26px;
  max-width: clamp(56px, 6vw, 72px);
  border-radius: 12px;
  border: 4px solid #78350F;
  cursor: pointer;
  font-size: clamp(22px, 2.6vw, 40px);
  font-weight: 900;
  color: #FFF7ED;
  background: linear-gradient(160deg, #FBBF24, #D97706);
  box-shadow: inset 0 3px 0 rgba(255,255,255,0.4), 0 6px 0 #78350F, 0 10px 14px rgba(124,45,18,0.25);
  user-select: none;
  transition: transform 0.08s ease;
  padding: 0;
}
/* 顶行占位符：等宽不可见，保持对齐 */
.s2-key-empty { visibility: hidden; pointer-events: none; }
.block-key.home { background: linear-gradient(160deg, #FCD34D, #B45309); }
.block-key.pressed { transform: translateY(5px) scale(1.15); box-shadow: inset 0 3px 0 rgba(255,255,255,0.4), 0 3px 0 #78350F, 0 0 26px rgba(253,224,71,0.9); }
/* 阶段1泡泡求助高亮：强发光 + 放大 + 脉动环，确保孩子一眼看到答案 */
.bubble-key.finger-light {
  animation: bubble-hint-glow 1s ease-in-out infinite !important;
  transform: scale(1.2);
  z-index: 5;
  position: relative;
}
@keyframes bubble-hint-glow {
  0%,100% {
    box-shadow: 0 0 0 6px rgba(253,224,71,0.6), 0 0 30px 8px rgba(253,224,71,0.95), 0 0 60px 14px rgba(253,224,71,0.7), inset 12px 14px 22px rgba(255,255,255,0.85);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(253,224,71,0.85), 0 0 48px 14px rgba(253,224,71,1), 0 0 80px 22px rgba(253,224,71,0.85), inset 12px 14px 22px rgba(255,255,255,0.85);
  }
}
.block-key.finger-light {
  animation: finger-glow 1.1s ease-in-out infinite;
}
@keyframes finger-glow {
  0%,100% { box-shadow: inset 0 3px 0 rgba(255,255,255,0.4), 0 8px 0 #78350F, 0 0 0 rgba(253,224,71,0); }
  50% { box-shadow: inset 0 3px 0 rgba(255,255,255,0.4), 0 8px 0 #78350F, 0 0 30px rgba(253,224,71,0.95); }
}
.s2-finger-hint { font-size: 16px; font-weight:800; color:#7C2D12; background: rgba(255,255,255,0.75); padding: 6px 14px; border-radius: 999px; }

/* 儿童完整键盘（阶段3-6）—— 自适应填满父容器 */
.adv-kbd {
  flex: 1 1 auto;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.65));
  box-shadow: 0 10px 26px rgba(0,0,0,0.12);
  border: 2px solid rgba(255,255,255,0.8);
  max-width: 960px;
  width: 100%;
}
.adv-stage-3 .adv-kbd { background: linear-gradient(180deg, rgba(76,29,149,0.9), rgba(49,46,129,0.9)); border-color: rgba(167,139,250,0.4); }
.adv-kbd-row {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  gap: 4px;
  justify-content: center;
}
.akey {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  min-height: 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: clamp(12px, 1.6vh, 20px);
  font-weight: 800;
  color: var(--c-ink, #334155);
  background: #FFFFFF;
  box-shadow: 0 4px 0 rgba(100,116,139,0.45), inset 0 2px 0 rgba(255,255,255,0.9);
  display:flex; align-items:center; justify-content:center;
  user-select: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  padding: 0;
}
.adv-stage-3 .akey { background: #EDE9FE; color: #312E81; box-shadow: 0 4px 0 rgba(30,27,75,0.6); }
.akey.w15 { flex: 1.5; } .akey.w175 { flex: 1.75; } .akey.w2 { flex: 2; } .akey.w225 { flex: 2.25; } .akey.w6 { flex: 6; }
.akey.pressed { transform: translateY(3px) scale(1.15); box-shadow: 0 1px 0 rgba(100,116,139,0.45), 0 0 22px var(--c-accent-deep, #FDE047); }
.akey.next-key {
  background: #FDE047;
  color: #4C1D95;
  animation: next-glow 0.9s ease-in-out infinite;
  transform: scale(1.12);
  box-shadow: 0 4px 0 rgba(161,98,7,0.8), 0 0 28px #FACC15, 0 0 60px #FDE047, inset 0 2px 0 rgba(255,255,255,0.9);
}
.akey.soft-next {
  outline: 4px solid #FDE047;
  outline-offset: -2px;
  opacity: 0.9;
  animation: soft-pulse 1.4s ease-in-out infinite;
}
@keyframes next-glow {
  0%,100% { box-shadow: 0 4px 0 rgba(161,98,7,0.8), 0 0 20px #FACC15, 0 0 40px #FDE047, inset 0 2px 0 rgba(255,255,255,0.9); transform: scale(1.08); }
  50% { box-shadow: 0 4px 0 rgba(161,98,7,0.8), 0 0 40px #FACC15, 0 0 80px #FDE047, inset 0 2px 0 rgba(255,255,255,0.9); transform: scale(1.16); }
}
@keyframes soft-pulse {
  0%,100% { outline-color: #FDE047; opacity: 0.85; }
  50% { outline-color: #FACC15; opacity: 1; }
}
.akey.shift-on { background: var(--c-accent-deep, #F59E0B); color:#fff; }

/* ----- 错误三态反馈（仅：轻摇头 / 软下沉 / 变灰） ----- */
.err-shake-soft { animation: err-shake-soft 0.4s ease !important; }
@keyframes err-shake-soft {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-7px) rotate(-4deg); }
  50% { transform: translateX(6px) rotate(3deg); }
  75% { transform: translateX(-4px) rotate(-2deg); }
}
.err-sink { animation: err-sink 0.45s ease !important; }
@keyframes err-sink {
  0% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(12px) scale(0.92); opacity: 0.6; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.err-gray { animation: err-gray 0.5s ease !important; }
@keyframes err-gray {
  0% { filter: none; }
  50% { filter: grayscale(0.9); opacity: 0.55; }
  100% { filter: none; opacity: 1; }
}

/* ----- 鼓励气泡 ----- */
.adv-encourage {
  position: absolute;
  z-index: 9;
  background: rgba(255,255,255,0.95);
  color: var(--c-ink);
  font-size: 18px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  animation: encourage-pop 1.1s ease forwards;
  pointer-events: none;
  white-space: nowrap;
}
@keyframes encourage-pop {
  0% { transform: translateY(10px) scale(0.7); opacity: 0; }
  25% { transform: translateY(0) scale(1.05); opacity: 1; }
  75% { transform: translateY(-6px) scale(1); opacity: 1; }
  100% { transform: translateY(-14px) scale(0.95); opacity: 0; }
}

/* ----- 收集物飞出 ----- */
.fly-item {
  position: absolute;
  z-index: 8;
  font-size: 34px;
  pointer-events: none;
  animation: fly-to-hero 0.7s ease-in forwards;
}
@keyframes fly-to-hero {
  0% { transform: translate(0,0) scale(0.6) rotate(0deg); opacity: 0; }
  20% { opacity: 1; transform: translate(0,-10px) scale(1.2) rotate(-10deg); }
  100% { transform: var(--fly-end, translate(120px,-120px)) scale(0.7) rotate(20deg); opacity: 0; }
}

/* 彗星破碎 / 星星飞溅 */
.star-burst { position:absolute; font-size:26px; pointer-events:none; animation: star-burst 0.8s ease-out forwards; z-index: 7; }
@keyframes star-burst {
  0% { transform: translate(0,0) scale(0.5); opacity: 1; }
  100% { transform: var(--burst-end, translate(0,-80px)) scale(1.3); opacity: 0; }
}

/* ----- 遮罩层（暂停 / 庆祝 / 回信） ----- */
.adv-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15,23,42,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}
.adv-overlay-card {
  background: #fff;
  border-radius: 28px;
  padding: 36px 44px;
  text-align: center;
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  animation: celebrate-in 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes celebrate-in {
  0% { transform: scale(0.6) translateY(30px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.adv-overlay-emoji { font-size: 64px; margin-bottom: 8px; animation: hero-bounce 0.8s ease; }
.adv-overlay-card h2 { font-size: 28px; margin: 6px 0; color: #1a1a2e; }
.adv-overlay-card p { font-size: 17px; color: #6b7280; line-height: 1.7; margin: 8px 0 20px; }
.adv-big-btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 16px 28px;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  margin: 8px 0;
  background: linear-gradient(135deg, #FDE047, #F59E0B);
  color: #78350F;
  box-shadow: 0 6px 0 #B45309;
  transition: transform 0.1s;
  min-height: 56px;
}
.adv-big-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #B45309; }
.adv-big-btn.secondary { background: linear-gradient(135deg, #7DD3FC, #38BDF8); color: #0C4A6E; box-shadow: 0 6px 0 #0369A1; }
.adv-overlay-card .adv-ghost-btn { margin-top: 6px; background: #F1F5F9; color: #475569; }
.adv-reward-row { font-size: 40px; margin: 10px 0; letter-spacing: 6px; }
.adv-report-stats { display:flex; gap: 12px; justify-content:center; margin: 14px 0; }
.adv-report-stat { background: #F8FAFC; border-radius: 14px; padding: 10px 16px; min-width: 86px; }
.adv-report-stat b { display:block; font-size: 24px; color: #1a1a2e; }
.adv-report-stat span { font-size: 13px; color: #94a3b8; font-weight:700; }

/* ----- 冒险地图首页：沉浸式卷轴地图 ----- */
.adv-map-hero {
  background: linear-gradient(135deg, #FCE7F3 0%, #E0F2FE 50%, #DDD6FE 100%);
  border-radius: 24px;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 8px 24px rgba(124,58,237,0.18);
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.adv-map-hero::before {
  content: '🗺️'; position: absolute; right: 60px; top: 50%;
  transform: translateY(-50%); font-size: 88px; opacity: 0.18;
  filter: drop-shadow(0 4px 8px rgba(124,58,237,0.3));
}
.adv-map-hero-left { position: relative; z-index: 1; }
.adv-map-hero h1 {
  font-size: 30px; margin: 0 0 6px; color: #312E81;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}
.adv-map-hero p {
  margin: 0; color: #4C1D95; font-weight: 700; font-size: 15px;
}
.adv-map-hero p b {
  background: linear-gradient(135deg, #FDE047, #FB923C);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 17px;
}
.adv-map-hero-right { position: relative; z-index: 1; }

.adv-continue-btn {
  border: none;
  border-radius: 999px;
  padding: 16px 34px;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, #FDE047, #FB923C);
  color: #7C2D12;
  box-shadow: 0 6px 0 #B45309, 0 8px 20px rgba(251,146,60,0.4);
  transition: transform 0.1s, box-shadow 0.1s;
  min-height: 56px;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.adv-continue-btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 0%, transparent 40%, rgba(255,255,255,0.45) 50%, transparent 60%, transparent 100%);
  transform: translateX(-100%);
  animation: adv-btn-shine 3.6s ease-in-out infinite;
}
.adv-continue-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #B45309, 0 4px 10px rgba(251,146,60,0.4); }
.adv-continue-btn.done {
  background: linear-gradient(135deg, #A78BFA, #7C3AED);
  color: #FFFFFF;
  box-shadow: 0 6px 0 #5B21B6, 0 8px 20px rgba(124,58,237,0.45);
}
.adv-continue-btn.done:active { box-shadow: 0 2px 0 #5B21B6, 0 4px 10px rgba(124,58,237,0.4); }

@keyframes adv-btn-shine {
  0%, 60% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---- 沉浸式地图画布 ---- */
.adv-map-canvas { margin-top: 4px; }

.adv-map-svg-wrap {
  position: relative;
  background: linear-gradient(180deg, #F0F9FF 0%, #E0F2FE 100%);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(56, 89, 175, 0.16), inset 0 0 0 1px rgba(255,255,255,0.6);
  aspect-ratio: 1200 / 600;
  max-height: 580px;
}
.adv-map-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* SVG 内嵌元素的入场动画 */
.island-inner {
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-box: fill-box;
  transform-origin: center;
}
.island.is-locked { cursor: not-allowed; }
.island.is-locked .island-hero { filter: grayscale(0.8); opacity: 0.5; }
.island:hover .island-inner { transform: translate(0, -6px) scale(1.06); }
.island.is-current:hover .island-inner { transform: translate(0, -8px) scale(1.08); }

.island-enter {
  animation: island-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
@keyframes island-pop {
  0% { opacity: 0; transform: translateY(40px) scale(0.6); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* 岛屿光晕(进行中 - 脉冲) */
.island-halo { transform-origin: center; transform-box: fill-box; animation: halo-pulse 2.4s ease-in-out infinite; }
.island.is-done .island-halo { animation-duration: 4s; }
@keyframes halo-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.12); opacity: 1; }
}

/* 岛屿上的角色(进行中) */
.island.is-current .island-hero { animation: hero-bounce 1.6s ease-in-out infinite; }
@keyframes hero-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.island.is-current .island-player {
  animation: player-hop 1.6s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes player-hop {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.08); }
}

/* "你在这里"气泡(进行中) */
.island.is-current .island-player-bubble {
  animation: bubble-wiggle 2.8s ease-in-out infinite;
  transform-origin: center; transform-box: fill-box;
}
@keyframes bubble-wiggle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* 已完成岛屿 - 星星徽章脉冲 */
.island.is-done .island-stars {
  animation: star-twinkle 2.2s ease-in-out infinite;
  transform-origin: center; transform-box: fill-box;
}
@keyframes star-twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.18) rotate(8deg); }
}

/* 未解锁岛屿 - 锁 */
.island.is-locked .island-lock {
  animation: lock-shake 3.5s ease-in-out infinite;
  transform-origin: center; transform-box: fill-box;
}
@keyframes lock-shake {
  0%, 88%, 100% { transform: translateX(0) rotate(0); }
  92% { transform: translateX(-3px) rotate(-5deg); }
  96% { transform: translateX(3px) rotate(5deg); }
}

/* 路径动画 */
.map-path-done {
  animation: path-fill 1.2s ease-out backwards;
  animation-delay: 0.6s;
}
.map-path-done-stripe {
  stroke-dasharray: 14 14;
  animation: stripe-move 1.2s linear infinite;
  animation-delay: 1.5s;
}
@keyframes path-fill {
  from { stroke-dasharray: 0 1600; }
  to { stroke-dasharray: 1600 0; }
}
@keyframes stripe-move {
  to { stroke-dashoffset: -28; }
}

.map-path-todo-stripe {
  animation: stripe-move-slow 5s linear infinite;
}
@keyframes stripe-move-slow {
  to { stroke-dashoffset: -28; }
}

/* 云朵飘动 */
.cloud-layer .cloud {
  animation: cloud-drift 28s linear infinite;
}
.cloud-a { animation-delay: 0s; }
.cloud-b { animation-delay: -7s; animation-duration: 36s; }
.cloud-c { animation-delay: -14s; animation-duration: 32s; }
.cloud-d { animation-delay: -21s; animation-duration: 24s; }
@keyframes cloud-drift {
  from { transform: translateX(-200px); }
  to { transform: translateX(1400px); }
}

/* 波浪 */
.wave-1 { animation: wave-flow 4s ease-in-out infinite; }
.wave-2 { animation: wave-flow 5.5s ease-in-out infinite reverse; }
.wave-3 { animation: wave-flow 7s ease-in-out infinite; }
@keyframes wave-flow {
  0%, 100% { transform: translateX(-10px); }
  50% { transform: translateX(10px); }
}

/* 漂浮物 */
.float-icon { animation: float-up-down 3s ease-in-out infinite; }
.float-icon:nth-of-type(1) { animation-delay: 0s; }
.float-icon:nth-of-type(2) { animation-delay: 0.6s; }
.float-icon:nth-of-type(3) { animation-delay: 1.2s; }
.float-icon:nth-of-type(4) { animation-delay: 1.8s; }
.float-icon:nth-of-type(5) { animation-delay: 2.4s; }
@keyframes float-up-down {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-12px) rotate(4deg); }
}

/* 远山视差 */
.mountain-layer {
  animation: mountain-pan 24s ease-in-out infinite alternate;
}
@keyframes mountain-pan {
  from { transform: translateX(-8px); }
  to { transform: translateX(8px); }
}

/* 草丛晃动 */
.grass-layer text { animation: grass-sway 3s ease-in-out infinite; }
.grass-layer text:nth-child(2n) { animation-delay: 0.6s; animation-duration: 3.6s; }
.grass-layer text:nth-child(3n) { animation-delay: 1.2s; animation-duration: 4.2s; }
@keyframes grass-sway {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}

/* 角标 */
.map-corner {
  position: absolute;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 800;
  color: #4C1D95;
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  pointer-events: none;
  white-space: nowrap;
}
.map-corner-tl { top: 12px; left: 12px; }
.map-corner-tr { top: 12px; right: 12px; background: linear-gradient(135deg, #FDE047, #FB923C); color: #7C2D12; }

/* ---- 首页沉浸式地图：横铺满屏、一屏展示(无滚动) ---- */
.main-content.home-mode {
  padding: 4px 10px 2px;
  overflow: hidden;
}
/* 首页模式隐藏底部版权栏，给地图多 28px 垂直空间 */
.main-content.home-mode ~ .app-footer {
  display: none;
}
/* ⚠️⚠️ 这三条里的 .active 一个都不能省。
   规则本身是"home-mode 下让 iframe 产品页撑满"，但 home-mode 是加在 .main-content 上的
   （不是加在被选中的 page 上）—— 少了 .active，就变成"只要切到其中任一产品页，
   其他产品页也跟着 display:flex"，几个 page 在 .main-content 里上下排，
   而 .main-content.home-mode 有 overflow:hidden，屏幕上只露最上面那个。
   症状：点「同步练习」看到的还是海岛，而且不报错。2026-09-28 加 sync 时踩过一次，
   同天加 cn 是第二个同款页 —— 每加一个就得把这三组选择器同步补一条。 */
.main-content.home-mode > .page#page-home.active,
.main-content.home-mode > .page#page-sync.active,
.main-content.home-mode > .page#page-cn.active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
/* 首页 = 海岛冒险打字闯关、同步练习 = 微缩世界单词闯关（英语）/ 墨迹书院（语文）：
   三者都是独立 html 以 iframe 嵌入（隔离 id/类名冲突）。flex:1 让 iframe 吃满 page
   的全部高度，外部不出现双滚动条。 */
.main-content.home-mode > .page#page-home.active .island-frame,
.main-content.home-mode > .page#page-sync.active .sync-frame,
.main-content.home-mode > .page#page-cn.active .cn-frame {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  border: 0;
  display: block;
  border-radius: 14px;
  background: #062A4A;
}
/* 同步练习页自带深紫底（sync.html 的 --bg:#1B1233），iframe 未加载完时先用同色兜底，
   否则会先闪一下海岛的深蓝。 */
.main-content.home-mode > .page#page-sync.active .sync-frame { background: #1B1233; }
/* 语文页自带暖墨底（cn.html 的 body 是 #4A3520 → #1B140E 的径向渐变），
   同样先用近似纯色兜底，避免未加载完时闪一下海岛的深蓝。 */
.main-content.home-mode > .page#page-cn.active .cn-frame { background: #2E2015; }

/* ===== 同步练习：两步选择浮层（科目 → 教材）=====
   位置由 App.openSyncPicker() 现算（锚在触发它的导航按钮正下方），
   z-index 取 1000：压得住所有 page 内容，又低于 modal（2000）。 */
.sync-pick {
  position: fixed;
  z-index: 1000;
  width: 306px;
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  animation: syncPickIn .16s ease-out;
}
.sync-pick[hidden] { display: none; }
@keyframes syncPickIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.sync-pick-hd { display: flex; align-items: center; gap: 8px; padding: 2px 2px 10px; }
.sync-pick-hd button {
  border: none; background: transparent; cursor: pointer; color: var(--text-muted);
  font-size: 15px; line-height: 1; padding: 3px 6px; border-radius: 7px;
  transition: all var(--transition);
}
.sync-pick-hd button:hover { background: var(--bg-hover); color: var(--text-primary); }
.sync-pick-hd button[hidden] { display: none; }
/* ⚠️ 2026-09-29：这个浮层里**只留主标题**，所以下面三条已经删掉了 ——
   `.sync-pick-tt span`（表头副标题）、`.sync-opt-t em`（选项副标题）、
   `.sync-pick-note`（底部说明）。将来要加回副标题，得把这三条一起写回来。 */
.sync-pick-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sync-pick-tt b { font-size: 13px; color: var(--text-primary); }

.sync-pick-body { display: flex; flex-direction: column; gap: 7px; }
.sync-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: 11px;
  background: var(--bg-primary); cursor: pointer;
  transition: all var(--transition); font: inherit;
}
.sync-opt:hover { border-color: var(--accent); background: var(--accent-bg); transform: translateX(2px); }
.sync-opt-i { font-size: 20px; flex: 0 0 auto; }
.sync-opt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sync-opt-t b { font-size: 13px; color: var(--text-primary); }
.sync-opt-a { flex: 0 0 auto; font-size: 13px; color: var(--text-muted); }
.sync-opt.hot { border-color: var(--accent); background: var(--accent-bg); }
.sync-opt.hot .sync-opt-a { color: var(--accent); }
.sync-opt.soon { opacity: .82; }

.sync-soon { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; padding: 8px 4px 4px; }
.sync-soon-i { font-size: 30px; }
.sync-soon b { font-size: 13px; color: var(--text-primary); }
.sync-soon span { font-size: 11px; color: var(--text-muted); line-height: 1.7; }
.sync-opt-ghost {
  margin-top: 3px; border: 1px solid var(--border); background: var(--bg-primary);
  color: var(--text-secondary); font: inherit; font-size: 12px;
  padding: 6px 12px; border-radius: 9px; cursor: pointer; transition: all var(--transition);
}
.sync-opt-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== 导航栏响应式：按钮到 5 个之后，1240px 以下改用流式布局 =====
   宽屏是三段 absolute 布局（logo 左 / nav 居中 / 用户区右），而 .navbar-nav 的宽度
   等于**内容宽度、不会自己收缩** —— 内容一变宽就直接压到右侧用户区上，且不报错。
   2026-09-28 加第 5 个按钮「同步练习」后，1024 视口实测压掉 7px
   （更早四枚按钮时 1024 也只剩 12px 余量，本来就贴着）。
   1240 以下改成常规流式：nav 占据 logo 与用户区之间的弹性空间，装不下才横滚。
   ★ 首尾子项 margin:auto 是关键写法：空间够时视觉仍然居中（与宽屏观感一致），
     空间不够时自动贴左并可横滚 —— 若直接写 justify-content:center，
     溢出后左边的按钮会被裁掉且滚不回去（经典坑）。
   ⚠️ .navbar-user 只能改成 position:relative，【不能】static：
     头像下拉菜单要靠它做定位上下文，static 会让下拉菜单跑到页面别处。 */
@media (max-width: 1240px) {
  .navbar { padding: 0 16px; gap: 8px; }
  .navbar-logo { position: static; transform: none; flex-shrink: 0; }
  .navbar-user {
    position: relative; right: auto; top: auto; transform: none; flex-shrink: 0;
  }
  .navbar-nav {
    position: static;
    transform: none;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .navbar-nav::-webkit-scrollbar { display: none; }
  .navbar-nav > .nav-btn:first-child { margin-left: auto; }
  .navbar-nav > .nav-btn:last-child { margin-right: auto; }
  .nav-btn { padding: 7px 12px; font-size: 13.5px; white-space: nowrap; }
}
/* 再窄一档：把 logo 文字（"指尖进阶 TypeUp"）收掉，只留图标 ——
   实测 900 视口导航还差 46px，收掉文字能省出约 80px，把宽度让给按钮，
   免得一进来就是"能滚的导航"。640 断点里也有同一条（那里是移动端布局）。 */
@media (max-width: 1000px) {
  .navbar-logo span { display: none; }
}
.main-content.home-mode .adv-map-hero {
  flex: 0 0 auto;
  padding: 6px 14px;
  margin-bottom: 4px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(124,58,237,0.14);
}
.main-content.home-mode .adv-map-hero::before { font-size: 36px; right: 22px; opacity: 0.14; }
.main-content.home-mode .adv-map-hero h1 { font-size: 17px; margin-bottom: 1px; }
.main-content.home-mode .adv-map-hero p { font-size: 11px; }
.main-content.home-mode .adv-map-hero p b { font-size: 13px; }
.main-content.home-mode .adv-continue-btn {
  padding: 6px 16px; font-size: 14px; min-height: 32px;
  box-shadow: 0 3px 0 #B45309, 0 5px 12px rgba(251,146,60,0.35);
}
.main-content.home-mode .adv-continue-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #B45309; }
.main-content.home-mode .adv-map-canvas {
  flex: 1 1 0;
  min-height: 0;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.main-content.home-mode .adv-map-svg-wrap {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.main-content.home-mode .adv-map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---- 冒险页：整页一屏（与上面 home-mode 同一套做法）----
   起因：.adv-shell 原来靠 `height: calc(100vh - 118px)` + `min-height: 560px` 定高。
   在用户实测的 1438×638 窗口里，减法算出 520，却被 min-height:560 反超 ——
   shell 底沿跑到 664、比视口底还低 26px，于是"要滚一下才看得全"，
   而键盘与双手恰好是最底下那一块。用魔法数字减窗口高度，就一定会在某个
   尺寸上失效（这里失效的临界点就是 638 附近，正是笔记本的常见高度）。
   改成 flex 填满父级后，shell 的高度与窗口高度【解耦】，不再有临界点。 */
.main-content.adv-mode {
  padding: 6px 12px 8px;
  overflow-y: auto;      /* 只有窗口真矮到装不下时才滚，正常尺寸下不出滚动条 */
  overflow-x: hidden;
}
.main-content.adv-mode ~ .app-footer { display: none; }
/* ⚠️ 这里【不能】给 .main-content 写 display:flex：
   showPage() 会往它身上打内联的 style="display:block"（切页时显隐用），
   内联样式永远赢过类选择器，于是 flex 那条规则是死的、不报错也不生效。
   改走 home-mode 已验证过的路子：页面自己 height:100%，父级仍是 block。 */
.main-content.adv-mode > .page#page-adventure {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
/* ⚠️ width:100% 不是多余的：.adv-shell 自带 `margin: 0 auto`，
   而 margin:auto 在【flex 列】里会让它退化成"收缩到内容宽度"并水平居中
   （这正是它原来靠 block 布局居中的手法）。父级一旦变成 flex，
   键盘的收缩宽度只有约 550px —— 表现是键距从 71 掉到 39、整张键盘塌成一小团，
   而 CSS 里一个报错都没有。width:100% + max-width:1180px 才是这里的正解。 */
.main-content.adv-mode .adv-shell {
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  min-height: 420px;     /* 只作"再矮就允许滚动"的底线，不再硬撑出溢出 */
}

/* ---- 剧场顶栏：右簇（工具 + 暂停）+ 标题绝对居中 ----
   工具从键盘区搬上来之后，顶栏右侧会随岛变宽（岛 12/13 多一个「收起键盘」）。
   用 space-between 排三块的话，标题会被挤得整体左移 —— 而标题是对齐舞台中轴的，
   一动就能看出来。改成绝对居中，左右两边宽度随便变。 */
.adv-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.adv-topbar-tt {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 44%;
}
/* 顶栏里的工具做成"和幽灵按钮同高"，但保留琥珀色：
   它是整条顶栏里唯一的黄色，孩子卡住时一眼能找到。 */
.adv-topbar-right .adv-tool-btn {
  min-height: 34px;
  padding: 5px 14px;
  font-size: 13.5px;
  box-shadow: 0 3px 0 rgba(180, 83, 9, .5), 0 6px 12px rgba(0, 0, 0, .10);
}
.adv-topbar-right .adv-tool-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(180, 83, 9, .5); }

/* ---- 阶段选择页：六张冒险关卡卡片 grid ---- */
.asc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.asc-card {
  position: relative;
  border-radius: 18px;
  padding: 18px 16px 14px;
  border: 2px solid rgba(255,255,255,0.7);
  box-shadow: 0 6px 18px rgba(15,23,42,0.10);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
}
.asc-card.is-open,
.asc-card.is-done {
  cursor: pointer;
}
.asc-card.is-open:hover,
.asc-card.is-done:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(15,23,42,0.18);
}
.asc-card.is-current {
  border: 2px dashed #8B5CF6;
  box-shadow: 0 0 0 3px rgba(139,92,246,0.25), 0 6px 18px rgba(139,92,246,0.12);
}
.asc-hero {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 6px;
}
.asc-name {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
}
.asc-goal {
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 10px;
  flex: 1;
}
.asc-create {
  background: rgba(255,255,255,0.8);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  display: inline-block;
  align-self: flex-start;
  cursor: pointer;
  color: inherit;
}
.asc-create:hover {
  background: rgba(255,255,255,1);
}
.asc-collect {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.9;
}
.asc-collect b {
  font-size: 15px;
  margin: 0 2px;
}
.asc-go-progress {
  opacity: 0.85;
  font-size: 11px;
  margin-left: 4px;
}
.asc-badge {
  position: absolute;
  top: 12px;
  right: 52px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.asc-badge.done { color: #0891B2; background: #CFFAFE; }
.asc-badge.current { color: #5B21B6; background: #EDE9FE; border-color: #8B5CF6; }
.asc-badge.open { color: #1E40AF; background: #DBEAFE; }
.asc-badge.locked { color: #6B7280; background: #E5E7EB; }

@media (max-width: 900px) {
  .asc-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========== 游戏化结果弹窗 gr-* ========== */
.result-card {
  background: linear-gradient(160deg, #FEF3C7 0%, #FDE68A 50%, #FEF9C3 100%) !important;
  border-radius: 24px;
  padding: 28px 26px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.35), 0 0 0 3px rgba(245, 158, 11, 0.15);
  position: relative;
  overflow: hidden;
}
.gr-stars-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.gr-particle {
  position: absolute;
  top: 30%;
  animation: gr-pop 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
}
@keyframes gr-pop {
  0% { transform: translateY(20px) scale(0.3) rotate(0deg); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(-60px) scale(1.4) rotate(180deg); opacity: 0; }
}
.gr-rank {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid;
  font-size: 44px;
  font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  margin: 10px auto 6px;
  box-shadow: 0 8px 20px rgba(139,92,246,0.25);
  animation: gr-ring 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes gr-ring {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.gr-title { font-size: 18px; font-weight: 800; color: #312E81; margin: 2px 0 4px; }
.gr-gained {
  font-size: 42px; font-weight: 900;
  background: linear-gradient(135deg, #8B5CF6, #3B82F6, #22D3EE);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none;
  animation: gr-count 0.8s ease-out;
}
.gr-star-lg { font-size: 32px; margin-left: 4px; }
@keyframes gr-count {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.gr-badges { display: flex; gap: 8px; justify-content: center; margin: 6px 0; flex-wrap: wrap; }
.gr-badge { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.gr-badge.combo { background: #EDE9FE; color: #7C3AED; }
.gr-badge.perfect { background: #DBEAFE; color: #2563EB; }
.gr-badge.first { background: #CFFAFE; color: #0891B2; }
.gr-breakdown {
  display: flex; gap: 4px; justify-content: center; flex-wrap: wrap;
  padding: 10px 12px; background: rgba(255,255,255,0.6);
  border-radius: 12px; font-size: 12px; color: #6B7280;
  margin: 8px 0;
}
.gr-breakdown b { color: #8B5CF6; font-size: 15px; }
.gr-stats {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 10px 0;
}
.gr-stat {
  background: rgba(255,255,255,0.75); border-radius: 14px;
  padding: 10px 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.gr-stat-num { font-size: 22px; font-weight: 800; color: #312E81; }
.gr-stat-lbl { font-size: 11px; color: #6B7280; margin-top: 2px; }
.gr-total { font-size: 13px; color: #6B7280; margin: 6px 0 12px; }
.gr-total b { color: #8B5CF6; }
.gr-actions { display: flex; gap: 10px; justify-content: center; }
.gr-btn {
  border: none; border-radius: 14px; padding: 12px 20px;
  font-size: 14px; font-weight: 800; cursor: pointer;
  transition: transform 0.1s;
}
.gr-btn.primary {
  background: linear-gradient(135deg, #8B5CF6, #3B82F6);
  color: #fff; box-shadow: 0 4px 0 #5B21B6, 0 6px 14px rgba(139,92,246,0.4);
}
.gr-btn.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #5B21B6; }
.gr-btn.ghost {
  background: rgba(255,255,255,0.85); color: #4B5563;
}
.gr-btn.ghost:active { transform: translateY(2px); }
.gr-btn.full { width: 100%; }

/* ========== 游客登录引导弹窗 ========== */
#guestLoginModal.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(6px);
  animation: gl-fadeIn 0.25s ease;
}
@keyframes gl-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.guest-login-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border-radius: 24px;
  width: 380px;
  max-width: 90vw;
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow: 0 25px 80px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(139, 92, 246, 0.1);
  animation: gl-popIn 0.3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes gl-popIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.guest-login-emoji {
  font-size: 56px;
  margin-bottom: 12px;
  line-height: 1;
}
.guest-login-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
  color: #1E293B;
}
.guest-login-desc {
  margin: 0 0 20px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #64748B;
}
.guest-login-progress {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #F0F9FF 0%, #FDF4FF 100%);
  border-radius: 14px;
  font-size: 13px;
  color: #475569;
}
.guest-login-progress b {
  color: #1E293B;
  font-weight: 800;
}
.guest-login-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ========== 登录页信息弹窗 ========== */
#infoModal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2100;
  backdrop-filter: blur(6px);
}
#infoModal.show { display: flex; animation: im-fade .25s ease; }
@keyframes im-fade { from { opacity: 0; } to { opacity: 1; } }
.info-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border-radius: 22px;
  width: 460px;
  max-width: 92vw;
  max-height: 80vh;
  overflow-y: auto;
  padding: 0;
  box-shadow: 0 25px 80px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(99, 102, 241, 0.08);
  animation: im-pop .3s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes im-pop { from { transform: scale(.88); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.info-head {
  background: linear-gradient(135deg, #6366F1 0%, #3B82F6 50%, #8B5CF6 100%);
  border-radius: 22px 22px 0 0;
  padding: 28px 32px 24px;
  color: #fff;
  position: relative;
}
.info-head .info-icon { font-size: 36px; line-height: 1; margin-bottom: 8px; }
.info-head h3 { margin: 0; font-size: 20px; font-weight: 900; }
.info-head .info-sub { margin: 4px 0 0; font-size: 13px; opacity: .85; }
.info-close {
  position: absolute;
  top: 16px; right: 18px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.info-close:hover { background: rgba(255, 255, 255, 0.4); }
.info-body { padding: 24px 32px 28px; }
.info-body h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: #1E293B;
}
.info-body p {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #475569;
}
.info-body ul {
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.8;
  color: #475569;
}
.info-body ul li { margin-bottom: 4px; }
.info-body .info-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #F0F9FF 0%, #FDF4FF 100%);
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 13.5px;
  color: #334155;
}
.info-body .info-contact-row b { color: #1E293B; font-weight: 800; }
.info-body .info-faq {
  border-top: 1px solid #E2E8F0;
  padding-top: 16px;
  margin-top: 4px;
}
.info-body .info-faq-item {
  margin-bottom: 12px;
}
.info-body .info-faq-q {
  font-size: 13.5px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 4px;
}
.info-body .info-faq-a {
  font-size: 13px;
  color: #64748B;
  line-height: 1.6;
}

/* ========== 星星能量王者榜 lb-* ========== */
#page-leaderboard .leaderboard-container { padding: 0; }
.lb-header-bar {
  background: linear-gradient(135deg, #EDE9FE 0%, #E0F2FE 50%, #DDD6FE 100%);
  border-radius: 20px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(139,92,246,0.2);
}
.lb-header-title {
  font-size: 22px; font-weight: 900;
  background: linear-gradient(135deg, #8B5CF6, #3B82F6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lb-header-sub { font-size: 13px; color: #6366F1; margin-top: 4px; }
.lb-header-sub b { color: #8B5CF6; }
.lb-table { display: flex; flex-direction: column; gap: 10px; }
.lb-row {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(15,23,42,0.06);
  border: 2px solid transparent;
  position: relative;
  transition: transform 0.15s;
}
.lb-row:hover { transform: translateX(3px); }
.lb-row.me {
  background: linear-gradient(135deg, #EDE9FE, #E0F2FE);
  border-color: #8B5CF6;
  box-shadow: 0 4px 14px rgba(139,92,246,0.3);
}
.lb-row.top {
  background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
}
.lb-medal {
  font-size: 28px; width: 44px; text-align: center; flex-shrink: 0;
}
.lb-rank-num {
  font-size: 14px; font-weight: 700; color: #94A3B8;
}
.lb-user { flex-shrink: 0; min-width: 120px; }
.lb-name { font-size: 15px; font-weight: 700; color: #1E293B; }
.lb-me-tag { font-size: 11px; color: #8B5CF6; margin-left: 4px; font-weight: 800; }
.lb-title { font-size: 11px; font-weight: 700; margin-top: 2px; }
.lb-bar {
  flex: 1; height: 10px; background: #F1F5F9;
  border-radius: 999px; overflow: hidden;
  min-width: 60px;
}
.lb-bar-fill {
  height: 100%; border-radius: 999px; transition: width 0.6s ease;
  background: linear-gradient(90deg, #8B5CF6, #3B82F6) !important;
}
.lb-row.top:first-child .lb-bar-fill { background: linear-gradient(90deg, #8B5CF6, #22D3EE) !important; }
.lb-score-cell { text-align: right; flex-shrink: 0; min-width: 110px; }
.lb-star-num { font-size: 16px; font-weight: 800; color: #8B5CF6; display: block; }
.lb-mini { font-size: 11px; color: #94A3B8; }

/* ========== 数据中心 v2（dc2-*）2026-09-27 ==========
   旧 dc-* 那一套（冒险图鉴 / WPM 双线图 / 易错键条）随旧版面一并删除。
   它读的是 practiceHistory / errorKeyStats —— 那两本账只由**已下线的老打字冒险**
   在写，与现在真实在跑的两个产品（海岛 iframe / KET）无关。留着不只是死代码，
   更糟的是会让下一个人以为页面上还有第二条数据源。
   新样式按「多产品」设计：产品卡就是网格项，加产品不用改样式。 */

#page-data { overflow-y: auto; }

/* ---- 顶部总览 ---- */
.dc2-hero {
  display: flex; gap: 18px; align-items: stretch;
  background: linear-gradient(135deg, #EDE9FE 0%, #E0F2FE 50%, #DDD6FE 100%);
  border-radius: 22px; padding: 18px 20px; margin-bottom: 14px;
  box-shadow: 0 10px 26px rgba(139,92,246,.16), inset 0 0 0 1px rgba(255,255,255,.6);
}
.dc2-hero-main {
  text-align: center; background: rgba(255,255,255,.62); border-radius: 16px;
  padding: 12px 20px; flex-shrink: 0; min-width: 130px;
}
.dc2-hero-icon { font-size: 28px; animation: dc2-float 2.4s ease-in-out infinite; }
@keyframes dc2-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(10deg); }
}
.dc2-hero-num {
  font-size: 40px; font-weight: 900; line-height: 1.05;
  background: linear-gradient(135deg, #8B5CF6, #3B82F6, #22D3EE);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dc2-hero-lbl { font-size: 12px; font-weight: 700; color: #6366F1; }
.dc2-hero-sub { font-size: 11px; color: #8B93B0; margin-top: 3px; }
/* 3 格：删掉「已体验产品」后剩 次数 / 时长 / 连续打卡，列数必须跟着改，否则右侧空一格 */
.dc2-hero-stats { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.dc2-hs {
  background: rgba(255,255,255,.72); border-radius: 14px; padding: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.dc2-hs b { font-size: 19px; font-weight: 800; color: #4C1D95; }
.dc2-hs span { font-size: 11px; font-weight: 600; color: #6366F1; }

/* ---- 区块 ---- */
.dc2-sec { margin-bottom: 16px; }
.dc2-sec-title { font-size: 15px; font-weight: 800; color: #4C1D95; margin-bottom: 10px; padding-left: 2px; }

/* ---- 产品战报卡 ---- */
.dc2-prod-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.dc2-prod {
  position: relative; overflow: hidden;
  background: #fff; border-radius: 18px; padding: 15px 16px 12px;
  border: 2px solid #F1F5F9; box-shadow: 0 3px 12px rgba(15,23,42,.06);
}
.dc2-prod::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--p1), var(--p2));
}
.dc2-prod-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dc2-prod-emoji {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 21px;
  background: linear-gradient(150deg, var(--p1), var(--p2));
  box-shadow: 0 3px 8px rgba(15,23,42,.14);
}
.dc2-prod-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dc2-prod-name b { font-size: 15px; color: var(--ink); }
.dc2-prod-name span { font-size: 11px; color: #8B93B0; }
.dc2-badge { flex-shrink: 0; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.dc2-badge.active { background: #DBEAFE; color: #1D4ED8; }
.dc2-badge.done { background: #D1FAE5; color: #047857; }
.dc2-badge.todo { background: #EEF2F7; color: #8B93B0; }

.dc2-prog { margin-bottom: 10px; }
.dc2-prog-top {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: #64748B; margin-bottom: 5px;
}
.dc2-prog-top b { font-size: 12px; color: var(--ink); }
.dc2-prog-bar { height: 9px; border-radius: 999px; background: #EEF2F7; overflow: hidden; }
.dc2-prog-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--p1), var(--p2)); transition: width .5s ease;
}

.dc2-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-bottom: 11px; }
.dc2-metric {
  min-width: 0; background: #F8FAFF; border-radius: 12px; padding: 8px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.dc2-metric .i { font-size: 14px; }
.dc2-metric b { font-size: 13px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.dc2-metric .l { font-size: 10px; color: #8B93B0; }

.dc2-prod-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 9px; border-top: 1px dashed #E8EDF5;
}
.dc2-prod-foot > span { font-size: 11px; color: #8B93B0; }
.dc2-cta {
  border: 0; cursor: pointer; font-family: inherit; flex-shrink: 0;
  font-size: 12px; font-weight: 800; padding: 7px 14px; border-radius: 999px; color: #fff;
  background: linear-gradient(135deg, var(--p2), var(--p1));
  box-shadow: 0 3px 9px rgba(15,23,42,.18); transition: transform .15s ease;
}
.dc2-cta:hover { transform: translateY(-1px); }
.dc2-empty {
  font-size: 12.5px; line-height: 1.7; color: #8B93B0; text-align: center;
  background: #F8FAFF; border-radius: 12px; padding: 16px 12px;
}

/* ---- 近 7 天足迹 ---- */
.dc2-heat-row { display: flex; gap: 7px; margin-bottom: 12px; }
.dc2-heat {
  flex: 1; height: 46px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-weight: 800;
}
.dc2-heat b { font-size: 12px; }
.dc2-heat span { font-size: 11px; opacity: .85; min-height: 13px; }
.dc2-heat.l0 { background: #F1F5F9; color: #B6C0CF; }
.dc2-heat.l1 { background: #E0E7FF; color: #6366F1; }
.dc2-heat.l2 { background: linear-gradient(135deg, #8B5CF6, #3B82F6); color: #fff; }
.dc2-heat.l3 {
  background: linear-gradient(135deg, #8B5CF6, #22D3EE); color: #fff;
  box-shadow: 0 3px 10px rgba(139,92,246,.35);
}
.dc2-chart {
  display: block; width: 100%; height: 170px;
  background: #fff; border-radius: 16px; box-shadow: 0 2px 10px rgba(15,23,42,.05);
}

/* ---- 需要加强 ---- */
.dc2-weak-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; align-items: start; }
.dc2-weak-grid > .dc2-tip { grid-column: 1 / -1; }
.dc2-weak-box { background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: 0 2px 10px rgba(15,23,42,.05); }
.dc2-weak-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: 13.5px; font-weight: 800; color: #4C1D95; margin-bottom: 10px;
}
.dc2-weak-head span { font-size: 11px; font-weight: 600; color: #8B93B0; flex-shrink: 0; }
.dc2-weak-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.dc2-weak-row:last-child { margin-bottom: 0; }
.dc2-weak-k {
  width: 38px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: #EDE9FE; color: #7C3AED;
  display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 15px;
}
/* 多字键名（空格 / Tab / 回车）：宽度**必须仍是 38px**，否则这一行的条形图
   起点会和其他行错开。用缩字号塞进同一个方块里，换取整列左对齐。 */
.dc2-weak-k.wide { font-size: 11px; letter-spacing: -.2px; }
.dc2-weak-bar { flex: 1; height: 10px; border-radius: 999px; background: #EEF2F7; overflow: hidden; }
.dc2-weak-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8B5CF6, #3B82F6); }
.dc2-weak-n { font-size: 12px; font-weight: 700; color: #6366F1; min-width: 46px; text-align: right; flex-shrink: 0; }
.dc2-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.dc2-chip {
  font-size: 12.5px; font-weight: 700; color: #7C3AED;
  background: #EDE9FE; border-radius: 999px; padding: 5px 12px;
}

/* ---- 空态 ---- */
.dc2-tip {
  text-align: center; padding: 18px; border-radius: 14px; font-size: 13px; font-weight: 700;
  background: linear-gradient(135deg, #E0F2FE, #EDE9FE); color: #0891B2;
}

@media (max-width: 1100px) {
  .dc2-prod-grid { grid-template-columns: 1fr; }
  .dc2-weak-grid { grid-template-columns: 1fr; }
  .dc2-hero-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .dc2-hero { flex-direction: column; }
  .dc2-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* ---- 兼容旧选择器(避免破坏) ---- */
.adv-game-map, .adv-game-path, .map-node, .map-ring, .map-node-emoji,
.map-node-label, .map-node-name, .map-node-stars, .map-node-create { display: none; }

/* ---- 响应式 ---- */
@media (max-width: 900px) {
  .adv-map-svg-wrap { aspect-ratio: 12 / 9; }
  .adv-map-hero::before { font-size: 56px; right: 24px; }
  .adv-map-hero h1 { font-size: 22px; }
  .adv-continue-btn { padding: 12px 22px; font-size: 16px; min-height: 46px; }
  .map-corner { display: none; }
}
@media (max-width: 600px) {
  .adv-map-svg-wrap { aspect-ratio: 1 / 1; }
}

/* 字符输入状态（剧场文本） */
.adv-ch { font-family: var(--font-mono); }
.adv-ch.done { color: inherit; opacity: 0.35; }
.adv-ch.cur { background: var(--c-accent); border-radius: 6px; color: var(--c-ink); box-shadow: 0 0 12px var(--c-accent); }
.adv-ch.miss { opacity: 0.55; }
.adv-ch.space { opacity: 0.55; }

@media (max-width: 900px) {
  .adv-map { grid-template-columns: repeat(2, 1fr); }
  .adv-energy { grid-template-columns: repeat(2, 1fr); }
  .adv-shell { height: auto; }
}

/* ===== KET 宇宙词汇探险 ===== */
#page-ket {
  --ku-bg: #070B1F;
  --ku-cyan: #5FE3FF;
  --ku-gold: #FFD166;
  --ku-orange: #FF8C42;
  --ku-green: #3DDC84;
  --ku-red: #FF6B6B;
  --ku-txt: #EAF4FF;
  --ku-dim: #8FA3C8;
  --ku-line: #2E4A80;
  --ku-panel: #12203F;
  position: relative;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
  background: var(--ku-bg);
  color: var(--ku-txt);
  font-family: "PingFang SC","Microsoft YaHei","Hiragino Sans GB",sans-serif;
  user-select: none;
}
#page-ket * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* ---- 背景 ---- */
#kuSky {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(1100px 700px at 18% 8%, #2A1B5E66, transparent 62%),
    radial-gradient(900px 600px at 85% 85%, #0E4E6B55, transparent 62%),
    radial-gradient(1200px 900px at 50% 50%, #1B1150 0%, #0A0E28 58%, #05070F 100%);
}
#kuStars { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.star { position: absolute; border-radius: 50%; background: #fff; animation: tw linear infinite; }
@keyframes tw { 0%,100% { opacity:.15 } 50% { opacity:1 } }
.neb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .3; z-index: 1; pointer-events: none; }

/* ---- HUD ---- */
#kuHud {
  position: absolute; top: 0; left: 0; right: 0; height: 64px; z-index: 40;
  display: flex; align-items: center; gap: 12px; padding: 0 18px;
  background: linear-gradient(180deg, #070C1Fee, #070C1F00);
  backdrop-filter: blur(6px);
}
.ku-logo {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 32% 28%, #8FE9FF, #2E7CF6 60%, #123A8A);
  box-shadow: 0 0 18px #4FC3F7aa, inset -6px -6px 12px #0007;
}
#kuHud h1 {
  font-size: 16px; margin: 0; letter-spacing: 1px; font-weight: 800; white-space: nowrap;
  background: linear-gradient(90deg, #9FF0FF, #FFD166);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ku-chip {
  display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  padding: 6px 11px; border-radius: 999px;
  background: #12203Fcc; border: 1px solid var(--ku-line); color: #CFE6FF; white-space: nowrap;
}
.ku-chip b { color: var(--ku-gold); }
.ku-chip.warn b { color: var(--ku-red); }
.ku-spacer { flex: 1; }
.ku-btn-g {
  font: inherit; font-size: 12px; color: #9FC0E8;
  background: #12203F99; border: 1px solid var(--ku-line);
  padding: 7px 12px; border-radius: 999px; cursor: pointer; transition: .2s; white-space: nowrap;
}
.ku-btn-g:hover { color: #fff; border-color: var(--ku-cyan); box-shadow: 0 0 14px #5FE3FF55; }
.ku-btn-g.on { color: #04202F; background: var(--ku-cyan); border-color: var(--ku-cyan); }

/* ---- 地图 ---- */
#kuWrap {
  position: absolute; inset: 64px 0 0 0; z-index: 10;
  overflow: auto; -webkit-overflow-scrolling: touch;
}
#kuStage {
  position: relative; width: 1420px; height: 1120px;
  margin: 8px auto 30px; transform-origin: top center;
}
#kuRoutes {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible; pointer-events: none;
}

/* ---- 航线 ---- */
.route {
  fill: none; stroke: #7C90BC; stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 4 12; opacity: .8; filter: drop-shadow(0 0 3px #00000088);
}
.route.on {
  stroke: #3FB8E8; stroke-width: 6; opacity: .95; stroke-dasharray: 10 12;
  filter: drop-shadow(0 0 7px #5FE3FFcc); animation: flow 1s linear infinite;
}
@keyframes flow { to { stroke-dashoffset: -44; } }
.fdot circle { fill: #EAFDFF; filter: drop-shadow(0 0 5px #5FE3FF) drop-shadow(0 0 12px #5FE3FF); }
.fdot.gold circle { fill: #FFF3C4; filter: drop-shadow(0 0 5px #FFD166) drop-shadow(0 0 12px #FFD166); }

/* ---- 星球节点 ---- */
.node {
  position: absolute; display: block; transform: translate(-50%,-50%);
  width: 132px; padding: 0; background: none; border: 0;
  cursor: pointer; color: inherit; font: inherit;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
/* 2026-09-28「去壳」（与 island.html 同款改法，用户要求两个产品观感一致）：
   原来每关外面套着一层"深色圆舱"（径向蓝底 + 2px 边框 + 5px 深蓝外环）+ 玻璃高光 .glass
   + 已通关时的两圈旋转金环 .ring，3D 图案只占圆舱内部的 78%。
   现在把壳整层去掉，让 3D 图案自己成为这一格：
   **直径 103px → 132px，与原外圈完全等大**（.dome 仍是 132 的定位容器，尺寸/坐标一律不动）。
   ⚠️ 素材是 1536×1536 的【方形】渲染图，图案本身是球体构图、方形四角是它自带的深色背景，
      所以 border-radius:50% 与 object-fit:cover 必须保留（裁掉四角），否则会露出方块。
   ⚠️ 光晕一律用 filter:drop-shadow 而不是 box-shadow —— drop-shadow 会跟着圆形轮廓走，
      box-shadow 没有 border-radius 就成了方角光。 */
.dome {
  position: relative; width: 132px; height: 132px;
  display: grid; place-items: center; transition: .25s; overflow: visible;
  /* 2026-09-28「去黑底」②：drop-shadow 全部从 .orb 搬到这一层。
     ⚠️ 原因是 CSS 的生效顺序 filter → mask：mask 裁的是 filter 的【输出】，
        而 drop-shadow 的光晕长在元素 box【外面】，mask 的渐变到 box 边缘就没了 ——
        两层都挂在 .orb 上的话，光晕会被整圈裁干净（节点会突然"不发光"）。
        搬到父级 .dome 后，mask 只裁 .orb 自己，光晕照旧。 */
  filter: drop-shadow(0 8px 18px #050B1Acc);
  /* 羽化遮罩：半径 84% 以内完全不透明，84%→100% 渐隐到 0。
     图案放大 120% 后外缘落在 92%~106%，正好压在这段过渡里 —— 边缘柔和融进宇宙。 */
  --orb-fade: radial-gradient(closest-side, #000 0 84%, rgba(0,0,0,.55) 94%, rgba(0,0,0,0) 100%);
}
.orb {
  position: relative; width: 100%; height: 100%; border-radius: 50%;
  display: grid; place-items: center; font-size: 46px; line-height: 1; overflow: hidden;
  /* 无图关卡（图片 onerror 自删时也走这里）：靠 --c1/--c2 渲染一个彩色球 */
  background: radial-gradient(circle at 34% 26%, #ffffff66, var(--c1) 42%, var(--c2) 82%, #00000055);
  /* 2026-09-28「去黑底」①（用户：3D 立体图形后面的黑色圆形背景去掉，融入宇宙）：
     根因不在圆舱、也不在 .glass —— 素材本体是 1536×1536 的【方形】渲染图，
     3D 图案只占中间 78%~88%，剩下的四角与最外圈全是素材自带的深色星尘底（实测亮度≈9~46）。
     object-fit:cover 把它填满 132px 的圆，于是圆内就是"图案 + 一圈深色"= 用户看到的黑圆。
     两步处理：
       ① 图案放大 120%（见 .orb img）→ 深色底被推到容器外，被 overflow:hidden 裁掉；
       ② 再从半径 84% 处径向羽化 → 图案外缘不做硬切，直接化开。
     ⚠️ 素材已使用约 96% 画幅，不要靠"缩容器"来消黑边：容器一缩图案跟着缩，黑边原样还在。 */
  -webkit-mask-image: var(--orb-fade); mask-image: var(--orb-fade);
  transition: .25s;
}
/* 放大 120%：图案外径 0.88×1.2 = 1.06（>1，出容器），素材深色底落在 1.0 ~ 1.2 区间被裁光。
   最保守的素材（图案仅占 77%）放大后也到 0.92，残下的一点暗边正好被上面的羽化吃掉。
   ⚠️ 用 left/top/width/height 而不是 transform:scale —— .orb img 上还挂着灰度/亮度 filter
      （.node.lock 那几行），若叠加 transform 会在 hover 过渡里产生插值中间态，探针与肉眼都更容易误判。 */
.orb img {
  position: absolute; left: -10%; top: -10%; width: 120%; height: 120%;
  object-fit: cover; display: block;
}
/* 原来是 #0A1230 实心深蓝黑 —— 图片还没落地（远程 COS + loading=lazy）时它就是一个纯黑圆，
   本身就是"黑圆"的一部分。改成透明后，加载期间露出的是 span 里的 emoji 占位字符，
   彩色图形浮在宇宙背景上，不会再闪一下黑饼。 */
.orb.hasimg { background: none; }
/* .glass（玻璃高光）随"去壳"一起删除 —— 它原本贴在圆舱上，去掉壳就无处附着。 */
/* 去壳后编号直接压在彩色图案上，原来那行浅蓝小字读不出来 → 加半透明深色胶囊底（与 island 同款） */
.no {
  position: absolute; top: 9px; left: 11px; z-index: 3;
  min-width: 19px; padding: 1px 6px; border-radius: 999px; text-align: center;
  font-size: 11px; font-weight: 800; color: #E7F2FF; background: #080F26cc;
  text-shadow: 0 1px 3px #000; box-shadow: 0 2px 8px #0007;
}
/* 2026-09-27：原为 {position:absolute; left:50%; transform:translateX(-50%); bottom:-14px}
   —— 那是"节点高度 == 圆直径"时代的写法。后来 .node 里陆续加了 cname/mini/stars，
   bottom 就把它推到【节点盒最底部之外】(实测溢出盒底 13px)，正好骑在 .stars 上：
   9 个星域全部被压、最严重 1125px² 纵向重叠 12px，也就是玩家看到的"星星显示不全"。
   改成文档流：紧跟 mini 之后、stars 之前居中，谁都不遮（与 island.html 同款改法）。 */
.plate {
  display: block; width: fit-content; margin: 7px auto 0;
  padding: 4px 11px; border-radius: 8px; font-size: 11px; font-weight: 800; letter-spacing: .5px;
  background: linear-gradient(180deg, #2A3E6E, #16224A); border: 1px solid #4A6AA8;
  color: #BFD8FF; box-shadow: 0 4px 12px #0008; white-space: nowrap;
}
.cname { margin-top: 30px; text-align: center; font-size: 13px; font-weight: 700; color: #BFD8FF; text-shadow: 0 2px 8px #000; }
.mini { margin-top: 3px; text-align: center; font-size: 11px; color: var(--ku-dim); }
.stars { margin-top: 2px; text-align: center; font-size: 13px; letter-spacing: 1px; color: #31456F; }
.stars i { font-style: normal; }
.stars i.on { color: var(--ku-gold); text-shadow: 0 0 10px #FFD166cc; }
/* 去壳后"未解锁"只剩压暗的图案在提示状态，辨识度不够，所以锁放大到 40px。
   但底盘**不能再用实心圆盘 + 描边**（那是又画了一个圆）—— 改成无硬边的径向暗雾，
   锁像浮在图案上，而不是图案上盖了个球。 */
.lockico {
  position: absolute; inset: 0; display: none; place-items: center; font-size: 40px; z-index: 5;
  filter: drop-shadow(0 0 7px #000) drop-shadow(0 3px 5px #000d);
}
.tip {
  position: absolute; left: 50%; top: -26px;
  transform: translateX(-50%) translateY(8px);
  padding: 5px 13px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap;
  background: linear-gradient(180deg, #6FE9FF, #2E9BE0); color: #04202F; letter-spacing: .5px;
  opacity: 0; pointer-events: none; transition: .22s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 8px 20px #000a, 0 0 22px #5FE3FF66; z-index: 8;
}
.node:hover .tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.node.lock .tip, .node.lock:hover .tip {
  background: linear-gradient(180deg, #8494B4, #4A5878); color: #E4EEFA;
  box-shadow: 0 8px 20px #000a;
}
/* .ring（已通关/待巩固时套在最外层的两圈旋转光环）随"去壳"一起删除 —— 它正是用户要去的
   "每个关卡最外层的圆圈"：宽高与 .dome 同尺寸、内侧还外扩 9px，去掉壳之后它就是唯一
   还围在图案外面的圈。已通关的成就感改由金色光晕 + 金色星条 + 金色底座表达。 */
.bz { position: absolute; left: 0; top: 0; width: 132px; height: 132px; border-radius: 50%; border: 3px solid #fff; opacity: 0; pointer-events: none; z-index: 9; }
.node.burst .bz { animation: ripple .9s ease-out; }
@keyframes ripple { 0% { transform: scale(.85); opacity: .95; filter: drop-shadow(0 0 18px #fff); } 100% { transform: scale(2.5); opacity: 0; } }

/* 当前可玩：青色光晕 + 呼吸。pulseCyan（原来给 .dome 做的 box-shadow 呼吸）已无宿主，
   直接删掉；呼吸改挂在 .orb 的 transform 上，光晕常亮即可。 */
.node.cur .dome {
  filter: drop-shadow(0 0 16px #5FE3FFdd) drop-shadow(0 0 40px #5FE3FF66) drop-shadow(0 8px 18px #050B1Acc);
}
.node.cur .orb { animation: breathe 2s ease-in-out infinite; }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.node.cur .cname { color: #fff; text-shadow: 0 0 12px #5FE3FF; }

/* 已通关 */
.node.done .dome { filter: drop-shadow(0 0 15px #FFD166cc) drop-shadow(0 0 38px #FFD16655) drop-shadow(0 8px 18px #050B1Acc); }
.node.done .stars i { color: #FFD166; text-shadow: 0 0 12px #FFD166dd; }
.node.done .plate { background: linear-gradient(180deg, #5A4718, #2E2410); border-color: #FFD16699; color: #FFE9B0; }

/* 待巩固 */
.node.wip .dome { filter: drop-shadow(0 0 15px #3DDC84cc) drop-shadow(0 0 38px #3DDC8455) drop-shadow(0 8px 18px #050B1Acc); }

/* 未解锁：图案压暗成灰度（保留能认得出"是哪一关"的亮度）＋ 锁牌浮在上面。
   原来那层"虚线边框 + 深色圆舱底"随去壳一起删除。 */
.node.lock { transform: translate(-50%, calc(-50% + 7px)); cursor: not-allowed; }
.node.lock .orb img { filter: grayscale(.55) brightness(.82) contrast(.98); }
.node.lock .orb:not(.hasimg) { filter: grayscale(.55) brightness(.88); opacity: .92; }
.node.lock .cname { color: #A9BEDD; }
.node.lock .plate { background: linear-gradient(180deg, #3A4568, #232C4A); border-color: #5A6E96; color: #B9CBE6; }
.node.lock .mini { color: #7E90B4; }
.node.lock .stars i { color: #4A5B7E; }
/* ⚠️ 这里原来有一个 78px 的径向暗雾（.lockico::before，中心 #0A1030e6）—— 它同样是一个
   "黑色圆形背景"，去掉壳之后特别扎眼，随本次「去黑底」一起删除。
   锁牌改成靠自身的 drop-shadow 压出对比（阴影跟着锁的形状走，不再是一个圆）。
   锁尺寸 40px 保持不变，未解锁的辨识度由"图案压暗"承担。 */
.node.lock .lockico {
  display: grid;
  filter: drop-shadow(0 2px 5px #000e) drop-shadow(0 0 10px #000c) drop-shadow(0 0 26px #0009);
}

/* 悬停 */
.node:hover { transform: translate(-50%, calc(-50% - 12px)) scale(1.15); z-index: 14; }
.node:hover .dome { filter: drop-shadow(0 0 20px #ffffff) drop-shadow(0 0 54px #5FE3FF88) drop-shadow(0 10px 22px #050B1Acc); }
.node.lock:hover { transform: translate(-50%, calc(-50% - 12px)) scale(1.15); }
.node.lock:hover .dome { filter: drop-shadow(0 0 18px #BFD8F5cc) drop-shadow(0 10px 20px #050B1Acc); }
.node.lock:hover .orb img { filter: grayscale(.35) brightness(.86) contrast(.98); }
.node:hover .orb { animation-play-state: paused; }

/* 抖动 */
.node.shake { animation: shake .5s; }
@keyframes shake {
  0%,100% { transform: translate(-50%,-50%); }
  20% { transform: translate(calc(-50% - 8px),-50%); }
  40% { transform: translate(calc(-50% + 8px),-50%); }
  60% { transform: translate(calc(-50% - 5px),-50%); }
  80% { transform: translate(calc(-50% + 5px),-50%); }
}
.node.shake .lockico { animation: lockShake .5s; }
@keyframes lockShake {
  0%,100% { transform: translateX(0) rotate(0) scale(1); }
  12% { transform: translateX(-7px) rotate(-14deg) scale(1.12); }
  26% { transform: translateX(7px) rotate(14deg) scale(1.12); }
  40% { transform: translateX(-6px) rotate(-11deg) scale(1.08); }
  54% { transform: translateX(6px) rotate(11deg) scale(1.08); }
  70% { transform: translateX(-3px) rotate(-6deg) scale(1.04); }
  86% { transform: translateX(3px) rotate(6deg) scale(1.02); }
}

/* 解锁爆闪 */
.node.burst { z-index: 16; }
.node.burst .dome { animation: burst .9s cubic-bezier(.2,.8,.3,1); }
/* 去壳后 .dome 不再是圆（border-radius:0），原来那句 box-shadow 会变成【方形】白光 ——
   巨大的亮方块，正是"改了要连带改"的地方。改成 drop-shadow（跟圆形轮廓走的光晕）挂在 .orb 上，
   冲击力交给 .bz 的白环扩散承担。 */
.node.burst .dome { filter: drop-shadow(0 0 24px #ffffff) drop-shadow(0 0 66px #5FE3FFee); }
@keyframes burst {
  0% { transform: scale(.7); }
  30% { transform: scale(1.34); }
  55% { transform: scale(.95); }
  75% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.spark {
  position: absolute; width: 22px; height: 22px; border-radius: 50%; z-index: 20; pointer-events: none;
  background: radial-gradient(circle, #fff, #5FE3FF 40%, transparent 72%);
  box-shadow: 0 0 26px #5FE3FF, 0 0 60px #5FE3FF88;
  transition: transform .9s cubic-bezier(.5,0,.6,1), opacity .9s;
}

/* ---- 覆盖层 ---- */
.ku-mask {
  position: fixed; inset: 0; z-index: 60;
  background: #04060Fdd; backdrop-filter: blur(8px);
  display: none; place-items: center; padding: 18px; overflow: auto;
}
.ku-mask.show { display: grid; animation: fade .22s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.ku-panel {
  width: min(880px, 96vw); border-radius: 26px; padding: 24px 26px;
  background: linear-gradient(160deg, #16204A, #0A1030); border: 1px solid #34528F;
  box-shadow: 0 30px 80px #000c, inset 0 1px 0 #ffffff22;
  animation: pop .3s cubic-bezier(.34,1.56,.64,1); margin: auto;
}
@keyframes pop { from { transform: scale(.9) translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.ku-phead { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ku-porb {
  position: relative; width: 84px; height: 84px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 38px; overflow: hidden;
  background: radial-gradient(circle at 34% 26%, #ffffff55, var(--c1) 42%, var(--c2) 84%);
  box-shadow: 0 0 24px var(--c1)66;
}
.ku-porb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ku-porb.hasimg { box-shadow: 0 0 0 2px var(--c1)88, 0 0 28px var(--c1)88; }
.ku-phead h2 { margin: 0; font-size: 22px; }
.ku-phead .ku-en { font-size: 11px; letter-spacing: 2px; color: var(--ku-cyan); font-weight: 800; }
.ku-phead .ku-sub { font-size: 13px; color: var(--ku-dim); margin-top: 4px; }
.ku-xbtn {
  margin-left: auto; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--ku-line); background: #12203F; color: #9FC0E8; font-size: 19px;
  cursor: pointer; flex: 0 0 auto;
}
.ku-xbtn:hover { color: #fff; border-color: var(--ku-cyan); }
.ku-sec { margin-top: 18px; }
/* 速记大波(可达 100+ 词)时,词卡区限高滚动,面板不被撑爆 */
#pLearn .ku-sec { max-height: min(52vh, 520px); overflow-y: auto; padding-right: 6px; }
#pLearn .ku-sec::-webkit-scrollbar { width: 6px; }
#pLearn .ku-sec::-webkit-scrollbar-thumb { background: #34528F; border-radius: 3px; }
.ku-sec h3 { margin: 0 0 10px; font-size: 14px; color: #9FC0E8; letter-spacing: 1px; }
.ku-wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 11px; }
.wv {
  border-radius: 16px; padding: 12px 8px; text-align: center; cursor: pointer;
  border: 1px solid var(--ku-line); background: #0E1836; transition: .18s; position: relative;
}
.wv:hover { transform: translateY(-3px); border-color: var(--ku-cyan); box-shadow: 0 8px 20px #0007; }
.wv .t { font-size: 13px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wv .s { font-size: 11px; color: var(--ku-dim); margin-top: 3px; }
.wv .st { font-size: 13px; letter-spacing: 1px; color: #31456F; margin-top: 3px; }
.wv .st i { font-style: normal; }
.wv .st i.on { color: var(--ku-gold); }
.wv.done { border-color: #FFD16688; background: linear-gradient(180deg, #241C0E, #140F22); }
.wv.cur { border-color: var(--ku-cyan); background: linear-gradient(180deg, #0E2A4A, #0B1436); box-shadow: 0 0 20px #5FE3FF55; animation: breathe 2.2s ease-in-out infinite; }
.wv.lock { opacity: .45; cursor: not-allowed; filter: grayscale(.7); }
.wv.lock:hover { transform: none; border-color: var(--ku-line); box-shadow: none; }
.wv.bad { border-color: #FF6B6B88; background: linear-gradient(180deg, #2A1218, #160E20); }
.ku-acts { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.ku-btn {
  flex: 1; min-width: 130px; font: inherit; font-weight: 800; font-size: 15px;
  padding: 14px; border-radius: 999px; cursor: pointer; border: 0;
  background: linear-gradient(180deg, #6FE9FF, #2E9BE0); color: #04202F;
  box-shadow: 0 10px 26px #2E9BE066; transition: .2s;
}
.ku-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 32px #6FE9FF77; }
.ku-btn.gray { background: #1B264A; color: #A9C2E8; box-shadow: none; border: 1px solid var(--ku-line); }
.ku-btn.gray:hover { color: #fff; transform: none; }
.ku-btn.warn { background: linear-gradient(180deg, #FFB4A2, #FF6B6B); color: #2B0A0A; box-shadow: 0 10px 26px #FF6B6B55; }

/* ---- 学习卡片 ---- */
.ku-lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.flip { height: 112px; perspective: 800px; cursor: pointer; }
.flip .in { position: relative; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.flip.f .in { transform: rotateY(180deg); }
.flip .fa, .flip .fb {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: 16px;
  display: grid; place-items: center; padding: 10px; text-align: center; border: 1px solid var(--ku-line);
}
.flip .fa { background: linear-gradient(160deg, #182A55, #0D1533); }
.flip .fb { transform: rotateY(180deg); background: linear-gradient(160deg, #1B3A2A, #0D2018); border-color: #3DDC8477; }
.flip .w { font-size: 19px; font-weight: 800; word-break: break-word; line-height: 1.25; }
.flip .p { font-size: 11px; color: var(--ku-cyan); margin-top: 4px; }
.flip .c { font-size: 15px; font-weight: 700; color: #C8FFE0; line-height: 1.4; }
.spk {
  position: absolute; right: 7px; bottom: 7px; width: 28px; height: 28px; border-radius: 50%;
  border: 0; cursor: pointer; background: #0E2A4A; color: var(--ku-cyan); font-size: 13px;
  display: grid; place-items: center;
}
.ku-hint { font-size: 12px; color: var(--ku-dim); text-align: center; margin-top: 12px; }

/* ---- 测验 ---- */
#qTop { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
#qBar { flex: 1; min-width: 120px; height: 9px; border-radius: 99px; background: #0C1738; overflow: hidden; }
#qBarIn { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #6FE9FF, #FFD166); transition: width .3s; }
.qbox { text-align: center; padding: 16px 10px 6px; }
.qtype {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--ku-cyan);
  background: #0E2A4A; border: 1px solid #2E5C8A; padding: 4px 12px; border-radius: 99px;
}
.qword { font-size: 34px; font-weight: 800; margin: 16px 0 4px; word-break: break-word; line-height: 1.2; }
.qpos { font-size: 13px; color: var(--ku-dim); }
.bigspk {
  margin: 10px auto 0; width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer; font-size: 26px;
  background: radial-gradient(circle at 34% 28%, #8FE9FF, #2E7CF6); color: #04202F;
  box-shadow: 0 0 24px #5FE3FF77; display: grid; place-items: center;
}
.bigspk:active { transform: scale(.94); }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.opt {
  font: inherit; font-size: 17px; font-weight: 700; padding: 16px 14px; border-radius: 16px;
  cursor: pointer; text-align: center; background: #0E1836; border: 1px solid var(--ku-line);
  color: var(--ku-txt); transition: .15s; position: relative; line-height: 1.35;
}
.opt:hover { border-color: var(--ku-cyan); background: #132A52; transform: translateY(-2px); }
.opt .k { position: absolute; left: 9px; top: 7px; font-size: 11px; color: #5A7BB0; font-weight: 800; }
.opt.right { background: linear-gradient(180deg, #123D2A, #0C2A1C); border-color: var(--ku-green); color: #C8FFE0; box-shadow: 0 0 22px #3DDC8455; }
.opt.wrong { background: linear-gradient(180deg, #3D1212, #2A0C0C); border-color: var(--ku-red); color: #FFD6D6; animation: shake2 .35s; }
@keyframes shake2 { 0%,100% { transform: none; } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.opt:disabled { cursor: default; }
.qfoot { margin-top: 14px; text-align: center; font-size: 13px; color: var(--ku-dim); min-height: 20px; }

/* ---- 结算 ---- */
.center { text-align: center; }
.bigstars { font-size: 52px; letter-spacing: 10px; margin: 10px 0; color: #31456F; }
.bigstars i { font-style: normal; opacity: 0; transform: scale(.4); display: inline-block; transition: .4s cubic-bezier(.34,1.56,.64,1); }
.bigstars i.on { color: var(--ku-gold); text-shadow: 0 0 24px #FFD166; opacity: 1; transform: scale(1); }
.scoreline { font-size: 17px; margin: 8px 0; }
.scoreline b { color: var(--ku-gold); font-size: 22px; }
.reward {
  background: #1B1430; border-left: 3px solid var(--ku-gold); border-radius: 10px;
  padding: 12px 14px; margin-top: 12px; font-size: 14px; text-align: left; line-height: 1.6;
}

/* ---- 错词本 ---- */
.wlist { max-height: 52vh; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 9px; }
.wi { border-radius: 12px; padding: 9px 12px; background: #0E1836; border: 1px solid var(--ku-line); display: flex; align-items: center; gap: 8px; }
.wi .e { font-weight: 800; font-size: 14px; flex: 1; word-break: break-word; }
.wi .c { font-size: 12px; color: var(--ku-dim); }
.wi button { border: 0; background: none; color: var(--ku-cyan); cursor: pointer; font-size: 15px; }
.empty { text-align: center; color: var(--ku-dim); padding: 30px 0; }

/* ---- 通关 ---- */
#pFin .ku-panel { background: linear-gradient(160deg, #2A2150, #120A2E); border-color: #FFD166; }
.cert {
  border-radius: 20px; padding: 22px; margin: 14px 0;
  background: linear-gradient(160deg, #FFF8E1, #FFE9B0); color: #5A3E00;
  text-align: center; box-shadow: 0 20px 50px #0008;
}
.cert h2 { margin: 0; font-size: 26px; color: #8A5A00; }
.cert .n { font-size: 15px; margin-top: 6px; font-weight: 700; }
.cert .d { font-size: 12px; margin-top: 10px; color: #8A6A20; }

/* ---- Toast ---- */
#kuToast {
  position: fixed; left: 50%; bottom: 36px;
  transform: translateX(-50%) translateY(20px); z-index: 99;
  padding: 13px 22px; border-radius: 999px;
  background: #16204Aee; border: 1px solid #4A6AA8; font-size: 14px; font-weight: 700;
  opacity: 0; transition: .3s; pointer-events: none;
  box-shadow: 0 10px 30px #000a; max-width: 90vw; text-align: center;
}
#kuToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- 响应式 ---- */
@media (max-width: 860px) {
  #kuHud { height: 58px; gap: 8px; padding: 0 10px; overflow-x: auto; overflow-y: hidden; }
  #kuHud h1 { font-size: 13px; }
  .ku-logo { display: none; }
  .ku-chip { font-size: 11px; padding: 5px 9px; }
  #kuWrap { inset: 58px 0 0 0; }
  #kuStage { width: 100%; height: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px; padding: 14px 10px 40px; transform: none !important; margin: 0; }
  #kuRoutes { display: none; }
  .node { position: relative; transform: none !important; width: 100%; }
  .dome { width: 100%; height: auto; aspect-ratio: 1; }
  .orb { font-size: 36px; }
  .bz { width: 100%; height: auto; aspect-ratio: 1; }
  .node.lock { transform: none !important; }
  .node.lock .orb img { filter: grayscale(.55) brightness(.82); }
  .node:hover { transform: scale(1.05) !important; }
  .node:hover .dome { filter: drop-shadow(0 0 18px #ffffffcc) drop-shadow(0 8px 16px #050B1Acc); }
  .node.cur .orb { animation: breathe 2s ease-in-out infinite; }
  .tip { display: none; }
  .opts { grid-template-columns: 1fr; }
  .qword { font-size: 27px; }
}

/* 用户设置弹窗：只读用户名输入框 */
.input-readonly {
  background: var(--bg-secondary, #f5f6fa);
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.8;
}

/* ===== 移动端适配（微信内置浏览器 / 手机浏览器） ===== */
@media (max-width: 640px) {
  /* 品牌区：压缩高度，让登录卡尽快进入首屏 */
  .brand-panel { padding: 20px 16px 14px; }
  .brand-logo { font-size: 14px; }
  .brand-logo-mark { width: 30px; height: 30px; font-size: 15px; }
  .brand-mine { margin-top: 12px; padding: 11px 12px; }
  .brand-points { display: none; }   /* 次要卖点，小屏收起 */

  /* 登录卡：全宽、输入框 16px 防 iOS/微信自动放大、按钮易点 */
  .login-panel { padding: 14px 12px 32px; }
  .login-card { padding: 20px 16px 16px; }
  .login-card input,
  .login-card select { font-size: 16px; }
  .login-btn { min-height: 44px; }

  /* 登录后的导航：三段 absolute 布局在窄屏互相重叠 → 改为常规流式布局 */
  .navbar { padding: 0 10px; height: 52px; gap: 6px; }
  .navbar-logo { position: static; transform: none; flex-shrink: 0; font-size: 16px; }
  .navbar-logo span { display: none; }   /* 只留 logo 图标，省宽度 */
  .navbar-nav {
    position: static;
    transform: none;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .navbar-nav::-webkit-scrollbar { display: none; }
  .nav-btn { white-space: nowrap; flex-shrink: 0; padding: 6px 10px; font-size: 13px; }
  .navbar-user { position: relative; right: auto; top: auto; transform: none; flex-shrink: 0; gap: 6px; }
  .navbar-score { padding: 4px 10px; font-size: 12.5px; gap: 4px; }
  .navbar-score span:last-child { display: none; }   /* 只留 ⭐ 数字 */
  .nav-username { display: none; }   /* 昵称收进头像下拉菜单 */

  /* 弹窗占满宽度时留出边距；主内容区内边距收窄 */
  .modal-card, .settings-card { max-width: calc(100vw - 24px); }
  .main-content { padding: 12px; }
}

/* 超小屏（iPhone SE 等）进一步压缩 */
@media (max-width: 375px) {
  .brand-mine-t b { font-size: 13px; }
}

/* ============================================================
   沉浸式地图 · 浮层（2026-09-24）
   关卡气泡卡 / 区域解锁烟花 / 岛15成就海报
   ============================================================ */

/* ---- 页头叙事横幅 ---- */
.adv-map-story {
  margin-top: 6px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #5B21B6 !important;
  opacity: .85;
}

/* ---- 关卡气泡卡 ---- */
.isl-card-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.isl-card-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 27, 75, .45);
  backdrop-filter: blur(3px);
}
.isl-card {
  position: relative;
  width: min(430px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  background: #FFFFFF;
  border-radius: 26px;
  padding: 26px 24px 22px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(30, 27, 75, .35), inset 0 0 0 2px #FDE68A;
  animation: isl-card-pop .32s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes isl-card-pop {
  0% { opacity: 0; transform: translateY(26px) scale(.86); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.isl-card-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border: none; border-radius: 50%;
  background: #F1F5F9; color: #64748B;
  font-size: 15px; font-weight: 900;
  cursor: pointer;
}
.isl-card-close:hover { background: #E2E8F0; }
.isl-card-hero { font-size: 58px; line-height: 1.1; filter: drop-shadow(0 4px 6px rgba(0,0,0,.15)); }
.isl-card-title {
  font-size: 26px; font-weight: 900; color: #1E1B4B; margin: 6px 0 2px;
}
.isl-card-rank {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  font-weight: 900;
  color: #B45309;
  background: linear-gradient(135deg, #FDE047, #FDBA74);
  border-radius: 999px;
  padding: 3px 10px;
  vertical-align: middle;
}
.isl-card-stars { font-size: 26px; margin: 2px 0 4px; }
.isl-card-stars span { color: #CBD5E1; margin: 0 2px; }
.isl-card-stars span.on { color: #F59E0B; }
.isl-card-stars em { display: block; font-size: 12px; color: #94A3B8; font-style: normal; font-weight: 700; }
.isl-card-tip {
  margin: 10px auto 4px;
  font-size: 14.5px;
  font-weight: 800;
  color: #7C2D12;
  background: #FFF7ED;
  border: 1.5px dashed #FDBA74;
  border-radius: 14px;
  padding: 10px 14px;
}
.isl-card-child {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #4C1D95;
}
.isl-card-goal {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 800;
  color: #475569;
}
.isl-card-go { margin-top: 14px; width: 100%; }

/* ---- mini 键盘微演示 ---- */
.isl-kb-demo { margin-top: 12px; }
.isl-kb {
  display: inline-block;
  background: #F1F5F9;
  border-radius: 14px;
  padding: 8px;
  box-shadow: inset 0 2px 6px rgba(15, 23, 42, .12);
}
.isl-kb-row { display: flex; justify-content: center; gap: 4px; margin-bottom: 4px; }
.isl-kb-row:last-child { margin-bottom: 0; }
.isl-kb-key {
  min-width: 26px;
  height: 26px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-bottom-width: 3px;
  font-size: 12px;
  font-weight: 900;
  color: #94A3B8;
}
.isl-kb-key.on { color: #1E1B4B; }
.isl-kb-shift { min-width: 62px; font-size: 11px; }
.isl-kb-fingers { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.isl-finger-chip {
  font-size: 11.5px;
  font-weight: 900;
  color: #1E1B4B;
  border-radius: 999px;
  padding: 3px 9px;
}
.isl-kb-extra { margin-top: 8px; font-size: 12.5px; font-weight: 700; color: #64748B; }

/* ---- 区域解锁烟花 ---- */
.fw-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: none;
  pointer-events: none;
  overflow: hidden;
}
.fw-spark {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--fc, #FDE047);
  box-shadow: 0 0 10px 2px var(--fc, #FDE047);
  opacity: 0;
  animation: fw-fly 1.5s cubic-bezier(.16, .84, .44, 1) forwards;
}
@keyframes fw-fly {
  0%   { opacity: 0; transform: translate(0, 0) scale(.4); }
  12%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1); }
}
.fw-banner {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  font-size: clamp(26px, 5vw, 46px);
  font-weight: 900;
  color: #FFFFFF;
  text-shadow: 0 3px 0 #B45309, 0 8px 28px rgba(0, 0, 0, .4);
  background: linear-gradient(135deg, rgba(245, 158, 11, .95), rgba(124, 58, 237, .95));
  border-radius: 999px;
  padding: 20px 44px;
  animation: fw-banner-in .6s cubic-bezier(.34, 1.56, .64, 1) .2s backwards;
  white-space: nowrap;
}
@keyframes fw-banner-in {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .fw-spark, .fw-banner { animation: none !important; opacity: 1; }
}

/* ---- 岛 15 成就海报 ---- */
.poster-overlay {
  position: fixed;
  inset: 0;
  z-index: 960;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(30, 27, 75, .6);
  backdrop-filter: blur(4px);
  padding: 18px;
}
.poster-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-height: 96vh;
}
.poster-wrap canvas {
  max-height: 72vh;
  max-width: min(92vw, 480px);
  width: auto;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}
.poster-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.adv-big-btn.poster {
  background: linear-gradient(135deg, #FDE047, #F59E0B);
  color: #78350F;
}
