/* GOGO赛场 · 共享样式 /assets/site.css */

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

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

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

:root {
  --ink: #0E1B2A;
  --paper: #F6F1E4;
  --lime: #C4F23C;
  --card: #FFFCF5;
  --orange: #FF5A2B;
  --text: #221A14;
  --text-soft: #4B3B2E;
  --clay: #8A6A4F;
  --deep-green: #1F3A2E;
  --mist: #5C7285;
  --alert: #C8341B;

  --rail: 264px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 0 rgba(34, 26, 20, 0.08), 0 10px 24px -18px rgba(14, 27, 42, 0.55);
  --shadow-2: 0 4px 0 rgba(34, 26, 20, 0.06), 0 20px 34px -20px rgba(14, 27, 42, 0.6);

  --font-display: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

body {
  min-height: 100vh;
  padding-left: var(--rail);
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { display: block; }
#main-content { scroll-margin-top: 24px; }

::selection { background: var(--lime); color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 6vw, 5.4rem); line-height: 1.02; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.18rem, 2.2vw, 1.6rem); line-height: 1.24; }

a { text-decoration-thickness: 1px; }

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

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  transform: translateY(-180%);
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--lime);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 头部书脊 ---------- */
.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  z-index: 90;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--paper);
  border-right: 1px solid rgba(196, 242, 60, 0.24);
}

.frame {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  min-height: 0;
  padding: 24px 18px 20px;
}

.brand {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 2px 8px;
  text-decoration: none;
  color: var(--paper);
}

.brand__word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--paper);
}

.brand__cn {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--lime);
}

.brand__dash {
  grid-column: 1 / -1;
  display: block;
  width: 46px;
  height: 4px;
  margin: 8px 0 6px;
  border-radius: 2px;
  background: var(--lime);
}

.brand__tag {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: rgba(246, 241, 228, 0.62);
}

.brand:hover .brand__word { color: var(--lime); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 8px 15px;
  border: 1px solid rgba(246, 241, 228, 0.32);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--paper);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--lime);
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.rail-nav__label {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(246, 241, 228, 0.42);
}

.rail-nav__list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rail-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-pill);
  color: rgba(246, 241, 228, 0.8);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.rail-nav__index {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  color: rgba(196, 242, 60, 0.7);
}

.rail-nav__link:hover {
  background: rgba(246, 241, 228, 0.09);
  color: #fff;
  transform: translateX(3px);
}

.rail-nav__link[aria-current="page"] {
  background: var(--lime);
  color: var(--ink);
}
.rail-nav__link[aria-current="page"] .rail-nav__index { color: var(--ink); }
.rail-nav__link[aria-current="page"]:hover { transform: none; }

.header-tools {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(246, 241, 228, 0.16);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-entries {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-chip {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid rgba(246, 241, 228, 0.28);
  border-radius: var(--radius-pill);
  color: rgba(246, 241, 228, 0.86);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.quick-chip:hover {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
}

.header-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.header-actions .btn { width: 100%; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.btn--primary {
  background: var(--lime);
  color: var(--ink);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -12px rgba(196, 242, 60, 0.95);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(246, 241, 228, 0.32);
  color: var(--paper);
}
.btn--ghost:hover {
  background: rgba(246, 241, 228, 0.12);
  transform: translateY(-2px);
}

.btn--dark {
  background: var(--ink);
  color: var(--paper);
}
.btn--dark:hover { transform: translateY(-2px); }

.btn--accent {
  background: var(--orange);
  color: #FFF7F2;
}
.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -12px rgba(255, 90, 43, 0.9);
}

/* ---------- 移动端底部快捷条 ---------- */
.mobile-dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  gap: 2px;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--ink);
  border-top: 1px solid rgba(196, 242, 60, 0.32);
}

.dock-link {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 12px;
  color: rgba(246, 241, 228, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
}

.dock-link__key {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: rgba(196, 242, 60, 0.72);
}

.dock-link:hover,
.dock-link:focus-visible {
  color: var(--lime);
  background: rgba(246, 241, 228, 0.07);
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--ink);
  color: var(--paper);
  border-top: 3px solid var(--lime);
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(40px, 6vw, 72px) clamp(22px, 3vw, 34px);
}

.footer__word {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--paper);
}

.footer__word-cn {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.32em;
  color: var(--lime);
}

.footer__tagline {
  max-width: 22em;
  margin-top: 14px;
  font-size: 0.95rem;
  color: rgba(246, 241, 228, 0.72);
}

.footer__brand .btn { margin-top: 20px; }

.footer__nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 32px);
}

.footer__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: rgba(196, 242, 60, 0.82);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer__list a {
  display: inline-block;
  border-bottom: 1px solid transparent;
  color: rgba(246, 241, 228, 0.82);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer__list a:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

.footer__meta {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 20px;
  padding-bottom: clamp(26px, 4vw, 44px);
  border-top: 1px solid rgba(196, 242, 60, 0.35);
}

.footer__contact {
  font-size: 0.92rem;
  color: rgba(246, 241, 228, 0.88);
}

.footer__note {
  max-width: 46em;
  font-size: 0.82rem;
  line-height: 1.7;
  color: rgba(246, 241, 228, 0.58);
}

.footer__legal {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(147, 174, 194, 0.95);
}

/* ---------- 布局 ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 56px);
}

.section { padding-block: clamp(44px, 6vw, 88px); }
.section--tight { padding-block: clamp(26px, 4vw, 52px); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 28px);
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; }
.span-12 { grid-column: span 12; }

/* ---------- 排版组件 ---------- */
.display-1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 5.4rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}

.display-2 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.022em;
  color: var(--ink);
  text-wrap: balance;
}

.display-3 {
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 2.4vw, 1.9rem);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.018em;
  color: var(--ink);
}

.lead {
  max-width: 34em;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  line-height: 1.8;
  color: var(--text-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--clay);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--orange);
}

.prose {
  max-width: 40em;
  font-size: 1rem;
  line-height: 1.78;
  color: var(--text);
}

.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 1.9em; }
.prose h3 { margin-top: 1.5em; }
.prose ul,
.prose ol {
  display: flex;
  flex-direction: column;
  gap: 0.45em;
  padding-left: 1.3em;
  list-style: disc;
}
.prose ol { list-style: decimal; }
.prose strong { font-weight: 800; }
.prose a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--lime), var(--lime));
  background-repeat: no-repeat;
  background-size: 100% 42%;
  background-position: 0 86%;
}
.prose a:hover { background-size: 100% 92%; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--mist);
}

.crumbs a {
  color: var(--clay);
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease;
}
.crumbs a:hover { color: var(--ink); background: var(--lime); }
.crumbs__sep { opacity: 0.6; }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 700; }

.rule {
  height: 1px;
  border: 0;
  background: rgba(138, 106, 79, 0.3);
}

/* ---------- 资料卡 ---------- */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(138, 106, 79, 0.24);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}

.card__tab {
  display: inline-block;
  padding: 5px 16px 5px 14px;
  border-radius: 0 0 12px 0;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.card__body { padding: clamp(16px, 2.4vw, 26px); }

.card__title {
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.card__meta {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--mist);
}

/* ---------- 胶囊标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--clay);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--clay);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.tag:hover { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.tag--lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.tag--ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tag--orange { border-color: var(--orange); color: var(--orange); }
.tag--orange:hover { background: var(--orange); color: #FFF7F2; }

/* ---------- 横向滑动带 ---------- */
.xrail {
  display: flex;
  gap: clamp(12px, 2vw, 20px);
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--lime) rgba(14, 27, 42, 0.12);
}

.xrail::-webkit-scrollbar { height: 6px; }
.xrail::-webkit-scrollbar-track { background: rgba(14, 27, 42, 0.1); border-radius: 3px; }
.xrail::-webkit-scrollbar-thumb { background: var(--lime); border-radius: 3px; }

.xrail__item {
  flex: 0 0 clamp(240px, 30vw, 320px);
  scroll-snap-align: start;
}

/* ---------- 图片容器 ---------- */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, var(--deep-green), var(--ink) 70%);
  isolation: isolate;
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

.media--wide img { aspect-ratio: 21 / 9; }
.media--tall img { aspect-ratio: 3 / 4; }

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: radial-gradient(rgba(255, 252, 245, 0.9) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
}

.media--court {
  background-image:
    radial-gradient(circle at 50% 50%, transparent 0 46px, rgba(196, 242, 60, 0.34) 46px 47px, transparent 47px),
    linear-gradient(to right, transparent calc(50% - 0.5px), rgba(196, 242, 60, 0.3) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(155deg, var(--deep-green), var(--ink) 72%);
  min-height: 200px;
}

.media__caption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(14, 27, 42, 0.72);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

/* ---------- 比分与提示 ---------- */
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tape {
  position: relative;
  padding: 14px 20px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-md);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), 0 100%);
}

.notice {
  padding: 14px 18px;
  border-left: 5px solid var(--orange);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--card);
  font-size: 0.92rem;
  color: var(--text-soft);
}

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

/* ---------- JS 注入组件 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: var(--rail);
  right: 0;
  height: 4px;
  z-index: 120;
  pointer-events: none;
}

.scroll-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--lime), var(--orange));
  transition: width 0.12s linear;
}

.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 32px);
  z-index: 130;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(196, 242, 60, 0.55);
  border-radius: 50%;
  background: var(--ink);
  color: var(--lime);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 14px 26px -16px rgba(14, 27, 42, 0.95);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.to-top:hover {
  background: var(--lime);
  color: var(--ink);
  transform: translateY(-3px);
}

.to-top[hidden] { display: none; }

/* ---------- 平板 ---------- */
@media (min-width: 900px) and (max-width: 1120px) {
  :root { --rail: 226px; }
  .brand__word { font-size: 2.1rem; }
  .rail-nav__link { font-size: 0.88rem; padding: 8px 10px; }
}

/* ---------- 手机 ---------- */
@media (max-width: 899px) {
  body {
    padding-left: 0;
    padding-top: 64px;
    padding-bottom: 78px;
  }

  .skip-link { top: 8px; }

  .site-header {
    inset: 0 0 auto 0;
    width: auto;
    height: 64px;
    border-right: 0;
    border-bottom: 1px solid rgba(196, 242, 60, 0.28);
  }

  .frame {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    height: 64px;
    padding: 0 16px;
  }

  .brand { grid-template-columns: auto auto; gap: 0 6px; }
  .brand__word { font-size: 1.5rem; }
  .brand__cn { font-size: 0.68rem; letter-spacing: 0.2em; }
  .brand__dash { width: 22px; height: 3px; margin: 4px 0 0; }
  .brand__tag { display: none; }

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

  .site-header[data-open] .nav-toggle {
    background: var(--lime);
    border-color: var(--lime);
    color: var(--ink);
  }
  .site-header[data-open] .nav-toggle__bar { background: var(--ink); }
  .site-header[data-open] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header[data-open] .nav-toggle__bar:nth-child(2) { opacity: 0; }
  .site-header[data-open] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .rail-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 64px;
    bottom: 0;
    z-index: 70;
    gap: 14px;
    padding: 18px 18px 112px;
    background: var(--ink);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .site-header[data-open] .rail-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .rail-nav__list { gap: 4px; }

  .rail-nav__link {
    padding: 12px 14px;
    font-size: 1.02rem;
    background: rgba(255, 252, 245, 0.045);
  }
  .rail-nav__link:hover { transform: none; }

  .header-tools { margin-top: auto; }
  .quick-entries { gap: 8px; }
  .quick-chip { padding: 7px 14px; font-size: 0.8rem; }
  .header-actions { flex-direction: row; gap: 10px; }
  .header-actions .btn { flex: 1 1 0; }

  .mobile-dock { display: flex; }

  .scroll-progress { left: 0; height: 3px; }
  .to-top { bottom: 86px; width: 44px; height: 44px; }

  .grid > [class*="span-"] { grid-column: 1 / -1; }

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

@media (max-width: 520px) {
  body { font-size: 16px; }
  .footer__nav { grid-template-columns: 1fr; }
  .footer__brand .btn { width: 100%; }
  .rail-nav { padding-bottom: 120px; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .card:hover,
  .btn:hover,
  .rail-nav__link:hover,
  .to-top:hover {
    transform: none !important;
  }

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