/* ------------------------------------------------------------------ 基础 */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef0f4;
  --text: #1b1f24;
  --text-dim: #6b7280;
  --line: #e2e5ea;
  --accent: #2f6feb;
  --accent-soft: #dbe6ff;
  --warn: #b4520f;
  --danger: #c0392b;
  /*
   * 对错底色必须两套都定义。
   * 之前这里只有使用处的 fallback 浅色，夜间模式下浅底配浅字直接看不清 ——
   * 讲解的判定区就是这么瞎的。以后加颜色先定义变量，不在用处写死。
   */
  --ok: #1e7e34;
  --ok-soft: #e6f4ea;
  --danger-soft: #fdecea;
  --pick: #ffd76e;
  --pick-text: #4a3200;
  --radius: 12px;
  --tap: 44px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b;
    --surface: #1c2026;
    --surface-2: #262b32;
    --text: #e6e8eb;
    --text-dim: #9aa3ad;
    --line: #2e343c;
    --accent: #5b8cf5;
    --accent-soft: #26375c;
    --warn: #e0a06a;
    --danger: #e2685c;
    --ok: #8fd19a;
    --ok-soft: #1c3524;
    --danger-soft: #3d2426;
    --pick: #b98a12;
    --pick-text: #14171b;
  }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* 必须放在所有布局规则之前并加 !important。
   浏览器给 [hidden] 的 display:none 来自 UA 样式表，优先级低于作者样式；
   .gate / .app / .sheet / .segmented 都声明了 display:flex，
   不压住的话它们加了 hidden 也照样显示 —— 弹层会盖满全屏，整个页面点不动。 */
[hidden] {
  display: none !important;
}

/* 双击点词开朗读时，浏览器自带的双击缩放会把页面放大缩小 —— 整站禁掉。
   pinch 手势和 A−/A+ 调字号不受影响（manipulation 只去双击缩放）。 */
html, body {
  touch-action: manipulation;
}

/* 旧的复制到 Gemini/NotebookLM 再手工回填的流程已退出日常界面。
   保留 DOM 和事件绑定以兼容已有数据与测试，不让删除旧节点影响站内学习。 */
.legacy-workflow { display: none !important; }
/* 回归测试仍覆盖历史工作流；仅测试页显式开启它，不影响正式页面。 */
html.legacy-test .legacy-workflow:not([hidden]) { display: revert !important; }
html.legacy-test .panel.legacy-workflow:not([hidden]),
html.legacy-test .sheet.legacy-workflow:not([hidden]) { display: block !important; }
.family-instance .activity-only { display: none !important; }
/* 记录页（按天看圈词成果）单独开关：孩子那台没翻译记录也要有它 */
.no-records .records-only { display: none !important; }
.no-records .tabbar { grid-template-columns: repeat(4, 1fr); }
.playlist { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.playlist__item { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line); }
.playlist__item span { flex: 1 1 160px; overflow-wrap: anywhere; }
.child-instance #listen-panel,
.child-instance #ask-mark-yellow,
.child-instance #ask-clear-heard { display: none !important; }


html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  overscroll-behavior-y: none;
}

/* ------------------------------------------------------------------ 通用控件 */

.input {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 16px; /* 小于 16px 时 iOS 会自动放大页面 */
  font-family: inherit;
}

.input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.textarea {
  min-height: 40vh;
  resize: vertical;
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
}

.btn--danger {
  color: var(--danger);
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn--icon {
  min-height: 36px;
  min-width: 36px;
  padding: 0 8px;
  font-size: 16px;
}

/* ------------------------------------------------------------------ 登录 */

.gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 24px;
}

.gate__card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(380px, 100%);
  padding: 24px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.gate__title {
  margin: 0;
  font-size: 22px;
}

.gate__hint {
  margin: 0 0 8px;
  color: var(--text-dim);
  font-size: 14px;
}

.gate__error {
  margin: 0;
  color: var(--danger);
  font-size: 14px;
}

/* ------------------------------------------------------------------ 布局 */

.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 14px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.segmented {
  display: flex;
  padding: 2px;
  border-radius: 999px;
  background: var(--surface-2);
}

.segmented__btn {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.segmented__btn.is-active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
}

.main {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.view {
  display: none;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.view.is-active {
  display: block;
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0 6px;
  border: 0;
  background: none;
  color: var(--text-dim);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.tab.is-active {
  color: var(--accent);
}

.tab__icon {
  font-size: 19px;
  line-height: 1;
}

.tab__badge {
  position: absolute;
  top: 4px;
  left: 50%;
  margin-left: 6px;
  min-width: 17px;
  padding: 1px 4px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}

/* ------------------------------------------------------------------ 工具栏 */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.toolbar__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar__row--wrap {
  flex-wrap: wrap;
}

.toolbar__row--wrap .btn {
  flex: 1 1 auto;
  min-height: 38px;
  font-size: 14px;
}

.datestrip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.datestrip::-webkit-scrollbar {
  display: none;
}

.datechip {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}

.datechip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.datechip b {
  display: block;
  font-size: 14px;
}

.datechip span {
  font-size: 11px;
  opacity: 0.75;
}

.datepick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.datepick input {
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  min-width: 116px;
}

/* 提示词弹层里的日期选择占满一行，手指好点 */
.datepick--block {
  display: flex;
  width: 100%;
}

.datepick--block input {
  flex: 1;
}

.chips {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.chip.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.input--search {
  min-height: 38px;
  font-size: 15px;
}

/* ------------------------------------------------------------------ 列表与卡片 */

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px calc(24px + env(safe-area-inset-bottom));
}

.card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--text-dim);
  font-size: 12px;
}

.card__head .spacer {
  flex: 1;
}

.card__actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.empty {
  padding: 48px 24px;
  color: var(--text-dim);
  text-align: center;
  font-size: 14px;
  line-height: 1.8;
}

.hint {
  margin: 0;
  padding: 8px 14px 0;
  color: var(--text-dim);
  font-size: 12px;
}

/* 设置页里的音频列表，条目多时紧凑一点 */
.list--compact {
  gap: 8px;
  padding: 8px 0 0;
}

/* ------------------------------------------------------------------ 音频与转录 */

/* 长文页顶部三个入口：粘贴 / 上传录音 / 播客 */
.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 14px 0;
}

.actions-grid > :first-child {
  grid-column: 1 / -1;
}

/* label 当按钮用时要自己居中，否则文字会贴左 */
.actions-grid label.btn {
  justify-content: center;
  cursor: pointer;
}

.joblist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 0;
}

.job {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
}

.job--failed {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}

.job__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.job__title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job__stage {
  flex-shrink: 0;
  color: var(--text-dim);
  font-size: 12px;
}

.job__error {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
}

.job__actions {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

/* 转录时长完全无法预估（免费层要排队重试），
   所以用循环动画表示「在动」，而不是假装知道百分比 */
.job__bar {
  overflow: hidden;
  height: 3px;
  margin-top: 8px;
  border-radius: 2px;
  background: var(--line);
}

.job__bar > i {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  animation: job-slide 1.4s ease-in-out infinite;
}

@keyframes job-slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(250%);
  }
}

.player {
  padding: 8px 14px 0;
}

.player audio {
  width: 100%;
  height: 32px;
}

.player__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.player__note {
  flex: 1;
  margin: 0;
  /* 顶栏要尽量矮，这条提示看一眼就够了，占不到一行就省略掉 */
  overflow: hidden;
  color: var(--text-dim);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/*
 * 播放速度。
 * 原生 <audio controls> 的倍速藏在右键/长按菜单里，手机上基本够不到，
 * 而精读时「听不清就放慢」是高频动作，必须做成一眼可见的按钮。
 */
.rates {
  display: inline-flex;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.rates__btn {
  min-height: 26px;
  padding: 0 7px;
  border: 0;
  background: none;
  color: var(--text-dim);
  font: inherit;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.rates__btn + .rates__btn {
  border-left: 1px solid var(--line);
}

.rates__btn.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.btn--tiny {
  min-height: 26px;
  padding: 0 8px;
  font-size: 11px;
}

/* 提示这条音频还缺时间戳，可以重转 */
.warn {
  color: var(--danger);
}

/* 「自动跟随」这个开关只在有词级时间戳时才有意义 */
#sync-follow {
  display: none;
}

.player--sync #sync-follow {
  display: inline-flex;
}

#sync-follow.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

/* 正在读到的词。用底色而不是改字色，避免和「已选中」的高亮打架 —— 
   一个词完全可能既被圈进素材篮、又正好播放到。 */
.tk.is-playing {
  border-radius: 3px;
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.tk.is-sel.is-playing {
  box-shadow: 0 0 0 2px var(--accent);
}

/* ------------------------------------------------------------------ 分词点选 */

.tokens {
  font-size: 17px;
  line-height: 2.05;
  white-space: pre-wrap;
  word-break: break-word;
  /* 长按选词时不要弹出系统的复制菜单 */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  /* 允许纵向滚动，同时关掉双击缩放 */
  touch-action: pan-y;
}

.tk {
  border-radius: 5px;
  padding: 3px 0;
  cursor: pointer;
}

.tk.is-sel {
  background: var(--pick);
  color: var(--pick-text);
}

/*
 * 听选模式的红色标记。
 * 和黄色选中是两个维度（黄=要背的词，红=耳朵点过/存过听力库），
 * 同时出现时红色盖住黄色 —— 最后一次操作说了算，重画会如实恢复。
 */
.tk.is-heard,
.tk.is-sel.is-heard {
  background: var(--danger-soft);
  color: var(--danger);
}

.tk.is-runstart {
  padding-left: 3px;
  margin-left: -3px;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}

.tk.is-runend {
  padding-right: 3px;
  margin-right: -3px;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}

.tk.is-sel:not(.is-runstart) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.tk.is-sel:not(.is-runend) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.tk.is-speaking {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ------------------------------------------------------------------ 长文阅读 */

/*
 * 常驻顶栏：返回条 + 播放器 + 讲解入口一整块吸顶。
 *
 * 注意：.reader 不能设 height:100%。
 * sticky 只能在父元素的盒子内生效，如果 .reader 被限制成一屏高，
 * 顶栏滚一屏就跑掉了。让它跟着内容自然撑开。
 * （真正的滚动容器是 .view，见上面 overflow-y:auto 那条。）
 */
.reader__top {
  position: sticky;
  top: 0;
  z-index: 5;
  padding-bottom: 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.reader__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
}

/* 没有音频、也没选中东西时，顶栏只剩返回条，底部那点内边距是多余的 */
.reader__top.is-bare {
  padding-bottom: 0;
}

/*
 * 圈中东西之后才出现的操作条，浮在屏幕底部。
 *
 * 位置是试出来的，前两版都不行：
 *   放进顶栏 → 一出现就把整篇文章往下挤一行，
 *              手指还按在刚点的词上，视线却被整体挪走了
 *   浮在顶栏底下 → 盖住正文最上面那行，刚圈的那句话反而点不到
 * 底部两样问题都没有，而且是拇指最好够到的地方。
 *
 * sticky 而不是 fixed：它是正文的最后一个元素，滚到真正的底部时
 * 就落回文流里，不会一直悬在「记一次跟读」那几个按钮上面。
 */
.reader__ask {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 14px -8px rgb(0 0 0 / 45%);
}

.btn--ask {
  flex: 1;
  justify-content: flex-start;
  overflow: hidden;
  border-color: var(--accent);
  color: var(--accent);
  white-space: nowrap;
}

.btn--ask b {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
}

.reader__title {
  flex: 1;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader__body {
  padding: 16px 16px calc(40px + env(safe-area-inset-bottom));
}

.doclist {
  padding: 14px 14px 0;
}

/* ------------------------------------------------------------------ 素材条目 */

.item__term {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.item__context {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
}

.item__context mark {
  background: var(--pick);
  color: var(--pick-text);
  border-radius: 3px;
  padding: 0 2px;
}

.item__meta {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 11px;
}

.badge {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 11px;
}

.badge--new {
  background: var(--accent-soft);
  color: var(--accent);
}

/* 读完就在正文下面发走，不用退回列表 */
.reader__actions {
  padding: 4px 14px calc(24px + env(safe-area-inset-bottom));
}

/* 只学一篇时，把这一篇的标题亮出来，免得分不清早上那集和下午那集 */
.prompt__title {
  flex: 1 0 100%;
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

/* --------------------------------------------- Gemini 回写的体检报告 */

.incoming__verdict {
  margin: 8px 0 4px;
  font-size: 14px;
  font-weight: 600;
}

.incoming__verdict--ok {
  color: var(--accent);
}

.incoming__verdict--bad {
  color: var(--danger, #d9453d);
}

.incoming__preview {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.incoming__preview pre {
  max-height: 240px;
  margin: 6px 0 0;
  padding: 8px;
  overflow: auto;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* --------------------------------------------- 记录页里的「圈过的标注」 */

.marked__title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

/* 每一句是一个可点的块，点了回原文对应位置 */
.marked {
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 3px solid var(--accent-soft);
  border-radius: 0 8px 8px 0;
  background: var(--surface-2);
  cursor: pointer;
}

.marked:active {
  background: var(--accent-soft);
}

.marked .item__context {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.marked__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
}

/* 圈出来的词：用和圈选同一个黄，一眼对得上原文里的高亮 */
.tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--pick);
  color: var(--pick-text);
  font-size: 12px;
  font-weight: 500;
}

.tag--done {
  background: var(--surface);
  color: var(--text-dim);
  text-decoration: line-through;
}

/* 从记录页跳过来时闪一下，否则滚到中间也不知道是哪句 */
.tk.is-flash {
  animation: flash 1.6s ease-out;
}

@keyframes flash {
  0%, 60% { background: var(--accent); color: #fff; }
  100% { background: transparent; }
}

/* ------------------------------------------------------------------ 面板 */

.panel {
  margin: 12px 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel:last-child {
  margin-bottom: calc(24px + env(safe-area-inset-bottom));
}

.panel__title {
  margin: 0 0 10px;
  font-size: 15px;
}

/* 「怎么用」里区隔圈词和听力两组说明 */
.panel__sub {
  margin: 14px 0 6px;
  color: var(--text-dim);
  font-size: 13px;
}

.panel__note {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.7;
}

.panel__list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.9;
}

.panel__list b {
  color: var(--text);
}

code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

.field {
  display: block;
  margin-bottom: 12px;
}

.field__label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-dim);
  font-size: 13px;
}

.field input[type="range"] {
  width: 100%;
  height: var(--tap);
}

/* ------------------------------------------------------------------ 弹层 */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
}

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 45%);
}

.sheet__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-height: 92dvh;
  /*
   * 必须能滚：这个卡片是 flex 列，max-height 会把它夹住，
   * 但内部没有滚动容器的话，超出的部分直接被裁掉 ——
   * 手机上表现为「怎么拉都拉不到底部的归档按钮」。
   */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: var(--bg);
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet__head h2 {
  margin: 0;
  font-size: 16px;
}

/* 剧集可能有十几条，弹层高度有限，让列表自己滚 */
#episode-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#episode-list .card {
  cursor: pointer;
}

/* Podcast titles and feed names must wrap instead of disappearing off the phone edge. */
#podcast-sheet .sheet__card { min-height: 0; }
#podcast-sheet .sheet__head h2 { min-width: 0; overflow-wrap: anywhere; }
#podcast-sheet .sheet__head .btn { flex-shrink: 0; }
#podcast-sheet #feed-picker { flex: 0 0 auto; flex-wrap: wrap; overflow-x: visible; min-width: 0; padding-bottom: 4px; }
#podcast-sheet #feed-picker .chip { max-width: 100%; height: auto; white-space: normal; overflow-wrap: anywhere; text-align: left; }
#podcast-sheet #episode-list { min-height: 0; }
#podcast-sheet #episode-list .card { min-width: 0; }
#podcast-sheet #episode-list .item__term { white-space: normal; overflow-wrap: anywhere; }

/* 粘贴链接行：输入框占满，按钮不换行；解析结果复用 .card 样式 */
#podcast-sheet .paste-row { display: flex; gap: 8px; }
#podcast-sheet .paste-row .input { flex: 1 1 auto; min-width: 0; }
#podcast-sheet .paste-row .btn { flex-shrink: 0; }
#podcast-link-result { overflow-wrap: anywhere; }
#podcast-link-result .card { cursor: pointer; }
#podcast-link-result .spotify-shows a { color: inherit; }

/* 档案要写好几行，比粘贴长文的框矮一些但够用 */
.textarea--tall {
  min-height: 160px;
  font-size: 13px;
  line-height: 1.6;
}

/* 提示词预览：只给一眼确认用，不是拿来读的，所以压小并限高 */
.prompt-preview {
  max-height: 34vh;
  margin: 0;
  padding: 10px 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-overflow-scrolling: touch;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(78px + env(safe-area-inset-bottom));
  z-index: 90;
  max-width: 84vw;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgb(0 0 0 / 82%);
  color: #fff;
  font-size: 14px;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

/* ---------------------------------------------------------------- 复习队列看板 */
/*
 * 「建议今天做几包」和「积压还剩多少」是这套间隔重复里唯一诚实的两个数字：
 * 积压只在「每天完成的复习槽位 > 每天新增的知识点」时才会降。
 * 藏起来的话，很容易以为每天点一下就万事大吉。
 */
.panel--flat {
  margin: 12px 0;
}

.srs__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.srs__today {
  font-size: 15px;
}

/* 一个圆点一包，扫一眼就知道今天还差几包 */
.srs__dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.srs__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}

.srs__dot--done {
  background: var(--accent);
}

.srs__dot--extra {
  border-color: var(--text-dim);
  background: var(--text-dim);
}

.srs__bars {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}

.srs__row {
  display: grid;
  grid-template-columns: 62px 1fr 42px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.srs__track {
  height: 8px;
  border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
}

.srs__fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
}

/* 还没过一遍的用警示色 —— 那就是「历史积压」本身 */
.srs__fill--fresh {
  background: var(--warn);
}

/* 到了 60 天档基本算稳住了 */
.srs__fill--mature {
  background: #3aa76d;
}

.srs__num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* 回顾包弹层里步骤多，预览和输入框都得压矮，否则一屏放不下 */
#article-sheet .prompt-preview {
  max-height: 22vh;
}

#article-sheet .textarea {
  min-height: 110px;
}

/*
 * 归档按钮吸底。
 * 弹层里有四步说明，滚到底才能提交太别扭 —— 而且贴完反馈之后
 * 输入法弹起来会把按钮顶出视口。
 */
.sheet__sticky {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: 0 -14px;
  padding: 10px 14px calc(4px + env(safe-area-inset-bottom));
  background: var(--bg);
  box-shadow: 0 -8px 12px -8px rgb(0 0 0 / 25%);
}
/* ------------------------------------------------------------------ 即时讲解 */

/* 讲解通常就几行，撑满一屏反而显得空 */
.sheet__card--short {
  min-height: 42dvh;
}

.explain {
  padding: 4px 0 8px;
  font-size: 15px;
  line-height: 1.85;
}

.explain__line {
  margin: 0 0 2px;
}

/* 小标题（意思 / 为什么这么用 / 换个场景）*/
.explain__key {
  margin: 10px 0 2px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.explain__line:first-child,
.explain__key:first-child {
  margin-top: 0;
}

/* 例句：英文单独拎出来，方便一眼扫到并朗读 */
.explain__eg {
  margin: 2px 0;
  padding-left: 10px;
  border-left: 2px solid var(--line);
  color: var(--text-dim);
  font-size: 14px;
}

.explain__eg b {
  color: var(--text);
  font-weight: 600;
}

.explain--wait {
  color: var(--text-dim);
}

/* 划选中的临时高亮：比已入篮的选中色浅，手指抬起前能看出选到哪儿 */
.tk.is-dragging {
  border-radius: 3px;
  background: var(--accent-soft);
}
/* ------------------------------------------------------------------ 学习验证（整页，不用弹窗） */
.study { padding: 14px 14px calc(40px + env(safe-area-inset-bottom)); }
.study__head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.study__dots { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.study__dot { width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--text-dim); font-size: 11px; cursor: pointer; }
.study__dot.is-now { border-color: var(--accent); color: var(--accent); }
.study__dot.is-ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.study__dot.is-bad { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.study__card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--surface); }
.study__front { margin: 0 0 4px; font-size: 13px; color: var(--text-dim); }
.study__prompt { margin: 0 0 8px; font-size: 16px; line-height: 1.7; }
.study__sentence { margin: 0 0 8px; font-size: 17px; line-height: 1.8; }
.study__hint { margin: 0 0 8px; font-size: 13px; color: var(--text-dim); }
.study__options { display: grid; gap: 8px; margin-bottom: 10px; }
.study__opt { display: block; min-height: 40px; padding: 10px 14px; text-align: left; line-height: 1.65; }
.study__opt.is-picked { border-color: var(--accent); color: var(--accent); }
.study__verdict { margin: 10px 0; padding: 10px 12px; border-radius: var(--radius); font-size: 14px; line-height: 1.7; }
.study__verdict.is-ok { background: var(--ok-soft); }
.study__verdict.is-bad { background: var(--danger-soft); }
.study__score { font-size: 20px; font-weight: 700; margin: 12px 0 4px; }
.study__empty .toolbar__row { margin-top: 10px; }
/* 错题讲解：跟在判定下面，用顶栏区分判定和讲解 */
.study__exp { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.study__exp--wait { color: var(--text-dim); font-size: 13px; cursor: pointer; }
/* 整句选择的差异词：只管听哪个版本对，不用找茬 */
.study__diff {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--danger);
  text-underline-offset: 3px;
}
/* ------------------------------------------------------------------ 图书阅读器（原页图像 + 透明文字层） */
.book__nav { display: flex; align-items: center; gap: 8px; padding: 6px 12px 0; }
/* PDF chrome overlays the viewport, so revealing controls never rescales the page. */
.app.pdf-focus > .topbar,
.app.pdf-focus > .tabbar { display: none; }
.app.pdf-focus .main { min-height: 0; }
.app.pdf-focus #view-texts { overflow: hidden; }
.app.pdf-focus #book-reader {
  display: flex; flex-direction: column; position: relative; height: 100%; min-height: 0;
}
.app.pdf-focus #book-top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 8;
  padding: env(safe-area-inset-top) 48px 8px 0;
  max-height: 75%; overflow-y: auto;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  box-shadow: 0 4px 14px rgb(0 0 0 / 18%);
}
.app.pdf-focus:not(.pdf-controls) #book-top { display: none; }
.app.pdf-focus.pdf-controls > .tabbar {
  display: grid; position: absolute; bottom: 0; left: 0; right: 0; z-index: 8;
}
.app.pdf-focus #book-reader .book__stage {
  flex: 1; min-height: 0; padding: calc(8px + env(safe-area-inset-top)) calc(36px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(36px + env(safe-area-inset-left));
}
.app.pdf-focus #book-reader:not(.is-picture) .book__stage {
  display: flex; flex-direction: column; align-items: center;
}
.app.pdf-focus #book-reader:not(.is-picture) .book__sheet { flex: none; margin: auto; }
.app.pdf-focus #book-reader.is-picture .book__stage {
  grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
}
.app.pdf-focus #book-reader .book__strip {
  position: absolute; bottom: calc(64px + env(safe-area-inset-bottom));
  left: calc(36px + env(safe-area-inset-left)); right: calc(36px + env(safe-area-inset-right));
  width: auto; height: auto; max-height: 35%; z-index: 8;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}
.app.pdf-focus:not(.pdf-controls) #book-strip,
.app.pdf-focus:not(.pdf-controls) #book-note { display: none; }
.app.pdf-focus #book-reader .book__stage > #book-note {
  position: absolute; bottom: 70px; left: 36px; right: 36px; z-index: 8;
  padding: 8px; background: var(--surface);
}
.app.pdf-focus #book-reader .reader__ask {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 9;
}
.app.pdf-focus.pdf-controls #book-reader .reader__ask { bottom: calc(60px + env(safe-area-inset-bottom)); }
.book__menu, .book__edge, .book__position { position: absolute; z-index: 7; }
.book__menu {
  right: calc(4px + env(safe-area-inset-right)); top: calc(4px + env(safe-area-inset-top));
  z-index: 10; width: 44px; background: var(--surface); opacity: 0.8;
}
.book__edge {
  top: 50%; transform: translateY(-50%); width: 32px; min-width: 32px;
  min-height: 64px; padding: 0; font-size: 32px; background: var(--surface); opacity: 0.7;
  /* 手指点按走 pointer 事件：关掉双击缩放，点了立刻有反应 */
  touch-action: manipulation;
}
.book__edge--left { left: env(safe-area-inset-left); }
.book__edge--right { right: env(safe-area-inset-right); }
.book__edge:disabled { opacity: 0.2; }
.book__position {
  bottom: calc(2px + env(safe-area-inset-bottom)); right: calc(4px + env(safe-area-inset-right));
  font-size: 11px; color: var(--text-dim); pointer-events: none;
}
.book__nav input[type="range"] { flex: 1; }
.book__page { margin: 2px 12px 0; font-size: 12px; }
.book__tools { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 2px 12px 0; }
.book__reading { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 12px; }
.book__reading #book-read-follow.is-active,
.book__reading #doc-read-follow.is-active { border-color: var(--accent); color: var(--accent); }
.book__layer .tk.is-reading, .book__strip .tk.is-reading, .flow .tk.is-reading, #doc-body .tk.is-reading {
  border-radius: 3px;
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.book__layer .tk.is-reading { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.book__zoom { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); }
.book__zoom .btn { min-width: 36px; }
/* 右上 ⋯ 菜单：OCR 开关和删除收在这里，两种阅读模式通用 */
.book__actions {
  position: fixed; top: calc(env(safe-area-inset-top) + 56px); right: 8px; z-index: 90;
  display: flex; flex-direction: column; gap: 4px; padding: 8px;
  background: var(--surface); border-radius: 12px; box-shadow: 0 8px 28px rgb(0 0 0 / 25%);
  min-width: 230px; max-width: min(86vw, 320px);
}
.book__actions[hidden] { display: none; }
.book__actions .btn { justify-content: flex-start; text-align: left; white-space: normal; }
/* 电子书图片识别出的文字：跟在图后面，能圈能读，和正文一视同仁 */
.flow__ocr { color: var(--text-dim); font-size: 0.92em; }
.flow__ocr-tag {
  display: inline-block; margin-right: 6px; padding: 0 6px;
  border: 1px solid var(--accent); border-radius: 8px;
  color: var(--accent); font-size: 0.8em;
}
#book-reader.is-picture .book__zoom { display: none; }
/* 一页就是一张原页图，宽度顶满，纵向滚着看 —— 和 iPhone 图书看 PDF 同手感 */
.book__stage { overflow-y: auto; padding: 8px 12px calc(24px + env(safe-area-inset-bottom)); }
.book__stage { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.book__stage:not(.book__stage--picture) .book__sheet { margin-left: auto; margin-right: auto; }
.book__layer.tokens.is-zoomed { touch-action: pan-x pan-y; }
.book__sheet { position: relative; margin: 0 auto; background: #fff; box-shadow: 0 1px 6px rgb(0 0 0 / 0.25); }
.book__sheet canvas { display: block; width: 100%; height: auto; }
/*
 * 透明文字层：字本身不显示（底下 canvas 已经印着原页），
 * 只借它的位置做点选目标。选中黄底照常画在词上，
 * 所以圈起来的地方看得见，和长文页一个观感。
 */
.book__layer { position: absolute; inset: 0; overflow: hidden; }
.book__layer.tokens { line-height: 1; white-space: pre; }
/*
 * iOS 会自动放大窄屏上的小字（text inflation），透明层的字一旦被
 * 放大就和原页对不上了 —— pdf.js 的文字层同样要关掉它才能用。
 */
.book__layer, .book__layer .bline, .book__layer .tk, .book__layer .sp {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}
.book__line, .bline { position: absolute; white-space: pre; transform-origin: 0 0; }
.book__layer .tk,
.book__layer .sp { color: transparent; }
.book__layer .tk { padding: 0; cursor: pointer; }
/* OCR coordinates are line boxes; the invisible word targets sit on the printed page. */
.book__ocrline { position: absolute; pointer-events: none; }
.book__ocrline .tk { position: absolute; top: -5px; bottom: -5px; min-width: 12px; pointer-events: auto; }
.book__ocrline .tk.is-sel { background: color-mix(in srgb, var(--pick) 55%, transparent); }
/* 透明字上的黄底：实色会把原页的字全盖住，所以调成半透明，
   原页的字透出来 —— 和长文页黄底深字一个观感 */
.book__layer .tk.is-sel {
  background: color-mix(in srgb, var(--pick) 55%, transparent);
  color: transparent;
  /*
   * 背景默认只盖行盒，降部（y/p/g）露在黄底外面看着像没对齐。
   * 纵向补 padding 再用 margin 顶回去：只撑大黄底，不挤版面、
   * 不影响点选（和长文页 .tk 本来就有的 3px 上下 padding 一个效果）。
   */
  padding: 0.05em 0 0.18em;
  margin: -0.05em 0 -0.18em;
}
.book__layer .tk.is-runstart { padding-left: 0; margin-left: 0; }
.book__layer .tk.is-runend { padding-right: 0; margin-right: 0; }
/* ------------------------------------------------------------------ 扫描版绘本（OCR 文字条） */
/* 扫描页没有文字层：纵向滚动归浏览器，横向滑动一律不翻页（翻页只认箭头） */
.book__sheet.is-scan { touch-action: pan-y; }
.book__sheet[hidden], .book__strip[hidden], .flow[hidden] { display: none; }
/* 文字条里点哪行，原图上框出那一行 */
.book__ocrbox {
  position: absolute;
  border: 2px solid var(--accent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  pointer-events: none;
}
/*
 * 绘本的字印在插画上，原图上点透明词又小又不准：
 * 识别出来的字在图下方用大字重排，手指点得准，圈词/讲解/双击朗读全照常。
 */
.book__strip {
  margin: 12px auto 0;
  max-width: 640px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 24px;
  line-height: 1.9;
  white-space: normal;
}
/* 绘本阅读区填满屏幕：大图和大字各有自己的空间，文字多时只滚文字。 */
#book-reader.is-picture {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
#book-reader.is-picture > .reader__top { flex: none; }
#book-reader.is-picture .book__stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 2fr) minmax(170px, 1fr);
  gap: 12px;
  padding: 10px 12px;
  overflow: hidden;
}
#book-reader.is-picture .book__sheet { align-self: center; justify-self: center; }
#book-reader.is-picture .book__strip {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 12px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  font-size: clamp(23px, 3.4vw, 32px);
  line-height: 1.65;
}
#book-reader.is-picture .strip__head { position: sticky; top: -12px; z-index: 1; padding: 4px 0; background: var(--surface); }
#book-reader.is-picture .strip__line { padding: 5px 4px; }
#book-reader.is-picture .strip__line:not([hidden]) { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.5; }
.strip__pager { display: flex; align-items: center; gap: 8px; margin: 8px 0 12px; color: var(--text-dim); font-size: 15px; line-height: 1.4; }
.strip__pager .btn { min-width: 44px; }
.strip__more { position: relative; font-size: 13px; }
.strip__more summary { cursor: pointer; padding: 9px 0; }
.strip__more-actions { display: flex; flex-wrap: wrap; gap: 4px; }
#book-reader.is-picture .book__stage > .panel__note { grid-column: 1 / -1; }
@media (min-width: 760px) {
  #book-reader.is-picture .book__stage {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
    grid-template-rows: minmax(0, 1fr);
  }
}
.strip__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-dim);
}
.strip__head .flow__grow { flex: 1; }
.strip__line { margin: 0; padding: 0 4px; border-radius: 8px; white-space: pre-wrap; }
.strip__line.is-reading { background: var(--accent-soft); }
.strip__line--speech { color: var(--accent); }
.strip__line--sfx { font-style: italic; }
.strip__note { margin: 4px 0 0; font-size: 14px; line-height: 1.6; color: var(--text-dim); }

/* ------------------------------------------------------------------ 重排图书（EPUB / MOBI） */
.flow__grow { flex: 1; }
.flow {
  --flow-size: 18px;
  max-width: 720px;
  margin: 0 auto;
  padding: 4px 4px 24px;
  font-size: var(--flow-size);
  line-height: 1.85;
  white-space: normal;
}
.flow__p { margin: 0 0 0.8em; white-space: pre-wrap; }
.flow__h { margin: 1.2em 0 0.5em; font-weight: 700; line-height: 1.4; white-space: pre-wrap; }
.flow__h1 { font-size: 1.45em; }
.flow__h2 { font-size: 1.3em; }
.flow__h3 { font-size: 1.15em; }
.flow__h4, .flow__h5, .flow__h6 { font-size: 1.05em; }
.flow__li { margin: 0 0 0.4em; padding-left: 1.2em; text-indent: -0.9em; white-space: pre-wrap; }
.flow__li::before { content: "• "; }
.flow__quote {
  margin: 0 0 0.8em;
  padding-left: 0.8em;
  border-left: 3px solid var(--line);
  color: var(--text-dim);
  white-space: pre-wrap;
}
.flow__td { margin: 0 0 0.3em; font-size: 0.9em; white-space: pre-wrap; }
/*
 * 代码块：保留缩进、自动折行，不出横向滚动条 ——
 * 横向滚动和横滑划选是同一个手势，会打架。
 */
.flow__pre {
  margin: 0 0 0.9em;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8em;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: visible;
}
.flow__fig { position: relative; margin: 0.6em 0 1em; text-align: center; }
.flow__fig img { display: inline-block; max-width: 100%; height: auto; border-radius: 4px; }
/* 图上浮层识别按钮：不占布局，导航栏不用再为它挤出一行 */
.flow__ocrbtn {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  min-height: 36px; padding: 4px 12px; font-size: 13px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line); border-radius: 18px; color: var(--text);
  cursor: pointer; touch-action: manipulation;
}
.flow__hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.flow__chapnav { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0 16px; }
.flow__chapnav .btn[hidden] { display: none; }
.flow__toc .toc__item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  text-align: left;
}
.flow__toc .toc__item.is-current { color: var(--accent); font-weight: 600; }
