/* ============================================================
   财神棋牌 · 站点共享样式 /assets/site.css
   ============================================================ */

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

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

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

ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
table { border-collapse: collapse; }

:focus-visible {
  outline: 2px solid #E8B44A;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 2. 变量 ---------- */
:root {
  /* 品牌色 */
  --red: #D7263D;
  --gold: #E8B44A;
  --night: #0B1020;
  --moss: #0E2A26;
  --paper: #F5F1E8;
  --orange: #FF8A3D;
  --steel: #4A5A78;
  --ash: #9A8F7A;
  --shadow: #6B1420;

  /* 尺码 */
  --rail-w: 92px;
  --topbar-h: 66px;
  --pad-x: clamp(18px, 4vw, 40px);
  --radius: 6px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* 字体 */
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system,
          "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular,
          Menlo, Consolas, "Courier New", monospace;

  /* 字号阶梯 */
  --fs-12: 12px;
  --fs-14: 14px;
  --fs-16: 16px;
  --fs-20: 20px;
  --fs-28: 28px;
  --fs-40: 40px;
  --fs-64: 64px;
  --fs-96: 96px;
}

/* ---------- 3. 全局排版 ---------- */
body {
  font-family: var(--sans);
  font-size: var(--fs-16);
  line-height: 1.85;
  letter-spacing: .01em;
  color: var(--paper);
  background-color: var(--night);
  background-image:
    radial-gradient(120% 80% at 12% -10%, rgba(215, 38, 61, .20), transparent 62%),
    radial-gradient(90% 62% at 100% 0%, rgba(232, 180, 74, .12), transparent 58%),
    radial-gradient(80% 60% at 50% 110%, rgba(14, 42, 38, .85), transparent 70%);
  background-attachment: fixed;
  padding-top: calc(var(--topbar-h) + 2px);
  min-height: 100vh;
  overflow-x: hidden;
}

body.is-nav-open { overflow: hidden; }

h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.24;
  letter-spacing: .01em;
}

p { text-wrap: pretty; }

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

.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. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px; left: 50%;
  z-index: 200;
  transform: translate(-50%, -180%);
  padding: 10px 22px;
  border-radius: 4px;
  background: var(--gold);
  color: #1A1005;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  box-shadow: 0 4px 0 var(--shadow);
  transition: transform .22s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ---------- 5. 阅读进度 ---------- */
.read-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  background: rgba(245, 241, 232, .08);
  z-index: 140;
  pointer-events: none;
}
.read-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--orange));
  box-shadow: 0 0 12px rgba(255, 138, 61, .7);
}

/* ---------- 6. 顶栏 ---------- */
.site-header { position: relative; z-index: 100; }

.topbar {
  position: fixed;
  top: 2px; left: 0; right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding-inline: var(--pad-x);
  background: linear-gradient(180deg, rgba(11, 16, 32, .97), rgba(11, 16, 32, .84));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(232, 180, 74, .24);
  z-index: 120;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}
.brand__seal {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 17px; font-weight: 900; line-height: 1;
  color: #2A0A0F;
  background: linear-gradient(145deg, #F0C15F, var(--red) 88%);
  border-radius: 6px;
  box-shadow: 0 3px 0 var(--shadow), inset 0 0 0 1px rgba(245, 241, 232, .32);
}
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__line {
  font-size: 15px; font-weight: 800; line-height: 1.3;
  letter-spacing: .04em;
  color: var(--paper);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand__sub {
  font-size: 10.5px; line-height: 1.5;
  letter-spacing: .2em;
  color: var(--ash);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.topbar__cta {
  flex: none;
  display: inline-flex; align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13.5px; font-weight: 800; letter-spacing: .08em;
  color: #1A0608;
  background: linear-gradient(120deg, var(--gold), var(--orange));
  box-shadow: 0 3px 0 var(--shadow);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s var(--ease);
}
.topbar__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--shadow);
  filter: brightness(1.07);
}
.topbar__cta:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--shadow);
}

.nav-toggle {
  display: none;
  flex: none;
  align-items: center;
  gap: 9px;
  padding: 8px 14px 8px 12px;
  border: 1px solid rgba(232, 180, 74, .5);
  border-radius: 999px;
  color: var(--gold);
  font-size: 12.5px; font-weight: 700; letter-spacing: .16em;
}
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  transition: background .24s var(--ease);
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute; left: 0;
  width: 18px; height: 2px;
  background: currentColor;
  transition: transform .24s var(--ease), top .24s var(--ease);
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }
.nav-toggle__label { line-height: 1; }

[data-nav-toggle][aria-expanded="true"] .nav-toggle__bars { background: transparent; }
[data-nav-toggle][aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
[data-nav-toggle][aria-expanded="true"] .nav-toggle__bars::after  { top: 0; transform: rotate(-45deg); }

/* ---------- 7. 侧边轨道导航 ---------- */
.rail {
  position: fixed;
  top: 0; left: 0;
  width: var(--rail-w);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 78px 6px 22px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  background: linear-gradient(180deg, #121A3A 0%, #0B1020 44%, #0E2A26 100%);
  border-right: 1px solid rgba(232, 180, 74, .28);
  z-index: 119;
}
.rail::-webkit-scrollbar { display: none; }

.rail__caption {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 10px;
  letter-spacing: .34em;
  color: var(--ash);
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(232, 180, 74, .28);
}

.rail__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 18px 0 auto;
  width: 100%;
}

.rail__item { width: 100%; display: flex; justify-content: center; }

.rail__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 66px;
  padding: 11px 6px;
  border-radius: 6px;
  color: rgba(245, 241, 232, .72);
  transition: color .24s var(--ease), background-color .24s var(--ease), transform .24s var(--ease);
}
.rail__link:hover {
  color: var(--paper);
  background: rgba(232, 180, 74, .10);
  transform: translateY(-1px);
}
.rail__link:active { transform: translateY(1px); }

.rail__link[aria-current="page"] {
  color: #1A0608;
  background: linear-gradient(145deg, var(--gold), var(--red));
  box-shadow: 0 3px 0 var(--shadow);
}
.rail__link[aria-current="page"] .rail__index { color: rgba(26, 6, 8, .7); }

.rail__index {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
  color: rgba(232, 180, 74, .78);
}

.rail__label {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1;
}

/* ---------- 8. 遮罩 ---------- */
.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 18, .7);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s var(--ease), visibility .28s var(--ease);
  z-index: 118;
}
.nav-scrim[data-visible] { opacity: 1; visibility: visible; }

/* ---------- 9. 通用布局 ---------- */
.wrap {
  width: min(100%, 1120px);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.stack { display: flex; flex-direction: column; gap: clamp(18px, 3vw, 32px); }
.stack--sm { gap: 10px; }
.stack--lg { gap: clamp(30px, 5vw, 58px); }

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 26px);
  grid-template-columns: minmax(0, 1fr);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }

/* ---------- 10. 章节叙事 ---------- */
.chapter {
  position: relative;
  padding-block: clamp(36px, 6vw, 80px);
}

.chapter__kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4em;
  color: var(--gold);
  margin-bottom: 10px;
}

.chapter__no {
  display: block;
  font-family: var(--mono);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232, 180, 74, .45);
  margin-bottom: 12px;
  transition: color .35s var(--ease), -webkit-text-stroke-color .35s var(--ease);
}

.chapter__title {
  font-size: clamp(26px, 4.2vw, 44px);
  font-weight: 900;
  line-height: 1.22;
  background: linear-gradient(96deg, #F5F1E8 0%, #F5F1E8 42%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[data-chapter] .chapter__no { opacity: .6; transition: opacity .35s var(--ease), color .35s var(--ease), -webkit-text-stroke-color .35s var(--ease); }
[data-chapter][data-active] .chapter__no {
  opacity: 1;
  color: rgba(215, 38, 61, .9);
  -webkit-text-stroke-color: rgba(232, 180, 74, .95);
}

.band {
  height: 10px;
  width: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #6B1420 0%, var(--red) 26%, var(--gold) 55%, var(--moss) 78%, var(--night) 100%);
  opacity: .92;
}
.band--thin { height: 6px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .3em;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold));
}

/* ---------- 11. 正文 ---------- */
.prose {
  max-width: 68ch;
  color: rgba(245, 241, 232, .88);
  line-height: 1.88;
}
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: clamp(20px, 2.6vw, 28px); margin-top: 1.6em; }
.prose h3 { font-size: var(--fs-20); margin-top: 1.4em; color: var(--gold); }
.prose strong { color: var(--paper); font-weight: 800; }
.prose--paper { color: #101528; }
.prose--paper h3 { color: #6B1420; }
.prose--paper strong { color: #0B1020; }

/* ---------- 12. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.2;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease),
              background-color .2s var(--ease), color .2s var(--ease);
}
.btn--primary {
  color: #2A0A0F;
  background: linear-gradient(120deg, var(--gold), var(--red) 130%);
  box-shadow: 0 4px 0 var(--shadow);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--shadow); }
.btn--primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--shadow); }

.btn--ghost {
  color: var(--gold);
  border-color: rgba(232, 180, 74, .55);
  background: rgba(232, 180, 74, .07);
}
.btn--ghost:hover {
  color: #FFF3D4;
  background: rgba(232, 180, 74, .16);
  border-color: rgba(232, 180, 74, .85);
}

.btn--ink {
  color: var(--paper);
  background: var(--night);
  border-color: rgba(11, 16, 32, .35);
}
.btn--ink:hover { background: #16203F; }

/* ---------- 13. 纸张卡片 ---------- */
.paper {
  position: relative;
  padding: clamp(18px, 2.6vw, 28px);
  border-radius: var(--radius);
  background: var(--paper);
  color: #101528;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .6),
    0 16px 34px -20px rgba(0, 0, 0, .92),
    6px 6px 0 var(--shadow);
}
.paper--night {
  background: linear-gradient(160deg, #131C3C 0%, var(--night) 100%);
  color: var(--paper);
  border: 1px solid rgba(232, 180, 74, .28);
  box-shadow:
    0 16px 36px -22px #000,
    6px 6px 0 rgba(107, 20, 32, .75);
}
.paper--tilt { transform: rotate(-.7deg); }

/* ---------- 14. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid rgba(232, 180, 74, .55);
  border-radius: 999px;
  background: rgba(232, 180, 74, .08);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.6;
}
.tag--live {
  color: #FFE0C9;
  border-color: rgba(255, 138, 61, .7);
  background: rgba(255, 138, 61, .16);
}
.tag--live::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 8px var(--orange);
}
.tag--half {
  color: #FFE3EB;
  border-color: transparent;
  background: linear-gradient(90deg, #6E1F3A 0%, var(--red) 100%);
}
.tag--paper {
  color: #6B1420;
  border-color: rgba(107, 20, 32, .32);
  background: rgba(215, 38, 61, .09);
}

.v-label {
  writing-mode: vertical-rl;
  text-orientation: upright;
  padding: 10px 5px;
  border: 1px solid rgba(232, 180, 74, .38);
  border-radius: 3px;
  background: rgba(232, 180, 74, .06);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .32em;
}

/* ---------- 15. 比分数字 ---------- */
.score-digits {
  font-family: var(--mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
  color: var(--orange);
  text-shadow: 0 0 18px rgba(255, 138, 61, .45);
}
.score-digits--lg { font-size: clamp(28px, 4.6vw, 48px); line-height: 1.05; }
.score-digits--xl { font-size: clamp(48px, 10vw, 96px); line-height: .95; }

/* ---------- 16. 图片容器 ---------- */
.media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(232, 180, 74, .3);
  border-radius: var(--radius);
  background: linear-gradient(150deg, #16214B 0%, var(--night) 55%, var(--moss) 100%);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 58% at 72% 24%, rgba(232, 180, 74, .22), transparent 70%),
    repeating-linear-gradient(115deg, rgba(245, 241, 232, .05) 0 1px, transparent 1px 14px);
}
.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }

.media__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.media__ph {
  position: relative;
  z-index: 1;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 12px;
  letter-spacing: .3em;
  color: rgba(232, 180, 74, .72);
}
.media__caption {
  position: absolute;
  left: 12px; bottom: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-left: 2px solid var(--gold);
  border-radius: 3px;
  background: rgba(11, 16, 32, .74);
  color: rgba(245, 241, 232, .88);
  font-size: 12px;
  letter-spacing: .08em;
  line-height: 1.6;
}

/* ---------- 17. 折叠面板 ---------- */
.collapse { border-top: 1px solid rgba(245, 241, 232, .14); }
.collapse__item { border-bottom: 1px solid rgba(245, 241, 232, .14); }

.collapse__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  text-align: left;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--paper);
  transition: color .2s var(--ease);
}
.collapse__trigger:hover { color: var(--gold); }

.collapse__icon {
  position: relative;
  flex: none;
  width: 22px; height: 22px;
  border: 1px solid rgba(232, 180, 74, .55);
  border-radius: 3px;
}
.collapse__icon::before,
.collapse__icon::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  background: var(--gold);
  transform: translate(-50%, -50%);
}
.collapse__icon::before { width: 10px; height: 1.5px; }
.collapse__icon::after { width: 1.5px; height: 10px; transition: transform .22s var(--ease), opacity .22s var(--ease); }

.collapse__trigger[aria-expanded="true"] { color: var(--gold); }
.collapse__trigger[aria-expanded="true"] .collapse__icon::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }

.collapse__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s var(--ease);
}
.collapse__panel[data-open] { grid-template-rows: 1fr; }
.collapse__inner { overflow: hidden; }
.collapse__inner > div { padding: 0 4px 20px; }

/* ---------- 18. 标签切换 ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tab {
  padding: 8px 18px;
  border: 1px solid rgba(232, 180, 74, .35);
  border-radius: 3px;
  color: rgba(245, 241, 232, .72);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  transition: color .2s var(--ease), border-color .2s var(--ease),
              background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.tab:hover { color: var(--gold); border-color: rgba(232, 180, 74, .75); }
.tab[aria-selected="true"] {
  color: #1A0608;
  border-color: transparent;
  background: linear-gradient(120deg, var(--gold), var(--orange));
  box-shadow: 0 3px 0 var(--shadow);
}
.tabpanel[hidden] { display: none; }

/* ---------- 19. 筛选器 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(232, 180, 74, .3);
  border-radius: var(--radius);
  background: rgba(14, 42, 38, .52);
}
.filter {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 156px;
  flex: 1 1 156px;
}
.filter::after {
  content: "";
  position: absolute;
  right: 14px; bottom: 17px;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--gold);
  pointer-events: none;
}
.filter__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--gold);
}
.filter__select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 34px 10px 12px;
  border: 1px solid rgba(232, 180, 74, .42);
  border-radius: 3px;
  background-color: rgba(11, 16, 32, .92);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- 20. 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 14px;
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--ash);
}
.breadcrumbs__link { color: rgba(245, 241, 232, .72); transition: color .2s var(--ease); }
.breadcrumbs__link:hover { color: var(--gold); }
.breadcrumbs__sep { color: rgba(232, 180, 74, .6); }
.breadcrumbs__current { color: var(--gold); font-weight: 700; }

/* ---------- 21. 复制按钮 ---------- */
.copy-btn {
  padding: 5px 12px;
  border: 1px solid rgba(232, 180, 74, .5);
  border-radius: 3px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.6;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.copy-btn:hover { background: rgba(232, 180, 74, .16); }
.copy-btn[data-copied] {
  color: #0B1020;
  background: var(--gold);
  border-color: transparent;
}

/* ---------- 22. 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 110;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 180, 74, .5);
  border-radius: 50%;
  background: rgba(11, 16, 32, .88);
  color: var(--gold);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .24s var(--ease), transform .24s var(--ease), visibility .24s var(--ease);
}
.to-top::before { content: "\2191"; font-size: 16px; line-height: 1; }
.to-top[data-visible] { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: rgba(232, 180, 74, .18); }

/* ---------- 23. 入场显现 ---------- */
html[data-js] [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
}
html[data-js] [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity .32s var(--ease), transform .32s var(--ease);
}

/* ---------- 24. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 110px);
  padding: clamp(34px, 5vw, 64px) var(--pad-x) clamp(24px, 4vw, 40px);
  border-top: 1px solid rgba(232, 180, 74, .32);
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(215, 38, 61, .16), transparent 62%),
    linear-gradient(180deg, #0C1226 0%, var(--moss) 100%);
  color: rgba(245, 241, 232, .86);
  font-size: 14px;
}

.footer__band {
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6B1420 0%, var(--red) 22%, var(--gold) 52%, var(--moss) 78%, var(--night) 100%);
}

.footer__inner {
  max-width: 1120px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: clamp(26px, 4vw, 56px);
  align-items: start;
}

.footer__brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "seal name"
    "seal line"
    "seal tagline";
  align-items: center;
  gap: 2px 14px;
}
.footer__seal {
  grid-area: seal;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 900; line-height: 1;
  color: #2A0A0F;
  background: linear-gradient(145deg, #F0C15F, var(--red) 88%);
  border-radius: 6px;
  box-shadow: 0 3px 0 var(--shadow);
}
.footer__name {
  grid-area: name;
  font-size: 20px; font-weight: 900;
  letter-spacing: .06em;
  color: var(--paper);
  line-height: 1.3;
}
.footer__line {
  grid-area: line;
  font-size: 14px;
  color: rgba(245, 241, 232, .9);
  line-height: 1.5;
}
.footer__tagline {
  grid-area: tagline;
  font-size: 11.5px;
  letter-spacing: .22em;
  color: var(--ash);
  line-height: 1.6;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.footer__title {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .28em;
  color: var(--gold);
}
.footer__list { display: flex; flex-direction: column; gap: 8px; }
.footer__link {
  display: inline-block;
  color: rgba(245, 241, 232, .78);
  line-height: 1.6;
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.footer__link:hover { color: var(--gold); transform: translateX(3px); }

.footer__contact {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 30px;
  padding-top: clamp(18px, 3vw, 28px);
  border-top: 1px solid rgba(245, 241, 232, .13);
}
.footer__contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}
.footer__key {
  flex: none;
  padding: 3px 8px;
  border: 1px solid rgba(232, 180, 74, .4);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--gold);
}
.footer__value {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .01em;
  color: rgba(245, 241, 232, .94);
  word-break: break-all;
}

.footer__meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(245, 241, 232, .09);
  font-size: 12.5px;
  color: var(--ash);
}
.footer__service { line-height: 1.7; }
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  letter-spacing: .02em;
}
.footer__dot { color: rgba(232, 180, 74, .65); }

/* ---------- 25. 桌面端布局 ---------- */
@media (min-width: 1080px) {
  body { padding-left: var(--rail-w); }
  .topbar {
    padding-inline-start: calc(var(--rail-w) + 30px);
    padding-inline-end: var(--pad-x);
  }
}

/* ---------- 26. 平板与移动端 ---------- */
@media (max-width: 1079px) {
  .nav-toggle { display: inline-flex; }

  .rail {
    top: 0;
    width: min(78vw, 320px);
    height: 100dvh;
    align-items: stretch;
    padding: 84px 20px 30px;
    transform: translateX(-102%);
    transition: transform .32s var(--ease);
    box-shadow: 26px 0 60px rgba(5, 8, 16, .62);
  }
  .rail[data-open] { transform: translateX(0); }

  .rail__caption {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    letter-spacing: .3em;
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(232, 180, 74, .25);
    border-left: 0;
    text-align: left;
  }

  .rail__list {
    margin: 14px 0 0;
    gap: 2px;
    align-items: stretch;
  }
  .rail__item { width: 100%; display: block; }
  .rail__link {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 12px;
    border-radius: 4px;
    border-bottom: 1px solid rgba(245, 241, 232, .08);
    box-shadow: none;
  }
  .rail__link[aria-current="page"] { box-shadow: 0 2px 0 var(--shadow); }
  .rail__label {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    font-size: 15px;
    letter-spacing: .08em;
  }
  .rail__index { font-size: 11px; }
}

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

  .footer__inner { grid-template-columns: minmax(0, 1fr); }
  .footer__brand,
  .footer__grid,
  .footer__contact,
  .footer__meta { grid-column: 1 / -1; }
}

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

  .brand__sub { display: none; }
  .brand__line { font-size: 13.5px; }
  .brand__seal { width: 36px; height: 36px; font-size: 15px; }
  .topbar { gap: 10px; }
  .topbar__cta { padding: 8px 13px; font-size: 12.5px; }
  .nav-toggle__label { display: none; }
  .nav-toggle { padding: 9px 11px; }

  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .footer__meta { flex-direction: column; }
  .to-top { right: 14px; bottom: 14px; }
}

@media (max-height: 720px) and (min-width: 1080px) {
  .rail { padding-top: 70px; }
  .rail__link { padding: 8px 6px; gap: 5px; }
  .rail__label { font-size: 11.5px; letter-spacing: .06em; }
}

/* ---------- 27. 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  html[data-js] [data-reveal] { opacity: 1; transform: none; }
  .read-progress__bar { transition: none; }
}
