:root {
  color-scheme: light;
  --bg: #eef5ff;
  --panel: #ffffff;
  --panel-soft: #f4f7fb;
  --ink: #0c172b;
  --muted: #667085;
  --line: #cfd8e3;
  --line-soft: #e6edf5;
  --blue: #2563eb;
  --blue-soft: #e7efff;
  --green: #059669;
  --green-soft: #dcfce7;
  --red: #dc2626;
  --amber: #f59e0b;
  --gold: #facc15;
  --charcoal: #08111f;
  --shadow: 0 20px 44px rgba(15, 23, 42, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
}

.app-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  align-items: end;
  gap: 24px;
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--line);
}

.title-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 16px;
}

.header-icon {
  width: 92px;
  height: 92px;
  object-fit: contain;
  flex: 0 0 auto;
}

.eyebrow,
.section-kicker {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 720px;
  margin-bottom: 0;
  font-size: 3.15rem;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0;
}

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

.header-stats span {
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.84rem;
}

.header-stats strong {
  display: block;
  color: var(--ink);
  font-size: 1.55rem;
  line-height: 1;
}

.panel,
.pots-section {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section-toolbar,
.draw-actions,
.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.toolbar-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.names-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.name-field {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  min-height: 50px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.name-field:focus-within {
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14);
}

.name-field span {
  display: grid;
  align-self: stretch;
  place-items: center;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.name-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 12px;
  color: var(--ink);
}

.name-field input::placeholder {
  color: #98a2b3;
}

.draw-actions {
  margin-top: 18px;
}

.status {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.status[data-tone="error"] {
  color: var(--red);
}

.status[data-tone="success"] {
  color: var(--green);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 14px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease;
}

.button:hover:not(:disabled) {
  border-color: rgba(37, 99, 235, 0.35);
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.button.primary {
  border-color: #1744b0;
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(29, 78, 216, 0.22);
}

.button.ghost {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.button.ghost:hover:not(:disabled) {
  border-color: #b8c2d0;
  background: #f8fafc;
}

.file-button {
  position: relative;
}

.file-button input {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.api-actions {
  align-items: end;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 196px;
  margin-top: 18px;
  border: 1px dashed #c4ccd8;
  border-radius: var(--radius);
  background: #fbfcfe;
  color: var(--muted);
  text-align: center;
}

.empty-state.compact {
  min-height: 150px;
}

.empty-state[hidden] {
  display: none;
}

.empty-state p {
  margin: 10px 0 0;
  font-weight: 800;
}

.empty-ball {
  width: 52px;
  height: 52px;
  border: 3px solid #111827;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #111827 0 14%, transparent 15%),
    conic-gradient(from 20deg, #ffffff 0 18%, #e8edf6 18% 25%, #ffffff 25% 47%, #e8edf6 47% 54%, #ffffff 54% 78%, #e8edf6 78% 85%, #ffffff 85%);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.result-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.participant-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.participant-row>span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.participant-row h3 {
  overflow-wrap: anywhere;
}

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

.assigned-team {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--pot-color);
  border-radius: var(--radius);
  background: var(--pot-soft);
}

.pot-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.team-result,
.team-score {
  grid-template-columns: 42px minmax(0, 1fr);
}

.flag-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 34px;
  overflow: visible;
  border-radius: 3px;
  background: transparent;
}

.team-result .flag-wrap,
.team-score .flag-wrap {
  width: 42px;
  height: 38px;
}

.flag-wrap img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 2px;
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.2),
    0 1px 4px rgba(15, 23, 42, 0.16);
}

.flag-fallback {
  display: none;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
}

.flag-wrap img[hidden]+.flag-fallback {
  display: block;
}

.team-meta {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.team-meta strong,
.team-meta small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-meta strong {
  font-size: 0.93rem;
}

.team-result .team-meta strong,
.team-score .team-meta strong {
  font-size: 0.98rem;
}

.team-meta small {
  color: var(--muted);
  font-size: 0.76rem;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.rule-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 52px;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.rule-card span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.rule-card strong {
  color: var(--green);
  font-size: 1.15rem;
}

.rule-card-active span {
  color: var(--ink);
}

.table-wrap {
  width: 100%;
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.league-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.league-table th,
.league-table td {
  padding: 12px 11px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}

.league-table th {
  background: #111827;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.league-table tbody tr:last-child td {
  border-bottom: 0;
}

.league-table td:nth-child(1),
.league-table td:nth-child(3),
.league-table td:nth-child(4),
.league-table td:nth-child(5),
.league-table td:nth-child(6),
.league-table th:nth-child(1),
.league-table th:nth-child(3),
.league-table th:nth-child(4),
.league-table th:nth-child(5),
.league-table th:nth-child(6) {
  text-align: center;
}

.table-empty {
  color: var(--muted);
  font-weight: 800;
  text-align: center !important;
}

.scorecards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.score-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--pot-color);
  border-radius: var(--radius);
  background: #ffffff;
}

.score-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.owner-pill {
  max-width: 110px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-controls {
  display: grid;
  grid-template-columns: 70px 70px minmax(0, 1fr);
  gap: 8px;
}

.score-controls label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.score-controls input,
.score-controls select {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
}

.score-controls input {
  padding: 0 8px;
  text-align: center;
}

.score-controls select {
  padding: 0 9px;
}

.team-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: var(--pot-soft);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.team-total strong {
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
}

.pots-heading {
  margin-bottom: 16px;
}

.source-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
}

.pots-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pot-column {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
}

.pot-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.pot-title h2 {
  font-size: 1rem;
}

.pot-title>span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.pot-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--pot-color);
}

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

.pot-team {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #ffffff;
}

.pot-1 {
  --pot-color: #1d4ed8;
  --pot-soft: #e8f0ff;
}

.pot-2 {
  --pot-color: #047857;
  --pot-soft: #e9f8f1;
}

.pot-3 {
  --pot-color: #b45309;
  --pot-soft: #fff6e8;
}

.pot-4 {
  --pot-color: #7c3aed;
  --pot-soft: #f1ecff;
}

.pot-5 {
  --pot-color: #be123c;
  --pot-soft: #fff0f3;
}

.pot-6 {
  --pot-color: #0e7490;
  --pot-soft: #e7f8fb;
}

.pot-7 {
  --pot-color: #4d7c0f;
  --pot-soft: #f1f8e7;
}

.pot-8 {
  --pot-color: #475569;
  --pot-soft: #f1f5f9;
}

.public-shell .app-header {
  align-items: center;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
}

.nav-link.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.mobile-quick-nav {
  display: none;
}

.section-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.compact-panel {
  box-shadow: none;
}

.public-table {
  min-width: 680px;
}

.public-table td:nth-child(2),
.public-table th:nth-child(2),
.public-table td:nth-child(4),
.public-table th:nth-child(4) {
  text-align: left;
}

.rank-badge {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.participant-cell {
  min-width: 220px;
}

.participant-cell strong,
.participant-cell small {
  display: block;
}

.participant-cell small {
  max-width: 520px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.points-cell {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 900;
}

.participant-summary-grid,
.fixture-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.participant-summary-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.participant-card-header,
.selected-teams-header,
.fixture-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.participant-card-header span,
.selected-teams-header span,
.fixture-group-title span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.team-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px 7px;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.team-chip .flag-wrap {
  width: 24px;
  height: 20px;
}

.team-chip span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-chip strong {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--blue);
  font-size: 0.78rem;
}

.fixture-actions {
  align-items: end;
}

.select-control {
  display: grid;
  min-width: 220px;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.select-control select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  text-transform: none;
}

.matchweek-control {
  display: grid;
  grid-template-columns: 42px minmax(160px, auto) 42px;
  align-items: end;
  gap: 8px;
}

.matchweek-control>span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 900;
  white-space: nowrap;
}

.matchweek-arrow {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink);
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease;
}

.matchweek-arrow:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.matchweek-arrow[data-hidden="true"] {
  visibility: hidden;
}

.selected-teams {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--panel-soft);
}

.fixture-groups {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.fixture-group {
  display: grid;
  gap: 10px;
}

.fixture-group-title {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.fixture-list {
  display: grid;
  gap: 10px;
}

.fixture-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-left: 4px solid #98a2b3;
  border-radius: var(--radius);
  padding: 12px;
  background: #ffffff;
}

.fixture-card.compact {
  grid-template-columns: 1fr;
}

.fixture-card.status-live {
  border-left-color: var(--red);
}

.fixture-card.status-upcoming {
  border-left-color: var(--blue);
}

.fixture-card.status-finished {
  border-left-color: var(--green);
}

.fixture-meta {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
}

.fixture-meta strong,
.fixture-meta span {
  min-width: 0;
}

.fixture-meta strong {
  font-size: 0.9rem;
}

.fixture-meta span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.fixture-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.fixture-team {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.fixture-team-home {
  justify-items: end;
  text-align: right;
}

.team-fixture {
  grid-template-columns: 34px minmax(0, 1fr);
}

.fixture-team-home .team-fixture {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.fixture-team-home .team-fixture .flag-wrap {
  grid-column: 2;
  grid-row: 1;
}

.fixture-team-home .team-fixture .team-meta {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
}

.team-fixture .flag-wrap {
  width: 34px;
  height: 28px;
}

.team-fixture .team-meta strong {
  font-size: 0.9rem;
}

.team-fixture .team-meta small {
  display: none;
}

.fixture-team-home .team-fixture .team-meta strong {
  text-align: right;
}

.fixture-team-home .owner-tag {
  justify-self: end;
  transform: translateX(calc((100% - 34px) / 2));
}

.fixture-team-away .owner-tag {
  justify-self: start;
  transform: translateX(calc((34px - 100%) / 2));
}

.owner-tag {
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixture-score {
  display: grid;
  place-items: center;
  gap: 5px;
}

.fixture-score strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.status-pill {
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-align: center;
}

.status-live .status-pill {
  background: #fff0f3;
  color: var(--red);
}

.status-finished .status-pill {
  background: var(--green-soft);
  color: var(--green);
}

.empty-inline {
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

body[data-page] {
  background:
    radial-gradient(circle at top left, rgba(216, 170, 66, 0.18), transparent 34rem),
    linear-gradient(180deg, #e8e6d9 0, #f4f1e9 34rem, #ebe9df 100%);
}

body[data-page] .app-shell {
  width: min(1180px, calc(100% - 32px));
}

body[data-page] .app-header {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  background:
    radial-gradient(circle at 12% 15%, rgba(216, 170, 66, 0.22), transparent 18rem),
    linear-gradient(135deg, #151a10 0%, #273420 54%, #11150e 100%);
  box-shadow: 0 24px 60px rgba(20, 24, 16, 0.22);
}

body[data-page] .header-icon {
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.28));
}

body[data-page] h1,
body[data-page] .app-header .eyebrow {
  color: #fbf6e7;
}

body[data-page] .app-header .eyebrow {
  color: var(--gold);
}

body[data-page] .header-stats span {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(251, 246, 231, 0.72);
  backdrop-filter: blur(10px);
}

body[data-page] .header-stats strong {
  color: #ffffff;
}

body[data-page] .site-nav {
  margin-top: 18px;
}

body[data-page] .nav-link {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(251, 246, 231, 0.78);
}

body[data-page] .nav-link.active {
  border-color: rgba(216, 170, 66, 0.82);
  background: rgba(216, 170, 66, 0.16);
  color: #fff4ca;
}

body[data-page] .panel,
body[data-page] .pots-section {
  border-color: rgba(24, 28, 18, 0.1);
  border-radius: 14px;
  background: rgba(251, 250, 244, 0.94);
  box-shadow: 0 18px 40px rgba(35, 34, 23, 0.1);
}

body[data-page] .section-kicker {
  color: var(--amber);
}

.section-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 8px 2px;
  border-radius: 50%;
  background: var(--gold);
}

body[data-page] .button {
  border-radius: 999px;
  min-height: 44px;
  padding-inline: 16px;
}

body[data-page] .button.primary {
  border-color: #253f2d;
  background: linear-gradient(135deg, #31543c, #1f3929);
  box-shadow: 0 14px 24px rgba(33, 58, 41, 0.24);
}

body[data-page] .button.ghost {
  border-color: rgba(36, 42, 28, 0.16);
  background: #fffdf4;
}

body[data-page] .table-wrap {
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #fffdf6;
  box-shadow: inset 0 0 0 1px rgba(24, 28, 18, 0.08);
}

body[data-page] .league-table {
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

body[data-page] .league-table th {
  background: #141911;
  color: #f7e6b8;
  font-size: 0.72rem;
}

body[data-page] .league-table th:first-child {
  border-top-left-radius: 14px;
}

body[data-page] .league-table th:last-child {
  border-top-right-radius: 14px;
}

body[data-page] .league-table td {
  border-bottom-color: rgba(24, 28, 18, 0.08);
  background: #fffdf6;
}

body[data-page] .league-table tbody tr:first-child td {
  background: #fbf3df;
}

body[data-page] .rank-badge {
  background: #efe5c9;
  color: #5c4312;
}

body[data-page] .league-table tbody tr:first-child .rank-badge {
  background: #1e2a1d;
  color: #f3d37a;
}

body[data-page] .participant-cell strong {
  font-size: 1rem;
}

body[data-page] .participant-cell small {
  color: #817b67;
}

body[data-page] .points-cell {
  color: #172014;
  font-size: 1.8rem;
  font-weight: 950;
  letter-spacing: -0.02em;
}

body[data-page] .league-table tbody tr:first-child .points-cell {
  color: #8b6118;
}

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

body[data-page] .participant-summary-card {
  border-color: rgba(24, 28, 18, 0.1);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf6, #f7f2e5);
}

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

.draw-team-card {
  min-width: 0;
  border: 1px solid rgba(24, 28, 18, 0.09);
  border-left: 4px solid var(--pot-color);
  border-radius: 10px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.56);
}

.draw-pot {
  display: block;
  margin-bottom: 6px;
  color: #7b735e;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-result .team-meta small {
  font-size: 0.72rem;
}

body[data-page] .team-chip {
  border-color: rgba(24, 28, 18, 0.12);
  background: #fffdf6;
}

.fixture-preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-page] .fixture-card {
  border-color: rgba(24, 28, 18, 0.11);
  border-left-width: 5px;
  border-radius: 12px;
  background: #fffdf6;
  box-shadow: 0 10px 22px rgba(35, 34, 23, 0.06);
}

body[data-page] .fixture-card.status-live {
  background: #fff7f2;
}

body[data-page] .fixture-card.status-upcoming {
  border-left-color: #31543c;
}

body[data-page] .fixture-card.status-finished {
  border-left-color: #8b6118;
}

body[data-page] .fixture-meta strong {
  color: #161a12;
}

body[data-page] .fixture-score strong {
  font-size: 1.25rem;
  font-weight: 950;
}

body[data-page] .owner-tag {
  background: #eee5cb;
  color: #5d4211;
}

body[data-page] .status-pill {
  background: #eee9d9;
}

body[data-page] .status-live .status-pill {
  background: #fbe1da;
}

body[data-page] .select-control select {
  border-color: rgba(24, 28, 18, 0.14);
  background: #fffdf6;
}

.modal {
  width: min(720px, calc(100% - 32px));
  border: 0;
  border-radius: 16px;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(12, 14, 9, 0.6);
  backdrop-filter: blur(5px);
}

.modal-panel {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: #fbfaf4;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

.icon-button {
  width: 42px;
  padding: 0;
}

.modal-rules {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-page] .rule-card {
  border-color: rgba(24, 28, 18, 0.1);
  background: #fffdf6;
}

body[data-page] .rule-card-active {
  border-color: rgba(37, 99, 235, 0.2);
  background: #f8fbff;
  box-shadow: inset 3px 0 0 rgba(37, 99, 235, 0.35);
}

body[data-page] .rule-card-active span {
  color: #0f172a;
}

.public-pot-column {
  background: #fffdf6;
}

/* Public site refresh: brighter World Cup dashboard styling. */
body[data-page] {
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.22), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(250, 204, 21, 0.28), transparent 24rem),
    linear-gradient(180deg, #eaf3ff 0, #f7fbff 34rem, #eef5ff 100%);
}

body[data-page] .app-header {
  border-color: rgba(255, 255, 255, 0.18);
  background:
    radial-gradient(circle at 18% 18%, rgba(250, 204, 21, 0.2), transparent 18rem),
    radial-gradient(circle at 88% 12%, rgba(34, 197, 94, 0.2), transparent 16rem),
    linear-gradient(135deg, #071629 0%, #0f3478 48%, #072218 100%);
  box-shadow: 0 24px 64px rgba(7, 22, 41, 0.24);
}

body[data-page] .app-header .eyebrow,
body[data-page] .nav-link.active {
  color: #fef3c7;
}

body[data-page] .header-stats span {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.11);
}

body[data-page] .nav-link {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  transition:
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

body[data-page] .nav-link.active {
  border-color: rgba(250, 204, 21, 0.8);
  background: rgba(250, 204, 21, 0.18);
}

body[data-page] .nav-link:hover {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

body[data-page] .panel,
body[data-page] .pots-section {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.1);
}

body[data-page] .section-kicker {
  color: #2563eb;
}

body[data-page] .button.primary {
  border-color: #1d4ed8;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.22);
}

body[data-page] .button.primary:hover:not(:disabled) {
  border-color: #1d4ed8;
  background: linear-gradient(135deg, #1d4ed8, #0d9488);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 16px 28px rgba(37, 99, 235, 0.18);
}

body[data-page] .button.ghost {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
}

body[data-page] .button.ghost:hover:not(:disabled) {
  border-color: rgba(37, 99, 235, 0.26);
  background: #f8fbff;
}

body[data-page] .table-wrap {
  overflow: visible;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}

body[data-page] .league-table {
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0 8px;
}

body[data-page] .league-table th {
  border-bottom: 0;
  background: transparent;
  color: #475467;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

body[data-page] .league-table th:first-child,
body[data-page] .league-table th:last-child {
  border-radius: 0;
}

body[data-page] .league-table td {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  padding: 14px 12px;
}

body[data-page] .league-table td:first-child {
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

body[data-page] .league-table td:last-child {
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

body[data-page] .league-table tbody tr {
  transition:
    box-shadow 140ms ease,
    transform 140ms ease;
}

body[data-page] .league-table tbody tr:hover td {
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: inset 0 1px 0 rgba(37, 99, 235, 0.12), inset 0 -1px 0 rgba(37, 99, 235, 0.12);
}

body[data-page] .league-table tbody tr:hover td:first-child {
  box-shadow:
    inset 1px 0 0 rgba(37, 99, 235, 0.12),
    inset 0 1px 0 rgba(37, 99, 235, 0.12),
    inset 0 -1px 0 rgba(37, 99, 235, 0.12);
}

body[data-page] .league-table tbody tr:hover td:last-child {
  box-shadow:
    inset -1px 0 0 rgba(37, 99, 235, 0.12),
    inset 0 1px 0 rgba(37, 99, 235, 0.12),
    inset 0 -1px 0 rgba(37, 99, 235, 0.12);
}

body[data-page] .league-table tbody tr:first-child td,
body[data-page] .league-table tbody .leader-row td {
  border-color: rgba(250, 204, 21, 0.42);
  background: #ffffff;
}

body[data-page] .league-table tbody .leader-row td:first-child {
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.2), rgba(250, 204, 21, 0.16));
}

body[data-page] .league-table tbody .leader-row td:nth-child(2) {
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.16), rgba(255, 255, 255, 0.98));
}

body[data-page] .league-table tbody .runner-up-row td {
  border-color: rgba(148, 163, 184, 0.38);
  background: #ffffff;
}

body[data-page] .league-table tbody .runner-up-row td:first-child {
  background: linear-gradient(90deg, rgba(203, 213, 225, 0.32), rgba(203, 213, 225, 0.2));
}

body[data-page] .league-table tbody .runner-up-row td:nth-child(2) {
  background: linear-gradient(90deg, rgba(203, 213, 225, 0.2), rgba(255, 255, 255, 0.98));
}

.rank-cell {
  width: 74px;
}

.rank-number {
  display: inline-flex;
  align-items: baseline;
  color: #0f172a;
  font-size: 1.55rem;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.leader-row .rank-number {
  color: #b45309;
}

.participant-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page] .participant-cell strong {
  color: #101828;
  font-size: 1.06rem;
}

body[data-page] .participant-cell small {
  color: #667085;
  max-width: 430px;
  font-size: 0.68rem;
  line-height: 1.25;
  opacity: 0.82;
}

body[data-page] .points-cell {
  color: #0f172a;
  min-width: 96px;
  text-align: right !important;
  font-size: 2.1rem;
  font-weight: 950;
  letter-spacing: -0.04em;
}

body[data-page] .public-table th:nth-child(2),
body[data-page] .public-table td:nth-child(2),
body[data-page] .public-table th:nth-child(3),
body[data-page] .public-table td:nth-child(3) {
  text-align: left;
}

body[data-page] .public-table th:nth-child(4),
body[data-page] .public-table td:nth-child(4) {
  text-align: center;
}

body[data-page] .public-table th:nth-child(5),
body[data-page] .public-table td:nth-child(5) {
  text-align: right;
}

body[data-page] .leader-row .points-cell {
  color: #0f766e;
}

.live-score-strip {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

.live-score-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  padding: 2px 7px 2px 5px;
  background: #f8fafc;
  text-decoration: none;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.live-score-link:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.live-result-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
}

.live-win .live-result-dot {
  background: #16a34a;
}

.live-loss .live-result-dot {
  background: #ef4444;
}

.live-draw .live-result-dot {
  background: #94a3b8;
}

.live-score-pill {
  color: #101828;
  font-size: 0.75rem;
  font-weight: 950;
  line-height: 1;
}

body[data-page] .fixture-card {
  scroll-margin-top: 18px;
  border-color: rgba(15, 23, 42, 0.1);
  border-left-width: 5px;
  background: #ffffff;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

body[data-page] .fixture-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08), 0 14px 30px rgba(15, 23, 42, 0.1);
}

body[data-page] .fixture-card:target {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  box-shadow:
    0 0 0 6px rgba(37, 99, 235, 0.1),
    0 16px 34px rgba(15, 23, 42, 0.14);
}

body[data-page] .fixture-card.status-live {
  border-left-color: #16a34a;
  background: linear-gradient(180deg, #f0fdf4, #ffffff);
}

body[data-page] .fixture-card.status-upcoming {
  border-left-color: #2563eb;
}

body[data-page] .fixture-card.status-finished {
  border-left-color: #0f766e;
}

body[data-page] .owner-tag {
  background: #e7efff;
  color: #1d4ed8;
}

body[data-page] .status-pill {
  background: #eef2f7;
}

body[data-page] .status-live .status-pill {
  background: #dcfce7;
  color: #047857;
}

body[data-page] .status-finished .status-pill {
  background: #e2e8f0;
  color: #334155;
}

body[data-page] .participant-summary-card,
.public-pot-column,
.modal-panel {
  background: #ffffff;
}

.draw-team-card {
  background: #f8fafc;
}

body[data-page] .participant-summary-card,
.draw-team-card,
.public-pot-column,
body[data-page] .team-chip,
body[data-page] .select-control select,
.matchweek-control>span {
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

body[data-page] .participant-summary-card:hover,
.public-pot-column:hover {
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.06), 0 16px 30px rgba(15, 23, 42, 0.08);
}

.draw-team-card:hover,
body[data-page] .team-chip:hover {
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.06);
}

body[data-page] .select-control select:hover,
body[data-page] .select-control select:focus {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
  outline: none;
}

.print-report {
  display: none;
}

@media (max-width: 1120px) {
  .app-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .header-stats {
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pots-grid,
  .scorecards-grid,
  .participant-summary-grid,
  .fixture-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {

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

  .assigned-teams {
    grid-template-columns: 1fr;
  }

  .fixture-card {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.45rem;
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 14px;
  }

  .panel,
  .pots-section {
    padding: 14px;
  }

  .title-lockup {
    align-items: flex-start;
  }

  .header-icon {
    width: 64px;
    height: 64px;
  }

  h1 {
    font-size: 2rem;
  }

  .section-toolbar,
  .draw-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions {
    width: 100%;
    justify-content: stretch;
  }

  .toolbar-actions .button,
  .button.primary {
    flex: 1 1 150px;
  }

  .header-stats,
  .names-grid,
  .results-grid,
  .rules-grid,
  .modal-rules,
  .draw-team-grid,
  .scorecards-grid,
  .pots-grid,
  .participant-summary-grid,
  .fixture-preview-grid {
    grid-template-columns: 1fr;
  }

  .header-stats span {
    min-height: auto;
  }

  .score-card-header,
  .score-controls {
    grid-template-columns: 1fr;
  }

  .owner-pill {
    max-width: none;
    width: max-content;
  }

  .source-note {
    text-align: left;
  }

  .fixture-actions,
  .fixture-main {
    grid-template-columns: 1fr;
  }

  .select-control {
    min-width: 0;
  }

  .fixture-score {
    justify-items: start;
    padding-left: 43px;
  }

  .fixture-team-home {
    justify-items: start;
    text-align: left;
  }

  .fixture-team-home .team-fixture {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .fixture-team-home .team-fixture .flag-wrap {
    grid-column: 1;
  }

  .fixture-team-home .team-fixture .team-meta {
    grid-column: 2;
    text-align: left;
  }

  .fixture-team-home .team-fixture .team-meta strong {
    text-align: left;
  }

  .fixture-team-home .owner-tag {
    justify-self: start;
    transform: none;
  }

  .fixture-team-away .owner-tag {
    transform: none;
  }

  .matchweek-control {
    width: 100%;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .mobile-quick-nav {
    position: fixed;
    top: calc(6px + env(safe-area-inset-top));
    left: 50%;
    z-index: 80;
    display: flex;
    gap: 4px;
    transform: translate(-50%, -18px) scale(0.96);
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(12px);
    transition:
      opacity 180ms ease,
      transform 220ms ease,
      box-shadow 220ms ease;
  }

  .mobile-quick-nav.is-visible {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-quick-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 0 12px;
    color: #475467;
    font-size: 0.74rem;
    font-weight: 950;
    text-decoration: none;
    white-space: nowrap;
  }

  .mobile-quick-nav a.active {
    background: #0f172a;
    color: #ffffff;
  }

  body[data-page] .app-shell {
    width: 100%;
    padding: 52px 8px 28px;
  }

  body[data-page] .app-header {
    margin-top: 0;
    grid-template-columns: 1fr;
    gap: 10px;
    border-radius: 14px;
    padding: 12px;
  }

  body[data-page] .title-lockup {
    gap: 10px;
  }

  body[data-page] .header-icon {
    width: 54px;
    height: 54px;
  }

  body[data-page] h1 {
    font-size: 1.85rem;
  }

  body[data-page] .eyebrow {
    margin-bottom: 4px;
    font-size: 0.62rem;
  }

  body[data-page] .site-nav {
    margin-top: 8px;
    gap: 6px;
  }

  body[data-page] .nav-link {
    min-height: 29px;
    padding: 0 9px;
    font-size: 0.72rem;
  }

  body[data-page] .header-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body[data-page] .header-stats span {
    min-height: 48px;
    padding: 8px;
    font-size: 0.7rem;
  }

  body[data-page] .header-stats strong {
    font-size: 1.15rem;
  }

  body[data-page] .panel,
  body[data-page] .pots-section {
    margin-top: 12px;
    border-radius: 12px;
    padding: 12px;
  }

  body[data-page="dashboard"] .app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  body[data-page="dashboard"] .header-icon {
    width: 46px;
    height: 46px;
  }

  body[data-page="dashboard"] h1 {
    font-size: 1.42rem;
  }

  body[data-page="dashboard"] .header-stats {
    display: none;
  }

  body[data-page="dashboard"] .league-section {
    margin-top: 8px;
    padding: 10px;
  }

  body[data-page="dashboard"] .league-section .section-toolbar {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  body[data-page="dashboard"] .league-section .section-kicker,
  body[data-page="dashboard"] .league-section .section-note {
    display: none;
  }

  body[data-page="dashboard"] #league-heading {
    font-size: 1rem;
  }

  body[data-page="dashboard"] .league-section .toolbar-actions {
    width: auto;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
  }

  body[data-page="dashboard"] .league-section .button {
    min-height: 32px;
    flex: 0 0 auto;
    gap: 5px;
    padding: 0 9px;
    font-size: 0.72rem;
  }

  body[data-page="dashboard"] .league-section .button svg {
    width: 15px;
    height: 15px;
  }

  body[data-page="dashboard"] .table-wrap {
    margin-top: 8px;
    overflow: visible;
  }

  body[data-page="dashboard"] .league-table {
    display: block;
    width: 100%;
    min-width: 0;
    border-spacing: 0 5px;
  }

  body[data-page="dashboard"] .league-table thead {
    display: none;
  }

  body[data-page="dashboard"] .league-table tbody {
    display: grid;
    gap: 5px;
  }

  body[data-page="dashboard"] .league-table tbody tr {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 48px;
    align-items: center;
    min-height: 51px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
  }

  body[data-page="dashboard"] .league-table tbody .leader-row {
    border-color: rgba(250, 204, 21, 0.42);
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.19), rgba(255, 255, 255, 0.98) 72%);
  }

  body[data-page="dashboard"] .league-table tbody .runner-up-row {
    border-color: rgba(148, 163, 184, 0.38);
    background: linear-gradient(90deg, rgba(203, 213, 225, 0.3), rgba(255, 255, 255, 0.98) 72%);
  }

  body[data-page="dashboard"] .league-table td {
    display: block;
    min-width: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 7px 6px;
  }

  body[data-page="dashboard"] .league-table td:nth-child(3),
  body[data-page="dashboard"] .league-table td:nth-child(4) {
    display: none;
  }

  body[data-page="dashboard"] .rank-cell {
    width: auto;
    justify-self: center;
    padding-right: 0;
  }

  body[data-page="dashboard"] .rank-number {
    font-size: 1.05rem;
    letter-spacing: -0.03em;
  }

  body[data-page="dashboard"] .participant-cell {
    padding-left: 2px;
  }

  body[data-page="dashboard"] .participant-main {
    gap: 5px;
  }

  body[data-page] .participant-cell strong,
  body[data-page="dashboard"] .participant-cell strong {
    font-size: 0.9rem;
  }

  body[data-page="dashboard"] .participant-cell small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 0.56rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-page="dashboard"] .points-cell {
    min-width: 0;
    padding-right: 9px;
    text-align: right !important;
    font-size: 1.35rem;
  }

  body[data-page="dashboard"] .live-score-link {
    min-height: 20px;
    padding: 1px 6px 1px 4px;
  }

  body[data-page="dashboard"] .live-score-pill {
    font-size: 0.68rem;
  }

  body[data-page="dashboard"] .live-result-dot {
    width: 7px;
    height: 7px;
  }

  body[data-page="dashboard"] .fixture-preview-grid .fixture-card {
    justify-items: center;
    padding: 14px;
    text-align: center;
  }

  body[data-page="dashboard"] .fixture-preview-grid .fixture-meta {
    justify-items: center;
    text-align: center;
  }

  body[data-page="dashboard"] .fixture-preview-grid .fixture-main {
    justify-items: center;
    gap: 13px;
    width: 100%;
  }

  body[data-page="dashboard"] .fixture-preview-grid .fixture-score {
    justify-items: center;
    padding-left: 0;
  }

  body[data-page="dashboard"] .fixture-preview-grid .fixture-team {
    justify-items: center;
    text-align: center;
  }

  body[data-page="dashboard"] .fixture-preview-grid .team-fixture,
  body[data-page="dashboard"] .fixture-preview-grid .fixture-team-home .team-fixture {
    grid-template-columns: 34px minmax(0, max-content);
    justify-content: center;
  }

  body[data-page="dashboard"] .fixture-preview-grid .fixture-team-home .team-fixture .flag-wrap {
    grid-column: 1;
  }

  body[data-page="dashboard"] .fixture-preview-grid .fixture-team-home .team-fixture .team-meta {
    grid-column: 2;
    text-align: left;
  }

  body[data-page="dashboard"] .fixture-preview-grid .fixture-team-home .team-fixture .team-meta strong {
    text-align: left;
  }

  body[data-page="dashboard"] .fixture-preview-grid .owner-tag,
  body[data-page="dashboard"] .fixture-preview-grid .fixture-team-away .owner-tag {
    justify-self: center;
    transform: none;
  }

  body[data-page="fixtures"] .fixture-list .fixture-card {
    justify-items: center;
    padding: 14px;
    text-align: center;
  }

  body[data-page="fixtures"] .fixture-list .fixture-meta {
    justify-items: center;
    text-align: center;
  }

  body[data-page="fixtures"] .fixture-list .fixture-main {
    justify-items: center;
    gap: 13px;
    width: 100%;
  }

  body[data-page="fixtures"] .fixture-list .fixture-score {
    justify-items: center;
    padding-left: 0;
  }

  body[data-page="fixtures"] .fixture-list .fixture-team {
    justify-items: center;
    text-align: center;
  }

  body[data-page="fixtures"] .fixture-list .team-fixture,
  body[data-page="fixtures"] .fixture-list .fixture-team-home .team-fixture {
    grid-template-columns: 34px minmax(0, max-content);
    justify-content: center;
  }

  body[data-page="fixtures"] .fixture-list .fixture-team-home .team-fixture .flag-wrap {
    grid-column: 1;
  }

  body[data-page="fixtures"] .fixture-list .fixture-team-home .team-fixture .team-meta {
    grid-column: 2;
    text-align: left;
  }

  body[data-page="fixtures"] .fixture-list .fixture-team-home .team-fixture .team-meta strong {
    text-align: left;
  }

  body[data-page="fixtures"] .fixture-list .owner-tag,
  body[data-page="fixtures"] .fixture-list .fixture-team-away .owner-tag {
    justify-self: center;
    transform: none;
  }

  body[data-page] .modal {
    width: min(100% - 18px, 720px);
  }

  body[data-page] .modal-panel {
    max-height: calc(100dvh - 28px);
    overflow: auto;
    padding: 14px;
  }
}

@page {
  size: A4;
  margin: 12mm;
}

@media print {
  * {
    box-shadow: none !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body {
    min-width: 0;
    background: #ffffff;
    color: #111827;
  }

  .app-shell {
    display: none;
  }

  .print-report {
    display: block;
    font-family:
      Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
      sans-serif;
  }

  .print-header {
    margin-bottom: 7mm;
    padding-bottom: 6mm;
    border-bottom: 3px solid #111827;
  }

  .print-header p {
    margin: 0 0 2mm;
    color: #1d4ed8;
    font-size: 9pt;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .print-header h1 {
    margin: 0;
    color: #111827;
    font-size: 28pt;
    line-height: 1;
  }

  .print-header small {
    display: block;
    margin-top: 3mm;
    color: #667085;
    font-size: 8.5pt;
  }

  .print-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3mm;
    margin-top: 5mm;
  }

  .print-meta span {
    min-height: 13mm;
    padding: 2.5mm 3mm;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    background: #f4f6f8;
    color: #667085;
    font-size: 8.5pt;
  }

  .print-meta strong {
    color: #111827;
    font-size: 13pt;
  }

  .print-section {
    margin-top: 7mm;
  }

  .print-section h2 {
    margin: 0 0 3mm;
    font-size: 13pt;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8.6pt;
  }

  .print-table th,
  .print-table td {
    border-bottom: 1px solid #d0d5dd;
    padding: 2mm 2mm;
    text-align: left;
    vertical-align: top;
  }

  .print-table th {
    background: #111827;
    color: #ffffff;
    font-size: 7.6pt;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .print-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-table tbody tr:nth-child(even) td {
    background: #f8fafc;
  }

  .print-table th:nth-child(1),
  .print-table td:nth-child(1),
  .print-table th:nth-child(3),
  .print-table td:nth-child(3),
  .print-table th:nth-child(4),
  .print-table td:nth-child(4),
  .print-table th:nth-child(5),
  .print-table td:nth-child(5),
  .print-table th:nth-child(6),
  .print-table td:nth-child(6) {
    text-align: center;
  }

  .print-draw-table th:nth-child(3),
  .print-draw-table td:nth-child(3) {
    text-align: left;
  }

  .print-rules {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2mm;
    font-size: 8.5pt;
  }

  .print-rules span {
    padding: 2mm;
    border: 1px solid #d0d5dd;
    border-radius: 3px;
    background: #f8fafc;
    font-weight: 800;
  }
}