/* ============================================================
   WengaoSheng — "Letterpress Scholar" 设计系统
   暖奶油纸 + 墨黑 + 黏土红，编辑/学术质感
   ============================================================ */

:root {
  /* 纸张与墨 */
  --paper:      #FBF8F1;
  --paper-2:    #F5F0E5;
  --paper-3:    #EFE8D8;
  --ink:        #221F1B;
  --ink-soft:   #6B6459;
  --ink-faint:  #A89F8E;
  --line:       #E3DACA;
  --line-strong:#D4C9B3;

  /* 强调色：黏土红 + 印章金 */
  --clay:       #B14328;
  --clay-deep:  #8F3420;
  --gold:       #B98A36;

  /* 功能色 */
  --ok:         #3F7A4B;
  --err:        #B14328;

  --radius:     14px;
  --radius-sm:  9px;
  --shadow:     0 1px 2px rgba(34,31,27,.04), 0 8px 28px -12px rgba(34,31,27,.18);
  --shadow-lg:  0 2px 6px rgba(34,31,27,.06), 0 22px 60px -22px rgba(34,31,27,.30);

  --display: "Fraunces", "Noto Serif SC", Georgia, serif;
  --sans:    "Hanken Grotesk", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  --serif-cn:"Noto Serif SC", "Fraunces", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  /* 细微纸张纹理：双层径向噪点 + 网格 */
  background-image:
    radial-gradient(circle at 18% 12%, rgba(177,67,40,.04), transparent 38%),
    radial-gradient(circle at 88% 8%, rgba(185,138,54,.05), transparent 40%);
  background-attachment: fixed;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 颗粒噪点叠加层 */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { position: relative; z-index: 1; }

a { color: var(--clay); text-decoration: none; }
a:hover { color: var(--clay-deep); }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: baseline; gap: 11px; }
.brand .mark {
  font-family: var(--display); font-weight: 900; font-size: 23px; letter-spacing: -.02em;
  color: var(--ink);
}
.brand .mark .dot { color: var(--clay); }
.brand .tag {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint);
}
.nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.nav .who { color: var(--ink-soft); }
.nav .who b { color: var(--ink); font-weight: 600; }

/* ---------- 通用按钮 ---------- */
.btn {
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  padding: 12px 26px; transition: transform .12s ease, box-shadow .2s ease, background .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary {
  background: var(--clay); color: #fff;
  box-shadow: 0 1px 0 var(--clay-deep), 0 10px 22px -10px rgba(177,67,40,.6);
}
.btn-primary:hover { background: var(--clay-deep); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background: var(--ink-faint); box-shadow: none; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: var(--paper-2); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- 输入 ---------- */
.field {
  width: 100%; font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 12px 14px; transition: border-color .18s, box-shadow .18s;
}
.field::placeholder { color: var(--ink-faint); }
.field:focus {
  outline: none; border-color: var(--clay);
  box-shadow: 0 0 0 3px rgba(177,67,40,.12);
}

/* ---------- 卡片 ---------- */
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- 级别徽标（与文稿一致） ----------
   vertical-align:middle 锚定 x-height/2，圆形徽标贴在大写字母旁会偏低 ~1.5px，
   用 translateY 上抬一档对齐 cap-height 视觉中心。 */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; font-size: 10px;
  font-weight: 700; color: #fff; margin-left: 3px; vertical-align: middle;
  transform: translateY(-1.5px);
}

/* ============================================================
   首页 HERO
   ============================================================ */
.hero {
  max-width: 940px; margin: 0 auto; padding: clamp(36px, 7vw, 72px) clamp(20px, 5vw, 40px) 28px;
}
.eyebrow {
  font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--clay); font-weight: 600; margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--display); font-weight: 900; font-optical-sizing: auto;
  font-size: clamp(38px, 6.5vw, 64px); line-height: 1.02; letter-spacing: -.025em;
  margin: 0 0 18px;
}
.hero h1 em { font-style: italic; color: var(--clay); }
.hero .lede {
  font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-soft); max-width: 560px; margin: 0;
}
.hero .lede .cn { font-family: var(--serif-cn); }

/* 编辑器面板 */
.composer { max-width: 940px; margin: 0 auto 80px; padding: 0 clamp(20px, 5vw, 40px); }
.composer .panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.composer .panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--paper-2);
}
.composer .panel-head .label {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
}
textarea.manuscript {
  width: 100%; border: none; resize: vertical; min-height: 240px;
  padding: 22px; font-family: "Newsreader", var(--display); font-size: 18px; line-height: 1.7;
  color: var(--ink); background: #fff;
}
textarea.manuscript:focus { outline: none; }
textarea.manuscript::placeholder { color: var(--ink-faint); font-style: italic; }

.levels-bar { padding: 16px 20px; border-top: 1px solid var(--line); }
.levels-bar .hint {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 11px;
}
.levels-bar .hint .lvl-cta {
  /* 游客视角下方"选一个开始"提示：黏土红字 + 微微脉动指示要操作 */
  color: var(--clay); font-weight: 600;
  letter-spacing: .05em; text-transform: none;
  animation: lvl-cta-pulse 2s ease-in-out infinite;
}
@keyframes lvl-cta-pulse {
  0%, 100% { opacity: .75; }
  50%      { opacity: 1; }
}

/* 偏好控制台：紧贴 chips 下方，两个并排的 pill 滑动开关
   设计语：编辑工的"仪表条"——同样气质同样工艺，相关开关并排在
   chip 区下、用一条虚线轻分隔；主体仍是奶油纸版芯，不另起底色 */
.levels-bar .pref-console {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 14px 32px;
}
@media (max-width: 640px) {
  .levels-bar .pref-console { grid-template-columns: 1fr; gap: 14px; }
}
.pref-switch {
  display: inline-flex; align-items: flex-start; gap: 11px;
  cursor: pointer; user-select: none;
  position: relative;
}
.pref-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.pref-track {
  position: relative; width: 36px; height: 20px; flex-shrink: 0;
  background: var(--paper-3); border: 1px solid var(--line-strong);
  border-radius: 99px;
  box-shadow: inset 0 1px 2px rgba(34,31,27,.08);
  transition: background .2s, border-color .2s;
  margin-top: 1px;
}
.pref-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #FBF8F1;
  box-shadow: 0 1px 2px rgba(34,31,27,.32);
  transition: transform .22s cubic-bezier(.4,.2,.2,1);
}
.pref-switch:hover .pref-track { border-color: var(--ink-faint); }
.pref-switch input:checked + .pref-track {
  background: var(--clay); border-color: var(--clay-deep);
  box-shadow: inset 0 1px 2px rgba(143,52,32,.25);
}
.pref-switch input:checked + .pref-track .pref-thumb {
  transform: translateX(16px);
}
.pref-switch input:focus-visible + .pref-track {
  outline: 2px solid var(--clay); outline-offset: 2px;
}
.pref-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pref-label {
  font-family: var(--sans); font-size: 13.5px; font-weight: 600;
  color: var(--ink); letter-spacing: .01em;
  display: inline-flex; align-items: center; gap: 6px;
}
.pref-sub {
  font-family: var(--sans); font-size: 12px;
  color: var(--ink-faint); letter-spacing: .01em;
}
.pref-sub a {
  color: var(--clay); text-decoration: none;
  border-bottom: 1px dotted var(--clay);
  transition: color .15s, border-color .15s;
}
.pref-sub a:hover { color: var(--clay-deep); border-bottom-color: var(--clay-deep); }
/* 词汇量徽标：墨黑底奶油字，印章感小方片 */
.pref-badge {
  display: inline-block;
  font-family: var(--display); font-size: 10.5px; font-weight: 700;
  color: var(--paper); background: var(--ink);
  padding: 1px 6px; border-radius: 3px;
  letter-spacing: .04em; line-height: 1.35;
  vertical-align: 1px;
}
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  position: relative; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px 7px 11px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper);
  font-size: 14px; color: var(--ink-soft); transition: all .15s ease;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-faint); transition: all .15s; }
.chip:hover { border-color: var(--clay); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip.on .dot { background: var(--clay); box-shadow: 0 0 0 3px rgba(177,67,40,.25); }

.composer .panel-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-top: 1px solid var(--line); background: var(--paper-2);
}
.count { font-size: 13px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.err { color: var(--err); font-size: 14px; min-height: 18px; }

/* 来源切换 tab */
.src-tabs { display: inline-flex; gap: 2px; background: var(--paper-3); border-radius: 999px; padding: 3px; }
.src-tab {
  border: none; cursor: pointer; padding: 5px 14px; border-radius: 999px;
  font-family: var(--sans); font-size: 13px; color: var(--ink-soft); background: transparent;
  transition: all .15s ease;
}
.src-tab:hover { color: var(--ink); }
.src-tab.on { background: var(--ink); color: var(--paper); }

/* SRT 控制条 */
.srt-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--paper);
}
.srt-file { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.srt-fname { font-size: 13px; color: var(--ink-faint); }
.srt-type { display: inline-flex; align-items: center; gap: 9px; }
.srt-type-label {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint);
}
.srt-type select {
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 5px 10px; background: var(--paper);
}
.srt-detect { font-size: 13px; color: var(--clay); }

/* 旧首页 .perso-bar 已合并到 .pref-console，模板不再渲染；规则保留作清扫 */
.perso-bar { display: none; }

/* [backlog/031 v3] 顶栏元信息条：单条双区 pill（左角色/行动 + 右数字概览），
   中间用 1px 墨线纵分栏（letterpress 报纸"专栏分隔"）。任一区空则自适应折叠。
   设计语言延续既有 note pill（999px 圆角胶囊、paper-2 底、line 细描边）；
   水平**居中**到主版芯（block + width:max-content + margin:0 auto），与文稿正文
   居中节奏一致；max-width 给视口余量防止超长内容顶到边缘。 */
.meta-strip {
  display: none;
  margin: 8px auto 0;
  width: max-content;
  max-width: calc(100% - clamp(32px, 8vw, 56px));
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px; color: var(--ink-soft);
  overflow: hidden;   /* 让 999px 圆角夹紧两端，divider 不溢出 */
}
.meta-strip.has-content {
  display: flex; align-items: stretch; flex-wrap: wrap;
}
.meta-strip .ms-zone {
  display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 5px 16px; min-width: 0;
}
.meta-strip .ms-zone-vocab { color: var(--ink-soft); }
.meta-strip .ms-divider {
  width: 1px; align-self: stretch;
  background: var(--line-strong);
  margin: 6px 0;   /* 上下内嵌 6px，墨线不顶到圆角端点（letterpress column rule 感） */
  flex: 0 0 auto;
}
.meta-strip .ms-mark { color: var(--clay); font-size: 12px; line-height: 1; }
.meta-strip .ms-text { color: var(--ink-soft); }
.meta-strip .ms-text b { color: var(--ink); font-weight: 600; }
.meta-strip .ms-cta {
  color: var(--clay); text-decoration: none;
  border-bottom: 1px dotted var(--clay);
  margin-left: 2px;
}
.meta-strip .ms-cta:hover { color: var(--clay-deep); border-bottom-color: var(--clay-deep); }
.meta-strip a { color: var(--clay); }
/* [backlog/031 v2] 右区 vocab 子元素已挪进 iframe document_page.html 的
   .vocab-deck，本 strip 只剩角色态。原 .vs-* 规则已删除。 */

/* 窄屏：strip 自然 wrap 成两行；divider 在 wrap 后退化为水平分割线 */
@media (max-width: 720px) {
  .meta-strip { border-radius: var(--radius-sm); }
  .meta-strip .ms-divider {
    width: auto; height: 1px; margin: 0 16px; align-self: auto;
  }
}

/* 结果页统一编辑面板（owner 点下拉「✎ 编辑」打开；合并自原 #edit-bar + #ts-panel）。
   左侧 3px 黏土红「装订边」是这块面板的视觉签名——与 iframe 内句子 hover 时的
   左 2px 黏土红 inset shadow 视觉串联，形成"你正在编辑这条手稿"的隐喻。 */
.edit-panel {
  border-left: 3px solid var(--clay);
}
.edit-panel .edit-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.edit-panel .edit-head-mark {
  color: var(--clay); font-family: var(--display);
  font-weight: 700; font-size: 20px; line-height: 1;
}
.edit-panel .edit-head-name {
  font-family: var(--display); font-size: 18px; font-weight: 600; color: var(--ink);
}
.edit-panel .edit-head-status {
  flex: 1; font-family: var(--sans); font-size: 13px; color: var(--ink-faint);
}
.edit-panel .edit-head-status.saving { color: var(--ink-soft); }
.edit-panel .edit-head-status.saved { color: var(--ink-soft); }
.edit-panel .edit-head-status.saved::before { content: "● "; color: var(--clay); }
.edit-panel .edit-head-status.error { color: var(--clay-deep); }
.edit-panel .edit-head-status.error::before { content: "⚠ "; }
.edit-panel .edit-head-status.dirty {
  color: var(--clay); font-weight: 600;
}
.edit-panel .edit-head-status.dirty::before {
  content: "✎ "; color: var(--clay);
}
.edit-panel .edit-head .btn {
  padding: 8px 18px; font-size: 14px;
}
.edit-panel .edit-hint {
  font-size: 13px; color: var(--ink-soft);
  margin: 0 0 18px; line-height: 1.55;
}

/* ── 词汇量测试 ── */
.vt-wrap { max-width: 760px; margin: 0 auto 90px; padding: 0 clamp(20px,5vw,40px); }
.vt-list { display: flex; flex-direction: column; gap: 14px; }
.vt-progress {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
  font-family: var(--sans); font-size: 14px; color: var(--ink-faint);
}
.vt-progress b { color: var(--clay); font-variant-numeric: tabular-nums; }
.vt-card { animation: tb-in .25s ease; }
.vt-card {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  padding: 18px 20px;
}
.vt-word {
  font-family: var(--display); font-size: 24px; font-weight: 600; color: var(--ink);
  margin-bottom: 13px;
}
.vt-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.vt-opt {
  text-align: left; cursor: pointer; padding: 10px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--paper);
  font-family: var(--serif-cn), var(--sans); font-size: 15px; color: var(--ink-soft);
  transition: all .15s ease;
}
.vt-opt:hover { border-color: var(--clay); color: var(--ink); }
.vt-opt.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.vt-opt-dk {
  grid-column: 1 / -1;
  text-align: center; font-style: italic; color: var(--ink-faint);
  border-style: dashed; background: transparent;
}
.vt-opt-dk:hover { color: var(--clay); border-color: var(--clay); border-style: dashed; }
/* 3 个释义 + 1 个「不认识」的奇数布局：倒数第二项（最后一个释义）也撑满整行，避免空格 */
.vt-opts > .vt-opt:nth-last-child(2) { grid-column: 1 / -1; }
/* 中途估值预览条（≥10 题后亮起，给用户主动结束的判断依据） */
.vt-preview {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin: 14px 0 18px; padding: 12px 16px;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.vt-prev-left { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.vt-prev-eyebrow {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint);
}
.vt-preview b {
  font-family: var(--display); font-size: 26px; font-weight: 700;
  color: var(--clay); font-variant-numeric: tabular-nums;
}
.vt-prev-unit { font-size: 13px; color: var(--ink-soft); }
.vt-prev-stable {
  font-size: 12px; color: var(--gold); margin-left: 8px;
  padding: 2px 8px; border: 1px solid var(--gold); border-radius: 999px;
}
.vt-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
}
.vt-actions { display: flex; gap: 10px; }
.vt-result { text-align: center; padding: 50px 20px; }
.vt-res-eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.vt-res-num { font-family: var(--display); font-size: 72px; font-weight: 700; color: var(--clay); line-height: 1.1; }
.vt-res-num span { font-size: 24px; color: var(--ink-soft); }
.vt-res-sub { font-size: 14px; color: var(--ink-soft); margin-top: 6px; }
.vt-res-note { font-size: 14px; color: var(--ink-soft); margin: 18px 0 24px; }
.vt-res-actions { display: flex; gap: 12px; justify-content: center; }
.vt-manual {
  margin-top: 34px; padding-top: 22px; border-top: 1px dashed var(--line-strong);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 14px; color: var(--ink-soft);
}
.vt-manual input {
  width: 120px; padding: 7px 11px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); font-family: var(--sans); font-size: 14px;
}
.vt-manual-msg { font-size: 13px; color: var(--clay); }
@media (max-width: 560px) { .vt-opts { grid-template-columns: 1fr; } }

/* 价值点 */
.features { max-width: 940px; margin: 0 auto 90px; padding: 0 clamp(20px,5vw,40px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 22px; border-left: 2px solid var(--clay); }
.feature .n { font-family: var(--display); font-size: 14px; color: var(--clay); font-weight: 700; }
.feature h3 { font-family: var(--display); font-size: 19px; margin: 8px 0 6px; font-weight: 600; }
.feature p { color: var(--ink-soft); font-size: 14px; margin: 0; }
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }

/* ============================================================
   认证页（登录 / 注册 / 重置）
   ============================================================ */
.auth-shell {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
}
.auth-aside {
  background: var(--ink); color: var(--paper);
  padding: clamp(40px, 6vw, 72px); display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-aside::after {
  content: "文"; position: absolute; right: -4vw; bottom: -8vw;
  font-family: var(--serif-cn); font-size: 44vh; color: rgba(255,255,255,.04); line-height: 1;
}
.auth-aside .mark { font-family: var(--display); font-weight: 900; font-size: 26px; }
.auth-aside .mark .dot { color: var(--clay); }
.auth-aside .pitch { font-family: var(--display); font-size: clamp(26px, 3vw, 38px); line-height: 1.18; max-width: 13ch; }
.auth-aside .pitch em { font-style: italic; color: #E8A87C; }
.auth-aside .foot { font-size: 13px; color: rgba(251,248,241,.5); position: relative; z-index: 1; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h1 { font-family: var(--display); font-size: 30px; font-weight: 700; margin: 0 0 6px; }
.auth-box .sub { color: var(--ink-soft); margin: 0 0 26px; font-size: 15px; }
.tabs { display: flex; gap: 6px; background: var(--paper-2); padding: 5px; border-radius: 11px; margin-bottom: 20px; }
.tabs button {
  flex: 1; padding: 9px; border: none; background: transparent; cursor: pointer;
  border-radius: 8px; font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--ink-soft);
  transition: all .15s;
}
.tabs button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.auth-box label.flbl { display: block; font-size: 13px; color: var(--ink-soft); margin: 14px 0 5px; font-weight: 600; }
.auth-row { display: flex; justify-content: flex-end; margin-top: 8px; }
.auth-row a { font-size: 13px; color: var(--ink-faint); }
.sep { display: flex; align-items: center; gap: 12px; color: var(--ink-faint); font-size: 13px; margin: 22px 0; }
.sep::before, .sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google {
  width: 100%; justify-content: center; gap: 10px; background: #fff;
  border: 1px solid var(--line-strong); color: var(--ink); padding: 11px;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; transition: background .15s;
}
.btn-google:hover { background: var(--paper-2); }

/* WebView 提示：微信/App 内置浏览器下替换 Google 按钮（活版「页边批注」式信息条）。
   默认 hidden，JS 检测到内置浏览器才显示，普通浏览器行为不变。 */
.webview-note {
  position: relative;
  text-align: left;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--clay);
  border-radius: var(--radius-sm);
  padding: 13px 15px 14px;
}
.webview-note .wn-label {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--display);
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 7px;
}
.webview-note .wn-label::before {
  content: "↗"; font-size: 13px; line-height: 1;
  letter-spacing: 0; transform: translateY(-1px);
}
.webview-note .wn-body {
  margin: 0;
  font-family: var(--sans);
  font-size: 13.5px; line-height: 1.65;
  color: var(--ink-soft);
}
.webview-note .wn-body b { font-weight: 600; color: var(--ink); white-space: nowrap; }
.msg { font-size: 14px; min-height: 18px; margin-top: 12px; }
.msg.ok { color: var(--ok); } .msg.bad { color: var(--err); }
.back-link { display: inline-block; margin-bottom: 22px; font-size: 14px; color: var(--ink-soft); }
@media (max-width: 760px) { .auth-shell { grid-template-columns: 1fr; } .auth-aside { display: none; } }

/* ============================================================
   结果页
   ============================================================ */
.result-body { margin: 0; background: var(--paper); height: 100vh; display: flex; flex-direction: column; }
.result-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px clamp(16px, 4vw, 28px); border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(8px);
}
.result-bar-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.result-brand .mark { font-family: var(--display); font-weight: 900; font-size: 19px; letter-spacing: -.02em; color: var(--ink); }
.result-brand .mark .dot { color: var(--clay); }
.result-byline {
  font-size: 12.5px; color: var(--ink-soft);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--sans);
}
.result-byline .by-tag {
  background: var(--paper-3); padding: 0 7px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-soft);
}
/* R14 §3.7 数据看板：仅作者本人可见的 [听 N 次 · fork M 次] 小字 */
.result-byline .doc-stats {
  background: var(--ink); color: var(--paper);
  padding: 0 8px; border-radius: 4px; font-size: 11px;
  font-family: var(--display); letter-spacing: .04em;
}
/* R14 §3.6 Max 徽标（顶栏 / 主页 / fork-note 等通用） */
.badge-max {
  display: inline-block; font-weight: 700;
  font-family: var(--display); font-size: 10px; letter-spacing: .12em;
  color: var(--paper); background: var(--ink);
  padding: 1px 6px; margin-left: 6px; border-radius: 3px;
  vertical-align: 1px;
}
/* admin 入口（topbar） */
.tm-admin {
  color: var(--clay); text-decoration: none; font-family: var(--display);
  font-size: 12.5px;
}

/* ---- 母稿已删除兜底页（印章风） ---- */
.tombstone-page {
  max-width: 720px; margin: 0 auto;
  padding: 60px clamp(20px, 5vw, 40px) 80px;
  display: flex; justify-content: center;
}
.tombstone-card {
  position: relative;
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 64px 56px 48px;
  /* 顶部黏土红装饰线 */
  background-image: linear-gradient(var(--clay), var(--clay));
  background-size: 100% 2px;
  background-repeat: no-repeat;
  background-position: top;
  box-shadow: 0 1px 3px rgba(34,31,27,.04), 0 18px 50px -22px rgba(34,31,27,.22);
}
/* 撤回印章：黏土红双圈、-8° 倾斜，盖在右上 */
.ts-stamp {
  position: absolute;
  top: 28px; right: 36px;
  pointer-events: none;
  user-select: none;
  transform: rotate(-8deg);
  opacity: .85;
}
.ts-stamp-inner {
  display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 110px; height: 110px;
  border: 3px solid var(--clay);
  border-radius: 50%;
  color: var(--clay);
  font-family: var(--display);
  letter-spacing: .04em;
  /* 内圈细线 */
  box-shadow: inset 0 0 0 1.5px var(--paper), inset 0 0 0 2.5px var(--clay);
  /* 印章纹理：噪点叠加（模拟印泥不均） */
  position: relative;
}
.ts-stamp-inner::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.8' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.7 0 0 0 0 0.26 0 0 0 0 0.16 0 0 0 0.7 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: screen; opacity: .55;
  pointer-events: none;
}
.ts-stamp-cn {
  font-size: 26px; font-weight: 900; line-height: 1;
  margin-bottom: 4px;
  position: relative; z-index: 1;
}
.ts-stamp-en {
  font-size: 11px; font-weight: 700;
  letter-spacing: .18em; line-height: 1;
  position: relative; z-index: 1;
}

.ts-eyebrow {
  font-family: var(--sans);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 14px;
}
.ts-title {
  font-family: var(--serif-cn);
  font-weight: 700; font-size: clamp(24px, 4vw, 32px);
  color: var(--ink-soft);
  margin: 0 0 28px;
  /* 横贯标题的删除线（活版抹去意象） */
  text-decoration: line-through;
  text-decoration-color: var(--clay);
  text-decoration-thickness: 1.5px;
  /* 字距稍紧、有"被收回"的克制感 */
  letter-spacing: -.005em;
  /* 右侧给印章留点空间 */
  padding-right: 80px;
}
/* 路过者视角（无标题快照）：去掉删除线，文案本身就是"已不再可访问" */
.ts-title-anon {
  text-decoration: none;
  font-family: var(--display);
  color: var(--ink);
}
.ts-line {
  font-family: var(--sans);
  font-size: 15.5px; line-height: 1.75;
  color: var(--ink); margin: 0 0 8px;
  max-width: 38em;
}
.ts-meta {
  font-family: var(--sans);
  font-size: 13px; color: var(--ink-faint);
  margin: 6px 0 32px;
}
.ts-actions {
  display: flex; gap: 12px;
  padding-top: 8px; border-top: 1px solid var(--line);
  margin-top: 12px;
}

@media (max-width: 520px) {
  .tombstone-card { padding: 48px 28px 36px; }
  .ts-stamp { top: 16px; right: 16px; transform: rotate(-8deg) scale(.78); }
  .ts-title { padding-right: 0; margin-top: 8px; }
}

/* ---- 通用模态弹层（活版风） ---- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.modal-mask { position: absolute; inset: 0; background: rgba(34,31,27,.42); }
.modal-card {
  position: relative; z-index: 1; min-width: 360px; max-width: 480px;
  background: var(--paper); border: 1px solid var(--ink);
  border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow-lg);
  background-image: linear-gradient(var(--clay), var(--clay));
  background-size: 100% 2px; background-repeat: no-repeat; background-position: top;
}
.modal-head {
  font-family: var(--display); font-weight: 700; font-size: 17px;
  margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px;
}
.modal-sub { font-family: var(--sans); font-size: 12px; color: var(--ink-faint); font-weight: 400; }
.modal-card .field { width: 100%; padding: 10px 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.dl {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--clay); color: #fff; padding: 9px 20px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  border: 0; cursor: pointer; text-decoration: none;
  box-shadow: 0 8px 20px -10px rgba(177,67,40,.6);
}
.dl:hover { background: var(--clay-deep); color: #fff; }
.dl.locked { background: var(--paper-2); color: var(--ink-soft); border: 1px solid var(--line-strong); box-shadow: none; }
.dl.locked:hover { background: var(--paper-3); color: var(--ink); }

/* backlog/021: PDF 异步态 —— pending（墨黑描边，禁用）/ failed（黏土红描边，可点重试） */
.dl-pending {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--ink-soft);
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  border: 1px solid var(--line-strong); cursor: not-allowed;
}
.dl-pending .dots {
  display: inline-block; opacity: .55;
  animation: dl-dots 1.4s ease-in-out infinite;
}
@keyframes dl-dots {
  0%, 100% { opacity: .25; }
  50%      { opacity: 1; }
}
.dl-failed {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--clay);
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
  border: 1px solid var(--clay); cursor: pointer;
}
.dl-failed:hover { background: var(--clay); color: #fff; }

.progress-stage {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 24px; gap: 4px;
}
.progress-stage .glyph { font-family: var(--display); font-size: 52px; font-weight: 900; color: var(--clay); margin-bottom: 10px; }
.progress-stage .stage-txt { font-family: var(--display); font-size: 22px; color: var(--ink); }
.progress-stage .stage-sub { color: var(--ink-faint); font-size: 14px; }
.pwrap { width: min(420px, 80vw); height: 7px; background: var(--paper-3); border-radius: 99px; overflow: hidden; margin: 20px 0 4px; }
.pwrap > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--clay)); transition: width .5s cubic-bezier(.2,.8,.2,1); border-radius: 99px; }
.fail { color: var(--err); }
iframe#doc { flex: 1; width: 100%; border: none; display: none; background: #fff; }

/* backlog/021 B1: 进度页的源文本预览（让用户看到刚提交的英文，不再对着空白干等） */
.src-preview {
  max-width: min(720px, 92vw);
  max-height: 38vh;
  margin: 22px auto 6px;
  padding: 18px 22px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--serif, "Newsreader", Georgia, serif);
  font-size: 15.5px; line-height: 1.65; color: var(--ink-soft);
  text-align: left;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 78%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 78%, transparent 100%);
  box-shadow: 0 1px 2px rgba(34,31,27,.04);
}

/* 笔尖旋转 */
.quill { font-size: 40px; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-8px) rotate(4deg); } }

/* ============================================================
   R19 流式渲染：DOM + 排版与 iframe document_page.html 像素级一致
   ——这样译文/标题/摘要陆续填进来时，切到 iframe 那刻位置不漂移。
   下面所有 .stream-doc 内的选择器都在镜像 iframe 的样式（max-width 940 /
   padding 40px 28px / 字号 / 边距 / 双线 / 两栏词汇 / 2px 墨左线）。
   ============================================================ */
.stream-view {
  flex: 1; overflow-y: auto;
  width: 100%;
}
.stream-doc {
  /* 与 iframe body 完全一致 —— iframe 用默认 content-box（max-width 940 = 内容宽），
     而 result.html 全局 * { box-sizing:border-box }，会让 max-width 含 padding；
     这里强制回到 content-box 与 iframe 对齐，避免内容宽度差 56px 致换行点偏移 */
  box-sizing: content-box;
  font-family: "Noto Serif SC", "Fraunces", Georgia, serif;
  color: var(--ink); background: var(--paper);
  max-width: 940px; margin: 0 auto;
  padding: 40px 28px 64px; line-height: 1.85;
}
@media (max-width: 640px) {
  .stream-doc { padding: 24px 16px; }
}

/* 顶栏下方进度小药丸（替代原进度条） */
.stream-pill {
  position: fixed; top: 68px; right: clamp(16px, 5vw, 40px);
  background: var(--paper-2);
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-family: var(--sans); font-size: 12.5px;
  color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 8px;
  letter-spacing: .3px;
  z-index: 40;
  transition: opacity .5s;
}
.stream-pill .ink-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--clay);
  animation: stream-pulse 1.6s ease-in-out infinite;
}
@keyframes stream-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(177,67,40,.45); transform: scale(1); }
  50%     { box-shadow: 0 0 0 7px rgba(177,67,40,0); transform: scale(.9); }
}
.stream-pill.done { color: var(--ink-soft); }
.stream-pill.done .ink-dot { background: var(--gold); animation: none; box-shadow: none; }
.stream-pill.fail { color: var(--clay); border-color: var(--clay); }
.stream-pill.fail .ink-dot { background: var(--clay); animation: none; box-shadow: none; }

/* ── doc-head：镜像 iframe document_page.html ──────────────── */
.stream-doc .doc-head {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 14px; margin-bottom: 30px;
}
.stream-doc .doc-head .kicker {
  font-family: "Fraunces", serif; font-size: 12px; letter-spacing: .24em;
  text-transform: uppercase; color: var(--clay); font-weight: 600;
}
.stream-doc .doc-head h1 {
  font-family: "Fraunces", "Noto Serif SC", serif; font-weight: 900; font-size: 28px;
  margin: 6px 0 0; letter-spacing: -.01em; line-height: 1.15;
  /* 高度与真值一致，placeholder/真值切换时不撑/不收 */
  min-height: calc(28px * 1.15);
}
.stream-doc .doc-head h1.is-empty {
  font-style: italic; font-weight: 400; color: var(--ink-faint);
  position: relative;
}
.stream-doc .doc-head h1.is-empty::after {
  /* 排字工占位线（黏土红虚线滑过）— 仅在 placeholder 态出现 */
  content: ''; position: absolute;
  bottom: -6px; left: 0; height: 2px; width: 80px;
  background: linear-gradient(90deg, var(--clay) 50%, transparent 50%);
  background-size: 12px 100%;
  animation: stream-marquee 1.4s linear infinite;
}
@keyframes stream-marquee {
  from { background-position: 0 0; }
  to   { background-position: 12px 0; }
}
.stream-doc .doc-head .byline {
  font-family: "Newsreader", "Noto Serif SC", serif; font-size: 13px; font-style: italic;
  color: var(--ink-faint); margin-top: 8px; letter-spacing: .02em;
}

/* ── doc-summary：镜像 iframe（白底 + 金左线 + -16px 负顶 margin 上压 head）── */
.stream-doc .doc-summary {
  margin: -16px 0 28px; padding: 13px 18px; background: #fff;
  border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 6px;
}
.stream-doc .doc-summary .sm-en {
  font-family: "Newsreader", Georgia, serif; font-size: 14.5px;
  color: var(--ink-soft); margin: 0; line-height: 1.7;
  /* 占位 → 真值切换时高度一致 */
  min-height: calc(14.5px * 1.7);
}
.stream-doc .doc-summary .sm-zh {
  font-family: "Noto Serif SC", serif; font-size: 14px;
  color: var(--ink-soft); margin: 7px 0 0; line-height: 1.8;
  min-height: calc(14px * 1.8);
}
.stream-doc .doc-summary .sm-en.is-empty,
.stream-doc .doc-summary .sm-zh.is-empty {
  font-style: italic; color: var(--ink-faint);
}

/* ── h2.section + 重点词汇 两栏：镜像 iframe ─────────────────── */
.stream-doc h2.section {
  font-family: "Fraunces", "Noto Serif SC", serif; font-weight: 700; font-size: 20px;
  margin: 34px 0 16px; display: flex; align-items: baseline; gap: 10px;
}
.stream-doc h2.section .ix { color: var(--clay); font-size: 14px; letter-spacing: .1em; }
.stream-doc h2.section .cnt {
  font-family: "Newsreader", serif; color: var(--ink-faint);
  font-weight: 400; font-size: 14px;
}

.stream-doc .vocab-list {
  columns: 2; column-gap: 34px; padding: 0; margin: 0; list-style: none;
}
.stream-doc .vocab-list li {
  break-inside: avoid; padding: 5px 0; border-bottom: 1px dotted var(--line);
  font-family: "Noto Sans SC", sans-serif; font-size: 13.5px; line-height: 1.55;
}
.stream-doc .vocab-list .w {
  font-family: "Newsreader", serif; font-weight: 600; font-size: 15px; color: var(--ink);
}
.stream-doc .vocab-list .ph { color: var(--ink-faint); font-size: 12px; margin-left: 4px; }
.stream-doc .vocab-list .gl { color: var(--ink-soft); }
.stream-doc .vocab-list .placeholder {
  font-style: italic; color: var(--ink-faint);
  border-bottom: 1px dotted var(--line);
  display: flex; align-items: center; gap: 8px;
}
@media (max-width: 640px) { .stream-doc .vocab-list { columns: 1; } }

/* ── sentence-row + sentence-main：镜像 iframe 2px 墨左线 + 14px padding ── */
.stream-doc .sentence-row {
  display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px;
}
.stream-doc .sentence-main {
  flex: 1; min-width: 0; padding-left: 14px; border-left: 2px solid var(--line);
}
.stream-doc .sentence-main .en {
  font-family: "Newsreader", Georgia, serif; font-size: 16.5px; color: var(--ink);
}
.stream-doc .sentence-main .zh {
  font-family: "Noto Serif SC", serif; color: var(--ink-soft); margin-top: 3px; font-size: 14.5px;
  /* 与真值同样的 line-height/字号，占位 → 译文切换不挤压 */
  min-height: calc(14.5px * 1.85);
}
.stream-doc .sentence-main .zh.is-empty {
  font-style: italic; color: var(--ink-faint);
}
.stream-doc .sentence-main .zh.reveal {
  animation: stream-zh-in .55s cubic-bezier(.2,.6,.2,1) both;
}
@keyframes stream-zh-in {
  0%   { opacity: 0; transform: translateY(2px); filter: blur(1.5px); }
  60%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
  .stream-doc .sentence-row { flex-direction: column; gap: 8px; }
}

/* ── 骨架占位：segment 到达前 5 条「未印上的纸条」———————
   设计意图：让"正文 · 中英对照"标题下方不留死白，模拟铅字尚未压上纸面
   的浅墨痕；segment 一到立刻被真实句子替换。整体动画用呼吸效果，避免抖。 */
.stream-doc .sentence-row.stream-skel { margin-bottom: 18px; }
.stream-doc .sentence-row.stream-skel .en.is-skel,
.stream-doc .sentence-row.stream-skel .zh.is-skel-zh {
  display: block;
  height: 14px; width: 100%;
  background: linear-gradient(90deg,
    rgba(212,201,179,.35) 0%, rgba(212,201,179,.55) 50%, rgba(212,201,179,.35) 100%);
  background-size: 200% 100%;
  border-radius: 2px;
  animation: stream-skel-shimmer 1.8s ease-in-out infinite;
}
.stream-doc .sentence-row.stream-skel .zh.is-skel-zh {
  height: 12px; margin-top: 9px; width: 78%;
  background: linear-gradient(90deg,
    rgba(212,201,179,.28) 0%, rgba(212,201,179,.45) 50%, rgba(212,201,179,.28) 100%);
  background-size: 200% 100%;
}
@keyframes stream-skel-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.stream-doc .sentence-row.stream-skel:nth-child(1) .en.is-skel { animation-delay: 0s; }
.stream-doc .sentence-row.stream-skel:nth-child(2) .en.is-skel { animation-delay: .15s; }
.stream-doc .sentence-row.stream-skel:nth-child(2) .zh.is-skel-zh { animation-delay: .2s; }
.stream-doc .sentence-row.stream-skel:nth-child(3) .en.is-skel { animation-delay: .3s; }
.stream-doc .sentence-row.stream-skel:nth-child(3) .zh.is-skel-zh { animation-delay: .35s; }
.stream-doc .sentence-row.stream-skel:nth-child(4) .en.is-skel { animation-delay: .45s; }
.stream-doc .sentence-row.stream-skel:nth-child(4) .zh.is-skel-zh { animation-delay: .5s; }
.stream-doc .sentence-row.stream-skel:nth-child(5) .en.is-skel { animation-delay: .6s; }
.stream-doc .sentence-row.stream-skel:nth-child(5) .zh.is-skel-zh { animation-delay: .65s; }

/* 第 1 条特殊：en 是空骨架条 + zh 是文字"正在分句..."（信息密度高一点） */
.stream-doc .sentence-row.stream-skel:first-child .en.is-skel {
  height: 16px; opacity: .8;
}

/* ── 通用墨点占位（h1 / sm / vocab-list placeholder 共用） ────── */
.stream-doc .ink-dot {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--clay); opacity: .3;
  animation: stream-dot 1.5s ease-in-out infinite;
  margin-right: 2px; vertical-align: middle;
}
@keyframes stream-dot {
  0%,100% { opacity: .25; }
  50%     { opacity: .9; }
}

/* ============================================================
   历史页
   ============================================================ */
.page { max-width: 820px; margin: 0 auto; padding: clamp(28px,5vw,52px) clamp(20px,5vw,40px) 80px; }
.page h1 { font-family: var(--display); font-size: 34px; font-weight: 700; margin: 6px 0 24px; }
.hist-item {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; margin-bottom: 12px; transition: box-shadow .2s, transform .12s;
}
.hist-item:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.hist-item .title { font-family: var(--display); font-size: 17px; font-weight: 600; }
.hist-item .meta { color: var(--ink-faint); font-size: 13px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hist-item .ops { display: flex; gap: 14px; font-size: 14px; flex-shrink: 0; }
.hist-item .ops .del { color: var(--ink-faint); cursor: pointer; }
.hist-item .ops .del:hover { color: var(--err); }
.empty { text-align: center; color: var(--ink-faint); padding: 70px 0; }
.empty .big { font-family: var(--display); font-size: 22px; color: var(--ink-soft); margin-bottom: 10px; }

/* ============================================================
   TTS 语音文稿
   ============================================================ */
.result-bar-right { display: flex; align-items: center; gap: 12px; }

/* 顶栏右端"编辑印章"：登录用户头像 → 跳作者主页 /u/{username}。
   设计语：活版印刷里墨工的私印——小圆 28px、奶油纸三色底、细墨线圈、
   hover 时托起一抹纸阴影；与其它动作按钮之间用 1px 自然分隔。 */
.me-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  padding: 0; border-radius: 50%;
  text-decoration: none; color: inherit;
  transition: transform .18s cubic-bezier(.2,.8,.2,1),
              box-shadow .18s ease;
  margin-left: 4px;
  position: relative;
}
.me-link::before {
  /* 与左侧动作按钮的一条墨水分隔（仅在前面有兄弟时显示） */
  content: ''; position: absolute; left: -10px; top: 50%;
  width: 1px; height: 18px; background: var(--line);
  transform: translateY(-50%);
}
.me-link:first-child::before { display: none; }
.me-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -4px rgba(34,31,27,.18);
}
.me-link:active { transform: translateY(0); }
.me-av {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  box-sizing: border-box;
  background: var(--paper-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 13px; font-weight: 700; letter-spacing: 0;
  color: var(--ink);
  overflow: hidden;
}
img.me-av { object-fit: cover; padding: 0; }
.me-av-fb {
  /* 印章感：细微的暖色偏底 + 黏土红描边的微小幅度 */
  background:
    radial-gradient(circle at 30% 30%, var(--paper-2), var(--paper-3));
  border-color: var(--clay);
  color: var(--clay-deep);
}
#actions { display: flex; align-items: center; gap: 12px; }

/* ── 顶栏弹层（升级语音选择 / 更多操作）── */
.bar-pop { position: relative; }
.more-btn {
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); color: var(--ink); background: var(--paper);
  cursor: pointer; white-space: nowrap; transition: all .15s;
}
.more-btn:hover { border-color: var(--ink); background: var(--paper-2); }
.more-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
  min-width: 256px; padding: 7px;
  background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 2px; overflow: hidden;
}
/* 顶部黏土红装订边，呼应活版风 */
.more-menu::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--clay);
}
/* 分组小标题（Fraunces 小字） */
.menu-group-label {
  font-family: var(--display); font-size: 10.5px; font-weight: 600;
  color: var(--ink-faint); letter-spacing: .1em; text-transform: uppercase;
  padding: 9px 11px 5px;
}
.more-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  padding: 9px 11px; border: none; background: none; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .12s; text-decoration: none;
}
.more-item:hover { background: var(--paper-2); }
.more-item .mi-ic {
  width: 20px; flex-shrink: 0; text-align: center; font-size: 14px;
  color: var(--ink-soft); transition: color .12s;
}
.more-item:hover .mi-ic { color: var(--clay); }
.more-item .mi-body { flex: 1; min-width: 0; }
.more-item .mi-sub {
  display: block; font-size: 11.5px; color: var(--ink-faint);
  margin-top: 1px; line-height: 1.3;
}
.more-item:disabled,
.more-item.more-item-pending {
  color: var(--ink-faint); cursor: not-allowed;
  background: transparent;
}
.more-item:disabled:hover { background: transparent; }
.more-item:disabled .mi-ic { color: var(--ink-faint); }
.more-item.more-item-warn { color: var(--clay); }
.more-item.more-item-warn .mi-ic { color: var(--clay); }
.more-item.more-item-warn:hover { background: rgba(177,67,40,.07); }
.more-item.more-item-danger { color: var(--clay-deep); }
.more-item.more-item-danger .mi-ic { color: var(--clay-deep); }
.more-item.more-item-danger:hover { background: rgba(143,52,32,.08); }
.more-sep { height: 1px; background: var(--line); margin: 6px 9px; }
.more-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; font-family: var(--sans); font-size: 14px; color: var(--ink);
  cursor: pointer;
}
.more-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }

/* 升级语音的两条选择项（双行：标题 + 说明）；装订边墨黑以区别于黏土红的「更多操作」 */
.tts-choice-menu { min-width: 248px; gap: 3px; }
.tts-choice-menu::before { background: var(--ink); }
.tts-choice {
  display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left;
  padding: 10px 12px; border: none; background: none; border-radius: 7px;
  cursor: pointer; transition: background .12s;
}
.tts-choice:hover { background: var(--paper-2); }
.tts-choice-t { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--ink); }
.tts-choice-d { font-family: var(--sans); font-size: 12px; color: var(--ink-faint); }
.tts-choice:first-child .tts-choice-t::before {
  content: "✦"; color: var(--clay); margin-right: 7px; font-size: 11px;
}
.tts-choice + .tts-choice .tts-choice-t::before {
  content: "↑"; color: var(--gold); margin-right: 7px; font-size: 12px;
}

/* ── 关联视频内嵌（左下角悬浮小窗，外壳渲染、不进 PDF）──
   默认窄宽（220px），不挡正文阅读；用户用右上角拖把拽大可至 min(80vw, 1080)。 */
.video-embed {
  position: fixed; left: 18px; bottom: 18px; z-index: 50;
  width: min(220px, calc(100vw - 36px));
  background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  animation: ve-in .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes ve-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.video-embed-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px 8px 12px; background: var(--paper-2);
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.video-embed.collapsed { border-radius: 999px; }
.video-embed.collapsed .video-embed-head { border-bottom: none; }
.video-embed.collapsed .video-frame { display: none; }
.video-embed-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft);
}
.ve-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--clay);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--clay) 16%, transparent);
}
.video-embed-ops { display: inline-flex; align-items: center; gap: 10px; }
.video-open { font-size: 12px; font-weight: 600; color: var(--clay); white-space: nowrap; }
.video-open:hover { color: var(--clay-deep); }
.video-collapse,
.video-mini-btn {
  font-family: var(--sans); font-size: 12px; line-height: 1; color: var(--ink-faint);
  border: none; background: none; cursor: pointer; padding: 3px 5px; border-radius: 6px;
}
.video-collapse:hover,
.video-mini-btn:hover { color: var(--ink); background: var(--paper-3); }
.video-mini-btn {
  font-family: var(--display); font-size: 14px; font-weight: 700;
  padding: 0 6px 6px; line-height: 1;
}
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 右上角拖拽手柄（backlog/004）：墨黑细线 + 小三角，活版风。
   .video-embed 默认锚定左下，向上向右长大；折叠态不显示。 */
.video-resize {
  position: absolute; top: -1px; right: -1px; width: 18px; height: 18px;
  cursor: nesw-resize; user-select: none; -webkit-user-select: none;
  background: var(--paper-2); border-left: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong); border-top-right-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-family: var(--display); font-size: 11px; line-height: 1;
  transition: color .15s, background .15s;
}
.video-resize::before { content: "◢"; transform: rotate(-90deg); display: inline-block; }
.video-resize:hover { color: var(--clay); background: var(--paper-3); }
.video-embed.collapsed .video-resize { display: none; }

/* 关联视频最小化态（backlog/009）：整窗收成左下角 36×36 圆 icon，点击恢复。
   位置固定左下角（与默认视频锚点同侧，最小化前后视觉连续），不参与 008 拖动；
   尺寸独立于 004 调宽度——恢复后两者都还在。
   活版风：奶油纸底 + 墨黑细描边 + 平台单色线描图标（YouTube / Bilibili），
   不用大色块、不用品牌色。 */
.video-embed.minimized {
  width: 36px !important; height: 36px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink);
  cursor: pointer;
  overflow: visible;
  transition: transform .12s ease, box-shadow .2s ease;
}
.video-embed.minimized:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -8px rgba(34,31,27,.35);
}
.video-embed.minimized .video-embed-head,
.video-embed.minimized .video-frame,
.video-embed.minimized .video-resize { display: none; }
/* 平台 icon：默认隐藏（在非最小化态时），最小化态时显示并居中 */
.video-mini-icon { display: none; }
.video-embed.minimized .video-mini-icon {
  display: flex; align-items: center; justify-content: center;
  position: absolute; inset: 0;
  color: var(--ink);
}
.video-mini-icon svg { width: 18px; height: 18px; }

/* ── 首页「快速编辑」（句子重组）：下拉 + 校验预览 ── */
.foot-actions { display: flex; align-items: center; gap: 12px; }
.more-menu.left { right: auto; left: 0; }
.more-menu.up { top: auto; bottom: calc(100% + 8px); }   /* 在 panel-foot 内向上弹出 */
.rm-cap {
  font-family: var(--sans); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint); padding: 4px 12px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.recombine-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); color: var(--ink); background: var(--paper);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.recombine-btn:hover { border-color: var(--ink); background: var(--paper-3); }
.recombine-btn .recombine-quill { color: var(--clay); font-size: 16px; line-height: 1; }
.recombine-btn .recombine-caret { color: var(--ink-faint); font-size: 11px; }
.recombine-btn.done { border-color: var(--clay); background: color-mix(in srgb, var(--clay) 8%, var(--paper)); }
.recombine-btn.done .recombine-caret::before { content: "✓ "; color: var(--clay); }
.recombine-btn.loading { opacity: .55; pointer-events: none; }

.recombine-zone { margin-top: 14px; }
.recombine-hint { font-size: 13px; color: var(--ink-faint); }
.recombine-hint.loading { color: var(--ink-soft); }
.recombine-hint.ok { color: var(--clay-deep); }
.recombine-hint.err { color: var(--err); }

/* 校验预览：像一份校样，逐句编号 + 衬线英文 */
.recombine-preview {
  margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper-2); overflow: hidden; animation: tb-in .25s ease;
}
.rp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.rp-title { font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.rp-ops { display: inline-flex; align-items: center; gap: 10px; }
.rp-clear { font-family: var(--sans); font-size: 13px; color: var(--ink-faint); border: none; background: none; cursor: pointer; }
.rp-clear:hover { color: var(--ink); text-decoration: underline; }
.rp-list { list-style: none; margin: 0; padding: 6px 0; max-height: 280px; overflow-y: auto; }
.rp-line {
  display: flex; gap: 12px; padding: 7px 16px;
  border-left: 2px solid transparent; transition: border-color .12s, background .12s;
}
.rp-line:hover { background: var(--paper-3); border-left-color: var(--clay); }
.rp-n {
  flex-shrink: 0; min-width: 24px; text-align: right;
  font-family: var(--sans); font-size: 12px; color: var(--ink-faint);
  font-variant-numeric: tabular-nums; padding-top: 2px;
}
.rp-en { font-family: var(--serif-cn), "Newsreader", var(--sans); font-size: 15px; color: var(--ink); line-height: 1.5; }
.rp-confirm {
  font-family: var(--sans); font-size: 13px; font-weight: 600; white-space: nowrap;
  padding: 6px 13px; border-radius: var(--radius-sm); border: none;
  color: #fff; background: var(--clay); cursor: pointer; transition: background .15s;
}
.rp-confirm:hover { background: var(--clay-deep); }

/* ── 引导条（文档就绪后顶栏与文稿之间） ── */
.tts-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 11px clamp(16px, 4vw, 28px);
  font-family: var(--sans); font-size: 14px;
  border-bottom: 1px solid var(--line);
  animation: tb-in .3s ease;
}
@keyframes tb-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* 顶栏语音升级按钮：实心填充，墨黑底色作次操作，与黏土红下载按钮成对 */
.tts-upgrade-btn {
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  padding: 9px 20px; border-radius: var(--radius-sm);
  border: none; color: #fff; background: var(--ink);
  box-shadow: 0 8px 20px -10px rgba(34,31,27,.55);
  cursor: pointer; white-space: nowrap;
  transition: background .15s, box-shadow .15s;
}
.tts-upgrade-btn:hover {
  background: color-mix(in srgb, var(--ink) 82%, var(--clay));
  box-shadow: 0 10px 24px -10px rgba(34,31,27,.6);
}
.tts-upgrade-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* 重新标注入口按钮（结果页） */
.reanno-btn {
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  padding: 8px 16px; margin-right: 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); color: var(--ink); background: var(--paper);
  cursor: pointer; white-space: nowrap; transition: all .15s;
}
.reanno-btn:hover { border-color: var(--ink); background: var(--paper-2); }

/* 重新标注面板 */
.reanno-panel {
  max-width: 1000px; margin: 10px auto; padding: 18px 22px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--paper-2);
}
.reanno-head { font-family: var(--display); font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 14px; }
.reanno-sub { font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--ink-faint); margin-left: 8px; }
.reanno-row { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.reanno-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); padding-top: 8px; }
.reanno-perso { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); margin-bottom: 14px; cursor: pointer; }
.reanno-perso input { accent-color: var(--clay); width: 16px; height: 16px; }
.reanno-actions { display: flex; align-items: center; gap: 12px; }
.reanno-msg { font-size: 13px; color: var(--clay); }

/* 自带音频上传：墨黑描边，作为「系统合成」之外的并列次选 */
.tts-upload-btn {
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  margin-left: 9px; padding: 9px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); color: var(--ink); background: var(--paper);
  cursor: pointer; white-space: nowrap; transition: all .15s;
}
.tts-upload-btn:hover { border-color: var(--ink); background: var(--paper-2); }

/* 自动连播开关：细腻轨道 + 圆点，ON 时黏土红 */
.tts-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
}
.tts-toggle-label {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  color: var(--ink-soft); white-space: nowrap; letter-spacing: .01em;
}
.tts-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.tts-toggle-track {
  position: relative; width: 34px; height: 18px; flex-shrink: 0;
  background: var(--paper-3); border: 1px solid var(--line-strong);
  border-radius: 99px;
  box-shadow: inset 0 1px 2px rgba(34,31,27,.08);
  transition: background .2s, border-color .2s;
}
.tts-toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #FBF8F1; box-shadow: 0 1px 2px rgba(34,31,27,.32);
  transition: transform .2s ease;
}
.tts-toggle:hover .tts-toggle-track { border-color: var(--ink-faint); }
.tts-toggle input:checked + .tts-toggle-track {
  background: var(--clay); border-color: var(--clay-deep);
  box-shadow: inset 0 1px 2px rgba(143,52,32,.25);
}
.tts-toggle input:checked + .tts-toggle-track .tts-toggle-thumb {
  transform: translateX(16px);
}
.tts-toggle input:focus-visible + .tts-toggle-track {
  outline: 2px solid var(--clay); outline-offset: 2px;
}

/* 合成进度状态 */
.tts-banner-progress { background: var(--paper); gap: 10px; }
.tts-spin {
  width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--line); border-top-color: var(--clay);
  animation: tts-spin .75s linear infinite;
}
@keyframes tts-spin { to { transform: rotate(360deg); } }
.tb-body { color: var(--ink-soft); font-size: 13.5px; white-space: nowrap; }
.tts-gen-bar {
  flex: 1; max-width: 140px; height: 3px; background: var(--paper-3);
  border-radius: 99px; overflow: hidden;
}
.tts-gen-bar > div {
  height: 100%; background: linear-gradient(90deg, var(--gold), var(--clay));
  border-radius: 99px; transition: width .5s ease;
}
.tb-hint { color: var(--ink-faint); font-size: 12px; }

/* ============================================================
   文稿权限 / 可见性 + fork（R07/R08）
   ============================================================ */
/* 可见性四档：单选墨章式胶囊，开启度递增 */
.vis-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.vis-opt {
  font-family: var(--sans); font-size: 14px; color: var(--ink-soft);
  background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 6px 16px; cursor: pointer; transition: all .15s;
}
.vis-opt:hover { border-color: var(--clay); color: var(--ink); }
.vis-opt.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.vis-opt.on[data-v="public"], .vis-opt.on[data-v="unlisted"] { background: var(--clay); border-color: var(--clay-deep); }

.share-hint { font-size: 12px; color: var(--ink-faint); margin-top: 6px; line-height: 1.5; }
.share-hint-inline { color: var(--ink-faint); font-weight: 400; }
.share-link-row { display: flex; gap: 8px; align-items: center; margin: 4px 0 14px; }
.share-link-row .field { flex: 1; font-size: 13px; color: var(--ink-soft); }
#vis-emails { resize: vertical; font-family: var(--sans); font-size: 13px; }

/* [backlog/031] 旧 .fork-note / .doc-note / .perso-note / .vocab-summary 已并入
   .meta-strip 单条双区 pill；样式见上方 .meta-strip 块。 */

/* 顶栏「重标生词」描边 ghost（未登录引导，弱化于实心 .dl） */
.btn-ghost-clay {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border: 1.5px solid var(--clay); border-radius: var(--radius-sm);
  color: var(--clay); background: transparent;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background .12s, color .12s;
}
.btn-ghost-clay:hover { background: var(--clay); color: var(--paper); }

/* 历史页：可见性 / fork 标识 + 分区 */
.hist-section {
  font-family: var(--display); font-size: 15px; font-weight: 600;
  color: var(--ink-soft); letter-spacing: .02em; margin: 28px 0 12px;
}
.hist-badge {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-strong);
  color: var(--ink-soft); background: var(--paper-2); margin-left: 8px; vertical-align: middle;
}
.hist-badge.public, .hist-badge.unlisted { color: var(--clay); border-color: color-mix(in srgb, var(--clay) 32%, var(--line-strong)); }
.hist-badge.restricted { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 38%, var(--line-strong)); }
.hist-badge.tomb { color: var(--ink-faint); }
.hist-item.tomb { opacity: .58; }
.hist-item.tomb:hover { transform: none; box-shadow: none; }

/* ============================================================
   R12 用户主页 / 关注 / 动态流 / 点赞 / 通知
   ============================================================ */

/* 品牌链接：所有顶栏的「文稿生」可点击回 / */
.brand-link { text-decoration: none; color: inherit; display: inline-flex; align-items: baseline; }
.brand-link:hover .mark { opacity: .85; }

/* 通用辅助 */
.muted { color: var(--ink-soft); font-size: 13px; }
.ok { color: var(--ok); font-size: 13px; }
.err { color: var(--err); font-size: 13px; }

/* ---- 顶栏登录态（backlog/006-T1：极简版） ---- */
.topbar-mine {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 14px;
}
.topbar-mine .tm-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--clay);
}
.topbar-mine .tm-name {
  color: var(--ink); text-decoration: none;
  border-bottom: 1px dotted var(--line-strong);
  font-weight: 600;
}
.topbar-mine .tm-name:hover { color: var(--clay-deep); border-bottom-color: var(--clay); }
.topbar-mine .tm-sep { color: var(--ink-faint); }
.topbar-mine .tm-logout {
  color: var(--ink-faint); text-decoration: none; font-size: 13px;
}
.topbar-mine .tm-logout:hover { color: var(--clay); }

/* ---- 主页 /u/{username} ---- */
.profile-page { max-width: 880px; margin: 0 auto; padding: 32px clamp(20px, 5vw, 40px) 80px; }
.profile-head { display: flex; gap: 28px; align-items: flex-start; margin-bottom: 36px; }
.profile-avatar {
  flex: 0 0 96px; width: 96px; height: 96px; border-radius: 50%;
  overflow: hidden; background: var(--paper-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.profile-avatar-sm { width: 64px; height: 64px; flex-basis: 64px; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: #fff; font-family: var(--display);
  font-weight: 700; font-size: 38px;
}
.profile-meta { flex: 1; min-width: 0; }
.profile-username {
  font-family: var(--display); font-size: 30px; font-weight: 800;
  margin: 0; letter-spacing: -.01em;
}
.profile-nick { color: var(--ink-soft); margin-top: 2px; }
.profile-bio { margin: 12px 0 8px; color: var(--ink); line-height: 1.55; }
.profile-joined { font-size: 13px; color: var(--ink-faint); margin-top: 8px; }
.profile-counts { margin-top: 12px; font-size: 14px; color: var(--ink-soft); }
.profile-counts b { color: var(--ink); font-weight: 700; }
.profile-counts .dot { color: var(--ink-faint); margin: 0 6px; }
.profile-counts .pc-link {
  background: none; border: none; padding: 0;
  color: inherit; font-size: inherit; font-family: inherit; cursor: pointer;
  border-bottom: 1px dotted transparent;
}
.profile-counts .pc-link:hover { border-bottom-color: var(--clay); color: var(--ink); }
.profile-counts .pc-link:hover b { color: var(--clay-deep); }

/* 关注/粉丝 modal（backlog/006-T3） */
.follow-modal-card { width: min(92vw, 520px); max-width: 520px; padding: 18px 20px; }
.follow-modal-seg {
  display: inline-flex; border: 1px solid var(--ink); border-radius: 999px;
  padding: 2px; margin-bottom: 12px; background: var(--paper-2);
}
.fms-tab {
  background: transparent; border: none; padding: 6px 14px;
  font-family: var(--sans); font-size: 13px; color: var(--ink-soft);
  border-radius: 999px; cursor: pointer;
}
.fms-tab b { color: inherit; margin-right: 4px; font-weight: 700; }
.fms-tab.active { background: var(--ink); color: var(--paper); }
.fms-tab.active b { color: var(--paper); }
.follow-modal-q { margin-bottom: 10px; }
.follow-modal-list { max-height: 56vh; overflow-y: auto; min-height: 120px; }

/* ---- 个人主页 tabs（backlog/006-T4，活版页码风） ---- */
.profile-tabs {
  display: flex; gap: 32px; align-items: flex-end;
  border-bottom: 1px solid var(--line);
  margin: 8px 0 22px;
  padding: 0 4px;
}
.profile-tabs .pt-tab {
  background: transparent; border: none; padding: 10px 0 12px; cursor: pointer;
  color: var(--ink-soft); font-family: var(--sans); font-size: 15px;
  display: inline-flex; align-items: baseline; gap: 8px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.profile-tabs .pt-tab:hover { color: var(--ink); }
.profile-tabs .pt-tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.profile-tabs .pt-label { font-weight: 600; }
.profile-tabs .pt-unread {
  color: var(--clay); font-size: 12px; font-weight: 700;
  margin-left: 2px;
}

/* 主页 tab pane */
.profile-tab-pane[hidden] { display: none; }

/* 通知页内嵌列表 */
.notif-page-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; gap: 12px; flex-wrap: wrap;
}
.notif-page-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.np-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); cursor: pointer;
  background: color-mix(in srgb, var(--clay) 4%, var(--paper));
}
.np-item.read { background: var(--paper); }
.np-item:hover { border-color: var(--line-strong); background: var(--paper-2); }
.np-dot { color: var(--clay); font-size: 14px; line-height: 1.4; flex: 0 0 auto; }
.np-dot-read { color: var(--ink-faint); }
.np-av {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: 0 0 32px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; background: var(--ink-faint); font-size: 14px;
}
.np-av-fb { background: var(--clay); }
.np-body { flex: 1; min-width: 0; }
.np-text { font-size: 14px; line-height: 1.5; word-break: break-word; }
.np-time { font-size: 11px; color: var(--ink-faint); margin-top: 4px; }

@media (max-width: 720px) {
  .profile-tabs { gap: 20px; }
}
.profile-actions { margin-top: 16px; display: flex; gap: 10px; }
.btn-following {
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
}
.btn-following:hover {
  background: var(--paper); color: var(--clay-deep); border-color: var(--clay);
}
.btn-following:hover::after { content: ""; }

/* ---- 个人主页 Tools 卡（瘦身版：仅学习入口 + 设置链） ---- */
.profile-tools-card {
  flex: 0 0 224px; align-self: flex-start;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 10px 0 8px;
  /* 顶部 2px 黏土红装饰条（活版双墨配） */
  background-image: linear-gradient(var(--clay), var(--clay));
  background-size: 100% 2px; background-repeat: no-repeat; background-position: top;
}
.profile-tools-card .ptc-label {
  font-family: var(--display); font-weight: 700;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft);
  padding: 4px 16px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  display: flex; align-items: baseline; justify-content: space-between;
}
.profile-tools-card .ptc-label .ptc-flourish { color: var(--clay); font-size: 14px; line-height: 1; }
.profile-tools-card .ptc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; color: var(--ink); text-decoration: none;
  font-family: var(--sans); font-size: 14px;
}
.profile-tools-card .ptc-row:hover { background: var(--paper-2); color: var(--clay-deep); }
.profile-tools-card .ptc-row:hover .ptc-arr { transform: translateX(2px); color: var(--clay); }
.profile-tools-card .ptc-ic {
  width: 18px; text-align: center; color: var(--clay);
  font-family: var(--display); font-weight: 700; font-size: 14px;
}
.profile-tools-card .ptc-text { display: flex; flex-direction: column; min-width: 0; }
.profile-tools-card .ptc-sub {
  display: block; font-size: 11px; color: var(--ink-faint);
  margin-top: 1px; letter-spacing: .01em;
}
.profile-tools-card .ptc-arr {
  margin-left: auto; color: var(--ink-faint);
  transition: transform .15s, color .15s;
  font-family: var(--display); font-weight: 700;
}
.profile-tools-card .ptc-divider {
  height: 0; border-top: 1px dashed var(--line);
  margin: 6px 14px;
}
.profile-tools-card .ptc-settings-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 8px 16px 4px;
  color: var(--ink-soft);
  font-family: var(--display); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase;
}
.profile-tools-card .ptc-settings-row a { color: var(--clay); font-weight: 600; }
.profile-tools-card .ptc-settings-row a:hover { color: var(--clay-deep); }

@media (max-width: 720px) {
  .profile-tools-card {
    flex-basis: auto; width: 100%; padding: 6px 0;
    display: flex; flex-wrap: wrap;
  }
  .profile-tools-card .ptc-label { width: 100%; padding: 6px 14px; margin-bottom: 0; }
  .profile-tools-card .ptc-row { flex: 1 1 auto; justify-content: flex-start; }
  .profile-tools-card .ptc-divider, .profile-tools-card .ptc-settings-row { width: 100%; }
}

/* ---- 设置 Tab：左侧细竖线 + 推到最右作内容/配置区隔 ---- */
.profile-tabs .pt-tab-settings {
  margin-left: auto; padding-left: 24px; position: relative;
}
.profile-tabs .pt-tab-settings::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px;
  width: 1px; background: var(--line-strong);
}
@media (max-width: 720px) {
  .profile-tabs .pt-tab-settings { margin-left: 0; padding-left: 0; }
  .profile-tabs .pt-tab-settings::before { display: none; }
}

/* ---- 设置 Pane（编辑学者风「目录」） ---- */
.settings-pane { padding: 6px 0 40px; }
.settings-pane .settings-eyebrow {
  font-family: var(--display); font-style: italic;
  color: var(--ink-faint); font-size: 14px;
  margin-bottom: 22px;
  display: flex; align-items: baseline; gap: 10px;
}
.settings-pane .settings-eyebrow::before,
.settings-pane .settings-eyebrow::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.settings-pane .settings-eyebrow span { padding: 0 8px; }

.s-section {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 30px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.s-section:first-of-type { border-top: none; padding-top: 4px; }
.s-section-head {
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 80px; align-self: flex-start;
}
.s-section-title {
  font-family: var(--display); font-weight: 700; font-size: 22px;
  color: var(--ink); letter-spacing: -0.005em;
}
.s-section-hint {
  font-family: var(--display); font-style: italic;
  color: var(--ink-faint); font-size: 13px;
}

.s-rows { display: grid; gap: 0; }
.s-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 4px;
  border-bottom: 1px dotted var(--line);
  text-decoration: none; color: inherit;
}
.s-row:last-child { border-bottom: none; }
.s-row:hover { background: linear-gradient(90deg, var(--paper-2), transparent 70%); }
.s-row:hover .s-row-arr { transform: translateX(3px); color: var(--clay); }
.s-row:hover .s-row-title { color: var(--clay-deep); }
.s-row-glyph {
  width: 38px; height: 38px; flex: 0 0 38px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 18px;
  color: var(--clay); border: 1px solid var(--line-strong);
  border-radius: 50%; background: var(--paper);
}
.s-row-body { min-width: 0; }
.s-row-title {
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  color: var(--ink); margin-bottom: 2px;
  transition: color .12s;
}
.s-row-desc {
  font-family: var(--sans); font-size: 13px; color: var(--ink-soft);
}
.s-row-arr {
  font-family: var(--display); font-weight: 700; font-size: 22px;
  color: var(--ink-faint); transition: transform .15s, color .15s;
  width: 22px; text-align: center;
}
@media (max-width: 720px) {
  .s-section { grid-template-columns: 1fr; gap: 14px; padding: 18px 0; }
  .s-section-head { position: static; flex-direction: row; align-items: baseline; gap: 12px; }
}

.profile-empty {
  text-align: center; padding: 60px 20px; color: var(--ink-faint);
  border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--paper-2);
}

/* ---- 文稿卡片列表（主页 + feed 共用） ---- */
.doc-card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.doc-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; transition: border-color .15s, transform .15s;
}
.doc-card:hover { border-color: var(--clay); transform: translateY(-1px); }
.doc-card a { color: inherit; text-decoration: none; display: block; }
.dc-title { font-family: var(--display); font-size: 19px; font-weight: 700; line-height: 1.35; }
.dc-summary {
  font-size: 14px; color: var(--ink-soft); margin: 8px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis;
}
.dc-foot {
  display: flex; align-items: center; gap: 16px; margin-top: 12px;
  font-size: 12px; color: var(--ink-faint); flex-wrap: wrap;
}
.dc-levels { color: var(--ink-soft); font-weight: 600; letter-spacing: .04em; }
.feed-card { padding-top: 14px; }
.dc-author {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  color: var(--ink-soft); font-size: 13px;
}
.dc-author-av {
  width: 24px; height: 24px; border-radius: 50%; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; background: var(--ink-faint); font-size: 12px;
}
.dc-author-fb { background: var(--clay); }
.dc-author-name { color: var(--ink); font-weight: 600; }
.dc-author-nick { color: var(--ink-faint); }

.vis-badge {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong);
  color: var(--ink-soft); background: var(--paper-2); margin-left: 8px;
  vertical-align: middle;
}
.vis-public, .vis-unlisted { color: var(--clay); border-color: color-mix(in srgb, var(--clay) 30%, var(--line-strong)); }
.vis-restricted { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 36%, var(--line-strong)); }

/* ---- /settings/* ---- */
.settings-page { max-width: 720px; margin: 0 auto; padding: 24px clamp(20px,5vw,40px) 80px; }
.settings-tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--line);
  margin: 0 0 28px;
}
.settings-tabs a {
  padding: 10px 16px; color: var(--ink-soft); border-bottom: 2px solid transparent;
  font-weight: 500; font-size: 14px;
}
.settings-tabs a.active { color: var(--ink); border-bottom-color: var(--clay); }
.settings-tabs a:hover { color: var(--ink); }
.settings-page h1 { font-family: var(--display); font-size: 28px; margin: 0 0 6px; }

/* 生词标注偏好页 */
.prefs-section { margin: 28px 0; }
.prefs-row { padding: 16px 0; border-top: 1px solid var(--line); }
.prefs-row:first-child { border-top: 0; }
.prefs-label { font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.prefs-hint { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
.prefs-hint b { color: var(--ink); font-weight: 600; }
.prefs-cta { color: var(--clay); text-decoration: none; margin-left: 6px; border-bottom: 1px dotted var(--clay); }
.prefs-cta:hover { color: var(--clay-deep); border-bottom-color: var(--clay-deep); }

.vocab-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vchip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); cursor: pointer;
  font-size: 13px; color: var(--ink-soft); background: var(--paper);
  user-select: none; transition: background .12s, color .12s, border-color .12s;
}
.vchip input { display: none; }
.vchip:hover { border-color: var(--ink); color: var(--ink); }
.vchip:has(input:checked) {
  background: var(--clay); color: #fff; border-color: var(--clay);
}
.settings-section { margin-top: 28px; }
.settings-section h2 { font-family: var(--display); font-size: 17px; margin: 0 0 10px; font-weight: 700; }
.settings-foot { margin-top: 32px; display: flex; gap: 14px; align-items: center; }
.avatar-row { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.form-row { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }

/* [backlog/037] 主页二维码（Max 创作者引流） ─ 设置页样式 */
.promo-qr-section h2 .badge-max-inline {
  display: inline-block; font-family: var(--display);
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  color: var(--paper); background: var(--ink);
  padding: 1px 6px; margin-left: 8px; border-radius: 3px;
  vertical-align: 2px;
}
.promo-qr-row {
  display: flex; gap: 18px; align-items: flex-start;
  margin-bottom: 10px; flex-wrap: wrap;
}
.promo-qr-preview {
  display: inline-flex; align-items: center; justify-content: center;
  width: 120px; height: 120px; flex: 0 0 120px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  background: var(--paper-2); overflow: hidden;
}
.promo-qr-preview img { width: 100%; height: 100%; object-fit: contain; }
.promo-qr-empty { color: var(--ink-faint); font-size: 12px; font-family: var(--display); }
.promo-qr-controls {
  flex: 1; min-width: 240px;
  display: flex; flex-direction: column; gap: 10px;
}
.promo-qr-fields { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.promo-qr-label-row { display: flex; flex-direction: column; gap: 4px; }
.promo-qr-label-row .field { width: 100%; }
.promo-qr-toggle-row {
  display: flex; gap: 8px; align-items: center;
  font-size: 13.5px; color: var(--ink-soft);
}
.promo-qr-locked {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; background: var(--paper-2);
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.promo-qr-locked .locked-headline {
  font-family: var(--display); font-size: 15px; font-weight: 600;
}
.promo-qr-locked .btn { margin-top: 4px; }

.form-row .field { flex: 1; }
.settings-section textarea.field { width: 100%; resize: vertical; }

.user-list { min-height: 100px; }
.user-list-ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ul-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper);
}
.ul-av {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; background: var(--clay); font-size: 16px;
}
.ul-meta { flex: 1; display: grid; gap: 2px; color: inherit; text-decoration: none; min-width: 0; }
.ul-name { font-weight: 600; }
.ul-nick { color: var(--ink-soft); font-size: 13px; }
.ul-bio { color: var(--ink-faint); font-size: 12px; }

.notif-pref { list-style: none; margin: 24px 0; padding: 0; }
.notif-pref li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.np-label { font-size: 15px; }
.tg-switch {
  position: relative; display: inline-block; width: 42px; height: 24px;
  cursor: pointer;
}
.tg-switch input { opacity: 0; width: 0; height: 0; }
.tg-switch span {
  position: absolute; inset: 0; background: var(--line-strong); border-radius: 999px;
  transition: background .15s;
}
.tg-switch span::before {
  content: ""; position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; background: var(--paper); border-radius: 50%;
  transition: transform .15s;
}
.tg-switch input:checked + span { background: var(--clay); }
.tg-switch input:checked + span::before { transform: translateX(18px); }

.byline-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--clay); }
.byline-link:hover { color: var(--clay); }

/* ---- 主页筛选条 ---- */
.profile-filters {
  margin: 8px 0 22px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--paper-2) 60%, var(--paper));
  display: flex; flex-direction: column; gap: 10px;
}
.pf-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pf-label {
  font-family: var(--display); font-size: 12px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint);
  flex: 0 0 50px;
}
.pf-search {
  flex: 1; padding: 10px 14px; font-size: 14px;
  background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.pf-search:focus { border-color: var(--clay); outline: none; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.pf-chip {
  font-family: var(--sans); font-size: 13px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--paper); color: var(--ink-soft);
  border: 1px solid var(--line-strong); cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.pf-chip:hover { color: var(--ink); border-color: var(--clay); }
.pf-chip.on { background: var(--clay); color: #fff; border-color: var(--clay); }
.pf-tags .pf-chip { font-size: 12.5px; padding: 4px 10px; }

/* ---- 卡片新元素：tag、⋯ 菜单、删除、fork 样式 ---- */
.doc-card { position: relative; }
.dc-more {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  background: transparent; border: none; cursor: pointer;
  color: var(--ink-faint); font-size: 18px; line-height: 1;
  padding: 4px 8px; border-radius: 6px;
  opacity: 0; transition: opacity .15s, background .15s;
}
.doc-card:hover .dc-more { opacity: 1; }
.dc-more:hover { background: var(--paper-2); color: var(--ink); }
.dc-more-menu {
  position: absolute; top: 36px; right: 10px; z-index: 5;
  background: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 6px; min-width: 160px;
}
.dc-more-menu a {
  display: block; padding: 8px 12px; color: var(--ink);
  font-size: 13px; border-radius: 6px;
}
.dc-more-menu a:hover { background: var(--paper-2); color: var(--clay); }
.dc-body { display: block; color: inherit; text-decoration: none; }
.dc-tag {
  display: inline-block; font-size: 11.5px; color: var(--ink-soft);
  background: var(--paper-2); padding: 1px 8px; border-radius: 999px;
  border: 1px solid var(--line);
}
.dc-tag + .dc-tag { margin-left: 4px; }
.dc-fork-from { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.dc-fork-from .dc-from { color: var(--clay); text-decoration: none; border-bottom: 1px dotted var(--clay); }
.dc-fork-from .dc-from:hover { color: var(--clay-deep); }
.dc-meta { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.vis-fork { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 36%, var(--line-strong)); }
.vis-private { color: var(--ink-faint); }

.card-loader { display: flex; justify-content: center; gap: 6px; padding: 24px 0; }
.card-loader .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint);
  animation: cl-bounce 1s infinite ease-in-out;
}
.card-loader .dot:nth-child(2) { animation-delay: .15s; }
.card-loader .dot:nth-child(3) { animation-delay: .30s; }
@keyframes cl-bounce {
  0%,80%,100% { transform: scale(.4); opacity: .4; }
  40%        { transform: scale(1);  opacity: 1; }
}

