/* ===== LeafLex V3.0 · 奶油插画风主题（覆盖 V1 token，全站换肤） =====
   色板：奶油米底 + 深藏青主色 + 青绿辅助 + 橙黄点缀（扁平插画风格）
   字体：全站正式系统字体（无卡通体） */
:root {
  --bg: #f6e9d6;
  --card: #fffdf8;
  --ink: #24325e;
  --ink-2: #5f6584;
  --ink-3: #9aa0b5;
  --line: #eadfc9;
  --accent: #24325e;
  --accent-2: #2e7d6b;
  --accent-soft: #eef1f7;
  --on-accent: #fdf8ee;
  --pos-c: #d97a1f;
  --ipa-c: #2e7d6b;
  --en-c: #33427a;
  --zh-c: #6a7186;
  --syn-c: #c0672a;
  --danger: #cc4b3e;
  --ok: #2e7d6b;
  --shadow: 0 1px 3px rgba(36, 50, 94, .08);
  /* 点缀色 */
  --gold: #e9a23b;
  --orange: #e8820c;
  --yellow: #f6c875;
  --pink: #e8837e;
  --ok-soft: #ddefe9;
  --ok-mid: #b7ded1;
  --wrong-soft: #f9dcd7;
  /* 正式标准字体栈（覆盖全部 var(--hand) 引用点） */
  --hand: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  /* 深色模式适配变量（浅色值） */
  --topbar: #24325e;
  --on-accent-btn: #ffffff;
  --paper: #fdfaf1;      /* 训练宫格卡奶油底 */
  --paper-line: #f3ead4; /* 训练宫格卡描边 */
  --paper-2: #fdf6e8;    /* 学习卡例句框底 */
  --paper-2-line: #f3e3c2;
  --ink-warm: #8c6c5e;   /* 训练卡标题暖棕 */
  --ok-ink: #1f4a3d;     /* 浅绿底上的深绿文字 */
  --star-off: #c9bfa8;   /* 未点亮星星 */
  --danger-soft: #fdecea;/* 删除按钮按压底 */
}
/* 深色模式：手动 data-theme="dark" 强制；data-theme="light" 强制浅色；无则跟随系统 */
:root[data-theme="dark"] {
  --bg: #141721; --card: #1e2330; --ink: #e7eaf3; --ink-2: #a7aec2; --ink-3: #6c7388;
  --line: #343a4c; --accent: #8297dc; --accent-2: #4fa394; --accent-soft: #2a3046;
  --on-accent: #fdf8ee;
  --pos-c: #e8935a; --ipa-c: #55c4ba; --en-c: #9db4f0; --zh-c: #98a0ad; --syn-c: #d59b6b;
  --danger: #e07060; --ok: #57c08a;
  --shadow: 0 1px 3px rgba(0, 0, 0, .5);
  --gold: #e9a23b; --orange: #f2912a; --yellow: #f0c96b; --pink: #e8837e;
  --ok-soft: #1e3a32; --ok-mid: #2d5a4a; --wrong-soft: #3d2523;
  --topbar: #1c2440;
  --on-accent-btn: #161a28;
  --paper: #262c3c; --paper-line: #3a4152;
  --paper-2: #2a2f3e; --paper-2-line: #3a4050;
  --ink-warm: #d3b8a2; --ok-ink: #a5dcc5; --star-off: #7a8090; --danger-soft: #3a2423;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141721; --card: #1e2330; --ink: #e7eaf3; --ink-2: #a7aec2; --ink-3: #6c7388;
    --line: #343a4c; --accent: #8297dc; --accent-2: #4fa394; --accent-soft: #2a3046;
    --on-accent: #fdf8ee;
    --pos-c: #e8935a; --ipa-c: #55c4ba; --en-c: #9db4f0; --zh-c: #98a0ad; --syn-c: #d59b6b;
    --danger: #e07060; --ok: #57c08a;
    --shadow: 0 1px 3px rgba(0, 0, 0, .5);
    --gold: #e9a23b; --orange: #f2912a; --yellow: #f0c96b; --pink: #e8837e;
    --ok-soft: #1e3a32; --ok-mid: #2d5a4a; --wrong-soft: #3d2523;
    --topbar: #1c2440;
    --on-accent-btn: #161a28;
    --paper: #262c3c; --paper-line: #3a4152;
    --paper-2: #2a2f3e; --paper-2-line: #3a4050;
    --ink-warm: #d3b8a2; --ok-ink: #a5dcc5; --star-off: #7a8090; --danger-soft: #3a2423;
  }
}

/* ===== 顶栏 / 底栏换肤 ===== */
/* 顶栏：深藏青实色色带 + 投影，与搜索区形成明显分割（无虚线） */
#topbar {
  background: var(--topbar);
  color: var(--on-accent);
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(36, 50, 94, .28);
}
.brand-logo { font-family: var(--hand); color: var(--on-accent); }
.icon-btn { color: var(--on-accent); }
.icon-btn:active { background: rgba(253, 248, 238, .22); }
#tabbar { background: var(--card); box-shadow: 0 -1px 0 var(--line); }
/* 版本徽标（内容由 app.js applyBuild 注入为「V3.0」；小屏微缩避免撑破顶栏） */
.ver-chip {
  font-size: 10px; font-weight: 800; color: #fff;
  background: var(--gold); border-radius: 6px; padding: 1px 6px;
  transform: rotate(-3deg); display: inline-block; letter-spacing: .5px;
  white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 430px) {
  .ver-chip { font-size: 8.4px; letter-spacing: 0; padding: 1px 4px; max-width: 42vw; }
  .brand-sub { display: none; }
}
/* SVG 图标尺寸（底栏 / 顶栏 / 搜索框） */
.tab i svg { width: 24px; height: 24px; display: block; }
.icon-btn svg { width: 20px; height: 20px; display: block; }
.search-ico svg { width: 17px; height: 17px; display: block; }
/* V1 遗留虚线 → 实线 */
.snap-sources { border-top-style: solid; }
.file-path { border-style: solid; }

/* ================= 训练中心（专项训练目录 · 宫格首页） ================= */
.train-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 6px 2px 16px; }
.train-stats {
  flex: none; padding: 8px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 700; color: var(--accent); white-space: nowrap;
}
.train-stats:active { background: var(--accent-soft); }
.train-title h2 { margin: 0; font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: .5px; }
.train-title p { margin: 4px 0 0; font-size: 12px; color: var(--ink-2); }
.train-title p b { color: var(--pos-c); }

.train-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.t-card {
  position: relative; text-align: center;
  background: var(--paper); border: 1.5px solid var(--paper-line);
  border-radius: 26px; padding: 16px 8px 15px;
  transition: transform .12s;
}
.t-card:active { transform: scale(.96); }
.t-card .t-ico {
  height: 104px; margin: 0 auto 9px;
  display: flex; align-items: center; justify-content: center;
}
.t-card .t-ico img { max-width: 100%; max-height: 100%; object-fit: contain; }
.t-card .t-name { display: block; font-size: 15px; font-weight: 800; color: var(--ink-warm); letter-spacing: 1px; }
.t-card .t-cnt { display: block; font-size: 10px; color: var(--gold); margin-top: 2px; }
.v-badge {
  position: absolute; top: -9px; right: -3px;
  width: 28px; height: 30px; font-size: 0;
  background: #d99a2b;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.v-badge::before {
  content: ''; position: absolute; inset: 2px;
  background: linear-gradient(180deg, #f9d877, #eeb545);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.v-badge::after {
  content: 'V'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; color: #fffdf6;
}
.train-empty { text-align: center; padding: 26px 16px; color: var(--ink-2); font-size: 13.5px; line-height: 1.8; background: var(--accent-soft); border-radius: 18px; margin-top: 12px; }

/* ================= 统一选组首页（内容选择弹层） ================= */
#scope-layer { position: fixed; inset: 0; z-index: 130; }
#scope-layer[hidden] { display: none; }
.sc-mask { position: absolute; inset: 0; background: rgba(36, 50, 94, .5); }
.sc-panel {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 0; width: min(100vw, 720px); height: 88vh;
  background: var(--card); border-radius: 24px 24px 0 0;
  display: flex; flex-direction: column;
  padding: 8px 18px calc(14px + var(--safe-b));
  animation: sheet-up .22s ease;
}
.sc-head { display: flex; align-items: center; gap: 8px; padding: 10px 0 6px; }
.sc-head h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--accent); flex: 1; }
.sc-game-tag {
  font-size: 11px; font-weight: 700; color: #fff;
  background: var(--accent-2); border-radius: 999px; padding: 3px 10px;
}
.sc-close {
  width: 32px; height: 32px; border-radius: 50%; color: var(--ink-3);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.sc-close:active { background: var(--accent-soft); }
.sc-backbtn {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent); font-size: 17px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.sc-backbtn:active { transform: scale(.9); }
/* —— ① 内容选择：大按钮菜单 —— */
.sc-menu { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; }
.sc-mbtn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px; border-radius: 18px;
  background: var(--bg); border: 2px solid var(--line);
  font-size: 16.5px; font-weight: 800; color: var(--ink);
}
.sc-mbtn .sc-mcnt { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.sc-mbtn:active { transform: scale(.98); border-color: var(--gold); }
.sc-mbtn:disabled { opacity: .45; }
.sc-mbtn:disabled:active { transform: none; border-color: var(--line); }
/* —— ② 收藏本卡片列表 —— */
.sc-books { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; overflow-y: auto; }
.sc-book {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 18px; border-radius: 18px;
  background: var(--bg); border: 2px solid var(--line);
}
.sc-book:active { transform: scale(.98); border-color: var(--gold); }
.sc-bk-name { flex: 1; min-width: 0; font-size: 16px; font-weight: 800; color: var(--ink); }
.sc-bk-cnt { font-size: 12.5px; color: var(--ink-3); flex: none; }
.sc-bk-go { font-size: 12.5px; font-weight: 700; color: var(--accent); flex: none; }
.sc-none { padding: 30px; text-align: center; font-size: 13px; color: var(--ink-3); list-style: none; }
.sc-chips { display: flex; gap: 7px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.sc-chips::-webkit-scrollbar { display: none; }
.sc-chips button {
  flex: none; padding: 7px 15px; border-radius: 999px;
  background: var(--bg); border: 1.5px solid var(--line);
  font-size: 13px; color: var(--ink-2);
}
.sc-chips button.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent-btn); font-weight: 600; }
.sc-opts { display: flex; gap: 8px; padding-bottom: 10px; flex-wrap: wrap; }
.sc-opt { flex: 1; min-width: 150px; }
.sc-opt .sc-label { font-size: 11px; color: var(--ink-3); display: block; margin-bottom: 5px; }
.seg { display: flex; background: var(--bg); border: 1.5px solid var(--line); border-radius: 11px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1; padding: 6px 4px; border-radius: 8px; font-size: 12px; color: var(--ink-2); white-space: nowrap;
}
.seg button.on { background: var(--card); color: var(--accent); font-weight: 700; box-shadow: 0 1px 2px rgba(36, 50, 94, .15); }
.sc-list-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--ink-3); padding: 4px 2px 8px;
}
.sc-all { font-size: 12.5px; color: var(--accent-2); font-weight: 700; }
.sc-list { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--line); }
.sc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 4px; border-bottom: 1px solid var(--line);
}
.sc-row .wb-check { width: 21px; height: 21px; border-radius: 50%; flex: none; border: 2px solid var(--line); background: var(--card); display: flex; align-items: center; justify-content: center; transition: background .12s, border-color .12s; }
.sc-row.checked .wb-check { background: var(--ok); border-color: var(--ok); }
.sc-row.checked .wb-check::after { content: ''; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.sc-row .sc-w { flex: 1; min-width: 0; }
.sc-row .sc-word { font-size: 15.5px; font-weight: 700; word-break: break-all; }
.sc-row .sc-word .ipa {
  font-size: 12px; color: var(--ipa-c); font-weight: 400; margin-left: 6px;
  font-family: "Times New Roman", "Segoe UI", "Lucida Grande", serif;
}
.sc-row .sc-def { font-size: 12px; color: var(--ink-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-row .sc-play { width: 34px; height: 34px; border-radius: 50%; flex: none; color: var(--accent-2); display: flex; align-items: center; justify-content: center; }
.sc-row .sc-play:active { background: var(--ok-soft); }
.sc-row .sc-play svg { width: 17px; height: 17px; }
.sc-foot { display: flex; align-items: center; gap: 12px; padding-top: 12px; }
.sc-foot .sc-count { font-size: 13px; color: var(--ink-2); flex: none; }
.sc-foot .sc-count b { color: var(--pos-c); font-size: 16px; }
.sc-start {
  flex: 1; padding: 13px; border-radius: 14px;
  background: var(--ok-mid); color: var(--ok-ink); font-size: 15.5px; font-weight: 800;
  box-shadow: 0 2px 0 rgba(46, 125, 107, .35);
}
.sc-start:active { transform: scale(.98); }
.sc-start:disabled { opacity: .45; }

/* ================= 训练外壳（QuizEngine） ================= */
#quiz-layer { position: fixed; inset: 0; z-index: 140; background: var(--bg); }
#quiz-layer[hidden] { display: none; }
.qz-wrap {
  height: 100%; max-width: 720px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding: calc(var(--safe-t) + 10px) 16px calc(14px + var(--safe-b));
  position: relative; overflow: hidden;
}
.qz-top { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; }
.qz-back {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--card); border: 2px solid var(--line);
  font-size: 19px; color: var(--accent); font-weight: 800;
  box-shadow: 0 2px 5px rgba(36, 50, 94, .1);
}
.qz-back:active { transform: scale(.92); }
.qz-prog { flex: 1; min-width: 0; }
.qz-prog-txt { font-size: 12px; color: var(--ink-2); text-align: center; margin-bottom: 4px; font-weight: 700; }
.qz-prog-track { height: 9px; border-radius: 99px; background: var(--accent-soft); border: 1px solid var(--line); overflow: hidden; }
.qz-prog-fill { height: 100%; width: 0; border-radius: 99px; background: var(--gold); transition: width .25s; }
.qz-top-btn {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2); border: 1.5px solid transparent;
}
.qz-top-btn svg { width: 21px; height: 21px; }
.qz-top-btn:active { background: var(--accent-soft); }
.qz-top-btn.star.on { color: #e8a13a; }
.qz-top-btn.star.on svg { fill: #f7c948; stroke: #e8a13a; }
.qz-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative; z-index: 2; padding-bottom: 8px; }

/* ---- 选择题（看英选义 / 看义选英 / 听音辨义） ---- */
.mc-prompt { text-align: center; padding: 18px 0 6px; }
.mc-prompt .mc-kicker { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.mc-prompt .mc-word { font-size: 34px; font-weight: 800; color: var(--ink); word-break: break-word; font-family: Georgia, "Times New Roman", serif; }
.mc-prompt .mc-zh { font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.mc-prompt .mc-ipa {
  font-size: 15px; color: var(--ipa-c); margin-top: 6px;
  font-family: "Times New Roman", "Segoe UI", "Lucida Grande", serif;
}
.mc-say {
  width: 84px; height: 84px; margin: 6px auto 0; border-radius: 50%;
  background: var(--yellow); border: 2.5px solid var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: 36px;
  color: var(--accent);
  box-shadow: 0 3px 0 rgba(233, 162, 59, .4);
}
.mc-say svg { width: 38px; height: 38px; display: block; }
.mc-say:active { transform: scale(.93); }
.mc-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.mc-opt {
  display: flex; align-items: center; gap: 11px; text-align: left;
  background: var(--card); border: 1.7px solid var(--line); border-radius: 15px;
  padding: 13px 14px; font-size: 15.5px; color: var(--ink);
  transition: transform .1s, border-color .15s, background .15s;
}
.mc-opt .mc-key {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  border: 1.7px solid var(--gold); color: var(--accent);
  font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.mc-opt .mc-txt { flex: 1; line-height: 1.45; word-break: break-word; }
.mc-opt .mc-txt .pos { color: var(--pos-c); font-style: italic; margin-right: 4px; }
.mc-opt:active { transform: scale(.98); }
.mc-opt.right { background: var(--ok-soft); border-color: var(--ok); }
.mc-opt.right .mc-key { background: var(--ok); border-color: var(--ok); color: #fff; }
.mc-opt.wrong { background: var(--wrong-soft); border-color: var(--danger); animation: shake .32s; }
.mc-opt.wrong .mc-key { background: var(--danger); border-color: var(--danger); color: #fff; }
.mc-opt.dim { opacity: .45; }
.mc-opt:disabled { cursor: default; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.mc-next {
  margin: 18px auto 0; display: block; min-width: 200px;
  padding: 13px 30px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent-btn);
  font-size: 15.5px; font-weight: 800;
  box-shadow: 0 3px 0 rgba(36, 50, 94, .3);
}
.mc-next:active { transform: scale(.97); }
.mc-note { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 12px; line-height: 1.7; }
.mc-note b { color: var(--accent); }

/* ---- 结果页 ---- */
.qz-done { text-align: center; padding-top: 8vh; position: relative; z-index: 2; }
.qz-done .qz-badge {
  width: 130px; height: 130px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--yellow); border: 3px solid var(--gold);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 4px 0 rgba(233, 162, 59, .4);
}
.qz-done .qz-badge b { font-size: 38px; color: var(--accent); line-height: 1; }
.qz-done .qz-badge span { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.qz-done h3 { margin: 0 0 6px; font-size: 22px; font-weight: 800; color: var(--accent); }
.qz-done p { margin: 0 0 26px; font-size: 13px; color: var(--ink-2); }
.qz-done-btns { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.qz-btn {
  min-width: 220px; padding: 13px 26px; border-radius: 999px; font-size: 15px; font-weight: 800;
}
.qz-btn.primary { background: var(--accent); color: var(--on-accent-btn); box-shadow: 0 3px 0 rgba(36, 50, 94, .3); }
.qz-btn.ghosty { background: var(--card); border: 1.7px solid var(--line); color: var(--accent); }
.qz-btn:active { transform: scale(.97); }

/* ---- 设置抽屉（⋮） ---- */
.qz-drawer {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  background: var(--card); border-radius: 22px 22px 0 0;
  padding: 8px 20px calc(18px + var(--safe-b));
  box-shadow: 0 -8px 30px rgba(36, 50, 94, .2);
  transform: translateY(105%); transition: transform .22s ease;
  max-height: 70vh; overflow-y: auto;
}
.qz-drawer.open { transform: translateY(0); }
.qz-drawer .qd-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 4px; }
.qz-drawer .qd-head h4 { margin: 0; font-size: 16px; font-weight: 800; color: var(--accent); }
.qd-mask { position: absolute; inset: 0; z-index: 4; display: none; }
.qz-drawer.open ~ .qd-mask, .qd-mask.show { display: block; }
.qd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.qd-row:last-child { border-bottom: none; }
.qd-row .qd-name { flex: 1; }
.qd-row .qd-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.toggle { position: relative; width: 46px; height: 26px; flex: none; }
.toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; z-index: 2; }
.toggle .tk { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .18s; }
.toggle .tk::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s; }
.toggle input:checked + .tk { background: var(--ok); }
.toggle input:checked + .tk::after { transform: translateX(20px); }
.qd-seg { width: 150px; }

/* ================= 训练 · 轻松回顾（全展示学习卡） ================= */
/* —— 全展示学习卡 —— */
.rvw { padding-top: 1vh; position: relative; z-index: 2; }
.rvw-card {
  background: var(--card); border: 2px solid var(--line); border-radius: 26px;
  padding: 20px 20px 18px; box-shadow: 0 3px 10px rgba(36, 50, 94, .08);
}
.rvw-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rvw-word { font-size: 34px; font-weight: 800; color: var(--ink); word-break: break-word; line-height: 1.15; }
.rvw-star {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--star-off);
}
.rvw-star svg { width: 24px; height: 24px; }
.rvw-star.on { color: var(--gold); animation: star-pop .25s ease; }
@keyframes star-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.22); } 100% { transform: scale(1); } }
.rvw-pron { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.rvw-accent, .pvw-accent {
  font-size: 11px; font-weight: 700; color: var(--ink-3);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px;
}
.rvw-ipa, .pvw-ipa {
  font-size: 15.5px; color: var(--ipa-c);
  font-family: "Times New Roman", "Segoe UI", "Lucida Grande", serif;
}
.rvw-say, .pvw-say {
  width: 32px; height: 32px; margin-left: 2px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-2); background: var(--ok-soft);
}
.rvw-say svg, .pvw-say svg { width: 17px; height: 17px; }
.rvw-say:active, .pvw-say:active { transform: scale(.9); }
.rvw-line { height: 1px; background: var(--line); margin: 10px 0 10px; }
.rvw-defs { display: flex; flex-direction: column; gap: 7px; }
.rvw-def { font-size: 16px; color: var(--ink-2); line-height: 1.6; }
.rvw-def .pos { font-size: 12px; margin-right: 4px; }
.rvw-ex { margin-top: 10px; background: var(--paper-2); border: 1px solid var(--paper-2-line); border-radius: 14px; padding: 9px 12px; }
.rvw-ex-tag {
  display: inline-block; background: var(--orange); color: #fffdf8;
  font-size: 11px; font-weight: 700; border-radius: 6px; padding: 2px 8px; margin-bottom: 5px;
}
.rvw-ex-en { font-size: 15px; line-height: 1.7; color: var(--en-c); display: flex; align-items: flex-start; gap: 8px; }
.rvw-ex-txt { flex: 1; min-width: 0; }
mark.rvw-hl { background: none; color: var(--orange); font-weight: 700; padding: 0 1px; }
.rvw-ex-say {
  width: 28px; height: 28px; flex: none; border-radius: 50%; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-2); background: var(--ok-soft);
}
.rvw-ex-say svg { width: 15px; height: 15px; }
.rvw-ex-say:active { transform: scale(.9); }
.rvw-ex-zh { font-size: 13px; color: var(--zh-c); line-height: 1.6; margin-top: 4px; }
.rvw-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.rvw-pg { font-size: 12.5px; color: var(--ink-3); font-weight: 600; letter-spacing: 1px; }
.rvw-next {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent-btn);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(36, 50, 94, .3);
}
.rvw-next svg { width: 20px; height: 20px; }
.rvw-next:active { transform: scale(.92); }

/* ================= 训练 · 预习单词（自动连播播放器） ================= */
.pvw { display: flex; flex-direction: column; min-height: 54vh; padding-top: 1vh; position: relative; z-index: 2; }
.pvw-top { display: flex; justify-content: space-between; }
.pvw-tbtn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--card); border: 1.5px solid var(--line); color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
}
.pvw-tbtn svg { width: 19px; height: 19px; }
.pvw-tbtn.on { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.pvw-tbtn:active { transform: scale(.92); }
.pvw-card { text-align: center; margin-top: 2vh; }
.pvw-card.hide .pvw-body { display: none; }
.pvw-word { font-size: 36px; font-weight: 800; color: var(--ink); word-break: break-word; line-height: 1.15; }
.pvw-pron { display: inline-flex; align-items: center; gap: 9px; margin-top: 12px; }
.pvw-body { margin-top: 12px; }
.pvw-defs { display: flex; flex-direction: column; gap: 6px; }
.pvw-def { font-size: 15px; color: var(--ink-2); line-height: 1.6; }
.pvw-def .pos { font-size: 12px; margin-right: 4px; }
.pvw-ex { margin-top: 10px; font-size: 14px; line-height: 1.7; color: var(--en-c); }
.pvw-ex-en { display: flex; align-items: flex-start; gap: 7px; }
.pvw-ex-txt { flex: 1; min-width: 0; }
.pvw-ex-say {
  width: 26px; height: 26px; flex: none; border-radius: 50%; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-2); background: var(--ok-soft);
}
.pvw-ex-say svg { width: 15px; height: 15px; }
.pvw-ex-say:active { transform: scale(.9); }
.pvw-ex-zh { font-size: 12.5px; color: var(--zh-c); margin-top: 3px; padding-left: 33px; }
.pvw-pg { font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: 1px; margin-top: 12px; }
.pvw-bar { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: auto; padding: 26px 0 6px; }
.pvw-bbtn {
  width: 44px; height: 44px; border-radius: 50%; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
}
.pvw-bbtn svg { width: 21px; height: 21px; }
.pvw-bbtn.on { color: var(--accent); background: var(--accent-soft); }
.pvw-bbtn:active { transform: scale(.92); }
.pvw-playbig {
  width: 66px; height: 66px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent-btn);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(36, 50, 94, .32);
}
.pvw-playbig svg { width: 27px; height: 27px; }
.pvw-playbig:active { transform: scale(.93); }
/* —— 播放设置抽屉 —— */
.pvw-mask { position: fixed; inset: 0; z-index: 160; background: rgba(36, 50, 94, .42); }
.pvw-panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 161;
  max-width: 720px; margin: 0 auto;
  background: var(--card); border-radius: 22px 22px 0 0;
  padding: 4px 18px calc(10px + var(--safe-b));
  box-shadow: 0 -8px 30px rgba(36, 50, 94, .22);
  max-height: 76vh; overflow-y: auto;
  animation: pvw-up .22s ease;
}
@keyframes pvw-up { from { transform: translateY(60%); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
.pvw-phead { display: flex; align-items: center; justify-content: space-between; padding: 6px 0 0; }
.pvw-phead h4 { margin: 0; font-size: 16px; font-weight: 800; color: var(--accent); }
.pvw-pclose {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px;
}
.pvw-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.pvw-row:last-of-type { border-bottom: none; }
.pvw-lb { font-size: 14px; font-weight: 600; color: var(--ink); flex: none; }
.pvw-sub { display: block; font-size: 11px; font-weight: 400; color: var(--ink-3); font-style: normal; margin-top: 1px; }
.pvw-seg { flex: 1 1 auto; max-width: 400px; min-width: 0; flex-wrap: wrap; }
.pvw-seg button { font-size: 11.5px; padding: 5px 4px; flex: 1 1 auto; min-width: 44px; }
@media (max-width: 400px) {
  .pvw-row { flex-wrap: wrap; }
  .pvw-seg { width: 100%; }
}

/* ================= p6 · 单词配对 ================= */
.mt-board { display: flex; gap: 12px; padding-top: 1vh; position: relative; z-index: 2; }
.mt-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.mt-item {
  min-height: 62px; padding: 10px 12px; border-radius: 16px;
  background: var(--card); border: 1.7px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--ink); line-height: 1.4; word-break: break-word;
  box-shadow: 0 2px 5px rgba(36, 50, 94, .06);
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.mt-item:active { transform: scale(.97); }
.mt-l { font-size: 15.5px; font-weight: 700; }
.mt-l.sel { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 2px var(--gold); }
.mt-item.right { background: var(--ok-soft); border-color: var(--ok-mid); color: var(--ok-ink); box-shadow: none; }
.mt-item.wrong { background: var(--wrong-soft); border-color: var(--pink); animation: shake .4s; }
.mt-item.done { opacity: .16; pointer-events: none; box-shadow: none; }
.mt-tip { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 16px; line-height: 1.7; }

/* ================= p7 · 拼写自检 ================= */
.sp-wrap { text-align: center; padding-top: 1vh; position: relative; z-index: 2; }
.sp-boxes { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin: 20px auto 0; max-width: 430px; }
.sp-boxes.err { animation: shake .4s; }
.sp-box {
  width: 40px; height: 50px; border-radius: 10px;
  background: var(--card); border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 700;
  color: var(--ink); word-break: break-all;
}
.sp-box.fix { background: var(--accent-soft); color: var(--ink-2); }
.sp-box.ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok-ink); }
.sp-box.bad { background: var(--wrong-soft); border-color: var(--danger); color: var(--danger); }
.sp-input-row { margin: 18px auto 0; max-width: 320px; }
.sp-input {
  width: 100%; padding: 12px 16px; border-radius: 14px; text-align: center;
  background: var(--card); border: 2px solid var(--line);
  font-family: Georgia, serif; font-size: 18px; color: var(--ink);
}
.sp-input:focus { outline: none; border-color: var(--accent); }
.sp-input:disabled { opacity: .6; }
.sp-pool { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 20px auto 0; max-width: 430px; }
.sp-tile {
  width: 44px; height: 46px; border-radius: 11px;
  background: var(--yellow); border: 2px solid var(--gold);
  font-family: Georgia, serif; font-size: 20px; font-weight: 800; color: var(--accent);
  box-shadow: 0 2.5px 0 rgba(233, 162, 59, .4);
}
.sp-tile:active { transform: scale(.93); }
.sp-tile.used { opacity: .22; box-shadow: none; pointer-events: none; }
.sp-modes { margin-top: 22px; display: flex; justify-content: center; }
.sp-modes .seg { width: 220px; }

/* ================= p7 · 单词听写 ================= */
.dc-wrap { text-align: center; padding-top: 1vh; position: relative; z-index: 2; }
.dc-input {
  display: block; width: min(320px, 100%); margin: 22px auto 0; padding: 13px 16px;
  border-radius: 14px; text-align: center; background: var(--card);
  border: 2px solid var(--line); font-family: Georgia, serif; font-size: 19px; color: var(--ink);
}
.dc-input:focus { outline: none; border-color: var(--accent); }
.dc-input.ok { border-color: var(--ok); background: var(--ok-soft); }
.dc-input.bad { border-color: var(--danger); background: var(--wrong-soft); animation: shake .35s; }
.dc-export {
  display: inline-block; margin-top: 16px; padding: 8px 16px; border-radius: 999px;
  background: var(--accent-soft); border: 1.5px solid var(--line);
  font-size: 12.5px; color: var(--accent); font-weight: 700;
}
.dc-export:active { transform: scale(.96); }
.dc-modes { margin-top: 18px; display: flex; justify-content: center; align-items: center; gap: 10px; }
.dc-modes .dc-lb { font-size: 12px; color: var(--ink-3); flex: none; }
.dc-modes .seg { width: 200px; }

/* ================= p7/p8 · 打印纸张（屏上预览与 window.print 共用同一份 HTML） ================= */
#print-root { display: none; }
.sh-sheet { padding: 0 2mm; font-family: Georgia, "Songti SC", "SimSun", serif; color: #1a1a1a; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sh-sheet h2 { font-size: 18px; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 2px solid #333; }
.sh-meta { font-size: 14px; margin-bottom: 14px; }
.sh-row { display: flex; align-items: flex-end; gap: 8px; height: 42px; font-size: 15.5px; }
.sh-row .sh-no { width: 34px; flex: none; }
.sh-row .sh-zh { flex: none; max-width: 48%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-row .sh-line { flex: 1; min-height: 26px; border-bottom: 1px solid #555; }
.sh-tip { font-size: 12.5px; color: #666; margin-top: 16px; }
.sh-break { page-break-before: always; }
.sh-ans { font-size: 16px; padding: 6px 0; border-bottom: 1px dashed #bbb; }
.sh-ans .sh-no { display: inline-block; width: 34px; }
.sh-ans b { font-family: Georgia, serif; margin-right: 10px; }
.sh-ans i { font-style: normal; font-size: 13.5px; color: #2a6f62; }
/* —— p8 词表纸张：贴纸标题 / 备注·日期 / 四模版表格与卡片（打印字号 ≥13px 正文） —— */
.sh-banner {
  text-align: center; font-size: 30px; font-weight: 900; letter-spacing: 8px;
  margin: 2px 0 10px; color: var(--sh-c, #e8a23b);
  -webkit-text-stroke: 5px #fff; paint-order: stroke fill;
  text-shadow: 0 2px 0 rgba(0,0,0,.06);
}
.sh-tpl-a { --sh-c: #8fbf6f; --sh-band: #e3efcf; --sh-line: #9fbe77; --sh-th: #4c6b34; }
.sh-tpl-b { --sh-c: #f0a9bc; --sh-band: #fbe3e9; --sh-line: #dea1b4; --sh-th: #8a4a5c; }
.sh-tpl-c { --sh-c: #f0c95c; --sh-band: #fdf0cd; --sh-line: #d7b25d; --sh-th: #8a6a1f; }
.sh-tpl-d { --sh-c: #f0c95c; --sh-band: #fdf0cd; --sh-line: #d7b25d; --sh-th: #8a6a1f; }
.sh-note {
  display: flex; justify-content: space-between; margin: 0 4px 10px;
  font-size: 13.5px; font-weight: 700; color: #333;
}
.sh-note .sh-ul { display: inline-block; width: 130px; border-bottom: 1.5px solid #666; }
.sh-t2 { width: 100%; border-collapse: collapse; border: 2.2px solid var(--sh-line); border-radius: 10px; overflow: hidden; }
.sh-t2 th {
  background: var(--sh-band); color: var(--sh-th);
  font-size: 13.5px; font-weight: 800; text-align: left; padding: 7px 10px;
  border-bottom: 2.2px solid var(--sh-line);
}
.sh-t2 td {
  padding: 7px 10px; font-size: 13.5px; color: #333; vertical-align: top;
  border-bottom: 1.5px dashed var(--sh-line);
}
.sh-t2 tr:last-child td { border-bottom: none; }
.sh-t2 .c-no { width: 34px; color: #999; font-size: 12px; padding-top: 10px; }
.sh-t2 .c-v { width: 21%; }
.sh-t2 .c-v b { font-family: Georgia, "Times New Roman", serif; font-size: 15.5px; color: #1a1a1a; }
.sh-ipa { display: block; font-style: normal; font-size: 11.5px; line-height: 1.35; color: #2a6f62; margin: 2px 0 0; }
.sh-t2 .c-m { width: 29%; }
.sh-mean {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.5;
}
.sh-tpl-a .sh-t2 td { height: 40px; }
.sh-tpl-c .sh-t2 td { height: 38px; }
.sh-t2 .c-d { width: 44px; }
.sh-tc .c-d { border-left: 1px dashed var(--sh-line); }
.sh-pg { text-align: center; font-size: 11.5px; color: #888; margin-top: 12px; }
.sh-src { text-align: center; font-size: 10.5px; color: #aaa; margin-top: 2px; }
/* —— D 单词卡片：2×4 马卡龙 —— */
.sh-tpl-d .sh-cards { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, minmax(0, 1fr)); height: 232mm; gap: 8px; }
.sh-card { min-height: 0; height: 100%; border-radius: 14px; padding: 15px 17px; overflow: hidden; }
.sh-card.mc1 { background: #fcebe9; }
.sh-card.mc2 { background: #fdf6e0; }
.sh-card.mc3 { background: #eef5e2; }
.sh-card.mc4 { background: #e5f0fa; }
.sh-card.mc5 { background: #f2ecf9; }
.sh-cd-w b { font-family: Georgia, "Times New Roman", serif; font-size: 19.5px; color: #1a1a1a; }
.sh-cd-def { font-size: 14.5px; color: #333; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sh-cd-sep {
  margin: 8px 0 5px; font-size: 12.5px; font-weight: 800; color: #e8a23b;
}
.sh-cd-cg { font-size: 13.5px; color: #444; line-height: 1.55; margin-bottom: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sh-cd-gn {
  display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px;
  background: rgba(255,255,255,.75); font-size: 11.5px; font-weight: 700; color: #a0742a;
}
.sh-cd-none { font-size: 12px; color: #bbb; }
/* 打印纸张上的音标统一用 IPA 安全字体栈（Georgia 缺 ˈ/组合符字形会显示方框） */
.sh-sheet i { font-family: "Times New Roman", "Segoe UI", "Lucida Grande", serif; }
/* —— 单词听写纸：空白双栏手写表格 —— */
.sh-dt-head { position: relative; text-align: center; margin: 12px 0 12px; }
.sh-dt-head h2 {
  display: inline-block; border-bottom: none; margin: 0;
  font-size: 24px; letter-spacing: 8px; padding: 8px 30px 4px;
}
.sh-tape {
  position: absolute; top: 4px; width: 72px; height: 18px;
  background: rgba(233, 162, 59, .32);
  border-left: 1px dashed rgba(201, 141, 41, .45);
  border-right: 1px dashed rgba(201, 141, 41, .45);
}
.sh-tape.t1 { left: 50%; margin-left: -116px; transform: rotate(-8deg); }
.sh-tape.t2 { left: 50%; margin-left: 44px; transform: rotate(7deg); }
.sh-dt-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.sh-dt-table th, .sh-dt-table td { border: 1.4px solid #3c3c3c; }
.sh-dt-table th { background: #f2ede2; font-size: 14px; padding: 9px 6px; letter-spacing: 1.5px; }
.sh-dt-table td { height: 48px; }
.sh-dt-no { width: 38px; text-align: center; font-size: 13.5px; color: #555; background: #faf7ef; }
.sh-dt .sh-tip { margin-top: 14px; }
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }
  body.printing > *:not(#print-root) { display: none !important; }
  #print-root { display: block; background: #fff; }
  #print-root .sh-sheet {
    min-height: 296mm; display: flex; flex-direction: column;
    padding: 13mm 12mm; box-sizing: border-box; background: #fff;
  }
  #print-root .sh-pg { margin-top: auto; }
}

/* ================= p8 · 词表导出页（A4 屏上预览 + window.print 导出） ================= */
#export-layer { position: fixed; inset: 0; z-index: 140; background: var(--bg); }
#export-layer[hidden] { display: none; }
.ex-wrap {
  height: 100%; max-width: 720px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding: calc(var(--safe-t) + 10px) 16px calc(14px + var(--safe-b));
}
.ex-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex: none; }
.ex-title h2 { margin: 0; font-size: 20px; font-weight: 800; color: var(--ink); }
.ex-title p { margin: 2px 0 0; font-size: 11.5px; color: var(--ink-2); }
.ex-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ex-chips { padding-bottom: 10px; }
.ex-tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.ex-tpl {
  position: relative; text-align: left;
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 12px 12px 10px;
}
.ex-tpl.on { border-width: 2.5px; border-color: var(--gold); background: var(--paper); box-shadow: 0 2px 6px rgba(233, 162, 59, .3); }
.ex-lt {
  position: absolute; top: -9px; right: 10px; width: 22px; height: 22px;
  background: var(--pink); color: var(--on-accent-btn); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.ex-tpl.on .ex-lt { background: var(--accent); }
.ex-tn { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.ex-td { font-size: 10.5px; color: var(--ink-2); margin-top: 2px; }
.ex-opts { display: flex; gap: 18px; margin-bottom: 10px; }
.ex-opt {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.ex-opt input { width: 16px; height: 16px; accent-color: var(--accent); }
.pv-frame {
  height: 500px; overflow: auto; -webkit-overflow-scrolling: touch;
  background: var(--accent-soft); border: 1.5px solid var(--line);
  border-radius: 16px; padding: 12px 0;
}
.pv-holder { width: 360px; max-width: 92%; margin: 0 auto; overflow: hidden; border-radius: 4px; box-shadow: 0 2px 10px rgba(36, 50, 94, .16); }
.pv-inner {
  width: 794px; min-height: 1123px; padding: 44px 46px;
  background: #fff; transform: scale(.453); transform-origin: top left;
}
.pv-inner .sh-sheet + .sh-sheet { margin-top: 24px; }
.pv-empty { height: 220px; display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 13px; }
.ex-foot { flex: none; display: flex; align-items: center; gap: 10px; padding-top: 12px; }
.ex-count { flex: 1; font-size: 11.5px; color: var(--ink-2); }
.ex-count b { color: var(--accent); }
.ex-print {
  padding: 10px 20px; border: none; border-radius: 999px;
  background: var(--accent); color: var(--on-accent-btn);
  font-size: 13.5px; font-weight: 800;
}
.ex-print:active { transform: scale(.96); }

/* ================= p9 · 艾宾浩斯复习（翻卡自评） ================= */
.rv-wrap { text-align: center; padding-top: 4vh; position: relative; z-index: 2; }
.rv-stage-line { min-height: 20px; margin-bottom: 8px; }
.rv-stage {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 11.5px; font-weight: 700;
}
.rv-word {
  font-family: "Times New Roman", Georgia, serif;
  font-size: 38px; font-weight: 800; color: var(--ink);
  word-break: break-word; line-height: 1.15;
}
.rv-pron { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; }
.rv-ipa {
  font-family: "Times New Roman", "Segoe UI", "Lucida Grande", serif;
  font-size: 15px; color: var(--ink-2);
}
.rv-say {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.rv-say svg { width: 19px; height: 19px; }
.rv-say:active { transform: scale(.92); }
.rv-ans {
  max-width: 460px; margin: 14px auto 0; text-align: left;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 16px;
  padding: 11px 14px;
}
.rv-def { font-size: 14.5px; color: var(--ink); line-height: 1.6; margin-bottom: 4px; }
.rv-def .pos { color: var(--accent); font-weight: 700; font-style: italic; margin-right: 4px; }
.rv-ex { margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line); }
.rv-ex .en { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; display: flex; align-items: flex-start; gap: 7px; }
.rv-ex .rv-ex-txt { flex: 1; min-width: 0; }
.rv-ex-say {
  width: 24px; height: 24px; flex: none; border-radius: 50%; margin-top: 1px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.rv-ex-say svg { width: 14px; height: 14px; }
.rv-ex-say:active { transform: scale(.9); }
.rv-ex .zh { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; margin-top: 2px; padding-left: 31px; }
.rv-none { font-size: 13px; color: var(--ink-3); }
.rv-btns { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }
.rv-btn {
  min-width: 128px; padding: 13px 22px; border-radius: 999px; border: none;
  font-size: 15px; font-weight: 800;
}
.rv-btn:active { transform: scale(.95); }
.rv-show { background: var(--accent); color: var(--on-accent-btn); box-shadow: 0 4px 12px rgba(36, 50, 94, .28); }
.rv-no { background: var(--wrong-soft); color: var(--danger); }
.rv-yes { background: var(--ok); color: #fff; }

/* 导出页：次要按钮（打印） */
.ex-print-2 { background: var(--accent-soft); color: var(--accent); }

/* ===== v74：训练页视觉优化（艾宾浩斯卡片 / 预习图1风格 / 作用域面板适配手机） ===== */

/* 艾宾浩斯：卡片填满、字更大、留白收进卡片 */
.rv-wrap {
  text-align: center; box-sizing: border-box;
  max-width: 560px; min-height: 68vh;
  margin: 6px auto 0; padding: 22px 18px 26px;
  background: var(--paper); border: 2px solid var(--gold);
  border-radius: 26px;
  display: flex; flex-direction: column; align-items: center;
}
.rv-word { font-size: 46px; }
.rv-ans {
  width: 100%; max-width: none; margin-top: 16px;
  text-align: left; background: var(--card);
}
.rv-def { font-size: 16.5px; line-height: 1.65; }
.rv-btns { margin-top: 22px; }

/* 预习单词：按图1做成暖色大卡片 */
.pvw { padding-top: 0; }
.pvw-card {
  text-align: left; box-sizing: border-box;
  min-height: 58vh; margin-top: 6px; padding: 22px 20px 16px;
  background: var(--paper); border: 2px solid var(--gold);
  border-radius: 26px;
  display: flex; flex-direction: column;
}
.pvw-word { font-size: 40px; }
.pvw-pron { justify-content: flex-start; }
.pvw-defs { gap: 8px; }
.pvw-def { font-size: 16px; }
.pvw-ex {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--gold);
}
.pvw-ex-tag {
  display: inline-block; margin-bottom: 6px; padding: 2px 9px;
  border-radius: 999px; background: var(--gold-soft, #fdf0d8);
  color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: 1px;
}
.pvw-pg { margin-top: auto; text-align: right; }

/* 作用域面板：dvh 适配手机地址栏，顶部避开刘海/状态栏 */
.sc-panel { height: 88vh; max-height: calc(100vh - 8px); }
@supports (height: 1dvh) {
  .sc-panel { height: 86dvh; max-height: calc(100dvh - 8px); }
}

/* 菜单/收藏本列表：高度自适应，避免固定 88vh 撑到刘海下方 */
.sc-panel.sc-auto { height: auto; max-height: 86vh; }
@supports (height: 1dvh) { .sc-panel.sc-auto { max-height: 86dvh; } }
/* 艾宾浩斯关卡标签未就绪时不显示空胶囊 */
.rv-stage:empty { display: none; }

/* ===== v76：轻松回顾 / 预习单词（图1/图2 卡片头 + 暖色卡片） ===== */
.qch {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 2px 10px; background: var(--bg);
}
.qch-back {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--card); box-shadow: var(--shadow);
  color: var(--ink); font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.qch-title { flex: 1; margin: 0; text-align: center; font-size: 18px; font-weight: 800; color: var(--ink); }
.qch-btn {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  color: var(--ink-2); display: flex; align-items: center; justify-content: center;
}
.qch-btn svg { width: 21px; height: 21px; }
.qch-btn:active { background: var(--accent-soft); }

.rvw { padding-bottom: 4px; }
.rvw-card {
  text-align: left; box-sizing: border-box;
  min-height: 62vh; margin-top: 4px; padding: 22px 20px 16px;
  background: var(--paper); border: 2px solid var(--gold);
  border-radius: 26px; display: flex; flex-direction: column;
}
.rvw-word { font-size: 40px; font-weight: 800; color: var(--ink); line-height: 1.15; word-break: break-word; }
.rvw-pron { justify-content: flex-start; }
.rvw-line { border-top: 1px dashed var(--gold); margin: 14px 0; }
.rvw-defs { gap: 8px; }
.rvw-def { font-size: 16px; }
.rvw-ex { margin-top: 0; padding-top: 0; border-top: none; }
.rvw-ex-tag {
  display: inline-block; margin-bottom: 6px; padding: 2px 9px; border-radius: 999px;
  background: var(--gold-soft, #fdf0d8); color: var(--gold);
  font-size: 11px; font-weight: 800; letter-spacing: 1px;
}
.rvw-foot { margin-top: auto; display: flex; justify-content: flex-end; }
.rvw-pg { padding-top: 10px; }
.rvw-nav { display: flex; justify-content: space-between; padding: 14px 6px 0; }
.rvw-navbtn {
  width: 54px; height: 44px; border-radius: 12px;
  background: var(--paper); border: 2px solid var(--gold); color: var(--gold);
  font-size: 22px; font-weight: 800;
}
.rvw-navbtn:disabled { opacity: .35; }
.pvw { padding-top: 0; }
/* 轻松回顾：例句去掉底框，贴合图1 */
.rvw-ex { background: transparent; border: none; border-radius: 0; padding: 0; }
/* 预习：眼罩模式下单词/音标居中（图3） */
.pvw-card { position: relative; }
.pvw-card.hide { justify-content: center; align-items: center; text-align: center; }
.pvw-card.hide .pvw-pron { justify-content: center; }
.pvw-card.hide .pvw-pg { position: absolute; right: 20px; bottom: 14px; margin-top: 0; }

/* ===== v79：单词听写（纸笔听写） ===== */
.qch-paper {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 8px; border-radius: 10px;
  color: var(--gold); font-size: 13px; font-weight: 700;
}
.qch-paper svg { width: 18px; height: 18px; }
.qch-paper.ghost { visibility: hidden; }

.dc { padding-bottom: 8px; }
.dc-card {
  position: relative; box-sizing: border-box;
  min-height: 56vh; margin-top: 2px;
  background: var(--paper); border: 2px solid var(--gold);
  border-radius: 30px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.dc-wave { display: flex; align-items: center; gap: 8px; height: 90px; }
.dc-wave i { display: block; width: 9px; height: 20px; border-radius: 6px; background: #a95a18; opacity: .28; }
.dc-wave.on i { animation: dcw .9s ease-in-out infinite; opacity: 1; }
.dc-wave.on i:nth-child(2) { animation-delay: .12s; }
.dc-wave.on i:nth-child(3) { animation-delay: .24s; }
.dc-wave.on i:nth-child(4) { animation-delay: .36s; }
.dc-wave.on i:nth-child(5) { animation-delay: .48s; }
@keyframes dcw { 0%, 100% { height: 18px; } 50% { height: 64px; } }

.dc-cardfoot {
  position: absolute; left: 18px; right: 18px; bottom: 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.dc-hold { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.dc-hold svg { width: 17px; height: 17px; }
.dc-pg { font-size: 12.5px; color: var(--ink-3); font-weight: 700; }
.dc-reveal {
  position: absolute; left: 14px; right: 14px; bottom: 46px;
  background: var(--card); border: 1.5px solid var(--gold); border-radius: 16px;
  padding: 12px 14px; text-align: left;
  box-shadow: 0 8px 24px rgba(60, 40, 20, .16);
  display: none;
}
.dc-reveal.show { display: block; }
.dc-rword { font-size: 23px; font-weight: 800; color: var(--ink); }
.dc-ripa { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.dc-rdefs { margin-top: 4px; }
.dc-rdef { font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.dc-rdef .pos { color: var(--accent); font-weight: 700; font-style: italic; margin-right: 3px; }

.dc-bar { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 22px 0 6px; }
.dc-bbtn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--gold); background: var(--paper); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
}
.dc-bbtn svg { width: 19px; height: 19px; }
.dc-play {
  width: 78px; height: 78px; border-radius: 50%;
  border: 2px solid var(--gold); background: var(--card); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(160, 120, 60, .18);
}
.dc-play svg { width: 30px; height: 30px; }

/* 播放列表 / 听写设置 */
.dc-sheet-mask { position: fixed; inset: 0; z-index: 150; background: rgba(36, 50, 94, .42); }
.dc-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 151;
  background: var(--card); border-radius: 24px 24px 0 0;
  padding: 14px 18px calc(18px + var(--safe-b));
  max-height: 84vh; overflow: auto;
}
.dc-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 10px; }
.dc-sheet-head h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--ink); }
.dc-sheet-x { width: 32px; height: 32px; border-radius: 50%; background: var(--paper); color: var(--ink-3); font-size: 15px; }
.dc-group { padding: 10px 0; }
.dc-group h4 { margin: 0 0 8px; font-size: 13.5px; color: var(--ink-2); }
.dc-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.dc-seg button {
  padding: 9px 16px; border-radius: 12px;
  background: var(--bg); border: 1.5px solid var(--line);
  font-size: 14px; color: var(--ink-2);
}
.dc-seg button.on { background: var(--gold-soft, #fdf0d8); border-color: var(--gold); color: var(--gold); font-weight: 700; }

.dc-list { display: flex; flex-direction: column; gap: 6px; }
.dc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 12px;
  background: var(--bg); text-align: left;
}
.dc-row.on { background: var(--gold-soft, #fdf0d8); }
.dc-i { width: 24px; flex: none; font-size: 12px; color: var(--ink-3); text-align: center; }
.dc-rw { flex: 1; min-width: 0; }
.dc-rw b { display: block; font-size: 15px; color: var(--ink); }
.dc-rw i { display: block; font-style: normal; font-size: 12px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-st { font-size: 11px; flex: none; padding: 3px 8px; border-radius: 999px; }
.dc-st.now { background: var(--gold-soft, #fdf0d8); color: var(--gold); }
.dc-st.done { background: #e8f5ec; color: var(--ok); }

/* 听写纸页 */
.dc-paper-page { position: fixed; inset: 0; z-index: 160; background: var(--bg); display: flex; flex-direction: column; }
.dc-paper-page .qch { padding: 8px 14px; }
.dc-paper-scroll { flex: 1; overflow: auto; padding: 2px 12px 90px; }
.dcp-preview { position: relative; width: 100%; height: 476px; overflow: hidden; background: #fff; border-radius: 10px; box-shadow: 0 4px 18px rgba(60, 40, 20, .12); padding: 8px; box-sizing: border-box; }
.dcp-preview .dcp { width: 794px; transform: scale(.42); transform-origin: top left; }
.dc-paper-export {
  position: fixed; left: 16px; right: 16px; bottom: calc(14px + var(--safe-b)); z-index: 161;
  padding: 14px; border-radius: 14px; text-align: center;
  background: #cfe4a8; border: 1.5px solid #b8d07f; color: #56662a;
  font-size: 16px; font-weight: 800;
}

/* 听写纸 */
.dcp { position: relative; width: 100%; background: #fffdf7; color: #5a3a1a; font-family: Georgia, "Songti SC", "SimSun", serif; }
.dcp-title {
  text-align: center; font-size: 26px; font-weight: 900; letter-spacing: 8px;
  color: #e8942a; margin: 2px 0 10px;
  -webkit-text-stroke: 3px #fff; paint-order: stroke fill;
}
.dcp-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 700; margin: 0 2px 8px; }
.dcp-table { width: 100%; border-collapse: collapse; table-layout: fixed; border: 2px solid #b98a5a; border-radius: 10px; overflow: hidden; }
.dcp-table th {
  background: #d9edf6; color: #3a2a1a; font-size: 11.5px; font-weight: 800;
  padding: 7px 6px; text-align: left; border-bottom: 2px solid #b98a5a;
}
.dcp-table td { height: 30px; border-bottom: 1px dashed #e2c39a; border-right: 1px dashed #e2c39a; }
.dcp-table td.no { text-align: center; font-size: 11px; color: #8a6a4a; }
.dcp-wm { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); font-size: 150px; opacity: .05; pointer-events: none; }
.dcp-print .dcp { width: 100%; }
.dcp-print .dcp-table td { height: 34px; }

/* 温馨提示 */
.dc-intro { position: fixed; inset: 0; z-index: 170; background: rgba(36, 50, 94, .45); display: flex; align-items: center; justify-content: center; padding: 24px; }
.dc-intro-card { width: min(86vw, 330px); background: var(--card); border-radius: 20px; padding: 22px 20px 18px; text-align: center; box-shadow: 0 12px 36px rgba(20, 25, 40, .22); }
.dc-intro-ico { font-size: 36px; }
.dc-intro-card h3 { margin: 6px 0 8px; font-size: 18px; color: var(--ink); }
.dc-intro-card p { margin: 0 0 14px; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.dc-intro-check { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--ink-3); margin-bottom: 14px; }
.dc-intro-btn { width: 100%; padding: 12px; border-radius: 12px; background: var(--gold-soft, #fdf0d8); color: var(--gold); font-size: 15px; font-weight: 800; border: 1.5px solid var(--gold); }
/* 听写纸预览：用 zoom 让 A4 纸按比例缩进预览卡（transform 会留白） */
.dcp-preview { height: auto; padding: 0; background: #fff; }
.dcp-preview .dcp { width: 794px; transform: none; zoom: .42; }
/* 预习：右下定时关闭 + 倒计时 */
.pvw-timer { position: relative; display: flex; align-items: center; }
.pvw-timer-txt {
  position: absolute; left: 50%; top: -15px; transform: translateX(-50%);
  font-size: 10.5px; font-weight: 700; color: var(--gold); white-space: nowrap;
}
.pvw-timer.on .pvw-bbtn { background: var(--gold-soft, #fdf0d8); color: var(--gold); }
.pvw-bar { gap: 16px; }
/* 听写纸：行高加大，铺满 A4 */
.dcp-table td { height: 40px; }
.dcp-print .dcp-table td { height: 40px; }
.dcp-table td { height: 44px; }
.dcp-print .dcp-table td { height: 44px; }

/* 听写：长按展开的完整单词覆盖整张卡片（盖住波纹与底栏） */
.dc-card { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.dc-reveal {
  position: absolute; inset: 0; z-index: 3;
  left: 0; right: 0; bottom: 0; top: 0;
  background: var(--paper);
  border: none; border-radius: 28px;
  padding: 26px 22px;
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  text-align: center; box-shadow: none;
  overflow: auto;
}
.dc-reveal.show { display: flex; }
.dc-rword { font-size: 38px; line-height: 1.15; word-break: break-word; }
.dc-ripa { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.dc-rdefs { margin-top: 18px; }
.dc-rdef { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.dc-reveal .dc-rdef .pos { color: var(--gold); }

/* 听写纸：外边框 + 中间实线分隔（对齐原 PDF） */
.dcp-frame {
  box-sizing: border-box;
  border: 2px solid #a95c3c;
  border-radius: 12px;
  overflow: hidden;
  background: #fffdf7;
}
.dcp-table { border: none; border-radius: 0; }
.dcp-table th { border-bottom: 2px solid #a95c3c; }
.dcp-table td { border-bottom: 1px dotted #d9b98c; border-right: 1px dotted #d9b98c; }
.dcp-table th:nth-child(4),
.dcp-table td:nth-child(4) { border-left: 2px solid #a95c3c; }

/* v95：预习 / 轻松回顾 例句字号加大 */
.pvw-ex { font-size: 17px; line-height: 1.72; }
.pvw-ex-zh { font-size: 15px; line-height: 1.7; padding-left: 0; }
.rvw-ex-en { font-size: 17px; line-height: 1.72; }
.rvw-ex-zh { font-size: 15px; line-height: 1.7; }
