/* ==========================================================================
   米兰赛场 · 共享站点样式 /assets/site.css
   夜战战术板：深炭灰底 + 米兰红骨架 + 电光青/荧光橙数据高亮
   ========================================================================== */

:root {
  --ink-0: #0B0D10;
  --ink-1: #151A20;
  --ink-2: #1F262E;
  --ink-3: #2A323B;
  --red: #C8102E;
  --red-deep: #7A0618;
  --cyan: #00E5FF;
  --orange: #FF7A00;
  --paper: #F5F1E8;
  --cool: #A8B3BD;
  --steel: #3A4652;

  --font-sans: "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, "JetBrains Mono", "SF Mono", "DIN Alternate",
    Menlo, Consolas, "Liberation Mono", monospace;

  --header-h: 86px;
  --wrap: 1320px;
  --gutter: clamp(18px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --hair: 1px solid rgba(168, 179, 189, 0.18);
}

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

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

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

/* ---------- base ---------- */
body {
  min-height: 100vh;
  background:
    radial-gradient(90% 55% at 80% -10%, rgba(0, 229, 255, 0.10), transparent 62%),
    radial-gradient(75% 55% at 4% 2%, rgba(200, 16, 46, 0.18), transparent 62%),
    linear-gradient(180deg, #0B0D10 0%, #0E1116 48%, #0B0D10 100%);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.62;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

h1 { font-size: clamp(34px, 6vw, 68px); font-weight: 900; }
h2 { font-size: clamp(24px, 3.4vw, 40px); }
h3 { font-size: clamp(18px, 2.2vw, 24px); }

p { max-width: 42em; }

::selection { background: var(--red); color: #fff; }

#main-content { scroll-margin-top: calc(var(--header-h) + 18px); }
#main-content:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }

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

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  padding: 11px 18px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 0.24s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: clamp(48px, 7vw, 104px) 0; }
.section--tight { padding: clamp(28px, 4vw, 56px) 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: clamp(20px, 3vw, 36px);
}
.section-head__title {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.16;
}
.section-head__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cool);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, rgba(200, 16, 46, 0.85), rgba(168, 179, 189, 0.18) 42%, transparent);
}

/* ---------- micro type ---------- */
.kicker,
.label,
.num {
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--cyan);
}
.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--red);
}

.label {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid rgba(168, 179, 189, 0.32);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--cool);
}

.num {
  font-size: 0.95em;
  letter-spacing: 0.04em;
  color: var(--paper);
}

.chapter {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.chapter-num {
  font-family: var(--font-mono);
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(245, 241, 232, 0.34);
  text-stroke: 1px rgba(245, 241, 232, 0.34);
}

/* ---------- buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--paper);
  --btn-bd: var(--steel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--btn-bd);
  border-radius: 2px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  --btn-bd: var(--red);
  --btn-bg: var(--red);
  --btn-fg: #fff;
}
.btn-primary:hover {
  --btn-bd: #E01436;
  --btn-bg: #E01436;
}

.btn-ghost {
  --btn-bd: rgba(0, 229, 255, 0.42);
  --btn-fg: var(--cyan);
}
.btn-ghost:hover {
  --btn-bg: rgba(0, 229, 255, 0.12);
  --btn-bd: var(--cyan);
}

.btn-outline {
  --btn-bd: rgba(245, 241, 232, 0.3);
}
.btn-outline:hover {
  --btn-bd: var(--orange);
  --btn-fg: var(--orange);
}

/* ---------- tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid rgba(168, 179, 189, 0.4);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cool);
  background: rgba(11, 13, 16, 0.55);
  white-space: nowrap;
}
.tag--cyan { border-color: rgba(0, 229, 255, 0.5); color: var(--cyan); }
.tag--orange { border-color: rgba(255, 122, 0, 0.55); color: var(--orange); }
.tag--red { border-color: rgba(200, 16, 46, 0.75); color: #FF5C77; }

/* ---------- panel ---------- */
.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 26px);
  border: var(--hair);
  border-radius: 2px;
  background: linear-gradient(160deg, rgba(31, 38, 46, 0.92), rgba(16, 20, 25, 0.94));
  box-shadow: 0 18px 40px -30px #000;
}
.panel::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: linear-gradient(180deg, var(--red), var(--red-deep));
}
.panel--flat { padding: 0; }

/* ---------- stats ---------- */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--cyan);
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cool);
}
.stat--orange .stat__value { color: var(--orange); }

/* ---------- media ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border: var(--hair);
  border-radius: 2px;
  background:
    radial-gradient(80% 70% at 20% 0%, rgba(0, 229, 255, 0.12), transparent 65%),
    linear-gradient(150deg, var(--ink-2), var(--ink-0));
}
.media__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.media--wide .media__img { aspect-ratio: 21 / 9; }
.media--tall .media__img { aspect-ratio: 3 / 4; }
.media--square .media__img { aspect-ratio: 1 / 1; }

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11, 13, 16, 0) 42%, rgba(11, 13, 16, 0.74)),
    repeating-linear-gradient(118deg, rgba(245, 241, 232, 0.05) 0 1px, transparent 1px 22px);
}
.media__tag {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
}
.media__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 14px 16px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--paper);
}

/* ---------- breadcrumb ---------- */
.breadcrumb { padding: 16px 0 0; }
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cool);
}
.breadcrumb__link {
  color: var(--cool);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.breadcrumb__link:hover { color: var(--cyan); }
.breadcrumb__sep { color: var(--steel); }
.breadcrumb__current { color: var(--paper); }

/* ---------- toc ---------- */
.toc { position: sticky; top: calc(var(--header-h) + 18px); }
.toc__title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cool);
}
.toc__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid rgba(168, 179, 189, 0.2);
}
.toc__link {
  display: block;
  margin-left: -1px;
  padding: 7px 0 7px 14px;
  border-left: 2px solid transparent;
  font-size: 13px;
  color: var(--cool);
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.toc__link:hover { color: var(--paper); }
.toc__link[aria-current="true"] {
  color: var(--cyan);
  border-left-color: var(--cyan);
}

/* ---------- filters ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-chip {
  appearance: none;
  padding: 7px 13px;
  border: 1px solid rgba(168, 179, 189, 0.28);
  border-radius: 2px;
  background: transparent;
  color: var(--cool);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background 0.2s var(--ease), width 0.24s var(--ease);
}
.filter-chip:hover { color: var(--paper); border-color: var(--paper); }
.filter-chip[aria-pressed="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: #0B0D10;
  font-weight: 700;
}
.filter-empty {
  padding: 30px 22px;
  border: 1px dashed rgba(168, 179, 189, 0.3);
  text-align: center;
  font-size: 14px;
  color: var(--cool);
}
.filter-empty[hidden] { display: none; }
[data-filter-item][hidden] { display: none !important; }

/* ==========================================================================
   头部：透明叠加 → 实色阅读状态
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(11, 13, 16, 0.94), rgba(11, 13, 16, 0));
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}
.site-header[data-scrolled="true"] {
  background: rgba(21, 26, 32, 0.96);
  border-bottom-color: rgba(200, 16, 46, 0.55);
  box-shadow: 0 16px 34px -26px #000;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.header-rail {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 26px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cool);
  white-space: nowrap;
  overflow: hidden;
}
.header-rail::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(200, 16, 46, 0.85), rgba(0, 229, 255, 0.2), transparent);
}
.rail-dot {
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.22);
  animation: rail-pulse 2.8s ease-in-out infinite;
}
.rail-note { color: rgba(168, 179, 189, 0.72); }

@keyframes rail-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(200, 16, 46, 0.05); }
}

.header-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 42px);
  min-height: 58px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter) 12px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
  flex: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(150deg, var(--red), var(--red-deep));
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
  box-shadow: inset 0 0 0 1px rgba(245, 241, 232, 0.24);
  transition: background 0.24s var(--ease);
}
.brand-name {
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1;
}
.brand-sub {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.26em;
  color: var(--cool);
}
.brand:hover .brand-mark,
.brand:focus-visible .brand-mark {
  background: linear-gradient(150deg, #E01436, var(--red));
}

/* 导航 */
.site-nav { margin-left: auto; }
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 26px);
}
.nav-list a {
  position: relative;
  display: inline-block;
  padding: 9px 2px;
  color: var(--cool);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease), background 0.2s var(--ease);
}
.nav-list a:hover,
.nav-list a:focus-visible { color: var(--paper); }
.nav-list a:hover::after,
.nav-list a:focus-visible::after { transform: scaleX(1); }
.nav-list a[aria-current="page"] { color: var(--paper); }
.nav-list a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--red);
}

/* 右侧动作 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(200, 16, 46, 0.6);
  border-radius: 2px;
  background: rgba(200, 16, 46, 0.12);
  cursor: pointer;
}
.nav-toggle__bar {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--paper);
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__bar:nth-child(1) { top: 14px; }
.nav-toggle__bar:nth-child(2) { top: 22px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

/* 阅读进度条 */
.read-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--orange) 55%, var(--cyan));
  transition: width 0.12s linear;
}

/* ==========================================================================
   页脚：叠层印刷纸
   ========================================================================== */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 10vw, 140px);
  border-top: 1px solid rgba(200, 16, 46, 0.42);
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(200, 16, 46, 0.2), transparent 62%),
    radial-gradient(80% 70% at 96% 12%, rgba(0, 229, 255, 0.08), transparent 66%),
    linear-gradient(180deg, var(--ink-1), var(--ink-0));
  color: var(--paper);
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(245, 241, 232, 0.035) 0 1px, transparent 1px 26px);
}

.footer-stripe {
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--red) 0 32%,
    var(--red-deep) 32% 50%,
    var(--cyan) 50% 56%,
    var(--orange) 56% 64%,
    var(--ink-2) 64% 100%
  );
}

.footer-vertical {
  position: absolute;
  right: clamp(8px, 2vw, 28px);
  top: clamp(48px, 8vw, 120px);
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(245, 241, 232, 0.14);
  pointer-events: none;
  user-select: none;
}

.footer-inner {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(44px, 6vw, 80px) var(--gutter) 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 0.58fr));
  gap: clamp(26px, 4vw, 56px);
}

.brand--footer { margin-bottom: 18px; }
.brand--footer .brand-mark { width: 42px; height: 42px; font-size: 20px; }
.brand--footer .brand-name { font-size: 18px; }

.footer-summary {
  max-width: 34em;
  font-size: 14px;
  line-height: 1.7;
  color: var(--cool);
  margin-bottom: 22px;
}

.footer-col__title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(200, 16, 46, 0.42);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--paper);
}
.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col__list a {
  font-size: 13.5px;
  color: var(--cool);
  text-decoration: none;
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
  border-left: 2px solid transparent;
}
.footer-col__list a:hover,
.footer-col__list a:focus-visible {
  color: var(--cyan);
  padding-left: 8px;
  border-left-color: var(--cyan);
}

.footer-contact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: clamp(20px, 3vw, 32px);
  border-top: 1px dashed rgba(168, 179, 189, 0.26);
}
.footer-contact__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}
.footer-contact__value {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--paper);
  word-break: break-word;
}
.footer-note {
  grid-column: 1 / -1;
  max-width: 62em;
  padding-left: 12px;
  border-left: 2px solid rgba(255, 122, 0, 0.8);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--cool);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 26px;
  margin-top: clamp(26px, 4vw, 42px);
  padding-top: 20px;
  border-top: 1px solid rgba(168, 179, 189, 0.18);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--cool);
}
.footer-legal__copy { max-width: none; }
.footer-legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.footer-legal__links a {
  color: var(--cool);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.footer-legal__links a:hover,
.footer-legal__links a:focus-visible { color: var(--cyan); }

/* 返回顶部 */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 30px);
  z-index: 110;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border: 1px solid rgba(200, 16, 46, 0.65);
  border-radius: 2px;
  background: rgba(11, 13, 16, 0.88);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
    border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.to-top[data-visible="true"] {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.to-top:hover,
.to-top:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---------- 显现 ---------- */
html.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.62s var(--ease), transform 0.62s var(--ease);
}
html.has-js [data-reveal].is-inview {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1180px) {
  :root { --header-h: 66px; }
  .header-rail { display: none; }
  .header-bar { min-height: 62px; padding-bottom: 10px; }
}

@media (max-width: 1080px) {
  .nav-toggle { display: block; z-index: 4; }

  .site-header[data-nav-open="true"]::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    background: rgba(11, 13, 16, 0.62);
    pointer-events: none;
  }

  .site-nav {
    position: fixed;
    z-index: 2;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(84vw, 340px);
    margin-left: 0;
    padding: calc(var(--header-h) + 20px) 26px 34px;
    overflow-y: auto;
    border-right: 1px solid rgba(200, 16, 46, 0.5);
    background:
      radial-gradient(90% 50% at 0% 0%, rgba(200, 16, 46, 0.24), transparent 62%),
      linear-gradient(170deg, var(--ink-1), var(--ink-0));
    box-shadow: 30px 0 70px -34px #000;
    transform: translateX(-102%);
    transition: transform 0.34s var(--ease);
  }
  .site-nav[data-open="true"] { transform: translateX(0); }

  .site-nav::before {
    content: "MATCH DESK · 章节目录";
    display: block;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(200, 16, 46, 0.45);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--cyan);
  }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list li + li { border-top: 1px solid rgba(168, 179, 189, 0.14); }
  .nav-list a {
    display: flex;
    align-items: center;
    padding: 15px 0 15px 12px;
    border-left: 2px solid transparent;
    font-size: 16px;
    letter-spacing: 0.06em;
  }
  .nav-list a::after { display: none; }
  .nav-list a[aria-current="page"] {
    color: var(--cyan);
    border-left-color: var(--cyan);
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.1), transparent);
  }

  body.nav-open { overflow: hidden; }

  .header-actions .btn-ghost { display: none; }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-vertical { display: none; }
}

@media (max-width: 640px) {
  .header-bar { gap: 12px; }
  .brand-sub { display: none; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .footer-contact { grid-template-columns: minmax(0, 1fr); }
  .footer-legal { flex-direction: column; align-items: flex-start; }
  .to-top { padding: 10px 12px; letter-spacing: 0.1em; }
}

@media (max-width: 480px) {
  .header-actions .btn-primary { display: none; }
}

/* ---------- 减弱动效 ---------- */
@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;
  }
  html.has-js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .to-top { transition: none; }
}
