/* ==========================================================================
   德州牌局 · 共享 Site Kit  /assets/site.css
   夜间私人牌室 · 展览画册式档案系统
   ========================================================================== */

/* ── 01 Reset ───────────────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

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

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

ul[class],
ol[class] { padding: 0; list-style: none; }

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

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

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

table { border-collapse: collapse; width: 100%; }

::selection { background: var(--gold); color: #14100A; }

/* ── 02 Tokens ──────────────────────────────────────────────────────────── */
:root {
  /* 品牌色 */
  --ink: #0E2A24;
  --ink-deep: #0A1F1A;
  --coal: #121212;
  --felt-red: #5A1F2A;
  --gold: #D9A441;
  --signal: #C8443C;
  --cream: #F4EFE6;
  --ash: #D8D3C8;
  --indigo: #2B2440;
  --turq: #1F4A40;
  --copper: #8C6A2F;

  /* 语义色 */
  --text-on-dark: #F4EFE6;
  --text-muted: rgba(244, 239, 230, 0.66);
  --text-on-light: #121212;
  --text-muted-light: rgba(18, 18, 18, 0.64);
  --line-dark: rgba(244, 239, 230, 0.14);
  --line-light: rgba(18, 18, 18, 0.12);
  --gold-line: rgba(217, 164, 65, 0.3);

  /* 字体 */
  --font-display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", ui-monospace, monospace;

  /* 尺度 */
  --wrap: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 18px 38px -24px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(217, 164, 65, 0.06);
  --shadow-lift: 0 28px 52px -26px rgba(0, 0, 0, 0.95);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 74px;
}

/* ── 03 Base / 中文排版 ─────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: var(--text-on-dark);
  background-color: var(--ink);
  background-image:
    radial-gradient(120% 90% at 8% -12%, rgba(31, 74, 64, 0.62), transparent 62%),
    radial-gradient(90% 70% at 96% 2%, rgba(43, 36, 64, 0.58), transparent 66%),
    repeating-linear-gradient(118deg, rgba(244, 239, 230, 0.022) 0 1px, transparent 1px 5px);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { display: block; }

#main-content:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(10, 31, 26, 0.92);
}

/* ── 04 布局基座 ────────────────────────────────────────────────────────── */
.wrap {
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
}

.section {
  padding-block: clamp(2.75rem, 7vw, 6rem);
}

.section--tight { padding-block: clamp(1.75rem, 4vw, 3rem); }

.section--light {
  background: var(--cream);
  color: var(--text-on-light);
  border-block: 1px solid rgba(140, 106, 47, 0.22);
}

.section--indigo {
  background: linear-gradient(180deg, var(--indigo), #1C1830 70%, var(--ink-deep));
  color: var(--text-on-dark);
}

.section--felt {
  background:
    radial-gradient(110% 90% at 12% 0%, rgba(217, 164, 65, 0.14), transparent 62%),
    linear-gradient(170deg, #6A2531, var(--felt-red) 62%, #3D1620);
  color: var(--text-on-dark);
}

.section--light .section-title,
.section--light h1,
.section--light h2,
.section--light h3 { color: var(--ink); }

.section--light .lede { color: var(--text-muted-light); }

.section--light .eyebrow { color: var(--copper); }

.section--light .divider {
  background: linear-gradient(90deg, transparent, rgba(140, 106, 47, 0.55), transparent);
}

.grid {
  display: grid;
  gap: clamp(1.25rem, 2.6vw, 2.5rem);
}

.grid--5-7 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.grid--4-8 { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.grid--3-6-3 {
  grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ── 05 章节标题体系 ────────────────────────────────────────────────────── */
.chapter {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 2.75rem);
  align-items: start;
}

.chapter__num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 0.82;
  letter-spacing: -0.05em;
  color: rgba(217, 164, 65, 0.2);
  -webkit-text-stroke: 1px rgba(217, 164, 65, 0.62);
}

.chapter__body {
  display: grid;
  gap: 0.7rem;
  padding-top: 0.35rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.72;
}

.section-title {
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.4rem);
  color: var(--cream);
}

.lede {
  max-width: 60ch;
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.18rem);
  line-height: 1.8;
  color: var(--text-muted);
}

/* ── 06 正文 / 文档组件 ─────────────────────────────────────────────────── */
.prose {
  max-width: 68ch;
  font-size: 1rem;
  line-height: 1.85;
  color: rgba(244, 239, 230, 0.82);
}

.prose > * + * { margin-top: 1.1em; }

.prose h2,
.prose h3 {
  color: var(--cream);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.prose h2 { font-size: clamp(1.4rem, 1.2rem + 0.7vw, 1.9rem); margin-top: 1.9em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.6em; }

.prose ul,
.prose ol { padding-left: 1.2rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }

.prose a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose strong { color: var(--cream); font-weight: 600; }

.prose--on-light { color: rgba(18, 18, 18, 0.78); }
.prose--on-light h2,
.prose--on-light h3,
.prose--on-light strong { color: var(--ink); }
.prose--on-light a { color: var(--felt-red); }

.callout {
  border-left: 2px solid var(--gold);
  padding: 0.35rem 0 0.35rem 1.1rem;
  font-size: 0.95rem;
  line-height: 1.8;
  color: rgba(244, 239, 230, 0.8);
}

.section--light .callout { color: var(--text-muted-light); }

.divider {
  height: 1px;
  border: 0;
  margin-block: clamp(2rem, 5vw, 4rem);
  background: linear-gradient(90deg, transparent, rgba(217, 164, 65, 0.5), transparent);
}

.meta-mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: rgba(244, 239, 230, 0.6);
}

.section--light .meta-mono { color: rgba(18, 18, 18, 0.55); }

/* ── 07 按钮 ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.8rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.2;
  transition:
    transform 0.22s var(--ease),
    box-shadow 0.22s var(--ease),
    background-color 0.22s var(--ease),
    color 0.22s var(--ease),
    border-color 0.22s var(--ease);
}

.btn__arrow {
  font-family: var(--font-mono);
  font-size: 0.95em;
  transition: transform 0.22s var(--ease);
}

.btn:hover .btn__arrow,
.btn:focus-visible .btn__arrow { transform: translateX(3px); }

.btn--gold {
  background: linear-gradient(140deg, #E7B95C, var(--gold) 55%, var(--copper));
  color: #1A1206;
  box-shadow: 0 16px 30px -20px rgba(217, 164, 65, 0.9);
}

.btn--gold:hover,
.btn--gold:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px -20px rgba(217, 164, 65, 0.95);
}

.btn--line {
  border-color: rgba(244, 239, 230, 0.34);
  background: rgba(244, 239, 230, 0.04);
  color: var(--cream);
}

.btn--line:hover,
.btn--line:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.btn--dark {
  background: var(--coal);
  color: var(--cream);
  border-color: rgba(18, 18, 18, 0.9);
}

.btn--dark:hover,
.btn--dark:focus-visible {
  background: var(--ink);
  color: var(--gold);
  transform: translateY(-2px);
}

/* ── 08 标签 ────────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.28rem 0.72rem;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  background: rgba(217, 164, 65, 0.1);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.6;
  white-space: nowrap;
}

.tag--signal {
  border-color: rgba(200, 68, 60, 0.5);
  background: rgba(200, 68, 60, 0.16);
  color: #F0A79F;
}

.tag--on-light {
  border-color: rgba(14, 42, 36, 0.22);
  background: rgba(14, 42, 36, 0.06);
  color: var(--turq);
}

/* ── 09 档案卡 ──────────────────────────────────────────────────────────── */
.card {
  position: relative;
  padding: clamp(1.25rem, 2.4vw, 2rem);
  border: 1px solid rgba(18, 18, 18, 0.07);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--text-on-light);
  box-shadow: var(--shadow-card);
  transition: transform 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

.card:hover,
.card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.card--dark {
  background:
    radial-gradient(120% 100% at 10% 0%, rgba(217, 164, 65, 0.1), transparent 60%),
    linear-gradient(160deg, var(--turq), var(--ink-deep) 72%);
  color: var(--cream);
  border-color: rgba(217, 164, 65, 0.22);
}

.card--felt {
  background:
    radial-gradient(110% 90% at 84% 0%, rgba(217, 164, 65, 0.16), transparent 64%),
    linear-gradient(165deg, #6A2531, var(--felt-red) 60%, #3D1620);
  color: var(--cream);
  border-color: rgba(217, 164, 65, 0.26);
}

.card--stack { isolation: isolate; }

.card--stack::before,
.card--stack::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid rgba(18, 18, 18, 0.07);
  border-radius: inherit;
  background: var(--cream);
  box-shadow: 0 10px 24px -20px rgba(0, 0, 0, 0.9);
  transition: transform 0.24s var(--ease), opacity 0.24s var(--ease);
}

.card--stack::before {
  transform: translate(6px, 6px) rotate(1.1deg);
  opacity: 0.55;
}

.card--stack::after {
  transform: translate(11px, 12px) rotate(2deg);
  opacity: 0.3;
}

.card--stack:hover::before { transform: translate(8px, 8px) rotate(1.6deg); }
.card--stack:hover::after { transform: translate(15px, 15px) rotate(2.8deg); }

.card__index {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  color: var(--copper);
}

.card--dark .card__index,
.card--felt .card__index { color: var(--gold); }

.card__title {
  margin-top: 0.55rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.18rem, 1.05rem + 0.6vw, 1.6rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.card--dark .card__title,
.card--felt .card__title { color: var(--cream); }

.card__text {
  margin-top: 0.65rem;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-muted-light);
}

.card--dark .card__text,
.card--felt .card__text { color: var(--text-muted); }

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* ── 10 图片容器（页面阶段放占位） ──────────────────────────────────────── */
.media {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(217, 164, 65, 0.2);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 100% at 20% 0%, rgba(217, 164, 65, 0.16), transparent 60%),
    radial-gradient(90% 80% at 82% 100%, rgba(90, 31, 42, 0.55), transparent 66%),
    linear-gradient(160deg, var(--turq), var(--ink-deep));
  box-shadow: var(--shadow-card);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(45deg, rgba(244, 239, 230, 0.03) 0 1px, transparent 1px 6px),
    radial-gradient(80% 60% at 70% 12%, rgba(217, 164, 65, 0.14), transparent 70%);
}

.media__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media__img:not([src]),
.media__img[src=""] { visibility: hidden; }

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

.media__caption {
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: rgba(244, 239, 230, 0.55);
}

.section--light .media__caption { color: rgba(18, 18, 18, 0.55); }

/* ── 11 面包屑 ──────────────────────────────────────────────────────────── */
.breadcrumbs {
  padding-block: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumbs__link {
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}

.breadcrumbs__link:hover,
.breadcrumbs__link:focus-visible { color: var(--gold); }

.breadcrumbs__sep {
  color: var(--copper);
  opacity: 0.8;
}

.breadcrumbs__current { color: var(--cream); }

/* ── 12 Skip link ───────────────────────────────────────────────────────── */
.skip-link {
  position: fixed;
  top: 0.9rem;
  left: 0.9rem;
  z-index: 300;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  background: var(--gold);
  color: #12100A;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transform: translateY(-180%);
  transition: transform 0.22s var(--ease);
}

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

/* ── 13 Header ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(14, 42, 36, 0.94);
  border-bottom: 1px solid var(--line-dark);
  box-shadow: 0 18px 40px -34px rgba(0, 0, 0, 0.95);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  min-height: var(--header-h);
  margin-inline: auto;
  padding-block: 0.75rem;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 44px;
  flex: 0 1 auto;
}

.brand__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--gold-line);
  border-radius: 11px;
  background: linear-gradient(160deg, rgba(90, 31, 42, 0.92), rgba(10, 31, 26, 0.95));
  box-shadow: inset 0 0 0 1px rgba(217, 164, 65, 0.18);
  transition: border-color 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

.brand:hover .brand__mark,
.brand:focus-visible .brand__mark {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(217, 164, 65, 0.42), 0 0 0 3px rgba(217, 164, 65, 0.12);
}

.brand__pip {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  transform: rotate(45deg);
}

.brand__pip--top {
  top: 8px;
  left: 8px;
  background: var(--gold);
}

.brand__pip--bottom {
  right: 8px;
  bottom: 8px;
  background: var(--signal);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--cream);
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.55);
  color: var(--cream);
  transition: border-color 0.22s var(--ease), color 0.22s var(--ease);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
}

.nav-toggle__bars {
  display: grid;
  gap: 5px;
  width: 18px;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

.nav-toggle__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav-toggle[aria-expanded="true"] { border-color: var(--gold); color: var(--gold); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* 导航 */
.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.35rem, 1.5vw, 1.5rem);
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.42rem;
  min-height: 44px;
  padding: 0.5rem 0.15rem;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}

.site-nav__tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--copper);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.site-nav__label {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.42rem;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s var(--ease);
}

.site-nav__link:hover,
.site-nav__link:focus-visible { color: var(--cream); }

.site-nav__link:hover::after,
.site-nav__link:focus-visible::after { transform: scaleX(1); }

.site-nav__link:hover .site-nav__tag,
.site-nav__link:focus-visible .site-nav__tag {
  color: var(--gold);
  transform: translateY(-2px);
}

.site-nav__link[aria-current="page"] { color: var(--cream); }

.site-nav__link[aria-current="page"] .site-nav__tag { color: var(--gold); }

.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: linear-gradient(90deg, var(--gold), rgba(217, 164, 65, 0.1));
}

/* 阅读进度轨 */
.progress-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  background: rgba(217, 164, 65, 0.12);
  pointer-events: none;
}

.progress-rail__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--copper), var(--gold));
  transition: width 0.12s linear;
}

/* ── 14 Footer ──────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: clamp(2.5rem, 7vw, 6rem);
  background: var(--coal);
  color: var(--text-on-dark);
  border-top: 1px solid rgba(217, 164, 65, 0.24);
  background-image:
    radial-gradient(120% 90% at 4% 0%, rgba(31, 74, 64, 0.32), transparent 62%),
    radial-gradient(90% 80% at 96% 100%, rgba(90, 31, 42, 0.28), transparent 66%);
}

.site-footer__inner {
  width: min(100% - (var(--gutter) * 2), var(--wrap));
  margin-inline: auto;
  padding-block: clamp(2.5rem, 5vw, 4.5rem) 1.75rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
}

.site-footer__brand {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 0.8rem;
  max-width: 36ch;
}

.site-footer__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  color: var(--cream);
}

.site-footer__sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.site-footer__note {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.site-footer__brand .btn { margin-top: 0.35rem; }

.footer-col {
  display: grid;
  align-content: start;
  gap: 0.9rem;
}

.footer-col__title {
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--copper);
}

.footer-list {
  display: grid;
  gap: 0.45rem;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 32px;
  font-size: 0.94rem;
  color: var(--text-muted);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.footer-link::before {
  content: "";
  width: 14px;
  height: 1px;
  flex: none;
  background: currentColor;
  opacity: 0.45;
  transition: width 0.2s var(--ease), opacity 0.2s var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--gold);
  transform: translateX(2px);
}

.footer-link:hover::before,
.footer-link:focus-visible::before { width: 20px; opacity: 0.9; }

.footer-contact {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.35rem;
}

.footer-contact__item {
  display: grid;
  gap: 0.1rem;
}

.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--copper);
}

.footer-contact__value {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--cream);
  overflow-wrap: anywhere;
}

.footer-contact__note {
  font-size: 0.82rem;
  line-height: 1.75;
  color: rgba(244, 239, 230, 0.5);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.5rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: rgba(244, 239, 230, 0.52);
}

.site-footer__copy,
.site-footer__rec,
.site-footer__updated { line-height: 1.8; }

.site-footer__rec { color: rgba(217, 164, 65, 0.72); }

/* ── 15 渐显（由 JS 附加） ──────────────────────────────────────────────── */
.reveal--armed {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal--armed.is-visible {
  opacity: 1;
  transform: none;
}

/* ── 16 响应式 ──────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .site-nav__tag { display: none; }
  .grid--3-6-3 {
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  }
}

@media (max-width: 980px) {
  .grid--5-7,
  .grid--4-8,
  .grid--3-6-3,
  .grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .site-footer__brand {
    grid-column: 1 / -1;
    max-width: 52ch;
  }
}

@media (max-width: 900px) {
  :root { --header-h: 66px; }

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

  .site-nav {
    position: absolute;
    left: calc(var(--gutter) * -1);
    right: calc(var(--gutter) * -1);
    top: calc(100% + 0.5rem);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    border-top: 1px solid rgba(217, 164, 65, 0.28);
    border-bottom: 1px solid var(--line-dark);
    background: var(--coal);
    box-shadow: 0 32px 60px -30px rgba(0, 0, 0, 0.95);
    transition:
      max-height 0.3s var(--ease),
      opacity 0.22s var(--ease),
      visibility 0.22s var(--ease);
  }

  .site-nav[data-open] {
    max-height: min(76vh, 34rem);
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.4rem var(--gutter) 1.1rem;
  }

  .site-nav__item + .site-nav__item { border-top: 1px solid var(--line-dark); }

  .site-nav__link {
    display: flex;
    justify-content: flex-start;
    gap: 0.8rem;
    width: 100%;
    padding-block: 1rem;
  }

  .site-nav__tag { display: inline; font-size: 0.66rem; }
  .site-nav__label { font-size: 1.05rem; }
  .site-nav__link::after { display: none; }

  .site-nav__link[aria-current="page"] { color: var(--gold); }
}

@media (max-width: 760px) {
  .card--stack::before { transform: translate(4px, 5px) rotate(0.8deg); }
  .card--stack::after { transform: translate(7px, 9px) rotate(1.6deg); }
  .chapter { gap: 0.9rem; }
  .chapter__num { font-size: clamp(2.2rem, 13vw, 3.4rem); }
}

@media (max-width: 640px) {
  .brand__sub { display: none; }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
  .site-footer__bottom { justify-content: flex-start; }
  .btn { width: 100%; }
  .site-footer__brand .btn,
  .card .btn { width: auto; }
}

@media (max-width: 420px) {
  .brand__name { font-size: 1.05rem; letter-spacing: 0.06em; }
  .brand__mark { width: 38px; height: 38px; }
  .brand__pip { width: 9px; height: 9px; }
  .brand__pip--top { top: 7px; left: 7px; }
  .brand__pip--bottom { right: 7px; bottom: 7px; }
  .site-footer__name { font-size: 1.3rem; }
}

/* ── 17 偏好减少动效 ────────────────────────────────────────────────────── */
@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;
  }

  .card:hover,
  .card:focus-within,
  .btn:hover,
  .btn:focus-visible,
  .footer-link:hover,
  .footer-link:focus-visible { transform: none; }

  .card--stack::before,
  .card--stack::after { opacity: 0.35; }

  .reveal--armed { opacity: 1; transform: none; }
}
