:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --page: oklch(0.965 0 0);
  --surface: oklch(1 0 0);
  --ink: oklch(0.16 0 0);
  --muted: oklch(0.42 0 0);
  --line: oklch(0.87 0 0);
  --line-strong: oklch(0.62 0 0);
  --action: oklch(0.18 0 0);
  --action-ink: oklch(0.98 0 0);
  --hero: oklch(0.19 0 0);
  --hero-ink: oklch(0.98 0 0);
  --hero-muted: oklch(0.78 0 0);
  --wheel-center: oklch(0.985 0 0);
  --danger: oklch(0.43 0.15 25);
  --focus: oklch(0.42 0 0);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  background: var(--page);
  color: var(--ink);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: oklch(0.15 0 0);
  --surface: oklch(0.2 0 0);
  --ink: oklch(0.96 0 0);
  --muted: oklch(0.77 0 0);
  --line: oklch(0.33 0 0);
  --line-strong: oklch(0.56 0 0);
  --action: oklch(0.94 0 0);
  --action-ink: oklch(0.15 0 0);
  --hero: oklch(0.23 0 0);
  --hero-ink: oklch(0.98 0 0);
  --hero-muted: oklch(0.8 0 0);
  --wheel-center: oklch(0.2 0 0);
  --danger: oklch(0.78 0.12 25);
  --focus: oklch(0.85 0 0);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: oklch(0.15 0 0);
    --surface: oklch(0.2 0 0);
    --ink: oklch(0.96 0 0);
    --muted: oklch(0.77 0 0);
    --line: oklch(0.33 0 0);
    --line-strong: oklch(0.56 0 0);
    --action: oklch(0.94 0 0);
    --action-ink: oklch(0.15 0 0);
    --hero: oklch(0.23 0 0);
    --hero-ink: oklch(0.98 0 0);
    --hero-muted: oklch(0.8 0 0);
    --wheel-center: oklch(0.2 0 0);
    --danger: oklch(0.78 0.12 25);
    --focus: oklch(0.85 0 0);
  }
}

html,
body,
.topbar,
.primary-nav,
.text-button,
.select-control,
.input-control,
.textarea-control,
.match-hero,
.team-match-summary,
.empty-state,
.goal-row,
.player-item,
.history-item {
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.app-intro {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  background: var(--page);
  color: var(--ink);
  pointer-events: none;
}

.app-intro.is-leaving {
  animation: intro-leave 180ms var(--ease-out) forwards;
}

.app-intro[hidden] {
  display: none;
}

.intro-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.intro-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  background: var(--action);
  color: var(--action-ink);
  font-size: 24px;
  font-weight: 750;
  animation: intro-mark-arrive 280ms var(--ease-out) both;
}

.intro-wordmark {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.03em;
  animation: intro-copy-arrive 220ms var(--ease-out) 45ms both;
}

.intro-caption {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  animation: intro-copy-arrive 220ms var(--ease-out) 75ms both;
}

@keyframes intro-mark-arrive {
  from {
    opacity: 0.65;
    transform: scale(0.9) rotate(-5deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes intro-copy-arrive {
  from {
    opacity: 0.7;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes intro-leave {
  to {
    opacity: 0;
    transform: translateY(-4px);
    visibility: hidden;
  }
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

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

.topbar {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.goal-row-entering {
  animation: goal-enter 220ms var(--ease-out) both;
}

@keyframes goal-enter {
  from {
    opacity: 0.7;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wordmark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  background: var(--action);
  color: var(--action-ink);
  font-size: 16px;
  font-weight: 750;
}

.save-status {
  margin: 0 auto 0 6px;
  color: var(--muted);
  font-size: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.text-button,
.nav-tab,
.secondary-button,
.remove-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

.text-button {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 620;
  text-underline-offset: 4px;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 120ms var(--ease-out);
}

.text-button:hover,
.secondary-button:hover,
.remove-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.primary-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.nav-tab {
  position: relative;
  min-height: 52px;
  padding: 0 14px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
  transition:
    border-color 180ms var(--ease-out),
    color 180ms var(--ease-out),
    transform 120ms var(--ease-out);
}

.nav-tab[aria-pressed="true"] {
  border-bottom-color: var(--ink);
  color: var(--ink);
}

.primary-button,
.secondary-button,
.remove-button,
.match-new-button {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 120ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

button:active:not(:disabled):not(:focus-visible) {
  transform: scale(0.98);
}

.screen-entry {
  animation: screen-enter 220ms var(--ease-out) var(--entry-delay, 0ms) both;
}

@keyframes screen-enter {
  from {
    opacity: 0.72;
    transform: translateY(6px);
    filter: blur(1px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.main-content {
  padding-block: 32px 72px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.notice,
.feedback {
  margin: 0 0 18px;
  font-size: 14px;
}

.notice {
  padding: 12px 0;
  border-block: 1px solid var(--danger);
  color: var(--danger);
}

.feedback {
  min-height: 0;
  color: var(--muted);
}

.feedback:empty {
  display: none;
}

.feedback.has-feedback {
  animation: feedback-enter 180ms var(--ease-out) both;
}

@keyframes feedback-enter {
  from {
    opacity: 0.68;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.screen-heading h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
}

.screen-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
}

.select-control,
.input-control,
.textarea-control {
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 140ms ease, background-color 140ms ease;
}

.select-control:hover,
.input-control:hover,
.textarea-control:hover {
  border-color: var(--ink);
}

.textarea-control {
  min-height: 96px;
  resize: vertical;
}

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

.field label,
.field-label {
  font-size: 12px;
  font-weight: 680;
}

.field-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.primary-button,
.secondary-button,
.remove-button {
  min-height: 50px;
  padding: 10px 16px;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 680;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    filter 160ms ease,
    transform 120ms var(--ease-out);
}

.primary-button {
  border: 1px solid var(--action);
  background: var(--action);
  color: var(--action-ink);
}

.primary-button:hover {
  filter: brightness(1.18);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: transparent;
}

.secondary-button:hover {
  background: var(--surface);
}

.remove-button {
  min-height: 40px;
  padding-inline: 8px;
  color: var(--danger);
  font-size: 13px;
}

.match-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 30px;
  padding: 26px 28px;
  background: var(--hero);
  color: var(--hero-ink);
}

.match-hero-copy h2 {
  margin: 3px 0 5px;
  font-size: 31px;
  font-weight: 690;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-wrap: balance;
}

.match-kicker {
  margin: 0;
  color: var(--hero-muted);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.13em;
}

.match-hero-date {
  margin: 0;
  color: var(--hero-muted);
  font-size: 13px;
}

.match-hero-stats {
  display: flex;
  align-items: center;
  gap: 26px;
}

.match-stat {
  display: grid;
  min-width: 62px;
  gap: 2px;
}

.match-stat strong {
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  font-weight: 680;
  letter-spacing: -0.045em;
  line-height: 1;
  animation: score-arrive 200ms var(--ease-out) both;
}

@keyframes score-arrive {
  from {
    opacity: 0.72;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.match-stat span {
  color: var(--hero-muted);
  font-size: 11px;
}

.match-new-button {
  min-height: 46px;
  padding: 9px 13px;
  border: 1px solid oklch(0.7 0 0);
  border-radius: 2px;
  background: transparent;
  color: var(--hero-ink);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 120ms var(--ease-out);
}

.match-new-button:hover {
  background: var(--hero-ink);
  color: var(--hero);
}

.match-scoreboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid oklch(0.42 0 0);
}

.team-match-summary {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 22px 24px;
  background: var(--hero);
  color: var(--hero-ink);
}

.team-match-copy h3 {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-wrap: balance;
}

.team-match-summary .match-scoreboard {
  padding-top: 0;
  border-top: 0;
}

.team-score-prompt {
  max-width: 34ch;
  margin: 0;
  color: var(--hero-muted);
  font-size: 13px;
}

.score-team {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.team-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  background: var(--team-color);
  vertical-align: middle;
}

.team-swatch[data-team="red"] {
  --team-color: oklch(0.55 0.18 25);
}

.team-swatch[data-team="blue"] {
  --team-color: oklch(0.5 0.16 255);
}

.team-swatch[data-team="yellow"] {
  --team-color: oklch(0.9 0.18 95);
}

.team-swatch[data-team="white"] {
  --team-color: oklch(0.98 0 0);
  border-color: oklch(0.55 0 0);
}

.team-swatch[data-team="black"] {
  --team-color: oklch(0.22 0 0);
}

.score-team-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 640;
}

.team-score {
  font-size: 42px;
  font-variant-numeric: tabular-nums;
  font-weight: 680;
  letter-spacing: -0.045em;
  line-height: 1;
  animation: score-arrive 200ms var(--ease-out) both;
}

.score-separator {
  color: var(--hero-muted);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.12em;
}

.match-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 22px;
  margin-top: 21px;
  margin-bottom: 30px;
}

.team-draw {
  margin-block: 0 30px;
  padding-block: 23px 25px;
  border-block: 1px solid var(--line);
}

.team-draw-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.team-draw-header .section-title {
  margin-bottom: 5px;
}

.team-draw-header > div > p,
.team-draw-prompt,
.team-draw-status,
.team-empty,
.unassigned-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.team-draw-status {
  max-width: 36ch;
  text-align: right;
}

.team-draw-content {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}

.team-wheel-column {
  position: relative;
  display: grid;
  justify-items: center;
  padding-top: 5px;
}

.team-wheel {
  display: block;
  width: min(100%, 240px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: rotate(0deg);
  transition: transform 1500ms cubic-bezier(0.12, 0.72, 0.16, 1);
}

.wheel-pointer {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 50%;
  width: 18px;
  height: 17px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: translateX(-50%);
}

.team-draw-result {
  display: grid;
  gap: 18px;
  min-width: 0;
}

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

.team-roster {
  min-width: 0;
}

.team-roster-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 660;
}

.team-roster-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.team-members {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-members li {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.team-empty {
  font-size: 12px;
}

.unassigned-note {
  padding-top: 2px;
}

.team-draw-prompt {
  max-width: 44ch;
}

.draw-teams-button {
  justify-self: start;
}

.match-picker {
  width: min(100%, 310px);
}

.match-date {
  min-width: 150px;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 14px;
}

.new-match-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-left: auto;
}

.new-match-form[hidden] {
  display: none;
}

.new-match-date {
  width: 170px;
}

.form-section {
  padding-block: 25px;
  border-block: 1px solid var(--line);
}

.section-title {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 690;
  letter-spacing: -0.015em;
}

.goal-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.goal-form .primary-button {
  min-width: 148px;
}

.section-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.section-row p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.goal-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.goal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
}

.goal-names {
  min-width: 0;
  overflow-wrap: anywhere;
}

.goal-scorer {
  font-weight: 640;
}

.goal-assist {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.goal-time {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.empty-state {
  padding-block: 28px;
  border-block: 1px solid var(--line);
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 680;
}

.empty-state p {
  max-width: 56ch;
  margin: 0 0 18px;
  color: var(--muted);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.stats-table th,
.stats-table td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
}

.stats-table thead th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.02em;
}

.stats-table tbody td {
  font-size: 15px;
}

.stats-table th:first-child,
.stats-table td:first-child {
  width: 46px;
  padding-left: 0;
  color: var(--muted);
}

.stats-table th:last-child,
.stats-table td:last-child {
  padding-right: 0;
}

.numeric {
  width: 100px;
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

.player-name-cell {
  font-weight: 640;
}

.table-section {
  margin-top: 40px;
}

.table-section .section-title {
  margin-bottom: 10px;
}

.history-list,
.player-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-item,
.player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
}

.history-open {
  display: flex;
  flex: 1;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.history-open:hover .history-date {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.history-date,
.player-display-name {
  font-weight: 650;
}

.history-meta,
.player-stats {
  color: var(--muted);
  font-size: 13px;
}

.roster-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding-block: 22px;
  border-block: 1px solid var(--line);
}

.roster-form .field {
  max-width: 680px;
}

.player-item {
  padding-block: 8px;
}

.player-edit-form {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
}

.player-edit-form .input-control {
  max-width: 380px;
}

.player-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.data-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.file-input-label {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 680;
}

.file-input-label:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 32px, 1120px);
  }

  .topbar {
    min-height: 64px;
    flex-wrap: wrap;
    gap: 0 14px;
    padding-block: 8px;
  }

  .save-status {
    order: 3;
    width: 100%;
    margin: -1px 0 0 43px;
    font-size: 12px;
  }

  .header-actions {
    gap: 12px;
    margin-left: auto;
  }

  .text-button {
    min-height: 40px;
    padding-inline: 8px;
    font-size: 12px;
  }

  .primary-nav {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    justify-content: center;
    gap: 0;
    padding: 0 12px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-bottom: 0;
    background: var(--page);
  }

  .nav-tab {
    flex: 1;
    min-height: 58px;
    max-width: 180px;
    padding-inline: 8px;
    text-align: center;
  }

  .main-content {
    padding-block: 24px calc(88px + env(safe-area-inset-bottom));
  }

  .screen-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 22px;
  }

  .heading-actions {
    width: 100%;
    justify-content: space-between;
  }

  .match-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .match-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px 12px;
    padding: 22px 18px;
  }

  .match-hero-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .match-hero-copy h2 {
    font-size: 27px;
  }

  .match-hero-stats {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 36px;
    padding-top: 17px;
    border-top: 1px solid oklch(0.42 0 0);
  }

  .match-new-button {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .match-scoreboard {
    gap: 10px;
    padding-top: 16px;
  }

  .team-match-summary {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 19px 16px;
  }

  .team-match-summary .match-scoreboard {
    padding-top: 14px;
    border-top: 1px solid oklch(0.42 0 0);
  }

  .score-team {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 7px;
  }

  .score-team-name {
    font-size: 12px;
    line-height: 1.25;
  }

  .team-score {
    grid-column: 2;
    font-size: 34px;
  }

  .score-separator {
    font-size: 9px;
  }

  .team-draw {
    padding-block: 21px 23px;
  }

  .team-draw-header {
    flex-direction: column;
    gap: 8px;
  }

  .team-draw-status {
    max-width: none;
    text-align: left;
  }

  .team-draw-content {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 22px;
  }

  .team-wheel-column {
    width: 100%;
  }

  .team-wheel {
    width: min(68vw, 240px);
  }

  .team-draw-result {
    width: 100%;
  }

  .team-rosters {
    gap: 16px;
  }

  .team-roster-heading {
    flex-wrap: wrap;
    font-size: 13px;
  }

  .team-roster-count {
    width: 100%;
    margin-left: 22px;
  }

  .team-members li {
    font-size: 12px;
  }

  .draw-teams-button {
    width: 100%;
  }

  .match-stat strong {
    font-size: 32px;
  }

  .match-new-button {
    min-height: 44px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .match-picker {
    width: 100%;
  }

  .new-match-form {
    width: 100%;
    margin-left: 0;
  }

  .new-match-date {
    flex: 1;
    min-width: 0;
  }

  .goal-form {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .goal-form .primary-button {
    width: 100%;
  }

  .goal-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding-block: 10px;
  }

  .goal-names {
    grid-column: 1;
  }

  .goal-time {
    grid-column: 2;
    grid-row: 1;
  }

  .goal-row .remove-button {
    grid-column: 2;
    justify-self: end;
  }

  .stats-table th,
  .stats-table td {
    padding: 13px 8px;
  }

  .numeric {
    width: 66px;
  }

  .roster-form {
    grid-template-columns: 1fr;
  }

  .roster-form .primary-button {
    width: 100%;
  }

  .player-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding-block: 14px;
  }

  .player-edit-form {
    width: 100%;
  }

  .player-edit-form .input-control {
    min-width: 0;
  }

  .player-item-actions {
    width: 100%;
    justify-content: space-between;
  }
}

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

  .app-intro {
    display: none;
  }

  .screen-entry,
  .goal-row-entering,
  .match-stat strong,
  .team-score {
    animation: none;
  }
}

@media (min-width: 641px) and (max-width: 800px) {
  .match-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
  }

  .match-new-button {
    grid-column: 2;
    justify-self: end;
  }

  .team-draw-content {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
  }

  .team-wheel {
    width: min(100%, 210px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-wheel {
    transition-duration: 0.01ms;
  }
}
