:root {
  --bg: #111315;
  --bg-soft: #15191d;
  --surface: #171c21;
  --surface-2: #1b2229;
  --surface-3: #202933;
  --surface-4: #273340;
  --text: #f4f7fb;
  --muted: #a4b0be;
  --line: rgba(220, 229, 237, 0.11);
  --brand: #7dd3fc;
  --brand-strong: #38bdf8;
  --brand-soft: rgba(125, 211, 252, 0.14);
  --accent: #f59e0b;
  --danger: #ff7e7e;
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 14px 32px rgba(0, 0, 0, 0.24);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  overflow-x: clip;
  background-color: var(--bg);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 22%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 28%),
    linear-gradient(180deg, #0e1012 0%, #12161a 24%, var(--bg) 100%);
}

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

code {
  font-family: "SFMono-Regular", "Menlo", "Monaco", monospace;
}

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: relative;
  z-index: 20;
  background: rgba(9, 11, 14, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(220, 229, 237, 0.08);
}

.topbar__inner,
.hero__inner,
.page {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.feature-band,
.hero__layout,
.hero-stat-list,
.cta-grid {
  display: grid;
  gap: 1rem;
}

.topbar__inner {
  min-height: 4.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand__crest {
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.brand__crest img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.8rem;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.topbar__nav a {
  color: rgba(244, 247, 251, 0.78);
  font-size: 0.92rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  transition: background 120ms ease, color 120ms ease;
}

.topbar__nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.topbar__cta {
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.18), rgba(56, 189, 248, 0.18));
  color: var(--text);
  font-weight: 700;
  border: 1px solid rgba(125, 211, 252, 0.22);
}

.hero {
  padding: 1.2rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
}

.hero::before {
  width: 30rem;
  height: 30rem;
  right: -10rem;
  top: -8rem;
  background: radial-gradient(circle, rgba(46, 196, 166, 0.16), transparent 60%);
}

.hero::after {
  width: 24rem;
  height: 24rem;
  left: -8rem;
  bottom: -8rem;
  background: radial-gradient(circle, rgba(246, 183, 86, 0.16), transparent 60%);
}

.hero__inner {
  position: relative;
  padding: 2.6rem;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(22, 28, 34, 0.98), rgba(29, 37, 45, 0.94)),
    #171d23;
  border: 1px solid rgba(220, 229, 237, 0.08);
  color: var(--text);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

.hero__layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.9fr);
  align-items: end;
}

.hero__layout--single {
  grid-template-columns: minmax(0, 1fr);
}

.hero__content {
  min-width: 0;
}

.hero__panel {
  padding: 1.25rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero__panel h2 {
  margin: 0.15rem 0 0;
  font-size: 1.5rem;
  line-height: 1.15;
}

.hero-stat-list {
  margin-top: 1rem;
}

.hero-stat {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-stat small,
.hero-stat strong {
  display: block;
}

.hero-stat small {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-stat strong {
  margin-top: 0.35rem;
  font-size: 1rem;
  line-height: 1.35;
}

.hero--admin .hero__inner {
  background:
    linear-gradient(135deg, rgba(21, 27, 35, 0.98), rgba(31, 42, 52, 0.94)),
    #171d25;
}

.hero--locked .hero__inner {
  opacity: 0.98;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.hero h1,
.panel h2,
.week-card h3,
.match-card h4 {
  margin: 0;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 0.92;
  font-weight: 800;
}

.hero__copy {
  max-width: 42rem;
  margin: 0.8rem 0 0;
  color: rgba(243, 250, 252, 0.82);
  font-size: 1rem;
  line-height: 1.55;
}

.hero__meta,
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero__meta {
  margin-top: 1rem;
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.hero__actions {
  margin-top: 1rem;
}

.page {
  padding: 0.15rem 0 3rem;
}

.page--admin {
  padding-top: 0.5rem;
}

.page--admin .layout {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.page--admin .layout__primary,
.page--admin .layout__secondary {
  width: 100%;
}

.panel {
  padding: 1.5rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(27, 34, 41, 0.98), rgba(19, 24, 29, 0.99));
  border: 1px solid rgba(220, 229, 237, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.panel--summary {
  margin-top: 0;
}

.panel--highlight {
  background:
    linear-gradient(180deg, rgba(125, 211, 252, 0.08), rgba(19, 24, 29, 0.99)),
    linear-gradient(180deg, rgba(27, 34, 41, 0.98), rgba(19, 24, 29, 0.99));
  border: 1px solid rgba(125, 211, 252, 0.14);
}

.panel--compact {
  padding: 1.2rem;
}

.summary-grid,
.feature-band,
.layout,
.layout__primary,
.layout__secondary,
.rules-grid,
.schedule-list,
.matches,
.team-editor {
  display: grid;
  gap: 1rem;
}

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

.feature-band {
  margin-bottom: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.feature-card {
  padding: 1.15rem 1.2rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(26, 32, 39, 0.96), rgba(18, 22, 27, 0.99));
  border: 1px solid rgba(220, 229, 237, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.feature-card h2 {
  margin-top: 0.2rem;
  font-size: 1.28rem;
  line-height: 1.15;
}

.feature-card h3 {
  margin-top: 0.2rem;
  margin-bottom: 0.55rem;
  font-size: 1.16rem;
  line-height: 1.2;
}

.feature-card p:last-child {
  margin-bottom: 0;
}

.feature-card--action {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1rem;
}

.inline-note {
  color: var(--muted);
  font-size: 0.94rem;
}

.summary-card {
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(33, 42, 51, 0.96), rgba(22, 28, 34, 0.98));
  border: 1px solid rgba(220, 229, 237, 0.08);
}

.summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-card strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.15rem;
  line-height: 1.2;
}

.layout {
  margin-top: 0.9rem;
  align-items: start;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.92fr);
}

.layout--stacked {
  grid-template-columns: 1fr;
}

.layout--stacked .layout__secondary {
  order: -1;
}

.layout__primary,
.layout__secondary,
.panel,
.admin-workspace,
.admin-view,
.week-card,
.slot-card,
.table-wrap {
  min-width: 0;
}

.page--admin .layout__secondary {
  display: grid;
  gap: 1rem;
}

.rules-grid {
  margin-top: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.rules-spotlight {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rules-callout {
  padding: 1.2rem;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(35, 45, 54, 0.96), rgba(23, 29, 35, 0.99));
  border: 1px solid rgba(220, 229, 237, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.rules-callout h2,
.rule-card h2 {
  margin-top: 0.2rem;
  font-size: 1.4rem;
}

.rules-callout p:last-child {
  margin-bottom: 0;
}

.rule-card {
  position: relative;
  overflow: hidden;
}

.rule-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), rgba(246, 183, 86, 0.7));
  opacity: 0.9;
}

.section-heading,
.week-card__header,
.match-card,
.admin-actions,
.standings-card__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading {
  align-items: end;
  margin-bottom: 0.9rem;
}

.schedule-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem;
  border-radius: 999px;
  border: 1px solid rgba(220, 229, 237, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.view-toggle__button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 2.55rem;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.view-toggle__button--active {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.18), rgba(56, 189, 248, 0.12));
  color: var(--text);
}

.chip-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.section-note,
.muted,
.week-note,
.match-time,
.status-message {
  color: var(--muted);
}

.section-note--filter {
  margin: 0 0 0.7rem;
}

.standings-cards {
  display: none;
  gap: 0.8rem;
}

.standings-card {
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(31, 40, 49, 0.96), rgba(21, 27, 33, 0.99));
  border: 1px solid rgba(220, 229, 237, 0.09);
}

.standings-card__top {
  align-items: center;
  flex-wrap: wrap;
}

.standings-card__rank,
.standings-card__points {
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.84rem;
  font-weight: 700;
}

.standings-card__rank {
  background: rgba(125, 211, 252, 0.16);
  color: var(--brand);
}

.standings-card__points {
  background: rgba(246, 183, 86, 0.14);
  color: var(--accent);
}

.standings-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.stat-chip {
  min-width: 4.1rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(180, 213, 226, 0.08);
  display: grid;
  gap: 0.2rem;
}

.stat-chip small {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-chip strong {
  font-size: 0.98rem;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(220, 229, 237, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

th,
td {
  padding: 0.9rem 0.6rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  font-size: 0.95rem;
}

.team-cell {
  text-align: left;
  font-weight: 700;
}

.points-cell {
  font-weight: 800;
  color: var(--brand);
}

.schedule-master-table {
  min-width: 760px;
}

.schedule-master-table td:first-child,
.schedule-master-table td:nth-child(2),
.schedule-master-table td:nth-child(3),
.schedule-master-table td:nth-child(4),
.schedule-master-table td:last-child {
  white-space: nowrap;
}

.schedule-master-table td:first-child,
.schedule-master-table td:nth-child(2),
.schedule-master-table td:nth-child(3),
.schedule-master-table td:nth-child(4),
.schedule-master-table td:last-child,
.schedule-master-table th:first-child,
.schedule-master-table th:nth-child(2),
.schedule-master-table th:nth-child(3),
.schedule-master-table th:nth-child(4),
.schedule-master-table th:last-child {
  text-align: center;
}

.schedule-master-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.25rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: rgba(46, 196, 166, 0.12);
  color: var(--brand);
  font-size: 0.88rem;
}

.schedule-master-pending {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.25rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.week-card {
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(31, 39, 47, 0.98), rgba(21, 27, 32, 0.99));
  border: 1px solid rgba(220, 229, 237, 0.06);
}

.week-meta {
  display: grid;
  gap: 0.25rem;
  justify-items: end;
  text-align: right;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.week-date-title {
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  line-height: 1.08;
}

.matches {
  margin-top: 0.8rem;
  gap: 0.75rem;
}

.match-card {
  align-items: center;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(220, 229, 237, 0.06);
}

.match-card h4 {
  margin-top: 0.2rem;
  font-size: 0.98rem;
  line-height: 1.28;
}

.match-time {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.match-tagline {
  margin: 0.25rem 0 0;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.match-separator {
  color: var(--accent);
  font-weight: 600;
}

.scoreline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(46, 196, 166, 0.12);
  color: var(--brand);
  font-size: 1rem;
}

.pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.52rem 0.85rem;
  border-radius: 999px;
  background: rgba(46, 196, 166, 0.1);
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 600;
}

.info-list {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  line-height: 1.5;
}

.info-list li + li {
  margin-top: 0.45rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #07131a;
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.18);
}

.button:hover {
  transform: translateY(-1px);
}

.button--secondary,
.button--ghost,
.button--light {
  box-shadow: none;
}

.button--secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: rgba(220, 229, 237, 0.12);
}

.button--light {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.1));
  color: #fff7e8;
  border-color: rgba(245, 158, 11, 0.22);
}

.button--ghost {
  background: transparent;
  color: var(--muted);
  border-color: rgba(180, 213, 226, 0.08);
}

.button--full {
  width: 100%;
}

.team-chip {
  appearance: none;
  border: 1px solid rgba(180, 213, 226, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.team-chip--active {
  background: var(--brand);
  color: #04251f;
  border-color: var(--brand);
}

.hidden {
  display: none;
}

.admin-locked #admin-panel {
  display: none !important;
}

.admin-locked .page--admin {
  padding-top: 0;
}

.admin-lock {
  max-width: 720px;
  margin: 0 auto;
}

.admin-login-form {
  display: grid;
  gap: 0.9rem;
}

.admin-cognito-actions {
  display: grid;
  gap: 0.9rem;
  margin: 1rem 0;
}

.team-editor {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-workspace {
  display: grid;
  gap: 1.25rem;
}

.page--admin .admin-workspace,
.page--admin .panel--compact {
  width: 100%;
}

.admin-panel {
  display: grid;
  gap: 1rem;
}

.schedule-toolbar--admin {
  margin-bottom: 0.35rem;
}

.admin-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-subnav__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.9rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(220, 229, 237, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 700;
}

.admin-subnav__link--active {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.18), rgba(56, 189, 248, 0.12));
  border-color: rgba(125, 211, 252, 0.22);
  color: var(--text);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-tab {
  appearance: none;
  border: 1px solid rgba(220, 229, 237, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  min-height: 2.9rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.admin-tab--active {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.18), rgba(56, 189, 248, 0.12));
  border-color: rgba(125, 211, 252, 0.22);
  color: var(--text);
}

.admin-view {
  display: grid;
  gap: 1rem;
}

.summary-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.date-editor {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.date-editor__item span small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.reschedule-board {
  display: grid;
  gap: 1rem;
}

.reschedule-jump {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-start;
  gap: 0.85rem;
}

.week-card--reschedule {
  gap: 1rem;
  scroll-margin-top: 5.5rem;
}

.week-meta--admin {
  min-width: 0;
  width: min(100%, 280px);
}

.field--compact {
  gap: 0.35rem;
}

.field--compact span {
  font-size: 0.88rem;
}

.field--compact input,
.field--compact select {
  min-height: 3.1rem;
  padding: 0.8rem 0.95rem;
  font-size: 0.98rem;
}

.slot-quick-add {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.button--mini {
  min-height: 2.7rem;
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
}

.admin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: stretch;
}

.admin-actions .button {
  width: 100%;
}

.reschedule-slots {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.slot-card {
  padding: 1.15rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(220, 229, 237, 0.08);
  display: grid;
  gap: 0.95rem;
}

.slot-team-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.slot-card__toolbar {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 0.8fr) auto;
  align-items: end;
}

.slot-dropzone {
  min-height: 5rem;
  border: 1px dashed rgba(220, 229, 237, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.85rem;
  transition: border-color 120ms ease, background 120ms ease;
}

.slot-dropzone--active {
  border-color: rgba(125, 211, 252, 0.45);
  background: rgba(125, 211, 252, 0.08);
}

.slot-placeholder {
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.match-bar {
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(125, 211, 252, 0.18);
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.14), rgba(56, 189, 248, 0.08));
  color: var(--text);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  cursor: grab;
  text-align: left;
}

.match-bar-shell {
  display: grid;
  gap: 0.7rem;
}

.match-bar__details {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.match-bar__meta,
.match-bar__tag,
.match-bar__label,
.match-bar__score {
  display: block;
}

.match-bar__meta {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.match-bar__tag {
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.match-bar__label {
  font-weight: 700;
}

.match-bar__score {
  color: var(--muted);
  white-space: nowrap;
}

.match-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.field {
  display: grid;
  gap: 0.38rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.field--inline {
  min-width: min(100%, 260px);
}

.field input,
.field select {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(180, 213, 226, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.field input:focus,
.field select:focus,
.score-editor input:focus {
  outline: 2px solid rgba(46, 196, 166, 0.2);
  outline-offset: 1px;
  border-color: rgba(46, 196, 166, 0.28);
}

.field--file input {
  padding: 0.6rem;
}

.score-editor {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.85rem;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(180, 213, 226, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}

.toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--brand);
}

.score-editor input {
  width: 4.15rem;
  min-height: 2.7rem;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(180, 213, 226, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

.standings-table--admin {
  min-width: 560px;
}

.page--admin .table-wrap {
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
}

.status-message {
  min-height: 1.3rem;
  margin: 0.8rem 0 0;
  font-size: 0.92rem;
}

.status-message--error {
  color: var(--danger);
}

.status-message--success {
  color: var(--brand);
}

@media (max-width: 960px) {
  .hero__layout,
  .feature-band,
  .cta-grid,
  .layout,
  .rules-grid {
    grid-template-columns: 1fr;
  }

  .rules-spotlight {
    grid-template-columns: 1fr;
  }

  .layout__secondary,
  .page--admin .layout__secondary {
    position: static;
    top: auto;
  }

  .section-heading,
  .week-card__header,
  .match-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .week-meta {
    justify-items: start;
    text-align: left;
  }

  .week-meta--admin {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .topbar__inner {
    padding: 0.25rem 0;
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar__nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding-top: 1rem;
  }

  .hero__inner {
    padding: 1.1rem;
    border-radius: 26px;
  }

  .hero__panel {
    padding: 1rem;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.1rem, 9vw, 3.4rem);
  }

  .standings-cards {
    display: none;
  }

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

  .standings-table {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    table-layout: fixed;
  }

  .standings-table th,
  .standings-table td {
    padding: 0.42rem 0.14rem;
    font-size: 0.66rem;
    white-space: nowrap;
    line-height: 1.05;
  }

  .standings-table th {
    font-size: 0.54rem;
    letter-spacing: 0.03em;
  }

  .standings-table .team-cell {
    max-width: 4.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.62rem;
  }

  .standings-table th:nth-child(1),
  .standings-table td:nth-child(1) {
    width: 7%;
  }

  .standings-table th:nth-child(2),
  .standings-table td:nth-child(2) {
    width: 24%;
  }

  .standings-table th:nth-child(n + 3),
  .standings-table td:nth-child(n + 3) {
    width: 8.625%;
  }

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

  .week-card__header {
    gap: 0.55rem;
  }

  .week-meta {
    justify-items: start;
    text-align: left;
  }

  .admin-actions {
    flex-direction: column;
  }

  .admin-actions .button {
    width: 100%;
  }

  .schedule-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toggle {
    width: 100%;
    justify-content: flex-start;
  }

  .chip-row {
    margin-bottom: 1rem;
  }

  .score-editor {
    width: 100%;
  }

  .slot-card__toolbar,
  .slot-team-grid {
    grid-template-columns: 1fr;
  }

  .reschedule-jump {
    align-items: stretch;
  }

  .reschedule-jump .field--inline,
  .reschedule-jump .section-note {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .topbar__inner,
  .hero__inner,
  .page {
    width: min(100% - 1rem, 1180px);
  }

  .panel,
  .week-card {
    border-radius: 20px;
    padding: 0.85rem;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .match-card {
    padding: 0.78rem 0.82rem;
  }

  .standings-table th,
  .standings-table td {
    padding: 0.34rem 0.1rem;
    font-size: 0.58rem;
  }

  .standings-table .team-cell {
    max-width: 3.95rem;
    font-size: 0.56rem;
  }

  .standings-table th {
    font-size: 0.48rem;
  }

  .standings-table th:nth-child(2),
  .standings-table td:nth-child(2) {
    width: 22%;
  }

  .match-card h4 {
    font-size: 1rem;
  }

  .hero__meta,
  .hero__actions {
    gap: 0.6rem;
  }

  .hero__meta span,
  .button {
    width: 100%;
  }

  .brand {
    width: 100%;
  }
}
