/* vocab-pro · 晨纸青瓷（与 words-pro / grammar-pro 同源）
   层级：L0 页面 --bg；L1 模块卡片 --card 白；L2 卡内分块靠小标题+分隔线；L3 内容块 --bg-subtle 浅底无边框。
   颜色语义：青瓷绿 = 品牌/重点词/正确；砖红 = 错误/错词；琥珀 = 当前朗读句/易混避坑。
   新增样式必须复用下列变量，禁止写死色值（SVG 插画除外）。详见 docs/UI-SPEC.md。 */
:root {
  color-scheme: light;
  --bg: #F3F4F1;
  --bg-deep: #E6E9E5;
  --bg-subtle: #F5F6F3;
  --card: #FFFFFF;
  --ink: #18211E;
  --ink-2: #47524D;
  --ink-3: #6B7571;
  --line: #E5E8E4;
  --line-strong: #D2D8D4;
  --sel: #33403B;

  --brand: #157360;
  --brand-ink: #0F5C4D;
  --brand-soft: #E9F5F1;
  --brand-border: #BFE0D5;

  --accent: #C4532F;
  --accent-soft: #FCEFEA;
  --accent-border: #F0C9BC;

  --amber: #B2741F;
  --amber-ink: #8A5A14;
  --amber-soft: #FBF5E8;
  --amber-border: #ECD9B4;

  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 6px rgba(20, 30, 26, 0.05), 0 0 0 1px rgba(20, 30, 26, 0.05);
  --shadow-md: 0 16px 40px rgba(22, 33, 30, 0.14);

  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Helvetica Neue", sans-serif;
  --font-en: "Iowan Old Style", "Charter", "Palatino Linotype", Georgia, serif;
  --font-zh-serif: "Songti SC", "STSong", "Noto Serif SC", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --fs-en: 18px;
  --lh-en: 1.72;
  --shell-max: 720px;
  --topbar-h: 52px;
  --player-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button, input { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ui-ico {
  width: 18px; height: 18px;
  display: inline-block; vertical-align: -0.2em; flex: 0 0 auto;
  stroke: currentColor; fill: none; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.ui-ico.filled { fill: currentColor; stroke: none; }

/* ---------- 壳体 ---------- */
.app-shell {
  max-width: var(--shell-max);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  padding-bottom: 40px;
}
.app-shell.has-player { padding-bottom: calc(var(--player-h) + var(--safe-b) + 28px); }
@media (min-width: 760px) {
  .app-shell { box-shadow: 0 0 0 1px var(--line); }
}
.page { padding: 0 14px; }
@media (min-width: 760px) { .page { padding: 0 24px; } }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
  background: rgba(243, 244, 241, 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-title {
  flex: 1; min-width: 0;
  font-size: 15px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand { display: flex; align-items: baseline; gap: 8px; flex: 1; min-width: 0; }
.brand-name { font-family: var(--font-en); font-size: 20px; font-weight: 700; letter-spacing: 0.01em; }
.brand-name b { color: var(--brand); font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--ink-2);
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
  transition: background .14s, border-color .14s, color .14s;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 38px; height: 38px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--card); color: var(--ink-2);
  flex: 0 0 auto;
}
.icon-btn.plain { border-color: transparent; background: transparent; }
.icon-btn .ui-ico { width: 20px; height: 20px; }

/* 分段选择器：所有“二选一/三选一”统一用它 */
.seg {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}
.seg button {
  border: 0; background: transparent; color: var(--ink-2);
  height: 30px; padding: 0 12px;
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.seg button.active { background: var(--sel); color: #fff; }
.seg button:disabled { opacity: .4; cursor: not-allowed; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 9px;
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600;
  background: var(--bg-subtle); color: var(--ink-2);
  white-space: nowrap;
}
.chip-brand { background: var(--brand-soft); color: var(--brand-ink); }
.chip-accent { background: var(--accent-soft); color: var(--accent); }
.chip-amber { background: var(--amber-soft); color: var(--amber-ink); }

/* ---------- 卡片 / 区块 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px 16px;
  margin-top: 14px;
}
@media (min-width: 760px) { .card { padding: 22px 22px; } }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-title { margin: 0; font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.step-no {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 800;
}
.section-desc { margin: -4px 0 12px; font-size: 13px; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.divider { height: 1px; background: var(--line); margin: 14px 0; border: 0; }

/* ---------- 首页 ---------- */
.hero { padding: 20px 2px 4px; }
.hero h1 {
  margin: 0; font-size: 24px; line-height: 1.35; font-weight: 800; letter-spacing: 0.01em;
}
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 10px 12px;
}
.stat b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--ink-3); }
.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.entry {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 12px; min-height: 64px;
}
.entry-ico {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
}
.entry-ico.accent { background: var(--accent-soft); color: var(--accent); }
.entry b { display: block; font-size: 14px; }
.entry span { display: block; font-size: 12px; color: var(--ink-3); }

.tier { margin-top: 22px; }
.tier-head { display: flex; align-items: baseline; gap: 8px; padding: 0 2px 8px; }
.tier-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.tier-head .tier-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); align-self: center; }
.tier-head .tier-dot.mid { background: var(--amber); }
.tier-head .tier-dot.new_2022 { background: var(--accent); }
.tier-head p { margin: 0; font-size: 12.5px; color: var(--ink-3); flex: 1; min-width: 0; }
.story-list { display: grid; gap: 10px; }
@media (min-width: 760px) { .story-list { grid-template-columns: 1fr 1fr; } }
.story-item {
  display: flex; gap: 12px; align-items: stretch;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 10px; transition: box-shadow .14s;
}
.story-thumb {
  width: 96px; flex: 0 0 auto; aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-subtle);
}
.story-thumb img { width: 100%; height: 100%; object-fit: cover; }
.story-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.story-no { font-family: var(--font-en); font-size: 12px; color: var(--ink-3); font-weight: 700; }
.story-title-en { font-family: var(--font-en); font-size: 16px; font-weight: 700; line-height: 1.3; }
.story-title-zh { font-size: 13px; color: var(--ink-2); }
.story-status { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; flex-wrap: wrap; }
.tier-empty {
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  padding: 16px; font-size: 13px; color: var(--ink-3); text-align: center;
}

/* ---------- 故事详情 ---------- */
.cover {
  position: relative; margin: 12px 0 0;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-subtle); aspect-ratio: 16 / 10;
  box-shadow: var(--shadow-sm);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-switch { position: absolute; right: 10px; bottom: 10px; }
.cover-switch .seg { background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.story-head { padding: 16px 2px 2px; }
.story-head .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.story-head h1 { margin: 10px 0 2px; font-family: var(--font-en); font-size: 27px; line-height: 1.2; font-weight: 700; }
.story-head .zh-title { font-family: var(--font-zh-serif); font-size: 16px; color: var(--ink-2); }
.story-head .summary { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }
.story-head .meta { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }

.reader-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.reader-tip { font-size: 12.5px; color: var(--ink-3); }
.passage { margin: 0 -6px; }
.sent {
  position: relative;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .18s;
}
@media (hover: hover) {
  .sent:hover { background: var(--bg-subtle); }
  .kw:hover { background: var(--brand-soft); }
  .story-item:hover { box-shadow: var(--shadow-md); }
  .btn:hover { border-color: var(--ink-3); }
  .btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
}
.sent-en { font-family: var(--font-en); font-size: var(--fs-en); line-height: var(--lh-en); color: var(--ink); }
.sent-zh {
  display: none;
  margin-top: 2px; font-size: 14px; line-height: 1.6; color: var(--ink-3);
}
.passage.zh-all .sent-zh, .sent.zh-open .sent-zh { display: block; }
.sent.is-playing { background: var(--amber-soft); box-shadow: inset 3px 0 0 var(--amber); }
.kw {
  color: var(--brand-ink); font-weight: 700;
  background: linear-gradient(transparent 62%, var(--brand-soft) 62%);
  border-bottom: 1.5px solid var(--brand-border);
  border-radius: 2px; cursor: pointer;
  padding: 0 1px;
}
.kw.is-active { background: var(--brand-soft); }
.kw.is-wrong { color: var(--accent); border-bottom-color: var(--accent-border); background: linear-gradient(transparent 62%, var(--accent-soft) 62%); }

.kw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .kw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kw-cell {
  text-align: left; border: 0; background: var(--bg-subtle);
  border-radius: var(--radius-sm); padding: 8px 10px; min-width: 0;
}
.kw-cell b { display: block; font-family: var(--font-en); font-size: 16px; color: var(--ink); }
.kw-cell span { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kw-cell.is-wrong b { color: var(--accent); }

/* 底部播放条 */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  padding: 8px 12px calc(8px + var(--safe-b));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.player-inner { max-width: var(--shell-max); margin: 0 auto; display: flex; align-items: center; gap: 8px; }
.play-main {
  height: 44px; padding: 0 16px 0 12px;
  border-radius: var(--radius-pill); border: 0;
  background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700; flex: 0 0 auto;
}
.play-main .ui-ico { width: 22px; height: 22px; }
.player-pos { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 40px; }
.player-spacer { flex: 1; }
@media (max-width: 380px) {
  .player-pos { display: none; }
  .player .seg button { padding: 0 9px; }
}

/* ---------- 底部抽屉（词卡等） ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(22, 33, 30, 0.38);
  opacity: 0; transition: opacity .2s;
}
.sheet-mask.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 81;
  max-width: var(--shell-max); margin: 0 auto;
  max-height: 86vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-md);
  padding: 8px 18px calc(18px + var(--safe-b));
  transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.sheet.open { transform: translateY(0); }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 2px auto 10px; }
@media (min-width: 760px) {
  .sheet {
    top: 50%; bottom: auto; left: 50%; right: auto; width: 480px;
    border-radius: 20px; padding-bottom: 20px;
    transform: translate(-50%, -46%); opacity: 0;
    transition: transform .2s, opacity .2s;
  }
  .sheet.open { transform: translate(-50%, -50%); opacity: 1; }
  .sheet-grip { display: none; }
}

.wc-head { display: flex; align-items: center; gap: 10px; }
.wc-word { font-family: var(--font-en); font-size: 30px; font-weight: 700; line-height: 1.1; }
.wc-phon { font-family: var(--font-sans); font-size: 14px; color: var(--ink-3); margin-top: 4px; }
.wc-pos { font-style: italic; color: var(--ink-3); margin-right: 4px; }
.wc-head .spacer { flex: 1; }
.wc-ctx {
  margin-top: 14px; padding: 12px 14px;
  border-radius: var(--radius); background: var(--brand-soft);
}
.wc-label { font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em; color: var(--ink-3); margin-bottom: 4px; }
.wc-ctx .wc-label { color: var(--brand); }
.wc-ctx-zh { font-size: 17px; font-weight: 800; color: var(--brand-ink); }
.wc-ctx-en { margin-top: 4px; font-family: var(--font-en); font-size: 15px; color: var(--ink-2); line-height: 1.55; }
.wc-ctx-en mark { background: transparent; color: var(--brand-ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--brand-border); text-underline-offset: 3px; }
.wc-block { margin-top: 14px; }
.wc-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14.5px; }
.wc-forms { display: flex; flex-wrap: wrap; gap: 6px; }
.wc-forms span { background: var(--bg-subtle); border-radius: 8px; padding: 3px 8px; font-size: 13px; color: var(--ink-2); }
.wc-coll { display: flex; gap: 8px; align-items: baseline; }
.wc-coll b { font-family: var(--font-en); font-size: 15.5px; color: var(--ink); }
.wc-coll span { font-size: 13px; color: var(--ink-3); }
.wc-tip {
  margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--amber-soft); color: var(--amber-ink); font-size: 13.5px;
  display: flex; gap: 8px; align-items: flex-start;
}
.wc-tip .ui-ico { margin-top: 2px; }
.wc-actions { display: flex; gap: 8px; margin-top: 16px; }
.wc-actions .btn { flex: 1; }
.btn.is-wrong { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border); }

/* ---------- 抠词填空 ---------- */
.quiz-list { display: grid; gap: 10px; }
.quiz-item { background: var(--bg-subtle); border-radius: var(--radius); padding: 12px; }
.quiz-item.is-right { box-shadow: inset 3px 0 0 var(--brand); }
.quiz-item.is-wrong { box-shadow: inset 3px 0 0 var(--accent); }
.quiz-no { font-size: 12px; font-weight: 800; color: var(--ink-3); }
.quiz-sent { font-family: var(--font-en); font-size: 17px; line-height: 1.9; margin-top: 2px; }
.quiz-input {
  font-family: var(--font-en); font-size: 17px; font-weight: 700;
  min-width: 3.2em; max-width: 70%;
  border: 0; border-bottom: 2px solid var(--line-strong);
  background: transparent; padding: 0 2px; margin: 0 2px;
  color: var(--brand-ink); outline: none; border-radius: 0;
}
.quiz-input:focus { border-bottom-color: var(--brand); }
.quiz-input.right { color: var(--brand); border-bottom-color: var(--brand); }
.quiz-input.wrong { color: var(--accent); border-bottom-color: var(--accent); text-decoration: line-through; }
.quiz-hint { margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.quiz-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quiz-opts button {
  height: 34px; padding: 0 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); background: var(--card);
  font-family: var(--font-en); font-size: 15px; font-weight: 600;
}
.quiz-opts button.right { background: var(--brand-soft); border-color: var(--brand-border); color: var(--brand-ink); }
.quiz-opts button.wrong { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }
.quiz-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.quiz-result { font-size: 13px; line-height: 1.55; }
.quiz-result.right { color: var(--brand); }
.quiz-result.wrong { color: var(--accent); }
.quiz-summary {
  margin-top: 12px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--brand-soft); color: var(--brand-ink); font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}

/* ---------- 连播 / 报听写 ---------- */
.dict-opts { display: grid; gap: 10px; }
.dict-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dict-row > label { font-size: 13px; color: var(--ink-3); min-width: 3em; }
.dict-stage {
  margin-top: 12px; border-radius: var(--radius); background: var(--bg-subtle);
  min-height: 132px; padding: 16px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.dict-count { font-size: 12px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dict-main { font-family: var(--font-en); font-size: 30px; font-weight: 700; line-height: 1.25; }
.dict-main.zh { font-family: var(--font-sans); font-size: 22px; }
.dict-sub { font-size: 14px; color: var(--ink-2); }
.dict-bar { width: 100%; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 10px; }
.dict-bar i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .3s; }
.dict-ctrl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dict-ctrl .btn { flex: 1 1 auto; }
.dict-main .ui-ico { width: 40px; height: 40px; color: var(--brand); stroke-width: 1.6; }
.check-list { display: grid; gap: 6px; margin-top: 12px; }
.check-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg-subtle);
}
.check-row .no { width: 22px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.check-row .w { font-family: var(--font-en); font-size: 16px; font-weight: 700; min-width: 6.5em; }
.check-row .z { font-size: 13px; color: var(--ink-2); flex: 1; min-width: 0; }
.check-row button { flex: 0 0 auto; }
.check-row.marked { background: var(--accent-soft); }
.check-row.marked .w { color: var(--accent); }

/* ---------- 速查表 / 错词本 ---------- */
.search {
  width: 100%; height: 42px; padding: 0 14px;
  border-radius: var(--radius-pill); border: 1px solid var(--line-strong);
  background: var(--card); outline: none; font-size: 15px;
}
.search:focus { border-color: var(--brand); }
.letter-head {
  position: sticky; top: var(--topbar-h); z-index: 5;
  margin: 14px 0 6px; padding: 4px 2px;
  background: var(--bg); font-family: var(--font-en); font-weight: 700; color: var(--brand);
}
.word-rows { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.word-row {
  width: 100%; border: 0; background: transparent; text-align: left;
  display: flex; align-items: baseline; gap: 10px;
  padding: 10px 14px; border-top: 1px solid var(--line);
}
.word-row:first-child { border-top: 0; }
.word-row .w { font-family: var(--font-en); font-size: 16px; font-weight: 700; min-width: 7em; }
.word-row .p { font-size: 12.5px; color: var(--ink-3); min-width: 6.5em; }
.word-row .z { font-size: 13px; color: var(--ink-2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.word-row .x { flex: 0 0 auto; align-self: center; }
@media (max-width: 420px) { .word-row .p { display: none; } }
.empty {
  text-align: center; color: var(--ink-3); font-size: 14px;
  padding: 36px 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
}

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--player-h) + var(--safe-b) + 18px); z-index: 90;
  transform: translate(-50%, 8px); opacity: 0;
  background: var(--sel); color: #fff; font-size: 13.5px; font-weight: 600;
  padding: 9px 16px; border-radius: var(--radius-pill);
  pointer-events: none; transition: opacity .18s, transform .18s; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.loading { padding: 48px 16px; text-align: center; color: var(--ink-3); }

/* ---------- 打印 A4 默写单 ---------- */
.print-root { display: none; }
@media print {
  @page { size: A4; margin: 14mm 14mm 12mm; }
  html, body { background: #fff !important; }
  body > *:not(.print-root) { display: none !important; }
  .print-root { display: block !important; color: #000; font-family: var(--font-sans); font-size: 11pt; }
  .ps-sheet { break-after: page; }
  .ps-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1.5pt solid #000; padding-bottom: 3mm; }
  .ps-head h1 { margin: 0; font-size: 15pt; }
  .ps-head .en { font-family: var(--font-en); font-weight: 700; }
  .ps-head .brand-mini { font-size: 9pt; color: #555; }
  .ps-fill { display: flex; gap: 10mm; font-size: 10.5pt; margin: 3mm 0 4mm; }
  .ps-fill span { flex: 1; border-bottom: 0.6pt solid #888; padding-bottom: 1mm; }
  .ps-table { width: 100%; border-collapse: collapse; }
  .ps-table th { font-size: 9pt; color: #555; text-align: left; font-weight: 600; padding: 0 2mm 1.5mm; border-bottom: 0.8pt solid #000; }
  .ps-table td { padding: 0 2mm; height: 7.5mm; border-bottom: 0.5pt solid #bbb; vertical-align: bottom; padding-bottom: 1.2mm; }
  .ps-table .no { width: 8mm; color: #555; font-size: 9pt; }
  .ps-table .zh { width: 62mm; }
  .ps-table .pos { width: 12mm; font-style: italic; color: #333; font-size: 10pt; }
  .ps-table .ph { width: 30mm; color: #444; font-size: 10pt; }
  .ps-table tr { break-inside: avoid; }
  .ps-answers h2 { font-size: 12pt; margin: 0 0 3mm; border-bottom: 1pt solid #000; padding-bottom: 2mm; }
  .ps-answer-grid { columns: 3; column-gap: 6mm; font-size: 10pt; }
  .ps-answer-grid div { break-inside: avoid; padding: 0.8mm 0; }
  .ps-answer-grid b { font-family: var(--font-en); }
  .ps-foot { margin-top: 4mm; font-size: 8.5pt; color: #777; text-align: right; }
}
