/* =========================================================
   球速娱乐会馆 · 共享站点样式 /assets/site.css
   画布：暖白纸感 + 深空蓝条带 + 信号橙红
   ========================================================= */

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

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

body, h1, h2, h3, h4, h5, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.08; letter-spacing: -0.012em; }

:root {
  --paper: #F6F1E7;
  --paper-2: #FBF8F1;
  --ink: #111827;
  --signal: #FF4B1F;
  --signal-deep: #B92E0C;
  --deep: #0B1B2B;
  --deep-2: #132A40;
  --court: #007A4D;
  --court-tint: #E4F4EC;
  --cyan: #00D9C0;
  --yellow: #FFD84D;
  --graphite: #3A414B;
  --fog: #E5E8EC;

  --font-display: "Barlow Condensed", "Oswald", "Arial Narrow", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Roboto Mono", "SFMono-Regular", Consolas, "Courier New", monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --hair: 1px solid var(--fog);
  --frame: 2px solid var(--ink);
  --paper-shadow: 6px 6px 0 rgba(17, 24, 39, 0.08);
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 6% -8%, rgba(0, 217, 192, 0.14), transparent 42%),
    radial-gradient(circle at 98% 0%, rgba(255, 75, 31, 0.12), transparent 38%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.85);
}

/* ---------------- 排版工具 ---------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.u-mono { font-family: var(--font-mono); letter-spacing: 0.06em; }
.u-serif { font-family: var(--font-serif); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--signal-deep);
}

.lede {
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.9vw, 20px);
  line-height: 1.8;
  color: var(--graphite);
}

/* ---------------- 跳过链接 ---------------- */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 200;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: top 0.16s ease-out;
}
.skip-link:focus { top: 10px; }

/* ---------------- 页头 ---------------- */
.site-header {
  position: relative;
  z-index: 60;
  background: var(--paper-2);
  border-bottom: 2px solid var(--ink);
}

.header-bar { border-bottom: var(--hair); background: var(--paper-2); }

.header-bar__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 78px;
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.brand__mark {
  position: relative;
  padding-left: 16px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 27px);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.1;
  white-space: nowrap;
}
.brand__mark::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 1.05em;
  transform: translateY(-50%);
  background: var(--signal);
}

.brand__note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--graphite);
  padding: 3px 8px;
  border: 1px solid var(--fog);
  white-space: nowrap;
}

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

/* ---------------- 按钮与链接 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
  color: var(--ink);
  background: var(--paper-2);
  border: 2px solid var(--ink);
  text-decoration: none;
  transition: background-color 0.16s ease-out, color 0.16s ease-out,
              border-color 0.16s ease-out, box-shadow 0.16s ease-out,
              transform 0.16s ease-out;
}
.btn:hover { background: var(--ink); color: var(--paper); }

.btn--signal {
  color: #fff;
  background: var(--signal);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--yellow);
}
.btn--signal:hover {
  background: var(--signal-deep);
  color: #fff;
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--yellow);
}

.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--court-tint); color: var(--ink); }

.ghost-link {
  position: relative;
  padding: 4px 2px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--signal), var(--signal));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 2px;
  transition: background-size 0.18s ease-out, color 0.18s ease-out;
}
.ghost-link:hover,
.ghost-link:focus-visible { background-size: 100% 2px; color: var(--signal-deep); }

/* ---------------- 移动导航按钮 ---------------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  transition: background-color 0.16s ease-out, color 0.16s ease-out;
}
.nav-toggle:hover { background: var(--court-tint); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: background-color 0.16s ease-out;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.16s ease-out;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.site-header[data-open] .nav-toggle { background: var(--signal); color: #fff; }
.site-header[data-open] .nav-toggle__bars { background: transparent; }
.site-header[data-open] .nav-toggle__bars::before {
  background: #fff;
  transform: translateY(6px) rotate(45deg);
}
.site-header[data-open] .nav-toggle__bars::after {
  background: #fff;
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------------- 横向时间轴导航带 ---------------- */
.nav-band {
  position: relative;
  overflow: hidden;
  background: var(--deep);
  color: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.nav-band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    var(--yellow) 0 1px,
    transparent 1px 22px
  );
  opacity: 0.55;
}

.primary-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
}

.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.primary-nav__item { display: flex; }

.primary-nav__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px 14px 16px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--paper);
  border-right: 1px solid rgba(246, 241, 231, 0.14);
  transition: background-color 0.16s ease-out, color 0.16s ease-out,
              box-shadow 0.16s ease-out;
}
.primary-nav__item:first-child .primary-nav__link {
  border-left: 1px solid rgba(246, 241, 231, 0.14);
}
.primary-nav__link:hover {
  background: rgba(0, 217, 192, 0.16);
  color: #fff;
}

.primary-nav__idx {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--cyan);
}

.primary-nav__link[aria-current="page"] {
  background: var(--signal);
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 0 0 2px var(--yellow);
}
.primary-nav__link[aria-current="page"] .primary-nav__idx { color: var(--yellow); }

.nav-band__meta {
  display: flex;
  align-items: center;
  margin-left: auto;
  padding-left: 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: rgba(246, 241, 231, 0.62);
  white-space: nowrap;
}

/* ---------------- 章节画板 ---------------- */
.section { padding-block: clamp(40px, 6vw, 82px); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: clamp(20px, 3vw, 34px);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--graphite);
}
.section-tag::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--signal);
}
.section-tag__num { color: var(--signal-deep); }

.panel {
  position: relative;
  padding: clamp(20px, 3vw, 36px);
  background: var(--paper-2);
  border: var(--frame);
  box-shadow: var(--paper-shadow);
}
.panel--deep {
  background: var(--deep);
  color: var(--paper);
  border-color: var(--deep);
}
.panel--deep .panel__title { color: var(--paper); }
.panel--court {
  background: var(--court-tint);
  border-color: var(--court);
}

.panel__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.55em;
}

/* ---------------- 网格与堆叠 ---------------- */
.stack { display: grid; gap: clamp(16px, 2.6vw, 28px); }
.grid { display: grid; gap: clamp(16px, 2.6vw, 30px); }
.grid--split,
.grid--half { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 880px) {
  .grid--split { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
  .grid--half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------- 展签标签 ---------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: var(--graphite);
  border: 1px solid currentColor;
  white-space: nowrap;
}
.tag--signal { color: var(--signal-deep); border-color: var(--signal); }
.tag--court { color: var(--court); border-color: var(--court); }
.tag--yellow {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--ink);
  font-weight: 700;
}

/* ---------------- 图片容器基础规则 ---------------- */
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: var(--frame);
  background-color: var(--court-tint);
  background-image: repeating-linear-gradient(
    90deg,
    rgba(11, 27, 43, 0.07) 0 1px,
    transparent 1px 32px
  );
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1 / 1; }

.media__caption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--graphite);
}

/* ---------------- 面包屑 ---------------- */
.breadcrumbs {
  padding-block: 14px;
  border-bottom: var(--hair);
  background: var(--paper-2);
}
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--graphite);
}
.breadcrumbs__item { display: flex; align-items: center; gap: 8px; }
.breadcrumbs__item + .breadcrumbs__item::before {
  content: "›";
  color: var(--signal);
}
.breadcrumbs a { transition: color 0.16s ease-out; }
.breadcrumbs a:hover { color: var(--signal-deep); }
.breadcrumbs a[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ---------------- 长文 ---------------- */
.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.8;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  margin-top: 1.8em;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: clamp(19px, 2vw, 23px);
  margin-top: 1.5em;
}
.prose a {
  color: var(--signal-deep);
  text-decoration: none;
  background-image: linear-gradient(var(--signal), var(--signal));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: background-size 0.18s ease-out, color 0.18s ease-out;
}
.prose a:hover { background-size: 100% 2px; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul li { list-style: square; }
.prose ol li { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }

/* ---------------- 顶部球速进度条 ---------------- */
.scroll-meter {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 200;
  pointer-events: none;
  background: rgba(11, 27, 43, 0.08);
}
.scroll-meter__bar {
  height: 100%;
  width: 0;
  background: var(--signal);
  transition: width 0.1s linear;
}

/* ---------------- 页脚 ---------------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--deep);
  color: var(--paper);
  border-top: 6px solid var(--signal);
}

.footer-top {
  display: grid;
  gap: 32px;
  padding-block: clamp(36px, 6vw, 64px) 28px;
  border-bottom: 1px solid rgba(246, 241, 231, 0.16);
}
@media (min-width: 800px) {
  .footer-top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 48px;
  }
}

.footer-brand__mark {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: #fff;
}
.footer-brand__mark::after {
  content: "";
  display: block;
  width: 56px;
  height: 6px;
  margin-top: 12px;
  background: var(--signal);
}

.footer-note {
  margin-top: 16px;
  max-width: 34ch;
  font-size: 15px;
  color: rgba(246, 241, 231, 0.74);
}

.footer-service {
  display: inline-block;
  margin-top: 16px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--cyan);
  border: 1px solid rgba(0, 217, 192, 0.5);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 28px 32px;
}

.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-links li + li { margin-top: 9px; }
.footer-links a {
  font-size: 15px;
  color: rgba(246, 241, 231, 0.92);
  background-image: linear-gradient(var(--yellow), var(--yellow));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 2px;
  transition: background-size 0.18s ease-out, color 0.18s ease-out;
}
.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--yellow);
  background-size: 100% 2px;
}

.footer-contact { display: grid; gap: 12px; }
.footer-contact__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.footer-contact__label {
  min-width: 42px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(0, 217, 192, 0.92);
}
.footer-contact__value {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: #fff;
  word-break: break-all;
}
.footer-contact__value--text {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: rgba(246, 241, 231, 0.9);
}
.footer-contact__note {
  max-width: 40ch;
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(246, 241, 231, 0.58);
}

.copy-btn {
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--yellow);
  background: transparent;
  border: 1px solid rgba(255, 216, 77, 0.7);
  transition: background-color 0.16s ease-out, color 0.16s ease-out,
              border-color 0.16s ease-out;
}
.copy-btn:hover { background: var(--yellow); color: var(--deep); }
.copy-btn[data-copied] {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--deep);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 20px 24px;
  font-size: 12.5px;
  color: rgba(246, 241, 231, 0.66);
}
.footer-icp {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.footer-legal a {
  color: rgba(246, 241, 231, 0.82);
  border-bottom: 1px solid rgba(246, 241, 231, 0.3);
  transition: color 0.16s ease-out, border-color 0.16s ease-out;
}
.footer-legal a:hover {
  color: var(--yellow);
  border-bottom-color: var(--yellow);
}

/* ---------------- 移动端 / 平板 ---------------- */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .nav-band { display: none; }
  .site-header[data-open] .nav-band { display: block; }

  .primary-nav {
    flex-direction: column;
    gap: 0;
    padding-bottom: 10px;
  }
  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
  }
  .primary-nav__item { display: block; }
  .primary-nav__link {
    justify-content: flex-start;
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(246, 241, 231, 0.14);
    font-size: 16px;
  }
  .primary-nav__item:first-child .primary-nav__link { border-left: 0; }
  .primary-nav__link[aria-current="page"] {
    padding-inline: 12px;
    box-shadow: inset 0 0 0 2px var(--yellow);
  }
  .nav-band__meta {
    margin-left: 0;
    padding: 12px 0 4px;
    border-top: 1px solid rgba(246, 241, 231, 0.14);
    width: 100%;
  }
}

@media (max-width: 620px) {
  .header-bar__inner { min-height: 66px; gap: 12px; }
  .brand__note { display: none; }
  .ghost-link { display: none; }
  .btn { padding: 10px 14px; font-size: 15px; }
  .btn--signal { box-shadow: 2px 2px 0 var(--yellow); }
  .footer-bottom { font-size: 12px; }
}

@media (max-width: 380px) {
  .nav-toggle__text { 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;
    scroll-behavior: auto !important;
  }
  .scroll-meter__bar { transition: none; }
}
