/* ============================================================
   金鼎娱乐会馆 · /assets/site.css
   共享层：reset / 设计变量 / 中文排版 / 页头 / 页脚 / 通用组件
   色彩分工：暗金定位 · 湖蓝解释 · 赤陶提醒 · 苔绿可用
   ============================================================ */

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

/* ---------- 2. 设计变量 ---------- */
:root {
  --ink: #0B0D10;
  --ink-2: #14181D;
  --ink-3: #1A2027;
  --gold: #C9A227;
  --gold-bright: #E8CE7A;
  --lake: #2F8FA8;
  --lake-deep: #14515F;
  --clay: #C4643B;
  --paper: #F2EDE4;
  --mist: #8A97A3;
  --moss: #4F8A6B;

  --line: rgba(47, 143, 168, 0.26);
  --line-soft: rgba(138, 151, 163, 0.18);
  --line-gold: rgba(201, 162, 39, 0.42);

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

  --wrap: 1320px;
  --gutter: clamp(18px, 3.6vw, 56px);
  --gap: clamp(16px, 2vw, 28px);
  --measure: 38em;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.22s;
}

/* ---------- 3. 基础层 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: clamp(15.5px, 0.5vw + 14.2px, 17px);
  line-height: 1.85;
  letter-spacing: 0.01em;
  background-image:
    repeating-linear-gradient(90deg, rgba(47, 143, 168, 0.055) 0 1px, transparent 1px 120px),
    repeating-linear-gradient(0deg, rgba(47, 143, 168, 0.04) 0 1px, transparent 1px 120px),
    radial-gradient(120% 68% at 50% -18%, rgba(201, 162, 39, 0.10), transparent 62%);
  background-attachment: fixed;
}

::selection { background: rgba(201, 162, 39, 0.32); color: var(--paper); }

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. 排版组件 ---------- */
.mono { font-family: var(--font-mono); letter-spacing: 0.12em; }
.muted { color: var(--mist); }
.gold { color: var(--gold-bright); }
.lake { color: var(--lake); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lake);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--lake);
  flex: none;
}

.prose { max-width: var(--measure); }
.prose p + p { margin-top: 1.05em; }
.prose h2 {
  font-size: clamp(1.35rem, 2.1vw, 1.75rem);
  margin: 2.2em 0 0.7em;
}
.prose h3 {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
  margin: 1.8em 0 0.5em;
}
.prose strong, .prose b { color: var(--gold-bright); font-weight: 600; font-size: 1.06em; }
.prose a {
  color: var(--lake);
  border-bottom: 1px solid rgba(47, 143, 168, 0.42);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.prose a:hover { color: var(--gold-bright); border-bottom-color: var(--line-gold); }
.prose ul, .prose ol { margin: 1em 0; padding-left: 1.2em; }
.prose li { list-style: none; position: relative; padding-left: 1.1em; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.85em;
  width: 6px; height: 1px;
  background: var(--lake);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: clamp(20px, 2.4vw, 32px);
  border-bottom: 1px solid var(--line-soft);
}
.section-head__index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gold);
  flex: none;
}
.section-head__title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 700;
}

.rule { height: 1px; background: var(--line-soft); }
.rule--gold {
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(201, 162, 39, 0));
}

/* ---------- 5. 布局 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.main { padding-block: clamp(28px, 4vw, 64px); }
.stack { display: grid; gap: var(--gap); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

/* ---------- 6. 按钮 / 标签 / 卡片 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.78em 1.35em;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.10), rgba(201, 162, 39, 0.02));
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn:active { transform: translateY(1px); }

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

.btn--ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--paper);
}
.btn--ghost:hover {
  background: rgba(47, 143, 168, 0.12);
  border-color: var(--lake);
  color: var(--gold-bright);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.3em 0.72em;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--lake);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.5;
}
.tag--gold { border-color: var(--line-gold); color: var(--gold-bright); }
.tag--lake { border-color: var(--line); color: var(--lake); }
.tag--clay { border-color: rgba(196, 100, 59, 0.5); color: var(--clay); }
.tag--moss { border-color: rgba(79, 138, 107, 0.5); color: var(--moss); }

.card {
  position: relative;
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--ink-2);
  border: 1px solid var(--line-soft);
  box-shadow: 5px 5px 0 -1px rgba(201, 162, 39, 0.16),
              10px 10px 0 -1px rgba(47, 143, 168, 0.10);
}
.card--paper {
  background: var(--paper);
  border-color: #d9d1c2;
  color: var(--ink);
}
.card--paper h2, .card--paper h3 { color: var(--ink); }
.card--paper .muted { color: #6a7278; }

/* ---------- 7. 图例 / 索引 / 媒体 ---------- */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--mist);
}
.legend__item { display: flex; align-items: center; gap: 8px; }
.legend__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}
.legend__dot--gold { background: var(--gold); }
.legend__dot--lake { background: var(--lake); }
.legend__dot--clay { background: var(--clay); }
.legend__dot--moss { background: var(--moss); }
.legend__dot--paper { background: var(--paper); }

.index-list { border-top: 1px solid var(--line-soft); }
.index-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line-soft);
  transition: background var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}
.index-row:hover { background: rgba(47, 143, 168, 0.07); padding-left: 10px; }
.index-row__no {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gold);
}
.index-row__name { font-size: 15.5px; }
.index-row__meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--mist);
  white-space: nowrap;
}

.media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line-soft);
  background:
    radial-gradient(120% 120% at 18% 0%, rgba(47, 143, 168, 0.18), transparent 55%),
    linear-gradient(150deg, #14181D 0%, #0B0D10 56%, #14515F 165%);
}
.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.04);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.16);
  background-image: repeating-linear-gradient(0deg, rgba(242, 237, 228, 0.05) 0 1px, transparent 1px 24px);
}
.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }
.media__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mist);
}

/* ---------- 8. 面包屑 / 章节目录 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--mist);
}
.crumbs a { color: var(--mist); transition: color var(--dur) var(--ease); }
.crumbs a:hover { color: var(--gold-bright); }
.crumbs__sep { color: rgba(138, 151, 163, 0.5); }
.crumbs__current { color: var(--paper); }

.toc { display: flex; flex-direction: column; gap: 2px; }
.toc__title {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--mist);
}
.toc a {
  display: flex;
  gap: 10px;
  padding: 8px 0 8px 14px;
  border-left: 1px solid rgba(138, 151, 163, 0.22);
  font-size: 13.5px;
  color: rgba(242, 237, 228, 0.66);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.toc a:hover { color: var(--gold-bright); border-left-color: var(--line-gold); }
.toc a[aria-current="true"] {
  color: var(--gold-bright);
  border-left: 2px solid var(--gold);
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.13), transparent 72%);
}

/* ---------- 9. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  padding: 0.7em 1.1em;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 10. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(11, 13, 16, 0.98) 0%, rgba(11, 13, 16, 0.92) 70%, rgba(11, 13, 16, 0.84) 100%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.header-meta {
  background: rgba(20, 24, 29, 0.62);
  border-bottom: 1px solid rgba(138, 151, 163, 0.12);
}
.header-meta__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 30px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist);
}
.meta-code { color: var(--lake); white-space: nowrap; }
.meta-rule {
  flex: 1 1 auto;
  height: 1px;
  min-width: 24px;
  background: repeating-linear-gradient(90deg, rgba(138, 151, 163, 0.38) 0 6px, transparent 6px 12px);
}
.meta-note { color: rgba(138, 151, 163, 0.78); white-space: nowrap; }

.header-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(12px, 2vw, 32px);
  min-height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 10px;
}
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--line-gold);
  transform: rotate(45deg);
  transition: transform 0.28s var(--ease), border-color var(--dur) var(--ease);
}
.brand-mark::before {
  content: "";
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--clay));
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(47, 143, 168, 0.45);
}
.brand:hover .brand-mark { transform: rotate(135deg); border-color: var(--gold-bright); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.8vw, 23px);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--paper);
}
.brand-tag {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--mist);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-toggle:hover { border-color: var(--line-gold); color: var(--gold-bright); }
.nav-toggle__bars { position: relative; display: block; width: 16px; height: 10px; flex: none; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transition: transform 0.2s var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-4.5px) rotate(-45deg); }

.site-nav { display: flex; justify-content: center; }
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1vw, 18px);
}
.nav-item { position: relative; }
.nav-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 12px 6px;
}
.nav-index {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: rgba(138, 151, 163, 0.65);
  transition: color var(--dur) var(--ease);
}
.nav-text {
  font-size: 14px;
  letter-spacing: 0.06em;
  color: rgba(242, 237, 228, 0.82);
  transition: color var(--dur) var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 4px;
  height: 2px;
  background: var(--lake);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-link:hover .nav-text,
.nav-link:focus-visible .nav-text { color: var(--gold-bright); }
.nav-link:hover .nav-index,
.nav-link:focus-visible .nav-index { color: var(--lake); }
.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); background: var(--gold); }
.nav-link[aria-current="page"] .nav-text { color: var(--paper); font-weight: 600; }
.nav-link[aria-current="page"] .nav-index { color: var(--gold); }

.nav-hint {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  z-index: 6;
  padding: 6px 10px;
  white-space: nowrap;
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: rgba(242, 237, 228, 0.9);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -4px);
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}
.nav-link:hover .nav-hint,
.nav-link:focus-visible .nav-hint {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.header-keys { display: flex; align-items: center; gap: 8px; }
.cmd-key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  background: rgba(20, 24, 29, 0.72);
  border: 1px solid var(--line-soft);
  color: rgba(242, 237, 228, 0.78);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.cmd-key__glyph { color: var(--gold); font-size: 12px; line-height: 1; }
.cmd-key:hover {
  border-color: var(--line-gold);
  background: rgba(201, 162, 39, 0.10);
  color: var(--gold-bright);
}
.cmd-key:hover .cmd-key__glyph { color: var(--gold-bright); }

.scroll-rail {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: rgba(138, 151, 163, 0.12);
  pointer-events: none;
}
.scroll-rail__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--lake), var(--gold));
  transition: width 0.12s linear;
}

/* ---------- 11. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 110px);
  background: linear-gradient(180deg, #0B0D10 0%, #0E1217 45%, #0B0D10 100%);
  border-top: 1px solid var(--line-soft);
  color: var(--paper);
}
.footer-rule {
  position: relative;
  height: 12px;
  background-image: repeating-linear-gradient(90deg, rgba(201, 162, 39, 0.55) 0 1px, transparent 1px 14px);
}
.footer-rule::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(47, 143, 168, 0.55) 0 1px, transparent 1px 84px);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.9fr);
  gap: clamp(28px, 4vw, 64px);
  padding-block: clamp(36px, 5vw, 64px);
}
.footer-brand { max-width: 34ch; }
.footer-seal {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border: 1px solid var(--line-gold);
  color: var(--gold-bright);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  box-shadow: inset 0 0 0 3px rgba(11, 13, 16, 0.9), inset 0 0 0 4px rgba(201, 162, 39, 0.32);
}
.footer-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.footer-summary {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(242, 237, 228, 0.72);
}
.footer-coord {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--lake);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 40px);
}
.footer-group__title {
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.22);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.footer-group ul { display: grid; gap: 10px; }
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(242, 237, 228, 0.76);
  transition: color var(--dur) var(--ease);
}
.footer-link::before {
  content: "";
  width: 10px;
  height: 1px;
  background: rgba(138, 151, 163, 0.6);
  transition: width 0.2s var(--ease), background 0.2s var(--ease);
}
.footer-link:hover { color: var(--gold-bright); }
.footer-link:hover::before { width: 18px; background: var(--gold); }
.footer-link[aria-current="page"] { color: var(--gold-bright); }

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.contact-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: rgba(20, 24, 29, 0.88);
}
.contact-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--lake);
}
.contact-val {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(242, 237, 228, 0.9);
  overflow-wrap: anywhere;
}
.copy-btn {
  align-self: flex-start;
  margin-top: 4px;
  padding: 4px 10px;
  border: 1px solid var(--line-gold);
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.copy-btn:hover { background: rgba(201, 162, 39, 0.16); }
.copy-status {
  min-height: 1em;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--moss);
}

.footer-note {
  padding-block: 18px;
  border-top: 1px dashed rgba(138, 151, 163, 0.2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mist);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 22px 34px;
  border-top: 1px solid rgba(138, 151, 163, 0.16);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(138, 151, 163, 0.8);
}
.legal-copy { white-space: nowrap; }
.legal-links { display: flex; align-items: center; gap: 12px; }
.legal-links a { color: rgba(242, 237, 228, 0.72); transition: color var(--dur) var(--ease); }
.legal-links a:hover { color: var(--gold-bright); }
.legal-links a[aria-current="page"] { color: var(--gold-bright); }
.legal-links span { color: rgba(138, 151, 163, 0.4); }
.legal-icp { white-space: nowrap; }

/* ---------- 12. 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 2vw, 28px);
  bottom: clamp(14px, 2vw, 28px);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-gold);
  background: rgba(11, 13, 16, 0.92);
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-size: 15px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
              visibility var(--dur), background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.to-top[data-visible] { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--gold); color: var(--ink); }

/* ---------- 13. 入场（需 JS 开启） ---------- */
html.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease);
}
html.has-js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1080px) {
  .header-bar { grid-template-columns: 1fr auto auto; min-height: 64px; gap: 10px; }
  .brand { order: 1; }
  .header-keys { order: 2; }
  .nav-toggle { display: inline-flex; order: 3; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    justify-content: flex-start;
    z-index: 20;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    background: linear-gradient(180deg, #101419 0%, #0B0D10 100%);
    border-bottom: 1px solid var(--line-gold);
    box-shadow: 0 28px 44px -26px rgba(0, 0, 0, 0.92);
  }
  .site-nav[data-open] { display: block; }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0; }
  .nav-item { border-bottom: 1px solid rgba(138, 151, 163, 0.12); }
  .nav-link { flex-wrap: wrap; padding: 16px var(--gutter); }
  .nav-link::after { display: none; }
  .nav-index { width: 26px; flex: none; font-size: 11px; }
  .nav-text { font-size: 15px; }
  .nav-link[aria-current="page"] {
    background: linear-gradient(90deg, rgba(201, 162, 39, 0.14), transparent 62%);
    box-shadow: inset 3px 0 0 var(--gold);
  }
  .nav-hint {
    position: static;
    flex-basis: 100%;
    margin: 4px 0 0 26px;
    padding: 0;
    background: none;
    border: 0;
    white-space: normal;
    opacity: 1;
    visibility: visible;
    transform: none;
    color: var(--mist);
    font-size: 12px;
    line-height: 1.6;
  }
}

@media (max-width: 1024px) {
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .span-4, .span-5 { grid-column: span 3; }
  .span-6, .span-7, .span-8, .span-12 { grid-column: span 6; }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-brand { max-width: none; }
}

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

@media (max-width: 680px) {
  body { background-attachment: scroll; }
  .grid-12 { grid-template-columns: minmax(0, 1fr); }
  .span-4, .span-5, .span-6, .span-7, .span-8, .span-12 { grid-column: 1 / -1; }
  .index-row { grid-template-columns: 46px minmax(0, 1fr); }
  .index-row__meta { grid-column: 2; }
  .footer-legal { justify-content: flex-start; }
}

@media (max-width: 600px) {
  .cmd-key { padding: 9px 10px; }
  .cmd-key__text { display: none; }
  .brand-tag { display: none; }
  .brand-mark { width: 30px; height: 30px; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .to-top { width: 42px; height: 42px; }
}

/* ---------- 15. 动效降级 ---------- */
@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;
  }
  html.has-js [data-reveal] { opacity: 1; transform: none; }
  .to-top { transform: none; }
}
