/* =========================================================
   棋牌财神到 · 共享样式 /assets/site.css
   节庆电玩风 × 技术蓝图秩序
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--char);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; }
p { text-wrap: pretty; }

/* ---------- 变量 ---------- */
:root {
  --red: #C8322B;
  --red-deep: #8E1F1A;
  --gold: #D8A33A;
  --gold-soft: rgba(216, 163, 58, .34);
  --ink: #151311;
  --jade-ink: #1E3A3A;
  --jade: #4F8C7B;
  --paper: #F5EBDD;
  --cream: #FFF8EE;
  --char: #3A3532;
  --pixel: #F2C94C;

  --wrap: 1200px;
  --gutter: clamp(1rem, 4vw, 2.75rem);
  --baseline: 8px;
  --shadow-stack: 6px 6px 0 rgba(21, 19, 17, .16);

  --font-head: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --grid-line: rgba(216, 163, 58, .12);
}

/* ---------- 焦点 ---------- */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.site-header :focus-visible,
.site-footer :focus-visible,
.section--ink :focus-visible,
.section--jade :focus-visible {
  outline-color: var(--pixel);
}

/* ---------- 工具类 ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.u-mono { font-family: var(--font-mono); letter-spacing: .06em; }
.u-muted { color: rgba(58, 53, 50, .72); }
.stack > * + * { margin-top: 1rem; }

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

.stage {
  padding-block: clamp(2rem, 5vw, 4.5rem);
}

.section {
  padding-block: clamp(2rem, 4vw, 3.5rem);
  border-top: 1px solid var(--gold-soft);
}
.section--ink {
  background-color: var(--ink);
  color: var(--cream);
  background-image:
    repeating-linear-gradient(0deg, rgba(216, 163, 58, .08) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(216, 163, 58, .08) 0 1px, transparent 1px 48px);
}
.section--jade {
  background-color: var(--jade-ink);
  color: var(--paper);
}
.section--paper { background-color: var(--paper); }

.grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.75rem);
}
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-10 { grid-column: span 10; }
.col-12 { grid-column: span 12; }

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 300;
  padding: .6rem 1.1rem;
  background-color: var(--pixel);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: .08em;
  border: 2px solid var(--ink);
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .18s ease;
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

/* =========================================================
   头部
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background-color: var(--ink);
  color: var(--cream);
  border-bottom: 2px solid var(--gold);
}

/* 上层：服务台说明与正式联络 */
.header-utility {
  background-color: var(--ink);
  border-bottom: 1px solid rgba(216, 163, 58, .26);
  max-height: 64px;
  opacity: 1;
  overflow: hidden;
  transition: max-height .32s ease, opacity .22s ease, border-color .22s ease;
}
.header-utility__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .3rem 1.5rem;
  padding-block: .42rem;
  font-size: .76rem;
  letter-spacing: .08em;
  color: rgba(255, 248, 238, .74);
}
.header-utility__brand {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .18em;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.header-utility__brand::before {
  content: "";
  width: 8px;
  height: 8px;
  background-color: var(--red);
  box-shadow: 0 0 0 1px var(--gold);
  flex: none;
}
.header-utility__note {
  font-size: .76rem;
  color: rgba(255, 248, 238, .66);
}
.header-utility__contact {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  margin-left: auto;
}
.header-utility__key {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .2em;
  color: var(--gold);
}
.header-utility__email {
  color: var(--cream);
  border-bottom: 1px dashed rgba(216, 163, 58, .6);
  padding-bottom: 1px;
}

/* 下层：品牌 + 编号栏目 + 主操作 */
.header-main {
  background-image:
    repeating-linear-gradient(0deg, rgba(216, 163, 58, .07) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(216, 163, 58, .07) 0 1px, transparent 1px 40px);
}
.header-main__inner {
  display: flex;
  align-items: center;
  gap: clamp(.6rem, 1.6vw, 1.5rem);
  padding-block: .55rem;
  transition: padding-block .28s ease;
}

/* 品牌印章 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--cream);
  flex: none;
}
.brand__seal {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  background-color: var(--red);
  color: var(--pixel);
  border: 2px solid var(--gold);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.42rem;
  line-height: 1;
  box-shadow: 3px 3px 0 rgba(216, 163, 58, .34);
  transform: rotate(-3deg);
  transition: width .28s ease, height .28s ease, font-size .28s ease;
}
.brand__text { display: block; }
.brand__name {
  display: block;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.2rem;
  line-height: 1.15;
  letter-spacing: .08em;
}
.brand__tag {
  display: block;
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .2em;
  color: var(--gold);
  line-height: 1.4;
}
.brand:hover .brand__seal {
  background-color: var(--red-deep);
  transform: rotate(2deg);
}
.brand--footer .brand__seal { width: 40px; height: 40px; font-size: 1.26rem; }
.brand--footer .brand__name { font-size: 1.06rem; }

/* 移动导航按钮 */
.nav__toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  padding: .5rem .7rem;
  border: 2px solid var(--gold);
  background-color: rgba(200, 50, 43, .18);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  cursor: pointer;
}
.nav__toggle-bars {
  display: grid;
  gap: 3px;
  width: 18px;
}
.nav__toggle-bar {
  display: block;
  height: 2px;
  background-color: var(--pixel);
  transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 导航 */
.nav { margin-left: auto; }
.nav__list {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.nav__item { display: flex; }
.nav__link {
  display: flex;
  align-items: baseline;
  gap: .38rem;
  padding: .62rem .62rem;
  color: rgba(255, 248, 238, .82);
  text-decoration: none;
  font-size: .92rem;
  letter-spacing: .02em;
  border-bottom: 2px solid transparent;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}
.nav__index {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .08em;
  color: var(--gold);
  opacity: .85;
}
.nav__label { white-space: nowrap; }
.nav__link:hover {
  color: var(--cream);
  background-color: rgba(200, 50, 43, .26);
  border-bottom-color: var(--red);
}
.nav__link[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background-image: linear-gradient(180deg, rgba(216, 163, 58, .18), rgba(216, 163, 58, 0));
  font-weight: 700;
}
.nav__link[aria-current="page"] .nav__index { color: var(--pixel); opacity: 1; }
.nav__cta-item { display: none; }

/* 主操作按钮 */
.header-main__cta { flex: none; }

/* 阅读进度 */
.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background-color: rgba(216, 163, 58, .16);
  pointer-events: none;
  overflow: hidden;
}
.progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background-image: linear-gradient(90deg, var(--red), var(--gold) 62%, var(--pixel));
  transition: transform .12s linear;
}

/* 折叠态 */
.site-header[data-compact] .header-utility {
  max-height: 0;
  opacity: 0;
  border-color: transparent;
}
.site-header[data-compact] .header-main__inner { padding-block: .3rem; }
.site-header[data-compact] .brand__seal {
  width: 36px;
  height: 36px;
  font-size: 1.14rem;
}

/* =========================================================
   页脚
   ========================================================= */
.site-footer {
  position: relative;
  background-color: var(--ink);
  color: rgba(255, 248, 238, .8);
  padding-bottom: 1.25rem;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(216, 163, 58, .07) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(216, 163, 58, .07) 0 1px, transparent 1px 48px);
  pointer-events: none;
}
.footer__rule {
  display: block;
  position: relative;
  height: 6px;
  background-image: repeating-linear-gradient(90deg, var(--red) 0 18px, var(--gold) 18px 36px);
}
.footer__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.6fr .9fr .9fr 1.25fr;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  padding-block: clamp(2.25rem, 5vw, 3.75rem) 1.75rem;
  border-bottom: 1px solid rgba(216, 163, 58, .26);
}
.footer__brand { display: block; }
.footer__summary {
  margin-top: 1rem;
  font-size: .9rem;
  line-height: 1.8;
  max-width: 34ch;
  color: rgba(255, 248, 238, .72);
}
.footer__stamp {
  display: inline-block;
  margin-top: 1rem;
  padding: .2rem .55rem;
  border: 1px solid var(--red);
  background-color: rgba(200, 50, 43, .22);
  color: var(--pixel);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .18em;
}
.footer__col { min-width: 0; }
.footer__title {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: .08em;
  color: var(--cream);
  padding-bottom: .5rem;
  margin-bottom: .75rem;
  border-bottom: 1px solid rgba(216, 163, 58, .36);
}
.footer__title-index {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  color: var(--gold);
}
.footer__links { display: grid; gap: .1rem; }
.footer__link {
  display: inline-block;
  padding: .22rem 0;
  font-size: .9rem;
  color: rgba(255, 248, 238, .78);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color .16s ease, border-color .16s ease;
}
.footer__link:hover {
  color: var(--pixel);
  border-bottom-color: var(--pixel);
}
.footer__contact { display: grid; gap: .1rem; }
.footer__contact-line {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: .5rem;
  padding: .26rem 0;
  border-bottom: 1px solid rgba(216, 163, 58, .14);
  font-size: .84rem;
}
.footer__contact-key {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .16em;
  color: var(--gold);
  padding-top: .18rem;
}
.footer__contact-val {
  color: rgba(255, 248, 238, .8);
  overflow-wrap: anywhere;
}
.footer__note {
  position: relative;
  margin-top: 1.5rem;
  padding: .75rem 1rem;
  border-left: 3px solid var(--red);
  background-color: rgba(255, 248, 238, .05);
  font-size: .82rem;
  line-height: 1.8;
  color: rgba(255, 248, 238, .7);
  max-width: 78ch;
}
.footer__meta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(216, 163, 58, .28);
  font-size: .76rem;
  letter-spacing: .06em;
  color: rgba(255, 248, 238, .58);
}
.footer__meta-item--mono {
  font-family: var(--font-mono);
  letter-spacing: .18em;
  color: var(--gold);
}

/* =========================================================
   通用组件
   ========================================================= */

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .62rem 1.1rem;
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.btn--seal {
  background-color: var(--red);
  color: var(--cream);
  border-color: var(--gold);
  box-shadow: 3px 3px 0 var(--red-deep);
}
.btn--seal:hover {
  background-color: var(--red-deep);
  color: var(--cream);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(142, 31, 26, .85);
}
.btn--seal:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--red-deep);
}
.btn--ghost {
  background-color: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover {
  background-color: var(--ink);
  color: var(--cream);
}
.section--ink .btn--ghost,
.section--jade .btn--ghost,
.site-footer .btn--ghost {
  color: var(--cream);
  border-color: var(--gold);
}
.section--ink .btn--ghost:hover,
.section--jade .btn--ghost:hover,
.site-footer .btn--ghost:hover {
  background-color: var(--gold);
  color: var(--ink);
}
.btn--block { width: 100%; }
.btn--sm { padding: .38rem .75rem; font-size: .8rem; }

/* 超大字标题 */
.display {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(2.4rem, 6vw, 6rem);
  line-height: 1.02;
  letter-spacing: .01em;
  color: var(--ink);
}
.display--stroke {
  color: var(--red);
  -webkit-text-stroke: 1.5px var(--gold);
  paint-order: stroke fill;
}
.section--ink .display,
.section--jade .display { color: var(--cream); }
.section--ink .display--stroke,
.section--jade .display--stroke { color: var(--red); }

/* 编号标签 */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .18rem .55rem;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .18em;
  color: var(--red);
  background-color: rgba(216, 163, 58, .12);
}
.section--ink .kicker,
.section--jade .kicker,
.site-footer .kicker { color: var(--gold); }

/* 标题与导语 */
.section__head { margin-bottom: clamp(1rem, 2vw, 1.75rem); }
.section__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  line-height: 1.22;
  letter-spacing: .02em;
  color: var(--ink);
}
.section--ink .section__title,
.section--jade .section__title { color: var(--cream); }
.lede {
  max-width: 60ch;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.85;
  color: var(--char);
}
.section--ink .lede,
.section--jade .lede { color: rgba(255, 248, 238, .8); }

/* 正文栏 */
.prose {
  max-width: 68ch;
  font-size: 1.02rem;
  line-height: 1.85;
}
.prose > * + * { margin-top: 1rem; }
.prose h3 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--ink);
}
.section--jade .prose h3,
.section--ink .prose h3 { color: var(--cream); }
.prose a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--red-deep); }

/* 面包屑 */
.breadcrumbs { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .08em; }
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
}
.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.breadcrumbs__link {
  color: var(--jade-ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.breadcrumbs__link:hover { border-bottom-color: var(--gold); }
.breadcrumbs__sep { color: var(--gold); }
.breadcrumbs__current { color: var(--red); font-weight: 700; }

/* 纸张卡片 */
.card {
  position: relative;
  padding: clamp(1.1rem, 2.4vw, 1.75rem);
  background-color: var(--cream);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-stack);
}
.card--paper { background-color: var(--paper); }
.card--seal {
  border-color: var(--red);
  box-shadow: 6px 6px 0 rgba(200, 50, 43, .18);
}

/* 索引标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .15rem .5rem;
  border: 1px solid var(--gold);
  background-color: rgba(216, 163, 58, .14);
  color: var(--red);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
}
.tag--jade {
  border-color: var(--jade);
  background-color: rgba(79, 140, 123, .16);
  color: var(--jade-ink);
}
.section--ink .tag { color: var(--pixel); }

/* 账目行 */
.ledger {
  display: grid;
  border-top: 1px solid var(--gold-soft);
}
.ledger__row {
  display: grid;
  grid-template-columns: minmax(4rem, auto) 1fr;
  gap: .75rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--gold-soft);
  font-size: .88rem;
  align-items: baseline;
}
.ledger__key {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  color: var(--gold);
  text-transform: uppercase;
}

/* 章节导轨 */
.rail {
  position: sticky;
  top: 104px;
  font-size: .84rem;
}
.rail__title {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .2em;
  color: var(--gold);
  margin-bottom: .6rem;
}
.rail__list {
  display: grid;
  gap: 1px;
  border-left: 2px solid var(--gold-soft);
}
.rail__link {
  display: block;
  margin-left: -2px;
  padding: .34rem .6rem;
  color: inherit;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.rail__link:hover { border-left-color: var(--gold); }
.rail__link[aria-current="true"],
.rail__link.is-active {
  color: var(--red);
  border-left-color: var(--red);
  font-weight: 700;
}
.section--jade .rail__link[aria-current="true"],
.section--jade .rail__link.is-active { color: var(--pixel); }

/* 图片容器（页面阶段放置占位图） */
.media {
  position: relative;
  border: 2px solid var(--gold);
  background-color: var(--ink);
  overflow: hidden;
  box-shadow: var(--shadow-stack);
}
.media__frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-image:
    repeating-linear-gradient(0deg, rgba(216, 163, 58, .18) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(216, 163, 58, .18) 0 1px, transparent 1px 24px),
    linear-gradient(140deg, var(--jade-ink), var(--ink));
  background-size: 24px 24px, 24px 24px, auto;
}
.media__img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.media--wide .media__frame,
.media--wide .media__img { aspect-ratio: 21 / 9; }
.media--tall .media__frame,
.media--tall .media__img { aspect-ratio: 4 / 5; }
.media--square .media__frame,
.media--square .media__img { aspect-ratio: 1 / 1; }
.media__caption {
  padding-top: .5rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--char);
}
.section--ink .media__caption,
.section--jade .media__caption { color: rgba(255, 248, 238, .68); }

/* 滚动显现 */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.has-js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1120px) {
  .nav__link { padding: .58rem .48rem; font-size: .86rem; }
  .brand__tag { display: none; }
  .header-utility__note { display: none; }
}

@media (max-width: 960px) {
  html { scroll-padding-top: 84px; }

  .header-utility__inner { justify-content: flex-start; gap: .35rem .9rem; font-size: .72rem; }
  .header-utility__contact { margin-left: 0; }
  .header-utility__brand { font-size: .7rem; letter-spacing: .12em; }

  .nav__toggle { display: inline-flex; }
  .header-main__inner { flex-wrap: nowrap; }
  .header-main__cta { display: none; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    background-color: var(--ink);
    border-top: 1px solid rgba(216, 163, 58, .3);
    border-bottom: 2px solid var(--gold);
    transition: max-height .3s ease, opacity .22s ease, visibility .22s ease;
  }
  .nav[data-open] {
    max-height: 78vh;
    overflow-y: auto;
    visibility: visible;
    opacity: 1;
  }
  .nav__list { flex-direction: column; padding: .5rem var(--gutter) 1rem; }
  .nav__item { display: block; border-bottom: 1px solid rgba(216, 163, 58, .16); }
  .nav__link {
    padding: .8rem .2rem;
    font-size: 1rem;
    border-bottom: 0;
    border-left: 3px solid transparent;
    padding-left: .6rem;
  }
  .nav__link:hover { border-left-color: var(--red); background-color: rgba(200, 50, 43, .16); }
  .nav__link[aria-current="page"] {
    border-left-color: var(--gold);
    border-bottom: 0;
    background-image: linear-gradient(90deg, rgba(216, 163, 58, .2), transparent);
  }
  .nav__cta-item { display: block; border-bottom: 0; padding-top: .9rem; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__col--contact { grid-column: 1 / -1; }
  .footer__summary { max-width: 52ch; }

  .rail { position: static; top: auto; margin-bottom: 1.5rem; }
  .rail__list { display: flex; flex-wrap: wrap; border-left: 0; gap: .4rem; }
  .rail__link {
    margin-left: 0;
    border: 1px solid var(--gold-soft);
    border-left-width: 1px;
    padding: .25rem .6rem;
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .08em;
  }
  .rail__link[aria-current="true"],
  .rail__link.is-active { border-color: var(--red); }

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

@media (max-width: 640px) {
  body { font-size: 16px; }
  .header-utility__key { display: none; }
  .header-utility__email { font-size: .72rem; }
  .brand__name { font-size: 1.06rem; }
  .nav__toggle-text { display: none; }

  .grid--12 { grid-template-columns: 1fr; }
  .col-4, .col-5, .col-6, .col-7, .col-8, .col-10, .col-12 { grid-column: 1 / -1; }

  .footer__grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer__contact-line { grid-template-columns: 3rem 1fr; }
  .footer__meta { flex-direction: column; align-items: flex-start; gap: .35rem; }
  .display { font-size: clamp(2.1rem, 11vw, 3.4rem); }
}

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