:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --background: #131313;
  --surface-lowest: #0e0e0e;
  --surface-low: #1c1b1b;
  --surface: #201f1f;
  --surface-high: #2a2a2a;
  --surface-highest: #353534;
  --outline: #8f9378;
  --outline-muted: #353534;
  --text: #e5e2e1;
  --muted: #c5c9ac;
  --muted-2: #8f9378;
  --lime: #caf300;
  --lime-dim: #b0d500;
  --aqua: #63f7ff;
  --aqua-strong: #00f4fe;
  --danger: #ffb4ab;
  --shadow: 0 24px 80px rgba(0, 0, 0, .35);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --shell: min(1280px, calc(100vw - 32px));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 18% 0%, rgba(202, 243, 0, .08), transparent 34rem),
    radial-gradient(circle at 90% 14%, rgba(99, 247, 255, .08), transparent 28rem),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding: 64px 0 96px;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.shell { width: var(--shell); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar {
  position: fixed; inset: 0 0 auto; height: 64px; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(19, 19, 19, .8); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--outline-muted);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--lime); font-weight: 900; letter-spacing: -.05em; font-size: 24px; }
.brand-icon { font-variation-settings: 'FILL' 1; }
.desktop-nav { display: flex; gap: 30px; font-family: Geist, Inter, sans-serif; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--muted); }
.desktop-nav a:hover { color: var(--lime); }
.topbar-cta { padding: 10px 16px; }

.button {
  border: 0; border-radius: 14px; min-height: 44px; padding: 12px 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: Geist, Inter, sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.button:active { transform: scale(.97); }
.button:focus-visible, input:focus-visible, select:focus-visible, .date-chip:focus-visible, .time-chip:focus-visible, .court-card:focus-visible { outline: 3px solid rgba(99,247,255,.45); outline-offset: 3px; }
.button-primary { background: var(--lime); color: #171e00; box-shadow: 0 0 18px rgba(202,243,0,.18); }
.button-primary:hover { background: var(--lime-dim); box-shadow: 0 0 30px rgba(202,243,0,.25); }
.button-secondary { background: transparent; color: var(--aqua); border: 2px solid var(--aqua); }
.button-secondary:hover { background: rgba(99,247,255,.1); box-shadow: 0 0 24px rgba(99,247,255,.2); }

.hero {
  min-height: 530px; margin-top: 48px; border: 1px solid var(--outline-muted); border-radius: 32px; overflow: hidden;
  position: relative; display: grid; place-items: center; padding: clamp(32px, 7vw, 84px); text-align: center; isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; background:
  linear-gradient(135deg, rgba(202,243,0,.26), transparent 30%),
  linear-gradient(20deg, rgba(99,247,255,.24), transparent 35%),
  radial-gradient(circle at 50% 15%, rgba(255,255,255,.14), transparent 16rem),
  repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 80px),
  linear-gradient(180deg, #171717 0%, #0a0a0a 100%);
  opacity: .9;
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, var(--bg), rgba(10,10,10,.68), transparent); }
.hero-content { max-width: 820px; display: grid; justify-items: center; gap: 24px; }
.eyebrow { margin: 0; color: var(--lime); font-family: Geist, Inter, sans-serif; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { margin: 0; color: #fff; font-size: clamp(48px, 9vw, 96px); line-height: .92; letter-spacing: -.075em; text-transform: uppercase; font-weight: 900; }
.hero-copy { max-width: 650px; color: var(--muted); font-size: clamp(17px, 2vw, 20px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; width: 100%; }

.glass-panel { background: rgba(18, 18, 18, .78); backdrop-filter: blur(22px); border: 1px solid #262626; border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.bento { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-top: 24px; }
.live-card { padding: clamp(24px, 4vw, 36px); position: relative; overflow: hidden; }
.live-card::before { content: ""; position: absolute; top: -120px; right: -120px; width: 280px; height: 280px; border-radius: 50%; background: rgba(202,243,0,.05); filter: blur(25px); }
.section-kicker { display: inline-flex; gap: 10px; align-items: center; color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 999px; background: var(--aqua); box-shadow: 0 0 14px var(--aqua); }
.live-header { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin: 24px 0 36px; }
.live-header h2, .section-heading h2 { margin: 0; font-size: clamp(28px, 5vw, 44px); line-height: 1; letter-spacing: -.055em; color: #fff; }
.muted-icon { font-size: 48px; color: var(--surface-highest); }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.stat-tile { background: rgba(32,31,31,.62); border: 1px solid var(--outline-muted); border-radius: 18px; padding: 24px; }
.stat-label { color: var(--muted); font-family: Geist, Inter, sans-serif; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
.stat-tile strong { display: flex; align-items: end; gap: 8px; color: #fff; font-size: clamp(40px, 7vw, 64px); line-height: 1; margin-top: 8px; }
.stat-tile small { color: var(--muted); font-size: 16px; margin-bottom: 8px; }
.accent-aqua strong { color: var(--aqua); font-size: clamp(28px, 5vw, 44px); }
.meter { height: 8px; background: var(--surface-highest); border-radius: 999px; overflow: hidden; margin-top: 18px; }
.meter span { display: block; height: 100%; width: 0; background: var(--lime); border-radius: inherit; box-shadow: 0 0 12px rgba(202,243,0,.5); }
.reservations-card { padding: 32px; display: grid; place-items: center; align-content: center; text-align: center; min-height: 280px; background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,.05) 1px, transparent 0); background-size: 32px 32px; }
.reservations-card .material-symbols-outlined { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 999px; background: rgba(53,53,52,.5); color: var(--lime); font-size: 32px; margin-bottom: 20px; }
.reservations-card strong { font-size: 76px; line-height: 1; color: #fff; }
.reservations-card small { color: var(--aqua); }

.section { padding-top: 80px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.section-heading.centered { display: grid; justify-items: center; text-align: center; max-width: 760px; margin-inline: auto; }
.section-heading p:not(.eyebrow) { color: var(--muted); max-width: 720px; }

.plan-scroller { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 28px; }
.plan-card { background: #121212; border: 1px solid #262626; border-radius: 18px; padding: 26px; min-height: 420px; display: flex; flex-direction: column; gap: 22px; position: relative; cursor: pointer; transition: border-color .2s, transform .2s; }
.plan-card:hover, .plan-card.active { border-color: var(--lime); }
.plan-card:hover { transform: translateY(-2px); }
.plan-card.recommended::before { content: "Recommended"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--lime); color: #000; border-radius: 999px; padding: 5px 12px; font-family: Geist; text-transform: uppercase; letter-spacing: .1em; font-size: 10px; font-weight: 700; }
.plan-top { display: flex; justify-content: space-between; gap: 16px; }
.plan-card h3 { margin: 0; font-size: 25px; }
.plan-card.active h3 { color: var(--lime); }
.plan-icon { color: var(--muted); }
.plan-card.active .plan-icon { color: var(--lime); font-variation-settings: 'FILL' 1; }
.price { font-size: 52px; line-height: 1; font-weight: 900; letter-spacing: -.06em; }
.price small { font-size: 16px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.plan-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; color: var(--muted); }
.plan-card li { display: flex; gap: 10px; align-items: start; }
.plan-card li::before { content: "✓"; color: var(--aqua); font-weight: 900; }
.plan-select-button { margin-top: auto; border: 1px solid var(--outline-muted); border-radius: 12px; text-align: center; padding: 12px; font-family: Geist; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
.plan-card.active .plan-select-button { background: var(--lime); color: #000; border-color: var(--lime); }
.add-ons-panel { max-width: 800px; margin-inline: auto; padding: 28px; display: grid; gap: 20px; }
.native-select { color: var(--text); background: var(--surface); border: 1px solid var(--outline-muted); border-radius: 14px; padding: 12px 14px; min-height: 48px; max-width: 100%; }
.addon-list { display: grid; border: 1px solid var(--outline-muted); border-radius: 18px; overflow: hidden; }
.addon-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 20px; background: #121212; border-bottom: 1px solid var(--outline-muted); }
.addon-row:last-child { border-bottom: 0; }
.addon-row:hover { background: var(--surface-low); }
.addon-row h4 { margin: 0 0 4px; }
.addon-row p { margin: 0; color: var(--muted); }
.addon-row strong { color: var(--lime); }
.switch { position: relative; width: 52px; height: 30px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--surface-highest); border-radius: 999px; border: 1px solid var(--outline-muted); }
.slider::before { content: ""; position: absolute; width: 22px; height: 22px; top: 3px; left: 4px; border-radius: 999px; background: var(--text); transition: transform .2s, background .2s; }
.switch input:checked + .slider { background: rgba(202,243,0,.18); border-color: var(--lime); }
.switch input:checked + .slider::before { transform: translateX(20px); background: var(--lime); }
.sticky-total { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px; border-radius: 18px; background: rgba(202,243,0,.08); border: 1px solid rgba(202,243,0,.22); }
.sticky-total strong { color: var(--lime); font-size: 42px; line-height: 1; }
.sticky-total span { color: var(--muted); }

.booking-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .8fr); gap: 24px; }
.booking-config { padding: 28px; display: grid; gap: 30px; }
.control-heading, .court-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.control-heading h3, .court-header h3, .recent-panel h3 { margin: 0; font-size: 20px; }
.control-heading .material-symbols-outlined { color: var(--muted); }
.date-rail { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.date-rail::-webkit-scrollbar { display: none; }
.date-chip { min-width: 76px; height: 84px; border-radius: 14px; border: 1px solid var(--outline-muted); background: var(--surface); color: var(--muted); display: grid; place-items: center; align-content: center; gap: 4px; }
.date-chip strong { font-size: 25px; line-height: 1; color: inherit; }
.date-chip small { font-family: Geist; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.date-chip.active { background: var(--lime); color: #171e00; border-color: var(--lime); box-shadow: 0 0 18px rgba(202,243,0,.18); }
.badge-aqua { color: var(--aqua); background: rgba(99,247,255,.1); border-radius: 8px; padding: 5px 9px; font-family: Geist; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.time-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.time-chip { height: 48px; border-radius: 8px; border: 1px solid var(--outline-muted); background: var(--surface); color: var(--text); }
.time-chip.active { border-color: var(--aqua); color: var(--aqua); background: rgba(99,247,255,.1); box-shadow: 0 0 15px rgba(99,247,255,.14); }
.players-member-grid { display: grid; grid-template-columns: 1fr 150px; gap: 16px; }
label { display: grid; gap: 8px; color: var(--muted); }
input, select { width: 100%; max-width: 100%; min-width: 0; border: 1px solid var(--outline-muted); border-radius: 12px; background: rgba(0,0,0,.22); color: var(--text); padding: 13px 14px; font: inherit; }
.confirm-button { width: 100%; min-height: 56px; }
.member-picker { position: relative; }
.member-search-wrap { position: relative; }
.member-suggestions {
  position: absolute;
  z-index: 30;
  inset: calc(100% + 8px) 0 auto;
  display: none;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  background: rgba(14, 14, 14, .98);
  border: 1px solid rgba(99,247,255,.35);
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,.45), 0 0 24px rgba(99,247,255,.12);
}
.member-suggestions.open { display: grid; gap: 6px; }
.member-option {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.member-option:hover, .member-option.active { background: rgba(99,247,255,.08); border-color: rgba(99,247,255,.24); color: var(--aqua); }
.member-option strong { display: block; }
.member-option small { display: block; color: var(--muted); font-family: Geist; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.member-meta { margin: 8px 0 0; min-height: 20px; color: var(--aqua); font-family: Geist; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.booking-feedback { min-height: 24px; margin: 0; color: var(--aqua); }
.courts-column { display: grid; align-content: start; gap: 18px; }
.legend { display: flex; gap: 14px; color: var(--muted); font-family: Geist; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; margin-right: 6px; }
.dot.available { background: var(--aqua); }
.dot.reserved { background: var(--surface-highest); }
.court-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.court-card { min-height: 118px; border-radius: 18px; border: 1px solid var(--outline-muted); background: var(--surface); color: var(--muted); display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; padding: 16px; transition: border-color .2s, transform .2s, background .2s; }
.court-card .material-symbols-outlined { font-size: 36px; }
.court-card:not(:disabled):hover { border-color: var(--aqua); color: var(--aqua); background: rgba(99,247,255,.06); transform: translateY(-1px); }
.court-card.active { border: 2px solid var(--lime); color: var(--lime); box-shadow: 0 0 18px rgba(202,243,0,.18); }
.court-card.reserved { opacity: .55; background: var(--surface-lowest); color: var(--surface-highest); cursor: not-allowed; }
.court-card small { font-family: Geist; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.recent-panel { padding: 22px; }
.recent-panel h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.recent-panel h3 .material-symbols-outlined { color: var(--aqua); }
.booking-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.booking-list li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--outline-muted); padding: 14px 0; }
.booking-list li:last-child { border-bottom: 0; }
.booking-list strong { display: block; }
.booking-list span { color: var(--muted); font-family: Geist; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }

.program-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.program-card { background: #121212; border: 1px solid #262626; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; min-height: 390px; }
.program-art { position: relative; height: 180px; background:
  radial-gradient(circle at 20% 20%, rgba(202,243,0,.35), transparent 30%),
  radial-gradient(circle at 80% 70%, rgba(99,247,255,.28), transparent 35%),
  linear-gradient(135deg, #242424, #0c0c0c);
}
.program-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #121212, transparent 70%); }
.program-tag { position: absolute; top: 16px; left: 16px; z-index: 1; background: rgba(10,10,10,.78); backdrop-filter: blur(10px); border: 1px solid #262626; border-radius: 999px; padding: 6px 10px; color: var(--aqua); font-family: Geist; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.program-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.program-body h3 { margin: 0; font-size: 24px; }
.program-body p { margin: 0; color: var(--muted); }
.program-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid #262626; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.program-footer small { color: var(--muted); font-family: Geist; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.program-footer strong { display: block; }

.footer { margin-top: 80px; padding: 40px 0; border-top: 1px solid var(--outline-muted); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); }
.footer strong { color: var(--lime); letter-spacing: -.05em; font-size: 24px; }
.mobile-nav { display: none; }

@media (max-width: 980px) {
  body { padding-bottom: 104px; }
  .desktop-nav { display: none; }
  .bento, .booking-layout { grid-template-columns: 1fr; }
  .plan-scroller { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 16px 2px 10px; scrollbar-width: none; }
  .plan-scroller::-webkit-scrollbar { display: none; }
  .plan-card { min-width: min(82vw, 340px); scroll-snap-align: center; }
  .program-grid { grid-template-columns: 1fr; }
  .mobile-nav {
    position: fixed; inset: auto 0 0; z-index: 60; height: 80px; display: flex; justify-content: space-around; align-items: center;
    background: rgba(14,14,14,.92); backdrop-filter: blur(20px); border-top: 1px solid var(--outline-muted); border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-nav a { display: grid; justify-items: center; gap: 2px; color: var(--muted); min-width: 62px; padding: 7px 10px; border-radius: 14px; }
  .mobile-nav a.active { color: var(--lime); background: rgba(53,53,52,.5); }
  .mobile-nav small { font-family: Geist; text-transform: uppercase; letter-spacing: .08em; font-size: 10px; }
}

@media (max-width: 700px) {
  .topbar { padding-inline: 16px; }
  .topbar-cta { padding-inline: 12px; }
  .hero { margin-top: 24px; min-height: 480px; border-radius: 24px; }
  .hero-actions .button { width: 100%; }
  .stat-grid, .players-member-grid, .time-grid, .court-grid { grid-template-columns: 1fr; }
  .section { padding-top: 60px; }
  .section-heading { display: grid; align-items: start; }
  .addon-row { align-items: start; }
  .sticky-total { align-items: start; flex-direction: column; }
  .footer { display: grid; text-align: center; justify-items: center; }
}


/* Mobile responsive hardening */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 700px) {
  :root {
    --shell: calc(100vw - 32px);
    --shadow: 0 14px 44px rgba(0, 0, 0, .34);
  }

  body {
    padding-top: 64px;
    padding-bottom: calc(108px + env(safe-area-inset-bottom));
  }

  .shell {
    width: auto;
    margin-left: 16px;
    margin-right: 16px;
  }

  .topbar {
    height: 64px;
    gap: 10px;
    padding-inline: 16px;
  }

  .brand {
    min-width: 0;
    gap: 8px;
    font-size: 22px;
  }

  .brand-icon {
    font-size: 28px;
  }

  .topbar-cta {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 11px;
    letter-spacing: .08em;
  }

  .hero {
    min-height: 0;
    margin-top: 16px;
    padding: 34px 22px;
    border-radius: 24px;
  }

  .hero-content {
    width: 100%;
    gap: 18px;
  }

  .hero .eyebrow {
    display: none;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(42px, 15vw, 58px);
    line-height: .92;
    letter-spacing: -.07em;
    overflow-wrap: anywhere;
  }

  .hero-copy {
    max-width: 100%;
    font-size: 17px;
    line-height: 1.55;
  }

  .hero-actions {
    gap: 12px;
  }

  .hero-actions .button {
    width: 100%;
    min-height: 56px;
  }

  .bento {
    gap: 16px;
    margin-top: 16px;
  }

  .live-card,
  .reservations-card,
  .booking-config,
  .add-ons-panel,
  .recent-panel {
    padding: 22px;
    border-radius: 22px;
  }

  .live-header {
    margin: 22px 0 24px;
  }

  .live-header h2,
  .section-heading h2 {
    font-size: clamp(30px, 9vw, 38px);
  }

  .muted-icon {
    font-size: 40px;
  }

  .stat-grid,
  .players-member-grid,
  .time-grid,
  .court-grid {
    grid-template-columns: 1fr;
  }

  .stat-tile {
    padding: 22px;
  }

  .stat-tile strong {
    font-size: 46px;
  }

  .reservations-card {
    min-height: 220px;
  }

  .reservations-card strong {
    font-size: 58px;
  }

  .section {
    padding-top: 56px;
  }

  .section-heading {
    display: grid;
    align-items: start;
    gap: 12px;
  }

  .plan-card {
    min-width: min(84vw, 320px);
    min-height: 390px;
    padding: 22px;
  }

  .price {
    font-size: 46px;
  }

  .addon-row {
    align-items: start;
    padding: 18px;
  }

  .sticky-total {
    align-items: start;
    flex-direction: column;
  }

  .date-rail {
    margin-inline: -4px;
    padding-inline: 4px;
  }

  .date-chip {
    min-width: 72px;
  }

  .program-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .program-footer .button {
    width: 100%;
  }

  .mobile-nav {
    height: calc(78px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
  }

  .mobile-nav a {
    min-width: 56px;
    padding: 7px 8px;
  }

  .footer {
    display: grid;
    text-align: center;
    justify-items: center;
  }
}


/* Phone layout emergency fixes: keep booking controls inside viewport and avoid double bottom nav overlap in mobile browsers. */
.booking-layout,
.booking-config,
.courts-column,
.control-group,
.time-grid,
.date-rail,
.court-grid,
.glass-panel {
  min-width: 0;
  max-width: 100%;
}

.time-chip,
.court-card,
.confirm-button {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 700px) {
  body {
    padding-bottom: 32px;
  }

  main {
    overflow: hidden;
  }

  .booking-section {
    scroll-margin-top: 76px;
  }

  .booking-layout {
    display: block;
  }

  .booking-config {
    overflow: hidden;
    padding: 20px;
    gap: 26px;
  }

  .control-heading {
    min-width: 0;
    align-items: start;
  }

  .control-heading h3 {
    min-width: 0;
  }

  .badge-aqua {
    flex: 0 0 auto;
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .time-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 12px;
  }

  .time-chip {
    justify-self: stretch;
    min-width: 0;
  }

  .date-rail {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .players-member-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .member-suggestions {
    position: static;
    margin-top: 8px;
    max-height: 220px;
  }

  .courts-column {
    margin-top: 22px;
  }

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

  .court-card {
    min-height: 104px;
    padding: 12px 8px;
  }

  /* The phone browser already has a bottom toolbar; fixed in-app nav was covering the form. */
  .mobile-nav {
    display: none !important;
  }
}

@media (max-width: 380px) {
  .court-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
