/* ===== 0. Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + 28px);
}
body {
  margin: 0;
  padding-top: var(--bar-h);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ===== 1. 变量 ===== */
:root {
  --crimson: #B01B2E;
  --indigo: #17205A;
  --night: #0E1533;
  --gold: #E0A32E;
  --orange: #F26522;
  --live: #4BE38A;
  --paper: #F4EFE6;
  --ink: #14161C;
  --slate: #8C97B8;
  --wine: #6E0F1C;

  --rail-w: 104px;
  --bar-h: 44px;

  --font-display: "Songti SC", "STSong", "SimSun", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;

  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ===== 2. 排版 ===== */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.prose { max-width: 38em; }
.prose p { margin-bottom: 1.15em; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); margin: 1.8em 0 .7em; }
.prose h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); margin: 1.6em 0 .5em; }
.prose a { color: var(--crimson); border-bottom: 2px solid var(--gold); text-decoration: none; }
.prose a:hover { background: rgba(224, 163, 46, .22); }
.meta-line {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--slate);
  margin: 0;
}
.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. 容器与网格 ===== */
.shell {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 48px);
}
.grid { display: grid; gap: clamp(18px, 2.6vw, 32px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--offset { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.grid--offset > :last-child { margin-top: clamp(0px, 3vw, 44px); }

/* ===== 4. Skip link ===== */
.skip-link {
  position: fixed;
  top: -72px;
  left: 10px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .08em;
  text-decoration: none;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--wine);
  transition: top 180ms var(--ease);
}
.skip-link:focus { top: 10px; }

/* ===== 5. 顶部比分条 ===== */
.scorebar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--bar-h);
  z-index: 110;
  background: var(--indigo);
  color: #E9E6DE;
  border-bottom: 2px solid var(--crimson);
}
.scorebar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-inline: clamp(12px, 2vw, 22px);
}
.scorebar__lead {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  white-space: nowrap;
  overflow: hidden;
}
.scorebar__round {
  font-weight: 700;
  color: var(--paper);
  background: var(--crimson);
  padding: 3px 9px;
  border: 1px solid var(--wine);
}
.scorebar__dot { width: 4px; height: 4px; background: var(--gold); display: inline-block; transform: rotate(45deg); }
.scorebar__live { display: inline-flex; align-items: center; gap: 7px; color: var(--live); font-weight: 700; }
.scorebar__time { color: var(--slate); }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(75, 227, 138, .7);
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(75, 227, 138, .65); opacity: 1; }
  50% { box-shadow: 0 0 0 6px rgba(75, 227, 138, 0); opacity: .72; }
}
.scorebar__actions { display: flex; align-items: center; gap: 10px; }
.scorebar__cta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-decoration: none;
  color: var(--ink);
  background: var(--gold);
  padding: 5px 12px;
  border: 1px solid var(--wine);
  box-shadow: 3px 3px 0 var(--wine);
  transition: background-color 170ms var(--ease), color 170ms var(--ease), box-shadow 170ms var(--ease), transform 170ms var(--ease);
}
.scorebar__cta:hover { background: var(--orange); color: var(--paper); box-shadow: 1px 1px 0 var(--wine); transform: translate(2px, 2px); }
.scorebar__progress {
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--gold), var(--orange));
  transition: width 90ms linear;
}

/* 抽屉开关 */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  background: var(--crimson);
  color: var(--paper);
  border: 1px solid var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  cursor: pointer;
  transition: background-color 170ms var(--ease), color 170ms var(--ease);
}
.nav-toggle:hover { background: var(--gold); color: var(--ink); }
.nav-toggle__bars { display: grid; gap: 3px; width: 15px; }
.nav-toggle__bars i { display: block; height: 2px; background: currentColor; }
.nav-toggle__label { line-height: 1; }

/* ===== 6. 侧边轨道导航 ===== */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--rail-w);
  height: 100vh;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 12px 20px;
  background: var(--indigo);
  color: #DDDBD3;
  border-right: 2px solid var(--crimson);
  box-shadow: 4px 0 0 rgba(110, 15, 28, .85);
  overflow-y: auto;
  scrollbar-width: thin;
}
.rail__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(224, 163, 46, .3);
}
.brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; }
.brand__mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--crimson);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  border: 2px solid var(--gold);
  box-shadow: 3px 3px 0 var(--wine);
}
.brand__name {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--paper);
}
.rail__list { display: flex; flex-direction: column; gap: 6px; }
.rail__link {
  writing-mode: vertical-rl;
  text-orientation: upright;
  display: block;
  width: fit-content;
  margin-inline: auto;
  padding: 14px 9px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .16em;
  color: #CFD3E6;
  text-decoration: none;
  background: rgba(14, 21, 51, .35);
  border: 1px solid rgba(224, 163, 46, .35);
  border-left: 3px solid transparent;
  transition: color 170ms var(--ease), background-color 170ms var(--ease), border-color 170ms var(--ease), box-shadow 170ms var(--ease);
}
.rail__link:hover {
  color: var(--paper);
  background: var(--crimson);
  border-color: var(--gold);
  border-left-color: var(--gold);
  box-shadow: inset 0 -3px 0 var(--gold);
}
.rail__link[aria-current="page"] {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--ink);
  border-left-color: var(--crimson);
  box-shadow: 3px 3px 0 var(--wine);
}
.rail__foot {
  margin: auto 0 0;
  align-self: center;
  padding-top: 14px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 10px;
  letter-spacing: .3em;
  color: rgba(140, 151, 184, .95);
  border-top: 1px solid rgba(140, 151, 184, .3);
}

/* ===== 7. 通用按钮与标签 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--crimson);
  cursor: pointer;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), box-shadow 180ms var(--ease), transform 180ms var(--ease);
}
.btn:hover { background: var(--gold); box-shadow: 2px 2px 0 var(--wine); transform: translate(2px, 2px); }
.btn--gold { background: var(--gold); box-shadow: 4px 4px 0 var(--wine); }
.btn--gold:hover { background: var(--orange); color: var(--paper); }
.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--gold);
  box-shadow: 4px 4px 0 rgba(224, 163, 46, .35);
}
.btn--ghost:hover { background: var(--gold); color: var(--ink); box-shadow: 2px 2px 0 var(--wine); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.5;
  background: var(--crimson);
  color: var(--paper);
  border: 1px solid var(--wine);
}
.tag--gold { background: var(--gold); color: var(--ink); }
.tag--live { background: var(--night); color: var(--live); border-color: rgba(75, 227, 138, .55); }
.tag--ghost { background: transparent; color: var(--indigo); border-color: var(--indigo); }

/* ===== 8. 面包屑 ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding-block: 22px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--slate);
}
.breadcrumb a {
  color: var(--indigo);
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
  transition: color 160ms var(--ease), background-color 160ms var(--ease);
}
.breadcrumb a:hover { color: var(--crimson); background: rgba(224, 163, 46, .25); }
.breadcrumb li { list-style: none; }
.breadcrumb > * + *::before { content: "/"; margin-right: 12px; color: var(--slate); }

/* ===== 9. 可复用图片容器 ===== */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--indigo);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(110, 15, 28, .9);
  transition: box-shadow 200ms var(--ease);
}
.media-frame:hover { box-shadow: 6px 6px 0 rgba(110, 15, 28, .9); }
.media-frame img,
.media-frame__img { width: 100%; height: 100%; object-fit: cover; }
.media-frame__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 90%;
  padding: 7px 13px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  border-top: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }

/* ===== 10. 页脚 ===== */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--night);
  color: #D9D7CF;
  font-size: 15px;
}
.footer__rail {
  height: 10px;
  background-image: repeating-linear-gradient(90deg, var(--crimson) 0 26px, var(--wine) 26px 28px);
  border-bottom: 2px solid var(--gold);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1.2fr 1.2fr;
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(40px, 6vw, 72px);
}
.footer__brand {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 3px solid var(--crimson);
  padding-bottom: 4px;
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}
.footer__brand:hover { color: var(--gold); border-color: var(--gold); }
.footer__note { margin: 14px 0 18px; max-width: 32ch; color: var(--slate); font-size: 14px; line-height: 1.75; }
.footer__round {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(23, 32, 90, .85);
  border: 1px solid rgba(224, 163, 46, .45);
}
.footer__round-key { color: var(--slate); letter-spacing: .1em; }
.footer__round-val { color: var(--live); font-weight: 700; }
.footer__cta { margin-top: 4px; }
.footer__title {
  margin-bottom: 14px;
  padding-bottom: 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .28em;
  color: var(--gold);
  border-bottom: 1px solid rgba(224, 163, 46, .35);
}
.footer__list { display: grid; gap: 2px; }
.footer__list a {
  display: inline-block;
  padding: 5px 0 5px 0;
  color: #D6D4CC;
  font-size: 15px;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 170ms var(--ease), border-color 170ms var(--ease), padding-left 170ms var(--ease);
}
.footer__list a:hover { color: var(--gold); border-left-color: var(--gold); padding-left: 10px; }
.footer__contact { display: grid; gap: 7px; margin-top: 18px; font-family: var(--font-mono); font-size: 12.5px; color: var(--slate); }
.footer__contact li { word-break: break-all; }
.footer__key { display: inline-block; min-width: 3.2em; color: var(--gold); }
.footer__legal { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.9; color: var(--slate); margin-bottom: 6px; }
.footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 20px 30px;
  border-top: 1px solid rgba(140, 151, 184, .28);
}
.footer__base .footer__legal { margin: 0; }
.footer__copy { font-family: var(--font-mono); font-size: 12.5px; color: var(--slate); }

/* ===== 11. 返回顶部 ===== */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 32px);
  z-index: 130;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--crimson);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease), background-color 180ms var(--ease), visibility 180ms;
}
.to-top[data-visible] { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--gold); }

/* ===== 12. 响应式 ===== */
@media (min-width: 901px) {
  body { padding-left: var(--rail-w); }
  .scorebar { left: var(--rail-w); }
  .scorebar__cta { display: inline-block; }
}
@media (min-width: 1024px) {
  body { font-size: 18px; line-height: 1.8; }
}
@media (max-width: 900px) {
  body { padding-left: 0; }
  .rail {
    top: var(--bar-h);
    width: min(86vw, 330px);
    height: calc(100vh - var(--bar-h));
    padding: 22px 20px 28px;
    gap: 18px;
    border-right: 2px solid var(--wine);
    box-shadow: 10px 0 0 rgba(110, 15, 28, .55);
    transform: translateX(-103%);
    transition: transform 200ms var(--ease);
  }
  .rail[data-open] { transform: translateX(0); }
  .rail__head { flex-direction: row; align-items: center; gap: 14px; padding-bottom: 18px; }
  .brand { flex-direction: row; gap: 12px; }
  .brand__name { writing-mode: horizontal-tb; text-orientation: mixed; font-size: 17px; letter-spacing: .14em; }
  .rail__list { gap: 8px; }
  .rail__link {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin-inline: 0;
    padding: 13px 16px;
    font-size: 16px;
    letter-spacing: .1em;
    border-left-width: 4px;
    background: rgba(14, 21, 51, .45);
  }
  .rail__link::after { content: "→"; font-family: var(--font-mono); opacity: .7; }
  .rail__link[aria-current="page"] { box-shadow: none; }
  .rail__link[aria-current="page"]::after { opacity: 1; }
  .rail__foot {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    align-self: stretch;
    font-size: 12px;
    letter-spacing: .24em;
    border-top: 1px solid rgba(140, 151, 184, .3);
  }
  .scorebar__time { display: none; }
  .grid--2, .grid--3, .grid--offset { grid-template-columns: 1fr; }
  .grid--offset > :last-child { margin-top: 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .scorebar__lead { gap: 8px; font-size: 11px; }
  .scorebar__round { padding: 2px 7px; }
  .scorebar__cta { display: none; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__base { flex-direction: column; align-items: flex-start; }
  .media-frame { box-shadow: 5px 5px 0 rgba(110, 15, 28, .9); }
}

/* ===== 13. 减弱动效 ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .live-dot { animation: none; box-shadow: 0 0 0 3px rgba(75, 227, 138, .28); }
  .scorebar__progress { transition: none; }
  .to-top { transform: none; }
}
