﻿/* ============================================================
   词林 WORD GROVE · 视觉系统
   墨绿夜林 / 米纸晨光；宋体为骨，金色为灯。
   ============================================================ */

:root {
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  --latin: Georgia, "Times New Roman", "Iowan Old Style", serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1080px;
  --ease: cubic-bezier(.22, .8, .26, 1);
}

:root[data-theme="dark"] {
  --bg: #0c110f;
  --bg-2: #101713;
  --panel: #131c17;
  --panel-2: #17221b;
  --panel-3: #1c2a21;
  --ink: #e9e3d3;
  --ink-2: #c9c3b3;
  --muted: #95a297;
  --faint: #5f6f63;
  --line: rgba(233, 227, 211, .13);
  --line-soft: rgba(233, 227, 211, .07);
  --gold: #c9a96a;
  --gold-2: #e0c48a;
  --gold-dim: #8b7444;
  --moss: #7f9c86;
  --moss-2: #9db8a3;
  --pine: #24382c;
  --red: #c06a52;
  --red-2: #a34d3a;
  --blue: #7d95a8;
  --glow: rgba(201, 169, 106, .16);
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, .85);
  --grain-opacity: .05;
  --ring-stroke: rgba(201, 169, 106, .10);
  --scrim: rgba(6, 10, 8, .72);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3efe4;
  --bg-2: #ece7d8;
  --panel: #fbf8ef;
  --panel-2: #f6f2e6;
  --panel-3: #efe9da;
  --ink: #222a22;
  --ink-2: #3b453b;
  --muted: #5a6558;
  --faint: #6b7568;
  --line: rgba(34, 42, 34, .14);
  --line-soft: rgba(34, 42, 34, .07);
  --gold: #8a6a2e;
  --gold-2: #6f5422;
  --gold-dim: #a58c5a;
  --moss: #4f6b57;
  --moss-2: #3f5a48;
  --pine: #dfe6d9;
  --red: #9c4632;
  --red-2: #853824;
  --blue: #526d80;
  --glow: rgba(138, 106, 46, .12);
  --shadow: 0 24px 50px -34px rgba(60, 52, 30, .45);
  --grain-opacity: .04;
  --ring-stroke: rgba(138, 106, 46, .14);
  --scrim: rgba(35, 40, 32, .45);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: .01em;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .5s var(--ease), color .5s var(--ease);
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 600px at 12% -8%, var(--glow), transparent 62%),
    radial-gradient(700px 520px at 108% 18%, rgba(127, 156, 134, .10), transparent 60%),
    radial-gradient(800px 620px at 50% 118%, rgba(201, 169, 106, .07), transparent 62%);
}
body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: .04em; margin: 0; }
p { margin: 0; }
::selection { background: var(--gold); color: var(--bg); }
:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 氛围层 ---------- */
.atmosphere { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.rings { position: absolute; width: 560px; height: 560px; stroke: var(--ring-stroke); stroke-width: 1; }
.rings-a { top: -240px; right: -180px; }
.rings-b { bottom: -300px; left: -220px; width: 480px; height: 480px; opacity: .7; }
.grain {
  position: absolute; inset: 0; opacity: var(--grain-opacity); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 28px;
  max-width: var(--maxw); margin: 0 auto; padding: 18px 28px 14px;
  backdrop-filter: blur(14px);
}
.topbar::after {
  content: ""; position: absolute; left: 28px; right: 28px; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark { width: 34px; height: 34px; color: var(--gold); display: block; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-cn { font-family: var(--serif); font-size: 21px; letter-spacing: .22em; }
.brand-en { font-size: 8.5px; letter-spacing: .34em; color: var(--muted); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.nav a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 14px; border-radius: 10px; color: var(--muted);
  transition: color .25s var(--ease), background .25s var(--ease);
}
.nav a span { font-family: var(--serif); font-size: 14.5px; letter-spacing: .1em; }
.nav a em { font-style: normal; font-size: 7.5px; letter-spacing: .26em; opacity: .55; }
.nav a:hover { color: var(--ink-2); background: var(--line-soft); }
.nav a.active { color: var(--gold-2); }
.nav a.active::after {
  content: ""; position: absolute; bottom: 1px; left: 50%; width: 14px; height: 1px;
  transform: translateX(-50%); background: var(--gold);
}
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.xp-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--latin); font-size: 12.5px; color: var(--gold-2); background: var(--panel);
}
.xp-pill b { font-weight: 600; }
.icon-btn {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 50%;
  cursor: pointer; color: var(--muted); transition: color .2s, border-color .2s, transform .2s;
}
.icon-btn:hover { color: var(--gold-2); border-color: var(--gold-dim); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.94); }

/* ---------- 主容器 ---------- */
.main { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 26px 28px 96px; min-height: 60vh; }
.page { animation: pageIn .5s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.eyebrow {
  display: inline-block; font-size: 9.5px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--gold-dim); font-family: var(--sans);
}
.page-head { margin: 6px 0 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.25; margin-top: 8px; }
.page-head .sub { color: var(--muted); margin-top: 7px; font-size: 13.5px; max-width: 56ch; }
.page-head .head-side { display: flex; align-items: center; gap: 10px; }

.sec-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 30px 0 14px; }
.sec-title h2 { font-size: 20px; margin-top: 5px; }
.sec-title .more { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.sec-title .more:hover { color: var(--gold-2); }

/* ---------- 卡片 ---------- */
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, var(--shadow);
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, .045), transparent 42%);
}
:root[data-theme="light"] .card::before { background: linear-gradient(155deg, rgba(255, 255, 255, .65), transparent 46%); }
.card-pad { padding: 22px; }
.card-hover { transition: transform .3s var(--ease), border-color .3s; }
.card-hover:hover { transform: translateY(-3px); border-color: var(--gold-dim); }

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

/* ---------- 按钮/标签 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--sans); font-size: 13.5px; letter-spacing: .06em; cursor: pointer;
  transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #191408; border-color: transparent; box-shadow: 0 10px 26px -14px var(--gold-dim);
}
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-line { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-line:hover { border-color: var(--gold-dim); color: var(--gold-2); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink-2); background: var(--line-soft); }
.btn-sm { padding: 7px 13px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 50%; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 12.5px; cursor: pointer;
  transition: all .2s var(--ease);
}
.chip:hover { color: var(--ink-2); border-color: var(--gold-dim); }
.chip.active { background: var(--gold); border-color: var(--gold); color: #1a1508; }

.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
  border-radius: 999px; font-size: 10.5px; letter-spacing: .04em;
  border: 1px solid var(--line); color: var(--muted); background: var(--panel-2);
}
.pill.gold { color: var(--gold-2); border-color: var(--gold-dim); }
.pill.moss { color: var(--moss-2); border-color: var(--moss); }
.pill.red { color: var(--red); border-color: var(--red-2); }
.pill.ghost { opacity: .6; }

.audio-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px;
  background: transparent; border: 1px solid transparent; border-radius: 50%;
  color: var(--gold-dim); cursor: pointer; transition: all .2s var(--ease);
}
.audio-btn:hover { color: var(--gold-2); background: var(--line-soft); }
.audio-btn.speaking { color: var(--gold-2); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.audio-btn span { font-size: 12px; }

/* ---------- 今日 ---------- */
.hero {
  display: grid; grid-template-columns: 1.5fr .8fr; gap: 20px; align-items: stretch;
  padding: 26px 28px; margin-bottom: 18px;
}
.hero .greet { font-family: var(--serif); font-size: clamp(26px, 3.6vw, 34px); line-height: 1.35; }
.hero .greet-name { font-family: var(--serif); font-size: clamp(20px, 2.4vw, 24px); color: var(--ink); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.uname-edit { font-size: 13px; line-height: 1; color: var(--muted); background: transparent; border: 1px solid var(--line-soft); border-radius: 999px; width: 26px; height: 26px; padding: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: color .15s, border-color .15s; }
.uname-edit:hover { color: var(--gold); border-color: var(--gold-dim); }
.hero .quote { color: var(--muted); font-size: 13px; margin-top: 14px; max-width: 34ch; }
.hero .quote::before { content: "—— "; color: var(--gold-dim); }
.hero-side { display: flex; align-items: center; justify-content: center; gap: 18px; border-left: 1px solid var(--line-soft); padding-left: 20px; }
.hero-stats { display: flex; flex-direction: column; gap: 10px; }
.hero-stats .hs { display: flex; align-items: baseline; gap: 6px; }
.hero-stats .hs b { font-family: var(--latin); font-size: 20px; font-weight: 500; color: var(--ink); }
.hero-stats .hs span { font-size: 11px; color: var(--muted); letter-spacing: .08em; }

.ring { transform: rotate(0deg); }
.ring-bg { stroke: var(--line); fill: none; }
.ring-fg { stroke: var(--gold); fill: none; stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.ring-label { fill: var(--ink); font-family: var(--latin); font-size: 15px; }

.today-grid { display: grid; grid-template-columns: 1.35fr .9fr; gap: 16px; align-items: start; }
.plan-list { display: flex; flex-direction: column; }
.plan-row {
  display: flex; align-items: center; gap: 13px; padding: 13px 2px;
  border-bottom: 1px solid var(--line-soft);
}
.plan-row:last-child { border-bottom: 0; }
.plan-ic {
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; background: var(--panel-2); color: var(--moss-2); border: 1px solid var(--line-soft);
  flex-shrink: 0;
}
.plan-main { flex: 1; min-width: 0; }
.plan-main b { display: block; font-weight: 500; font-size: 14px; font-family: var(--serif); letter-spacing: .05em; }
.plan-main span { font-size: 11.5px; color: var(--muted); }
.plan-num { font-family: var(--latin); font-size: 19px; color: var(--gold-2); }
.mood-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mood {
  flex: 1; min-width: 100px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--panel-2); cursor: pointer; transition: all .25s var(--ease); text-align: left;
}
.mood:hover { border-color: var(--gold-dim); transform: translateY(-1px); }
.mood.active { border-color: var(--gold); background: linear-gradient(140deg, var(--panel-3), var(--panel-2)); }
.mood b { font-family: var(--serif); font-size: 14px; font-weight: 500; letter-spacing: .1em; }
.mood span { font-size: 11px; color: var(--muted); line-height: 1.5; }
.mood .ic { color: var(--gold-dim); }

.reflect textarea, .field textarea, .field input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; color: var(--ink); font-family: var(--sans); font-size: 13.5px; resize: vertical;
  line-height: 1.7;
}
.reflect textarea:focus, .field textarea:focus, .field input:focus { outline: none; border-color: var(--gold-dim); }
.reflect textarea { min-height: 74px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field label { font-size: 11.5px; letter-spacing: .1em; color: var(--muted); }
.sense-row { display: grid; grid-template-columns: 108px minmax(0, 1fr) 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.sense-row input { padding: 9px 11px; }
.sense-row .sense-del { flex: 0 0 34px; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); overflow: hidden; }
.stat-strip .st { background: var(--panel); padding: 14px 16px; }
.stat-strip .st b { display: block; font-family: var(--latin); font-size: 23px; font-weight: 500; color: var(--ink); line-height: 1.2; }
.stat-strip .st span { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.stat-strip .st em { font-style: normal; color: var(--gold-2); font-size: 11px; margin-left: 4px; }

/* ---------- 词林 ---------- */
.searchbar {
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px; height: 46px;
  max-width: 440px; color: var(--muted);
}
.searchbar input {
  flex: 1; background: transparent; border: 0; outline: none; color: var(--ink);
  font-family: var(--sans); font-size: 14px;
}
.searchbar input::placeholder { color: var(--faint); }

.cluster-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cluster { padding: 18px 18px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; min-height: 148px; }
.cluster:hover { border-color: var(--gold-dim); }
.cluster .cl-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cluster .cl-unit { font-size: 10px; letter-spacing: .2em; color: var(--gold-dim); }
.cluster h3 { font-size: 17px; line-height: 1.4; margin-top: 2px; }
.cluster .cl-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11.5px; }
.cluster .cl-count { font-family: var(--latin); color: var(--gold-2); }
.cluster .cl-title-en { font-family: var(--latin); font-size: 12px; color: var(--muted); line-height: 1.45; }

.word-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 10px; }
.word-list { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); }
.word-row {
  display: grid; grid-template-columns: minmax(120px, 1.1fr) 130px minmax(0, 1.8fr) auto;
  gap: 14px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line-soft);
  cursor: pointer; transition: background .2s;
}
.word-row:hover { background: var(--line-soft); }
.word-row .wr-w { font-family: var(--latin); font-size: 17px; letter-spacing: .01em; display: flex; align-items: center; gap: 8px; }
.word-row .wr-ipa { font-size: 12px; color: var(--gold-dim); font-family: var(--sans); letter-spacing: .02em; }
.word-row .wr-mean { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.word-row .wr-right { display: flex; align-items: center; gap: 8px; }
.word-row mark { background: transparent; color: var(--gold-2); }

.word-sheet { max-width: 620px; }
.word-hero { padding: 4px 2px 18px; border-bottom: 1px solid var(--line-soft); }
.word-hero .wh-word { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.word-hero .wh-word h2 { font-family: var(--latin); font-size: clamp(34px, 6vw, 46px); letter-spacing: .01em; font-weight: 500; }
.word-hero .wh-ipa { color: var(--gold-dim); font-size: 14px; font-family: var(--sans); }
.word-hero .wh-senses { margin-top: 12px; color: var(--ink-2); font-size: 14px; }
.word-hero .wh-senses .pos { color: var(--gold-dim); font-size: 11.5px; margin-right: 4px; }
.word-hero .wh-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.word-sec { padding: 16px 2px; border-bottom: 1px solid var(--line-soft); }
.word-sec:last-child { border-bottom: 0; }
.word-sec .ws-label { font-size: 10px; letter-spacing: .24em; color: var(--gold-dim); margin-bottom: 8px; text-transform: uppercase; }
.word-sec .ws-en { font-family: var(--latin); font-size: 16px; line-height: 1.75; color: var(--ink); }
.word-sec .ws-zh { color: var(--muted); font-size: 13px; margin-top: 6px; }
.word-sec .ws-src { color: var(--faint); font-size: 11px; margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.word-sec .ws-note { color: var(--ink-2); font-size: 13px; }
.colloc-list { display: flex; flex-direction: column; gap: 6px; }
.colloc-list div { font-family: var(--latin); font-size: 14px; color: var(--ink-2); }
.colloc-list div span { color: var(--muted); font-family: var(--sans); font-size: 12px; margin-left: 6px; }
.vn-item { padding: 10px 0; border-bottom: 1px dashed var(--line-soft); }
.vn-item:last-child { border-bottom: 0; padding-bottom: 0; }
.vn-item .vn-term { font-family: var(--latin); font-size: 14px; color: var(--ink); font-weight: 600; }
.vn-item .ws-note { margin-top: 4px; line-height: 1.7; }
.sn-wrap { margin: -8px 2px 16px; padding: 12px 14px; border-left: 2px solid var(--gold-dim); background: var(--panel-2); border-radius: 0 8px 8px 0; }
.sn-label { font-size: 10px; letter-spacing: .2em; color: var(--gold-dim); margin-bottom: 8px; }
.sn-item { padding: 6px 0; border-bottom: 1px dashed var(--line-soft); }
.sn-item:last-child { border-bottom: 0; padding-bottom: 0; }
.sn-item .sn-loc { font-family: var(--latin); font-size: 11px; color: var(--faint); margin-bottom: 3px; }
.sn-item .ws-note { margin-top: 4px; line-height: 1.65; }

/* ---------- 训练 ---------- */
.train-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.train-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; min-height: 168px; cursor: pointer; }
.train-card .tc-ic { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--panel-2); color: var(--gold-2); border: 1px solid var(--line-soft); }
.train-card h3 { font-size: 17px; }
.train-card p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.train-card .tc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--faint); }
.train-card .tc-foot b { color: var(--gold-2); font-family: var(--latin); font-weight: 500; }
.train-card.wide { grid-column: span 2; }
.train-card.disabled { opacity: .55; pointer-events: none; }

.session-top { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border-bottom: 1px solid var(--line-soft); }
.session-top .st-title { font-family: var(--serif); font-size: 15px; letter-spacing: .1em; }
.session-top .st-progress { flex: 1; }
.session-top .st-count { font-family: var(--latin); font-size: 12px; color: var(--muted); white-space: nowrap; }
.session-body { padding: 22px; }
.session-foot { padding: 14px 22px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bar { height: 3px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold-2)); border-radius: 99px; transition: width .45s var(--ease); }

.flash-wrap { max-width: 620px; margin: 0 auto; }
.fc {
  position: relative; border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel)); padding: 30px 28px 26px;
  min-height: 320px; display: flex; flex-direction: column; justify-content: center;
}
.fc .fc-hint { font-size: 10.5px; letter-spacing: .26em; color: var(--gold-dim); text-transform: uppercase; margin-bottom: 14px; }
.fc .fc-word { font-family: var(--latin); font-size: clamp(36px, 7vw, 52px); line-height: 1.15; letter-spacing: .01em; }
.fc .fc-ipa { color: var(--gold-dim); font-size: 14px; margin-top: 8px; }
.fc .fc-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.fc .fc-back { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); display: none; }
.fc.revealed .fc-back { display: block; animation: fadeUp .35s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fc .senses { font-size: 15px; color: var(--ink); }
.fc .senses .pos { color: var(--gold-dim); font-size: 11.5px; margin-right: 5px; }
.fc .ex { margin-top: 16px; }
.fc .ex .ex-en { font-family: var(--latin); font-size: 16.5px; line-height: 1.7; }
.fc .ex .ex-zh { color: var(--muted); font-size: 13px; margin-top: 6px; }
.fc .ex .ex-src { color: var(--faint); font-size: 10.5px; margin-top: 8px; }
.fc .mnemonic { margin-top: 14px; padding: 10px 12px; border-left: 2px solid var(--gold-dim); background: var(--panel-3); border-radius: 0 10px 10px 0; font-size: 12.5px; color: var(--ink-2); }
.srs-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.srs-btns button {
  padding: 12px 8px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--panel); color: var(--ink-2); cursor: pointer; font-size: 13px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; transition: all .2s var(--ease);
}
.srs-btns button span { font-size: 10px; color: var(--faint); }
.srs-btns button:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.srs-btns button.q0:hover { border-color: var(--red-2); color: var(--red); }
.srs-btns button.q1:hover { border-color: var(--gold-dim); }
.srs-btns button.q2:hover { border-color: var(--moss); color: var(--moss-2); }

.q-wrap { max-width: 720px; margin: 0 auto; }
.q-block { margin-bottom: 18px; }
.q-stem { font-family: var(--serif); font-size: 19px; line-height: 1.6; margin-bottom: 14px; }
.q-stem .q-word { font-family: var(--latin); font-size: 26px; color: var(--gold-2); }
.q-sub { color: var(--muted); font-size: 12.5px; margin-top: -6px; margin-bottom: 12px; }
.q-options { display: flex; flex-direction: column; gap: 9px; }
.opt {
  display: flex; align-items: flex-start; gap: 11px; padding: 12px 15px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel);
  color: var(--ink-2); font-size: 14px; cursor: pointer; transition: all .18s var(--ease);
  line-height: 1.6; width: 100%;
}
.opt:hover { border-color: var(--gold-dim); background: var(--panel-2); }
.opt .opt-key {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-family: var(--latin); color: var(--muted);
}
.opt.selected { border-color: var(--gold); background: var(--panel-3); }
.opt.selected .opt-key { border-color: var(--gold); color: var(--gold-2); }
.opt.correct { border-color: var(--moss); background: rgba(127, 156, 134, .10); }
.opt.correct .opt-key { border-color: var(--moss); color: var(--moss-2); }
.opt.wrong { border-color: var(--red-2); background: rgba(192, 106, 82, .10); }
.opt.wrong .opt-key { border-color: var(--red-2); color: var(--red); }
.opt[disabled] { cursor: default; }
.opt.dim { opacity: .55; }
.q-feedback {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--panel-2); font-size: 13px; color: var(--ink-2);
  animation: fadeUp .3s var(--ease) both;
}
.q-feedback.ok { border-color: var(--moss); }
.q-feedback.no { border-color: var(--red-2); }
.q-feedback b { color: var(--gold-2); font-weight: 500; }
.q-feedback .fx-src { color: var(--faint); font-size: 11px; margin-top: 6px; }
.spell-input { display: flex; gap: 10px; align-items: center; }
.spell-input input {
  flex: 1; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 16px; font-family: var(--latin); font-size: 20px; color: var(--ink); letter-spacing: .02em;
}
.spell-input input:focus { outline: none; border-color: var(--gold-dim); }

.passage {
  font-family: var(--latin); font-size: 15.5px; line-height: 1.9; color: var(--ink-2);
  max-height: 46vh; overflow: auto; padding-right: 8px;
}
.passage p { margin-bottom: 12px; }
.passage .para-label { color: var(--gold-dim); font-family: var(--sans); font-size: 11px; margin-right: 6px; letter-spacing: .1em; }
.passage::-webkit-scrollbar { width: 6px; }
.passage::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.passage-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

.cloze-text { font-family: var(--latin); font-size: 16px; line-height: 2.1; color: var(--ink-2); }
.cloze-text .blank {
  display: inline-flex; align-items: center; justify-content: center; min-width: 74px;
  padding: 0 6px; margin: 0 2px; border-bottom: 1px solid var(--gold-dim);
  color: var(--gold-2); cursor: pointer; font-family: var(--sans); font-size: 13px;
}
.cloze-text .blank.filled { background: var(--panel-3); border-radius: 6px; }
.cloze-text .blank.active { border-color: var(--gold-2); background: var(--panel-3); }
.opt-bank { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.opt-bank button {
  padding: 7px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink-2); cursor: pointer; font-family: var(--latin); font-size: 14px;
}
.opt-bank button:hover { border-color: var(--gold-dim); }
.opt-bank button.used { opacity: .3; }

.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.match-passage { max-height: 52vh; overflow: auto; }
.match-para { padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }
.match-para b { color: var(--gold-2); font-family: var(--latin); margin-right: 6px; }
.match-items { display: flex; flex-direction: column; gap: 9px; }
.match-item {
  display: grid; grid-template-columns: 22px 1fr 54px; gap: 10px; align-items: start;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  font-size: 12.5px; color: var(--ink-2);
}
.match-item select {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; color: var(--gold-2);
  padding: 4px 6px; font-family: var(--latin); font-size: 14px;
}
.match-item.correct { border-color: var(--moss); }
.match-item.wrong { border-color: var(--red-2); }

.trans-box { display: grid; grid-template-columns: 1fr; gap: 14px; }
.prompt-zh {
  font-family: var(--serif); font-size: 16.5px; line-height: 2; color: var(--ink-2);
  padding: 16px; border-left: 2px solid var(--gold-dim); background: var(--panel-2); border-radius: 0 12px 12px 0;
}
.reference { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); font-family: var(--latin); font-size: 15px; line-height: 1.8; color: var(--ink-2); white-space: pre-wrap; }
.kv-list { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.kv-list div { display: flex; gap: 8px; }
.kv-list .k { font-family: var(--latin); color: var(--gold-2); white-space: nowrap; }
.kv-list .v { color: var(--muted); }

.self-check { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.self-check button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.self-check button.on { border-color: var(--moss); color: var(--moss-2); background: rgba(127, 156, 134, .1); }

/* ---------- 影子 ---------- */
.shadow-intro { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.shadow-intro .si-text { font-family: var(--serif); font-size: 17px; line-height: 1.9; color: var(--ink-2); }
.shadow-intro .si-mark { width: 84px; height: 84px; border-radius: 50%; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--gold-dim); }
.shadow-list { display: flex; flex-direction: column; gap: 10px; }
.shadow-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--panel); cursor: pointer; transition: all .2s;
}
.shadow-row:hover { border-color: var(--gold-dim); transform: translateY(-1px); }
.shadow-row .sr-w { font-family: var(--latin); font-size: 19px; }
.shadow-row .sr-meta { flex: 1; min-width: 0; }
.shadow-row .sr-meta span { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shadow-row .sr-meta em { font-style: normal; color: var(--faint); font-size: 10.5px; }

.shadow-test { text-align: center; padding: 14px 0 4px; }
.shadow-test .st-word { font-family: var(--latin); font-size: clamp(34px, 6vw, 46px); }
.shadow-test .st-ipa { color: var(--gold-dim); font-size: 13px; margin-top: 4px; }
.shadow-reveal { margin-top: 18px; text-align: left; }

/* ---------- 旅程 ---------- */
.level-card { padding: 26px; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.level-seal { width: 118px; height: 118px; border-radius: 50%; border: 1px solid var(--gold-dim); display: flex; align-items: center; justify-content: center; position: relative; background: radial-gradient(circle, var(--panel-3), transparent 70%); }
.level-seal .ls-num { font-family: var(--latin); font-size: 40px; color: var(--gold-2); line-height: 1; }
.level-seal .ls-lv { position: absolute; bottom: 18px; font-size: 9px; letter-spacing: .3em; color: var(--muted); }
.level-main h2 { font-size: 26px; }
.level-main .lm-ch { color: var(--gold-dim); font-size: 11px; letter-spacing: .2em; margin: 6px 0 10px; }
.level-main .lm-xp { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 10px; }
.level-main .bar { margin-top: 10px; }

.mastery-list { display: flex; flex-direction: column; gap: 12px; }
.mastery-row { display: grid; grid-template-columns: 120px 1fr 44px; gap: 12px; align-items: center; font-size: 12.5px; }
.mastery-row .mr-name { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mastery-row .mr-pct { font-family: var(--latin); color: var(--gold-2); text-align: right; }

.badge-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.badge {
  padding: 14px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: var(--panel); color: var(--muted); transition: all .25s;
}
.badge .ic { color: var(--gold-dim); }
.badge b { font-family: var(--serif); font-size: 12.5px; font-weight: 500; color: var(--ink-2); letter-spacing: .06em; }
.badge span { font-size: 10px; color: var(--faint); line-height: 1.5; }
.badge.unlocked { border-color: var(--gold-dim); background: linear-gradient(160deg, var(--panel-3), var(--panel)); }
.badge.unlocked .ic { color: var(--gold-2); }
.badge.locked { opacity: .48; filter: grayscale(.5); }

.journal-list { display: flex; flex-direction: column; gap: 10px; }
.journal-item { padding: 14px 16px; border-left: 2px solid var(--gold-dim); background: var(--panel); border-radius: 0 12px 12px 0; }
.journal-item .ji-meta { font-size: 10.5px; color: var(--faint); letter-spacing: .08em; }
.journal-item p { font-family: var(--serif); font-size: 14px; line-height: 1.9; color: var(--ink-2); margin-top: 4px; }

.settings-list { display: flex; flex-direction: column; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 2px; border-bottom: 1px solid var(--line-soft); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .sr-label { font-size: 13.5px; }
.setting-row .sr-label span { display: block; font-size: 11px; color: var(--muted); }
.setting-row select, .setting-row input[type="number"] {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink);
  padding: 7px 10px; border-radius: 8px; font-family: var(--sans); font-size: 13px;
}
.setting-row input[type="range"] { accent-color: var(--gold); width: 140px; }
.switch { position: relative; width: 42px; height: 24px; border-radius: 99px; background: var(--line); border: 0; cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: transform .2s; }
.switch.on { background: var(--gold-dim); }
.switch.on::after { transform: translateX(18px); background: #1a1508; }

/* ---------- 热力图 ---------- */
.heat { display: flex; gap: 3px; overflow-x: auto; padding: 4px 0; }
.heat-cols { display: flex; gap: 3px; }
.heat-col { display: flex; flex-direction: column; gap: 3px; }
.heat-cell { width: 11px; height: 11px; border-radius: 3px; background: var(--line-soft); display: block; }
.heat-cell.l1 { background: rgba(127, 156, 134, .28); }
.heat-cell.l2 { background: rgba(127, 156, 134, .5); }
.heat-cell.l3 { background: rgba(201, 169, 106, .62); }
.heat-cell.l4 { background: var(--gold-2); }
.heat-cell.empty { background: transparent; }
.heat-legend { display: flex; align-items: center; gap: 5px; justify-content: flex-end; font-size: 10px; color: var(--faint); margin-top: 6px; }

/* ---------- 空态 / 提示 ---------- */
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty-ic { display: inline-flex; width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line); align-items: center; justify-content: center; color: var(--gold-dim); margin-bottom: 12px; }
.empty h4 { font-family: var(--serif); font-size: 16px; color: var(--ink-2); margin-bottom: 6px; }
.empty p { font-size: 12.5px; margin-bottom: 14px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.faint { color: var(--faint); }
.serif { font-family: var(--serif); }
.latin { font-family: var(--latin); }
.gold { color: var(--gold-2); }
.nowrap { white-space: nowrap; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.divider { height: 1px; background: var(--line-soft); margin: 18px 0; }

/* ---------- 遮罩 / 弹层 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: var(--scrim); backdrop-filter: blur(6px); padding: 22px;
  animation: ovIn .22s var(--ease) both;
}
.overlay.hidden { display: none; }
.overlay.closing { animation: ovOut .18s var(--ease) both; }
@keyframes ovIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ovOut { from { opacity: 1; } to { opacity: 0; } }
.sheet {
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow); animation: sheetIn .3s var(--ease) both;
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: none; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.sheet-head h3 { font-size: 17px; }
.sheet-body { padding: 20px 22px; }
.sheet-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; }
.overlay-session { padding: 0; align-items: center; }
.overlay-session .sheet { max-width: 860px; max-height: 100vh; border-radius: 0; border: 0; min-height: 100vh; animation: sheetUp .3s var(--ease) both; }
@media (min-width: 760px) { .overlay-session { padding: 28px; } .overlay-session .sheet { min-height: 0; border: 1px solid var(--line); border-radius: 22px; max-height: 92vh; } }
@media (max-width: 759px) { .overlay-session { align-items: stretch; } }
@keyframes sheetUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* toast */
.toast { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 420px); }
.toast-item {
  background: var(--panel-3); border: 1px solid var(--gold-dim); border-radius: 12px;
  padding: 9px 16px; text-align: center; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px); transition: all .3s var(--ease);
}
.toast-item.show { opacity: 1; transform: none; }
.toast-item b { display: block; font-family: var(--serif); font-size: 13px; font-weight: 500; color: var(--gold-2); letter-spacing: .06em; }
.toast-item span { display: block; font-size: 11px; color: var(--muted); }

/* ---------- 移动端 ---------- */
.tabbar { display: none; }
@media (max-width: 880px) {
  .topbar { padding: 14px 18px 10px; }
  .nav { display: none; }
  .main { padding: 16px 18px calc(84px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    backdrop-filter: blur(16px); border-top: 1px solid var(--line);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 10px; letter-spacing: .1em; }
  .tabbar a .ic { width: 21px; height: 21px; }
  .tabbar a.active { color: var(--gold-2); }
  .hero { grid-template-columns: 1fr; padding: 22px; }
  .hero-side { border-left: 0; border-top: 1px solid var(--line-soft); padding-left: 0; padding-top: 18px; justify-content: flex-start; }
  .today-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .sense-row { grid-template-columns: 84px minmax(0, 1fr) 32px; gap: 6px; }
  .cluster-grid { grid-template-columns: 1fr; }
  .train-grid { grid-template-columns: 1fr 1fr; }
  .train-card.wide { grid-column: span 2; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .match-grid { grid-template-columns: 1fr; }
  .match-passage { max-height: 30vh; }
  .badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .level-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .level-main { text-align: center; }
  .word-row { grid-template-columns: minmax(90px, 1fr) auto; gap: 6px 12px; }
  .word-row .wr-ipa { grid-column: 1; font-size: 11px; }
  .word-row .wr-mean { grid-column: 1 / -1; }
  .word-row .wr-right { grid-column: 2; grid-row: 1; }
  .session-body { padding: 16px; }
  .session-top { padding: 12px 16px; }
  .fc { padding: 22px 18px; }
  .q-stem { font-size: 17px; }
  .shadow-intro { grid-template-columns: 1fr; }
  .shadow-intro .si-mark { display: none; }
  .toast { bottom: 86px; }
  .top-actions .xp-pill { font-size: 11px; padding: 4px 9px; }
  .page-head h1 { font-size: 26px; }
}
@media (max-width: 420px) {
  .train-grid { grid-template-columns: 1fr; }
  .train-card.wide { grid-column: auto; }
  .brand-en { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- 阅读 ---------- */
.reader-note { margin-bottom: 18px; }
.reader-note p { margin-top: 8px; max-width: 66ch; }
.read-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.read-card { padding: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; min-height: 172px; }
.read-card:hover { border-color: var(--gold-dim); }
.read-card.is-read { border-color: rgba(127, 156, 134, .35); }
.rc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rc-unit { font-size: 10px; letter-spacing: .18em; color: var(--gold-dim); }
.read-card h3 { font-size: 17px; line-height: 1.45; }
.rc-sub { font-family: var(--latin); font-size: 12.5px; line-height: 1.6; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-meta { margin-top: auto; display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); }

.reader-page { max-width: 820px; margin: 0 auto; }
.reader-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.reader-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.reader-head { margin: 18px 0 4px; }
.reader-head h1 { font-size: clamp(26px, 4.2vw, 38px); line-height: 1.35; margin-top: 7px; }
.reader-sub { font-family: var(--latin); color: var(--muted); font-size: 14px; margin-top: 8px; }
.reader-hint { color: var(--faint); font-size: 11.5px; margin-top: 10px; }
.reader-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 18px 0 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.reader-toolbar .chip { display: inline-flex; align-items: center; gap: 5px; }
.reader-body { max-width: 720px; margin: 0 auto; }
.reader-body p {
  font-family: var(--latin); font-size: 17.5px; line-height: 2.08; color: var(--ink-2);
  margin: 0 0 22px; position: relative;
}
.reader-body p:hover .rd-para { opacity: 1; }
.rd-para { position: absolute; right: -26px; top: 6px; opacity: 0; transition: opacity .2s; }
.reader-body.no-hl .rd-token.is-new { border-bottom-color: transparent; }
.rd-token {
  display: inline; padding: 0; margin: 0; border: 0; background: transparent;
  font: inherit; color: inherit; letter-spacing: inherit; line-height: inherit;
  cursor: pointer; border-bottom: 1px dotted transparent; border-radius: 2px;
  transition: color .15s, border-color .15s;
}
.rd-token:hover, .rd-token:focus-visible { color: var(--gold-2); border-bottom-color: var(--gold); outline: none; }
.rd-token.is-new { border-bottom: 1px dotted var(--gold-dim); }
.rd-token.is-learned { color: var(--muted); }
.rd-token.rd-unknown { color: var(--ink); }
.rd-token.rd-unknown:hover { color: var(--gold-2); }
.rd-token.rd-nav-focus { background: var(--glow); border-radius: 4px; box-shadow: 0 0 0 3px var(--glow); color: var(--gold-2); }
.reader-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.reader-foot .btn { max-width: 44%; overflow: hidden; text-overflow: ellipsis; }

.en-def { margin-top: 12px; font-family: var(--latin); font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.en-def .en-label { font-family: var(--sans); font-size: 9px; letter-spacing: .24em; color: var(--gold-dim); margin-right: 7px; vertical-align: 1px; }

@media (max-width: 880px) {
  .read-grid { grid-template-columns: 1fr; }
  .tabbar a { font-size: 9px; letter-spacing: .03em; }
  .tabbar a .ic { width: 19px; height: 19px; }
  .reader-body p { font-size: 16.5px; line-height: 1.95; }
  .rd-para { position: static; margin-left: 6px; opacity: .5; }
  .reader-foot .btn { max-width: 100%; }
  .reader-foot { flex-wrap: wrap; }
}


/* 同义词 chips */
.syn-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.syn-chip { font-family: var(--latin, Georgia, serif); font-size: 13px; color: var(--gold); border: 1px solid rgba(200,166,90,.32); border-radius: 999px; padding: 3px 10px; background: rgba(200,166,90,.06); }
.fc-syn { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 4px; font-size: 12px; color: var(--muted); align-items: center; }
.fc-syn-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.fc-syn span:not(.fc-syn-label) { font-family: var(--latin, Georgia, serif); color: var(--gold); }


/* 三选一 / 15词匹配 / 课本原题 */
.blank-line { display: inline-block; min-width: 54px; border-bottom: 1px dashed var(--gold-dim); margin: 0 3px; }
.match-select { width: 100%; max-width: 340px; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2, rgba(255,255,255,.03)); color: var(--ink); font-family: var(--latin); font-size: 14px; }
.match-select:focus { outline: none; border-color: var(--gold-dim); }


/* 错词画像 / 记忆强度（纯前端推算，无新存档字段） */
.cluster-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.cluster-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: rgba(127,156,134,.05); }
.cluster-item .ci-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cluster-item .ci-top b { font-size: 14px; font-weight: 500; color: var(--ink); }
.cluster-item .ci-top span { font-size: 12px; color: var(--gold); }
.ci-words { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ci-words span { font-family: var(--latin); font-size: 12px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.mem-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.mem-row { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 10px; }
.mem-row b { font-family: var(--latin); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem-bar { height: 6px; border-radius: 6px; background: var(--line-soft); overflow: hidden; }
.mem-bar i { display: block; height: 100%; background: var(--moss); }
@media (max-width: 620px) { .mem-row { grid-template-columns: 90px 1fr; } .mem-row > span { grid-column: 1 / -1; } }

/* 方法讲义：长文阅读，层次色整体加深一档（只影响讲义页，不动其他页面） */
.page-method { --muted: #3d483d; --faint: #4e5a4e; --ink-2: #1c241c; }
:root[data-theme="dark"] .page-method { --muted: #c2ccc0; --faint: #abb7aa; --ink-2: #f2eee2; }

/* 分义项例句：每个义项一行小标题 + 例句 + 译文 */
.sense-ex-sec .se-item { padding: 9px 0; border-bottom: 1px dashed var(--line-soft); }
.sense-ex-sec .se-item:last-child { border-bottom: 0; padding-bottom: 0; }
.sense-ex-sec .se-item:first-child { padding-top: 0; }
.sense-ex-sec .se-def { font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.sense-ex-sec .se-def .pos { color: var(--gold-dim); font-size: 11.5px; margin-right: 5px; }
.sense-ex-sec .ws-en { font-size: 15px; }
.sense-ex-sec .audio-btn { vertical-align: middle; margin-left: 4px; }
