/* ============================================================
   PG娱乐会馆 · /assets/site.css
   共享外壳：reset / tokens / 排版 / 头部侧边轨道 / 页脚 / 通用组件
   ============================================================ */

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

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

body { margin: 0; }

h1, h2, h3, h4, figure, blockquote { margin: 0; }

ul, ol { margin: 0; padding: 0; }

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

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

a { color: inherit; }

[hidden] { display: none !important; }

/* ---------- 2. Tokens ---------- */
:root {
  --void: #070B18;
  --panel: #101731;
  --panel-2: #0C1226;
  --purple: #7C4DFF;
  --cyan: #2FD3E8;
  --amber: #FF9A45;
  --silver: #E9EDF7;
  --mist: #98A3BF;
  --emerald: #0E3B3A;
  --wine: #3A1030;
  --gold: #F3D08A;

  --line: rgba(233, 237, 247, 0.14);
  --line-cyan: rgba(47, 211, 232, 0.42);
  --line-amber: rgba(255, 154, 69, 0.46);

  --rail-w: 272px;
  --shell: 1200px;
  --radius: 22px;

  --font-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html[data-rail="collapsed"] { --rail-w: 60px; }

/* ---------- 3. Base ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  background: var(--void);
  color: var(--silver);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  transition: padding-left 0.28s var(--ease);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20% -12%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46% 40% at 12% 6%, rgba(124, 77, 255, 0.34), transparent 70%),
    radial-gradient(42% 38% at 92% 22%, rgba(47, 211, 232, 0.20), transparent 72%),
    radial-gradient(52% 46% at 64% 98%, rgba(58, 16, 48, 0.60), transparent 74%);
  animation: aura-drift 11s var(--ease) infinite alternate;
}

@keyframes aura-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2.4%, 1.6%, 0) scale(1.06); }
}

#main-content { display: block; min-height: 60vh; }

/* ---------- 4. 排版 ---------- */
h1, h2, h3, h4 {
  color: var(--silver);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(34px, 5.2vw, 62px); margin-bottom: 0.5em; }
h2 { font-size: clamp(24px, 3.2vw, 38px); margin-bottom: 0.55em; }
h3 { font-size: clamp(19px, 2.1vw, 24px); font-weight: 700; margin-bottom: 0.6em; }
h4 { font-size: 17px; font-weight: 700; margin-bottom: 0.5em; }

p { margin: 0 0 1.05em; color: var(--mist); }
p:last-child { margin-bottom: 0; }
p strong, li strong { color: var(--silver); font-weight: 700; }

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
}

.lede {
  max-width: 34ch;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.85;
  color: #C6CFE4;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.86em;
  letter-spacing: 0.06em;
  color: var(--cyan);
}

.prose { max-width: 38rem; }
.prose p { max-width: 38rem; }

/* ---------- 5. 布局工具 ---------- */
.shell {
  width: min(100% - 40px, var(--shell));
  margin-inline: auto;
}

.shell--narrow { --shell: 860px; }

@media (min-width: 1024px) {
  .shell { width: min(100% - 88px, var(--shell)); }
}

.section { padding: 64px 0; }

.section-head { max-width: 46rem; margin-bottom: 34px; }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 62fr) minmax(0, 38fr);
  gap: 34px;
  align-items: start;
}

.stack > * + * { margin-top: 18px; }

.tone {
  position: relative;
  padding: 52px 32px;
  border: 1px solid var(--line);
  border-radius: 32px 32px 10px 32px;
  background: linear-gradient(160deg, rgba(16, 23, 49, 0.94), rgba(7, 11, 24, 0.88));
}

.tone--purple {
  background:
    radial-gradient(88% 120% at 8% 0%, rgba(124, 77, 255, 0.32), transparent 62%),
    linear-gradient(160deg, #131A38, #080C1C);
}

.tone--cyan {
  background:
    radial-gradient(88% 120% at 92% 0%, rgba(47, 211, 232, 0.22), transparent 62%),
    linear-gradient(160deg, #0D1B2C, #070B18);
}

.tone--emerald {
  background:
    radial-gradient(90% 122% at 10% 100%, rgba(14, 59, 58, 0.88), transparent 66%),
    linear-gradient(160deg, #0B201F, #070B18);
}

.tone--wine {
  background:
    radial-gradient(90% 122% at 90% 100%, rgba(58, 16, 48, 0.9), transparent 66%),
    linear-gradient(160deg, #1A0B1A, #070B18);
}

/* ---------- 6. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 23, 49, 0.9);
  color: var(--silver);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.24s var(--ease), color 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

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

.btn--primary {
  border-color: transparent;
  background: linear-gradient(120deg, var(--purple), #5A2BE0);
  color: #FFFFFF;
  box-shadow: 0 14px 34px rgba(124, 77, 255, 0.32);
}

.btn--primary:hover { color: #FFFFFF; box-shadow: 0 16px 40px rgba(124, 77, 255, 0.46); }

.btn--ghost { background: transparent; border-color: var(--line-cyan); color: var(--cyan); }
.btn--ghost:hover { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(47, 211, 232, 0.14); }

.btn--amber { border-color: var(--line-amber); color: var(--amber); background: rgba(255, 154, 69, 0.08); }
.btn--amber:hover { border-color: var(--amber); color: #FFC089; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line-amber);
  border-radius: 999px;
  background: rgba(255, 154, 69, 0.08);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
}

.tag--cyan { border-color: var(--line-cyan); background: rgba(47, 211, 232, 0.08); color: var(--cyan); }
.tag--purple { border-color: rgba(124, 77, 255, 0.5); background: rgba(124, 77, 255, 0.12); color: #B79CFF; }

.crumbs {
  padding-top: 26px;
  font-size: 13.5px;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.crumbs li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--mist);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.crumbs li + li::before { content: "/"; color: rgba(152, 163, 191, 0.5); }

.crumbs a { text-decoration: none; transition: color 0.24s var(--ease); }
.crumbs a:hover { color: var(--cyan); }
.crumbs [aria-current="page"] { color: var(--silver); }

.island {
  position: relative;
  padding: 26px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 26px 26px 8px 26px;
  background: linear-gradient(158deg, rgba(16, 23, 49, 0.94), rgba(7, 11, 24, 0.9));
  transition: border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.island--alt { border-radius: 8px 26px 26px 26px; }

.island:hover {
  border-color: var(--line-cyan);
  box-shadow: 0 0 0 1px rgba(47, 211, 232, 0.18), 0 20px 46px rgba(7, 11, 24, 0.6);
}

.island__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.island__title { margin: 0 0 8px; font-size: 20px; }

.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px 26px 8px 26px;
  background:
    radial-gradient(120% 100% at 12% 0%, rgba(124, 77, 255, 0.3), transparent 62%),
    linear-gradient(150deg, #101731, #070B18);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(47, 211, 232, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 211, 232, 0.1) 1px, transparent 1px);
  background-size: 34px 34px;
}

.media-frame > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame__caption {
  position: relative;
  z-index: 1;
  padding: 12px 18px;
  border-top: 1px dashed rgba(152, 163, 191, 0.28);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--wide { aspect-ratio: 21 / 9; }

.fold {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(16, 23, 49, 0.72);
  overflow: hidden;
}

.fold + .fold { margin-top: 10px; }

.fold__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 58px;
  padding: 14px 20px;
  border: 0;
  background: none;
  color: var(--silver);
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: color 0.24s var(--ease);
}

.fold__btn::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: rotate(45deg);
  transition: transform 0.24s var(--ease);
}

.fold__btn[aria-expanded="true"] { color: var(--cyan); }
.fold__btn[aria-expanded="true"]::after { transform: rotate(225deg); }

.fold__panel { padding: 0 20px 20px; color: var(--mist); font-size: 16px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  list-style: none;
}

.chip {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 23, 49, 0.72);
  color: var(--mist);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease), background 0.24s var(--ease);
}

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

.chip[aria-pressed="true"] {
  border-color: transparent;
  background: linear-gradient(120deg, var(--cyan), #5CE0F0);
  color: #050813;
}

/* ---------- 7. 头部 · 侧边轨道 ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -72px;
  z-index: 120;
  padding: 12px 20px;
  border-radius: 0 0 14px 14px;
  background: var(--cyan);
  color: #050813;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

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

.site-header { position: relative; z-index: 60; }

.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: var(--rail-w);
  padding: 26px 20px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #0B1126 0%, #070B18 58%, #0A0F22 100%);
  transition: width 0.28s var(--ease), transform 0.32s var(--ease), visibility 0.32s linear;
}

.rail::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--purple) 18%, var(--cyan) 68%, transparent);
  opacity: 0.62;
}

.rail__top {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--silver);
  text-decoration: none;
}

.brand__mark {
  position: relative;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--purple), var(--cyan));
  box-shadow: 0 0 22px rgba(124, 77, 255, 0.5);
}

.brand__mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid rgba(7, 11, 24, 0.78);
  border-radius: 5px;
}

.brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand__name { font-size: 17px; font-weight: 800; letter-spacing: 0.04em; white-space: nowrap; }

.brand__sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--cyan);
  opacity: 0.86;
  white-space: nowrap;
}

.brand--footer .brand__mark { width: 42px; height: 42px; }
.brand--footer .brand__name { font-size: 18px; }

.rail__collapse {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(124, 77, 255, 0.1);
  color: var(--mist);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease);
}

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

.rail__collapse-icon {
  width: 11px;
  height: 11px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(2px, -2px);
  transition: transform 0.24s var(--ease);
}

html[data-rail="collapsed"] .rail__collapse-icon { transform: rotate(-135deg) translate(2px, -2px); }

.rail__caption {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(152, 163, 191, 0.8);
}

.nav-list { display: flex; flex-direction: column; gap: 6px; list-style: none; }

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--mist);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.24s var(--ease), background 0.24s var(--ease), border-color 0.24s var(--ease);
}

.nav-link__idx {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(152, 163, 191, 0.78);
  transition: color 0.24s var(--ease);
}

.nav-link:hover {
  color: var(--silver);
  border-color: var(--line-cyan);
  background: rgba(47, 211, 232, 0.08);
}

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

.nav-link[aria-current="page"] {
  color: var(--silver);
  border-color: rgba(124, 77, 255, 0.55);
  background: linear-gradient(100deg, rgba(124, 77, 255, 0.3), rgba(47, 211, 232, 0.12));
}

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

.nav-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(47, 211, 232, 0.16), 0 0 14px var(--cyan);
}

.rail__dock {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed rgba(152, 163, 191, 0.28);
}

.dock-list { display: flex; flex-direction: column; gap: 6px; list-style: none; }

.dock-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(16, 23, 49, 0.86);
  color: var(--mist);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.dock-link__key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--amber);
}

.dock-link:hover { color: var(--silver); border-color: var(--line-amber); }

/* 收起状态 */
html[data-rail="collapsed"] .rail { padding: 26px 8px 24px; align-items: center; }

html[data-rail="collapsed"] .rail__top { align-items: center; width: 100%; }
html[data-rail="collapsed"] .brand { justify-content: center; }
html[data-rail="collapsed"] .nav-list { width: 100%; }
html[data-rail="collapsed"] .nav-link { justify-content: center; padding-inline: 6px; }
html[data-rail="collapsed"] .dock-list { width: 100%; }
html[data-rail="collapsed"] .dock-link { justify-content: center; }
html[data-rail="collapsed"] .rail__dock { width: 100%; }

html[data-rail="collapsed"] .brand__text,
html[data-rail="collapsed"] .rail__caption,
html[data-rail="collapsed"] .nav-link__label,
html[data-rail="collapsed"] .dock-link__label,
html[data-rail="collapsed"] .rail__collapse-label { display: none; }

html[data-rail="collapsed"] .nav-link[aria-current="page"]::before { display: none; }

html[data-rail="collapsed"] .rail__collapse { padding: 0 12px; }

/* 移动端开关 */
.nav-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 88;
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(124, 77, 255, 0.94), rgba(47, 211, 232, 0.86));
  color: #050813;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(7, 11, 24, 0.62);
}

.nav-toggle__bars { position: relative; display: block; width: 18px; height: 12px; }

.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.24s var(--ease);
}

.nav-toggle__bars span:first-child { top: 0; }
.nav-toggle__bars span:last-child { bottom: 0; }

.site-header[data-open] .nav-toggle__bars span:first-child { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars span:last-child { transform: translateY(-5px) rotate(-45deg); }

/* 移动端底部快捷坞（桌面端隐藏） */
.quick-dock { display: none; }

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 88px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(80% 120% at 12% 0%, rgba(124, 77, 255, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(16, 23, 49, 0.32), rgba(7, 11, 24, 0.98));
}

.footer-index { padding: 22px 0; border-bottom: 1px solid var(--line); }

.footer-index__list { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; }

.footer-index__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--mist);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.24s var(--ease);
}

.footer-index__link .mono { color: var(--amber); }
.footer-index__link:hover { color: var(--cyan); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr 1fr;
  gap: 36px;
  padding: 44px 0 34px;
}

.footer-brand__line { margin: 18px 0 10px; max-width: 24rem; color: var(--silver); font-size: 16px; }
.footer-brand__note { max-width: 24rem; font-size: 14.5px; color: var(--mist); }

.footer-col__title {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--cyan);
}

.footer-links { display: flex; flex-direction: column; gap: 2px; list-style: none; }

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--mist);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.24s var(--ease);
}

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

.footer-contact { display: flex; flex-direction: column; gap: 10px; list-style: none; }

.footer-contact__item { display: flex; flex-wrap: wrap; gap: 4px 10px; }

.footer-contact__key {
  flex: none;
  min-width: 44px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--amber);
  padding-top: 3px;
}

.footer-contact__val { color: var(--silver); font-size: 15px; word-break: break-word; }

.footer-contact__note { margin: 14px 0 16px; font-size: 13.5px; color: var(--mist); }

.footer-col__cta { min-height: 44px; padding: 0 20px; font-size: 14px; }

.footer-col__seal {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(243, 208, 138, 0.3);
  color: var(--gold);
  font-size: 13px;
}

.footer-col__seal .mono { color: var(--gold); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  justify-content: space-between;
  padding: 20px 0 34px;
  border-top: 1px dashed rgba(152, 163, 191, 0.28);
}

.footer-base p { margin: 0; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--mist); }

/* ---------- 9. 动效与注入元素 ---------- */
.read-progress {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: 3px;
  z-index: 95;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--purple), var(--cyan), var(--amber));
  transition: transform 0.12s linear;
}

.to-top {
  position: fixed;
  right: 22px;
  bottom: 30px;
  z-index: 84;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-cyan);
  border-radius: 50%;
  background: rgba(7, 11, 24, 0.88);
  color: var(--cyan);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(6px);
  transition: opacity 0.28s var(--ease), border-color 0.24s var(--ease);
}

.to-top.is-on { opacity: 1; pointer-events: auto; }
.to-top:hover { border-color: var(--cyan); }

.to-top::before {
  content: "";
  width: 12px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: translateY(3px) rotate(45deg);
}

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

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

/* ---------- 10. 焦点 ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1023px) {
  body {
    padding-left: 0;
    padding-bottom: 88px;
  }

  #main-content { padding-top: 78px; }

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

  .rail {
    width: min(88vw, 360px);
    padding: 24px 20px 28px;
    transform: translateX(-102%);
    visibility: hidden;
    box-shadow: 0 0 70px rgba(7, 11, 24, 0.9);
  }

  .site-header[data-open] .rail { transform: none; visibility: visible; }

  .site-header[data-open]::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(7, 11, 24, 0.74);
  }

  .rail__collapse { display: none; }
  .rail__dock { display: none; }

  html[data-rail="collapsed"] .rail { padding: 24px 20px 28px; align-items: stretch; }
  html[data-rail="collapsed"] .brand__text,
  html[data-rail="collapsed"] .rail__caption,
  html[data-rail="collapsed"] .nav-link__label { display: block; }
  html[data-rail="collapsed"] .nav-link { justify-content: flex-start; padding: 6px 12px; }
  html[data-rail="collapsed"] .brand { justify-content: flex-start; }

  .read-progress { left: 0; }

  .quick-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 78;
    display: block;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(7, 11, 24, 0.86), rgba(7, 11, 24, 0.98));
    backdrop-filter: blur(10px);
  }

  .quick-dock__list { display: flex; gap: 8px; list-style: none; }

  .quick-dock__link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(16, 23, 49, 0.9);
    color: var(--mist);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
  }

  .quick-dock__key {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--amber);
  }

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

  .tone { padding: 40px 22px; }

  .section { padding: 48px 0; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }

  .to-top { right: 16px; bottom: 96px; }
}

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

  .shell { width: min(100% - 32px, var(--shell)); }

  .lede, .prose, .prose p { max-width: none; }

  .footer-grid { grid-template-columns: 1fr; gap: 26px; }

  .footer-base { flex-direction: column; }

  h1 { font-size: clamp(30px, 8.5vw, 42px); }
}

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

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

  body::before { animation: none; }
  [data-reveal] { opacity: 1; transform: none; }
  .read-progress { transition: none; }
}
