:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --ink: #111827;
  --muted: #64748b;
  --line: #dbe2ea;
  --panel: #ffffff;
  --accent: #d71920;
  --accent-dark: #991b1b;
  --gold: #f59e0b;
  --green: #0f766e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 42px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 47px;
  border-radius: 6px;
  overflow: hidden;
  background: #d32f2f;
  flex: 0 0 auto;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand small {
  display: block;
  color: var(--muted);
}

nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

nav a,
button,
.button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 13px;
  background: white;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

nav a.active,
button,
.button {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

button:hover {
  background: var(--accent-dark);
}

.session-pill {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  white-space: nowrap;
  font-weight: 800;
}

.session-pill.is-logged-in {
  border-color: #111827;
  background: #111827;
  color: white;
}

.session-pill.is-logged-in strong {
  color: white;
}

.shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 54px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 20px;
  align-items: stretch;
  min-height: 260px;
  padding: clamp(22px, 4vw, 42px);
  border-radius: 8px;
  color: white;
  background:
    linear-gradient(120deg, rgba(17, 24, 39, 0.92), rgba(153, 27, 27, 0.86)),
    repeating-linear-gradient(90deg, #1f2937 0 24px, #111827 24px 48px);
}

.hero h1 {
  max-width: 680px;
  margin: 0 0 12px;
  font-size: clamp(2.1rem, 4.6vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  margin: 0;
  color: #e5e7eb;
  font-size: 1.08rem;
}

.login-panel,
.section,
.accordion {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.login-panel {
  align-self: center;
  padding: 18px;
  color: var(--ink);
}

.login-panel p {
  color: var(--ink);
}

.login-status {
  margin: 0 0 12px;
  color: var(--ink);
  font-weight: 700;
}

.section {
  margin-top: 18px;
  padding: clamp(16px, 3vw, 26px);
}

.section h1,
.section h2 {
  margin: 0 0 16px;
}

.section-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-head h2,
.section-head p {
  margin: 0;
}

.section-head p {
  color: var(--muted);
  font-weight: 700;
}

.filter-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.league-switch {
  display: flex;
  gap: 4px;
  flex: 1 1 520px;
  flex-wrap: wrap;
  min-width: 0;
  padding: 3px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.league-switch a {
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 800;
  background: transparent;
  color: #334155;
}

.league-switch a.active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.quick-filter {
  display: flex;
  flex: 1 1 380px;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.quick-filter label {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 175px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.quick-filter select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  color: var(--ink);
  font-weight: 750;
}

.quick-filter button,
.filter-reset {
  align-self: end;
}

.filter-reset {
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  font-weight: 850;
  white-space: nowrap;
}

.empty-state {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 800;
}

form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

input,
select {
  min-height: 40px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.login-form input,
.game-form input,
.game-form select {
  flex: 1 1 160px;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
  justify-content: stretch;
}

.match-grid:has(.match-card:only-child) {
  grid-template-columns: minmax(min(100%, 320px), 430px);
  justify-content: start;
}

.match-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.match-card.favorite-match {
  border-color: var(--team-color, #9db6d8);
  background: #f2f7ff;
  background: color-mix(in srgb, var(--team-color, #9db6d8) 14%, white);
  box-shadow: inset 5px 0 0 var(--team-color, #9db6d8);
}

.match-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
}

.match-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 7px;
  border-radius: 4px;
  background: #eef2f7;
  line-height: 1.15;
}

.match-meta .league-chip {
  border: 1px solid rgba(15, 23, 42, 0.2);
  background: #111827;
  color: white;
  font-weight: 950;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: 0 0 0 rgba(17, 24, 39, 0);
  animation: league-chip-glow 2.8s ease-in-out infinite;
}

.match-meta .league-chip.is-cup {
  border-color: rgba(15, 118, 110, 0.38);
  background: #0f766e;
  animation-name: cup-chip-glow;
}

@keyframes league-chip-glow {
  0%, 100% {
    box-shadow: 0 0 0 rgba(17, 24, 39, 0);
  }
  50% {
    box-shadow: 0 0 14px rgba(17, 24, 39, 0.24);
  }
}

@keyframes cup-chip-glow {
  0%, 100% {
    box-shadow: 0 0 0 rgba(15, 118, 110, 0);
  }
  50% {
    box-shadow: 0 0 14px rgba(15, 118, 110, 0.32);
  }
}

@media (prefers-reduced-motion: reduce) {
  .match-meta .league-chip {
    animation: none;
  }
}

.match-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

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

.team-name.away {
  justify-content: flex-end;
}

.team-label {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.team-copy {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

.team-crest {
  flex: 0 0 auto;
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  object-fit: contain;
  border-radius: 3px;
  background: white;
  padding: 2px;
  border: 1px solid #e5e7eb;
}

.team-label strong,
.team-copy strong {
  overflow-wrap: anywhere;
  font-size: 0.98rem;
  line-height: 1.2;
}

.league-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.score {
  min-width: 44px;
  padding: 7px 6px;
  border-radius: 6px;
  background: #111827;
  color: white;
  text-align: center;
  font-weight: 900;
}

.tip-form {
  display: grid;
  gap: 10px;
  justify-content: center;
}

.tip-score-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.tip-form input {
  width: 72px;
  text-align: center;
  font-weight: 800;
}

.ko-winner-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.ko-winner-picker.is-required {
  border-color: var(--accent);
  background: #fff7f7;
}

.ko-winner-picker legend {
  padding: 0 6px;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 900;
}

.ko-winner-picker label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.ko-winner-picker input {
  width: auto;
}

.tips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tips-list > span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font-size: 0.9rem;
}

.tip-entry {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  position: relative;
}

.tip-owner-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tip-owner {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
}

.tip-owner:hover {
  background: transparent;
  color: var(--accent-dark);
}

.tip-owner-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  background: #eef2f7;
}

.tip-owner-avatar.fallback,
.avatar-popover-fallback {
  display: inline-grid;
  place-items: center;
  color: #334155;
  font-weight: 900;
}

.avatar-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 9px);
  z-index: 8;
  display: none;
  width: 160px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.22);
  text-align: center;
}

.avatar-popover img,
.avatar-popover-fallback {
  width: 112px;
  height: 112px;
  margin: 0 auto 8px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef2f7;
}

.avatar-popover strong {
  display: block;
}

.tip-owner-wrap:hover .avatar-popover,
.tip-owner-wrap.is-open .avatar-popover {
  display: block;
}

.forgot-name-panel {
  margin-top: 12px;
}

.forgot-name-panel summary {
  cursor: pointer;
  color: #334155;
  font-weight: 900;
}

.forgot-name-panel form {
  margin-top: 10px;
}

.muted,
.hint {
  color: var(--muted);
}

.notice {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid #86efac;
  background: #dcfce7;
  color: #064e3b;
  font-weight: 800;
}

.notice.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.accordion {
  margin-top: 10px;
  padding: 12px;
}

.accordion summary {
  cursor: pointer;
  font-weight: 800;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

tr.podium {
  background: #fff7ed;
}

canvas {
  max-width: 100%;
  margin-top: 20px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}

.scoring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.scoring-grid div {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.scoring-grid strong {
  color: #111827;
  font-size: 1.05rem;
}

.scoring-grid span {
  color: #475569;
  line-height: 1.35;
}

.bracket-intro {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.bracket-intro h1,
.bracket-intro p {
  margin: 0;
}

.bracket-intro p {
  margin-top: 8px;
  color: #475569;
  line-height: 1.45;
}

.tournament-panel {
  overflow: hidden;
}

.tournament-scroll {
  overflow-x: auto;
  padding: 4px 2px 14px;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
}

.tournament-bracket {
  display: grid;
  grid-template-columns: 330px 285px 270px 250px 235px 235px;
  gap: 14px;
  min-width: 1680px;
  align-items: start;
}

.bracket-round {
  display: grid;
  gap: 10px;
  scroll-snap-align: start;
}

.bracket-round > header {
  display: grid;
  gap: 2px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
}

.bracket-round > header strong {
  color: white;
  font-size: 0.96rem;
}

.bracket-round > header span {
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 800;
}

.bracket-matches {
  display: grid;
  gap: 10px;
}

.bracket-match {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.bracket-empty {
  min-height: 104px;
  align-content: center;
  border-style: dashed;
  color: #475569;
}

.bracket-empty strong {
  color: var(--ink);
}

.bracket-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 850;
}

.bracket-team {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border-radius: 6px;
  background: white;
  border: 1px solid #e6edf5;
}

.bracket-team-copy {
  min-width: 0;
}

.bracket-team .team-label {
  gap: 7px;
}

.bracket-team .team-crest {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
}

.bracket-team .team-copy {
  gap: 5px;
}

.bracket-team .team-copy strong {
  font-size: 0.84rem;
}

.bracket-team .league-badge {
  min-height: 18px;
  padding: 2px 5px;
  font-size: 0.62rem;
}

.bracket-team b {
  color: #111827;
  font-size: 0.95rem;
}

.bracket-team.is-winner {
  border-color: #0f766e;
  background: #ecfdf5;
}

.bracket-team.is-loser {
  opacity: 0.68;
}

.bracket-status {
  margin: 0;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 750;
  text-align: right;
}

.site-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 24px;
  padding: 0 0 18px;
  color: #475569;
  font-size: 0.92rem;
}

.footer-history-link {
  border-color: #cbd5e1;
  background: white;
  color: var(--ink);
}

.footer-history-link:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.version-modal[hidden] {
  display: none;
}

.version-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
}

.version-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
}

.version-dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: min(780px, calc(100vh - 36px));
  overflow: auto;
  padding: clamp(18px, 3vw, 26px);
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.version-dialog h2 {
  margin: 0 42px 18px 0;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 1.25rem;
}

.version-timeline {
  display: grid;
  gap: 12px;
}

.version-entry {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.version-entry time {
  color: #475569;
  font-weight: 900;
}

.version-entry h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.version-entry ul {
  margin: 0;
  padding-left: 18px;
  color: #475569;
  line-height: 1.45;
}

.game-form {
  align-items: stretch;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.profile-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.profile-card h2,
.profile-card p {
  margin: 0;
}

.avatar-current {
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar-current img,
.avatar-current > span {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  background: #eef2f7;
}

.avatar-current > span {
  display: grid;
  place-items: center;
  color: #334155;
  font-size: 2rem;
  font-weight: 900;
}

.avatar-form {
  display: grid;
  align-items: stretch;
}

.file-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: white;
  color: #334155;
  font-weight: 900;
  cursor: pointer;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.avatar-editor {
  display: grid;
  gap: 11px;
}

.avatar-editor[hidden] {
  display: none;
}

.avatar-editor canvas {
  width: min(320px, 100%);
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
}

.avatar-editor label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-weight: 900;
}

.avatar-editor input {
  width: 100%;
}

.profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.secondary-action {
  border-color: #cbd5e1;
  background: white;
  color: var(--ink);
}

.secondary-action:hover {
  background: #f8fafc;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.help-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.help-card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.help-card p {
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.favorites-section h3 {
  margin: 24px 0 12px;
  color: #334155;
}

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

.favorite-choice {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  min-height: 56px;
  padding: 10px 12px;
  border-color: #d6dee8;
  background: #f8fafc;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

.favorite-choice[aria-pressed="true"] {
  border-color: var(--team-color);
  background: #eef3f8;
  background: color-mix(in srgb, var(--team-color) 18%, white);
  color: #111827;
  box-shadow: inset 5px 0 0 var(--team-color);
}

.favorite-choice:hover {
  border-color: #94a3b8;
  background: #eef3f8;
}

.favorite-choice[aria-pressed="true"]:hover {
  background: #e8eef6;
  background: color-mix(in srgb, var(--team-color) 24%, white);
}

.favorite-choice:disabled {
  opacity: 0.75;
  cursor: wait;
}

.favorite-crest {
  flex: 0 0 auto;
  width: 26px !important;
  height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  object-fit: contain;
  border-radius: 5px;
  background: white;
  border: 1px solid #e2e8f0;
  padding: 2px;
}

.favorite-choice span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.back-to-top {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 12;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 1.35rem;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 780px) {
  .topbar {
    position: static;
    grid-template-columns: 1fr;
  }

  .filter-toolbar,
  .quick-filter {
    display: grid;
  }

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

  .quick-filter label {
    display: grid;
    gap: 5px;
    justify-items: stretch;
    text-align: center;
  }

  .quick-filter label span {
    text-align: center;
  }

  nav {
    justify-content: flex-start;
  }

  .session-pill {
    white-space: normal;
  }

  .hero {
    grid-template-columns: 1fr;
  }

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

  .match-main {
    grid-template-columns: 1fr 44px 1fr;
    text-align: left;
  }

  .team-name {
    align-self: stretch;
  }

  .team-label {
    align-items: flex-start;
  }

  .team-name.away .team-label {
    flex-direction: row-reverse;
    text-align: right;
  }

  .score {
    width: 44px;
  }

  .tip-score-row input,
  .tip-score-row button,
  .login-form input,
  .login-form button,
  .admin-login input,
  .admin-login button {
    flex: 1 1 100%;
    width: 100%;
  }

  .section-head {
    display: block;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
    padding-bottom: 74px;
  }

  .version-entry {
    grid-template-columns: 1fr;
  }
}
