/* =====================================================================
   视图样式：仪表盘 / 查词 / 词卡 / 队列 / 复习 / 词库 / 课文 /
             练习 / 听写 / 统计 / 设置

   辞书体的两条规矩贯穿全文件：
     1. 一条 1.5px 的刻线（--rule-ink）在块首，内容挂在线的下方；
     2. 不给东西加阴影或彩色左边框 —— 用字阶、留白和 1px 线分层。
   ===================================================================== */

/* 块首刻线：复习卡、词卡、队列卡、精读卡、词库条目共用 */
.entry { position: relative; }

.entry::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  background: var(--rule-ink);
  transform: scaleX(0);
  transform-origin: left center;
  animation: ruleIn 560ms var(--ease-out) 40ms forwards;
}

/* ==================== 背景装饰 ==================== */
.atmos-mandala {
  position: absolute;
  right: -20vmin;
  top: 10vmin;
  width: 54vmin;
  height: 54vmin;
  color: var(--primary);
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out);
}

.atmos-mandala svg {
  width: 100%; height: 100%;
  display: block;
  animation: breathe 14s var(--ease-in-out) infinite;
}

:root[data-theme='dark'] .atmos-mandala { opacity: .06; }
:root[data-theme='light'] .atmos-mandala { opacity: .035; }

.atmos-stars { position: absolute; inset: 0; opacity: 0; transition: opacity var(--dur-slow); }
:root[data-theme='dark'] .atmos-stars { opacity: .4; }

.atmos-stars i {
  position: absolute;
  border-radius: 50%;
  background: var(--gold);
  animation: breathe 5s var(--ease-in-out) infinite;
}

/* ==================== 仪表盘 ==================== */
.dash-hello {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-5);
  padding: 0 0 var(--sp-6);
  flex-wrap: wrap;
}

.dh-name {
  font-size: clamp(30px, 4.4vw, 42px);
  font-weight: 600;
  color: var(--text);
  line-height: 1.32;
  animation: headRise 700ms var(--ease-out) 40ms both;
}

.dh-greet { font-size: 16px; margin-top: var(--sp-2); color: var(--text); }
.dh-greet .who { color: var(--text-2); }
.dh-date { margin-top: 2px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }

/* 连续打卡：一枚安静的印，不做整块金色卡片，也不做下划线 */
.dh-streak {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding-bottom: 4px;
  color: var(--text-2);
}

.dh-streak.lit { color: var(--text); }

.dh-flame { width: 15px; height: 15px; color: var(--text-3); }
.dh-flame svg { width: 100%; height: 100%; }
.dh-streak.lit .dh-flame { color: var(--gold); }

.dh-streak-num {
  font-family: var(--font-en);
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.dh-streak.lit .dh-streak-num { color: var(--gold); }
.dh-streak-sub { font-size: 11px; color: var(--text-3); }
.dh-checkin { margin-left: var(--sp-2); }
.dh-checked {
  margin-left: var(--sp-2);
  color: var(--accent);
  font-size: 10.5px;
  letter-spacing: .08em;
}

/* ---------- 今日学习提醒条 ---------- */
.reminder-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-5);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: var(--r-xs);
  animation: riseIn var(--dur) var(--ease-out) both;
}

.rm-ico { width: 16px; height: 16px; flex-shrink: 0; color: var(--gold); }
.rm-ico svg { width: 100%; height: 100%; }
.rm-text { flex: 1; min-width: 0; }
.rm-title { font-size: 13px; font-weight: 600; }
.rm-sub { font-size: 11.5px; color: var(--text-2); }

/* 三张统计：横向词条式条带，没有彩条也没有阴影 */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: var(--sp-6);
  border-top: 1.5px solid var(--rule-ink);
  border-bottom: 1px solid var(--line);
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: var(--sp-4) var(--sp-4) var(--sp-4) 0;
  text-align: left;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line-soft);
  border-radius: 0;
  position: relative;
  transition: background var(--dur) var(--ease-out);
}

.stat-card:last-child { border-right: 0; }
.stat-card:hover { background: color-mix(in srgb, var(--surface-1) 60%, transparent); }

.s-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.s-num {
  font-family: var(--font-en);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.stat-card.c1 .s-num { color: var(--primary); }
.s-note { font-size: 11.5px; color: var(--text-3); }

.dash-today { margin-bottom: var(--sp-5); }

.today-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}

.today-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}

.tc-num {
  font-family: var(--font-en);
  font-size: 21px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.tc-label { font-size: 11px; color: var(--text-3); letter-spacing: .04em; }

.trend-card { margin-bottom: var(--sp-5); }

.dash-quick {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}

/* ==================== 查词 ==================== */
.search-box { display: flex; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.search-box .input { flex: 1; font-size: 17px; }
.hints { margin-bottom: var(--sp-5); }

/* ==================== 词卡 ==================== */
.wcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  animation: riseIn var(--dur) var(--ease-out) both;
}

.wcard-head {
  position: relative;
  padding: var(--sp-5) var(--sp-5) var(--sp-5);
  border-bottom: 1px solid var(--line);
}

.wcard-head::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  background: var(--rule-ink);
}

.w-word {
  font-size: 42px;
  font-weight: 600;
  line-height: 1.5;
  word-break: break-word;
}

.w-tags { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-3); align-items: center; }

.w-translit {
  margin-top: var(--sp-1);
  font-family: var(--font-en);
  font-style: italic;
  font-size: 16px;
  color: var(--text-2);
}

.w-pron { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

.wcard-body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-5); }

.w-sec-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.w-sec-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.w-sec-mean { display: flex; flex-direction: column; gap: var(--sp-2); }
.w-mean-zh { font-size: 19px; line-height: 1.6; color: var(--text); }
.w-mean-en { font-size: 13px; color: var(--text-3); font-family: var(--font-en); font-style: italic; }

.w-mnemonic {
  padding: var(--sp-3) var(--sp-4);
  border-left: 2px solid var(--gold);
  background: color-mix(in srgb, var(--gold-soft) 55%, transparent);
  font-size: 14px;
  line-height: 1.8;
}

.m-tag { margin-right: var(--sp-2); color: var(--gold); }

.w-root {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  font-family: var(--font-deva);
  font-size: 20px;
}

.r-part { padding: 1px var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-xs); }
.r-prefix { color: var(--male); border-color: color-mix(in srgb, var(--male) 28%, transparent); }
.r-root   { color: var(--primary); border-color: color-mix(in srgb, var(--primary) 28%, transparent); }
.r-suffix { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 28%, transparent); }
.r-plus { color: var(--text-3); }

.w-root-explain { margin-top: var(--sp-3); font-size: 13px; color: var(--text-2); line-height: 1.75; }

.w-example { padding: var(--sp-3) 0; border-bottom: 1px solid var(--line-soft); }
.w-example:last-child { border-bottom: none; }
.ex-hi { font-size: 17px; line-height: var(--lh-deva); }
.ex-zh { font-size: 13px; color: var(--text-2); margin-top: 4px; }

.w-rel { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

.rel-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 3px var(--sp-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: transparent;
  transition: border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}

.rel-chip:hover { border-color: var(--primary); background: var(--primary-soft); }
.rel-label { font-size: 9.5px; color: var(--text-3); letter-spacing: .1em; text-transform: uppercase; }
.r-deva { font-family: var(--font-deva); font-size: 15px; }
.rel-mean { font-size: 11.5px; color: var(--text-3); }

.wcard-foot {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-5);
  background: transparent;
  border-top: 1px solid var(--line);
}

.foot-note { font-size: 11.5px; color: var(--text-3); margin-right: auto; }

/* 单词着色：名词按性 */
.cword.c-masc { color: var(--male); }
.cword.c-fem  { color: var(--female); }

.vmark { font-size: .5em; vertical-align: super; color: var(--text-3); margin-left: 3px; }
.vmark.trans   { color: var(--trans); }
.vmark.intrans { color: var(--intrans); }

/* ==================== 紧凑行 ==================== */
.wrow {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-2);
  border-bottom: 1px solid var(--line-soft);
  width: 100%;
  text-align: left;
  transition: background var(--dur-fast);
}
.wrow:hover { background: var(--surface-1); }
.wrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wrow-word { font-size: 17px; }
.wrow-mean { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrow-right { display: flex; gap: var(--sp-2); align-items: center; }

/* ==================== 新词队列 ==================== */
.q-stage { max-width: 100%; }
.q-meta-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); }

.q-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  min-height: 260px;
  margin: var(--sp-5) 0;
  padding: var(--sp-6) var(--sp-5) var(--sp-7);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.q-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  background: var(--rule-ink);
}

.q-word {
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 600;
  text-align: center;
  line-height: 1.45;
  word-break: break-word;
  animation: headRise 620ms var(--ease-out) both;
}

.q-translit {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 18px;
  color: var(--text-2);
}

.q-hint { text-align: center; margin-bottom: var(--sp-5); font-size: 12px; color: var(--text-3); }
.q-actions { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }

/* ==================== 复习 ==================== */
.rev-wrap { max-width: 100%; }
.rev-progress-bar { margin-bottom: var(--sp-4); }

.rev-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-2);
  margin-top: var(--sp-2);
  letter-spacing: .02em;
}

/* 复习方向：三个小筹码，安静地待在进度条和卡片之间 */
.rev-modebar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.rev-modebar .eyebrow { margin-right: 2px; }

.chip-xs {
  padding: 1px 9px;
  font-size: 11.5px;
  min-height: 0;
  line-height: 1.7;
}

/* ---------- 产出方向 ---------- */
.rev-prod { cursor: default; gap: var(--sp-3); }

.rp-prompt {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.rp-mean {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.5;
  color: var(--text);
  max-width: 30ch;
}

.rp-meta { display: flex; gap: 6px; justify-content: center; }

.rp-inputwrap { width: min(400px, 100%); margin-top: var(--sp-3); }

.rp-input {
  text-align: center;
  font-size: 26px;
  min-height: 58px;
  line-height: 1.5;
  padding: var(--sp-2) var(--sp-3);
}

.rp-input::placeholder {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 15px;
  color: var(--text-3);
}

.rp-conv {
  min-height: 22px;
  margin-top: 6px;
  font-family: var(--font-deva);
  font-size: 15px;
  color: var(--accent);
}

/* ---------- 答案比对 ---------- */
.rb-translit {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 15px;
  color: var(--text-3);
  margin-top: calc(-1 * var(--sp-2));
}

.rb-diff {
  width: fit-content;
  max-width: 100%;
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border-left: 2px solid var(--line-strong);
}

.rb-diff.ok { border-left-color: var(--ok); }
.rd-ok { color: var(--ok); font-size: 13px; letter-spacing: .04em; }

.rd-row {
  display: flex;
  gap: var(--sp-3);
  align-items: baseline;
  margin-bottom: 2px;
}

.rd-k {
  flex: none;
  width: 3.4em;
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--text-3);
  text-transform: uppercase;
}

.rd-deva {
  font-family: var(--font-deva);
  font-size: 21px;
  line-height: 1.9;
  letter-spacing: .02em;
}

.rd-ch.same { color: var(--text-2); }

.rd-ch.bad {
  color: var(--err);
  background: color-mix(in srgb, var(--err) 12%, transparent);
  border-radius: 1px;
}

/* 注意：占位符不能叫 .empty —— 那是全局空态组件的类名，
   撞上会被套上 64px 内边距和白底（踩过一次）。 */
.rd-ch.gap { color: var(--line-strong); }

.rd-note { color: var(--text-3); margin-top: 4px; }

/* 卡片：一块纸，顶上一道刻线，没有圆角也没有阴影 */
.rev-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--sp-7) var(--sp-6);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  text-align: center;
  transition: border-color var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out);
}

.rev-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  background: var(--rule-ink);
  transform: scaleX(0);
  transform-origin: left center;
  animation: ruleIn 640ms var(--ease-out) 30ms forwards;
}

.rev-front { cursor: pointer; }
.rev-front:hover { border-color: var(--line-strong); }

/* 词头：从天城体的顶线里长出来 */
.rev-word {
  font-size: clamp(40px, 6.6vw, 62px);
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
  animation: headRise 680ms var(--ease-out) 90ms both;
}

.rev-translit {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 18px;
  color: var(--text-2);
  animation: headRise 680ms var(--ease-out) 180ms both;
}

.rev-tap {
  margin-top: var(--sp-5);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--text-3);
}

.rev-back { animation: cardTurn var(--dur-slow) var(--ease-out) both; }

.rb-word {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.45;
  animation: headRise 520ms var(--ease-out) both;
}

.rb-mean { font-size: 22px; line-height: 1.6; color: var(--text); }
.rb-mean-en { font-size: 13.5px; color: var(--text-3); font-family: var(--font-en); font-style: italic; }
.rb-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

.rb-mnemonic {
  max-width: 52ch;
  padding: var(--sp-3) var(--sp-4);
  border-left: 2px solid var(--gold);
  background: color-mix(in srgb, var(--gold-soft) 45%, transparent);
  font-size: 13.5px;
  line-height: 1.8;
  text-align: left;
}

.rb-example {
  max-width: 52ch;
  padding: var(--sp-3) 0 var(--sp-3) var(--sp-4);
  border-left: 2px solid var(--line-strong);
  text-align: left;
  font-size: 16px;
  line-height: var(--lh-deva);
}

/* 四档评分：间隔数字当主角，标签退成小字 */
.rev-rate {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2);
  width: 100%;
  margin-top: var(--sp-5);
}

.rate {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 3px;
  padding: var(--sp-3) var(--sp-2);
  min-height: 64px;
  border-radius: var(--r-xs);
  background: transparent;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}

.rate-label { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; opacity: .9; }

.rate-interval {
  font-family: var(--font-en);
  font-size: 19px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.rate-key {
  position: absolute; top: 3px; right: 6px;
  font-size: 9px; opacity: .32; font-family: var(--font-en);
}

.rate-forgot { border-color: color-mix(in srgb, var(--err) 34%, transparent); color: var(--err); }
.rate-forgot:hover { background: color-mix(in srgb, var(--err) 7%, transparent); border-color: var(--err); }
.rate-hard { border-color: color-mix(in srgb, var(--warn) 34%, transparent); color: var(--warn); }
.rate-hard:hover { background: color-mix(in srgb, var(--warn) 7%, transparent); border-color: var(--warn); }
.rate-good { border-color: color-mix(in srgb, var(--accent) 34%, transparent); color: var(--accent); }
.rate-good:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); border-color: var(--accent); }
.rate-easy { border-color: color-mix(in srgb, var(--gold) 34%, transparent); color: var(--gold); }
.rate-easy:hover { background: color-mix(in srgb, var(--gold) 8%, transparent); border-color: var(--gold); }

.rev-hint { text-align: center; margin-top: var(--sp-5); font-size: 11px; color: var(--text-3); }

kbd {
  display: inline-block;
  padding: 0 5px;
  margin: 0 1px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--text-2);
}

/* ---------- 完成页 ---------- */
.rev-done-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: var(--sp-7) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.rev-done-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  background: var(--rule-ink);
}

.rev-done-burst {
  display: inline-block;
  width: 46px; height: 46px;
  color: var(--primary);
  animation: sealPress 620ms var(--ease-spring) both;
}

.rev-done-burst svg { width: 100%; height: 100%; }

.rev-done-title { font-size: 21px; margin: var(--sp-3) 0 var(--sp-2); }
.rev-done-sub { color: var(--text-2); font-size: 13.5px; margin-bottom: var(--sp-5); }

.rev-done-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--sp-3) 0;
}

.rstat { padding: 0; background: transparent; }
.rstat-num {
  display: block;
  font-size: 23px;
  font-weight: 600;
  font-family: var(--font-en);
  font-variant-numeric: tabular-nums;
}
.rstat-label { font-size: 11px; color: var(--text-3); letter-spacing: .06em; }
.rstat.rate-forgot .rstat-num { color: var(--err); }
.rstat.rate-hard .rstat-num { color: var(--warn); }
.rstat.rate-good .rstat-num { color: var(--accent); }
.rstat.rate-easy .rstat-num { color: var(--gold); }

.rev-done-actions { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }

/* ==================== 词库 ==================== */
.lib-stats { margin-bottom: var(--sp-4); }

.lib-toolbar { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; margin-bottom: var(--sp-3); }
.lib-toolbar .search-box { flex: 1; min-width: 220px; margin: 0; }
.lib-sorts { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

.lib-filters { margin-bottom: var(--sp-4); }

/* 字母栏 = 书口索引 */
.letter-rail {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--line);
}

.letter-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 32px;
  padding: 4px 4px 6px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--text-2);
  font-size: 15px;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}

.letter-btn:hover { color: var(--text); background: var(--surface-1); }
.letter-btn.on { color: var(--primary); border-bottom-color: var(--primary); }
.letter-n { font-size: 9px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0 var(--sp-6);
}

/* 词库条目 = 一条词典条目 */
.lib-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-4) 0 var(--sp-4) var(--sp-3);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  transition: background var(--dur) var(--ease-out);
}

.lib-card::after {
  content: '';
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 1.5px;
  background: var(--primary);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform var(--dur) var(--ease-out);
}

.lib-card:hover { background: color-mix(in srgb, var(--surface-1) 55%, transparent); }
.lib-card:hover::after { transform: scaleY(1); }

.lc-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); }
.lc-deva { font-size: 23px; line-height: 1.55; word-break: break-word; }
.lc-mean {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lc-meta { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.lc-foot {
  display: flex; gap: 2px; margin-top: var(--sp-2);
  padding-top: var(--sp-2); border-top: 1px solid var(--line-soft);
}

/* 桌面端操作按钮只在悬停/聚焦时出现：一条条目首先是「词」，不是「按钮组」 */
@media (hover: hover) and (min-width: 768px) {
  .lc-foot {
    border-top-color: transparent;
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    padding-top: 0;
    overflow: hidden;
    transition: opacity var(--dur) var(--ease-out), max-height var(--dur) var(--ease-out);
  }
  .lib-card:hover .lc-foot,
  .lib-card:focus-within .lc-foot {
    opacity: 1;
    max-height: 44px;
    margin-top: var(--sp-2);
    padding-top: var(--sp-2);
    border-top-color: var(--line-soft);
  }
}

/* ==================== 批量导入 ==================== */
.batch-progress { margin-bottom: var(--sp-4); }

.batch-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 0;
  background: transparent;
}

.batch-item.ok  { border-left: 2px solid var(--accent); padding-left: var(--sp-3); }
.batch-item.err { border-left: 2px solid var(--err); }
.batch-item.pending { border-left: 2px solid var(--line-strong); opacity: .7; }

.bi-no { font-size: 11px; color: var(--text-3); min-width: 20px; font-variant-numeric: tabular-nums; }
.bi-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2); }
.bi-word { font-size: 17px; }
.bi-mean { font-size: 12.5px; color: var(--text-2); }
.bi-status { font-size: 11px; color: var(--text-3); }
.batch-item.err .bi-status { color: var(--err); }
.bi-act { display: flex; gap: 2px; }

/* ==================== 精读 ==================== */
.lesson-list { display: flex; flex-direction: column; gap: 0; }

.lesson-card {
  position: relative;
  padding: var(--sp-5) var(--sp-4) var(--sp-5);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  transition: background var(--dur) var(--ease-out);
}

.lesson-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1.5px;
  background: var(--primary);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--dur) var(--ease-out);
}

.lesson-card:hover { background: color-mix(in srgb, var(--surface-1) 55%, transparent); }
.lesson-card:hover::before { transform: scaleY(1); }

.lc-head { display: flex; align-items: center; gap: var(--sp-3); }
.lesson-title { font-size: 20px; flex: 1; line-height: 1.6; }
.lesson-sub { margin-top: 4px; font-size: 11px; letter-spacing: .04em; }
.lc-first {
  margin-top: var(--sp-2);
  font-size: 15px;
  color: var(--text-2);
  line-height: var(--lh-deva);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lesson-acts { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); flex-wrap: wrap; }

.read-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}

/* ---------- 可折叠的句子列表 ---------- */
.rs-fold {
  margin-bottom: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: transparent;
  overflow: hidden;
}

.rs-fold > summary {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  cursor: pointer;
  list-style: none;
  transition: background var(--dur-fast);
}

.rs-fold > summary::-webkit-details-marker { display: none; }
.rs-fold > summary:hover { background: var(--surface-1); }

.rs-fold > summary::before {
  content: '▸';
  color: var(--text-3);
  font-size: 10px;
  transition: transform var(--dur) var(--ease-out);
}

.rs-fold[open] > summary::before { transform: rotate(90deg); }

.rsf-title { font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.rsf-hint { font-size: 11px; color: var(--text-3); margin-left: auto; }

.rs-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 var(--sp-2) var(--sp-2);
  max-height: 46vh;
  overflow-y: auto;
}

.rs-item {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border: 0;
  border-left: 1.5px solid transparent;
  border-radius: 0;
  text-align: left;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}

.rs-item:hover { background: var(--surface-1); }
.rs-item.cur { background: var(--primary-soft); border-left-color: var(--primary); }
.rs-no { font-size: 10.5px; color: var(--text-3); min-width: 16px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.rs-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rs-hi { font-size: 15px; line-height: var(--lh-deva); }
.rs-zh { font-size: 11.5px; color: var(--text-3); }
.rs-done { margin-left: auto; color: var(--accent); font-size: 12px; flex-shrink: 0; }

/* ---------- 当前句卡片 ---------- */
.read-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  touch-action: pan-y;
}

.rc-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  border-bottom: 1px solid var(--line);
  border-radius: var(--r) var(--r) 0 0;
}

.rc-idx { font-size: 11px; color: var(--text-2); white-space: nowrap; letter-spacing: .04em; }

.rc-progress { flex: 1; height: 1.5px; background: var(--line); overflow: hidden; }
.rc-progress > i {
  display: block;
  height: 100%;
  background: var(--primary);
  transition: width var(--dur-slow) var(--ease-out);
}

.rc-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-5);
}

.rc-hi { font-size: 27px; line-height: 2.1; font-weight: 500; }
.rc-zh { font-size: 15.5px; color: var(--text-2); line-height: 1.8; margin-top: calc(-1 * var(--sp-3)); }

.rc-sec { padding-top: var(--sp-4); border-top: 1px solid var(--line-soft); }

.rc-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--sp-2);
}

.rc-tense { font-size: 16px; font-weight: 600; margin-bottom: var(--sp-2); }
.rc-kw { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.rc-frame { font-size: 13px; color: var(--text-2); line-height: 1.75; }

.rc-kv {
  display: flex;
  gap: var(--sp-3);
  align-items: baseline;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--line-soft);
}
.rc-kv:last-child { border-bottom: none; }

.kv-deva { font-size: 17px; min-width: 84px; flex-shrink: 0; }
.kv-link { color: var(--primary); text-align: left; }
.kv-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.kv-mean { font-size: 13px; color: var(--text-2); flex: 1; }

.rc-empty { padding: var(--sp-3); border: 1px solid var(--line-soft); border-radius: var(--r-xs); }

.rc-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r) var(--r);
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(8px);
}

.rc-dots { display: flex; gap: 4px; align-items: center; }
.rc-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background var(--dur) var(--ease-out), transform var(--dur);
}
.rc-dot.on { background: var(--primary); transform: scale(1.4); }

/* ==================== 练习 ==================== */
.ex-top { margin-bottom: var(--sp-5); }

.ex-qcard {
  position: relative;
  padding: var(--sp-6) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: var(--sp-5);
}

.ex-qcard::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  background: var(--rule-ink);
}

.ex-question { font-size: 19px; line-height: 2; white-space: pre-wrap; }
.ex-hint { margin-top: var(--sp-3); font-size: 13px; color: var(--text-3); }

.ex-answer {
  padding: var(--sp-5);
  border-left: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 55%, transparent);
  margin-bottom: var(--sp-5);
  animation: riseIn var(--dur) var(--ease-out) both;
}

.ex-answer-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-2);
}

.ex-answer-body { font-size: 18px; line-height: 2; }
.ex-explain {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.85;
}

.ex-rate { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }

.ex-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mistake-list { display: flex; flex-direction: column; gap: 0; }

.mistake-card {
  padding: var(--sp-4) 0 var(--sp-4) var(--sp-4);
  border: 0;
  border-left: 2px solid var(--err);
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}

.mc-head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.mc-q { font-size: 17px; line-height: 1.95; margin-bottom: var(--sp-2); }
.mc-hint { margin-bottom: var(--sp-2); }
.mc-a { font-size: 15px; line-height: 1.9; }
.mc-ex { font-size: 13px; color: var(--text-2); margin-top: var(--sp-2); line-height: 1.8; }
.mc-acts { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }

/* ==================== 听写 ==================== */
.dict-config { margin-bottom: var(--sp-5); }

.cfg-row { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.cfg-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  min-width: 80px;
}
.cfg-num { width: 88px; min-height: 34px; padding: 4px var(--sp-3); }
.cfg-time { width: 130px; min-height: 36px; padding: 4px var(--sp-3); flex: 0 0 auto; }
.cfg-check { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: 13px; cursor: pointer; }
.cfg-check input { width: 15px; height: 15px; accent-color: var(--primary); }
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-3); }

.paper-stage { padding: var(--sp-5) 0; }
.paper-stack { display: flex; flex-direction: column; gap: var(--sp-6); }

/* 卷面是一张真的纸：比界面更白、更冷 */
.paper {
  background: #FFFEFA;
  color: #17140F;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 20mm 16mm;
  max-width: 210mm;
  margin: 0 auto;
  width: 100%;
}

.paper-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1.5px solid #17140F;
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}

.ph-title { font-family: var(--font-zh); font-size: 19px; font-weight: 700; letter-spacing: .06em; }
.ph-meta { display: flex; gap: var(--sp-5); font-size: 11px; color: #5A5346; letter-spacing: .04em; }

.paper-foot {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: var(--sp-5);
  padding-top: 3mm;
  border-top: 0.5pt solid #E3DCCB;
  font-size: 9.5px;
  color: #A39C8C;
}

.pf-quote { font-family: var(--font-deva); font-size: 10.5px; color: #8B8474; }
.pf-quote-zh { font-size: 9.5px; color: #B2AB9C; }
.pf-page { margin-left: auto; }

.d-list { list-style: none; }
.d-item { display: flex; gap: var(--sp-3); break-inside: avoid; page-break-inside: avoid; margin-bottom: 7mm; }
.d-no { font-size: 12px; font-weight: 700; min-width: 22px; padding-top: 3px; font-variant-numeric: tabular-nums; }
.d-body { flex: 1; min-width: 0; }
.d-prompt { font-size: 16px; line-height: 1.9; }
.d-hint { font-size: 11px; color: #8B8474; margin-top: 2px; }

.write-line { height: var(--line-h, 12mm); border-bottom: 0.4pt solid #A39C8C; margin-top: var(--sp-1); }

.answer-key { break-before: page; page-break-before: always; }
.ak-list { list-style: none; column-count: 2; column-gap: 10mm; }
.ak-item { break-inside: avoid; display: flex; gap: var(--sp-2); padding: var(--sp-1) 0; font-size: 13px; align-items: baseline; }
.ak-no { font-size: 10.5px; color: #8B8474; min-width: 20px; font-variant-numeric: tabular-nums; }
.ak-ans { font-family: var(--font-deva); font-size: 16px; }
.ak-sub { font-size: 11px; color: #8B8474; }

/* ==================== 统计 ==================== */
.stats-top { display: flex; gap: var(--sp-6); align-items: center; margin-bottom: var(--sp-5); flex-wrap: wrap; }
.stats-top-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); flex: 1; min-width: 300px; }

.fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-3) 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

.fact-k { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.fact-v { font-size: 22px; font-weight: 600; font-family: var(--font-en); font-variant-numeric: tabular-nums; }
.fact-v.warn { color: var(--warn); }

.stats-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); margin-bottom: var(--sp-4); }

.ret-table { display: flex; flex-direction: column; }
.ret-row {
  display: flex; align-items: baseline; gap: var(--sp-3);
  padding: var(--sp-2) 0; border-bottom: 1px solid var(--line-soft);
}
.ret-row span:first-child { flex: 1; font-size: 13px; color: var(--text-2); }
.ret-row.sub { padding-left: var(--sp-4); }
.ret-row b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }

.leech-card { border-left: 2px solid var(--warn); }
.leech-list { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.leech-chip {
  display: inline-flex; align-items: baseline; gap: var(--sp-2);
  padding: 2px var(--sp-2);
  border: 1px solid var(--line); border-radius: var(--r-xs);
  background: transparent;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.leech-chip:hover { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 7%, transparent); }
.leech-chip .deva { font-size: 15px; }
.leech-n { font-size: 10px; color: var(--err); font-variant-numeric: tabular-nums; }

/* ==================== 图表 ==================== */
.ch { width: 100%; height: auto; display: block; overflow: visible; }
.ch-tick { font-size: 10px; fill: var(--text-3); font-family: var(--font-en); }

.ch-bar {
  transform-origin: bottom;
  animation: riseIn 420ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 22ms);
  transition: opacity var(--dur-fast);
}
.ch-bar:hover { opacity: .72; }

.ch-line { stroke-dasharray: 2000; stroke-dashoffset: 0; animation: drawLine 900ms var(--ease-out) both; --dash: 2000; }

.ch-empty {
  display: grid; place-items: center;
  color: var(--text-3); font-size: 12.5px;
  border: 1px solid var(--line); border-radius: var(--r-xs);
}

.barlist { display: flex; flex-direction: column; gap: var(--sp-3); }
.bl-row { display: flex; align-items: center; gap: var(--sp-3); }
.bl-label { font-size: 11.5px; color: var(--text-2); min-width: 74px; letter-spacing: .04em; }
.bl-track { flex: 1; height: 6px; background: var(--surface-2); overflow: hidden; }
.bl-fill {
  display: block; height: 100%;
  animation: barGrow 620ms var(--ease-out) both;
  transform-origin: left;
}
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bl-num { font-size: 13px; min-width: 26px; text-align: right; font-variant-numeric: tabular-nums; }

.ring-wrap { position: relative; display: grid; place-items: center; flex-shrink: 0; }
.ring { width: 100%; height: 100%; }
.ring-arc { transition: stroke-dasharray var(--dur-slow) var(--ease-out); }
.ring-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 128%;
  text-align: center;
}
.ring-num { font-size: 24px; font-weight: 600; font-family: var(--font-en); line-height: 1.15; font-variant-numeric: tabular-nums; }
.ring-sub { font-size: 10px; color: var(--text-3); white-space: nowrap; line-height: 1.3; }

/* ---------- 学习热力图 ---------- */
.cal-wrap { --cal-cell: 11px; --cal-gap: 3px; overflow-x: auto; padding-bottom: var(--sp-2); }
.cal-empty { padding: var(--sp-5); text-align: center; }

.cal-months { display: flex; align-items: flex-end; margin-bottom: 4px; }
.cal-month-gutter { width: 20px; flex-shrink: 0; }
.cal-month-track { display: flex; gap: var(--cal-gap); }
.cal-month { font-size: 10px; color: var(--text-3); white-space: nowrap; letter-spacing: .06em; }

.cal-main { display: flex; gap: 0; }
.cal-wds { display: flex; flex-direction: column; gap: var(--cal-gap); width: 20px; flex-shrink: 0; }
.cal-wd {
  height: var(--cal-cell);
  font-size: 9px;
  line-height: var(--cal-cell);
  color: var(--text-3);
  text-align: left;
}

.cal-grid { display: flex; gap: var(--cal-gap); }
.cal-col { display: flex; flex-direction: column; gap: var(--cal-gap); }

.cal-day {
  width: var(--cal-cell);
  height: var(--cal-cell);
  border-radius: 1px;
  background: var(--surface-2);
  transition: transform var(--dur-fast) var(--ease-out);
}
.cal-day:hover { transform: scale(1.4); }
.cal-day.cal-blank { background: transparent; }

.cal-day.i0 { background: var(--surface-2); }
.cal-day.i1 { background: color-mix(in srgb, var(--primary) 18%, var(--surface-2)); }
.cal-day.i2 { background: color-mix(in srgb, var(--primary) 40%, var(--surface-2)); }
.cal-day.i3 { background: color-mix(in srgb, var(--primary) 66%, var(--surface-2)); }
.cal-day.i4 { background: var(--primary); }

.cal-legend { display: flex; align-items: center; gap: 5px; margin-top: var(--sp-3); padding-left: 20px; }

.cal-dot { width: 9px; height: 9px; border-radius: 1px; }
.cal-dot.i0 { background: var(--surface-2); }
.cal-dot.i1 { background: color-mix(in srgb, var(--primary) 18%, var(--surface-2)); }
.cal-dot.i2 { background: color-mix(in srgb, var(--primary) 40%, var(--surface-2)); }
.cal-dot.i3 { background: color-mix(in srgb, var(--primary) 66%, var(--surface-2)); }
.cal-dot.i4 { background: var(--primary); }

/* ==================== 设置 ==================== */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-4); }

.fp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
}

.fp { display: flex; flex-direction: column; gap: 1px; padding: var(--sp-2) 0; border-top: 1px solid var(--line-soft); }
.fp-k { font-size: 10.5px; color: var(--text-3); letter-spacing: .06em; }
.fp-v { font-size: 19px; font-weight: 600; font-family: var(--font-en); font-variant-numeric: tabular-nums; }
.fp-v.warn { color: var(--warn); }

.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0 var(--sp-4); }

.ach-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-3) 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  text-align: left;
  opacity: .42;
  transition: opacity var(--dur) var(--ease-out);
}

.ach-item.on { opacity: 1; }
.ach-icon { font-size: 20px; line-height: 1.2; filter: grayscale(1); }
.ach-item.on .ach-icon { filter: none; }
.ach-name { font-size: 13px; font-weight: 600; }
.ach-desc { font-size: 11px; line-height: 1.5; }

.about-card { text-align: center; border: 0; }

/* ==================== 通用小件 ==================== */
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }

/* ==================== 响应式 ==================== */

@media (min-width: 901px) {
  .read-bar, .rs-fold, .read-card { max-width: 780px; margin-left: auto; margin-right: auto; }
  .read-bar { margin-bottom: var(--sp-4); }
}

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

@media (max-width: 767px) {
  .dash-hello { align-items: flex-start; gap: var(--sp-3); }
  .dh-name { font-size: 28px; }
  .dh-greet { font-size: 14.5px; }
  .dh-streak { margin-left: auto; }
  .dh-streak-sub { display: none; }
  .dash-stats { grid-template-columns: repeat(3, 1fr); }
  .stat-card { padding-right: var(--sp-3); }
  .s-num { font-size: 24px; }
  .rp-input { font-size: 22px; min-height: 52px; }
  .rd-deva { font-size: 19px; }
  .today-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3) var(--sp-4); }
  .rev-rate { grid-template-columns: repeat(2, 1fr); }
  .rev-rate .rate { min-height: 58px; }
  .rev-done-stats { grid-template-columns: repeat(2, 1fr); }
  .ex-rate { grid-template-columns: 1fr; }
  .rev-card { padding: var(--sp-6) var(--sp-4); min-height: 340px; }
  .rev-word { font-size: 44px; }
  .q-word { font-size: 44px; }
  .w-word { font-size: 34px; }
  .lib-grid { grid-template-columns: 1fr; }

  /* 手机上的筛选条：一行横向滑动，不要摊成三行把内容挤下去 */
  .lib-sorts,
  .chip-row,
  .letter-rail {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .lib-sorts::-webkit-scrollbar,
  .chip-row::-webkit-scrollbar,
  .letter-rail::-webkit-scrollbar { display: none; }

  .lib-sorts > *,
  .chip-row > *,
  .letter-rail > * { flex: 0 0 auto; }

  .letter-rail { padding-bottom: 2px; }
  .chip { white-space: nowrap; }
  .cfg-label { min-width: 64px; }
  .paper { padding: 12mm 8mm; }
  .ak-list { column-count: 1; }
  .wcard-body, .wcard-head, .wcard-foot { padding-left: var(--sp-4); padding-right: var(--sp-4); }

  .rc-body { padding: var(--sp-4); gap: var(--sp-4); }
  .rc-hi { font-size: 23px; line-height: 2; }
  .rc-head, .rc-nav { padding-left: var(--sp-3); padding-right: var(--sp-3); }
  .rc-nav .btn { min-height: 42px; }
  .rs-list { max-height: 42vh; }
}
