/* ==========================================================================
   龙8手机中心 · 共享样式 /assets/site.css
   结构：重置 → 变量 → 中文排版 → 骨架 → 头部 → 轨道导航 → 页脚
        → 通用组件 → 响应式 → 无障碍
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 16px);
}

body,
h1, h2, h3, h4, h5,
p, figure, blockquote, dl, dd, dt,
ul, ol { margin: 0; }

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

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

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

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

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

/* ---------- 2. 变量 ---------- */
:root {
  --rail-w: 88px;
  --bar-h: 64px;
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 88px);

  --red: #6E1220;
  --red-deep: #4A0C16;
  --gold: #C9A227;
  --gold-light: #E6CE7A;

  --ink: #12100F;
  --ink-soft: #1C1A19;
  --silver: #C9CCD1;
  --gray: #8A8F96;
  --paper: #F4F1EC;
  --paper-raise: #FBFAF7;
  --teal: #4E7C8A;
  --teal-mist: #DCE7EA;

  --line-gold: rgba(201, 162, 39, 0.28);
  --line-gold-soft: rgba(201, 162, 39, 0.14);
  --line-cool: rgba(201, 204, 209, 0.18);
  --line-dark: rgba(18, 16, 15, 0.10);

  --font-head: "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 200ms;

  --shadow-soft: 0 1px 0 rgba(18, 16, 15, 0.04);
  --shadow-lift: 0 8px 22px rgba(18, 16, 15, 0.08);
}

/* ---------- 3. 中文排版与页面骨架 ---------- */
html, body { min-height: 100%; }

body {
  padding-top: var(--bar-h);
  padding-left: var(--rail-w);
  background: var(--paper);
  color: #1A1817;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1 { font-size: clamp(30px, 5vw, 56px); }
h2 { font-size: clamp(24px, 3.2vw, 36px); font-weight: 800; }
h3 { font-size: clamp(19px, 2vw, 22px); font-weight: 800; letter-spacing: -0.01em; }
h4 { font-size: 17px; font-weight: 700; letter-spacing: 0; }

p { max-width: 72ch; }

strong { font-weight: 700; }

#main-content { scroll-margin-top: calc(var(--bar-h) + 12px); }

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

.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;
}

/* ---------- 4. 布局容器 ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(56px, 8vw, 112px); }

.divider {
  height: 1px;
  border: 0;
  background: var(--line-gold);
  margin-block: clamp(32px, 5vw, 64px);
}

.prose {
  max-width: 72ch;
  font-size: 16px;
  line-height: 1.75;
  color: #2A2725;
}

.prose p + p { margin-top: 1em; }

.prose h2, .prose h3 { margin-top: 1.6em; margin-bottom: 0.6em; }

.lede {
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.8;
  color: #4B4744;
  max-width: 62ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--gold);
}

.cut {
  display: inline-block;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  padding-right: 14px;
}

/* ---------- 5. 头部 ---------- */
.site-header { position: relative; z-index: 100; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 160ms var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.header-bar {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  background: rgba(18, 16, 15, 0.94);
  border-bottom: 1px solid var(--line-gold);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 120;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  height: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 40px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 0 0 auto;
}

.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  flex: none;
  background: var(--red);
  border: 1px solid var(--line-gold);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
}

.brand-mark-core {
  position: absolute;
  inset: 8px;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.brand-type { display: block; min-width: 0; }

.brand-name {
  display: block;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--paper);
  white-space: nowrap;
}

.brand-sub {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.14em;
  color: var(--gray);
  white-space: nowrap;
}

.brand:hover .brand-name { color: var(--gold-light); }

.chapter-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: clamp(10px, 3vw, 36px);
  font-size: 12px;
  letter-spacing: 0.08em;
  min-width: 0;
}

.chapter-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}

.chapter-line {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--line-gold);
  flex: none;
}

.chapter-name {
  color: var(--silver);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex: 0 0 auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line-gold);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}

.chip-gold {
  color: var(--gold-light);
  background: rgba(110, 18, 32, 0.38);
}

.chip-gold:hover {
  color: #FFFFFF;
  background: rgba(110, 18, 32, 0.86);
  border-color: var(--gold);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line-gold);
  border-radius: 2px;
  color: var(--silver);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav-toggle:hover { border-color: var(--gold); color: var(--gold-light); }

.nav-toggle-box {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
  flex: none;
}

.nav-toggle-box span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--gold);
  transition: transform 200ms var(--ease), opacity 160ms linear;
}

.nav-toggle-box span:nth-child(1) { top: 0; }
.nav-toggle-box span:nth-child(2) { top: 5px; }
.nav-toggle-box span:nth-child(3) { top: 10px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-box span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(201, 162, 39, 0.10);
  pointer-events: none;
}

.header-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--red) 0%, var(--gold) 78%, var(--gold-light) 100%);
  will-change: transform;
}

/* ---------- 6. 侧边轨道导航 / 移动抽屉 ---------- */
.rail-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 0 20px;
  background: linear-gradient(180deg, #171413 0%, #12100F 58%, #1C1A19 100%);
  border-right: 1px solid var(--line-gold);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  z-index: 130;
}

.rail-nav::-webkit-scrollbar { width: 0; height: 0; }

.rail-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12px 0px, rgba(201, 162, 39, 0.10) 0 11px, transparent 11.5px),
    radial-gradient(circle at 12px 12px, rgba(201, 162, 39, 0.055) 0 11px, transparent 11.5px);
  background-size: 24px 12px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.15) 78%, transparent);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.15) 78%, transparent);
}

.rail-head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-gold-soft);
}

.rail-marker {
  width: 10px;
  height: 10px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.12);
}

.rail-title {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--gray);
  writing-mode: vertical-rl;
  text-orientation: upright;
  line-height: 1;
}

.rail-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-inline: 8px;
}

.rail-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 11px 3px 12px;
  border: 1px solid transparent;
  border-radius: 2px;
  text-align: center;
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}

.rail-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--gold);
  opacity: 0.75;
  transition: opacity var(--dur) var(--ease);
}

.rail-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--silver);
  transition: color var(--dur) var(--ease);
}

.rail-link:hover {
  background: rgba(201, 162, 39, 0.10);
  border-color: rgba(201, 162, 39, 0.35);
}

.rail-link:hover .rail-label { color: #FFFFFF; }
.rail-link:hover .rail-num { opacity: 1; }

.rail-link[aria-current="page"] {
  background: rgba(110, 18, 32, 0.52);
  border-color: var(--line-gold);
}

.rail-link[aria-current="page"] .rail-label {
  color: var(--gold-light);
  font-weight: 700;
}

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

.rail-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  width: 2px;
  height: 22px;
  transform: translateY(-50%);
  background: var(--gold);
}

.rail-foot {
  position: relative;
  margin-top: auto;
  padding: 14px 8px 0;
  border-top: 1px solid var(--line-gold-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.rail-foot-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-light);
}

.rail-foot-note {
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--gray);
}

.nav-scrim {
  display: none;
  position: fixed;
  inset: var(--bar-h) 0 0 0;
  z-index: 125;
  background: rgba(18, 16, 15, 0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease);
}

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

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  padding-top: clamp(44px, 6vw, 80px);
  background: var(--ink);
  color: var(--silver);
  border-top: 1px solid var(--line-gold);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 16px 0px, rgba(201, 162, 39, 0.09) 0 15px, transparent 15.5px),
    radial-gradient(circle at 16px 16px, rgba(201, 162, 39, 0.05) 0 15px, transparent 15.5px);
  background-size: 32px 16px;
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 82% at 50% 0%, rgba(110, 18, 32, 0.44), transparent 64%);
}

.footer-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.footer-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.footer-brand {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(20px, 2.6vw, 27px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--paper);
  background: var(--red-deep);
  border-left: 2px solid var(--gold);
  padding: 8px 20px 9px 14px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  max-width: none;
}

.footer-tagline {
  font-size: 14px;
  line-height: 1.7;
  color: var(--silver);
  letter-spacing: 0.04em;
}

.footer-domain {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gray);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: clamp(28px, 4vw, 44px);
  border-top: 1px solid var(--line-cool);
}

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

.footer-col-title {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gold);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-cool);
}

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

.footer-list a,
.footer-link {
  font-size: 14px;
  line-height: 1.6;
  color: var(--silver);
  transition: color var(--dur) var(--ease);
}

.footer-list a::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 9px;
  border: 1px solid rgba(201, 162, 39, 0.55);
  transform: rotate(45deg) translateY(-1px);
  vertical-align: middle;
}

.footer-list a:hover,
.footer-link:hover {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.footer-list-plain li {
  font-size: 13px;
  line-height: 1.7;
  color: var(--silver);
  word-break: break-word;
}

.footer-list-plain .mono { color: var(--gold-light); }

.footer-note {
  font-size: 13px;
  line-height: 1.8;
  color: var(--gray);
  max-width: 34ch;
}

.footer-note + .footer-note { margin-top: 10px; }

.footer-strong { color: var(--silver); font-size: 13px; }

.footer-base {
  position: relative;
  z-index: 1;
  margin-top: clamp(36px, 5vw, 64px);
  border-top: 1px solid var(--line-cool);
}

.footer-base-inner {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 18px var(--gutter) 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer-copy {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gray);
  max-width: none;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.footer-legal li { display: inline-flex; align-items: center; }

.footer-legal li + li::before {
  content: "/";
  margin-right: 18px;
  color: rgba(201, 162, 39, 0.5);
  font-family: var(--font-mono);
}

.footer-legal a { color: var(--gray); transition: color var(--dur) var(--ease); }
.footer-legal a:hover { color: var(--gold-light); }

/* ---------- 8. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border: 1px solid var(--line-gold);
  border-radius: 2px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: center;
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}

.btn-primary {
  background: var(--red);
  border-color: rgba(201, 162, 39, 0.5);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--red-deep);
  border-color: var(--gold);
  color: #FFFFFF;
}

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

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--red);
  background: rgba(201, 162, 39, 0.08);
}

.breadcrumb {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gray);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.breadcrumb li { display: inline-flex; align-items: center; gap: 10px; }

.breadcrumb li + li::before {
  content: "/";
  font-family: var(--font-mono);
  color: rgba(201, 162, 39, 0.6);
}

.breadcrumb a { color: var(--gray); transition: color var(--dur) var(--ease); }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 700; }

.tag-track {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-block: 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.tag-track::-webkit-scrollbar { height: 2px; }
.tag-track::-webkit-scrollbar-thumb { background: var(--line-gold); }

.tag {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: #3A3634;
  background: transparent;
  transition: border-color var(--dur) var(--ease),
              background var(--dur) var(--ease),
              color var(--dur) var(--ease);
}

.tag:hover {
  border-color: var(--line-gold);
  background: var(--teal-mist);
  color: var(--ink);
}

.tag [data-count] {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--teal);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 2.2vw, 24px);
}

.card {
  position: relative;
  padding: 22px;
  background: var(--paper-raise);
  border: 1px solid var(--line-dark);
  border-radius: 2px;
  box-shadow: var(--shadow-soft);
  transition: transform var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-gold);
  box-shadow: var(--shadow-lift);
}

.param-card {
  position: relative;
  padding: 20px 22px;
  background: var(--ink-soft);
  color: var(--silver);
  border: 1px solid var(--line-gold);
  border-radius: 2px;
}

.param-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 14px 0px, rgba(201, 162, 39, 0.09) 0 13px, transparent 13.5px),
    radial-gradient(circle at 14px 14px, rgba(201, 162, 39, 0.05) 0 13px, transparent 13.5px);
  background-size: 28px 14px;
  border-radius: 2px;
}

.param-card > * { position: relative; }

.param-card dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 16px;
  align-items: baseline;
}

.param-card dt {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gray);
  white-space: nowrap;
}

.param-card dd {
  margin: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  word-break: break-word;
}

.week-table {
  font-size: 14px;
  line-height: 1.5;
}

.week-table caption {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--gray);
  padding-bottom: 10px;
}

.week-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gray);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-gold);
  white-space: nowrap;
}

.week-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-dark);
  vertical-align: top;
}

.week-table tbody tr:nth-child(even) { background: rgba(220, 231, 234, 0.42); }

.week-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
}

.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line-gold);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(110, 18, 32, 0.92) 0%, rgba(28, 26, 25, 0.96) 58%, rgba(18, 16, 15, 1) 100%);
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 16px 0px, rgba(201, 162, 39, 0.10) 0 15px, transparent 15.5px),
    radial-gradient(circle at 16px 16px, rgba(201, 162, 39, 0.055) 0 15px, transparent 15.5px);
  background-size: 32px 16px;
}

.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }

/* ---------- 9. 响应式 ---------- */
@media (max-width: 1023px) {
  body {
    padding-left: 0;
    font-size: 15px;
    line-height: 1.72;
  }

  .header-bar { left: 0; }

  .chapter-badge { display: none; }

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

  .nav-scrim { display: block; }

  .rail-nav {
    top: var(--bar-h);
    left: auto;
    right: 0;
    bottom: 0;
    width: min(330px, 88vw);
    border-right: 0;
    border-left: 1px solid var(--line-gold);
    box-shadow: -18px 0 42px rgba(0, 0, 0, 0.46);
    transform: translate3d(100%, 0, 0);
    visibility: hidden;
    transition: transform 240ms var(--ease), visibility 0s linear 240ms;
    padding: 18px 0 24px;
  }

  .rail-nav[data-open] {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    transition: transform 240ms var(--ease), visibility 0s linear 0s;
  }

  .rail-head {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 18px 16px;
  }

  .rail-marker { width: 8px; height: 8px; }

  .rail-title {
    writing-mode: horizontal-tb;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--gold);
  }

  .rail-list { padding-inline: 12px; gap: 2px; }

  .rail-link {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 14px 12px;
    border: 1px solid transparent;
    border-bottom: 1px solid var(--line-gold-soft);
    text-align: left;
  }

  .rail-num { font-size: 11px; }

  .rail-label { font-size: 15px; font-weight: 600; }

  .rail-link[aria-current="page"]::before {
    left: 0;
    height: 26px;
  }

  .rail-foot {
    align-items: flex-start;
    padding: 16px 18px 0;
    text-align: left;
  }

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

@media (max-width: 767px) {
  .header-inner { gap: 12px; }
  .brand-mark { width: 24px; height: 24px; }
  .brand-name { font-size: 15px; }
  .brand-sub { display: none; }
  .chip { padding: 6px 10px; font-size: 11px; }
  .nav-toggle { padding: 7px 10px; }
  .nav-toggle-text { display: none; }
  .footer-brand { font-size: 20px; }
  .footer-note { max-width: none; }
}

@media (max-width: 599px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-base-inner { flex-direction: column; align-items: flex-start; }
  .footer-legal li + li::before { margin-right: 14px; }
  .card { padding: 18px; }
  .param-card { padding: 18px; }
  .week-table th,
  .week-table td { padding: 10px 8px; }
}

/* ---------- 10. 无障碍 ---------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 1px;
}

.site-footer :focus-visible { outline-color: var(--gold-light); }

@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;
  }

  .card:hover,
  .btn:hover,
  .tag:hover {
    transform: none;
  }

  .rail-nav {
    transition: none;
    transform: none;
  }
}
