/* ==========================================================================
   澳门威斯人3775 · 共享站点样式 /assets/site.css
   复古档案室 × 赌场筹码：墨绿分区、鎏金索引、纸白长文、印刷双线
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 设计令牌 ---------- */
:root {
  --ink-900: #0F3B32;
  --ink-800: #16463A;
  --ink-700: #1E5648;
  --gold: #C9A227;
  --gold-light: #E3C567;
  --red: #8C1C2B;
  --red-light: #B23A48;
  --paper: #F4F1E9;
  --paper-2: #E8E3D8;
  --slate: #6B7A8F;
  --text: #2B2B2B;
  --line: #9AA5B1;
  --shadow-card: 0 12px 28px -24px rgba(15, 59, 50, .8);
  --shell: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 3px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", STSong, "SimSun", Georgia, serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

/* ---------- 3. 基底与中文排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 6% 2%, rgba(107, 122, 143, .10), transparent 42%),
    radial-gradient(circle at 96% 10%, rgba(201, 162, 39, .10), transparent 36%),
    repeating-linear-gradient(0deg, rgba(43, 43, 43, .022) 0 1px, transparent 1px 4px);
}
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: .005em;
  color: var(--ink-900);
}
h1 { font-size: clamp(28px, 4.4vw, 46px); }
h2 { font-size: clamp(23px, 3vw, 34px); }
h3 { font-size: clamp(19px, 1.8vw, 23px); }
h4 { font-size: 17px; }
p { line-height: 1.75; }
strong { font-weight: 700; color: var(--ink-900); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 2px; }
.site-header :focus-visible,
.site-footer :focus-visible,
.section--ink :focus-visible,
.section--panel :focus-visible { outline-color: var(--gold-light); }

/* ---------- 4. 工具类 ---------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--font-mono); letter-spacing: .02em; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.eyebrow {
  display: block; margin-bottom: 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold);
}
.rule-gold { height: 1px; border: 0; margin: 0; background: linear-gradient(90deg, rgba(201, 162, 39, .85), rgba(201, 162, 39, .04)); }

/* ---------- 5. 跳跃链接 ---------- */
.skip-link {
  position: absolute; left: var(--gutter); top: -64px; z-index: 90;
  display: inline-block; padding: 9px 16px; border-radius: var(--radius);
  background: var(--gold); color: #1E1704; font-size: 14px; font-weight: 700; text-decoration: none;
  transition: top .16s var(--ease);
}
.skip-link:focus { top: 8px; }

/* ---------- 6. 头部命令栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  color: var(--paper);
  background: linear-gradient(180deg, #0F3B32 0%, #123F35 100%);
  border-bottom: 1px solid rgba(201, 162, 39, .34);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .35), 0 16px 34px -30px rgba(0, 0, 0, .95);
}
.site-header::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(201, 162, 39, .38) 0 6px, transparent 6px 12px);
}
.site-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(14px, 2.4vw, 32px);
  row-gap: 10px;
  padding-block: 11px 13px;
}

.masthead { min-width: 0; }
.masthead__brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.masthead__mark {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 34px;
  font-family: var(--font-mono); font-size: 13.5px; letter-spacing: .08em;
  color: #F0D98A; border: 1px solid rgba(201, 162, 39, .55); border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(201, 162, 39, .30), rgba(201, 162, 39, .06) 62%, rgba(0, 0, 0, .20));
  box-shadow: inset 0 1px 0 rgba(227, 197, 103, .45), inset 0 -1px 0 rgba(0, 0, 0, .38);
}
.masthead__text { display: block; min-width: 0; }
.masthead__name {
  display: block; font-family: var(--font-serif); font-weight: 800; font-size: 19px; line-height: 1.2;
  color: var(--paper); transition: color .16s var(--ease);
}
.masthead__brand:hover .masthead__name { color: var(--gold-light); }
.masthead__sub {
  display: block; margin-top: 2px; font-size: 12px; line-height: 1.5; letter-spacing: .03em;
  color: rgba(244, 241, 233, .62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.nav-toggle {
  display: none; align-items: center; gap: 8px; justify-self: end;
  padding: 8px 12px; border: 1px solid rgba(201, 162, 39, .45); border-radius: var(--radius);
  color: var(--gold-light); background: rgba(201, 162, 39, .08); font-size: 13px;
  transition: background-color .16s var(--ease), border-color .16s var(--ease);
}
.nav-toggle:hover { background: rgba(201, 162, 39, .18); border-color: rgba(201, 162, 39, .8); }
.nav-toggle__bars { position: relative; display: block; width: 16px; height: 10px; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; }
.nav-toggle__bars::before { top: 0; box-shadow: 0 4.5px 0 currentColor; }
.nav-toggle__bars::after { bottom: 0; }
.nav-toggle__label { font-family: var(--font-mono); letter-spacing: .05em; }

.cmd-nav { min-width: 0; }
.cmd-nav__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 0; }
.cmd-nav__item { min-width: 0; }
.cmd-nav__link {
  display: inline-flex; align-items: baseline; gap: 7px;
  padding: 8px 9px 7px; border-bottom: 2px solid transparent; border-radius: 2px 2px 0 0;
  font-size: 14.5px; line-height: 1.3; text-decoration: none; color: rgba(244, 241, 233, .82);
  transition: color .16s var(--ease), background-color .16s var(--ease), border-color .16s var(--ease);
}
.cmd-nav__link:hover { color: var(--gold-light); background: rgba(244, 241, 233, .07); }
.cmd-nav__num { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; color: rgba(201, 162, 39, .72); }
.cmd-nav__text { white-space: nowrap; }
.cmd-nav__link[aria-current="page"] {
  color: var(--gold-light); border-bottom-color: var(--gold);
  background: linear-gradient(180deg, rgba(201, 162, 39, .16), rgba(201, 162, 39, 0));
}
.cmd-nav__link[aria-current="page"] .cmd-nav__num { color: var(--gold-light); }

.cmd-bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.cmd-bar__status {
  position: relative; padding: 6px 10px 6px 22px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  color: rgba(244, 241, 233, .74); border: 1px solid rgba(107, 122, 143, .5);
  border-radius: var(--radius); background: rgba(107, 122, 143, .16);
}
.cmd-bar__status::before {
  content: ""; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px rgba(201, 162, 39, .22);
}
.cmd-bar__ghost {
  padding-bottom: 1px; white-space: nowrap; font-size: 13px; text-decoration: none;
  color: rgba(244, 241, 233, .78); border-bottom: 1px solid rgba(201, 162, 39, .5);
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.cmd-bar__ghost:hover { color: var(--gold-light); border-bottom-color: var(--gold-light); }

.read-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; overflow: hidden; background: rgba(244, 241, 233, .14); }
.read-progress__bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-light)); transition: width .1s linear; }

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: 1px solid transparent; border-radius: var(--radius);
  font-size: 14.5px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.btn--primary { background: var(--red); color: #FBEDE7; border-color: #6E1522; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
.btn--primary:hover { background: var(--red-light); }
.btn--gold { background: var(--gold); color: #241B04; border-color: #A5841A; }
.btn--gold:hover { background: var(--gold-light); }
.btn--ghost { background: rgba(201, 162, 39, .06); color: var(--gold-light); border-color: rgba(201, 162, 39, .55); }
.btn--ghost:hover { background: rgba(201, 162, 39, .18); color: #F3E2A8; }
.btn--sm { padding: 8px 14px; font-size: 13.5px; }
.btn--block { width: 100%; }

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative; color: rgba(244, 241, 233, .84);
  background: linear-gradient(180deg, #0F3B32 0%, #0B2A24 100%);
  border-top: 1px solid rgba(201, 162, 39, .34);
}
.site-footer::before {
  content: ""; position: absolute; top: 3px; left: 0; right: 0; height: 1px; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(201, 162, 39, .34) 0 6px, transparent 6px 12px);
}
.site-footer__inner { padding-block: clamp(34px, 5vw, 58px) 22px; }
.site-footer__masthead {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding-bottom: 22px; border-bottom: 1px solid rgba(201, 162, 39, .22);
}
.site-footer__brandblock { min-width: 0; }
.site-footer__brand { font-family: var(--font-serif); font-weight: 800; font-size: clamp(21px, 2.4vw, 27px); line-height: 1.3; color: var(--paper); }
.site-footer__sub { margin-top: 6px; max-width: 54ch; font-size: 13.5px; line-height: 1.7; color: rgba(244, 241, 233, .62); }
.seal { flex: 0 0 auto; width: 64px; height: 64px; color: var(--gold); opacity: .9; }

.site-footer__grid {
  display: grid; grid-template-columns: .85fr 1fr 1.5fr;
  gap: clamp(20px, 3vw, 40px); padding-block: clamp(26px, 4vw, 40px);
}
.site-footer__col { min-width: 0; padding-left: clamp(12px, 1.6vw, 20px); border-left: 1px solid rgba(201, 162, 39, .18); }
.site-footer__heading {
  margin-bottom: 14px; font-family: var(--font-mono); font-weight: 600; font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
}
.site-footer__list { display: grid; gap: 9px; }
.site-footer__link {
  display: inline-block; font-size: 14.5px; text-decoration: none; color: rgba(244, 241, 233, .82);
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.site-footer__link:hover { color: var(--gold-light); border-bottom-color: rgba(227, 197, 103, .7); }
.site-footer__text { max-width: 46ch; font-size: 14.5px; line-height: 1.8; color: rgba(244, 241, 233, .72); }
.site-footer__col--wide .site-footer__text { color: rgba(244, 241, 233, .8); }

.site-footer__bottom { display: grid; gap: 6px; padding-top: 18px; border-top: 1px solid rgba(201, 162, 39, .22); }
.foot-line { font-family: var(--font-mono); font-size: 12px; line-height: 1.7; letter-spacing: .03em; color: rgba(244, 241, 233, .68); overflow-wrap: anywhere; }
.foot-line--dim { color: rgba(244, 241, 233, .5); }

/* ---------- 9. 区块与章节标题 ---------- */
.section { position: relative; padding-block: clamp(36px, 5.5vw, 68px); }
.section--paper { background: var(--paper); }
.section--stack { background: var(--paper-2); }
.section--ink { background: var(--ink-900); color: var(--paper); }
.section--panel { background: var(--ink-800); color: var(--paper); }
.section--seam { border-top: 1px solid rgba(201, 162, 39, .3); }
.section--ink h1, .section--ink h2, .section--ink h3,
.section--panel h1, .section--panel h2, .section--panel h3 { color: var(--paper); }
.section--ink a, .section--panel a { color: var(--gold-light); }
.section--ink p, .section--panel p { color: rgba(244, 241, 233, .86); }

.section-head { margin-bottom: clamp(20px, 3vw, 32px); max-width: 74ch; }
.section-head__title {
  margin-bottom: 10px; padding-bottom: 10px;
  font-family: var(--font-serif); font-weight: 800; font-size: clamp(22px, 2.9vw, 34px); line-height: 1.26;
  color: var(--ink-900); border-bottom: 1px solid rgba(201, 162, 39, .5);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
}
.section--ink .section-head__title, .section--panel .section-head__title {
  color: var(--paper); text-shadow: 0 1px 0 rgba(0, 0, 0, .42);
}
.section-head__note { font-size: 14.5px; color: var(--slate); }
.section--ink .section-head__note, .section--panel .section-head__note { color: rgba(244, 241, 233, .64); }

/* ---------- 10. 网格 ---------- */
.grid { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.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)); }
.grid--asym { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.grid--asym-rev { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); }

/* ---------- 11. 卡片 / 标签 / 筛选键 ---------- */
.card {
  position: relative; padding: clamp(16px, 2vw, 22px);
  background: var(--paper); border: 1px solid rgba(43, 43, 43, .16); border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: border-color .16s var(--ease), background-color .16s var(--ease);
}
.card:hover { border-color: rgba(140, 28, 43, .42); }
.card--ink { background: var(--ink-800); border-color: rgba(201, 162, 39, .28); color: rgba(244, 241, 233, .88); }
.card--ink:hover { border-color: rgba(201, 162, 39, .62); }
.card--ink .card__title { color: var(--paper); }
.card--ink .card__meta { color: rgba(244, 241, 233, .58); }
.card--stamp::after {
  content: ""; position: absolute; top: 10px; right: 10px; width: 32px; height: 32px;
  border: 1px dashed rgba(140, 28, 43, .42); border-radius: 2px; pointer-events: none;
}
.card__title { margin-bottom: 8px; font-family: var(--font-serif); font-weight: 800; font-size: 18px; line-height: 1.35; color: var(--ink-900); }
.card__meta { font-family: var(--font-mono); font-size: 12px; letter-spacing: .03em; color: var(--slate); }
.card__body { font-size: 15px; line-height: 1.7; }

.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 2px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .05em;
  color: #4A5666; background: rgba(107, 122, 143, .12); border: 1px solid rgba(107, 122, 143, .55);
}
.tag--gold { color: #7E6412; background: rgba(201, 162, 39, .16); border-color: rgba(201, 162, 39, .6); }
.tag--red { color: #7A1826; background: rgba(140, 28, 43, .1); border-color: rgba(140, 28, 43, .45); }
.tag--ink { color: var(--gold-light); background: rgba(15, 59, 50, .55); border-color: rgba(201, 162, 39, .45); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--text);
  transition: background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.chip:hover { border-color: var(--red); color: var(--red); }
.chip.is-active, .chip[aria-pressed="true"] { background: var(--ink-900); border-color: var(--ink-900); color: var(--gold-light); }

/* ---------- 12. 面包屑 ---------- */
.breadcrumb { padding-top: 16px; }
.breadcrumb__list { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; }
.breadcrumb__item { color: var(--slate); }
.breadcrumb__link { color: var(--ink-800); text-decoration: none; border-bottom: 1px solid rgba(201, 162, 39, .5); }
.breadcrumb__link:hover { color: var(--red); border-bottom-color: var(--red); }
.breadcrumb__sep { color: var(--line); }
.breadcrumb__item[aria-current="page"] { color: var(--slate); }

/* ---------- 13. 正文容器 ---------- */
.prose { max-width: 68ch; font-size: 16.5px; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 1.8em; padding-bottom: 8px; font-size: clamp(20px, 2.2vw, 26px); border-bottom: 1px solid rgba(201, 162, 39, .4); }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { display: grid; gap: .4em; padding-left: 1.4em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--gold); }
.prose a { color: var(--ink-800); text-decoration: underline; text-decoration-color: rgba(201, 162, 39, .7); }
.prose a:hover { color: var(--red); }
.prose blockquote { padding: 6px 0 6px 16px; border-left: 3px solid var(--gold); color: var(--slate); font-size: 15.5px; }
.section--ink .prose, .section--panel .prose { color: rgba(244, 241, 233, .88); }
.section--ink .prose h2, .section--panel .prose h2 { color: var(--paper); }

/* ---------- 14. 图片容器（页面阶段放入真实图片） ---------- */
.media-frame {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 2px;
  background: linear-gradient(135deg, #E8E3D8 0%, #D6D0C1 100%);
}
.media-frame::before {
  content: ""; position: absolute; inset: 6px; border: 1px solid rgba(43, 43, 43, .14); pointer-events: none; z-index: 2;
}
.media-frame img, .media-frame picture, .media-frame svg { width: 100%; height: 100%; object-fit: cover; }
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--std { aspect-ratio: 4 / 3; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--ink { background: linear-gradient(135deg, #16463A 0%, #0F3B32 100%); border-color: rgba(201, 162, 39, .35); }
.media-frame__label {
  position: absolute; left: 12px; bottom: 12px; z-index: 3;
  padding: 4px 8px; border: 1px solid rgba(201, 162, 39, .45); border-radius: 2px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  color: var(--gold-light); background: rgba(15, 59, 50, .86);
}

/* ---------- 15. 时间轴归档带 ---------- */
.timeline { position: relative; padding-left: 22px; border-left: 1px solid rgba(154, 165, 177, .6); }
.timeline__list { display: grid; gap: 22px; }
.timeline__item { position: relative; }
.timeline__dot {
  position: absolute; left: -26px; top: 6px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, .18);
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.timeline__item.is-lit .timeline__dot { background: var(--red-light); box-shadow: 0 0 0 4px rgba(178, 58, 72, .22); }
.timeline__date { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .05em; color: var(--slate); }
.timeline__body { font-size: 15.5px; line-height: 1.7; }

/* ---------- 16. 侧栏目录与索引条目 ---------- */
.toc { position: sticky; top: 96px; }
.toc__list { display: grid; gap: 2px; }
.toc__item { min-width: 0; }
.toc__link {
  display: flex; gap: 10px; padding: 7px 10px; font-size: 14px; text-decoration: none;
  color: var(--slate); border-left: 2px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease), background-color .16s var(--ease);
}
.toc__link:hover { color: var(--ink-800); border-left-color: rgba(201, 162, 39, .6); }
.toc__link.is-active { color: var(--red); border-left-color: var(--red); background: rgba(140, 28, 43, .06); }

.index-link { display: block; padding: 10px 0; text-decoration: none; border-bottom: 1px solid rgba(154, 165, 177, .4); }
.index-link__note {
  display: block; max-height: 0; overflow: hidden; opacity: 0;
  font-size: 13px; line-height: 1.6; color: var(--slate);
  transition: max-height .22s var(--ease), opacity .22s var(--ease);
}
.index-link:hover .index-link__note,
.index-link:focus-visible .index-link__note { max-height: 5em; opacity: 1; }

/* ---------- 17. 进入视口显现 ---------- */
[data-reveal] { opacity: 0; transform: translateY(8px); transition: opacity .28s var(--ease), transform .28s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 18. 响应式：平板 ---------- */
@media (max-width: 1080px) {
  .cmd-bar__status { display: none; }
  .cmd-nav__list { justify-content: flex-start; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--asym, .grid--asym-rev { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
}

/* ---------- 19. 响应式：手机（导航折为两列索引网格，不做抽屉） ---------- */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .site-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px; row-gap: 10px;
    padding-block: 10px 12px;
  }
  .masthead { grid-column: 1; }
  .nav-toggle { display: inline-flex; grid-column: 2; }
  .cmd-nav { grid-column: 1 / -1; display: none; }
  .cmd-nav[data-open] {
    display: block; padding: 10px 0 4px; margin-top: 2px;
    border-top: 1px solid rgba(201, 162, 39, .28);
  }
  .cmd-nav__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .cmd-nav__link {
    width: 100%; padding: 10px 10px 9px; border-bottom-color: transparent;
    background: rgba(244, 241, 233, .05); border-radius: 2px;
  }
  .cmd-nav__link[aria-current="page"] { border-bottom-color: transparent; box-shadow: inset 2px 0 0 var(--gold); }
  .cmd-bar { grid-column: 1 / -1; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__col--wide { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .masthead__sub { font-size: 11.5px; }
  .masthead__mark { width: 42px; height: 30px; font-size: 12.5px; }
  .cmd-bar { justify-content: flex-start; }
  .cmd-bar .btn { flex: 1 1 auto; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__col--wide { grid-column: auto; }
  .seal { width: 52px; height: 52px; }
}

/* ---------- 20. 降低动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .read-progress__bar { transition: none; }
  .index-link__note { max-height: 5em; opacity: 1; }
}
