:root {
  color-scheme: light;
  --ink: #142920;
  --muted: #516760;
  --green: #1b654b;
  --line: #dce6df;
  --paper: #fff;
  --lime: #e4f483;
  --canvas: #f2f5ef;
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .58; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #278264; outline-offset: 3px; }
a { color: inherit; }
.shell { width: min(1200px, calc(100% - 72px)); margin-inline: auto; }
.header { background: #102421; color: white; }
.header-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.brand { display: inline-flex; gap: 13px; align-items: center; text-decoration: none; font-weight: 800; letter-spacing: .04em; }
.brand small { display: block; color: #b7d0c3; font-size: .63rem; letter-spacing: .2em; margin-top: 2px; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; background: var(--lime); position: relative; overflow: hidden; flex: none; transform: rotate(-33deg); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; border: 2px solid #244a37; border-radius: 50%; width: 22px; height: 40px; top: -3px; }
.brand-mark::before { left: -15px; }
.brand-mark::after { right: -15px; }
.official-link { text-decoration: none; padding: 8px 13px; border: 1px solid #476159; border-radius: 8px; font-size: .82rem; white-space: nowrap; }
.official-link:hover { background: #264437; }
.hero { margin-top: 25px; position: relative; display: flex; align-items: center; overflow: hidden; min-height: 245px; border-radius: 18px; background: #134335; color: #fff; isolation: isolate; }
.hero-content { position: relative; width: min(840px, 80%); padding: 39px 43px; }
.hero h1 { font-size: clamp(1.8rem, 4.15vw, 3.35rem); margin: 13px 0 13px; line-height: 1.22; letter-spacing: -.04em; text-wrap: balance; }
.tour-name { white-space: nowrap; }
.hero p { color: #d4e8de; font-size: .96rem; margin: 0; line-height: 1.6; }
.hero-tag { display: flex; flex-wrap: wrap; gap: 8px; font-weight: 750; font-size: .75rem; letter-spacing: .06em; }
.hero-tag span { background: var(--lime); color: #183529; padding: 5px 9px; border-radius: 5px; }
.hero-tag #event-status { background: #214b3d; border: 1px solid #739688; color: white; padding: 4px 9px; }
.hero-art { position: absolute; inset: 0; z-index: -1; background: linear-gradient(101deg,#123e32 27%,#184e3d 67%,#267053); overflow: hidden; pointer-events: none; }
.court { position: absolute; height: 215px; width: 475px; bottom: -6px; right: -52px; transform: rotate(-28deg) skewX(-12deg); border: 2px solid #acdbb188; opacity: .42; box-shadow: 0 0 0 16px #63947755; }
.court::before, .court::after, .court i, .court b { content: ""; position: absolute; inset: 14% 0; border-block: 2px solid #b5e4ba; }
.court::after { inset: 0 50% 0 auto; width: 0; border: 0; border-left: 3px solid #b5e4ba; }
.court i { inset: 14% 23%; border: 0; border-inline: 2px solid #b5e4ba; }
.court b { inset: 50% 23% auto; border: 0; border-top: 2px solid #b5e4ba; }
.ball { position: absolute; width: 72px; height: 72px; right: 9%; bottom: 27%; background: radial-gradient(circle at 32% 29%,#f3fa9f,#c6db5e 65%,#94ab39); box-shadow: 14px 20px 26px #102e2870; border-radius: 50%; overflow: hidden; transform: rotate(-30deg); }
.ball::after { content: ""; position: absolute; width: 65px; height: 79px; border: 2px solid #f5fbd2; border-radius: 50%; right: -28px; top: -4px; }
.tabs { display: flex; gap: 27px; border-bottom: 1px solid #cfdcd1; margin-top: 10px; }
.tabs button { border: 0; background: transparent; border-bottom: 3px solid transparent; padding: 15px 4px 13px; color: var(--muted); font-weight: 700; }
.tabs button[aria-pressed="true"] { color: var(--green); border-color: var(--green); }
.view { padding: 24px 0 38px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.03em; }
.section-head p { color: var(--muted); font-size: .8rem; margin: 5px 0 0; }
.filters { display: flex; align-items: end; gap: 12px; padding: 12px; background: #e7efe7; border: 1px solid var(--line); border-radius: 12px; }
label { display: grid; gap: 5px; font-size: .76rem; font-weight: 650; color: var(--muted); min-width: 0; }
input, select, .button { min-height: 38px; color: var(--ink); border-radius: 7px; padding: 7px 10px; border: 1px solid #c9d8cc; background: var(--paper); font-size: .87rem; max-width: 100%; }
.button { white-space: nowrap; font-weight: 700; }
.button:hover:enabled { background: #edf5eb; border-color: #8eb39e; }
select { min-width: 105px; }
.station-field { flex: 1; overflow: hidden; }
.score-tools { display: flex; gap: 13px; align-items: center; margin: 15px 0 10px; }
.dates { display: flex; gap: 6px; overflow-x: auto; flex: 1; padding: 4px; margin: -4px; }
.date { flex: none; min-width: 55px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 7px; padding: 5px 9px; text-align: center; font-variant-numeric: tabular-nums; }
.date[aria-pressed="true"] { background: #1d654d; color: #fff; border-color: #1d654d; }
.date small { display: block; font-size: .66rem; margin-top: 2px; }
.date-pending:not([aria-pressed="true"]) { color: var(--muted); background: #f9fbf8; }
.search { flex: 0 1 200px; }
.score-summary { color: var(--muted); font-size: .77rem; margin: 7px 0 10px; min-height: 16px; }
.match-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.match-card { border: 1px solid var(--line); background: var(--paper); border-radius: 11px; padding: 13px 14px 12px; min-width: 0; }
.match-card.is-live { border-color: #75a88d; box-shadow: inset 0 2px #29916c; }
.card-head { display: flex; justify-content: space-between; align-items: start; gap: 6px; font-size: .74rem; color: var(--muted); margin-bottom: 9px; }
.card-head strong { color: var(--ink); overflow-wrap: anywhere; }
.badge { font-size: .66rem; padding: 3px 6px; white-space: nowrap; border-radius: 4px; background: #ebf0ed; color: #3e5a50; font-weight: 750; }
.badge.live { background: #dff3e7; color: #145a3f; }
.badge.pause { background: #fff0cf; color: #765018; }
.badge.next { background: #e9efd7; color: #405324; }
.team { display: flex; align-items: center; gap: 5px; min-height: 32px; font-size: .89rem; }
.team + .team { border-top: 1px solid #edf0ec; }
.team-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.team.winner .team-name { color: #145b3f; font-weight: 800; }
.seed, .serving, .pending { font-size: .73rem; color: var(--muted); }
.serving { color: #26784a; }
.set, .point, .total { min-width: 20px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 750; }
.set { color: #526960; }
.set sup { font-size: .55rem; }
.total { color: #fff; background: #2b6451; border-radius: 4px; padding: 2px 3px; }
.point { color: #185b41; min-width: 26px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-top: 10px; font-size: .72rem; color: var(--muted); }
.match-link { white-space: nowrap; color: var(--green); background: transparent; border: 0; padding: 4px 0; }
.match-link:hover { text-decoration: underline; }
.empty { grid-column: 1 / -1; margin: 0; border: 1px dashed #bdcec1; border-radius: 11px; padding: 26px 16px; color: var(--muted); text-align: center; line-height: 1.6; }
.calendar-list { display: grid; gap: 8px; }
.calendar-row { display: grid; grid-template-columns: 135px minmax(0,1fr) auto auto; align-items: center; gap: 13px; padding: 11px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; }
.calendar-row small { display: block; margin-top: 4px; color: var(--muted); }
.calendar-row time { color: var(--green); font-variant-numeric: tabular-nums; font-size: .82rem; }
.table-wrap { overflow: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; background: var(--paper); text-align: left; font-size: .9rem; }
th, td { padding: 10px 13px; border-bottom: 1px solid var(--line); }
th { background: #e7efe7; white-space: nowrap; font-size: .78rem; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.player { display: flex; align-items: center; gap: 8px; min-width: 82px; }
.player img { width: 30px; height: 30px; flex: none; object-fit: cover; border-radius: 50%; background: #e7efe7; }
.pagination { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 13px; font-size: .82rem; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; padding: 15px 0 23px; font-size: .75rem; color: var(--muted); border-top: 1px solid var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#match-dialog { width: min(780px, calc(100% - 28px)); max-height: 90dvh; padding: 19px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--canvas); }
#match-dialog::backdrop { background: #0d201bcc; }
.detail-header, .detail-toolbar, .detail-section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.detail-header form { margin: 0; }
.detail-header h2 { margin: 4px 0 0; font-size: clamp(1.2rem, 4vw, 1.65rem); }
.detail-header p, .detail-toolbar p { margin: 0; color: var(--muted); font-size: .8rem; }
.detail-toolbar { margin: 12px 0; flex-wrap: wrap; }
.detail-toolbar a { color: var(--green); font-size: .8rem; margin-left: 6px; }
.detail-lineups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px 12px; }
.detail-lineups .player { margin-block: 4px; font-size: .85rem; min-width: 0; }
.detail-lineups small { display: block; color: var(--muted); }
#match-dialog h3 { margin-block: 12px 7px; font-size: 1rem; }
#match-dialog .table-wrap { margin-top: 6px; max-height: min(46dvh, 420px); }
#match-dialog th { position: sticky; top: 0; }
#match-dialog td { font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .match-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shell { width: calc(100% - 40px); }
  .hero-content { width: 85%; }
}
@media (max-width: 620px) {
  .shell { width: calc(100% - 26px); }
  .header-inner { min-height: 59px; }
  .brand { font-size: .9rem; }
  .brand-mark { width: 29px; height: 29px; }
  .hero { min-height: 193px; margin-top: 13px; }
  .hero-content { width: 100%; padding: 22px 17px; }
  .hero h1 { font-size: clamp(1.58rem,7vw,2.3rem); }
  .hero p { font-size: .8rem; }
  .court { right: -255px; opacity: .26; }
  .ball { right: 4%; bottom: 12%; width: 47px; height: 47px; opacity: .36; }
  .tabs { gap: 17px; }
  .tabs button { font-size: .87rem; }
  .view { padding-top: 18px; }
  .filters { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
  .station-field { display: grid; }
  #scores .station-field { grid-row: 2; grid-column: 1 / -1; }
  select { min-width: 0; }
  .score-tools { flex-wrap: wrap; }
  .dates { flex-basis: 100%; }
  .search { flex: 1; }
  .match-grid { grid-template-columns: 1fr; }
  .calendar-row { grid-template-columns: minmax(0,1fr) auto; gap: 6px 10px; }
  .calendar-row > div { grid-column: 1 / -1; grid-row: 2; }
  .calendar-row .button { grid-column: 2; }
  th, td { padding: 8px 7px; }
}
