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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; padding: 0; }

ul, ol { list-style: none; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ===== 2. 变量 ===== */
:root {
  --ink-900: #081A16;
  --ink-800: #0E2A24;
  --ink-700: #173B33;
  --gold: #C9A227;
  --gold-bright: #E6CE7A;
  --gold-pale: #F0DFA6;
  --red: #D6453D;
  --steel: #5B7C8D;
  --paper: #F7F5EF;
  --text-dark: #1B2B27;
  --text-muted: #6B7A75;
  --ok: #3E7C6A;

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;

  --rail-w: 220px;
  --status-h: 32px;
  --capsule-h: 64px;
  --header-h: 106px;
  --edge: clamp(16px, 3vw, 40px);

  --clip-lg: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  --clip-sm: polygon(0 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

/* ===== 3. 中文排版与页面底 ===== */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--paper);
  background-color: var(--ink-900);
  background-image:
    linear-gradient(rgba(91, 124, 141, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 124, 141, 0.07) 1px, transparent 1px);
  background-size: 72px 72px, 72px 72px;
  padding-top: var(--header-h);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#main-content { scroll-margin-top: calc(var(--header-h) + 16px); }

h1, h2, h3, h4 { font-weight: 900; line-height: 1.2; letter-spacing: 0.01em; }

/* ===== 4. 通用容器与正文 ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

.prose {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(247, 245, 239, 0.82);
}

.prose p + p { margin-top: 1em; }

.prose h2 { font-size: clamp(24px, 2.6vw, 32px); color: var(--paper); margin: 1.8em 0 0.6em; }
.prose h3 { font-size: 20px; color: var(--gold-pale); margin: 1.6em 0 0.5em; }
.prose strong { color: var(--gold-bright); }
.prose a { color: var(--gold-bright); border-bottom: 1px solid rgba(201, 162, 39, 0.45); }

/* ===== 5. 面包屑与标签 ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(91, 124, 141, 1);
}

.breadcrumb a { transition: color 0.2s ease; }
.breadcrumb a:hover { color: var(--gold-bright); }

.breadcrumb__sep { color: rgba(201, 162, 39, 0.7); }

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-pale);
  border: 1px solid rgba(201, 162, 39, 0.42);
  border-radius: 2px;
}

/* ===== 6. 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  background: rgba(201, 162, 39, 0.08);
  border: 1px solid rgba(201, 162, 39, 0.5);
  clip-path: var(--clip-sm);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover { background: rgba(201, 162, 39, 0.18); color: var(--gold-pale); }

.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--ink-900); }
.btn--gold:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--ink-900); }

.btn--ghost { background: transparent; }

.btn--capsule {
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  clip-path: none;
  background: rgba(201, 162, 39, 0.16);
  white-space: nowrap;
}

/* ===== 7. 面板与图片容器 ===== */
.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--ink-700);
  border: 1px solid rgba(201, 162, 39, 0.2);
  clip-path: var(--clip-lg);
}

.panel--paper {
  background: var(--paper);
  color: var(--text-dark);
  border-color: rgba(27, 43, 39, 0.12);
}

.panel--paper .prose { color: var(--text-dark); }
.panel--paper .prose h2,
.panel--paper .prose h3 { color: var(--text-dark); }
.panel--paper .prose strong { color: #8A6E12; }

.media-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--ink-700);
  background-image:
    linear-gradient(rgba(91, 124, 141, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 124, 141, 0.16) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px;
  clip-path: var(--clip-lg);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.06) sepia(0.12) brightness(0.94);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 42, 36, 0.12) 0%, rgba(8, 26, 22, 0.62) 100%);
}

.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--portrait { aspect-ratio: 4 / 5; }

/* ===== 8. 章节目录（页面阶段复用） ===== */
.chapter-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.chapter-nav__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 10px;
  color: rgba(247, 245, 239, 0.58);
  border-left: 2px solid rgba(91, 124, 141, 0.45);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.chapter-nav__link:hover { color: var(--gold-bright); border-left-color: var(--gold); }

.chapter-nav__link.is-current,
.chapter-nav__link[aria-current] {
  color: var(--gold-bright);
  border-left-color: var(--gold-bright);
  background: rgba(201, 162, 39, 0.08);
}

/* ===== 9. 页头：骨架 ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background: transparent;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
  background: var(--gold-bright);
  border-radius: 2px;
  transform: translateY(-200%);
  transition: transform 0.18s ease;
}

.skip-link:focus { transform: translateY(0); }

/* ===== 10. 状态条 ===== */
.status-bar {
  position: relative;
  background: var(--ink-900);
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
}

.status-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1680px;
  height: var(--status-h);
  margin: 0 auto;
  padding: 0 var(--edge);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(247, 245, 239, 0.76);
  white-space: nowrap;
}

.status-bar__sync {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-bar__sep {
  width: 1px;
  height: 10px;
  background: rgba(201, 162, 39, 0.42);
}

.status-bar__time { color: rgba(91, 124, 141, 0.95); }

.status-bar__context {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(201, 162, 39, 0.95);
}

.status-bar__key { color: rgba(91, 124, 141, 0.95); }
.status-bar__val { color: var(--gold-pale); }

.status-bar__actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.status-bar__alert {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--gold-pale);
  transition: color 0.2s ease;
}

.status-bar__alert:hover { color: var(--gold-bright); }

.status-bar__hours { color: rgba(91, 124, 141, 0.95); }

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(62, 124, 106, 0.22);
  flex: 0 0 auto;
  animation: pulse-dot 3.2s ease-in-out infinite;
}

.status-dot--alert {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(214, 69, 61, 0.22);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(201, 162, 39, 0.14);
}

.scroll-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-bright) 100%);
  transition: width 0.1s linear;
}

/* ===== 11. 悬浮胶囊导航 ===== */
.nav-shell {
  padding: 10px var(--edge) 0;
}

.nav-capsule {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
  width: 100%;
  max-width: 1680px;
  height: var(--capsule-h);
  margin: 0 auto;
  padding: 0 10px 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(23, 59, 51, 0.94) 0%, rgba(14, 42, 36, 0.96) 100%);
  border: 1px solid rgba(201, 162, 39, 0.3);
  box-shadow: 0 24px 48px -32px #000, inset 0 1px 0 rgba(240, 223, 166, 0.14);
  backdrop-filter: blur(16px);
  transition: height 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
}

.site-header[data-shrink] .nav-capsule {
  height: 56px;
  border-color: rgba(201, 162, 39, 0.48);
  box-shadow: 0 18px 36px -26px #000, inset 0 1px 0 rgba(240, 223, 166, 0.18);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.brand:hover { background: rgba(201, 162, 39, 0.1); }

.brand__mark {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
  background: linear-gradient(140deg, var(--gold-bright) 0%, var(--gold) 56%, #8F6F14 100%);
  clip-path: polygon(0 0, 100% 0, 100% 66%, 66% 100%, 0 100%);
  box-shadow: 0 0 18px -6px rgba(230, 206, 122, 0.9);
  flex: 0 0 auto;
}

.brand__mark-inner {
  position: absolute;
  inset: 6px;
  background: var(--ink-800);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%);
}

.brand__text { display: flex; flex-direction: column; line-height: 1.05; }

.brand__name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--paper);
}

.brand__sub {
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(240, 223, 166, 0.8);
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  height: 40px;
  margin-left: auto;
  padding: 0 14px;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
  border: 1px solid rgba(201, 162, 39, 0.42);
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.nav-toggle:hover { background: rgba(201, 162, 39, 0.12); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.2s ease;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, top 0.2s ease;
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.site-header[data-open] .nav-toggle__bars { background: transparent; }
.site-header[data-open] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* 导航本体 */
.site-nav { margin-left: auto; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgba(247, 245, 239, 0.78);
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.site-nav__link:hover {
  color: var(--gold-bright);
  background: rgba(201, 162, 39, 0.1);
}

.site-nav__link[aria-current="page"] {
  color: var(--gold-bright);
  font-weight: 700;
  background: rgba(201, 162, 39, 0.12);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.44);
}

.site-nav__item--cta { display: none; }

/* ===== 12. 左侧纵向栏目轨道 ===== */
.side-rail { display: none; }

.side-rail__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.side-rail__glyph {
  width: 4px;
  height: 34px;
  background: linear-gradient(180deg, var(--gold-bright) 0%, rgba(201, 162, 39, 0) 100%);
}

.side-rail__caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(240, 223, 166, 0.72);
}

.side-rail__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-rail__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-left: 2px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.side-rail__item:hover { background: rgba(201, 162, 39, 0.08); }
.side-rail__item:hover .side-rail__label { color: var(--gold-pale); }

.side-rail__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(91, 124, 141, 0.95);
}

.side-rail__label {
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgba(247, 245, 239, 0.72);
  transition: color 0.2s ease;
}

.side-rail__item[aria-current="page"] {
  border-left-color: var(--gold);
  background: rgba(201, 162, 39, 0.1);
}

.side-rail__item[aria-current="page"] .side-rail__num { color: var(--gold-bright); }

.side-rail__item[aria-current="page"] .side-rail__label {
  color: var(--paper);
  font-weight: 700;
}

.side-rail__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(91, 124, 141, 0.9);
  padding-top: 14px;
  border-top: 1px solid rgba(201, 162, 39, 0.16);
}

/* ===== 13. 版本切换与返回顶部 ===== */
.version-switch {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 140;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: rgba(8, 26, 22, 0.94);
  border: 1px solid rgba(201, 162, 39, 0.32);
  border-radius: 14px;
  clip-path: var(--clip-lg);
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 48px -32px #000;
}

.version-switch__label {
  display: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(91, 124, 141, 0.95);
  padding: 0 4px;
}

.version-switch__btn {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(247, 245, 239, 0.7);
  border: 1px solid rgba(91, 124, 141, 0.4);
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.version-switch__btn:hover { color: var(--gold-bright); border-color: rgba(201, 162, 39, 0.6); }

.version-switch__btn.is-active {
  color: var(--ink-900);
  font-weight: 700;
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 140;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--gold-bright);
  background: rgba(8, 26, 22, 0.94);
  border: 1px solid rgba(201, 162, 39, 0.42);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.to-top[hidden] { display: none; }
.to-top:hover { background: rgba(201, 162, 39, 0.18); color: var(--gold-pale); }

.to-top__arrow {
  width: 8px;
  height: 8px;
  border-left: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.to-top__text { font-family: var(--font-mono); }

/* ===== 14. 页脚 ===== */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(56px, 8vw, 104px);
  padding: clamp(40px, 6vw, 72px) var(--edge) 0;
  background: linear-gradient(180deg, var(--ink-900) 0%, #050F0C 100%);
  border-top: 1px solid rgba(201, 162, 39, 0.22);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 44px);
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
}

.site-footer__brand { max-width: 44ch; }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-brand__mark {
  width: 30px;
  height: 30px;
  background: linear-gradient(140deg, var(--gold-bright) 0%, var(--gold) 58%, #8F6F14 100%);
  clip-path: polygon(0 0, 100% 0, 100% 64%, 64% 100%, 0 100%);
  flex: 0 0 auto;
}

.footer-brand__text { display: flex; flex-direction: column; line-height: 1.1; }

.footer-brand__name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--paper);
}

.footer-brand__sub {
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(240, 223, 166, 0.78);
}

.site-footer__note {
  font-size: 13px;
  line-height: 1.75;
  color: rgba(247, 245, 239, 0.56);
}

.site-footer__note--tight { margin-top: 12px; font-size: 12px; }

.site-footer__sign {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--gold-pale);
}

.site-footer__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(91, 124, 141, 1);
  text-transform: uppercase;
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.site-footer__link {
  font-size: 14px;
  color: rgba(247, 245, 239, 0.72);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.site-footer__link:hover { color: var(--gold-bright); }

.site-footer__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  line-height: 1.6;
}

.site-footer__key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: rgba(91, 124, 141, 1);
  text-transform: uppercase;
}

.site-footer__value {
  color: rgba(247, 245, 239, 0.74);
  word-break: break-word;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: 1680px;
  margin: clamp(28px, 4vw, 48px) auto 0;
  padding: 18px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(247, 245, 239, 0.5);
  border-top: 1px solid rgba(201, 162, 39, 0.14);
}

.site-footer__icp { color: rgba(240, 223, 166, 0.72); }

.site-footer__skyline {
  height: 64px;
  margin: 0 calc(var(--edge) * -1);
  background-image:
    radial-gradient(120% 140% at 50% 100%, rgba(201, 162, 39, 0.18) 0%, transparent 68%),
    repeating-linear-gradient(90deg, rgba(201, 162, 39, 0.16) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(0deg, rgba(91, 124, 141, 0.12) 0 1px, transparent 1px 18px);
  border-top: 1px solid rgba(201, 162, 39, 0.28);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 92%);
  mask-image: linear-gradient(to top, #000 0%, transparent 92%);
}

/* ===== 15. 断点：平板与手机 ===== */
@media (max-width: 899px) {
  .status-bar__context,
  .status-bar__hours { display: none; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    margin-left: 0;
    padding: 10px;
    background: rgba(8, 26, 22, 0.98);
    border: 1px solid rgba(201, 162, 39, 0.32);
    border-radius: 18px;
    box-shadow: 0 30px 60px -34px #000;
    backdrop-filter: blur(14px);
    clip-path: var(--clip-lg);
  }

  .site-header[data-open] .site-nav { display: flex; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
  }

  .site-nav__link {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 15px;
  }

  .site-nav__item--cta { display: block; margin-top: 8px; }

  .site-nav__item--cta .btn--capsule {
    width: 100%;
    height: 44px;
    margin: 0;
  }

  .version-switch { left: 10px; bottom: 10px; padding: 6px; }
  .version-switch__btn { height: 28px; font-size: 11px; padding: 0 9px; }

  .to-top { right: 10px; bottom: 10px; height: 40px; padding: 0 13px; }
}

@media (min-width: 620px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  .site-nav { display: block; }
  .nav-toggle { display: none; }
}

@media (min-width: 1100px) {
  .site-nav__item--cta { display: block; margin-left: 6px; }
}

@media (min-width: 1024px) {
  .site-footer__inner { grid-template-columns: 1.5fr 0.8fr 0.8fr 1.1fr; }
  .site-footer__brand { grid-column: auto; }
}

@media (min-width: 1280px) {
  body { padding-left: var(--rail-w); }

  .site-header { left: var(--rail-w); }

  .side-rail {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 130;
    width: var(--rail-w);
    padding: calc(var(--status-h) + 26px) 18px 128px;
    background: linear-gradient(180deg, var(--ink-800) 0%, var(--ink-900) 72%);
    border-right: 1px solid rgba(201, 162, 39, 0.16);
  }

  .side-rail::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 120px;
    background: linear-gradient(180deg, var(--gold) 0%, transparent 100%);
  }

  .version-switch {
    left: 22px;
    bottom: 22px;
    width: 176px;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding: 10px;
  }

  .version-switch__label { display: block; }
  .version-switch__btn { width: 100%; height: 32px; }
}

/* ===== 16. 可访问性与降级 ===== */
html.is-nav-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .status-dot { animation: none; }
}
