:root {
  color-scheme: light;
  --paper: #f7f3ed;
  --white: #fffdfa;
  --ink: #271c23;
  --muted: #695f65;
  --line: #e9e0da;
  --wine: #741c42;
  --deep: #45142c;
  --sand: #f4dbaf;
  --rose: #f8eaf0;
  --green: #246341;
  font: 15px/1.55 Inter, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
a { text-decoration: none; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #ae5278; outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(1220px, calc(100% - 64px)); margin: 0 auto; }
section[id] { scroll-margin-top: 20px; }

.topbar { border-bottom: 1px solid var(--line); background: var(--white); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 75px; }
.brand { display: flex; align-items: center; gap: 11px; line-height: 1.2; white-space: nowrap; }
.brand .mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 10px 10px 10px 3px; background: var(--wine); color: var(--sand); font-size: 23px; font-weight: 850; letter-spacing: -1px; }
.brand strong { display: block; font-size: 15px; }
.brand small { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }
.topbar nav { display: flex; align-items: center; gap: clamp(17px, 4vw, 46px); color: var(--muted); font-size: 13px; font-weight: 700; }
.topbar nav a { padding: 10px 0; }
.topbar nav a:hover, .topbar nav a:focus-visible { color: var(--wine); }
.timezone { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 11px; white-space: nowrap; }
.timezone b { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }

.hero { isolation: isolate; position: relative; display: flex; align-items: center; min-height: 329px; overflow: hidden; margin-top: 25px; padding: 42px clamp(26px, 5vw, 66px); border-radius: 17px; color: white; background-color: #250b1a; background-image: linear-gradient(90deg,#270d1c 0%,#270d1cef 30%,#270d1c51 70%,#270d1c1c), url("./assets/hero.webp"); background-position: center, center 58%; background-size: cover; }
.hero-copy { z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; color: var(--sand); font-weight: 750; font-size: 11px; letter-spacing: .16em; }
.eyebrow i, .hero-venue i { width: 7px; height: 7px; display: inline-block; background: var(--sand); border-radius: 50%; }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { font-size: clamp(42px, 5.4vw, 72px); line-height: 1.08; letter-spacing: -.055em; margin: 0; font-weight: 850; }
.hero h1 span { display: block; color: var(--sand); }
.hero-date { color: #f1ddde; font-weight: 650; letter-spacing: .04em; margin: 18px 0 25px; }
.hero-date span { margin: 0 4px; color: #b995a3; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-actions a { display: inline-flex; justify-content: space-between; align-items: center; gap: 17px; border: 1px solid transparent; padding: 10px 14px; border-radius: 7px; font-weight: 750; font-size: 13px; }
.hero-actions a:hover { filter: brightness(1.12); }
.primary { background: var(--sand); color: #34182a; }
.hero-actions .secondary { border-color: #ffffff65; background: #24101b76; }
.hero-venue { position: absolute; right: 22px; bottom: 17px; display: flex; align-items: center; gap: 8px; color: #fff3e0; border-radius: 5px; padding: 5px 8px; background: #230e1985; font-size: 10px; letter-spacing: .12em; }
.hero-venue span { letter-spacing: 0; color: #f0dbe2; }


.monitor { margin: 24px 0 28px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; margin-bottom: 13px; }
.section-head h2, .china h2 { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -.025em; }
.section-head p, .china-head p { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.section-head button, .sync button, .more { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; border: 1px solid var(--line); border-radius: 7px; padding: 7px 11px; background: var(--white); color: var(--deep); font-size: 12px; font-weight: 750; }
.section-head button:hover, .sync button:hover, .more:hover { border-color: var(--wine); }
.sync { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 9px 13px; font-size: 11px; color: var(--muted); }
.feed-status { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.feed-status::before { content: ""; display: block; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #a8753a; }
.feed-status[data-connected="true"]::before { background: var(--green); }
.spotlight { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.spot { min-width: 0; text-align: left; background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px; }
.spot:hover { border-color: var(--wine); }
.spot.is-china { border-color: #d7a4b7; background: #fcf1f4; }
.spot-top, .spot-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.spot-foot { margin-top: 10px; }
.duel { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.spot .duel { text-align: center; margin-top: 10px; }
.spot .team { flex-direction: column; text-align: center; gap: 5px; }
.flag { width: 29px; height: 19px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px #20101a16; flex: 0 0 auto; background: #f2ebe5; vertical-align: middle; }
.flag.empty { display: inline-grid; place-items: center; font-size: 9px; color: var(--muted); }
.team { min-width: 0; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; overflow-wrap: anywhere; }
.team.cn { color: var(--wine); }
.score { font-size: 21px; letter-spacing: -.035em; font-weight: 850; white-space: nowrap; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 50px; font-size: 10px; font-weight: 750; color: #735a32; background: #f5ead6; white-space: nowrap; }
.status.done { color: #606067; background: #eeecee; }
.status.live { color: #9a1e3c; background: #fbe4eb; }
.status.live::before { content: ""; border-radius: 50%; background: currentColor; width: 6px; height: 6px; }
.status.pending, .status.delayed { color: #79592b; background: #f8ebcf; }

.board { display: grid; grid-template-columns: minmax(0, 2.16fr) minmax(290px,1fr); gap: 15px; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 12px; min-width: 0; overflow: hidden; }
.inset { padding: 19px 18px 0; }
.tabs { display: flex; gap: 4px; padding: 0 15px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { white-space: nowrap; border: 0; border-bottom: 2px solid transparent; border-radius: 3px 3px 0 0; background: transparent; padding: 9px 11px; color: var(--muted); font-size: 13px; font-weight: 750; }
.tabs button:hover, .tabs button[aria-pressed="true"] { color: var(--wine); }
.tabs button[aria-pressed="true"] { border-bottom-color: var(--wine); background: #fcf2f5; }
.filters { display: grid; grid-template-columns: minmax(0, 1.55fr) repeat(2, minmax(0, 1fr)); gap: 8px; margin: 13px 16px 0; }
.filters label { min-width: 0; }
.filters label span, .squad-controls label span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
input[type="search"], select { border: 1px solid var(--line); border-radius: 6px; background: var(--white); padding: 7px 8px; min-width: 0; width: 100%; color: var(--ink); font-size: 12px; }
.dates { display: flex; gap: 5px; overflow-x: auto; padding: 7px 2px; margin: 8px 16px 0; scrollbar-width: thin; }
.dates button { padding: 4px 8px; font-size: 11px; white-space: nowrap; border: 1px solid var(--line); border-radius: 5px; background: var(--white); color: var(--muted); }
.dates button:hover, .dates button[aria-pressed="true"] { background: var(--rose); color: var(--wine); border-color: #e7c8d6; }
.match-count { margin: 11px 17px 7px; font-size: 11px; color: var(--muted); }
.day-heading { margin: 12px 0 0; padding: 5px 17px; background: #f5eee8; color: #6d4b50; font-size: 12px; font-weight: 750; }
.match-row { width: 100%; display: grid; grid-template-columns: 70px minmax(0,1fr) 81px; align-items: center; gap: 8px; padding: 10px 16px; min-height: 58px; border: 0; border-bottom: 1px solid #f1e9e3; background: transparent; color: var(--ink); text-align: left; }
.match-row:hover { background: #fbf2f5; }
.match-row.is-china { background: #fdf1f4; }
.match-row.is-china:hover { background: #f9e6ee; }
.row-time { font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; }
.row-time small { display: block; color: var(--muted); font-size: 10px; font-weight: 500; }
.match-row .duel { grid-template-columns: minmax(0,1fr) minmax(40px, auto) minmax(0,1fr); }
.match-row .duel .team:first-child { justify-content: flex-end; text-align: right; }
.match-row .duel .team:first-child .flag { order: 1; }
.match-row .score { text-align: center; font-size: 17px; }
.row-end { justify-self: end; }
.empty-state { padding: 25px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.more { display: flex; margin: 13px auto; }

.side { display: grid; gap: 15px; }
.china-head { display: flex; align-items: center; gap: 12px; padding: 17px 16px; background: var(--deep); color: white; }
.china-head .flag { width: 42px; height: 28px; }
.china-head h2 { font-size: 20px; }
.china-head p { color: #efd5e0; }
.china-match { display: grid; grid-template-columns: 47px minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: var(--white); color: var(--ink); padding: 10px 13px; text-align: left; }
.china-match:hover { background: var(--rose); }
.china-match small { display: block; color: var(--muted); font-size: 10px; }
.china-match .slot-time { font-weight: 750; color: var(--deep); font-size: 14px; font-variant-numeric: tabular-nums; }
.china-match .flag { width: 22px; height: 15px; }
.china-match > span:last-child { display: grid; justify-items: end; gap: 3px; }
.squad-button { display: flex; width: calc(100% - 24px); justify-content: space-between; margin: 11px 12px; padding: 9px 11px; border: 1px solid #edd2de; border-radius: 7px; background: var(--rose); color: var(--wine); font-weight: 750; font-size: 12px; }
.squad-button:hover { border-color: var(--wine); }
.standings { margin-top: 21px; padding: 18px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 11px; white-space: nowrap; }
th.team-col, td.team-col { text-align: left; }
tr:last-child td { border-bottom: 0; }
tr.is-china { background: var(--rose); }
.table-note { font-size: 11px; color: var(--muted); margin: 13px 0 0; }
.ranking-rules { margin-top: 13px; border-top: 1px solid var(--line); padding-top: 11px; font-size: 12px; }
.ranking-rules summary { color: var(--wine); font-weight: 750; cursor: pointer; }
.ranking-rules p { color: var(--muted); margin: 7px 0; }
.knockout-rounds { padding-inline: 0; }
.knockout-views { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.knockout-views button { border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; background: var(--white); color: var(--muted); font-size: 12px; }
.knockout-views button[aria-pressed="true"] { background: var(--rose); color: var(--wine); border-color: #d7a4b7; font-weight: 750; }
.knockout-day { font-size: 13px; color: var(--deep); margin: 14px 0 6px; }
.knockout-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#knockout-note + #knockout-list > .knockout-grid { margin-top: 10px; }
.knockout-card { display: grid; gap: 6px; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fbf6f2; color: var(--ink); text-align: left; }
button.knockout-card:hover { border-color: var(--wine); }
.knockout-card.is-china { background: var(--rose); }
.knockout-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.knockout-card-meta strong { color: var(--deep); font-size: 13px; }
.knockout-card .duel { text-align: center; }
.knockout-card .team { flex-direction: column; text-align: center; gap: 4px; font-size: 12px; }
.knockout-card .score { font-size: 17px; }
.knockout-card > small { text-align: center; color: var(--muted); }
.knockout-tbd:empty { display: none; }
#knockout-rules { white-space: nowrap; }

footer { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px 24px; border-top: 1px solid var(--line); margin-top: 26px; padding: 16px 0 25px; color: var(--muted); font-size: 11px; }
footer div { display: flex; gap: 5px 13px; flex-wrap: wrap; }
footer a:hover, .source-link:hover { text-decoration: underline; }
dialog { color: var(--ink); width: min(650px, calc(100% - 24px)); max-height: min(88vh, 760px); padding: 0; border: 1px solid var(--line); border-radius: 13px; background: var(--white); box-shadow: 0 18px 60px #31102340; }
dialog::backdrop { background: #29122291; }
.dialog-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 13px 17px; background: var(--deep); color: white; }
.dialog-head h2 { font-size: 17px; margin: 0; }
.dialog-head button { border: 1px solid #fff5; color: white; background: transparent; border-radius: 5px; padding: 1px 9px; font-size: 20px; }
#dialog-body { padding: 17px; }
.dialog-match { text-align: center; }
.dialog-match .duel { margin: 18px 0; }
.dialog-match .team { flex-direction: column; }
.dialog-match .score { font-size: 31px; }
.dialog-match p { font-size: 13px; margin-bottom: 10px; color: var(--muted); }
.source-link { color: var(--wine); font-weight: 750; font-size: 12px; }
.detail-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 8px 0; }
.match-report { margin: 16px 0 9px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fbf6f2; }
.match-report h3 { margin: 0 0 8px; font-size: 14px; }
.match-report ol { margin: 0; padding: 0; list-style: none; }
.goal { display: grid; grid-template-columns: 45px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.goal-minute { color: var(--wine); font-weight: 750; font-variant-numeric: tabular-nums; }
.goal-who { min-width: 0; overflow-wrap: anywhere; }
.goal-who small { display: block; color: var(--muted); }
.goal-score { white-space: nowrap; font-variant-numeric: tabular-nums; }
.match-award { display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 3px; margin-top: 10px; font-size: 12px; }
.match-award span, .match-award small, .match-note { color: var(--muted); }
.match-award small { font-weight: 500; font-size: inherit; }
.live-detail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.live-detail-head h3 { margin: 0; }
.live-detail-head span, .live-detail summary small { color: var(--muted); font-size: 11px; font-weight: 500; }
.live-detail details { margin-top: 12px; }
.live-detail summary { color: var(--wine); cursor: pointer; font-weight: 750; }
.live-detail summary small { margin-left: 5px; }
.live-detail table { background: var(--white); border-radius: 7px; }
.live-detail tbody th { font-weight: 500; }
.live-detail .match-note { margin: 8px 0 0; }
.live-lineups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 8px; }
.live-lineups > div { padding: 8px; border-radius: 6px; background: var(--white); }
.live-lineups h4 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; margin: 0; }
.live-lineups h4 > span:last-child { color: var(--muted); font-size: 11px; }
.live-lineups ul { padding: 0; margin: 4px 0 0; list-style: none; }
.live-lineups li { font-size: 12px; padding: 3px 0; overflow-wrap: anywhere; }
.live-lineups li b { color: var(--wine); min-width: 17px; display: inline-block; font-variant-numeric: tabular-nums; }
.squad-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, .45fr); gap: 10px; margin-bottom: 12px; }
.player-name { white-space: nowrap; font-weight: 750; }
.player-name small { color: var(--muted); display: block; font-weight: 500; }
.squad-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 12px; margin: 12px 0 0; color: var(--muted); }

@media (max-width: 850px) {
  .knockout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wrap { width: calc(100% - 32px); }
  .board { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575px) {
  .knockout-rounds button { padding-inline: 7px; }
  .knockout-card { padding-inline: 6px; }
  .knockout-card-meta { font-size: 10px; flex-wrap: wrap; }
  .wrap { width: calc(100% - 24px); }
  .topbar-inner { min-height: 0; padding: 10px 0 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; }
  .timezone { justify-self: end; }
  .topbar nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-around; gap: 8px; }
  .topbar nav a { padding: 7px 0 10px; }
  .hero { margin-top: 14px; padding: 25px 17px; min-height: 294px; background-position: center, 60% center; border-radius: 11px; }
  .hero-venue { display: none; }
  .hero h1 { font-size: clamp(37px, 10vw, 53px); }
  .eyebrow { font-size: 9px; letter-spacing: .08em; }
  .hero-actions a { padding: 8px 10px; gap: 8px; }
  .monitor > .section-head { flex-wrap: wrap; }
  .sync { justify-content: flex-start; }
  .spotlight { grid-template-columns: 1fr 1fr; gap: 7px; }
  .spot:first-child { grid-column: 1 / -1; }
  .spot { padding: 7px 8px; }
  .spot-top, .spot-foot { font-size: 9px; gap: 4px; }
  .spot .team { font-size: 11px; }
  .spot .score { font-size: 17px; }
  .spot .status { font-size: 9px; padding: 1px 4px; }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); margin-inline: 10px; }
  .dates { margin-inline: 10px; }
  .match-row { grid-template-columns: 46px minmax(0,1fr) 51px; gap: 3px; padding-inline: 7px; }
  .match-row .duel { gap: 4px; grid-template-columns: minmax(0,1fr) minmax(25px,auto) minmax(0,1fr); }
  .match-row .flag { width: 19px; height: 13px; }
  .match-row .team { font-size: 11px; gap: 4px; }
  .match-row .score, .row-time { font-size: 12px; }
  .match-row .status { font-size: 9px; padding-inline: 4px; }
  .standings { padding: 11px; }
  th, td { padding-inline: 5px; }
}
