/* ==========================================================================
   site.css — 球帝安装 共享样式（reset / 变量 / 排版 / 头部 / 页脚 / 基础组件）
   ========================================================================== */

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

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

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, dl, dd, dt,
figure, figcaption, blockquote, pre, table, th, td {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

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

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

table { border-collapse: collapse; }

main { display: block; }

/* ---------- 2. 设计令牌 ---------- */
:root {
  /* 色彩 */
  --paper: #F4EFE4;
  --card: #FBF8F0;
  --ink: #221E19;
  --slate: #55524B;
  --slate-soft: #7C786F;
  --sand: #C89A52;
  --sand-deep: #8A6425;
  --dune: #E4C48A;
  --goji: #A63A30;
  --silt: #C97B3C;
  --archive: #3F5A61;
  --moss: #5B7A5A;
  --rule: #DED8CC;
  --rule-strong: #C9C2B4;

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

  /* 尺度 */
  --shell: min(1240px, calc(100% - 40px));
  --radius: 4px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* 阴影 */
  --shadow-1: 0 1px 0 rgba(85, 82, 75, .10), 0 6px 16px -12px rgba(34, 30, 25, .45);
  --shadow-2: 0 2px 0 rgba(85, 82, 75, .12), 0 14px 28px -18px rgba(34, 30, 25, .55);
  --shadow-sticker: 0 2px 0 rgba(34, 30, 25, .16), 0 8px 14px -12px rgba(34, 30, 25, .7);
}

/* ---------- 3. 基础排版与纸感底色 ---------- */
body {
  min-height: 100%;
  color: var(--slate);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: .01em;
  background-color: var(--paper);
  /* 纸感颗粒：固定不随滚动移动 */
  background-image:
    radial-gradient(rgba(85, 82, 75, .055) .7px, transparent .95px),
    radial-gradient(rgba(34, 30, 25, .032) .6px, transparent .85px);
  background-size: 6px 6px, 13px 13px;
  background-position: 0 0, 3px 5px;
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: condensed;
  color: var(--ink);
  letter-spacing: -.02em;
  line-height: 1.25;
}

h1 { font-size: clamp(30px, 4.4vw, 52px); }
h2 { font-size: clamp(24px, 2.6vw, 34px); }
h3 { font-size: clamp(18px, 1.6vw, 21px); letter-spacing: .005em; }
h4 { font-size: 17px; letter-spacing: .01em; }

p { line-height: 1.85; }

strong, b { color: var(--ink); font-weight: 700; }

/* ---------- 4. 焦点与无障碍 ---------- */
:focus-visible {
  outline: 2px solid var(--goji);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  left: 18px;
  top: -120px;
  z-index: 120;
  padding: 10px 18px;
  border-radius: 3px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: var(--shadow-2);
  transition: top .2s var(--ease);
}

.skip-link:focus {
  top: 18px;
}

/* ---------- 5. 通用容器与工具类 ---------- */
.container,
.container-narrow,
.footer-inner,
.region-inner,
.footer-legal {
  margin-inline: auto;
}

.container { width: var(--shell); }
.container-narrow { width: min(860px, calc(100% - 40px)); }
.footer-inner,
.region-inner,
.footer-legal { width: var(--shell); }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sand-deep);
}

.section-head {
  max-width: 46em;
  margin-bottom: 28px;
}

.section-head > * + * { margin-top: 12px; }

.lede {
  max-width: 40em;
  font-size: 19px;
  line-height: 1.9;
  color: var(--ink);
}

.prose p {
  max-width: 42em;
  margin-bottom: 1.1em;
}
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol {
  max-width: 42em;
  margin-bottom: 1.1em;
  padding-left: 1.2em;
}
.prose ul { list-style: none; padding-left: 0; }
.prose ul > li {
  position: relative;
  padding-left: 1.35em;
  margin-bottom: .5em;
}
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .78em;
  width: 12px;
  height: 1.5px;
  background: var(--sand);
}

.stack > * + * { margin-top: var(--stack-gap, 22px); }

.grid {
  display: grid;
  gap: 22px;
}
.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)); }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease);
}

.btn-primary {
  background: var(--goji);
  color: #FBF8F0;
  box-shadow: 0 1px 0 rgba(34, 30, 25, .25), 0 6px 14px -10px rgba(166, 58, 48, .9);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(34, 30, 25, .3), 0 12px 20px -12px rgba(166, 58, 48, .95);
}

.btn-ghost {
  background: transparent;
  border-color: var(--rule-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--dune);
  border-color: var(--sand);
  transform: translateY(-2px);
}

.btn-sand {
  background: var(--sand);
  color: #2A241C;
  box-shadow: 0 1px 0 rgba(34, 30, 25, .22);
}
.btn-sand:hover {
  background: var(--dune);
  transform: translateY(-2px);
}

/* ---------- 7. 头部：悬浮胶囊导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 12px 0 8px;
  pointer-events: none;
}

.capsule {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(1260px, calc(100% - 32px));
  margin-inline: auto;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(251, 248, 240, .93);
  box-shadow: var(--shadow-1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: padding .26s var(--ease), box-shadow .26s var(--ease),
              background-color .26s var(--ease);
}

.site-header.is-condensed .capsule {
  padding: 6px 10px 6px 12px;
  background: rgba(251, 248, 240, .98);
  box-shadow: var(--shadow-2);
}

/* 品牌印记 */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
}

.brand-stamp {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: var(--sand);
  color: #FBF8F0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .02em;
  transform: rotate(-2.5deg);
  box-shadow: 1px 1px 0 var(--goji);
  transition: width .26s var(--ease), height .26s var(--ease), font-size .26s var(--ease);
}

.site-header.is-condensed .brand-stamp {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--ink);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--slate-soft);
}

/* 移动端切换按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}

.nav-toggle:hover { background: var(--dune); border-color: var(--sand); }

.nav-toggle-mark {
  position: relative;
  display: block;
  width: 14px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}
.nav-toggle-mark::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: currentColor;
  transform: translateY(-50%);
}

/* 导航 */
.site-nav {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.nav-list a {
  position: relative;
  display: block;
  padding: 8px 10px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--slate);
  white-space: nowrap;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--goji);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .26s var(--ease);
}

.nav-list a:hover {
  color: var(--ink);
  background: rgba(228, 196, 138, .38);
}
.nav-list a:hover::after { transform: scaleX(1); }

.nav-list a[aria-current="page"] {
  color: var(--ink);
  background: var(--dune);
}
.nav-list a[aria-current="page"]::after { transform: scaleX(1); }

/* 胶囊尾端：版本号 + 约上门 */
.capsule-tail {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px dashed var(--rule-strong);
  border-radius: 3px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  white-space: nowrap;
}

.version-label { color: var(--slate-soft); }
.version-num { color: var(--goji); font-weight: 700; }

/* ---------- 8. 页脚 ---------- */
.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--rule);
  background-color: var(--card);
  background-image: linear-gradient(180deg, rgba(228, 196, 138, .34), rgba(228, 196, 138, 0) 260px);
  color: var(--slate);
  font-size: 15px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.1fr);
  gap: 48px;
  padding: 56px 0 38px;
}

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

.site-footer .brand-stamp { transform: rotate(1.8deg); }

.footer-note {
  max-width: 24em;
  font-size: 14px;
  line-height: 1.9;
  color: var(--slate-soft);
}

.footer-tasks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.task-title {
  position: relative;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--rule-strong);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--ink);
}

.task-title::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 26px;
  height: 2px;
  background: var(--sand);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.task-list a {
  display: inline-block;
  padding-bottom: 1px;
  font-size: 14px;
  color: var(--slate);
  background-image: linear-gradient(var(--goji), var(--goji));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size .26s var(--ease), color .2s var(--ease);
}

.task-list a:hover {
  color: var(--ink);
  background-size: 100% 1px;
}

/* 覆盖区域带 */
.footer-region {
  border-top: 1px dashed var(--rule-strong);
  border-bottom: 1px dashed var(--rule-strong);
  background: rgba(63, 90, 97, .055);
}

.region-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  padding: 26px 0;
}

.region-block {
  position: relative;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper);
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.region-block::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--moss);
  opacity: .75;
}

.region-block:hover {
  transform: translateY(-2px);
  border-color: var(--sand);
  box-shadow: var(--shadow-1);
}

.region-name {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.region-count {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--slate-soft);
}

/* 台账与备案 */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  padding: 22px 0 34px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .03em;
  color: var(--slate-soft);
}

.footer-legal a {
  color: var(--slate);
  border-bottom: 1px dashed var(--rule-strong);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.footer-legal a:hover {
  color: var(--goji);
  border-bottom-color: var(--goji);
}

.footer-version {
  color: var(--goji);
  font-weight: 700;
}

/* ---------- 9. 基础版式组件 ---------- */
.breadcrumb {
  padding: 22px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--slate-soft);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-list li + li::before {
  content: "/";
  color: var(--rule-strong);
}

.breadcrumb-list a { transition: color .2s var(--ease); }
.breadcrumb-list a:hover { color: var(--goji); }

/* 左右分屏骨架 */
.split {
  display: grid;
  grid-template-columns: minmax(0, 34fr) minmax(0, 66fr);
  gap: 44px;
  align-items: start;
}

.rail {
  position: sticky;
  top: 100px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rail-title {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--slate-soft);
}

.rail-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-list a {
  display: block;
  padding: 9px 12px;
  border-left: 2px solid transparent;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--slate);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}

.rail-list a:hover {
  background: rgba(228, 196, 138, .34);
  border-left-color: var(--sand);
  color: var(--ink);
}

.rail-list a[aria-current="page"] {
  border-left-color: var(--goji);
  color: var(--ink);
  font-weight: 800;
}

.content-col { min-width: 0; }

/* 纸感卡片与套印 */
.card-paper {
  position: relative;
  padding: 22px 24px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-1);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}

.card-paper:hover {
  transform: translateY(-2px);
  border-color: var(--rule-strong);
  box-shadow: var(--shadow-2);
}

.print-shift { position: relative; }

.print-shift::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  width: 30px;
  height: 30px;
  border-top: 2px solid var(--sand);
  border-left: 2px solid var(--sand);
  border-radius: 4px 0 0 0;
  pointer-events: none;
}

.print-shift--goji::before {
  border-top-color: var(--goji);
  border-left-color: var(--goji);
}

/* 贴纸与标签 */
.sticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 2px;
  background: var(--dune);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: var(--shadow-sticker);
  transform: rotate(-2deg);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}

.sticker:hover {
  transform: rotate(0deg) translateY(-2px);
  background: var(--sand);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--slate);
}

.tag-sand { background: var(--sand); border-color: var(--sand); color: #2A241C; }
.tag-goji { background: var(--goji); border-color: var(--goji); color: #FBF8F0; }
.tag-archive { background: var(--archive); border-color: var(--archive); color: #FBF8F0; }
.tag-moss { background: var(--moss); border-color: var(--moss); color: #FBF8F0; }

/* 批注下划线 */
.annotation {
  position: relative;
  display: inline-block;
}

.annotation::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 2px;
  height: 6px;
  border-radius: 40% 60% 55% 45% / 60% 40% 60% 40%;
  background: var(--goji);
  opacity: .22;
  transform: rotate(-.4deg);
  pointer-events: none;
}

/* 横向主题带与刻度 */
.band {
  width: 100%;
  margin: 56px 0;
  padding: 40px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background-image: linear-gradient(180deg, rgba(228, 196, 138, .32), rgba(228, 196, 138, .06));
}

.ruler {
  height: 10px;
  background-image: repeating-linear-gradient(90deg, var(--rule-strong) 0 1px, transparent 1px 14px);
  opacity: .9;
}

/* 对照表 */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
}

.data-table {
  width: 100%;
  min-width: 560px;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 400;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.data-table thead th {
  background: rgba(228, 196, 138, .24);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--slate-soft);
  white-space: nowrap;
}

.data-table tbody tr:nth-child(even) { background: rgba(228, 196, 138, .12); }
.data-table tbody tr:hover { background: rgba(228, 196, 138, .32); }
.data-table tbody tr:last-child td { border-bottom: 0; }

.data-table td.num {
  font-family: var(--font-mono);
  letter-spacing: .03em;
  color: var(--ink);
  white-space: nowrap;
}

/* 图片容器（页面阶段放入本地实拍图） */
.figure {
  display: block;
  margin: 0;
}

.figure-media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 3px;
  aspect-ratio: 4 / 3;
  background-color: var(--dune);
  background-image: linear-gradient(135deg, rgba(200, 154, 82, .35), rgba(63, 90, 97, .22));
}

.figure-media img,
.figure-media video,
.figure-media picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.figure-media::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(34, 30, 25, .07);
  pointer-events: none;
}

.figure-media--wide { aspect-ratio: 16 / 9; }
.figure-media--tall { aspect-ratio: 3 / 4; }
.figure-media--square { aspect-ratio: 1 / 1; }

.figure-caption {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .04em;
  color: var(--slate-soft);
}

/* ---------- 10. 滚动显现 ---------- */
.js-ready [data-reveal] {
  transition: opacity .32s var(--ease), transform .32s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.js-ready [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(12px);
}

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1080px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 44px 0 30px;
  }
  .split { gap: 32px; }
}

@media (max-width: 1023px) {
  :root { --header-h: 64px; }

  .site-header { padding: 10px 0 6px; }

  .capsule {
    width: calc(100% - 24px);
    gap: 10px;
    padding: 8px 10px 8px 12px;
  }

  .brand-sub { display: none; }
  .brand-name { font-size: 16px; }

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

  .capsule-tail { margin-left: auto; }
  .capsule-tail .btn { display: none; }

  /* 导航沉底为横向任务线 */
  .site-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 95;
    flex: none;
    width: auto;
    padding: 8px;
    border: 1px solid var(--rule-strong);
    border-radius: 14px;
    background: var(--card);
    box-shadow: var(--shadow-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s linear;
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    padding: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .nav-list::-webkit-scrollbar { height: 4px; }
  .nav-list::-webkit-scrollbar-thumb {
    background: var(--rule-strong);
    border-radius: 2px;
  }

  .nav-list li {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .nav-list a {
    padding: 9px 14px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--paper);
    font-size: 13px;
  }

  .nav-list a::after { display: none; }

  .nav-list a[aria-current="page"] {
    background: var(--sand);
    border-color: var(--sand);
    color: var(--ink);
  }

  .split {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .rail {
    position: static;
    top: auto;
  }

  .band { margin: 40px 0; padding: 30px 0; }
}

@media (max-width: 900px) {
  .footer-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 16.5px; }

  .site-footer { margin-top: 64px; }

  .footer-tasks { grid-template-columns: 1fr; gap: 22px; }

  .region-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 20px 0 28px;
  }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .card-paper { padding: 18px 18px; }

  .lede { font-size: 17.5px; }

  .nav-toggle-label { display: none; }
}

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

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

  [data-reveal],
  .js-ready [data-reveal]:not(.is-in) {
    opacity: 1 !important;
    transform: none !important;
  }

  .card-paper:hover,
  .region-block:hover,
  .btn:hover,
  .sticker:hover {
    transform: none !important;
  }
}
