:root {
  --bg: #101216;
  --surface: #171a1f;
  --surface-2: #1d2127;
  --border: #262b33;
  --line: #39414d;
  --text: #e8eaee;
  --muted: #8f96a1;
  --accent: #5f92c4;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

/* ── navigation ─────────────────────────────────────────────────── */

header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 0.6rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
nav::-webkit-scrollbar { display: none; }

nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.8rem 0.65rem;
  border-bottom: 2px solid transparent;
}
nav a.brand {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
  padding-right: 1rem;
}
nav a:hover { color: var(--text); }
nav a.active { color: var(--text); border-bottom-color: var(--accent); }
nav .spacer { flex: 1; }

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem 0.75rem 4rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.35rem; margin: 0.5rem 0 1rem; }
.muted { color: var(--muted); font-weight: normal; }
.note { color: var(--text); font-weight: 600; }
.right { text-align: right; }

/* ── cards and layout ───────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem 1rem;
  margin-bottom: 1rem;
  min-width: 0;
}

.card > h2 {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.card > h2 .sub { text-transform: none; letter-spacing: 0; font-weight: normal; }
.card > h2 a { font-weight: 600; color: var(--text); }

.card h3 {
  font-size: 0.95rem;
  margin: 1rem 0 0.4rem;
}

.grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.grid > * { min-width: 0; }
@media (min-width: 900px) {
  .grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; align-items: start; }
}

/* ── avatars and team cells ─────────────────────────────────────── */

.avi, .avi-fallback {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  flex: none;
  object-fit: cover;
  background: var(--surface-2);
}
.avi-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.tcell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.tcell .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── tables ─────────────────────────────────────────────────────── */

table { border-collapse: collapse; width: 100%; }
caption {
  padding: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: left;
}
th, td { padding: 0.45rem 0.5rem; text-align: left; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }
th { color: var(--muted); font-weight: 500; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.ctr, th.ctr { text-align: center; font-variant-numeric: tabular-nums; }
td.team, th.team { width: 99%; }
td.rank { color: var(--muted); font-variant-numeric: tabular-nums; width: 1.6rem; }
.standings tr.first td.rank { color: var(--accent); font-weight: 700; }
tbody tr.viewer td:first-child { border-left: 2px solid var(--accent); }
tbody tr.viewer td.team .name { color: var(--text); font-weight: 600; }
.standings { table-layout: fixed; }
.standings th:first-child, .standings td:first-child { width: 2rem; }
.standings th.team, .standings td.team { width: auto; }
.standings th.ctr, .standings td.ctr { width: 2.25rem; }
.standings th.num, .standings td.num { width: 4.5rem; }
.standings th.points, .standings td.points { padding-left: 1rem; }
.standings td.points { color: var(--text); font-weight: 600; }
.standings tbody td { padding-top: 0.55rem; padding-bottom: 0.55rem; }
.standings td.team .tcell { display: flex; width: 100%; }
.record-mobile { display: none; }
.scroll { overflow-x: auto; }
.matrix td.team { min-width: 10rem; width: auto; }
.matrix th.off, .matrix td.off { color: var(--muted); opacity: 0.55; }
.performance-table { min-width: 42rem; }
.performance-table td.team { min-width: 11rem; width: auto; }
.record-table th { width: 1%; white-space: nowrap; }
.record-table td.num { width: 5rem; color: var(--text); font-weight: 600; }
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  margin: 0;
  border-top: 1px solid var(--border);
}
.stat-strip > div {
  padding: 0.65rem 0.75rem 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.stat-strip dt {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.stat-strip dd {
  margin: 0.12rem 0 0;
  color: var(--text);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.stat-strip dd span { color: var(--muted); font-size: 0.75rem; font-weight: 400; }

.reqs { margin: 0.2rem 0 0.6rem; }
.reqs th { width: 1%; white-space: nowrap; padding-right: 1.2rem; font-size: 0.75rem; }
.reqs th, .reqs td { padding-top: 0.3rem; padding-bottom: 0.3rem; }

.res-w { color: var(--text); font-weight: 600; }
.res-l { color: var(--muted); }
.res-t { color: var(--muted); }

/* ── fixtures ───────────────────────────────────────────────────── */

.fixtures { border-top: 1px solid var(--border); }
.fixture {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr) 2.8rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
a.fixture { color: inherit; text-decoration: none; }
a.fixture:hover { background: var(--surface-2); text-decoration: none; }
.fixture:last-child { border-bottom: 0; }
.fixture-status {
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.fixture.live .fixture-status { color: var(--accent); font-weight: 600; }
.fixture-club {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.fixture-club.home { justify-content: flex-end; text-align: right; }
.fixture-club.away { justify-content: flex-start; }
.fixture-name {
  min-width: 0;
  overflow: hidden;
  line-height: 1.15;
}
.fixture-name > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.club-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
}
.club-emblem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.club-emblem > span {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 700;
}
.fixture-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  color: var(--text);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

/* ── match cards ────────────────────────────────────────────────── */

.mlist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; min-width: 0; }
@media (min-width: 640px) { .mlist.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.mcard {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.mrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.2rem 0;
  color: var(--muted);
}
.mrow .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .pts { font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.mrow.lead, .mrow.lead .pts { color: var(--text); }
.mrow.lead .name { font-weight: 600; }
.mrow.lead .pts { font-weight: 700; }
.mrow.viewer {
  border-left: 2px solid var(--accent);
  padding-left: 0.45rem;
}
.mrow.viewer .name { color: var(--text); font-weight: 600; }
.mmeta { margin-top: 0.35rem; font-size: 0.78rem; color: var(--muted); }

/* ── hero (your week) ───────────────────────────────────────────── */

.hero .big {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.8rem;
  align-items: center;
  padding: 0.4rem 0 0.6rem;
}
.hero .big .side { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; min-width: 0; text-align: center; }
.hero .big .side .name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero .big .avi, .hero .big .avi-fallback { width: 44px; height: 44px; border-radius: 10px; }
.hero .big .pts { font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero .big .pts.behind { color: var(--muted); font-weight: 500; }
.hero .big .colon { color: var(--muted); font-size: 1.2rem; }

.competition-focus { border-top: 2px solid var(--accent); }
.competition-focus-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}
.competition-focus-head h2 {
  margin: 0.1rem 0 0;
  font-size: 1.1rem;
}
.competition-focus-timing {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.competition-focus-status {
  color: var(--muted);
  font-size: 0.86rem;
  text-align: right;
}
.competition-focus-table { max-width: 36rem; }
.competition-focus-table td { padding-top: 0.42rem; padding-bottom: 0.42rem; }
.competition-focus-table tr.viewer { color: var(--text); font-weight: 600; }
.competition-focus-table tr.gap td { border-top: 7px solid var(--surface); }
.competition-focus-table tr.cut td { border-top: 1px solid var(--line); }
.competition-focus > .mcard { max-width: 36rem; }

.refresh-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-left: 2px solid var(--accent);
}
.refresh-card strong, .refresh-card span { display: block; }
.refresh-card span {
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.refresh-card-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex: none;
}
.refresh-card-actions button.linklike { padding: 0.5rem; }

/* ── season schedule ─────────────────────────────────────────────── */

.season-map { display: grid; gap: 0; }
.schedule-axis-row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  align-items: end;
  color: var(--muted);
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
}
.schedule-axis {
  display: grid;
  grid-template-columns: repeat(36, minmax(0, 1fr));
  min-height: 1rem;
}
.schedule-axis span { text-align: center; }
.schedule-lane {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}
.schedule-lane:last-child { border-bottom: 0; }
.schedule-name {
  display: flex;
  align-items: center;
  grid-row: 1 / 3;
  padding-right: 0.7rem;
  font-weight: 600;
}
.schedule-track {
  display: grid;
  grid-template-columns: repeat(36, minmax(0, 1fr));
  gap: 2px;
  min-height: 0.8rem;
}
.schedule-week {
  min-width: 2px;
  border-radius: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.schedule-week.active {
  background: var(--accent);
  border-color: var(--accent);
  opacity: 0.82;
}
.schedule-mobile {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.8rem;
  padding-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.schedule-mobile strong { color: var(--text); font-weight: 500; }
.season-map.compact .schedule-lane { grid-template-columns: 8rem minmax(0, 1fr); }
.season-map.compact .schedule-axis-row { grid-template-columns: 8rem minmax(0, 1fr); }

/* ── bracket ────────────────────────────────────────────────────── */

.bracket-round-nav { display: none; }
.bracket {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  margin: 0 -1rem;
  padding: 0.2rem 1rem 0.8rem;
  scrollbar-color: var(--line) transparent;
}
.bracket .round {
  display: flex;
  flex-direction: column;
  flex: 1 0 232px;
  min-width: 232px;
}
.bracket .round-title {
  text-align: center;
  min-height: 3.15rem;
  margin: 0 1rem 0.35rem;
  padding: 0.45rem 0.3rem 0.55rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text);
}
.bracket .round-title .rw {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: normal;
  text-transform: none;
  letter-spacing: 0;
}
.bracket .matches { display: flex; flex-direction: column; flex: 1; }
.bracket .bwrap {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-height: 96px;
  padding: 0.55rem 0;
}
.bracket .round:not(:first-child) .bwrap { padding-left: 24px; }
.bracket .round:not(:last-child) .bwrap { padding-right: 24px; }

.bracket .round:not(:last-child) .bwrap::after {
  content: "";
  position: absolute;
  right: 0;
  width: 24px;
}
.bracket .round:not(:last-child) .bwrap:nth-child(odd)::after {
  top: 50%;
  bottom: 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.bracket .round:not(:last-child) .bwrap:nth-child(even)::after {
  top: 0;
  bottom: 50%;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.bracket .round:not(:first-child) .bwrap::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 24px;
  border-top: 1px solid var(--line);
}

.bmatch {
  position: relative;
  z-index: 1;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.brow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 43px;
  padding: 0.48rem 0.65rem 0.48rem 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.brow + .brow { border-top: 1px solid var(--border); }
.brow .seed {
  display: inline-grid;
  place-items: center;
  flex: 0 0 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  text-align: center;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}
.brow .avi, .brow .avi-fallback { width: 20px; height: 20px; border-radius: 5px; }
.brow .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .pts {
  flex: none;
  min-width: 3.2rem;
  text-align: right;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.brow.win {
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: calc(0.5rem - 3px);
}
.brow.win .name { font-weight: 600; }
.brow.win .pts { font-weight: 700; }
.brow.lead { color: var(--text); }
.brow.lead .pts { font-weight: 700; }
.brow.out { opacity: 0.62; }
.brow.viewer {
  border-left: 2px solid var(--accent);
  padding-left: calc(0.5rem - 2px);
}
.brow.viewer .name { color: var(--text); font-weight: 600; }
.brow.tbd .seed { border-color: transparent; }

.match-info-button {
  position: absolute;
  z-index: 2;
  top: -0.58rem;
  right: -0.58rem;
  display: grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 0.8rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
}
.match-info-button:hover {
  border-color: var(--accent);
  color: var(--text);
}
.match-info-popover {
  width: min(30rem, calc(100vw - 2rem));
  max-height: min(34rem, calc(100vh - 2rem));
  margin: auto;
  padding: 1rem;
  overflow: auto;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.match-info-popover::backdrop { background: rgb(0 0 0 / 55%); }
.match-info-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.match-info-head strong, .match-info-head span { display: block; }
.match-info-head span {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.match-info-head button {
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
}
.match-info-popover > p { margin: 0.8rem 0 0; }
.leg-details { margin-top: 1rem; }
.leg-details h4 { margin: 0 0 0.4rem; }
.leg-details table { font-size: 0.82rem; }
.leg-details th, .leg-details td { padding: 0.4rem 0.5rem; }

.champion {
  margin: 0.4rem 0 1rem;
  font-size: 1.05rem;
}
.champion .name { font-weight: 700; }

.qual-note {
  padding: 0;
  margin: 0.4rem 0 0.8rem;
}

/* ── tabs ───────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin: 0.75rem 0 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 0.5rem 0.75rem;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }

/* ── forms ──────────────────────────────────────────────────────── */

form.stack { display: flex; flex-direction: column; gap: 0.65rem; max-width: 26rem; }
form.stack.wide { max-width: 34rem; }
label { display: flex; flex-direction: column; gap: 0.25rem; color: var(--muted); font-size: 0.88rem; }
label.check, .seedrow { flex-direction: row; align-items: center; gap: 0.5rem; color: var(--text); }
input, select, button, textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
}
input:focus, select:focus { outline: 1px solid var(--accent); outline-offset: -1px; }
.seedrow input { width: 4rem; }
button { cursor: pointer; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: 0.5; cursor: default; }
button.linklike {
  background: none;
  border: none;
  color: var(--muted);
  padding: 0.8rem 0.65rem;
}
button.linklike:hover { color: var(--text); }
form.inline { display: inline-flex; gap: 0.4rem; align-items: center; margin: 0.3rem 0.6rem 0.3rem 0; }
fieldset { border: 1px solid var(--border); border-radius: 6px; }
legend { color: var(--muted); font-size: 0.88rem; padding: 0 0.3rem; }

.login-card { max-width: 22rem; margin: 3rem auto 0; }
.invite-link { width: 100%; }

/* ── misc ───────────────────────────────────────────────────────── */

.columns { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .columns { grid-template-columns: 1fr 1fr; } }

.competition-list { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.competition-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.competition-row:last-child { border-bottom: none; }
.competition-name { font-weight: 600; }
.competition-result { text-align: right; }

.account { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.account:last-child { border-bottom: none; }
.account-head { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; }
.account-actions { margin-top: 0.3rem; }

.danger { margin-top: 2rem; padding-top: 0.8rem; border-top: 1px solid var(--border); }

form.decide { margin: 0.15rem 0 0.5rem; }

.actions, .preset-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0.5rem 0 1rem;
}
.preset-links { font-size: 0.9rem; }

.collapse { margin-top: 0.8rem; }
.collapse summary {
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.2rem 0;
}
.collapse summary:hover { color: var(--accent); }
.collapse summary.h2like {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.collapse summary.h2like:hover { color: var(--text); }
.collapse[open] { margin-bottom: 0.4rem; }

.override { margin: 0.2rem 0 0.6rem; }
.override summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; }
.override summary:hover { color: var(--text); }
.override form.inline { display: flex; flex-wrap: wrap; margin: 0.5rem 0; }
.override select { max-width: 11rem; }
.override input[type="number"] { width: 6.5rem; }
.override p.muted { font-size: 0.8rem; margin: 0.3rem 0 0; }
td.nowrap { white-space: nowrap; }
td.nowrap form.inline { margin: 0.15rem 0 0.15rem 0.6rem; }
td.nowrap select { max-width: 10rem; }

@media (max-width: 480px) {
  .standings .played { display: none; }
  .standings .record-part { display: none; }
  .standings .record-mobile {
    display: table-cell;
    width: 4.2rem;
    white-space: nowrap;
  }
  .standings th.num, .standings td.num { width: 3.8rem; }
  .standings th.points, .standings td.points { padding-left: 0.35rem; }
  .competition-focus-head { align-items: flex-start; flex-direction: column; gap: 0.25rem; }
  .competition-focus-status { text-align: left; }
  .refresh-card { align-items: flex-start; flex-direction: column; }
  .fixture {
    grid-template-columns: 3.4rem minmax(0, 1fr) 2.2rem minmax(0, 1fr);
    gap: 0.35rem;
  }
  .fixture-status { font-size: 0.66rem; }
  .club-emblem { width: 26px; height: 26px; }
  .fixture-name { font-size: 0.85rem; }
}

@media (max-width: 639px) {
  .bracket-round-nav {
    display: flex;
    gap: 0.2rem;
    margin: 0 0 0.45rem;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .bracket-round-nav::-webkit-scrollbar { display: none; }
  .bracket-round-nav button {
    flex: none;
    min-height: 44px;
    padding: 0.45rem 0.5rem;
    color: var(--muted);
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    white-space: nowrap;
  }
  .bracket-round-nav button.active {
    color: var(--text);
    border-bottom-color: var(--accent);
  }
  .bracket {
    display: block;
    margin: 0;
    padding: 0.7rem;
    overflow: visible;
  }
  .bracket .round {
    display: none;
    flex: 0 0 100%;
    min-width: 100%;
  }
  .bracket .round.mobile-active { display: flex; }
  .bracket .round-title {
    min-height: 0;
    margin: 0 0 0.65rem;
    padding: 0 0 0.5rem;
    text-align: left;
  }
  .bracket .matches {
    display: grid;
    flex: none;
    gap: 0.55rem;
  }
  .bracket .bwrap,
  .bracket .round:not(:first-child) .bwrap,
  .bracket .round:not(:last-child) .bwrap {
    display: block;
    min-height: 0;
    padding: 0;
  }
  .bracket .bwrap::before,
  .bracket .bwrap::after { display: none; }
  .bracket .bmatch:has(.match-info-button) { padding-right: 2.8rem; }
  .bracket .match-info-button {
    top: 50%;
    right: 0.25rem;
    width: 2.5rem;
    height: 2.5rem;
    transform: translateY(-50%);
  }
  .tabs a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  table.mobile-stack,
  table.mobile-stack tbody,
  table.mobile-stack tr,
  table.mobile-stack td {
    display: block;
    width: 100%;
  }
  table.mobile-stack thead { display: none; }
  table.mobile-stack tr {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
  }
  table.mobile-stack tr:last-child { border-bottom: 0; }
  table.mobile-stack td {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.18rem 0;
    border: 0;
    text-align: right;
  }
  table.mobile-stack td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
  }
  table.mobile-stack td.team .tcell {
    justify-self: end;
    max-width: 100%;
  }
  table.players { table-layout: fixed; }
  table.players td:first-child { width: 3rem; }
  table.players td.team {
    width: auto;
    max-width: 0;
    overflow: hidden;
  }
  table.players td:last-child { width: 4rem; }
  .scroll .performance-table th.team,
  .scroll .performance-table td.team,
  .scroll .matrix th.team,
  .scroll .matrix td.team {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--surface);
  }
  .scroll .performance-table th.team,
  .scroll .matrix th.team { z-index: 2; }
  .schedule-axis-row { grid-template-columns: 1fr; }
  .schedule-axis-row > span { display: none; }
  .schedule-lane {
    grid-template-columns: 1fr;
    padding: 0.55rem 0;
  }
  .schedule-name { grid-row: auto; padding: 0 0 0.35rem; }
  .schedule-track { min-height: 0.7rem; }
  .schedule-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.8rem;
    color: var(--muted);
    font-size: 0.82rem;
  }
  .schedule-mobile strong { color: var(--text); font-weight: 500; }
  .account-actions {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }
  .account-actions form.inline {
    flex-wrap: wrap;
    max-width: 100%;
    margin: 0;
  }
  .account-actions form.inline input,
  .account-actions form.inline select {
    min-width: 0;
    max-width: 100%;
  }
  form.decide {
    display: flex;
    flex-wrap: wrap;
    margin-right: 0;
  }
  form.decide select {
    flex: 1 1 10rem;
    min-width: 0;
    max-width: 100%;
  }
  .seedrow { flex-wrap: wrap; }
  td.nowrap { white-space: normal; }
  td.nowrap form.inline {
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    margin-left: 0;
  }
  td.nowrap form.inline + form.inline { margin-top: 0.35rem; }
  td.nowrap select {
    flex: 1 1 8rem;
    min-width: 0;
    max-width: 100%;
  }
  .competition-row { align-items: flex-start; flex-direction: column; gap: 0.25rem; }
  .competition-result { text-align: left; }
}
