:root{
  /* Cream/coral is now the default look (matches the approved design
     sample) - solid colors only, no brand gradients. body.dark below is
     the alternate theme the toggle switches to. */
  --asphalt:#F7F1E6;
  --asphalt-2:#FFFFFF;
  --asphalt-3:#F0E8D8;
  --line:#EAE2D2;
  --paint:#FFBF00;
  /* --paint-2 is a darker gold, not a lighter one here - #FFBF00 is too
     bright to read as plain text on this light background (~1.5:1
     contrast), so anywhere --paint was used as TEXT color (not a filled
     shape) uses --paint-2 instead. Solid fills keep the bright --paint with
     dark --paint-ink text on top. */
  --paint-2:#8A6A00;
  --paint-dim:#FFF0B3;
  --glow:rgba(255,191,0,0.28);
  --court-green:#1C9A5B;
  --amber:#D2691E;
  --chalk:#1C1B19;
  --chalk-dim:#8A8478;
  --shell:#F7F1E6;
  --shell-blur:rgba(247,241,230,0.88);
  /* Amber is bright regardless of theme, so text placed on a --paint fill
     always needs dark ink, never white. */
  --paint-ink:#171410;
  /* Was a dual raised/inset neumorphic shadow pair; --nu-light is now fully
     transparent so every existing "Npx Npx var(--nu-dark), -Npx -Npx
     var(--nu-light)" declaration collapses to one soft solid-color shadow
     without needing to touch each rule individually. */
  --nu-dark:rgba(28,27,25,0.10);
  --nu-light:rgba(255,255,255,0);
}
body.dark{
  --asphalt:#0F0D0B;
  --asphalt-2:#1A1714;
  --asphalt-3:#221E19;
  --line:rgba(255,255,255,0.08);
  --paint:#FFBF00;
  /* Amber-on-near-black already has great contrast, so unlike :root above,
     --paint-2 stays bright here - just a slightly different gold for
     visual distinction from --paint, not a legibility fix. */
  --paint-2:#FFCC33;
  --paint-dim:#7A5C00;
  --glow:rgba(255,191,0,0.32);
  --court-green:#3ED27E;
  --amber:#FF8A3D;
  --chalk:#FFFFFF;
  --chalk-dim:#A69C90;
  --shell:#0B0A08;
  --shell-blur:rgba(11,10,8,0.85);
  --paint-ink:#171410;
  --nu-dark:rgba(0,0,0,0.5);
  --nu-light:rgba(255,255,255,0);
}
body, .sidebar, .header, .tabbar, .courtrow, .gamecard, .statbox, .badge,
.rowlink, .search, .mapcard, .presencecard, .theme-toggle{
  transition:background .25s ease, background-color .25s ease, border-color .25s ease, color .25s ease;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html,body{margin:0; padding:0; height:100%; background:var(--asphalt);}
body{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  color:var(--chalk);
  display:flex;
  min-height:100vh;
  background:var(--asphalt);
}
h1,h2,h3,.display{
  font-family:inherit;
  font-weight:800;
  letter-spacing:-0.01em;
  margin:0;
}
::-webkit-scrollbar{ width:8px; }
::-webkit-scrollbar-thumb{ background:var(--line); border-radius:8px; }

/* ---------- SIDEBAR ---------- */
.sidebar{
  width:220px; flex:none; background:var(--shell); border-right:1px solid var(--line);
  display:flex; flex-direction:column; padding:22px 14px; gap:4px;
  position:sticky; top:0; height:100vh;
}
.brand{ display:flex; align-items:center; gap:8px; padding:6px 10px 26px; }
.brand .mark{
  width:30px; height:30px; border-radius:8px; background:var(--paint);
  display:flex; align-items:center; justify-content:center;
  font-weight:800; color:var(--paint-ink); font-size:14px;
}
.brand b{ font-weight:800; font-size:16px; letter-spacing:0.01em;}
.brand-logo-img{ height:45px; width:auto; display:block; }
/* The "long" wordmark (~5.8:1) needs a shorter height than a square mark to
   fit a slim navbar row without overflowing it. */
.brand .brand-logo-img{ height:26px; }

/* ---------- Brand logo assets (dark-bg vs light-bg variants) ----------
   Two <img> tags share a slot; body.dark flips which one is visible so
   every logo placement (sidebar, splash, auth pages, admin) reads correctly
   in both themes without any per-page JS. */
.logo-swap{ display:inline-flex; align-items:center; }
.logo-swap img{ display:block; }
.logo-swap .logo-for-dark{ display:none; }
body.dark .logo-swap .logo-for-dark{ display:block; }
body.dark .logo-swap .logo-for-light{ display:none; }
.navitem{
  display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:10px;
  color:var(--chalk-dim); font-size:13.5px; font-weight:700; cursor:pointer;
  transition:background .15s ease, color .15s ease;
  text-decoration:none;
}
.navitem:hover{ background:var(--asphalt-3); color:var(--chalk); }
.navitem.on{ background:rgba(255,191,0,0.14); color:var(--paint-2); }
.navitem .ic{ width:18px; text-align:center; }
.sidebar-foot{ margin-top:auto; padding:12px 10px; }
.sidebar-foot .loc{ font-size:11px; color:var(--chalk-dim); letter-spacing:0.06em; text-transform:uppercase; }
.sidebar-foot .city{ font-size:13px; font-weight:800; margin-top:2px;}

/* ---------- MAIN ---------- */
.main{ flex:1; min-width:0; display:flex; flex-direction:column; position:relative; }
.main-bg{
  position:absolute; inset:0; z-index:0;
  background-size:cover; background-position:center;
}
.main-bg::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(20,16,10,0.45), var(--asphalt) 92%);
}
.main > .header, .main > .content{ position:relative; z-index:1; }
.header{
  display:flex; align-items:center; justify-content:space-between;
  padding:26px 34px 18px; border-bottom:1px solid var(--line);
  position:sticky; top:0; background:var(--shell-blur); backdrop-filter:blur(8px); z-index:20;
}
.header .eyebrow{ font-size:10.5px; letter-spacing:0.16em; color:var(--paint-2); text-transform:uppercase; font-weight:800; margin-bottom:4px;}
.header .title{ font-size:24px; }
.search{
  display:flex; align-items:center; gap:8px; padding:10px 16px; background:var(--asphalt-2);
  border:1px solid var(--line); border-radius:10px; color:var(--chalk-dim); font-size:13px; width:280px;
  box-shadow:inset 3px 3px 8px var(--nu-dark), inset -3px -3px 8px var(--nu-light);
}
.avatarpill{
  width:38px; height:38px; border-radius:10px; background:var(--paint);
  display:flex; align-items:center; justify-content:center; font-weight:800; color:var(--paint-ink); font-size:15px; cursor:pointer;
  text-decoration:none; box-shadow:0 6px 16px -6px var(--glow);
}
.headerright{ display:flex; align-items:center; gap:12px; }
.theme-toggle{
  width:38px; height:38px; border-radius:10px; background:var(--asphalt-2);
  border:1px solid var(--line); color:var(--chalk); font-size:16px;
  display:flex; align-items:center; justify-content:center; cursor:pointer; flex:none;
  box-shadow:4px 4px 10px var(--nu-dark), -4px -4px 10px var(--nu-light);
}
.theme-toggle:hover{ border-color:var(--paint-dim); }

.content{ padding:26px 34px 60px; }
.view{ display:none; }
.view.active{ display:block; animation:fade .25s ease; }
@keyframes fade{ from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:translateY(0);} }

.section-label{ font-size:11.5px; letter-spacing:0.14em; text-transform:uppercase; color:var(--chalk-dim); font-weight:800; margin:26px 0 12px;}
.section-label:first-child{ margin-top:0; }

/* Map + venue list */
.layout-2col{ display:grid; grid-template-columns:1.3fr 1fr; gap:22px; align-items:start; }
.mapcard{
  height:360px; border-radius:20px; position:relative; overflow:hidden;
  border:1px solid var(--line);
}
#leafletMap{ position:absolute; inset:0; z-index:1; }
.leaflet-container{ background:var(--asphalt-2) !important; font-family:inherit; }
.pin-icon{ width:14px; height:14px; border-radius:50%; box-shadow:0 0 0 6px rgba(0,0,0,0.15); }
.pin-icon.live{ background:var(--court-green); animation:pulse 1.8s infinite; }
.pin-icon.recent{ background:var(--amber); }
.pin-icon.quiet{ background:var(--chalk-dim); }

/* A venue with a logo gets a circular photo pin instead of a plain dot -
   the status color moves to the ring around it. */
.pin-icon-logo{
  width:30px; height:30px; border-radius:50%; overflow:hidden;
  border:3px solid var(--chalk-dim); background:#fff; box-shadow:0 2px 8px rgba(0,0,0,0.35);
}
.pin-icon-logo img{ width:100%; height:100%; object-fit:cover; display:block; }
.pin-icon-logo.live{ border-color:var(--court-green); }
.pin-icon-logo.recent{ border-color:var(--amber); }
.pin-icon-logo.quiet{ border-color:var(--chalk-dim); }
@keyframes pulse{ 0%{box-shadow:0 0 0 0 rgba(28,154,91,0.5)} 70%{box-shadow:0 0 0 14px rgba(28,154,91,0)} 100%{box-shadow:0 0 0 0 rgba(28,154,91,0)} }
.you{ position:absolute; bottom:16px; right:18px; font-size:10px; color:var(--chalk-dim); letter-spacing:0.1em; text-transform:uppercase; z-index:5;}
.legend{ position:absolute; top:16px; left:18px; display:flex; gap:14px; font-size:10.5px; color:var(--chalk-dim); z-index:5; background:var(--shell-blur); padding:6px 10px; border-radius:8px;}
.legend span{ display:flex; align-items:center; gap:5px; }
.legend i{ width:8px; height:8px; border-radius:50%; display:inline-block; }
.leaflet-popup-content-wrapper{ background:var(--asphalt-2); color:var(--chalk); border:1px solid var(--line); }
.leaflet-popup-tip{ background:var(--asphalt-2); }
.leaflet-popup-content b{ display:block; margin-bottom:3px; }
.leaflet-popup-content a{ color:var(--paint-2); font-weight:700; text-decoration:none; }

.courtrow{
  padding:15px; background:var(--asphalt-2); border:1px solid var(--line);
  border-radius:14px; display:flex; gap:12px; align-items:center; cursor:pointer;
  transition:border-color .15s ease, transform .1s ease, box-shadow .15s ease; margin-bottom:10px;
  box-shadow:7px 7px 16px var(--nu-dark), -7px -7px 16px var(--nu-light);
}
.courtrow:hover{ border-color:var(--paint-dim); transform:translateX(2px); box-shadow:9px 9px 20px var(--nu-dark), -9px -9px 20px var(--nu-light); }
.courtrow .dot{ width:9px; height:9px; border-radius:50%; flex:none; }
.dot.live{ background:var(--court-green); box-shadow:0 0 0 4px rgba(28,154,91,0.15);}
.dot.recent{ background:var(--amber); }
.dot.quiet{ background:var(--chalk-dim); }
.courtrow .meta{ flex:1; }
.courtrow .name{ font-size:14.5px; font-weight:800; }
.courtrow .sub{ font-size:11.5px; color:var(--chalk-dim); margin-top:3px; }
.courtrow .dist{ font-size:11px; color:var(--chalk-dim); text-align:right; flex:none; }

.cta{
  display:inline-block; padding:13px 22px; text-align:center;
  background:var(--paint); color:var(--paint-ink); font-weight:800; letter-spacing:0.01em;
  border-radius:999px; font-size:13.5px; border:none; cursor:pointer;
  box-shadow:0 10px 24px -8px var(--glow);
  text-decoration:none; transition:transform .1s ease, box-shadow .15s ease;
}
.cta.ghost{
  background:var(--asphalt-2); color:var(--chalk); border:1px solid var(--line); box-shadow:4px 4px 12px var(--nu-dark), -4px -4px 12px var(--nu-light);
}
.cta:active{ transform:scale(0.98); }
.cta:disabled{ opacity:0.5; cursor:not-allowed; }

/* Venue detail */
.courtdetail{ display:grid; grid-template-columns:1.4fr 1fr; gap:26px; align-items:start; }
.hero{
  height:220px; border-radius:20px; position:relative; overflow:hidden;
  background:var(--asphalt-3); background-size:cover; background-position:center;
  border:1px solid var(--line); display:flex; align-items:flex-end; padding:20px;
}
.hero::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,0.55) 100%);
}
.hero-info{ position:relative; z-index:1; display:flex; align-items:center; gap:12px; }
.hero-logo{
  width:44px; height:44px; border-radius:50%; flex:none; overflow:hidden;
  border:3px solid #fff; background:var(--asphalt-2); box-shadow:0 4px 12px rgba(0,0,0,0.35);
}
.hero-logo img{ width:100%; height:100%; object-fit:cover; display:block; }
.hero .hooptag{ position:relative; font-size:12px; color:var(--paint-2); font-weight:800; letter-spacing:0.08em; text-transform:uppercase; }
.statgrid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px; }
.statbox{ background:var(--asphalt-2); border:1px solid var(--line); border-radius:12px; padding:13px 15px; box-shadow:6px 6px 14px var(--nu-dark), -6px -6px 14px var(--nu-light); }
.statbox .k{ font-size:10px; color:var(--chalk-dim); text-transform:uppercase; letter-spacing:0.1em; }
.statbox .v{ font-size:15px; font-weight:800; margin-top:4px; }
.badgewrap{ display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.badge{ font-size:11.5px; padding:7px 12px; border-radius:10px; background:var(--asphalt-2); border:1px solid var(--line); color:var(--chalk-dim); box-shadow:4px 4px 10px var(--nu-dark), -4px -4px 10px var(--nu-light); }

.presencecard{
  padding:20px; border-radius:18px;
  background:rgba(28,154,91,0.08);
  border:1px solid rgba(28,154,91,0.3);
  box-shadow:7px 7px 16px var(--nu-dark), -7px -7px 16px var(--nu-light);
}
.presencecard .num{ font-size:44px; font-weight:800; color:var(--court-green); line-height:1; }
.presencecard .lbl{ font-size:12px; color:var(--chalk-dim); margin-top:4px; }
.presencecard .next{ font-size:12px; color:var(--chalk-dim); margin-top:10px; }
.presencecard .cta{ width:100%; margin-top:16px; }

/* Events */
.filterrow{ display:flex; gap:8px; margin-bottom:18px; flex-wrap:wrap; }
.filterchip{ font-size:12px; padding:9px 15px; border-radius:999px; background:var(--asphalt-2); border:1px solid var(--line); color:var(--chalk-dim); cursor:pointer; box-shadow:4px 4px 10px var(--nu-dark), -4px -4px 10px var(--nu-light); }
.filterchip.on{ background:var(--chalk); border-color:var(--chalk); color:var(--asphalt-2); font-weight:800; }
.gamesgrid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(260px,1fr)); gap:16px; }
.gamecard{ padding:18px; background:var(--asphalt-2); border:1px solid var(--line); border-radius:16px; box-shadow:7px 7px 16px var(--nu-dark), -7px -7px 16px var(--nu-light); }
.gamecard .row1{ display:flex; justify-content:space-between; align-items:flex-start;}
.gamecard .gname{ font-size:15.5px; font-weight:800; }
.gamecard .gtime{ font-size:11.5px; color:var(--paint-2); font-weight:700;}
.gamecard .gsub{ font-size:12px; color:var(--chalk-dim); margin:5px 0 12px; }
.fillbar{ height:6px; border-radius:4px; background:var(--line); overflow:hidden; margin-bottom:12px; }
.fillbar > i{ display:block; height:100%; background:var(--court-green); }
.gamecard .row2{ display:flex; justify-content:space-between; align-items:center; }
.tag{ font-size:11px; padding:4px 9px; border-radius:999px; background:var(--asphalt-3); color:var(--chalk-dim);}
.tag.hot{ background:rgba(255,191,0,0.14); color:var(--paint-2); font-weight:700;}
.joinbtn{ font-size:11.5px; font-weight:800; color:var(--paint-2); background:rgba(255,191,0,0.12); border:1px solid var(--paint-dim); padding:9px 16px; border-radius:999px; cursor:pointer;}
.joinbtn:disabled{ opacity:0.5; cursor:not-allowed; }
.joinbtn.joined{ background:rgba(28,154,91,0.14); color:var(--court-green); border-color:rgba(28,154,91,0.4); }

/* Check-in */
.checkinwrap{ display:flex; flex-direction:column; align-items:center; justify-content:center; padding:50px 20px; text-align:center; gap:20px; }
.ring{ width:180px; height:180px; border-radius:50%; border:2px dashed var(--court-green); display:flex; align-items:center; justify-content:center; position:relative; }
.ring::before{ content:""; position:absolute; inset:16px; border-radius:50%; background:rgba(28,154,91,0.08); animation:pulse 1.8s infinite;}
.ring .big{ font-size:48px; font-weight:800; color:var(--court-green); position:relative;}
.checkinwrap h2{ font-size:24px; }
.checkinwrap p{ font-size:13.5px; color:var(--chalk-dim); max-width:320px; line-height:1.6; margin:0;}
.stampfeed{ font-size:12px; color:var(--chalk-dim); }
.stampfeed b{ color:var(--chalk); }
.checkinbtns{ display:flex; gap:10px; }

/* Profile */
.profilehead{ display:flex; gap:18px; align-items:center; margin-bottom:24px; }
.avatar{ width:76px; height:76px; border-radius:18px; background:var(--paint); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:26px; color:var(--paint-ink); box-shadow:0 12px 28px -10px var(--glow); }
.profilehead .name{ font-size:21px; font-weight:800; }
.profilehead .pos{ font-size:12.5px; color:var(--paint-2); font-weight:700; margin-top:3px;}
.profilehead .loc{ font-size:11.5px; color:var(--chalk-dim); margin-top:3px;}
.profgrid{ display:grid; grid-template-columns:1fr 1fr; gap:22px; }
.rowlink{ padding:15px 17px; background:var(--asphalt-2); border:1px solid var(--line); border-radius:12px; display:flex; justify-content:space-between; align-items:center; font-size:13.5px; margin-bottom:10px; box-shadow:5px 5px 12px var(--nu-dark), -5px -5px 12px var(--nu-light); }
.rowlink .l{ color:var(--chalk-dim); }
.rowlink .r{ font-weight:700; }

/* ---------- APP SHELL (phone-card layout, matches home-sample.php) ----------
   The app is a single-column "phone" frame centered on the page at any
   viewport width, not a responsive desktop+mobile dual layout - that's the
   whole point of the redesign, so there's no sidebar any more. */
.phone{
  width:100%; max-width:430px; min-height:100vh; margin:0 auto;
  background:var(--asphalt); position:relative;
  padding:18px 18px calc(96px + env(safe-area-inset-bottom));
}
.topbar{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.topicons{ display:flex; gap:10px; }
.icon-btn{
  width:38px; height:38px; border-radius:12px; background:var(--asphalt-2);
  display:flex; align-items:center; justify-content:center; box-shadow:6px 6px 14px var(--nu-dark), -6px -6px 14px var(--nu-light);
  position:relative; flex:none; color:var(--chalk); cursor:pointer; border:none; font-size:15px;
  text-decoration:none; overflow:hidden;
}
.icon-btn img{ width:100%; height:100%; object-fit:cover; }
.icon-btn .dot{
  position:absolute; top:7px; right:7px; width:8px; height:8px; border-radius:50%;
  background:var(--paint); border:2px solid var(--asphalt-2);
}
.locrow{ display:flex; align-items:center; gap:6px; font-size:13px; color:var(--chalk-dim); font-weight:600; margin-bottom:14px; }
h1.headline{ font-size:23px; font-weight:800; margin:0 0 16px; letter-spacing:-0.01em; }

.pillrow{ display:flex; gap:8px; overflow-x:auto; margin-bottom:20px; padding-bottom:2px; -webkit-overflow-scrolling:touch; }
.pillrow::-webkit-scrollbar{ display:none; }
.pill{
  flex:none; padding:9px 16px; border-radius:999px; font-size:12.5px; font-weight:700;
  background:var(--asphalt-3); color:var(--chalk); cursor:pointer; border:none; white-space:nowrap;
}
.pill.on{ background:var(--chalk); color:var(--asphalt-2); }

.featured{
  border-radius:24px; overflow:hidden; position:relative; min-height:260px;
  background-size:cover; background-position:center; box-shadow:7px 7px 16px var(--nu-dark), -7px -7px 16px var(--nu-light);
  display:flex; align-items:flex-end;
}
.featured::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.75) 100%);
}
.featured-tag{
  position:absolute; top:16px; left:16px; z-index:2;
  background:#fff; color:var(--chalk); font-size:11px; font-weight:800;
  padding:6px 12px; border-radius:999px; display:flex; align-items:center; gap:5px;
}
.featured-body{ position:relative; padding:18px; z-index:2; color:#fff; width:100%; }
.featured-body h2{ font-size:21px; margin:0 0 6px; font-weight:800; }
.featured-meta{ font-size:12.5px; opacity:0.9; margin-bottom:12px; display:flex; align-items:center; gap:6px; }
.avatarstack{ display:flex; align-items:center; gap:8px; margin-bottom:14px; }
.avatarstack .stack{ display:flex; }
.avatarstack .av{
  width:26px; height:26px; border-radius:50%; background:var(--paint); border:2px solid #fff;
  margin-left:-8px; display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:800; color:var(--paint-ink);
}
.avatarstack .av:first-child{ margin-left:0; }
.avatarstack .count{ font-size:12px; font-weight:700; }
.joinbtn-lg{
  display:block; width:100%; text-align:center; padding:14px; border-radius:999px; border:none;
  background:var(--paint); color:var(--paint-ink); font-weight:800; font-size:14px; cursor:pointer;
  box-shadow:0 12px 24px -8px var(--glow);
}
.joinbtn-lg:disabled{ opacity:0.6; cursor:default; }
.no-featured{
  border-radius:24px; background:var(--asphalt-2); box-shadow:6px 6px 14px var(--nu-dark), -6px -6px 14px var(--nu-light);
  padding:34px 20px; text-align:center; color:var(--chalk-dim); font-size:13px;
}

.peoplerow{
  display:flex; align-items:center; justify-content:space-between; background:var(--asphalt-2);
  border-radius:18px; padding:14px 16px; box-shadow:6px 6px 14px var(--nu-dark), -6px -6px 14px var(--nu-light);
  cursor:pointer; border:none; width:100%; text-align:left; font:inherit; color:inherit;
}
.peoplerow .stack{ display:flex; }
.peoplerow .av{
  width:32px; height:32px; border-radius:50%; background:var(--paint); border:2px solid var(--asphalt-2);
  margin-left:-10px; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:800; color:var(--paint-ink);
}
.peoplerow .stack .av:first-child{ margin-left:0; }
.peoplerow .label{ font-size:12.5px; font-weight:700; color:var(--chalk); }
.peoplerow .chev{ color:var(--chalk-dim); }

.listcard{
  display:flex; align-items:center; gap:12px; background:var(--asphalt-2); border-radius:16px; padding:12px 14px;
  box-shadow:5px 5px 12px var(--nu-dark), -5px -5px 12px var(--nu-light); margin-bottom:10px; cursor:pointer;
  border:none; width:100%; text-align:left; font:inherit; color:inherit;
}
.listcard .thumb{ width:44px; height:44px; border-radius:12px; background:var(--asphalt-3); display:flex; align-items:center; justify-content:center; font-size:18px; flex:none; overflow:hidden; }
.listcard .thumb img{ width:100%; height:100%; object-fit:cover; }
.listcard .meta{ flex:1; min-width:0; }
.listcard .name{ font-size:13.5px; font-weight:700; }
.listcard .sub{ font-size:11.5px; color:var(--chalk-dim); margin-top:2px; }
.listcard .tagr{ font-size:10.5px; font-weight:800; color:var(--paint-2); flex:none; text-align:right; }
.empty-note{ font-size:12.5px; color:var(--chalk-dim); padding:10px 2px; }

.profilecard{ background:var(--asphalt-2); border-radius:18px; padding:18px; box-shadow:7px 7px 16px var(--nu-dark), -7px -7px 16px var(--nu-light); text-align:center; }
.profilecard .av{
  width:60px; height:60px; border-radius:50%; background:var(--paint); color:var(--paint-ink);
  font-weight:800; font-size:22px; display:flex; align-items:center; justify-content:center; margin:0 auto 10px; overflow:hidden;
}
.profilecard .av img{ width:100%; height:100%; object-fit:cover; }
.profilecard .name{ font-weight:800; font-size:16px; }
.profilecard .sub{ font-size:12px; color:var(--chalk-dim); margin-top:2px; }

.sectionrow{ display:flex; align-items:center; justify-content:space-between; margin:26px 0 12px; }
.sectionrow .section-label{ margin:0; }
.viewtoggle{ display:flex; gap:2px; background:var(--asphalt-3); border-radius:999px; padding:3px; }
.vt-btn{
  border:none; background:none; padding:6px 12px; border-radius:999px; font-size:10.5px; font-weight:800;
  color:var(--chalk-dim); cursor:pointer; text-transform:none; letter-spacing:0;
}
.vt-btn.on{ background:var(--asphalt-2); color:var(--chalk); box-shadow:0 2px 6px var(--nu-dark); }

/* ---------- TAB BAR ---------- */
.tabbar{
  position:fixed; left:0; right:0; bottom:0; z-index:60;
  display:flex; justify-content:center;
}
.tabbar-inner{
  width:100%; max-width:430px; background:var(--asphalt-2); border-radius:22px 22px 0 0;
  display:flex; justify-content:space-around; align-items:center;
  padding:10px 4px calc(10px + env(safe-area-inset-bottom));
  box-shadow:0 -8px 24px -12px var(--nu-dark);
}
.tabbar .tabitem{
  display:flex; flex-direction:column; align-items:center; gap:3px;
  color:var(--chalk-dim); font-size:8.5px; letter-spacing:0.02em; text-transform:uppercase;
  font-weight:700; padding:6px 4px; border-radius:10px; min-width:0; flex:1;
  text-decoration:none; background:none; border:none; cursor:pointer;
}
.tabbar .tabitem .ic{ font-size:18px; line-height:1; }
.tabbar .tabitem.on{ color:var(--paint-2); }
.sidebar-brand{ display:none; }

/* ---------- DESKTOP SHELL ----------
   Same phone-card markup, reskinned via CSS only: the bottom tabbar
   becomes a left sidebar nav and a handful of view sections opt into the
   old .courtdetail/.profgrid/.layout-2col grids (still defined above,
   already dormant since the mobile-only rewrite stopped rendering the old
   sidebar/header markup that used to trigger them) instead of stacking
   full-width. No JS or element ids change, so every feature stays wired. */
@media (min-width: 881px){
  body{ align-items:flex-start; }

  .phone{
    max-width:1180px; margin:0 0 0 236px;
    padding:34px 40px 60px;
  }

  .tabbar{ left:0; right:auto; top:0; bottom:0; justify-content:flex-start; }
  .tabbar-inner{
    width:236px; max-width:236px; height:100%; border-radius:0;
    flex-direction:column; align-items:stretch; justify-content:flex-start;
    padding:22px 14px; gap:3px; box-shadow:none; border-right:1px solid var(--line);
  }
  .sidebar-brand{ display:block; padding:6px 10px 24px; }
  .sidebar-brand .brand-logo-img{ height:24px; }
  .tabbar .tabitem{
    flex-direction:row; justify-content:flex-start; gap:12px;
    text-transform:none; letter-spacing:0; font-size:13.5px; font-weight:700;
    padding:11px 12px; border-radius:10px; flex:none; min-width:0;
    transition:background .15s ease, color .15s ease;
  }
  .tabbar .tabitem .ic{ font-size:17px; width:18px; text-align:center; }
  .tabbar .tabitem:hover{ background:var(--asphalt-3); }
  .tabbar .tabitem.on{ background:rgba(255,191,0,0.14); }

  .topbar{ max-width:none; }
  .headline{ font-size:28px; }

  #eventsGrid, #squadsList, #ridesList{
    display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:14px;
  }
  #eventsGrid .listcard, #squadsList .listcard, #ridesList .listcard{ margin-bottom:0; }

  #leafletMap{ height:420px !important; }
}

@media (max-width: 880px){
  body{ padding-bottom:0; }
  .sidebar{ display:none; }
  .tabbar{ display:flex; }

  .header{
    padding:16px 16px 12px;
    flex-wrap:wrap;
    row-gap:12px;
  }
  .header .title{ font-size:20px; }
  .header .eyebrow{ font-size:10px; }
  .headerright{ width:100%; gap:10px; }
  .search{ width:auto; flex:1; padding:11px 14px; font-size:13px; }
  .avatarpill{ width:38px; height:38px; flex:none; }

  .content{ padding:16px 16px calc(88px + env(safe-area-inset-bottom)); }

  .layout-2col, .courtdetail, .profgrid{ grid-template-columns:1fr; gap:16px; }
  .mapcard{ height:220px; border-radius:16px; }
  .legend{ font-size:9.5px; gap:10px; top:12px; left:14px; }

  .section-label{ margin:20px 0 10px; font-size:11px; }

  .courtrow{ padding:13px; border-radius:12px; }
  .courtrow .name{ font-size:14px; }
  .courtrow .sub{ font-size:11px; }

  .hero{ height:170px; border-radius:16px; padding:16px; }
  .statgrid{ grid-template-columns:1fr 1fr; gap:8px; }
  .statbox{ padding:11px 13px; border-radius:10px; }
  .badgewrap{ gap:6px; }
  .badge{ font-size:11px; padding:6px 10px; }

  .presencecard{ padding:18px; border-radius:16px; }
  .presencecard .num{ font-size:38px; }

  .gamesgrid{ grid-template-columns:1fr; gap:12px; }
  .gamecard{ padding:15px; border-radius:14px; }
  .filterrow{ flex-wrap:nowrap; overflow-x:auto; padding-bottom:4px; -webkit-overflow-scrolling:touch; }
  .filterrow::-webkit-scrollbar{ display:none; }
  .filterchip{ flex:none; }

  .checkinwrap{ padding:30px 16px; gap:16px; }
  .ring{ width:150px; height:150px; }
  .ring .big{ font-size:40px; }
  .checkinwrap h2{ font-size:20px; }
  .checkinwrap p{ font-size:13px; }
  .checkinbtns{ flex-direction:column; width:100%; }
  .checkinbtns .cta{ width:100%; }

  .profilehead{ margin-bottom:18px; }
  .avatar{ width:62px; height:62px; border-radius:14px; font-size:22px; }
  .profilehead .name{ font-size:18px; }
  .rowlink{ padding:13px 15px; font-size:13px; }

  .cta{ padding:14px 20px; font-size:13px; }
}

/* ---------- SPLASH ---------- */
.splash{
  position:fixed; inset:0; z-index:999;
  background:var(--asphalt);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  transition:opacity .5s ease;
}
.splash.hide{ opacity:0; pointer-events:none; }
.splash.has-photo{ background-size:cover; background-position:center; }
.splash.has-photo::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(20,16,10,0.4), var(--asphalt) 85%);
}
.splash.has-photo .splash-logo, .splash.has-photo .splash-barwrap{ position:relative; z-index:1; }
/* Default brand backdrop when the player hasn't set their own hero photo -
   wide-view.png reads best on a desktop-proportioned screen, vertical-view.png
   on a phone-proportioned one, swapped purely by viewport width. */
.splash.brand-bg{
  background-image:url('brand/wide-view.png');
  background-size:cover; background-position:center;
}
.splash.brand-bg::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(20,16,10,0.4), var(--asphalt) 85%);
}
.splash.brand-bg .splash-logo, .splash.brand-bg .splash-barwrap{ position:relative; z-index:1; }
@media (max-width: 880px){
  .splash.brand-bg{ background-image:url('brand/vertical-view.png'); }
}
.splash-logo{ display:flex; flex-direction:column; align-items:center; gap:2px; }
.splash-mark{
  width:64px; height:64px; border-radius:18px; background:var(--paint);
  display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:26px; color:var(--paint-ink);
  box-shadow:0 16px 34px -12px var(--glow);
  margin-bottom:16px;
}
.splash-word{ font-weight:800; font-size:22px; letter-spacing:0.01em; color:var(--chalk); }
.splash-logo-img{ width:min(140px, 40vw); height:auto; display:block; }
.splash-tag{ font-size:10.5px; letter-spacing:0.16em; text-transform:uppercase; color:var(--chalk-dim); margin-top:6px; }
.splash-barwrap{
  /* In normal flex flow (not absolutely pinned to the viewport bottom) so
     it always sits directly under the logo, regardless of viewport height -
     an absolute bottom offset could land level with the vertically-centered
     logo on a short/landscape screen, making the bar appear beside it
     instead of below it. */
  margin-top:36px;
  width:200px; height:4px; border-radius:4px; background:var(--line); overflow:hidden; flex:none;
}
.splash-bar{ height:100%; width:0%; background:var(--paint); border-radius:4px; }

@media (max-width: 420px){
  .header .title{ font-size:18px; }
  .presencecard .num{ font-size:34px; }
  .ring{ width:130px; height:130px; }
  .ring .big{ font-size:34px; }
}

/* ---------- AUTH PAGES ---------- */
.authwrap{
  flex:1; display:flex; align-items:center; justify-content:center; min-height:100vh; padding:24px;
  position:relative; overflow:hidden;
  background:var(--asphalt);
}
.authcard{
  width:100%; max-width:380px; background:var(--asphalt-2); border:1px solid var(--line); border-radius:20px; padding:32px 28px;
  position:relative; z-index:1;
  box-shadow:0 24px 60px -16px rgba(28,27,25,0.15), 10px 10px 24px var(--nu-dark), -10px -10px 24px var(--nu-light);
}
.authcard .brand{ padding:0 0 22px; justify-content:center; }
.authcard h1{ font-size:19px; text-align:center; margin-bottom:6px; }
.authcard .subtext{ font-size:12.5px; color:var(--chalk-dim); text-align:center; margin-bottom:22px; }
.field{ margin-bottom:14px; }
.field label{ display:block; font-size:11.5px; color:var(--chalk-dim); text-transform:uppercase; letter-spacing:0.06em; font-weight:700; margin-bottom:6px; }
.field input, .field select{
  width:100%; padding:12px 14px; background:var(--asphalt-3); border:1px solid var(--line);
  border-radius:10px; color:var(--chalk); font-size:14px; font-family:inherit;
}
.field input:focus, .field select:focus{ outline:none; border-color:var(--paint-dim); }
.autherr{ background:rgba(255,191,0,0.08); border:1px solid var(--paint-dim); color:var(--paint-2); font-size:12.5px; padding:10px 14px; border-radius:10px; margin-bottom:14px; }
.authcard .cta{ width:100%; margin-top:6px; }
.authlink{ text-align:center; font-size:12.5px; color:var(--chalk-dim); margin-top:18px; }
.authlink a{ color:var(--paint-2); font-weight:700; text-decoration:none; }

/* Quick login (login.php/register.php) */
.oauth-buttons{ display:flex; flex-direction:column; gap:10px; margin-bottom:18px; }
.oauth-btn{
  display:flex; align-items:center; justify-content:center; gap:10px;
  background:var(--asphalt-2); color:var(--chalk); border:1px solid var(--line);
  box-shadow:4px 4px 12px var(--nu-dark), -4px -4px 12px var(--nu-light);
  font-size:13px; font-weight:700; padding:12px 20px;
}
.oauth-btn:active{ transform:scale(0.98); }
.oauth-ic{ width:18px; height:18px; flex:none; }
.oauth-divider{
  display:flex; align-items:center; gap:10px; margin-bottom:18px;
  font-size:11.5px; color:var(--chalk-dim); text-transform:uppercase; letter-spacing:0.06em;
}
.oauth-divider::before, .oauth-divider::after{ content:""; flex:1; height:1px; background:var(--line); }
.modalbg{ position:fixed; inset:0; background:rgba(20,16,10,0.45); z-index:200; display:flex; align-items:center; justify-content:center; padding:20px; overflow-y:auto; }
.modalcard{
  width:100%; max-width:420px; background:var(--asphalt-2); border:1px solid var(--line); border-radius:20px; padding:26px;
  max-height:calc(100vh - 40px); max-height:calc(100dvh - 40px); overflow-y:auto; position:relative;
  box-shadow:0 20px 60px -12px rgba(28,27,25,0.18), 10px 10px 24px var(--nu-dark), -10px -10px 24px var(--nu-light);
}
.modalcard h3{ font-size:16px; margin-bottom:16px; padding-right:26px; }
.modal-actions{ display:flex; gap:10px; margin-top:8px; }
.modal-close{
  position:absolute; top:14px; right:14px; width:30px; height:30px; border-radius:50%;
  background:var(--asphalt-3); border:1px solid var(--line); color:var(--chalk);
  display:flex; align-items:center; justify-content:center; font-size:14px; cursor:pointer;
}

@media (max-width: 640px){
  .modalbg{ align-items:flex-end; padding:0; }
  .modalcard{ max-width:100%; width:100%; border-radius:20px 20px 0 0; max-height:90vh; max-height:90dvh; padding:22px 20px 26px; }
}

/* ---------- LANDING PAGE (landing.php) ----------
   Public marketing page, no phone-frame - a normal scrolling page using
   the same amber/cream tokens as the app. All classes prefixed lp- so
   nothing here can collide with app.js-targeted selectors. The base
   `body{display:flex}` above assumes a single wrapping child (.phone,
   .authwrap) - landing.php has many top-level sections as direct body
   children, so without this override they'd lay out as flex-row siblings
   side by side instead of stacking. */
body.lp-body{ display:block; }
.lp-nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 5vw; position:sticky; top:0; z-index:50;
  background:var(--shell-blur); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.lp-nav-actions{ display:flex; align-items:center; gap:10px; }
.lp-nav-actions .cta{ padding:10px 20px; font-size:12.5px; }
.lp-nav-actions .cta.ghost{ padding:10px 18px; }

.lp-hero{
  position:relative; padding:72px 5vw 56px; overflow:hidden;
  background-image:url('brand/wide-view.png'); background-size:cover; background-position:center;
  display:flex; flex-direction:column; align-items:center; text-align:center;
}
.lp-hero::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(15,13,11,0.6), var(--asphalt) 96%);
}
.lp-hero > *{ position:relative; z-index:1; }
.lp-kicker{
  display:inline-flex; align-items:center; gap:6px; padding:7px 14px; border-radius:999px;
  background:rgba(255,191,0,0.16); color:var(--paint-2); font-size:11.5px; font-weight:800;
  letter-spacing:0.06em; text-transform:uppercase; margin-bottom:20px;
}
.lp-hero h1{ font-size:clamp(30px, 5.4vw, 54px); line-height:1.08; max-width:780px; color:#fff; margin-bottom:16px; }
.lp-hero h1 span{ color:var(--paint); }
.lp-hero p.lp-sub{ font-size:15.5px; color:rgba(255,255,255,0.82); max-width:560px; margin-bottom:30px; line-height:1.6; }
.lp-hero-ctas{ display:flex; gap:12px; flex-wrap:wrap; justify-content:center; margin-bottom:36px; }
.lp-hero-ctas .cta{ padding:16px 30px; font-size:14.5px; }
.lp-statrow{ display:flex; gap:30px; flex-wrap:wrap; justify-content:center; }
.lp-stat{ text-align:center; }
.lp-stat .n{ font-size:27px; font-weight:800; color:#fff; }
.lp-stat .l{ font-size:10.5px; letter-spacing:0.1em; text-transform:uppercase; color:rgba(255,255,255,0.65); margin-top:2px; }

.lp-section{ padding:72px 5vw; max-width:1100px; margin:0 auto; }
.lp-section-head{ text-align:center; max-width:600px; margin:0 auto 40px; }
.lp-eyebrow{ font-size:11px; letter-spacing:0.14em; text-transform:uppercase; color:var(--paint-2); font-weight:800; margin-bottom:8px; }
.lp-section-head h2{ font-size:clamp(24px,3.4vw,34px); margin-bottom:10px; color:#2A2825; }
.lp-section-head p{ font-size:13.5px; color:var(--chalk-dim); line-height:1.6; }

.lp-steps{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.lp-step{ background:var(--asphalt-2); border:1px solid var(--line); border-radius:20px; padding:26px 22px; box-shadow:7px 7px 16px var(--nu-dark), -7px -7px 16px var(--nu-light); }
.lp-step .num{ width:34px; height:34px; border-radius:10px; background:var(--paint); color:var(--paint-ink); font-weight:800; display:flex; align-items:center; justify-content:center; margin-bottom:16px; font-size:14px; }
.lp-step h3{ font-size:16px; margin-bottom:8px; }
.lp-step p{ font-size:12.5px; color:var(--chalk-dim); line-height:1.6; margin:0; }

.lp-features{ display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:18px; }
.lp-feature{ background:var(--asphalt-2); border:1px solid var(--line); border-radius:18px; padding:22px; box-shadow:6px 6px 14px var(--nu-dark), -6px -6px 14px var(--nu-light); }
.lp-feature .ic{ font-size:24px; margin-bottom:12px; display:block; }
.lp-feature h3{ font-size:14.5px; margin-bottom:6px; }
.lp-feature p{ font-size:12px; color:var(--chalk-dim); line-height:1.6; margin:0; }

.lp-events{ display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:16px; }
.lp-eventcard{ background:var(--asphalt-2); border:1px solid var(--line); border-radius:18px; padding:20px; box-shadow:7px 7px 16px var(--nu-dark), -7px -7px 16px var(--nu-light); display:flex; flex-direction:column; }
.lp-eventcard .lp-when{ font-size:11px; font-weight:800; color:var(--paint-2); text-transform:uppercase; letter-spacing:0.06em; margin-bottom:8px; }
.lp-eventcard h3{ font-size:16px; margin-bottom:4px; }
.lp-eventcard .lp-venue{ font-size:12px; color:var(--chalk-dim); margin-bottom:14px; }
.lp-eventcard .fillbar{ margin-bottom:8px; }
.lp-eventcard .lp-spots{ font-size:11px; color:var(--chalk-dim); margin-bottom:14px; }
.lp-eventcard .lp-row2{ display:flex; align-items:center; justify-content:space-between; margin-top:auto; gap:10px; }
.lp-eventcard .lp-row2 .cta{ padding:10px 18px; font-size:12px; flex:none; }
.lp-empty{ text-align:center; padding:50px 20px; color:var(--chalk-dim); font-size:13.5px; background:var(--asphalt-2); border-radius:18px; border:1px solid var(--line); }

.lp-faq{ max-width:760px; margin:0 auto; }
.lp-faq-item{ background:var(--asphalt-2); border:1px solid var(--line); border-radius:14px; margin-bottom:10px; overflow:hidden; }
.lp-faq-item summary{ padding:16px 20px; cursor:pointer; font-weight:700; font-size:13.5px; list-style:none; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.lp-faq-item summary::-webkit-details-marker{ display:none; }
.lp-faq-item summary::after{ content:"+"; font-size:20px; color:var(--paint-2); font-weight:400; flex:none; }
.lp-faq-item[open] summary::after{ content:"\2013"; }
.lp-faq-item .lp-faq-a{ padding:0 20px 18px; font-size:13px; color:var(--chalk-dim); line-height:1.7; }

.lp-ctaband{
  margin:0 5vw 72px; padding:56px 6vw; border-radius:28px; text-align:center;
  background:var(--paint); color:var(--paint-ink);
}
.lp-ctaband h2{ font-size:clamp(24px,3.6vw,36px); margin-bottom:12px; }
.lp-ctaband p{ font-size:13.5px; opacity:0.82; max-width:460px; margin:0 auto 26px; line-height:1.6; }
.lp-ctaband .cta{ background:var(--paint-ink); color:#fff; padding:16px 32px; font-size:14.5px; box-shadow:0 14px 28px -10px rgba(0,0,0,0.35); }

.lp-footer{ padding:34px 5vw 46px; border-top:1px solid var(--line); display:flex; flex-direction:column; align-items:center; gap:12px; text-align:center; }
.lp-foot-links{ display:flex; gap:18px; font-size:12px; }
.lp-foot-links a{ color:var(--chalk-dim); text-decoration:none; font-weight:600; }
.lp-foot-links a:hover{ color:var(--paint-2); }
.lp-copy{ font-size:11px; color:var(--chalk-dim); }

@media (max-width: 880px){
  .lp-hero{ background-image:url('brand/vertical-view.png'); padding:52px 20px 40px; }
  .lp-nav{ padding:14px 20px; }
  .lp-statrow{ gap:22px; }
  .lp-section{ padding:50px 20px; }
  .lp-steps{ grid-template-columns:1fr; }
  .lp-ctaband{ margin:0 16px 50px; padding:40px 24px; }
}
.modal-actions .cta{ flex:1; }
