/* ============================================================
   句光 Sentence Glow · 设计系统
   参照 word-atlas.org 的星空夜色 + 衬线优雅，沿用新东方书橙色
   ============================================================ */

:root {
  --bg: #0d1120;
  --bg-2: #11162a;
  --panel: #161c33;
  --panel-2: #1a2140;
  --line: rgba(240, 234, 216, 0.09);
  --line-strong: rgba(240, 234, 216, 0.16);
  --text: #efead8;
  --text-2: #b7bdcf;
  --text-dim: #7f879e;
  --accent: #e86c2c;        /* 新东方书橙 */
  --accent-soft: rgba(232, 108, 44, 0.14);
  --gold: #e3b341;          /* 星光金 */
  --gold-soft: rgba(227, 179, 65, 0.16);
  --gold-band: rgba(227, 179, 65, 0.26);  /* 句中目标词荧光带 */
  --green: #5cb37a;
  --green-soft: rgba(92, 179, 122, 0.15);
  --red: #e26d5a;
  --blue: #6ea3d8;
  --serif: "Source Han Serif SC", "思源宋体", "Noto Serif SC", "Songti SC", "STZhongsong", "SimSun", Georgia, "Times New Roman", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "微软雅黑", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  --maxw: 1080px;
}

html[data-theme="light"] {
  --bg: #f6f1e6;
  --bg-2: #efe8d8;
  --panel: #fffdf7;
  --panel-2: #f7f2e6;
  --line: rgba(35, 40, 59, 0.12);
  --line-strong: rgba(35, 40, 59, 0.22);
  --text: #23283b;
  --text-2: #4c5468;
  --text-dim: #838b9e;
  --accent-soft: rgba(232, 108, 44, 0.12);
  --gold: #b98a1e;
  --gold-soft: rgba(185, 138, 30, 0.14);
  --gold-band: rgba(185, 138, 30, 0.22);
  --shadow: 0 18px 44px rgba(35, 40, 59, 0.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
html[data-theme="dark"] #sky { position: fixed; inset: 0; z-index: 0; }
html[data-theme="light"] #sky { display: none; }

#app { position: relative; z-index: 1; }

::selection { background: var(--gold-soft); color: var(--text); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 22px;
  padding: 14px clamp(18px, 4vw, 44px);
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 9px; flex: none; }
.brand-mark { color: var(--gold); display: inline-flex; transform: translateY(4px); }
.brand-name { font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: 2px; white-space: nowrap; }
.brand-en { font-family: Georgia, serif; font-style: italic; font-size: 13px; color: var(--text-dim); letter-spacing: 1px; white-space: nowrap; }
.mainnav { display: flex; gap: 4px; margin-left: 8px; }
.mainnav a {
  padding: 7px 15px; border-radius: 999px; font-size: 14.5px; color: var(--text-2);
  transition: all 0.18s ease; white-space: nowrap; flex: none;
}
.mainnav a:hover { color: var(--text); background: var(--line); }
.mainnav a.active { color: var(--bg); background: var(--text); font-weight: 600; }
html[data-theme="light"] .mainnav a.active { color: #fffdf7; background: #23283b; }
.topbar-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.search-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--text-dim); font-size: 13px; transition: all 0.18s ease;
}
.search-btn:hover { border-color: var(--line-strong); color: var(--text-2); }
.search-btn kbd {
  font-size: 10.5px; padding: 2px 6px; border-radius: 5px;
  background: var(--line); color: var(--text-dim); font-family: var(--sans);
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); font-size: 15px;
  transition: all 0.18s ease;
}
.icon-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }

/* ---------- 布局 ---------- */
.app { max-width: var(--maxw); margin: 0 auto; padding: 34px clamp(18px, 4vw, 44px) 70px; }
.footer {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto;
  padding: 26px clamp(18px, 4vw, 44px) 40px;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line); color: var(--text-dim); font-size: 12.5px;
}
.foot-brand { display: flex; align-items: center; gap: 8px; color: var(--gold); font-family: var(--serif); font-size: 16px; }
.foot-links { display: flex; gap: 18px; align-items: center; }
.foot-links a:hover { color: var(--text-2); }

/* ---------- 通用组件 ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.eyebrow { font-size: 12px; letter-spacing: 3px; color: var(--text-dim); text-transform: uppercase; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-size: 15px; font-weight: 600;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--text); color: var(--bg); }
html[data-theme="light"] .btn-primary { background: #23283b; color: #fffdf7; }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(0,0,0,0.3); }
.btn-gold { background: linear-gradient(135deg, var(--gold), #d99b26); color: #221a08; }
.btn-ghost { background: var(--panel); border: 1px solid var(--line-strong); color: var(--text-2); }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text-2);
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
html[data-theme="light"] .chip.on { background: #23283b; color: #fffdf7; }
.chip-accent.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip-gold.on { background: var(--gold); color: #221a08; border-color: var(--gold); }
.badge {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
}
.badge-list { background: var(--accent-soft); color: var(--accent); }
.badge-exam { background: var(--gold-soft); color: var(--gold); }
.badge-pos { background: var(--green-soft); color: var(--green); }
.badge-seg { background: var(--line); color: var(--text-dim); font-weight: 500; letter-spacing: 0.5px; }
html[data-theme="light"] .badge-list { background: rgba(232,108,44,0.14); }
html[data-theme="light"] .badge-exam { background: rgba(185,138,30,0.16); }

/* 句/词/义 标签 —— 沿用书里的小橙签 */
.tagchip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 5px;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  flex: none;
}
.tagchip.gold { background: var(--gold); color: #221a08; }
.tagchip.dim { background: var(--line); color: var(--text-2); }

/* ---------- 首页 ---------- */
.hello-date { color: var(--text-dim); font-size: 13px; letter-spacing: 2px; margin-bottom: 6px; }
.hello h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.25; margin-bottom: 28px; }
.hello h1 em { font-style: normal; color: var(--gold); }

.journey-hero {
  position: relative; overflow: hidden;
  border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(115deg, var(--panel-2) 0%, var(--panel) 46%), var(--panel);
  padding: clamp(24px, 4vw, 40px);
  display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 26px; align-items: center;
}
.journey-hero::after {
  content: ""; position: absolute; right: -60px; top: -70px; width: 340px; height: 340px;
  background: radial-gradient(circle, var(--gold-soft), transparent 62%);
  pointer-events: none;
}
.journey-copy .eyebrow { margin-bottom: 10px; }
.journey-copy h2 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.3; }
.journey-copy h2 .num { color: var(--gold); }
.journey-copy p { color: var(--text-2); margin: 12px 0 20px; font-size: 14.5px; }
.journey-side { display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; z-index: 1; }
.journey-side .constellation { width: 100%; max-width: 250px; filter: drop-shadow(0 8px 30px rgba(227,179,65,0.25)); }
.journey-side .hint { font-size: 12px; color: var(--text-dim); letter-spacing: 2px; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.stat-card { text-align: center; padding: 18px 10px 16px; }
.stat-card .num { font-family: var(--serif); font-size: 30px; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-card .num.gold { color: var(--gold); }
.stat-card .num.orange { color: var(--accent); }
.stat-card .num.green { color: var(--green); }
.stat-card .label { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; letter-spacing: 1px; }

.home-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-top: 22px; align-items: start; }

/* 今日一词：句子先行 */
.wotd-card { padding: 22px; }
.wotd-card .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.wotd-card .head .eyebrow { letter-spacing: 2px; }
.sentence-block { margin: 0; }
.sentence-en {
  font-family: var(--serif); font-size: 18.5px; line-height: 1.7; color: var(--text);
}
/* 句中目标词：星光金荧光带（卡片/弹层/今日一词通用） */
.tw {
  color: var(--gold); font-weight: 700;
  background: linear-gradient(0deg, var(--gold-band), var(--gold-band)) no-repeat left bottom / 100% 46%;
  padding: 0 3px; border-radius: 3px;
  text-shadow: 0 0 12px var(--gold-soft);
}
.sentence-en .blank {
  display: inline-block; min-width: 76px; text-align: center;
  border-bottom: 2px solid var(--accent); color: var(--accent);
  font-weight: 700; letter-spacing: 2px; margin: 0 2px;
  cursor: pointer; transition: all 0.2s ease;
}
.sentence-en .blank:hover { background: var(--accent-soft); border-radius: 4px; }
.sentence-en .blank.done { color: var(--gold); border-color: var(--gold); }
.sentence-cn { color: var(--text-dim); font-size: 14px; margin-top: 7px; }
.wotd-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 10px; }
.word-reveal { display: flex; align-items: baseline; gap: 12px; margin-top: 4px; min-height: 40px; }
.word-reveal .w { font-family: var(--serif); font-size: 27px; font-weight: 700; }
.word-reveal .p { color: var(--text-dim); font-size: 14px; }
.tts-row { display: flex; gap: 8px; }
.tts-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text-2);
  transition: all 0.16s ease;
}
.tts-btn:hover { border-color: var(--gold); color: var(--gold); }
.tts-btn .dialect { font-size: 11px; color: var(--accent); font-weight: 700; }

/* 本周打卡 */
.week-card { padding: 20px 22px; }
.week-card h3 { font-size: 17px; margin-bottom: 4px; }
.streak-line { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 13px; margin-bottom: 14px; }
.streak-line .flame { color: var(--accent); }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.week-day { text-align: center; }
.week-day .dot {
  width: 34px; height: 34px; margin: 0 auto 5px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text-dim);
  font-size: 12px;
}
.week-day.lit .dot { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.week-day.today .dot { box-shadow: 0 0 0 2px var(--line-strong); }
.week-day .lab { font-size: 11px; color: var(--text-dim); }

/* 词单进度 —— 42 个词单，双栏可滚动 */
.lists-rows { display: grid; grid-template-columns: 1fr 1fr; column-gap: 30px; max-height: 360px; overflow-y: auto; padding-right: 6px; }
.lists-rows::-webkit-scrollbar { width: 5px; }
.lists-rows::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }
.lists-card h3 { font-size: 17px; margin-bottom: 14px; }
.list-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; }
.list-row .name { font-size: 13.5px; color: var(--text-2); white-space: nowrap; }
.list-row .name b { color: var(--text); font-weight: 600; }
.list-row .bar { height: 7px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.list-row .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width 0.5s ease; }
.list-row .pct { font-size: 12px; color: var(--text-dim); min-width: 52px; text-align: right; }

/* ---------- 句库 ---------- */
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 8px; }
.page-head p { color: var(--text-dim); margin: 0; font-size: 14px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filter-bar .divider { width: 1px; height: 20px; background: var(--line-strong); margin: 0 6px; }
.result-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin: 18px 2px 14px; }
.result-meta .count { color: var(--text-dim); font-size: 13px; }
.view-toggle { display: flex; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.view-toggle button { padding: 6px 14px; border-radius: 999px; font-size: 12.5px; color: var(--text-dim); }
.view-toggle button.on { background: var(--line-strong); color: var(--text); }

/* 句子卡片 —— 网格视图 */
.sentence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.sentence-card {
  position: relative; text-align: left; width: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 14px; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  display: flex; flex-direction: column; gap: 10px;
}
.sentence-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.sentence-card .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sentence-card .status-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--text-dim); opacity: 0.45; margin-right: 2px; }
.sentence-card[data-status="learning"] .status-dot { background: var(--gold); opacity: 1; }
.sentence-card[data-status="mastered"] .status-dot { background: var(--green); opacity: 1; }
.sentence-card .sc-sentence { font-family: var(--serif); font-size: 15.5px; line-height: 1.65; color: var(--text); flex: 1; }
.sentence-card .sc-cn { color: var(--text-dim); font-size: 13px; }
.sentence-card .sc-word {
  display: flex; flex-direction: column; gap: 3px;
  border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 2px;
}
.sentence-card .sc-word-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sentence-card .sc-word .w { font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--accent); letter-spacing: 0.5px; }
.sentence-card .sc-word .p { font-size: 12.5px; color: var(--text-dim); }
.sentence-card .sc-mean {
  font-size: 12.5px; color: var(--text-2); line-height: 1.55;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.sentence-card.wordcard .sc-word { border-top: none; padding-top: 2px; }
.sentence-card.wordcard .sc-word .w { font-size: 25px; }
.sentence-card.hidden-word .sc-cn { filter: blur(6px); transition: filter 0.25s ease; }
.sentence-card.hidden-word:hover .sc-cn, .sentence-card.hidden-word:focus-within .sc-cn { filter: blur(0); }
/* 未学卡片：单词释义预先模糊，悬停揭开 */
.sentence-card.hidden-word .sc-mean { filter: blur(6px); transition: filter 0.25s ease; }
.sentence-card.hidden-word:hover .sc-mean, .sentence-card.hidden-word:focus-within .sc-mean { filter: blur(0); }
/* 触摸单击揭开释义；长按进详情（见 app.js bindCardOpens） */
.sentence-card.revealed .sc-cn, .sentence-card.revealed .sc-mean { filter: blur(0); }
.sentence-card { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* 无句词条的词卡变体（高考进阶等） */
.sentence-card.wordcard .sc-cn { color: var(--text-2); font-size: 13.5px; }

/* emoji 插画卡（兜底层）：与插图/星座图同一 4:3 版式 */
.emoji-illu {
  width: 100%; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  border-radius: 18px; border: 1px solid var(--line);
  background:
    radial-gradient(420px 200px at 70% 20%, var(--gold-soft), transparent 70%),
    var(--panel-2);
}
.emoji-illu span {
  font-size: clamp(60px, 7vw, 92px); line-height: 1;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.35));
  transition: transform 0.25s ease;
}
.emoji-illu:hover span { transform: scale(1.08) rotate(-3deg); }
.journey-side .emoji-illu span { font-size: 58px; }
.done-wrap .emoji-illu { width: 240px; margin: 0 auto 8px; }

/* 详情页/旅程配图：统一 4:3 相框，插图居中不裁切，星座图同一版式 */
.illu {
  width: 100%; height: auto; display: block;
  border-radius: 18px; border: 1px solid var(--line);
}
.modal-visual .illu, .learn-visual .illu {
  width: 100%; aspect-ratio: 4 / 3; object-fit: contain;
  background:
    radial-gradient(420px 200px at 70% 20%, var(--gold-soft), transparent 70%),
    var(--panel-2);
}
.journey-side .illu { max-width: 250px; aspect-ratio: 4 / 3; object-fit: contain; background: var(--panel-2); box-shadow: 0 10px 34px rgba(0,0,0,0.35); }
.done-wrap .illu { width: 240px; margin: 0 auto 8px; display: block; aspect-ratio: 4 / 3; object-fit: contain; background: var(--panel-2); box-shadow: 0 10px 34px rgba(0,0,0,0.3); }
/* 星座图与插图同版式，配图区永远饱满 */
.modal-visual .constellation, .learn-visual .constellation, .journey-side .constellation, .done-wrap .constellation {
  background:
    radial-gradient(420px 200px at 70% 20%, var(--gold-soft), transparent 70%),
    var(--panel);
}

/* 列表视图 */
.list-view { display: flex; flex-direction: column; gap: 8px; }
.list-item {
  display: grid; grid-template-columns: 30px 1.5fr 1fr auto; gap: 14px; align-items: center;
  padding: 13px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  width: 100%; text-align: left; transition: border-color 0.15s ease;
}
.list-item:hover { border-color: var(--line-strong); }
.list-item .idx { color: var(--text-dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.list-item .s { font-family: var(--serif); font-size: 14.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .w { font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--accent); }
.list-item .m { color: var(--text-dim); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 星图 —— 始终保持夜空窗口 */
.starmap-wrap { position: relative; border-radius: 20px; border: 1px solid var(--line); overflow: hidden; background: radial-gradient(1200px 500px at 50% -100px, #1a2140, #0d1120); }
#starmap { display: block; width: 100%; height: 520px; cursor: pointer; }
.starmap-tip {
  position: absolute; pointer-events: none; padding: 8px 14px;
  background: #1a2140; border: 1px solid rgba(240, 234, 216, 0.16); border-radius: 10px;
  font-size: 13px; color: #efead8; opacity: 0; transition: opacity 0.15s ease;
  transform: translate(-50%, -130%); white-space: nowrap; z-index: 3;
}
.starmap-tip b { font-family: var(--serif); color: #e3b341; margin-right: 6px; }
.starmap-legend { position: absolute; left: 16px; bottom: 14px; display: flex; gap: 14px; font-size: 12px; color: #8b93a7; }
.starmap-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 99px; margin-right: 5px; }

/* ---------- 旅程（全屏学习流） ---------- */
.journey-root {
  position: fixed; inset: 0; z-index: 60; background: var(--bg);
  display: flex; flex-direction: column; overflow-y: auto;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.journey-top {
  display: flex; align-items: center; gap: 18px;
  padding: 18px clamp(20px, 5vw, 52px);
}
.journey-top .progress { flex: 1; height: 7px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.journey-top .progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 99px; transition: width 0.4s ease; }
.journey-top .step { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.journey-stage { flex: 1; max-width: 920px; width: 100%; margin: 0 auto; padding: 12px clamp(20px, 5vw, 52px) 60px; }
.stage-tag { display: flex; align-items: center; gap: 8px; color: var(--gold); font-size: 13px; letter-spacing: 2px; margin: 10px 0 22px; }
.stage-tag::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: var(--gold); }

.learn-card { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 30px; align-items: start; }
.learn-visual { position: sticky; top: 10px; }
.learn-visual .constellation { width: 100%; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); }
.learn-visual .vs-label { margin-top: 10px; text-align: center; color: var(--text-dim); font-size: 12px; letter-spacing: 2px; }

.sentence-stage .se-label, .detail-sec .se-label {
  display: flex; align-items: center; gap: 8px; margin-bottom: 9px;
  color: var(--text-dim); font-size: 12px; letter-spacing: 2px;
}
.journey-sentence { font-family: var(--serif); font-size: clamp(19px, 2.6vw, 23px); line-height: 1.75; }
.journey-sentence .blank {
  display: inline-block; min-width: 90px; text-align: center;
  border-bottom: 2.5px solid var(--accent); color: var(--accent);
  font-weight: 700; letter-spacing: 3px; margin: 0 3px; cursor: default;
}
.journey-sentence .blank.done { color: var(--gold); border-color: var(--gold); }
.journey-cn { color: var(--text-dim); margin-top: 10px; font-size: 14.5px; }

.reveal-zone { margin-top: 22px; }
.reveal-word {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.reveal-word .w { font-family: var(--serif); font-size: clamp(34px, 5vw, 46px); font-weight: 700; color: var(--gold); line-height: 1.15; }
.reveal-word .p { color: var(--text-dim); font-size: 15px; }
.defs { margin: 14px 0 4px; display: flex; flex-direction: column; gap: 7px; animation: rise 0.5s ease both; }
.defs .def { display: flex; gap: 10px; align-items: baseline; }
.defs .def .pos { color: var(--accent); font-style: italic; font-family: Georgia, serif; font-size: 14px; flex: none; min-width: 42px; }
.defs .def .d { color: var(--text); font-size: 15.5px; font-weight: 600; }
.notes { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
/* 考点块：词光风彩色分项框 */
.note-block { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px 12px; }
.note-block + .note-block { margin-top: 0; }
.note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.note-head b { font-size: 12.5px; color: var(--text-dim); letter-spacing: 1px; font-weight: 600; }
.note-points { display: flex; flex-direction: column; gap: 6px; }
.np {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 8px 11px; border-radius: 9px;
  font-size: 13.5px; line-height: 1.65; color: var(--text);
}
.np .np-num {
  flex: none; width: 18px; height: 18px; margin-top: 2px;
  border-radius: 99px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.np-gold  { background: var(--gold-soft); }
.np-gold .np-num  { background: var(--gold); color: #221a08; }
.np-green { background: var(--green-soft); }
.np-green .np-num { background: var(--green); color: #08130c; }
.np-blue  { background: rgba(110, 163, 216, 0.14); }
.np-blue .np-num  { background: var(--blue); color: #0c1622; }
.np-orange { background: var(--accent-soft); }
.np-orange .np-num { background: var(--accent); color: #fff; }
/* 辨析按句分行 */
.np .np-line { display: block; padding: 1.5px 0; }
html[data-theme="light"] .np-blue { background: rgba(110, 163, 216, 0.16); }

.journey-actions { margin-top: 30px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.journey-actions .spacer { flex: 1; }
.kbd-hint { color: var(--text-dim); font-size: 12px; }
.kbd-hint kbd { padding: 2px 7px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line); font-size: 11px; }
.grade-btn { flex: 1; min-width: 130px; padding: 13px 10px; border-radius: 13px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text-2); font-size: 14px; font-weight: 600; transition: all 0.16s ease; }
.grade-btn:hover { transform: translateY(-2px); color: var(--text); }
.grade-btn.know { border-color: var(--green); color: var(--green); }
.grade-btn.know:hover { background: var(--green-soft); }
.grade-btn.fuzzy { border-color: var(--gold); color: var(--gold); }
.grade-btn.fuzzy:hover { background: var(--gold-soft); }
.grade-btn.forgot { border-color: var(--red); color: var(--red); }
.grade-btn.forgot:hover { background: rgba(226, 109, 90, 0.13); }

/* 回顾测验 */
.quiz-card { max-width: 720px; margin: 0 auto; }
.quiz-sentence { font-family: var(--serif); font-size: clamp(19px, 2.6vw, 23px); line-height: 1.75; margin-bottom: 8px; }
.quiz-sentence .blank { color: var(--accent); font-weight: 700; border-bottom: 2.5px solid var(--accent); padding: 0 18px; margin: 0 2px; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.quiz-opt {
  padding: 15px 18px; border-radius: 13px; border: 1px solid var(--line-strong);
  background: var(--panel); font-size: 16px; font-family: var(--serif); font-weight: 600;
  transition: all 0.15s ease; text-align: left;
}
.quiz-opt:hover { border-color: var(--gold); transform: translateY(-2px); }
.quiz-opt.right { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.quiz-opt.wrong { border-color: var(--red); background: rgba(226,109,90,0.12); color: var(--red); }
.quiz-opt:disabled { cursor: default; transform: none; }
.quiz-fb { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quiz-fb .msg { font-size: 14px; color: var(--text-2); }

/* 完成页 */
.done-wrap { max-width: 640px; margin: 30px auto; text-align: center; }
.done-wrap .constellation { width: 240px; margin: 0 auto 8px; display: block; filter: drop-shadow(0 10px 34px rgba(227,179,65,0.35)); }
.done-wrap h2 { font-size: clamp(26px, 4vw, 34px); margin: 14px 0 8px; }
.done-wrap .sub { color: var(--text-dim); margin-bottom: 24px; }
.done-stats { display: flex; justify-content: center; gap: 34px; margin-bottom: 28px; }
.done-stats .ds { text-align: center; }
.done-stats .n { font-family: var(--serif); font-size: 32px; font-weight: 700; color: var(--gold); }
.done-stats .l { font-size: 12.5px; color: var(--text-dim); }

/* ---------- 练习 ---------- */
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 26px; }
.mode-card {
  text-align: left; padding: 20px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); transition: all 0.16s ease;
  display: flex; flex-direction: column; gap: 7px;
}
.mode-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.mode-card.on { border-color: var(--gold); background: linear-gradient(150deg, var(--gold-soft), var(--panel) 55%); }
.mode-card .ic { font-size: 22px; }
.mode-card .t { font-family: var(--serif); font-size: 17px; font-weight: 700; }
.mode-card .d { color: var(--text-dim); font-size: 13px; }

.practice-stage { max-width: 780px; margin: 0 auto; }
.typing-meta { display: flex; justify-content: space-between; color: var(--text-dim); font-size: 13px; margin-bottom: 14px; }
.typing-sentence { font-family: var(--mono); font-size: clamp(17px, 2.4vw, 21px); line-height: 2.1; color: var(--text-dim); }
.typing-sentence .fixed { color: var(--text); opacity: 0.9; }
.typing-sentence .caret { color: var(--text); border-bottom: 2px solid var(--accent); min-width: 10px; display: inline-block; text-align: center; }
.typing-sentence .caret.ok { color: var(--green); border-color: var(--green); }
.typing-sentence .caret.bad { color: var(--red); border-color: var(--red); background: rgba(226,109,90,0.15); border-radius: 4px; }
.typing-sentence .caret.done { color: var(--gold); border-color: var(--gold); }
.typing-hint { color: var(--text-2); font-size: 14.5px; margin-top: 16px; display: flex; gap: 10px; align-items: baseline; }
.typing-actions { margin-top: 26px; display: flex; gap: 10px; justify-content: center; }
.hidden-input { position: absolute; opacity: 0; pointer-events: none; }

.practice-done { text-align: center; padding: 40px 0; }
.practice-done .big { font-family: var(--serif); font-size: 44px; color: var(--gold); font-weight: 700; }
.practice-done .meta { color: var(--text-dim); margin: 10px 0 24px; }

/* ---------- 词详情弹层 ---------- */
.modal-root { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-root[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 8, 18, 0.72); backdrop-filter: blur(8px); }
.modal-panel {
  position: relative; width: min(860px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 22px;
  box-shadow: var(--shadow); animation: rise 0.3s ease;
}
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 5; }
.modal-body { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 26px; padding: 26px; }
.modal-visual { position: sticky; top: 0; align-self: start; }
.modal-visual .constellation { width: 100%; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.modal-visual .no { margin-top: 10px; color: var(--text-dim); font-size: 11.5px; letter-spacing: 3px; }
.modal-info .badges { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.modal-info .bigword { font-family: var(--serif); font-size: clamp(34px, 5vw, 46px); font-weight: 700; line-height: 1.1; }
.detail-sec { margin-top: 22px; }
.tts-line { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.status-row { display: flex; gap: 8px; flex-wrap: wrap; }
.status-row .chip.on-green { background: var(--green); color: #08130c; border-color: var(--green); font-weight: 700; }
.status-row .chip.on-gold { background: var(--gold); color: #221a08; border-color: var(--gold); font-weight: 700; }
.status-row .chip.on-red { background: var(--red); color: #fff; border-color: var(--red); font-weight: 700; }
.modal-nav { display: flex; justify-content: space-between; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ---------- 设置面板 ---------- */
.settings-wrap { grid-column: 1 / -1; }
.settings-title { font-family: var(--serif); font-size: 28px; font-weight: 700; line-height: 1.2; }
.settings-sub { color: var(--text-dim); font-size: 12.5px; margin-top: 4px; }
.settings-hint { color: var(--text-dim); font-size: 12.5px; margin: 10px 0 0; }
.settings-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.settings-group { margin-top: 16px; }
.sg-name { font-size: 11.5px; letter-spacing: 2px; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.sg-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(215px, 100%), 1fr)); gap: 8px; }
.list-check {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-s);
  font-size: 13px; color: var(--text-2); cursor: pointer; transition: all 0.15s ease;
}
.list-check:hover { border-color: var(--line-strong); }
.list-check.on { border-color: var(--gold-band); background: var(--gold-soft); color: var(--text); }
.list-check input { accent-color: var(--gold); margin: 0; flex: none; }
.list-check span { flex: 1; }
.list-check i { font-style: normal; color: var(--text-dim); font-size: 11.5px; flex: none; }

/* ---------- ⌘K 搜索 ---------- */
.palette-root { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: center; padding-top: 12vh; }
.palette-root[hidden] { display: none; }
.palette-backdrop { position: absolute; inset: 0; background: rgba(5, 8, 18, 0.66); backdrop-filter: blur(6px); }
.palette-panel {
  position: relative; width: min(620px, calc(100% - 40px)); max-height: 62vh;
  display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 18px;
  box-shadow: var(--shadow); overflow: hidden; animation: rise 0.22s ease;
}
.palette-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); color: var(--text-dim); }
.palette-head input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 16px; font-family: var(--sans); }
.palette-head kbd { font-size: 10.5px; padding: 3px 7px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line); }
.palette-list { overflow-y: auto; padding: 8px; }
.palette-item { display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left; padding: 11px 14px; border-radius: 10px; }
.palette-item:hover, .palette-item.sel { background: var(--panel-2); }
.palette-item .w { font-family: var(--serif); font-weight: 700; color: var(--gold); min-width: 110px; }
.palette-item .m { color: var(--text-dim); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-empty { padding: 30px; text-align: center; color: var(--text-dim); font-size: 13.5px; }

/* ---------- Toast ---------- */
.toast-root { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  padding: 11px 20px; border-radius: 12px; font-size: 13.5px;
  background: var(--panel-2); border: 1px solid var(--line-strong); color: var(--text);
  box-shadow: var(--shadow); animation: rise 0.25s ease;
}
.toast.gold { border-color: var(--gold); color: var(--gold); }

/* ---------- 星座图 ---------- */
.constellation { display: block; }
.constellation .star { fill: var(--gold); }
.constellation .star.main { filter: url(#glow); }
.constellation .link { stroke: rgba(227, 179, 65, 0.4); stroke-width: 1; stroke-dasharray: 3 3; }
.constellation .glowc { fill: rgba(227, 179, 65, 0.12); }
.constellation .initial {
  font-family: Georgia, serif; fill: var(--gold); opacity: 0.9;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .journey-hero { grid-template-columns: minmax(0, 1fr); }
  .journey-copy { min-width: 0; }
  .journey-side { order: -1; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .learn-card { grid-template-columns: minmax(0, 1fr); }
  .learn-visual { position: static; max-width: 300px; margin: 0 auto; }
  .modal-body { grid-template-columns: minmax(0, 1fr); }
  .modal-visual { position: static; max-width: 320px; margin: 0 auto; }
  .mode-grid { grid-template-columns: minmax(0, 1fr); }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-btn span { display: none; }
  .mainnav a { padding: 7px 10px; font-size: 13.5px; }
}
@media (max-width: 560px) {
  /* 顶栏折两行：品牌+操作在上，导航独占下行；搜索保留为图标，不再隐藏 */
  .topbar { flex-wrap: wrap; gap: 8px 10px; padding: 10px 14px; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand-name { font-size: 19px; letter-spacing: 1px; }
  .brand-en { display: none; }
  .topbar-actions { margin-left: auto; gap: 6px; }
  .mainnav { order: 3; flex-basis: 100%; margin-left: 0; gap: 6px; }
  .mainnav a { flex: 1; text-align: center; padding: 7px 4px; font-size: 13.5px; }
  .search-btn { padding: 9px; gap: 0; }
  .search-btn kbd { display: none; }
  .icon-btn { width: 34px; height: 34px; }
  /* 词单进度改单栏，避免双栏 nowrap 名称横向溢出 */
  .lists-rows { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .quiz-options { grid-template-columns: minmax(0, 1fr); }
  .list-item { grid-template-columns: minmax(0, 1fr) auto; }
  .list-item .idx, .list-item .m { display: none; }
  .app { padding: 24px clamp(14px, 4vw, 44px) 60px; }
  .footer { flex-direction: column; gap: 10px; text-align: center; }
  .foot-links { flex-wrap: wrap; justify-content: center; gap: 8px 14px; }
}
