/* =============================================
   Paddle Tennis League — Shared Styles
   ============================================= */

:root {
  --green-dark:   #2b2b2b;
  --green-mid:    #f4845f;
  --green-light:  #f6a07f;
  --green-pale:   #fde8df;
  --accent:       #f4845f;
  --white:        #ffffff;
  --gray-100:     #f8f9fa;
  --gray-200:     #e9ecef;
  --gray-400:     #ced4da;
  --gray-600:     #4a4a4a;
  --gray-800:     #1a1a1a;
  --text:         #1a1a1a;
  --radius:       8px;
  --shadow:       0 2px 8px rgba(0,0,0,0.10);
  --shadow-lg:    0 4px 20px rgba(0,0,0,0.14);
}

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--gray-100);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ----- Background watermark ----- */
body::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  max-width: 700px;
  aspect-ratio: 1;
  background: url('../wbp-logo.png') no-repeat center center;
  background-size: contain;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

main, nav, footer { position: relative; z-index: 1; }

a { color: var(--green-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ----- Navigation ----- */
nav {
  background: linear-gradient(135deg, #1a1a1a 0%, #2b2b2b 55%, #3d2215 100%);
  color: var(--white);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 120px;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand img {
  height: 108px;
  width: auto;
  vertical-align: middle;
  margin-right: 0.4rem;
}

.nav-brand {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand span { color: var(--accent); }
a.nav-brand { text-decoration: none; color: var(--white); }
a.nav-brand:hover { text-decoration: none; color: var(--white); }

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--white);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
  text-shadow: -1px -1px 0 rgba(0,0,0,0.6), 1px -1px 0 rgba(0,0,0,0.6),
               -1px  1px 0 rgba(0,0,0,0.6), 1px  1px 0 rgba(0,0,0,0.6);
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  text-decoration: none;
}

.nav-links a.active { background: var(--accent); color: var(--white); }

#nav-auth-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.85);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
#nav-auth-btn:hover { background: rgba(255,255,255,0.15); color: var(--white); }

/* Hamburger — hidden on desktop, shown on mobile */
#nav-hamburger {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.35);
  color: var(--white);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
  margin-left: 0.5rem;
}
#nav-hamburger:hover { background: rgba(255,255,255,0.15); }

/* ----- Page layout ----- */
main {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}
main.main-wide {
  max-width: 1100px;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.35rem;
}

.page-subtitle {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

/* ----- Season Selector Bar ----- */
.season-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.65rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-600);
  box-shadow: var(--shadow);
}
.season-bar label { white-space: nowrap; }
.season-bar select {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--gray-400);
  border-radius: 6px;
  background: var(--white);
  color: var(--gray-800);
  cursor: pointer;
}
.season-bar select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ----- Cards ----- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--green-pale);
}

/* ----- Section Title ----- */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-600);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--green-pale);
}

/* ----- Standings Table ----- */
.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.standings-table th {
  background: var(--green-dark);
  color: var(--white);
  padding: 0.65rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.standings-table th:first-child { border-radius: var(--radius) 0 0 0; }
.standings-table th:last-child  { border-radius: 0 var(--radius) 0 0; }

.standings-table th.sortable-th { cursor: pointer; user-select: none; }
.standings-table th.sortable-th:hover { background: #444; }
.standings-table th.sort-active { background: var(--accent); }

.standings-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.standings-table tbody tr:hover { background: var(--gray-100); }
.standings-table tbody tr:last-child td { border-bottom: none; }

.standings-table .rank {
  font-weight: 700;
  color: var(--gray-600);
  width: 48px;
}

.standings-table .player-name { font-weight: 600; }

.standings-table .avg-score {
  font-weight: 700;
  color: var(--green-mid);
  text-align: right;
}

.standings-table td:not(.player-name) { text-align: right; }
.standings-table th:not(:first-child):not(:nth-child(2)) { text-align: right; }

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
}

.rank-1 { background: #FFD700; color: #7a6000; }
.rank-2 { background: #C0C0C0; color: #555; }
.rank-3 { background: #cd7f32; color: #fff; }

/* Podium row highlights */
.standings-table tbody tr.podium-1 { background: rgba(255,215,0,0.07); box-shadow: inset 4px 0 0 #FFD700; }
.standings-table tbody tr.podium-2 { background: rgba(192,192,192,0.07); box-shadow: inset 4px 0 0 #C0C0C0; }
.standings-table tbody tr.podium-3 { background: rgba(205,127,50,0.07); box-shadow: inset 4px 0 0 #cd7f32; }

/* Last played column */
.last-played { font-size: 0.8rem; color: var(--gray-600); text-align: right; }

/* First-place ineligibility */
.inelig-asterisk {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  margin-left: 0.15rem;
  cursor: default;
}
.standings-footnote {
  font-size: 0.8rem;
  color: var(--gray-500);
  padding: 0.6rem 0.25rem 0.25rem;
  border-top: 1px solid var(--gray-200);
  margin-top: 0.25rem;
}

/* Streak badge */
.streak-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.streak-win  { background: #d4edda; color: #155724; }
.streak-loss { background: #f8d7da; color: #721c24; }

.streak-row {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--gray-600);
  font-weight: 500;
}

/* Sparkline */
.sparkline-wrap {
  padding: 1rem 0 0.5rem;
  border-top: 1px solid var(--gray-200);
  margin-top: 0.5rem;
}
.sparkline-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}
.sparkline-svg { display: block; width: 100%; height: 100px; }

/* ----- Player Stats Page ----- */
.player-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat-box {
  padding: 1rem 0.5rem;
  border-radius: var(--radius);
  background: var(--gray-100);
}

.stat-box-highlight {
  background: var(--green-pale);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
}

.stat-box-highlight .stat-value {
  color: var(--accent);
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-600);
  margin-top: 0.35rem;
}

.player-match-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.player-match-row:last-child { border-bottom: none; }

.pmr-result {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.result-win  { background: #2b7a3d; color: var(--white); }
.result-loss { background: #dc3545; color: var(--white); }

.pmr-detail { flex: 1; }

.pmr-teams {
  font-size: 0.9rem;
  color: var(--gray-800);
}

.pmr-sets {
  font-size: 1rem;
  color: var(--gray-600);
  margin-top: 0.15rem;
}

.pmr-score {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  text-align: right;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .player-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ----- Match Result Cards ----- */
.week-section { margin-bottom: 2rem; }

.week-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-600);
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.match-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.75rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.match-team {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.match-team.team-right { text-align: right; align-items: flex-end; }

.match-team-names {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
}

.match-team-score {
  font-size: 0.8rem;
  color: var(--gray-600);
}

.match-score-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.match-score-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--green-dark);
}

.match-score-badge span { color: var(--gray-400); font-size: 1rem; }

.match-sets {
  font-size: 0.75rem;
  color: var(--gray-600);
  text-align: center;
}

.winner-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--green-light);
}

.team-won .match-team-names { color: var(--green-dark); }
.team-lost .match-team-names { color: var(--gray-600); }

/* ----- Availability Page ----- */
.availability-week {
  margin-bottom: 1.5rem;
}

.week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.week-date-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
}

.avail-toggle {
  display: flex;
  gap: 0.5rem;
}

.avail-btn {
  padding: 0.55rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid var(--gray-400);
  background: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--gray-600);
}

.avail-btn:hover { border-color: var(--green-mid); color: var(--green-mid); }
.avail-btn.selected-yes { background: #2b7a3d; border-color: #2b7a3d; color: var(--white); }
.avail-btn.selected-no  { background: #c0392b; border-color: #c0392b; color: var(--white); }

.avail-note {
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-400);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text);
  resize: none;
}
.avail-note:focus { outline: none; border-color: var(--green-mid); }

.save-btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: var(--green-mid);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 1rem;
}
.save-btn:hover { background: var(--green-dark); }
.save-btn:disabled { background: var(--gray-400); cursor: not-allowed; }

.avail-actions {
  margin-bottom: 1.25rem;
}

.btn-mark-all {
  padding: 0.55rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid #2b7a3d;
  background: var(--white);
  color: #2b7a3d;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-mark-all:hover {
  background: #2b7a3d;
  color: var(--white);
}

/* Admin availability grid */
.avail-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.avail-grid th {
  background: var(--green-dark);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.8rem;
}
.avail-grid td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--gray-200);
}
.avail-grid tbody tr:hover { background: var(--gray-100); }

.avail-yes { color: #2b7a3d; font-weight: 700; }
.avail-no  { color: #dc3545; font-weight: 700; }
.avail-pending { color: var(--gray-400); }

.avail-grid-name { font-weight: 600; white-space: nowrap; }
.admin-avail-select {
  font-size: 0.8rem;
  padding: 0.2rem 0.35rem;
  border: 1px solid var(--gray-400);
  border-radius: 4px;
  background: var(--white);
  cursor: pointer;
  width: 100%;
  min-width: 72px;
}
.admin-avail-select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.admin-avail-select option[value="yes"] { color: #155724; }
.admin-avail-select option[value="no"]  { color: #721c24; }

/* Availability tally section */
.tally-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--gray-800);
  text-align: center;
}
.tally-week {
  padding: 0.9rem 1.25rem;
  margin-bottom: 0.75rem;
}
.tally-week-label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--gray-800);
}
.tally-rows {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.875rem;
}
.tally-rows .tally-yes     { color: #2b7a3d; font-weight: 600; }
.tally-rows .tally-no      { color: #dc3545; font-weight: 600; }
.tally-rows .tally-pending { color: var(--gray-500); }

/* ----- Scheduler ----- */
.scheduler-controls {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.scheduler-week-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 180px;
}
.scheduler-label { font-weight: 600; font-size: 0.875rem; color: var(--gray-800); }
.scheduler-select { margin: 0; }
.scheduler-generate-btn { white-space: nowrap; padding: 0.6rem 1.5rem; }
.scheduler-loading {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--gray-600);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.scheduler-results-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--gray-800);
}

/* Summary bar */
.sched-summary {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.sched-stat {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  flex: 1;
}
.sched-stat-val  { font-size: 1.5rem; font-weight: 700; color: var(--gray-800); }
.sched-stat-lbl  { font-size: 0.75rem; color: var(--gray-600); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.sched-stat-out  .sched-stat-val { color: #c0392b; }

/* Sit-out card */
.sitout-card {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid #e67e22;
}
.sitout-header {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e67e22;
  margin-bottom: 0.75rem;
}
.sitout-players { display: flex; flex-direction: column; gap: 0.4rem; }
.sitout-player  { display: flex; align-items: center; gap: 0.75rem; }
.sitout-name    { font-weight: 600; }
.sitout-outings { font-size: 0.8rem; color: var(--gray-600); }
.tiebreak-note  {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--gray-600);
  font-style: italic;
  border-top: 1px solid var(--gray-200);
  padding-top: 0.6rem;
}

/* Pairing option cards */
.pairing-option {
  margin-bottom: 1rem;
  padding: 1.1rem 1.25rem;
  border-left: 4px solid var(--gray-200);
}
.pairing-top {
  border-left-color: var(--accent);
  background: linear-gradient(135deg, #fffaf8 0%, var(--white) 100%);
}
.pairing-option-label {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-600);
  margin-bottom: 0.85rem;
}
.pairing-top .pairing-option-label { color: var(--accent); }
.pairing-select-row { margin-top: 1rem; text-align: center; }
.courts-list { display: flex; flex-direction: column; gap: 0.6rem; }
.court-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.court-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 52px;
}
.court-match {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.team-pair { font-weight: 600; color: var(--gray-800); }
.court-vs  { font-size: 0.8rem; color: var(--gray-600); font-weight: 400; }

/* ── Court card (scheduler rich view) ── */
.court-card {
  margin-bottom: 0.85rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
}
.court-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.85rem;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}
.court-card-num {
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-600);
}
.court-diff {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}
.court-diff-low  { background: #d4edda; color: #155724; }
.court-diff-mid  { background: #fff3cd; color: #856404; }
.court-diff-high { background: #f8d7da; color: #721c24; }

.court-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  padding: 0.75rem 0.85rem;
}
.court-team { display: flex; flex-direction: column; gap: 0.25rem; }
.court-vs-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.9rem;
  font-size: 0.78rem;
  color: var(--gray-500);
  align-self: center;
}
.court-team-player {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.ctp-name  { font-weight: 600; color: var(--gray-800); font-size: 0.9rem; }
.ctp-score { font-size: 0.8rem; color: var(--gray-500); font-weight: 500; font-variant-numeric: tabular-nums; }
.court-team-divider { border: none; border-top: 1px solid var(--gray-200); margin: 0.25rem 0; }
.court-team-total {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gray-700);
}
.court-team-record { font-size: 0.74rem; color: var(--gray-500); }

.court-matchup-history {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.9rem;
  padding: 0.45rem 0.85rem;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  font-size: 0.74rem;
  color: var(--gray-600);
}
.cmh-label { font-weight: 600; color: var(--gray-400); }
.cmh-pair  { white-space: nowrap; }

/* ----- Login Page ----- */
.login-wrapper {
  max-width: 420px;
  margin: 3rem auto 0;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

.login-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-logo h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green-dark);
}

.login-logo p { color: var(--gray-600); font-size: 0.9rem; margin-top: 0.25rem; }

/* ----- Forms ----- */
.form-group { margin-bottom: 1rem; }

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--gray-800);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--gray-400);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.12);
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, opacity 0.15s;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary   { background: var(--green-mid);  color: var(--white); }
.btn-primary:hover:not(:disabled)  { background: var(--green-dark); }
.btn-secondary { background: var(--gray-200);   color: var(--gray-800); }
.btn-secondary:hover:not(:disabled){ background: var(--gray-400); }
.btn-danger    { background: #dc3545;            color: var(--white); }
.btn-danger:hover:not(:disabled)   { background: #b02a37; }
.btn-success   { background: #2e7d32;            color: var(--white); }
.btn-success:hover:not(:disabled)  { background: #1b5e20; }
.btn-full      { width: 100%; text-align: center; padding: 0.75rem; font-size: 1rem; }

/* ----- Admin ----- */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.player-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}

.player-row .form-group { margin-bottom: 0; }

.set-scores-group {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
}

.team-block {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--gray-100);
}

.team-block-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--green-mid);
  margin-bottom: 0.75rem;
}

/* ----- Alerts / Messages ----- */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.alert-success { background: var(--green-pale); color: var(--green-dark); border: 1px solid var(--green-light); }
.alert-error   { background: #fde8e8;           color: #b91c1c;          border: 1px solid #f87171; }
.alert-info    { background: #e0f2fe;           color: #0369a1;          border: 1px solid #7dd3fc; }

.hidden { display: none !important; }

/* ----- Loading spinner ----- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--green-mid);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 2.5rem;
  color: var(--gray-600);
  font-size: 0.9rem;
}

/* ----- Clickable player names ----- */
.player-link {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
  transition: color 0.15s, border-color 0.15s;
}
.player-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* ----- Upcoming Matches (Homepage) ----- */
.upcoming-section {
  margin-bottom: 1.25rem;
}

.upcoming-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.upcoming-pill {
  background: var(--accent);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.upcoming-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-600);
}

.upcoming-match-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
}

.upcoming-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
  color: var(--gray-600);
  font-weight: 600;
}

.upcoming-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.upcoming-team {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  flex: 1;
}

.upcoming-team:last-child {
  text-align: right;
}

.upcoming-vs {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .upcoming-teams {
    flex-direction: column;
    gap: 0.3rem;
    align-items: flex-start;
  }
  .upcoming-team:last-child { text-align: left; }
  .upcoming-vs { align-self: center; }
}

/* ----- Homepage ----- */
.home-hero {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
}
.home-hero-logo {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
}
.home-hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--green-dark);
  letter-spacing: -0.5px;
  margin-bottom: 0.4rem;
}
.home-hero-title span { color: var(--accent); }
.home-hero-sub {
  font-size: 1rem;
  color: var(--gray-600);
  font-weight: 500;
}

.home-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.home-stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1rem;
  text-align: center;
}
.home-stat-card-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--green-light) 100%);
}
.home-stat-card-accent .home-stat-value,
.home-stat-card-accent .home-stat-label { color: var(--white); }
.home-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.home-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-600);
}

.home-nav-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.home-nav-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s;
  display: block;
}
.home-nav-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--text);
}
.home-nav-icon { font-size: 2rem; margin-bottom: 0.6rem; }
.home-nav-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.25rem;
}
.home-nav-desc {
  font-size: 0.85rem;
  color: var(--gray-600);
}

@media (max-width: 640px) {
  .home-stats-row { grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
  .home-stat-value { font-size: 1.5rem; }
  .home-nav-grid { grid-template-columns: repeat(2, 1fr); }
  .home-hero-title { font-size: 1.8rem; }
  .home-hero-logo { width: 80px; height: 80px; }
}

/* ----- Lightbox overlay (shared) ----- */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ----- Birthday Banner ----- */
.birthday-banner {
  text-align: center;
  margin-bottom: 1.4rem;
}
.birthday-img {
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: opacity 0.2s;
  display: block;
  margin: 0 auto 0.75rem;
}
.birthday-img:hover { opacity: 0.88; }
.birthday-caption {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--green-dark);
  letter-spacing: 0.3px;
}

/* ----- Match Result Card (homepage) ----- */
.result-pill-green {
  background: #2e7d32;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}
.result-card {
  border-left-color: #2e7d32 !important;
}
.result-final-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: #2e7d32;
  background: #e8f5e9;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
}
.result-teams-layout {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.result-team-col {
  flex: 1;
}
.winner-col { }
.loser-col { text-align: right; }
.result-team-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 0.3rem;
}
.winner-name {
  color: var(--green-dark);
  font-size: 1.05rem;
}
.result-sets {
  display: flex;
  gap: 0.4rem;
}
.loser-col .result-sets { justify-content: flex-end; }
.result-set {
  font-size: 1.3rem;
  font-weight: 800;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.winner-set {
  background: var(--green-dark);
  color: #fff;
}
.loser-set {
  background: var(--gray-200);
  color: var(--gray-600);
}
.result-vs-center {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
}

/* ----- Match Recap (homepage only) ----- */
.match-recap {
  margin-top: 1rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  border-left: 4px solid #2e7d32;
}
.match-recap p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--gray-700, #374151);
  margin: 0;
}

@media (max-width: 640px) {
  .result-teams-layout { gap: 0.4rem; }
  .result-set { font-size: 1.1rem; width: 1.8rem; height: 1.8rem; }
  .result-team-name { font-size: 0.88rem; }
  .birthday-caption { font-size: 1.1rem; }
}

/* ----- Footer ----- */
footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 0.8rem;
  color: var(--gray-600);
  border-top: 1px solid var(--gray-200);
  background: var(--white);
  margin-top: auto;
}

/* ----- Responsive ----- */
@media (max-width: 640px) {
  /* Nav becomes a wrapping flex row so links can drop below */
  nav {
    padding: 0 1rem;
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-brand {
    font-size: 1.5rem;
    flex: 1;
    padding: 0.6rem 0;
  }

  .nav-brand img { height: 48px; }

  #nav-hamburger { display: block; }

  /* Links hidden by default; shown as full-width column when open */
  .nav-links {
    display: none;
    flex-direction: column;
    flex-basis: 100%;
    order: 10;
    gap: 0.6rem;
    padding: 1rem 0 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.15);
  }

  nav.nav-open .nav-links { display: flex; }

  .nav-links a {
    display: block;
    padding: 1.1rem 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 6px;
    border-bottom: none;
    background: rgba(255,255,255,0.1);
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: var(--accent);
  }

  main { padding: 1.25rem 0.85rem; }
  .page-title { font-size: 1.3rem; }

  .match-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    text-align: center;
  }
  .match-team.team-right { text-align: center; align-items: center; }
  .match-score-center { flex-direction: row; justify-content: center; padding: 0.25rem 0; }

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

  .standings-table { font-size: 0.82rem; }
  .standings-table td, .standings-table th { padding: 0.55rem 0.6rem; }

  .sched-summary { flex-wrap: wrap; gap: 0.75rem; }
  .court-row { flex-direction: column; gap: 0.25rem; }
  .court-match { flex-direction: column; gap: 0.15rem; align-items: flex-start; }
  .court-vs { margin: 0; font-size: 0.8rem; }
  .court-teams { grid-template-columns: 1fr; }
  .court-vs-col { padding: 0.4rem 0; border-top: 1px solid var(--gray-200); margin-top: 0.25rem; }
}

/* ── Schedule Modal ───────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 1rem;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--gray-200);
}
.modal-title { font-weight: 700; font-size: 1rem; }
.modal-close-btn {
  background: none; border: none; font-size: 1.4rem;
  cursor: pointer; color: var(--gray-400); line-height: 1;
  padding: 0 0.25rem;
}
.modal-close-btn:hover { color: var(--gray-800); }
.modal-body { padding: 1.1rem 1.25rem; }
.modal-subtitle { font-size: 0.85rem; color: var(--gray-500); margin: 0 0 1rem; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 0.6rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--gray-200);
}
.modal-court-row {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.modal-court-row:last-child { border-bottom: none; }
.modal-court-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--accent); margin-bottom: 0.25rem;
}
.modal-court-matchup {
  font-size: 0.88rem; font-weight: 600; color: var(--gray-800);
  margin-bottom: 0.65rem;
}
.modal-court-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.modal-field label {
  display: block; font-size: 0.75rem; font-weight: 600;
  color: var(--gray-600); margin-bottom: 0.3rem;
}
@media (max-width: 480px) {
  .modal-court-fields { grid-template-columns: 1fr; }
}

/* ----- Playoff Bracket ----- */
.bracket-wrapper {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.bracket-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green-dark);
  text-align: center;
  margin: 0 0 0.25rem;
}
.bracket-info {
  font-size: 0.82rem;
  color: var(--gray-600);
  text-align: center;
  margin: 0.15rem 0 0;
}
.bracket-rules {
  max-width: 700px;
  margin: 1rem auto 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--gray-50, #f9fafb);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--gray-700, #374151);
}
.bracket-rules h3 {
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
  color: var(--gray-800, #1f2937);
}
.bracket-rules ul {
  margin: 0;
  padding-left: 1.25rem;
  list-style: disc;
}
.bracket-rules ul ul {
  margin-top: 0.25rem;
  padding-left: 1.25rem;
}
.bracket-rules li {
  margin-bottom: 0.35rem;
  line-height: 1.45;
}

/* ---- Odds / Storylines collapsible ---- */
.odds-section {
  margin: 1.2rem 0 1.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  background: var(--white);
  overflow: hidden;
}
.odds-toggle {
  cursor: pointer;
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--gray-800);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.odds-toggle::-webkit-details-marker { display: none; }
.odds-toggle::before {
  content: '\25B6';
  font-size: 0.65rem;
  transition: transform 0.2s;
  display: inline-block;
}
.odds-section[open] > .odds-toggle::before {
  transform: rotate(90deg);
}
.odds-content {
  padding: 0 1rem 1.25rem;
}
.odds-table-title, .odds-storylines-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0.75rem 0 0.5rem;
}
.odds-table-wrap { overflow-x: auto; }
.odds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}
.odds-table th {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 2px solid var(--gray-300);
  font-weight: 700;
  white-space: nowrap;
}
.odds-table td {
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid var(--gray-100);
}
.odds-table tbody tr:hover { background: var(--gray-50); }
.odds-storylines {
  list-style: none;
  padding: 0;
  margin: 0;
}
.odds-storylines li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.85rem;
  line-height: 1.5;
}
.odds-storylines li:last-child { border-bottom: none; }
.odds-bottom-line {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  text-align: center;
  color: var(--accent);
}
.bracket-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--gray-600);
  margin: 1.25rem 0 0.5rem;
  padding-left: 0.25rem;
}
.bracket {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  padding: 0.5rem 0;
}
.bracket-round {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex-shrink: 0;
}
.bracket-round-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gray-400);
  text-align: center;
  margin-bottom: 0.4rem;
}
.bracket-matchup {
  display: flex;
  flex-direction: column;
  margin: 0.4rem 0.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.bracket-team {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 0.4rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-dark);
  white-space: nowrap;
}
.bracket-team-top {
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
}
.bracket-team-bot {
  border-radius: 0 0 var(--radius) var(--radius);
}
.bracket-seed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--white);
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.bracket-tbd {
  color: var(--gray-400);
  font-style: italic;
  font-weight: 400;
}

/* Connector lines between rounds */
.bracket-connector {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 1.5rem;
  flex-shrink: 0;
  align-self: stretch;
}
.bracket-connector-pair {
  flex: 1;
  position: relative;
}
/* Right-side bracket shape: top and bottom horizontal lines merging into vertical */
.bracket-connector-pair::before {
  content: '';
  position: absolute;
  top: 25%;
  right: 0;
  width: 50%;
  height: 50%;
  border: 2px solid var(--gray-400);
  border-left: none;
}
/* Horizontal output line from the merge point */
.bracket-connector-pair::after {
  content: '';
  position: absolute;
  top: calc(50% - 1px);
  left: 0;
  width: 50%;
  border-top: 2px solid var(--gray-400);
}

/* Champion slot */
.bracket-champion-round {
  justify-content: center;
}
.bracket-champion {
  background: var(--white);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  color: var(--green-dark);
  margin: 0 0.4rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.bracket-champion .bracket-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

/* Consolation bracket styling */
.bracket-consolation .bracket-round { min-width: 160px; }
.bracket-consolation .bracket-team { font-size: 0.78rem; padding: 0.35rem 0.55rem; }

/* Winner highlight in completed brackets */
.bracket-winner {
  background: var(--green-pale, #edfaf1);
  font-weight: 700;
  border-color: var(--accent);
}
.bracket-loser {
  opacity: 0.55;
}
.bracket-score {
  margin-left: auto;
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--gray-600);
  white-space: nowrap;
  padding-left: 0.5rem;
}
.bracket-winner .bracket-score { font-weight: 600; color: var(--gray-700); }

/* Champion banner on landing page */
.champion-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--green-light) 100%);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: #fff;
  transition: transform 0.15s, box-shadow 0.15s;
}
.champion-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.champion-banner-trophy { font-size: 3rem; line-height: 1; }
.champion-banner-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  opacity: 0.9;
}
.champion-banner-names { font-size: 1.6rem; font-weight: 800; }
.champion-banner-cta { font-size: 0.8rem; margin-top: 0.25rem; opacity: 0.85; }

/* Championship page hero */
.champ-hero {
  background: linear-gradient(135deg, var(--accent) 0%, var(--green-light) 100%);
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  color: #fff;
}
.champ-hero-icon { font-size: 4rem; margin-bottom: 0.5rem; }
.champ-hero-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  opacity: 0.9;
}
.champ-hero-names { font-size: 2.2rem; font-weight: 800; margin: 0.5rem 0; }
.champ-hero-tagline { font-size: 1rem; opacity: 0.85; font-weight: 500; }

/* Completed champion slot */
.bracket-champion.bracket-champion-won {
  background: linear-gradient(135deg, var(--accent) 0%, var(--green-light) 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.bracket-champion.bracket-champion-won .bracket-label { color: rgba(255,255,255,0.85); }

/* Responsive: mobile stacked */
@media (max-width: 640px) {
  .bracket-wrapper { padding: 1rem 0.75rem; }
  .bracket {
    flex-direction: column;
    align-items: stretch;
    overflow-x: visible;
  }
  .bracket-round { min-width: 0; width: 100%; }
  .bracket-team { white-space: normal; min-width: 0; }
  .bracket-connector { display: none; }
  .bracket-matchup { margin: 0.3rem 0; }
  .bracket-champion { margin: 0.3rem 0; }
  .champion-banner { flex-direction: column; text-align: center; padding: 1.25rem 1rem; }
  .champion-banner-names { font-size: 1.3rem; }
  .champ-hero-names { font-size: 1.6rem; }
}

/* ── "Add to Home Screen" banner + iOS instruction sheet ──────────────── */
.a2hs-banner {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.22);
  transform: translateY(140%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  max-width: 520px;
  margin: 0 auto;
}
.a2hs-banner.a2hs-show { transform: translateY(0); opacity: 1; }

.a2hs-icon {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  flex-shrink: 0;
  border: 1px solid var(--gray-200);
}
.a2hs-text { flex: 1; min-width: 0; }
.a2hs-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.25;
}
.a2hs-sub {
  font-size: 0.74rem;
  color: var(--gray-600);
  line-height: 1.3;
  margin-top: 0.1rem;
}
.a2hs-action {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.a2hs-action:hover { filter: brightness(0.95); }
.a2hs-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.15rem;
}
.a2hs-close:hover { color: var(--gray-600); }

.a2hs-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.a2hs-overlay.a2hs-show { opacity: 1; }

.a2hs-sheet {
  position: relative;
  background: var(--white);
  width: 100%;
  max-width: 480px;
  border-radius: 16px 16px 0 0;
  padding: 1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.22s ease;
}
.a2hs-overlay.a2hs-show .a2hs-sheet { transform: translateY(0); }

.a2hs-sheet-close {
  position: absolute;
  top: 0.6rem;
  right: 0.85rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--gray-400);
  cursor: pointer;
}
.a2hs-sheet-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.85rem;
}
.a2hs-steps {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  color: var(--gray-800);
  line-height: 1.65;
}
.a2hs-steps li { margin-bottom: 0.35rem; }
.a2hs-share {
  display: inline-block;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 5px;
  padding: 0 0.32rem;
  font-weight: 700;
  line-height: 1.35;
}
.a2hs-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--gray-800);
  line-height: 1.6;
}

@media (min-width: 640px) {
  .a2hs-overlay { align-items: center; }
  .a2hs-sheet { border-radius: 16px; transform: translateY(12px); padding-bottom: 1.5rem; }
}

/* ── Home: new-season welcome ─────────────────────────────────────────── */
.season-welcome {
  background: linear-gradient(135deg, #1a1a1a 0%, #2b2b2b 55%, #3d2215 100%);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2.25rem 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.season-welcome-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.season-welcome-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.35rem;
}
.season-welcome-title span { color: var(--accent); }
.season-welcome-sub {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 1.35rem;
}
.season-welcome-body {
  max-width: 620px;
  margin: 0 auto 1.5rem;
  text-align: left;
  font-size: 0.94rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
}
.season-welcome-body p { margin: 0 0 0.8rem; }
.season-welcome-body p:last-child { margin-bottom: 0; }
.season-welcome-body strong { color: #fff; }

.countdown-row {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.countdown-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 0.65rem 1.05rem;
  min-width: 74px;
}
.countdown-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}
.countdown-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.15rem;
}
.countdown-live {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent);
}

.welcome-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.75rem 1.9rem;
  border-radius: 26px;
  transition: filter 0.15s, transform 0.15s;
}
.welcome-cta:hover { filter: brightness(0.94); transform: translateY(-1px); }
.welcome-cta-note {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.7rem;
}

@media (max-width: 640px) {
  .season-welcome { padding: 1.75rem 1.15rem; }
  .season-welcome-title { font-size: 1.5rem; }
  .season-welcome-body { font-size: 0.9rem; }
  .countdown-box { min-width: 62px; padding: 0.55rem 0.8rem; }
  .countdown-value { font-size: 1.25rem; }
}

/* Pre-season warm-up weeks on the availability page */
.week-tag-unofficial {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: var(--green-pale);
  color: var(--accent);
  padding: 0.18rem 0.5rem;
  border-radius: 20px;
  white-space: nowrap;
  margin-left: 0.5rem;
}

/* Marks a season average still carrying last season's rank */
.prov-marker {
  color: var(--accent);
  font-weight: 700;
  margin-left: 1px;
  cursor: help;
}

/* Availability admin section header — title plus the scheduler link */
.admin-avail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.btn-sm {
  font-size: 0.78rem;
  padding: 0.4rem 0.9rem;
  white-space: nowrap;
}
