/* ==========================================================================
   词镜 WordLens · Trianon 皮肤层
   在 style.css 之后加载，只做「外观重绘」：换色、换字、把卡片变成信笺、
   补上左侧吊牌栏、满幅拼贴装饰与分层视差。不改任何结构与 JS 契约。
   ========================================================================== */

/* ---------------------------------------------------------------- 字体 */
@font-face {
  font-family: "Pinyon";
  src: url("/static/assets/fonts/pinyon.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant";
  src: url("/static/assets/fonts/corm.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni";
  src: url("/static/assets/fonts/bodoni.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Elite";
  src: url("/static/assets/fonts/elite.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "PlexMono";
  src: url("/static/assets/fonts/mono.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* ---------------------------------------------------------------- 变量 */
:root {
  --paper: #dfe4ee;
  --paper-deep: #d2d8e8;
  --card: #fbf9f4;
  --card-warm: #f8f5ee;
  --ink: #1e2748;
  --ink-soft: #4a5a86;
  --muted: #7c93ba;
  --line: #c6cee4;
  --line-soft: #dce2f1;
  --accent: #9c6478;
  --accent-soft: #f3e4e8;
  --green: #2e3a63;
  --green-soft: #e3e9f3;
  --gold: #a8874a;
  --danger: #a44b52;
  --l1: #8796b4;
  --l2: #2e3a63;
  --l3: #9c6478;
  --l4: #6b5887;

  /* 模切双描边（全站母题） */
  --frame: #8796b4;
  --ring: #f8fafd;

  --serif: "Cormorant", "Noto Serif SC", "Songti SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "PlexMono", "Cascadia Code", Consolas, monospace;
  --script: "Pinyon", "KaiTi", "STKaiti", "Kaiti SC", "Segoe Script", cursive;
  --display: "Bodoni", "Cormorant", "Noto Serif SC", "SimSun", Georgia, serif;

  --shadow: 0 1px 2px rgba(35, 47, 78, .06), 0 18px 40px -30px rgba(35, 47, 78, .55);
  --radius: 16px;

  --sheet-edge:
    inset 0 0 0 4px var(--ring),
    0 14px 30px -20px rgba(60, 72, 110, .38);
  --sheet-edge-hover:
    inset 0 0 0 4px var(--ring),
    0 18px 36px -16px rgba(60, 72, 110, .32);

  --e-out: cubic-bezier(.22, 1, .36, 1);
  --e-soft: cubic-bezier(.4, 0, .2, 1);
  /* Trianon 的弹性曲线：带过冲，hover 才有“回弹”的手感 */
  --spring: cubic-bezier(.22, 1.3, .36, 1);
  --spring-soft: cubic-bezier(.24, 1.28, .4, 1);
}

/* ---------------------------------------------------------------- 背景 */
html { background: #dfe4ee; }

body {
  background: transparent;
  color: var(--ink);
  padding-left: 0;
  font-family: var(--sans);
}

/* 独立固定背景层，替代 background-attachment: fixed，保留 GPU 合成滚动 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(72% 52% at 12% -2%, rgba(255, 255, 255, .72), transparent 62%),
    radial-gradient(52% 46% at 88% 102%, rgba(232, 201, 208, .26), transparent 66%),
    linear-gradient(168deg, #b9bdd8 0%, #dfe4ee 55%, #eff1ec 100%);
  transform: translateZ(0);
}

/* 纸纹：软光叠加，不是压暗 */
.grain {
  opacity: .28;
  background-image: url("/static/assets/paper/grain.png");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
  z-index: -1;
  contain: strict;
}

/* 暗角 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 92% at 50% 45%, transparent 58%, rgba(40, 52, 95, .13) 100%);
}

::selection { background: #e8d3da; color: var(--ink); }

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(18px, 3vw, 40px) 12px;
  background: linear-gradient(180deg, rgba(246, 248, 252, .82), rgba(238, 241, 248, .55));
  border-bottom: 1px solid rgba(46, 58, 99, .16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset;
}

.brand { gap: 12px; }

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(160deg, #3d4a78, #2b3557);
  color: #f8f3e6;
  font-size: 22px;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3px rgba(46, 58, 99, .34),
    0 8px 16px -10px rgba(30, 39, 72, .6);
}

.brand-text b { font-size: 20px; letter-spacing: .1em; }
.brand-text i { font-family: var(--mono); font-size: 9px; letter-spacing: .28em; color: var(--muted); }

/* 中间那叠「档案头」 */
.topbar-file { text-align: center; line-height: 1.1; }
.topbar-kicker {
  margin: 0 0 3px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .34em;
  color: #8a93b1;
}
.topbar-date {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink);
}
.topbar-date .wd {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--accent);
  vertical-align: 3px;
  margin-left: 4px;
}
.topbar-index {
  margin: 2px 0 0;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .26em;
  color: #98a0bb;
}

.top-actions { justify-self: end; gap: 4px; }

.link-btn {
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12.5px;
}
.link-btn:hover { background: rgba(255, 255, 255, .8); color: var(--ink); box-shadow: 0 0 0 1px rgba(46, 58, 99, .16); }

.nav-badge {
  background: var(--accent);
  box-shadow: 0 0 0 1.5px #fff;
}

/* ------------------------------------------------------------ 吊牌栏 */
.rail {
  position: fixed;
  left: 4px;
  top: 0;
  bottom: 0;
  z-index: 45;
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 74px 0 14px;
  pointer-events: none;
}

.rail-cord {
  position: absolute;
  left: 50%;
  top: 6px;
  bottom: 26px;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(180deg,
      rgba(191, 200, 224, 0) 0%,
      #bfc8e0 5%,
      #dce2f1 36%,
      #c6cee4 62%,
      #bfc8e0 92%,
      rgba(191, 200, 224, .85) 100%);
  box-shadow: 0 0 6px rgba(220, 226, 241, .95), 0 0 .5px rgba(96, 110, 150, .4);
  z-index: 0;
}

.rail-group {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: auto;
  overflow: visible;
  padding: 2px 0;
}

.rail-orn {
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1;
  color: #cdd5ea;
  text-shadow: 0 0 5px rgba(255, 255, 255, .95), 0 0 9px rgba(191, 200, 224, .9);
  padding: 2px 0;
  flex: none;
}

.rail-it {
  position: relative;
  width: 54px;
  height: 67px;
  flex: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  animation: tag-drop .72s var(--e-out) both;
}

/* 吊牌依次落下（按 button 序号错峰） */
.rail-it:nth-of-type(2) { animation-delay: .05s; }
.rail-it:nth-of-type(3) { animation-delay: .10s; }
.rail-it:nth-of-type(4) { animation-delay: .15s; }
.rail-it:nth-of-type(5) { animation-delay: .21s; }
.rail-it:nth-of-type(6) { animation-delay: .26s; }
.rail-it:nth-of-type(7) { animation-delay: .31s; }
.rail-it:nth-of-type(8) { animation-delay: .37s; }
.rail-it:nth-of-type(9) { animation-delay: .42s; }
.rail-it:nth-of-type(10) { animation-delay: .47s; }
.rail-it:nth-of-type(11) { animation-delay: .53s; }

@keyframes tag-drop {
  0% { opacity: 0; transform: translateY(-26px) rotate(-4deg); }
  62% { opacity: 1; transform: translateY(2px) rotate(1.2deg); }
  82% { transform: translateY(-1px) rotate(-.5deg); }
  100% { opacity: 1; transform: none; }
}

.rail-it img {
  width: 46px;
  height: 65px;
  object-fit: contain;
  transform-origin: 50% 8%;
  transition: transform .5s var(--e-out), filter .45s var(--e-soft);
  filter: drop-shadow(0 3px 3.5px rgba(30, 39, 72, .18)) drop-shadow(0 .5px .5px rgba(30, 39, 72, .16));
}

.rail-it:hover img {
  transform: rotate(-3deg) translateY(-1px);
  filter: drop-shadow(0 5px 6px rgba(30, 39, 72, .24)) drop-shadow(0 .5px .5px rgba(30, 39, 72, .2));
}

.rail-it.on::after {
  content: "";
  position: absolute;
  inset: 8px -2px 2px;
  border-radius: 50%;
  background: radial-gradient(closest-side,
      rgba(255, 252, 245, .8),
      rgba(224, 230, 244, .28) 52%,
      rgba(224, 230, 244, 0) 76%);
  filter: blur(3px);
  z-index: -1;
}

.rail-it.on img {
  transform: rotate(-1.5deg);
  filter:
    drop-shadow(0 0 5px rgba(255, 251, 240, .98))
    drop-shadow(0 0 11px rgba(220, 226, 241, .92))
    drop-shadow(0 5px 5px rgba(30, 39, 72, .22));
}

/* 悬停说明：奶白小标签 */
.rail-tip {
  position: absolute;
  left: 58px;
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  white-space: nowrap;
  padding: 7px 13px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid rgba(46, 58, 99, .42);
  box-shadow:
    0 0 0 2.5px #ffffff,
    0 0 0 3.5px rgba(46, 58, 99, .24),
    0 10px 22px -14px rgba(30, 39, 72, .65);
  font-size: 11.5px;
  letter-spacing: .02em;
  color: var(--ink-soft);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--e-soft), transform .3s var(--e-out);
  z-index: 60;
}
.rail-it:hover .rail-tip,
.rail-it:focus-visible .rail-tip { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ------------------------------------------------------------ 装饰层 */
/* 满幅拼贴：远景建筑 / 中景陈设 / 近景贴纸，各自按 data-z 反向视差 */
/* 用 absolute 锚在文档首屏：滚动后随纸页一起走开，不会一直压着内容 */
.ambient {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  contain: layout style;
}

.amb {
  position: absolute;
  will-change: transform;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) rotate(var(--rot, 0deg));
  filter: drop-shadow(0 12px 22px rgba(40, 48, 84, .14));
  user-select: none;
}

/* —— 远景：建筑与云阶，压成纸上暗纹 —— */
.a-temple {
  left: -64px;
  top: -9%;
  width: 392px;
  opacity: .24;
  --rot: .4deg;
  filter: none;
}
.a-column {
  left: -18px;
  top: 16%;
  width: 244px;
  opacity: .34;
  --rot: -1.2deg;
  filter: none;
}
.a-building {
  right: -52px;
  top: 1%;
  width: 360px;
  opacity: .2;
  --rot: .6deg;
  filter: none;
}
.a-gallery {
  right: -100px;
  bottom: -9%;
  width: 620px;
  opacity: .16;
  --rot: 0deg;
  filter: none;
}
.a-stairs {
  left: 3%;
  top: 0%;
  width: 300px;
  opacity: .22;
  --rot: .5deg;
  filter: none;
}

/* —— 中景：梯子、雕像、鸽子、瓷盘 —— */
.a-ladder {
  right: 1.2%;
  top: 6%;
  width: 86px;
  opacity: .68;
  --rot: 1.6deg;
}
.a-angel {
  right: 1.2%;
  bottom: 17%;
  width: 152px;
  opacity: .92;
  --rot: -1.2deg;
}
.a-dove {
  left: 6.4%;
  top: 15.5%;
  width: 112px;
  opacity: .8;
  --rot: -7deg;
}
.a-plate {
  left: 6.6%;
  bottom: 6%;
  width: 126px;
  opacity: .66;
  --rot: 2deg;
}
.a-specimen {
  left: 8.2%;
  top: 24%;
  width: 114px;
  opacity: .56;
  --rot: -1.6deg;
}
.a-teapot {
  left: 7.8%;
  top: 63%;
  width: 100px;
  opacity: .58;
  --rot: -3deg;
}

/* —— 近景：火漆、山茶、钥匙、笔尖，最活的一层 —— */
.a-seal {
  left: 8.6%;
  top: 41%;
  width: 72px;
  opacity: .94;
  --rot: -5deg;
}
.a-sealblue {
  right: 2.2%;
  top: 24%;
  width: 68px;
  opacity: .92;
  --rot: 4deg;
}
.a-camellia {
  left: 7.8%;
  bottom: 29%;
  width: 88px;
  opacity: .86;
  --rot: 7deg;
}
.a-key {
  right: 6.2%;
  top: 41%;
  width: 62px;
  opacity: .88;
  --rot: -9deg;
}
.a-nib {
  right: 6.6%;
  top: 14%;
  width: 82px;
  opacity: .9;
  --rot: 14deg;
}

/* —— 便条：右下角随手贴上去的一页字 —— */
.amb-note {
  position: absolute;
  right: .3%;
  top: 33%;
  width: 166px;
  margin: 0;
  padding: 15px 15px 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, #fdfbf5, #f4f0e6);
  border: 1px solid rgba(135, 150, 180, .5);
  box-shadow:
    0 14px 24px -18px rgba(40, 52, 95, .55),
    inset 0 1px 0 #fff;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) rotate(2.2deg);
  will-change: transform;
  font-family: var(--serif);
  color: #3d4a72;
}
.amb-note p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: .04em;
}
.amb-note em {
  display: block;
  font-family: var(--script);
  font-style: normal;
  font-size: 11.5px;
  line-height: 1.4;
  color: #8d93ac;
}

/* ---------------------------------------------------------------- 主体 */
/* 主列收窄到 1040：两侧各让出 ~150px 给拼贴，才有 Trianon 那种「纸在景里」的余地 */
main {
  width: min(1040px, calc(100% - clamp(32px, 5vw, 64px)));
  padding: 40px 0 64px;
}

.footer {
  width: min(1040px, calc(100% - clamp(32px, 5vw, 64px)));
  border-top: 1px solid rgba(46, 58, 99, .18);
  color: var(--muted);
}

/* 信笺：模切双描边（1.6px 银蓝框 + 4px 内白环） */
.sheet {
  background: var(--card);
  border: 1.6px solid var(--frame);
  box-shadow: var(--sheet-edge);
}
.sheet:hover { box-shadow: var(--sheet-edge-hover); }

/* 主要纸卡统一用模切边，不依赖 JS 盖 .sheet */
.paste-panel,
.gaokao-panel,
.panel,
.study-card,
.reader-panel,
.lexicon-panel,
.curve-panel,
.study-queue,
.dropzone {
  border: 1.6px solid var(--frame);
  box-shadow: var(--sheet-edge);
}
.dropzone { border-style: dashed; }

/* ------------------------------------------------------------ 首页信笺 */
.hero {
  position: relative;
  max-width: 820px;
  margin: 0 auto 30px;
  padding: 46px clamp(28px, 5vw, 60px) 38px;
  background:
    linear-gradient(90deg, transparent 25px, rgba(214, 166, 178, .5) 25px, rgba(214, 166, 178, .5) 26px, transparent 26px),
    radial-gradient(120% 70% at 85% 0, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 60%),
    radial-gradient(90% 60% at 10% 100%, rgba(214, 222, 236, .45), rgba(214, 222, 236, 0) 70%),
    linear-gradient(180deg, #fcfaf5 0, #f8f5ee 60%, #f3f2ee 100%);
  border: 1px solid rgba(135, 150, 180, .5);
  border-radius: 8px;
  box-shadow:
    0 16px 26px -18px rgba(40, 52, 95, .42),
    0 2px 4px rgba(40, 52, 95, .1),
    inset 0 1px 0 #fff;
  text-align: center;
}

/* 双面胶带 */
.hero::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 132px;
  height: 26px;
  margin-left: -66px;
  background:
    linear-gradient(180deg, rgba(248, 246, 252, .96), rgba(236, 233, 246, .82));
  border-left: 1px dashed rgba(46, 58, 99, .2);
  border-right: 1px dashed rgba(46, 58, 99, .2);
  box-shadow: 0 2px 6px -3px rgba(30, 39, 72, .35);
  transform: rotate(-.6deg);
}

.hero::after {
  content: "merci";
  position: absolute;
  right: 22px;
  bottom: 12px;
  font-family: var(--script);
  font-size: 15px;
  color: rgba(46, 58, 99, .34);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .3em;
  color: var(--accent);
}
.eyebrow::before { content: "— "; }
.eyebrow::after { content: " —"; }

/* 首页那行法文手写（Pinyon 是子集字体，只用无重音符） */
.hero .eyebrow::before {
  content: "Bonjour";
  display: block;
  margin-bottom: 16px;
  font-family: var(--script);
  font-size: 46px;
  line-height: 1.1;
  letter-spacing: normal;
  word-spacing: normal;
  text-transform: none;
  color: #8a7aa6;
}
.hero .eyebrow::after { content: ""; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
}
.hero h1 em {
  font-family: var(--script);
  font-style: normal;
  font-size: 1.06em;
  color: var(--accent);
  letter-spacing: .01em;
}
.hero h1 em::after { display: none; }

.lede { margin-inline: auto; color: var(--ink-soft); }

/* 首页正文区收一点，两侧留给拼贴 */
.upload-grid { gap: 20px; }

/* 拖入区：信封 */
.dropzone {
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(251, 249, 244, .35)),
    repeating-linear-gradient(135deg, transparent 0 10px, rgba(46, 58, 99, .035) 10px 11px);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .75);
}
.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--accent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(253, 246, 247, .5)),
    repeating-linear-gradient(135deg, transparent 0 10px, rgba(173, 98, 120, .05) 10px 11px);
}

.drop-icon {
  border-radius: 50%;
  background: #f1eff7;
  color: var(--green);
  box-shadow: 0 0 0 1px rgba(46, 58, 99, .2), 0 0 0 4px rgba(255, 255, 255, .8);
}

.formats { font-family: var(--mono); letter-spacing: .16em; color: #98a0bb; }

/* 邮戳：鼠标在大卡上时转正一点点 */
.postmark {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1.5px dashed rgba(124, 147, 186, .62);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: rgba(78, 94, 142, .68);
  transform: rotate(11deg);
  pointer-events: none;
  transition: transform .35s var(--spring);
  z-index: 2;
}
.postmark span {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .16em;
}
.postmark b {
  font-family: var(--serif);
  font-size: 10.5px;
  letter-spacing: .06em;
}
.postmark small {
  font-family: var(--script);
  font-size: 9.5px;
  letter-spacing: .04em;
}
.dropzone:hover .postmark { transform: rotate(4deg) scale(1.04); }

/* 弹性反馈：按钮 / 票根卡 / 列表行统一走 --spring */
.primary,
.ghost {
  transition: transform .3s var(--spring), background .2s ease,
    border-color .2s ease, box-shadow .2s ease;
}
.source-card {
  transition: border-color .2s ease, transform .3s var(--spring), box-shadow .2s ease;
}
.source-card:hover { transform: translateY(-3px) rotate(-.35deg); }
.word-row,
.vocab-row {
  transition: border-color .2s ease, box-shadow .2s ease, transform .3s var(--spring);
}
.note .pushpin { transition: transform .35s var(--spring); }
.note:hover .pushpin { transform: scale(1.12); }

/* 侧边说明：便笺 */
.side-notes {
  background: transparent;
  border: 0;
  gap: 12px;
}
.note {
  background: var(--card);
  border: 1px solid rgba(46, 58, 99, .28);
  border-radius: 14px;
  position: relative;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(46, 58, 99, .16), 0 12px 22px -20px rgba(30, 39, 72, .5);
  transition: transform .32s var(--spring), border-color .2s ease;
}
.note:nth-child(1) { transform: rotate(-1.1deg); }
.note:nth-child(2) { transform: rotate(.9deg); }
.note:nth-child(3) { transform: rotate(-.7deg); }
.note:hover {
  transform: rotate(0deg) translateY(-2px);
  border-color: var(--accent);
}
.note-num {
  font-family: var(--script);
  font-size: 17px;
  color: var(--accent);
  flex: none;
  white-space: nowrap;
  align-self: flex-start;
  padding-top: 2px;
}

/* 图钉 */
.pushpin {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, #ffffff, #9db0cd 70%, #5f7399);
  box-shadow: 0 2px 5px rgba(31, 42, 85, .28);
  pointer-events: none;
}

/* 来源卡：四张票根 */
.source-card {
  border: 1px solid rgba(46, 58, 99, .3);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(46, 58, 99, .14), 0 12px 20px -20px rgba(30, 39, 72, .5);
  position: relative;
}
.source-card::before {
  content: "";
  position: absolute;
  left: 64px;
  top: 10px;
  bottom: 10px;
  border-left: 1.5px dashed rgba(46, 58, 99, .22);
}
.source-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(173, 98, 120, .35), 0 16px 26px -18px rgba(30, 39, 72, .5);
}
.source-icon {
  border-radius: 50%;
  background: #f1eff7;
  color: var(--green);
  box-shadow: 0 0 0 1px rgba(46, 58, 99, .22);
  font-size: 14px;
}
.source-card b { letter-spacing: .02em; }
.source-card small { color: var(--muted); }
.source-card > span:last-child { padding-left: 4px; }

/* how 区 */
.how { border-top: 1px dashed rgba(46, 58, 99, .28); }
.how-item b {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .04em;
}
.how-item p { color: var(--ink-soft); }

/* ---------------------------------------------------------------- 按钮 */
.primary,
.ghost {
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 13.5px;
  letter-spacing: .03em;
  transition: transform .2s var(--e-out), background .2s var(--e-soft),
    border-color .2s var(--e-soft), box-shadow .2s var(--e-soft);
}

.primary {
  border: 1px solid #2b3557;
  background: linear-gradient(170deg, #445177, #34406b);
  color: #fbf7ec;
  box-shadow:
    0 0 0 2.5px #fff,
    0 0 0 3.5px rgba(46, 58, 99, .3),
    0 12px 22px -14px rgba(30, 39, 72, .7);
}
.primary:hover {
  background: linear-gradient(170deg, #4a5880, #2b3557);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 2.5px #fff,
    0 0 0 3.5px rgba(46, 58, 99, .42),
    0 16px 26px -14px rgba(30, 39, 72, .7);
}

.ghost {
  border: 1px solid rgba(46, 58, 99, .34);
  background: var(--card);
  color: var(--ink-soft);
  box-shadow: 0 0 0 2.5px #fff, 0 0 0 3.5px rgba(46, 58, 99, .16);
}
.ghost:hover {
  border-color: var(--accent);
  color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 2.5px #fff, 0 0 0 3.5px rgba(173, 98, 120, .3);
}
.ghost.small { padding: 7px 14px; font-size: 12px; }

/* 胶囊切换组 */
.result-mode button,
.library-tabs button {
  border: 1px solid rgba(46, 58, 99, .3);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(46, 58, 99, .12);
}
.result-mode button.active,
.library-tabs button.active {
  background: linear-gradient(170deg, #445177, #34406b);
  border-color: #2b3557;
  color: #fbf7ec;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(46, 58, 99, .3);
}

.sort-dir {
  border: 1px solid rgba(46, 58, 99, .3);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(46, 58, 99, .12);
}

/* ---------------------------------------------------------------- 卡片 */
.paste-panel,
.gaokao-panel,
.panel,
.study-card,
.reader-panel {
  border-radius: 18px;
  position: relative;
}
/* 卷宗保持 sticky（不要改成 relative，否则 top:82px 会变成下移） */
.lexicon-panel { border-radius: 18px; }
.curve-panel,
.study-queue { border-radius: 18px; position: relative; }

/* 内圈针脚边：信笺的装订感 */
.paste-panel::after,
.gaokao-panel::after,
.panel::after,
.study-card::after,
.reader-panel::after,
.curve-panel::after,
.study-queue::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(46, 58, 99, .14);
  border-radius: 11px;
  pointer-events: none;
}

.paste-panel { padding: 28px 30px; }
.panel { padding: 24px 26px; }

.paste-head h2,
.panel-head h2,
.result-head h1,
.dc-head h2,
.review-word,
.study-word-row h2,
.translate-head h2,
.gaokao-head h2 {
  font-family: var(--serif);
  letter-spacing: .01em;
}

.panel-head h2 { font-size: 19px; }

/* 统计卡：编号小票 */
.stat {
  border: 1px solid rgba(46, 58, 99, .28);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(46, 58, 99, .13), 0 10px 18px -18px rgba(30, 39, 72, .5);
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  right: -14px;
  top: -14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px dashed rgba(173, 98, 120, .35);
}
.stat .num {
  font-family: var(--display);
  font-size: 34px;
  color: var(--ink);
}
.stat .label { letter-spacing: .06em; }
.stat .sub { color: var(--accent); }

/* 列表项 */
.word-row,
.vocab-row,
.sent-card,
.phrase-card,
.tr-block,
.repeat-row {
  border: 1px solid rgba(46, 58, 99, .22);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 0 0 2px #fff, 0 8px 16px -18px rgba(30, 39, 72, .5);
}
.word-row:hover,
.vocab-row:hover,
.repeat-row:hover {
  border-color: rgba(46, 58, 99, .42);
  box-shadow: 0 0 0 2px #fff, 0 12px 22px -16px rgba(30, 39, 72, .45);
}
.word-row.open { border-color: var(--accent); }

.word-title b,
.vocab-word b,
.phrase-card h3,
.repeat-word b {
  font-family: var(--serif);
  letter-spacing: .01em;
}

.word-detail { border-top: 1px dashed rgba(46, 58, 99, .26); }

.badge {
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 10px;
  letter-spacing: .04em;
}
.badge.l1 { color: #5d6684; background: #e8e7f0; }
.badge.l2 { color: #f6f2e6; background: #46527a; }
.badge.l3 { color: #7d3d51; background: #f6e1e7; }
.badge.l4 { color: #5b4276; background: #ebe2f2; }
.badge.plain { color: var(--muted); background: #f0edf6; border-color: rgba(46, 58, 99, .16); }

.g-chip,
.g-tag,
.phrase-chip,
.history-chip {
  border: 1px solid rgba(46, 58, 99, .2);
  background: #f4f1ea;
  border-radius: 999px;
  color: var(--ink-soft);
}
.g-chip em { color: var(--accent); font-family: var(--mono); }

/* 考点便条 */
.exam-note,
.dc-note {
  border-left: 2px solid var(--accent);
  background: #f8f0ee;
  border-radius: 0 10px 10px 0;
}
.exam-note b,
.dc-note b { color: var(--accent); }

.phrase-card .exam,
.phrase-card .cat { background: #f8f0ee; }

/* 输入控件 */
input[type="search"],
input[type="url"],
input[type="text"],
input[type="password"],
select,
textarea {
  border: 1px solid rgba(46, 58, 99, .28);
  border-radius: 10px;
  background: #fdfbf6;
  color: var(--ink);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(173, 98, 120, .16) !important;
  outline: none;
}

.toolbar input[type="search"],
.toolbar select,
.lex-tools input,
.lex-tools select,
.field input,
.field select,
.tr-langs select,
.study-options select { background: #fdfbf6; }

.paste-panel textarea { background: #fffdf9; }
.paste-panel textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(173, 98, 120, .14); }

.switch input { accent-color: var(--green); }

/* 标签页：挂在纸上的一排书签 */
.tabs {
  border-bottom: 1px dashed rgba(46, 58, 99, .3);
  gap: 6px;
}
.tab {
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  color: var(--muted);
  padding: 10px 16px;
  font-size: 13.5px;
  letter-spacing: .02em;
}
.tab:hover { color: var(--ink); background: rgba(255, 255, 255, .55); }
.tab.active {
  color: var(--ink);
  font-weight: 600;
  background: var(--card);
  border-color: rgba(46, 58, 99, .28);
  border-bottom: 0;
  box-shadow: 0 -2px 0 rgba(255, 255, 255, .8) inset;
}
.tab.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--card);
}
.tab span { font-family: var(--mono); color: #a3a9c1; }

/* ------------------------------------------------------------ 阅读视图 */
/* 原文纸：信笺页边线 */
.reader-panel {
  padding-left: 42px;
  background:
    linear-gradient(90deg, transparent 25px, rgba(214, 166, 178, .38) 25px, rgba(214, 166, 178, .38) 26px, transparent 26px),
    radial-gradient(120% 70% at 85% 0, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, #fcfaf5 0, #f8f5ee 60%, #f3f2ee 100%);
}

/* 词条面板 = 右侧卷宗 */
.lexicon-panel {
  padding: 50px 14px 14px;
  overflow: visible;
}
.lexicon-panel::before {
  content: "Dossier · 词条";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--script);
  font-size: 21px;
  letter-spacing: .01em;
  color: #6d77a0;
  border-bottom: 1px dashed rgba(46, 58, 99, .22);
  border-radius: 17px 17px 0 0;
  background: linear-gradient(180deg, #eeebf6, rgba(251, 249, 244, .2));
  pointer-events: none;
}

.reader-body { max-height: calc(100vh - 340px); }

.rsent { border-radius: 10px; }
.rsent.flash { background: #f8eef0; }
.rsent-no { font-family: var(--mono); color: #a9aec6; }
.rsent-text { font-family: var(--serif); font-size: 16.5px; line-height: 2; letter-spacing: .01em; }

.rword { border-radius: 4px; }
.rword.l1 { border-bottom-color: #b6bcd2; }
.rword.l2 { border-bottom-color: #46527a; background: linear-gradient(180deg, transparent 68%, #e3e6f2 68%); }
.rword.l3 { border-bottom-color: #9c6478; background: linear-gradient(180deg, transparent 68%, #f7e3e8 68%); }
.rword.l4 { border-bottom-color: #6b5887; background: linear-gradient(180deg, transparent 68%, #ece3f3 68%); }
.rword:hover { background: #f4e6e9; }
.rword.active { background: var(--accent); color: #fff; }

.lg { border-radius: 50%; box-shadow: 0 0 0 1.5px #fff; }
.lg.l1 { background: #b6bcd2; }
.lg.l2 { background: #46527a; }
.lg.l3 { background: #9c6478; }
.lg.l4 { background: #6b5887; }

.detail-card {
  background: #fdfbf6;
  border: 1px solid rgba(46, 58, 99, .24);
  border-radius: 14px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8);
}
.dc-head h2 {
  font-family: var(--display);
  font-size: 31px;
  color: var(--ink);
}
.dc-note { background: #fbf6f2; }

.vcard {
  border: 1px solid rgba(46, 58, 99, .18);
  border-radius: 10px;
  background: #fdfbf6;
}
.vcard:hover { border-color: rgba(46, 58, 99, .4); }
.vcard.active { border-color: var(--accent); background: #fbf1f3; }
.vc-top b { font-family: var(--serif); }

.phrase-strip-wrap { border-top: 1px dashed rgba(46, 58, 99, .26); }

/* ------------------------------------------------------------ 记忆曲线 */
.curve-chart svg { border-radius: 10px; }
.curve-chart svg path { stroke: #46527a !important; stroke-width: 2.4; }
.curve-chart svg circle { fill: #9c6478 !important; }
.curve-chart svg line { stroke: #ded9e8 !important; }
.curve-chart svg text { fill: #7c93ba !important; }

/* 进度条 */
.gaokao-track { background: #e7e3f0; box-shadow: inset 0 1px 2px rgba(46, 58, 99, .12); }
.gaokao-fill { background: linear-gradient(90deg, #46527a, #9c6478); }
.gaokao-percent { font-family: var(--display); color: var(--accent); font-size: 38px; }

/* ------------------------------------------------------------ 背单词 */
.book-card,
.study-queue,
.queue-item,
.study-note-block,
.blind-context,
.spell-box,
.meaning-option {
  border: 1px solid rgba(46, 58, 99, .22);
  background: #fdfbf6;
  border-radius: 12px;
}
.book-card.active {
  border-color: var(--accent);
  background: #fbf1f3;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(173, 98, 120, .25);
}
.book-card .book-badge { background: #f2eef5; color: var(--accent); border-color: rgba(46, 58, 99, .16); }
.queue-item:hover { background: #f5f2ea; }
.queue-item.active { background: #e8e9f3; color: var(--green); }
.study-card { box-shadow: var(--sheet-edge); }
.study-word-row h2 { font-family: var(--display); font-size: clamp(38px, 5.4vw, 54px); color: var(--ink); }
.study-translation { border-top: 1px dashed rgba(46, 58, 99, .26); font-family: var(--serif); font-size: 16px; }

.study-grades button,
.review-grades button {
  border: 1px solid rgba(46, 58, 99, .24);
  background: var(--card);
  border-radius: 11px;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(46, 58, 99, .1);
}
.study-grades button:hover,
.review-grades button:hover {
  border-color: var(--accent);
  background: #fbf1f3;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(173, 98, 120, .28);
}

/* ------------------------------------------------------------ 弹窗 */
.modal,
.review-overlay { background: rgba(43, 40, 72, .46); }

.modal-card,
.review-card {
  background: var(--card);
  border: 1.6px solid var(--frame);
  box-shadow:
    inset 0 0 0 4px var(--ring),
    0 40px 90px -40px rgba(20, 24, 46, .6);
}
.modal-head,
.modal-foot,
.review-head,
.review-foot,
.daily-actions {
  border-color: rgba(46, 58, 99, .2);
  background: #f7f4ec;
}
.modal-head h2,
.review-done h3,
.study-done h2 { font-family: var(--serif); }

/* 弹窗的法文副题 */
#settings-modal .modal-head h2::after,
#daily-modal .modal-head h2::after,
#guide-modal .modal-head h2::after {
  font-family: var(--script);
  font-size: .82em;
  letter-spacing: .01em;
  font-weight: 400;
}
#settings-modal .modal-head h2::after { content: "  Réglages"; color: var(--accent); }
#daily-modal .modal-head h2::after { content: "  Journal"; color: var(--accent); }
#guide-modal .modal-head h2::after { content: "  Guide"; color: var(--accent); }

.review-word { font-family: var(--display); color: var(--ink); }
.review-foot .primary { width: 100%; }

.icon-btn {
  background: #f2eff7;
  border-radius: 999px;
  color: var(--ink-soft);
  box-shadow: 0 0 0 1px rgba(46, 58, 99, .2);
}
.icon-btn:hover { background: #e9e5f2; color: var(--ink); }

.pill {
  background: #eceef6;
  color: var(--green);
  border-radius: 999px;
  letter-spacing: .06em;
}

.field-hint { color: var(--muted); }
.guide-body code { background: #f2eff7; }
.settings-head h3 { font-family: var(--serif); }

/* 今日复盘 */
.daily-summary-item {
  background: #fdfbf6;
  border: 1px solid rgba(46, 58, 99, .2);
  border-radius: 12px;
}
.daily-summary-item b { font-family: var(--display); color: var(--ink); }
.daily-word { border-bottom: 1px dashed rgba(46, 58, 99, .18); }
.daily-word-head b { font-family: var(--serif); color: var(--ink); }
.daily-section h3 { font-family: var(--serif); color: var(--ink); }

/* 散件 */
.mastery i { background: #ded9e8; border-radius: 999px; }
.mastery i.on { background: var(--green); }
.mastery i.hot { background: var(--accent); }
.star-btn { color: #b3b0c4; }
.star-btn:hover, .star-btn.on { color: var(--accent); background: transparent; }

.level-track { background: #e7e3f0; }
.gs-item.active { background: #e8e9f3; color: var(--green); }
.gs-item .dot { background: var(--accent); }
.sent-card .idx { color: #a9aec6; }
.sent-card .ts { color: var(--accent); }
.g-explain .exam-tip { color: var(--accent); }

.original-text {
  border: 1px solid rgba(135, 150, 180, .5);
  box-shadow: 0 16px 26px -18px rgba(40, 52, 95, .42), inset 0 1px 0 #fff;
  background:
    linear-gradient(90deg, transparent 25px, rgba(214, 166, 178, .38) 25px, rgba(214, 166, 178, .38) 26px, transparent 26px),
    linear-gradient(180deg, #fcfaf5, #f3f2ee);
  padding: 28px 32px 28px 44px;
  font-family: var(--serif);
  font-size: 15.5px;
}
.original-text .gk-hl { background: linear-gradient(180deg, transparent 60%, #f3e2c8 60%); }
.original-text .ts { color: var(--accent); }

.tr-output { background: #fdfbf6; border-color: rgba(46, 58, 99, .2); }
.tr-block .zh { border-top: 1px dashed rgba(46, 58, 99, .24); font-family: var(--serif); font-size: 15px; }
.lookup-history { background: #fdfbf6; border-color: rgba(46, 58, 99, .2); }
.library-card { background: #fdfbf6; border-color: rgba(46, 58, 99, .2); }
.library-card:hover { border-color: var(--accent); background: var(--card); }
.library-card .topic { background: #eceef6; color: var(--green); }
.dict-suggestion { background: var(--card); border-color: rgba(46, 58, 99, .24); }
.vocab-empty { background: var(--card); border: 1px dashed rgba(46, 58, 99, .3); }

.poly-warn { background: #fdf0ee; border-color: rgba(173, 98, 120, .4); }
.poly-hit { background: #e8e9f3; border-color: rgba(46, 58, 99, .22); }
.poly-hit b, .poly-hit span { color: var(--green); }
.poly-hit.ai { background: #eaf0f5; }
.confusable-panel { background: #fbf7ec; border-color: rgba(179, 160, 106, .45); }
.confusable-panel summary { color: #8a7440; }
.confusable-table button { color: var(--green); }

.spell-result.ok { background: #e6e9f3; color: var(--green); }
.spell-result.bad { background: #f8e6e6; color: var(--danger); }
.drill-progress span { background: #f1eef6; }
.drill-progress span.on { background: #e8e9f3; color: var(--green); }
.meaning-option:hover { border-color: var(--accent); background: #fbf1f3; }

.toast {
  background: #2f3a5f;
  color: #fbf7ec;
  border-radius: 999px;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(46, 58, 99, .3), 0 20px 40px -20px rgba(20, 24, 46, .7);
}

/* 页脚落款 */
.footer { padding-top: 22px; }
.footer span:first-child::after {
  content: " · merci";
  font-family: var(--script);
  font-size: 13px;
  color: rgba(46, 58, 99, .45);
}

/* ------------------------------------------------------------ 响应式 */
@media (max-width: 1360px) {
  .rail { width: 88px; }
  .rail-it { width: 50px; height: 62px; }
  .rail-it img { width: 42px; height: 60px; }
  .rail-tip { left: 54px; }
}

@media (max-width: 1180px) {
  .rail-it { width: 46px; height: 56px; }
  .rail-it img { width: 38px; height: 54px; }
  .rail-tip { left: 50px; }
  .rail-orn { display: none; }
}

@media (max-width: 1020px) {
  body { padding-left: 0; }
  .rail {
    position: fixed;
    left: 50%;
    top: auto;
    bottom: 10px;
    transform: translateX(-50%);
    width: auto;
    max-width: calc(100vw - 20px);
    padding: 0;
    flex-direction: row;
    background: rgba(251, 249, 244, .94);
    border: 1px solid rgba(46, 58, 99, .34);
    border-radius: 999px;
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(46, 58, 99, .2), 0 18px 34px -20px rgba(20, 24, 46, .6);
    backdrop-filter: blur(8px);
  }
  .rail-cord { display: none; }
  .rail-group {
    flex-direction: row;
    gap: 0;
    padding: 4px 8px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .rail-it { width: 46px; height: 52px; }
  .rail-it img { width: 40px; height: 50px; }
  .rail-it.on::after { inset: 6px 0 4px; }
  .rail-tip { display: none; }
  .ambient { display: none; }
  body { padding-bottom: 92px; }
}

@media (max-width: 900px) {
  .topbar { grid-template-columns: auto 1fr; row-gap: 8px; }
  .topbar-file { display: none; }
  .top-actions { justify-self: end; flex-wrap: wrap; }
  .hero { padding: 38px 40px 34px; }
  .hero::before { width: 96px; margin-left: -48px; }
}

@media (max-width: 620px) {
  main { width: calc(100% - 28px); }
  .footer { width: calc(100% - 28px); }
  .hero { padding: 34px 34px 30px; }
  .hero h1 { font-size: 30px; }
  .top-actions a[href="/classic"] { display: none; }
  .top-actions .link-btn { padding: 6px 9px; font-size: 12px; }
  .rail-it { width: 40px; height: 46px; }
  .rail-it img { width: 34px; height: 44px; }
  .stat { border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .rail-it { animation: none; }
  .rail-it img { transition: none; }
}

/* 矮屏：吊牌缩一档，保证 11 枚都挂得下 */
@media (min-width: 1021px) and (max-height: 880px) {
  .rail { padding-top: 66px; }
  .rail-it { width: 48px; height: 57px; }
  .rail-it img { width: 40px; height: 55px; }
  .rail-orn { font-size: 9px; padding: 0; }
}

@media (min-width: 1021px) and (max-height: 760px) {
  .rail { padding-top: 58px; }
  .rail-it { width: 42px; height: 49px; }
  .rail-it img { width: 34px; height: 47px; }
  .rail-orn { display: none; }
  .rail-tip { font-size: 10.5px; padding: 5px 10px; }
}


/* ============================================================
   视图切换过渡
   ============================================================ */
.view.view-enter {
  animation: viewIn .36s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(12px) scale(.992); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .view.view-enter { animation: none; }
}

/* ============================================================
   词镜 v2 审美与功能增强样式
   1) 中窄屏环境贴纸外推与留白克制
   2) 统一银蓝 / 奶油纸 / 藕粉色系（消除旧暖绿残留）
   3) 最近精读条、阅读模式考点句标注、背词键盘快捷键条、复习语境例句
   ============================================================ */
@media (max-width: 1420px) {
  .a-seal { left: 2.5%; opacity: .72; }
  .a-camellia { left: 1.8%; opacity: .66; }
  .a-specimen { left: 2.2%; opacity: .42; }
  .a-teapot { left: 2%; opacity: .44; }
  .a-plate { left: 1.8%; opacity: .5; }
  .a-dove { left: 2.2%; opacity: .65; }
  .a-key { right: 1.8%; opacity: .7; }
  .a-nib { right: 2%; opacity: .72; }
  .a-sealblue { right: 1%; opacity: .75; }
  .amb-note { right: -34px; opacity: .82; }
}
@media (max-width: 1220px) {
  .a-seal, .a-camellia, .a-key, .a-nib, .a-specimen, .a-teapot, .amb-note {
    opacity: .28;
  }
}

/* 统一滚动条与弹窗色系 */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(78, 94, 142, .25); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(78, 94, 142, .45); }

.review-overlay { background: rgba(30, 39, 72, .42); backdrop-filter: blur(8px); }
.review-card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--sheet-edge), 0 28px 64px -26px rgba(30, 39, 72, .55);
}
.review-examples {
  margin: 10px 0 12px;
  text-align: left;
}
.review-ex-item {
  padding: 8px 11px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: rgba(220, 226, 241, .45);
  border-left: 3px solid var(--green);
  font-family: Georgia, var(--serif);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}
.review-ex-item small {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  color: var(--muted);
}
.review-kbd-hint {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .06em;
  text-align: center;
}
.export-menu {
  background: var(--card);
  border-color: var(--line);
  box-shadow: 0 16px 36px -14px rgba(30, 39, 72, .35);
}
.export-menu button:hover { background: var(--green-soft); color: var(--ink); }

/* 首页：最近精读条 */
.recent-articles-strip {
  margin: 18px auto 0;
  max-width: 1060px;
  padding: 14px 18px 16px;
  border-radius: 16px;
  background: rgba(251, 249, 244, .88);
  border: 1px solid var(--line);
  box-shadow: var(--sheet-edge);
}
.ra-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--ink-soft);
}
.ra-head i {
  font-family: var(--script);
  font-style: normal;
  font-size: 20px;
  color: var(--ink);
  margin-right: 8px;
}
.ra-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.ra-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, transform .2s var(--spring), box-shadow .2s;
}
.ra-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -16px rgba(30, 39, 72, .45);
}
.ra-card b {
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ra-card span {
  font-size: 11px;
  color: var(--muted);
}

/* 阅读模式：头部操作组 + 考点句行内语法拆解 + 连同原句收藏 */
.reader-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#btn-reader-grammar.active {
  background: var(--green);
  color: #fbf9f4;
  border-color: var(--green);
}
.rsent-gram-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 6px 0 2px;
}
.rsent-gram-tag {
  border: 1px solid rgba(46, 58, 99, .28);
  background: rgba(220, 226, 241, .55);
  color: var(--ink);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 10.5px;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.rsent-gram-tag:hover,
.rsent-gram-tag.open {
  background: var(--green);
  color: #fbf9f4;
  border-color: var(--green);
}
.rsent-gram-box {
  margin: 6px 0 4px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(244, 246, 251, .92);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink);
}
.rsent-gram-box .rg-item + .rg-item {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.rsent-gram-box b { color: var(--ink); }
.rsent-gram-box .rg-ev { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); margin-left: 6px; }
.rsent-gram-box .rg-exam { margin: 3px 0 0; color: var(--accent); font-size: 11.5px; }
.rsent.gram-spot {
  border-left: 3px solid rgba(156, 100, 120, .55);
  padding-left: 10px;
  background: rgba(243, 228, 232, .16);
  border-radius: 0 10px 10px 0;
}
.dc-sentence-wrap {
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(220, 226, 241, .36);
  border-left: 2.5px solid var(--green);
}
.dc-sentence-wrap .dc-sentence {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}
.dc-sent-save {
  margin-top: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 10.5px;
  cursor: pointer;
}
.dc-sent-save:hover { border-color: var(--green); color: var(--ink); }

/* 背单词：键盘快捷提示条 + 回炉标签 */
.study-kbd-bar {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  font-size: 11px;
  color: var(--muted);
}
.study-kbd-bar kbd,
.study-card kbd {
  display: inline-block;
  padding: 1px 5px;
  margin-right: 4px;
  border-radius: 4px;
  background: rgba(30, 39, 72, .08);
  border: 1px solid rgba(135, 150, 180, .45);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink);
  vertical-align: 1px;
}
.q-tag.retry {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ============================================================
   词镜 v2.1：今日考情外刊 + 逐句点译 + 批量真题导入器
   ============================================================ */
.daily-feeds-strip {
  margin: 18px auto 0;
  max-width: 1060px;
  padding: 16px 20px 18px;
  border-radius: 16px;
  background: rgba(251, 249, 244, .92);
  border: 1px solid var(--line);
  box-shadow: var(--sheet-edge);
}
.df-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.df-title { display: flex; flex-direction: column; gap: 2px; }
.df-kicker { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.df-kicker i {
  font-family: var(--script);
  font-style: normal;
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
  margin-right: 8px;
}
.df-title small { font-size: 11px; color: var(--muted); }
.df-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.df-topics {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(220, 226, 241, .5);
  border: 1px solid var(--line-soft);
}
.df-topics button {
  border: 0;
  background: transparent;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .18s, color .18s;
}
.df-topics button.active {
  background: var(--green);
  color: #fbf9f4;
}
.df-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}
.df-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px 15px;
  border-radius: 13px;
  border: 1px solid var(--line-soft);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, transform .2s var(--spring), box-shadow .2s;
}
.df-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -18px rgba(30, 39, 72, .48);
}
.df-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.df-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--ink);
}
.df-badge.score {
  background: var(--green);
  color: #fbf9f4;
  font-family: var(--mono);
}
.df-badge.fit {
  background: var(--accent-soft);
  color: var(--accent);
}
.df-card h3 {
  margin: 0;
  font-family: Georgia, var(--serif);
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.df-card p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

/* 阅读模式：单句点译按钮 + 顶部译文按钮就绪态 */
.rsent-gutter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: none;
}
.rsent-tr-btn {
  border: 1px solid rgba(135, 150, 180, .42);
  background: rgba(251, 249, 244, .88);
  color: var(--ink-soft);
  border-radius: 6px;
  width: 22px;
  height: 20px;
  padding: 0;
  font-size: 10px;
  line-height: 18px;
  cursor: pointer;
  transition: background .16s, color .16s, border-color .16s;
}
.rsent-tr-btn:hover,
.rsent-tr-btn.on {
  background: var(--green);
  color: #fbf9f4;
  border-color: var(--green);
}
#btn-reader-translate.ready {
  border-color: var(--green);
  color: var(--ink);
}
#btn-reader-translate.active {
  background: var(--green);
  color: #fbf9f4;
  border-color: var(--green);
}

/* 真题库升级工具栏 + 批量导入抽屉 */
.lib-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.lib-toolbar .library-tabs { margin-bottom: 0; }
.lib-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lib-filters input,
.lib-filters select {
  height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  color: var(--ink);
}
.library-card-wrap {
  position: relative;
}
.library-card-del {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  border: 0;
  background: rgba(251, 249, 244, .9);
  color: var(--muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 13px;
  line-height: 20px;
  cursor: pointer;
}
.library-card-del:hover { background: var(--accent-soft); color: #a44b52; }

.exam-importer {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(244, 246, 251, .86);
  border: 1px dashed var(--frame);
}
.exam-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1.5px dashed var(--line);
  background: rgba(255, 255, 255, .86);
  cursor: pointer;
  text-align: center;
  transition: border-color .2s, background .2s;
}
.exam-drop:hover,
.exam-drop.dragging {
  border-color: var(--green);
  background: var(--green-soft);
}
.exam-drop b { font-size: 13px; color: var(--ink); }
.exam-drop small { font-size: 11px; color: var(--muted); }
.exam-importer textarea {
  width: 100%;
  min-height: 92px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
}
.exam-preview-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.ep-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.ep-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}
.ep-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line-soft);
}
.ep-item-main input {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.ep-item-main p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-item-meta {
  text-align: right;
  font-size: 10.5px;
  color: var(--ink-soft);
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

/* ----------------------------------------------------- 题目 / 词汇统一难度徽章 */
.diff-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid transparent;
}
.diff-badge.d1 {
  background: rgba(45, 118, 88, .11);
  color: #215c44;
  border-color: rgba(45, 118, 88, .28);
}
.diff-badge.d2 {
  background: rgba(46, 78, 128, .1);
  color: #294674;
  border-color: rgba(46, 78, 128, .26);
}
.diff-badge.d3 {
  background: rgba(176, 112, 34, .12);
  color: #8a5112;
  border-color: rgba(176, 112, 34, .32);
}
.diff-badge.d4 {
  background: rgba(164, 58, 78, .12);
  color: #8c263b;
  border-color: rgba(164, 58, 78, .34);
}

.library-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.library-card-wrap:has(.library-card-del) .library-card-head {
  padding-right: 22px;
}
.library-card-head .topic {
  margin-bottom: 0;
}
.library-card-reason {
  display: block;
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-diff-select {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.ep-diff-select.d1 { background: rgba(45, 118, 88, .1); color: #215c44; border-color: rgba(45, 118, 88, .3); }
.ep-diff-select.d2 { background: rgba(46, 78, 128, .09); color: #294674; border-color: rgba(46, 78, 128, .28); }
.ep-diff-select.d3 { background: rgba(176, 112, 34, .11); color: #8a5112; border-color: rgba(176, 112, 34, .34); }
.ep-diff-select.d4 { background: rgba(164, 58, 78, .11); color: #8c263b; border-color: rgba(164, 58, 78, .36); }

.result-diff-pill {
  margin-right: 10px;
  vertical-align: middle;
}
.result-sub-meta {
  vertical-align: middle;
}
.study-diff-pill {
  margin-left: 6px;
  font-size: 10px;
  padding: 1px 7px;
  vertical-align: middle;
}
