/* =========================================================
   乐天棋牌 · 共享样式表 /assets/site.css
   骨架：墨绿深底 + 纸米白研究板 + 暖金强调
   ========================================================= */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 132px;
}

body {
  margin: 0;
  min-height: 100%;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; height: 1px; background: currentColor; opacity: .2; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --ink: #0E2A22;
  --ink-2: #173F33;
  --ink-3: #0A1D17;
  --moss: #2E6B54;
  --jade: #A8C9B8;
  --gold: #D9A441;
  --gold-2: #F0D79A;
  --cinnabar: #C8402F;
  --paper: #F7F3E8;
  --near-white: #FDFBF6;
  --black: #1E1F1D;

  --text-on-dark: #EAE4D3;
  --text-mute-dark: #9FBBAE;
  --text-on-light: #1E1F1D;
  --text-mute-light: #4C5C54;

  /* 字体 */
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, "Times New Roman", serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Roboto Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* 字号阶梯 */
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-17: 1.0625rem;
  --fs-21: 1.3125rem;
  --fs-28: 1.75rem;
  --fs-40: 2.5rem;
  --fs-64: 4rem;
  --fs-104: 6.5rem;

  /* 形状与阴影 */
  --line-strong: 3px;
  --line-thin: 2px;
  --radius-pill: 999px;
  --radius-card: 16px;
  --shadow-hard: 6px 6px 0 rgba(10, 24, 20, .88);
  --shadow-hard-lg: 9px 11px 0 rgba(10, 24, 20, .88);
  --shadow-hard-inv: 6px 6px 0 rgba(30, 31, 29, .82);

  /* 结构 */
  --shell-max: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --gap-block: clamp(36px, 6vw, 88px);

  /* 动效 */
  --ease: cubic-bezier(.22, .7, .3, 1);
  --dur-1: 180ms;
  --dur-2: 240ms;
  --dur-3: 320ms;
}

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--ink);
  color: var(--text-on-dark);
  font-family: var(--sans);
  font-size: var(--fs-17);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.012em;
  color: var(--gold-2);
}

h1 { font-size: clamp(2.5rem, 8.4vw, var(--fs-104)); font-weight: 900; }
h2 { font-size: clamp(1.75rem, 4.4vw, var(--fs-64)); }
h3 { font-size: clamp(1.3125rem, 2.6vw, var(--fs-40)); }
h4 { font-size: var(--fs-21); }

p { max-width: 68ch; }
small { font-size: var(--fs-12); }

strong { font-weight: 700; color: var(--gold-2); }

::selection { background: var(--gold); color: var(--ink); }

.num,
.data-value,
.stat-value,
.mono {
  font-family: var(--mono);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* ---------- 4. 通用容器 / 网格 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.prose { max-width: 68ch; }

.split {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.split--5-7 { grid-template-columns: 5fr 7fr; }
.split--4-8 { grid-template-columns: 4fr 8fr; }
.split--6-6 { grid-template-columns: 6fr 6fr; }

.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72px;
  height: 2px;
  background: var(--gold);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: var(--fs-12);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--gold);
  flex: none;
}

/* ---------- 5. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  left: 50%;
  top: -120px;
  transform: translateX(-50%);
  z-index: 999;
  padding: 12px 24px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  font-size: var(--fs-14);
  border: var(--line-strong) solid var(--black);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-hard-inv);
  transition: top var(--dur-2) var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- 6. 悬浮胶囊头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: 16px clamp(12px, 3vw, 32px) 0;
  pointer-events: none;
}

.header-shell {
  max-width: var(--shell-max);
  margin-inline: auto;
  pointer-events: auto;
}

.nav-island {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 10px 20px;
  background: var(--ink-2);
  border: var(--line-strong) solid rgba(217, 164, 65, .55);
  border-radius: var(--radius-pill);
  box-shadow: 6px 6px 0 rgba(6, 20, 16, .92);
  overflow: hidden;
  transition: box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.nav-island[data-stuck] {
  border-color: rgba(217, 164, 65, .85);
  box-shadow: 7px 9px 0 rgba(6, 20, 16, .95);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  width: 32px;
  height: 32px;
  padding: 3px;
  background: rgba(217, 164, 65, .1);
  border: 2px solid var(--gold);
  border-radius: 7px;
  flex: none;
}
.brand-mark__tile { background: var(--gold); border-radius: 1.5px; }
.brand-mark__tile:nth-child(2) { background: var(--jade); }
.brand-mark__tile:nth-child(3) { background: var(--cinnabar); }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-family: var(--serif);
  font-weight: 800;
  font-size: var(--fs-21);
  color: var(--gold-2);
  letter-spacing: 0.01em;
}

.brand-tagline {
  font-size: var(--fs-12);
  color: var(--text-mute-dark);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* 导航 */
.primary-nav { margin-left: auto; }

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

.nav-item { display: block; }

.nav-link {
  display: inline-block;
  padding: 9px 16px;
  font-size: var(--fs-14);
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--gold-2);
  border-radius: var(--radius-pill);
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.nav-link:hover { background: rgba(240, 215, 154, .16); color: #FFF8E4; }
.nav-link:active { background: rgba(240, 215, 154, .26); }

.nav-link[aria-current="page"] {
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
}

/* 移动端按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--gold-2);
  border: 2px solid var(--gold);
  border-radius: var(--radius-pill);
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  flex: none;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur-2) var(--ease), top var(--dur-2) var(--ease), opacity var(--dur-2) var(--ease);
}
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.nav-toggle[aria-expanded="true"] {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* 滚动进度金线 */
.scroll-rail {
  position: absolute;
  left: 46px;
  right: 46px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease);
}
.scroll-rail[data-active] { opacity: .95; }

/* 章节索引细条 */
.chapter-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px auto 0;
  padding: 7px 18px;
  max-width: 100%;
  width: fit-content;
  background: rgba(14, 42, 34, .94);
  border: 2px solid rgba(217, 164, 65, .38);
  border-radius: var(--radius-pill);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.chapter-strip[data-visible] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.chapter-strip__label {
  font-family: var(--mono);
  font-size: var(--fs-12);
  letter-spacing: 0.16em;
  color: var(--gold);
  flex: none;
}

.chapter-strip__list {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.chapter-strip__item {
  display: inline-block;
  padding: 3px 12px;
  font-size: var(--fs-12);
  color: var(--text-mute-dark);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.chapter-strip__item[data-current] {
  background: rgba(217, 164, 65, .18);
  color: var(--gold-2);
  font-weight: 500;
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  margin-top: clamp(56px, 9vw, 116px);
  padding: clamp(44px, 6vw, 76px) var(--gutter) 0;
  background: var(--ink-3);
  color: var(--text-on-dark);
  border-top: var(--line-strong) solid var(--gold);
}

.footer-grid {
  max-width: var(--shell-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 1.1fr;
  gap: clamp(28px, 5vw, 64px);
  padding-bottom: clamp(32px, 5vw, 56px);
}

.footer-block { min-width: 0; }

.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }

.brand--footer { gap: 10px; }
.brand--footer .brand-mark { width: 28px; height: 28px; }
.brand--footer .brand-name { font-size: var(--fs-21); }

.footer-line {
  font-size: var(--fs-14);
  line-height: 1.7;
  color: var(--text-mute-dark);
  max-width: 34ch;
}

.archive-entry {
  display: block;
  width: 100%;
  max-width: 330px;
  margin-top: 4px;
  padding: 14px 18px;
  background: var(--ink-2);
  border: 2px solid rgba(217, 164, 65, .45);
  border-radius: 14px;
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.archive-entry:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  background: #1B4A3C;
}
.archive-entry__label {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: var(--fs-17);
  color: var(--gold-2);
}
.archive-entry__value {
  display: block;
  margin-top: 4px;
  font-size: var(--fs-12);
  letter-spacing: 0.04em;
  color: var(--text-mute-dark);
}

.footer-title {
  font-family: var(--serif);
  font-size: var(--fs-17);
  font-weight: 700;
  color: var(--gold-2);
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 2px solid rgba(217, 164, 65, .3);
}

.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links--sub { margin-top: 18px; }

.footer-links a {
  font-size: var(--fs-14);
  color: var(--text-on-dark);
  transition: color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
  display: inline-block;
}
.footer-links a:hover {
  color: var(--gold);
  transform: translateX(4px);
}

.footer-contact { display: flex; flex-direction: column; gap: 11px; }
.footer-contact li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: baseline;
  font-size: var(--fs-14);
}
.footer-contact__key {
  font-family: var(--mono);
  font-size: var(--fs-12);
  letter-spacing: 0.14em;
  color: var(--gold);
}
.footer-contact__val {
  color: var(--text-on-dark);
  word-break: break-word;
}

.footer-note {
  margin-top: 16px;
  font-size: var(--fs-12);
  line-height: 1.7;
  color: var(--text-mute-dark);
  max-width: 36ch;
}

.footer-cta {
  display: inline-block;
  margin-top: 18px;
  padding: 11px 22px;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--ink);
  background: var(--gold);
  border: 2px solid var(--black);
  border-radius: var(--radius-pill);
  box-shadow: 4px 4px 0 rgba(6, 20, 16, .9);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.footer-cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(6, 20, 16, .9);
  background: var(--gold-2);
}

.footer-bottom {
  max-width: var(--shell-max);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 26px;
  border-top: 1px solid rgba(168, 201, 184, .22);
  font-size: var(--fs-12);
  color: var(--text-mute-dark);
}
.footer-legal { font-family: var(--mono); letter-spacing: 0.06em; }
.footer-copy { font-family: var(--mono); letter-spacing: 0.06em; }

/* ---------- 8. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-family: var(--sans);
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: 0.02em;
  border: var(--line-thin) solid var(--black);
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--ink);
  box-shadow: 4px 4px 0 rgba(6, 20, 16, .85);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(6, 20, 16, .85);
  background: var(--gold-2);
}
.btn:active { transform: translate(0, 0); box-shadow: 3px 3px 0 rgba(6, 20, 16, .85); }

.btn--outline {
  background: transparent;
  color: var(--gold-2);
  border-color: var(--gold);
  box-shadow: 4px 4px 0 rgba(6, 20, 16, .7);
}
.btn--outline:hover { background: rgba(217, 164, 65, .16); color: #FFF8E4; }

.btn--ghost {
  background: transparent;
  color: var(--text-on-dark);
  border-color: rgba(168, 201, 184, .45);
  box-shadow: none;
}
.btn--ghost:hover { background: rgba(168, 201, 184, .14); color: #FFF8E4; transform: none; box-shadow: none; }

.btn--sm { padding: 9px 18px; font-size: var(--fs-12); }

/* ---------- 9. 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-14);
  color: var(--text-mute-dark);
}
.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.breadcrumbs li + li::before {
  content: "/";
  color: var(--moss);
  font-family: var(--mono);
}
.breadcrumbs a {
  color: var(--gold-2);
  transition: color var(--dur-1) var(--ease);
}
.breadcrumbs a:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
.breadcrumbs [aria-current="page"] { color: var(--text-on-dark); }

/* ---------- 10. 板材 / 卡片 ---------- */
.panel {
  padding: clamp(20px, 3vw, 34px);
  border: var(--line-strong) solid var(--black);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hard);
}
.panel--paper { background: var(--paper); color: var(--text-on-light); }
.panel--ink { background: var(--ink-2); color: var(--text-on-dark); border-color: rgba(217, 164, 65, .5); }
.panel--paper h1, .panel--paper h2, .panel--paper h3, .panel--paper h4 { color: var(--ink); }
.panel--paper strong { color: var(--moss); }

.card {
  padding: clamp(20px, 3vw, 30px);
  background: var(--paper);
  color: var(--text-on-light);
  border: var(--line-strong) solid var(--black);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hard);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.card h2, .card h3, .card h4 { color: var(--ink); }
.card strong { color: var(--moss); }
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hard-lg);
}

.card--ink {
  background: var(--ink-2);
  color: var(--text-on-dark);
  border-color: rgba(217, 164, 65, .55);
}
.card--ink h2, .card--ink h3, .card--ink h4 { color: var(--gold-2); }
.card--ink strong { color: var(--gold); }

/* ---------- 11. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: 0.03em;
  border-radius: var(--radius-pill);
  background: var(--moss);
  color: var(--paper);
  border: 1px solid rgba(30, 31, 29, .5);
}
.tag--cinnabar { background: var(--cinnabar); color: #FFF3EC; }
.tag--jade { background: var(--jade); color: var(--ink); }
.tag--gold { background: var(--gold); color: var(--ink); }

/* ---------- 12. 数据板 ---------- */
.data-board {
  border: var(--line-strong) solid var(--black);
  border-radius: 14px;
  background: var(--ink-2);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}
.data-row {
  display: grid;
  grid-template-columns: minmax(96px, 38%) 1fr;
  gap: 14px;
  align-items: baseline;
  padding: 13px 20px;
  border-bottom: 1px solid rgba(217, 164, 65, .18);
}
.data-row:last-child { border-bottom: 0; }
.data-key {
  font-size: var(--fs-14);
  color: var(--jade);
  letter-spacing: 0.03em;
}
.data-value {
  font-size: var(--fs-14);
  color: var(--gold-2);
}

/* ---------- 13. 时间线 ---------- */
.timeline {
  position: relative;
  padding-left: 36px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--moss);
  border-radius: 3px;
}
.timeline__item {
  position: relative;
  padding-bottom: 30px;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 9px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--moss);
  transition: background var(--dur-3) var(--ease), border-color var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
}
.timeline__item.is-lit::before {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.12);
}
.timeline__year {
  font-family: var(--mono);
  font-size: var(--fs-12);
  letter-spacing: 0.14em;
  color: var(--gold);
  display: block;
  margin-bottom: 4px;
}

/* ---------- 14. 分段切换 ---------- */
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: var(--ink-2);
  border: var(--line-thin) solid rgba(217, 164, 65, .45);
  border-radius: var(--radius-pill);
  width: fit-content;
  max-width: 100%;
}
.segmented__btn {
  padding: 9px 20px;
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--gold-2);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.segmented__btn:hover { background: rgba(240, 215, 154, .16); }
.segmented__btn[aria-selected="true"] {
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
}

.segmented-panel[hidden] { display: none; }

/* ---------- 15. 图片容器 ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  border: var(--line-strong) solid var(--black);
  border-radius: 14px;
  box-shadow: var(--shadow-hard);
}
.img-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.85);
}
.img-frame--16x9 { aspect-ratio: 16 / 9; }
.img-frame--4x3 { aspect-ratio: 4 / 3; }
.img-frame--3x2 { aspect-ratio: 3 / 2; }
.img-frame--1x1 { aspect-ratio: 1 / 1; }
.img-frame--3x4 { aspect-ratio: 3 / 4; }

.img-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 18px;
  font-size: var(--fs-12);
  letter-spacing: 0.04em;
  color: var(--gold-2);
  background: linear-gradient(to top, rgba(10, 29, 23, .92), rgba(10, 29, 23, 0));
}

/* ---------- 16. 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 32px);
  z-index: 70;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: var(--fs-14);
  color: var(--ink);
  background: var(--gold);
  border: var(--line-thin) solid var(--black);
  border-radius: 50%;
  box-shadow: 4px 4px 0 rgba(6, 20, 16, .85);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.to-top[data-show] { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ---------- 17. 显隐动画 ---------- */
html.js-on [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
}
html.js-on [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 18. 焦点态 ---------- */
:focus { outline: none; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.nav-link:focus-visible,
.segmented__btn:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.panel--paper :focus-visible,
.card :focus-visible {
  outline: 3px solid var(--moss);
  outline-offset: 3px;
}

/* ---------- 19. 响应式 ---------- */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-block:last-child { grid-column: 1 / -1; }
}

@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; }

  .nav-island {
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 14px;
    border-radius: 26px;
  }

  .primary-nav {
    display: none;
    flex-basis: 100%;
    width: 100%;
    margin: 12px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(217, 164, 65, .3);
  }
  .primary-nav[data-open] { display: block; }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .nav-link {
    display: block;
    padding: 12px 10px;
    text-align: center;
    border: 1px solid rgba(240, 215, 154, .22);
  }

  .scroll-rail { display: none; }

  .chapter-strip {
    border-radius: 18px;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .chapter-strip::-webkit-scrollbar { display: none; }

  .split { grid-template-columns: 1fr !important; }

  .brand-tagline { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 1rem; }

  .site-header { padding-top: 10px; }

  .brand-name { font-size: var(--fs-17); }
  .brand-mark { width: 28px; height: 28px; }

  .chapter-strip { padding: 6px 12px; gap: 8px; }
  .chapter-strip__label { display: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-block:last-child { grid-column: auto; }
  .archive-entry { max-width: 100%; }

  .data-row { grid-template-columns: 1fr; gap: 4px; }
  .data-key { font-size: var(--fs-12); }

  .segmented { width: 100%; justify-content: flex-start; }
  .segmented__btn { flex: 1 1 auto; text-align: center; padding: 9px 12px; }

  .timeline { padding-left: 28px; }
  .timeline::before { left: 6px; }
  .timeline__item::before { left: -28px; }

  .to-top { width: 42px; height: 42px; }
}

@media (max-width: 460px) {
  .nav-list { grid-template-columns: 1fr; }
  .nav-toggle__label { display: none; }
}

/* ---------- 20. 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }

  html.js-on [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .card:hover,
  .archive-entry:hover,
  .btn:hover,
  .footer-cta:hover,
  .footer-links a:hover { transform: none; }
}
