/* ============================================================
   爱思笔背单词 — 样式
   移动优先，无外部依赖
   ============================================================ */

:root {
  --bg: #0f1115;
  --bg-elev: #171a21;
  --bg-elev-2: #1e222b;
  --line: #262b36;
  --fg: #e8ecf3;
  --fg-dim: #98a2b3;
  --fg-faint: #626c7d;
  --scroll: #333a47;        /* 滚动条滑块。比 --line 亮一档，在 #0f1115 上要看得见 */
  --accent: #4c8dff;
  --accent-soft: rgba(76, 141, 255, .14);
  --again: #ff5f57;
  --again-soft: rgba(255, 95, 87, .13);
  --hard: #ffb020;
  --hard-soft: rgba(255, 176, 32, .13);
  --good: #33c27f;
  --good-soft: rgba(51, 194, 127, .13);
  --easy: #58a6ff;
  --easy-soft: rgba(88, 166, 255, .13);
  --radius: 16px;
  --radius-sm: 10px;
  --tabbar-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

html[data-theme="light"] {
  --bg: #f5f6f8;
  --bg-elev: #ffffff;
  --bg-elev-2: #f0f2f5;
  --line: #e2e5ea;
  --fg: #1a1d23;
  --fg-dim: #667085;
  --fg-faint: #98a2b3;
  --scroll: #c6ccd6;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, .10);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--fg);
  font-family: var(--font);
  overscroll-behavior: none;
  overflow-x: hidden;
}

body { -webkit-font-smoothing: antialiased; }

#app { height: 100%; }

.hidden { display: none !important; }
.link { color: var(--accent); text-decoration: none; font-size: 14px; }
.muted { color: var(--fg-dim); font-size: 13px; line-height: 1.6; margin: 8px 0 0; }

/* ── 屏幕容器 ───────────────────────────────────────────── */
.screen { display: none; height: 100%; flex-direction: column; overflow: hidden; }
.screen.active { display: flex; }

.topbar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: calc(var(--safe-t) + 14px) 18px 12px;
}
.topbar-title { font-size: 20px; font-weight: 650; margin: 0; flex: 1; letter-spacing: .3px; }

.icon-btn {
  flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: var(--bg-elev-2); color: var(--fg-dim);
  font-size: 16px; cursor: pointer; display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.icon-btn:active { background: var(--line); color: var(--fg); }

.scroll {
  flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding: 4px 18px calc(var(--tabbar-h) + var(--safe-b) + 24px);
}

/* ── 今日：环形进度 ─────────────────────────────────────── */
.hero {
  display: flex; align-items: center; gap: 20px;
  padding: 8px 0 20px;
}
.hero-ring { position: relative; width: 132px; height: 132px; flex: 0 0 auto; }
.hero-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hero-ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.ring-bg { stroke: var(--bg-elev-2); }
.ring-fg { stroke: var(--accent); transition: stroke-dashoffset .6s cubic-bezier(.4,0,.2,1); }
.hero-ring-label {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
}
.hero-ring-label strong { font-size: 30px; font-weight: 700; line-height: 1; }
.hero-ring-label span { font-size: 11px; color: var(--fg-dim); }

.hero-side { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; }
.hero-stat { display: flex; align-items: baseline; gap: 8px; }
.hero-stat strong { font-size: 19px; font-weight: 650; min-width: 44px; font-variant-numeric: tabular-nums; }
.hero-stat strong small { font-size: 12px; font-weight: 400; color: var(--fg-dim); }
.hero-stat span { font-size: 12px; color: var(--fg-dim); }
/* 今日净增：涨了是绿的，亏了是红的 */
.net-up { color: var(--good); }
.net-down { color: var(--again); }
.net-zero { color: var(--fg-dim); }

/* ── 按钮 ───────────────────────────────────────────────── */
.primary-btn {
  display: block; width: 100%; padding: 17px;
  border: none; border-radius: var(--radius);
  background: var(--accent); color: #fff;
  font-size: 16px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: transform .12s, opacity .12s;
}
.primary-btn:active { transform: scale(.985); opacity: .9; }
.primary-btn:disabled { background: var(--bg-elev-2); color: var(--fg-faint); cursor: default; }

.ghost-btn {
  display: block; width: 100%; padding: 15px; margin-top: 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: transparent; color: var(--fg-dim);
  font-size: 15px; font-family: inherit; cursor: pointer;
}

/* ── 面板 ───────────────────────────────────────────────── */
.panel {
  margin-top: 16px; padding: 16px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-head h2 { font-size: 14px; font-weight: 600; margin: 0; color: var(--fg-dim); letter-spacing: .4px; }

.notice {
  /* 内容只有一行「先过 N 个未达标的，再学新词」，不配一整块警示卡片 */
  margin-top: 12px; padding: 0 2px;
  font-size: 12.5px; line-height: 1.5; color: var(--fg-dim);
}

/* ── 下一次复习 ─────────────────────────────────────────── */
.next-due {
  margin: 0 0 16px; padding: 14px 16px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.next-due .nd-label { font-size: 12px; color: var(--fg-dim); flex: 0 0 auto; }
.next-due .nd-value {
  font-size: 17px; font-weight: 650; text-align: right;
  font-variant-numeric: tabular-nums; line-height: 1.3;
}
.next-due .nd-value small { display: block; font-size: 11px; font-weight: 400; color: var(--fg-dim); margin-top: 2px; }
.next-due .nd-value.nd-wide { flex: 1 1 auto; text-align: left; }
.next-due.due-now { border-color: rgba(255,95,87,.4); background: var(--again-soft); }
.next-due.due-now .nd-value { color: var(--again); }
.next-due.due-now .nd-value small { color: var(--fg-dim); }

/* ── 最快忘掉的词 ───────────────────────────────────────── */
.urgent-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.urgent-item:last-child { border-bottom: none; }
.urgent-word { flex: 1 1 auto; min-width: 0; }
.urgent-word b { display: block; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urgent-word small {
  display: block; margin-top: 2px; font-size: 11px; color: var(--fg-faint);
  /* 释义是长串中文，自然折行会把每行撑成两行；截一行，看全的入口在「详情」 */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.urgent-r {
  flex: 0 0 auto; min-width: 58px; text-align: right;
  font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums;
}
.urgent-r small { display: block; font-size: 10px; font-weight: 400; color: var(--fg-faint); }
.r-low  { color: var(--again); }
.r-mid  { color: var(--hard); }
.r-high { color: var(--good); }

/* ── 记忆率条（卡片背面） ───────────────────────────────── */
.memory-bar { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.memory-bar-head { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--fg-dim); }
.memory-bar-track { height: 6px; border-radius: 3px; background: var(--bg-elev-2); overflow: hidden; }
.memory-bar-fill { height: 100%; border-radius: 3px; transition: width .4s; }

/* ── 词表 ───────────────────────────────────────────────── */
.words-tools {
  flex: 0 0 auto; padding: 0 18px 10px;
  display: flex; flex-direction: column; gap: 10px;
}
.search-input {
  width: 100%; padding: 11px 14px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--fg);
  font-size: 15px; font-family: inherit;
  -webkit-appearance: none; appearance: none;
}
.search-input::placeholder { color: var(--fg-faint); }
.search-input:focus { outline: none; border-color: var(--accent); }

.seg {
  display: flex; gap: 4px; padding: 4px;
  background: var(--bg-elev-2); border-radius: 12px;
}
.seg-btn {
  flex: 1 1 0; min-width: 0;
  padding: 9px 6px; border: none; border-radius: 9px;
  background: transparent; color: var(--fg-dim);
  font-size: 13px; font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: background .15s, color .15s;
}
.seg-btn em {
  font-style: normal; font-variant-numeric: tabular-nums;
  font-size: 11.5px; opacity: .75;
}
.seg-btn.active { background: var(--bg-elev); color: var(--fg); font-weight: 600; }
.seg-btn.active em { opacity: .9; }

/* ── 设置页：三个问题 + 推导结果 ──────────────────────── */

/* 备考范围：四个选项在窄屏上得能换行，不然字会被挤压 */
.scope-seg { flex-wrap: wrap; margin-top: 10px; }
.scope-seg .seg-btn { flex: 1 1 calc(50% - 2px); padding: 11px 8px; font-size: 13px; }

.date-input {
  flex: 0 0 auto; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-elev-2); color: var(--fg);
  font-size: 14px; font-family: inherit;
  font-variant-numeric: tabular-nums;
}
.date-input:focus { outline: none; border-color: var(--accent); }

/* 推导出来的值：比普通文字略大，一眼能看到 */
.summary-val {
  flex: 0 0 auto; font-size: 15px; font-weight: 650;
  color: var(--accent); font-variant-numeric: tabular-nums;
}

.manual-mark {
  font-style: normal; font-size: 10px; font-weight: 400;
  padding: 1px 6px; margin-left: 5px; border-radius: 20px;
  background: var(--hard-soft); color: var(--hard);
  vertical-align: middle;
}

.tune-log {
  margin: 10px 0 14px; padding: 9px 11px;
  border-left: 2px solid var(--accent); border-radius: 0 8px 8px 0;
  background: var(--bg-elev-2);
  font-size: 11.5px; line-height: 1.6;
}

/* ── 备考计划 ─────────────────────────────────────────── */

/* 面板头右上角的「还有 92 天」 */
.plan-days {
  font-size: 12px; color: var(--fg-dim);
  font-variant-numeric: tabular-nums;
}

/* 来不及时的警告句 */
.plan-warn { color: var(--hard); }
.plan-warn b { color: var(--hard); font-weight: 650; }

/* 计划面板里的进度条离下面的说明近一点 */
#exam-plan .progress-row { margin-bottom: 4px; }
#exam-plan .ghost-btn { margin-top: 4px; }

.list-scroll { padding: 0 16px calc(var(--tabbar-h) + var(--safe-b) + 24px); }

/* ── 词表的滚动条 ─────────────────────────────────────────
   默认那条是 Android 的覆盖式滚动条：划一下才出现、手一松就淡出，
   手指根本按不住。而词表有几千行，光靠甩很难滑到想去的地方。

   给 ::-webkit-scrollbar 写样式会让 Chromium 关掉覆盖式行为、改走经典模式 ——
   常驻显示、能按住拖。这是唯一能让它「一直看得见又拖得动」的办法，
   纯 CSS 就够，不用手写一套假滑块（那还得自己追惯性滚动和动态增高的列表）。 */
.list-scroll {
  /* 右边 2px + 14px 滚动条 ≈ 左边原来的 16px，左右不至于一边宽一边窄 */
  padding-right: 2px;
}
.list-scroll::-webkit-scrollbar { width: 14px; }
.list-scroll::-webkit-scrollbar-track { background: transparent; }
.list-scroll::-webkit-scrollbar-thumb {
  background: var(--scroll);
  border-radius: 7px;
  /* 行数多的时候滑块会细成一条，给个下限，手指够得着 */
  min-height: 44px;
}
.list-scroll::-webkit-scrollbar-thumb:active { background: var(--fg-faint); }

.list-section {
  position: sticky; top: 0; z-index: 2;
  margin: 0 -16px; padding: 9px 16px 7px;
  background: var(--bg); border-bottom: 1px solid var(--line);
  font-size: 11.5px; color: var(--fg-dim); letter-spacing: .3px;
  display: flex; justify-content: space-between;
}
.list-section b { font-weight: 600; color: var(--fg); }
.list-empty { padding: 44px 12px; text-align: center; color: var(--fg-dim); font-size: 13px; }
.list-more { padding: 18px; text-align: center; color: var(--fg-faint); font-size: 12px; }

.word-row { padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.word-row:active { background: var(--bg-elev); }
.wr-head { display: flex; align-items: baseline; gap: 10px; }
.wr-word { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 8px; overflow: hidden; }
.wr-word b {
  font-size: 16px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wr-word span {
  flex: 0 0 auto; font-size: 11.5px; color: var(--fg-faint);
  font-family: "Segoe UI", Arial, sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42%;
}
.wr-rate {
  flex: 0 0 auto; text-align: right;
  font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums;
}
.wr-rate small { display: block; font-size: 10px; font-weight: 400; color: var(--fg-faint); }
.r-none { color: var(--fg-faint); }
.wr-mean {
  margin-top: 3px; font-size: 12.5px; color: var(--fg-dim); line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wr-detail {
  margin-top: 10px; padding: 12px 13px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex; flex-direction: column; gap: 7px;
}
.wr-detail .wr-d-line { font-size: 13px; color: var(--fg); line-height: 1.55; }
.wr-detail .wr-d-stats {
  margin-top: 3px; padding-top: 9px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--fg-faint); line-height: 1.7;
  font-variant-numeric: tabular-nums;
}
.wr-d-btn {
  align-self: flex-start; margin-top: 2px;
  padding: 8px 15px; border-radius: 20px;
  border: 1px solid var(--line); background: transparent;
  color: var(--fg-dim); font-size: 12.5px; font-family: inherit; cursor: pointer;
}
.wr-d-btn:active { background: var(--bg-elev-2); }

/* 「永久牢记」标记 */
.wr-perm {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  font-size: 10px; font-weight: 400; border-radius: 20px;
  background: var(--good-soft); color: var(--good);
  vertical-align: middle; white-space: nowrap;
}


/* ── 进度条 ─────────────────────────────────────────────── */
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-bar {
  flex: 1 1 auto; height: 8px; border-radius: 4px;
  background: var(--bg-elev-2); overflow: hidden;
}
.progress-bar.slim { height: 5px; }
.progress-bar i {
  display: block; height: 100%; width: 0;
  background: var(--accent); border-radius: 4px;
  transition: width .35s cubic-bezier(.4,0,.2,1);
}
.progress-num { font-size: 12px; color: var(--fg-dim); font-variant-numeric: tabular-nums; }

/* ── 柱状图 ─────────────────────────────────────────────── */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 96px; }
/* min-width:0 很关键：否则 flex 项会被内容（尤其是日期标签）撑开，导致横向溢出 */
.chart-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.chart-track { flex: 1 1 auto; width: 100%; display: flex; align-items: flex-end; min-width: 0; }
.chart-bar {
  width: 100%; min-height: 3px; border-radius: 5px;
  background: var(--accent-soft); border-bottom: 2px solid var(--accent);
  transition: height .4s cubic-bezier(.4,0,.2,1);
}
.chart-bar.zero { background: var(--bg-elev-2); border-bottom-color: var(--line); }
.chart.dense { gap: 2px; }
/*
 * 坐标轴必须跟 .chart 分开一行，而且 gap 要跟它一致，否则标签会跟柱子错位。
 * ⚠️ .chart-cell 不能 overflow:hidden —— 列只有 8px 宽，标签要 20px，
 * 一裁就变成「今」「1」这种碎片。相邻标签隔了 5 列（≈50px），溢出不会撞。
 */
.chart-axis { display: flex; gap: 6px; margin-top: 6px; }
.chart-axis.dense { gap: 2px; }
.chart-cell {
  flex: 1 1 0; min-width: 0; text-align: center;
  font-size: 10px; color: var(--fg-faint); white-space: nowrap;
  overflow: visible;
}
.chart-value { font-size: 10px; color: var(--fg-dim); font-variant-numeric: tabular-nums; }

/* ── 复习页 ─────────────────────────────────────────────── */
.review-topbar { gap: 14px; }
.review-progress { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; }
.review-counter { font-size: 12px; color: var(--fg-dim); font-variant-numeric: tabular-nums; }

.card-stage {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center;
  padding: 8px 18px; min-height: 0;
}

/* 正面 / 背面瞬时切换，不做翻转动画。
   两个面依然用 rotateY + backface-visibility 叠在一起，
   只是去掉 transition 后「翻」是瞬间完成的。 */
.word-card {
  width: 100%; max-width: 560px; height: 100%; max-height: 520px;
  position: relative; transform-style: preserve-3d;
}
.word-card.flipped { transform: rotateY(180deg); }

.card-inner { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; }

.card-face {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 20px; padding: 26px 22px;
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
}
.card-back { transform: rotateY(180deg); }

.card-front {
  /* 上面留出右上角「熟悉」的位置，下面多留一点 —— 这样「标签+单词+音标」
     这一组整体会压着中线往上放，比居中看着稳。 */
  align-items: center; justify-content: center; gap: 14px;
  padding-top: 44px; padding-bottom: 104px;
}

.word-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 20px; }
.tag {
  font-size: 10px; padding: 3px 8px; border-radius: 20px;
  background: var(--bg-elev-2); color: var(--fg-faint); letter-spacing: .3px;
}
.tag.hot { background: var(--accent-soft); color: var(--accent); }

/* 还在攒连对次数的词。用中性包边，不抢星级的位置，
   但得让人看得出来「为什么间隔一直不涨」。 */
.tag.streak {
  background: transparent; color: var(--fg-dim);
  border: 1px solid var(--line);
}
html[data-theme="light"] .tag.streak { color: var(--fg-dim); }

/* ── 考研真题重要程度 ────────────────────────────────────
   5★ 极高频 / 4★ 高频 / 3★ 常考 / 2★ 偶考 / 1★ 少见
   数据来自 exam-data/NETEMVocabulary（约 200 套试卷的词频统计）
   颜色从暖到冷：越重要越抢眼，但不至于让满屏都是红点。 */
/* 正面只剩这一个标签。原来是按星级配色的实心药丸 —— 比单词本身还抢眼。
   现在压成一行灰字，星级靠星星本身表达就够了。
   （词表里的 .wr-ex 仍然带颜色，那里需要一眼扫出哪几个词高频。） */
.tag.ex-5, .tag.ex-4, .tag.ex-3, .tag.ex-2,
.tag.ex-1, .tag.ex-0, .tag.ex-none {
  background: transparent; color: var(--fg-faint);
  font-size: 11px; padding: 0; letter-spacing: .4px;
}

/* 词表行里的星级：小一号，不抢单词本体的位置 */
.wr-ex {
  flex: 0 0 auto; font-style: normal; font-size: 10.5px;
  letter-spacing: -.5px; white-space: nowrap;
}
.wr-ex.ex-5 { color: #ff8a80; }
.wr-ex.ex-4 { color: #ffc45c; }
.wr-ex.ex-3 { color: #7cb6ff; }
.wr-ex.ex-2 { color: #8aa9e0; }
.wr-ex.ex-1, .wr-ex.ex-0 { color: var(--fg-faint); }
.wr-ex.ex-none { color: var(--fg-faint); font-size: 9.5px; letter-spacing: 0; }

html[data-theme="light"] .wr-ex.ex-5 { color: #d92d20; }
html[data-theme="light"] .wr-ex.ex-4 { color: #b54708; }
html[data-theme="light"] .wr-ex.ex-3 { color: #175cd3; }
html[data-theme="light"] .wr-ex.ex-2 { color: #3b5c99; }

.word-main {
  font-size: 44px; font-weight: 650; letter-spacing: -.5px;
  text-align: center; line-height: 1.18; width: 100%;
  /* 关键：绝不在单词中间断行，字号由 JS 自动收缩来适配 */
  word-break: normal;
  overflow-wrap: normal;
}
.word-mini { font-size: 22px; font-weight: 650; word-break: normal; overflow-wrap: normal; }
.word-phonetic { font-size: 15px; color: var(--fg-dim); font-family: "Segoe UI", Arial, sans-serif; }

/* 正面上那个次要操作（熟悉 · 永久牢记）。
   以前这里还有「显示释义」，现在三个评分按钮直接可点，不需要它了。 */
.pill-btn {
  padding: 11px 26px;
  border: 1px solid var(--line); border-radius: 30px;
  background: transparent; color: var(--fg-dim);
  font-size: 14px; font-family: inherit; cursor: pointer;
}
.pill-btn:active { background: var(--bg-elev-2); }
/* 「熟悉 · 永久牢记」原来摆在正面正中间，比单词还显眼 —— 其实是个很少用的
   次要操作。挪到右上角，压成一行低调小字。 */
.front-actions {
  position: absolute; top: 14px; right: 16px;
  display: flex; gap: 10px; margin: 0;
}
.pill-btn.familiar {
  padding: 5px 11px; font-size: 11px;
  border-color: transparent; background: transparent; color: var(--fg-faint);
}
.pill-btn.familiar:active { background: var(--bg-elev-2); color: var(--fg-dim); }

/* 表态后的确认栏：下一词 / 记错了 / 永久牢记，按流程组合显示 */
.confirm-bar {
  flex: 0 0 auto;
  padding: 12px 18px calc(var(--safe-b) + 18px);
  display: flex; flex-direction: column; gap: 10px;
}
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
/* 只剩一个按钮时别让它只占半幅宽 */
.confirm-actions.single { grid-template-columns: 1fr; }
.confirm-actions .ans { padding: 18px 8px; }
.word-mini-phonetic { font-size: 13px; color: var(--fg-dim); margin-top: 3px; font-family: "Segoe UI", Arial, sans-serif; }

.meaning {
  margin-top: 16px; display: flex; flex-direction: column; gap: 9px;
}
.meaning-line {
  font-size: 16px; line-height: 1.55; padding-left: 11px;
  border-left: 2px solid var(--accent);
}

/* 曾经考过的义项用过黄字加粗，但在深色背景上对比度不够、看久了累，
   而且一个词常常多行都对得上，满屏重点等于没重点。
   现在改成靠上面那条「词频表释义」说明考的是哪个意思。 */

/* 词频表里那一条精简后的考查义，放在所有释义最上面 */
.exam-gloss {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 8px 11px; border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
  font-size: 14px; line-height: 1.5; color: var(--fg);
}
.exam-gloss b {
  flex: 0 0 auto; font-size: 10px; font-weight: 400; letter-spacing: .3px;
  padding: 2px 7px; border-radius: 20px;
  background: var(--hard-soft); color: var(--hard);
}

/* 背面底部那行「这个词在真题里什么分量」 */
.exam-note {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 11.5px; line-height: 1.7; color: var(--fg-faint);
}
.exam-note .ex-badge {
  display: inline-block; margin-right: 7px; padding: 2px 8px;
  border-radius: 20px; background: var(--bg-elev-2);
  letter-spacing: .3px;
}
.exam-note .ex-badge.ex-5 { background: rgba(255, 95, 87, .16); color: #ff8a80; }
.exam-note .ex-badge.ex-4 { background: rgba(255, 176, 32, .15); color: #ffc45c; }
.exam-note .ex-badge.ex-3 { background: rgba(88, 166, 255, .14); color: #7cb6ff; }
.exam-note .ex-badge.ex-2 { background: rgba(76, 141, 255, .10); color: #8aa9e0; }
.exam-note .ex-badge.ex-1, .exam-note .ex-badge.ex-0 { color: var(--fg-dim); }
.exam-note b { color: var(--fg-dim); font-weight: 600; }

/* 背面最底下的真题例句（原句出自 2001–2023 英语一）。
   没有例句的词整块不渲染，所以间距不会悬在空中。 */
.sent {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
}
/* 大约一半的词在真题里没出现过。空的 .sent 只留下一条分隔线，
   看着像内容没加载出来，直接藏掉。 */
.sent:empty { display: none; }
.sent-src {
  font-size: 10px; letter-spacing: .3px; color: var(--fg-faint);
  margin-bottom: 6px;
}
.sent-text {
  font-size: 13.5px; line-height: 1.6; color: var(--fg-dim);
  /* 衬线体，跟题目正文一个味道 */
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
}
.sent-w { cursor: pointer; border-radius: 3px; }
/* 点亮当前查的那个词 */
.sent-w.on { background: var(--accent-soft); }
.sent-w:active { background: var(--bg-elev-2); }
/* 目标词本身（句子里那个要背的词） */
.sent-text .sent-hit { color: var(--accent); font-weight: 600; }

/* 点词之后的释义面板 */
.sent-look {
  margin-top: 8px; padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
  display: flex; flex-direction: column; gap: 3px;
  font-size: 12.5px; line-height: 1.5;
}
.sent-look .sl-head { color: var(--fg); }
.sent-look .sl-head i { font-style: normal; color: var(--fg-faint); margin-left: 6px; }
.sent-look .sl-head i::before { content: "→ "; }
.sent-look .sl-head em { font-style: normal; color: var(--fg-faint); margin-left: 6px; }
.sent-look .sl-line { color: var(--fg-dim); }
.sent-look .sl-none { color: var(--fg-faint); }

/* 词表详情里宽度不受卡片限制，字号可以松一点 */
.sent-wide .sent-text { font-size: 14px; }

html[data-theme="light"] .exam-note .ex-badge.ex-5 { color: #d92d20; }
html[data-theme="light"] .exam-note .ex-badge.ex-4 { color: #b54708; }
html[data-theme="light"] .exam-note .ex-badge.ex-3 { color: #175cd3; }
html[data-theme="light"] .exam-note .ex-badge.ex-2 { color: #3b5c99; }

/* ── 评分按钮 ───────────────────────────────────────────── */
.answer-bar {
  flex: 0 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px;
  padding: 10px 18px calc(var(--safe-b) + 18px);
}
.answer-bar.with-easy { grid-template-columns: repeat(4, 1fr); }
.answer-bar.locked { opacity: .35; pointer-events: none; }

.ans {
  display: flex; flex-direction: column; align-items: center;
  /* 按钮上只有一行大字，内边距要够，否则又扁又空 */
  padding: 18px 6px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: var(--bg-elev);
  color: var(--fg); font-family: inherit; cursor: pointer;
}
.ans strong { font-size: 15px; font-weight: 600; }
.ans-again { background: var(--again-soft); border-color: rgba(255,95,87,.3); }
.ans-again strong { color: var(--again); }
.ans-hard  { background: var(--hard-soft);  border-color: rgba(255,176,32,.3); }
.ans-hard strong { color: var(--hard); }
.ans-good  { background: var(--good-soft);  border-color: rgba(51,194,127,.3); }
.ans-good strong { color: var(--good); }
.ans-easy  { background: var(--easy-soft);  border-color: rgba(88,166,255,.3); }
.ans-easy strong { color: var(--easy); }

/* ── 完成页 ─────────────────────────────────────────────── */
.session-done {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 5;
  background: var(--bg); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; padding: 30px;
}
/* 顶部栏压在完成页之上，保证「撤销」始终点得到 */
.review-topbar { position: relative; z-index: 6; background: var(--bg); }

.wait-emoji {
  font-size: 22px; font-weight: 700; letter-spacing: -.5px;
  font-variant-numeric: tabular-nums; width: auto; min-width: 108px;
  border-radius: 40px; padding: 0 18px; height: 76px;
  background: var(--accent-soft); color: var(--accent);
}
.session-done .done-emoji {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--good-soft); color: var(--good);
  display: grid; place-items: center; font-size: 34px; margin-bottom: 14px;
}
.session-done h2 { font-size: 20px; margin: 0; }
.session-done .primary-btn { margin-top: 26px; max-width: 320px; }

/* ── 统计 / 设置列表 ────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-cell {
  padding: 15px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); min-width: 0;
}
.stat-cell strong { display: block; font-size: 22px; font-weight: 650; letter-spacing: -.4px; }
.stat-cell span { display: block; margin-top: 4px; font-size: 12px; color: var(--fg-dim); }
.stat-cell.wide { grid-column: 1 / -1; }

.bucket { display: flex; flex-direction: column; gap: 12px; }
.bucket-row { display: flex; flex-direction: column; gap: 6px; }
.bucket-head { display: flex; justify-content: space-between; font-size: 12px; }
.bucket-head b { font-weight: 600; }
.bucket-head span { color: var(--fg-dim); font-variant-numeric: tabular-nums; }
.bucket-track { height: 7px; border-radius: 4px; background: var(--bg-elev-2); overflow: hidden; }
.bucket-fill { height: 100%; border-radius: 4px; transition: width .4s; }
.b-new   { background: var(--fg-faint); }
.b-learn { background: var(--again); }
.b-young { background: var(--hard); }
.b-mature{ background: var(--good); }

/* 真题星级对应的条状色，跟 .tag.ex-N 用同一套色 */
.ex-fill-5 { background: #ff5f57; }
.ex-fill-4 { background: #ffb020; }
.ex-fill-3 { background: #58a6ff; }
.ex-fill-2 { background: #4c8dff; }
.ex-fill-1 { background: var(--fg-faint); }
.ex-fill-0 { background: #3a4150; }
.ex-fill-none { background: var(--bg-elev-2); }
html[data-theme="light"] .ex-fill-0 { background: #cfd4dc; }
html[data-theme="light"] .ex-fill-none { background: #e6e9ee; }

/* 统计页里那行星号要跟标签对齐 */
.bucket-head b .wr-ex { font-size: 11px; margin-right: 3px; }

.setting {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 0; border-bottom: 1px solid var(--line);
}
.setting:last-child { border-bottom: none; }
.setting-label { flex: 1 1 auto; }
.setting-label b { display: block; font-size: 14px; font-weight: 500; }
/* 说明文字里的行内强调：上面的规则把 b 变成了块级，
   不加这条的话「还有 <b>92</b> 天」会被拆成三行 */
.setting-label small b { display: inline; color: var(--fg); font-weight: 600; }
.setting-label small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--fg-faint); line-height: 1.5; }

.stepper { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.stepper button {
  width: 32px; height: 32px; border: none; border-radius: 8px;
  background: var(--bg-elev-2); color: var(--fg-dim);
  font-size: 17px; cursor: pointer; line-height: 1;
}
.stepper button:active { background: var(--line); }
.stepper output {
  min-width: 46px; text-align: center; font-size: 15px;
  font-variant-numeric: tabular-nums; font-weight: 600;
}

.switch {
  flex: 0 0 auto; width: 46px; height: 27px; border-radius: 20px;
  background: var(--bg-elev-2); border: none; position: relative;
  cursor: pointer; transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 21px; height: 21px; border-radius: 50%;
  background: #fff; transition: transform .2s;
}
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(19px); }

.danger-btn {
  width: 100%; padding: 14px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,95,87,.35); background: var(--again-soft);
  color: var(--again); font-size: 14px; font-family: inherit; cursor: pointer;
}

/* ── 底部导航 ───────────────────────────────────────────── */
.tabbar {
  flex: 0 0 auto; display: flex;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  border-top: 1px solid var(--line); background: var(--bg-elev);
}
.tab {
  flex: 1 1 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  color: var(--fg-faint); text-decoration: none; font-size: 10.5px;
  transition: color .15s;
}
.tab-ico { font-size: 17px; line-height: 1; }
.tab.active { color: var(--accent); }

/* ── Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 26px);
  transform: translateX(-50%);
  padding: 11px 20px; border-radius: 30px;
  background: var(--bg-elev-2); border: 1px solid var(--line);
  color: var(--fg); font-size: 13px; white-space: nowrap;
  max-width: 88vw; overflow: hidden; text-overflow: ellipsis;
  z-index: 100; animation: toast-in .22s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ── 空状态 / 载入 ──────────────────────────────────────── */
.empty { padding: 40px 10px; text-align: center; color: var(--fg-dim); }
.empty h3 { font-size: 16px; margin: 0 0 10px; color: var(--fg); }
.empty p { font-size: 13px; line-height: 1.7; margin: 0 0 8px; }
.empty code {
  display: inline-block; margin: 4px 0; padding: 5px 10px;
  background: var(--bg-elev-2); border-radius: 6px;
  font-size: 12px; color: var(--accent);
  font-family: ui-monospace, Consolas, monospace;
}

@media (min-width: 620px) {
  .hero-ring { width: 150px; height: 150px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}


/* ── 备考计划：一行结论 + 折叠说明 ── */

.plan-line { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--fg); }

.plan-line b { font-weight: 650; font-variant-numeric: tabular-nums; }

.plan-line.plan-warn, .plan-line.plan-warn b { color: var(--hard); }



/* 「说明」是小文字按钮，不该抢注意力 */

.plan-more {

  display: block; margin: 12px 0 0; padding: 0;

  background: none; border: 0; cursor: pointer;

  font-size: 12px; color: var(--fg-dim); font-family: inherit;

}

.plan-detail { margin-top: 2px; }

.plan-detail .muted { margin: 8px 0 0; }


/* ══════════ 按键反馈 ══════════
 *
 * 全局关掉了 -webkit-tap-highlight-color，所以「按下去有没有反应」全看这里。
 * 之前只有 5 个类写了 :active：
 *   · 有反馈：.primary-btn .icon-btn .pill-btn .ans .stepper button .wr-d-btn
 *   · 完全没反馈：.ghost-btn（12 处在用）、.seg-btn（词表分组 / 备考范围）、
 *     .tab（底部导航）、.danger-btn、.switch、.plan-more
 *
 * 还有个更隐蔽的问题：.ans 和 .primary-btn 的 transition 是 .1s / .12s，
 * 而按下时的形变也要走这段动画 —— 快速点一下，动画还没跑完手指就抬了，
 * 视觉上跟没反应一样。
 *
 * 所以统一成两条：
 *   ① 基础类上写 transition —— 负责**松开时的回弹**
 *   ② :active 里把 transition-duration 归零 —— **按下瞬间到位**
 */

/* ① 松开回弹 */
.primary-btn, .ghost-btn, .icon-btn, .pill-btn, .ans, .seg-btn,
.stepper button, .wr-d-btn, .danger-btn, .switch, .plan-more, .tab-ico {
  transition: transform .13s cubic-bezier(.4, 0, .2, 1),
              background .13s, color .13s, opacity .13s, filter .13s;
  touch-action: manipulation;   /* 去掉双击缩放带来的点击延迟 */
}

/* ② 按下立即到位 */
.primary-btn:active, .ghost-btn:active, .icon-btn:active, .pill-btn:active,
.ans:active, .seg-btn:active, .stepper button:active, .wr-d-btn:active,
.danger-btn:active, .switch:active, .plan-more:active, .tab:active .tab-ico {
  transition-duration: 0s;
  transform: scale(.95);
}

/* 通栏按钮缩太多会明显「晃」，少缩一点 */
.primary-btn:active, .ghost-btn:active, .danger-btn:active { transform: scale(.985); }
/* 图标按钮小，缩狠一点才看得出来 */
.icon-btn:active, .stepper button:active { transform: scale(.9); }
.tab:active .tab-ico { transform: scale(.86); }

/* 光缩不够 —— 深色底上单纯缩放不太看得出来，再压一点颜色 */
.ghost-btn:active { background: var(--bg-elev-2); }
.seg-btn:active { background: var(--bg-elev); color: var(--fg); }
.danger-btn:active { background: rgba(255, 95, 87, .22); }
.plan-more:active { color: var(--fg); }
.tab:active { color: var(--fg-dim); }
/* 评分按钮是点得最多的，给一点「亮起来」的感觉 */
.ans:active { filter: brightness(1.15); }


/* ══════════ 答错词的特殊出场 ══════════
 *
 * 「不认识」「模糊」的词，下次出现时随机换一种样子。
 * 挑编号/演出的逻辑在 js/fx.js，这里只管「长什么样」。
 * 10 种编号 fx-e1 … fx-e10，类名挂在复习页那个 section 上
 * （不是卡片上 —— 第 5 号要占掉评分按钮上的字，按钮在卡片外面）。
 *
 * 两条约定，改的时候别破：
 *   ① 只做视觉 —— 不加按钮、不改布局、不拦点击（fx-layer 是 pointer-events:none）
 *   ② 字号相关的规则都得 !important —— 正面的字号是 app.js 的 fitText()
 *      写进行内 style 的，普通规则压不住
 */
.fx-layer {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  display: flex; flex-wrap: wrap; align-content: center; justify-content: center;
  gap: 6px 10px; padding: 14px; overflow: hidden;
  pointer-events: none; text-align: center;
  font-size: 15px; font-weight: 600; line-height: 1.3;
  color: var(--fg-dim); word-break: break-word;
}

/* 1 巨大化。允许词内断行，否则长词会横着冲出卡片被切掉 */
.fx-e1 .word-main {
  font-size: clamp(52px, 24vw, 116px) !important;
  line-height: 1.02 !important;
  word-break: break-all;
}
/* 字越过卡片高度时，.card-face 的 overflow-y:auto 会冒出一条滚动条 ——
   特效期间把它关掉，溢出就溢出，别在边上杵一根条 */
.fx-e1 .card-front, .fx-e2 .card-front { overflow: hidden; }

/* 2 重复写满整张卡片：正面的标签 / 单词 / 音标全部让位 */
.fx-e2 .word-tags,
.fx-e2 .word-main,
.fx-e2 .word-phonetic { visibility: hidden; }
.fx-e2 .fx-layer { font-size: 16px; }

/* 3 彩色渐变：文字用渐变色填充，色带横向滚动 */
.fx-e3 .word-main {
  background-image: linear-gradient(90deg,
    #ff5f57, #ffb020, #33c27f, #58a6ff, #c678dd, #ff5f57);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: fx-gradient 2.6s linear infinite;
}
@keyframes fx-gradient {
  from { background-position: 0% 50%; }
  to   { background-position: 300% 50%; }
}

/* 4 字母间距拉满。字距大了会溢出，字号压小一档；
   text-indent 补掉末尾多出来的那半个字距，不然看着像偏右 */
.fx-e4 .word-main {
  font-size: clamp(18px, 6.5vw, 30px) !important;
  letter-spacing: .55em !important;
  text-indent: .55em;
  word-break: break-all;
}

/* 5 按钮变成这个单词。按钮上原本是 15px 的字，长单词得缩一点并允许断行 */
.fx-e5 .ans strong {
  font-size: 12px; line-height: 1.25; word-break: break-all;
}

/* 6 闪烁。硬切，不用缓动，闪起来才明显。
   一个周期 0.35 秒（亮 175ms / 灭 175ms）—— 原来 0.9 秒太温吞，
   看着像「灯泡接触不良」而不是闪。还想更快就把这个数字改小 */
.fx-e6 .word-main { animation: fx-blink .35s infinite; }
@keyframes fx-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: .05; }
}

/* 7 极小化 */
.fx-e7 .word-main {
  font-size: 11px !important;
  letter-spacing: 0 !important;
  opacity: .75;
}

/* 8 逐渐消失：6 秒淡到看不见，最后带一点虚化 */
.fx-e8 .word-main { animation: fx-vanish 6s linear forwards; }
@keyframes fx-vanish {
  0%   { opacity: 1; filter: none; }
  55%  { opacity: .45; }
  100% { opacity: 0; filter: blur(3px); }
}

/* 9 旁边写满「爱思笔」。单词压在满屏水印之上，
   靠和卡片同色的描边阴影把字从背景里拔出来（带阴影的文字都得抬到水印上面） */
.fx-e9 .fx-layer { font-size: 17px; letter-spacing: 2px; color: var(--fg-faint); }
.fx-e9 .word-tags,
.fx-e9 .word-main,
.fx-e9 .word-phonetic {
  position: relative; z-index: 2;
  text-shadow: 0 0 12px var(--bg-elev), 0 0 6px var(--bg-elev), 0 0 2px var(--bg-elev);
}

/* 10 原地抖动 */
.fx-e10 .word-main { animation: fx-shake .42s linear infinite; }
@keyframes fx-shake {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(-3px, 2px) rotate(-1.2deg); }
  50%  { transform: translate(3px, -2px) rotate(1.2deg); }
  75%  { transform: translate(-2px, -3px) rotate(-.8deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* ── 特效预览浮层（设置页点开） ─────────────────────────
   基本是复习页的缩小版：卡片 + 评分按钮 + 一行控制按钮。
   那几个评分按钮只是为了让第 5 号特效有地方演，不接收点击。 */
.fx-preview {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 40;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--bg);
  padding: calc(var(--safe-t) + 16px) 18px calc(var(--safe-b) + 16px);
}
.fx-cap {
  font-size: 13px; color: var(--fg-dim); text-align: center;
  font-variant-numeric: tabular-nums;
}
.fx-demo-stage {
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
/* 卡片别超出舞台（它自己 height:100% + max-height:520px，窗口矮的时候会顶出来
   盖住下面那排按钮，按钮就点不到了） */
.fx-preview .word-card { max-height: 100%; }
.fx-preview .answer-bar { padding: 0; pointer-events: none; flex: 0 0 auto; }
/* 控制按钮永远是最高层，任何特效都不允许盖住它们 */
.fx-demo-btns {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  flex: 0 0 auto; position: relative; z-index: 50;
}
.fx-demo-btns .ghost-btn { padding: 12px 4px; font-size: 13px; }

/* ── 会动的三种（11 弹球 / 12 随机位置闪烁 / 14 跑火车） ──
   位置是 fx.js 每帧写进行内 style 的，所以这里**别写 transform**（会被覆盖）。
   字号要 !important，理由和上面第 ② 条一样 —— 但 fx.js 里还有一份行内
   `font-size: ... !important`（单词比卡片宽时缩字号用），那个优先级更高 */
.fx-e11 .word-main,
.fx-e12 .word-main,
.fx-e14 .word-main {
  font-size: 30px !important;
  letter-spacing: 0 !important;
  position: relative; z-index: 3;
}
.fx-e11 .word-main, .fx-e14 .word-main {
  text-shadow: 0 0 18px var(--accent-soft), 0 0 4px var(--bg-elev);
}
/* 闪灭和瞬移都是 0.35 秒一次，看着就像「换个地方闪一下」 */
.fx-e12 .word-main { animation: fx-blink .35s infinite; }

/* 13 单词包围卡片边框：每份的坐标都是 JS 算好的，这里只管长相 */
.fx-e13 .fx-layer span {
  position: absolute; font-size: 12px; font-weight: 600;
  letter-spacing: .5px; color: var(--fg-faint); white-space: nowrap;
}
.fx-e13 .word-main { position: relative; z-index: 3; }

/* 15 满屏 emoji：position:fixed 的一层，由 JS 挂在 host 上（见 fx.js 的注释）。
   pointer-events:none 是硬要求 —— 不然整屏的 emoji 会把评分按钮挡死 */
.fx-fly {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  z-index: 45; pointer-events: none; overflow: hidden;
}
.fx-fly i {
  position: absolute; font-style: normal; line-height: 1;
  animation-name: fx-fly; animation-timing-function: linear;
  animation-iteration-count: infinite;
}
/* 一头一尾用透明度收口：动画循环时它会瞬移回起点，
   在「看不见」的那一瞬间瞬移就没人察觉得到 */
@keyframes fx-fly {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  12%  { opacity: .95; }
  88%  { opacity: .95; }
  100% { transform: translate(var(--dx, 40vw), var(--dy, -40vh)) rotate(320deg); opacity: 0; }
}

/* 16 随机图片当背景：图片地址由 JS 塞进 --fx-photo，遮罩留在样式表里 ——
   浅色主题下正面的字是深色的，遮罩也得跟着换成浅的，否则字看不见 */
.fx-e16 .card-front {
  background-image: linear-gradient(rgba(15, 17, 21, .55), rgba(15, 17, 21, .55)), var(--fx-photo, none);
  background-size: cover; background-position: center;
}
html[data-theme="light"] .fx-e16 .card-front {
  background-image: linear-gradient(rgba(245, 246, 248, .68), rgba(245, 246, 248, .68)), var(--fx-photo, none);
}
.fx-e16 .word-main { text-shadow: 0 1px 12px rgba(0, 0, 0, .55); }

/* ── 关了 JavaScript 时的静态说明 ─────────────────────
 * 这一块只写在 index.html 的 <noscript> 里，平时看不见。
 * 应用是 JS 渲染的，没有它整页在搜索引擎眼里是空的 ——
 * 爬虫读的是原始 HTML，不会跑我们的脚本。 */
.noscript-lead { max-width: 620px; margin: 0 auto; padding: 56px 22px; line-height: 1.75; }
.noscript-lead h1 { font-size: 26px; margin: 0 0 16px; }
.noscript-lead p { color: var(--fg-dim); margin: 0 0 14px; }
.noscript-lead a { color: var(--accent); }

