/* ============================================================
   赛事数据台 — broadcast console theme
   ============================================================ */

:root {
  --void: #060a11;
  --panel: #0a1220;
  --panel-2: #0f1a2b;
  --panel-3: #142338;
  --line: #1b2c44;
  --line-soft: #142235;
  --text: #e9f0fa;
  --muted: #8ea2bb;
  --muted-2: #657a94;
  --blue: #2e8cff;
  --blue-deep: #1b5fae;
  --cyan: #33d1f2;
  --amber: #ffb224;
  --crimson: #ff4d6d;
  --radius: 2px;
  --font-body: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --font-num: Bahnschrift, "DIN Alternate", "Arial Narrow", "Segoe UI", sans-serif;
  --font-mono: "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
}

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

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 18% -12%, rgba(46, 140, 255, 0.09), transparent 62%),
    radial-gradient(900px 480px at 92% 4%, rgba(51, 209, 242, 0.04), transparent 58%),
    var(--void);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(46, 140, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 140, 255, 0.032) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 72%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 72%);
}

[hidden] {
  display: none !important;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

img {
  display: block;
}

::selection {
  background: rgba(46, 140, 255, 0.35);
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #22354d transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #22354d;
  border: 2px solid var(--void);
  border-radius: 6px;
}

/* ---------- loading line ---------- */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  height: 2px;
  width: 0;
  opacity: 0;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: opacity 0.2s ease;
}

body.is-loading .progress {
  opacity: 1;
  animation: loadbar 1.1s ease-in-out infinite;
}

@keyframes loadbar {
  0% { width: 8%; transform: translateX(-10%); }
  50% { width: 46%; }
  100% { width: 92%; transform: translateX(110%); }
}

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 10, 17, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  color: var(--blue);
}

.brand-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.season-picker {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.picker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.picker-label {
  font-size: 12px;
  color: var(--muted-2);
  flex: 0 0 auto;
}

select {
  max-width: 300px;
  appearance: none;
  padding: 6px 26px 6px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238ea2bb' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
}

select:hover,
select:focus {
  border-color: var(--line);
  background-color: var(--panel);
  outline: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex: 0 0 auto;
}

.top-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
}

.status-dot.is-live {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 178, 36, 0.12);
  animation: pulse 1.8s ease-in-out infinite;
}

.status-dot.is-upcoming {
  background: var(--blue);
}

.status-dot.is-ended {
  background: var(--muted-2);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.refresh-button svg {
  width: 14px;
  height: 14px;
}

.refresh-button:hover {
  border-color: #2a4568;
  background: var(--panel-2);
  color: var(--text);
}

/* ---------- shell / rail ---------- */

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.rail {
  position: sticky;
  top: 64px;
  align-self: start;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  padding: 22px 14px 18px;
  border-right: 1px solid var(--line);
  background: rgba(8, 14, 23, 0.55);
}

.rail-season {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 18px;
  border-bottom: 1px solid var(--line-soft);
  min-width: 0;
}

.rail-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: contain;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.rail-season-copy {
  min-width: 0;
}

.rail-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-sub {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-2);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
}

.rail-nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
  transition: color 0.15s, background 0.15s;
}

.rail-nav button:hover {
  background: rgba(46, 140, 255, 0.06);
  color: var(--text);
}

.rail-nav button.is-active {
  border-left-color: var(--blue);
  background: linear-gradient(90deg, rgba(46, 140, 255, 0.13), transparent 82%);
  color: var(--text);
}

.rail-nav .count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
}

.rail-nav button.is-active .count {
  color: var(--cyan);
}

.rail-foot {
  margin-top: auto;
  padding: 14px 8px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.7;
}

.rail-foot .mono {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

/* ---------- main / masthead ---------- */

.main {
  min-width: 0;
  padding: 26px 32px 64px;
}

.view {
  max-width: 1260px;
}

.boot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  color: var(--muted-2);
  font-size: 12px;
}

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.masthead-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.season-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  object-fit: contain;
}

.masthead h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.masthead .subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  margin-top: 16px;
}

.meta-item {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 0 16px;
  border-left: 1px solid var(--line-soft);
  font-size: 12px;
  white-space: nowrap;
}

.meta-item:first-child {
  padding-left: 0;
  border-left: 0;
}

.meta-item .k {
  color: var(--muted-2);
}

.meta-item .v {
  font-family: var(--font-mono);
  color: var(--text);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.status-pill.is-live {
  border-color: rgba(255, 178, 36, 0.35);
  background: rgba(255, 178, 36, 0.06);
  color: var(--amber);
}

/* ---------- stage rail ---------- */

.stage-rail {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 14px 0 0;
}

.stage-chip {
  flex: 0 0 auto;
  padding: 7px 12px 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.stage-chip:hover {
  color: var(--text);
}

.stage-chip.is-active {
  border-bottom-color: var(--blue);
  color: var(--text);
}

.stage-chip .n {
  margin-left: 7px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
}

.stage-chip.is-active .n {
  color: var(--cyan);
}

/* ---------- filter bar ---------- */

.filterbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.search {
  position: relative;
  flex: 0 1 260px;
}

.search svg {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--muted-2);
  pointer-events: none;
  transform: translateY(-50%);
}

.search input {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
}

.search input::placeholder {
  color: var(--muted-2);
}

.search input:focus {
  border-color: #2b527f;
  outline: none;
  box-shadow: 0 0 0 2px rgba(46, 140, 255, 0.12);
}

.status-filter {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.status-filter button {
  padding: 5px 10px;
  border: 0;
  border-radius: 1px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.status-filter button:hover {
  color: var(--text);
}

.status-filter button.is-active {
  background: var(--panel-3);
  color: var(--text);
}

.jump-today {
  margin-left: auto;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-size: 12px;
}

.jump-today:hover {
  text-decoration: underline;
}

/* ---------- match list ---------- */

.date-group {
  margin-bottom: 26px;
  scroll-margin-top: 92px;
}

.date-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 2px 8px;
}

.date-label {
  font-size: 13px;
  font-weight: 600;
}

.date-week {
  color: var(--muted-2);
  font-size: 12px;
}

.today-badge {
  padding: 1px 6px;
  border: 1px solid rgba(255, 178, 36, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 178, 36, 0.06);
  color: var(--amber);
  font-size: 10px;
}

.date-count {
  margin-left: auto;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
}

.match-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 18, 32, 0.6);
}

.match-row {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr) 108px minmax(0, 1fr) 156px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: inherit;
  text-align: left;
  transition: background 0.14s;
}

.match-row:last-child {
  border-bottom: 0;
}

.match-row:hover,
.match-row:focus-visible {
  background: rgba(46, 140, 255, 0.06);
  box-shadow: inset 2px 0 0 var(--blue);
  outline: none;
}

.match-row.is-live {
  background: linear-gradient(90deg, rgba(255, 178, 36, 0.07), transparent 55%);
}

.match-time {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.match-time .t {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
}

.match-time .stage {
  color: var(--muted-2);
  font-size: 11px;
}

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

.team.home {
  flex-direction: row-reverse;
  text-align: right;
}

.team .badge {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
}

.team .name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.team.is-loser .name {
  color: var(--muted);
}

.score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-num);
  font-stretch: 87.5%;
  font-variant-numeric: tabular-nums;
}

.score .num {
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

.score .num.is-loser {
  color: var(--muted-2);
}

.score .colon {
  color: var(--muted-2);
  font-size: 20px;
  transform: translateY(-1px);
}

.score .vs {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.match-result {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.match-result .state {
  color: var(--muted-2);
  font-size: 11px;
}

.match-result .state.is-live {
  color: var(--amber);
}

.match-result .mvp {
  color: var(--muted);
  font-size: 11px;
}

.match-result .mvp b {
  color: var(--text);
  font-weight: 500;
}

/* ---------- shared badge ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--panel-2);
}

.badge img {
  width: 100%;
  height: 100%;
  padding: 2px;
  object-fit: contain;
}

.badge.sm {
  width: 22px;
  height: 22px;
}

.badge.xs {
  width: 16px;
  height: 16px;
}

.badge.lg {
  width: 56px;
  height: 56px;
}

.monogram {
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 10px;
}

/* ---------- standings ---------- */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 18, 32, 0.6);
}

.view > .panel + .panel {
  margin-top: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  font-size: 14px;
  font-weight: 600;
}

.panel-note {
  color: var(--muted-2);
  font-size: 11px;
}

.table-scroll {
  overflow-x: auto;
}

.standings-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  table-layout: fixed;
}

.standings-table .col-rank {
  width: 8%;
}

.standings-table .col-points,
.standings-table .col-small {
  text-align: right;
}

.standings-table th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
}

.standings-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}

.standings-table tr:last-child td {
  border-bottom: 0;
}

.standings-table tbody tr:hover td {
  background: rgba(46, 140, 255, 0.045);
}

.rank {
  width: 48px;
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 18px;
}

.rank.is-top {
  color: var(--cyan);
}

.team-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.record {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}

.rate {
  min-width: 110px;
  max-width: 160px;
}

.rate-bar {
  display: block;
  height: 4px;
  margin-top: 6px;
  background: var(--line);
}

.rate-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.points {
  font-family: var(--font-num);
  font-size: 18px;
}

.group-title {
  padding: 14px 18px 6px;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- bracket ---------- */

.bracket-panel .panel-head {
  border-bottom: 1px solid var(--line);
}

.bracket-scroll {
  overflow-x: auto;
  padding: 0 0 10px;
}

.bracket-roots {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  overflow-x: auto;
  padding: 0 0 10px;
}

.bracket-root {
  flex: 0 0 auto;
}

.bracket-root + .bracket-root {
  border-left: 1px dashed var(--line-soft);
  padding-left: 20px;
}

.bracket-canvas {
  position: relative;
  margin: 0 auto;
}

.bracket-rounds {
  position: relative;
  height: 28px;
}

.bracket-round-label {
  position: absolute;
  top: 9px;
  color: var(--muted-2);
  font-size: 10px;
  white-space: nowrap;
}

.bracket-svg {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.bracket-svg path {
  fill: none;
  stroke: #24405f;
  stroke-width: 1.2;
}

.bracket-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 216px;
  height: 72px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.bracket-card:hover,
.bracket-card:focus-visible {
  border-color: #2f537d;
  background: var(--panel-2);
  outline: none;
}

.bracket-card .meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
}

.bracket-team {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 21px;
  font-size: 12px;
}

.bracket-team .badge {
  width: 16px;
  height: 16px;
}

.bracket-team .name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bracket-team .s {
  margin-left: auto;
  font-family: var(--font-num);
  font-size: 15px;
}

.bracket-team.is-winner {
  color: var(--text);
}

.bracket-team.is-loser {
  color: var(--muted-2);
}

.match-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px;
  padding: 16px 18px;
}

.match-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 18, 32, 0.5);
  color: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.match-card:hover,
.match-card:focus-visible {
  border-color: #2f537d;
  background: var(--panel-2);
  outline: none;
}

.match-card .top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
}

.match-card .row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 0;
  font-size: 12px;
}

.match-card .row .badge {
  width: 16px;
  height: 16px;
}

.match-card .row .name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.match-card .row .s {
  margin-left: auto;
  font-family: var(--font-num);
  font-size: 14px;
}

.match-card .row.is-winner {
  color: var(--text);
}

.match-card .row.is-loser {
  color: var(--muted-2);
}

/* ---------- teams ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}

.team-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 18, 32, 0.6);
}

.team-card:hover {
  border-color: #2a4568;
  background: var(--panel-2);
}

.team-card-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.team-card-head .badge {
  width: 36px;
  height: 36px;
}

.team-card-name {
  font-size: 14px;
  font-weight: 600;
}

.team-card-meta {
  margin-top: 2px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
}

.team-card-record {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--muted);
  font-size: 11px;
}

.team-card-record b {
  color: var(--text);
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 600;
}

.team-card-bar {
  height: 2px;
  background: var(--panel-3);
}

.team-card-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

/* ---------- empty ---------- */

.empty {
  padding: 34px;
  border: 1px dashed #243a56;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.empty h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.empty p {
  margin: 0 0 10px;
  font-size: 12px;
}

.empty code {
  display: inline-block;
  margin-top: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
}

.empty .refresh-button {
  margin-top: 14px;
}

/* ---------- drawer ---------- */

.drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 11, 0.62);
  backdrop-filter: blur(2px);
}

.drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 92vw);
  padding: 26px 24px 36px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--panel);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.45);
  animation: drawer-in 0.2s ease-out;
}

@keyframes drawer-in {
  from { opacity: 0.6; transform: translateX(24px); }
  to { opacity: 1; transform: none; }
}

.drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
}

.drawer-close:hover {
  border-color: #2f537d;
  color: var(--text);
}

.drawer-close svg {
  width: 14px;
  height: 14px;
}

.drawer-kicker {
  color: var(--muted-2);
  font-size: 11px;
}

.drawer-title {
  margin: 8px 0 2px;
  font-size: 20px;
  font-weight: 600;
}

.drawer-sub {
  color: var(--muted);
  font-size: 12px;
}

.drawer-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 26px 0;
}

.drawer-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.drawer-team .badge {
  width: 56px;
  height: 56px;
}

.drawer-team .name {
  font-size: 13px;
  font-weight: 600;
}

.drawer-score {
  color: var(--text);
  font-family: var(--font-num);
  font-stretch: 87.5%;
  font-size: 42px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.drawer-score .sep {
  color: var(--muted-2);
  font-size: 24px;
  padding: 0 5px;
}

.drawer-score .vs {
  color: var(--muted-2);
  font-size: 20px;
}

.drawer-small-score {
  margin: -14px 0 22px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
}

.drawer-info {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}

.info-row .k {
  color: var(--muted-2);
  flex: 0 0 auto;
}

.info-row .v {
  color: var(--text);
  text-align: right;
  overflow-wrap: anywhere;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 12px;
  text-decoration: none;
}

.drawer-link:hover {
  border-color: #2f537d;
  background: var(--panel-2);
}

.drawer-link .host {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 10px;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 100;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%);
  animation: toast-in 0.18s ease-out;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: relative;
    top: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    height: auto;
    padding: 8px 16px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-season,
  .rail-foot {
    display: none;
  }

  .rail-nav {
    flex-direction: row;
    gap: 0;
    margin: 0;
  }

  .rail-nav button {
    width: auto;
    padding: 8px 12px;
    border-left: 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }

  .rail-nav button.is-active {
    border-bottom-color: var(--blue);
    background: transparent;
  }

  .main {
    padding: 22px 20px 50px;
  }
}

@media (max-width: 780px) {
  .topbar {
    height: auto;
    min-height: 58px;
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .brand-text {
    font-size: 14px;
  }

  .season-picker {
    order: 3;
    width: 100%;
    gap: 12px;
  }

  .picker {
    flex: 1;
  }

  select {
    width: 100%;
    max-width: none;
  }

  .topbar-right {
    gap: 10px;
  }

  .top-status {
    display: none;
  }

  .masthead {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .masthead h1 {
    font-size: 23px;
  }

  .season-logo {
    width: 42px;
    height: 42px;
  }

  .meta-item {
    padding: 0 10px;
  }

  .filterbar {
    gap: 10px;
  }

  .search {
    flex: 1 1 100%;
  }

  .jump-today {
    margin-left: 0;
  }

  .match-row {
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      "time time result"
      "home score away";
    gap: 6px 10px;
    min-height: 0;
    padding: 12px 14px;
  }

  .match-time {
    grid-area: time;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .match-result {
    grid-area: result;
  }

  .team.home {
    grid-area: home;
  }

  .score {
    grid-area: score;
  }

  .team.away {
    grid-area: away;
  }

  .team .name {
    font-size: 13px;
  }

  .score .num {
    font-size: 28px;
  }

  .date-count {
    display: none;
  }

  .match-cards {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
