:root{
  /* Dark cinematic cartography: near-black/charcoal surfaces, never pure black,
     designed to sit cleanly over rich satellite imagery. */
  --ink:#eef0ec; --muted:#9aa39a; --bg:#0b0d0c;
  --surface:#15181a; --surface-raised:#1f2325; --surface-raised-2:#262b2d;
  --line:#2b302e;
  --green:#3fae6f; --green-dark:#2c8556; --green-tint:rgba(63,174,111,.18);
  --river:#5fb3e8; --river-tint:rgba(95,179,232,.18);
  --amber:#e0a458; --amber-tint:rgba(224,164,88,.16);
  --radius-lg:16px; --radius-md:12px; --radius-sm:10px;
  --safe-b:env(safe-area-inset-bottom, 0px);
  --safe-t:env(safe-area-inset-top, 0px);
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0;height:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink);overscroll-behavior:none;-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit}
h1,h2,h3,p{margin:0}

/* ---------- TOPBAR: persistent shell header, not floating over the map anymore ---------- */
.topbar{
  height:calc(56px + var(--safe-t));padding-top:var(--safe-t);
  display:flex;align-items:center;gap:14px;padding-left:18px;padding-right:16px;
  background:var(--surface);border-bottom:1px solid var(--line);position:relative;z-index:40;
}
.brand{font-weight:800;font-size:17px;letter-spacing:-.3px;flex-shrink:0;color:var(--ink);border:0;background:none;padding:0;cursor:pointer;font-family:inherit}
.brand span{color:var(--green)}
.search-bar{
  flex:1;max-width:420px;display:flex;align-items:center;gap:8px;
  background:var(--surface-raised);border:1px solid var(--line);border-radius:999px;
  padding:9px 14px;color:var(--muted);
}
.search-bar input{flex:1;background:none;border:0;outline:0;color:var(--ink);font-size:13.5px}
.search-bar input::placeholder{color:var(--muted)}
.topbar-icon-btn{
  flex-shrink:0;width:36px;height:36px;border-radius:50%;border:0;background:none;color:var(--muted);
  display:grid;place-items:center;margin-left:auto;text-decoration:none;
}
.topbar-icon-btn.has-favorites{color:var(--ink)}
.topbar-icon-btn.has-favorites svg{fill:#ff5470;stroke:#ff5470}
.topbar-icon-btn:first-of-type{margin-left:auto}

/* Mobile-only back affordance -- shown in place of the search bar on
   Campground/Campsite Detail at mobile widths (see "MOBILE HEADER" below).
   A dedicated class (not .topbar-icon-btn) so it's exempt from that class's
   margin-left:auto first-of-type rule. */
.topbar-back-btn{
  display:none;flex-shrink:0;width:36px;height:36px;border-radius:50%;border:0;background:none;
  color:var(--ink);align-items:center;justify-content:center;padding:0;margin-right:2px;
}
body.mobile-sheet .topbar-back-btn{display:flex}
/* Explore is the root of the mobile shell -- no parent view for the topbar
   back button to return to, so it's suppressed there specifically (see
   updateMobileSheetMode in app.js, which toggles "view-explore"). */
body.mobile-sheet.view-explore .topbar-back-btn{display:none}
body.mobile-sheet .search-bar{display:none}

/* ---------- WORKSPACE: persistent split shell -- content column + map, always both mounted ---------- */
.workspace{position:relative;height:calc(100dvh - 56px - var(--safe-t));overflow:hidden;display:flex}

.content-col{
  width:38%;min-width:340px;max-width:65vw;height:100%;overflow-y:auto;-webkit-overflow-scrolling:touch;
  background:var(--surface);border-right:1px solid var(--line);
  padding:20px 24px calc(28px + var(--safe-b));flex-shrink:0;
}
.map-pane{position:relative;flex:1;min-width:0;height:100%}
.real-map{position:relative;width:100%;height:100%;background:var(--bg)}

/* ---------- Resize handle: draggable divider between the detail panel and
   the persistent map, desktop only. Actual width math (clamping, session
   persistence) lives in app.js's initDetailResize/applyDetailWidth -- this
   is just the hit target + affordance. A thin hairline by default, brighter
   and slightly wider on hover/drag/focus so it reads as grabbable without
   competing with the map/panel visually at rest. ---------- */
.resize-handle{position:relative;width:9px;flex-shrink:0;height:100%;cursor:col-resize;background:none;z-index:10}
.resize-handle::after{content:'';position:absolute;top:0;bottom:0;left:50%;width:1px;background:var(--line);transform:translateX(-50%);transition:background .15s ease,width .15s ease}
.resize-handle:hover::after,.resize-handle.dragging::after{background:var(--green);width:2px}
.resize-handle:focus-visible{outline:none}
.resize-handle:focus-visible::after{background:var(--green);width:2px;box-shadow:0 0 0 3px var(--green-tint)}
body.resizing-detail{cursor:col-resize;user-select:none}
body.resizing-detail .content-col,body.resizing-detail .map-pane{pointer-events:none}

/* Map/Satellite toggle -- only ever rendered when the active map provider
   actually has a real satellite layer to switch to (Google hybrid/roadmap);
   see renderMapTypeToggle() in app.js. Lives inside #realMap itself so it
   travels with the map when reparented into the Campsite Detail local map
   card. */
.map-type-toggle{
  position:absolute;top:14px;left:14px;z-index:5;display:flex;gap:2px;
  background:rgba(11,13,12,.7);backdrop-filter:blur(8px);border-radius:999px;padding:3px;
}
.map-type-btn{
  border:0;background:none;color:rgba(255,255,255,.75);font-size:12.5px;font-weight:600;
  padding:7px 14px;border-radius:999px;cursor:pointer;
}
.map-type-btn.active{background:#fff;color:#0b0d0c}

.screen{display:flex;flex-direction:column;gap:16px}

/* ---------- Shared typography / nav ---------- */
.screen-title{font-size:26px;font-weight:800;letter-spacing:-.6px}
.screen-sub{font-size:13.5px;color:var(--muted);margin-top:-10px}
.back-link{
  display:flex;align-items:center;gap:6px;align-self:flex-start;border:0;background:none;color:var(--muted);
  font-size:13px;font-weight:600;padding:0;
}
.back-link:hover{color:var(--ink)}
.dev-note{font-size:12px;color:var(--muted);border-top:1px solid var(--line);padding-top:14px;line-height:1.5}

/* ---------- Explore filter bar ---------- */
.explore-filter-bar{display:flex;align-items:center;gap:8px;margin:2px 0 4px}
.filter-chip-row{
  display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;
  padding:2px 0;flex:1;min-width:0;
}
.filter-chip-row::-webkit-scrollbar{display:none}
.filter-chip{
  flex-shrink:0;display:flex;align-items:center;gap:5px;padding:8px 14px;border-radius:999px;
  border:1px solid var(--line);background:var(--surface-raised);color:var(--ink);font-size:13px;font-weight:600;
  cursor:pointer;white-space:nowrap;transition:background-color .15s ease,border-color .15s ease;
}
.filter-chip:hover{border-color:#3a413e}
.filter-chip:disabled{opacity:.4;cursor:not-allowed}
.filter-chip.active{background:var(--green-tint);border-color:var(--green);color:var(--ink)}
.filter-chip-more{border-style:dashed}
.filter-clear-btn{
  flex-shrink:0;border:0;background:none;color:var(--muted);font-size:12.5px;font-weight:600;
  cursor:pointer;padding:8px 2px;text-decoration:underline;text-underline-offset:2px;
}
.filter-clear-btn:hover{color:var(--ink)}

/* Shared popover: fixed-position, anchored under its triggering chip via
   inline top/left set from app.js on desktop; the mobile media query below
   overrides those inline styles into a bottom sheet. */
.filter-popover-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:60}
.filter-popover{
  position:fixed;z-index:61;width:280px;max-width:calc(100vw - 32px);
  background:var(--surface-raised);border:1px solid var(--line);border-radius:var(--radius-md);
  box-shadow:0 16px 40px rgba(0,0,0,.5);padding:16px;
}
.filter-popover-inner{display:flex;flex-direction:column;gap:14px}
.filter-field-label{font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
.filter-date-row{display:flex;gap:10px}
.filter-date-field{flex:1;display:flex;flex-direction:column;gap:4px}
.filter-date-field label{font-size:11.5px;color:var(--muted)}
.filter-date-field input{
  background:var(--surface-raised-2);border:1px solid var(--line);border-radius:var(--radius-sm);
  color:var(--ink);font-size:13px;padding:8px 10px;font:inherit;color-scheme:dark;
}
.filter-option-row{display:flex;gap:8px;flex-wrap:wrap}
.filter-option-btn{
  flex:1;padding:9px 10px;border-radius:var(--radius-sm);border:1px solid var(--line);
  background:var(--surface-raised-2);color:var(--ink);font-size:13px;font-weight:600;cursor:pointer;
  text-align:center;min-width:80px;
}
.filter-option-btn.active{background:var(--green-tint);border-color:var(--green)}
.filter-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.filter-toggle-row span{font-size:13.5px;color:var(--ink);font-weight:600}
.filter-switch{
  position:relative;width:40px;height:24px;flex-shrink:0;border-radius:999px;border:0;
  background:var(--surface-raised-2);cursor:pointer;transition:background-color .15s ease;
}
.filter-switch::after{
  content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;
  background:var(--muted);transition:transform .15s ease,background-color .15s ease;
}
.filter-switch.on{background:var(--green-tint)}
.filter-switch.on::after{transform:translateX(16px);background:var(--green)}
.filter-popover-apply{
  margin-top:2px;padding:10px;border-radius:var(--radius-sm);border:0;background:var(--green);
  color:#0b0d0c;font-size:13.5px;font-weight:700;cursor:pointer;
}
.filter-popover-apply:hover{background:var(--green-dark)}

/* ---------- Account popover (signed-out / signed-in states) ---------- */
.account-popover{width:260px}
.account-row{display:flex;align-items:center;gap:10px}
.account-avatar{
  flex-shrink:0;width:36px;height:36px;border-radius:50%;background:var(--green-tint);color:var(--green);
  display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:800;
}
.account-email{font-size:13.5px;color:var(--ink);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-signout-btn{
  margin-top:4px;padding:9px 10px;border-radius:var(--radius-sm);border:1px solid var(--line);
  background:var(--surface-raised-2);color:var(--ink);font-size:13px;font-weight:600;cursor:pointer;
}
.account-signout-btn:hover{border-color:#3a413e}
.account-signedout-cta{font-size:13px;color:var(--muted);line-height:1.5;margin:0 0 4px}
.account-signin-btn{
  padding:9px 10px;border-radius:var(--radius-sm);border:1px solid var(--line);
  background:var(--surface-raised-2);color:var(--ink);font-size:13px;font-weight:700;cursor:pointer;
}
.account-signin-btn:hover{border-color:#3a413e}

/* ---------- Shared auth sheet: centered modal (not chip-anchored) ---------- */
.auth-sheet{
  position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:61;width:340px;max-width:calc(100vw - 32px);
  background:var(--surface-raised);border:1px solid var(--line);border-radius:var(--radius-lg);
  box-shadow:0 24px 60px rgba(0,0,0,.55);padding:24px;
}
.auth-sheet-inner{display:flex;flex-direction:column;gap:14px}
.auth-sheet-inner h3{margin:0;font-size:18px;font-weight:800;color:var(--ink)}
.auth-sheet-sub{margin:0;font-size:13px;color:var(--muted);line-height:1.5}
.auth-provider-btn{
  display:flex;align-items:center;justify-content:center;gap:10px;padding:11px 14px;border-radius:var(--radius-sm);
  border:1px solid var(--line);background:var(--surface-raised-2);color:var(--ink);font-size:13.5px;font-weight:700;
  cursor:pointer;width:100%;
}
.auth-provider-btn:hover{border-color:#3a413e}
.auth-provider-btn svg{flex-shrink:0}
.auth-divider{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:11.5px;text-transform:uppercase;letter-spacing:.05em}
.auth-divider::before,.auth-divider::after{content:'';flex:1;height:1px;background:var(--line)}
.auth-email-row{display:flex;flex-direction:column;gap:8px}
.auth-email-row input{
  background:var(--surface-raised-2);border:1px solid var(--line);border-radius:var(--radius-sm);
  color:var(--ink);font-size:13.5px;padding:10px 12px;font:inherit;color-scheme:dark;
}
.auth-sheet-note{margin:0;font-size:12.5px;color:var(--muted);line-height:1.4}
.auth-sheet-note.error{color:#ff8080}
.auth-sheet-close{
  position:absolute;top:14px;right:14px;width:28px;height:28px;border:0;border-radius:50%;background:none;
  color:var(--muted);display:flex;align-items:center;justify-content:center;cursor:pointer;
}
.auth-sheet-close:hover{color:var(--ink)}

/* ---------- Favorites "sync opportunity" banner ---------- */
.sync-banner{
  display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;
  border-radius:var(--radius-md);background:var(--surface-raised);border:1px solid var(--line);margin:2px 0 4px;
}
.sync-banner-title{margin:0;font-size:14px;font-weight:700;color:var(--ink)}
.sync-banner-sub{margin:2px 0 0;font-size:12.5px;color:var(--muted)}
.sync-banner .btn-secondary{flex-shrink:0}

@media(max-width:859px){
  .auth-sheet{width:calc(100vw - 32px)}
  .filter-popover{
    left:0!important;right:0;bottom:0;top:auto!important;width:100%;max-width:none;
    border-radius:20px 20px 0 0;padding:18px 20px calc(20px + var(--safe-b));
  }
  /* Same rationale as "body.mobile-sheet .search-bar{display:none}" --
     Favorites just reaches it independently since it never carries the
     mobile-sheet class (see updateMobileSheetMode). Without this the full
     desktop search bar plus both topbar icons overflow a phone-width
     topbar. */
  body.view-favorites .search-bar{display:none}
}

/* ================= STATE 1: EXPLORE ================= */
/* Two result sections (visible-on-map / nearby) sharing the same card
   component and list layout -- see renderExploreResultSections in app.js. */
.explore-section-head{display:flex;flex-direction:column;gap:2px;margin:2px 0 4px}
.explore-section-head h2{font-size:15px;font-weight:700;color:var(--ink);margin:0}
.explore-section-count,.explore-section-sub{font-size:12.5px;color:var(--muted);margin:0}
.explore-section-divider{height:1px;background:var(--line);margin:22px 0 2px}
.explore-empty-note{font-size:13px;color:var(--muted);padding:2px 0 4px;line-height:1.5;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.explore-empty-note p{margin:0}
.explore-empty-note .filter-clear-btn{padding:2px}
.campground-list{display:flex;flex-direction:column;gap:20px}
.campground-list:empty{display:none}
.cg-card{
  position:relative;display:block;width:100%;text-align:left;cursor:pointer;border-radius:var(--radius-lg);
}
.cg-card:focus-visible{outline:2px solid var(--green);outline-offset:3px}
.cg-card-photo{
  position:relative;width:100%;aspect-ratio:4/3;border-radius:var(--radius-lg);background-size:cover;
  background-position:center 46%;background-color:var(--surface-raised);overflow:hidden;
}
/* Honest empty state for a campground with no recoverable stills yet (real
   gap, e.g. littlefawn has panoramas but no photos/ folder) -- never
   borrowed from a site panorama, matches .cg-hero.no-photo's convention. */
.cg-card-photo.no-photo{display:flex;align-items:center;justify-content:center}
.cg-card-photo.no-photo::before{content:'No photos yet';font-size:12.5px;font-weight:600;color:var(--muted)}
/* Gentle scrim so the top-row badges/heart stay legible over any photo,
   without dimming the photo itself (photography is the hero -- see
   CLAUDE.md "Core Product Principles"). */
.cg-card-photo::after{
  content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:linear-gradient(to bottom, rgba(0,0,0,.38) 0%, rgba(0,0,0,0) 26%);
}
.cg-card-top-row{
  position:absolute;top:10px;left:10px;right:10px;z-index:1;
  display:flex;align-items:flex-start;justify-content:space-between;gap:8px;
}
.cg-360-badge{
  display:flex;align-items:center;gap:5px;padding:5px 10px 5px 8px;border-radius:999px;
  background:rgba(11,13,12,.62);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
  font-size:11.5px;font-weight:600;color:var(--ink);letter-spacing:.01em;line-height:1;
}
.cg-360-badge svg{flex-shrink:0;color:var(--green)}
.cg-fav-btn{
  flex-shrink:0;margin-left:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;
  border:0;border-radius:999px;background:rgba(11,13,12,.5);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
  color:#fff;cursor:pointer;transition:transform .15s ease,background-color .15s ease;
}
.cg-fav-btn:hover{background:rgba(11,13,12,.72)}
.cg-fav-btn:active{transform:scale(.92)}
.cg-fav-btn svg{filter:drop-shadow(0 1px 2px rgba(0,0,0,.5))}
.cg-fav-btn.favorited svg{color:#ff5470}
.cg-card-body{display:flex;flex-direction:column;gap:3px;min-width:0;padding:12px 2px 0}
.cg-card-name{font-size:16.5px;font-weight:700;color:var(--ink);letter-spacing:-.01em}
.cg-card-meta{font-size:13px;color:var(--muted)}

/* ---------- Reusable detail-header favorite button (Campground/Campsite
   Detail -- distinct from the compact corner heart on .cg-card) ---------- */
.detail-fav-btn{
  flex-shrink:0;display:flex;align-items:center;gap:6px;padding:8px 14px;border-radius:999px;
  border:1px solid var(--line);background:var(--surface-raised);color:var(--ink);font-size:13px;font-weight:600;
  cursor:pointer;transition:background-color .15s ease,border-color .15s ease;
}
.detail-fav-btn:hover{border-color:#3a413e}
.detail-fav-btn:active{transform:scale(.97)}
.detail-fav-btn.favorited{border-color:var(--line);color:#ff5470}
.detail-fav-btn.favorited svg{fill:#ff5470;stroke:#ff5470}

/* ================= STATE 4: FAVORITES =================
   Reuses .campground-list/.cg-card verbatim for saved campgrounds (see
   CLAUDE.md "shared UI requirement" -- no parallel card component). Saved
   campsites get their own compact horizontal card (.site-fav-card) since a
   campsite card needs different info (campground name, site label,
   attributes) than a campground card. */
.favorites-tabs{display:flex;gap:8px;margin:4px 0 4px}
.favorites-tab{
  padding:9px 16px;border-radius:999px;border:1px solid var(--line);background:var(--surface-raised);
  color:var(--muted);font-size:13.5px;font-weight:700;cursor:pointer;display:flex;align-items:center;gap:6px;
}
.favorites-tab.active{background:var(--green-tint);border-color:var(--green);color:var(--ink)}
.favorites-tab-count{font-size:12px;font-weight:600;color:inherit;opacity:.75}
.favorites-panel:empty{display:none}
.favorites-empty{
  display:flex;flex-direction:column;align-items:flex-start;gap:14px;padding:32px 0;
  color:var(--muted);font-size:13.5px;
}
.favorites-empty p{margin:0}

.site-fav-list{display:flex;flex-direction:column;gap:12px}
.site-fav-card{
  position:relative;display:flex;gap:14px;align-items:center;padding:10px;border-radius:var(--radius-md);
  background:var(--surface-raised);border:1px solid var(--line);cursor:pointer;
}
.site-fav-card:hover{border-color:#3a413e}
.site-fav-card:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.site-fav-thumb{
  flex-shrink:0;width:92px;height:70px;border-radius:var(--radius-sm);background-size:cover;
  background-position:center 46%;background-color:var(--surface-raised-2);
}
.site-fav-thumb.no-pano{display:flex;align-items:center;justify-content:center}
.site-fav-thumb.no-pano::after{content:'No 360° yet';font-size:10.5px;font-weight:600;color:var(--muted);text-align:center;padding:0 6px}
.site-fav-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.site-fav-campground{font-size:12.5px;color:var(--muted)}
.site-fav-label{font-size:15px;font-weight:700;color:var(--ink)}
.site-fav-attrs{display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}
.site-fav-attrs span{font-size:11.5px;color:var(--muted);background:var(--surface-raised-2);padding:2px 8px;border-radius:999px}
.site-fav-heart{
  flex-shrink:0;display:flex;align-items:center;justify-content:center;width:34px;height:34px;
  border:0;border-radius:50%;background:none;color:var(--muted);cursor:pointer;
}
.site-fav-heart.favorited{color:#ff5470}
.site-fav-heart.favorited svg{fill:#ff5470;stroke:#ff5470}

/* ================= STATE 2: CAMPGROUND ================= */
.cg-detail-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.cg-detail-location{font-size:13px;color:var(--muted);margin-top:-12px}
.cg-hero{
  position:relative;width:100%;aspect-ratio:16/10;border-radius:var(--radius-lg);background-size:cover;
  background-position:center 46%;background-color:#0a0a0a;transition:background-image .15s ease;
}
/* A campground with zero recoverable campground-level stills (real, e.g. no
   photos/ folder in Drive -- see CLAUDE.md "Media architecture"). No image
   is fabricated or borrowed from a campsite panorama; this is an honest
   empty state, not a broken image. */
.cg-hero.no-photo{display:flex;align-items:center;justify-content:center;background-color:var(--surface-raised)}
.cg-hero.no-photo::after{content:'No campground photos yet';font-size:13px;font-weight:600;color:var(--muted)}
.cg-hero-nav{
  position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:32px;height:32px;border-radius:50%;
  border:0;background:rgba(11,13,12,.5);color:#fff;display:grid;place-items:center;backdrop-filter:blur(6px);cursor:pointer;
}
.cg-hero-nav.prev{left:10px}
.cg-hero-nav.next{right:10px}
.cg-hero-dots{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);display:flex;gap:5px;z-index:2}
.cg-hero-dot{width:5px;height:5px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.4);cursor:pointer}
.cg-hero-dot.active{background:#fff;width:14px;border-radius:3px}
@media(max-width:859px){
  .cg-hero-nav{width:44px;height:44px}
  .cg-hero-dot{width:8px;height:8px}
  .cg-hero-dot.active{width:20px}
}
/* Campground Detail's key-facts row (cgFactChips) -- restored here after an
   accidental deletion during the Campsite Detail rebuild left it with no
   base styling. Untouched otherwise; Campground Detail is not part of this
   pass. */
.fact-chips{display:flex;flex-wrap:wrap;gap:16px 24px;margin:0 0 18px}
.chip{display:flex;flex-direction:column;align-items:center;gap:7px;background:none;padding:0;font-size:11px;font-weight:600;color:var(--ink);text-align:center;min-width:58px}
.chip svg{
  width:38px;height:38px;padding:9px;box-sizing:border-box;border-radius:50%;
  background:var(--surface-raised-2);color:var(--ink);
}
.chip.river{color:var(--river)}
.chip.river svg{color:var(--river)}

.site-grid-head{display:flex;align-items:center;justify-content:space-between}
.site-grid-head h2{font-size:15px;font-weight:700}
.site-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}
.site-thumb{
  position:relative;aspect-ratio:1;border-radius:var(--radius-sm);border:0;padding:0;cursor:pointer;
  background-size:cover;background-position:center 46%;background-color:#0a0a0a;overflow:hidden;
  transition:transform .16s ease,box-shadow .16s ease;
}
.site-thumb:hover,.site-thumb:focus-visible{transform:scale(1.045);box-shadow:0 6px 18px rgba(0,0,0,.5),0 0 0 2px var(--green)}
.site-thumb span{
  position:absolute;bottom:5px;left:50%;transform:translateX(-50%);font-size:10.5px;font-weight:800;
  color:#fff;background:rgba(0,0,0,.65);border-radius:999px;padding:1px 6px;
}
/* A site with no Tourz panorama yet (real, expected for partial-coverage
   batch campgrounds -- see CLAUDE.md "Multi-Campground Architecture").
   No thumbnail image is ever requested for it; this is a plain muted tile,
   not a broken image. */
.site-thumb.no-pano{background-color:var(--surface-raised-2)}
.site-thumb.no-pano span{opacity:.7}
.about-section{border-top:1px solid var(--line);padding-top:16px;display:flex;flex-direction:column;gap:8px}
.about-section h3{font-size:13.5px;font-weight:700}
.about-section p{font-size:13px;color:var(--muted);line-height:1.55}
.cg-about-body h4{font-size:12px;font-weight:700;color:var(--ink);margin:10px 0 2px}
.cg-about-body h4:first-child{margin-top:0}
.cg-about-body p{font-size:13px;color:var(--muted);line-height:1.55;margin:0 0 4px;white-space:pre-line}

/* ---------- "Why camp here?": an editorial pull-quote feel, not body copy
   under a heading -- a quiet accent rule, slightly larger type, generous
   leading. ---------- */
#cgWhySection{border-top:0;padding-top:0}
#cgWhySection h3{font-size:15px;margin-bottom:2px}
#cgWhyText{
  font-size:14.5px;line-height:1.7;color:var(--ink);opacity:.88;
  border-left:2px solid var(--green);padding-left:14px;margin:2px 0 0;
}

/* ---------- Inline icon+label facts (Amenities & Activities): flat, wrapping,
   no cards -- icon gets a quiet circular backdrop for recognizability. ---------- */
.inline-fact-list{display:flex;flex-wrap:wrap;gap:12px 20px}
.inline-fact{display:flex;align-items:center;gap:9px;font-size:13px;color:var(--ink);font-weight:500}
.inline-fact svg{
  width:30px;height:30px;padding:7px;box-sizing:border-box;border-radius:50%;
  background:var(--surface-raised-2);color:var(--ink);flex-shrink:0;
}

/* ---------- Icon-top detail rows (Good to know, Site details): whitespace
   groups related attributes instead of borders/dividers; the value carries
   more visual weight than the field label. ---------- */
.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px 20px}
.detail-item{display:flex;align-items:center;gap:12px}
.detail-item svg{
  width:34px;height:34px;padding:8px;box-sizing:border-box;border-radius:50%;
  background:var(--surface-raised-2);color:var(--ink);flex-shrink:0;
}
.detail-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.detail-label{font-size:10.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}
.detail-value{font-size:14px;font-weight:700;color:var(--ink)}
.detail-group + .detail-group{margin-top:22px}
.detail-group-title{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);margin:0 0 14px}

/* Campsite Detail's Site Details / Driveway cards use a stronger scale than
   Campground Detail's Good to Know grid above -- same base component,
   deliberately larger here per the reference (icons as the visual anchor,
   values easy to scan, labels de-emphasized). Campground Detail is
   untouched: .detail-grid/.detail-item alone, without .two-col, keep their
   original sizing. */
.detail-grid.two-col{gap:26px 24px}
.detail-grid.two-col .detail-item{gap:14px}
.detail-grid.two-col .detail-item svg{width:40px;height:40px;padding:9px}
.detail-grid.two-col .detail-text{gap:3px}
.detail-grid.two-col .detail-label{font-size:10.5px;color:var(--muted);opacity:.85}
.detail-grid.two-col .detail-value{font-size:15.5px}

/* ---------- Collapsed "About" details ---------- */
.cg-about-details summary{cursor:pointer;font-size:13.5px;font-weight:700;color:var(--ink);list-style:none;display:flex;align-items:center;justify-content:space-between}
.cg-about-details summary::-webkit-details-marker{display:none}
.cg-about-details summary::after{content:'+';color:var(--muted);font-weight:400;font-size:16px}
.cg-about-details[open] summary::after{content:'\2212'}
.cg-about-details .cg-about-body{margin-top:12px}

.cg-links-section{padding-top:14px}
.cg-link-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.cg-link-list a{color:var(--muted);text-decoration:none;font-size:12.5px;font-weight:600}
.cg-link-list a:first-child{color:var(--green)}
.cg-link-list a:hover{text-decoration:underline}

/* ================= Pins ================= */
.cg-map-marker{
  border:1.5px solid rgba(255,255,255,.3);background:#1b1e1c;color:#fff;width:38px;height:38px;border-radius:50%;
  display:grid;place-items:center;cursor:pointer;padding:0;box-shadow:0 2px 10px rgba(0,0,0,.5);font-weight:700;font-size:12px;
  transition:box-shadow .18s ease;
}
/* Explore card <-> region-pin two-way highlight -- same hover-link language
   as the campsite thumbnail/pin pair (.site-thumb.hovered/.geo-marker.hovered)
   below, just for the campground-level pair. Hover/focus only (no click
   handler here) -- both card and pin already navigate straight to Campground
   Detail on click/tap, exactly as they did before this pass; see
   setExploreCardHover/setExploreMarkerHover in app.js. */
.cg-map-marker.hovered{box-shadow:0 0 0 2.5px var(--green),0 4px 14px rgba(0,0,0,.5);z-index:3}
.cg-card.hovered .cg-card-photo{box-shadow:0 0 0 2px var(--green)}

/* Zoom-dependent labeling (see updateExploreMarkerLabels in app.js): the
   name span exists in the DOM at every zoom but stays hidden until
   ".expanded" is added, at which point the round count-only badge above
   reshapes into a name+count pill. Two related tiers, not two designs --
   "tier-close" just gives the name more visual weight, matching "CLOSE ZOOM:
   show the campground name clearly, retain campsite count as secondary". */
.cg-map-marker .cg-marker-name{display:none}
.cg-map-marker.expanded{
  display:flex;align-items:center;width:auto;height:auto;min-width:38px;border-radius:999px;
  padding:7px 14px 7px 12px;gap:6px;font-size:12px;
}
.cg-map-marker.expanded .cg-marker-name{display:inline;font-weight:700;white-space:nowrap}
.cg-map-marker.expanded .cg-marker-count{font-size:10.5px;font-weight:600;opacity:.7}
.cg-map-marker.expanded .cg-marker-count::before{content:'·';margin-right:5px;opacity:.7}
.cg-map-marker.expanded.tier-close{padding:8px 16px 8px 13px}
.cg-map-marker.expanded.tier-close .cg-marker-name{font-size:13.5px}
.geo-marker{
  width:28px;height:28px;border-radius:50%;border:1.5px solid rgba(255,255,255,.3);
  background:#1b1e1c;color:#fff;
  font-weight:700;font-size:11px;display:grid;place-items:center;box-shadow:0 2px 8px rgba(0,0,0,.45);
  cursor:pointer;padding:0;transition:opacity .18s ease,background .18s ease,box-shadow .18s ease;
}
.geo-marker.dimmed{opacity:.45}
.geo-marker.selected{
  background:#f4f3ee;color:#12140f;border-color:transparent;
  box-shadow:0 0 0 2.5px var(--green),0 4px 14px rgba(0,0,0,.5);z-index:2;
}
/* Campground Detail: thumbnail <-> map-pin hover linking (see
   setMarkerHover/setThumbHover in app.js) -- same visual language as the
   thumbnail's own :hover ring, just triggerable from either side. */
.geo-marker.hovered{box-shadow:0 0 0 2.5px var(--green),0 4px 12px rgba(0,0,0,.5);z-index:3}
.site-thumb.hovered{transform:scale(1.045);box-shadow:0 6px 18px rgba(0,0,0,.5),0 0 0 2px var(--green)}

/* ---------- DORMANT SCHEMATIC (fallback capability, not shown when real pins exist) ---------- */
.map-view{position:absolute;inset:12px;z-index:5;background:var(--surface);border-radius:var(--radius-lg);overflow:hidden;display:flex;flex-direction:column}
.map-stage{position:relative;flex:1;min-height:0;background:var(--surface);overflow:hidden}
.map-svg{position:absolute;inset:0;width:100%;height:100%}
.road-path{fill:none;stroke:#3a3f3c;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.river-path{fill:none;stroke:var(--river);stroke-opacity:.55;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.markers-layer{position:absolute;inset:0;width:100%;height:100%}
.marker{
  position:absolute;transform:translate(-50%,-50%);width:34px;height:34px;border-radius:50%;
  border:2.5px solid var(--surface);background:var(--green);color:#fff;font-weight:700;font-size:12.5px;
  display:grid;place-items:center;box-shadow:0 2px 8px rgba(0,0,0,.5);
  transition:transform .18s ease,opacity .18s ease,background .18s ease,box-shadow .18s ease;padding:0;
}
.marker.riverfront{background:var(--river)}
.marker.dimmed{opacity:.45;transform:translate(-50%,-50%) scale(.9)}
.marker.selected{background:#fff;color:var(--surface);transform:translate(-50%,-50%) scale(1.2);box-shadow:0 6px 16px rgba(0,0,0,.6);z-index:2}
.poi{
  position:absolute;transform:translate(-50%,-50%);width:26px;height:26px;border-radius:8px;
  background:var(--surface-raised);border:1px solid var(--line);display:grid;place-items:center;color:var(--muted);
  box-shadow:0 2px 6px rgba(0,0,0,.4);
}
.poi svg{width:14px;height:14px}
.map-caption{padding:8px 16px calc(8px + var(--safe-b));font-size:11.5px;color:var(--muted);background:var(--surface);border-top:1px solid var(--line);text-align:center;flex-shrink:0}

/* ================= STATE 3: CAMPSITE DETAIL =================
   Shares the SAME single-column detail-panel shell as Campground Detail
   (.cg-detail-head / .cg-detail-location / .screen-title, reused directly --
   not a parallel identity component) so the panel never visibly jumps when
   switching between campground and campsite content -- see CLAUDE.md
   "Detail shell unification". The real map lives in the persistent
   .map-pane the whole time; there is no second/local map here. */
.back-link{margin-bottom:6px}

.detail-card{background:var(--surface-raised);border:1px solid var(--line);border-radius:var(--radius-md);padding:26px 28px}
.detail-card.quiet{background:none;border:0;padding:12px 0 0}
.detail-card h3{font-size:17px;font-weight:700;margin:0 0 18px;display:flex;align-items:center;gap:9px;letter-spacing:-.1px}
.detail-card h3 svg{width:20px;height:20px;color:var(--green);flex-shrink:0}
.detail-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
.detail-card-head h3{margin:0}

.site-quickfacts{display:flex;flex-wrap:wrap;gap:14px 30px;padding:2px 0 4px}
.qfact{display:flex;align-items:center;gap:9px;font-size:14.5px;color:var(--ink);font-weight:600}
.qfact svg{width:22px;height:22px;color:var(--green);flex-shrink:0}

/* ---------- 360 hero -- the campsite's own Tourz panorama, replacing the
   campground still-photo hero (.cg-hero) at this same position in the flow.
   ---------- */
.site-pano-card{position:relative;width:100%;aspect-ratio:16/10;border-radius:var(--radius-lg);overflow:hidden;background:#000}
.site-panorama{position:absolute;inset:0;background:#000}
.site-panorama .pnlm-controls-container{top:auto;left:auto;right:10px;bottom:10px}
/* Restrained placeholder for a site with no Tourz 360 yet -- no broken
   image, no Pannellum init against a nonexistent file. Same panorama slot,
   same dark surface language as the rest of the panel. */
.site-panorama.pano-empty{background:var(--surface);display:flex;align-items:center;justify-content:center}
.pano-empty-inner{display:flex;flex-direction:column;align-items:center;gap:8px;color:var(--muted)}
.pano-empty-inner svg{color:var(--muted)}
.pano-empty-inner p{margin:0;font-size:13px;font-weight:600}

/* ---------- Previous / Next campsite -- a real thumbnail + site number for
   each direction, never a bare arrow. A side with no adjacent campsite
   (see adjacentCampsite() in app.js) is hidden entirely, so a lone visible
   button naturally fills the row via flex:1 rather than sitting disabled. */
.site-nav-row{display:flex;gap:10px}
.site-nav-btn{
  flex:1;min-width:0;display:flex;align-items:center;gap:12px;text-align:left;cursor:pointer;
  background:var(--surface-raised);border:1px solid var(--line);border-radius:var(--radius-md);padding:10px 14px;
  transition:border-color .15s ease;
}
.site-nav-btn:hover,.site-nav-btn:focus-visible{border-color:var(--green)}
.site-nav-btn.next{flex-direction:row-reverse;text-align:right}
.site-nav-thumb{
  flex-shrink:0;width:52px;height:52px;border-radius:var(--radius-sm);background-size:cover;
  background-position:center 46%;background-color:#0a0a0a;
}
.site-nav-thumb.no-pano{background-color:var(--surface-raised-2)}
.site-nav-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.site-nav-btn.next .site-nav-text{align-items:flex-end}
.site-nav-label{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.site-nav-name{font-size:14.5px;font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}

/* A clear subsection label before the nearby-site chips -- without it they
   read as more media belonging to the CURRENT site rather than as OTHER
   nearby campsites (see CLAUDE.md-style brief for this fix). Reuses
   .detail-card h3's heading scale for consistency with every other section
   label on this screen; no card background/border is added around it. */
.nearby-section{display:flex;flex-direction:column;gap:2px}
.nearby-heading{font-size:17px;font-weight:700;letter-spacing:-.1px;margin:0}
.nearby-sub{font-size:12.5px;color:var(--muted);margin:0 0 10px}
.nearby-row{display:flex;gap:10px;overflow-x:auto;-webkit-overflow-scrolling:touch;padding:2px 0 2px;scrollbar-width:none}
.nearby-row::-webkit-scrollbar{display:none}
.nearby-chip{
  flex-shrink:0;width:44px;height:44px;border-radius:50%;position:relative;
  background-size:cover;background-position:center 46%;border:2.5px solid transparent;padding:0;
}
.nearby-chip.current{border-color:var(--green)}
.nearby-chip span{
  position:absolute;bottom:-6px;left:50%;transform:translateX(-50%);font-size:9.5px;font-weight:800;
  color:#fff;background:rgba(0,0,0,.75);border-radius:999px;padding:1px 5px;white-space:nowrap;
}

/* ---------- Quick facts / primary chip row reused shape for Good to Know ---------- */
.good-to-know-list{display:flex;flex-direction:column;gap:20px}
.gtk-item{display:flex;gap:14px;align-items:flex-start}
.gtk-item svg{width:23px;height:23px;color:var(--green);flex-shrink:0;margin-top:1px}
.gtk-item-title{font-size:14.5px;font-weight:700;color:var(--ink)}
.gtk-item-value{font-size:13.5px;color:var(--muted);margin-top:3px;line-height:1.5}

/* ---------- Amenity tiles: the icon itself is the visual anchor -- large,
   green, no circular badge competing with it -- deliberately a stronger,
   more outdoors-oriented treatment than the campground's flat inline-fact
   row. ---------- */
.amenity-tile-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(84px,1fr));gap:20px}
.amenity-tile{display:flex;flex-direction:column;align-items:center;gap:11px;text-align:center}
.amenity-tile svg{width:34px;height:34px;color:var(--green)}
.amenity-tile span{font-size:12.5px;font-weight:600;color:var(--ink)}

/* "Site Highlights" reads editorial (accent rule + generous leading), not
   like raw API text dropped under a heading. */
#siteWhyText{font-size:14.5px;line-height:1.7;color:var(--ink);opacity:.9;border-left:2px solid var(--green);padding-left:16px;margin:0}

/* ---------- Booking handoff card: Tourz owns discovery/inspection,
   Recreation.gov owns the reservation transaction -- see CLAUDE.md
   "Booking handoff". Reuses .btn-primary (same pill CTA as the homepage
   hero) full-width inside the card rather than a new button style. ---------- */
.booking-copy{margin:0 0 16px;font-size:13.5px;color:var(--muted);line-height:1.55}
.booking-cta{width:100%}

/* ---------- Availability: a real two-month booking calendar, matching a
   Recreation.gov-style grid -- see CLAUDE.md "Availability presentation".
   Each day is a colored cell in a full Sun-Sat month grid (not a single
   date strip), paging only ever moves through months that overlap real
   ingested data. ---------- */
.avail-months-row{display:flex;align-items:flex-start;gap:10px}
.availability-nav-btn{
  width:32px;height:32px;border-radius:50%;border:0;background:none;color:var(--muted);
  display:grid;place-items:center;cursor:pointer;flex-shrink:0;margin-top:2px;
}
.availability-nav-btn svg{width:16px;height:16px}
.availability-nav-btn:not(:disabled):hover{color:var(--ink);background:var(--surface-raised-2)}
.availability-nav-btn:disabled{opacity:.25;cursor:default}

.avail-months{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:32px;min-width:0}
.avail-month-label{font-size:14.5px;font-weight:700;color:var(--ink);margin-bottom:14px}
.avail-month-weekdays{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:6px}
.avail-month-weekdays span{text-align:center;font-size:10px;font-weight:700;color:var(--muted);letter-spacing:.02em}
.avail-month-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}

/* Status reads through a filled cell -- a tinted background block per day,
   like a real booking calendar -- rather than a small dot/icon. */
.avail-mcell{
  aspect-ratio:1;display:flex;align-items:center;justify-content:center;border-radius:8px;
  font-size:13px;font-weight:700;color:var(--muted);
}
.avail-mcell.pad{visibility:hidden}
.avail-mcell-num{line-height:1}
.avail-mcell.empty{color:var(--muted);opacity:.4}
.avail-mcell.available{background:var(--green-tint);color:var(--green)}
.avail-mcell.walkup{background:var(--amber-tint);color:var(--amber)}
.avail-mcell.booked{background:var(--surface-raised-2);color:var(--muted)}
.avail-mcell.notyet{color:var(--muted);opacity:.5}
.avail-mcell.today{box-shadow:inset 0 0 0 2px var(--green)}

.availability-legend{display:flex;flex-wrap:wrap;gap:14px 24px;margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}
.legend-item{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--muted)}
.legend-item .avail-swatch{width:14px;height:14px;border-radius:4px;background:none}
.legend-item .avail-swatch.available{background:var(--green-tint);box-shadow:inset 0 0 0 1.5px var(--green)}
.legend-item .avail-swatch.walkup{background:var(--amber-tint);box-shadow:inset 0 0 0 1.5px var(--amber)}
.legend-item .avail-swatch.booked{background:var(--surface-raised-2)}
.legend-item .avail-swatch.notyet{box-shadow:inset 0 0 0 1.5px var(--line)}

/* ---------- Right column: Site Details / Allowable Equipment / Driveway --
   three separate always-open cards (no accordion), each a two-column
   icon-anchored attribute grid or tile row. ---------- */
.equipment-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.equipment-tile{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;background:var(--surface-raised-2);border-radius:var(--radius-sm);padding:18px 10px}
.equipment-tile svg{width:38px;height:38px;color:var(--green)}
.equipment-tile .eq-name{font-size:13.5px;font-weight:700;color:var(--ink)}
.equipment-tile .eq-value{font-size:11.5px;color:var(--muted)}

@media (prefers-reduced-motion: reduce){
  .marker,.geo-marker,.content-col,.site-pano-card{transition:none!important;animation:none!important}
}

/* ---------- MOBILE pre-hydration fallback: a plain stacked list-over-map,
   overridden by the "#workspace.mobile-sheet ..." rules below (higher
   specificity, an ID selector) the instant app.js's updateMobileSheetMode()
   adds that class -- which now happens for Explore too, not just Campground/
   Campsite Detail. In practice this only ever paints for the brief window
   before first render (or if JS fails to load at all). ---------- */
@media(max-width:859px){
  .search-bar{max-width:none}
  .workspace{flex-direction:column}
  .content-col{width:100%;max-width:none;min-width:0;height:56%;border-right:0;border-bottom:1px solid var(--line)}
  .map-pane{width:100%;height:44%;flex:none}
  .resize-handle{display:none}
  .site-grid{grid-template-columns:repeat(4,1fr)}
}

/* ================= MOBILE MAP + DRAGGABLE BOTTOM SHEET =================
 * Explore, Campground Detail, and Campsite Detail share ONE shell at mobile
 * widths: the real map fills the whole workspace as a persistent background
 * layer, and #contentCol (the same element that holds the desktop
 * split-panel content -- no separate mobile markup, and no second sheet
 * implementation for Explore) becomes a draggable bottom sheet over it.
 *
 * Mechanism: #contentCol is always the full workspace height; only a
 * translateY(px), computed in app.js from real drag position/snap state,
 * decides how much of it is visible above the bottom edge. This is what
 * lets a "collapsed" sheet still contain its full DOM (scrolled out of
 * view) rather than needing separate collapsed/expanded markup.
 *
 * #workspace carries "mobile-sheet" (+ "sheet-collapsed"/"sheet-default"/
 * "sheet-expanded") toggled from app.js's updateMobileSheetMode(). It's an
 * ID selector specifically so these rules outrank the plain-stacked
 * pre-hydration fallback above without having to touch that selector's
 * specificity.
 */
@media(max-width:859px){
  #workspace.mobile-sheet{flex-direction:row} /* undo the stacked-fallback column direction above */
  #workspace.mobile-sheet .map-pane{display:block;position:absolute;inset:0;width:100%;height:100%;flex:none;z-index:1}
  #workspace.mobile-sheet .content-col{
    position:absolute;left:0;right:0;bottom:0;top:0;width:100%;max-width:none;min-width:0;height:100%;
    z-index:20;border-right:0;border-bottom:0;border-top:1px solid var(--line);
    border-radius:20px 20px 0 0;box-shadow:0 -12px 30px rgba(0,0,0,.5);
    padding:0 20px calc(16px + var(--safe-b));
    overflow-y:hidden;touch-action:none;will-change:transform;
    transition:transform .32s cubic-bezier(.2,.9,.25,1);
  }
  #workspace.mobile-sheet.sheet-expanded .content-col{
    overflow-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y;
  }
  #workspace.mobile-sheet .content-col.dragging{transition:none}

  .sheet-handle-bar{display:none}
  #workspace.mobile-sheet .sheet-handle-bar{
    display:block;position:sticky;top:0;left:0;right:0;z-index:5;
    background:var(--surface);margin:0 -20px;padding:16px 20px 14px;cursor:grab;touch-action:none;
  }
  /* Sized as a visible affordance, not the actual hit-target -- the real
     drag surface is the whole non-interactive sheet above (see initSheetDrag
     in app.js); this pill only needs to read clearly as "grabbable" to the
     eye. Slightly larger/lighter than before so it's obvious at a glance on
     a real phone screen. */
  .sheet-handle{width:44px;height:5px;border-radius:3px;background:var(--muted);opacity:.55;margin:0 auto}

  /* Explore's own compact search, reachable inside the sheet now that the
     topbar's #searchInput is hidden whenever the sheet shell is active (see
     "body.mobile-sheet .search-bar{display:none}" above) -- kept in sync
     with the topbar input via syncSearchInputs() in app.js rather than a
     second filter implementation. Reuses .search-bar's own look, just
     un-flexed to sit inline in the sheet instead of stretching the topbar. */
  #workspace.mobile-sheet .explore-search-sheet{display:flex;max-width:none;margin:2px 0 14px}

  /* Live "N campgrounds found" -- mobile-sheet only, see the HTML comment
     next to #exploreResultCount. Desktop's .screen-sub tagline above it is
     untouched. */
  #workspace.mobile-sheet .explore-result-count{display:block}
}
/* Hidden by default everywhere (desktop, and mobile before the sheet class
   attaches) -- only the ID-scoped rules above ever show these. */
.explore-search-sheet{display:none}
.explore-result-count{display:none;font-size:13.5px;color:var(--muted);margin:-8px 0 2px}

/* ================= CAMPSITE DETAIL LAYOUT =================
   Campsite Detail is now single-column at every width -- the same shell
   Campground Detail uses -- so the HTML's own source order already IS the
   display order (identity -> hero -> prev/next -> facts -> availability ->
   highlights -> amenities -> good to know -> details/equipment/driveway ->
   nearby -> links). No grid/`order` reflow needed between breakpoints. */
@media(max-width:900px){
  .site-nav-btn{padding:10px} /* 44px+ touch target on mobile without changing desktop density */
}

@media(max-width:520px){
  .detail-grid{grid-template-columns:1fr 1fr}
  .fact-chips{gap:14px 16px}
  .site-grid{grid-template-columns:repeat(3,1fr)}
  .site-nav-thumb{width:44px;height:44px}
  .site-nav-name{font-size:13px}
  .availability-nav-btn{width:38px;height:38px}
  .avail-months{grid-template-columns:1fr;gap:28px}
  .avail-mcell{font-size:14px}
  .equipment-tiles{grid-template-columns:repeat(3,1fr);gap:10px}
  .equipment-tile{padding:14px 6px}
  .equipment-tile svg{width:30px;height:30px}
  .detail-card{padding:22px 20px}
}

/* ================= HOME (public landing page) =================
   A separate full-bleed scroll page, sibling to .workspace -- shown instead
   of it (never alongside) via applyState's hidden toggle. Reuses the same
   dark cinematic tokens as the rest of the product; no new palette. */
/* Flows naturally in the page (no fixed height / internal scroll) so the
   real <footer> after it is reachable by ordinary page scrolling, same
   scroll container as the rest of the document -- see the HTML comment
   above <footer>. */
.home-screen{-webkit-overflow-scrolling:touch}

.btn-primary,.btn-secondary{
  display:inline-block;border-radius:999px;padding:13px 22px;font-size:14px;font-weight:700;cursor:pointer;
  border:1px solid transparent;text-decoration:none;text-align:center;
}
.btn-primary{background:var(--green);color:#0b0d0c}
.btn-primary:hover{background:var(--green-dark)}
.btn-secondary{background:rgba(255,255,255,.06);color:var(--ink);border-color:rgba(255,255,255,.22);backdrop-filter:blur(6px)}
.btn-secondary:hover{background:rgba(255,255,255,.12)}

/* ---------- Hero: real draggable Pannellum panorama, minimal chrome ---------- */
.home-hero{position:relative;height:min(78vh,760px);min-height:460px;overflow:hidden;background:#000}
.home-hero-pano{position:absolute;inset:0;opacity:1;transition:opacity .26s ease}
.home-hero-pano.hero-pano-fading{opacity:0}
.home-hero-pano .pnlm-container{cursor:grab}
.home-hero-pano .pnlm-grab{cursor:grabbing}
.home-hero-scrim{
  position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,rgba(11,13,12,.15) 0%,rgba(11,13,12,.05) 30%,rgba(11,13,12,.55) 78%,rgba(11,13,12,.85) 100%),
             linear-gradient(90deg,rgba(11,13,12,.65) 0%,rgba(11,13,12,.1) 45%);
}

.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}

/* ---------- Passive vs active 360 mode ----------
   Passive (default): the panorama itself never receives pointer events, so
   a vertical drag/swipe over it is ordinary page scroll, never a pan --
   #heroActivateBtn is the only pointer-events:auto element sitting over it
   (a plain <button>, so a scroll gesture never fires its click, only a real
   tap/click does -- native browser tap-vs-scroll disambiguation, no manual
   gesture math). Active: the panorama regains pointer-events for real
   Pannellum drag/pinch, the activate affordance disappears, and a small
   exit control appears instead. Toggled by .hero-active on .home-hero. */
.home-hero-pano{pointer-events:none}
.home-hero.hero-active .home-hero-pano{pointer-events:auto}

.hero-activate-btn,.hero-exit-btn{
  position:absolute;z-index:4;top:50%;right:28px;transform:translateY(-50%);
  display:inline-flex;align-items:center;gap:8px;padding:10px 16px;border-radius:999px;
  border:1px solid rgba(255,255,255,.3);background:rgba(11,13,12,.42);backdrop-filter:blur(6px);
  color:#fff;font-size:12.5px;font-weight:700;cursor:pointer;white-space:nowrap;
}
.hero-activate-btn:hover,.hero-exit-btn:hover{background:rgba(11,13,12,.6)}
.hero-exit-btn{display:none}
.home-hero.hero-active .hero-activate-btn{display:none}
.home-hero.hero-active .hero-exit-btn{display:inline-flex}

/* ---------- Hero carousel chrome: caption, arrows, pagination -- all
   siblings of .home-hero-content so the approved headline/copy/CTA layout
   is never touched. ---------- */
.hero-slide-caption{
  position:absolute;z-index:2;top:24px;right:24px;text-align:right;
  display:flex;flex-direction:column;gap:2px;text-decoration:none;
}
.hero-slide-caption:hover .hero-slide-caption-line{text-decoration:underline}
.hero-slide-caption-line{font-size:12.5px;font-weight:700;color:#fff;text-shadow:0 1px 4px rgba(0,0,0,.5)}
.hero-slide-caption-sub{font-size:11px;color:rgba(255,255,255,.72);text-shadow:0 1px 4px rgba(0,0,0,.5)}

.hero-slide-arrow{
  position:absolute;z-index:3;top:50%;transform:translateY(-50%);width:40px;height:40px;border-radius:50%;
  border:0;background:rgba(11,13,12,.4);color:#fff;display:grid;place-items:center;backdrop-filter:blur(6px);
  cursor:pointer;opacity:0;transition:opacity .18s ease,background .18s ease;
}
.home-hero:hover .hero-slide-arrow{opacity:1}
.hero-slide-arrow:hover{background:rgba(11,13,12,.65)}
.hero-slide-arrow.prev{left:20px}
.hero-slide-arrow.next{right:20px}

.hero-pagination{
  position:absolute;z-index:3;left:50%;bottom:22px;transform:translateX(-50%);
  display:flex;align-items:center;gap:4px;
}
.hero-dot{
  width:40px;height:40px;padding:0;border:0;background:none;cursor:pointer;
  display:grid;place-items:center;
}
.hero-dot::after{content:"";width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.45);transition:background .2s ease,width .2s ease}
.hero-dot:hover::after{background:rgba(255,255,255,.75)}
.hero-dot.active::after{background:#fff;width:18px;border-radius:3px}
.home-hero-content{
  position:relative;z-index:2;height:100%;display:flex;flex-direction:column;justify-content:flex-end;
  max-width:640px;padding:0 40px calc(52px + var(--safe-b));pointer-events:none;
}
.home-hero-content > *{pointer-events:auto}
.home-hero-badge{
  display:inline-flex;align-self:flex-start;align-items:center;gap:6px;font-size:11.5px;font-weight:700;
  letter-spacing:.02em;color:var(--green);background:var(--green-tint);border-radius:999px;padding:6px 12px;margin-bottom:18px;
}
.home-hero-title{font-size:clamp(32px,5vw,52px);font-weight:800;letter-spacing:-1.2px;line-height:1.05;margin:0 0 16px;color:#fff}
.home-hero-sub{font-size:15.5px;line-height:1.6;color:rgba(255,255,255,.82);max-width:480px;margin:0 0 26px}
.home-hero-ctas{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:16px}
.home-location-btn{
  display:inline-flex;align-items:center;gap:7px;background:none;border:0;color:rgba(255,255,255,.75);
  font-size:12.5px;font-weight:600;padding:4px 0;cursor:pointer;width:fit-content;
}
.home-location-btn:hover{color:#fff}
.home-location-status{font-size:12px;color:rgba(255,255,255,.7);margin:4px 0 0}

/* ---------- Shared section shell -- rhythm comes from spacing and
   background-tone shifts (.home-section-alt), not divider lines. ---------- */
.home-screen{--home-pad:40px}
.home-section{padding:88px 40px}
.home-section-alt{background:var(--surface)}
.home-inner{max-width:1320px;margin:0 auto}
/* A modest bump for "How Tourz Works" only -- the 3-step architecture and
   ratio stay identical, this just gives each real product-preview thumbnail
   (the live iframes) more room, which makes their scaled-down content
   genuinely more legible since the iframe's own internal resolution scales
   with its container (see .home-step-iframe). */
.home-inner-wide{max-width:1520px}
.home-section-head{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:28px}
.home-link-btn{background:none;border:0;color:var(--green);font-size:13.5px;font-weight:700;cursor:pointer;padding:0;text-decoration:none}
.home-link-btn:hover{text-decoration:underline}
.home-section-kicker{font-size:11.5px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--green);margin-bottom:12px}
.home-section-title{font-size:clamp(28px,3.4vw,42px);font-weight:800;letter-spacing:-.8px;margin:0 0 40px;color:var(--ink);max-width:22ch}
.home-section-head .home-section-title{margin-bottom:0}

/* ---------- Featured campgrounds: a large, photo-dominant destination shelf
   that bleeds to the viewport edge -- the heading/CTA row above stays
   inside .home-inner (the normal content grid), but the card rail itself
   is a full-bleed sibling so the shelf actually uses desktop width instead
   of being capped at the 1320px content column. The negative margin
   cancels .home-section's own horizontal padding; the padding-left formula
   then re-creates .home-inner's exact left inset (same 1400px breakpoint
   math: 40px section padding + centered 1320px column) so the first card
   lines up under the heading instead of looking clipped/offset. Cards are
   sized for the production catalog (~4-5 visible desktop), not shrunk to
   fit -- the row simply gets busier and scrolls further as INDEX grows. */
.home-cg-row{
  display:flex;gap:24px;overflow-x:auto;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;
  margin:0 calc(var(--home-pad) * -1);
  padding:0 var(--home-pad) 8px max(var(--home-pad), calc((100vw - 1400px) / 2 + var(--home-pad)));
}
.home-cg-row::-webkit-scrollbar{display:none}
.home-cg-card{
  display:block;flex:0 0 clamp(272px,22vw,336px);scroll-snap-align:start;text-align:left;border:0;background:none;
  border-radius:0;padding:0;cursor:pointer;text-decoration:none;color:inherit;transition:transform .22s cubic-bezier(.2,.8,.3,1);
}
.home-cg-card:hover{transform:translateY(-4px)}
.home-cg-media{
  position:relative;aspect-ratio:6/7;border-radius:var(--radius-lg);overflow:hidden;
  background-color:#0a0a0a;box-shadow:0 2px 8px rgba(0,0,0,.25);transition:box-shadow .22s ease;
}
.home-cg-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 44%}
.home-cg-card:hover .home-cg-media{box-shadow:0 20px 40px rgba(0,0,0,.5)}
.home-cg-media-scrim{position:absolute;inset:0;background:linear-gradient(180deg,rgba(11,13,12,0) 40%,rgba(11,13,12,.86) 100%)}
.home-cg-badge{
  position:absolute;top:14px;left:14px;font-size:11px;font-weight:700;color:#fff;
  background:rgba(11,13,12,.55);backdrop-filter:blur(6px);border-radius:999px;padding:6px 12px;
}
.home-cg-media-info{position:absolute;left:18px;right:18px;bottom:16px;color:#fff}
.home-cg-name{font-size:19px;font-weight:800;letter-spacing:-.3px}
.home-cg-meta{display:flex;align-items:center;gap:6px;font-size:12.5px;color:rgba(255,255,255,.85);margin-top:4px}
.home-cg-meta svg{flex-shrink:0;opacity:.85}
.home-cg-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 2px 0}
.home-cg-stat{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}
.home-cg-cta{font-size:13px;font-weight:700;color:var(--green);white-space:nowrap}

/* ---------- Why Tourz: one unified dark surface band, four columns divided
   by hairlines -- not four separate boxed cards. ---------- */
.home-value-band{
  display:grid;grid-template-columns:repeat(4,1fr);background:var(--surface-raised);
  border-radius:var(--radius-lg);overflow:hidden;
}
.home-value-col{display:flex;flex-direction:column;gap:16px;padding:40px 32px}
.home-value-col:not(:first-child){border-left:1px solid var(--line)}
.home-value-icon{
  width:60px;height:60px;border-radius:50%;background:var(--green-tint);color:var(--green);
  display:grid;place-items:center;font-size:16px;font-weight:800;flex-shrink:0;
}
.home-value-icon svg{width:30px;height:30px}
.home-value-col h3{font-size:17.5px;font-weight:800;color:var(--ink);margin:0;letter-spacing:-.2px}
.home-value-col p{font-size:13.5px;color:var(--muted);line-height:1.6;margin:0}

/* ---------- Photographic rhythm band: a real, slowly auto-rotating 360
   panorama between sections (see initPhotoBandPanorama in app.js) --
   breaks up the card/box monotony with real immersive imagery instead of
   a static photo. Always pointer-events:none (never activatable, unlike
   the hero) so it can never trap scroll. ---------- */
.home-photo-band{
  position:relative;height:clamp(260px,34vw,440px);background-color:#0a0a0a;
  display:flex;align-items:center;justify-content:center;overflow:hidden;
}
.home-photo-band-pano{position:absolute;inset:0;pointer-events:none}
.home-photo-band-scrim{position:absolute;inset:0;background:linear-gradient(180deg,rgba(11,13,12,.25),rgba(11,13,12,.55))}
.home-photo-band-text{
  position:relative;z-index:2;max-width:640px;text-align:center;padding:0 24px;
  font-size:clamp(19px,2.4vw,28px);font-weight:700;letter-spacing:-.3px;line-height:1.35;color:#fff;
}

/* ---------- How Tourz works: three large connected steps. Steps 1 and 2
   are LIVE same-origin iframes of the real Explore / Campground Detail
   routes, scaled into a thumbnail frame -- the actual product, not a
   mockup (see renderHowItWorksVisuals in app.js). ---------- */
.home-steps-row{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;gap:20px;align-items:start}
.home-step-arrow{color:var(--muted);opacity:.5;align-self:center;margin-top:100px}
.home-step{display:flex;flex-direction:column;gap:16px}
.home-step-visual{
  position:relative;aspect-ratio:4/3;border-radius:var(--radius-lg);overflow:hidden;background:var(--surface-raised-2);
  background-size:cover;background-position:center 44%;border:1px solid var(--line);
}
.home-step-visual-frame{background:var(--surface-raised-2)}
/* Width/height are percentages, not fixed pixels, so the iframe's own
   internal viewport always renders at ~4x the container's actual width
   (desktop-breakpoint-sized, however big or small the card ends up being)
   while the reciprocal scale(.25) shrinks it back down to exactly fill the
   container -- self-consistent at any breakpoint, no JS measurement needed. */
.home-step-iframe{
  position:absolute;top:0;left:0;width:400%;height:400%;border:0;pointer-events:none;
  transform:scale(.25);transform-origin:top left;background:var(--surface-raised-2);
}
.home-step-visual-tag{
  position:absolute;top:12px;left:12px;z-index:2;font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;
  color:#fff;background:rgba(11,13,12,.62);backdrop-filter:blur(6px);border-radius:999px;padding:5px 11px;
}
.home-step-visual-badge{
  position:absolute;top:12px;right:12px;z-index:2;font-size:11.5px;font-weight:800;color:var(--green);
  background:rgba(11,13,12,.72);backdrop-filter:blur(6px);border-radius:999px;padding:5px 11px;
}
.home-step-head{display:flex;align-items:center;gap:12px}
.home-step-num{
  width:32px;height:32px;border-radius:50%;background:var(--green-tint);color:var(--green);
  display:grid;place-items:center;font-size:13.5px;font-weight:800;flex-shrink:0;
}
.home-step h3{font-size:17px;font-weight:800;color:var(--ink);margin:0;letter-spacing:-.2px}
.home-step p{font-size:13.5px;color:var(--muted);line-height:1.6;margin:0}

/* ---------- Coverage: a major, editorial two-column discovery section --
   real state chips + a lightweight, non-interactive coverage visualization
   (see renderCoverageMapVisual in app.js) plotting INDEX's own real
   coordinates, bled to the section edge rather than boxed as a widget.
   Deliberately NOT a live map instance -- no pan/zoom/hover/click -- this
   is a brand/coverage moment that hands off to the real interactive map
   via the "Explore the map" CTA, not a second Explore. ---------- */
.home-coverage{padding-left:0;padding-right:0}
.home-coverage-inner{display:grid;grid-template-columns:minmax(340px,1fr) 1.3fr;gap:0;align-items:stretch;max-width:none;margin:0;padding-left:40px}
.home-coverage-copy{display:flex;flex-direction:column;justify-content:center;padding:40px 56px 40px 0;max-width:520px}
.home-coverage-copy p{font-size:15px;color:var(--muted);line-height:1.7;margin:0 0 28px}
.home-coverage-map-wrap{min-height:480px;overflow:hidden;border-radius:var(--radius-lg) 0 0 var(--radius-lg)}
/* A real MapLibre + OpenFreeMap instance (same dark theme/provider as the
   main Explore/Campground map -- see applyDarkMapTheme, createMapLibreProvider)
   so the region reads as recognizable real geography, not an abstract dot
   plot -- but mounted with `interactive:false` and no controls added, so it
   can never pan/zoom/rotate/click like Explore. Background color here is
   only the pre-tile-load fallback so there's no flash of MapLibre's default
   white canvas while the style loads. */
.home-coverage-map{width:100%;height:100%;min-height:480px;position:relative;background:var(--surface-raised-2)}
.home-coverage-map .maplibregl-canvas{cursor:default!important}
.home-coverage-map .maplibregl-ctrl-attrib{font-size:10px}

/* ---------- Final CTA: a full photographic closing moment, not a footer
   banner -- scaled closer to the hero's own weight. ---------- */
.home-final-cta{
  position:relative;padding:0;min-height:56vh;display:flex;align-items:center;justify-content:center;
  background-size:cover;background-position:center 46%;background-color:#0a0a0a;text-align:center;overflow:hidden;
}
.home-final-cta-scrim{position:absolute;inset:0;background:linear-gradient(180deg,rgba(11,13,12,.5),rgba(11,13,12,.82))}
.home-final-cta-inner{position:relative;z-index:2;padding:60px 40px;display:flex;flex-direction:column;align-items:center;gap:20px;max-width:640px}
.home-final-cta h2{font-size:clamp(34px,5vw,56px);font-weight:800;letter-spacing:-1px;line-height:1.05;color:#fff;margin:0}
.home-final-cta p{font-size:16.5px;color:rgba(255,255,255,.85);margin:0 0 4px}
.home-final-cta .btn-primary{padding:15px 34px;font-size:15px}

@media(max-width:1080px){
  .home-value-band{grid-template-columns:1fr 1fr}
  .home-value-col:nth-child(3){border-left:0}
  .home-value-col:nth-child(3),.home-value-col:nth-child(4){border-top:1px solid var(--line)}
  .home-coverage-inner{grid-template-columns:1fr;padding-left:0}
  .home-coverage-copy{padding:0 40px 32px;max-width:none}
  .home-coverage-map-wrap{border-radius:var(--radius-lg);margin:0 40px;min-height:340px}
  .home-coverage-map{min-height:340px}
  .home-steps-row{grid-template-columns:1fr;gap:0}
  .home-step-arrow{display:none}
  .home-step + .home-step{margin-top:32px}
}
@media(max-width:859px){
  .home-screen{--home-pad:20px}
  .home-hero{height:min(88vh,680px)}
  .home-hero-content{padding:0 20px calc(36px + var(--safe-b));max-width:none}
  .home-section{padding:56px 20px}
  .home-coverage-copy{padding:0 20px 28px}
  .home-coverage-map-wrap{margin:0 20px}
  .home-photo-band{height:clamp(200px,50vw,320px)}
  .hero-slide-arrow{display:none}
  .hero-slide-caption{top:14px;right:14px}
  /* Vertically centered would sit under the headline on a narrow phone
     (the text column runs nearly full width there) -- stack it in the
     open sky area below the caption instead. */
  .hero-activate-btn,.hero-exit-btn{top:74px;right:14px;transform:none}
  /* On mobile the hero copy stack runs tall and sits bottom-anchored, so a
     bottom-centered pagination row would collide with "Use my location" --
     move it to the top instead, opposite the caption, where the panorama
     is otherwise empty. */
  .hero-pagination{top:16px;bottom:auto;left:16px;transform:none}
}
@media(max-width:520px){
  .home-hero-title{font-size:30px}
  .home-cg-card{flex:0 0 82%}
  .home-value-band{grid-template-columns:1fr}
  .home-value-col{border-left:0!important;border-top:1px solid var(--line)}
  .home-value-col:first-child{border-top:0}
  .home-final-cta-inner{padding:48px 24px}
}

/* ================= SITE FOOTER =================
   Persistent sitewide footer -- see the HTML comment above <footer> for
   why it lives once in the DOM rather than per-screen. Brand column plus
   three real link groups (Explore, Popular Campgrounds, Tourz); the
   Popular Campgrounds list is populated from real catalog data in app.js. */
.site-footer{background:var(--surface);border-top:1px solid var(--line);padding:56px 40px 28px}
.footer-inner{
  max-width:1320px;margin:0 auto;display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr;gap:40px;
}
.footer-brand-col{display:flex;flex-direction:column;gap:12px;max-width:340px}
.footer-brand{font-weight:800;font-size:19px;letter-spacing:-.3px;color:var(--ink)}
.footer-brand span{color:var(--green)}
.footer-tagline{font-size:13.5px;font-weight:700;color:var(--ink);margin:0}
.footer-desc{font-size:13px;color:var(--muted);line-height:1.6;margin:0}
.footer-social-link{
  display:inline-flex;align-items:center;gap:8px;margin-top:6px;color:var(--ink);font-size:13px;font-weight:600;
  text-decoration:none;width:fit-content;
}
.footer-social-link:hover{color:var(--green)}
.footer-social-link svg{flex-shrink:0;color:var(--muted)}
.footer-social-link:hover svg{color:var(--green)}

.footer-nav-col h3{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:0 0 16px}
.footer-nav-col ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:11px}
.footer-nav-col a{color:var(--ink);font-size:13.5px;font-weight:600;text-decoration:none}
.footer-nav-col a:hover{color:var(--green)}

.footer-bottom{
  max-width:1320px;margin:44px auto 0;padding-top:22px;border-top:1px solid var(--line);
  font-size:12px;color:var(--muted);
}

@media(max-width:900px){
  .footer-inner{grid-template-columns:1fr 1fr;row-gap:36px}
  .footer-brand-col{grid-column:1 / -1;max-width:none}
}
@media(max-width:520px){
  .site-footer{padding:44px 20px 24px}
  .footer-inner{grid-template-columns:1fr;gap:32px}
}
