﻿:root {
  --green: #00A651;
  --green-soft: rgba(0, 166, 81, .18);
  --bg: #030604;
  --panel: #09140f;
  --panel-2: #101f18;
  --line: rgba(255, 255, 255, .14);
  --text: #f6fff9;
  --muted: #aab9af;
  --gold: #f6c54d;
  --blue: #4d8bff;
  --danger: #ff5a69;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(0,166,81,.28), transparent 28%),
    radial-gradient(circle at 100% 8%, rgba(77,139,255,.18), transparent 24%),
    linear-gradient(180deg, #07110c 0%, var(--bg) 46%, #07100b 100%);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

button, input, select { font: inherit; }

.stadium-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background:
    linear-gradient(90deg, transparent 49.6%, rgba(0,166,81,.75) 50%, transparent 50.4%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.16) 0 1px, transparent 1px 58px);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 78%, transparent 100%);
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, rgba(0,166,81,.3), transparent 30%),
    linear-gradient(180deg, rgba(3,6,4,.92), rgba(3,6,4,.98));
  backdrop-filter: blur(14px);
}

.login-gate[hidden] {
  display: none;
}

.login-panel {
  width: min(520px, 100%);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255,255,255,.1), rgba(0,166,81,.1));
  box-shadow: 0 32px 100px rgba(0,0,0,.45);
  padding: 28px;
  display: grid;
  gap: 14px;
  text-align: center;
}

.login-panel img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  justify-self: center;
  border-radius: 14px;
  background: white;
}

.login-panel > span {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

.login-panel h1 {
  font-size: 38px;
  line-height: 1;
  max-width: none;
}

.login-panel p,
.login-panel small {
  color: var(--muted);
  line-height: 1.5;
}

.login-panel .primary-btn,
.login-panel .ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.app-shell {
  position: relative;
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 0;
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand img, .profile-head img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: white;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.brand small, .profile-head small, .mini-stats small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.topnav, .header-actions, .hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topnav { justify-content: center; }

.header-actions { justify-content: flex-end; }

.backend-status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255,255,255,.05);
  font-size: 12px;
  font-weight: 800;
}

.backend-status.online {
  color: var(--text);
  border-color: rgba(0,166,81,.52);
  background: rgba(0,166,81,.14);
}

.backend-status.saving {
  color: var(--gold);
  border-color: rgba(246,197,77,.5);
  background: rgba(246,197,77,.1);
}

.backend-status.error {
  color: var(--text);
  border-color: rgba(255,90,105,.55);
  background: rgba(255,90,105,.14);
}

.nav-btn, .ghost-btn, .primary-btn, .language-select, .move-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255,255,255,.06);
  min-height: 40px;
  padding: 0 13px;
  cursor: pointer;
}

.nav-btn.active, .primary-btn {
  border-color: rgba(0,166,81,.75);
  background: var(--green);
  color: white;
  font-weight: 800;
}

.ghost-btn:hover, .nav-btn:hover, .move-btn:hover {
  border-color: rgba(0,166,81,.55);
  background: rgba(0,166,81,.14);
}

.language-select {
  color: var(--text);
  background: #0b1711;
}

.large {
  min-height: 48px;
  padding: 0 18px;
}

.view { display: none; }
.view.active { display: block; }
.dashboard-extra.active { display: grid; }

.hero {
  min-height: 520px;
  padding: 56px 0 28px;
  display: none;
  grid-template-columns: minmax(0, 1.15fr) 390px;
  gap: 24px;
  align-items: center;
}

.hero.active { display: grid; }

.eyebrow, .pill {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

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

h1 {
  max-width: 760px;
  font-size: clamp(44px, 7vw, 86px);
  line-height: .94;
}

h2 { font-size: 28px; }
h3 { font-size: 18px; }

.hero-text {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  margin: 18px 0 24px;
}

.profile-card, .panel, .match-card, .group-card, .rules-panel, .tournament-card, .tournament-save-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(0,166,81,.06));
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
}

.profile-card { padding: 18px; }

.account-state {
  margin-top: 14px;
  border: 1px solid rgba(246,197,77,.24);
  border-radius: 8px;
  background: rgba(246,197,77,.08);
  padding: 10px 12px;
  display: grid;
  gap: 3px;
}

.account-state strong {
  color: var(--gold);
  font-size: 13px;
}

.account-state span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.account-state.linked {
  border-color: rgba(0,166,81,.42);
  background: rgba(0,166,81,.12);
}

.account-state.linked strong {
  color: var(--green);
}

.account-state.required {
  border-color: rgba(255,90,105,.5);
  background: rgba(255,90,105,.1);
}

.account-state.required strong {
  color: var(--danger);
}

.profile-name-editor {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.profile-name-editor label,
.profile-name-editor small {
  color: var(--muted);
  font-size: 12px;
}

.profile-name-editor div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.profile-name-editor input {
  min-height: 38px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.25);
  font: inherit;
  font-weight: 850;
  padding: 0 10px;
}

.profile-name-editor input:disabled {
  opacity: .72;
}

.profile-head, .section-head, .level-line, .match-teams, .reward-row, .bonus-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.score-ring {
  width: 190px;
  height: 190px;
  margin: 24px auto;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  border: 12px solid rgba(0,166,81,.22);
  box-shadow: inset 0 0 0 12px rgba(246,197,77,.14), 0 0 52px rgba(0,166,81,.24);
}

.score-ring span {
  font-size: 54px;
  font-weight: 950;
}

.progress-track {
  height: 10px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 16px;
}

.progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-stats span, .rules-grid span {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 12px;
  background: rgba(0,0,0,.18);
}

.mini-stats strong, .rules-grid b {
  display: block;
  font-size: 24px;
  color: var(--green);
}

.dashboard-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.panel, .rules-panel { padding: 18px; }

.section-head span, .section-head p, .bonus-line span {
  color: var(--muted);
  font-size: 13px;
}

.challenge-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.challenge-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255,255,255,.04);
}

.challenge-item.completed {
  border-color: rgba(0,166,81,.36);
  background: rgba(0,166,81,.1);
}

.status-dot {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
}

.challenge-item.completed .status-dot {
  border-color: rgba(0,166,81,.9);
  background: var(--green);
  box-shadow: inset 0 0 0 4px #0b1711;
}

.challenge-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.challenge-item.completed em {
  color: var(--green);
}

.challenge-item b { color: var(--gold); }

.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.badge {
  min-height: 54px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  color: var(--muted);
  background: rgba(0,0,0,.16);
  font-weight: 800;
}

.badge.active {
  color: var(--text);
  border-color: rgba(0,166,81,.48);
  background: linear-gradient(145deg, rgba(0,166,81,.24), rgba(246,197,77,.1));
}

.page-head {
  padding: 28px 0 18px;
  align-items: flex-end;
}

.pill {
  border: 1px solid rgba(246,197,77,.35);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(246,197,77,.08);
}

.match-grid, .groups-grid {
  display: grid;
  gap: 14px;
}

.match-grid {
  grid-template-columns: repeat(3, 1fr);
}

.match-card { padding: 16px; }

.match-card.locked {
  opacity: .76;
}

.match-card.upcoming {
  opacity: .86;
}

.match-card.locked .primary-btn {
  cursor: not-allowed;
  opacity: .72;
}

.match-card.upcoming .primary-btn {
  cursor: not-allowed;
  opacity: .72;
  background: rgba(255,255,255,.1);
  border-color: var(--line);
}

.match-card.just-saved, .tournament-save-card.just-saved {
  border-color: rgba(0,166,81,.85);
  box-shadow: 0 0 0 3px rgba(0,166,81,.16), 0 24px 80px rgba(0,0,0,.25);
}

.match-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 14px;
}

.double { color: var(--gold); font-weight: 900; }

.match-teams strong {
  font-size: 20px;
}

.score-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.score-inputs input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  color: var(--text);
  background: rgba(0,0,0,.22);
  font-size: 22px;
  font-weight: 900;
}

.match-card.locked .score-inputs input {
  color: var(--gold);
  border-color: rgba(246,197,77,.34);
  background: rgba(246,197,77,.08);
}

.submit-tip {
  width: 100%;
  margin-top: 12px;
}

.points-explainer {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(0,0,0,.18);
}

.points-explainer-body {
  margin-top: 12px;
}

.points-explainer-body ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.points-explainer-body h3 {
  color: var(--gold);
}

.tournament-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.tournament-card {
  min-height: 112px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.tournament-card span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
}

.tournament-card b {
  color: var(--gold);
}

.tournament-card select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #0b1711;
  padding: 0 10px;
}

.tournament-card input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #0b1711;
  font: inherit;
  font-weight: 800;
  padding: 0 10px;
}

.player-pick-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.tournament-card.locked {
  opacity: .72;
}

.group-card.locked {
  opacity: .76;
}

.group-card.locked .team-row {
  cursor: not-allowed;
}

.table-save-state {
  font-weight: 800;
  color: var(--gold);
}

.table-save-btn {
  min-height: 40px;
  padding-inline: 16px;
  white-space: nowrap;
}

.table-save-btn:disabled {
  cursor: not-allowed;
  opacity: .68;
}

.tournament-save-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.tournament-card select:disabled {
  cursor: not-allowed;
  opacity: .7;
}

.tournament-card input:disabled {
  cursor: not-allowed;
  opacity: .7;
}

.tournament-save-card {
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  background: linear-gradient(145deg, rgba(0,166,81,.22), rgba(246,197,77,.1));
}

.tournament-save-card strong {
  color: var(--gold);
  font-size: 30px;
}

.tournament-save-card span {
  color: var(--muted);
}

.bonus-line {
  border: 1px solid rgba(0,166,81,.24);
  border-radius: 8px;
  background: rgba(0,166,81,.08);
  padding: 12px;
  margin-bottom: 14px;
}

.groups-grid {
  grid-template-columns: repeat(4, 1fr);
}

.group-card {
  padding: 12px;
  min-width: 0;
}

.group-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.group-title span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

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

.team-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 8px;
  padding: 6px;
  background: rgba(255,255,255,.045);
  cursor: grab;
}

.team-row.dragging {
  opacity: .45;
  border-color: var(--green);
}

.place {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: rgba(0,166,81,.16);
  color: var(--green);
  font-weight: 950;
}

.team-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.move-btn {
  min-width: 30px;
  width: 30px;
  min-height: 30px;
  padding: 0;
}

.reward-ladder {
  display: grid;
  gap: 10px;
}

.reward-deadline {
  border: 1px solid rgba(246,197,77,.35);
  border-radius: 8px;
  padding: 12px;
  color: var(--gold);
  background: rgba(246,197,77,.08);
  font-weight: 900;
}

.reward-instruction {
  color: var(--text);
  border-color: rgba(0,166,81,.38);
  background: rgba(0,166,81,.1);
}

.leaderboard-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(0,166,81,.06));
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
  overflow: hidden;
}

.leaderboard-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.leaderboard-list {
  display: grid;
}

.rank-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.rank-row:nth-child(1) .rank-number,
.rank-row:nth-child(2) .rank-number,
.rank-row:nth-child(3) .rank-number {
  color: var(--gold);
  border-color: rgba(246,197,77,.5);
  background: rgba(246,197,77,.1);
}

.rank-row.own {
  border-color: rgba(0,166,81,.55);
  background: linear-gradient(90deg, rgba(0,166,81,.22), rgba(246,197,77,.08));
}

.rank-row.featured {
  position: relative;
  border-color: rgba(246,197,77,.75);
  background:
    linear-gradient(100deg, rgba(246,197,77,.3), rgba(0,166,81,.14) 46%, rgba(246,197,77,.18)),
    rgba(0,0,0,.22);
  box-shadow: inset 0 0 0 1px rgba(246,197,77,.18), 0 0 28px rgba(246,197,77,.18);
}

.rank-row.featured .rank-number {
  color: #160f02;
  border-color: rgba(246,197,77,.9);
  background: linear-gradient(145deg, #fff0a8, var(--gold));
}

.rank-row.featured .rank-player strong {
  color: #fff4bd;
}

.tiktok-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 2px 8px;
  color: #fff;
  background: linear-gradient(135deg, #00f2ea, #ff0050);
  font-size: 11px;
  font-weight: 950;
  text-decoration: none;
}

.rank-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 8px;
  color: var(--green);
  background: rgba(0,0,0,.16);
  font-weight: 950;
}

.rank-player strong {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

.rank-player em {
  border-radius: 999px;
  padding: 3px 7px;
  color: white;
  background: var(--green);
  font-size: 11px;
  font-style: normal;
}

.rank-player small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.rank-score {
  color: var(--gold);
  font-size: 22px;
}

.rank-separator {
  padding: 8px 16px;
  color: var(--muted);
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.reward-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255,255,255,.05);
}

.reward-row.unlocked {
  border-color: rgba(0,166,81,.55);
  background: linear-gradient(135deg, rgba(0,166,81,.2), rgba(246,197,77,.09));
}

.reward-row.activated {
  border-color: rgba(246,197,77,.7);
}

.reward-row button {
  min-width: 104px;
}

.reward-code {
  margin-top: 10px;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(246,197,77,.35);
  border-radius: 8px;
  background: rgba(246,197,77,.08);
}

.reward-code b {
  color: var(--gold);
  overflow-wrap: anywhere;
}

.reward-code span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.coming-soon-panel {
  min-height: 240px;
  display: grid;
  place-items: center;
  text-align: center;
}

.coming-soon-panel strong {
  color: var(--gold);
  font-size: clamp(36px, 7vw, 72px);
}

.quiz-panel {
  display: grid;
  gap: 16px;
  overflow: hidden;
}

.quiz-locked,
.quiz-intro,
.quiz-summary,
.quiz-play {
  display: grid;
  gap: 14px;
}

.quiz-locked strong {
  color: var(--gold);
  font-size: clamp(42px, 8vw, 82px);
  line-height: 1;
}

.quiz-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quiz-topline strong {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #ffffff;
  font-size: 24px;
  box-shadow: 0 0 0 6px rgba(0, 166, 81, .16);
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-option {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  padding: 14px;
  text-align: left;
  font-weight: 850;
  cursor: pointer;
}

.quiz-option:hover:not(:disabled),
.quiz-option.selected {
  border-color: rgba(246, 197, 77, .75);
  background: rgba(246, 197, 77, .12);
}

.quiz-option.correct {
  border-color: rgba(0, 166, 81, .8);
  background: rgba(0, 166, 81, .22);
}

.quiz-option.wrong {
  border-color: rgba(255, 81, 81, .8);
  background: rgba(255, 81, 81, .16);
}

.quiz-review {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
}

.quiz-review-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 5px;
  background: rgba(255, 255, 255, .045);
}

.quiz-review-row.correct {
  border-color: rgba(0, 166, 81, .45);
}

.quiz-review-row.wrong {
  border-color: rgba(255, 81, 81, .45);
}

.quiz-review-row em {
  color: var(--gold);
  font-style: normal;
  font-weight: 900;
}

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

.save-note {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.kickoff-note {
  display: block;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.score-breakdown {
  grid-column: 1 / -1;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.breakdown-grid span {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 14px;
  background: rgba(0,0,0,.18);
}

.breakdown-grid strong {
  display: block;
  color: var(--gold);
  font-size: 28px;
  line-height: 1;
}

.breakdown-grid small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.rules-panel { margin-top: 16px; }

.rules-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-top: 12px;
}

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

@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr; }
  .topnav, .header-actions { justify-content: flex-start; }
  .hero, .dashboard-grid, .match-grid, .groups-grid, .tournament-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 48px; }
  .rules-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .app-shell { width: min(100% - 20px, 1240px); }
  .hero, .dashboard-grid, .match-grid, .groups-grid, .tournament-grid { grid-template-columns: 1fr; }
  .topnav { overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; padding-bottom: 4px; }
  .nav-btn { white-space: nowrap; }
  h1 { font-size: 40px; }
  .page-head, .bonus-line { align-items: flex-start; flex-direction: column; }
  .badge-grid, .mini-stats, .rules-grid, .breakdown-grid { grid-template-columns: 1fr 1fr; }
}

