/* =========================================================
   UC赛事 · 共享样式表 /assets/site.css
   赛场记分牌 + 裁判记录卡
   ========================================================= */

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

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

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

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

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

main { display: block; }

/* ---------- tokens ---------- */
:root {
  --referee-red: #E23A2E;
  --warn-yellow: #F5C518;
  --pitch-ink: #0F2E24;
  --night-ink: #081A14;
  --paper: #F7F5F0;
  --warm-paper: #E8E4DA;
  --graphite: #14181A;
  --slate: #6E7A76;
  --data-teal: #17C3B2;
  --off-orange: #F08A24;

  --stack-shadow: 0 1px 0 var(--warm-paper), 0 8px 24px rgba(15, 46, 36, 0.12);
  --flat-shadow: 0 1px 0 var(--warm-paper), 0 3px 10px rgba(15, 46, 36, 0.08);
  --hairline: rgba(20, 24, 26, 0.14);
  --rail-line: rgba(247, 245, 240, 0.14);

  --font-display: "Oswald", "Barlow Condensed", "Arial Narrow",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace,
    SFMono-Regular, Menlo, Consolas, monospace;

  --rail-w: 244px;
  --bar-h: 60px;
  --radius: 2px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --maxw: 1240px;
}

/* ---------- base typography ---------- */
body {
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--graphite);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(34px, 5.4vw, 56px); }
h2 { font-size: clamp(26px, 3.6vw, 40px); }
h3 { font-size: clamp(20px, 2.4vw, 28px); }
h4 { font-size: 20px; }

p { text-wrap: pretty; }

.prose p + p { margin-top: 1.1em; }
.prose p { max-width: 38em; }

strong { font-weight: 700; }

::selection {
  background: var(--warn-yellow);
  color: var(--night-ink);
}

/* ---------- focus ---------- */
:focus-visible {
  outline: 3px solid var(--warn-yellow);
  outline-offset: 2px;
  border-radius: 1px;
}

.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--data-teal);
}

/* ---------- utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.page-main {
  padding-bottom: 72px;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: 14px;
  top: -80px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--warn-yellow);
  color: var(--night-ink);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top 160ms var(--ease);
}

.skip-link:focus {
  top: 0;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--night-ink);
  color: var(--paper);
}

.header-bar {
  position: relative;
  z-index: 86;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--bar-h);
  padding: 10px 16px;
  border-bottom: 1px solid var(--rail-line);
}

/* brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  background: var(--referee-red);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--paper);
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(247, 245, 240, 0.58);
}

/* nav toggle */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 11px;
  color: var(--paper);
  border: 1px solid rgba(247, 245, 240, 0.28);
  border-radius: var(--radius);
  font-size: 13px;
  letter-spacing: 0.06em;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}

.nav-toggle:hover {
  border-color: var(--warn-yellow);
  background: rgba(247, 245, 240, 0.06);
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars i {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.nav-toggle__bars i:nth-child(2) { width: 72%; }
.nav-toggle__bars i:nth-child(3) { width: 44%; }

/* favourite entry */
.fav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 7px 11px;
  border: 1px solid rgba(247, 245, 240, 0.28);
  border-radius: var(--radius);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: rgba(247, 245, 240, 0.86);
  transition: border-color 160ms var(--ease), color 160ms var(--ease);
}

.fav-link:hover {
  border-color: var(--warn-yellow);
  color: var(--paper);
}

.fav-link__label { white-space: nowrap; }

.fav-link__count {
  min-width: 20px;
  padding: 1px 5px;
  text-align: center;
  background: var(--warn-yellow);
  color: var(--night-ink);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.fav-link__count.is-empty {
  background: rgba(247, 245, 240, 0.18);
  color: rgba(247, 245, 240, 0.7);
}

/* ---------- navigation drawer (mobile first) ---------- */
.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 84;
  display: flex;
  flex-direction: column;
  width: min(84vw, 330px);
  padding: 78px 0 24px;
  background: linear-gradient(180deg, var(--night-ink) 0%, var(--pitch-ink) 100%);
  border-left: 1px solid var(--rail-line);
  overflow-y: auto;
  transform: translateX(104%);
  transition: transform 280ms var(--ease);
}

.site-nav[data-open] {
  transform: translateX(0);
}

body.is-nav-open {
  overflow: hidden;
}

@media (max-width: 1023px) {
  body.is-nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(8, 26, 20, 0.6);
  }
}

.site-nav__eyebrow {
  margin: 0 20px 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(247, 245, 240, 0.42);
}

.nav-list {
  padding: 0 12px;
}

.nav-list__item + .nav-list__item {
  margin-top: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-left: 3px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15px;
  color: rgba(247, 245, 240, 0.78);
  transition: background 180ms var(--ease), color 180ms var(--ease),
    border-color 180ms var(--ease);
}

.nav-link__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--slate);
  transition: color 180ms var(--ease);
}

.nav-link:hover {
  background: rgba(247, 245, 240, 0.07);
  color: var(--paper);
}

.nav-link[aria-current="page"] {
  background: var(--paper);
  color: var(--graphite);
  border-left-color: var(--referee-red);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.nav-link[aria-current="page"] .nav-link__idx {
  color: var(--referee-red);
}

/* rail meta */
.rail-meta {
  margin-top: auto;
  padding: 18px 20px 0;
  border-top: 1px dashed rgba(247, 245, 240, 0.2);
}

.season-picker__label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247, 245, 240, 0.5);
}

.season-picker__options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.season-chip {
  padding: 6px 11px;
  border: 1px solid rgba(247, 245, 240, 0.28);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(247, 245, 240, 0.75);
  transition: background 160ms var(--ease), color 160ms var(--ease),
    border-color 160ms var(--ease);
}

.season-chip:hover {
  border-color: var(--warn-yellow);
  color: var(--warn-yellow);
}

.season-chip.is-active {
  background: var(--warn-yellow);
  border-color: var(--warn-yellow);
  color: var(--night-ink);
  font-weight: 700;
}

.rail-meta__note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(247, 245, 240, 0.42);
}

/* ---------- desktop rail ---------- */
@media (min-width: 1024px) {
  body {
    padding-left: var(--rail-w);
  }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--rail-w);
    height: 100%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--rail-line);
    background: linear-gradient(180deg, var(--night-ink) 0%, var(--pitch-ink) 100%);
  }

  .header-bar {
    display: block;
    flex: 0 0 auto;
    padding: 24px 20px 18px;
    border-bottom: 1px solid var(--rail-line);
  }

  .nav-toggle { display: none; }

  .brand {
    margin-bottom: 16px;
  }

  .fav-link {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }

  .site-nav {
    position: static;
    transform: none;
    width: auto;
    background: transparent;
    border-left: 0;
    padding: 0;
    overflow: visible;
    flex: 1 1 auto;
    min-height: 0;
  }

  .site-nav__eyebrow {
    margin: 18px 20px 8px;
  }

  .nav-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  .rail-meta {
    flex: 0 0 auto;
    padding: 16px 20px 26px;
  }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  margin-top: 72px;
  background: var(--night-ink);
  color: rgba(247, 245, 240, 0.82);
  border-top: 4px solid var(--referee-red);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 54px 20px 34px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.25fr 1fr 1fr;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr 1.45fr;
    padding: 62px 24px 40px;
  }
  .footer-brand { grid-column: auto; }
  .footer-contact { grid-column: auto; }
}

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

.brand--footer {
  margin-bottom: 16px;
}

.footer-brand__line {
  max-width: 30em;
  font-size: 13.5px;
  line-height: 1.8;
  color: rgba(247, 245, 240, 0.6);
}

.footer-col__title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(247, 245, 240, 0.16);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--warn-yellow);
}

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

.footer-col__list a {
  position: relative;
  display: inline-block;
  padding-left: 15px;
  font-size: 14px;
  color: rgba(247, 245, 240, 0.76);
  transition: color 160ms var(--ease);
}

.footer-col__list a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 1px;
  background: var(--referee-red);
  transform: translateY(-50%);
  transition: width 160ms var(--ease);
}

.footer-col__list a:hover {
  color: var(--paper);
}

.footer-col__list a:hover::before {
  width: 11px;
}

/* contact block */
.footer-contact__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
}

.footer-contact__key {
  flex: 0 0 42px;
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--slate);
}

.footer-contact__val {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  line-height: 1.65;
  color: rgba(247, 245, 240, 0.84);
  word-break: break-word;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid rgba(247, 245, 240, 0.26);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(247, 245, 240, 0.72);
  transition: border-color 160ms var(--ease), color 160ms var(--ease);
}

.copy-btn:hover {
  border-color: var(--warn-yellow);
  color: var(--warn-yellow);
}

.copy-btn.is-copied {
  border-color: var(--data-teal);
  color: var(--data-teal);
}

.footer-contact__note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(247, 245, 240, 0.18);
  font-size: 12px;
  line-height: 1.75;
  color: rgba(247, 245, 240, 0.48);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 20px 30px;
  border-top: 1px solid rgba(247, 245, 240, 0.14);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(247, 245, 240, 0.52);
}

@media (min-width: 1024px) {
  .footer-base { padding: 18px 24px 34px; }
}

/* =========================================================
   SHARED COMPONENTS
   ========================================================= */

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  transition: background 160ms var(--ease), color 160ms var(--ease),
    border-color 160ms var(--ease), transform 160ms var(--ease);
}

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

.btn--primary {
  background: var(--referee-red);
  color: #fff;
}
.btn--primary:hover { background: #c62e23; }

.btn--warn {
  background: var(--warn-yellow);
  color: var(--night-ink);
}
.btn--warn:hover { background: #e0b112; }

.btn--ink {
  background: var(--pitch-ink);
  color: var(--paper);
}
.btn--ink:hover { background: var(--night-ink); }

.btn--ghost {
  background: transparent;
  color: var(--graphite);
  border-color: rgba(20, 24, 26, 0.3);
}
.btn--ghost:hover {
  border-color: var(--referee-red);
  color: var(--referee-red);
}

/* ---------- tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid rgba(20, 24, 26, 0.22);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  letter-spacing: 0.05em;
  color: var(--graphite);
  background: transparent;
}

.tag--outline { background: transparent; }

.tag--red {
  background: var(--referee-red);
  border-color: var(--referee-red);
  color: #fff;
}

.tag--yellow {
  background: var(--warn-yellow);
  border-color: var(--warn-yellow);
  color: var(--night-ink);
}

.tag--teal {
  background: var(--data-teal);
  border-color: var(--data-teal);
  color: var(--night-ink);
}

.tag--pitch {
  background: var(--pitch-ink);
  border-color: var(--pitch-ink);
  color: var(--paper);
}

/* ---------- paper card ---------- */
.paper-card {
  position: relative;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--warm-paper);
  border-radius: var(--radius);
  box-shadow: var(--stack-shadow);
}

.paper-card--flat { box-shadow: var(--flat-shadow); }
.paper-card--red { border-left-color: var(--referee-red); }
.paper-card--yellow { border-left-color: var(--warn-yellow); }
.paper-card--pitch { border-left-color: var(--pitch-ink); }

@media (min-width: 768px) {
  .paper-card { padding: 26px; }
}

.stat-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* ---------- section head ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 18px;
  margin-bottom: 26px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--graphite);
}

.section-head__title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  font-size: clamp(24px, 3.6vw, 36px);
  color: var(--graphite);
}

.section-head__idx {
  padding: 3px 8px;
  background: var(--pitch-ink);
  color: var(--warn-yellow);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.section-head__note {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--slate);
}

/* ---------- breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 22px 0 0;
  font-size: 13px;
  color: var(--slate);
}

.breadcrumb a {
  color: var(--slate);
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}

.breadcrumb a:hover {
  color: var(--referee-red);
  border-bottom-color: var(--referee-red);
}

.breadcrumb [aria-current="page"] {
  color: var(--graphite);
  font-weight: 600;
}

.breadcrumb__sep {
  color: rgba(110, 122, 118, 0.55);
  font-family: var(--font-mono);
}

/* ---------- bento grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.bento > * { grid-column: span 12; }

@media (min-width: 768px) {
  .bento > .b-3 { grid-column: span 6; }
  .bento > .b-4 { grid-column: span 6; }
  .bento > .b-6 { grid-column: span 12; }
  .bento > .b-8 { grid-column: span 12; }
  .bento > .b-12 { grid-column: span 12; }
}

@media (min-width: 1024px) {
  .bento { gap: 20px; }
  .bento > .b-3 { grid-column: span 3; }
  .bento > .b-4 { grid-column: span 4; }
  .bento > .b-6 { grid-column: span 6; }
  .bento > .b-8 { grid-column: span 8; }
  .bento > .b-12 { grid-column: span 12; }
}

/* ---------- media frame ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--warm-paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--banner { aspect-ratio: 21 / 9; }

.media-frame__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 100%;
  padding: 8px 12px;
  background: rgba(8, 26, 20, 0.84);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--referee-red), var(--warn-yellow));
  pointer-events: none;
}

@media (min-width: 1024px) {
  .scroll-progress { left: var(--rail-w); }
}

/* ---------- reveal ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- reduced motion ---------- */
@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;
    transition-delay: 0ms !important;
  }

  html.js [data-reveal],
  html.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }

  .site-nav { transition: none; }
}
