/* ==========================================================================
   万豪斗地主 · 共享站点样式 /assets/site.css
   牌桌墨绿 × 象牙白 × 万豪金；框架式导航；目录型内容地图
   ========================================================================== */

:root {
  --ink-900: #0A2019;
  --ink-700: #123D31;
  --ink-500: #1D5C49;
  --ivory-050: #FAF6EA;
  --ivory-100: #F0E9D8;
  --gold-500: #C6A13A;
  --gold-300: #E3C977;
  --red-600: #B33A32;
  --slate-500: #6E8394;
  --slate-100: #E4EBF0;
  --ink-text: #06130F;
  --paper-line: #D8D2C2;

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

  --content-max: 1280px;
  --frame-pad: clamp(16px, 2.4vw, 40px);
  --radius-card: 12px;
  --gold-line: rgba(198, 161, 58, 0.4);
  --hair: rgba(250, 246, 234, 0.12);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-deep: 0 26px 48px -38px rgba(6, 19, 15, 0.8);
  --focus-ring: 2px solid var(--gold-500);
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--ivory-050);
}

body {
  margin: 0;
  background: var(--ivory-050);
  color: var(--ink-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }

::selection { background: var(--gold-300); color: var(--ink-900); }

/* ---------- 中文排版 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin: 0 0 0.55em;
  text-wrap: balance;
}
h1 { font-size: clamp(32px, 4vw, 56px); }
h2 { font-size: clamp(24px, 2.6vw, 32px); }
h3 { font-size: clamp(19px, 1.8vw, 23px); font-weight: 700; }
h4 { font-size: 17px; font-weight: 700; letter-spacing: 0; }

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

a { color: var(--ink-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink-900); }

strong { font-weight: 600; color: var(--ink-900); }
small { font-size: 0.82em; }

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

.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;
}

/* ---------- 焦点 ---------- */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
  border-radius: 3px;
}
.site-header :focus-visible { outline: 2px solid var(--gold-300); outline-offset: 3px; }
#main-content:focus { outline: none; }

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 400;
  padding: 10px 16px;
  background: var(--gold-500);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transform: translateY(-220%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--ivory-050);
  outline-offset: 2px;
}

/* ==========================================================================
   头部 · 框架式导航带
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--ink-900);
  color: var(--ivory-050);
  border-bottom: 1px solid var(--gold-line);
  box-shadow: 0 20px 42px -34px rgba(6, 19, 15, 0.95);
}

.site-header__inner {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 10px var(--frame-pad) 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ivory-050);
}
.brand-mark:hover { color: var(--gold-300); }

.brand-mark__suit {
  display: grid;
  place-items: center;
  width: 30px;
  height: 38px;
  border: 1px solid var(--gold-500);
  border-radius: 5px;
  color: var(--gold-300);
  font-size: 14px;
  line-height: 1;
  background: linear-gradient(160deg, rgba(198, 161, 58, 0.2), rgba(198, 161, 58, 0.02));
  transition: background 0.24s var(--ease), border-color 0.24s var(--ease);
}
.brand-mark:hover .brand-mark__suit {
  background: linear-gradient(160deg, rgba(198, 161, 58, 0.45), rgba(198, 161, 58, 0.1));
  border-color: var(--gold-300);
}

.brand-mark__text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(227, 201, 119, 0.72);
  padding-left: 14px;
  border-left: 1px solid var(--hair);
  white-space: nowrap;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.version-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 12px;
  border: 1px solid rgba(198, 161, 58, 0.42);
  border-radius: 999px;
  background: rgba(198, 161, 58, 0.1);
  color: var(--gold-300);
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.version-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(198, 161, 58, 0.18);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease),
              border-color 0.22s var(--ease), transform 0.22s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--sm { padding: 9px 15px; font-size: 13px; }

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

.btn--ghost {
  background: transparent;
  color: var(--ivory-050);
  border-color: rgba(250, 246, 234, 0.36);
}
.btn--ghost:hover { color: var(--gold-300); border-color: var(--gold-500); }

.btn--ink {
  background: var(--ink-700);
  color: var(--ivory-050);
  border-color: var(--ink-700);
}
.btn--ink:hover { background: var(--ink-500); border-color: var(--ink-500); color: var(--ivory-050); }

.btn--line {
  background: transparent;
  color: var(--ink-700);
  border-color: var(--ink-700);
}
.btn--line:hover { background: var(--ink-700); color: var(--ivory-050); }

/* ---------- 移动索引按钮 ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  background: transparent;
  color: var(--ivory-050);
  border: 1px solid rgba(198, 161, 58, 0.55);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background-color 0.22s var(--ease), border-color 0.22s var(--ease);
}
.nav-toggle:hover { background: rgba(198, 161, 58, 0.14); border-color: var(--gold-500); }
.nav-toggle[aria-expanded="true"] { background: rgba(198, 161, 58, 0.2); border-color: var(--gold-300); }

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 15px;
}
.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.26s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:first-child {
  transform: translateY(2.75px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:last-child {
  transform: translateY(-2.75px) rotate(-45deg);
}

/* ---------- 主导航 ---------- */
.site-nav {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 0 var(--frame-pad);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--hair);
}

.nav-list {
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 12px 13px;
  color: rgba(250, 246, 234, 0.7);
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease),
              border-color 0.2s var(--ease);
}
.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--ivory-050);
  background: rgba(250, 246, 234, 0.06);
  border-bottom-color: var(--gold-500);
}
.nav-list a[aria-current="page"] {
  color: var(--ivory-050);
  border-bottom-color: var(--gold-500);
  background: rgba(198, 161, 58, 0.1);
}
.nav-list a[aria-current="page"] .nav-index { color: var(--gold-300); }

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--gold-500);
}

.nav-extras {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}
.nav-extra {
  font-size: 12px;
  letter-spacing: 0.05em;
  color: rgba(250, 246, 234, 0.6);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(198, 161, 58, 0.35);
  white-space: nowrap;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav-extra:hover { color: var(--gold-300); border-bottom-color: var(--gold-300); }

/* ---------- 阅读进度刻度 ---------- */
.scroll-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(198, 161, 58, 0.16);
  pointer-events: none;
}
.scroll-rail span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  transition: width 0.08s linear;
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--ink-900);
  color: rgba(250, 246, 234, 0.78);
  border-top: 1px solid var(--gold-line);
}

.footer-frame {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: clamp(34px, 5vw, 62px) var(--frame-pad) clamp(24px, 3.4vw, 36px);
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2.1fr;
  gap: clamp(26px, 4vw, 56px);
}

.footer-brand__line {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--ivory-050);
}
.footer-brand__meta {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(227, 201, 119, 0.8);
}
.footer-brand__meta .mono { color: var(--gold-300); }
.footer-brand__note {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(250, 246, 234, 0.55);
  max-width: 24em;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-col__title {
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--gold-300);
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}
.footer-col a {
  display: inline-block;
  font-size: 14px;
  color: rgba(250, 246, 234, 0.72);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer-col a:hover { color: var(--gold-300); border-bottom-color: var(--gold-line); }

.footer-contact {
  grid-column: 1 / -1;
  margin-top: clamp(20px, 3vw, 34px);
  padding-top: clamp(18px, 2.4vw, 26px);
  border-top: 1px solid var(--hair);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 12px 32px;
  font-size: 13.5px;
  line-height: 1.7;
}
.footer-contact p { margin: 0; }
.footer-contact__k {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(198, 161, 58, 0.85);
  margin-bottom: 2px;
}
.footer-contact .mono { color: var(--ivory-050); }
.footer-contact__wide { grid-column: 1 / -1; }
.footer-contact__hint { color: rgba(250, 246, 234, 0.55); }

.footer-legal {
  background: var(--ink-text);
  border-top: 1px solid var(--hair);
}
.footer-legal__inner {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 16px var(--frame-pad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 26px;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: rgba(250, 246, 234, 0.5);
}
.footer-legal__copy,
.footer-legal__links { margin: 0; }
.footer-legal__copy .mono { color: rgba(250, 246, 234, 0.72); }
.footer-legal__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.footer-legal__links a {
  color: rgba(250, 246, 234, 0.74);
  text-decoration: none;
  border-bottom: 1px solid rgba(198, 161, 58, 0.35);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer-legal__links a:hover { color: var(--gold-300); border-bottom-color: var(--gold-300); }

/* ==========================================================================
   通用布局与内容组件
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--frame-pad);
}
.container--narrow { max-width: 900px; }

.prose { max-width: 42em; }
.prose h2 { margin-top: 1.6em; }
.prose p { line-height: 1.78; }

.eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.lede {
  max-width: 40em;
  font-size: clamp(16.5px, 1.5vw, 19px);
  line-height: 1.8;
  color: #1b2b25;
}

.hr-rule {
  height: 1px;
  border: 0;
  margin: clamp(28px, 4vw, 48px) 0;
  background: linear-gradient(90deg, var(--gold-500), rgba(198, 161, 58, 0.14) 45%, transparent);
}

/* ---------- 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 1.6em;
  padding: 0;
  list-style: none;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--slate-500);
}
.crumbs li { display: flex; align-items: center; gap: 10px; }
.crumbs li + li::before { content: "/"; color: var(--paper-line); }
.crumbs a {
  color: var(--ink-700);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.crumbs a:hover { border-bottom-color: var(--gold-500); }
.crumbs [aria-current="page"] { color: var(--ink-text); font-weight: 500; }

/* ---------- 栅格 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.2vw, 28px);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(180px, 0.9fr) minmax(0, 2.6fr); }

/* ---------- 章节标题 ---------- */
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 1em;
}
.sec-head__idx {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--gold-500);
  flex: 0 0 auto;
}
.sec-head__title { margin: 0; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--ivory-100);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-card);
  padding: clamp(18px, 2.4vw, 28px);
}

.card--ink {
  background: var(--ink-900);
  border-color: rgba(198, 161, 58, 0.35);
  color: rgba(250, 246, 234, 0.82);
}
.card--ink h2,
.card--ink h3,
.card--ink h4 { color: var(--ivory-050); }
.card--ink a { color: var(--gold-300); }
.card--ink a:hover { color: var(--ivory-050); }

.card--glass {
  background: rgba(250, 246, 234, 0.58);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  backdrop-filter: blur(12px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-deep);
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.card--glass:hover {
  background: rgba(250, 246, 234, 0.92);
  border-color: var(--gold-500);
}

.card--suit {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  white-space: nowrap;
}
.tag--gold { color: #8A6D1F; background: rgba(198, 161, 58, 0.14); border-color: rgba(198, 161, 58, 0.5); }
.tag--slate { color: #3F5566; background: var(--slate-100); border-color: rgba(110, 131, 148, 0.45); }
.tag--red { color: var(--red-600); background: rgba(179, 58, 50, 0.1); border-color: rgba(179, 58, 50, 0.42); }
.tag--ink { color: var(--ivory-050); background: var(--ink-700); border-color: var(--ink-700); }

/* ---------- 数据表 ---------- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--paper-line);
  border-radius: 10px;
  background: var(--ivory-100);
}
.matrix {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
}
.matrix caption {
  caption-side: top;
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--slate-500);
  border-bottom: 1px solid var(--paper-line);
}
.matrix th,
.matrix td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--paper-line);
  vertical-align: top;
}
.matrix thead th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-700);
  background: var(--ivory-050);
  white-space: nowrap;
}
.matrix tbody tr:nth-child(even) { background: var(--slate-100); }
.matrix tbody tr:last-child th,
.matrix tbody tr:last-child td { border-bottom: 0; }
.matrix td.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.matrix .is-warn { color: var(--red-600); font-weight: 500; }

/* ---------- 时间轴 ---------- */
.rail {
  position: relative;
  margin: 0;
  padding: 0 0 0 22px;
  list-style: none;
}
.rail::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, var(--gold-500), rgba(198, 161, 58, 0.14));
}
.rail__item {
  position: relative;
  padding-bottom: clamp(16px, 2vw, 26px);
}
.rail__item:last-child { padding-bottom: 0; }
.rail__item::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ivory-050);
  border: 1.5px solid var(--gold-500);
}
.rail__item[data-state="warn"]::before { border-color: var(--red-600); background: var(--red-600); }
.rail__item[data-state="beta"]::before { border-color: var(--slate-500); }

/* ---------- 图片容器基础规则 ---------- */
.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--paper-line);
  border-radius: 10px;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(29, 92, 73, 0.85), transparent 60%),
    linear-gradient(150deg, var(--ink-700), var(--ink-900));
}
.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.img-frame--card {
  aspect-ratio: 3 / 4;
  border-color: rgba(198, 161, 58, 0.45);
}
.img-frame--wide { aspect-ratio: 21 / 9; }

.img-frame__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 32, 25, 0) 42%, rgba(10, 32, 25, 0.76));
  pointer-events: none;
}
.img-frame__label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  padding: 4px 9px;
  border-radius: 4px;
  background: rgba(10, 32, 25, 0.82);
  border: 1px solid rgba(198, 161, 58, 0.5);
  color: var(--gold-300);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1.5;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1180px) {
  .nav-extras { display: none; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: block;
    padding: 0 var(--frame-pad);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background: var(--ink-700);
    border-top: 1px solid rgba(198, 161, 58, 0.3);
    box-shadow: 0 26px 44px -26px rgba(6, 19, 15, 0.85);
    transition: max-height 0.3s var(--ease), visibility 0s linear 0.3s,
                padding 0.3s var(--ease);
  }
  .site-nav[data-open] {
    visibility: visible;
    max-height: 78vh;
    overflow-y: auto;
    padding: 12px var(--frame-pad) 22px;
    transition: max-height 0.3s var(--ease), visibility 0s,
                padding 0.3s var(--ease);
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  .nav-list a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--hair);
    font-size: 15px;
  }
  .nav-list a:hover,
  .nav-list a:focus-visible {
    background: rgba(250, 246, 234, 0.05);
    border-bottom-color: var(--gold-500);
  }
  .nav-list a[aria-current="page"] {
    background: rgba(198, 161, 58, 0.12);
    border-bottom-color: var(--gold-500);
  }
  .nav-index { font-size: 11px; }

  .nav-extras {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--hair);
  }

  .footer-frame {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-brand__note { max-width: none; }
}

@media (max-width: 780px) {
  .version-chip { display: none; }
}

@media (max-width: 860px) {
  .grid--2,
  .grid--3,
  .grid--split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .header-tools .btn--gold { display: none; }
  .brand-tagline { display: none; }
  .brand-mark__text { font-size: 18px; }
  .nav-toggle__label { letter-spacing: 0.1em; }
  .footer-nav { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .footer-legal__inner { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .site-header__inner { gap: 10px; }
  .brand-mark { gap: 9px; }
}

/* ---------- 动效降级 ---------- */
@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;
  }
  .scroll-rail span { transition: none; }
  .skip-link { transition: none; }
}
