/* ============================================================
   CET 学苑 · 四六级备考平台
   Design: 书院纸感（paper + ink teal + antique gold）
   ============================================================ */

:root {
  --paper: #F4F1E9;
  --paper-2: #EDE9DE;
  --surface: #FFFFFF;
  --surface-2: #FBFAF6;
  --panel: #FCFBF7;
  --ring-arc: #17474F;
  --ring-track: #EFEBE1;
  --chip: #3A4551;
  --chip-ink: #F7F3E9;
  --paper-rgb: 244, 241, 233;
  --glass: rgba(255,255,255,.62);
  --glass-2: rgba(255,255,255,.8);
  --ink: #16202A;
  --ink-2: #3A4551;
  --muted: #7C8792;
  --line: #E4DFD3;
  --line-soft: #EFEBE1;
  --brand: #17474F;
  --brand-2: #2C6E75;
  --brand-soft: #E7F0EF;
  --gold: #A8792A;
  --gold-soft: #F7EFDD;
  --danger: #B0463B;
  --danger-soft: #F9EAE7;
  --ok: #35735C;
  --ok-soft: #E8F2EC;
  --shadow-sm: 0 1px 2px rgba(22, 32, 42, .05);
  --shadow: 0 6px 24px -12px rgba(22, 32, 42, .18), 0 1px 2px rgba(22, 32, 42, .04);
  --shadow-lg: 0 24px 60px -28px rgba(22, 32, 42, .32);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", STSong, SimSun, serif;
  --font-sans: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 12% -10%, rgba(23, 71, 79, .07), transparent 46%),
    radial-gradient(circle at 92% 4%, rgba(168, 121, 42, .08), transparent 42%);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: .01em;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
::selection { background: rgba(23, 71, 79, .14); }

/* ---------------- Layout ---------------- */

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 18px 20px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--glass), transparent);
  backdrop-filter: blur(6px);
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; }

.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--brand);
  color: #F3EDDD;
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 6px 14px -8px rgba(23,71,79,.8);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--font-serif); font-size: 18px; letter-spacing: .14em; }
.brand-text em { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: .16em; }

.nav { display: flex; flex-direction: column; gap: 3px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--ink-2);
  font-size: 14px;
  transition: background .18s ease, color .18s ease;
}
.nav-link svg { flex: none; opacity: .62; transition: opacity .18s; }
.nav-link:hover { background: rgba(23, 71, 79, .06); }
.nav-link:hover svg { opacity: .85; }
.nav-link.is-active {
  background: var(--brand);
  color: #F6F2E8;
  box-shadow: 0 8px 18px -12px rgba(23, 71, 79, .9);
}
.nav-link.is-active svg { opacity: 1; }
.nav-link .nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  letter-spacing: .04em;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(23,71,79,.09);
  color: var(--brand);
}
.nav-link.is-active .nav-badge { background: rgba(255,255,255,.18); color: #F6F2E8; }

.side-foot { margin-top: auto; }

.side-count {
  position: relative;
  padding: 14px 16px 12px;
  border-radius: var(--r);
  background: linear-gradient(150deg, #1B4F57, #123840);
  color: #EFE9DA;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.side-count::after {
  content: "";
  position: absolute;
  width: 120px; height: 120px;
  right: -46px; bottom: -58px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
}
.side-count-label { display: block; font-size: 11px; letter-spacing: .1em; opacity: .72; }
.side-count-num {
  font-family: var(--font-serif);
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: .02em;
  color: #F6EBD2;
}
.side-count-unit { font-size: 11px; opacity: .7; margin-left: 3px; }
.side-tip { margin-top: 10px; font-size: 11.5px; line-height: 1.6; color: var(--muted); padding: 0 4px; }

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 34px 16px;
  background: linear-gradient(180deg, rgba(var(--paper-rgb),.96) 62%, rgba(var(--paper-rgb),0));
  backdrop-filter: blur(4px);
}
.topbar h1 { font-size: 23px; letter-spacing: .04em; }
.topbar p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 9px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 99px;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--glass-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.pill b { color: var(--brand); font-weight: 700; }
.pill-ghost { background: transparent; border-style: dashed; color: var(--muted); }

.avatar {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 13px;
  border: 1px solid rgba(168,121,42,.22);
}

.view {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  padding: 6px 34px 44px;
  animation: rise .42s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 34px 26px;
  font-size: 11.5px;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
  margin: 0 34px;
  padding-left: 0; padding-right: 0;
}
.foot .beian-bar { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.foot .beian { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); border-bottom: 1px dotted currentColor; padding-bottom: 1px; }
.foot .beian:hover { color: var(--brand); }
.foot .beian svg { flex: none; opacity: .8; }

/* ---------------- Generic blocks ---------------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 30px 0 13px;
}
.section-head h2 { font-size: 16.5px; letter-spacing: .06em; }
.section-head .more { font-size: 12px; color: var(--brand-2); display: inline-flex; align-items: center; gap: 4px; }
.section-head .more:hover { color: var(--brand); }
.card-head .more { font-size: 11.5px; color: var(--brand-2); display: inline-flex; align-items: center; gap: 3px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px 22px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--line-soft);
}
.card-head h3 { font-size: 15px; letter-spacing: .05em; }
.card-body { padding: 18px 20px; }

.grid { display: grid; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.split { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: 16px; align-items: start; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.serif { font-family: var(--font-serif); }
.nowrap { white-space: nowrap; }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  transition: transform .16s ease, background .18s ease, border-color .18s, box-shadow .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #F7F3E9; box-shadow: 0 10px 20px -14px rgba(23,71,79,.95); }
.btn-primary:hover { background: #123B43; }
.btn-line { border-color: var(--line); background: transparent; }
.btn-line:hover { border-color: rgba(23,71,79,.32); background: rgba(23,71,79,.04); }
.btn-gold { background: var(--gold-soft); color: #7E5A16; border-color: rgba(168,121,42,.24); }
.btn-gold:hover { background: #F3E7CD; }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: #DDEBE9; }
.btn-sm { height: 32px; padding: 0 13px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------------- Chips / tags ---------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding: 0 11px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  transition: all .16s ease;
}
.chip:hover { border-color: rgba(23,71,79,.3); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #F7F3E9; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 6px;
  font-size: 11px; letter-spacing: .02em;
  background: var(--brand-soft); color: var(--brand);
}
.tag-gold { background: var(--gold-soft); color: #7E5A16; }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-danger { background: var(--danger-soft); color: var(--danger); }
.tag-line { background: transparent; border: 1px solid var(--line); color: var(--muted); }

/* ---------------- Dashboard hero ---------------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(0,1fr);
  gap: 22px;
  padding: 28px 30px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(168,121,42,.16), transparent 55%),
    linear-gradient(135deg, #1B4F57 0%, #143B44 58%, #102F37 100%);
  color: #F2ECDD;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 64px);
  mask-image: radial-gradient(120% 100% at 80% 0%, #000 20%, transparent 78%);
}
.hero > * { position: relative; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(242,236,221,.66);
}
.hero .eyebrow::before { content: ""; width: 22px; height: 1px; background: rgba(242,236,221,.4); }
.hero h2 {
  font-size: 30px; line-height: 1.3; color: #F8F3E6;
  margin: 10px 0 6px; letter-spacing: .03em;
}
.hero h2 span { color: #E8C67E; }
.hero .hero-sub { font-size: 13px; color: rgba(242,236,221,.72); max-width: 40em; }

.countdown { display: flex; align-items: flex-end; gap: 8px; margin-top: 20px; }
.cd-cell { display: flex; flex-direction: column; align-items: center; min-width: 62px; }
.cd-cell b {
  font-family: var(--font-serif);
  font-size: 38px; font-weight: 600; line-height: 1;
  color: #F8F3E6; font-variant-numeric: tabular-nums;
}
.cd-cell small { font-size: 10.5px; letter-spacing: .16em; color: rgba(242,236,221,.55); margin-top: 7px; }
.cd-sep { font-family: var(--font-serif); font-size: 26px; color: rgba(232,198,126,.5); padding-bottom: 22px; }
.hero-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hero .btn-primary { background: #E8C67E; color: #2A2415; box-shadow: 0 12px 24px -16px rgba(0,0,0,.8); }
.hero .btn-primary:hover { background: #F0D295; }
.hero .btn-line { border-color: rgba(242,236,221,.28); color: #F2ECDD; }
.hero .btn-line:hover { background: rgba(255,255,255,.08); border-color: rgba(242,236,221,.5); }

.hero-side { display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.ring-wrap { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 104px; height: 104px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring-center {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-size: 21px; color: #F8F3E6;
}
.ring-center small { display: block; font-size: 10px; letter-spacing: .12em; color: rgba(242,236,221,.55); text-align: center; }
.ring-meta { display: flex; flex-direction: column; gap: 2px; }
.ring-meta strong { font-family: var(--font-serif); font-size: 15px; color: #F8F3E6; }
.ring-meta span { font-size: 12px; color: rgba(242,236,221,.62); }
.hero-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid rgba(255,255,255,.13); padding-top: 13px; }
.hero-mini div { display: flex; flex-direction: column; gap: 2px; }
.hero-mini b { font-family: var(--font-serif); font-size: 18px; color: #F8F3E6; }
.hero-mini span { font-size: 10.5px; color: rgba(242,236,221,.55); letter-spacing: .04em; }

/* ---------------- Stats ---------------- */

.stat {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.stat-label { font-size: 11.5px; color: var(--muted); letter-spacing: .06em; display: flex; align-items: center; gap: 6px; }
.stat-value { font-family: var(--font-serif); font-size: 27px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 12px; color: var(--muted); font-family: var(--font-sans); margin-left: 3px; }
.stat-foot { font-size: 11.5px; color: var(--muted); }

.bar { height: 6px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }

/* ---------------- Module entries ---------------- */

.mods { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.mod {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
  overflow: hidden;
}
.mod:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(23,71,79,.24); }
.mod-ico {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
}
.mod.gold .mod-ico { background: var(--gold-soft); color: #8A6420; }
.mod h4 { font-size: 14.5px; letter-spacing: .04em; }
.mod p { font-size: 11.8px; color: var(--muted); margin-top: 3px; line-height: 1.55; text-wrap: balance; }
.mod .mod-go { position: absolute; right: 14px; top: 16px; color: var(--line); font-size: 16px; }
.mod:hover .mod-go { color: var(--brand-2); }

/* ---------------- Task list ---------------- */

.tasks { display: flex; flex-direction: column; }
.task {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px dashed var(--line-soft);
}
.task:last-child { border-bottom: 0; }
.task-check {
  width: 21px; height: 21px; flex: none;
  border-radius: 7px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  display: grid; place-items: center;
  color: transparent;
  transition: all .18s;
}
.task-check:hover { border-color: var(--brand-2); }
.task.is-done .task-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.task.is-done .task-title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(124,135,146,.5); }
.task-main { flex: 1; min-width: 0; }
.task-title { font-size: 13.5px; }
.task-meta { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.task-xp { font-size: 11.5px; color: var(--gold); font-family: var(--font-serif); }

/* ---------------- Flashcard ---------------- */

.fc-stage { perspective: 1400px; margin: 4px 0 18px; }
.flashcard {
  position: relative;
  min-height: 306px;
  transform-style: preserve-3d;
  transition: transform .58s cubic-bezier(.3,.9,.25,1);
  cursor: pointer;
}
.flashcard.is-flipped { transform: rotateY(180deg); }
.fc-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(168,121,42,.09), transparent 60%),
    var(--surface);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.fc-face::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--brand), rgba(23,71,79,.15));
}
.fc-back { transform: rotateY(180deg); }
.fc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fc-word {
  font-family: var(--font-serif);
  font-size: 46px;
  line-height: 1.15;
  letter-spacing: .01em;
  color: var(--ink);
  margin-top: 18px;
  word-break: break-word;
}
.fc-front { justify-content: center; }
.fc-front .fc-word { margin-top: 14px; }
.fc-front .fc-hint { margin-top: 26px; }
.fc-ph { display: flex; align-items: center; gap: 9px; margin-top: 6px; color: var(--muted); font-size: 14px; }
.fc-sound {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--brand);
}
.fc-sound:hover { background: var(--brand-soft); }
.fc-hint { margin-top: auto; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.fc-def { font-size: 17px; line-height: 1.6; margin-top: 4px; }
.fc-def .pos { color: var(--gold); font-family: var(--font-serif); font-size: 13px; margin-right: 6px; }
.fc-block { margin-top: 14px; }
.fc-block span.lb {
  display: inline-block; font-size: 10.5px; letter-spacing: .14em;
  color: var(--muted); margin-bottom: 4px;
}
.fc-ex { font-family: var(--font-serif); font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.fc-ex-zh { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.fc-col { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px dashed var(--line); border-radius: 8px; padding: 7px 10px; }

.fc-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fc-btn { height: 46px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; display: flex; align-items: center; justify-content: center; gap: 7px; transition: all .16s; }
.fc-btn small { font-size: 10.5px; color: var(--muted); }
.fc-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.fc-btn.bad:hover { border-color: rgba(176,70,59,.4); background: var(--danger-soft); color: var(--danger); }
.fc-btn.mid:hover { border-color: rgba(168,121,42,.4); background: var(--gold-soft); color: #7E5A16; }
.fc-btn.good:hover { border-color: rgba(53,115,92,.4); background: var(--ok-soft); color: var(--ok); }

.vocab-layout { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 18px; align-items: start; }

.ring-soft { position: relative; width: 92px; height: 92px; flex: none; }
.ring-soft svg { transform: rotate(-90deg); }
.ring-soft .ring-center { color: var(--ink); font-size: 17px; }
.ring-soft .ring-center small { color: var(--muted); font-size: 9.5px; letter-spacing: .1em; }

.kv { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line-soft); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-family: var(--font-serif); font-size: 14.5px; }

/* ---------------- vocab list ---------------- */

.search {
  display: flex; align-items: center; gap: 9px;
  height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
}
.search input { border: 0; outline: 0; background: transparent; flex: 1; font-size: 13.5px; color: var(--ink); font-family: inherit; }

.wlist { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.witem {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
  transition: border-color .16s, background .16s;
  cursor: pointer;
}
.witem:hover { border-color: rgba(23,71,79,.26); background: var(--surface-2); }
.witem-main { flex: 1; min-width: 0; }
.witem-w { font-family: var(--font-serif); font-size: 16px; }
.witem-m { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wdot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--line); }
.wdot.s1 { background: var(--gold); }
.wdot.s2 { background: var(--ok); }

.wletters { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.wletter {
  min-width: 30px; height: 26px; padding: 0 7px;
  border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--muted);
  font-family: var(--font-serif); font-size: 12.5px; letter-spacing: .04em;
  cursor: pointer; transition: background .14s, color .14s, border-color .14s;
}
.wletter:hover { background: var(--surface-2); color: var(--ink); }
.wletter.is-active { background: var(--brand); color: #F6F1E5; border-color: var(--brand); }

/* ---------------- Quiz ---------------- */

.quiz-card { max-width: 720px; margin: 0 auto; }
.q-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.q-track { flex: 1; height: 5px; border-radius: 99px; background: rgba(23,71,79,.12); overflow: hidden; }
.q-track i { display: block; height: 100%; background: var(--gold); transition: width .3s; }
.q-stem { font-size: 15px; line-height: 1.7; margin-bottom: 16px; }
.q-word { font-family: var(--font-serif); font-size: 30px; letter-spacing: .01em; }
.q-opts { display: flex; flex-direction: column; gap: 9px; }
.opt {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface);
  text-align: left;
  font-size: 13.5px;
  transition: all .16s;
}
.opt:hover { border-color: rgba(23,71,79,.3); background: var(--surface-2); }
.opt .k {
  width: 24px; height: 24px; flex: none;
  border-radius: 7px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted); font-family: var(--font-serif);
}
.opt.is-right { border-color: rgba(53,115,92,.5); background: var(--ok-soft); }
.opt.is-right .k { background: var(--ok); color: #fff; border-color: var(--ok); }
.opt.is-wrong { border-color: rgba(176,70,59,.45); background: var(--danger-soft); }
.opt.is-wrong .k { background: var(--danger); color: #fff; border-color: var(--danger); }
.opt.is-dim { opacity: .5; }

/* ---------------- Papers ---------------- */

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.papers { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.paper {
  position: relative;
  display: block;
  padding: 18px 20px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.paper:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(23,71,79,.22); }
.paper-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.paper-date { font-family: var(--font-serif); font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.paper-topic { font-family: var(--font-serif); font-size: 17.5px; line-height: 1.45; letter-spacing: .02em; }
.paper-en { font-family: var(--font-serif); font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.paper-foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-soft); font-size: 11.5px; color: var(--muted); }
.paper-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }
.fav-btn {
  position: absolute; right: 14px; top: 14px;
  width: 30px; height: 30px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); display: grid; place-items: center;
}
.fav-btn.is-on { color: var(--gold); border-color: rgba(168,121,42,.3); background: var(--gold-soft); }

.detail-head { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.detail-title { font-family: var(--font-serif); font-size: 25px; line-height: 1.4; letter-spacing: .02em; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 20px 0 18px; overflow-x: auto; }
.tab {
  position: relative;
  padding: 10px 15px;
  border: 0; background: transparent;
  color: var(--muted); font-size: 13.5px;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--brand); font-weight: 600; }
.tab.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px; }

.prose { font-size: 14px; line-height: 1.85; color: var(--ink-2); }
.prose p + p { margin-top: 10px; }
.prose .en { font-family: var(--font-serif); font-size: 15px; line-height: 1.9; color: var(--ink); }
.prose.en p { white-space: pre-line; }
.quote {
  position: relative;
  padding: 18px 20px 18px 24px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink);
}
.quote::before {
  content: "";
  position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
  border-radius: 3px; background: var(--gold);
}
.note {
  display: flex; gap: 9px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--gold-soft);
  border: 1px solid rgba(168,121,42,.18);
  font-size: 12.2px; line-height: 1.7; color: #6B4E16;
}
.note.blue { background: var(--brand-soft); border-color: rgba(23,71,79,.14); color: #17474F; }
.note b { font-weight: 600; }

.tbl { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.tbl th { font-size: 11.5px; color: var(--muted); font-weight: 500; letter-spacing: .06em; background: var(--surface-2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.num { font-variant-numeric: tabular-nums; font-family: var(--font-serif); }
.tbl tfoot td { background: var(--surface-2); font-weight: 600; }

.phrase-list { display: flex; flex-wrap: wrap; gap: 8px; }
.phrase {
  display: inline-flex; flex-direction: column;
  padding: 7px 12px; border-radius: 9px;
  background: var(--brand-soft);
  font-size: 12.5px; color: var(--brand);
}
.phrase small { font-size: 10.5px; color: color-mix(in srgb, var(--brand) 70%, transparent); margin-top: 1px; }

.qa { border-bottom: 1px solid var(--line-soft); padding: 14px 0; }
.qa:last-child { border-bottom: 0; }
.qa-q { display: flex; gap: 9px; font-size: 13.8px; line-height: 1.7; }
.qa-n { font-family: var(--font-serif); color: var(--gold); flex: none; }
.qa-opts { margin: 8px 0 0 24px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 4px 14px; font-size: 12.8px; color: var(--ink-2); }
.qa-ans { margin: 9px 0 0 24px; font-size: 12.5px; color: var(--ok); }
.qa-script { margin: 9px 0 0 24px; font-size: 12.7px; color: var(--muted); line-height: 1.8; font-family: var(--font-serif); border-left: 2px solid var(--line); padding-left: 12px; }

/* ---------------- Skills ---------------- */

.skill-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.skill-cols { column-count: 2; column-gap: 14px; }
.skill-cols .acc { break-inside: avoid; margin: 0 0 14px; }
.acc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.acc-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; }
.acc-head h3 { font-size: 15px; letter-spacing: .05em; flex: 1; }
.acc-head .chev { color: var(--muted); transition: transform .25s; }
.acc.is-open .chev { transform: rotate(180deg); }
.acc-body { display: none; padding: 0 18px 18px; border-top: 1px solid var(--line-soft); }
.acc.is-open .acc-body { display: block; }
.acc-body h5 { font-family: var(--font-serif); font-size: 13.5px; margin: 14px 0 6px; letter-spacing: .04em; }
.acc-body ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.acc-body li { margin-bottom: 4px; }

/* ---------------- Mock ---------------- */

.mock-setup { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.mock-opt {
  padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); text-align: left;
  transition: all .18s;
}
.mock-opt:hover { border-color: rgba(23,71,79,.3); box-shadow: var(--shadow); }
.mock-opt h3 { font-size: 18px; letter-spacing: .04em; }
.mock-opt .m-meta { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.mock-opt .m-go { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--brand); }

.timer-shell { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 16px; align-items: start; }
.timer-big {
  font-family: var(--font-serif);
  font-size: 68px; line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  color: var(--ink);
}
.timer-big.warn { color: var(--danger); }
.timer-label { font-size: 11.5px; letter-spacing: .18em; color: var(--muted); }
.sec-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line-soft); }
.sec-row:last-child { border-bottom: 0; }
.sec-row .sec-name { flex: 1; font-size: 13.5px; }
.sec-row .sec-time { font-size: 12px; color: var(--muted); font-family: var(--font-serif); }
.sec-row.is-active .sec-name { color: var(--brand); font-weight: 600; }
.sec-row.is-done .sec-name { color: var(--muted); text-decoration: line-through; }

.score-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11.5px; color: var(--muted); }
.field input, .field select {
  height: 38px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); font-family: inherit; font-size: 13.5px; color: var(--ink);
  outline: none;
}
.field input:focus, .field select:focus { border-color: var(--brand-2); }

.score-big { font-family: var(--font-serif); font-size: 52px; line-height: 1; color: var(--brand); }
.score-big small { font-size: 13px; color: var(--muted); font-family: var(--font-sans); margin-left: 4px; }

/* ---------------- Plan ---------------- */

.phase { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 16px; padding: 16px 0; border-bottom: 1px dashed var(--line-soft); }
.phase:last-child { border-bottom: 0; }
.phase-name { font-family: var(--font-serif); font-size: 15px; }
.phase-name small { display: block; font-size: 11px; color: var(--muted); font-family: var(--font-sans); letter-spacing: .04em; }
.phase-tasks { display: flex; flex-direction: column; gap: 6px; }
.phase-task { display: flex; gap: 8px; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.phase-task::before { content: "·"; color: var(--gold); font-weight: 700; }

.day-list { display: flex; flex-direction: column; }
.day-row { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line-soft); }
.day-row:last-child { border-bottom: 0; }
.day-date { width: 62px; flex: none; font-family: var(--font-serif); font-size: 13px; color: var(--muted); }
.day-date b { display: block; font-size: 17px; color: var(--ink); }
.day-body { flex: 1; }
.day-title { font-size: 13.5px; }
.day-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }

/* ---------------- Me ---------------- */

.heat { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; max-width: 340px; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--line-soft); display: block; }
.heat i.l1 { background: #CFE0DD; }
.heat i.l2 { background: #A2C4BE; }
.heat i.l3 { background: #6BA09A; }
.heat i.l4 { background: var(--brand); }

.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line-soft); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .s-label { font-size: 13.5px; }
.setting-row .s-desc { font-size: 11.5px; color: var(--muted); }

/* ---------------- Empty / misc ---------------- */

.empty { padding: 34px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty .e-ico { font-size: 26px; opacity: .35; margin-bottom: 6px; }

.tabbar { display: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 16px);
  z-index: 100;
  padding: 11px 20px;
  border-radius: 99px;
  background: rgba(22, 32, 42, .93);
  color: #F6F2E8;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: all .3s cubic-bezier(.2,.8,.3,1);
  box-shadow: 0 16px 34px -18px rgba(0,0,0,.6);
  max-width: min(86vw, 460px);
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.modal-mask {
  position: fixed; inset: 0; z-index: 90;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(22, 32, 42, .42);
  backdrop-filter: blur(3px);
}
.modal-mask.is-on { display: flex; }
.modal {
  width: 100%;
  max-width: 520px;
  max-height: 84vh;
  overflow: auto;
  padding: 26px 28px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: pop .28s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 18px; margin-bottom: 6px; letter-spacing: .04em; }

/* ---------------- 听力精练 ---------------- */

.lst-stats { display: flex; gap: 26px; margin-top: 20px; flex-wrap: wrap; }
.lst-stats div { display: flex; flex-direction: column; gap: 1px; }
.lst-stats b { font-family: var(--font-serif); font-size: 21px; color: #F8F3E6; line-height: 1.1; }
.lst-stats span { font-size: 10.5px; letter-spacing: .06em; color: rgba(242,236,221,.55); }

.lp-sets { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.lp-set {
  display: block;
  padding: 15px 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.lp-set:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: rgba(23,71,79,.26); }
.lp-set.is-on { border-color: rgba(23,71,79,.5); box-shadow: inset 0 0 0 1px rgba(23,71,79,.12); }
.lp-set-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 4px; }
.lp-set-top b { font-family: var(--font-serif); font-size: 16px; letter-spacing: .02em; }
.lp-set-foot { display: flex; align-items: center; gap: 10px; margin-top: 9px; font-size: 11px; color: var(--muted); }
.lp-set-foot .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }
.lp-set-foot .pct { margin-left: auto; color: var(--brand-2); }

.lp-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 6px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 24px -22px rgba(23,71,79,.7);
}
.lp-play {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 0;
  background: var(--brand);
  color: #F7F3E9;
  transition: background .18s, transform .18s;
}
.lp-play:hover { background: var(--brand-2); }
.lp-play:disabled { background: var(--line-soft); color: #9A9384; cursor: default; }
.lp-info { flex: 1; min-width: 0; }
.lp-info b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lp-info span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.lp-rate { display: flex; align-items: center; gap: 4px; flex: none; }
.lp-rate > span { font-size: 10.5px; color: var(--muted); margin-right: 2px; letter-spacing: .04em; }
.lp-rate button {
  height: 24px; padding: 0 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.lp-rate button:hover { border-color: rgba(23,71,79,.3); color: var(--brand); }
.lp-rate button.is-on { background: var(--brand-soft); border-color: rgba(23,71,79,.28); color: var(--brand); font-weight: 600; }

.lst-sec { display: flex; align-items: center; gap: 9px; margin: 24px 0 10px; flex-wrap: wrap; scroll-margin-top: 86px; }
.lst-sec h3 { font-size: 15.5px; letter-spacing: .05em; }
.lst-sec .tiny { margin-left: auto; }

.lst-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.lst-item + .lst-item { margin-top: 12px; }
.lst-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.lst-head h4 { font-family: var(--font-serif); font-size: 15px; letter-spacing: .02em; }
.lst-tools { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.lst-tools .btn.is-playing { background: var(--brand-soft); border-color: rgba(23,71,79,.28); color: var(--brand); }
.lst-body { padding: 15px 18px 17px; }

.lst-script {
  padding: 13px 15px;
  margin-bottom: 15px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 2.05;
  color: var(--ink-2);
}
.lst-para + .lst-para { margin-top: 7px; }
.lst-spk {
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--gold);
  margin-right: 6px;
}
.lst-sent { cursor: pointer; border-radius: 3px; padding: 1px 0; transition: background .18s; }
.lst-sent:hover { background: rgba(23,71,79,.07); }
.lst-sent.is-now { background: rgba(232,198,126,.45); box-shadow: 0 0 0 2px rgba(232,198,126,.45); }

.lq + .lq { margin-top: 15px; padding-top: 15px; border-top: 1px dashed var(--line-soft); }
.lq-q { display: flex; gap: 8px; font-size: 13.8px; line-height: 1.7; color: var(--ink); }
.lq-n { font-family: var(--font-serif); color: var(--gold); flex: none; min-width: 20px; }
.lq-opts { display: grid; gap: 6px; margin: 10px 0 0 28px; }
.lq-opt {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 9px 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  transition: all .15s;
}
.lq-opt i { font-style: normal; font-family: var(--font-serif); color: var(--muted); flex: none; width: 13px; }
.lq-opt:hover { border-color: rgba(23,71,79,.3); background: var(--brand-soft); }
.lq-opt.is-ok { border-color: rgba(53,115,92,.42); background: var(--ok-soft); color: var(--ok); }
.lq-opt.is-ok i, .lq-opt.is-ans i { color: var(--ok); }
.lq-opt.is-bad { border-color: rgba(176,70,59,.4); background: var(--danger-soft); color: var(--danger); }
.lq-opt.is-bad i { color: var(--danger); }
.lq-opt.is-ans { border-color: rgba(53,115,92,.42); background: var(--ok-soft); }
.lq.is-done .lq-opt { cursor: default; }
.lq.is-done .lq-opt:hover:not(.is-ok):not(.is-bad):not(.is-ans) { background: var(--surface); border-color: var(--line); }
.lq-exp {
  margin: 10px 0 0 28px;
  padding: 9px 13px;
  border-left: 2px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: rgba(168,121,42,.07);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-2);
}
.lq-exp b { color: #7E5A16; font-weight: 600; }

.lst-keys { margin-top: 16px; padding-top: 13px; border-top: 1px dashed var(--line-soft); }
.lst-keys .lb { font-size: 10.5px; letter-spacing: .1em; color: var(--muted); display: block; margin-bottom: 8px; }

/* ---------------- Responsive ---------------- */

@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; align-items: center; gap: 20px; }
  .ring-wrap { gap: 14px; }
  .hero-mini { flex: 1; border-top: 0; border-left: 1px solid rgba(255,255,255,.13); padding-top: 0; padding-left: 18px; }
  .mods { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .timer-shell { grid-template-columns: 1fr; }
  .score-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .tabbar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 5px 0;
    font-size: 10.5px;
    color: var(--muted);
    border-radius: 9px;
  }
  .tabbar a.is-active { color: var(--brand); }
  .tabbar a.is-active svg { opacity: 1; }
  .tabbar svg { opacity: .65; }
  .view { padding-bottom: 86px; }
  .foot { padding-bottom: 86px; }
  .toast { bottom: 88px; }
  .topbar { padding: 18px 20px 12px; }
  .view { padding-left: 20px; padding-right: 20px; }
  .foot { margin: 0 20px; }
}

@media (max-width: 760px) {
  .grid-2, .grid-3, .grid-4, .split, .vocab-layout, .papers, .skill-grid, .mock-setup, .wlist { grid-template-columns: 1fr; }
  .skill-cols { column-count: 1; }
  .hero { padding: 22px 20px; border-radius: 18px; }
  .hero h2 { font-size: 23px; }
  .hero-side { flex-direction: column; align-items: flex-start; }
  .hero-mini { width: 100%; border-left: 0; border-top: 1px solid rgba(255,255,255,.13); padding: 13px 0 0; }
  .cd-cell b { font-size: 30px; }
  .cd-cell { min-width: 50px; }
  .topbar h1 { font-size: 19px; }
  .topbar p { font-size: 11.5px; }
  .topbar-right .pill-ghost { display: none; }
  .mods { grid-template-columns: 1fr; }
  .fc-word { font-size: 36px; }
  .fc-face { padding: 20px; }
  .flashcard { min-height: 320px; }
  .detail-title { font-size: 20px; }
  .timer-big { font-size: 48px; }
  .qa-opts { grid-template-columns: 1fr; }
  .heat { grid-template-columns: repeat(10, 1fr); }
  .score-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .phase { grid-template-columns: 1fr; gap: 8px; }
  .tbl th, .tbl td { padding: 8px 7px; }
  .tbl { font-size: 11.8px; }
  .tab { padding: 9px 11px; font-size: 12.5px; }
  .lp-sets { grid-template-columns: 1fr; }
  .lq-opts, .lq-exp { margin-left: 0; }
  .lst-head { padding: 12px 15px; }
  .lst-body { padding: 13px 15px 15px; }
  .lst-tools { margin-left: 0; width: 100%; }
  .lst-tools .btn { flex: 1; justify-content: center; }
  .lp-rate > span { display: inline; }
  .lp-bar { flex-wrap: wrap; row-gap: 8px; }
  .lp-rate { flex: 1 1 100%; margin-top: 2px; }
  .lst-stats { gap: 18px; }
}

/* ============================================================
   整卷真题（含听力音频）
   ============================================================ */

.fp-head { margin-bottom: 18px; }
.fp-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--muted); }

.paper.fp-card { border-left: 3px solid var(--gold); }

.fp-jump { margin: 4px 0 18px; }
.fp-jump .tab { flex: 0 0 auto; }

.fp-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px; margin: 0 0 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm);
}
.fp-actions .btn { margin-left: auto; }
.fp-actions .btn + .btn { margin-left: 0; }

.fp-sec {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  padding: 22px 26px 26px; margin-bottom: 18px;
}
.fp-sec-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
  scroll-margin-top: calc(var(--topbar-h, 92px) + 96px);
}
.fp-sec-head h2 { font-family: var(--font-serif); font-size: 19px; letter-spacing: .04em; margin: 0; }
.fp-sec-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.fp-sec-meta span { position: relative; }
.fp-sec-meta span + span::before { content: "·"; position: absolute; left: -8px; color: var(--line); }

.fp-audio {
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: var(--r); padding: 12px 14px; margin-bottom: 18px;
}
.fp-audio audio { width: 100%; height: 38px; display: block; }
.fp-audio-tip { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.fp-audio-tts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fp-audio-tts .tiny { flex: 1 1 100%; }

.fp-block + .fp-block { margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--line); }
.fp-label {
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 10px;
}
.fp-passage { font-family: var(--font-serif); font-size: 15.5px; line-height: 1.95; color: var(--ink-2); }
.fp-passage p { margin: 0 0 12px; }
/* 原卷中夹在正文里的中文释义（如 （创新者））为斜体，全库统一还原 */
.fp-gloss { font-style: italic; }
/* 仔细阅读 / 选词填空：每段首行缩进 2 字，段间紧凑（还原卷面，不空行） */
.fp-passage p.fp-p { text-indent: 2em; margin-bottom: 4px; }
/* 段落匹配：字母标签悬挂在左，标签与正文贴合（首行与续行对齐到同一列） */
.fp-passage p.fp-p-lbl { padding-left: 1.46em; text-indent: -1.46em; margin-bottom: 8px; }
.fp-passage p:last-child { margin-bottom: 0; }
.fp-lbl {
  display: inline-block; width: 1.16em; margin-right: .3em;
  /* 关键：父级 p 的悬挂缩进会被继承进来，若不清零会把 "A)" 推出盒外，正文与标签之间凭空多出一格 */
  text-indent: 0; letter-spacing: 0;
  font-family: var(--font-sans, inherit); font-weight: 700; color: var(--ink);
}
/* 选词填空正文：原卷顶格，不用首行缩进 */
.fp-passage p.fp-p-bank { text-indent: 0; margin-bottom: 10px; }
/* 选词填空空位：更大的圆角方框 + 加粗边框，题号更醒目 */
.fp-blank {
  display: inline-block; min-width: 3.6em; min-height: 1.9em; margin: 0 .3em; padding: 3px 10px;
  font-family: var(--font-sans, inherit); font-size: 13.5px; font-weight: 700; line-height: 1.5;
  text-align: center; vertical-align: baseline; white-space: nowrap;
  color: var(--ink-2); background: var(--surface-2);
  border: 2px solid var(--brand-2); border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  cursor: pointer; transition: border-color .15s, background .15s, color .15s, transform .1s;
}
.fp-blank:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.fp-blank.is-cur { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.fp-blank.is-filled {
  color: var(--chip-ink); background: var(--chip); border-color: var(--chip);
  border-radius: 8px; font-size: 13px; padding: 4px 13px; min-width: 3.6em; min-height: 1.9em;
}
.fp-blank.is-right { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.fp-blank.is-wrong { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }

/* 答题卡：题号按钮定位文章内空位 */
.fp-bank-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.fp-bank-nav-t { font-size: 11.5px; letter-spacing: .1em; color: var(--muted); margin-right: 4px; font-weight: 600; }
.fp-nav-no {
  width: 28px; height: 28px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-family: var(--font-sans, inherit); font-size: 11.5px; cursor: pointer; transition: all .15s;
}
.fp-nav-no:hover { border-color: var(--brand-2); }
.fp-nav-no.is-done { background: var(--brand); border-color: var(--brand); color: #F7F3E9; }
.fp-nav-no.is-cur { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fp-bank-nav-hint { flex: 1 1 100%; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* Word Bank：深色胶囊词按钮，点词填入；已用词置灰 */
.fp-bank {
  margin: 10px 0 4px; padding: 13px 15px; background: var(--surface-2);
  border: 1px solid var(--line-soft); border-radius: var(--r-sm);
}
.fp-bank-h { font-family: var(--font-serif); font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.fp-bank-list { display: flex; flex-wrap: wrap; gap: 7px; }
.fp-bank-w {
  font-family: var(--font-sans, inherit); font-size: 12.5px; line-height: 1.4;
  padding: 5px 12px; color: var(--chip-ink); background: var(--chip);
  border: 1px solid var(--chip); border-radius: 7px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s, color .15s;
}
.fp-bank-w:hover:not(:disabled) { background: var(--brand); border-color: var(--brand); transform: translateY(-1px); }
.fp-bank-w:active:not(:disabled) { transform: translateY(0); }
.fp-bank-w.is-used, .fp-bank-w:disabled {
  color: var(--muted); background: transparent; border-color: transparent; cursor: default;
  text-decoration: line-through; text-decoration-color: var(--line); transform: none;
}
.fp-bank-answer { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.9; }
.fp-bank-answer b { color: var(--brand); font-weight: 700; }
/* 选词填空已用文章内方框作答，隐藏下方重复的逐题下拉 */
.fp-items--bank { display: none; }

.fp-items { margin-top: 18px; }
.fp-item + .fp-item { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.fp-q { display: flex; gap: 10px; align-items: flex-start; }
.fp-no {
  flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); border-radius: 6px;
}
.fp-stem { font-size: 14.5px; line-height: 1.7; color: var(--ink); }

.fp-opts { display: grid; gap: 6px; margin: 10px 0 0 32px; }
.fp-opt {
  display: flex; gap: 9px; align-items: flex-start; text-align: left;
  width: 100%; padding: 9px 12px; cursor: pointer;
  font-family: inherit; font-size: 13.6px; line-height: 1.55; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .15s, background .15s;
}
.fp-opt:hover { border-color: var(--brand-2); }
.fp-opt b { flex: 0 0 auto; color: var(--muted); font-weight: 700; }
.fp-opt.is-picked { border-color: var(--brand); background: var(--brand-soft); }
.fp-opt.is-picked b { color: var(--brand); }
.fp-opt.is-right { border-color: var(--ok); background: var(--ok-soft); }
.fp-opt.is-right b { color: var(--ok); }
.fp-opt.is-wrong { border-color: var(--danger); background: var(--danger-soft); }
.fp-opt.is-wrong b { color: var(--danger); }

.fp-exp { margin: 10px 0 0 32px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--r-sm); border: 1px solid var(--line-soft); }
.fp-exp .tag { margin-bottom: 8px; display: inline-block; }
.fp-tr b, .fp-ex b { font-size: 11.5px; letter-spacing: .1em; color: var(--muted); display: block; margin-bottom: 3px; }
.fp-tr p, .fp-ex p { margin: 0 0 9px; font-size: 13.4px; line-height: 1.75; color: var(--ink-2); }
.fp-tr p { font-family: var(--font-serif); }
.fp-ex p:last-child { margin-bottom: 0; }
/* 听力原文：W/M 分行 + [题号] 标记（全库通用） */
.tr-line { display: inline; }
.tr-spk { color: var(--brand-2); font-weight: 700; margin-right: 2px; }
.tr-q { display: inline-block; min-width: 20px; padding: 0 5px; margin-right: 4px; border-radius: 4px;
  background: var(--gold-soft); color: var(--gold); font: 600 11px/1.6 var(--font-sans, sans-serif);
  vertical-align: 1px; }
.tr-u { text-decoration: underline; text-decoration-color: var(--brand-2); text-underline-offset: 3px; }
.an-exp .ex-q { color: var(--gold); margin-right: 2px; }
.an-exp .ex-u { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }

.fp-ref { margin-top: 14px; padding: 12px 14px; background: var(--gold-soft); border-radius: var(--r-sm); }
.fp-ref b { font-size: 11.5px; letter-spacing: .1em; color: var(--gold); display: block; margin-bottom: 4px; }
.fp-ref p { margin: 0; font-size: 13.6px; line-height: 1.8; color: var(--ink-2); }
.fp-ref p + p { margin-top: 8px; }

/* 题目尚未收录的试卷：给一句说明，不留空白页 */
.fp-noq { margin: 18px 0 8px; border-left: 3px solid var(--gold); }
.fp-noq b { font-size: 14.5px; color: var(--ink); }

.fp-score { margin-bottom: 18px; display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.fp-score-main .score-big { line-height: 1.1; }
.fp-score-main .score-big small { font-size: 14px; color: var(--muted); }
.fp-score-grid { display: flex; gap: 22px; flex-wrap: wrap; }
.fp-score-grid > div { display: flex; flex-direction: column; gap: 2px; }
.fp-score-grid b { font-family: var(--font-serif); font-size: 17px; }
.fp-score p { flex: 1 1 100%; }

@media (max-width: 720px) {
  .fp-sec { padding: 16px 15px 18px; border-radius: var(--r); }
  .fp-passage { font-size: 14.5px; }
  .fp-opts, .fp-exp { margin-left: 0; }
  .fp-actions { padding: 12px 14px; }
  .fp-actions .btn { flex: 1 1 100%; margin-left: 0; justify-content: center; }
  .fp-score { gap: 16px; }
}

/* 选词填空 / 段落匹配：下拉式字母作答 */
.fp-stem.is-hint { color: var(--muted); font-size: 13px; }
.fp-item.is-pick .fp-q { align-items: center; }
.fp-sel {
  flex: 0 1 auto; max-width: 100%; height: 32px; padding: 0 9px;
  font-family: inherit; font-size: 13px; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s;
}
.fp-sel:hover { border-color: var(--brand-2); }
.fp-sel:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fp-sel.is-skip { color: var(--muted); }
.fp-sel.is-right { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.fp-sel.is-wrong { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.fp-sec-score {
  margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--brand);
  padding: 2px 10px; background: var(--brand-soft); border-radius: 999px;
}
@media (max-width: 720px) {
  .fp-item.is-pick .fp-q { flex-wrap: nowrap; align-items: center; }
  .fp-sel { flex: 1 1 auto; min-width: 0; margin-left: 2px; }
  .fp-sec-score { margin-left: 0; }
}

/* 听力按篇切段：每块一个独立播放条 */
.fp-label { text-transform: none; letter-spacing: .06em; }
.fp-range {
  margin-left: 8px; padding: 1px 7px; border-radius: 20px;
  background: var(--brand-soft); color: var(--brand-2);
  font-size: 11px; letter-spacing: 0; font-weight: 500;
}
.fp-baudio {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px; padding: 8px 12px;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
}
.fp-baudio audio { flex: 1 1 auto; min-width: 0; height: 34px; }
.fp-baudio-tip { flex: 0 0 auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.fp-note {
  margin: 0 0 12px; padding: 10px 14px;
  background: var(--gold-soft); border-left: 3px solid var(--gold);
  border-radius: 6px; font-size: 13px; line-height: 1.7; color: var(--ink-2);
}
@media (max-width: 720px) {
  .fp-baudio { flex-wrap: wrap; gap: 6px; }
  .fp-baudio audio { flex: 1 1 100%; }
  .fp-baudio-tip { flex: 1 1 100%; }
  .fp-range { display: inline-block; margin-top: 4px; }
}

/* 真题列表：按考次分组 */
.fp-datehead {
  display: flex; align-items: baseline; gap: 10px;
  margin: 22px 0 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.fp-datehead b {
  font-family: var(--font-serif); font-size: 15px; font-weight: 600;
  color: var(--ink); letter-spacing: .02em;
}
.fp-datehead span { font-size: 12px; color: var(--muted); }
.fp-datehead:first-of-type { margin-top: 4px; }
.tag-dim { background: var(--paper-2); color: var(--muted); }

/* 卡片右侧标签组：含音频 / N 题待补 / 已交卷 可以同时出现 */
.fp-tags {
  margin-left: auto; display: inline-flex; align-items: center;
  gap: 6px; flex-wrap: wrap; justify-content: flex-end;
}
@media (max-width: 720px) {
  .fp-tags { gap: 4px; }
  .fp-tags .tag { font-size: 10px; padding: 2px 6px; }
}

/* ============ 答案与解析 / 题型专项练 ============ */
.an-passage { font-family: var(--font-serif); font-size: 15px; line-height: 1.95; color: var(--ink-2); margin-bottom: 8px; }
.an-passage p { margin: 0 0 8px; }
.an-passage p.fp-p { text-indent: 2em; margin-bottom: 4px; }
.an-passage p.fp-p-lbl { padding-left: 1.46em; text-indent: -1.46em; }
.an-passage p.fp-p-bank { text-indent: 0; }
.an-slot {
  display: inline-block; min-width: 3.2em; padding: 1px 8px; margin: 0 .2em;
  text-align: center; font-family: var(--font-sans, inherit); font-size: 12px; font-weight: 700;
  color: var(--brand); background: var(--brand-soft); border-radius: 6px;
}
.an-items { margin-top: 6px; }
.an-item {
  padding: 14px 0; border-top: 1px dashed var(--line-soft);
}
.an-item:first-child { border-top: 0; }
.an-q { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 7px; }
.an-no {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; padding: 0 7px;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--brand); border-radius: 7px;
}
.an-type { font-size: 11px; color: var(--muted); padding: 2px 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; }
.an-ans { margin-left: auto; font-size: 12px; color: var(--ink-2); }
.an-ans b { font-size: 15px; color: var(--brand); margin-left: 4px; }
.an-stem { font-size: 14px; line-height: 1.8; color: var(--ink-2); margin-bottom: 8px; }
.an-opts { display: grid; gap: 4px; margin: 6px 0; }
.an-opt {
  font-size: 13px; line-height: 1.7; color: var(--ink-2);
  padding: 5px 10px; border-radius: 7px; background: var(--surface-2);
}
.an-opt b { color: var(--muted); margin-right: 4px; }
.an-opt.is-right { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.an-opt.is-right b { color: var(--ok); }
.an-opt.is-wrong { background: var(--danger-soft); color: var(--danger); }
.an-ok { font-size: 10.5px; margin-left: 6px; padding: 1px 6px; background: var(--ok); color: #fff; border-radius: 999px; }
/* 逐题翻译+解析（对照解析册版式） */
.dt-box { margin: 10px 0 4px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.dt-qen { font-size: 13.5px; line-height: 1.7; color: var(--ink); padding: 9px 12px 0; }
.dt-qen + .dt-qzh { padding-top: 3px; }
.dt-qzh { font-size: 13.5px; line-height: 1.7; color: var(--ink); padding: 9px 12px 6px; font-weight: 600; }
.dt-qzh::before { content: "译"; display: inline-block; font-size: 10px; font-style: normal; font-weight: 700; color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); border-radius: 3px; padding: 0 3px; margin-right: 5px;
  vertical-align: 1px; line-height: 1.4; }
.dt-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dt-opt { display: flex; gap: 6px; padding: 6px 12px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.dt-opt:nth-last-child(-n+2) { border-bottom: none; }
.dt-opt:nth-child(odd) { border-right: 1px solid var(--line); }
.dt-opt b { color: var(--gold); flex: none; font-weight: 700; }
.dt-opt .dt-en { color: var(--muted); }
.dt-sec { padding: 10px 13px 8px; }
.dt-sec + .dt-sec { border-top: 1px dashed var(--line); }
.dt-sec > b { display: inline-block; font-size: 11px; letter-spacing: .06em; color: var(--gold);
  background: var(--gold-soft); padding: 1px 7px; border-radius: 4px; margin-right: 6px; margin-bottom: 4px; }
.dt-dis > b { color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 12%, transparent); }
.dt-sec p { display: block; margin: 0 0 5px; font-size: 13px; line-height: 1.9; color: var(--ink-2); }
.dt-sec > p:last-child { margin-bottom: 0; }
/* 「语法判断 / 语义判断」小标题单独成行，解析不再糊成一大段 */
.dt-tag { display: inline-block; font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--gold); background: var(--gold-soft); border-radius: 4px; padding: 0 6px; margin-right: 7px;
  vertical-align: 1px; line-height: 1.7; }
.dt-sec .dt-line { text-indent: 0; }
.an-wordzh { color: var(--ink); }
.dt-sec p .ex-loc, .an-exp p .ex-loc { font-style: normal; color: var(--gold); font-weight: 600; }
.dt-sec p .ex-ans, .an-exp p .ex-ans { color: var(--brand); }
.an-my { margin: 8px 0 4px; font-size: 12.5px; font-weight: 600; }
.an-my.is-ok { color: var(--ok); }
.an-my.is-no { color: var(--danger); }
.an-my:not(.is-ok):not(.is-no) { color: var(--muted); font-weight: 400; }
.an-exp, .an-tr {
  margin-top: 8px; padding: 10px 13px; background: var(--gold-soft);
  border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0;
}
.an-tr { background: var(--surface-2); border-left-color: var(--brand-2); }
.an-exp b, .an-tr b { display: block; font-size: 11px; letter-spacing: .08em; color: var(--gold); margin-bottom: 4px; }
.an-tr b { color: var(--brand-2); }
.an-exp p, .an-tr p { margin: 0; font-size: 13px; line-height: 1.85; color: var(--ink-2); }
.an-tr p { font-family: var(--font-serif); }
.an-tr .tr-line { display: block; margin-bottom: 3px; }
.an-tr .tr-spk { display: inline; color: var(--brand-2); font-weight: 700; }
.an-tr .tr-q { display: inline-block; min-width: 20px; padding: 0 5px; margin-right: 4px; border-radius: 4px;
  background: var(--gold-soft); color: var(--gold); font: 600 11px/1.6 var(--font-sans, sans-serif); }

/* 全文翻译：独立成块，定位句划线 */
.an-zh {
  margin: 6px 0 18px; padding: 14px 18px 8px;
  background: var(--surface-2); border: 1px solid var(--line-soft); border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
}
.an-zh-head { display: flex; align-items: baseline; gap: 10px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .08em; color: var(--gold); margin-bottom: 8px; }
.an-zh-head span { font-weight: 500; letter-spacing: 0; font-size: 12.5px; color: var(--muted); }
.an-zh p { margin: 0 0 10px; font-family: var(--font-serif); font-size: 14px; line-height: 1.95; color: var(--ink-2); }
.an-zh p:last-child { margin-bottom: 0; }
.an-u { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.an-loc-q { display: inline-block; font-style: normal; min-width: 22px; text-align: center;
  padding: 0 5px; margin-right: 3px; border-radius: 4px; font: 600 11px/1.7 var(--font-sans, sans-serif);
  background: var(--gold-soft); color: var(--gold); }

/* 与他卷同题：不重复收录，指向原题 */
.an-same {
  margin: 8px 0 10px; padding: 8px 12px;
  font-size: 12.5px; line-height: 1.8; color: var(--ink-2);
  background: var(--gold-soft); border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
}
.an-same a { color: var(--brand-2); text-decoration: none; border-bottom: 1px solid currentColor; }
.an-same a:hover { color: var(--brand); }

/* 整篇听力原文：放在本篇题目之前，一次读完，避免每题重复 */
.an-tr.is-block {
  margin: 4px 0 16px; padding: 13px 18px 6px;
  background: var(--panel); border: 1px solid var(--line-soft); border-left: 3px solid var(--brand-2);
  border-radius: 0 10px 10px 0;
}
.an-tr-head {
  display: flex; align-items: center; gap: 9px; margin-bottom: 9px;
  font: 600 11px/1.6 var(--font-sans); letter-spacing: .1em; color: var(--muted);
}
.an-tr-tag {
  padding: 1px 8px; border-radius: 999px; background: var(--brand-soft);
  color: var(--brand-2); font-weight: 600; letter-spacing: 0;
}
.an-tr-body .tr-p {
  margin: 0 0 10px; font-family: var(--font-serif); font-size: 13.6px;
  line-height: 1.95; color: var(--ink-2); text-align: justify;
}
.an-tr-body .tr-p:last-child { margin-bottom: 7px; }
.an-tr-body .tr-line { display: inline; }
.an-tr-body .tr-u { text-decoration-color: var(--brand-2); text-decoration-thickness: 1px; }
.an-tr-body .tr-q { margin: 0 2px; }

/* 做题时原文默认收起，点标题展开；交卷后默认展开 */
.an-tr.is-fold { padding: 11px 16px 12px; }
.an-tr.is-fold .an-tr-body { display: none; }
.an-tr.is-fold.is-open .an-tr-body { display: block; }
.an-tr-head[data-act] {
  width: 100%; margin: 0; padding: 0; border: 0; background: none;
  text-align: left; cursor: pointer; font-family: inherit;
}
.an-tr.is-fold.is-open .an-tr-head { margin-bottom: 10px; }
.an-tr-head[data-act]:hover { color: var(--brand); }
.an-tr-ico {
  display: inline-block; width: 11px; font-size: 9px; color: var(--brand-2);
  transition: transform .18s ease;
}
.an-tr.is-open .an-tr-ico { transform: rotate(90deg); }
.an-tr-tip { margin-left: auto; font-weight: 500; letter-spacing: 0; opacity: .8; }
.an-tr-tip::after { content: "点击展开原文"; }
.an-tr.is-open .an-tr-tip::after { content: "点击收起"; }

/* ---------------- 分项倒计时 ---------------- */
.fp-timer {
  position: sticky; top: calc(var(--topbar-h, 92px) + 8px); z-index: 18;
  display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap;
  margin: 0 0 20px; padding: 11px 16px 15px;
  background: color-mix(in srgb, var(--panel) 97%, transparent);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 30px -24px rgba(22, 32, 42, .75);
  backdrop-filter: blur(8px);
  transition: border-color .2s, box-shadow .2s;
}
.fp-timer-l { display: flex; align-items: center; gap: 10px; }
.fp-timer-cap { font: 600 10px/1 var(--font-sans); letter-spacing: .14em; color: var(--muted); }
#fpTimerVal {
  font: 700 25px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.fp-timer-part { font-size: 11.5px; color: var(--brand-2); }
.fp-timer.is-run { border-color: var(--brand-2); box-shadow: 0 12px 30px -22px rgba(23, 71, 79, .6); }
.fp-timer.is-run #fpTimerVal { color: var(--brand); }
.fp-timer.is-warn #fpTimerVal { color: var(--gold); }
.fp-timer.is-zero { border-color: var(--danger); }
.fp-timer.is-zero #fpTimerVal { color: var(--danger); animation: tm-blink 1s steps(1) infinite; }
@keyframes tm-blink { 50% { opacity: .3; } }
.fp-timer-picks { display: flex; gap: 6px; flex-wrap: wrap; margin-right: auto; }
.fp-tchip {
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 12px; color: var(--ink-2); transition: background .15s, border-color .15s, color .15s;
}
.fp-tchip small { font-size: 10px; color: var(--muted); }
.fp-tchip:hover { border-color: var(--brand-2); }
.fp-tchip.is-active { background: var(--brand); border-color: var(--brand); color: #F3EDDD; }
.fp-tchip.is-active small { color: rgba(243, 237, 221, .72); }
.fp-tchip.is-zero:not(.is-active) { color: var(--danger); border-color: rgba(176, 70, 59, .45); }
.fp-timer-btns { display: flex; gap: 6px; }
.fp-timer-track {
  position: absolute; left: 15px; right: 15px; bottom: 7px; height: 3px;
  border-radius: 3px; background: var(--line-soft); overflow: hidden;
}
.fp-timer-track i {
  display: block; height: 100%; width: 100%; border-radius: 3px;
  background: var(--brand-2); transition: width .3s linear;
}
.fp-timer.is-warn .fp-timer-track i { background: var(--gold); }
.fp-timer.is-zero .fp-timer-track i { background: var(--danger); }

.drill-types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.drill-type {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s;
}
.drill-type:hover { border-color: var(--brand-2); transform: translateY(-2px); }
.drill-type .mod-ico { flex: 0 0 auto; }
.drill-type-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.drill-type-body b { font-family: var(--font-serif); font-size: 15px; color: var(--ink); }
.drill-type > svg { color: var(--muted); flex: 0 0 auto; }
.drill-paper {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; margin-bottom: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.drill-paper:hover { border-color: var(--brand-2); }
.drill-paper-n { font-size: 12px; color: var(--brand-2); display: inline-flex; align-items: center; gap: 5px; }
@media (max-width: 720px) {
  .drill-types { grid-template-columns: 1fr; }
  .an-ans { margin-left: 0; }
  .fp-timer { top: calc(var(--topbar-h, 72px) + 4px); gap: 8px 10px; padding: 9px 12px 14px; }
  #fpTimerVal { font-size: 21px; }
  .fp-timer-part { display: none; }
  .fp-timer-picks { order: 3; width: 100%; margin-right: 0; }
  .fp-timer-btns { margin-left: auto; }
}

/* ============================================================
   深色模式（一键切换）
   浅色为纸墨，深色为夜读：同一套变量，换一套取值
   ============================================================ */

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0E1417;
  --paper-2: #0A0F12;
  --paper-rgb: 14, 20, 23;
  --surface: #171F24;
  --surface-2: #131A1F;
  --panel: #151D22;
  --glass: rgba(23, 31, 36, .72);
  --glass-2: rgba(255, 255, 255, .045);
  --ink: #E9EEF1;
  --ink-2: #C2CCD3;
  --muted: #8A969E;
  --line: #29343C;
  --line-soft: #202A31;
  --brand: #4E9BA1;
  --brand-2: #7FC9CD;
  --brand-soft: rgba(78, 155, 161, .16);
  --gold: #D9B168;
  --gold-soft: rgba(217, 177, 104, .13);
  --danger: #E07A6C;
  --danger-soft: rgba(224, 122, 108, .14);
  --ok: #6FC09B;
  --ok-soft: rgba(111, 192, 155, .14);
  --ring-arc: #7FC9CD;
  --ring-track: rgba(255,255,255,.16);
  --chip: #E1E8EC;
  --chip-ink: #12181C;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 10px 28px -16px rgba(0, 0, 0, .8), 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-lg: 0 28px 64px -30px rgba(0, 0, 0, .9);
}

html[data-theme="dark"] body::before { opacity: .5; }
html[data-theme="dark"] ::selection { background: rgba(127, 201, 205, .22); }

html[data-theme="dark"] .brand-mark,
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .nav-link.is-active,
html[data-theme="dark"] .lp-play,
html[data-theme="dark"] .wletter.is-active,
html[data-theme="dark"] .chip.is-active { background: #2F6F76; color: #F2F7F6; }
html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .lp-play:hover { background: #3A8289; }
html[data-theme="dark"] .btn-line:hover { background: rgba(255, 255, 255, .05); border-color: var(--brand-2); }
html[data-theme="dark"] .btn-soft:hover { background: rgba(255, 255, 255, .06); }
html[data-theme="dark"] .btn-gold { color: #E4C07C; border-color: rgba(217, 177, 104, .3); }
html[data-theme="dark"] .btn-gold:hover { background: rgba(217, 177, 104, .2); }
html[data-theme="dark"] .tag-gold,
html[data-theme="dark"] .mod.gold .mod-ico,
html[data-theme="dark"] .lq-exp b,
html[data-theme="dark"] .fc-btn.mid:hover { color: #E4C07C; }
html[data-theme="dark"] .nav-link:hover { background: rgba(255, 255, 255, .05); }
html[data-theme="dark"] .nav-link .nav-badge { background: rgba(255, 255, 255, .1); color: var(--brand-2); }
html[data-theme="dark"] .nav-link.is-active .nav-badge { background: rgba(255, 255, 255, .18); color: #F2F7F6; }
html[data-theme="dark"] .side-count { background: linear-gradient(150deg, #224F56, #173A41); }
html[data-theme="dark"] .note { color: #E8D3A8; border-color: rgba(217, 177, 104, .24); }
html[data-theme="dark"] .note.blue { color: #BFE1E2; border-color: rgba(78, 155, 161, .26); }
html[data-theme="dark"] .heat i.l1 { background: #1E3B3A; }
html[data-theme="dark"] .heat i.l2 { background: #2A5551; }
html[data-theme="dark"] .heat i.l3 { background: #3B7873; }
html[data-theme="dark"] .heat i.l4 { background: var(--brand-2); }
html[data-theme="dark"] .pill { background: rgba(255, 255, 255, .05); }
html[data-theme="dark"] .avatar { border-color: rgba(217, 177, 104, .3); }
html[data-theme="dark"] .lp-play:disabled { color: #6C7880; }
html[data-theme="dark"] .an-tr.is-block { background: var(--panel); }
html[data-theme="dark"] .fp-timer { background: color-mix(in srgb, var(--panel) 94%, transparent); box-shadow: 0 14px 34px -26px rgba(0, 0, 0, .9); }
html[data-theme="dark"] .fp-blank { background: var(--surface-2); }
html[data-theme="dark"] .fp-blank.is-filled { background: var(--chip); border-color: var(--chip); }
html[data-theme="dark"] .fp-bank-w:hover:not(:disabled) { color: #F2F7F6; }
html[data-theme="dark"] .fp-tchip.is-active { background: #2F6F76; border-color: #2F6F76; color: #F2F7F6; }
html[data-theme="dark"] .fp-tchip.is-active small { color: rgba(242, 247, 246, .78); }
html[data-theme="dark"] .an-ok { color: #0E1417; }
html[data-theme="dark"] .modal-mask { background: rgba(0, 0, 0, .6); }
html[data-theme="dark"] .toast { background: rgba(233, 238, 241, .95); color: #12181C; }
html[data-theme="dark"] .fp-btn, html[data-theme="dark"] audio { color-scheme: dark; }
html[data-theme="dark"] .hero { box-shadow: var(--shadow-lg); }
html[data-theme="dark"] .side-count { box-shadow: var(--shadow); }
html[data-theme="dark"] .note b, html[data-theme="dark"] .ex-loc { color: #E4C07C; }

/* 顶栏主题切换按钮 */
.theme-btn {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--glass-2);
  color: var(--ink-2);
  transition: border-color .18s, background .18s, color .18s, transform .18s;
}
.theme-btn:hover { border-color: var(--brand-2); color: var(--brand-2); transform: rotate(-12deg); }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn .ico-sun { display: none; }
html[data-theme="dark"] .theme-btn .ico-sun { display: block; }
html[data-theme="dark"] .theme-btn .ico-moon { display: none; }

/* ---------------- 备考资料 ---------------- */

.mat-src { padding: 18px; }
.mat-src + .mat-src { margin-top: 14px; }
.mat-src-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.mat-src-h h3 { margin: 0; font-size: 15.5px; font-family: var(--font-serif); }
.mat-src .mat-src-h .tag { margin-left: auto; }

/* 折叠面板 */
.mat-part { border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--panel); }
.mat-part + .mat-part { margin-top: 10px; }
.mat-part-h {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 13.8px; font-weight: 600; color: var(--ink); text-align: left;
}
.mat-part-h:hover { color: var(--brand-2); }
.mat-part-h .chev { flex: none; transition: transform .18s; color: var(--muted); }
.mat-part-h.is-open .chev { transform: rotate(180deg); }
.mat-part-b { padding: 4px 14px 14px; border-top: 1px dashed var(--line-soft); }

/* 模板正文：说明 / 英文 / 中文 */
.mat-part-b p { margin: 9px 0 0; font-size: 13.6px; line-height: 1.78; }
.mat-n { font-weight: 600; color: var(--brand); }
.mat-en {
  padding: 9px 12px; margin-top: 6px !important;
  background: var(--brand-soft); border-left: 3px solid var(--brand-2);
  border-radius: 0 8px 8px 0; color: var(--ink); font-family: Georgia, "Times New Roman", serif;
}
.mat-zh { color: var(--muted); }
.mat-p { color: var(--ink-2); }

/* 写作句型分类卡 */
.mat-cat { border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: 12px 14px; background: var(--panel); }
.mat-cat + .mat-cat { margin-top: 12px; }
.mat-cat h4 { margin: 0 0 8px; font-size: 13.8px; color: var(--brand); }
.mat-sent { margin: 7px 0 0; font-size: 13.4px; line-height: 1.75; color: var(--ink-2); padding-left: 12px; border-left: 2px solid var(--line); }

/* 高频词表 */
.mat-words { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.mat-word {
  display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: auto auto;
  column-gap: 10px; align-items: baseline;
  padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--panel);
}
.mat-word-w { font-weight: 700; font-size: 14px; color: var(--ink); }
.mat-word-freq { font-size: 11px; font-weight: 700; color: var(--gold); background: var(--gold-soft); border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.mat-word-m { grid-column: 1 / -1; margin-top: 4px; font-size: 12.8px; color: var(--muted); line-height: 1.6; }

/* 翻译词汇 */
.mat-trans { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.mat-tr {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--panel);
}
.mat-tr-zh { font-size: 13.2px; font-weight: 600; color: var(--ink); flex: none; max-width: 52%; }
.mat-tr-en { font-size: 12.8px; color: var(--brand-2); text-align: right; overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .mat-words, .mat-trans { grid-template-columns: 1fr; }
}

html[data-theme="dark"] .mat-en { color: #D9E6E4; }
html[data-theme="dark"] .mat-part, html[data-theme="dark"] .mat-cat,
html[data-theme="dark"] .mat-word, html[data-theme="dark"] .mat-tr { background: var(--surface-2); }

/* ---------------- 备考资料：词汇测验 ---------------- */

.mq-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px dashed var(--line-soft); }
.mq-row:last-of-type { border-bottom: 0; }
.mq-row-l { flex: none; width: 52px; font-size: 13px; font-weight: 600; color: var(--muted); }
.q-word-zh { font-family: var(--font-sans, inherit); font-size: 22px; }
.mq-wrong {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 9px 12px; margin-top: 6px;
  border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--panel);
}
.mq-wrong-stem { font-size: 13.4px; font-weight: 600; color: var(--ink); flex: none; max-width: 48%; overflow-wrap: anywhere; }
.mq-wrong-ans { font-size: 13px; color: var(--brand-2); text-align: right; overflow-wrap: anywhere; }
html[data-theme="dark"] .mq-wrong { background: var(--surface-2); }
