/* ========== 词树风格 · 薄荷绿 ========== */
:root {
  --primary: #28c88a;
  --primary-dark: #1fb87c;
  --primary-deep: #15966a;
  --primary-light: #e8f9f1;
  --primary-glow: rgba(40, 200, 138, 0.28);
  --accent: #ff9a3c;
  --accent-light: #fff4e8;
  --success: #28c88a;
  --danger: #f05a5a;
  --text: #1a2420;
  --text-2: #7a8a82;
  --text-3: #b0bdb6;
  --bg: #f5f8f6;
  --bg-2: #eaf2ed;
  --card: #ffffff;
  --border: #e8efea;
  --shadow-sm: 0 1px 6px rgba(20, 60, 40, 0.04);
  --shadow: 0 4px 18px rgba(20, 60, 40, 0.06);
  --shadow-lg: 0 10px 32px rgba(20, 60, 40, 0.10);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --gradient-header: linear-gradient(180deg, #d4f5e6 0%, #ecf9f2 55%, #f5f8f6 100%);
  --gradient-primary: linear-gradient(135deg, #3dd9a0, #28c88a);
  --nav-h: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* 始终为纵向滚动条预留位置：内容短的页面不会因为没有滚动条而整体右移，
   保证各页面左右边距一致 */
html { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) {
  html { overflow-y: scroll; }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
.hidden { display: none !important; }

/* ========== 首屏加载遮罩 ==========
   数据回填前先隐藏页面，避免闪出 HTML 里的占位文案（如「早上好，同学」） */
body.is-booting .app-header,
body.is-booting .page,
body.is-booting #nav-mobile { visibility: hidden; }
body.is-booting::after {
  content: '';
  position: fixed;
  left: 50%;
  top: 42%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 2px solid #dbe7df;
  border-top-color: #348562;
  border-radius: 50%;
  animation: boot-spin .8s linear infinite;
}
@keyframes boot-spin { to { transform: rotate(360deg); } }

/* ========== 顶部搜索栏 ========== */
.app-header {
  background: var(--gradient-header);
  position: sticky;
  top: 0;
  z-index: 50;
  padding-bottom: 4px;
}
.header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 16px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  border-radius: 50%;
  flex-shrink: 0;
}
.header-icon-btn:active { background: rgba(0,0,0,.04); }

.search-bar {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.85);
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: var(--shadow-sm);
  cursor: text;
}
.search-icon { color: var(--text-3); flex-shrink: 0; }
.search-input {
  flex: 1; min-width: 0;
  border: none; outline: none; background: transparent;
  font-size: 13px; color: var(--text);
  font-family: inherit;
}
.search-input::placeholder { font-size: 13px; color: var(--text-3); }
/* 隐藏 webkit 搜索框自带清除按钮，保持样式统一 */
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
/* 搜索框清空按钮 */
.search-clear {
  flex-shrink: 0;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .10);
  color: var(--text-3);
  transition: background .15s, color .15s;
}
.search-clear:hover { background: rgba(0, 0, 0, .18); color: var(--text); }

/* ---------- 查词搜索结果页 ---------- */
.search-status {
  font-size: 13px; color: var(--text-3);
  margin: 4px 2px 14px;
}

/* 详情页无详解时的 AI 生成入口 */
.ai-fetch-block {
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
}
.ai-fetch-block .ai-loading,
.ai-fetch-block .ai-error { margin: 8px 0; }
.ai-fetch-block .btn { align-self: flex-start; }

.nav-desktop {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 8px;
  display: flex;
  gap: 4px;
}
.nav-mobile { display: none; }

.nav-item {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.nav-item.active { color: var(--primary-deep); }
.nav-mobile .nav-item.active { color: var(--primary); }

/* ========== 页面容器 ========== */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px 32px;
}
.view { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 学习 / 详情页隐藏顶栏搜索和底栏 */
body.mode-study .app-header,
body.mode-study #nav-mobile,
body.mode-word .app-header,
body.mode-word #nav-mobile { display: none; }
body.mode-study .page { padding: 0 16px; }
body.mode-word .page { padding-bottom: 80px; }
.checkin-status.done { color: var(--primary); font-weight: 600; }
.btn.btn-start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(100%, 320px);
  padding: 16px 32px;
  border-radius: 999px;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 8px 24px var(--primary-glow);
  transition: transform .15s;
}
.btn-start:active { transform: scale(.97); }
.btn-start:disabled {
  background: #dce8e1;
  box-shadow: none;
  color: var(--text-3);
  cursor: default;
}

/* ========== 通用卡片 ========== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 14px;
}

/* ========== 按钮 ========== */
.btn {
  display: block;
  width: 100%;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  padding: 14px;
  transition: all .2s;
}
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-primary:active { transform: scale(.97); }
.btn-primary:disabled { background: #dce8e1; box-shadow: none; color: var(--text-3); }
.btn-lg { padding: 16px; font-size: 17px; }
.btn-ghost { background: var(--primary-light); color: var(--primary-deep); }

/* ========== 热力图 ========== */
/* 学习日历热力图：GitHub 风格（星期标签列 + 月份标签 + 按周分列） */
.heatmap-box { display: flex; gap: 6px; }
.heatmap-wd { position: relative; width: 14px; flex-shrink: 0; }
.heatmap-wd i {
  position: absolute; left: 0; width: 100%;
  font-style: normal; font-size: 10px;
  color: var(--text-3); text-align: center;
}
.heatmap-scroll { flex: 1; min-width: 0; overflow-x: auto; padding-bottom: 4px; }
.heatmap-months { position: relative; height: 15px; margin-bottom: 4px; }
.heatmap-months span {
  position: absolute; top: 0; text-align: center;
  font-size: 10px; color: var(--text-2); white-space: nowrap;
}
.heatmap {
  --hs: 20px; --hg: 3px;
  display: grid;
  grid-template-rows: repeat(7, var(--hs));
  grid-auto-flow: column;
  gap: var(--hg);
  width: max-content;
}
.heat-cell {
  width: var(--hs); height: var(--hs);
  border-radius: 3px;
  background: #e8f0eb;
}
.heat-cell.lv1 { background: #b8ecd4; }
.heat-cell.lv2 { background: #5fd9a8; }
.heat-cell.lv3 { background: var(--primary); }
.heat-cell.today { outline: 2px solid var(--accent); outline-offset: 1px; }
.heat-cell.blank { background: transparent; }
@media (max-width: 560px) {
  .heatmap { --hs: 14px; }
}
.heatmap-legend .heat-cell { width: 12px; min-width: 12px; height: 12px; }

/* ========== 学习页 ========== */
.study-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-top: 8px;
}
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-btn:active { background: var(--bg-2); }

.progress-bar {
  flex: 1;
  height: 4px;
  background: #e0ece5;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 999px;
  width: 0%;
  transition: width .4s ease;
}
.study-counter { font-size: 13px; color: var(--text-2); min-width: 40px; text-align: right; font-weight: 600; }

/* 学习卡片 · 词树学习页风格 */
.study-card {
  background: transparent;
  padding: 0 0 80px;
  animation: fadeIn .3s ease;
}

.word-hero {
  padding: 8px 0 20px;
}
.word-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.word-hero-main { flex: 1; }
.word-hero-word {
  font-size: 36px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.word-hero-phonetic {
  font-size: 15px;
  color: var(--text-2);
  margin-top: 4px;
}

.study-kind-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.tag-new { background: var(--primary-light); color: var(--primary-deep); }
.tag-review { background: var(--accent-light); color: #c07020; }
.tag-familiar { background: #fff4e5; color: #c07020; }

/* 熟悉度卡片（熟词过滤） */
.mastery-card {
  background: var(--bg);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 16px 0;
}
.mastery-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.mastery-title { font-size: 13px; font-weight: 700; color: var(--text-2); }
.mastery-pct { font-size: 17px; font-weight: 900; color: var(--text); }
.mastery-status {
  margin-left: auto;
  font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
}
.mastery-status.st-known { background: var(--primary-light); color: var(--primary-deep); }
.mastery-status.st-familiar { background: #fff4e5; color: #c07020; }
.mastery-status.st-unknown { background: #fdeeee; color: #c94a4a; }
.mastery-bar {
  height: 8px; border-radius: 999px; overflow: hidden;
  background: var(--bg-2);
}
.mastery-fill {
  height: 100%; border-radius: 999px;
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
.mastery-fill.st-known { background: var(--gradient-primary); }
.mastery-fill.st-familiar { background: linear-gradient(135deg, #ffc46b, #f08c2e); }
.mastery-fill.st-unknown { background: linear-gradient(135deg, #ff9b9b, #fa5151); }
.mastery-tip { font-size: 12.5px; color: var(--text-2); margin-top: 8px; }
.btn-mark-known {
  margin-top: 12px;
  padding: 10px 16px;
  font-size: 14px;
}

.study-hint { color: var(--text-2); font-size: 14px; margin: 20px 0; text-align: center; }
.study-meaning { font-size: 20px; font-weight: 700; color: var(--text); margin: 16px 0; }
.study-footer .btn-primary {
  max-width: 760px;
  margin: 0 auto;
}
/* 自评后悔按钮：卡片右上角，与「生词/复习」标签同行 */
.study-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.study-top-row .study-kind-tag { margin-bottom: 0; }
.btn-regret {
  flex-shrink: 0;
  width: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  background: rgba(0,0,0,.04);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.btn-regret:active { transform: scale(.95); }
.btn-regret:disabled { opacity: .5; }

/* 「有点忘了 · 降熟练」：与后悔按钮同排同级，暖色提示弱化感 */
.btn-fuzzy {
  flex-shrink: 0;
  width: auto;
  font-size: 12px;
  font-weight: 600;
  color: #b06a1c;
  background: #fff4e5;
  padding: 5px 12px;
  border-radius: 999px;
}
.btn-fuzzy:active { transform: scale(.95); }
.btn-fuzzy:disabled { opacity: .5; }
.fuzzy-note {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #b06a1c;
  background: #fff4e5;
  padding: 5px 12px;
  border-radius: 999px;
}

/* 「太简单 · 升熟练」：与降熟练同排同级，绿色已掌握感 */
.btn-easy {
  flex-shrink: 0;
  width: auto;
  font-size: 12px;
  font-weight: 600;
  color: #2c6748;
  background: #eef6ef;
  padding: 5px 12px;
  border-radius: 999px;
}
.btn-easy:active { transform: scale(.95); }
.btn-easy:disabled { opacity: .5; }
.easy-note {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #2c6748;
  background: #eef6ef;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.ai-loading {
  margin: 16px 0;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--primary-deep);
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  text-align: center;
  animation: ai-pulse 1.5s ease-in-out infinite;
}
@keyframes ai-pulse { 0%,100% { opacity: .6; } 50% { opacity: 1; } }
.ai-error {
  margin: 16px 0;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--danger);
  background: #fff5f5;
  border-radius: var(--radius-sm);
  text-align: center;
}

.speak-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 8px;
  position: relative;
  overflow: hidden;   /* 让波纹剪裁在圆形按钮内部扩散 */
}

/* 发音播放中：按钮内部右侧弧形波纹向外扩散，播放结束/失败自动移除 is-playing */
.speak-btn.is-playing::before,
.speak-btn.is-playing::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid currentColor;
  /* 只保留右半圈的弧线，形成声波向右扩散的观感 */
  clip-path: inset(0 0 0 50%);
  opacity: 0;
  pointer-events: none;
  animation: speakArc 1.4s ease-out infinite;
}
.speak-btn.is-playing::after { animation-delay: .7s; }
@keyframes speakArc {
  0% { transform: scale(.45); opacity: 0; }
  20% { opacity: .6; }
  100% { transform: scale(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .speak-btn.is-playing::before,
  .speak-btn.is-playing::after { animation: none; }
}

/* ========== 学习总结 ========== */
.summary-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 24px;
  text-align: center;
}
.summary-emoji { font-size: 52px; margin-bottom: 10px; }
.summary-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.summary-sub { color: var(--text-2); font-size: 14px; margin-bottom: 24px; }
.summary-grid { display: flex; gap: 10px; margin-bottom: 24px; }
.summary-item {
  flex: 1;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px 4px;
}
.summary-num { font-size: 26px; font-weight: 800; color: var(--primary); }
.summary-label { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.summary-checkin {
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 999px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}
.summary-actions { display: flex; flex-direction: column; gap: 10px; }

.empty-tip {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 24px;
  text-align: center;
}
.empty-tip .emoji { font-size: 48px; margin-bottom: 10px; }
.empty-tip h3 { font-size: 18px; margin-bottom: 6px; }
.empty-tip p { color: var(--text-2); font-size: 14px; margin-bottom: 20px; }
.goal-wheel-item.selected {
  color: var(--primary-deep);
  opacity: 1;
  transform: scale(1.12);
}
.book-actions .btn { width: auto; padding: 9px 18px; font-size: 13px; }
.word-chip.learned { background: var(--primary-light); color: var(--primary-deep); font-weight: 600; }
.streak-text { color: var(--accent); }

/* ========== 单词详情页 ========== */
.word-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 12px;
  position: sticky;
  top: 0;
  background: var(--gradient-header);
  z-index: 10;
  margin: -8px -16px 0;
  padding-left: 16px;
  padding-right: 16px;
}
.word-page-scroll { padding-bottom: 20px; }
.word-page-body { animation: fadeIn .3s ease; }

.word-page-body .modal-word-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.word-page-body .modal-word {
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.word-page-body .modal-phonetic { color: var(--text-2); font-size: 15px; margin-top: 4px; }
.word-page-body .modal-meta {
  font-size: 12px;
  color: var(--text-3);
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px dashed var(--border);
}

/* ========== 单词详解模块 ========== */
.wd-pos {
  display: inline-block;
  font-size: 12px;
  color: var(--text-2);
  margin-top: 6px;
}
.wd-block { margin: 14px 0; }
.wd-block-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.wd-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex: none; }

/* 树状纯文本详解：保留 ASCII 树形连接符的缩进与对齐 */
.wd-tree-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px 16px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
.wd-tree-block .wd-block-title { margin-bottom: 10px; }
.wd-tree {
  margin: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 13px;
  line-height: 1.9;
  color: var(--text);
  white-space: pre;
  tab-size: 2;
}
.wd-tree-block::-webkit-scrollbar { height: 6px; }
.wd-tree-block::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
@media (max-width: 640px) {
  .wd-tree { font-size: 12px; line-height: 1.85; }
  .wd-tree-block { padding: 12px 12px 14px; }
}

/* ---------- 结构化视觉树 v2：本义 → 词性分支 → 编号义项 ---------- */
.wd-def-block { margin: 14px 0 6px; }

/* 词树的根：一句话本义/词义内核 */
.wd-root {
  position: relative;
  margin: 0 0 14px;
  padding: 12px 14px 12px 16px;
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  border-radius: 12px;
}
.wd-root-label {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--primary-deep);
}
.wd-root-text {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.65;
  color: var(--text);
}

/* 用左侧竖线 + 分支节点表达“树”，而不是一条条无层次的义项流 */
.wd-vtree2 {
  position: relative;
  padding-left: 18px;
}
.wd-vtree2::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 18px;
  width: 2px;
  border-radius: 2px;
  background: var(--border);
}
.wd-branch2 { position: relative; margin: 0 0 16px; }
.wd-branch2:last-child { margin-bottom: 4px; }
.wd-branch2::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 14px;
  width: 13px;
  height: 2px;
  background: var(--border);
}
.wd-branch2::after {
  content: "";
  position: absolute;
  left: -17px;
  top: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}
.wd-branch-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-bottom: 4px;
}
.wd-pos {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-deep);
  font-size: 13px;
  font-weight: 800;
}
.wd-branch-usage {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-3);
}
.wd-forms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 2px;
}
.wd-form {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--text-2);
  font-size: 12px;
}
.wd-form-label { margin-right: 4px; color: var(--text-3); }

/* 义项 */
.wd-senses { display: flex; flex-direction: column; }
.wd-sense2 {
  padding: 12px 0 14px;
  border-bottom: 1px dashed var(--border);
}
.wd-sense2:last-child { padding-bottom: 4px; border-bottom: none; }
.wd-sense2.is-hot {
  margin: 4px 0;
  padding: 12px 14px;
  border-bottom: none;
  border-radius: 12px;
  background: var(--accent-light);
}
.wd-sense-top { display: flex; align-items: center; gap: 8px; }
/* 频率/义项标签固定在义项行右侧 */
.wd-sense-tags { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.wd-sense-no {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-deep);
  font-size: 11px;
  font-weight: 800;
}
.wd-sense-heading {
  display: flex;
  flex: 1;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.wd-sense-gloss {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
}
.wd-freq {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(245, 158, 11, .14);
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
}
.wd-sense-scene { font-size: 11px; color: var(--text-3); }
.wd-sense-scene-detail {
  margin: 4px 0 0 28px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-3);
}
.wd-sense-def {
  margin: 6px 0 0 28px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}
.wd-sense-usage {
  margin: 4px 0 0 28px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-3);
}

/* 搭配：英文/中文分开，英文可发音；不再挤成一条彩色 chip */
.wd-collocs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0 0 28px;
}
.wd-colloc {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 7px;
  font-size: 13px;
}
.wd-colloc-en { font-weight: 600; color: var(--text); }
.wd-colloc-cn { color: var(--text-2); }

/* 例句：左侧细线 + 译文弱化，避免和释义抢层级 */
.wd-egs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 0 28px;
}
.wd-eg {
  padding-left: 10px;
  border-left: 2px solid var(--border);
}
.wd-eg-en {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
}
.wd-eg-cn { margin-top: 2px; font-size: 13px; color: var(--text-2); }
/* 次要素材区：辨析/作文句型直接展示 */
.wd-fold {
  margin: 14px 0;
  border-top: 1px dashed var(--border);
}
.wd-fold-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 0 8px;
}
.wd-fold-title { font-size: 14px; font-weight: 700; color: var(--text); }
.wd-fold-meta { font-size: 12px; color: var(--text-3); }
.wd-fold-body { padding-bottom: 8px; }
.wd-disc-title { margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--primary-deep); }

.wd-writing-list { display: flex; flex-direction: column; gap: 6px; }
.wd-writing-item { font-size: 13px; line-height: 1.6; color: var(--text-2); }

/* 派生词：结构化展示，详情页可点击跳转 */
.wd-derivs { display: flex; flex-direction: column; gap: 6px; }
.wd-deriv {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.wd-deriv.is-static { cursor: default; }
.wd-deriv-word { font-weight: 700; color: var(--primary-deep); }
.wd-deriv-pos { font-size: 12px; color: var(--text-3); }
.wd-deriv-cn { font-size: 13px; color: var(--text-2); }
.wd-deriv:hover .wd-deriv-word { text-decoration: underline; }
.wd-deriv.is-static:hover .wd-deriv-word { text-decoration: none; }

@media (max-width: 640px) {
  .wd-vtree2 { padding-left: 14px; }
  .wd-vtree2::before { left: 3px; }
  .wd-branch2::before { left: -11px; width: 11px; }
  .wd-branch2::after { left: -15px; }
  .wd-sense-def { margin-left: 24px; }
  .wd-sense-usage { margin-left: 24px; }
  .wd-collocs { margin-left: 24px; }
  .wd-egs { margin-left: 24px; }
}

.wd-sense {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.collocations, .wd-collocations { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

.wd-example { margin: 8px 0; }
.wd-example-en { font-size: 14px; color: var(--text); line-height: 1.6; }
.wd-example-cn { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.wd-highlight { color: var(--primary); font-weight: 700; }

.wd-disc { background: var(--accent-light); border-radius: var(--radius-sm); padding: 14px 16px; }
.wd-disc .wd-block-title { color: #b06a12; }
.wd-disc .wd-dot { background: var(--accent); }
.wd-disc-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.wd-disc-item:last-of-type { border-bottom: none; }
.wd-disc-word { flex: none; font-weight: 800; color: var(--primary-deep); font-size: 14px; min-width: 70px; }
.wd-disc-body { font-size: 13px; }
.wd-disc-desc { color: var(--text); }
.wd-disc-eg { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.wd-contrasts { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }

.modal-meaning { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.vocab-more { text-align: center; margin-top: 12px; }
.vocab-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: none;
  background: var(--card);
  color: var(--text-2);
  font-size: 13px; font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(21, 60, 45, 0.06);
  cursor: pointer;
}
.chip.active { background: var(--primary); color: #fff; }
.vocab-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--card);
  border-radius: 12px;
  padding: 9px 14px;
  color: var(--text-3);
}
.vocab-search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-size: 14px; color: var(--text);
}
.vocab-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.vocab-list { display: flex; flex-direction: column; gap: 10px; }
.vocab-empty {
  text-align: center; color: var(--text-3);
  padding: 40px 0; font-size: 14px;
}
.vocab-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(21, 60, 45, 0.05);
  cursor: pointer;
}
.vocab-item-main { flex: 1; min-width: 0; }
.vocab-item-word {
  font-size: 17px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.vocab-item-sub {
  font-size: 12.5px; color: var(--text-2);
  margin: 3px 0 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vocab-item-bar {
  height: 5px; border-radius: 999px; background: var(--bg-2);
  overflow: hidden;
}
.vocab-item-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: var(--gradient-primary);
}
.vocab-item-bar i.st-familiar { background: linear-gradient(135deg, #ffc46b, #f08c2e); }
.vocab-item-bar i.st-learning { background: linear-gradient(135deg, #ff9b9b, #fa5151); }
.vocab-item-side {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.vocab-pct { font-size: 13px; font-weight: 800; color: var(--text-2); }
.vocab-badge {
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
}
.vocab-badge.st-known { background: var(--primary-light); color: var(--primary-deep); }
.vocab-badge.st-familiar { background: #fff4e5; color: #c07020; }
.vocab-badge.st-learning { background: #fdeeee; color: #c94a4a; }
.vocab-btn {
  border: none; cursor: pointer;
  font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px;
}
.vocab-btn-known { background: var(--primary-light); color: var(--primary-deep); }
.vocab-btn-forget { background: #fdeeee; color: #c94a4a; }
.vocab-btn-restore { background: #e8f5e9; color: #2e7d32; }
.vocab-badge-auto {
  background: #e3f2fd !important;
  color: #1565c0 !important;
  font-weight: 700;
}
/* ========== 熟练度测试（词汇量测试 / 智能熟词过滤） ========== */
.vt-quiz {
  flex: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-top: 18px;
  box-sizing: border-box;
}
.vt-word {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 0;
  font-size: clamp(30px, 10vw, 44px);
  line-height: 1.28;
  font-weight: 400;
  color: #20352c;
  text-align: center;
  word-break: break-word;
}
.vt-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 8px;
}
.vt-options { display: flex; flex-direction: column; gap: 8px; }
.vt-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e5ebe3;
  color: #20352c;
  font-size: 14.5px;
  line-height: 22px;
  font-weight: 500;
  text-align: left;
  transition: background .12s, transform .12s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.vt-option:active { background: #f2f7f4; transform: scale(.985); }
.vt-option:disabled { cursor: default; }
/* 点击即时选中态：接口返回前先给可见反馈，消除等待顿感 */
.vt-option.is-selected { border-color: #348562; background: #eef7f1; }
.vt-option.is-selected .vt-option-key { background: #348562; color: #fff; }
.vt-option.is-correct { border-color: #348562; background: #eef7f1; }
.vt-option.is-correct .vt-option-key { background: #348562; color: #fff; }
.vt-option.is-wrong { border-color: #c9605a; background: #fdf1f0; }
.vt-option.is-wrong .vt-option-key { background: #c9605a; color: #fff; }
/* 不判定对错时的中性选中态（点「不确定」或遇到假词） */
.vt-option.is-picked { border-color: #aebba6; background: #f4f2e9; }
.vt-option.is-picked .vt-option-key { background: #aebba6; color: #fff; }
/* 就地追加的对错符号 */
.vt-mark { margin-left: auto; flex-shrink: 0; font-weight: 800; }
.vt-option.is-correct .vt-mark { color: #22694b; }
.vt-option.is-wrong .vt-mark { color: #9c3c37; }
.vt-options.is-answered .vt-option:not(.is-correct):not(.is-wrong) { opacity: .65; }
.vt-next { background: #348562; color: #fff; }
.vt-option-key {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8f2e8;
  color: #22694b;
  font-size: 11px;
  font-weight: 700;
}
.vt-option-text { flex: 1; min-width: 0; word-break: break-word; }
.vt-btn {
  width: 100%;
  height: 48px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 22px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform .12s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.vt-btn:active { transform: scale(.985); }
.vt-unsure { background: #fdf4e4; color: #a7701f; border-color: #f4e2c2; }
.vt-unsure:disabled { opacity: .55; }
.vt-unsure.is-selected { border-color: #348562; background: #eef7f1; color: #22694b; }
.vt-finish {
  align-self: center;
  margin-top: 4px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #e8f2e8;
  color: #22694b;
  font-size: 12.5px;
  font-weight: 600;
}

/* 测试结果页：整页展示，隐藏测试顶栏与进度条 */
.st-page.is-result .st-nav,
.st-page.is-result .st-progress { display: none; }
.st-page.is-result .st-body { padding-top: 0; }

/* ========== 复习模式选择 ========== */
.rm-head { padding: 20px 4px 6px; }
.rm-title {
  font-size: 21px;
  line-height: 30px;
  font-weight: 700;
  color: #20352c;
}
.rm-sub {
  margin-top: 6px;
  font-size: 13px;
  line-height: 20px;
  color: #627469;
}
.rm-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rm-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 16px;
  box-sizing: border-box;
  text-align: left;
  background: #fff;
  border: 1.5px solid #e5ebe3;
  border-radius: 16px;
  transition: border-color .18s ease, background .18s ease, transform .12s ease;
}
.rm-item:active { transform: scale(.99); }
.rm-item.is-on { border-color: #348562; background: #f2f9f4; }
.rm-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rm-item-name {
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  color: #20352c;
}
.rm-item-desc {
  font-size: 12.5px;
  line-height: 19px;
  color: #627469;
}
.rm-check {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #dbe4dc;
  background: #fff;
  color: transparent;
}
.rm-item.is-on .rm-check {
  border-color: #348562;
  background: #348562;
  color: #fff;
}
.rm-item[disabled] { opacity: .55; }

/* ========== 场景背词列表 ========== */
.scene-item { align-items: flex-start; }
.scene-count {
  font-size: 12px;
  line-height: 19px;
  color: #348562;
  font-weight: 600;
}
.scene-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.scene-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid #dbe4dc;
  background: #fff;
  color: #34483e;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 18px;
  font-weight: 600;
}
.scene-btn:active { transform: scale(.98); }
.scene-btn-main {
  border-color: #348562;
  background: #348562;
  color: #fff;
}
.scene-btn[disabled] {
  opacity: .5;
  background: #f4f7f2;
  color: #8a9a90;
}
/* 场景词表弹层 */
.scene-words-head { padding-right: 30px; }
.scene-words-title { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.scene-words-sub { margin: 0 0 14px; font-size: 13px; color: var(--text-2); }
.scene-words-list {
  max-height: min(56vh, 420px);
  overflow-y: auto;
  border-top: 1px solid var(--border);
}
.scene-words-tip {
  padding: 22px 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-2);
}
.scene-word-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--border);
}
.scene-word-row:last-child { border-bottom: none; }
.scene-word-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.scene-word-word { font-size: 16px; font-weight: 700; color: #16241c; }
.scene-word-row.is-learned .scene-word-word { color: #22694b; }
.scene-word-phon { font-size: 12.5px; color: var(--text-2); }
.scene-word-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
}
.scene-word-meaning { font-size: 13.5px; color: var(--text-2); text-align: right; }
.scene-word-tag {
  font-size: 11px;
  line-height: 16px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eaf4ed;
  color: #22694b;
}
.scene-note {
  margin: 18px 4px 4px;
  text-align: center;
  font-size: 12px;
  line-height: 19px;
  color: #9aa9a0;
}
.scene-search-wrap { margin-top: 14px; }
.scene-search {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1.5px solid #dbe4dc;
  border-radius: 12px;
  background: #fff;
  color: #20352c;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  outline: none;
}
.scene-search:focus { border-color: #348562; }
.scene-domain { margin-top: 22px; }
.scene-domain-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px 10px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  color: #2f5d47;
}
.scene-domain-count {
  padding: 1px 8px;
  border-radius: 999px;
  background: #eef6f0;
  color: #348562;
  font-size: 11.5px;
  line-height: 18px;
  font-weight: 600;
}
.scene-domain .rm-list { margin-top: 0; }

/* ========== 主题词场：教育动线 ========== */
.scene-theme {
  margin-top: 18px;
  padding: 18px 16px 16px;
  border: 1.5px solid #cfe3d6;
  border-radius: 20px;
  background: linear-gradient(160deg, #f3faf5 0%, #ffffff 64%);
}
.scene-theme-head { min-width: 0; }
.scene-theme-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e3f2e8;
  color: #22694b;
  font-size: 11px;
  line-height: 18px;
  font-weight: 700;
}
.scene-theme-title {
  margin: 8px 0 4px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 800;
  color: #20352c;
}
.scene-theme-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 19px;
  color: #627469;
}
.scene-theme-map {
  position: relative;
  max-width: 520px;
  margin: 12px auto 0;
  border: 1px solid #dbe8df;
  border-radius: 16px;
  overflow: hidden;
  background: #eaf4ef;
}
.scene-theme-map img { display: block; width: 100%; height: auto; }
.scene-theme-pin {
  position: absolute;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.scene-theme-pin span {
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #fff;
  border-radius: 50%;
  background: #348562;
  color: #fff;
  font-size: 11.5px;
  line-height: 1;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(31, 45, 39, 0.28);
  transition: transform 0.15s ease, background 0.15s ease;
}
.scene-theme-pin:hover span,
.scene-theme-pin:focus-visible span {
  background: #246b4e;
  transform: scale(1.1);
}
.scene-theme-pin:focus-visible { outline: none; }
.scene-theme-map-hint {
  margin: 6px 2px 0;
  text-align: center;
  font-size: 11px;
  line-height: 17px;
  color: #8a9a91;
}
.scene-theme-route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 18px;
  color: #348562;
}
.scene-theme-route-step {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.scene-theme-route-step:not(:last-child)::after {
  content: '→';
  margin-left: 2px;
  color: #a9c9b6;
  font-weight: 400;
}
.scene-theme-route-step i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #348562;
  color: #fff;
  font-style: normal;
  font-size: 10.5px;
  line-height: 18px;
  text-align: center;
}
.scene-theme-stages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.scene-theme-stage {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e5ebe3;
  border-radius: 14px;
  background: #fff;
}
.scene-theme-num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eaf4ed;
  color: #22694b;
  font-size: 12px;
  line-height: 26px;
  font-weight: 700;
  text-align: center;
}
.scene-theme-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.scene-theme-label {
  font-size: 14.5px;
  line-height: 21px;
  font-weight: 700;
  color: #20352c;
}
.scene-theme-meta {
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  color: #348562;
}
.scene-theme-stage .scene-actions { margin-top: 4px; }
@media (max-width: 380px) {
  .scene-theme { padding: 15px 13px 14px; }
  .scene-theme-route { gap: 4px; }
}

.rm-section { margin-top: 26px; }
.rm-sec-title {
  padding: 0 4px 10px;
  font-size: 12.5px;
  line-height: 19px;
  font-weight: 600;
  color: #627469;
}
.rm-switch {
  flex: none;
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #dfe6e0;
  transition: background .18s ease;
}
.rm-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(32, 53, 44, .18);
  transition: transform .18s ease;
}
.rm-toggle[aria-pressed="true"] .rm-switch { background: #348562; }
.rm-toggle[aria-pressed="true"] .rm-switch i { transform: translateX(18px); }
.rm-end {
  margin: 26px 0 8px;
  width: 100%;
  height: 46px;
  border-radius: 14px;
  border: 1.5px solid #e5ebe3;
  background: #fff;
  color: #627469;
  font-size: 14px;
  font-weight: 600;
}
.rm-end:active { background: #f4f7f4; }

.vtest-loading {
  text-align: center; color: #627469;
  padding: 80px 0; font-size: 14px;
}

.vr-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0 calc(20px + var(--safe-bottom));
}
.vr-hero {
  padding: 26px 20px 22px;
  border-radius: 20px;
  border: 1px solid #e2ede5;
  background: linear-gradient(180deg, #eaf3ed 0%, #f8fbf9 100%);
  text-align: center;
}
.vr-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff;
  color: #22694b;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
}
.vr-num {
  margin-top: 14px;
  font-size: clamp(30px, 9vw, 40px);
  line-height: 1.16;
  font-weight: 800;
  color: #20352c;
  letter-spacing: -.02em;
  word-break: break-word;
}
.vr-label { margin-top: 2px; font-size: 13px; color: #627469; }
.vr-sub { margin-top: 12px; font-size: 12.5px; color: #4b6357; }
.vr-sub b { color: #22694b; }
.vr-foot { margin-top: 8px; font-size: 11.5px; color: #829087; }
.vr-card {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid #e5ebe3;
  background: #fff;
}
.vr-sec-title {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #829087;
  letter-spacing: .02em;
}
.vr-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  color: #627469;
}
.vr-stat-row b { font-size: 18px; font-weight: 800; color: #22694b; }
.vr-card .cat-books { margin-bottom: 0; }
.vr-card .cat-est-note { margin: 8px 0 0; }
.vr-card .cat-level-desc { margin-top: 16px; }

.vtest-breakdown { display: flex; flex-direction: column; gap: 16px; }
.vtest-row { position: relative; }
.vtest-row-label { font-size: 13.5px; font-weight: 700; color: #20352c; }
.vtest-row-pct {
  position: absolute; right: 0; top: 0;
  font-size: 13.5px; font-weight: 800; color: #627469;
}
.vtest-row-bar {
  height: 8px; border-radius: 999px; background: #eef2ee;
  margin-top: 6px; overflow: hidden;
}
.vtest-row-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: #348562;
}
.vtest-row-bar i.st-familiar { background: linear-gradient(135deg, #ffc46b, #f08c2e); }
.vtest-row-bar i.st-learning { background: linear-gradient(135deg, #ff9b9b, #fa5151); }
.vtest-result-actions {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 12px;
}

/* ========== 复习自评结果反馈 ========== */
.quiz-type-label {
  font-size: 12.5px; font-weight: 700; color: var(--text-3);
  letter-spacing: .03em;
  margin: 6px 0 18px;
}
.quiz-result {
  font-size: 18px; font-weight: 800;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.quiz-result.is-correct { background: var(--primary-light); color: var(--primary-deep); }
.quiz-result.is-wrong { background: #fdeeee; color: #c94a4a; }

/* ========== V2 Reading Mode ========== */
.reading-head { margin: 10px 0 20px; }
.reading-head h2 { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.reading-head p { font-size: 13.5px; color: var(--text-2); line-height: 1.6; margin: 0; }
.rc-legend.rc-new { color: var(--primary); }
.rc-legend.rc-fam { color: #e08a1e; }
.reading-list { display: flex; flex-direction: column; gap: 12px; }
.rc-word {
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  padding: 0 1px;
}
.rc-word.rc-new {
  color: var(--primary-deep);
  border-bottom: 2px solid var(--primary);
  background: var(--primary-light);
}
.rc-word.rc-fam {
  color: #b96a08;
  border-bottom: 1.5px dotted #e0a44f;
}
.reading-popup-mask {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .38);
  z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.reading-popup {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  padding: 22px 20px calc(20px + var(--safe-bottom));
  position: relative;
  animation: readingPop .22s ease;
}
@keyframes readingPop { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.reading-popup-close {
  position: absolute; top: 12px; right: 12px;
  background: var(--bg); border: none; border-radius: 999px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); cursor: pointer;
}
.reading-popup-word { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-right: 36px; }
.reading-popup-word h3 { font-size: 24px; font-weight: 800; margin: 0; }
.reading-popup-word .speak-btn {
  border: none; background: var(--primary-light); color: var(--primary-deep);
  border-radius: 999px; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.reading-popup-phonetic { font-size: 13.5px; color: var(--text-2); margin: 6px 0 12px; }
.reading-popup-meaning { font-size: 16px; line-height: 1.6; font-weight: 600; margin-bottom: 10px; }
.reading-popup-example { font-size: 14px; line-height: 1.7; color: var(--text-2); font-style: italic; }
.reading-popup-example-cn { font-size: 13px; line-height: 1.7; color: var(--text-3); margin-top: 2px; }
.reading-popup-actions { display: flex; gap: 10px; margin-top: 18px; }
.reading-popup-actions .btn { flex: 1; }
.reading-popup-actions .btn:disabled { opacity: .65; cursor: default; }
@media (min-width: 768px) {
  .reading-popup-mask { align-items: center; }
}

/* ========== V2 Phase 9 错误模式分析 / 针对训练 ========== */
.tag-practice { background: #e8f0ff; color: #2a63d6; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 999px; }
.btn:disabled { opacity: .6; cursor: default; }


/* ========== Toast ========== */
.toast {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(26, 36, 32, 0.92);
  color: #fff;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  z-index: 200;
  max-width: 86%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
/* 可撤销 toast 的操作按钮 */
.toast-action {
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #85fabf;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* ========== 长按取词 · 底部简明释义框 ========== */
.qdef-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 290;
  animation: qdefFade 0.16s ease-out;
}
@keyframes qdefFade { from { opacity: 0; } to { opacity: 1; } }

.qdef-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -8px 32px rgba(20, 60, 40, 0.16);
  padding: 0 18px calc(16px + var(--safe-bottom));
  z-index: 300;
  max-width: 412px;
  margin: 0 auto;
  max-height: 70vh;
  overflow-y: auto;
  animation: qdefUp 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
  -webkit-overflow-scrolling: touch;
}
@keyframes qdefUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* 顶部拖动条 + 右上关闭 */
.qdef-handle-wrap {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.qdef-handle {
  width: 36px; height: 4px;
  background: #d5ded6;
  border-radius: 3px;
}
.qdef-close {
  position: absolute; top: 23px; right: 18px;
  width: 32px; height: 32px;
  background: transparent; border: 0; padding: 0;
  color: #627469;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border-radius: 50%;
}
.qdef-close:active { background: #f2f5f0; }

/* 内容：单词区 → 释义区 → 查看详细释义按钮 */
.qdef-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 12px;
}

.qdef-wordwrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.qdef-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 44px;
}
.qdef-word {
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  color: #20352c;
  word-break: break-word;
}
.qdef-phon {
  display: flex;
  align-items: center;
}
.qdef-phonetic {
  font-size: 13px;
  line-height: 18px;
  color: #627469;
}

/* 释义行：词性胶囊 + 中文释义 */
.qdef-sense {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qdef-pos {
  flex-shrink: 0;
  padding: 3px 7px;
  border-radius: 100px;
  background: #e8f2e8;
  color: #348562;
  font-size: 12px;
  line-height: 18px;
}
.qdef-meaning {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: #20352c;
}

/* 查看详细释义：整行主按钮 + 右侧箭头 */
.qdef-open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #348562;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.qdef-open:active { background: #22694b; }
.qdef-open-arrow { display: inline-flex; color: #fff; }
.qdef-open-arrow svg { width: 16px; height: 16px; }

.qdef-loading { font-size: 14px; color: #627469; padding: 8px 0; }
.qdef-empty { font-size: 13px; color: #829087; padding: 4px 0; }

/* 长按命中时给被命中单词一个浅色高亮 */
.qdef-hit { background: var(--primary-light); border-radius: 4px; }

/* ========== 响应式 ========== */
@media (max-width: 640px) {
  .nav-desktop { display: none; }
  .page { padding: 4px 16px calc(72px + var(--safe-bottom)); }
  .nav-mobile {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 4px 0 calc(4px + var(--safe-bottom));
    z-index: 60;
    justify-content: space-around;
  }
  .nav-mobile .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    padding: 6px 4px;
    border-radius: 0;
  }
  .nav-svg { width: 22px; height: 22px; }
  .word-hero-word { font-size: 32px; }
  .word-page-body .modal-word { font-size: 30px; }
  .summary-grid { flex-wrap: wrap; }
}

@media (min-width: 641px) {
  body.mode-word .page { padding-bottom: 32px; }
}

/* 结果页 */
.cat-warn {
  background: #fff4e5; color: #b06a1c;
  border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 12.5px; line-height: 1.55;
  margin-bottom: 16px;
}
.cat-level-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px;
}
.cat-level-label { font-size: 12px; color: var(--text-3); }
.cat-level-name { font-size: 17px; font-weight: 800; margin-top: 2px; }
.cat-theta { font-size: 22px; font-weight: 900; color: var(--primary-deep); text-align: right; }
.cat-ci { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); }
.cat-theta-scale {
  position: relative; height: 6px; border-radius: 999px;
  background: var(--bg-2); margin: 22px 0 8px;
}

/* 答题页 */
.srev-card {
  max-width: 760px; margin: 16px auto 24px;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 18px 18px 16px;
}
.srev-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.srev-cefr {
  font-size: 11px; font-weight: 700; color: var(--primary-deep);
  background: var(--primary-light); border-radius: 999px; padding: 2px 10px;
}
.srev-mode-toggle { display: flex; gap: 8px; }
.srev-mode-toggle .chip { padding: 5px 12px; font-size: 12px; }

.srev-question {
  font-size: 19px; font-weight: 700; line-height: 1.65;
  margin-bottom: 10px;
}
.srev-question.srev-en { font-family: Georgia, "Times New Roman", serif; }
.srev-hint { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.srev-first-letter { font-size: 13px; color: var(--primary-deep); margin-bottom: 6px; }
.srev-blank {
  display: inline-block; min-width: 64px;
  border-bottom: 2px solid var(--primary);
  color: var(--primary); font-weight: 800; text-align: center;
  letter-spacing: 2px;
}

.srev-input {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); padding: 12px 14px;
  font-size: 15px; font-family: inherit; line-height: 1.6; color: var(--text);
  resize: vertical; margin: 10px 0 14px; outline: none;
}
.srev-input:focus { border-color: var(--primary); background: #fff; }
.srev-actions { display: flex; gap: 10px; justify-content: flex-end; }

.srev-loading-bar {
  width: 120px; height: 4px; border-radius: 999px;
  background: var(--bg-2); margin: 0 auto; overflow: hidden; position: relative;
}
.srev-loading-bar::after {
  content: ""; position: absolute; left: -40%; top: 0; width: 40%; height: 100%;
  border-radius: 999px; background: var(--primary);
  animation: srevSlide 1.2s ease-in-out infinite;
}
@keyframes srevSlide { to { left: 100%; } }

/* 结果页 */
.srev-result-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 16px;
}
.srev-ring-bg { stroke: var(--bg-2); }
.srev-ring-fg { stroke: var(--primary); transition: stroke-dashoffset .6s ease; }
.srev-ring.bad .srev-ring-fg { stroke: var(--accent); }
.srev-ring-num { font-size: 22px; font-weight: 800; fill: var(--text); }
.srev-result-side { flex: 1; }
.srev-verdict { font-size: 17px; font-weight: 800; }
.srev-comment { font-size: 13px; color: var(--text-2); margin-top: 2px; }

.sref-block {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 10px;
}
.sref-label {
  font-size: 11.5px; color: var(--text-3); font-weight: 700;
  margin-bottom: 4px;
}
.sref-label .legend { font-weight: 500; margin-left: 8px; }
.sref-label .legend-miss { color: var(--danger); }
.sref-label .legend-extra { color: var(--primary-deep); margin-left: 10px; }
.sref-text { font-size: 14.5px; line-height: 1.7; }
.sref-zh { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.srev-miss { color: var(--danger); text-decoration: underline wavy; text-underline-offset: 3px; }
.srev-extra { color: var(--primary-deep); font-weight: 700; }

.srev-errors { margin: 4px 0 12px; }
.srev-err {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0; border-top: 1px dashed var(--border);
  font-size: 13px;
}
.srev-err-type {
  flex-shrink: 0; font-size: 11px; font-weight: 700;
  color: #b06a1c; background: #fff4e5; border-radius: 999px; padding: 2px 8px;
  margin-top: 1px;
}
.srev-err-body { color: var(--text); line-height: 1.6; }
.srev-err-note { display: block; color: var(--text-2); font-size: 12px; }

.srev-degraded {
  background: #fff4e5; color: #b06a1c; border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 13px; margin-bottom: 12px;
}
.srev-summary-actions { display: flex; gap: 10px; justify-content: center; }

/* ---------- 中译英拼写强化 ---------- */
.spell-meaning {
  font-size: 20px; font-weight: 800; line-height: 1.6;
  margin: 12px 0 4px;
}
.spell-hint {
  font-size: 13px; color: var(--primary-deep); font-weight: 600;
  margin-bottom: 10px;
}
.spell-example {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px; line-height: 1.7;
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 6px;
}
.spell-input {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); padding: 12px 14px;
  font-size: 17px; font-weight: 600; font-family: inherit;
  letter-spacing: 1px; color: var(--text);
  margin: 12px 0 4px; outline: none;
}
.spell-input:focus { border-color: var(--primary); background: #fff; }
.spell-actions { display: flex; gap: 10px; margin-top: 12px; }
.spell-verdict {
  font-size: 15px; font-weight: 800; border-radius: var(--radius-sm);
  padding: 8px 14px; margin-top: 14px;
}
.spell-ok { background: #e8f6ec; color: #1d7a3d; }
.spell-bad { background: #fdeaea; color: var(--danger); }
.spell-typed { font-size: 13px; color: var(--text-2); margin-top: 6px; }

/* 拼写复习卡（复习流程，独立于上面的拼写强化） */
.spell-review-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 26px;
}
.sr-prompt {
  font-size: 13px;
  line-height: 20px;
  color: #627469;
  text-align: center;
}
.sr-meaning {
  margin-top: 10px;
  font-size: 26px;
  line-height: 40px;
  font-weight: 700;
  color: #20352c;
  text-align: center;
  word-break: break-word;
}
.sr-hint {
  margin-top: 8px;
  font-size: 13px;
  line-height: 20px;
  color: #348562;
  text-align: center;
}
.sr-example {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f5f8f3;
}
.sr-example-en {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14.5px;
  line-height: 24px;
  color: #20352c;
}
.sr-example-cn {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 19px;
  color: #627469;
}
.sr-input {
  width: 100%;
  height: 54px;
  margin-top: 28px;
  padding: 0 16px;
  box-sizing: border-box;
  border: 1.5px solid #e5ebe3;
  border-radius: 16px;
  background: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .5px;
  color: #20352c;
  text-align: center;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.sr-input::placeholder {
  font-weight: 400;
  letter-spacing: 0;
  color: #a9b6ae;
}
.sr-input:focus {
  border-color: #348562;
  box-shadow: 0 0 0 3px rgba(52, 133, 98, .12);
}
/* 提交按钮与四选一测验的「继续下一题」同款：实心森林绿，贴底 */
.sr-actions {
  margin-top: auto;
  padding-top: 24px;
}

/* ---------- 听音辨词 ---------- */
.listen-card {
  text-align: center;
  padding: 22px 16px 10px;
}
.listen-hint { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.listen-play {
  width: 84px; height: 84px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--gradient-primary);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px var(--primary-glow);
  transition: transform .15s ease;
}
.listen-play:active { transform: scale(0.94); }
.listen-slow {
  display: block; margin: 12px auto 0;
  border: 1px solid var(--border); background: #fff;
  color: var(--text-2); font-size: 13px; font-weight: 600;
  border-radius: 20px; padding: 6px 16px; cursor: pointer;
  font-family: inherit;
}
.listen-options {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 4px 0 8px;
}
.listen-option {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; padding: 14px 10px;
  font-size: 16px; font-weight: 700; font-family: inherit;
  color: var(--text); cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  word-break: break-word;
}
.listen-option:hover:not(:disabled) { border-color: var(--primary); }
.listen-option:disabled { cursor: default; }
.listen-option.right {
  border-color: var(--success); background: var(--primary-light); color: var(--primary-deep);
}
.listen-option.wrong {
  border-color: var(--danger); background: #fdeaea; color: var(--danger);
}
.listen-feedback { text-align: center; font-size: 15px; min-height: 24px; }
.listen-feedback strong { font-size: 18px; }
.listen-ok { color: var(--primary-deep); font-weight: 700; }
.listen-no { color: var(--danger); font-weight: 700; margin-right: 4px; }
.listen-phonetic { color: var(--text-2); font-size: 14px; margin-left: 4px; }
.listen-meaning { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.listen-done { text-align: center; padding: 40px 20px; }
.listen-done-score {
  font-size: 44px; font-weight: 800; color: var(--primary-deep);
  font-variant-numeric: tabular-nums;
}
.listen-done-text { color: var(--text-2); font-size: 14px; margin: 8px 0 22px; }
.listen-done .btn { display: block; width: 100%; margin-top: 10px; }
.writing-history-item .wd-example-en { font-size: 13.5px; }

/* ========== 考研熟词生义答题 ========== */
.poly-tag {
  font-size: 11px; font-weight: 700; color: var(--primary-deep);
  background: var(--primary-light); border-radius: 999px; padding: 2px 10px;
}
/* 同义词辨析：句中填空高亮 */
.syn-blank {
  display: inline-block; min-width: 56px;
  padding: 0 8px; border-radius: 6px;
  background: var(--primary-light); color: var(--primary-deep);
  font-weight: 700; text-align: center; letter-spacing: 2px;
}
.syn-blank-filled {
  letter-spacing: normal; text-decoration: underline;
  text-decoration-color: var(--primary); text-underline-offset: 4px;
}
.srev-hint-inline { font-size: 12.5px; color: var(--text-2); }
.poly-sentence {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px; font-weight: 600; line-height: 1.75;
  margin-bottom: 16px;
  /* 长按查词：阻止系统文本选择干扰 */
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.poly-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.poly-option {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left; font-family: inherit;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 14.5px; color: var(--text);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.poly-option:active { border-color: var(--primary); background: var(--primary-light); }
.poly-option:disabled { cursor: default; opacity: .9; }
.poly-option-key {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-2); color: var(--text-2);
  font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.poly-option.is-right {
  border-color: var(--primary); background: var(--primary-light);
}
.poly-option.is-right .poly-option-key {
  background: var(--primary); color: #fff;
}
.poly-option.is-wrong {
  border-color: var(--danger); background: #fdeeee;
}
.poly-option.is-wrong .poly-option-key {
  background: var(--danger); color: #fff;
}

.poly-verdict {
  font-size: 16px; font-weight: 800; margin-bottom: 12px;
}
.poly-verdict.good { color: var(--success); }
.poly-verdict.bad { color: var(--danger); }

.poly-exp { background: var(--bg); border-radius: var(--radius-sm); padding: 12px 14px; }
.poly-exp-row { font-size: 13.5px; line-height: 1.7; margin-bottom: 8px; }
.poly-exp-row:last-child { margin-bottom: 0; }
.poly-exp-key { font-weight: 800; margin-right: 8px; }
.poly-exp-body { color: var(--text); }
.poly-exp-body b { color: var(--primary-deep); }
.poly-exp-tr { color: var(--text-2); }
.poly-exp-note { color: var(--text-2); font-size: 12.5px; }

/* 以下样式仍被熟词生义回顾页复用 */
.dict-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.dict-toolbar .chip { cursor: pointer; border: 1px solid var(--border, #e5e7eb); }
.dict-toolbar .chip.active {
  background: var(--primary-deep, #4f46e5); color: #fff; border-color: transparent;
}
.dict-toolbar .chip:disabled { opacity: .4; cursor: default; }
.dict-nav-btn { min-width: 30px; padding: 3px 8px; font-size: 15px; line-height: 1.2; }
.dict-nav-btn:disabled { opacity: .35; cursor: default; }
.dict-nav-date { font-size: 13px; font-weight: 600; color: var(--text-1); min-width: 40px; text-align: center; }
.cat-theta-scale i {
  position: absolute; top: -3px; height: 12px;
  border-radius: 999px; background: var(--gradient-primary);
}
.cat-theta-scale span {
  position: absolute; top: 14px; font-size: 10px; color: var(--text-3);
  transform: translateX(-50%);
}
.cat-theta-scale span:nth-child(1) { left: 0; transform: none; }
.cat-theta-scale span:nth-child(2) { left: 50%; }
.cat-theta-scale span:nth-child(3) { right: 0; transform: none; left: auto; }
.cat-level-desc { font-size: 12.5px; color: var(--text-2); margin-top: 20px; }
.cat-est-note {
  font-size: 11.5px; color: var(--text-3); line-height: 1.6;
  margin: 2px 0 18px;
}
.cat-books { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.cat-book-head {
  display: flex; justify-content: space-between;
  font-size: 13px; font-weight: 700; margin-bottom: 5px;
}
.cat-book-head span:last-child { color: var(--text-3); font-weight: 500; font-size: 12px; }
.cat-samples { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-sample {
  font-size: 12.5px; padding: 4px 10px; border-radius: 999px;
  background: var(--primary-light); color: var(--primary-deep);
}

/* 词汇页智能过滤横幅 */
.cat-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(135deg, var(--primary-light), #f7fdfa);
  border: 1px solid rgba(40, 200, 138, .25);
  border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 14px;
}
.cat-banner-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cat-banner-icon { font-size: 22px; flex-shrink: 0; }
.cat-banner-title { font-size: 13.5px; font-weight: 800; }
.cat-banner-sub { font-size: 11.5px; color: var(--text-2); line-height: 1.5; }
.cat-banner-restored { color: #c07020; }

.vocab-badge-cat {
  background: var(--primary-light) !important;
  color: var(--primary-deep) !important;
  font-weight: 700;
}
.vocab-badge-restored {
  background: #fff4e5 !important;
  color: #c07020 !important;
}
.cat-correct-banner {
  background: linear-gradient(135deg, #ffd9a8, #ffb35c) !important;
}

/* ========== 学习会话新词自测（我认识 / 不认识） ========== */
.selftest-hint {
  font-size: 14px; color: var(--text-2);
  margin: 18px 0 6px; text-align: center;
}

/* ========== 熟词生义回顾 ========== */
.polyhist-head {
  flex: 1; font-size: 16px; font-weight: 700; color: var(--text-1);
}
.polyhist-toolbar { align-items: center; }
.polyhist-counter {
  margin-left: auto; font-size: 12.5px; color: var(--text-2);
}
.polyhist-card {
  max-width: 760px; margin: 12px auto;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 16px 18px;
}
.polyhist-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.polyhist-word { font-size: 17px; font-weight: 800; }
.polyhist-badge {
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 10px;
}
.polyhist-badge.ok { color: var(--success); background: #e6f6ec; }
.polyhist-badge.bad { color: var(--danger); background: #fdeaea; }
.polyhist-badge.skip { color: var(--text-2); background: var(--bg-2); }
.polyhist-answer { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.polyhist-label { color: var(--text-3); font-size: 12.5px; }
.polyhist-ok { color: var(--success); font-weight: 700; }
.polyhist-bad { color: var(--danger); font-weight: 700; }

/* ========== 隐喻短语库（抽卡自测） ========== */
.phrase-quiz-top { padding-top: 0; }

.phrase-quiz-tip {
  max-width: 760px; margin: 0 auto 10px;
  font-size: 12px; color: var(--text-3); text-align: center;
}
.phrase-card {
  max-width: 760px; margin: 0 auto;
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 26px 20px; text-align: center;
}
.phrase-card-hint { font-size: 12px; color: var(--text-3); }
.phrase-card-front {
  margin-top: 10px; font-size: 21px; font-weight: 800;
  line-height: 1.5; color: var(--text-1);
}
.phrase-card-note { margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.phrase-reveal {
  margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border, #eee);
}
.phrase-card-answer {
  font-size: 24px; font-weight: 800; color: var(--primary-deep);
  word-break: break-word;
}
.phrase-card-eg { margin-top: 8px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.phrase-eg-cn { margin-top: 2px; font-size: 12px; color: var(--text-3); }
.phrase-judge { margin-top: 20px; display: flex; gap: 12px; justify-content: center; }
.phrase-judge .btn { flex: 1; max-width: 180px; }

/* ========== 设置页 / 帮助页：沉浸式（隐藏顶栏与底部导航） ========== */
body.mode-settings .app-header,
body.mode-settings #nav-mobile,
body.mode-help .app-header,
body.mode-help #nav-mobile { display: none; }
body.mode-settings .page,
body.mode-help .page { padding-bottom: 48px; }

/* ========== 主题：护眼 / 夜间 ========== */
html[data-theme="eye"] {
  --bg: #f6f1e4;
  --bg-2: #eee6d2;
  --card: #fffcf4;
  --border: #e9dfc9;
  --text: #3a3428;
  --text-2: #8d8169;
  --text-3: #b6a98e;
  --primary: #2fa97b;
  --primary-dark: #24956d;
  --primary-deep: #1b7d5b;
  --primary-light: #e6f3e8;
  --primary-glow: rgba(47, 169, 123, .26);
  --gradient-header: linear-gradient(180deg, #eef3dc 0%, #f5efdf 55%, #f6f1e4 100%);
  --gradient-primary: linear-gradient(135deg, #42c793, #2fa97b);
  --shadow-sm: 0 1px 6px rgba(90, 70, 30, .05);
  --shadow: 0 4px 18px rgba(90, 70, 30, .07);
  --shadow-lg: 0 10px 32px rgba(90, 70, 30, .12);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101614;
  --bg-2: #1a231f;
  --card: #1a221e;
  --border: #2a3630;
  --text: #e8f0eb;
  --text-2: #93a69c;
  --text-3: #64766d;
  --primary: #35d095;
  --primary-dark: #2bbc86;
  --primary-deep: #5ee0b0;
  --primary-light: #14332a;
  --primary-glow: rgba(53, 208, 149, .18);
  --gradient-header: linear-gradient(180deg, #122a22 0%, #15241e 55%, #101614 100%);
  --gradient-primary: linear-gradient(135deg, #45e0a6, #2bbc86);
  --shadow-sm: 0 1px 6px rgba(0, 0, 0, .25);
  --shadow: 0 4px 18px rgba(0, 0, 0, .30);
  --shadow-lg: 0 10px 32px rgba(0, 0, 0, .45);
}
html[data-theme="dark"] .search-bar { background: rgba(255, 255, 255, .06); }
html[data-theme="dark"] .search-clear { background: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .search-clear:hover { background: rgba(255, 255, 255, .24); }
html[data-theme="dark"] .progress-bar { background: #25322c; }
html[data-theme="dark"] .heat-cell { background: #26332d; }
html[data-theme="dark"] .heat-cell.lv1 { background: #2d5b49; }
html[data-theme="dark"] .heat-cell.lv2 { background: #38a97c; }
html[data-theme="dark"] .heat-cell.blank { background: transparent; }
html[data-theme="dark"] .btn-primary:disabled,
html[data-theme="dark"] .btn-start:disabled { background: #26332d; }
html[data-theme="dark"] .srev-input:focus,
html[data-theme="dark"] .spell-input:focus,
html[data-theme="dark"] .auth-input:focus,
html[data-theme="dark"] .modal-input:focus { background: var(--card); }
html[data-theme="dark"] .set-toggle i { background: #33443c; }

/* 减少动画效果（设置 → 其他设置） */
body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: .01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .01ms !important;
  scroll-behavior: auto !important;
}

/* ========== 单词详情页：按「forge · 词树」设计稿 ==========
   学习页详解复用同一套排版：给容器加 .word-scope 即可 */
#view-word,
.word-scope {
  --wd-ink: #20352c;
  --wd-sub: #627469;
  --wd-green: #348562;
  --wd-green-deep: #22694b;
  --wd-green-bg: #e8f2e8;
  --wd-line: #dfe9e1;
  --wd-amber-bg: #f7eedd;
  --wd-amber-ink: #7a571f;
  background: #f6f8f4;
}

:is(#view-word, .word-scope) .word-topbar {
  background: linear-gradient(180deg, #e7f0e5 0%, #eef4ec 46%, #f6f8f4 100%);
}
:is(#view-word, .word-scope) .word-topbar .icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5ebe3;
}
/* 右上角显示设置入口：比返回键略小，避免抢视觉焦点 */
:is(#view-word, .word-scope) .word-topbar .word-settings-btn {
  width: 32px;
  height: 32px;
}
:is(#view-word, .word-scope) .word-topbar .word-settings-btn svg {
  width: 17px;
  height: 17px;
}
/* 生词本 / 显示设置：不用白色卡片，直接融进顶栏背景 */
:is(#view-word, .word-scope) .word-topbar .word-save-btn,
:is(#view-word, .word-scope) .word-topbar .word-settings-btn {
  background: transparent;
  border-color: transparent;
}

/* 词头 */
:is(#view-word, .word-scope) .word-hero-row { align-items: flex-start; }
:is(#view-word, .word-scope) .word-hero-word {
  font-size: 36px;
  font-weight: 700;
  line-height: 43px;
  color: var(--wd-ink);
}
:is(#view-word, .word-scope) .word-hero-phonetic {
  margin-top: 2px;
  font-size: 15px;
  line-height: 24px;
  color: var(--wd-sub);
}
:is(#view-word, .word-scope) .word-hero .speak-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--wd-green-bg);
  color: var(--wd-green);
}

/* 核心本义 */
:is(#view-word, .word-scope) .wd-root {
  background: var(--wd-green-bg);
  border-left: 3px solid #c9e0d2;
  border-radius: 12px;
  padding: 12px 14px 12px 19px;
}
:is(#view-word, .word-scope) .wd-root-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 18px;
  color: var(--wd-green-deep);
  margin-bottom: 4px;
}
:is(#view-word, .word-scope) .wd-root-text {
  font-size: 15px;
  font-weight: 700;
  line-height: 25px;
  color: var(--wd-ink);
}

/* 词性树 */
:is(#view-word, .word-scope) .wd-vtree2 { padding-left: 18px; }
:is(#view-word, .word-scope) .wd-vtree2::before { background: var(--wd-line); }
:is(#view-word, .word-scope) .wd-branch2::before,
:is(#view-word, .word-scope) .wd-branch2::after { background: var(--wd-line); }
:is(#view-word, .word-scope) .wd-branch2::after { background: var(--wd-green); }
:is(#view-word, .word-scope) .wd-pos {
  font-size: 13px;
  font-weight: 700;
  color: var(--wd-green-deep);
  background: var(--wd-green-bg);
  border-radius: 6px;
  padding: 2px 9px;
}
:is(#view-word, .word-scope) .wd-branch-usage { font-size: 12px; line-height: 19px; color: var(--wd-sub); }

/* 义项卡片 */
:is(#view-word, .word-scope) .wd-senses { gap: 8px; }
:is(#view-word, .word-scope) .wd-sense2,
:is(#view-word, .word-scope) .wd-sense2.is-hot {
  background: #fff;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0;
  box-shadow: none;
}
:is(#view-word, .word-scope) .wd-sense2:last-child { padding-bottom: 12px; }
/* 高频义项：卡片与序号统一用「高频」标签的琥珀色强调 */
:is(#view-word, .word-scope) .wd-sense2.is-hot {
  background: var(--wd-amber-bg);
  box-shadow: inset 0 0 0 1px rgba(122, 87, 31, .14);
}
:is(#view-word, .word-scope) .wd-sense2.is-hot .wd-sense-no {
  background: var(--wd-amber-ink);
  color: var(--wd-amber-bg);
}
/* 义项强调范围切换在「显示设置」页，详见 .ws-seg */
:is(#view-word, .word-scope) .wd-sense-no {
  background: var(--wd-green-bg);
  color: var(--wd-green-deep);
  font-size: 11px;
  font-weight: 700;
}
:is(#view-word, .word-scope) .wd-sense-gloss { font-size: 16px; font-weight: 700; line-height: 26px; color: var(--wd-ink); }
:is(#view-word, .word-scope) .wd-freq {
  background: var(--wd-amber-bg);
  color: var(--wd-amber-ink);
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 6px;
}
:is(#view-word, .word-scope) .wd-sense-def {
  margin: 6px 0 0 28px;
  font-size: 14px;
  line-height: 24px;
  color: var(--wd-sub);
}
:is(#view-word, .word-scope) .wd-sense-usage { margin: 4px 0 0 28px; font-size: 12px; line-height: 19px; color: var(--wd-sub); }
:is(#view-word, .word-scope) .wd-collocs { margin: 8px 0 0 28px; gap: 4px; }
:is(#view-word, .word-scope) .wd-colloc-en { font-size: 13px; font-weight: 700; line-height: 21px; color: var(--wd-ink); }
:is(#view-word, .word-scope) .wd-colloc-cn { font-size: 13px; line-height: 21px; color: var(--wd-sub); }
:is(#view-word, .word-scope) .wd-egs { margin: 8px 0 0 28px; gap: 12px; }
:is(#view-word, .word-scope) .wd-eg { border-left: 2px solid var(--wd-line); padding-left: 10px; }
:is(#view-word, .word-scope) .wd-eg-en { font-size: 14px; line-height: 23px; color: var(--wd-ink); }
:is(#view-word, .word-scope) .wd-eg-cn { margin-top: 2px; font-size: 13px; line-height: 21px; color: var(--wd-sub); }


/* 次要素材区块（辨析 / 作文句型） */
:is(#view-word, .word-scope) .wd-fold {
  margin-top: 16px;
  padding: 0;
  border-top: 1px solid var(--wd-line);
}
:is(#view-word, .word-scope) .wd-fold-head { padding: 12px 0 8px; }
:is(#view-word, .word-scope) .wd-dot { width: 6px; height: 6px; background: var(--wd-green); }
:is(#view-word, .word-scope) .wd-fold-title { font-size: 15px; font-weight: 700; color: var(--wd-ink); }
:is(#view-word, .word-scope) .wd-fold:has(.wd-disc-list) .wd-fold-title { font-size: 17px; }
:is(#view-word, .word-scope) .wd-fold-meta { font-size: 12px; color: var(--wd-sub); }
:is(#view-word, .word-scope) .wd-fold-body { padding-bottom: 4px; }

:is(#view-word, .word-scope) .wd-disc { background: transparent; padding: 0; }
:is(#view-word, .word-scope) .wd-disc .wd-block-title { color: var(--wd-ink); }
:is(#view-word, .word-scope) .wd-disc-title { font-size: 14px; font-weight: 700; color: var(--wd-ink); }
/* 易混辨析标题并入标题行后按次要说明样式显示 */
:is(#view-word, .word-scope) .wd-fold-head .wd-disc-title {
  min-width: 0;
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--wd-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
:is(#view-word, .word-scope) .wd-disc-list {
  position: relative;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
:is(#view-word, .word-scope) .wd-disc-list::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 18px;
  bottom: 10px;
  width: 2px;
  background: var(--wd-line);
}
:is(#view-word, .word-scope) .wd-disc-item {
  position: relative;
  display: block;
  padding: 4px 0;
  border-bottom: 0;
}
:is(#view-word, .word-scope) .wd-disc-item::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wd-green);
}
:is(#view-word, .word-scope) .wd-disc-item::after {
  content: "";
  position: absolute;
  left: -13px;
  top: 12px;
  width: 13px;
  height: 2px;
  background: var(--wd-line);
}
:is(#view-word, .word-scope) .wd-disc-word {
  display: block;
  min-width: 0;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 26px;
  color: var(--wd-green-deep);
}
:is(#view-word, .word-scope) .wd-disc-body { font-size: 14px; }
:is(#view-word, .word-scope) .wd-disc-desc { font-size: 14px; line-height: 24px; color: var(--wd-ink); }
:is(#view-word, .word-scope) .wd-disc-eg { margin-top: 2px; font-size: 13px; line-height: 22px; color: var(--wd-sub); }
:is(#view-word, .word-scope) .wd-contrasts { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--wd-line); }

:is(#view-word, .word-scope) .wd-writing-list { gap: 6px; }
:is(#view-word, .word-scope) .wd-writing-item { font-size: 13px; line-height: 21px; color: var(--wd-sub); }

:is(#view-word, .word-scope) .word-page-body .modal-meta { border-top: 1px solid var(--wd-line); }

/* 深色主题下保持可读性 */
html[data-theme="dark"] #view-word {
  --wd-ink: #e6ece7;
  --wd-sub: #9fb0a6;
  --wd-green: #4fbf8d;
  --wd-green-deep: #7ad3aa;
  --wd-green-bg: #1e332a;
  --wd-line: #24352c;
  --wd-amber-bg: #2d261a;
  --wd-amber-ink: #e5b96a;
  background: #0f1713;
}
html[data-theme="dark"] :is(#view-word, .word-scope) .word-topbar {
  background: linear-gradient(180deg, #14231c 0%, #111c17 60%, #0f1713 100%);
}
html[data-theme="dark"] :is(#view-word, .word-scope) .word-topbar .icon-btn { background: #16211c; border-color: #24352c; }
html[data-theme="dark"] :is(#view-word, .word-scope) .word-topbar .word-save-btn,
html[data-theme="dark"] :is(#view-word, .word-scope) .word-topbar .word-settings-btn {
  background: transparent;
  border-color: transparent;
}
html[data-theme="dark"] :is(#view-word, .word-scope) .wd-sense2 { background: #16211c; }
html[data-theme="dark"] :is(#view-word, .word-scope) .wd-sense2.is-hot {
  background: var(--wd-amber-bg);
  box-shadow: inset 0 0 0 1px rgba(229, 185, 106, .18);
}
html[data-theme="dark"] :is(#view-word, .word-scope) .wd-root { border-left-color: #2f5844; }

/* 熟悉度卡片：沿用设计稿的白卡语言 */
:is(#view-word, .word-scope) .mastery-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 12px;
}
:is(#view-word, .word-scope) .mastery-head { gap: 8px; margin-bottom: 10px; }
:is(#view-word, .word-scope) .mastery-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--wd-green-deep);
}
:is(#view-word, .word-scope) .mastery-pct { font-size: 16px; font-weight: 700; color: var(--wd-ink); }
:is(#view-word, .word-scope) .mastery-status {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
:is(#view-word, .word-scope) .mastery-status.st-known { background: var(--wd-green-bg); color: var(--wd-green-deep); }
:is(#view-word, .word-scope) .mastery-status.st-familiar { background: var(--wd-amber-bg); color: var(--wd-amber-ink); }
:is(#view-word, .word-scope) .mastery-status.st-unknown { background: #f1f4ef; color: #5c6f63; }
:is(#view-word, .word-scope) .mastery-bar { height: 8px; background: #eef2ee; }
:is(#view-word, .word-scope) .mastery-fill.st-known { background: var(--wd-green); }
:is(#view-word, .word-scope) .mastery-fill.st-familiar { background: #d9a45b; }
:is(#view-word, .word-scope) .mastery-fill.st-unknown { background: #b8c4bd; }
:is(#view-word, .word-scope) .mastery-tip {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 20px;
  color: var(--wd-sub);
}
:is(#view-word, .word-scope) .btn-mark-known {
  width: 100%;
  margin-top: 10px;
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  background: var(--wd-green-bg);
  color: var(--wd-green-deep);
}
:is(#view-word, .word-scope) .btn-mark-known:hover { background: #dcebe0; }

html[data-theme="dark"] :is(#view-word, .word-scope) .mastery-card { background: #16211c; }
html[data-theme="dark"] :is(#view-word, .word-scope) .mastery-bar { background: #24352c; }
html[data-theme="dark"] :is(#view-word, .word-scope) .mastery-status.st-unknown { background: #22302a; color: #9fb0a6; }
html[data-theme="dark"] :is(#view-word, .word-scope) .btn-mark-known:hover { background: #24402f; }

/* ========== 单词详解 · 显示设置页（沿用详解页视觉） ========== */
#view-word-settings {
  --wd-ink: #20352c;
  --wd-sub: #627469;
  --wd-green: #348562;
  --wd-green-deep: #22694b;
  background: #f6f8f4;
  min-height: 100vh;
}
#view-word-settings .word-topbar {
  background: linear-gradient(180deg, #e7f0e5 0%, #eef4ec 46%, #f6f8f4 100%);
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
}
#view-word-settings .word-topbar .icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5ebe3;
}
.ws-topbar-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 38px;
  color: var(--wd-ink);
  text-align: center;
}
.ws-topbar-spacer { width: 38px; }

.ws-head { padding: 14px 4px 12px; }
.ws-title { margin: 0; font-size: 22px; font-weight: 700; line-height: 30px; color: var(--wd-ink); }
.ws-sub { margin: 6px 0 0; font-size: 13px; line-height: 20px; color: var(--wd-sub); }

.ws-card {
  padding: 2px 16px;
  background: #fff;
  border: 1px solid #e5ebe3;
  border-radius: 20px;
}
.ws-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #eff3ee;
}
.ws-row:last-child { border-bottom: 0; }
.ws-row-main { flex: 1; min-width: 0; }
.ws-row-name { font-size: 15px; font-weight: 600; line-height: 22px; color: var(--wd-ink); }
.ws-row-desc { margin-top: 2px; font-size: 12px; line-height: 18px; color: var(--wd-sub); }

.ws-tip { margin: 12px 4px 0; font-size: 12px; line-height: 19px; color: var(--wd-sub); }

/* 义项强调范围：分段选择 */
.ws-seg {
  display: inline-flex;
  flex: none;
  gap: 2px;
  padding: 2px;
  background: #f3f6f0;
  border-radius: 999px;
}
.ws-seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--wd-sub);
}
.ws-seg-btn.is-on {
  background: var(--wd-amber-bg);
  color: var(--wd-amber-ink);
  font-weight: 600;
}
/* 多选分段组：名称与说明在上，按钮均分整行 */
.ws-row-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.ws-seg-wide {
  display: flex;
  width: 100%;
}
.ws-seg-wide .ws-seg-btn {
  flex: 1;
  padding: 9px 0;
  text-align: center;
}
.ws-seg-btn:focus-visible { outline: 2px solid var(--wd-green-deep); outline-offset: 1px; }
html[data-theme="dark"] .ws-seg { background: #1b2a22; }

html[data-theme="dark"] #view-word-settings { background: #0e1512; }
html[data-theme="dark"] #view-word-settings .word-topbar { background: #0e1512; }
html[data-theme="dark"] #view-word-settings .word-topbar .icon-btn { background: #16211c; border-color: #24352c; }
html[data-theme="dark"] .ws-card { background: #16211c; border-color: #24352c; }
html[data-theme="dark"] .ws-row { border-color: #1f2d26; }


@media (prefers-reduced-motion: reduce) {
  .scene-theme-pin span { transition: none; }
  .scene-theme-pin:hover span,
  .scene-theme-pin:focus-visible span { transform: none; }
}
