:root {
  --bg: #07111f;
  --bg-soft: #0f1c30;
  --card: rgba(10, 22, 40, 0.84);
  --card-solid: #10203a;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f2f5f7;
  --muted: #a8bed0;
  --teal: #118b9f;
  --yellow: #ffdc02;
  --green: #009440;
  --blue: #302681;
  --danger: #ff6b5f;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Figtree", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(255, 220, 2, 0.16), transparent 28%),
    radial-gradient(circle at 10% 20%, rgba(0, 148, 64, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(48, 38, 129, 0.96), rgba(17, 139, 159, 0.85)),
    var(--bg);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.06) 0 10%, transparent 11%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 140px 140px, 100% 42px, 42px 100%;
  opacity: 0.3;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

textarea,
option {
  font: inherit;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.site-header,
.hero-panel,
.panel-card,
.stat-card,
.auth-card,
.match-card,
.round-panel,
.sticky-action-bar,
.deadline-card,
.toast {
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(9, 19, 34, 0.82);
}

.brand-block,
.header-user,
.user-cell,
.team-name,
.match-header-row,
.result-meta,
.panel-heading,
.user-row,
.ranking-mini-item {
  display: flex;
  align-items: center;
}

.brand-block,
.header-user,
.team-name,
.user-cell,
.ranking-mini-item {
  gap: 12px;
}

.brand-logo,
.auth-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px;
}

.brand-title,
.hero-panel h1,
.auth-hero h1,
.auth-card h2,
.panel-heading h2,
.stat-card strong,
.deadline-card,
.eyebrow,
.site-nav a,
.primary-button,
.secondary-button,
.ghost-button {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.04em;
}

.brand-title {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.brand-subtitle,
.header-user span,
.panel-heading a,
.hero-panel p,
.auth-hero p,
.auth-link,
.result-meta,
.match-badge,
.sticky-action-bar p,
.points-list span,
.classification-summary span,
.user-cell small,
.ranking-mini-item small,
.site-footer {
  color: var(--muted);
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-nav a,
.ghost-button,
.secondary-button,
.primary-button {
  border-radius: 999px;
  padding: 12px 18px;
  transition: 180ms ease;
}

.site-nav a {
  border: 1px solid transparent;
  color: rgba(242, 245, 247, 0.8);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
  border-color: rgba(255, 220, 2, 0.28);
  background: rgba(255, 220, 2, 0.08);
}

.user-avatar {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--yellow), #ffc107);
  color: #14203a;
  font-weight: 800;
}

.ghost-button,
.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.primary-button {
  border: none;
  background: linear-gradient(135deg, var(--yellow), #ffc107);
  color: #101720;
  cursor: pointer;
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.inline-button {
  width: fit-content;
}

.main-content {
  padding: 28px 0;
}

.hero-panel,
.panel-card,
.auth-card,
.round-panel,
.sticky-action-bar,
.stat-card,
.deadline-card,
.warning-banner,
.match-card,
.result-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-bottom: 24px;
  animation: rise-in 480ms ease both;
}

.hero-panel.compact {
  align-items: center;
}

.eyebrow {
  font-size: 0.96rem;
  color: var(--yellow);
}

.hero-panel h1,
.auth-hero h1 {
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  margin: 8px 0 10px;
  line-height: 0.96;
}

.stats-grid,
.dashboard-grid,
.admin-grid,
.champion-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 24px;
}

.compact-stats {
  margin-bottom: 24px;
}

.page-rewards .dashboard-grid {
  grid-template-columns: 1fr;
}

.rewards-hero {
  align-items: stretch;
}

.rewards-hero>* {
  flex: 1;
}

.rewards-hero-highlight {
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-width: min(100%, 320px);
  margin: 0;
}

.rewards-hero-highlight span {
  color: rgba(242, 245, 247, 0.78);
}

.rewards-hero-highlight strong {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.rewards-catalog-panel,
.rewards-history-panel {
  gap: 18px;
}

.stat-card {
  padding: 22px;
  position: relative;
  overflow: hidden;
  animation: rise-in 520ms ease both;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -35px -50px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.stat-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.stat-card strong {
  font-size: clamp(2.4rem, 3vw, 3.1rem);
}

.accent-teal {
  background: linear-gradient(160deg, rgba(17, 139, 159, 0.25), rgba(10, 22, 40, 0.92));
}

.accent-yellow {
  background: linear-gradient(160deg, rgba(255, 220, 2, 0.22), rgba(10, 22, 40, 0.92));
}

.accent-green {
  background: linear-gradient(160deg, rgba(0, 148, 64, 0.25), rgba(10, 22, 40, 0.92));
}

.accent-blue {
  background: linear-gradient(160deg, rgba(48, 38, 129, 0.4), rgba(10, 22, 40, 0.92));
}

.dashboard-grid,
.admin-grid,
.champion-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-width {
  grid-column: 1 / -1;
}

.panel-card,
.round-panel,
.auth-card,
.warning-banner,
.sticky-action-bar,
.result-card,
.match-card {
  padding: 24px;
  animation: rise-in 560ms ease both;
}

.panel-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1.9rem;
}

.panel-heading a {
  color: var(--yellow);
}

.ranking-mini-list,
.match-stack,
.users-list,
.points-list,
.catalog-grid,
.redemption-list,
.admin-predictions-list {
  display: grid;
  gap: 12px;
}

.page-groups .match-stack,
.page-knockout .match-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ranking-mini-item,
.match-card.compact,
.user-row,
.result-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ranking-mini-item.is-me,
.ranking-table tr.is-me,
.user-row:hover {
  background: rgba(255, 220, 2, 0.1);
}

.position,
.points-pill,
.match-badge,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.position,
.match-badge,
.tag {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
}

.points-pill {
  padding: 8px 12px;
  background: rgba(17, 139, 159, 0.2);
  color: #7fefef;
  font-weight: 700;
}

.match-card {
  display: grid;
  gap: 18px;
}

.page-groups .round-panel,
.page-knockout .round-panel {
  padding: 18px;
}

.page-groups .panel-heading,
.page-knockout .panel-heading {
  margin-bottom: 14px;
}

.prediction-match-card {
  gap: 12px;
  padding: 16px 18px;
  min-width: 0;
}

.prediction-compact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.prediction-team-block {
  gap: 8px;
}

.prediction-team-block strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.compact-scoreboard {
  padding: 6px 8px;
  gap: 6px;
  border-radius: 16px;
}

.compact-scoreboard input {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 1.35rem;
}

.compact-scoreboard span {
  font-size: 1.45rem;
}

.prediction-footer-meta {
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.95rem;
}

.prediction-footer-meta span:last-child {
  margin-left: auto;
}

.exact-only {
  border-color: rgba(255, 220, 2, 0.34);
}

.teams-grid,
.scoreline {
  display: grid;
  align-items: center;
  gap: 16px;
  grid-template-columns: 1fr auto 1fr;
}

.team-name {
  font-weight: 700;
}

.align-right {
  justify-content: flex-end;
  text-align: right;
}

.stadium-scoreboard {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #04090f, #111922);
  border: 1px solid rgba(255, 220, 2, 0.22);
}

.stadium-scoreboard input {
  width: 72px;
  height: 72px;
  border: none;
  border-radius: 16px;
  text-align: center;
  font-size: 2rem;
  color: var(--yellow);
  background: rgba(255, 220, 2, 0.07);
}

.stadium-scoreboard span {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2rem;
  color: var(--yellow);
}

.result-meta,
.match-header-row,
.user-row {
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.prediction-form {
  display: grid;
  gap: 20px;
}

.toolbox-card,
.reward-highlight-card,
.treat-card,
.redemption-item,
.empty-state {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
}

.toolbox-card,
.reward-highlight-card,
.treat-card,
.redemption-item,
.empty-state {
  padding: 20px 24px;
}

.toolbox-card {
  overflow: hidden;
}

.toolbox-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -20px -24px 18px;
  padding: 16px 24px;
  background: #118b9f;
  color: #f7fbfc;
}

.toolbox-card-header strong {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.04em;
  font-size: 1.5rem;
}

.toolbox-card-header span {
  color: rgba(247, 251, 252, 0.88);
  font-size: 0.92rem;
}

.toolbox-card-body {
  margin-bottom: 16px;
}

.toolbox-card,
.filter-bar,
.section-actions,
.summary-pills,
.prediction-admin-header,
.treat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbox-card,
.reward-highlight-card,
.empty-state {
  margin-bottom: 20px;
}

.filter-bar select,
.filter-bar input,
.compact-form input,
.compact-form select {
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.compact-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-form.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.import-form {
  align-items: center;
}

.import-form input[type="file"] {
  min-width: 220px;
}

.reward-highlight-card p,
.toolbox-card p,
.treat-card p,
.auth-caption,
.form-hint {
  color: var(--muted);
}

.auth-caption,
.form-hint {
  margin: 14px 0 0;
  font-size: 0.92rem;
}

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

.rewards-catalog-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

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

.treat-shop-card {
  gap: 16px;
  padding: 18px 20px;
}

.treat-shop-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.treat-shop-header .points-pill {
  flex-shrink: 0;
}

.treat-card.is-disabled {
  opacity: 0.74;
}

.treat-shop-card.is-disabled {
  opacity: 0.92;
}

.treat-card h3 {
  margin: 0;
  font-size: 1.28rem;
}

.admin-treat-card {
  align-content: start;
}

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

.treat-facts div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.treat-facts span {
  color: var(--muted);
  font-size: 0.82rem;
}

.treat-facts strong {
  font-size: 1rem;
}

.treat-order-form {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.field-lite {
  display: grid;
  gap: 8px;
}

.field-lite span {
  color: var(--muted);
  font-size: 0.82rem;
}

.field-lite input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.rewards-history-list {
  gap: 10px;
}

.rewards-history-item {
  padding: 16px 18px;
}

.history-main {
  display: grid;
  gap: 6px;
}

.history-main small {
  color: var(--muted);
}

.history-pills {
  justify-content: flex-end;
}

.redemption-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.redemption-admin-item {
  display: grid;
  grid-template-columns: 1.6fr auto auto auto;
  align-items: center;
}

.status-pending {
  color: #ffe27d;
}

.status-approved {
  color: #7fefef;
}

.status-delivered {
  color: #96ffd3;
}

.status-rejected,
.status-cancelled {
  color: #ffb5ae;
}

.admin-predictions-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.prediction-admin-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.prediction-admin-readonly {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.readonly-score-cell {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.readonly-score-cell span {
  color: var(--muted);
  font-size: 0.82rem;
}

.readonly-score-cell strong {
  font-size: 1.25rem;
}

.score-separator strong {
  color: var(--yellow);
}

.empty-state {
  text-align: center;
  color: var(--muted);
}

.sticky-action-bar {
  position: sticky;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.deadline-card,
.warning-banner {
  padding: 16px 18px;
}

.deadline-card.is-open {
  color: #96ffd3;
}

.deadline-card.is-closed {
  color: #ffaea6;
}

.warning-banner {
  margin-bottom: 20px;
  border-color: rgba(255, 220, 2, 0.32);
  background: rgba(255, 220, 2, 0.08);
}

.ranking-table-wrapper {
  overflow-x: auto;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.ranking-table th {
  color: var(--muted);
  font-weight: 600;
}

.auth-shell {
  min-height: calc(100vh - 180px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
}

.auth-hero {
  padding: 36px;
}

.hero-highlights,
.points-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.hero-highlights li,
.points-list li,
.classification-summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-card {
  max-width: 480px;
  margin-left: auto;
}

.stack-form,
.admin-game-form {
  display: grid;
  gap: 16px;
}

.stack-form label,
.admin-game-form label {
  display: grid;
  gap: 8px;
}

.stack-form input,
.stack-form select,
.stack-form textarea,
.admin-game-form input,
.admin-game-form select,
.modal-card input,
.modal-card select,
.modal-card textarea,
.admin-rewards-table select,
.admin-redemptions-table select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.stack-form textarea,
.modal-card textarea {
  min-height: 110px;
  resize: vertical;
}

select,
option {
  color: var(--text);
  background: #10203a;
}

.inline-check {
  display: flex !important;
  align-items: center;
  gap: 12px;
}

.inline-check input {
  width: auto;
}

.classification-summary,
.admin-links,
.user-tags,
.mobile-stack {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tag.is-active {
  color: #96ffd3;
}

.tag.is-inactive {
  color: #ffb5ae;
}

.admin-games-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-rewards-shell {
  display: grid;
  gap: 20px;
}

.admin-table-card {
  display: grid;
  gap: 18px;
}

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

.admin-rewards-table,
.admin-redemptions-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.admin-rewards-table thead,
.admin-redemptions-table thead {
  background: rgba(255, 255, 255, 0.03);
}

.admin-rewards-table th,
.admin-rewards-table td,
.admin-redemptions-table th,
.admin-redemptions-table td {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: middle;
}

.admin-rewards-table th,
.admin-redemptions-table th {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-rewards-table tbody tr:hover,
.admin-redemptions-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.admin-redemptions-table td small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.table-muted {
  color: var(--muted);
}

.table-path {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.table-actions-cell {
  text-align: right;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 12, 24, 0.72);
  backdrop-filter: blur(10px);
}

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

.modal-card {
  width: min(680px, 100%);
  max-height: min(88vh, 920px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: rgba(9, 19, 34, 0.96);
  box-shadow: var(--shadow);
}

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

.modal-header {
  margin-bottom: 20px;
}

.modal-header h2 {
  margin: 4px 0 0;
}

.modal-form {
  gap: 14px;
}

.modal-actions {
  margin-top: 8px;
}

body.has-modal-open {
  overflow: hidden;
}

.admin-game-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-game-form .inline-check,
.admin-game-form button {
  grid-column: 1 / -1;
}

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

.site-footer {
  text-align: center;
  padding: 28px 0 12px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  padding: 18px 20px;
  display: grid;
  gap: 6px;
  z-index: 20;
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.is-success {
  border-color: rgba(0, 148, 64, 0.4);
}

.toast.is-error {
  border-color: rgba(255, 107, 95, 0.4);
}

.toast.is-hidden {
  opacity: 0;
  transform: translateY(8px);
}

.menu-toggle {
  display: none;
  gap: 5px;
  padding: 0;
  border: none;
  background: transparent;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {

  .site-header,
  .stats-grid,
  .dashboard-grid,
  .admin-grid,
  .champion-grid,
  .admin-games-list,
  .results-grid,
  .auth-shell,
  .admin-predictions-list {
    grid-template-columns: 1fr;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .menu-toggle {
    display: grid;
  }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .site-nav.is-open {
    display: flex;
    flex-direction: column;
  }

  .header-user {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .auth-card {
    margin: 0;
  }

  .page-groups .match-stack,
  .page-knockout .match-stack {
    grid-template-columns: 1fr;
  }

  .rewards-hero {
    flex-direction: column;
  }

  .treat-order-form {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .treat-order-form button {
    grid-column: auto;
  }

  .modal-card {
    width: min(720px, 100%);
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 18px, 100%);
  }

  .site-header,
  .hero-panel,
  .panel-card,
  .round-panel,
  .auth-card,
  .warning-banner,
  .sticky-action-bar,
  .toolbox-card,
  .reward-highlight-card,
  .treat-card,
  .redemption-item {
    padding: 18px;
    border-radius: 22px;
  }

  .toolbox-card-header {
    margin: -18px -18px 16px;
    padding: 14px 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  .teams-grid,
  .scoreline,
  .admin-game-form,
  .compact-form,
  .prediction-admin-form,
  .redemption-admin-item {
    grid-template-columns: 1fr;
  }

  .prediction-compact-grid,
  .prediction-admin-readonly {
    grid-template-columns: 1fr;
  }

  .treat-facts,
  .treat-order-form {
    grid-template-columns: 1fr;
  }

  .treat-shop-header,
  .history-pills {
    flex-direction: column;
    align-items: stretch;
  }

  .team-name,
  .align-right,
  .scoreline {
    justify-content: center;
    text-align: center;
  }

  .prediction-team-block {
    justify-content: center;
  }

  .stadium-scoreboard {
    justify-content: center;
  }

  .stadium-scoreboard input {
    width: 60px;
    height: 60px;
  }

  .compact-scoreboard input {
    width: 48px;
    height: 48px;
  }

  .prediction-footer-meta {
    text-align: center;
  }

  .prediction-footer-meta span:last-child {
    margin-left: 0;
  }

  .sticky-action-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbox-card,
  .section-actions,
  .summary-pills,
  .prediction-admin-header,
  .redemption-item,
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .import-form input[type="file"] {
    min-width: 0;
    width: 100%;
  }

  .panel-heading,
  .modal-header,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-overlay {
    padding: 14px;
  }

  .modal-card {
    padding: 18px;
    border-radius: 22px;
  }
}