/* =========================================================
   米乐赛场 · 共享样式表 /assets/site.css
   夜间赛场指挥中心：纵向赛事轨道 + 模块化数据卡片
   ========================================================= */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --ink: #0A1C16;
  --ink-2: #102A22;
  --line: #1B3A31;
  --tick: #2E4A41;
  --cyan: #3BF0C4;
  --orange: #FF7A33;
  --orange-dark: #C24E12;
  --paper: #F5F2E9;
  --muted: #8AA79E;
  --mint: #B9F7E6;

  --rail-w: 266px;
  --topbar-h: 64px;

  --r-xl: 24px;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --r-pill: 999px;

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

  --ease: cubic-bezier(0.32, 0.72, 0.28, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  padding-left: var(--rail-w);
  background-color: var(--ink);
  background-image:
    radial-gradient(900px 520px at 88% -8%, rgba(59, 240, 196, 0.07), transparent 68%),
    repeating-linear-gradient(180deg, rgba(27, 58, 49, 0.30) 0 1px, transparent 1px 104px);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

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

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

button { font: inherit; color: inherit; }

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

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
summary:focus:not(:focus-visible) { outline: none; }

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

/* ---------- 3. 基础排版工具 ---------- */
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.page-title {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.lede {
  margin-top: 16px;
  max-width: 36em;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

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

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

.section { padding-block: 56px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.section-title { font-size: clamp(24px, 3vw, 30px); }

.section-desc {
  max-width: 34em;
  color: var(--muted);
  font-size: 14px;
}

.divider {
  height: 1px;
  border: 0;
  margin-block: 36px;
  background: var(--line);
}

.prose { max-width: 38em; }
.prose p + p { margin-top: 1em; }
.prose p { line-height: 1.75; }

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--cyan);
  color: #04231B;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}

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

/* ---------- 5. 头部：纵向赛事轨道 ---------- */
.site-header {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  padding: 22px 0 18px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, #102A22 0%, #0A1C16 72%, #08150F 100%);
  z-index: 60;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.header-rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  padding-inline: 20px;
}

.rail-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  color: var(--paper);
}

.brand-mark {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(140deg, #3BF0C4 0%, #1F6F5A 100%);
  box-shadow:
    0 0 0 1px rgba(59, 240, 196, 0.28),
    0 10px 24px -14px rgba(59, 240, 196, 0.9);
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  background: #06231B;
  transform: rotate(-32deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #06231B;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.brand-sub {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

/* 抽屉开关 */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(16, 42, 34, 0.9);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.nav-toggle:hover { border-color: rgba(59, 240, 196, 0.45); }

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

.site-header[data-open] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) 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(-6px) rotate(-45deg); }

/* 轨道主体 */
.rail-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
  padding-right: 2px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--tick) transparent;
}

.rail-body::-webkit-scrollbar { width: 6px; }
.rail-body::-webkit-scrollbar-thumb {
  background: var(--tick);
  border-radius: var(--r-pill);
}

.drawer-head { display: none; }

.drawer-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.drawer-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

/* 赛季刻度 */
.season-meter {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(16, 42, 34, 0.62);
}

.season-meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.season-meter-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.season-meter-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--cyan);
}

.meter-track {
  position: relative;
  height: 6px;
  margin-top: 10px;
  border-radius: var(--r-pill);
  background: var(--tick);
  overflow: hidden;
}

.meter-fill {
  display: block;
  width: var(--progress, 68%);
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, #1F6F5A 0%, var(--cyan) 100%);
}

.meter-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  opacity: 0.75;
}

/* 纵向索引导航 */
.rail-nav { margin-top: 2px; }

.rail-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 18px;
  border-radius: 12px;
  color: var(--paper);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.rail-link::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tick);
  transform: translateY(-50%);
  transition: background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.rail-link:hover {
  background: rgba(59, 240, 196, 0.08);
  color: var(--mint);
}

.rail-link:hover::before { background: var(--muted); }

.rail-link[aria-current="page"] {
  background: rgba(185, 247, 230, 0.10);
  color: var(--mint);
  font-weight: 600;
}

.rail-link[aria-current="page"]::before {
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(59, 240, 196, 0.18);
}

.rail-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

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

.rail-label { white-space: nowrap; }

/* 联赛快速切换 */
.league-switch {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(16, 42, 34, 0.72);
  overflow: hidden;
}

.league-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--mint);
  transition: background 0.18s var(--ease);
}

.league-summary::-webkit-details-marker { display: none; }
.league-summary:hover { background: rgba(59, 240, 196, 0.07); }

.league-summary-label {
  color: var(--muted);
  letter-spacing: 0.12em;
}

.league-summary-value { flex: 1; min-width: 0; }

.league-caret {
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s var(--ease), border-color 0.18s var(--ease);
}

.league-switch[open] .league-caret {
  transform: rotate(-135deg) translateY(-2px);
  border-color: var(--cyan);
}

.league-list {
  display: grid;
  gap: 4px;
  padding: 6px;
  border-top: 1px solid var(--line);
}

.league-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--paper);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.league-option:hover {
  background: rgba(59, 240, 196, 0.10);
  color: var(--mint);
}

.league-option.is-selected {
  background: var(--mint);
  color: #06231B;
}

.league-option-name { font-weight: 600; }

.league-option-round {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.league-option.is-selected .league-option-round { color: #0C3A2E; }

/* 轨道底部行动区 */
.rail-foot {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.rail-note {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* 移动端遮罩 */
.nav-scrim { display: none; }

/* ---------- 6. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.16s var(--ease),
    background 0.18s var(--ease),
    border-color 0.18s var(--ease),
    color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.btn-action {
  background: var(--orange);
  color: #1B0D05;
  border-color: var(--orange-dark);
  box-shadow: 0 12px 28px -18px rgba(255, 122, 51, 0.95);
}

.btn-action:hover {
  background: var(--orange-dark);
  color: var(--paper);
  transform: translateY(-1px);
}

.btn-action:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}

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

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

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #0A1C16 0%, #08150F 100%);
}

.footer-inner {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 56px 24px 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.15fr 1.3fr 0.7fr 1.1fr;
  gap: 32px;
  align-items: start;
}

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

.brand--footer { margin-bottom: 16px; }
.brand--footer .brand-name { font-size: 20px; }

.footer-note {
  max-width: 30em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.footer-stamp {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--tick);
  color: var(--muted);
  opacity: 0.8;
}

/* 资料下载卡 */
.download-card {
  padding: 18px;
  border: 1px solid rgba(255, 122, 51, 0.5);
  border-radius: var(--r-xl);
  background: linear-gradient(160deg, rgba(255, 122, 51, 0.14) 0%, rgba(16, 42, 34, 0.92) 72%);
  box-shadow: 0 20px 44px -30px rgba(255, 122, 51, 0.85);
}

.download-eyebrow {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
}

.download-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.download-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 28, 22, 0.55);
  color: var(--paper);
  transition:
    border-color 0.18s var(--ease),
    transform 0.18s var(--ease),
    background 0.18s var(--ease);
}

.download-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 51, 0.55);
  background: rgba(16, 42, 34, 0.9);
}

.download-league {
  font-size: 14px;
  font-weight: 600;
}

.download-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* 栏目与联系 */
.footer-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-link {
  display: inline-block;
  font-size: 14px;
  color: var(--paper);
  opacity: 0.88;
  transition: color 0.16s var(--ease), opacity 0.16s var(--ease);
}

.footer-link:hover {
  color: var(--cyan);
  opacity: 1;
}

.footer-link--strong {
  margin-top: 16px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-weight: 600;
}

.footer-link--strong:hover { border-color: var(--cyan); }

.footer-contact {
  display: grid;
  gap: 12px;
}

.contact-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.contact-value {
  font-size: 14px;
  color: var(--paper);
  word-break: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 48px;
  padding: 20px 0 26px;
  border-top: 1px solid var(--line);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-bottom-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.16s var(--ease);
}

.footer-bottom-link:hover { color: var(--cyan); }

/* ---------- 8. 通用容器与网格 ---------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}

.site-main { display: block; }

.grid {
  display: grid;
  gap: 20px;
}

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

/* ---------- 9. 卡片与标签 ---------- */
.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--ink-2);
  transition:
    transform 0.18s var(--ease),
    border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 240, 196, 0.35);
  box-shadow:
    0 0 0 1px rgba(59, 240, 196, 0.10),
    0 24px 44px -32px rgba(59, 240, 196, 0.85);
}

.card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.card--paper {
  background: var(--paper);
  color: #0A1C16;
  border-color: transparent;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(16, 42, 34, 0.7);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.tag--cyan {
  border-color: rgba(59, 240, 196, 0.45);
  background: rgba(59, 240, 196, 0.10);
  color: var(--cyan);
}

.tag--orange {
  border-color: rgba(255, 122, 51, 0.5);
  background: rgba(255, 122, 51, 0.12);
  color: var(--orange);
}

.tag--mint {
  border-color: transparent;
  background: var(--mint);
  color: #06231B;
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumb { margin-bottom: 24px; }

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--tick);
}

.breadcrumb-link {
  color: var(--muted);
  transition: color 0.16s var(--ease);
}

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

.breadcrumb-current { color: var(--mint); }

/* ---------- 11. 图片容器（供页面阶段使用） ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: linear-gradient(150deg, #12332A 0%, #0A1C16 100%);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(59, 240, 196, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 240, 196, 0.10) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.5;
  mix-blend-mode: screen;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.05);
}

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

.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.media-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ---------- 12. 阅读进度条（JS 注入） ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: 2px;
  z-index: 90;
  pointer-events: none;
  background: transparent;
}

.scroll-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--orange) 100%);
  transition: width 0.1s linear;
}

/* ---------- 13. 平板 ---------- */
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* ---------- 14. 移动端：轨道收为抽屉 ---------- */
@media (max-width: 1023px) {
  :root { --rail-w: 0px; }

  body {
    padding-left: 0;
    padding-top: var(--topbar-h);
  }

  body[data-nav-open] { overflow: hidden; }

  .site-header {
    inset: 0 0 auto 0;
    width: auto;
    height: var(--topbar-h);
    flex-direction: row;
    align-items: center;
    padding: 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(16, 42, 34, 0.98) 0%, rgba(10, 28, 22, 0.98) 100%);
    overflow: visible;
  }

  .header-rail {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    padding-inline: 0;
  }

  .rail-brand { width: 100%; }

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

  .rail-body {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(88vw, 352px);
    flex: none;
    gap: 16px;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
    border-left: 1px solid var(--line);
    background: linear-gradient(180deg, #0F2A22 0%, #08150F 100%);
    box-shadow: -30px 0 70px -40px #000;
    transform: translateX(102%);
    transition: transform 0.24s var(--ease);
    overflow-y: auto;
    z-index: 70;
  }

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

  .drawer-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--line);
  }

  .rail-foot { margin-top: auto; }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 65;
    background: rgba(4, 12, 9, 0.68);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease);
  }

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

  .container { padding-inline: 18px; }
  .section { padding-block: 40px; }
  .site-footer { margin-top: 48px; }
  .footer-inner { padding: 40px 18px 0; }
  .footer-bottom { margin-top: 32px; }
  .scroll-progress { top: var(--topbar-h); left: 0; }
}

/* ---------- 15. 手机 ---------- */
@media (max-width: 700px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .brand-sub { font-size: 10px; letter-spacing: 0.04em; }

  .page-title { font-size: clamp(30px, 8vw, 40px); }

  .media-frame--wide { aspect-ratio: 16 / 10; }
}

@media (max-width: 400px) {
  .brand-sub { display: none; }
}

/* ---------- 16. 降低动效 ---------- */
@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;
    scroll-behavior: auto !important;
  }

  .scroll-progress-bar { transition: none; }
}
