/* Westchester Jewish Basketball League — site styles
   Palette: blue and white (like the Israeli flag) with orange (basketball)
   as the highlight. Every color references these variables, so re-theming
   means editing this block, not hunting through the file. */
:root {
  --color-bg: #ffffff;
  --color-surface: #fbfcfe;        /* cool off-white for raised cards */
  --color-surface-sunk: #f1f4fa;   /* table heads, wells */
  --color-text: #15213a;
  --color-text-muted: #5f6b80;
  --color-border: #dfe5ef;
  --color-border-strong: #c7d0e0;
  --color-primary: #0038B8;        /* Israel-flag blue: buttons, links, accents */
  --color-primary-dark: #002a8a;
  --color-primary-soft: #e4ebfa;
  --color-navy: #021F5B;           /* top bar, footer, headings */
  --color-accent: #F26B1D;         /* basketball orange: highlights, CTAs */
  --color-accent-hover: #d85a10;
  --color-accent-soft: #fdebe0;
  --color-accent-text: #a8440a;    /* orange darkened enough to read as text */
  --color-success: #0b7042;
  --color-success-soft: #e3f6ec;
  --color-warning: #b45309;
  --color-warning-soft: #fdf3c8;
  --color-danger: #c0392b;
  --color-danger-soft: #fdeaea;
  --color-topbar: #021F5B;
  --color-topbar-text: #d7e0f4;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(2, 31, 91, 0.06), 0 6px 18px rgba(2, 31, 91, 0.06);
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --topbar-height: 58px;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 { color: var(--color-navy); font-weight: 650; }
h2 { margin: 8px 0 16px; }
h3 { margin: 6px 0 10px; }
a { color: var(--color-primary); }
a:hover { color: var(--color-primary-dark); }

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Dev / impersonation strips ===== */
.test-site-bar {
  background: var(--color-accent);
  color: #fff;
  text-align: center;
  font-size: 11px;
  line-height: 1.2;
  padding: 2px 12px;
}
.impersonation-bar {
  background: #7a2e0a;
  color: #fff;
  text-align: center;
  font-size: 13px;
  padding: 4px 12px;
}
.impersonation-bar form { display: inline; }
.impersonation-return {
  background: none; border: none; color: #fff; text-decoration: underline;
  cursor: pointer; font: inherit; padding: 0;
}

/* ===== Top bar ===== */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--topbar-height);
  padding: 8px 18px;
  background: var(--color-topbar);
  color: var(--color-topbar-text);
  border-bottom: 3px solid var(--color-accent);
}
.topbar-brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-logo { height: 38px; width: auto; flex: none; }
.brand-short { display: none; }

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  margin-left: auto;
}
.topbar-nav a {
  color: var(--color-topbar-text);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 11px;
  border-radius: 8px;
  display: inline-block;
}
.topbar-nav a:hover, .topbar-nav a:focus { background: rgba(255,255,255,0.1); color: #fff; }
.topbar-nav a.active { background: rgba(255,255,255,0.16); color: #fff; font-weight: 600; }
.topbar-nav a.nav-login {
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  margin-left: 6px;
}
.topbar-nav a.nav-login:hover { background: var(--color-accent-hover); }

.topbar-nav a[data-subnav-toggle]::after,
.nav-dropdown-toggle::after { content: ' \25BE'; font-size: 10px; opacity: 0.75; }
.topbar-nav a[data-subnav-toggle][aria-expanded="true"]::after,
.nav-dropdown-toggle[aria-expanded="true"]::after { content: ' \25B4'; }

/* Dropdown menus in the top bar (About Us ▾). The ::before strip bridges the
   gap between the link and the menu so the mouse can cross it without the
   menu closing. */
.nav-dropdown { position: relative; }
.nav-dropdown-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nav-dropdown-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  background: #fff;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  min-width: 210px;
  padding: 6px;
  z-index: 1300;
  display: flex;
  flex-direction: column;
}
.nav-dropdown-menu a {
  display: block;
  color: var(--color-text);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
}
.nav-dropdown-menu a:hover, .nav-dropdown-menu a:focus, .nav-dropdown-menu a.active {
  background: var(--color-primary-soft); color: var(--color-navy);
}
@media (hover: hover) and (min-width: 769px) {
  .nav-dropdown:hover .nav-dropdown-menu.hidden { display: flex !important; }
}

/* Season selector (admin) */
.season-select { margin-left: 8px; }
.season-select select {
  width: auto; padding: 5px 8px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.12);
  color: #fff; font-size: 13px;
}
.season-select select option { color: var(--color-text); }
.season-select.mobile { margin: 8px 12px 12px; }
.season-select.mobile select { width: 100%; background: #fff; color: var(--color-text); border: 1px solid var(--color-border); padding: 8px; }

/* Avatar + dropdown */
.nav-avatar-wrap { position: relative; flex: none; }
.nav-avatar-btn { background: transparent; border: 0; padding: 2px; cursor: pointer; border-radius: 50%; display: inline-flex; }
.nav-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--color-accent); flex: none; }
.nav-avatar-initials { display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.15); color: #fff; font-weight: 700; font-size: 13px; }
.avatar-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; color: var(--color-text);
  border: 1px solid var(--color-border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18); min-width: 190px; padding: 6px; z-index: 1300;
}
.avatar-menu-name { padding: 8px 10px 4px; font-weight: 600; font-size: 13px; color: var(--color-text-muted); }
.avatar-menu a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--color-text); text-decoration: none; }
.avatar-menu a:hover, .avatar-menu a:focus { background: var(--color-surface-sunk); }

/* Hamburger (mobile) */
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 38px; height: 38px; padding: 9px; background: transparent; border: 0; border-radius: 8px; cursor: pointer; flex: none; }
.nav-toggle:hover { background: rgba(255,255,255,0.12); }
.nav-toggle span { display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px; }

.mobile-nav { display: none; flex-direction: column; background: var(--color-topbar); padding: 6px 0; }
.mobile-nav a { color: var(--color-topbar-text); text-decoration: none; font-size: 15px; padding: 12px 16px; }
.mobile-nav a:hover, .mobile-nav a:focus { background: rgba(255,255,255,0.08); color: #fff; }
.mobile-nav a.active { background: rgba(255,255,255,0.14); color: #fff; font-weight: 600; }
.mobile-nav a.mobile-nav-child { padding-left: 32px; font-size: 14px; }
.mobile-nav-sub { display: flex; flex-direction: column; border-top: 1px solid rgba(255,255,255,0.12); margin-top: 4px; padding-top: 4px; }
.mobile-nav-sub a { padding-left: 32px; font-size: 14px; }

/* Admin submenu bar */
.subnav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 6px 18px; background: #0a2f7a; color: var(--color-topbar-text); }
.subnav a { color: var(--color-topbar-text); text-decoration: none; font-size: 13px; padding: 6px 10px; border-radius: 6px; }
.subnav a:hover, .subnav a:focus { background: rgba(255,255,255,0.1); color: #fff; }
.subnav a.active { background: rgba(255,255,255,0.18); color: #fff; font-weight: 600; }

/* ===== Main column ===== */
main { width: 100%; max-width: 1100px; margin: 24px auto; padding: 0 16px; flex: 1; }
body.page-wide main { max-width: none; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h2 { margin: 8px 0; }
.small { font-size: 12px; color: var(--color-text-muted); }
.muted { color: var(--color-text-muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px 16px; }

/* ===== Forms ===== */
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack label { display: block; margin: 4px 0; }
.stack .actions { margin-top: 8px; }
label { display: flex; flex-direction: column; gap: 0.25rem; font-weight: 500; }
label.inline { flex-direction: row; align-items: center; gap: 0.5rem; }
label .small { font-weight: 400; }
input, textarea, select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm); background: #fff; font-family: inherit; font-size: 15px; color: var(--color-text);
}
input::placeholder, textarea::placeholder { color: #9aa5b8; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
input[type="checkbox"], input[type="radio"] { width: auto; height: auto; padding: 0; border: 0; vertical-align: middle; }
.required { color: var(--color-danger); font-weight: 700; }
.form-question { font-size: 17px; font-weight: 600; color: var(--color-navy); margin: 0 0 8px; }
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice-grid { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.legal-text { background: var(--color-surface-sunk); border-left: 4px solid var(--color-primary); padding: 10px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 14px; }

/* ===== Buttons ===== */
button, .button {
  display: inline-block; background: #fff; color: var(--color-navy);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm);
  padding: 8px 14px; font-family: inherit; font-size: 14px; cursor: pointer; text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.button:hover { background: var(--color-surface-sunk); border-color: var(--color-text-muted); color: var(--color-navy); }
button.primary, .button.primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; font-weight: 600; }
button.primary:hover, .button.primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; }
button.danger, .button.danger { background: var(--color-danger); border-color: var(--color-danger); color: #fff; }
button.small, .button.small { padding: 4px 10px; font-size: 13px; }
button:disabled, .button:disabled, .button.disabled { opacity: 0.55; cursor: not-allowed; }
.btn-cta {
  display: inline-block; background: var(--color-accent); color: #fff; border: 0; border-radius: 999px;
  padding: 13px 28px; font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none;
  box-shadow: 0 2px 0 rgba(2, 31, 91, 0.15); transition: background 0.15s ease, transform 0.05s ease;
}
.btn-cta:hover { background: var(--color-accent-hover); color: #fff; }
.btn-cta:active { transform: translateY(1px); box-shadow: none; }
.btn-outline {
  display: inline-block; background: transparent; color: var(--color-primary); border: 2px solid var(--color-primary);
  border-radius: 999px; padding: 11px 26px; font-family: inherit; font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions-split { justify-content: space-between; }
.actions-split .actions-right { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.inline-form { display: inline; }

/* ===== Messages ===== */
.flash { background: var(--color-success-soft); color: var(--color-success); padding: 10px 14px; border-radius: 8px; }
.error { background: var(--color-danger-soft); color: #7a0000; padding: 10px 14px; border-radius: 8px; }
.announcement { background: var(--color-warning-soft); border: 1px solid #f0d58a; color: #7a4a00; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.notice { background: var(--color-primary-soft); color: var(--color-navy); padding: 10px 14px; border-radius: 8px; }

/* ===== Tables ===== */
.list { width: 100%; border-collapse: collapse; }
.list th, .list td { padding: 8px; border-bottom: 1px solid var(--color-border); vertical-align: top; text-align: left; }
.list th { background: var(--color-surface-sunk); font-weight: 600; color: var(--color-navy); }
.list tr:hover { background: var(--color-surface); }
.list td.num, .list th.num { text-align: right; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.status-verified, .status-ok { color: var(--color-success); font-weight: 500; }
.status-pending { color: var(--color-warning); font-weight: 500; }
.status-bad { color: var(--color-danger); font-weight: 500; }

/* ===== Cards & tiles ===== */
.card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; box-shadow: var(--shadow-card); }
.card h3 { margin: 0 0 8px; }
.card .card-sub { color: var(--color-text-muted); font-size: 13px; margin-bottom: 8px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 16px 0; }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 16px 0 24px; }
.tile {
  display: flex; flex-direction: column; gap: 6px; position: relative;
  background: #fff; border: 1px solid var(--color-border); border-top: 4px solid var(--color-primary);
  border-radius: var(--radius); padding: 18px 16px 16px; text-decoration: none; color: var(--color-navy);
  box-shadow: var(--shadow-card); min-height: 118px; transition: transform 0.08s ease, border-color 0.15s ease;
}
.tile:hover { transform: translateY(-2px); border-top-color: var(--color-accent); color: var(--color-navy); }
.tile-icon { font-size: 26px; line-height: 1; }
.tile-label { font-weight: 700; font-size: 16px; }
.tile-blurb { font-size: 12.5px; color: var(--color-text-muted); font-weight: 400; }
.tile-badge { position: absolute; top: 12px; right: 12px; background: var(--color-accent); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 2px 8px; }

.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; background: var(--color-surface-sunk); color: var(--color-text-muted); white-space: nowrap; }
.badge.success { background: var(--color-success-soft); color: var(--color-success); }
.badge.warning { background: var(--color-warning-soft); color: var(--color-warning); }
.badge.danger { background: var(--color-danger-soft); color: var(--color-danger); }
.badge.accent { background: var(--color-accent-soft); color: var(--color-accent-text); }
.badge.primary { background: var(--color-primary-soft); color: var(--color-primary-dark); }

/* Person chips */
.assignee { display: inline-flex; align-items: center; gap: 8px; }
.assignee-avatar { width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.unassigned { color: var(--color-text-muted); }
.contact-sep { color: var(--color-text-muted); padding: 0 4px; }
.avatar-lg { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.avatar-lg-initials { width: 80px; height: 80px; border-radius: 50%; background: var(--color-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 600; }

/* Read-only label/value pairs */
.detail-grid { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 4px 16px; margin: 0 0 16px; }
.detail-grid dt { color: var(--color-text-muted); font-size: 14px; }
.detail-grid dd { margin: 0; overflow-wrap: anywhere; }

/* ===== Wizard steps ===== */
.wizard-steps { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 4px 0 22px; padding-bottom: 14px; border-bottom: 1px solid var(--color-border); font-size: 13px; color: var(--color-text-muted); }
.wizard-step { display: inline-flex; align-items: center; gap: 6px; }
.wizard-step-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--color-surface-sunk); color: var(--color-text-muted); font-weight: 700; font-size: 12px; }
.wizard-step.active { color: var(--color-navy); font-weight: 600; }
.wizard-step.active .wizard-step-num { background: var(--color-primary); color: #fff; }
.wizard-step.done .wizard-step-num { background: var(--color-success-soft); color: var(--color-success); }
.import-example { background: var(--color-surface-sunk); border: 1px solid var(--color-border); border-radius: 8px; padding: 10px 12px; font-size: 12px; overflow-x: auto; margin: 0 0 10px; }

/* Setup checklist */
.setup-step { display: flex; gap: 14px; align-items: flex-start; }
.setup-step-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--color-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.setup-step.done .setup-step-num { background: var(--color-success); }
.setup-step-body { flex: 1; }

/* ===== Schedule & standings ===== */
.game-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.game-row:last-child { border-bottom: 0; }
.game-time { font-weight: 600; white-space: nowrap; }
.game-teams { display: flex; flex-direction: column; gap: 2px; }
.game-team { display: flex; justify-content: space-between; gap: 12px; }
.game-team.winner { font-weight: 700; }
.game-meta { font-size: 12px; color: var(--color-text-muted); }
.game-score { font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.day-head { margin: 22px 0 6px; padding-bottom: 4px; border-bottom: 2px solid var(--color-primary); color: var(--color-navy); font-size: 17px; }
.score-pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.score-pill.pending { background: var(--color-surface-sunk); color: var(--color-text-muted); }
.score-pill.reported { background: var(--color-warning-soft); color: var(--color-warning); }
.score-pill.confirmed { background: var(--color-success-soft); color: var(--color-success); }
.score-pill.disputed { background: var(--color-danger-soft); color: var(--color-danger); }
.standings .rank { width: 36px; text-align: center; color: var(--color-text-muted); }
.standings tr.mine { background: var(--color-accent-soft); }

/* Availability grid */
.avail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.avail-cell { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: 8px; background: #fff; font-size: 14px; cursor: pointer; }
.avail-cell:has(input:checked) { background: var(--color-success-soft); border-color: #b9e0c3; }
.avail-day { margin: 14px 0 6px; font-weight: 600; color: var(--color-navy); }

/* ===== Public home ===== */
.hero { text-align: center; padding: 40px 16px 24px; }
.hero-logo { width: 220px; max-width: 60vw; height: auto; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); margin: 18px 0 8px; }
.hero p { font-size: 18px; color: var(--color-text-muted); max-width: 640px; margin: 0 auto 24px; }
.hero .actions { justify-content: center; }
.public-content { max-width: 760px; margin: 0 auto; }
.public-content h1 { margin-bottom: 8px; }
.gym-card h3 { margin-bottom: 2px; }

/* ===== Auth pages ===== */
body.auth { background: var(--color-surface-sunk); }
.auth-wrap { display: flex; flex-direction: column; align-items: center; padding: 48px 16px; flex: 1; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--color-navy); font-weight: 700; font-size: 18px; margin-bottom: 20px; text-align: center; }
.auth-logo { width: 96px; height: auto; }
.auth-card { width: 420px; max-width: 100%; }
.auth-card h1 { text-align: center; font-size: 24px; margin: 4px 0 16px; }

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; background: rgba(2, 31, 91, 0.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 1400; }
.modal.hidden { display: none; }
.modal-content { background: #fff; max-width: 540px; width: 100%; border-radius: 16px; padding: 18px; position: relative; max-height: 90vh; overflow-y: auto; }
.modal .close { position: absolute; right: 8px; top: 8px; background: var(--color-surface-sunk); color: var(--color-text); border-radius: 50%; width: 32px; height: 32px; line-height: 28px; font-size: 20px; border: 0; padding: 0; }

/* Typeahead */
.typeahead-wrap { position: relative; }
.typeahead-results { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--color-border); border-radius: 8px; max-height: 220px; overflow: auto; z-index: 1500; display: none; }
.typeahead-results .typeahead-option { padding: 8px 10px; cursor: pointer; }
.typeahead-results .typeahead-option.highlight { background: var(--color-primary-soft); }

/* Admin actions dropdown */
.nav-admin-wrap { position: relative; display: inline-block; }
.admin-menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; color: var(--color-text); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.18); min-width: 220px; padding: 6px; z-index: 1300; }
.admin-menu a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--color-text); text-decoration: none; white-space: nowrap; }
.admin-menu a:hover, .admin-menu a:focus { background: var(--color-surface-sunk); }

/* ===== Footer ===== */
.site-footer {
  margin-top: 48px; background: var(--color-navy); color: #d7e0f4; padding: 20px 24px;
  display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: center; justify-content: space-between; font-size: 14px;
  border-top: 3px solid var(--color-accent);
}
.site-footer a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.35); }
.site-footer a:hover { color: var(--color-accent); border-bottom-color: var(--color-accent); }

.hidden { display: none !important; }
details summary { cursor: pointer; color: var(--color-primary); }
code { background: var(--color-surface-sunk); padding: 1px 4px; border-radius: 4px; font-size: 0.92em; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .topbar-nav, .subnav { display: none; }
  .nav-toggle { display: inline-flex; }
  .brand-full { display: none; }
  .brand-short { display: inline; }
  .topbar { gap: 10px; }
  .nav-avatar-wrap { margin-left: auto; }
  .mobile-nav.open { display: flex; }
  main { padding: 16px; margin: 0 auto; }
  .grid, .grid-2 { grid-template-columns: 1fr !important; }
  .game-row { grid-template-columns: 1fr; }
}

/* Schedule Maker proposal grid: a team's first game of the week is green, later
   games that week blue, no game grey (the colours of the league-pairings
   visualizer the league used before); games already on the calendar are
   outlined; a thick line starts each Sunday-to-Saturday week. */
.sched-grid td.sched-cell { text-align: center; color: #15213a; }
.sched-grid td.sched-cell .small { color: inherit; }
.sched-none { background: #e0e0e0; }
.sched-first { background: #81c784; }
.sched-more { background: #64b5f6; }
.sched-grid td.sched-existing { outline: 2px dashed rgba(21, 33, 58, 0.45); outline-offset: -4px; }
.sched-grid th.week-start, .sched-grid td.week-start { border-left: 3px solid var(--color-navy); }
.sched-legend .swatch { display: inline-block; width: 14px; height: 14px; border: 1px solid var(--color-border); vertical-align: middle; margin: 0 4px 0 10px; }
.sched-legend .swatch.sched-existing { outline: 2px dashed rgba(21, 33, 58, 0.45); outline-offset: -3px; }
