:root {
  color-scheme: dark;
  --background: #0b1013;
  --panel: #131c20;
  --field: #10181b;
  --line: #2a3d40;
  --text: #f4f8f6;
  --muted: #acbfbc;
  --accent: #d7fb80;
  --mint: #87e2c6;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--text); background: var(--background);
  font: 15px/1.55 system-ui, "Microsoft YaHei", sans-serif;
}
a { color: var(--mint); text-underline-offset: 4px; }
button, input, select { font: inherit; }
button, input, select, .hero-links a {
  background: var(--field); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 12px;
}
button, select { cursor: pointer; }
button:hover:not(:disabled), select:hover, .hero-links a:hover { border-color: var(--mint); }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 5; background: var(--panel); padding: 8px; }
.skip:focus-visible { top: 8px; }
.top { background: #101619; border-bottom: 1px solid var(--line); }
.top-inner, .brand, .top-links { display: flex; align-items: center; gap: 13px; }
.top-inner { min-height: 60px; justify-content: space-between; }
.brand { font-weight: 700; }
.brand b {
  background: var(--accent); color: #1a251b; border-radius: 6px; padding: 4px 10px;
  font-weight: 900; letter-spacing: .09em;
}
.top-links { color: var(--muted); font-size: 13px; gap: 20px; }
.top-links a, .section-title a, footer a { text-decoration: none; }
.top-links a:hover, .section-title a:hover, footer a:hover { text-decoration: underline; }

.hero {
  position: relative; isolation: isolate; overflow: hidden; margin: 20px 0 19px;
  border: 1px solid #3a6c5d; border-radius: 20px;
  background: linear-gradient(112deg, #142925 0%, #16342c 55%, #245347 100%);
}
.hero-body { padding: 23px clamp(20px, 4vw, 44px) 25px; }
.hero-kicker, .hero-meta, .hero-links { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; }
.hero-kicker { font-size: 13px; font-weight: 700; color: #c3e5d8; }
.pill { color: #e9f3ef; background: #304845; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 750; }
.pill[data-state="live"], .pill[data-state="next"] { background: var(--accent); color: #253018; }
h1 { font-size: clamp(31px, 5.1vw, 53px); margin: 8px 0 3px; line-height: 1.18; letter-spacing: -.035em; }
.hero-english { margin: 0 0 13px; color: #b8d5cd; font-size: 14px; }
.hero-meta { margin: 0 0 17px; color: #e3f0ec; }
.hero-meta span + span::before { content: "·"; color: var(--mint); margin-right: 14px; }
.hero-links a { text-decoration: none; font-size: 13px; background: #112c25; border-color: #52776e; padding: 7px 11px; }
.hero-links a:first-child { background: var(--accent); color: #202b18; border-color: var(--accent); font-weight: 750; }
.court {
  position: absolute; z-index: -1; width: 470px; height: 244px; right: 12px; top: 11px;
  transform: rotate(-18deg) skew(-14deg); border: 2px solid #a3e3c766;
  background: #79d6a51c; box-shadow: 0 16px 0 #102c2880;
}
.court::before, .court::after { content: ""; position: absolute; pointer-events: none; }
.court::before { inset: 16px 36px; border: 2px solid #a3e3c75e; }
.court::after {
  inset: 0; background: linear-gradient(90deg, transparent 35%, #a3e3c75e 35% 35.5%, transparent 35.5% 49.7%,
    #cff5dd91 49.7% 50.3%, transparent 50.3% 64.5%, #a3e3c75e 64.5% 65%, transparent 65%),
    linear-gradient(0deg, transparent 49.6%, #a3e3c75e 49.6% 50.4%, transparent 50.4%);
}
.court span {
  position: absolute; display: block; right: 81px; top: 44px; width: 62px; height: 82px;
  transform: rotate(49deg) skew(14deg);
  filter: drop-shadow(0 0 16px #d7fb8060);
}
.court span::before, .court span::after { content: ""; position: absolute; background: var(--accent); }
.court span::before {
  inset: 0 0 24px; opacity: .83;
  clip-path: polygon(0 2%, 14% 0, 39% 76%, 45% 76%, 28% 1%, 43% 1%, 49% 76%, 55% 76%, 57% 1%, 72% 1%, 61% 76%, 67% 76%, 86% 0, 100% 2%, 69% 100%, 32% 100%);
}
.court span::after { width: 24px; height: 21px; left: 20px; top: 61px; border-radius: 3px 3px 15px 15px; }
.section-title, .workspace-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-title { margin-bottom: 11px; }
h2 { font-size: 20px; margin: 0; }
.section-title a, .timezone { font-size: 13px; }
.selects { display: grid; grid-template-columns: .65fr 2.1fr 1.13fr; gap: 12px; }
label { display: grid; gap: 5px; min-width: 0; color: var(--muted); font-size: 13px; }
input, select { width: 100%; min-width: 0; }
.event-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0 18px; }
.event-card { display: grid; text-align: left; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.event-card span { display: block; color: var(--muted); font-size: 12px; }
.event-card[aria-pressed="true"] { border-color: #8fbb83; background: #22342a; }
.event-card[aria-pressed="true"] span:first-child { color: var(--accent); }

.workspace-header { align-items: end; padding-right: 3px; margin-bottom: 8px; }
.tabs { display: flex; gap: 7px; }
.tabs button { font-weight: 700; white-space: nowrap; }
.tabs button[aria-pressed="true"] { border-color: #6bbea3; color: var(--mint); background: #203b35; }
.timezone { color: var(--muted); align-self: center; white-space: nowrap; }
.panel { border: 1px solid var(--line); border-radius: 15px; padding: 16px; background: var(--panel); }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
#search-field { flex: 2 1 210px; }
.filters > label:not(#search-field, .check) { flex: 1 1 110px; }
.check { display: flex; flex-direction: row; align-items: center; gap: 6px; min-height: 42px; }
.check input { width: auto; accent-color: var(--accent); }
.export { margin-left: auto; font-size: 13px; }
.coverage { color: var(--muted); font-size: 13px; margin: 13px 0 0; }
.count { color: var(--muted); font-size: 12px; margin: 8px 0; }
.count:empty { display: none; }
.empty { border: 1px dashed #3b5353; border-radius: 9px; padding: 15px; color: var(--muted); margin: 12px 0 0; }
.session-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
.session, .person { padding: 11px 12px; background: var(--field); border: 1px solid var(--line); border-radius: 8px; }
.session span, small { color: var(--muted); }
.session time { color: var(--accent); font-weight: 700; margin-right: 8px; }
.match {
  display: grid; grid-template-columns: minmax(85px, .55fr) 1fr auto 1fr;
  align-items: center; gap: 12px; text-align: left; width: 100%; margin: 7px 0;
}
.match small, .person small { display: block; }
.match .away { text-align: right; }
.highlight, .following { color: var(--accent); }
.score { font-size: 20px; font-weight: 800; min-width: 60px; text-align: center; white-space: nowrap; }
.score em { display: block; color: var(--muted); font: normal 11px/1.5 system-ui, sans-serif; }
.group-title { font-size: 15px; margin: 15px 0 5px; }
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(235px, 100%), 1fr)); gap: 9px; margin-top: 10px; }
.person { text-align: left; display: grid; gap: 4px; }
.person strong { font-size: 17px; }
.draw { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 5px; }
.round { flex: 1 0 190px; min-width: 0; }
.round .match { display: block; }
.round .match .away, .round .score { display: block; text-align: left; }
.round .match .meta { margin-bottom: 6px; }
.round .score em { display: inline; margin-left: 6px; }
.game-scores { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.game-scores li { border: 1px solid var(--line); border-radius: 7px; padding: 5px 9px; }
.game-scores small { margin-right: 6px; }
footer { padding: 22px 0 30px; color: var(--muted); display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; font-size: 13px; }
footer strong { color: var(--text); margin-right: 8px; }
footer nav { display: flex; flex-wrap: wrap; gap: 12px; }
footer p { margin: 0; }
dialog { width: min(600px, calc(100% - 24px)); max-height: 90vh; border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--panel); color: var(--text); }
dialog::backdrop { background: #050a0bd6; }
dialog form { text-align: right; }
dialog h2 { margin-block: 8px; }
@media (max-width: 670px) {
  .shell { width: calc(100% - 24px); }
  .top-inner { min-height: 56px; }
  .brand { gap: 8px; font-size: 13px; }
  .top-links { gap: 0; font-size: 12px; }
  .top-links time { display: none; }
  .hero { margin-top: 13px; }
  .court { right: -280px; opacity: .7; }
  .hero-body { padding-block: 23px; }
  .selects { grid-template-columns: .65fr 1.35fr; }
  .selects label:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .event-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .workspace-header { flex-wrap: wrap; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; padding-inline: 5px; font-size: 13px; }
  .panel { padding: 10px; }
  #search-field { flex-basis: 100%; }
  .session-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .match { grid-template-columns: 1fr auto 1fr; padding: 8px; gap: 6px; font-size: 13px; overflow-wrap: anywhere; }
  .match .meta { grid-column: 1 / -1; }
  .match .meta small { display: inline; margin-left: 6px; }
  .score { font-size: 16px; min-width: 42px; }
}
@media (max-width: 360px) { .session-list { grid-template-columns: 1fr; } }
