/* ==========================================================================
   澳门王牌网 · 共享样式表 /assets/site.css
   午夜索引卡：暗底、金线、微光颗粒
   ========================================================================== */

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

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

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, form { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; border-spacing: 0; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --ink-0: #0B1410;   /* 午夜墨底 */
  --ink-1: #12211B;   /* 深墨绿面 */
  --ink-2: #1B2C24;   /* 苔绿卡面 */
  --gold: #C9A227;    /* 暗金主线 */
  --gold-light: #E8D9A8; /* 米金高光 */
  --magenta: #FF2D78; /* 洋红脉冲 */
  --cyan: #3DDCFF;    /* 电光蓝信号 */
  --stone: #B9C2B8;   /* 岩灰正文 */
  --paper: #E7E3D8;   /* 米白纸感 */
  --clay: #A8562F;    /* 陶土标注 */
  --muted: #6E7F73;   /* 灰绿次文本 */

  --line: rgba(201, 162, 39, 0.26);
  --line-strong: rgba(201, 162, 39, 0.55);
  --wash: rgba(201, 162, 39, 0.10);

  /* 字号阶梯 56/40/28/20/17/15/13 */
  --fs-xxl: 56px;
  --fs-xl: 40px;
  --fs-lg: 28px;
  --fs-md: 20px;
  --fs-body: 17px;
  --fs-sm: 15px;
  --fs-xs: 13px;

  /* 字体 */
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", Consolas, "Courier New", monospace;

  /* 形状与布局 */
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --pill: 999px;
  --rail: 260px;
  --gutter: 24px;
  --wrap: 1440px;
  --pad: 32px;
  --header-h: 148px;

  /* 动效 */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur: 200ms;
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.85;
  font-weight: 400;
  color: var(--stone);
  background-color: var(--ink-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 微光颗粒层 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(232, 217, 168, 0.075) 0.5px, transparent 0.6px);
  background-size: 4px 4px;
  opacity: 0.55;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 900;
  line-height: 1.26;
  color: var(--gold-light);
  letter-spacing: 0.01em;
  margin-bottom: 0.6em;
}

h1 { font-size: var(--fs-xxl); line-height: 1.18; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
h5 { font-size: var(--fs-body); }
h6 { font-size: var(--fs-sm); }

p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
a:hover { color: var(--gold-light); }

strong, b { color: var(--paper); font-weight: 700; }
em { color: var(--gold-light); font-style: normal; }

code, kbd, samp {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--gold-light);
  background: rgba(201, 162, 39, 0.10);
  border-radius: 6px;
  padding: 1px 6px;
}

time, .mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

hr { border: 0; height: 0; margin: 0; }

::selection { background: rgba(255, 45, 120, 0.32); color: var(--paper); }

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

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 200;
  padding: 11px 20px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--gold);
  color: var(--ink-0);
  font-size: var(--fs-sm);
  font-weight: 700;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 0; color: var(--ink-0); }

/* ---------- 5. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink-0);
  isolation: isolate;
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  z-index: 3;
  background: linear-gradient(90deg, var(--gold), var(--magenta));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 90ms linear;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--gutter);
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* 上层：品牌说明层 */
.header-upper {
  background: var(--ink-0);
  border-bottom: 1px solid var(--line);
}
.header-upper .header-inner {
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  color: inherit;
}
.brand-mark:hover { color: inherit; }

.brand-glyph {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(150deg, rgba(201, 162, 39, 0.22), rgba(201, 162, 39, 0) 68%);
  font-family: var(--serif);
  font-weight: 900;
  font-size: 22px;
  color: var(--gold-light);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.brand-mark:hover .brand-glyph {
  border-color: var(--cyan);
  background: linear-gradient(150deg, rgba(61, 220, 255, 0.20), rgba(61, 220, 255, 0) 68%);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name {
  font-family: var(--serif);
  font-weight: 900;
  font-size: var(--fs-md);
  color: var(--paper);
  letter-spacing: 0.04em;
}
.brand-tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.header-note {
  flex: 1 1 auto;
  max-width: 560px;
  margin: 0;
  padding-left: 20px;
  border-left: 1px solid var(--line);
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--stone);
  max-height: 52px;
  overflow: hidden;
}

.header-stamp {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex: 0 0 auto;
  text-align: right;
}

.stamp-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}
.stamp-value {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold-light);
}
.stamp-batch {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* 下层：栏目层 */
.header-lower {
  position: relative;
  background: var(--ink-1);
  border-bottom: 1px solid var(--line-strong);
  transition: border-color var(--dur) var(--ease);
}
.site-header[data-scrolled] .header-lower { border-bottom-color: var(--gold); }

.header-lower .header-inner {
  position: relative;
  padding-top: 10px;
  padding-bottom: 10px;
  gap: 16px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: transparent;
  color: var(--gold-light);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] {
  border-color: var(--cyan);
  background: rgba(61, 220, 255, 0.12);
}

.nav-toggle-bars { display: flex; flex-direction: column; gap: 5px; width: 16px; }
.nav-toggle-bars i {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--gold);
  transition: transform var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:first-child { transform: translateY(3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:last-child { transform: translateY(-3px) rotate(-45deg); }

.nav-toggle-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; }

.primary-nav { margin-left: auto; }

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

.nav-link {
  position: relative;
  display: inline-block;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-size: var(--fs-sm);
  color: var(--stone);
  white-space: nowrap;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav-link:hover {
  color: var(--gold-light);
  border-color: var(--line-strong);
  background: var(--wash);
}
.nav-link[aria-current="page"] {
  color: var(--ink-0);
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 500;
}
.nav-link[aria-current="page"]:hover {
  color: var(--ink-0);
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.header-cta { flex: 0 0 auto; }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--pill);
  background: transparent;
  color: var(--gold-light);
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover,
.btn:focus-visible {
  border-color: var(--cyan);
  background: rgba(61, 220, 255, 0.12);
  color: var(--paper);
}

.btn-gold {
  border-color: var(--gold);
  background: linear-gradient(120deg, rgba(201, 162, 39, 0.22), rgba(201, 162, 39, 0.05));
  color: var(--gold-light);
}
.btn-gold:hover,
.btn-gold:focus-visible {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--ink-0);
}

.btn-ghost { background: transparent; border-color: var(--line); color: var(--stone); }
.btn-ghost:hover { border-color: var(--cyan); background: rgba(61, 220, 255, 0.10); color: var(--paper); }

.btn-sm { padding: 8px 16px; font-size: var(--fs-xs); }

/* ---------- 7. 骨架与栅格 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.layout {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: var(--gutter);
  align-items: start;
}

.main-col { grid-column: 2; min-width: 0; }

/* 左侧常驻索引栏 */
.rail { grid-column: 1; min-width: 0; }

.rail-sticky {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  padding-top: 8px;
}

.rail-label {
  font-family: var(--serif);
  font-weight: 900;
  font-size: var(--fs-md);
  color: var(--gold-light);
  margin: 0 0 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-strong);
}

.rail-note {
  font-size: var(--fs-xs);
  line-height: 1.75;
  color: var(--muted);
  margin: 12px 0 18px;
}

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

.rail-index-link {
  display: block;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: var(--fs-sm);
  color: var(--stone);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.rail-index-link:hover { color: var(--gold-light); background: var(--wash); border-color: var(--line); }
.rail-index-link[aria-current="page"] { background: var(--gold); color: var(--ink-0); border-color: var(--gold); }

.rail-update {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ---------- 8. 章节 ---------- */
.section { margin-bottom: 72px; }
.section:last-child { margin-bottom: 0; }

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

.section-kicker {
  display: block;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--clay);
  margin-bottom: 10px;
  text-transform: uppercase;
}

.section-title { margin: 0 0 12px; }

.section-lead {
  font-size: var(--fs-body);
  line-height: 1.85;
  color: var(--stone);
  max-width: 38em;
}

.rule-gold {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--gold), rgba(201, 162, 39, 0));
  margin: 32px 0;
}

/* ---------- 9. 卡片 ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-2);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.card:hover {
  border-color: var(--line-strong);
  background: #1F322A;
}

.card-index {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.card-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: var(--fs-md);
  line-height: 1.4;
  color: var(--paper);
  margin: 0;
}

.card-text {
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--stone);
  margin: 0;
}

.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ---------- 10. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border: 1px solid currentColor;
  border-radius: var(--pill);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--clay);
  background: rgba(168, 86, 47, 0.12);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.tag-clay { color: var(--clay); background: rgba(168, 86, 47, 0.12); }
.tag-magenta { color: var(--magenta); background: rgba(255, 45, 120, 0.10); }
.tag-cyan { color: var(--cyan); background: rgba(61, 220, 255, 0.10); }
.tag-gold { color: var(--gold); background: rgba(201, 162, 39, 0.12); }

/* ---------- 11. 横向主题带 ---------- */
.band {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 20px 2px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) rgba(201, 162, 39, 0.10);
}
.band::-webkit-scrollbar { height: 4px; }
.band::-webkit-scrollbar-track { background: rgba(201, 162, 39, 0.10); border-radius: var(--pill); }
.band::-webkit-scrollbar-thumb { background: var(--gold); border-radius: var(--pill); }

.band-item {
  flex: 0 0 clamp(200px, 26vw, 300px);
  scroll-snap-align: start;
  min-width: 0;
}

/* ---------- 12. 折叠面板 ---------- */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--ink-1);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}
.panel + .panel { margin-top: 14px; }
.panel:hover { border-color: var(--line-strong); }

.panel-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 22px 18px 26px;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: var(--serif);
  font-weight: 900;
  font-size: var(--fs-md);
  color: var(--paper);
  cursor: pointer;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.panel-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--dur) var(--ease);
}
.panel-head:hover { background: var(--wash); color: var(--gold-light); }
.panel-head[aria-expanded="true"] { color: var(--gold-light); }
.panel-head[aria-expanded="true"]::before { transform: scaleY(1); }

.panel-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 240ms var(--ease);
}
.panel-body[data-open] { grid-template-rows: 1fr; }

.panel-body-inner { min-height: 0; overflow: hidden; }

.panel-content {
  padding: 0 22px 22px 26px;
  font-size: var(--fs-sm);
  line-height: 1.85;
  color: var(--stone);
}

/* ---------- 13. 表格与勾选 ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--ink-1);
}

.index-table {
  width: 100%;
  min-width: 560px;
  font-size: var(--fs-sm);
}
.index-table th,
.index-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.index-table thead th {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  background: rgba(201, 162, 39, 0.05);
}
.index-table tbody tr:last-child td { border-bottom: 0; }
.index-table tbody tr { transition: background-color var(--dur) var(--ease); }
.index-table tbody tr:hover { background: rgba(201, 162, 39, 0.06); }
.index-table tbody tr[data-selected] { background: rgba(255, 45, 120, 0.07); }

.check-input {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--gold);
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.check-input:checked { background: var(--magenta); border-color: var(--magenta); }
.check-input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid var(--ink-0);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- 14. 面包屑 ---------- */
.breadcrumb { margin-bottom: 24px; }

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  color: var(--muted);
}

.breadcrumb-item { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--line-strong);
}
.breadcrumb-item a { color: var(--muted); }
.breadcrumb-item a:hover { color: var(--cyan); }
.breadcrumb-item[aria-current="page"] { color: var(--gold-light); }

/* ---------- 15. 正文容器 ---------- */
.prose {
  max-width: 40em;
  font-size: var(--fs-body);
  line-height: 1.85;
  color: var(--stone);
}
.prose p { margin-bottom: 1.2em; }
.prose h2 { margin-top: 1.6em; font-size: var(--fs-lg); }
.prose h3 { margin-top: 1.4em; font-size: var(--fs-md); }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.prose ul li { list-style: none; position: relative; margin-bottom: 0.5em; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: -1.1em;
  top: 0.72em;
  width: 10px;
  height: 3px;
  border-radius: 2px;
  background: var(--gold);
}
.prose ol { list-style: decimal; }
.prose ol li { margin-bottom: 0.5em; }
.prose ol li::marker { color: var(--gold); font-family: var(--mono); }
.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--gold);
  color: var(--paper);
}

/* ---------- 16. 图片容器 ---------- */
.figure { margin: 0 0 24px; }

.figure-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-2);
}

.figure-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--ink-2);
  transition: transform 240ms var(--ease);
}
.figure:hover .figure-img { transform: scale(1.015); }

.figure--wide .figure-img { aspect-ratio: 21 / 9; }
.figure--portrait .figure-img { aspect-ratio: 3 / 4; }
.figure--square .figure-img { aspect-ratio: 1 / 1; }

.figure-caption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- 17. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 96px;
  background: var(--ink-1);
  border-top: 1px solid var(--line-strong);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 0.7fr));
  gap: 48px 32px;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 56px var(--pad) 36px;
}

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

.footer-brand-name {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin: 0 0 12px;
}

.footer-slogan {
  font-family: var(--serif);
  font-weight: 900;
  font-size: var(--fs-lg);
  line-height: 1.35;
  color: var(--gold-light);
  margin: 0 0 14px;
}

.footer-brand-note {
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
  max-width: 34em;
}

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

.footer-col-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: var(--fs-body);
  color: var(--paper);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.footer-links { display: flex; flex-direction: column; gap: 4px; }

.footer-link {
  display: inline-block;
  padding: 5px 0;
  font-size: var(--fs-sm);
  color: var(--stone);
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.footer-link:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer-bottom {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad) 32px;
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.footer-meta { min-width: 0; max-width: 62ch; }

.footer-contact {
  font-size: var(--fs-sm);
  line-height: 1.8;
  color: var(--stone);
  margin: 0 0 6px;
  word-break: break-word;
}

.footer-service {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
}

.footer-stamp-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
  flex: 0 0 auto;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
}

.footer-copy {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
}

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--ink-2);
  color: var(--gold-light);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.to-top::before {
  content: "";
  width: 9px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg) translate(2px, 2px);
}
.to-top[data-visible] { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover,
.to-top:focus-visible {
  border-color: var(--cyan);
  background: rgba(61, 220, 255, 0.12);
  color: var(--paper);
}

/* ---------- 18. 工具类 ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.text-gold { color: var(--gold-light); }
.text-mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.text-muted { color: var(--muted); }

/* ---------- 19. 响应式 ---------- */
@media (max-width: 1180px) {
  .header-note { display: none; }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .rail { grid-column: 1; }
  .rail-sticky { position: static; }
  .main-col { grid-column: 1; }
  .rail-index { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .rail-index-link { padding: 6px 14px; border-color: var(--line); border-radius: var(--pill); }
  .rail-update { flex-direction: row; align-items: baseline; gap: 10px; }
}

@media (max-width: 960px) {
  :root { --header-h: 132px; }

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

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 40;
    margin-left: 0;
    background: var(--ink-1);
    border-bottom: 1px solid var(--line-strong);
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
    transition: grid-template-rows 220ms var(--ease), opacity 180ms var(--ease);
  }
  .primary-nav[data-open] {
    grid-template-rows: 1fr;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    overflow: hidden;
  }
  .nav-link {
    display: block;
    padding: 13px 24px;
    border: 0;
    border-radius: 0;
    border-left: 2px solid transparent;
  }
  .nav-link:hover { background: var(--wash); border-radius: 0; }
  .nav-link[aria-current="page"] {
    background: rgba(201, 162, 39, 0.16);
    color: var(--gold-light);
    border-radius: 0;
    border-left-color: var(--gold);
    font-weight: 500;
  }

  .header-cta { margin-left: auto; padding: 8px 16px; font-size: var(--fs-xs); }

  .section { margin-bottom: 56px; }
  .footer-top { padding-top: 44px; padding-bottom: 28px; gap: 36px 24px; }
}

@media (max-width: 760px) {
  :root {
    --fs-xxl: 34px;
    --fs-xl: 28px;
    --fs-lg: 22px;
    --fs-md: 18px;
    --fs-body: 16px;
    --fs-sm: 14px;
    --fs-xs: 12px;
    --pad: 20px;
    --header-h: 124px;
  }

  .header-upper .header-inner { padding-top: 14px; padding-bottom: 14px; gap: 12px; }
  .brand-glyph { width: 40px; height: 40px; border-radius: 14px; font-size: 19px; }
  .brand-tag { display: none; }

  .header-stamp {
    margin-left: 0;
    width: 100%;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    text-align: left;
  }

  .header-upper .header-inner { flex-wrap: wrap; }

  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-stamp-block { align-items: flex-start; text-align: left; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
  .to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }

  .band-item { flex: 0 0 78%; }
  .figure-frame { border-radius: var(--radius-md); }
}

@media (max-width: 420px) {
  .header-cta { display: none; }
}

/* ---------- 20. 降低动效 ---------- */
@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;
  }

  .figure:hover .figure-img { transform: none; }
  .scroll-progress { transition: none; }
}
