/* =========================================================
   777电玩城 · 共享外壳样式  /assets/site.css
   夜间街机控制台 × 编辑部档案
   ========================================================= */

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

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

body {
  margin: 0;
  background: #0B1026;
  color: #DCE5F2;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

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

ul, ol { padding: 0; }

a { color: var(--cyan); text-decoration: none; }

::selection { background: rgba(0, 229, 255, .3); color: #FFFFFF; }

/* ---------- 2. 设计变量 ---------- */
:root {
  /* 品牌色 */
  --ink: #0B1026;
  --ink-2: #141B3C;
  --cyan: #00E5FF;
  --violet: #7B2FF7;
  --orange: #FF6B1A;
  --paper: #F4E9D8;
  --brown: #1C1612;
  --mist: #9FB3C8;
  --lime: #C6FF4A;
  --rust: #B33A2B;
  --body-text: #DCE5F2;
  --body-dim: #93A5BC;

  /* 尺寸 */
  --rail-w: 264px;
  --topbar-h: 60px;
  --maxw: 1220px;
  --pad: clamp(18px, 4vw, 56px);
  --gap: clamp(16px, 2.2vw, 28px);
  --cut: 12px;

  /* 字体 */
  --font-display: "Bahnschrift SemiBold", "DIN Alternate", "HarmonyOS Sans SC",
    "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Mono",
    Consolas, "Noto Sans Mono", monospace;
  --font-body: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui,
    -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "SimSun", Georgia, serif;
}

/* ---------- 3. 中文排版基线 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: .01em;
  color: #F7FBFF;
}

h1 { font-size: clamp(30px, 5vw, 62px); }
h2 { font-size: clamp(23px, 3.4vw, 42px); }
h3 { font-size: clamp(18px, 2vw, 25px); }
h4 { font-size: clamp(16px, 1.5vw, 19px); }

p { line-height: 1.8; }

strong { color: #FFFFFF; font-weight: 700; }

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

/* ---------- 4. 通用布局 ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.site-main { display: block; padding-block: clamp(20px, 3vw, 40px) 0; }

.section { padding-block: clamp(28px, 4.5vw, 64px); }

.grid { display: grid; gap: var(--gap); }

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.grid--aside { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 900px) {
  .grid--aside { grid-template-columns: minmax(0, 1fr) 280px; }
}

/* ---------- 5. 文本工具 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}

.lede {
  font-size: clamp(15px, 1.4vw, 18px);
  color: #B9C7DA;
  max-width: 62ch;
}

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

.prose { max-width: 68ch; }
.prose p + p { margin-top: 1em; }
.prose ul, .prose ol { margin: 1em 0 0; padding-left: 1.25em; }
.prose li + li { margin-top: .4em; }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: .06em;
  line-height: 1.2;
  color: #04121A;
  background: var(--cyan);
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(0, 229, 255, .24);
}

.btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px #04121A, 0 0 0 3px rgba(0, 229, 255, .45);
}

.btn--violet { background: var(--violet); color: var(--paper); }
.btn--violet:hover { box-shadow: 0 8px 26px rgba(123, 47, 247, .34); }

.btn--orange { background: var(--orange); color: #170A03; }
.btn--orange:hover { box-shadow: 0 8px 26px rgba(255, 107, 26, .3); }

.btn--ghost {
  background: transparent;
  color: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(159, 179, 200, .45);
}

.btn--ghost:hover {
  background: rgba(0, 229, 255, .1);
  box-shadow: inset 0 0 0 1px var(--cyan);
}

.btn--sm { padding: 9px 14px; font-size: 12.5px; }

.btn--block { width: 100%; }

/* ---------- 7. 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--mist);
}

.crumbs__link {
  color: var(--mist);
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}

.crumbs__link:hover { color: var(--cyan); border-bottom-color: rgba(0, 229, 255, .5); }

.crumbs__sep { color: rgba(159, 179, 200, .5); }

.crumbs [aria-current="page"] { color: var(--paper); }

/* ---------- 8. 面板 / 标签 / 数据 ---------- */
.panel {
  position: relative;
  background: var(--ink-2);
  padding: clamp(16px, 2.4vw, 28px);
}

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

.panel--edge {
  box-shadow: inset 1px 0 0 rgba(0, 229, 255, .22),
    inset 0 -1px 0 rgba(123, 47, 247, .34);
}

.panel--paper { background: var(--paper); color: var(--brown); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  line-height: 1.5;
  color: var(--cyan);
  background: rgba(0, 229, 255, .08);
  border: 1px solid currentColor;
}

.tag--violet { color: #C4A2FF; background: rgba(123, 47, 247, .16); }
.tag--orange { color: var(--orange); background: rgba(255, 107, 26, .12); }
.tag--lime { color: var(--lime); background: rgba(198, 255, 74, .1); }
.tag--rust { color: #E57364; background: rgba(179, 58, 43, .2); }

.tag--paper {
  color: var(--brown);
  background: rgba(28, 22, 18, .06);
  border-color: rgba(28, 22, 18, .32);
}

.stat { display: grid; gap: 2px; }

.stat__num {
  font-family: var(--font-mono);
  font-size: clamp(20px, 2.6vw, 32px);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.stat__label { font-size: 12px; letter-spacing: .08em; color: var(--mist); }

/* ---------- 9. 装饰：分隔、斜杠、光轨、扫描线 ---------- */
.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, rgba(0, 229, 255, .55), rgba(123, 47, 247, .35) 45%, transparent);
}

.slash {
  display: inline-block;
  width: 34px;
  height: 2px;
  background: var(--orange);
  transform: skewX(-30deg);
}

.trail {
  position: relative;
  height: 2px;
  overflow: hidden;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, .7), rgba(123, 47, 247, .5), transparent);
}

.trail::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -30%;
  width: 26%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: trail-run 3.6s linear infinite;
}

@keyframes trail-run {
  from { left: -30%; }
  to { left: 100%; }
}

.scanlines { position: relative; isolation: isolate; }

.scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(11, 16, 38, .3) 0 1px,
    rgba(11, 16, 38, 0) 1px 3px
  );
}

/* ---------- 10. 图片容器 ---------- */
.media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: var(--media-ratio, 16 / 9);
  background: linear-gradient(135deg, #141B3C 0%, #0B1026 55%, #1B1240 100%);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .65;
  background: repeating-linear-gradient(
    180deg,
    rgba(11, 16, 38, .3) 0 1px,
    transparent 1px 3px
  );
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .24);
}

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

.media__caption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--mist);
}

/* ---------- 11. 奶油纸长文区 ---------- */
.paper {
  background: var(--paper);
  color: var(--brown);
}

.paper h1, .paper h2, .paper h3, .paper h4 { color: var(--brown); }

.paper a {
  color: #9C3417;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.paper .prose {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.95;
}

.paper :focus-visible { outline-color: var(--violet); }

/* ---------- 12. 页内目录 ---------- */
.toc {
  display: grid;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.toc__title {
  font-size: 10.5px;
  letter-spacing: .26em;
  color: var(--mist);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.toc a {
  display: block;
  padding: 7px 0 7px 12px;
  color: var(--mist);
  border-left: 2px solid rgba(159, 179, 200, .25);
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}

.toc a:hover { color: var(--paper); border-left-color: rgba(0, 229, 255, .6); }

.toc a[aria-current="true"],
.toc a.is-active {
  color: var(--cyan);
  border-left-color: var(--cyan);
  background: linear-gradient(90deg, rgba(0, 229, 255, .14), transparent);
}

/* ---------- 13. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 900;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #04121A;
  background: var(--cyan);
  transform: translateY(-200%);
  transition: transform .2s ease;
}

.skip-link:focus { transform: translateY(0); }

/* ---------- 14. 头部：侧边轨道 ---------- */
.site-header {
  position: relative;
  z-index: 200;
}

/* 遮罩（仅移动端生效） */
.site-header::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 205;
  background: rgba(4, 7, 18, .74);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.site-header[data-open]::before {
  opacity: 1;
  pointer-events: auto;
}

/* 轨道本体 = 移动端抽屉 */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 210;
  width: min(86vw, 328px);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: calc(var(--topbar-h) + 20px) 22px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: linear-gradient(180deg, #131A3F 0%, var(--ink) 46%, #080C1E 100%);
  border-right: 1px solid rgba(0, 229, 255, .28);
  box-shadow: 24px 0 60px rgba(0, 0, 0, .6);
  transform: translateX(-102%);
  transition: transform .34s cubic-bezier(.22, .68, .24, 1);
}

.rail::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(159, 179, 200, .06) 0 1px,
    transparent 1px 4px
  );
}

.rail::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -70px;
  width: 220px;
  height: 220px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(123, 47, 247, .45), transparent 68%);
}

.site-header[data-open] .rail { transform: translateX(0); }

/* 品牌 */
.rail__brand { display: none; position: relative; z-index: 1; }

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

.brand__mark {
  flex: 0 0 auto;
  padding: 6px 9px;
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.1;
  color: #04121A;
  background: var(--cyan);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.brand__text { display: block; }

.brand__name {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .04em;
  color: var(--paper);
}

.brand__tag {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--mist);
}

/* 导航列表 */
.rail__nav { position: relative; z-index: 1; }

.rail__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .28em;
  color: var(--mist);
}

.rail__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(123, 47, 247, .8), transparent);
}

.nav-list {
  list-style: none;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-list__item { display: block; }

.nav-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 10px 9px 12px;
  font-size: 15px;
  color: #C9D6E6;
  border-left: 2px solid transparent;
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}

.nav-link:hover {
  color: var(--paper);
  background: rgba(0, 229, 255, .07);
  border-left-color: rgba(0, 229, 255, .5);
  transform: translateX(2px);
}

.nav-link__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(159, 179, 200, .62);
}

.nav-link__label { display: inline; }

.nav-link[aria-current="page"] {
  color: #FFFFFF;
  border-left-color: var(--cyan);
  background: linear-gradient(90deg, rgba(0, 229, 255, .18), rgba(123, 47, 247, .1) 70%, transparent);
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .18);
}

.nav-link[aria-current="page"] .nav-link__num { color: var(--cyan); }

/* 轨道底部 */
.rail__foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px dashed rgba(159, 179, 200, .24);
}

.rail__cta { justify-self: stretch; }

.rail__sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--paper);
  border-bottom: 1px solid rgba(255, 107, 26, .5);
  padding-bottom: 2px;
  width: max-content;
  transition: color .16s ease, border-color .16s ease;
}

.rail__sub:hover { color: var(--orange); border-bottom-color: var(--orange); }

.rail__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--mist);
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.dot--live {
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(198, 255, 74, .16), 0 0 10px rgba(198, 255, 74, .6);
}

/* 顶栏（移动端） */
.topbar {
  position: sticky;
  top: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 16px;
  background: rgba(11, 16, 38, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 229, 255, .22);
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: .04em;
  color: var(--paper);
  text-decoration: none;
}

.topbar__brand::before {
  content: "777";
  padding: 3px 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #04121A;
  background: var(--cyan);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  border: 1px solid rgba(0, 229, 255, .42);
  background: rgba(0, 229, 255, .06);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  transition: background .18s ease, border-color .18s ease;
}

.nav-toggle:hover { background: rgba(0, 229, 255, .16); border-color: var(--cyan); }

.nav-toggle:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--cyan), 0 0 0 3px rgba(0, 229, 255, .3);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--cyan);
  transition: transform .22s ease;
}

.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }

.site-header[data-open] .nav-toggle__bars::before { transform: translateY(4px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars::after { transform: translateY(-4px) rotate(-45deg); }

.site-header[data-open] .nav-toggle { border-color: var(--orange); background: rgba(255, 107, 26, .12); }

/* ---------- 15. 桌面：固定轨道 ---------- */
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }

  body.has-nav-open { overflow: auto; }

  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail-w);
    z-index: 200;
  }

  .site-header::before { display: none; }

  .topbar { display: none; }

  .rail {
    position: relative;
    width: 100%;
    height: 100dvh;
    padding: 30px 22px 26px;
    transform: none;
    box-shadow: none;
    transition: none;
  }

  .rail__brand { display: block; }
}

/* ---------- 16. 页脚 ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(40px, 7vw, 88px);
  background: linear-gradient(180deg, #0A0E22 0%, #080B1C 55%, #0B1026 100%);
  border-top: 1px solid rgba(0, 229, 255, .22);
  color: #B9C7DA;
}

.footer__glow {
  position: absolute;
  top: -130px;
  left: -90px;
  width: 420px;
  height: 420px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(123, 47, 247, .34), transparent 68%);
}

.footer__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(30px, 5vw, 58px);
}

.footer__masthead {
  display: grid;
  gap: 8px;
  padding-bottom: clamp(20px, 3vw, 32px);
  border-bottom: 1px dashed rgba(159, 179, 200, .24);
}

.footer__brandlink {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  width: max-content;
  max-width: 100%;
}

.footer__brandline {
  font-family: var(--font-display);
  font-size: clamp(16px, 2.2vw, 22px);
  letter-spacing: .02em;
  color: var(--paper);
}

.footer__note {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--body-dim);
  max-width: 46ch;
}

.footer__mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  color: var(--mist);
}

.footer__cols {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
  padding-block: clamp(22px, 3.4vw, 40px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer__col { min-width: 0; }

.footer__col--wide { grid-column: 1 / -1; }

@media (min-width: 820px) {
  .footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer__col--wide { grid-column: span 2; }
}

.footer__col-title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .22em;
  color: var(--cyan);
}

.footer__links {
  list-style: none;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer__link {
  font-size: 14.5px;
  color: #B9C7DA;
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}

.footer__link:hover { color: var(--paper); border-bottom-color: var(--orange); }

.footer__contact { display: grid; gap: 9px; }

.footer__contact-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #CFDBEA;
  width: max-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  transition: color .16s ease;
}

.footer__contact-line:hover { color: var(--cyan); }

.footer__contact-text {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--body-dim);
}

.footer__backlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  width: max-content;
  padding-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--orange);
  border-bottom: 1px solid rgba(255, 107, 26, .45);
  transition: color .16s ease, border-color .16s ease;
}

.footer__backlink::before { content: "↺"; }

.footer__backlink:hover { color: #FFA26B; border-bottom-color: #FFA26B; }

/* 奶油法务条 */
.footer__legal {
  background: var(--paper);
  color: var(--brown);
  border-top: 1px solid rgba(28, 22, 18, .16);
}

.footer__legal-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 22px;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 14px var(--pad);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
}

.footer__icp { color: rgba(28, 22, 18, .78); }

.footer__legal-links {
  list-style: none;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__legal-links a {
  color: var(--brown);
  border-bottom: 1px solid rgba(28, 22, 18, .36);
  padding-bottom: 1px;
  transition: color .16s ease, border-color .16s ease;
}

.footer__legal-links a:hover { color: #9C3417; border-bottom-color: #9C3417; }

.footer__legal a:focus-visible { outline-color: var(--violet); }

.footer__copy { color: rgba(28, 22, 18, .66); }

/* ---------- 17. 全局注入组件 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  width: 100%;
  height: 2px;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--violet) 62%, var(--orange));
  box-shadow: 0 0 12px rgba(0, 229, 255, .5);
}

@media (min-width: 1024px) {
  .scroll-progress { left: var(--rail-w); width: calc(100% - var(--rail-w)); }
}

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 290;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .14em;
  color: #04121A;
  background: var(--cyan);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .24s ease, transform .24s ease, visibility .24s;
}

.to-top::before { content: "↑"; }

.to-top[data-visible] { opacity: 1; visibility: visible; transform: translateY(0); }

.to-top:hover { background: #6FF2FF; }

.to-top:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px #04121A, 0 0 0 3px rgba(0, 229, 255, .45);
}

@media (min-width: 1024px) {
  .to-top { right: 24px; bottom: 24px; }
}

/* ---------- 18. 减少动画 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .trail::after { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
