/* ============================================================
   皇冠真人会馆 · 内容中心
   共享样式 /assets/site.css
   ============================================================ */

:root {
  --ink: #0B0B0C;
  --ink-2: #141416;
  --rock: #1E1F21;
  --gold: #C8A96A;
  --gold-hi: #E7D3A3;
  --wine: #7A2B2B;
  --cream: #F4EFE6;
  --mist: #A9A29A;
  --moss: #5A6B5A;
  --clay: #B5714E;

  --gold-a08: rgba(200, 169, 106, 0.08);
  --gold-a14: rgba(200, 169, 106, 0.14);
  --gold-a22: rgba(200, 169, 106, 0.22);
  --gold-a34: rgba(200, 169, 106, 0.34);

  --rail-w: 248px;
  --rail-w-compact: 72px;
  --rail-h: 64px;
  --cmdbar-h: 64px;

  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --pill: 999px;

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, "Times New Roman", serif;
  --font-body: "Noto Sans SC", "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gap: 24px;
}

html[data-rail="compact"] {
  --rail-w: 72px;
}

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

* { margin: 0; }

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

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--cream);
  background-color: var(--ink);
  padding-inline-start: var(--rail-w);
  padding-block-start: var(--cmdbar-h);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: padding-inline-start 220ms var(--ease);
}

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

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

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

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

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

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

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

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

/* ---------- 通用排版工具 ---------- */
.container {
  width: min(1180px, calc(100% - 64px));
  margin-inline: auto;
}

.section {
  padding-block: 88px;
}

.section-title {
  font-size: clamp(28px, 3.2vw, 44px);
  color: var(--cream);
  letter-spacing: 0.01em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

.prose {
  max-width: 36em;
  color: var(--mist);
  line-height: 1.85;
}

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

.rule-note {
  border-inline-start: 3px solid var(--gold);
  padding-inline-start: 16px;
  color: var(--cream);
  font-weight: 500;
}

.text-gold { color: var(--gold); }
.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;
}

/* ---------- 图片容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold-a22);
  background:
    radial-gradient(120% 110% at 18% 0%, rgba(200, 169, 106, 0.20), transparent 62%),
    radial-gradient(90% 90% at 100% 100%, rgba(122, 43, 43, 0.20), transparent 58%),
    linear-gradient(158deg, #1b1b1f 0%, #0d0d0f 100%);
  box-shadow: inset 0 1px 0 rgba(231, 211, 163, 0.10);
}

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

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

.media__caption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 40px 20px 16px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mist);
  background: linear-gradient(to top, rgba(6, 6, 7, 0.9), transparent);
  line-height: 1.6;
}

/* ---------- 按钮体系 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--pill);
  border: 1px solid var(--gold-a34);
  background: transparent;
  color: var(--cream);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition:
    border-color 180ms var(--ease),
    color 180ms var(--ease),
    background-color 180ms var(--ease),
    transform 180ms var(--ease);
}

.btn:hover {
  border-color: var(--gold);
  color: var(--gold-hi);
  background: var(--gold-a08);
}

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

.btn--gold {
  border-color: transparent;
  background: linear-gradient(180deg, #DCC28A 0%, #C8A96A 100%);
  color: #14110A;
  font-weight: 700;
  box-shadow:
    inset 0 0 0 1px rgba(231, 211, 163, 0.4),
    0 8px 22px rgba(200, 169, 106, 0.16);
}

.btn--gold:hover {
  color: #0B0B0C;
  background: linear-gradient(180deg, #E7D3A3 0%, #D2B578 100%);
  transform: translateY(-1px);
}

.btn--wine {
  border-color: rgba(122, 43, 43, 0.9);
  background: rgba(122, 43, 43, 0.28);
  color: var(--cream);
}

.btn--wine:hover {
  border-color: #A64040;
  background: rgba(122, 43, 43, 0.44);
  color: #FFF6EC;
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  inset-inline-start: 50%;
  transform: translate(-50%, -140%);
  z-index: 400;
  padding: 12px 24px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--gold);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: transform 160ms var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
  outline: 2px solid var(--gold-hi);
  outline-offset: 2px;
}

/* ---------- 头部外壳 ---------- */
.site-header {
  position: relative;
  z-index: 120;
}

/* ---------- 左侧品牌轨道 ---------- */
.rail {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 90;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 14px 20px;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(200, 169, 106, 0.10), transparent 60%),
    linear-gradient(180deg, #17171A 0%, #101012 56%, #0B0B0C 100%);
  border-inline-end: 1px solid var(--gold-a22);
  transition: width 220ms var(--ease);
}

.rail__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 0;
  flex: 0 0 auto;
  overflow: hidden;
}

.rail__mark {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-a34);
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
  background: radial-gradient(circle at 32% 24%, rgba(231, 211, 163, 0.20), transparent 68%);
  box-shadow: inset 0 0 12px rgba(200, 169, 106, 0.12);
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}

.rail__brand:hover .rail__mark {
  border-color: var(--gold);
  color: var(--gold-hi);
}

.rail__wordmark {
  display: flex;
  flex-direction: column;
  gap: 3px;
  white-space: nowrap;
  min-width: 0;
}

.rail__name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--cream);
  line-height: 1.2;
}

.rail__sub {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mist);
  line-height: 1.2;
}

.rail__nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-a34) transparent;
}

.rail__nav::-webkit-scrollbar { width: 4px; }
.rail__nav::-webkit-scrollbar-thumb { background: var(--gold-a34); border-radius: 4px; }

.rail__list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rail__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  border-inline-start: 2px solid transparent;
  color: var(--mist);
  font-size: 15px;
  line-height: 1.4;
  transition:
    color 180ms var(--ease),
    background-color 180ms var(--ease),
    border-color 180ms var(--ease);
}

.rail__link:hover {
  color: var(--cream);
  background: var(--gold-a08);
}

.rail__link:hover .rail__idx { color: var(--gold-hi); }

.rail__link[aria-current="page"] {
  color: var(--gold-hi);
  background: linear-gradient(90deg, rgba(200, 169, 106, 0.18), rgba(200, 169, 106, 0.02));
  border-inline-start-color: var(--gold);
}

.rail__link[aria-current="page"] .rail__idx {
  color: var(--gold-hi);
  opacity: 1;
}

.rail__link[aria-current="page"] .rail__label {
  font-weight: 700;
}

.rail__idx {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  opacity: 0.72;
  transition: color 180ms var(--ease);
}

.rail__label {
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail__meta {
  flex: 0 0 auto;
  padding: 12px 14px;
  border: 1px solid var(--gold-a14);
  border-radius: var(--radius-md);
  background: rgba(200, 169, 106, 0.05);
  overflow: hidden;
}

.rail__meta-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1.4;
}

.rail__meta-value {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.5;
}

.rail__collapse {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--gold-a14);
  border-radius: var(--pill);
  color: var(--mist);
  font-size: 12px;
  letter-spacing: 0.12em;
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}

.rail__collapse:hover {
  border-color: var(--gold);
  color: var(--gold-hi);
}

.rail__collapse-glyph {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  transition: transform 220ms var(--ease);
}

.rail__navbtn { display: none; }

/* 折叠态 */
html[data-rail="compact"] .rail {
  padding-inline: 10px;
}

html[data-rail="compact"] .rail__brand {
  justify-content: center;
  padding-inline: 0;
}

html[data-rail="compact"] .rail__wordmark,
html[data-rail="compact"] .rail__label,
html[data-rail="compact"] .rail__meta,
html[data-rail="compact"] .rail__collapse-label {
  display: none;
}

html[data-rail="compact"] .rail__link {
  justify-content: center;
  gap: 0;
  padding-inline: 0;
}

html[data-rail="compact"] .rail__idx {
  font-size: 12px;
  opacity: 0.9;
}

html[data-rail="compact"] .rail__collapse-glyph {
  transform: rotate(180deg);
}

/* ---------- 顶部命令栏 ---------- */
.commandbar {
  position: fixed;
  top: 0;
  inset-inline-start: var(--rail-w);
  inset-inline-end: 0;
  z-index: 80;
  height: var(--cmdbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-inline: 26px;
  background: rgba(11, 11, 12, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
  border-block-end: 1px solid var(--gold-a22);
  transition:
    inset-inline-start 220ms var(--ease),
    background-color 220ms var(--ease);
}

html[data-scrolled="true"] .commandbar {
  background: rgba(9, 9, 10, 0.95);
  border-block-end-color: var(--gold-a34);
}

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

.commandbar__kicker {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mist);
  white-space: nowrap;
}

.commandbar__sep {
  width: 1px;
  height: 16px;
  background: var(--gold-a34);
  flex: 0 0 auto;
}

.crumb { min-width: 0; }

.crumb__list {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.crumb__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--mist);
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crumb__item:not(:first-child)::before {
  content: "／";
  color: var(--gold);
  opacity: 0.5;
  font-size: 11px;
}

.crumb__link {
  color: var(--mist);
  transition: color 160ms var(--ease);
}

.crumb__link:hover { color: var(--gold-hi); }

.crumb__item--current {
  color: var(--gold-hi);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.commandbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.palette-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--gold-a22);
  border-radius: var(--pill);
  background: rgba(244, 239, 230, 0.03);
  color: var(--mist);
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: border-color 180ms var(--ease), color 180ms var(--ease), background-color 180ms var(--ease);
}

.palette-trigger:hover {
  border-color: var(--gold);
  color: var(--gold-hi);
  background: var(--gold-a08);
}

.palette-trigger__icon {
  font-size: 13px;
  color: var(--gold);
  line-height: 1;
}

.palette-trigger__kbd {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  border: 1px solid var(--gold-a34);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.commandbar__progress {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
  pointer-events: none;
}

.commandbar__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(200, 169, 106, 0.5), var(--gold) 40%, var(--gold-hi) 100%);
  box-shadow: 0 0 12px rgba(200, 169, 106, 0.5);
  transition: width 90ms linear;
}

/* ---------- 栏目索引面板 ---------- */
.palette {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: 11vh 20px 40px;
  overflow-y: auto;
}

.palette[hidden] { display: none; }

.palette__veil {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 6, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.palette__panel {
  position: relative;
  width: min(560px, 100%);
  padding: 22px 22px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold-a34);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(200, 169, 106, 0.10), transparent 62%),
    linear-gradient(180deg, #17171A 0%, #101012 100%);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.66),
    inset 0 1px 0 rgba(231, 211, 163, 0.12);
}

.palette__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-end: 16px;
}

.palette__title {
  font-size: 19px;
  letter-spacing: 0.06em;
  color: var(--cream);
}

.palette__close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--pill);
  border: 1px solid var(--gold-a22);
  color: var(--mist);
  font-size: 18px;
  line-height: 1;
  transition: border-color 160ms var(--ease), color 160ms var(--ease);
}

.palette__close:hover { border-color: var(--gold); color: var(--gold-hi); }

.palette__label {
  display: block;
  margin-block-end: 6px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.palette__input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--pill);
  border: 1px solid var(--gold-a22);
  background: rgba(11, 11, 12, 0.8);
  color: var(--cream);
  font-size: 15px;
  outline: none;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}

.palette__input::placeholder { color: var(--mist); opacity: 0.7; }

.palette__input:focus {
  border-color: var(--gold);
  background: rgba(11, 11, 12, 0.95);
}

.palette__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-block-start: 14px;
  max-height: 46vh;
  overflow-y: auto;
}

.palette__item[hidden] { display: none; }

.palette__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--cream);
  font-size: 15px;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}

.palette__link:hover,
.palette__link:focus-visible {
  border-color: var(--gold-a34);
  background: var(--gold-a08);
}

.palette__idx {
  font-size: 11px;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  flex: 0 0 auto;
}

.palette__text { min-width: 0; }

.palette__hint {
  margin-block-start: 14px;
  padding-block-start: 12px;
  border-block-start: 1px solid var(--gold-a14);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mist);
}

/* ---------- 进入视口渐显 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
  will-change: opacity, transform;
}

.js [data-reveal="in"] {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-block-start: 96px;
  background:
    radial-gradient(80% 120% at 12% 0%, rgba(200, 169, 106, 0.10), transparent 58%),
    linear-gradient(180deg, #141416 0%, #0B0B0C 100%);
  border-block-start: 1px solid var(--gold-a34);
  overflow: hidden;
}

.site-footer::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}

.footer__inner {
  position: relative;
  width: min(1180px, calc(100% - 64px));
  margin-inline: auto;
  padding: 72px 0 32px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 44px 32px;
}

.footer__col { min-width: 0; }

.footer__col--brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}

.footer__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-a34);
  border-radius: 13px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: var(--gold);
  background: radial-gradient(circle at 32% 24%, rgba(231, 211, 163, 0.18), transparent 68%);
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}

.footer__brand:hover .footer__mark {
  border-color: var(--gold);
  color: var(--gold-hi);
}

.footer__brand-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--cream);
}

.footer__tagline {
  font-size: 15px;
  line-height: 1.7;
  color: var(--mist);
  max-width: 20em;
}

.footer__meta {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.78;
}

.footer__title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-block-end: 16px;
  line-height: 1.4;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__link {
  font-size: 15px;
  color: var(--mist);
  line-height: 1.6;
  transition: color 160ms var(--ease);
  display: inline-block;
  padding-block: 1px;
  border-block-end: 1px solid transparent;
}

.footer__link:hover {
  color: var(--gold-hi);
  border-block-end-color: var(--gold-a34);
}

.footer__list--contact { gap: 12px; }

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
  line-height: 1.6;
}

.footer__contact-key {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
}

.footer__contact-val {
  color: var(--cream);
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

.footer__base {
  margin-block-start: 56px;
  padding-block-start: 22px;
  border-block-start: 1px solid var(--gold-a14);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
}

.footer__legal {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mist);
  font-variant-numeric: tabular-nums;
}

.footer__note {
  font-size: 12px;
  color: var(--mist);
  opacity: 0.78;
  line-height: 1.6;
}

/* ---------- 平板 ---------- */
@media (max-width: 1080px) {
  body { font-size: 17px; }
  :root { --rail-w: 220px; }
  html[data-rail="compact"] { --rail-w: 72px; }
  .footer__grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .footer__col--contact { grid-column: 1 / -1; }
  .footer__list--contact {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 18px 40px;
  }
}

/* ---------- 移动端与窄屏 ---------- */
@media (max-width: 899px) {
  :root {
    --rail-w: 0px;
    --rail-h: 64px;
    --cmdbar-h: 56px;
  }

  html[data-rail="compact"] { --rail-w: 0px; }

  body {
    padding-inline-start: 0;
    padding-block-start: var(--cmdbar-h);
    padding-block-end: calc(var(--rail-h) + 8px);
    font-size: 16px;
    transition: none;
  }

  .container { width: calc(100% - 32px); }
  .section { padding-block: 56px; }

  .rail {
    inset-block: auto 0;
    inset-inline: 0;
    width: auto;
    height: var(--rail-h);
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border-inline-end: none;
    border-block-start: 1px solid var(--gold-a34);
    background: rgba(13, 13, 15, 0.94);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    transition: none;
  }

  .rail__brand { padding: 0; gap: 10px; }
  .rail__mark { width: 32px; height: 32px; flex-basis: 32px; border-radius: 11px; font-size: 16px; }
  .rail__name { font-size: 15px; }
  .rail__sub { display: none; }
  .rail__meta { display: none; }
  .rail__collapse { display: none; }

  html[data-rail="compact"] .rail__label { display: inline; }
  html[data-rail="compact"] .rail__wordmark { display: flex; }

  .rail__navbtn {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    margin-inline-start: auto;
    padding: 9px 18px;
    border-radius: var(--pill);
    border: 1px solid var(--gold-a34);
    background: rgba(200, 169, 106, 0.10);
    color: var(--gold-hi);
    font-size: 13px;
    letter-spacing: 0.14em;
    transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
  }

  .rail__navbtn:hover { border-color: var(--gold); background: rgba(200, 169, 106, 0.18); }

  .rail__navbtn-close { display: none; }
  .rail__navbtn[aria-expanded="true"] .rail__navbtn-open { display: none; }
  .rail__navbtn[aria-expanded="true"] .rail__navbtn-close { display: inline; }

  .rail__nav {
    position: fixed;
    inset: 0;
    z-index: 2;
    display: block;
    padding: 84px 22px calc(var(--rail-h) + 48px);
    background:
      radial-gradient(120% 70% at 50% 0%, rgba(200, 169, 106, 0.16), transparent 62%),
      #0B0B0C;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 200ms;
    overflow-y: auto;
  }

  .rail__nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .rail__list { gap: 2px; width: 100%; }

  .rail__link {
    padding: 16px 14px;
    border-radius: 16px;
    font-size: 19px;
    border-inline-start-width: 3px;
  }

  .rail__idx { font-size: 12px; }

  .commandbar {
    inset-inline-start: 0;
    padding-inline: 14px;
    gap: 10px;
  }

  .commandbar__kicker,
  .commandbar__sep { display: none; }

  .crumb__item { font-size: 12px; }

  .commandbar__actions { gap: 8px; }

  .palette-trigger { padding: 8px 12px; }

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

  .palette { padding: 8vh 12px 24px; }
  .palette__panel { padding: 18px 16px 16px; border-radius: var(--radius-md); }

  .footer__inner { width: calc(100% - 32px); padding: 52px 0 24px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer__col--brand { grid-column: 1 / -1; }
  .footer__col--contact { grid-column: 1 / -1; }
  .footer__tagline { max-width: none; }
  .footer__base { margin-block-start: 36px; flex-direction: column; align-items: flex-start; }
  .site-footer { margin-block-start: 64px; }
}

@media (max-width: 767px) {
  .palette-trigger__kbd { display: none; }
}

@media (max-width: 620px) {
  .crumb { display: none; }
  .commandbar__lead { gap: 0; }

  .palette-trigger__text { display: none; }

  .palette-trigger {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: var(--pill);
  }

  .palette-trigger__icon { font-size: 15px; }

  .footer__grid { grid-template-columns: 1fr; }
  .footer__col--brand,
  .footer__col--contact { grid-column: auto; }
  .footer__list--contact { flex-direction: column; gap: 12px; }
}

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .btn--gold:hover { transform: none; }
  .commandbar__bar { transition: none; }
}
