:root {
  color-scheme: dark;
  --background: #313338;
  --header: #27292e;
  --panel: #2b2d31;
  --surface: #383a40;
  --border: #484b54;
  --text: #f2f3f5;
  --muted: #b9bdc8;
  --accent: #5865f2;
  --accent-text: #d5d9ff;
  --green: #92e3ba;
  --amber: #ffd28a;
  font-family: system-ui, "Yu Gothic UI", "Meiryo", sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--background);
}

* { box-sizing: border-box; }

body { margin: 0; }
[hidden] { display: none !important; }
h1, h2, h3, p, dd, dl { margin: 0; }
button, select { font: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 2px solid #b7bfff;
  outline-offset: 3px;
}

.mock-banner {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 7px 12px;
  border-bottom: 1px solid #50588d;
  background: #373d65;
  color: #eef0ff;
  text-align: center;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.shell {
  width: min(100% - 48px, 1120px);
  margin-inline: auto;
}

.event-header {
  background: var(--header);
  border-bottom: 1px solid #484b56;
}

.event-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 26px 22px;
}

.event-mark {
  display: grid;
  flex: none;
  grid-template-columns: repeat(2, 7px);
  grid-template-rows: repeat(2, 7px);
  place-content: center;
  gap: 3px;
  width: 42px;
  height: 42px;
  border: 1px solid #7180e9;
  border-radius: 12px;
  background: #3b427a;
}

.event-mark i {
  border-radius: 2px;
  background: #d4d8ff;
}

.event-mark i:nth-child(2), .event-mark i:nth-child(3) { opacity: .62; }

h1 {
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  line-height: 1.25;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.updated {
  margin-inline-start: auto;
  color: var(--muted);
  white-space: nowrap;
  font-size: .875rem;
}

time, .score, .summary dd { font-variant-numeric: tabular-nums; }

.tabs {
  display: flex;
  gap: 8px;
}

.tabs button {
  padding: 11px 16px 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
}

.tabs button:hover { background: #363945; color: var(--text); }

.tabs button[aria-selected="true"] {
  border-bottom-color: #8993ff;
  background: #363a54;
  color: #f0f1ff;
}

main.shell { padding-block: 24px 48px; }
h2 { font-size: 1.125rem; font-weight: 750; }
h2 + .summary, h2 + .broadcast-card, h2 + .broadcast-list { margin-top: 12px; }

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.summary-item {
  position: relative;
  overflow: hidden;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}

.complete { --status-text: var(--green); --status-bg: #294139; }
.running { --status-text: var(--amber); --status-bg: #463a2c; }
.pending { --status-text: #d0d3db; --status-bg: #41444d; }

.summary-item dt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--status-text);
  font-size: .875rem;
  font-weight: 650;
}

.summary-item dt i, .badge.complete i, .badge.running i, .badge.pending i {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.summary dd { font-size: 1.75rem; font-weight: 750; line-height: 1.25; }
.summary dd span { margin-inline-start: 5px; color: var(--muted); font-size: .875rem; font-weight: 500; }

.block-grid, .team-grid, .broadcast-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.block-grid { margin-top: 22px; }
.block, .team-card, .broadcast-card, .broadcast-list {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}

.block { padding: 14px; }

.block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.block-title > span {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid #5a5e7b;
  border-radius: 8px;
  color: var(--accent-text);
  background: #3d405a;
  font-size: .9375rem;
}

.match-list, .broadcast-list, .roster {
  margin: 0;
  padding: 0;
  list-style: none;
}

.match-list { display: grid; gap: 8px; }

.match-card {
  padding: 10px 12px;
  border: 1px solid #454850;
  border-radius: 8px;
  background: var(--surface);
}

.next-match {
  border-color: #808bff;
  background: #373b52;
}

.match-meta, .match-body, .match-result {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 7px;
}

.match-meta .badge:last-child { margin-inline-start: auto; }
.match-number { font-size: .875rem; font-weight: 700; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 5px;
  background-color: var(--status-bg);
  color: var(--status-text);
  font-size: .875rem;
  font-weight: 650;
  white-space: nowrap;
}

.next-label { background: #5159a3; color: #fff; }
.broadcast-label, .player-role { background: #464060; color: #e5daff; }

.screen-icon {
  width: 11px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 2px;
}

.match-body { margin-top: 7px; justify-content: space-between; }

.matchup {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
}

.matchup small { color: var(--muted); font-size: .8125rem; font-weight: 550; }

.map-name {
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 650;
  letter-spacing: .05em;
  overflow-wrap: anywhere;
}

.match-result {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid #4d5059;
  color: var(--muted);
  font-size: .875rem;
}

.match-result strong { color: var(--text); }

.score {
  margin-inline-end: 3px;
  padding: 1px 8px;
  border-radius: 5px;
  background: #2a2c30;
  color: var(--text);
  font-weight: 750;
  white-space: nowrap;
}

.broadcast-layout { grid-template-columns: 1.15fr 1fr; }

.broadcast-card {
  padding: 20px;
  border-color: #6975d2;
  background: linear-gradient(135deg, #3d4368, #2d303d 78%);
}

.broadcast-round { color: var(--accent-text); font-weight: 700; }
.broadcast-round span { margin-inline: 3px; }

.broadcast-card .matchup {
  margin-top: 12px;
  gap: 3px 12px;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.25;
}

.broadcast-card .matchup small { font-size: .875rem; }
.broadcast-map { margin-top: 10px; letter-spacing: .04em; font-weight: 750; }
.broadcast-map span { margin-inline-end: 5px; color: var(--muted); font-size: .875rem; font-weight: 500; }

.ready-action {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #555a71;
}

.ready-action p { width: 100%; }

.primary-button, .secondary-button {
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 700;
}

.primary-button { color: white; background: var(--accent); }
.primary-button:hover { background: #444fc9; }
.secondary-button { color: var(--text); background: #414450; border-color: #656979; }
.secondary-button:hover { background: #4c5060; }

.notification:not(:empty) {
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px solid #4c806b;
  border-radius: 8px;
  background: #294139;
  color: var(--green);
  overflow-wrap: anywhere;
}

.notification span { display: block; font-size: .875rem; }
.all-notified { font-weight: 650; }

.broadcast-list { padding: 5px 12px; }
.broadcast-list-item { padding: 8px 6px; }
.broadcast-list-item + .broadcast-list-item { border-top: 1px solid var(--border); }
.broadcast-list-item .matchup { margin-top: 3px; }
.broadcast-list-item .match-meta .badge:nth-child(2) { margin-inline-start: auto; }
.broadcast-list-item .match-meta .badge:last-child { margin-inline-start: 0; }
.current-broadcast .match-number { color: var(--accent-text); }

.team-section { margin-top: 24px; }

.team-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
}

.team-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.team-picker label { font-size: .875rem; color: var(--muted); }
.select-wrap { position: relative; max-width: 100%; }

.select-wrap::after {
  content: "";
  position: absolute;
  top: 43%;
  right: 14px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}

select {
  appearance: none;
  max-width: 100%;
  min-height: 42px;
  padding: 8px 35px 8px 12px;
  border: 1px solid #646873;
  border-radius: 7px;
  background: var(--header);
  color: var(--text);
}

.team-card { padding: 14px; overflow-wrap: anywhere; }
.team-intro h3 { font-size: 1.125rem; }
.team-facts { margin-top: 7px; }
.team-facts > div { display: grid; grid-template-columns: 5em minmax(0, 1fr); gap: 6px; }

.team-facts dt, .player-facts dt, .player-name span { color: var(--muted); font-size: .875rem; }
.roster { margin-top: 12px; }

.player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 5px 9px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}

.player-name span { display: block; }

.player-facts {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.player-facts > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 6px; }
.player-facts dd { font-size: .875rem; }

@media (max-width: 760px) {
  .shell { width: calc(100% - 32px); }
  .block-grid, .team-grid, .broadcast-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .event-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 10px;
    padding-block: 16px 14px;
  }

  .event-mark { grid-row: span 2; width: 37px; height: 37px; }
  .updated { grid-column: 2; margin: 0; }
  .tabs button { flex: 1; padding-inline: 6px; font-size: .9375rem; }
  main.shell { padding-top: 18px; }
  .summary { gap: 7px; }
  .summary-item { padding: 9px; }
  .summary-item dt { gap: 5px; }
  .block { padding: 10px; }
  .match-card { padding: 8px; }
  .broadcast-card { padding: 14px; }
  .broadcast-list { padding-inline: 8px; }
}
