/* PickleCourt — dark theme. Deep charcoal surfaces with a neon pickleball-lime accent. */
:root {
  color-scheme: dark;

  --bg: #090c0b;
  --bg-2: #0d1210;
  --card: #121816;
  --card-2: #172019;
  --raise: #1d2721;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);

  --ink: #eef3ef;
  --ink-2: #c3cdc6;
  --muted: #8a978f;
  --faint: #5b6660;

  --lime: #d4ff3a;
  --lime-2: #b8e81f;
  --lime-ink: #0b0f0c;
  --lime-soft: rgba(212, 255, 58, .1);
  --lime-line: rgba(212, 255, 58, .35);
  --green: #3ee08f;
  --green-soft: rgba(62, 224, 143, .12);
  --amber: #ffc857;
  --amber-soft: rgba(255, 200, 87, .12);
  --danger: #ff6b6b;
  --danger-soft: rgba(255, 107, 107, .1);

  /* aliases used by older rules */
  --green-dark: var(--lime);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 32px -12px rgba(0, 0, 0, .6);
  --glow: 0 0 0 1px var(--lime-line), 0 8px 28px -6px rgba(212, 255, 58, .35);
  --font: 'Plus Jakarta Sans', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { background: var(--bg); }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(212, 255, 58, .07), transparent 60%),
    radial-gradient(700px 500px at -10% 10%, rgba(62, 224, 143, .05), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--lime); color: var(--lime-ink); }
a { color: var(--lime); text-decoration-color: rgba(212, 255, 58, .4); text-underline-offset: 3px; }
a:hover { color: #e6ff8a; }
h1, h2, h3 { letter-spacing: -.02em; }
.wrap { width: 100%; margin: 0 auto; padding: 0 16px; }
@media (min-width: 801px) { .wrap { padding: 0 32px; } }
main { flex: 1; padding-top: 32px; padding-bottom: 64px; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(9, 12, 11, .72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding-top: 6px; padding-bottom: 6px; gap: 12px; }
.logo {
  display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.03em;
  color: var(--ink); text-decoration: none;
}
.logo:hover { color: var(--ink); }
.ball {
  width: 26px; height: 26px; border-radius: 50%; background: var(--lime); flex: none;
  background-image: radial-gradient(circle at 30% 30%, rgba(0,0,0,.25) 2px, transparent 3px),
    radial-gradient(circle at 70% 40%, rgba(0,0,0,.25) 2px, transparent 3px),
    radial-gradient(circle at 45% 72%, rgba(0,0,0,.25) 2px, transparent 3px);
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.12), 0 0 18px rgba(212, 255, 58, .45);
}
.logo-img { height: 32px; width: auto; max-width: 160px; object-fit: contain; border-radius: 6px; }
#nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
#nav a {
  text-decoration: none; color: var(--ink-2); font-weight: 600; padding: 8px 14px; border-radius: 999px; font-size: 14.5px;
  transition: color .15s, background .15s;
}
#nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
#nav .hello { color: var(--muted); font-size: 14px; padding: 4px 8px; }
.nav-links, .nav-account { display: flex; align-items: center; gap: 4px; }
#nav a.bell { position: relative; padding: 8px 10px; font-size: 17px; line-height: 1; }
.bell-count {
  position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; padding: 11px 22px;
  font: inherit; font-weight: 700; font-size: 15px; letter-spacing: -.01em; cursor: pointer; text-decoration: none;
  background: var(--lime); color: var(--lime-ink);
  box-shadow: 0 6px 20px -8px rgba(212, 255, 58, .55);
  transition: transform .15s, box-shadow .2s, background .15s, border-color .15s, color .15s;
}
.btn:hover { background: #e2ff6e; color: var(--lime-ink); transform: translateY(-1px); box-shadow: 0 10px 28px -8px rgba(212, 255, 58, .65); }
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: rgba(255, 255, 255, .04); color: var(--ink); border-color: var(--line-2); box-shadow: none;
}
.btn.secondary:hover { background: rgba(255, 255, 255, .09); color: var(--ink); border-color: rgba(255, 255, 255, .22); }
.btn.lime { background: transparent; color: var(--lime); border-color: var(--lime-line); box-shadow: none; }
.btn.lime:hover { background: var(--lime-soft); color: var(--lime); }
.btn.danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(255, 107, 107, .3); box-shadow: none; }
.btn.danger:hover { background: rgba(255, 107, 107, .18); color: #ff8a8a; }
.btn.small { padding: 7px 14px; font-size: 13.5px; }
.btn:disabled, .btn:disabled:hover { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
/* Looks disabled but still takes clicks, to explain why (e.g. a deactivated court's Book a court). */
.btn.is-off, .btn.is-off:hover { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
#nav a.btn { color: var(--lime-ink); padding: 8px 16px; }
#nav a.btn:hover { background: #e2ff6e; color: var(--lime-ink); }
select.btn { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
select.btn.secondary { background-color: rgba(255, 255, 255, .04); }

/* Hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 28px; padding: 72px 48px; margin-bottom: 40px;
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(212, 255, 58, .22), transparent 70%),
    radial-gradient(500px 300px at 0% 100%, rgba(62, 224, 143, .14), transparent 70%),
    linear-gradient(160deg, #141c17 0%, #0c110e 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
/* court lines */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background:
    linear-gradient(var(--line), var(--line)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(90deg, var(--line), var(--line)) 0 50% / 100% 1px no-repeat;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px; z-index: -1;
  border-radius: 50%; background: var(--lime); opacity: .5; filter: blur(120px);
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px); line-height: 1.02; margin: 0 0 16px; max-width: 720px; font-weight: 800; letter-spacing: -.04em;
  background: linear-gradient(180deg, #fff 30%, #b9c4bd); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { font-size: 18px; color: var(--ink-2); margin: 0 0 32px; max-width: 560px; }
.searchbar {
  display: flex; gap: 6px; padding: 6px; border-radius: 999px; max-width: 740px; position: relative; z-index: 1;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.searchbar input {
  flex: 1; border: 0; padding: 12px 18px; font: inherit; min-width: 0; outline: none; color: var(--ink); background: transparent;
}
.searchbar input::placeholder { color: var(--muted); }
.searchbar select {
  flex: 0 1 230px; min-width: 0; border: 0; border-left: 1px solid var(--line-2); padding: 12px 36px 12px 18px;
  font: inherit; color: var(--ink); background: transparent; outline: none; cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.searchbar select option { background: var(--card); color: var(--ink); }
.searchbar input + input { border-left: 1px solid var(--line-2); }
.row3.location-row { grid-template-columns: 1fr 1fr 110px; }
.hours-row { display: grid; grid-template-columns: 1.3fr 1fr auto 1fr; gap: 8px; align-items: center; margin-bottom: 4px; }
.hours-to { color: var(--muted); font-size: 14px; font-weight: 600; }
.rate-rows { display: flex; flex-direction: column; gap: 8px; }
.rate-row { display: grid; grid-template-columns: 1fr 250px 32px; gap: 8px; align-items: center; }
.rate-price { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.rate-row .rate-price select { flex: 0 0 96px; width: 96px; }
.rate-amount { display: flex; flex: 1; align-items: center; gap: 6px; min-width: 0; }
.rate-amount[hidden] { display: none; }
.rate-price input { flex: 1; min-width: 0; }
.rate-remove {
  width: 32px; height: 32px; border: 0; border-radius: 50%; padding: 0; line-height: 1;
  background: rgba(255, 255, 255, .06); color: var(--muted); font-size: 18px; cursor: pointer;
}
.rate-remove:hover { background: var(--danger-soft); color: var(--danger); }
#addRate { justify-self: start; width: max-content; margin-top: 4px; }
.field select:disabled { opacity: .5; cursor: not-allowed; }

.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 48px; }
.role-card {
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
}
.role-card h3 { margin: 0 0 8px; font-size: 21px; }
.role-card p { color: var(--muted); margin: 0 0 20px; }

h2.section { font-size: 22px; margin: 0 0 16px; font-weight: 700; }

/* Court cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.court-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  text-decoration: none; color: inherit; transition: transform .2s, border-color .2s, box-shadow .2s;
}
a.court-card:hover { transform: translateY(-3px); border-color: var(--lime-line); box-shadow: var(--shadow), 0 18px 40px -18px rgba(212, 255, 58, .35); color: inherit; }
.court-card h3 { margin: 0; font-size: 18px; color: var(--ink); }
.court-card .loc { color: var(--muted); font-size: 14px; }
.court-card .price { font-weight: 800; color: var(--lime); font-size: 17px; margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  background: rgba(255, 255, 255, .05); color: var(--ink-2); border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
}
.tag.lime { background: var(--lime-soft); color: var(--lime); border-color: var(--lime-line); }
.tag.full { background: var(--danger-soft); color: var(--danger); border-color: rgba(255, 107, 107, .3); }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }

/* Search layout */
.search-layout { display: grid; grid-template-columns: 270px 1fr; gap: 24px; align-items: start; }
.filters {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  position: sticky; top: 92px; box-shadow: var(--shadow);
}
.filters h3 { margin: 0 0 16px; font-size: 16px; }
.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.results-head .count { color: var(--muted); font-weight: 600; }

/* Panels & forms */
.panel {
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line);
  border-radius: 20px; padding: 34px; box-shadow: var(--shadow);
}
.narrow { max-width: 470px; margin: 0 auto; }
.medium { max-width: 780px; margin: 0 auto; }
.panel h1 { margin: 0 0 6px; font-size: 28px; }
.panel .sub { color: var(--muted); margin: 0 0 26px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; min-width: 0; }
.field label, .label { font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.field input, .field select, .field textarea, .admin-search input {
  font: inherit; font-size: 15px; padding: 11px 14px; width: 100%; min-width: 0;
  color: var(--ink); background: rgba(0, 0, 0, .28); border: 1px solid var(--line-2); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.password-wrap { position: relative; display: flex; }
.password-wrap input { flex: 1; min-width: 0; padding-right: 64px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); padding: 6px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--lime); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
}
.password-toggle:hover { background: rgba(255, 255, 255, .06); }
.password-toggle:focus-visible { outline: 2px solid var(--lime); outline-offset: 1px; }
.field input::placeholder, .field textarea::placeholder, .admin-search input::placeholder { color: var(--faint); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(255, 255, 255, .22); }
.field input:focus, .field select:focus, .field textarea:focus, .admin-search input:focus {
  outline: none; border-color: var(--lime); box-shadow: 0 0 0 4px var(--lime-soft); background: rgba(0, 0, 0, .4);
}
.field select option { background: var(--card); color: var(--ink); }
.field input[type=file] { padding: 9px; }
.field input[type=file]::file-selector-button {
  font: inherit; font-weight: 600; margin-right: 12px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .06); color: var(--ink);
}
.field textarea { min-height: 104px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--lime); }
.hint { color: var(--muted); font-size: 13px; }
.error {
  background: var(--danger-soft); color: #ff9a9a; border: 1px solid rgba(255, 107, 107, .3);
  padding: 11px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 14px;
}
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }

.role-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.role-picker label {
  border: 1px solid var(--line-2); border-radius: 14px; padding: 16px 12px; cursor: pointer; text-align: center; font-weight: 700;
  background: rgba(255, 255, 255, .02); transition: border-color .15s, background .15s, box-shadow .15s;
}
.role-picker label:hover { border-color: rgba(255, 255, 255, .25); }
.role-picker label small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.role-picker input { display: none; }
.role-picker input:checked + label { border-color: var(--lime); background: var(--lime-soft); box-shadow: 0 0 0 3px var(--lime-soft); }

/* Court detail */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.detail-head h1 { margin: 0 0 6px; font-size: clamp(30px, 4.5vw, 42px); font-weight: 800; letter-spacing: -.035em; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.detail-grid p { color: var(--ink-2); }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); gap: 12px; }
.info-list li:last-child { border-bottom: 0; }
.info-list li span:first-child { color: var(--muted); }
.info-list li span:last-child { font-weight: 700; text-align: right; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; text-decoration: none; font-weight: 600; color: var(--muted); font-size: 14px; }
.back:hover { color: var(--ink); }

.dash-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
.dash-head h1 { margin: 0; font-size: clamp(28px, 4vw, 36px); font-weight: 800; letter-spacing: -.035em; }
.empty {
  text-align: center; padding: 56px 24px; color: var(--muted);
  background: rgba(255, 255, 255, .02); border: 1px dashed var(--line-2); border-radius: var(--radius);
}

/* Admin */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 26px; }
.stat {
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; color: var(--muted); font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow);
}
.stat span { display: block; font-size: 34px; font-weight: 800; color: var(--ink); line-height: 1.1; letter-spacing: -.03em; margin-bottom: 2px; }
.tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 20px; overflow-x: auto; width: fit-content; max-width: 100%;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 999px;
}
.tabs a {
  padding: 8px 16px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14px;
  border-radius: 999px; white-space: nowrap; transition: color .15s, background .15s;
}
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--lime-ink); background: var(--lime); }
.admin-search { display: flex; gap: 8px; margin-bottom: 16px; max-width: 480px; }
.admin-search input { flex: 1; padding: 9px 14px; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th {
  text-align: left; color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  background: rgba(255, 255, 255, .03);
}
.admin-table th, .admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tbody tr:hover { background: rgba(255, 255, 255, .02); }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td:last-child { text-align: right; }
.branding { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.branding .panel { padding: 26px; }
.logo-preview {
  display: flex; align-items: center; gap: 10px; min-height: 100px; padding: 16px; margin: 12px 0 16px;
  background: rgba(0, 0, 0, .25); border: 1px dashed var(--line-2); border-radius: var(--radius);
}
.logo-preview img { max-height: 64px; max-width: 100%; object-fit: contain; }
.content-editor { display: flex; flex-direction: column; gap: 18px; max-width: 820px; }
.content-editor > .hint { margin: 0; }
.content-editor .panel { padding: 26px; }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.counter { align-self: flex-end; font-size: 12px; color: var(--faint); }
.link-btn { font: inherit; font-size: 13px; font-weight: 700; color: var(--lime); background: none; border: 0; padding: 0; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.save-bar {
  position: sticky; bottom: 16px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px 12px 20px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(18, 24, 22, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .7);
}
.save-bar .hint { margin-right: auto; }

/* Booking & open play */
.center { text-align: center; justify-content: center; }
.big-icon { font-size: 48px; filter: drop-shadow(0 6px 20px rgba(212, 255, 58, .35)); }
.book-layout { display: grid; grid-template-columns: minmax(290px, 390px) 1fr; gap: 20px; align-items: start; }
.book-layout .panel { padding: 24px; }
.calendar-field { padding: 12px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(0, 0, 0, .18); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-head strong { font-size: 16px; }
.cal-head .btn.small { width: 36px; height: 36px; padding: 0; font-size: 18px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-grid .dow { text-align: center; font-size: 11px; color: var(--faint); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding-bottom: 6px; }
.cal-grid button {
  aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .03);
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink);
  transition: border-color .15s, background .15s, transform .1s;
}
.cal-grid button:hover:not(:disabled) { border-color: var(--lime-line); background: var(--lime-soft); }
.cal-grid button.today { border-color: var(--lime-line); color: var(--lime); }
.cal-grid button.selected { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); box-shadow: 0 6px 18px -6px rgba(212, 255, 58, .6); }
.cal-grid button:disabled { background: transparent; border-color: transparent; color: #36403a; cursor: default; }
.slot-groups { margin: 10px 0 20px; display: flex; flex-direction: column; gap: 16px; }
.slot-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-bottom: 8px; }
.slot-label span { color: var(--faint); font-weight: 600; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.slots button {
  font: inherit; font-size: 13.5px; font-weight: 700; padding: 10px 8px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); color: var(--ink);
  transition: border-color .15s, background .15s;
}
.slots button:hover:not(:disabled) { border-color: var(--lime-line); background: var(--lime-soft); }
.slots button.selected { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.slots button:disabled { background: transparent; border-style: dashed; color: var(--faint); cursor: not-allowed; }
.slots button small { display: block; font-size: 11px; font-weight: 600; }
.summary:not(:empty) {
  background: var(--lime-soft); border: 1px solid var(--lime-line); color: var(--ink);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 14px;
}
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.pending { background: var(--amber-soft); color: var(--amber); border-color: rgba(255, 200, 87, .3); }
.pill.approved { background: var(--green-soft); color: var(--green); border-color: rgba(62, 224, 143, .3); }
.pill.declined, .pill.cancelled, .pill.removed { background: rgba(255, 255, 255, .04); color: var(--muted); border-color: var(--line); }
.count-badge { background: var(--danger); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; margin-left: 6px; }
.tabs a.active .count-badge { background: var(--lime-ink); color: var(--lime); }
.list { display: flex; flex-direction: column; gap: 10px; }
.list.muted { opacity: .6; }
.list-row {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow);
}
.list-row a { text-decoration: none; }
.row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.membership-slot { display: inline-flex; align-items: center; gap: 8px; }
.membership-slot:empty { display: none; }
.member-pill { padding: 10px 16px; font-size: 13.5px; }
.courts-hint { margin: -6px 0 16px; }
.notification { justify-content: flex-start; flex-wrap: nowrap; color: var(--ink); text-decoration: none; }
.notification:hover { border-color: var(--line-2); }
.notification.unread { border-color: var(--lime-line); background: linear-gradient(180deg, var(--lime-soft), var(--card)); }
.notification-icon { font-size: 20px; flex: none; }
.notification-body { display: flex; flex-direction: column; gap: 2px; }
.sessions { display: flex; flex-direction: column; gap: 12px; }
.session {
  display: flex; gap: 18px; align-items: center;
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: border-color .2s;
}
.session:hover { border-color: var(--line-2); }
.session-date {
  display: flex; flex-direction: column; align-items: center; min-width: 68px; padding: 10px 8px;
  background: var(--lime-soft); border: 1px solid var(--lime-line); border-radius: 14px;
  color: var(--lime); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
}
.session-date strong { font-size: 28px; line-height: 1.05; color: var(--ink); letter-spacing: -.03em; }
.session-body { flex: 1; min-width: 0; }
.session-body h3 { margin: 2px 0 10px; font-size: 19px; }
.session-body p { margin: 10px 0 0; }
.session-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.attendees { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.openplay-layout { display: grid; grid-template-columns: minmax(290px, 370px) 1fr; gap: 20px; align-items: start; }
.openplay-layout .panel { padding: 24px; }

/* Avatars */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.avatar.xs { width: 24px; height: 24px; font-size: 10px; }
.avatar.sm { width: 38px; height: 38px; font-size: 13px; }
.avatar.lg { width: 84px; height: 84px; font-size: 28px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--lime-line); }
.avatar.initials { background: linear-gradient(135deg, #2a3a30, #1a241e); color: var(--lime); font-weight: 800; letter-spacing: .02em; border: 1px solid var(--line-2); }
#nav .hello { display: inline-flex; align-items: center; gap: 8px; }
.profile { display: flex; align-items: center; gap: 18px; }
.profile h1 { margin: 0 0 2px; }
.profile-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.avatar-field { margin: 4px 0 20px; }
.with-avatar { display: flex; align-items: center; gap: 12px; }
.attendees { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.attendee { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
label.btn input[type=file] { display: none; }
.btn.disabled { opacity: .4; pointer-events: none; box-shadow: none; }

/* Court photos */
.card-cover { width: calc(100% + 44px); margin: -22px -22px 6px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--line); }
.gallery {
  position: relative; display: grid; gap: 8px; margin-bottom: 20px; border-radius: 20px; overflow: hidden;
  grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 190px 190px;
}
.gallery.count-1 { grid-template-columns: 1fr; grid-template-rows: 380px; }
.gallery.count-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 340px; }
.gallery.count-3 { grid-template-columns: 2fr 1fr; }
.gallery.count-4 { grid-template-columns: 2fr 1fr 1fr; }
.gallery-item { position: relative; padding: 0; border: 0; cursor: zoom-in; background: var(--card); overflow: hidden; }
.gallery-item:first-child { grid-row: span 2; }
.gallery.count-1 .gallery-item:first-child, .gallery.count-2 .gallery-item:first-child { grid-row: auto; }
.gallery.count-4 .gallery-item:last-child { grid-column: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s, filter .3s; }
.gallery-item:hover img { transform: scale(1.04); filter: brightness(1.08); }
.gallery-item .more {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 26px; font-weight: 800;
}
.gallery-badge {
  position: absolute; left: 14px; bottom: 14px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: rgba(9, 12, 11, .75); border: 1px solid var(--line-2); backdrop-filter: blur(8px); pointer-events: none;
}
.gallery-empty {
  display: block; text-align: center; padding: 26px; margin-bottom: 20px; border-radius: var(--radius);
  border: 1px dashed var(--lime-line); background: var(--lime-soft); color: var(--lime); font-weight: 700; text-decoration: none;
}
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.photo-tile { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.photo-tile img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; cursor: zoom-in; }
.photo-tile .btn { position: absolute; right: 10px; bottom: 10px; backdrop-filter: blur(8px); }
.photo-tile .cover-tag { position: absolute; left: 10px; top: 10px; backdrop-filter: blur(8px); }
.photo-tile .btn.set-cover { right: auto; left: 10px; }
.drop-zone { display: block; cursor: pointer; }
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(4, 6, 5, .94); backdrop-filter: blur(6px); animation: fade-in .2s ease-out;
}
.lightbox img { max-width: min(92vw, 1400px); max-height: 86vh; border-radius: 12px; box-shadow: 0 30px 80px -20px #000; }
.lb-close, .lb-nav {
  position: absolute; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .08); color: #fff;
  width: 46px; height: 46px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .16); }
.lb-close { top: 18px; right: 18px; }
.lb-nav.prev { left: 18px; }
.lb-nav.next { right: 18px; }
.lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: var(--ink-2); font-weight: 700; font-size: 14px; }

/* Marketplace */
.market-filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.market-filters input {
  font: inherit; font-size: 15px; padding: 11px 16px; max-width: 420px; color: var(--ink);
  background: rgba(0, 0, 0, .28); border: 1px solid var(--line-2); border-radius: 999px;
}
.market-filters input:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 4px var(--lime-soft); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700; text-decoration: none;
  color: var(--ink-2); background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
}
.chip:hover { color: var(--ink); border-color: var(--line-2); }
.chip.active { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.market-card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit;
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .2s, border-color .2s;
}
a.market-card:hover { transform: translateY(-3px); border-color: var(--lime-line); color: inherit; }
.market-card.sold { opacity: .6; }
.market-img { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .3); }
.market-img img { width: 100%; height: 100%; object-fit: cover; }
.market-img .ball, .market-main .ball { width: 54px; height: 54px; opacity: .5; }
.sold-badge {
  position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
  letter-spacing: .06em; background: var(--danger); color: #fff;
}
.market-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.market-body h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.market-body .price { font-weight: 800; font-size: 18px; color: var(--lime); }
.market-detail { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 28px; align-items: start; }
.market-gallery { display: flex; flex-direction: column; gap: 10px; }
.market-main {
  position: relative; aspect-ratio: 1; padding: 0; border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  background: rgba(0, 0, 0, .3); cursor: zoom-in; display: flex; align-items: center; justify-content: center;
}
.market-main:disabled { cursor: default; }
.market-main img { width: 100%; height: 100%; object-fit: cover; }
.market-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.market-thumbs button { padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; background: var(--card); }
.market-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.market-info h1 { margin: 12px 0 6px; font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -.03em; }
.market-price { font-size: 30px; font-weight: 800; color: var(--lime); margin-bottom: 14px; }
.buy-btn { padding: 13px 34px; font-size: 16px; margin-bottom: 18px; }

/* Orders */
.order-item { display: flex; align-items: center; gap: 14px; padding: 12px; margin-bottom: 20px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.order-item img, .order-item .ball { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; }
.order-item .ball { display: block; }
.order-item .price { font-weight: 700; color: var(--lime); margin-top: 2px; }
.order-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; margin: 4px 0 8px; border-top: 1px solid var(--line); }
.order-total strong { font-size: 24px; color: var(--lime); }
.order-done p { margin: 8px 0; }
.order-check { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 800; background: var(--green-soft); color: var(--green); }
.order-filters { margin-bottom: 16px; }
.order-row { align-items: flex-start; }
.order-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 280px; }
.order-sum { color: var(--lime); font-weight: 800; margin-left: 8px; }
.order-buyer { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.order-buyer a { color: var(--lime); }
.order-note { white-space: pre-line; overflow-wrap: anywhere; font-size: 13.5px; color: var(--ink-2); }
.pill.confirmed { background: rgba(120, 170, 255, .1); color: #8fb6ff; border-color: rgba(120, 170, 255, .3); }
.pill.completed { background: var(--green-soft); color: var(--green); border-color: rgba(62, 224, 143, .3); }
.market-desc { white-space: pre-line; color: var(--ink-2); margin: 0 0 20px; }
.market-contact { padding: 22px; margin-bottom: 18px; }
.contact-text { white-space: pre-line; font-weight: 700; font-size: 16px; margin: 0 0 8px; overflow-wrap: anywhere; }
.photo-grid.small { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-bottom: 10px; }
.photo-grid.small:empty { display: none; }
.photo-tile.pending img { opacity: .75; }
.photo-tile .pending-tag { position: absolute; left: 8px; bottom: 44px; backdrop-filter: blur(8px); font-size: 11px; }

/* Installable app */
.install-link { margin-left: 10px; font-size: 13.5px; }
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 18px;
  background: rgba(23, 32, 25, .94); border: 1px solid var(--lime-line); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: rise-in .3s ease-out;
}
.install-banner img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.install-banner > div { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.install-banner strong { color: var(--ink); font-size: 14.5px; }
.install-close { background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; padding: 4px 6px; cursor: pointer; }
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 110; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); animation: fade-in .2s ease-out;
}
.sheet {
  width: min(480px, 100%); margin: 12px; margin-bottom: calc(12px + env(safe-area-inset-bottom)); padding: 24px;
  border-radius: 24px; background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -20px #000;
}
.sheet-icon { width: 60px; height: 60px; border-radius: 14px; display: block; margin-bottom: 12px; }
.sheet h2 { margin: 0 0 12px; font-size: 20px; }
.sheet { max-height: calc(100vh - 24px); overflow-y: auto; }
.attendee-remove {
  margin-left: 2px; width: 20px; height: 20px; border: 0; border-radius: 50%; padding: 0; line-height: 1;
  background: rgba(255, 255, 255, .06); color: var(--muted); font-size: 14px; cursor: pointer;
}
.attendee-remove:hover { background: var(--danger-soft); color: var(--danger); }
.leave-note { font-size: 12px; text-align: right; max-width: 140px; }

/* Find a coach */
.coach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.coach-card { display: flex; gap: 16px; align-items: flex-start; padding: 20px; }
.coach-card .avatar.lg { width: 64px; height: 64px; font-size: 22px; flex: none; }
.coach-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.coach-body h3 { margin: 0; font-size: 18px; }
.coach-body p { margin: 0; }
@media (max-width: 520px) { .coach-grid { grid-template-columns: 1fr; } }
.coach-profile { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.coach-profile .avatar.lg { width: 72px; height: 72px; font-size: 24px; flex: none; }
.coach-profile h2 { margin: 0 0 8px; }
.player-list { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; }
.player-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.player-row:last-child { border-bottom: 0; }
.player-num { width: 20px; text-align: right; color: var(--muted); font-size: 13px; font-weight: 700; flex: none; }
.section-actions { display: flex; justify-content: flex-end; margin-bottom: 14px; }

/* Owner Dashboard: section heading with its create button, booking request cards, court quick links */
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head .section { margin: 0; }
.section-head .hint { margin: 4px 0 0; }
.owner-courts { align-items: center; margin: -6px 0 16px; }
.owner-courts .hint { margin-right: 4px; font-size: 13px; }
.booking-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.booking-cards.muted { opacity: .7; }
.booking-card {
  display: flex; flex-direction: column; gap: 10px; padding: 18px;
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.booking-card-head { display: flex; align-items: center; gap: 10px; }
.booking-card-who { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.booking-card-when { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.booking-card .card-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: auto; }

/* Owner Dashboard "Home": notification cards for new booking requests */
.notice-cards { display: flex; flex-direction: column; gap: 12px; }
.notice-card {
  display: flex; flex-direction: column; gap: 12px; padding: 16px 18px;
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line);
  border-left: 3px solid var(--lime); border-radius: var(--radius); box-shadow: var(--shadow);
}
.notice-card.warn { border-left-color: var(--danger); }
.notice-card-top { display: flex; align-items: center; gap: 8px; }
.notice-card-top .hint { margin-left: auto; font-size: 12.5px; }
.notice-card .card-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.admin-sections { margin-bottom: 18px; }
.sheet ol { margin: 0 0 12px; padding-left: 20px; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; }
.share-glyph { display: inline-block; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--lime); }
/* Full-screen app on iPhone: keep content clear of the notch and home bar */
header.topbar { padding-top: env(safe-area-inset-top); }
footer.footer { padding-bottom: calc(26px + env(safe-area-inset-bottom)); }

/* Native date/time pickers: color-scheme: dark already draws the icon light; brighten it to white */
input[type=date]::-webkit-calendar-picker-indicator,
input[type=time]::-webkit-calendar-picker-indicator { filter: brightness(1.6); opacity: .9; cursor: pointer; }
input[type=date]::-webkit-calendar-picker-indicator:hover,
input[type=time]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

.footer { border-top: 1px solid var(--line); color: var(--faint); font-size: 13.5px; padding: 26px 0; background: rgba(0, 0, 0, .25); }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 50;
  background: rgba(23, 32, 25, .92); color: var(--ink); padding: 12px 20px; border-radius: 999px;
  border: 1px solid var(--lime-line); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .7);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-weight: 600; font-size: 14.5px;
  animation: toast-in .25s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes fade-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (max-width: 800px) {
  .search-layout, .detail-grid, .book-layout, .openplay-layout, .market-detail { grid-template-columns: 1fr; }
  .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .market-body { padding: 10px 12px 12px; }
  .market-body h3 { font-size: 14px; }
  .filters { position: static; }
  .hero { padding: 44px 22px; border-radius: 22px; }
  .searchbar { flex-direction: column; border-radius: 20px; }
  .searchbar input + input, .searchbar select { border-left: 0; border-top: 1px solid var(--line-2); flex-basis: auto; }
  .row3.location-row { grid-template-columns: 1fr; }
  .hours-row { grid-template-columns: 1fr auto 1fr; }
  .hours-row select[name=hours_days] { grid-column: 1 / -1; }
  .rate-row { grid-template-columns: 1fr 32px; }
  .rate-row .rate-price { grid-row: 2; }
  .searchbar .btn { width: 100%; }
  .row, .row3 { grid-template-columns: 1fr; }
  .panel { padding: 22px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 14px; }
  .stat span { font-size: 26px; }
  /* Top bar: logo and account controls (Log in / Sign up, or bell + Log out) on the first row,
     page links on a row underneath that wraps if needed. */
  .topbar-inner { height: auto; padding-top: 10px; padding-bottom: 8px; flex-wrap: wrap; row-gap: 6px; }
  #nav { display: contents; }
  .logo { order: 1; }
  .nav-account { order: 2; margin-left: auto; }
  .nav-links { order: 3; flex: 1 0 100%; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--line); }
  .nav-links a { white-space: nowrap; }
  .session { flex-wrap: wrap; }
  .session-actions { flex-direction: row; width: 100%; justify-content: flex-end; }
  .gallery, .gallery.count-3, .gallery.count-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 120px 120px; }
  .gallery.count-1 { grid-template-columns: 1fr; grid-template-rows: 240px; }
  .gallery.count-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 200px; }
  .gallery-item:first-child { grid-row: auto; grid-column: span 2; }
  .gallery.count-2 .gallery-item:first-child { grid-column: auto; }
  .gallery.count-4 .gallery-item:last-child { grid-column: span 2; }
  .profile .avatar.lg { width: 64px; height: 64px; font-size: 22px; }
  .lb-nav { top: auto; bottom: 14px; }
}

/* Phones: smaller text so menus, tabs and tables fit instead of running off the edge.
   Form fields keep their size because iPhones zoom in on inputs under 16px; only their placeholders shrink. */
@media (max-width: 520px) {
  body { font-size: 15px; }
  .logo { font-size: 17px; gap: 8px; }
  .ball { width: 22px; height: 22px; }
  .logo-img { height: 26px; }
  .nav-links, .nav-account { gap: 2px; }
  #nav a { padding: 6px 9px; font-size: 13px; }
  #nav .hello { font-size: 13px; padding: 4px; }
  .hello-name { display: none; } /* just the avatar beside the bell on phones */
  #nav a.bell { padding: 6px 12px 6px 6px; font-size: 16px; }
  .bell-count { top: -3px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }
  #nav a.btn { padding: 6px 12px; }
  .hero { padding: 32px 18px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 15.5px; margin-bottom: 22px; }
  .dash-head h1 { font-size: 26px; }
  .panel h1 { font-size: 23px; }
  .panel { padding: 18px; }
  .btn { padding: 10px 18px; font-size: 14px; }
  .btn.small { padding: 6px 12px; font-size: 12.5px; }
  .chip { padding: 6px 11px; font-size: 12.5px; }
  .tabs { flex-wrap: wrap; border-radius: 18px; }
  .tabs a { padding: 7px 11px; font-size: 12.5px; }
  .stat { font-size: 12.5px; }
  .stat span { font-size: 24px; }
  .field label, .label { font-size: 13px; }
  .field input::placeholder, .field textarea::placeholder, .searchbar input::placeholder,
  .admin-search input::placeholder { font-size: 13px; }
  .hint { font-size: 12.5px; }

  /* Admin tables become one card per row, each value beside its column name. */
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; }
  .admin-table thead { display: none; }
  .admin-table { font-size: 13.5px; }
  .admin-table tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .admin-table tr:last-child { border-bottom: 0; }
  .admin-table td, .admin-table tr:last-child td { padding: 3px 0; border: 0; text-align: left; }
  .admin-table td[data-label] { display: flex; gap: 12px; justify-content: space-between; }
  .admin-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; flex: none; }
  .admin-table td[data-label] > * { text-align: right; }
  .admin-table td[data-label] { text-align: right; overflow-wrap: anywhere; }
  .admin-table .cell-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
  .admin-table td:last-child:not([data-label]) { padding-top: 8px; text-align: left; }
  .admin-table td:last-child:empty { display: none; }
}

/* Court listing waiting for (or refused) admin approval */
.approval-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 16px; padding: 12px 16px;
  background: var(--amber-soft); border: 1px solid rgba(255, 200, 87, .3); border-radius: var(--radius); color: var(--ink); font-size: 14px;
}
.approval-note strong { color: var(--amber); }
.approval-note .card-actions { display: flex; gap: 8px; margin-left: auto; }
.chip .pill { margin-left: 6px; padding: 2px 8px; font-size: 11px; }
.cell-title .pill { margin-left: 8px; }

/* Small laptops: tighter menu links so the top bar stays on one row where it can. */
@media (min-width: 801px) and (max-width: 1240px) {
  #nav a { padding: 8px 9px; font-size: 14px; white-space: nowrap; }
  #nav a.btn.small { padding: 7px 12px; }
  .nav-links { flex-wrap: wrap; justify-content: flex-end; }
}

/* Open Play Matching */
.match-setup { max-width: 780px; padding: 26px; }
.match-teams { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.match-team-row { display: grid; grid-template-columns: 26px 1fr 1fr 40px; gap: 8px; align-items: center; }
.match-team-row input {
  font: inherit; font-size: 15px; padding: 11px 14px; width: 100%; min-width: 0; color: var(--ink);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); border-radius: 12px;
}
.match-team-row .btn { padding-left: 0; padding-right: 0; }
.match-team-no { color: var(--muted); font-weight: 700; text-align: center; }
.match-options { margin-top: 22px; }
.match-rules { margin: 8px 0 0; line-height: 1.5; }
.match-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 20px; align-items: start; }
.match-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.match-layout .panel { padding: 22px; }
.match-layout h3 { margin: 0 0 14px; font-size: 18px; }
.match-courts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.match-versus { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; }
.match-side {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 14px 10px;
  height: 100%; justify-content: space-between; overflow-wrap: anywhere;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 14px;
}
.match-vs { color: var(--muted); font-weight: 700; font-size: 13px; }
.match-now { border-color: var(--lime); }
.match-picked { border-color: var(--lime); background: rgba(212, 255, 58, .14); }
.match-slider {
  margin-top: 16px;
  --pickleball: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cdefs%3E%3CradialGradient id='b' cx='.38' cy='.32' r='.75'%3E%3Cstop offset='0' stop-color='%23f2ff7a'/%3E%3Cstop offset='.6' stop-color='%23d4ff3a'/%3E%3Cstop offset='1' stop-color='%2394b81a'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='22' cy='22' r='22' fill='url(%23b)'/%3E%3Cg fill='%23566e08'%3E%3Ccircle cx='22' cy='22' r='2.2'/%3E%3Ccircle cx='32' cy='22' r='2.2'/%3E%3Ccircle cx='27' cy='30.7' r='2.2'/%3E%3Ccircle cx='17' cy='30.7' r='2.2'/%3E%3Ccircle cx='12' cy='22' r='2.2'/%3E%3Ccircle cx='17' cy='13.3' r='2.2'/%3E%3Ccircle cx='27' cy='13.3' r='2.2'/%3E%3Ccircle cx='38.9' cy='26.5' r='1.8'/%3E%3Ccircle cx='34.4' cy='34.4' r='1.8'/%3E%3Ccircle cx='26.5' cy='38.9' r='1.8'/%3E%3Ccircle cx='17.5' cy='38.9' r='1.8'/%3E%3Ccircle cx='9.6' cy='34.4' r='1.8'/%3E%3Ccircle cx='5.1' cy='26.5' r='1.8'/%3E%3Ccircle cx='5.1' cy='17.5' r='1.8'/%3E%3Ccircle cx='9.6' cy='9.6' r='1.8'/%3E%3Ccircle cx='17.5' cy='5.1' r='1.8'/%3E%3Ccircle cx='26.5' cy='5.1' r='1.8'/%3E%3Ccircle cx='34.4' cy='9.6' r='1.8'/%3E%3Ccircle cx='38.9' cy='17.5' r='1.8'/%3E%3C/g%3E%3C/svg%3E");
}
.match-slider-labels { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 14px; white-space: nowrap; }
/* Only the handle takes the pointer, so a tap on the track can't pick a winner by accident. */
.match-slider input {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 44px; margin: 0; padding: 0;
  background: transparent; border: 0; pointer-events: none; touch-action: pan-y;
}
.match-slider input::-webkit-slider-runnable-track { height: 14px; background: rgba(255, 255, 255, .1); border-radius: 999px; }
.match-slider input::-moz-range-track { height: 14px; background: rgba(255, 255, 255, .1); border-radius: 999px; }
.match-slider input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 44px; height: 44px; margin-top: -15px; pointer-events: auto; cursor: grab;
  background: var(--pickleball) center / cover no-repeat; border: 0; border-radius: 50%; box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
.match-slider input::-moz-range-thumb {
  width: 44px; height: 44px; pointer-events: auto; cursor: grab;
  background: var(--pickleball) center / cover no-repeat; border: 0; border-radius: 50%; box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
.match-tbd { justify-content: center; color: var(--muted); border-style: dashed; }
.match-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.match-layout .match-card-head h3 { margin: 0; }
.match-card-head > div:first-child { flex: none; }
.match-card-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.match-versus .field { margin: 0; min-width: 0; }
.match-versus select option { background: var(--card); color: var(--ink); }
.match-main h2.section { margin: 0; }
.match-log { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; overflow-wrap: anywhere; }
.match-table-scroll { overflow-x: auto; margin: 0 -22px -22px; }
.match-standings td:not(:first-child), .match-standings th:not(:first-child) { text-align: right; width: 1%; white-space: nowrap; }
@media (max-width: 800px) {
  .match-layout { grid-template-columns: minmax(0, 1fr); }
  .match-courts { grid-template-columns: minmax(0, 1fr); }
  .match-setup { padding: 22px; }
  .match-team-row { grid-template-columns: 20px minmax(0, 1fr) 40px; }
  .match-team-row input[name^="p2"] { grid-column: 2; }
  .match-team-row .btn { grid-column: 3; grid-row: 1 / span 2; }
}

/* Admin: find courts on Google */
.find-courts-form { max-width: 640px; margin-bottom: 20px; }
.find-courts-form .form-actions { margin-top: 0; }
.find-emails:not(:empty) { margin-top: 6px; overflow-wrap: anywhere; }

/* Rotating pickleball in the home hero */
.hero > *:not(.hero-ball):not(.hero-ball-shadow){position:relative;z-index:1}
.hero-ball{--s:230px;position:absolute;left:0;top:0;width:var(--s);height:var(--s);z-index:0;pointer-events:none;opacity:.85;will-change:transform;filter:drop-shadow(0 10px 18px rgba(0,0,0,.35))}
.hero-ball svg{width:100%;height:100%;display:block}
.hero > .hero-ball-shadow{position:absolute;left:0;top:0;width:100px;height:20px;border-radius:50%;background:radial-gradient(closest-side,rgba(0,0,0,.75),rgba(0,0,0,0));z-index:0;pointer-events:none;will-change:transform,opacity}
@media (max-width:1100px){.hero-ball{--s:170px;opacity:.55}}
@media (max-width:700px){.hero-ball{--s:110px;opacity:.4}}

/* Quick "List a court" form and the timed pop-up */
.list-court-backdrop { align-items: center; }
.list-court-sheet { position: relative; }
.list-court-sheet h2 { padding-right: 40px; }
.list-court-sheet .hint { margin: -4px 0 18px; }
.sheet-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer;
}
.sheet-close:hover { color: var(--ink); border-color: var(--lime-line); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.role-card-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.role-card .role-card-note { font-size: 13px; color: var(--faint); margin: 12px 0 0; }
@media (max-width: 600px) { .list-court-backdrop { align-items: flex-end; } }

/* "List a Court" card in the home page banner: on the right on wide screens, under the search bar elsewhere */
.hero-list-form { margin-top: 32px; max-width: 560px; }
@media (min-width: 1280px) {
  section.hero { min-height: 540px; }
  section.hero > aside.hero-list-form:not(.hero-ball) {
    position: absolute; right: 48px; top: 50%; transform: translateY(-50%); width: 430px; max-width: none; margin: 0;
  }
  .hero > h1, .hero > p, .hero > .searchbar { max-width: min(740px, calc(100% - 500px)); }
  .hero > h1 { max-width: min(720px, calc(100% - 500px)); }
}
.hero-list-form form {
  display: flex; flex-direction: column; gap: 14px; padding: 32px; border-radius: 26px;
  background: rgba(13, 18, 16, .72); border: 1px solid var(--lime-line);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .9), 0 0 40px -12px rgba(212, 255, 58, .18);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.hero-list-form h2 { margin: 0; font-size: 30px; letter-spacing: -.03em; line-height: 1.1; }
.hero .hero-list-form .hint { font-size: 14.5px; color: var(--muted); margin: 0 0 6px; max-width: none; }
.hero-list-form input:not(.hp) {
  font: inherit; font-size: 16px; padding: 15px 18px; width: 100%; color: var(--ink);
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); border-radius: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.hero-list-form input:not(.hp)::placeholder { color: var(--faint); font-size: 15px; }
.hero-list-form input:not(.hp):focus { border-color: var(--lime-line); box-shadow: 0 0 0 3px var(--lime-soft); }
.hero-list-form .btn { width: 100%; margin-top: 6px; padding: 16px; font-size: 16.5px; }
.hero-list-form .error { margin: 0; }
@media (max-width: 700px) {
  .hero-list-form { margin-top: 24px; max-width: none; }
  .hero-list-form form { padding: 22px; border-radius: 20px; gap: 12px; }
  .hero-list-form h2 { font-size: 24px; }
}


/* ================= Home page (redesign, Nov 2026) ================= */
.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; }
.home { max-width: 1240px; margin: 0 auto; }
.home h2 { letter-spacing: -.035em; }
.home .lime { color: var(--lime); }
.home-eyebrow { margin: 0 0 8px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); }
.home-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--lime-soft); color: var(--lime); display: inline-flex; align-items: center; justify-content: center; }
.home-icon svg { width: 24px; height: 24px; }

/* Hero */
.home-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding: 64px 0 40px; }
.home-hero-main { flex: 999 1 540px; min-width: 0; }
.home-near {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: var(--lime-soft); border: 1px solid var(--lime-line); color: var(--lime); font-size: 13px; font-weight: 700;
}
.home-near svg { width: 14px; height: 14px; }
.home-hero h1 { margin: 22px 0 18px; font-size: clamp(40px, 5.4vw, 66px); line-height: 1.02; font-weight: 800; letter-spacing: -.045em; }
.home-lead { margin: 0 0 32px; font-size: 18.5px; line-height: 1.6; color: var(--ink-2); max-width: 540px; }
.home-search {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 7px; border-radius: 20px; max-width: 680px;
  background: var(--card); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -24px #000;
}
.home-search label { display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 52px; min-width: 0; color: var(--muted); }
.home-search label svg { width: 18px; height: 18px; flex: none; }
.home-search-q { flex: 2 1 220px; }
.home-search-loc { flex: 1 1 160px; border-left: 1px solid var(--line-2); color: var(--lime) !important; }
.home-search input, .home-search select {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15.5px; outline: none;
}
.home-search select { font-weight: 600; cursor: pointer; appearance: none; padding-right: 22px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 9px) 50%, calc(100% - 4px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.home-search select option { background: var(--card); color: var(--ink); }
.home-search .btn { flex: 0 0 auto; border-radius: 14px; padding: 0 28px; min-height: 52px; font-size: 15.5px; font-weight: 800; }
.home-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 30px; color: var(--ink-2); font-size: 14px; }
.home-stats > div { display: flex; flex-direction: column; gap: 2px; padding-right: 28px; border-right: 1px solid var(--line); }
.home-stats > div:last-child { border-right: 0; padding-right: 0; }
.home-stats strong { font-size: 26px; color: var(--ink); letter-spacing: -.02em; }

/* List a Court card */
.home-list { flex: 1 1 380px; max-width: 440px; min-width: 0; }
.home-list form {
  display: flex; flex-direction: column; gap: 14px; padding: 32px; border-radius: 26px;
  background: linear-gradient(180deg, var(--card-2), #111714); border: 1px solid var(--lime-line); box-shadow: 0 30px 70px -30px #000;
}
.home-list-head { display: flex; align-items: center; gap: 12px; }
.home-list-head .home-icon { width: 44px; height: 44px; border-radius: 12px; }
.home-list-head .home-icon svg { width: 22px; height: 22px; }
.home-list h2 { margin: 0; font-size: 28px; }
.home-list .hint { margin: 0 0 4px; font-size: 14.5px; line-height: 1.5; color: #a9b5ad; }
.home-list label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.home-list input:not(.hp) {
  font: inherit; font-size: 15.5px; font-weight: 500; padding: 14px 16px; border-radius: 12px; outline: none;
  border: 1px solid var(--line-2); background: rgba(0, 0, 0, .3); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.home-list input:not(.hp)::placeholder { color: var(--faint); }
.home-list input:not(.hp):focus { border-color: var(--lime-line); box-shadow: 0 0 0 3px var(--lime-soft); }
.home-list .btn { margin-top: 6px; min-height: 54px; border-radius: 14px; font-size: 16.5px; font-weight: 800; width: 100%; }
.home-list-note { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.home-list .error { margin: 0; }

/* Town buttons */
.home-towns { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 0 64px; }
.home-label { font-size: 14px; font-weight: 700; color: var(--muted); margin-right: 6px; }
.home-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 999px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line-2); color: var(--ink); font-size: 14.5px; font-weight: 600; transition: border-color .15s;
}
.home-chip:hover { border-color: var(--lime-line); }
.home-chip span { font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--lime-soft); color: var(--lime); }

/* Sections */
.home-section { padding: 0 0 88px; }
.home-section h2, .home-intro h2 { margin: 0; font-size: clamp(28px, 3.2vw, 38px); }
.home-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.home-more { font-size: 15px; font-weight: 700; color: var(--lime); text-decoration: none; }
.home-more:hover { text-decoration: underline; }
.home-center { text-align: center; margin-bottom: 36px !important; }

/* Court cards */
.home-courts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.home-court {
  display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); transition: border-color .15s, transform .15s;
}
.home-court:hover { border-color: var(--lime-line); transform: translateY(-2px); }
.home-court-media { position: relative; height: 200px; background: var(--card-2); }
.home-court-media img, .home-court-art { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-court-price {
  position: absolute; right: 14px; top: 14px; padding: 6px 12px; border-radius: 999px;
  background: rgba(9, 12, 11, .85); font-size: 14px; font-weight: 800; color: var(--lime);
}
.home-court-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; }
.home-court-body h3 { margin: 0; font-size: 18.5px; letter-spacing: -.02em; }
.home-court-place { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 14px; color: #a9b5ad; }
.home-court-place svg { width: 14px; height: 14px; flex: none; }
.home-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.home-tag { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.home-tag.lime { border-color: transparent; background: var(--lime-soft); color: var(--lime); font-weight: 700; }

/* Features band: full width behind the page's side padding */
.home-band { margin: 0 calc(50% - 50vw) 0; background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-band-inner { max-width: 1304px; margin: 0 auto; padding: 88px 32px; }
.home-intro { max-width: 620px; margin-bottom: 44px; }
.home-intro > p:last-child { margin: 12px 0 0; font-size: 17px; line-height: 1.6; color: #a9b5ad; }
.home-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.home-feature {
  display: flex; gap: 18px; padding: 26px; border-radius: 20px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); transition: border-color .15s;
}
.home-feature:hover { border-color: var(--lime-line); }
.home-feature h3 { margin: 0 0 6px; font-size: 17.5px; }
.home-feature p { margin: 0; font-size: 14.5px; line-height: 1.55; color: #a9b5ad; }
.home-band + .home-section { padding-top: 88px; }

/* How it works */
.home-how { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.home-how-card { padding: 36px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.home-how-card .home-eyebrow { margin-bottom: 22px; }
.home-how-card ol { margin: 0 0 28px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 22px; }
.home-how-card li { display: flex; gap: 16px; align-items: flex-start; }
.home-how-card li strong { display: block; font-size: 16.5px; margin-bottom: 3px; }
.home-how-card li span:not(.home-step-n) { font-size: 14.5px; color: #a9b5ad; line-height: 1.5; }
.home-step-n {
  flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--lime); color: var(--lime-ink);
  font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.home-how-card.owner .home-step-n { background: transparent; border: 2px solid var(--lime); color: var(--lime); }

/* Owner banner */
.home-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
  margin-bottom: 88px; padding: 48px 52px; border-radius: 28px; background: var(--lime); color: var(--lime-ink);
}
.home-cta > div:first-child { flex: 1 1 420px; }
.home-cta h2 { margin: 0 0 10px; font-size: clamp(26px, 3vw, 36px); color: var(--lime-ink); }
.home-cta p { margin: 0; font-size: 17px; line-height: 1.55; color: #2a3510; }
.home-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.home-cta-main, .home-cta-alt {
  font: inherit; font-weight: 800; font-size: 15.5px; padding: 15px 26px; border-radius: 999px; text-decoration: none; cursor: pointer;
}
.home-cta-main { background: var(--lime-ink); color: var(--lime); border: 2px solid var(--lime-ink); }
.home-cta-alt { background: transparent; color: var(--lime-ink); border: 2px solid var(--lime-ink); }
.home-cta-main:hover { color: #e9ff8f; }
.home-cta-alt:hover { background: rgba(11, 15, 12, .08); }

@media (max-width: 800px) {
  .home-hero { padding: 32px 0 28px; gap: 32px; }
  .home-lead { font-size: 16px; margin-bottom: 22px; }
  .home-search { flex-direction: column; border-radius: 18px; }
  .home-search > label, .home-search > .btn { flex: 0 0 auto; width: 100%; max-width: 100%; }
  .home-search-loc { border-left: 0; border-top: 1px solid var(--line-2); }
  .home-search .btn { width: 100%; }
  .home-stats { gap: 0; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--line); margin-top: 22px; }
  .home-stats > div { border-right: 0; padding-right: 0; font-size: 12.5px; }
  .home-stats strong { font-size: 21px; }
  .home-list { max-width: none; }
  .home-list form { padding: 22px; border-radius: 22px; gap: 12px; }
  .home-list h2 { font-size: 25px; }
  .home-towns { padding-bottom: 40px; gap: 8px; }
  .home-label { flex: 1 0 100%; }
  .home-chip { padding: 10px 14px; font-size: 14px; }
  .home-courts, .home-features, .home-how { grid-template-columns: 1fr; gap: 14px; }
  .home-section { padding-bottom: 48px; }
  .home-band-inner { padding: 44px 16px; }
  .home-band + .home-section { padding-top: 48px; }
  .home-feature { padding: 16px; align-items: center; }
  .home-feature .home-icon { width: 42px; height: 42px; }
  .home-how-card { padding: 26px 22px; }
  .home-cta { padding: 28px 24px; margin-bottom: 48px; }
  .home-cta-actions, .home-cta-main, .home-cta-alt { width: 100%; text-align: center; }
}

/* ================= Footer ================= */
.footer { padding: 0 !important; background: #070a09; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 36px; padding-top: 56px !important; padding-bottom: 8px; max-width: 1304px; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; }
.footer-mark { width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #f4ffb8, var(--lime) 45%, #8db314); }
.footer-brand p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 240px; }
.footer-install { margin-top: 6px; font: inherit; font-size: 13.5px; font-weight: 700; padding: 10px 16px; border-radius: 12px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink); cursor: pointer; }
.footer-install:hover { border-color: var(--lime-line); }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; font-size: 14px; }
.footer-col strong { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.footer-col a, .footer-col button { color: var(--ink-2); text-decoration: none; font: inherit; font-size: 14px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.footer-col a:hover, .footer-col button:hover { color: var(--lime); }
.footer-bottom { max-width: 1304px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px;
  padding-top: 22px !important; padding-bottom: calc(26px + env(safe-area-inset-bottom)) !important; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; padding-top: 36px !important; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; text-align: center; margin-top: 24px; }
}
#app { overflow-x: clip; } /* the home page's full-width band can't cause sideways scrolling */
/* "Play Now" menu in the top bar (Open play, Games) */
#nav details.nav-menu { position: relative; }
#nav .nav-menu summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); font-weight: 600; padding: 8px 14px; border-radius: 999px; font-size: 14.5px; transition: color .15s, background .15s;
}
#nav .nav-menu summary::-webkit-details-marker { display: none; }
#nav .nav-menu summary:hover, #nav .nav-menu[open] summary { color: var(--ink); background: rgba(255, 255, 255, .06); }
#nav .nav-menu summary svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
#nav .nav-menu[open] summary svg { transform: rotate(180deg); }
#nav .nav-menu-list {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 30; min-width: 250px; display: flex; flex-direction: column; gap: 2px;
  padding: 6px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line-2); box-shadow: 0 24px 50px -18px #000;
}
#nav .nav-menu-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 11px; white-space: normal; }
#nav .nav-menu-list a strong { color: var(--ink); font-size: 14.5px; }
#nav .nav-menu-list a span { color: var(--muted); font-size: 12.5px; font-weight: 500; }
#nav .nav-menu-list a:hover { background: rgba(255, 255, 255, .06); }
#nav .nav-menu-list a:hover strong { color: var(--lime); }
@media (max-width: 800px) {
  #nav .nav-menu summary { padding: 6px 9px; font-size: 13px; }
  #nav .nav-menu-list { min-width: 220px; }
}

/* Bouncing pickleball behind the home page hero (animated by app.js, which looks for .hero-ball) */
.home-hero { position: relative; isolation: isolate; }
.home-hero > *:not(.hero-ball):not(.hero-ball-shadow) { position: relative; z-index: 1; }
.home-hero > .hero-ball-shadow { position: absolute; left: 0; top: 0; width: 100px; height: 20px; border-radius: 50%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0)); will-change: transform, opacity; }