/* ==========================================================================
   优乐玩中心 · 共享样式表 /assets/site.css
   深空蓝基底 + 奶油纸面板 + 橙紫霓虹渐变 + 现代粗野主义堆叠画板
   ========================================================================== */

/* ---------- 1. 变量 ---------- */
:root {
  --ink-900: #0B1026;
  --ink-800: #141B3C;
  --paper: #F4E9D8;
  --brown: #1B1410;
  --orange: #FF6A1A;
  --violet: #7A3BFF;
  --cyan: #2CF2D5;
  --red-orange: #E23C1E;
  --sand: #C9B79C;
  --gold: #FFC24B;

  --grad-main: linear-gradient(115deg, #FF6A1A 0%, #7A3BFF 100%);
  --grad-soft: linear-gradient(115deg, rgba(255, 106, 26, .18), rgba(122, 59, 255, .18));
  --line-dark: rgba(244, 233, 216, .14);
  --line-darker: rgba(244, 233, 216, .08);
  --shadow-hard: 5px 5px 0 rgba(0, 0, 0, .55);
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, .45);

  --font-display: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --shell: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

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

html {
  -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;
  padding: 0;
}

ul, ol { list-style: none; }

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

img { height: auto; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

table { border-collapse: collapse; width: 100%; }

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

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

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-900);
  background-image:
    radial-gradient(circle at 12% 0%, rgba(122, 59, 255, .22), transparent 46%),
    radial-gradient(circle at 88% 6%, rgba(255, 106, 26, .16), transparent 42%),
    radial-gradient(circle at 50% 118%, rgba(44, 242, 213, .10), transparent 55%),
    radial-gradient(rgba(244, 233, 216, .055) 1px, transparent 1px);
  background-size: auto, auto, auto, 26px 26px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.85;
  font-weight: 400;
  letter-spacing: .01em;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

p { max-width: 34em; }

strong, b { font-weight: 900; }

em { font-style: normal; }

main { display: block; }

/* ---------- 4. 骨架容器 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

#main-content { scroll-margin-top: 104px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 200;
  padding: 12px 22px;
  background: var(--cyan);
  color: var(--brown);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .04em;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  transition: top .24s var(--ease);
}

.skip-link:focus { top: 0; }

/* ---------- 5. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding-block: clamp(10px, 1.5vw, 18px);
  transition: padding-block .3s var(--ease);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 -20px 0;
  background: linear-gradient(180deg, rgba(11, 16, 38, .97) 0%, rgba(11, 16, 38, .86) 62%, rgba(11, 16, 38, 0) 100%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.site-header[data-condensed="true"] { padding-block: 6px; }

.header-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(8px, 1.4vw, 20px);
}

/* 品牌浮岛 */
.brand-island {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 7px;
  border-radius: var(--radius-pill);
  background: rgba(20, 27, 60, .92);
  border: 1px solid var(--line-dark);
  flex: 0 0 auto;
  transition: border-color .22s var(--ease), transform .22s var(--ease);
}

.brand-island:hover { border-color: var(--cyan); transform: translateY(-1px); }

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-main);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  flex: 0 0 auto;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }

.brand-text strong { font-size: 15px; font-weight: 900; letter-spacing: .02em; }

.brand-text em {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--sand);
}

/* 悬浮胶囊导航 */
.nav-capsule {
  justify-self: center;
  padding: 5px;
  border-radius: var(--radius-pill);
  background: rgba(20, 27, 60, .92);
  border: 1px solid var(--line-dark);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .40);
  transition: border-color .25s var(--ease);
}

.nav-capsule:hover { border-color: rgba(44, 242, 213, .40); }

.nav-list { display: flex; align-items: center; gap: 2px; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--sand);
  white-space: nowrap;
  transition: color .2s var(--ease), background .25s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-main);
  transform: translateX(-50%);
  transition: width .25s var(--ease);
}

.nav-link:hover { color: var(--paper); }

.nav-link:hover::after { width: 18px; }

.nav-link[aria-current="page"] {
  color: #fff;
  background: var(--grad-main);
  box-shadow: 0 0 0 1px rgba(44, 242, 213, .40), 0 6px 18px rgba(122, 59, 255, .40);
}

.nav-link[aria-current="page"]::after { width: 0; }

/* 右侧工具区 */
.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.search-capsule {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px dashed rgba(201, 183, 156, .45);
  color: var(--sand);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .05em;
  white-space: nowrap;
  transition: border-color .22s var(--ease), color .22s var(--ease), background .22s var(--ease);
}

.search-capsule:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(44, 242, 213, .07);
}

.search-capsule svg { flex: 0 0 auto; }

.cta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  background: var(--grad-main);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .04em;
  white-space: nowrap;
  border: 2px solid rgba(244, 233, 216, .22);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .55);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s var(--ease);
}

.cta-pill:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .60);
  filter: saturate(1.15);
}

.cta-pill:active { transform: translate(0, 0); box-shadow: 2px 2px 0 rgba(0, 0, 0, .55); }

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border-radius: 50%;
  background: rgba(20, 27, 60, .94);
  border: 1px solid var(--line-dark);
  transition: border-color .22s var(--ease), background .22s var(--ease);
}

.nav-toggle:hover { border-color: var(--cyan); background: rgba(44, 242, 213, .10); }

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--paper);
  transition: transform .26s var(--ease), opacity .18s var(--ease), background .2s var(--ease);
}

.nav-toggle[aria-expanded="true"] { border-color: var(--cyan); }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: var(--cyan); }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) 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(-7px) rotate(-45deg); }

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 10vw, 128px);
  background: var(--ink-900);
  border-top: 1px solid var(--line-darker);
  overflow: hidden;
  isolation: isolate;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 2;
  background: var(--grad-main);
}

.footer-contours {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .8;
  background-image:
    repeating-radial-gradient(ellipse 120% 90% at 8% 118%, transparent 0 34px, rgba(44, 242, 213, .12) 34px 35px, transparent 35px 70px),
    repeating-radial-gradient(ellipse 90% 70% at 92% -12%, transparent 0 42px, rgba(255, 106, 26, .14) 42px 43px, transparent 43px 86px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, .12));
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, .12));
}

.footer-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1.6fr);
  gap: clamp(28px, 5vw, 72px);
  padding-block: clamp(48px, 7vw, 88px) clamp(24px, 4vw, 40px);
}

.footer-brand-mark {
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--paper);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .footer-brand-mark {
    background: var(--grad-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.footer-brand-line {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sand);
}

.footer-brand-note {
  margin-top: 14px;
  font-size: 14.5px;
  line-height: 1.75;
  color: rgba(244, 233, 216, .72);
  max-width: 26em;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--orange);
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-dark);
}

.footer-list > li + li { margin-top: 8px; }

.footer-link {
  display: inline-block;
  min-height: 28px;
  font-size: 15px;
  color: rgba(244, 233, 216, .78);
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}

.footer-link:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
  transform: translateX(3px);
}

.footer-contact {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 2.6vw, 36px);
  padding-block: clamp(24px, 4vw, 40px);
  border-top: 1px solid var(--line-darker);
  border-bottom: 1px solid var(--line-darker);
}

.contact-item { display: flex; flex-direction: column; gap: 4px; }

.contact-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sand);
}

.contact-val { font-size: 15px; font-weight: 600; color: var(--paper); }

.contact-item--wide .contact-val { font-weight: 400; max-width: 34em; }

.footer-contact-note {
  flex-basis: 100%;
  max-width: 52em;
  font-size: 13px;
  line-height: 1.7;
  color: var(--sand);
}

.footer-legal { position: relative; z-index: 1; padding-block: 18px 26px; }

.footer-legal-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(201, 183, 156, .85);
}

.legal-icp { color: var(--sand); }

.legal-copy { color: rgba(201, 183, 156, .75); }

/* ---------- 7. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .03em;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}

.btn--primary {
  background: var(--grad-main);
  color: #fff;
  border-color: rgba(244, 233, 216, .22);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .55);
}

.btn--primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(0, 0, 0, .60); }

.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(244, 233, 216, .35);
}

.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(44, 242, 213, .08); }

.btn--paper {
  background: var(--paper);
  color: var(--brown);
  border-color: var(--brown);
  box-shadow: 4px 4px 0 var(--brown);
}

.btn--paper:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--brown); }

/* ---------- 8. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--sand);
}

.breadcrumb a {
  color: var(--sand);
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.breadcrumb a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.breadcrumb-sep { opacity: .5; }

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

/* ---------- 9. 正文容器 ---------- */
.prose {
  max-width: 34em;
  font-size: 17px;
  line-height: 1.85;
}

.prose > * + * { margin-top: 1.15em; }

.prose h2 { font-size: clamp(22px, 2.6vw, 32px); margin-top: 1.8em; }

.prose h3 { font-size: clamp(18px, 2vw, 24px); margin-top: 1.5em; }

.prose ul { list-style: none; padding-left: 1.5em; }

.prose ul > li { position: relative; }

.prose ul > li::before {
  content: "—";
  position: absolute;
  left: -1.5em;
  color: var(--red-orange);
}

.prose ol { list-style: decimal; padding-left: 1.5em; }

.prose a { color: var(--orange); border-bottom: 1px solid currentColor; }

.prose a:hover { color: var(--cyan); }

.prose blockquote {
  border-left: 3px solid var(--orange);
  padding-left: 1em;
  color: var(--sand);
}

.prose code {
  font-family: var(--font-mono);
  font-size: .9em;
  color: var(--gold);
}

/* ---------- 10. 网格系统 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

.grid--7-5 { grid-template-columns: 7fr 5fr; }

.grid--8-4 { grid-template-columns: 8fr 4fr; }

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

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

/* ---------- 11. 堆叠画板 / 章节 ---------- */
.section {
  position: relative;
  padding-block: clamp(48px, 8vw, 100px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: clamp(12px, 2vw, 28px);
  margin-bottom: clamp(24px, 4vw, 48px);
}

.section-index {
  font-family: var(--font-mono);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  color: var(--orange);
}

.section-title {
  font-size: clamp(24px, 3.4vw, 52px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--paper);
}

.panel {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 3vw, 40px);
  border: 2px solid var(--line-dark);
  border-radius: var(--radius-lg);
  background: rgba(20, 27, 60, .72);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}

.panel--paper {
  background: var(--paper);
  color: var(--brown);
  border: 2px solid var(--brown);
  box-shadow: var(--shadow-hard);
}

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

.panel--paper .section-index { color: var(--red-orange); }

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

.panel--paper::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image: radial-gradient(rgba(27, 20, 16, .09) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: .6;
  -webkit-mask-image: linear-gradient(160deg, rgba(0, 0, 0, .75), transparent 62%);
  mask-image: linear-gradient(160deg, rgba(0, 0, 0, .75), transparent 62%);
}

/* ---------- 12. 图片容器基类 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  border: 2px solid rgba(244, 233, 216, .20);
  background: linear-gradient(140deg, var(--ink-800), var(--ink-900));
}

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

.media-frame--tall { aspect-ratio: 4 / 5; }

.media-frame--square { aspect-ratio: 1 / 1; }

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--sand);
}

/* ---------- 13. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(44, 242, 213, .10);
  border: 1px solid rgba(44, 242, 213, .40);
}

/* ---------- 14. 脚本驱动的浮层 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--violet), var(--cyan));
  box-shadow: 0 0 12px rgba(44, 242, 213, .6);
  transition: width .1s linear;
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 70;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(20, 27, 60, .96);
  border: 2px solid var(--cyan);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s linear;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  animation: toTopGlow 1.2s ease-out 1;
}

.to-top:hover { background: rgba(44, 242, 213, .14); }

@keyframes toTopGlow {
  from { box-shadow: 0 0 0 0 rgba(44, 242, 213, .60); }
  to { box-shadow: 0 0 0 18px rgba(44, 242, 213, 0); }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .32s var(--ease), transform .32s var(--ease);
}

[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1240px) {
  .nav-link { padding: 0 12px; font-size: 13.5px; }
  .search-capsule { padding: 0 13px; }
  .cta-pill { padding: 0 18px; }
}

@media (max-width: 1120px) {
  .search-capsule .search-label { display: none; }
  .search-capsule { padding: 0 13px; }
}

@media (max-width: 980px) {
  .header-shell {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-toggle { display: inline-flex; }

  .search-capsule { display: none; }

  .nav-capsule {
    position: fixed;
    top: 72px;
    left: var(--gutter);
    right: var(--gutter);
    z-index: 90;
    justify-self: auto;
    margin: 0;
    padding: 12px;
    border-radius: 22px;
    background: rgba(11, 16, 38, .99);
    border: 1px solid rgba(44, 242, 213, .30);
    box-shadow: 0 28px 70px rgba(0, 0, 0, .65);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px) scale(.98);
    transform-origin: top center;
    transition: opacity .24s var(--ease), transform .24s var(--ease), visibility .24s linear;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav-capsule[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .nav-link {
    justify-content: flex-start;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    color: var(--paper);
    background: rgba(20, 27, 60, .70);
    border: 1px solid var(--line-darker);
  }

  .nav-link::after { display: none; }

  .nav-link[aria-current="page"] { border-color: transparent; }

  .footer-shell { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .grid--7-5,
  .grid--8-4,
  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .cta-pill { display: none; }

  .brand-text em { display: none; }

  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .footer-col:last-child { grid-column: 1 / -1; }

  .footer-legal-inner { flex-direction: column; }
}

@media (max-width: 420px) {
  .footer-cols { grid-template-columns: 1fr; }
  .footer-col:last-child { grid-column: auto; }
}

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

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

  [data-reveal] { opacity: 1; transform: none; }

  .to-top.is-visible { animation: none; }
}
