/* ==========================================================================
   多宝体育看台 — 共享样式 /assets/site.css
   夜间看台记分屏：深墨绿看板 · 荧光青绿状态 · 琥珀对阵 · 暖纸阅读区
   ========================================================================== */

:root {
  /* 色彩 */
  --ink-900: #061A14;
  --ink-800: #0C2A20;
  --ink-700: #123B2C;
  --paper-100: #F2EFE3;
  --paper-200: #E3DCC8;
  --mint-500: #38F2B0;
  --mint-700: #17B77D;
  --amber-500: #FFB547;
  --amber-700: #C77A16;
  --sage-400: #8FA79C;
  --red-500: #FF5D5D;

  --ink-line: rgba(56, 242, 176, .16);
  --ink-line-strong: rgba(56, 242, 176, .38);
  --paper-line: rgba(18, 59, 44, .16);
  --paper-text: #123B2C;
  --paper-muted: #4A6357;
  --paper-soft: #3E5A4E;

  /* 字体 */
  --font-display: "Oswald", "Barlow Condensed", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* 版式 */
  --wrap-max: 1160px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

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

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--paper-100);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: .01em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

img, svg, video { max-width: 100%; }
img { height: auto; }

figure { margin: 0; }

a { color: inherit; }

button { font: inherit; color: inherit; }

::selection {
  background: var(--mint-500);
  color: #04120E;
}

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

/* ---------- 容器 ---------- */
.wrap {
  width: min(var(--wrap-max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  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;
}

/* ==========================================================================
   头部：紧凑命令栏
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background:
    radial-gradient(130% 200% at 10% -60%, rgba(56, 242, 176, .16), transparent 62%),
    linear-gradient(180deg, #082018 0%, var(--ink-900) 100%);
  color: var(--paper-100);
  border-bottom: 1px solid var(--ink-line);
  transition: box-shadow .22s var(--ease), border-color .22s var(--ease);
}

.site-header[data-scrolled] {
  border-bottom-color: var(--ink-line-strong);
  box-shadow: 0 16px 34px -28px rgba(0, 0, 0, .95);
}

.header-inner {
  width: min(1200px, calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(.6rem, 1.8vw, 1.6rem);
  min-height: 64px;
  padding-block: .35rem;
}

/* 跳至主内容 */
.skip-link {
  position: fixed;
  top: -80px;
  left: 1rem;
  z-index: 200;
  padding: .55rem .9rem;
  border-radius: 3px;
  background: var(--mint-500);
  color: #04120E;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  transition: top .18s var(--ease);
}

.skip-link:focus {
  top: .75rem;
}

/* 字标 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .25rem 0;
  text-decoration: none;
  color: var(--paper-100);
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(56, 242, 176, .48);
  border-radius: 4px;
  background: linear-gradient(150deg, rgba(23, 183, 125, .26), rgba(6, 26, 20, .92));
  box-shadow: inset 0 0 0 3px rgba(6, 26, 20, .72);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(56, 242, 176, .3);
  border-radius: 2px;
}

.brand-mark::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint-500);
  box-shadow: 0 0 0 4px rgba(56, 242, 176, .16), 0 0 12px rgba(56, 242, 176, .72);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text__name {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: .09em;
}

.brand-text__sub {
  margin-top: .28rem;
  font-family: var(--font-mono);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sage-400);
}

/* 移动索引按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  padding: .42rem .68rem;
  border: 1px solid var(--ink-line-strong);
  border-radius: 3px;
  background: rgba(12, 42, 32, .8);
  color: var(--paper-100);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .12em;
  cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--mint-500);
  background: rgba(56, 242, 176, .1);
}

.nav-toggle__bars {
  display: grid;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: var(--mint-500);
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}

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

.nav-toggle__label { line-height: 1; }

/* 轮次条带导航 */
.site-nav { min-width: 0; }

.nav-strip {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 2px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border: 1px solid rgba(56, 242, 176, .12);
  border-radius: 3px;
  background: rgba(12, 42, 32, .5);
}

.nav-strip::-webkit-scrollbar { display: none; }

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .46rem .72rem;
  border-radius: 2px;
  color: #B9D3C7;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}

.nav-link::before {
  content: "";
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(143, 167, 156, .55);
  transition: background-color .18s var(--ease), box-shadow .18s var(--ease);
}

.nav-link:hover {
  color: var(--paper-100);
  background: rgba(56, 242, 176, .1);
}

.nav-link:hover::before { background: var(--mint-500); }

.nav-link[aria-current="page"] {
  color: var(--mint-500);
  background: rgba(56, 242, 176, .14);
}

.nav-link[aria-current="page"]::before {
  background: var(--mint-500);
  box-shadow: 0 0 0 3px rgba(56, 242, 176, .2);
}

/* 右侧短按钮 */
.header-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* ==========================================================================
   按钮系统
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  padding: .5rem .92rem;
  border: 1px solid transparent;
  border-radius: 3px;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn--accent {
  background: var(--mint-500);
  color: #04120E;
}

.btn--accent:hover {
  background: #6DF7CA;
}

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

.btn--ghost:hover {
  border-color: var(--mint-500);
  background: rgba(56, 242, 176, .1);
  color: var(--mint-500);
}

.btn--amber {
  background: var(--amber-500);
  color: #1A1104;
}

.btn--amber:hover {
  background: #FFC670;
}

.btn--paper {
  background: var(--paper-100);
  color: var(--ink-800);
}

.btn--paper:hover {
  background: #FFFFFF;
}

.btn--sm {
  padding: .34rem .68rem;
  font-size: .74rem;
}

/* 阅读进度线 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  overflow: hidden;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--mint-700), var(--mint-500) 58%, var(--amber-500));
}

/* ==========================================================================
   页脚：暖纸四区看板
   ========================================================================== */
.site-footer {
  margin-top: 0;
  background:
    radial-gradient(90% 130% at 100% 0%, rgba(255, 181, 71, .18), transparent 58%),
    var(--paper-100);
  color: var(--paper-text);
  border-top: 3px solid var(--ink-900);
  font-size: .9rem;
}

.footer-inner {
  width: min(var(--wrap-max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.4rem) 0 1.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.35fr 1fr;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  align-items: start;
}

/* 品牌区 */
.footer-brand__name {
  margin: 0 0 .55rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: .07em;
  color: #08261C;
}

.footer-brand__line {
  margin: 0 0 1rem;
  max-width: 30ch;
  font-size: .87rem;
  line-height: 1.72;
  color: var(--paper-soft);
}

.footer-brand__meta {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .04em;
  color: var(--paper-muted);
}

.meta-label {
  padding: .06rem .34rem;
  border: 1px solid rgba(18, 59, 44, .3);
  border-radius: 2px;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--paper-text);
}

/* 分区 */
.footer-col { min-width: 0; }

.footer-col__title {
  margin: 0 0 .85rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--paper-muted);
}

.footer-list {
  display: grid;
  gap: .42rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-list a {
  display: inline-block;
  padding-bottom: 1px;
  color: var(--paper-text);
  font-size: .87rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.footer-list a:hover {
  color: var(--amber-700);
  border-bottom-color: var(--amber-700);
}

.footer-list--plain { gap: .7rem; }

.footer-list--plain li {
  display: grid;
  gap: .12rem;
}

.footer-key {
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--paper-muted);
}

.footer-val {
  color: var(--paper-text);
  font-size: .86rem;
  line-height: 1.6;
  word-break: break-word;
}

.footer-note {
  margin: .9rem 0 0;
  font-size: .75rem;
  line-height: 1.68;
  color: var(--paper-muted);
}

/* 更新节奏 */
.footer-cadence {
  display: grid;
  gap: .6rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .82rem;
  color: var(--paper-soft);
}

.footer-cadence li {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  line-height: 1.6;
}

.cadence-time {
  flex: 0 0 auto;
  padding: .06rem .38rem;
  border-radius: 2px;
  background: rgba(18, 59, 44, .1);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #0C2A20;
}

/* 底栏 */
.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .7rem 1.5rem;
  margin-top: clamp(1.6rem, 4vw, 2.6rem);
  padding-top: 1rem;
  border-top: 1px solid var(--paper-line);
}

.footer-copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--paper-muted);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .74rem;
}

.footer-legal a {
  color: var(--paper-soft);
  text-decoration: none;
  transition: color .18s var(--ease);
}

.footer-legal a:hover {
  color: var(--amber-700);
  text-decoration: underline;
}

/* ==========================================================================
   通用内容组件
   ========================================================================== */
/* 面包屑 */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .09em;
  color: var(--sage-400);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.breadcrumb li + li::before {
  content: "/";
  color: rgba(143, 167, 156, .45);
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
  transition: color .18s var(--ease);
}

.breadcrumb a:hover { color: var(--mint-500); }

.breadcrumb [aria-current="page"] { color: var(--paper-100); }

/* 展览标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .34rem;
  padding: .16rem .5rem;
  border: 1px solid var(--ink-line-strong);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--mint-500);
  background: rgba(56, 242, 176, .07);
}

.tag::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.tag--amber {
  border-color: rgba(255, 181, 71, .45);
  background: rgba(255, 181, 71, .1);
  color: var(--amber-500);
}

.tag--paper {
  border-color: rgba(18, 59, 44, .28);
  background: rgba(18, 59, 44, .06);
  color: var(--ink-700);
}

/* 数字锚点 */
.num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  line-height: 1.05;
}

/* 信息块 */
.surface {
  background: linear-gradient(160deg, var(--ink-800), #08211A);
  border: 1px solid var(--ink-line);
  border-radius: 3px;
  box-shadow: 0 22px 46px -38px rgba(0, 0, 0, .95);
}

.surface--paper {
  background: var(--paper-100);
  border-color: var(--paper-line);
  color: var(--paper-text);
  box-shadow: 0 18px 38px -34px rgba(18, 59, 44, .55);
}

/* 图片容器（页面阶段放 <img> 即可） */
.media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 3px;
  background-color: var(--ink-800);
  background-image:
    repeating-linear-gradient(90deg, rgba(56, 242, 176, .1) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, rgba(56, 242, 176, .06) 0 1px, transparent 1px 56px),
    linear-gradient(155deg, var(--ink-700), var(--ink-900));
}

.media > img,
.media > picture,
.media > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3  { aspect-ratio: 4 / 3; }
.media--1x1  { aspect-ratio: 1 / 1; }
.media--4x5  { aspect-ratio: 4 / 5; }

.media--tint::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 26, 20, .05) 0%, rgba(6, 26, 20, .55) 62%, rgba(56, 242, 176, .26) 100%),
    linear-gradient(120deg, rgba(12, 42, 32, .35), transparent 70%);
}

.media__caption {
  position: absolute;
  left: .8rem;
  bottom: .7rem;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--paper-100);
  text-shadow: 0 1px 8px rgba(6, 26, 20, .9);
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1080px) {
  .header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .8rem;
    padding-block: .55rem .7rem;
  }

  .brand { flex: 1 1 auto; }

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

  .site-nav {
    display: none;
    flex: 1 0 100%;
    order: 3;
  }

  .site-nav[data-open] {
    display: block;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding-top: .55rem;
    border-top: 1px solid var(--ink-line);
    -webkit-overflow-scrolling: touch;
  }

  .nav-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 1px;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .nav-link {
    padding: .62rem .55rem;
    font-size: .92rem;
    border-radius: 2px;
  }

  .header-actions {
    display: none;
    flex: 1 0 100%;
    order: 4;
    padding-bottom: .25rem;
  }

  .site-header[data-nav-open] .header-actions { display: flex; }

  .header-actions .btn { flex: 1 1 0; }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .footer-grid { grid-template-columns: 1fr; }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
    gap: .6rem;
  }

  .brand-mark { width: 34px; height: 34px; }
}

@media (max-width: 420px) {
  .brand-text__sub { display: none; }
  .brand-text__name { font-size: 1rem; letter-spacing: .05em; }
  .nav-toggle__label { display: none; }
}

/* 减少动态偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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