:root {
  color-scheme: dark;
  --bg: #101217;
  --panel: #1a1d24;
  --panel-strong: #232019;
  --ink: #f4f1e9;
  --muted: #aaa294;
  --gold: #e9bd66;
  --green: #80d99b;
  --border: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.schedule-header,
.schedule-groups,
.schedule-links {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.schedule-header {
  padding: 26px 0 16px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

a {
  color: var(--gold);
}

.breadcrumbs a,
.schedule-links a,
.event-competition a {
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

.title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.48fr);
  gap: 28px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.summary {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.control-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.control-field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.control-field select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  padding: 9px 11px;
}

.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.view-tabs button {
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  padding: 10px 18px;
  cursor: pointer;
}

.view-tabs button[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--panel-strong);
  color: var(--gold);
}

.view-tabs button:focus-visible,
.control-field select:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.freshness-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 20px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.schedule-groups {
  padding-bottom: 20px;
}

.date-group {
  margin-bottom: 22px;
}

.date-group h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 18px;
}

.date-group h2 span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.event-list {
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: var(--panel);
  overflow: hidden;
}

.event-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr) minmax(130px, auto);
  gap: 16px;
  align-items: center;
  min-height: 76px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

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

.event-competition {
  font-size: 13px;
  font-weight: 800;
}

.event-match {
  min-width: 0;
}

.event-match strong,
.event-match span {
  display: block;
}

.event-match strong {
  margin-bottom: 4px;
  font-size: 16px;
}

.event-match span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.event-row time {
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.event-status {
  color: var(--green);
}

.empty-state {
  margin: 0;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.schedule-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 18px 0 28px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 780px) {
  .title-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .event-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "competition time"
      "match match";
    gap: 8px 12px;
  }

  .event-competition {
    grid-area: competition;
  }

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

  .event-row time {
    grid-area: time;
  }
}

@media (max-width: 480px) {
  .schedule-header,
  .schedule-groups,
  .schedule-links {
    width: min(100% - 28px, 1120px);
  }

  .schedule-header {
    padding-top: 20px;
  }

  .breadcrumbs {
    margin-bottom: 16px;
  }

  .summary {
    font-size: 15px;
  }

  .controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .view-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .view-tabs button {
    padding-inline: 8px;
  }

  .event-row {
    min-height: 92px;
    padding: 13px 14px;
  }

  .event-row time {
    font-size: 13px;
  }
}
