/* ==========================================================
   群星闪耀 · 影响世界的人
   纯 CSS，无外部依赖；暖纸（浅色）/ 星空（深色）两套主题
   ========================================================== */

/* ---------- 变量 ---------- */
:root {
  --bg: #f6f2ea;
  --bg-glow: #fffdf6;
  --card: #fffefb;
  --ink: #22201c;
  --muted: #6f6a60;
  --line: #e6dfd2;
  --gold: #b8912e;
  --gold-bright: #d4af4e;
  --shadow: 0 10px 30px rgba(60, 50, 20, 0.08);
  --shadow-hover: 0 18px 44px rgba(60, 50, 20, 0.14);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --radius: 18px;
}

[data-theme="dark"] {
  --bg: #12151b;
  --bg-glow: #171b23;
  --card: #1b202a;
  --ink: #eae4d6;
  --muted: #9a948a;
  --line: #2b3140;
  --gold: #c9a547;
  --gold-bright: #e5c66b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 18px 44px rgba(0, 0, 0, 0.5);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1100px 500px at 50% -140px, var(--bg-glow), transparent 70%),
    var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; }

button { font-family: inherit; cursor: pointer; }

.hidden { display: none !important; }

::selection { background: color-mix(in srgb, var(--gold) 30%, transparent); }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}

.brand {
  font-family: var(--serif); font-size: 20px; font-weight: 700;
  color: var(--ink); text-decoration: none; letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 8px;
}

.brand-star {
  color: var(--gold); font-size: 18px;
  animation: spin 14s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

.nav { display: flex; align-items: center; gap: 26px; }

.nav a, .nav-btn {
  font-size: 15px; color: var(--muted); text-decoration: none;
  background: none; border: none; padding: 0; letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav a:hover, .nav-btn:hover { color: var(--gold); }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  font-size: 16px; line-height: 1;
  transition: transform 0.3s, border-color 0.2s;
}

.theme-toggle:hover { transform: rotate(20deg) scale(1.06); border-color: var(--gold); }

.x-link {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); transition: transform 0.3s, border-color 0.2s;
}

.x-link:hover { transform: scale(1.06); border-color: var(--gold); }

.nav-toggle {
  display: none;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  font-size: 16px; line-height: 1; color: var(--ink);
  transition: border-color 0.2s;
}

.nav-toggle:hover { border-color: var(--gold); }

.lang-toggle {
  height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  font-size: 13px; font-weight: 600; color: var(--ink);
  letter-spacing: 0.05em;
  transition: border-color 0.2s, color 0.2s;
}

.lang-toggle:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 72px; text-align: center;
}

.hero-inner { position: relative; z-index: 2; }

.kicker {
  font-size: 13px; letter-spacing: 0.42em; text-indent: 0.42em;
  color: var(--gold); font-weight: 600; margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(42px, 7.5vw, 76px);
  line-height: 1.18; letter-spacing: 0.06em; margin-bottom: 22px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(118deg, var(--gold) 20%, var(--gold-bright) 55%, var(--gold) 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.lede {
  font-size: clamp(15px, 2vw, 17.5px);
  color: var(--muted); max-width: 620px; margin: 0 auto 36px;
}

.hero-actions {
  display: flex; justify-content: center; align-items: center;
  gap: 14px; flex-wrap: wrap; margin-bottom: 44px;
}

.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 20px; width: min(380px, 86vw);
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 15%, transparent); }

.search-icon { color: var(--muted); flex: none; }

.search input {
  border: none; outline: none; background: transparent;
  font: inherit; font-size: 15px; color: var(--ink);
  padding: 13px 0; width: 100%;
}

.search input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }

.btn-ghost {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; padding: 12px 22px; font-size: 14.5px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }

.hero-stats {
  display: inline-flex; align-items: baseline; gap: 18px;
  color: var(--muted); font-size: 14px;
}

.hero-stats b {
  font-family: var(--serif); font-size: 30px; color: var(--ink);
  margin-right: 6px; font-variant-numeric: tabular-nums;
}

.stat-sep { color: var(--line); font-size: 20px; }

/* 星空装饰 */
.stars { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.star {
  position: absolute; border-radius: 50%;
  background: var(--gold);
  opacity: 0.35;
  animation: twinkle var(--d, 4s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.12; transform: scale(0.8); }
  50% { opacity: 0.65; transform: scale(1.15); }
}

/* ---------- 筛选 ---------- */
.explore { padding: 40px 24px 80px; }

.filters {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; margin-bottom: 22px;
}

.filter-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 9px 18px; font-size: 14px;
  transition: all 0.2s;
}

.filter-btn:hover { color: var(--ink); border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }

.filter-btn.active {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}

.filter-btn .count {
  opacity: 0.55; font-size: 12px; margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 工具栏 ---------- */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 12px 4px 20px; border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}

.result-count { font-size: 13.5px; color: var(--muted); }

.toolbar-right { display: flex; align-items: center; gap: 18px; }

.sort-wrap { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }

.sort-wrap select {
  font: inherit; font-size: 13.5px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; outline: none;
  cursor: pointer;
}

.view-switch {
  display: inline-flex; background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px;
}

.view-switch button {
  border: none; background: none; color: var(--muted);
  font-size: 13.5px; padding: 6px 16px; border-radius: 999px;
  transition: all 0.2s;
}

.view-switch button.active {
  background: var(--ink); color: var(--bg);
}

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.card {
  --c: var(--gold);
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  /* 入场动画 */
  opacity: 0; transform: translateY(18px);
}

.card.in {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--c), transparent 75%);
  opacity: 0.85; z-index: 2;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in srgb, var(--c) 45%, var(--line));
}

/* 封面图 */
.card-media {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--c) 22%, var(--card)),
    color-mix(in srgb, var(--c) 6%, var(--card)));
}

.card-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 22%;
  display: block; opacity: 0;
  transition: opacity 0.6s ease, transform 0.5s ease;
}

.card-media img.loaded { opacity: 1; }

.card:hover .card-media img { transform: scale(1.06); }

.card-media.fallback { display: grid; place-items: center; }

.card-media.fallback .fallback-emoji {
  font-size: 64px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
}

.badge-emoji {
  position: absolute; left: 14px; bottom: 14px; z-index: 1;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-size: 23px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.card-era {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  font-size: 12px; padding: 4px 11px; border-radius: 999px;
  color: #fff; background: rgba(22, 18, 10, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-variant-numeric: tabular-nums;
}

/* 投票按钮（卡片封面左上角） */
.vote-pill {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; line-height: 1; padding: 5px 11px;
  border-radius: 999px; cursor: pointer;
  color: #fff; background: rgba(22, 18, 10, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-variant-numeric: tabular-nums;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.vote-pill:hover {
  background: var(--c); border-color: var(--c);
  transform: scale(1.08);
}

.card-body { padding: 18px 20px 16px; }

.card h3 { font-size: 19px; letter-spacing: 0.02em; margin-bottom: 2px; }

.card .en { font-size: 12.5px; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 12px; }

.card .summary {
  font-size: 14px; color: color-mix(in srgb, var(--ink) 78%, var(--muted));
  line-height: 1.7; min-height: 3.4em; margin-bottom: 16px;
}

.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px dashed var(--line);
}

.chip {
  display: inline-block; font-size: 12px; padding: 3px 12px;
  border-radius: 999px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
}

.more { font-size: 12.5px; color: var(--muted); transition: color 0.2s; }

.card:hover .more { color: var(--c); }

/* ---------- 领域色（须位于 .card 之后才能覆盖默认金色） ---------- */
[data-cat="science"]   { --c: #4a7fd4; }
[data-cat="thought"]   { --c: #8a63c9; }
[data-cat="invention"] { --c: #d98e32; }
[data-cat="leader"]    { --c: #d05c5c; }
[data-cat="explorer"]  { --c: #38a3c9; }
[data-cat="art"]       { --c: #2fa896; }
[data-cat="human"]     { --c: #5da052; }

/* ---------- 时间轴 ---------- */
.timeline { position: relative; padding: 10px 0 20px; }

.timeline::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, var(--line) 8%, var(--line) 92%, transparent);
}

.tl-item {
  position: relative; width: 50%;
  padding: 0 44px 34px 0; cursor: pointer;
}

.tl-item:nth-child(even) { left: 50%; padding: 0 0 34px 44px; }

.tl-item::before {
  content: ""; position: absolute; top: 20px; right: -7px; z-index: 1;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--c);
  transform: translateY(-50%);
  transition: transform 0.2s, box-shadow 0.2s;
}

.tl-item:nth-child(even)::before { right: auto; left: -7px; }

.tl-item:hover::before { transform: translateY(-50%) scale(1.3); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 18%, transparent); }

.tl-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.tl-item:hover .tl-card {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in srgb, var(--c) 45%, var(--line));
}

.tl-item { opacity: 0; transform: translateY(18px); }

.tl-item.in { opacity: 1; transform: translateY(0); transition: opacity 0.5s ease, transform 0.5s ease; }

.tl-year {
  font-family: var(--serif); font-size: 15px; font-weight: 700;
  color: var(--c); margin-bottom: 2px; font-variant-numeric: tabular-nums;
}

.tl-name { font-family: var(--serif); font-size: 17px; }

.tl-name .en { font-size: 12px; color: var(--muted); margin-left: 8px; font-family: var(--sans); letter-spacing: 0.03em; }

.tl-sum { font-size: 13.5px; color: var(--muted); line-height: 1.65; margin-top: 6px; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 70px 0 40px; color: var(--muted); }

.empty-emoji { font-size: 40px; margin-bottom: 12px; }

.empty .btn-ghost { margin-top: 18px; box-shadow: none; }

/* ---------- 关于 ---------- */
.about { padding: 20px 24px 90px; }

.about h2 {
  text-align: center; font-size: 28px; letter-spacing: 0.08em;
  margin-bottom: 34px;
}

.about-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; max-width: 1000px; margin: 0 auto;
}

.about-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 26px 22px;
  box-shadow: var(--shadow);
}

.about-card h3 { font-size: 17px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }

.about-star { color: var(--gold); font-size: 14px; }

.about-card p { font-size: 14px; color: var(--muted); line-height: 1.85; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 46px; text-align: center;
}

.footer-brand { font-family: var(--serif); font-size: 15px; margin-bottom: 6px; }

.footer-note { font-size: 12.5px; color: var(--muted); }

.footer-links { margin-top: 10px; font-size: 12.5px; }
.footer-links a { color: var(--gold); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }

.modal-mask {
  position: absolute; inset: 0;
  background: rgba(15, 12, 6, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease;
}

[data-theme="dark"] .modal-mask { background: rgba(0, 0, 0, 0.66); }

.modal-card {
  position: relative; width: min(620px, 100%);
  max-height: min(86vh, 780px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 22px; padding: 34px 36px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: popIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes fadeIn { from { opacity: 0; } }

@keyframes popIn { from { opacity: 0; transform: translateY(24px) scale(0.96); } }

.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 14px;
  transition: all 0.2s;
}

.modal-close:hover { color: var(--ink); border-color: var(--gold); transform: rotate(90deg); }

.modal-head { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }

.portrait {
  position: relative;
  width: 132px; height: 88px; flex: none;
  border-radius: 14px; overflow: hidden;
  display: grid; place-items: center;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--c) 22%, var(--card)),
    color-mix(in srgb, var(--c) 8%, var(--card)));
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line));
}

.portrait img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; object-position: center 22%;
  display: block;
}

.portrait .portrait-emoji { font-size: 44px; }

.modal-head-text h3 { font-size: 24px; letter-spacing: 0.02em; }

.modal-head-text .en { font-size: 13px; color: var(--muted); letter-spacing: 0.05em; margin: 2px 0 10px; }

.modal-head .meta { display: flex; align-items: center; gap: 12px; }

.modal-head .era { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.m-field { font-size: 13.5px; color: var(--gold); font-weight: 600; letter-spacing: 0.04em; margin-bottom: 10px; }

.m-desc { font-size: 15px; line-height: 1.92; }

.m-desc p { margin: 0 0 12px; }

.m-highlights { margin: 0 0 18px; }

.m-highlights h4 {
  font-family: var(--serif); font-size: 14px; color: var(--gold);
  letter-spacing: 0.05em; margin-bottom: 8px;
}

.m-highlights ul { list-style: none; }

.m-highlights li {
  font-size: 14px; line-height: 1.8; color: color-mix(in srgb, var(--ink) 85%, var(--muted));
  padding-left: 18px; position: relative;
}

.m-highlights li::before {
  content: "✦"; position: absolute; left: 0; top: 0;
  font-size: 10px; color: var(--gold); opacity: 0.85;
}

.m-quote {
  position: relative;
  background: color-mix(in srgb, var(--gold) 8%, transparent);
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 16px 18px 16px 44px;
  font-family: var(--serif); font-size: 15.5px; line-height: 1.9;
  margin-bottom: 22px;
}

.m-quote-mark {
  position: absolute; left: 14px; top: 8px;
  font-size: 34px; color: var(--gold); opacity: 0.7;
  font-family: Georgia, serif;
}

.m-credit { font-size: 11.5px; color: var(--muted); opacity: 0.85; margin: -4px 0 18px; }

.modal-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding-top: 16px; border-top: 1px solid var(--line);
}

.modal-nav-pages { display: flex; gap: 12px; }

.modal-vote {
  border: 1px solid var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent);
  color: var(--gold); font-size: 13.5px; font-weight: 600;
  border-radius: 999px; padding: 9px 18px;
  transition: all 0.2s;
}

.modal-vote:hover { background: var(--gold); color: #fff; }

.modal-vote:disabled { opacity: 0.4; cursor: default; }

.modal-nav button {
  border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 13.5px;
  border-radius: 999px; padding: 9px 18px;
  transition: all 0.2s;
}

.modal-nav button:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- 3D 星空背景 ---------- */
#bg3d {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}

/* 中心渐暗遮罩：保证正文可读性 */
#bg3d::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 72% 62% at 50% 44%,
    rgba(18, 21, 27, 0.86) 0%,
    rgba(18, 21, 27, 0.45) 55%,
    rgba(18, 21, 27, 0) 100%);
}

[data-theme="light"] #bg3d::after {
  background: radial-gradient(ellipse 72% 62% at 50% 44%,
    rgba(246, 242, 234, 0.88) 0%,
    rgba(246, 242, 234, 0.5) 55%,
    rgba(246, 242, 234, 0) 100%);
}

main, .site-footer { position: relative; z-index: 1; }

/* Three.js 可用时隐藏 CSS 星星，避免重复 */
.hero.three-on .stars { display: none; }

/* ---------- 头像走廊 ---------- */
.face-strip-wrap {
  margin-top: 46px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.face-strip {
  display: flex; gap: 18px; width: max-content;
  animation: faceScroll 80s linear infinite;
}

.face-strip-wrap:hover .face-strip { animation-play-state: paused; }

.face-strip .face {
  width: 56px; height: 56px; border-radius: 50%;
  object-fit: cover; object-position: center 20%;
  border: 2px solid color-mix(in srgb, var(--gold) 35%, var(--line));
  box-shadow: var(--shadow);
  background: var(--card);
}

@keyframes faceScroll { to { transform: translateX(-50%); } }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .br-desktop { display: none; }
  .timeline::before { left: 20px; }
  .tl-item,
  .tl-item:nth-child(even) {
    width: 100%; left: 0;
    padding: 0 0 26px 48px;
  }
  .tl-item::before,
  .tl-item:nth-child(even)::before { left: 13px; right: auto; }
}

@media (max-width: 620px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-header .nav {
    display: none;
    position: absolute; top: 64px; left: 16px; right: 16px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--card); border: 1px solid var(--line);
    border-radius: 14px; padding: 8px;
    box-shadow: var(--shadow-hover); z-index: 60;
  }
  .site-header .nav.open { display: flex; }
  .site-header .nav a,
  .site-header .nav .nav-btn {
    padding: 12px 14px; border-radius: 10px;
    font-size: 16px; text-align: left;
  }
  .site-header .nav a:hover,
  .site-header .nav .nav-btn:hover { background: color-mix(in srgb, var(--gold) 10%, transparent); }
  .header-inner { justify-content: space-between; gap: 10px; }
  .x-link { display: none; }
  .brand { font-size: 17px; letter-spacing: 0.02em; white-space: nowrap; }
  .lang-toggle { padding: 0 10px; }
  .hero { padding: 66px 0 54px; }
  .hero-stats { gap: 12px; }
  .hero-stats b { font-size: 24px; }
  .grid { grid-template-columns: 1fr; }
  .card .summary { min-height: 0; }
  .toolbar { justify-content: center; }
  .modal-card { padding: 26px 22px 20px; }
  .modal-head { flex-direction: row; gap: 16px; }
  .portrait { width: 108px; height: 72px; }
  .portrait .portrait-emoji { font-size: 36px; }
  .face-strip .face { width: 46px; height: 46px; }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .card, .tl-item { opacity: 1; transform: none; }
  .face-strip { animation: none; }
}
