/* ============================================================
   九号娱乐会馆 · 共享样式表 /assets/site.css
   深海墨蓝底 · 蓝图网格 · 坐标条 · 分区色块导航 · 展签页脚
   ============================================================ */

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

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

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

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

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

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

/* ---------- 2. 变量 ---------- */
:root {
  --deep: #071B2E;
  --deep-2: #0C2942;
  --line: #1E4A6B;
  --cyan: #2FE3D1;
  --violet: #8B6BFF;
  --gold: #F2B75C;
  --paper: #F4F7FA;
  --mist: #9FB3C4;
  --void: #000308;
  --glow: #E8EEF5;

  --font-display: "HarmonyOS Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(20px, 5vw, 88px);
  --maxw: 1440px;
  --gap: clamp(16px, 1.8vw, 28px);
  --shadow: 0 6px 24px rgba(0, 3, 8, .45);
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--deep);
  background-image:
    linear-gradient(90deg, rgba(30, 74, 107, .30) 0 1px, transparent 1px 88px),
    linear-gradient(180deg, rgba(30, 74, 107, .24) 0 1px, transparent 1px 88px),
    radial-gradient(1200px 620px at 80% -12%, rgba(139, 107, 255, .12), transparent 65%),
    radial-gradient(900px 520px at 6% 4%, rgba(47, 227, 209, .10), transparent 60%);
  background-size: 88px 88px, 88px 88px, auto, auto;
  background-repeat: repeat, repeat, no-repeat, no-repeat;
  background-position: 0 0, 0 0, 0 0, 0 0;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .01em;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.16;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 6vw, 84px); }
h2 { font-size: clamp(28px, 3.4vw, 44px); }
h3 { font-size: clamp(20px, 2vw, 26px); font-weight: 700; }
h4 { font-size: 18px; font-weight: 700; letter-spacing: 0; }

strong { font-weight: 700; }

::selection {
  background: rgba(47, 227, 209, .28);
  color: var(--glow);
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  top: -120px;
  left: var(--gutter);
  z-index: 200;
  padding: 10px 20px;
  background: var(--cyan);
  color: #04121F;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .06em;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus {
  top: 10px;
  outline: 2px solid var(--glow);
  outline-offset: 2px;
}

/* ---------- 5. 站点头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(7, 27, 46, .97) 0%, rgba(7, 27, 46, .90) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line);
  color: var(--paper);
}

/* 5.1 坐标刻度条 */
.coord-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 32px;
  padding-inline: var(--gutter);
  border-bottom: 1px solid rgba(30, 74, 107, .6);
  background: linear-gradient(90deg, rgba(47, 227, 209, .07) 0%, rgba(139, 107, 255, .05) 45%, transparent 82%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--mist);
  overflow: hidden;
}

.coord-bar__coords {
  flex: 0 0 auto;
  color: var(--mist);
  white-space: nowrap;
}

.coord-bar__ticks {
  flex: 1 1 auto;
  min-width: 36px;
  height: 10px;
  background-image:
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 90px),
    repeating-linear-gradient(90deg, rgba(30, 74, 107, .55) 0 1px, transparent 1px 18px);
  background-size: 100% 10px, 100% 5px;
  background-position: 0 100%, 0 100%;
  background-repeat: repeat-x, repeat-x;
}

.version-tag {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 3px 11px 3px 9px;
  border: 1px solid rgba(242, 183, 92, .55);
  background: rgba(242, 183, 92, .10);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .2s ease, border-color .2s ease;
}
.version-tag::before {
  content: "";
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(242, 183, 92, .9);
}
.version-tag:hover,
.version-tag:focus-visible {
  background: rgba(242, 183, 92, .22);
  border-color: var(--gold);
}

/* 5.2 品牌 + 导航 */
.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 15px var(--gutter) 16px;
  transition: padding .26s ease;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand__link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--paper);
}

.brand__mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  background: var(--cyan);
  color: #04121F;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  transform: skewX(-6deg);
  box-shadow: var(--shadow), 0 0 24px rgba(47, 227, 209, .28);
  transition: width .26s ease, height .26s ease, font-size .26s ease;
}
.brand__mark > * { transform: skewX(6deg); display: block; }

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.brand__code {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--mist);
  white-space: nowrap;
}

/* 5.3 分区色块导航 */
.nav-rail { justify-self: end; min-width: 0; }

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

.nav-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 92px;
  min-height: 58px;
  padding: 11px 13px;
  background-color: var(--deep-2);
  border: 1px solid rgba(30, 74, 107, .75);
  color: var(--paper);
  text-decoration: none;
  transition: background-color .22s ease, border-color .22s ease, transform .22s ease;
}

.nav-tiles > li:nth-child(1) .nav-tile { background-color: #0A2237; }
.nav-tiles > li:nth-child(2) .nav-tile { background-color: #0B2540; }
.nav-tiles > li:nth-child(3) .nav-tile { background-color: #0C2942; }
.nav-tiles > li:nth-child(4) .nav-tile { background-color: #0B2C48; }
.nav-tiles > li:nth-child(5) .nav-tile { background-color: #0A2439; }
.nav-tiles > li:nth-child(6) .nav-tile { background-color: #0C2E4A; }

.nav-tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--cyan);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .26s cubic-bezier(.3, .8, .3, 1);
}

.nav-tile__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--mist);
  transition: color .2s ease;
}

.nav-tile__label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.2;
  white-space: nowrap;
}

.nav-tiles > li .nav-tile:hover,
.nav-tiles > li .nav-tile:focus-visible {
  background-color: #123B5C;
  border-color: rgba(47, 227, 209, .55);
  transform: translateY(-2px);
}

.nav-tiles > li .nav-tile:hover::before,
.nav-tiles > li .nav-tile:focus-visible::before,
.nav-tiles > li .nav-tile[aria-current="page"]::before {
  transform: scaleY(1);
}

.nav-tiles > li .nav-tile:hover .nav-tile__idx,
.nav-tiles > li .nav-tile:focus-visible .nav-tile__idx { color: var(--gold); }

.nav-tiles > li .nav-tile[aria-current="page"] {
  background-color: #0F3A57;
  border-color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(47, 227, 209, .32);
}

.nav-tiles > li .nav-tile[aria-current="page"] .nav-tile__idx { color: var(--cyan); }

/* 5.4 移动导航按钮 */
.nav-toggle {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  background-color: var(--deep-2);
  color: var(--paper);
  transition: border-color .2s ease, background-color .2s ease;
}
.nav-toggle:hover,
.nav-toggle:focus-visible { border-color: var(--cyan); background-color: #123B5C; }

.nav-toggle__bars {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 12px;
}
.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--cyan);
  transition: transform .26s ease, opacity .2s ease;
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 5px; }
.nav-toggle__bars span:nth-child(3) { top: 10px; }

.site-header[data-open] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 5.5 滚动收缩状态 */
.site-header[data-scrolled] .masthead { padding-block: 8px; }
.site-header[data-scrolled] .brand__mark { width: 38px; height: 38px; font-size: 19px; }
.site-header[data-scrolled] .brand__name { font-size: 18px; }

/* ---------- 6. 主体容器 ---------- */
.site-main {
  position: relative;
  z-index: 1;
  display: block;
}

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 7. 面包屑 ---------- */
.crumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--mist);
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.crumbs li { display: flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "›"; color: var(--line); }
.crumbs a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.crumbs a:hover,
.crumbs a:focus-visible { color: var(--cyan); border-bottom-color: var(--cyan); }
.crumbs [aria-current="page"] { color: var(--paper); }

/* ---------- 8. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--cyan);
  background: rgba(47, 227, 209, .07);
  color: var(--cyan);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  transition: background-color .22s ease, color .22s ease, border-color .22s ease;
}
.btn::after {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: width .22s ease;
}
.btn:hover,
.btn:focus-visible {
  background: var(--cyan);
  color: #04121F;
}
.btn:hover::after,
.btn:focus-visible::after { width: 28px; }

.btn--ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--paper);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(47, 227, 209, .1);
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--gold {
  border-color: var(--gold);
  background: rgba(242, 183, 92, .08);
  color: var(--gold);
}
.btn--gold:hover,
.btn--gold:focus-visible {
  background: var(--gold);
  color: #1A1105;
}

/* ---------- 9. 展签 / 标签 ---------- */
.plate {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: rgba(12, 41, 66, .7);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--mist);
}
.plate__no { color: var(--gold); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  background: rgba(12, 41, 66, .6);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--mist);
  white-space: nowrap;
}
.tag--cyan { color: var(--cyan); border-color: rgba(47, 227, 209, .45); background: rgba(47, 227, 209, .08); }
.tag--gold { color: var(--gold); border-color: rgba(242, 183, 92, .45); background: rgba(242, 183, 92, .08); }
.tag--violet { color: var(--violet); border-color: rgba(139, 107, 255, .45); background: rgba(139, 107, 255, .10); }

/* ---------- 10. 分隔与注释 ---------- */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--mist);
}
.divider::before,
.divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.eyebrow {
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .34em;
  color: var(--mist);
  padding-block: 6px;
  white-space: nowrap;
}
.eyebrow--cyan { color: var(--cyan); }

/* ---------- 11. 面板与图片容器 ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 2.4vw, 32px);
  background: linear-gradient(160deg, rgba(12, 41, 66, .92), rgba(7, 27, 46, .92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%);
}

.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--deep-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 12% 0%, rgba(47, 227, 209, .20), transparent 58%),
    radial-gradient(95% 75% at 88% 100%, rgba(139, 107, 255, .18), transparent 62%),
    linear-gradient(160deg, rgba(12, 41, 66, .9), rgba(0, 3, 8, .9));
}
.media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(0, 3, 8, .68));
  pointer-events: none;
}
.media > img,
.media > svg,
.media > picture { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; }
.media > img { filter: saturate(1.05) brightness(.88); }

.media--wide { aspect-ratio: 21 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--square { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }
.media--skew { clip-path: polygon(0 6%, 100% 0, 100% 100%, 0 100%); }

.media__caption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--mist);
}

/* ---------- 12. 连续阅读正文 ---------- */
.prose {
  max-width: 68ch;
  font-size: 16.5px;
  line-height: 1.78;
  color: rgba(244, 247, 250, .92);
}
.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 1.9em; color: var(--paper); }
.prose h3 { margin-top: 1.6em; color: var(--paper); }
.prose ul,
.prose ol { margin-top: 1em; padding-left: 1.35em; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .42em; }
.prose li::marker { color: var(--cyan); }
.prose strong { color: var(--cyan); }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.prose code {
  font-family: var(--font-mono);
  font-size: .92em;
  padding: 1px 6px;
  background: rgba(12, 41, 66, .9);
  border: 1px solid var(--line);
  color: var(--gold);
}

/* ---------- 13. 基础网格 ---------- */
.grid { display: grid; gap: var(--gap); }
.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--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

/* ---------- 14. 滚动进度刻度尺（JS 注入） ---------- */
.scroll-ruler {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: min(46vh, 320px);
  z-index: 70;
  display: none;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--mist);
}
.scroll-ruler__track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line);
}
.scroll-ruler__fill {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 0;
  transform: translateX(-1px);
  background: linear-gradient(180deg, var(--cyan), var(--violet));
}
.scroll-ruler__knob {
  position: absolute;
  left: 50%;
  top: 0;
  width: 11px;
  height: 1px;
  background: var(--gold);
  transform: translate(-5.5px, -1px);
}
.scroll-ruler__pct {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  margin-top: 10px;
  color: var(--gold);
  letter-spacing: .06em;
}

/* ---------- 15. 站点页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(72px, 10vw, 140px);
  background: linear-gradient(180deg, #071B2E 0%, #051322 34%, var(--void) 100%);
  border-top: 1px solid var(--line);
  color: var(--paper);
}

.footer-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(48px, 6vw, 80px) var(--gutter) 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr 1.25fr;
  gap: clamp(28px, 4vw, 64px);
}

.footer-col { min-width: 0; }

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .3em;
  color: var(--cyan);
  line-height: 1;
}
.footer-col__title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.footer-nav { display: grid; gap: 0; }
.footer-nav a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(30, 74, 107, .45);
  color: var(--paper);
  font-size: 14.5px;
  text-decoration: none;
  transition: color .2s ease, padding-left .2s ease;
}
.footer-nav a:hover,
.footer-nav a:focus-visible { color: var(--cyan); padding-left: 6px; }

.footer-nav__code {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--mist);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
  list-style: none;
  font-size: 13px;
}
.footer-legal a {
  color: var(--mist);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color .2s ease, border-color .2s ease;
}
.footer-legal a:hover,
.footer-legal a:focus-visible { color: var(--gold); border-bottom-color: var(--gold); }

.footer-brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--paper);
}
.footer-note {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--mist);
}

.footer-contact { display: grid; gap: 10px; font-size: 14px; }
.footer-contact li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  line-height: 1.65;
  word-break: break-word;
}
.footer-contact__k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .18em;
  color: var(--gold);
}

.footer-rule {
  position: relative;
  height: 1px;
  margin-block: clamp(28px, 4vw, 44px) 18px;
  background: var(--line);
}
.footer-rule::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -3px;
  height: 7px;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 22px);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--mist);
}
.footer-base__coord { color: rgba(159, 179, 196, .7); }

/* ---------- 16. 平板 ---------- */
@media (max-width: 1200px) {
  .nav-tile { min-width: 82px; padding: 10px 10px; }
  .nav-tile__label { font-size: 12.5px; }
  .brand__name { font-size: 19px; }
}

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

  .nav-toggle { display: block; }

  .nav-rail {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(340px, 88vw);
    padding: clamp(88px, 16vh, 118px) 20px 32px;
    background: linear-gradient(180deg, #0C2942 0%, #071B2E 62%, var(--void) 100%);
    border-left: 1px solid var(--line);
    box-shadow: -28px 0 60px rgba(0, 3, 8, .65);
    overflow-y: auto;
    z-index: 90;
    transform: translateX(103%);
    visibility: hidden;
    transition: transform .34s cubic-bezier(.3, .8, .3, 1), visibility 0s linear .34s;
  }
  .site-header[data-open] .nav-rail {
    transform: none;
    visibility: visible;
    transition: transform .34s cubic-bezier(.3, .8, .3, 1), visibility 0s linear 0s;
  }

  .nav-tiles { flex-direction: column; gap: 4px; }

  .nav-tiles > li .nav-tile {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    min-width: 0;
    min-height: 0;
    padding: 14px 14px;
    background-color: #0A2237;
    border-color: rgba(30, 74, 107, .7);
  }
  .nav-tile__label { font-size: 15px; }
  .nav-tile__idx { font-size: 11px; }
  .nav-tiles > li .nav-tile::after {
    content: "›";
    margin-left: auto;
    color: var(--line);
    font-family: var(--font-mono);
    transition: color .2s ease, transform .2s ease;
  }
  .nav-tiles > li .nav-tile:hover::after,
  .nav-tiles > li .nav-tile[aria-current="page"]::after { color: var(--cyan); }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-col:last-child { grid-column: 1 / -1; }
}

/* ---------- 17. 手机 ---------- */
@media (max-width: 640px) {
  .coord-bar { height: 28px; gap: 10px; letter-spacing: .12em; }
  .coord-bar__coords { display: none; }
  .version-tag { font-size: 10px; padding: 3px 8px; }

  .masthead { gap: 14px; padding-block: 12px; }
  .brand__mark { width: 40px; height: 40px; font-size: 20px; }
  .brand__name { font-size: 17px; }
  .brand__code { font-size: 9px; letter-spacing: .16em; }

  .site-header[data-scrolled] .brand__name { font-size: 16px; }

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

  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .footer-col:last-child { grid-column: auto; }

  .btn { width: 100%; justify-content: space-between; }

  .scroll-ruler { display: none !important; }
}

/* ---------- 18. 桌面显示刻度尺 ---------- */
@media (min-width: 1024px) {
  .scroll-ruler { display: block; }
}

/* ---------- 19. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .nav-tile:hover,
  .nav-tiles > li .nav-tile:hover { transform: none; }
}
