:root {
  --bg: #081320;
  --bg-2: #0b1b2d;
  --panel: #102338;
  --panel-2: #132b44;
  --card: #ffffff;
  --card-soft: #f6f8fb;
  --text: #f7fafc;
  --text-dark: #0f172a;
  --muted: #8ea0b8;
  --muted-dark: #64748b;
  --line: rgba(255,255,255,.12);
  --line-dark: #e5e7eb;
  --primary: #22c55e;
  --primary-dark: #16a34a;
  --blue: #2563eb;
  --amber: #f59e0b;
  --danger: #ef4444;
  --success-soft: #dcfce7;
  --blue-soft: #dbeafe;
  --amber-soft: #fef3c7;
  --danger-soft: #fee2e2;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 24px;
  --shadow-card: 0 18px 46px rgba(0,0,0,.26);
  --shadow-soft: 0 8px 24px rgba(15,23,42,.10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
  overflow-x: hidden;
}

.bracket-page {
  display: grid;
  gap: 18px;
}
.bracket-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.bracket-hero p {
  max-width: 680px;
}
.bracket-hero-stats {
  display: grid;
  gap: 8px;
  min-width: 190px;
}
.bracket-hero-stats span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  color: #dbeafe;
  font-weight: 800;
}
.bracket-hero-stats strong {
  color: var(--primary);
  font-size: 22px;
}
.bracket-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(8,19,32,.62);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}
.bracket-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}
.legend-dot--open { background: var(--primary); }
.legend-dot--wait { background: var(--amber); }
.legend-dot--done { background: #94a3b8; }
.known-bracket-section,
.bracket-path-section {
  display: grid;
  gap: 12px;
}
.known-bracket-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.bracket-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(8,19,32,.42);
  overflow: hidden;
}
.bracket-map-rounds {
  display: grid;
  grid-template-columns: minmax(270px, 1.35fr) repeat(3, minmax(155px, .78fr));
  gap: 12px;
  min-width: 0;
}
.bracket-round {
  position: relative;
  min-width: 0;
  z-index: 1;
}
.bracket-map-round,
.bracket-finals-panel {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(8,19,32,.58);
}
.bracket-round-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #e2e8f0;
  cursor: pointer;
  list-style: none;
}
.bracket-round-heading::-webkit-details-marker {
  display: none;
}
.bracket-round-heading h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}
.bracket-round-heading h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}
.bracket-round-heading span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.bracket-slot-stack,
.bracket-final-stack {
  display: grid;
  gap: 8px;
}
.bracket-map-stack {
  display: grid;
  gap: 7px;
}
.bracket-round--r32 .bracket-map-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.bracket-map-slot {
  min-width: 0;
}
.bracket-match {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
  min-height: 84px;
  padding: 10px;
  border: 1px solid rgba(226,232,240,.92);
  border-radius: 10px;
  background: #fff;
  color: var(--text-dark);
  box-shadow: 0 10px 24px rgba(15,23,42,.12);
}
.bracket-match--known {
  border-color: rgba(34,197,94,.55);
  box-shadow: 0 14px 30px rgba(34,197,94,.13);
}
.bracket-match--featured {
  min-height: 136px;
  padding: 10px;
  border-color: rgba(34,197,94,.72);
  box-shadow: 0 20px 42px rgba(34,197,94,.16);
}
.bracket-match--featured .bracket-team-row {
  min-height: 32px;
  font-size: 14px;
}
.bracket-match--placeholder {
  min-height: 84px;
  gap: 5px;
  opacity: .76;
  border-style: dashed;
  background: rgba(248,250,252,.94);
}
.bracket-slot {
  min-height: 84px;
  gap: 8px;
  align-content: center;
  padding: 10px 11px;
  opacity: .82;
  border-color: rgba(245,158,11,.48);
  background: rgba(248,250,252,.90);
  box-shadow: none;
}
.bracket-slot-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #92400e;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}
.bracket-slot-meta em {
  color: #94a3b8;
  font-style: normal;
  text-transform: none;
}
.bracket-slot > strong {
  color: #334155;
  font-size: 13px;
}
.bracket-match--result {
  border-color: rgba(148,163,184,.75);
}
.bracket-match--final {
  min-height: 150px;
  padding: 14px;
  border-color: rgba(245,158,11,.72);
  box-shadow: 0 0 0 1px rgba(245,158,11,.22), 0 24px 54px rgba(245,158,11,.18);
}
.bracket-match--map {
  min-height: 52px;
  max-height: none;
  overflow: hidden;
}
.bracket-match--map:not(.bracket-slot):not(.bracket-match--final) {
  gap: 3px;
  padding: 6px 8px;
}
.bracket-match--map:not(.bracket-slot):not(.bracket-match--final) .bracket-match-meta {
  display: none;
}
.bracket-match--map:not(.bracket-slot):not(.bracket-match--final) .bracket-team-row {
  min-height: 18px;
  padding: 2px 5px;
  font-size: 11px;
}
.bracket-match--map .bracket-versus {
  font-size: 9px;
}
.bracket-match--map .badge {
  min-height: 18px;
  padding: 0 6px;
  font-size: 9px;
  border-radius: 6px;
}
.bracket-match--map.bracket-slot {
  min-height: 44px;
  padding: 7px 8px;
}
.bracket-match--map.bracket-slot .bracket-slot-meta {
  font-size: 9px;
}
.bracket-match--map.bracket-slot > strong {
  font-size: 12px;
}
.bracket-final-feature {
  display: grid;
  gap: 8px;
}
.bracket-final-feature h3 {
  margin: 0;
  color: #fde68a;
  font-size: 16px;
}
.bracket-final-feature .bracket-match--final {
  min-height: 96px;
  padding: 11px;
}
.bracket-match--third {
  min-height: 84px;
  opacity: .9;
}
.bracket-match-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bracket-match-meta time {
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}
.bracket-match-teams {
  display: grid;
  gap: 4px;
}
.bracket-team-row {
  min-height: 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 7px;
  background: #f1f5f9;
  font-weight: 950;
  font-size: 13px;
}
.bracket-match--final .bracket-team-row {
  min-height: 38px;
  font-size: 16px;
}
.bracket-team-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.bracket-team-row strong {
  font-size: 20px;
}
.bracket-team-row.is-winner {
  background: var(--success-soft);
  color: #166534;
}
.bracket-team-row.is-unknown {
  color: #64748b;
  font-style: italic;
}
.bracket-versus {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 1000;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}
.bracket-live,
.bracket-pick {
  margin: 0;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 850;
}
.bracket-match--placeholder .bracket-pick {
  font-size: 11px;
}
.bracket-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bracket-actions .button,
.bracket-actions .ghost {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
}
.bracket-third-place {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.bracket-third-place h3 {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
  letter-spacing: 0;
}
.bracket-visual-board {
  position: relative;
  display: block;
  padding: 20px 20px 18px;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 20px;
  background:
    radial-gradient(circle at 76% 43%, rgba(250,204,21,.13), transparent 12rem),
    radial-gradient(circle at 17% 16%, rgba(34,197,94,.09), transparent 14rem),
    linear-gradient(180deg, rgba(8,19,32,.78), rgba(5,13,24,.90));
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 24px 70px rgba(0,0,0,.18);
}
.bracket-scroll-hint {
  display: none;
  margin: 0 0 10px;
  color: rgba(203,213,225,.78);
  font-size: 12px;
  font-weight: 850;
}
.bracket-board-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.bracket-board-scroll::-webkit-scrollbar {
  display: none;
}
.bracket-visual-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 2px;
}
.bracket-visual-grid {
  --bracket-col-r32: 176px;
  --bracket-col: 154px;
  --bracket-col-final: 168px;
  --bracket-col-third: 168px;
  --bracket-gap: 52px;
  --bracket-row: 22px;
  position: relative;
  min-width: 1250px;
  min-height: 790px;
  display: grid;
  grid-template-columns: var(--bracket-col-r32) var(--bracket-col) var(--bracket-col) var(--bracket-col) var(--bracket-col-final) var(--bracket-col-third);
  grid-template-rows: 38px repeat(33, var(--bracket-row));
  column-gap: var(--bracket-gap);
  padding: 6px 10px 0;
  scroll-snap-align: start;
}
.bracket-visual-heading {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 1px;
  min-width: 0;
  color: #e2e8f0;
  text-align: center;
}
.bracket-visual-heading h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 0;
}
.bracket-visual-heading span {
  color: #a8b7ca;
  font-size: 10px;
  font-weight: 850;
}
.bracket-heading--r32 { grid-column: 1; grid-row: 1; }
.bracket-heading--r16 { grid-column: 2; grid-row: 1; }
.bracket-heading--qf { grid-column: 3; grid-row: 1; }
.bracket-heading--sf { grid-column: 4; grid-row: 1; }
.bracket-heading--final { grid-column: 5; grid-row: 12; align-self: end; color: #fde68a; }
.bracket-heading--third { grid-column: 6; grid-row: 17; align-self: end; }
.bracket-connector-layer {
  position: absolute;
  inset: 6px 10px 0;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--bracket-col-r32) var(--bracket-col) var(--bracket-col) var(--bracket-col) var(--bracket-col-final) var(--bracket-col-third);
  grid-template-rows: 38px repeat(33, var(--bracket-row));
  column-gap: var(--bracket-gap);
  pointer-events: none;
}
.bracket-connector {
  position: relative;
  min-width: 0;
}
.bracket-connector::before {
  content: "";
  position: absolute;
  left: 62%;
  right: -31%;
  top: 50%;
  border-top: 1px solid rgba(148,163,184,.34);
  filter: drop-shadow(0 0 4px rgba(96,165,250,.10));
}
.bracket-connector::after {
  content: "";
  position: absolute;
  right: -31%;
  top: -24px;
  height: 50px;
  border-right: 1px solid rgba(148,163,184,.22);
}
.bracket-connector--r16 { grid-column: 1; grid-row: var(--connector-row) / span 2; }
.bracket-connector--qf { grid-column: 2; grid-row: var(--connector-row) / span 2; }
.bracket-connector--sf { grid-column: 3; grid-row: var(--connector-row) / span 2; }
.bracket-connector--final {
  grid-column: 4 / 6;
  grid-row: 16 / span 4;
}
.bracket-connector--final::before {
  left: 18%;
  right: 24%;
  border-color: rgba(250,204,21,.42);
}
.bracket-connector--final::after {
  right: 24%;
  top: -54px;
  height: 106px;
  border-color: rgba(250,204,21,.24);
}
.bracket-connector--third {
  grid-column: 5 / 7;
  grid-row: 20 / span 3;
}
.bracket-connector--third::before {
  left: 42%;
  right: 31%;
  border-color: rgba(148,163,184,.30);
  border-top-style: dashed;
}
.bracket-connector--third::after {
  right: 31%;
  top: -10px;
  height: 46px;
  border-color: rgba(148,163,184,.24);
  border-right-style: dashed;
}
.bracket-visual-card {
  position: relative;
  z-index: 3;
  grid-row: var(--visual-row) / span 2;
  min-width: 0;
  min-height: 40px;
  display: grid;
  align-content: center;
  gap: 3px;
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 10.5px;
  line-height: 1.16;
  overflow: hidden;
}
.bracket-visual-card strong,
.bracket-visual-card span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bracket-visual-card em {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #e2e8f0;
  font-size: 10px;
  font-style: normal;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bracket-visual-card--known {
  grid-column: 1;
  border: 1px solid rgba(16,185,129,.58);
  border-left: 4px solid var(--primary);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(241,245,249,.94));
  color: #102033;
  box-shadow: 0 8px 18px rgba(16,185,129,.12);
}
.bracket-visual-card--known strong,
.bracket-visual-card--known span {
  color: #102033;
  font-weight: 950;
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.bracket-visual-card--wait {
  border: 1px solid rgba(245,158,11,.70);
  background: linear-gradient(180deg, rgba(13,29,49,.88), rgba(8,19,32,.82));
  color: #e7eef8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 12px 30px rgba(0,0,0,.16);
}
.bracket-visual-card--wait::after,
.bracket-visual-card--final::after,
.bracket-visual-card--third::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 9px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(245,158,11,.95);
  box-shadow: 0 0 10px rgba(245,158,11,.36);
}
.bracket-visual-card--r16 { grid-column: 2; }
.bracket-visual-card--qf { grid-column: 3; }
.bracket-visual-card--sf { grid-column: 4; }
.bracket-visual-card--wait strong,
.bracket-visual-card--wait span {
  padding-right: 20px;
  color: #e7eef8;
  font-weight: 900;
}
.bracket-visual-card--wait em {
  color: #fbbf24;
  font-size: 10px;
  letter-spacing: 0;
}
.bracket-visual-card--final {
  grid-column: 5;
  grid-row: calc(var(--visual-row) - 1) / span 5;
  min-height: 104px;
  gap: 6px;
  align-content: center;
  padding: 16px 18px;
  text-align: center;
  border: 1px solid rgba(250,204,21,.95);
  background:
    radial-gradient(circle at 50% 26%, rgba(250,204,21,.28), transparent 5.5rem),
    linear-gradient(180deg, rgba(62,48,12,.94), rgba(10,20,33,.91));
  color: #fef3c7;
  box-shadow: 0 0 0 1px rgba(250,204,21,.24), 0 0 28px rgba(250,204,21,.34), 0 20px 56px rgba(0,0,0,.28);
}
.bracket-visual-card--final em {
  color: #fde68a;
  font-size: 17px;
  text-align: center;
}
.bracket-visual-card--final strong,
.bracket-visual-card--final span {
  padding-right: 0;
  color: #fef3c7;
  font-weight: 950;
  text-align: center;
}
.bracket-visual-card--final::after {
  right: 12px;
  background: rgba(250,204,21,.20);
  border: 1px solid rgba(250,204,21,.48);
  box-shadow: 0 0 12px rgba(250,204,21,.22);
}
.bracket-visual-card--third {
  grid-column: 6;
  grid-row: var(--visual-row) / span 3;
  min-height: 62px;
  padding: 11px 14px;
  border: 1px solid rgba(148,163,184,.72);
  background: rgba(15,23,42,.78);
  color: #dbeafe;
}
.bracket-visual-card--third em {
  color: #e2e8f0;
}
.bracket-visual-card--third strong,
.bracket-visual-card--third span {
  padding-right: 18px;
  color: #dbeafe;
  font-weight: 850;
}
.bracket-visual-card--third::after {
  background: rgba(148,163,184,.22);
  border: 1px solid rgba(148,163,184,.70);
  box-shadow: none;
}
.bracket-board-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 18px -20px -18px;
  padding: 14px 20px;
  border-top: 1px solid rgba(148,163,184,.14);
  color: rgba(203,213,225,.86);
  font-size: 11.5px;
  font-weight: 800;
  background: rgba(5,13,24,.18);
}
.bracket-board-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

@media (max-width: 980px) {
  .known-bracket-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bracket-path-section {
    min-width: 0;
  }
  .bracket-visual-board {
    padding: 12px 0 0;
    border: 1px solid rgba(255,255,255,.12);
    background:
      radial-gradient(circle at 72% 42%, rgba(250,204,21,.12), transparent 12rem),
      linear-gradient(180deg, rgba(8,19,32,.72), rgba(5,13,24,.90));
    overflow: hidden;
  }
  .bracket-visual-board::before,
  .bracket-visual-board::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 42px;
    z-index: 8;
    width: 26px;
    pointer-events: none;
  }
  .bracket-visual-board::before {
    left: 0;
    background: linear-gradient(90deg, rgba(5,13,24,.94), rgba(5,13,24,0));
  }
  .bracket-visual-board::after {
    right: 0;
    background: linear-gradient(270deg, rgba(5,13,24,.94), rgba(5,13,24,0));
  }
  .bracket-scroll-hint {
    display: block;
    padding: 0 14px;
  }
  .bracket-board-scroll,
  .bracket-visual-scroll {
    overflow-x: auto;
    overflow-y: hidden;
  }
  .bracket-visual-scroll {
    padding: 0 14px 10px;
    cursor: grab;
  }
  .bracket-visual-grid {
    --bracket-col-r32: 176px;
    --bracket-col: 154px;
    --bracket-col-final: 168px;
    --bracket-col-third: 168px;
    --bracket-gap: 52px;
    --bracket-row: 22px;
    min-width: 1250px;
    min-height: 790px;
    display: grid;
    grid-template-columns: var(--bracket-col-r32) var(--bracket-col) var(--bracket-col) var(--bracket-col) var(--bracket-col-final) var(--bracket-col-third);
    grid-template-rows: 38px repeat(33, var(--bracket-row));
    column-gap: var(--bracket-gap);
    padding: 6px 10px 0;
  }
  .bracket-board-legend {
    justify-content: flex-start;
    margin: 0;
    padding: 12px 14px;
  }
  .bracket-map-rounds {
    grid-template-columns: 1fr;
  }
  .bracket-round {
    padding: 12px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    background: rgba(8,19,32,.58);
  }
  .bracket-round-heading {
    position: sticky;
    top: 82px;
    z-index: 2;
    margin: -12px -12px 10px;
    padding: 12px;
    border-radius: 14px 14px 0 0;
    background: rgba(8,19,32,.94);
  }
  .bracket-final-stack,
  .bracket-slot-stack,
  .bracket-round--r16 .bracket-slot-stack,
  .bracket-round--qf .bracket-slot-stack,
  .bracket-round--sf .bracket-slot-stack {
    gap: 9px;
  }
  .bracket-match,
  .bracket-match--final {
    min-height: 0;
  }
}

@media (max-width: 780px) {
  .bracket-hero {
    display: grid;
    align-items: stretch;
  }
  .bracket-hero-stats { min-width: 0; }
  .known-bracket-grid,
  .bracket-round--r32 .bracket-map-stack {
    grid-template-columns: 1fr;
  }
  .bracket-legend {
    display: grid;
    gap: 8px;
  }
  .bracket-match-meta {
    align-items: flex-start;
    flex-direction: column;
  }
  .bracket-match-meta time {
    text-align: left;
  }
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(5,11,19,.88), rgba(5,11,19,.96)),
    radial-gradient(circle at 48% -14%, rgba(34,197,94,.20), transparent 30rem),
    radial-gradient(circle at 88% 12%, rgba(37,99,235,.18), transparent 26rem),
    radial-gradient(circle at 8% 30%, rgba(245,158,11,.10), transparent 24rem),
    url('/img/stadium-hero.webp') center top / cover no-repeat fixed,
    #081320;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .36;
  background:
    linear-gradient(110deg, transparent 0 38%, rgba(255,255,255,.055) 39%, transparent 42%),
    linear-gradient(250deg, transparent 0 52%, rgba(255,255,255,.04) 53%, transparent 56%);
  mask-image: linear-gradient(180deg, #000 0, transparent 45%);
}

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

.topbar {
  width: min(1180px, calc(100% - 28px));
  min-height: 72px;
  margin: 14px auto 0;
  padding: 12px 18px;
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
  background: rgba(8, 19, 32, .86);
  box-shadow: 0 20px 50px rgba(0,0,0,.28);
  backdrop-filter: blur(18px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 174px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -.03em;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  box-shadow: 0 8px 20px rgba(0,0,0,.28);
  overflow: hidden;
}
.brand-mark-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.brand-title { display: grid; line-height: 1.02; }
.brand-main { color: var(--text); font-size: 15px; }
.brand-accent { color: var(--primary); font-size: 12px; letter-spacing: .08em; }
.nav-tabs { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link {
  position: relative;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 12px;
  color: #c9d5e7;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.055); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -13px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
}
.topbar-account { display: flex; align-items: center; gap: 10px; }
.user-pill, .ghost, .button {
  min-height: 40px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
}
.user-pill { background: rgba(255,255,255,.08); color: #e5edf8; }
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8eef7;
  color: #0f172a;
  font-weight: 900;
}
.logout-form { margin: 0; }
.ghost { background: rgba(255,255,255,.08); color: #e5edf8; }
.ghost:hover { background: rgba(255,255,255,.14); }
.ghost.danger, .button-danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.button, .button-primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: rgba(34,197,94,.72);
  box-shadow: 0 12px 24px rgba(34,197,94,.22);
}
.button-secondary { background: #f8fafc; color: var(--text-dark); border-color: #cbd5e1; box-shadow: none; }
.button-disabled { background: #eef2f7; color: #94a3b8; border-color: #dbe4ef; box-shadow: none; cursor: not-allowed; }
.wide { width: 100%; }

.page {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto 36px;
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 24px 24px;
  background:
    radial-gradient(circle at 58% 0%, rgba(255,255,255,.13), transparent 20rem),
    linear-gradient(180deg, rgba(12, 31, 51, .88), rgba(7, 17, 30, .92));
  box-shadow: var(--shadow-card);
}
.page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 220px;
  pointer-events: none;
  opacity: .60;
  background:
    linear-gradient(180deg, rgba(7,17,30,.22), rgba(7,17,30,.94)),
    radial-gradient(circle at 60% 10%, rgba(255,255,255,.30), transparent 4px),
    radial-gradient(circle at 74% 8%, rgba(255,255,255,.26), transparent 4px),
    url('/img/stadium-hero.webp') center 34% / cover no-repeat;
  border-radius: 0 0 28px 28px;
}
.page > * { position: relative; z-index: 1; }
.hero, .page-header { padding: 8px 2px 22px; }
.hero h1, .page-title, .card h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -.055em;
  color: #fff;
}
.hero p, .page-subtitle, .muted { color: var(--muted); }
.hero p, .page-subtitle { margin: 0; font-size: 15px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: 12px;
  font-weight: 1000;
}

.card, .table-card, .empty, .form-card {
  background: rgba(255,255,255,.96);
  color: var(--text-dark);
  border: 1px solid rgba(226,232,240,.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}
.card h1, .card h2, .form-card h2 { color: var(--text-dark); }
.narrow { max-width: 520px; margin: 7vh auto; }
.stack { display: grid; gap: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }

.filter-tabs { display: flex; gap: 10px; margin: 0 0 16px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-pill {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(15, 35, 56, .95);
  color: #d8e4f3;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
  white-space: nowrap;
}
.filter-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 10px 22px rgba(34,197,94,.24); }

.matches-view-version {
  margin: -8px 0 12px;
  font-size: 11px;
  font-weight: 800;
}

[data-match-filter-list="main"] [hidden] {
  display: none !important;
}

[data-my-picks-filter-list="main"] [hidden] {
  display: none !important;
}

.match-list { display: grid; gap: 12px; }
.match-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 170px minmax(320px, 1fr) 150px;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  background: #fff;
  color: var(--text-dark);
  border: 1px solid #dce4ee;
  border-radius: 15px;
  box-shadow: 0 14px 30px rgba(6,17,31,.20);
}
.match-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary);
}
.match-card.is-locked::before { background: var(--amber); }
.match-card.is-finished::before { background: #94a3b8; }
.match-meta { display: grid; gap: 5px; color: var(--muted-dark); font-size: 12px; }
.match-stage { font-weight: 800; }
.match-date { font-weight: 900; color: #334155; text-transform: uppercase; }
.match-time { font-size: 20px; line-height: 1; font-weight: 1000; color: #0f172a; }
.match-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.team { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 1000; }
.team.away { justify-content: flex-end; }
.team-name { overflow: hidden; text-overflow: ellipsis; }
.team-flag {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 2px 7px rgba(15,23,42,.12), inset 0 0 0 1px rgba(255,255,255,.35);
  color: #0f172a;
}
.team-flag-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.team-flag-code {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
}
.versus-pill {
  width: 34px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
}
.match-action { display: grid; justify-items: end; gap: 8px; border-left: 1px solid #e6edf5; padding-left: 16px; }
.match-score { font-size: 23px; font-weight: 1000; letter-spacing: -.04em; color: #0f172a; }
.match-result { font-size: 13px; color: var(--muted-dark); }
.badge {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 1000;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-open { background: var(--success-soft); color: #15803d; border-color: #bbf7d0; }
.badge-pick { background: var(--blue-soft); color: #1d4ed8; border-color: #bfdbfe; }
.badge-locked { background: var(--amber-soft); color: #b45309; border-color: #fde68a; }
.badge-finished { background: #e2e8f0; color: #475569; border-color: #cbd5e1; }
.badge-live { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.contribution-summary-card {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.contribution-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.contribution-summary-grid div,
.contribution-status-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px;
}
.contribution-summary-grid span,
.contribution-status-card span {
  display: block;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 800;
}
.contribution-summary-grid strong,
.contribution-status-card strong {
  color: var(--text-dark);
}
.contribution-status-card {
  display: grid;
  gap: 12px;
}
.contribution-form {
  display: grid;
  gap: 10px;
}
.contribution-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.contribution-actions .ghost {
  min-height: 38px;
}
.contribution-admin-note {
  margin: 0;
}
.champion-banner,
.champion-pick-card,
.champion-my-pick-card,
.champion-status-card,
.champion-admin-card {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.champion-my-pick-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.champion-banner {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-color: rgba(34,197,94,.34);
  background:
    linear-gradient(135deg, rgba(34,197,94,.14), rgba(255,255,255,.96) 46%),
    #fff;
}
.champion-banner h2,
.champion-pick-card h2,
.champion-my-pick-card h2,
.champion-status-card h2,
.champion-admin-card h2 {
  margin: 0;
  color: var(--text-dark);
}
.champion-banner-copy,
.champion-my-pick-copy,
.champion-pick-head {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.champion-my-pick-copy p {
  margin: 0;
}
.champion-banner-meta,
.champion-banner-action,
.champion-my-pick-action,
.champion-pick-actions,
.champion-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}
.champion-banner-meta span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 6px 10px;
  background: #f0fdf4;
  color: #14532d;
  font-size: 12px;
  font-weight: 900;
}
.champion-banner-action {
  justify-content: flex-end;
}
.champion-my-pick-action {
  justify-content: flex-end;
}
.champion-pick-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}
.champion-pick-form,
.champion-admin-form {
  display: grid;
  gap: 12px;
}
.champion-admin-lists {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 14px;
}
.champion-admin-lists h3 {
  margin: 0 0 8px;
  color: var(--text-dark);
  font-size: 16px;
}
.champion-status-list {
  display: grid;
  gap: 8px;
}
.champion-status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}
.champion-status-row.current-user {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.champion-status-row strong {
  color: #0f172a;
  text-align: right;
}
.compact-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.compact-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 9px 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}
.compact-list strong {
  color: #0f172a;
  text-align: right;
}
.compact-list em {
  color: #94a3b8;
  font-style: normal;
  font-weight: 800;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3,7,18,.62);
}
.modal-panel {
  width: min(480px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  display: grid;
  gap: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 18px;
  padding: 22px;
  background: #fff;
  color: var(--text-dark);
  box-shadow: 0 24px 70px rgba(2,6,23,.38);
}
.modal-panel h2 {
  margin: 0;
  color: var(--text-dark);
  font-size: 26px;
  line-height: 1.08;
}
.modal-panel p {
  margin: 0;
  color: #334155;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
.modal-actions form {
  margin: 0;
}
.final-results-panel {
  width: min(620px, 100%);
  max-height: min(90dvh, 780px);
  gap: 14px;
  border-color: rgba(245, 190, 70, .55);
  background: #071725;
  color: #f8fafc;
  box-shadow: 0 28px 90px rgba(2, 6, 23, .62), 0 0 0 1px rgba(34, 197, 94, .08);
}
.final-results-panel h2,
.final-results-panel h3,
.final-results-panel p,
.final-results-panel li {
  color: inherit;
}
.final-results-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.final-results-header .eyebrow {
  color: #86efac;
}
.final-results-trophy {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 1px solid rgba(250, 204, 21, .48);
  border-radius: 12px;
  background: rgba(250, 204, 21, .1);
  font-size: 27px;
}
.final-results-intro {
  color: #cbd5e1 !important;
  line-height: 1.55;
}
.final-results-champion {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 16px;
  border: 1px solid rgba(34, 197, 94, .38);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(22, 163, 74, .1);
}
.final-results-champion > span {
  color: #bbf7d0;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.final-results-champion strong {
  grid-row: span 2;
  font-size: 21px;
}
.final-results-champion small {
  color: #cbd5e1;
  font-weight: 750;
}
.final-results-podium h3,
.final-results-payout h3 {
  margin: 0 0 8px;
  font-size: 14px;
  text-transform: uppercase;
}
.final-results-podium ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.final-results-place {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, .045);
}
.final-results-place-1 {
  border-color: rgba(250, 204, 21, .42);
  background: rgba(250, 204, 21, .08);
}
.final-results-place > span:last-child {
  color: #facc15;
  font-weight: 900;
}
.final-results-medal {
  font-size: 19px;
}
.final-results-thanks {
  color: #dbeafe !important;
  font-weight: 750;
}
.final-results-payout {
  border-top: 1px solid rgba(148, 163, 184, .22);
  padding-top: 12px;
}
.final-results-payout p {
  color: #cbd5e1;
  line-height: 1.45;
}
.final-results-payout ul {
  margin: 7px 0;
  padding-left: 20px;
  color: #f8fafc;
}
.final-results-security {
  border: 1px solid rgba(248, 113, 113, .42);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(127, 29, 29, .2);
  color: #fecaca !important;
  font-size: 13px;
  line-height: 1.45;
}
.final-results-actions {
  position: sticky;
  bottom: -22px;
  margin: 0 -22px -22px;
  padding: 14px 22px 22px;
  background: #071725;
  border-top: 1px solid rgba(148, 163, 184, .16);
}
.final-results-actions .button-secondary {
  border-color: #64748b;
  background: transparent;
  color: #f8fafc;
}
.live-score-note,
.live-score-delay {
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}
.result-context,
.bracket-result-note {
  margin: 0;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 850;
}
.live-score-delay {
  font-weight: 700;
}
.match-card .button, .match-card .ghost { min-width: 112px; min-height: 38px; border-radius: 8px; text-transform: uppercase; font-size: 12px; }

.auth-page .topbar { display: none; }
.auth-page .page { width: min(480px, calc(100% - 28px)); margin-top: 7vh; border: 1px solid var(--line); border-radius: 28px; }
.login-card { background: rgba(255,255,255,.96); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--text-dark); }
.auth-brand .brand-mark { width: 68px; height: 68px; border-radius: 20px; background: transparent; box-shadow: 0 14px 30px rgba(0,0,0,.18); }
.auth-title { margin: 0; font-size: 30px; line-height: 1; letter-spacing: -.05em; }
.auth-subtitle { margin: 5px 0 0; color: var(--muted-dark); }

label { display: grid; gap: 7px; color: #334155; font-weight: 900; font-size: 13px; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 13px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text-dark);
  outline: none;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(34,197,94,.14); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.compact { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.inline-form { display: flex; gap: 9px; align-items: end; flex-wrap: wrap; }
.inline-form input { width: 7rem; }

.score-shell { max-width: 560px; margin: 0 auto; }
.back-link { display: inline-flex; margin-bottom: 12px; color: #d8e4f3; text-decoration: none; font-weight: 900; }
.predict-card { padding: 22px; }
.predict-summary { text-align: center; display: grid; gap: 14px; margin-bottom: 18px; }
.predict-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.score-form { display: grid; gap: 16px; }
.score-picker { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.score-box {
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  padding: 14px;
  background: #f8fafc;
  text-align: center;
}
.score-box input { height: 74px; font-size: 42px; font-weight: 1000; text-align: center; padding: 0; }
.score-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.score-step { min-height: 38px; border: 0; border-radius: 10px; background: #e9eef6; color: #0f172a; font-size: 20px; font-weight: 1000; }
.colon { color: #0f172a; font-size: 38px; font-weight: 1000; }
.info-box { display: grid; gap: 4px; border-radius: 14px; padding: 13px 14px; background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; font-size: 13px; }
.info-box.warning { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }

.pick-list { display: grid; gap: 12px; }
.pick-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: #fff;
  color: var(--text-dark);
  border: 1px solid #dce4ee;
  border-radius: 15px;
  box-shadow: var(--shadow-soft);
}
.pick-teams { display: grid; gap: 4px; }
.pick-score { text-align: right; display: grid; gap: 5px; justify-items: end; }
.pick-score strong { font-size: 24px; }

.ranking-hero { display: grid; gap: 18px; }
.podium {
  display: grid;
  grid-template-columns: 1fr 1.18fr 1fr;
  gap: 12px;
  align-items: end;
  max-width: 620px;
  margin: 0 auto 18px;
}
.podium-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 16px 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 22px;
  background: rgba(255,255,255,.08);
  text-align: center;
}
.podium-first { padding-top: 26px; background: linear-gradient(180deg, rgba(245,158,11,.24), rgba(255,255,255,.08)); }
.medal {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  font-weight: 1000;
  box-shadow: inset 0 -8px 12px rgba(0,0,0,.18), 0 12px 26px rgba(0,0,0,.24);
}
.podium-first .medal { width: 72px; height: 72px; background: linear-gradient(180deg, #fbbf24, #d97706); font-size: 30px; }
.podium-second .medal { background: linear-gradient(180deg, #e5e7eb, #94a3b8); }
.podium-third .medal { background: linear-gradient(180deg, #fb923c, #c2410c); }
.podium-name { font-weight: 1000; }
.podium-points { color: var(--primary); font-weight: 1000; }
.ranking-place {
  display: inline-flex;
  min-width: 26px;
  font-weight: 1000;
}
.tie-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  width: fit-content;
  border: 1px solid rgba(34,197,94,.38);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(34,197,94,.12);
  color: #86efac;
  font-size: 10px;
  font-weight: 1000;
  text-transform: uppercase;
  white-space: nowrap;
}
.podium-card .tie-badge {
  color: #14532d;
  background: #dcfce7;
  border-color: #bbf7d0;
}
.ranking-table { background: rgba(8,19,32,.72); border-color: rgba(255,255,255,.12); color: #e5edf8; }
.ranking-table table { color: inherit; }
.ranking-table th, .ranking-table td { border-bottom-color: rgba(255,255,255,.1); }
.ranking-table th { color: #a8b7cc; }
.ranking-table tr.current-user { background: rgba(34,197,94,.18); }
.ranking-points-note {
  background: rgba(239,246,255,.96);
  color: #1e3a8a;
}
.ranking-details,
.ranking-scored-matches {
  min-width: 0;
}
.ranking-details summary,
.ranking-scored-matches summary {
  width: fit-content;
  cursor: pointer;
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.ranking-details[open] summary,
.ranking-scored-matches[open] summary {
  margin-bottom: 8px;
}
.ranking-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  min-width: 260px;
  max-width: 520px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(15,23,42,.62);
}
.ranking-breakdown span,
.ranking-scored-matches li span {
  min-width: 0;
  color: #cbd5e1;
  font-size: 12px;
}
.ranking-breakdown strong,
.ranking-scored-matches li strong {
  color: #fff;
}
.ranking-scored-matches {
  margin-top: 10px;
}
.ranking-scored-matches ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ranking-scored-matches li {
  display: grid;
  gap: 4px;
  max-width: 520px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.06);
}
.ranking-scored-matches p {
  margin: 0;
  color: #cbd5e1;
  font-size: 12px;
}

.admin-grid, .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 16px; }
.admin-tile, .stats div {
  display: grid;
  gap: 8px;
  min-height: 136px;
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  color: var(--text-dark);
  text-decoration: none;
  border: 1px solid #dde6f0;
  box-shadow: var(--shadow-soft);
}
.admin-tile:hover { transform: translateY(-1px); border-color: rgba(34,197,94,.45); }
.tile-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #edf5ff; color: #0f172a; font-size: 22px; }
.tile-number, .stats span { display: block; font-size: 34px; font-weight: 1000; letter-spacing: -.05em; }
.tile-title { font-weight: 1000; }
.tile-desc { color: var(--muted-dark); font-size: 13px; }
.sync-status-card { display: grid; gap: 16px; margin-top: 6px; }
.sync-status-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.sync-status-head h2 { margin: 4px 0 4px; }
.sync-status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.sync-status-grid div {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 11px 12px;
}
.sync-status-grid span { display: block; color: var(--muted-dark); font-size: 12px; font-weight: 900; }
.sync-status-grid strong { display: block; margin-top: 3px; color: var(--text-dark); font-size: 18px; font-weight: 1000; }
.sync-action-form { display: flex; justify-content: flex-start; }
.sync-error { margin: 0; color: #991b1b; font-weight: 900; }
.sync-conflicts {
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fff7f7;
  padding: 12px 14px;
}
.sync-conflicts ul { display: grid; gap: 10px; margin: 10px 0 0; padding-left: 18px; }
.sync-conflicts li { color: var(--text-dark); font-size: 13px; }
.sync-conflicts li strong,
.sync-conflicts li span { display: block; }
.sync-conflicts li span { margin-top: 2px; color: var(--muted-dark); }
.table-card { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line-dark); text-align: left; vertical-align: middle; }
th { color: var(--muted-dark); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.csv-example { overflow: auto; background: #07111f; color: #e9f6ff; border-radius: 16px; padding: 14px; }
.rules-list { display: grid; gap: 10px; padding-left: 20px; }
.small-table { box-shadow: none; margin: 14px 0; }
.small-table table { min-width: 360px; }
.compact-stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.error-list { color: #991b1b; font-weight: 800; }
code { background: #f8fafc; border: 1px solid #dbe4ef; border-radius: 8px; padding: .1rem .35rem; }
.flash { padding: 13px 15px; border-radius: 15px; margin-bottom: 16px; font-weight: 900; color: var(--text-dark); }
.flash.success { background: var(--success-soft); color: #166534; }
.flash.error { background: var(--danger-soft); color: #991b1b; }
.empty, .empty-state { text-align: center; color: var(--muted-dark); }
.empty-state { display: grid; justify-items: center; gap: 12px; padding: 28px 18px; }
.empty-state-img { width: min(300px, 82vw); max-width: 100%; height: auto; display: block; filter: drop-shadow(0 14px 30px rgba(15,23,42,.18)); }
.trophy-accent { width: 72px; height: 72px; object-fit: contain; display: block; margin: 0 auto -4px; filter: drop-shadow(0 12px 24px rgba(245,158,11,.25)); }
.mobile-bottom-nav { display: none; }

@media (max-width: 820px) {
  body.has-mobile-nav { padding-bottom: 74px; }
  .topbar {
    width: 100%;
    margin: 0;
    top: 0;
    border-radius: 0;
    padding: 10px 14px;
    min-height: 66px;
  }
  .brand { min-width: 0; }
  .brand-mark { width: 38px; height: 38px; border-radius: 13px; }
  .brand-main { font-size: 13px; }
  .brand-accent { font-size: 11px; }
  .nav-tabs { display: none; }
  .topbar-account { margin-left: auto; }
  .user-pill { max-width: 146px; overflow: hidden; text-overflow: ellipsis; }
  .logout-form .ghost { padding-inline: 11px; }
  .page {
    width: 100%;
    margin: 0;
    padding: 18px 14px 22px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .hero, .page-header { padding: 6px 2px 18px; }
  .match-card {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 14px;
    padding: 15px;
  }
  .match-teams { grid-template-columns: 1fr auto 1fr; gap: 8px; }
  .team { gap: 7px; font-size: 14px; }
  .team-flag { width: 30px; height: 30px; font-size: 16px; }
  .match-action { grid-template-columns: 1fr auto; align-items: center; justify-items: stretch; border-left: 0; border-top: 1px solid #e6edf5; padding: 12px 0 0; }
  .match-card .button, .match-card .ghost { min-width: 96px; min-height: 42px; }
  .score-picker { grid-template-columns: 1fr auto 1fr; gap: 8px; }
  .score-box { padding: 10px; }
  .score-box input { height: 66px; font-size: 36px; }
  .colon { font-size: 30px; }
  .podium { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .podium-card { padding: 12px 6px; }
  .podium-first .medal { width: 58px; height: 58px; }
  .pick-card { grid-template-columns: 1fr; }
  .pick-score { text-align: left; justify-items: start; }
  .admin-grid, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-tile, .stats div { min-height: 118px; padding: 14px; }
  .inline-form input { width: 5.8rem; }
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    height: 66px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    background: rgba(8,19,32,.96);
    border-top: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(16px);
  }
  .mobile-bottom-nav a {
    display: grid;
    place-items: center;
    gap: 3px;
    color: #c4d1e4;
    text-decoration: none;
    font-size: 10px;
    font-weight: 800;
  }
  .mobile-bottom-nav .icon { font-size: 18px; }
  .mobile-bottom-nav a.active { color: var(--primary); }
}

@media (max-width: 430px) {
  .topbar-account .user-pill { display: none; }
  .page { padding-inline: 12px; }
  .hero h1, .page-title, .card h1 { font-size: 32px; }
  .filter-pill { padding-inline: 13px; }
  .match-teams { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .team, .team.away { justify-content: center; }
  .versus-pill { width: 42px; }
  .admin-grid, .stats { grid-template-columns: 1fr; }
  table { min-width: 560px; }
}

/* UI ALIGNMENT 02: proportion and empty-state refinements */
.topbar {
  min-height: 76px;
  padding: 14px 20px;
}
.brand {
  gap: 12px;
  min-width: 190px;
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
}
.nav-tabs { gap: 8px; }
.nav-link { padding: 0 15px; }

.match-card {
  grid-template-columns: 156px minmax(420px, .72fr) 150px;
  justify-content: space-between;
}
.match-teams {
  width: min(100%, 520px);
  justify-self: center;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 10px;
}
.team.home { justify-content: flex-end; text-align: right; }
.team.away { justify-content: flex-start; text-align: left; }
.team-name { max-width: 180px; }
.versus-pill { width: 42px; }

.score-shell { max-width: 600px; }
.predict-card { padding: 26px; }
.score-picker {
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 12px;
}
.score-box {
  padding: 16px;
  border: 1px solid #cfd9e6;
  background: linear-gradient(180deg, #ffffff, #f3f7fb);
  box-shadow: inset 0 -10px 20px rgba(15,23,42,.035), 0 10px 20px rgba(15,23,42,.08);
}
.score-team {
  display: block;
  min-height: 34px;
  color: #334155;
  font-size: 13px;
  font-weight: 1000;
  line-height: 1.15;
}
.score-number,
.score-box input {
  margin-top: 10px;
  height: 88px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #07111f;
  font-size: clamp(48px, 9vw, 64px);
  font-weight: 1000;
  line-height: 1;
  text-align: center;
  box-shadow: inset 0 0 0 1px #e2e8f0;
  appearance: textfield;
  -moz-appearance: textfield;
}
.score-number::-webkit-outer-spin-button,
.score-number::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score-step {
  min-height: 42px;
  background: #e8eef7;
  color: #0f172a;
  box-shadow: inset 0 -2px 0 rgba(15,23,42,.08);
}
.score-step:hover { background: #dbe5f1; }

.empty-state {
  width: min(100%, 520px);
  margin: 0 auto;
  border: 1px solid rgba(226,232,240,.92);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.94));
  box-shadow: var(--shadow-soft);
  color: var(--text-dark);
}
.empty-state-img {
  width: min(220px, 62vw);
  border-radius: 20px;
  opacity: .88;
  background: #f8fafc;
}
.empty-state strong { font-size: 18px; }
.empty-state span { color: var(--muted-dark); }
.empty-state .button { margin-top: 4px; }

.rules-card { max-width: 620px; }
.rules-card .table-card {
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.rules-card th { color: #334155; }
.rules-card td:last-child { font-weight: 1000; color: var(--primary-dark); }

@media (max-width: 820px) {
  .topbar { min-height: 68px; padding: 10px 14px; }
  .brand { min-width: 0; gap: 9px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 14px; }
  .match-card { grid-template-columns: 1fr; }
  .match-teams { width: 100%; grid-template-columns: 1fr auto 1fr; }
  .team-name { max-width: 120px; }
  .score-picker { grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); gap: 8px; }
  .predict-card { padding: 18px; }
  .score-box { padding: 12px; }
  .score-team { min-height: 40px; font-size: 12px; }
  .score-number,
  .score-box input { height: 76px; font-size: 46px; }
  .empty-state-img { width: min(190px, 58vw); }
}

@media (max-width: 430px) {
  .match-teams { grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr); }
  .team.home, .team.away { justify-content: center; text-align: center; }
  .team-name { max-width: 112px; }
  .score-picker { grid-template-columns: 1fr; }
  .colon { line-height: .5; }
  .score-box input { height: 72px; }
}

/* MOBILE POLISH 03: compact density pass */
.pick-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.pick-status { align-self: start; }
.pick-meta { color: var(--muted-dark); font-size: 12px; font-weight: 800; }

@media (max-width: 820px) {
  body.has-mobile-nav { padding-bottom: 72px; }
  .topbar {
    min-height: 58px;
    padding: 7px 12px;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }
  .brand-main { font-size: 12px; }
  .brand-accent { font-size: 10px; }
  .topbar-account { gap: 7px; }
  .logout-form .ghost {
    min-height: 36px;
    padding-inline: 10px;
    font-size: 12px;
  }
  .page { padding-top: 14px; }
  .hero, .page-header { padding: 2px 2px 13px; }
  .hero p, .page-subtitle { font-size: 14px; }

  .filter-tabs { margin-bottom: 10px; gap: 7px; }
  .filter-pill { min-height: 34px; padding: 0 12px; font-size: 11px; }

  .match-list { gap: 9px; }
  .match-card {
    gap: 9px;
    padding: 11px 12px;
    border-radius: 13px;
  }
  .match-meta { gap: 2px; font-size: 11px; }
  .match-time { font-size: 17px; }
  .match-teams { gap: 6px; }
  .team { gap: 6px; font-size: 13px; }
  .team-flag { width: 28px; height: 28px; font-size: 15px; }
  .versus-pill { height: 25px; font-size: 10px; }
  .match-action {
    gap: 8px;
    padding-top: 9px;
  }
  .match-score { font-size: 20px; }
  .badge { min-height: 23px; font-size: 10px; padding: 0 8px; }
  .match-card .button,
  .match-card .ghost {
    min-height: 40px;
    min-width: 92px;
    padding-inline: 12px;
    font-size: 11px;
  }

  .pick-list { gap: 9px; }
  .pick-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 11px 12px;
    border-radius: 13px;
  }
  .pick-main { gap: 8px; }
  .pick-teams { gap: 4px; }
  .pick-teams .team { justify-content: flex-start; text-align: left; }
  .pick-status { white-space: nowrap; }
  .pick-meta { font-size: 11px; }
  .pick-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    text-align: left;
    justify-items: stretch;
    padding-top: 7px;
    border-top: 1px solid #e6edf5;
  }
  .pick-score strong { font-size: 20px; }

  .admin-grid, .stats { gap: 10px; }
  .admin-tile, .stats div {
    min-height: 92px;
    padding: 12px;
    gap: 5px;
    border-radius: 14px;
  }
  .tile-icon { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; }
  .tile-number, .stats span { font-size: 27px; }
  .tile-title { font-size: 14px; }
  .tile-desc { font-size: 12px; line-height: 1.25; }

  .empty-state { padding: 20px 14px; gap: 9px; }
  .empty-state-img { width: min(160px, 52vw); }
  .trophy-accent { width: 58px; height: 58px; }
}

@media (max-width: 430px) {
  .topbar { min-height: 54px; padding: 6px 10px; }
  .brand-mark { width: 32px; height: 32px; }
  .logout-form .ghost { min-height: 34px; padding-inline: 9px; }
  .page { padding: 12px 10px 18px; }
  .hero h1, .page-title, .card h1 { font-size: 28px; }
  .match-card { padding: 10px; gap: 8px; }
  .match-teams { gap: 5px; }
  .team-name { max-width: 104px; }
  .match-action { grid-template-columns: 1fr auto; }
  .pick-score { flex-direction: row; }
  .admin-grid, .stats { grid-template-columns: 1fr; }
  .admin-tile, .stats div { min-height: 82px; }
  .mobile-bottom-nav { height: 62px; }
  .mobile-bottom-nav a { font-size: 10px; }
  .mobile-bottom-nav .icon { font-size: 16px; }
}

/* UI POLISH 02: card rhythm and consistency pass */
.topbar { min-height: 72px; padding: 12px 18px; }
.nav-tabs { gap: 6px; }
.nav-link { padding: 0 13px; font-size: 12px; }

.match-card {
  grid-template-columns: 148px minmax(360px, 500px) 138px;
  justify-content: center;
  column-gap: 18px;
}
.match-teams {
  width: min(100%, 480px);
  grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
  gap: 8px;
}
.match-action { padding-left: 14px; }
.team-name { max-width: 170px; }
.badge { border-radius: 8px; }
.button, .ghost { min-height: 39px; }

.pick-card {
  min-height: 86px;
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(220px, 1fr) minmax(180px, auto);
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  background: #fff;
  color: var(--text-dark);
  border: 1px solid #dce4ee;
  border-radius: 15px;
  box-shadow: 0 14px 30px rgba(6,17,31,.18);
  position: relative;
  overflow: hidden;
  max-width: 100%;
}
.pick-card,
.pick-card * {
  min-width: 0;
}
.pick-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--blue);
}
.pick-main { display: block; }
.pick-main,
.pick-score {
  max-width: 100%;
}
.pick-card .pick-teams {
  display: grid;
  width: min(100%, 480px);
  grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  justify-self: center;
}
.pick-card .pick-teams .team:first-child { justify-content: flex-end; text-align: right; }
.pick-card .pick-teams .team:last-child { justify-content: flex-start; text-align: left; }
.pick-meta {
  display: grid;
  gap: 4px;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 800;
}
.pick-meta strong { color: #334155; font-size: 13px; }
.pick-score {
  display: grid;
  justify-items: end;
  gap: 6px;
  text-align: right;
  border-left: 1px solid #e6edf5;
  padding-left: 14px;
}
.pick-score > span {
  max-width: 100%;
}
.pick-score strong { font-size: 23px; color: #0f172a; }
.pick-status { width: fit-content; justify-self: end; }
.pick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  max-width: 100%;
}
.pick-actions a,
.pick-actions button {
  max-width: 100%;
  white-space: normal;
}
.pick-edit-link,
.pick-detail-link {
  min-height: 38px;
  padding: 9px 13px;
}
.pick-closed-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.ranking-empty { max-width: 460px; padding: 28px 22px; }
.ranking-empty-img {
  width: clamp(96px, 18vw, 132px);
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(245,158,11,.23));
}

.admin-grid { align-items: stretch; }
.admin-tile {
  min-height: 164px;
  grid-template-rows: auto auto auto 1fr auto;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.admin-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(34,197,94,.55);
  box-shadow: 0 14px 34px rgba(15,23,42,.14);
}
.tile-number-subtle { font-size: 28px; color: #334155; letter-spacing: .02em; }
.tile-action {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.predict-card { padding: 22px; }
.predict-summary { margin-bottom: 14px; }
.score-picker { gap: 10px; }
.colon { font-size: 42px; color: #0f172a; text-shadow: 0 1px 0 #fff; }
.score-step { min-height: 44px; }

.rules-card { max-width: 640px; }
.rules-card .table-card table { min-width: 0; }

@media (max-width: 820px) {
  .topbar { min-height: 56px; padding: 7px 12px; }
  .nav-link { font-size: 12px; }
  .match-card { grid-template-columns: 1fr; column-gap: 0; }
  .match-teams { width: 100%; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr); }
  .team-name { max-width: 118px; }
  .pick-card {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 11px 12px;
  }
  .pick-card .pick-teams {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
    gap: 6px;
  }
  .pick-meta { font-size: 11px; }
  .pick-score {
    display: grid;
    justify-content: stretch;
    text-align: left;
    justify-items: start;
    border-left: 0;
    border-top: 1px solid #e6edf5;
    padding: 7px 0 0;
    width: 100%;
  }
  .pick-score strong { font-size: 20px; }
  .pick-status { justify-self: auto; }
  .ranking-empty { padding: 22px 16px; }
  .ranking-empty-img { width: 108px; }
  .admin-tile { min-height: 96px; grid-template-rows: auto; }
  .tile-action { font-size: 11px; }
  .score-step { min-height: 42px; }
}

@media (max-width: 430px) {
  .match-teams,
  .pick-card .pick-teams { grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); }
  .team-name { max-width: 100px; }
  .pick-score { gap: 7px; }
  .ranking-empty-img { width: 96px; }
}

/* MOBILE POLISH 03: final 390px app-density pass */
@media (max-width: 700px) {
  body.has-mobile-nav {
    padding-bottom: 78px;
  }

  .topbar {
    min-height: 66px;
    padding: 8px 12px;
    gap: 8px;
  }

  .brand {
    min-width: 0;
    gap: 9px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    flex: 0 0 40px;
  }

  .brand-main {
    font-size: 12px;
    letter-spacing: .04em;
    line-height: 1.05;
  }

  .brand-accent {
    font-size: 10px;
    line-height: 1;
  }

  .topbar-account {
    gap: 7px;
  }

  .topbar-account .user-chip {
    display: none;
  }

  .logout-form .ghost {
    min-height: 40px;
    padding-inline: 11px;
    font-size: 12px;
    border-radius: 12px;
  }

  .page {
    padding: 14px 12px 20px;
  }

  .page::before {
    height: 145px;
    opacity: .42;
  }

  .hero,
  .page-header {
    padding: 2px 2px 12px;
    margin-bottom: 4px;
  }

  .hero h1,
  .page-title,
  .card h1 {
    font-size: clamp(30px, 8.5vw, 34px);
    line-height: 1.04;
    margin-bottom: 6px;
  }

  .hero p,
  .page-subtitle {
    font-size: 15px;
    line-height: 1.35;
  }

  .filter-tabs {
    gap: 10px;
    margin: 0 -2px 12px;
    padding: 0 2px 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-pill {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 13px;
    flex: 0 0 auto;
  }

  .match-list,
  .pick-list {
    gap: 10px;
  }

  .match-card {
    padding: 11px 12px;
    gap: 9px;
    border-radius: 14px;
  }

  .match-meta {
    gap: 2px;
    font-size: 11px;
    line-height: 1.25;
  }

  .match-time {
    font-size: 17px;
    line-height: 1.15;
  }

  .match-teams {
    grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
    gap: 6px;
  }

  .team {
    gap: 6px;
    font-size: 13px;
  }

  .team-flag {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  .team-name {
    max-width: 112px;
  }

  .versus-pill {
    width: 30px;
    height: 24px;
    font-size: 10px;
  }

  .match-action {
    gap: 8px;
    padding: 9px 0 0;
    grid-template-columns: 1fr auto;
  }

  .match-score {
    font-size: 20px;
    line-height: 1;
  }

  .badge {
    min-height: 23px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 10px;
  }

  .match-card .button,
  .match-card .ghost,
  .button,
  .ghost {
    min-height: 42px;
    border-radius: 12px;
  }

  .pick-card {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 11px 12px;
    border-radius: 14px;
  }

  .pick-card::before {
    width: 3px;
  }

  .pick-meta {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.25;
  }

  .pick-meta strong {
    font-size: 11px;
    color: #475569;
    white-space: nowrap;
  }

  .pick-main {
    order: 1;
  }

  .pick-card .pick-teams {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
    gap: 5px;
  }

  .pick-card .pick-teams .team:first-child {
    justify-content: flex-end;
    text-align: right;
  }

  .pick-card .pick-teams .team:last-child {
    justify-content: flex-start;
    text-align: left;
  }

  .pick-score {
    order: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 7px;
    text-align: left;
    border-left: 0;
    border-top: 1px solid #e6edf5;
    padding: 7px 0 0;
    width: 100%;
  }

  .pick-status {
    grid-column: 1 / -1;
    width: fit-content;
    justify-self: start;
    white-space: nowrap;
  }

  .pick-score > span:not(.badge):not(.muted) {
    grid-column: 1 / -1;
    font-size: 12px;
    color: #475569;
  }

  .pick-score strong {
    display: inline-block;
    margin-left: 4px;
    font-size: 19px;
    line-height: 1;
  }

  .pick-score .muted {
    grid-column: 1 / -1;
    font-size: 11px;
  }

  .pick-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
    width: 100%;
  }

  .pick-actions a,
  .pick-actions button,
  .pick-edit-link {
    flex: 1 1 118px;
    text-align: center;
  }

  .predict-card {
    padding: 16px;
    border-radius: 16px;
  }

  .predict-summary {
    margin-bottom: 11px;
  }

  .score-picker {
    gap: 8px;
  }

  .score-box {
    gap: 8px;
  }

  .score-box input {
    height: 72px;
    font-size: 40px;
    border-radius: 14px;
  }

  .score-step {
    min-height: 44px;
    border-radius: 12px;
  }

  .colon {
    font-size: 38px;
    line-height: 1;
  }

  .empty-state {
    padding: 18px 14px;
    gap: 8px;
    border-radius: 16px;
  }

  .empty-state-img {
    width: min(130px, 44vw);
  }

  .ranking-empty {
    max-width: none;
    padding: 20px 14px;
  }

  .ranking-empty-img {
    width: 104px;
    max-width: 32vw;
  }

  .trophy-accent {
    width: 54px;
    height: 54px;
  }

  .admin-grid,
  .stats {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .admin-tile,
  .stats div {
    min-height: 78px;
    padding: 11px 12px;
    gap: 4px;
    border-radius: 14px;
  }

  .tile-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 17px;
  }

  .tile-number,
  .tile-number-subtle,
  .stats span {
    font-size: 24px;
    line-height: 1;
  }

  .tile-title {
    font-size: 14px;
  }

  .tile-desc {
    font-size: 12px;
    line-height: 1.25;
  }

  .tile-action {
    font-size: 10px;
    line-height: 1.1;
  }

  .rules-card,
  .table-card,
  .card {
    border-radius: 16px;
  }

  .mobile-bottom-nav {
    height: 62px;
    padding: 6px 8px 7px;
  }

  .mobile-bottom-nav a {
    gap: 2px;
    font-size: 10px;
    line-height: 1.1;
  }

  .mobile-bottom-nav .icon {
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
  }
}

@media (max-width: 390px) {
  .brand-main {
    font-size: 11px;
  }

  .brand-accent {
    font-size: 9px;
  }

  .team-name {
    max-width: 96px;
  }

  .match-card,
  .pick-card {
    padding-inline: 10px;
  }
}

/* MOBILE NAV ICON POLISH 04: inline SVG rhythm and clean scrollable filters */
@media (max-width: 700px) {
  .filter-tabs {
    padding-right: max(18px, env(safe-area-inset-right));
    scroll-padding-right: 18px;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .filter-tabs::after {
    content: "";
    flex: 0 0 2px;
  }

  .mobile-bottom-nav {
    height: 62px;
    align-items: stretch;
  }

  .mobile-bottom-nav a {
    min-width: 0;
    grid-template-rows: 24px auto;
    align-content: center;
    justify-items: center;
    padding-top: 3px;
  }

  .mobile-bottom-nav .icon,
  .mobile-bottom-nav .bottom-nav-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: currentColor;
  }

  .mobile-bottom-nav .bottom-nav-icon svg {
    width: 22px;
    height: 22px;
    display: block;
    flex: 0 0 auto;
    stroke: currentColor;
  }
}

/* TEAM ROW POLISH 07: flag-before-name rhythm */
.match-teams,
.predict-teams,
.pick-card .pick-teams,
.match-admin-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.team-side,
.team-side.team,
.team-side.team.home,
.team-side.team.away {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  max-width: min(46%, 230px);
  text-align: left;
}

.team-side .team-flag {
  flex: 0 0 auto;
}

.team-side .team-name {
  min-width: 0;
  max-width: none;
  font-weight: 900;
  line-height: 1.15;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.match-admin-teams {
  width: min(100%, 540px);
}

@media (max-width: 700px) {
  .match-teams,
  .predict-teams,
  .pick-card .pick-teams,
  .match-admin-teams {
    gap: 8px;
  }

  .team-side,
  .team-side.team,
  .team-side.team.home,
  .team-side.team.away {
    gap: 6px;
    max-width: calc((100% - 42px) / 2);
  }

  .team-side .team-name {
    font-size: 13px;
    line-height: 1.15;
  }
}

@media (max-width: 390px) {
  .match-teams,
  .predict-teams,
  .pick-card .pick-teams,
  .match-admin-teams {
    gap: 6px;
  }

  .team-side,
  .team-side.team,
  .team-side.team.home,
  .team-side.team.away {
    gap: 5px;
    max-width: calc((100% - 38px) / 2);
  }
}

.scoring-settings-card,
.scoring-preview-card {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.scoring-head p { margin: 4px 0 0; }
.scoring-form { display: grid; gap: 16px; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.settings-textarea {
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: #172033;
}
.settings-textarea textarea {
  min-height: 150px;
  line-height: 1.5;
  font-weight: 600;
}
.settings-switches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #f8fafc;
}
.check-row input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  accent-color: var(--primary);
}
.scoring-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.scoring-preview-table table { min-width: 0; }
.scoring-rules-card .info-box { margin: 14px 0; }
.scoring-guide {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}
.scoring-guide h2 {
  margin: 0;
  color: #0f172a;
  font-size: 24px;
}
.scoring-guide p {
  margin: 0;
  line-height: 1.55;
}
.rule-block {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #f8fafc;
}
.rule-block h3 {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
}
.rules-copy-block {
  display: grid;
  gap: 8px;
}
.rules-copy-block p {
  margin: 0;
}
.example-line {
  color: #334155;
  font-size: 14px;
}
.prize-settings-card { border-color: rgba(34,197,94,.28); }
.prize-calculator-result {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  background: #f0fdf4;
  color: #14532d;
}
.prize-calculator-result h3 {
  margin: 0 0 4px;
  color: #052e16;
  font-size: 18px;
}
.prize-calculator-result p { margin: 0; }
.prize-calculator-result hr {
  width: 100%;
  border: 0;
  border-top: 1px solid #bbf7d0;
  margin: 6px 0;
}
.prize-rules-card {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.prize-rules-card h1 { margin-bottom: 0; }
.prize-rules-card h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 18px;
}
.prize-contribution {
  grid-template-columns: auto 1fr;
  align-items: center;
}
.rules-note {
  white-space: pre-line;
  color: #334155;
  line-height: 1.6;
}
.tie-breaker-note {
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}
.prize-tie-note {
  border-top: 1px solid #e2e8f0;
  padding-top: 14px;
}

@media (max-width: 700px) {
  .settings-grid,
  .settings-switches {
    grid-template-columns: 1fr;
  }
  .scoring-actions .button {
    width: 100%;
  }
  .prize-contribution {
    grid-template-columns: 1fr;
  }
}

.onboarding-card,
.pick-progress-card,
.pick-count-card {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
.onboarding-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.onboarding-card h2,
.nearest-section h2,
.pick-progress-card strong,
.pick-count-card strong {
  margin: 0;
  color: var(--text-dark);
}
.onboarding-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pick-progress-card {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 280px);
  align-items: center;
}
.next-match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  border-color: rgba(34,197,94,.28);
  background:
    linear-gradient(135deg, rgba(16,185,129,.12), rgba(255,255,255,.96) 42%),
    #fff;
}
.next-match-card h2 {
  margin: 0;
  color: var(--text-dark);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -.04em;
}
.next-match-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.next-match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}
.next-match-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
}
.next-countdown {
  color: #14532d;
  border-color: #bbf7d0!important;
  background: #f0fdf4!important;
}
.next-match-action {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}
.next-closed-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.pick-progress-card strong,
.pick-count-card strong {
  display: block;
  font-size: 22px;
  letter-spacing: -.03em;
}
.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
}
.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
}
.nearest-section {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}
.nearest-list { gap: 10px; }
.match-card-compact {
  padding-top: 12px;
  padding-bottom: 12px;
}
.match-cutoff {
  display: inline-flex;
  margin-top: 4px;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 900;
}
.match-teams-link,
.match-detail-link {
  color: inherit;
  text-decoration: none;
}
.match-teams-link:hover .team-name,
.match-detail-link:hover {
  text-decoration: underline;
}
.match-detail-link {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}
.detail-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.match-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  border-color: rgba(34,197,94,.28);
}
.match-detail-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.match-detail-copy h1 {
  margin: 0;
  color: var(--text-dark);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.02;
}
.match-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.match-detail-meta > span:not(.badge) {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}
.match-detail-result {
  min-width: 140px;
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}
.match-detail-result strong,
.your-pick-score {
  margin: 0;
  color: #0f172a;
  font-size: 38px;
  font-weight: 1000;
  line-height: 1;
}
.match-detail-card {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}
.match-detail-card h2 {
  margin: 4px 0 0;
  color: var(--text-dark);
}
.match-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.public-picks-card .section-heading {
  margin-bottom: 8px;
}
.public-picks-table table {
  min-width: 0;
}
.compact-empty {
  padding: 18px;
  border: 1px dashed rgba(255,255,255,.22);
  border-radius: 18px;
  color: #d8e4f3;
  background: rgba(255,255,255,.06);
}
.filter-empty {
  margin-top: 12px;
  background: rgba(255,255,255,.94);
  border: 1px solid #dbe4ef;
  border-radius: 16px;
}
.user-row .badge + .badge {
  margin-left: 6px;
}

@media (max-width: 700px) {
  .onboarding-card,
  .pick-progress-card,
  .next-match-card {
    grid-template-columns: 1fr;
  }
  .champion-banner,
  .champion-my-pick-card,
  .champion-pick-head,
  .champion-admin-lists {
    grid-template-columns: 1fr;
  }
  .champion-banner-action,
  .champion-my-pick-action,
  .champion-pick-actions,
  .champion-admin-actions {
    justify-content: stretch;
  }
  .champion-banner-action .button,
  .champion-banner-action .ghost,
  .champion-my-pick-action .button,
  .champion-my-pick-action .ghost,
  .champion-pick-actions .button,
  .champion-pick-actions .ghost,
  .champion-admin-actions .button,
  .champion-admin-actions .ghost {
    width: 100%;
  }
  .champion-status-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .champion-status-row strong {
    text-align: left;
  }
  .modal-panel {
    padding: 18px;
    border-radius: 16px;
  }
  .modal-panel h2 {
    font-size: 22px;
  }
  .final-results-panel {
    max-height: calc(100dvh - 24px);
    padding: 16px;
  }
  .final-results-header {
    gap: 10px;
  }
  .final-results-trophy {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    font-size: 23px;
  }
  .final-results-champion {
    grid-template-columns: 1fr;
  }
  .final-results-champion strong {
    grid-row: auto;
  }
  .final-results-place {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    font-size: 13px;
  }
  .final-results-actions {
    bottom: -16px;
    margin: 0 -16px -16px;
    padding: 12px 16px 16px;
  }
  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .modal-actions .button,
  .modal-actions .ghost,
  .modal-actions form {
    width: 100%;
  }
  .onboarding-actions {
    justify-content: stretch;
  }
  .next-match-action {
    justify-content: stretch;
  }
  .next-match-action .button,
  .next-match-action .ghost {
    width: 100%;
  }
  .match-detail-hero {
    grid-template-columns: 1fr;
  }
  .match-detail-result {
    justify-items: start;
    text-align: left;
  }
  .match-detail-actions {
    justify-content: stretch;
  }
  .match-detail-actions .button,
  .match-detail-actions .ghost {
    width: 100%;
  }
  .onboarding-actions a {
    flex: 1 1 130px;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .pick-progress-card strong,
  .pick-count-card strong {
    font-size: 19px;
  }
  .match-cutoff {
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .pick-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
  }

  .pick-actions a,
  .pick-actions button,
  .pick-edit-link {
    width: 100%;
    flex-basis: auto;
    text-align: center;
  }

  .pick-closed-label {
    width: 100%;
    padding-top: 2px;
  }
}

/* MOBILE OVERFLOW FIX 23 */
.page,
.card,
.table-card,
.match-card,
.pick-card,
.ranking-table,
.podium-card {
  max-width: 100%;
}

.card *,
.match-card *,
.pick-card *,
.ranking-table *,
.podium-card * {
  min-width: 0;
}

.team-name,
.podium-name,
.ranking-table td,
.ranking-table th,
.pick-meta,
.pick-score,
.pick-closed-label {
  overflow-wrap: anywhere;
}

.ranking-table {
  overflow-x: hidden;
}

.ranking-table table {
  table-layout: auto;
}

.ranking-table td strong {
  overflow-wrap: anywhere;
}

.ranking-mobile-list {
  display: none;
}

@media (max-width: 640px) {
  .pick-list {
    max-width: 100%;
  }

  .pick-card {
    width: 100%;
    overflow: hidden;
  }

  .pick-card .pick-teams {
    width: 100%;
    justify-self: stretch;
  }

  .pick-card .team {
    max-width: 100%;
  }

  .pick-card .team-name {
    max-width: 100%;
    white-space: normal;
  }

  .pick-score {
    width: 100%;
    justify-items: stretch;
    text-align: left;
  }

  .pick-score > span {
    justify-self: start;
  }

  .pick-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pick-actions a,
  .pick-actions button {
    min-width: 0;
    width: 100%;
  }

  .ranking-heading {
    overflow: hidden;
  }

  .podium {
    width: 100%;
    max-width: 100%;
  }

  .podium-card {
    padding-inline: 6px;
  }

  .podium-name,
  .podium-points {
    max-width: 100%;
    font-size: 12px;
    line-height: 1.2;
  }

  .ranking-table {
    display: none;
  }

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

  .ranking-mobile-row {
    display: grid;
    gap: 7px;
    max-width: 100%;
    overflow: hidden;
    padding: 10px 11px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    background: rgba(8,19,32,.72);
    color: #e5edf8;
  }

  .ranking-mobile-row.current-user {
    background: rgba(34,197,94,.18);
  }

  .ranking-mobile-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    min-width: 0;
  }

  .ranking-mobile-place {
    color: var(--primary);
    font-weight: 1000;
    white-space: nowrap;
  }

  .ranking-mobile-player {
    min-width: 0;
    font-weight: 900;
    overflow-wrap: anywhere;
  }

  .ranking-mobile-points {
    color: #fff;
    font-weight: 1000;
    white-space: nowrap;
  }

  .ranking-mobile-tie {
    justify-self: start;
  }

  .ranking-mobile-details {
    min-width: 0;
  }

  .ranking-mobile-details summary {
    width: fit-content;
    cursor: pointer;
    color: #a8b7cc;
    font-size: 12px;
    font-weight: 900;
  }

  .ranking-mobile-details[open] summary {
    margin-bottom: 6px;
  }

  .ranking-mobile-stats {
    display: grid;
    gap: 4px;
    max-width: 100%;
    color: #cbd5e1;
    font-size: 12px;
  }

  .ranking-mobile-stats span {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
  }
}

@media (max-width: 380px) {
  .podium {
    gap: 6px;
  }

  .podium-card {
    border-radius: 14px;
  }

  .podium-first .medal,
  .medal {
    width: 46px;
    height: 46px;
    font-size: 20px;
  }
}

/* GROUP TABLES PAGE 30 */
.groups-heading {
  max-width: 820px;
}

.groups-note {
  margin-bottom: 16px;
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 16px;
}

.group-card {
  display: grid;
  gap: 14px;
}

.group-card-heading {
  margin-bottom: 0;
}

.group-card-heading h2 {
  margin: 2px 0 0;
  color: var(--text-dark);
}

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

.group-table {
  min-width: 0;
  table-layout: auto;
}

.group-table th,
.group-table td {
  padding: 10px 8px;
  white-space: nowrap;
}

.group-table th:nth-child(2),
.group-table td:nth-child(2) {
  white-space: normal;
  min-width: 120px;
}

.group-matches {
  display: grid;
  gap: 8px;
}

.group-matches h3 {
  margin: 4px 0 0;
  color: var(--text-dark);
}

.group-match-row {
  display: grid;
  gap: 5px;
  padding: 10px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--text-dark);
  text-decoration: none;
}

.group-match-row:hover {
  border-color: rgba(34,197,94,.55);
}

.group-match-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.group-match-teams strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.group-match-teams strong:first-child {
  text-align: right;
}

.group-match-score {
  min-width: 44px;
  font-weight: 1000;
  text-align: center;
  white-space: nowrap;
}

.group-match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  color: var(--muted-dark);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 700px) {
  .groups-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .group-card {
    padding: 14px;
    border-radius: 16px;
  }

  .group-table,
  .group-table thead,
  .group-table tbody,
  .group-table tr,
  .group-table td {
    display: block;
    width: 100%;
  }

  .group-table thead {
    display: none;
  }

  .group-table tbody {
    display: grid;
    gap: 8px;
  }

  .group-table tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 4px 8px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
  }

  .group-table td {
    padding: 0;
    border-bottom: 0;
    text-align: left;
    white-space: normal;
  }

  .group-table td[data-label="Miejsce"] {
    grid-row: 1 / span 2;
    color: var(--primary-dark);
    font-weight: 1000;
  }

  .group-table td[data-label="Drużyna"] {
    font-weight: 900;
    overflow-wrap: anywhere;
  }

  .group-table td[data-label="Pkt"] {
    justify-self: end;
    font-size: 18px;
  }

  .group-table td[data-label="M"],
  .group-table td[data-label="W"],
  .group-table td[data-label="R"],
  .group-table td[data-label="P"],
  .group-table td[data-label="Bramki"],
  .group-table td[data-label="+/-"] {
    display: inline-flex;
    gap: 4px;
    color: var(--muted-dark);
    font-size: 12px;
  }

  .group-table td[data-label="M"]::before,
  .group-table td[data-label="W"]::before,
  .group-table td[data-label="R"]::before,
  .group-table td[data-label="P"]::before,
  .group-table td[data-label="Bramki"]::before,
  .group-table td[data-label="+/-"]::before {
    content: attr(data-label) ":";
    font-weight: 900;
  }

  .group-table td[data-label="M"] {
    grid-column: 2;
  }

  .group-table td[data-label="W"],
  .group-table td[data-label="R"],
  .group-table td[data-label="P"],
  .group-table td[data-label="Bramki"],
  .group-table td[data-label="+/-"] {
    grid-column: 2 / -1;
  }

  .group-match-teams {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .group-match-teams strong:first-child {
    text-align: center;
  }
}
