/* Vegas Map v2 — Light & Happy color system */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Vivid layer colors — pop on light map background */
  --col-hotel:  #0284C7;   /* sky blue — hotel buildings */
  --col-venue:  #7C3AED;   /* vivid purple — venues */
  --col-poker:  #16A34A;   /* vivid green — poker rooms */
  --col-event:  #8B5CF6;   /* vivid purple — TM events */
  --col-wsop:   #D97706;   /* amber — WSOP/gold */
  --col-transit:#0284C7;   /* deep sky — transit */
  --col-race:   #E11D48;   /* rose red */

  /* Light backgrounds */
  --bg:         #F5F0EA;   /* warm cream */
  --surface:    #FFFFFF;
  --bg-2:       #EDE8E1;
  --bg-3:       #DDD8D0;

  /* Aliases */
  --accent:     #0284C7;
  --gold:       var(--col-wsop);
  --green:      var(--col-poker);

  /* Dark text on light background */
  --text:       #1C1917;
  --text-muted: #78716C;
  --text-dim:   #A8A29E;

  --border:     rgba(0,0,0,0.10);
  --safe-b:     env(safe-area-inset-bottom, 0px);
  --safe-t:     env(safe-area-inset-top, 0px);
  --rail-h:     104px;   /* real hotel-rail height (card + padding); bottom controls anchor to this */
  --wep-peek-h: 68px;    /* WSOP events panel peek height (see index.html #wsop-events-panel.wep-peek) */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  20px;

  /* De-facto secondary/dark palette — WS-2 tokenization of the recurring
     hardcoded hex values found across the app shell (search bar, toasts,
     dark buttons, layer-panel accent buttons, save-trip/save-pin, booking
     return panel). Value-for-value: no color here is new, every one already
     appeared as a literal somewhere in the codebase. --gold already covers
     the amber/WSOP shade (var(--col-wsop)); --col-race already covers
     #E11D48 rose. Prerequisite for WS-3 dark chrome. */
  --surface-dark:    #1e293b;
  --surface-darker:  #0f172a;
  --surface-darkest: #0e1520;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --accent-teal:     #2dd4bf;
  --accent-sky:      #0ea5e9;
  --accent-sky-2:    #38bdf8;
  --accent-orange:   #f97316;
  --accent-orange-2: #fb923c;
  --accent-cyan:     #00c2ff;
  --accent-rose:     #f43f5e;

  /* Minimal type scale — mapped to the current ad hoc px uses (§2 of the
     survey found no scale existed; these are the 5 sizes that recur). */
  --fs-11: 11px;
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-16: 16px;

  /* Translucent "glass" chrome backdrop (header, trip chips, hotel rail,
     date chip, layer-panel button, mode pills) — all share the same warm-cream
     RGB triplet at different alpha values. Split into an RGB-only var so each
     call site keeps its own alpha via rgba(var(--glass-rgb), X) while the
     dark override below only has to redefine the one shared triplet. */
  --glass-rgb: 245,240,234;

  /* Light-theme-only "chip" tokens used by the Layers panel's per-venue floor
     sub-panel (overlays.js _buildOverlaySubpanel — inline-styled HTML, not
     CSS classes, so these are consumed via var() inside those style strings).
     Value-for-value with what was already hardcoded there; dark equivalents
     are in the [data-theme="dark"] block below. */
  --chip-ghost-bg:        #f1f5f9;
  --chip-ghost-bg-2:      #f8fafc;
  --chip-ghost-text:      #64748b;
  --chip-ghost-text-2:    #475569;
  --chip-ghost-border:    #e2e8f0;
  --chip-neutral-border:  #e5e7eb;
  --chip-blue-bg:         #1d4ed8;
  --chip-blue-text:       #fff;
  --chip-blue-soft-bg:    #eff6ff;
  --chip-blue-soft-text:  #1d4ed8;
  --chip-blue-soft-border:#bfdbfe;
  --chip-amber-bg:        #fef3c7;
  --chip-amber-text:      #92400e;
  --chip-amber-border:    #fde68a;
  --chip-amber-active-bg: #d97706;
  --chip-teal-bg:         #0f766e;
  --chip-danger-bg:       #fee2e2;
  --chip-danger-text:     #991b1b;
  --chip-success-text:    #16a34a;
  --chip-accent-blue:     #3b82f6;

  /* Indoor directions v1 (task #49) — floor-plan route polyline + casing.
     Distinct from every floor-card.js category accent and from --col-transit. */
  --route:        #E11D48;
  --route-casing: rgba(255,255,255,.85);
}

/* ── Dark chrome (WS-3) ───────────────────────────────────────────────────
   Same localStorage key the basemap theme uses ('vnm:mapTheme') drives a
   data-theme attribute on <html>, set pre-paint by an inline script in
   base.html <head> — see that file for the no-flash rationale. Because
   WS-2 tokenized the app shell value-for-value, remapping this token block
   is sufficient for the large majority of components; the remainder (a few
   hardcoded literals that never went through a token, plus the JS-injected
   overlay sub-panel chips above) are overridden individually further down
   this file. Palette: built from the existing --surface-dark/-darker/-darkest
   slate family already used elsewhere in the app (never inventing new dark
   colors), with the category accents nudged brighter for AA contrast on
   dark surfaces. */
:root[data-theme="dark"] {
  --col-hotel:  #38bdf8;
  --col-venue:  #a78bfa;
  --col-poker:  #4ade80;
  --col-event:  #a78bfa;
  --col-wsop:   #fbbf24;
  --col-transit:#38bdf8;
  --col-race:   #fb7185;

  --bg:         var(--surface-darkest);
  --surface:    var(--surface-dark);
  --bg-2:       var(--surface-darker);
  --bg-3:       #243247;

  --accent:     #38bdf8;
  --gold:       var(--col-wsop);
  --green:      var(--col-poker);

  --text:       #f1f5f9;
  --text-muted: var(--slate-400);
  --text-dim:   var(--slate-600);

  --border:     rgba(255,255,255,0.12);
  --glass-rgb:  15,23,42;   /* --surface-darker, translucent chrome backdrop */

  --chip-ghost-bg:        #243247;
  --chip-ghost-bg-2:      #1c2942;
  --chip-ghost-text:      var(--slate-400);
  --chip-ghost-text-2:    #cbd5e1;
  --chip-ghost-border:    rgba(255,255,255,0.14);
  --chip-neutral-border:  rgba(255,255,255,0.14);
  --chip-blue-bg:         #3b82f6;
  --chip-blue-text:       #fff;
  --chip-blue-soft-bg:    rgba(59,130,246,0.18);
  --chip-blue-soft-text:  #7ab8fb;
  --chip-blue-soft-border:rgba(96,165,250,0.35);
  --chip-amber-bg:        rgba(245,158,11,0.18);
  --chip-amber-text:      #fbbf24;
  --chip-amber-border:    rgba(245,158,11,0.35);
  --chip-amber-active-bg: #f59e0b;
  --chip-teal-bg:         var(--accent-teal);
  --chip-danger-bg:       rgba(239,68,68,0.18);
  --chip-danger-text:     #fca5a5;
  --chip-success-text:    #4ade80;
  --chip-accent-blue:     #60a5fa;

  /* Indoor directions v1 (task #49) — brighter for AA contrast on dark surfaces. */
  --route:        #FB7185;
  --route-casing: rgba(20,20,24,.75);
}

html, body { height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; overflow: hidden; overscroll-behavior: none; }

/* Global Android tap-flash suppression — one rule for every interactive
   surface instead of hunting down each button/pill individually. Covers
   native controls plus the class/id names our JS-built chrome uses (rail
   cards, search results, layer rows, etc). #date-nudge-banner is a clickable
   <div> (not a <button>/<a>), so it needs an explicit id here or it would
   regain the tap-flash the old per-selector rule used to suppress for it.
   Components below that still carry their own -webkit-tap-highlight-color
   are redundant but harmless. */
button, a, [role="button"], input, select, textarea,
.layer-row, .hrl-card, .trip-chip, .vnm-search-result, .mode-seg-btn,
#date-nudge-banner {
  -webkit-tap-highlight-color: transparent;
}

/* Header — safe-area-inset-top pads header on notched iPhones (black-translucent status bar) */
#vnm-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-bottom-sheet);
  height: calc(44px + var(--safe-t, 0px));
  padding-top: var(--safe-t, 0px);
  background: rgba(var(--glass-rgb),0.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding-left: 12px; padding-right: 12px;
}
.vnm-wordmark { display: flex; gap: 0; text-decoration: none; font-weight: 700; font-size: 15px; }
.vnm-wordmark-city  { color: var(--accent); }
.vnm-wordmark-brand { color: var(--text); }
/* Nav has no rule = children (search btn, explore btn, live badge) are block-level
   and wrap onto a 2nd row that renders above the fixed 44px header (y<0), invisible. */
.vnm-header-nav { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; flex-shrink: 0; }
/* Priority order for narrow viewports: at 390px with the (logged-out-only)
   sign-in prompt visible, nav's children (352px) can exceed the space left
   after the wordmark (~268px) and nav can't shrink without squishing text.
   Rather than clip randomly, `order` guarantees search + Explore — the two
   primary actions users need — render first and are never the ones
   pushed past the header's right edge; the live badge and sign-in prompt
   (secondary chrome) are what overflows off-screen in that edge case instead. */
#vnm-search-btn     { order: 1; }
#explore-btn        { order: 2; }
#vnm-theme-toggle   { order: 3; }
#hdr-live           { order: 4; }
#vnm-user-pill      { order: 5; }
#vnm-signin-prompt  { order: 6; }
.vnm-live-badge { display: flex; align-items: center; gap: 5px; font-size: var(--fs-11); color: var(--text-muted); }
.vnm-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* Main + map */
#vnm-main { position: fixed; inset: calc(44px + var(--safe-t, 0px)) 0 0; }
#map { position: absolute; inset: 0; }

/* Prevent Android text-selection popup when tapping map */
#vnm-main, #map, .maplibregl-canvas-container, .maplibregl-canvas {
  -webkit-user-select: none;
  user-select: none;
}
/* Prevent page-scroll from hijacking map pan/zoom gestures on iOS/Android.
   touch-action:none tells the browser that all pointer events on the canvas
   are consumed by JS (MapLibre), so the browser must not interpret them as
   page-level pan or zoom. Applied only to the map canvas hierarchy, NOT to
   the outer #vnm-main which hosts scrollable bottom sheets. */
#map, .maplibregl-canvas-container, .maplibregl-canvas {
  touch-action: none;
}

/* Trip chips bar */
/* Centered, horizontally scrollable. On phones it is width-capped (see media
   query below) so its right edge can never slide under the top-right cluster
   (#layer-panel-btn + #mode-bar). */
#trip-chips-bar {
  position: absolute; top: calc(8px + var(--safe-t, 0px)); left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; padding: 0 8px; z-index: var(--z-map-controls);
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
#trip-chips-bar::-webkit-scrollbar { display: none; }
.trip-chip {
  padding: 6px 12px; border-radius: var(--radius-xl); border: 1px solid var(--border);
  background: rgba(var(--glass-rgb),0.88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--text-muted); font-size: var(--fs-12); cursor: pointer; white-space: nowrap;
  transition: all .2s;
}
.trip-chip:hover, .trip-chip.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.trip-chip[data-trip="wsop"].active { background: var(--gold); border-color: var(--gold); }
.trip-chip[data-trip="poker"].active { background: var(--green); border-color: var(--green); }

/* Hotel rail */
#hotel-rail-bar {
  position: absolute; bottom: calc(0px + var(--safe-b)); left: 0; right: 0; z-index: var(--z-overlay-ui);
  background: rgba(var(--glass-rgb),0.95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border); padding: 8px 0;
  transform: translateY(100%); transition: transform .3s ease;
}
#hotel-rail-bar.is-visible { transform: translateY(0); }
#hotel-rail-cards { display: flex; gap: 8px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#hotel-rail-cards::-webkit-scrollbar { display: none; }

/* "Tonight's Top 5 Deals" rail (task #81) — same bottom-bar shape as the
   general hotel rail above, but a distinct element (#hotel-rail-bar stays
   untouched/still disabled). display:none until deals-rail.js confirms real
   rates exist — never occupies layout/paints an empty shell for a "zero
   rates" response (per Brief B: "never filler, never placeholders"). */
#tonight-deals-rail {
  display: none;
  position: absolute; bottom: calc(0px + var(--safe-b)); left: 0; right: 0; z-index: var(--z-overlay-ui);
  background: rgba(var(--glass-rgb),0.95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border); padding: 8px 0;
  transform: translateY(100%); transition: transform .3s ease;
}
#tonight-deals-rail.vnm-rail-built { display: block; }
#tonight-deals-rail.is-visible { transform: translateY(0); }
#tonight-deals-cards { display: flex; gap: 8px; padding: 0 40px 0 12px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#tonight-deals-cards::-webkit-scrollbar { display: none; }
.tdr-chip {
  flex-shrink: 0; display: flex; flex-direction: column; gap: 2px;
  min-width: 110px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 8px 10px; cursor: pointer; transition: border-color .2s;
  text-decoration: none; color: inherit;
}
.tdr-chip:hover { border-color: var(--accent); }
.tdr-chip-name { font-size: var(--fs-12); color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tdr-chip-price { font-size: 15px; font-weight: 700; color: var(--text); }
.tdr-chip-allin { font-size: 10px; font-weight: 600; color: var(--text-dim); margin-left: 4px; text-transform: lowercase; }
.tdr-chip-tag { font-size: 10px; color: #4ade80; font-weight: 600; }
#tdr-dismiss {
  position: absolute; top: 6px; right: 8px; z-index: 1;
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.35); border: none; border-radius: 50%; color: var(--text-dim);
  font-size: 13px; cursor: pointer; line-height: 1;
}
/* Re-open affordance — small pill above the bottom-right utility stack so it
   never collides with date-bar-chip/food-search-btn/save-trip-fab. */
#tdr-reopen {
  display: none;
  position: absolute; bottom: calc(var(--bottom-clear) + 37px + 10px + 34px + 12px + 44px + 8px);
  right: 12px; z-index: var(--z-bottom-controls);
  padding: 6px 12px; border-radius: var(--radius-xl); border: 1px solid var(--border);
  background: rgba(var(--glass-rgb),0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--text); font-size: var(--fs-12); cursor: pointer;
}
#tdr-reopen.is-visible { display: block; }

.hrl-card {
  flex-shrink: 0; width: 140px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 8px; cursor: pointer; transition: border-color .2s;
}
.hrl-card:hover { border-color: var(--accent); }
.hrl-name  { font-size: var(--fs-11); font-weight: 600; color: var(--text); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hrl-price { font-size: var(--fs-13); font-weight: 700; color: var(--accent); margin-top: 3px; }
.hrl-resort { display: block; font-size: 10px; font-weight: 400; color: var(--text-muted); }
.hrl-dist  { font-size: 10px; color: var(--text-muted); }
.hrl-meta  { font-size: var(--fs-11); font-weight: 400; color: var(--text-muted); }

/* ── Card-acceptance filter indicator bar ─────────────────────────── */
/* Sibling above #hotel-rail-cards inside #hotel-rail-bar (a block container,
   so it stacks above the horizontal card row). Light theme to match the rail. */
#rail-filter-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px 7px; margin: 0;
  font-size: var(--fs-11); white-space: nowrap; overflow: hidden;
}
.rfi-count { color: var(--text); font-weight: 700; font-size: var(--fs-11); letter-spacing: .02em; flex-shrink: 0; }
.rfi-label { color: var(--text-muted); font-size: var(--fs-11); overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.rfi-reset {
  background: rgba(2,132,199,0.10); border: 1px solid rgba(2,132,199,0.35);
  color: var(--accent); font-size: 10.5px; font-weight: 600;
  padding: 2px 9px; border-radius: 11px; cursor: pointer;
  white-space: nowrap; flex-shrink: 0; transition: background .15s;
}
.rfi-reset:hover { background: rgba(2,132,199,0.20); }

/* Rail empty state (0 matching cards) */
.hrl-empty {
  flex-shrink: 0; padding: 10px 14px; color: var(--text-muted);
  font-size: var(--fs-12); white-space: nowrap; display: flex; align-items: center;
}

/* ── Bottom-right control stack (Find Food on top, Add dates below) ───────────
   Both buttons share ONE bottom anchor (--bottom-clear) so they never collide
   with each other, the hotel rail, the WSOP peek panel, or the poker rail.
   --bottom-clear is recomputed by body-class / :has() rules below as obstructions
   appear, so the buttons always float just above the tallest bottom UI. */
:root {
  --bottom-gap:   12px;  /* gap above the tallest bottom obstruction */
  --bottom-clear: calc(var(--bottom-gap) + var(--safe-b));  /* default: nothing open */
}
/* Hotel rail visible → clear the rail. :has() is supported on all current mobile
   browsers; the body-class rules below cover WSOP/poker without :has(). */
body:has(#hotel-rail-bar.is-visible) {
  --bottom-clear: calc(var(--rail-h) + var(--bottom-gap) + var(--safe-b));
}
/* WSOP events panel peeking → clear its 68px peek bar. */
body.wep-open {
  --bottom-clear: calc(var(--wep-peek-h) + var(--bottom-gap) + var(--safe-b));
}
/* Hotel rail AND WSOP peek both up → clear the taller of the two (stacked). */
body.wep-open:has(#hotel-rail-bar.is-visible) {
  --bottom-clear: calc(var(--rail-h) + var(--wep-peek-h) + var(--bottom-gap) + var(--safe-b));
}

/* Date bar chip — bottom of the stack */
#date-bar-chip {
  position: absolute; bottom: var(--bottom-clear); right: 12px; z-index: var(--z-bottom-controls);
}
#date-bar-chip button {
  padding: 8px 14px; border-radius: var(--radius-xl); border: 1px solid var(--border);
  background: rgba(var(--glass-rgb),0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--text); font-size: var(--fs-12); cursor: pointer;
}

/* Date nudge — orange banner drops from top, impossible to miss */
@keyframes vnm-banner-drop {
  from { transform: translateX(-50%) translateY(-70px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}
@keyframes vnm-banner-rise {
  from { transform: translateX(-50%) translateY(0);    opacity: 1; }
  to   { transform: translateX(-50%) translateY(-70px); opacity: 0; }
}
@keyframes vnm-banner-pulse {
  0%,100% { box-shadow: 0 6px 20px rgba(249,115,22,0.45); }
  50%      { box-shadow: 0 6px 28px rgba(249,115,22,0.75), 0 0 0 5px rgba(249,115,22,0.18); }
}
#date-nudge-banner {
  position: fixed;
  top: calc(56px + var(--safe-t, 0px) + 8px); left: 50%;
  transform: translateX(-50%) translateY(-90px);  /* starts hidden above header */
  z-index: var(--z-drawer);
  background: var(--accent-orange); color: #fff;
  font-size: var(--fs-14); font-weight: 800;
  padding: 11px 22px;
  border-radius: 28px;
  box-shadow: 0 6px 20px rgba(249,115,22,0.45);
  white-space: nowrap; cursor: pointer;
  pointer-events: all;
  animation:
    vnm-banner-drop 0.45s cubic-bezier(.34,1.56,.64,1) 1.2s forwards,
    vnm-banner-pulse 2s ease 2.5s infinite;
}
#date-nudge-banner.is-dismissing {
  animation: vnm-banner-rise 0.28s ease forwards !important;
}
@media (prefers-reduced-motion: reduce) {
  #date-nudge-banner {
    animation: none !important;
    transform: translateX(-50%) translateY(0) !important;
    opacity: 1 !important;
  }
  #date-nudge-banner.is-dismissing {
    display: none !important;
  }
}
/* Subtle chip glow so user knows where to tap again */
#date-bar-chip.is-nudging button {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.25);
}

/* Mobile bottom sheet */
#mobile-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: var(--z-bottom-pills);
  background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-top: 1px solid var(--border);
  transition: transform .3s cubic-bezier(.4,0,.2,1), visibility .3s;
}
/* "peek" is the default idle state — park the sheet fully off-screen so no idle
   bar shows. The sheet only appears when JS drives it to half/full (Find Food
   results, Save Trip). Drag handle stays live so an opened sheet can be dragged
   back down to dismiss. visibility:hidden keeps the off-screen sheet (and its
   Save-Trip button) out of the keyboard tab order; the visibility transition
   delays the flip to hidden so the slide-down dismiss still animates. */
#mobile-sheet[data-state="peek"]  { transform: translateY(100%); visibility: hidden; }
#mobile-sheet[data-state="half"]  { transform: translateY(40%); }
#mobile-sheet[data-state="full"]  { transform: translateY(0); }
.sheet-handle-pill { width: 36px; height: 4px; border-radius: 2px; background: rgba(0,0,0,0.15); margin: 8px auto 4px; }
#sheet-drag-handle { padding: 4px 0; cursor: grab; }
/* Idle trip-chip filter row the user asked to remove — gone at all widths. */
#sheet-peek-content { display: none; }
#sheet-trip-chips-mobile { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
#sheet-trip-chips-mobile::-webkit-scrollbar { display: none; }
#sheet-body { padding: 0 12px 12px; overflow-y: auto; max-height: 50vh; max-height: 50dvh; -webkit-overflow-scrolling: touch; }
.sheet-placeholder { color: var(--text-muted); font-size: var(--fs-13); text-align: center; padding: 24px 0; }

/* Scrim — dark backdrop behind any open detail drawer */
#detail-scrim {
  position: absolute; inset: 0; z-index: 340;
  background: rgba(0,0,0,0.45);
  display: none; cursor: pointer;
}
body.hdb-open #detail-scrim,
body.pdb-open #detail-scrim { display: block; }

/* Hide competing bottom UI when a drawer is open */
body.hdb-open #hotel-rail-bar,
body.pdb-open #hotel-rail-bar,
body.hdb-open #tonight-deals-rail,
body.pdb-open #tonight-deals-rail { transform: translateY(100%) !important; }
body.hdb-open #mobile-sheet,
body.pdb-open #mobile-sheet   { transform: translateY(110%) !important; visibility: hidden; }
body.hdb-open #date-bar-chip,
body.pdb-open #date-bar-chip,
body.hdb-open #food-search-btn,
body.pdb-open #food-search-btn,
body.hdb-open #save-trip-fab,
body.pdb-open #save-trip-fab,
body.hdb-open #tdr-reopen,
body.pdb-open #tdr-reopen     { display: none; }
/* Bottom-left utility cluster (compass, label-rotate, restaurant-status
   legend — all injected by their own JS files at z-index 350-400, above
   the drawer's 360) would otherwise float on top of open drawer content. */
body.hdb-open #vnm-north-btn,
body.pdb-open #vnm-north-btn,
body.hdb-open #vnm-rotate-btn,
body.pdb-open #vnm-rotate-btn,
body.hdb-open .vnm-rest-legend-pill,
body.pdb-open .vnm-rest-legend-pill { display: none !important; }
/* WSOP panel fully expanded → hide the bottom-right stack so it doesn't sit on
   top of the open schedule. (Peek state keeps them visible, lifted above it.) */
body.wep-expanded #date-bar-chip,
body.wep-expanded #food-search-btn,
body.wep-expanded #save-trip-fab { display: none; }

/* Poker detail drawer */
#poker-detail-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: var(--z-detail-drawer);
  background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-top: 3px solid var(--green);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  max-height: 85vh; max-height: 85dvh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
#poker-detail-bar.is-open { transform: translateY(0); }
/* Safe-area bottom padding so content clears iPhone home bar */
#poker-detail-bar > div { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important; }

/* Hotel detail drawer */
#hotel-detail-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: var(--z-detail-drawer);
  background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-top: 3px solid var(--accent);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  max-height: 85vh; max-height: 85dvh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
#hotel-detail-bar.is-open { transform: translateY(0); }
#hotel-detail-bar > div { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important; }

/* Close button — 44×44 tap target minimum for mobile */
.drawer-close-btn {
  position: absolute; top: 12px; right: 12px;
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.07); color: var(--slate-500);
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  /* Prevent this button from being covered by scroll content */
  z-index: 2; flex-shrink: 0;
  touch-action: manipulation;
}
.drawer-close-btn:active { background: rgba(0,0,0,0.18); }

/* WSOP countdown pill */
#wsop-pill {
  position: absolute; top: 52px; left: 50%; transform: translateX(-50%);
  background: rgba(245,158,11,0.15); border: 1px solid var(--gold);
  border-radius: var(--radius-xl); padding: 4px 12px; font-size: var(--fs-11); color: var(--gold);
  z-index: 150; white-space: nowrap;
}

/* Layer panel — round icon button (top-right) opens a right-edge side panel */
/* top was 52px; bumped to 56px so nav overflow (~71px bottom) never occludes the button center (76px) */
#layer-panel-btn {
  position: fixed; top: calc(56px + var(--safe-t, 0px)); right: 12px; z-index: 301;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
  background: rgba(var(--glass-rgb),0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--text); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
#layer-panel {
  position: fixed; top: calc(44px + var(--safe-t, 0px)); right: 0; bottom: 0;
  width: min(290px, 82vw);
  transform: translateX(100%); transition: transform .28s ease;
  display: block;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -4px 0 18px rgba(0,0,0,.18);
  padding: 8px; overflow-y: auto; -webkit-overflow-scrolling: touch; z-index: var(--z-bottom-pills);
}
#layer-panel.is-open { transform: translateX(0); }
/* Side-panel header (title + close) */
.layer-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 4px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.layer-panel-title { font-size: var(--fs-13); font-weight: 700; color: var(--text); letter-spacing: .02em; }
.layer-panel-close {
  background: none; border: none; color: var(--text-muted); font-size: var(--fs-16);
  line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: var(--radius-sm);
}
.layer-panel-close:hover { color: var(--text); background: rgba(0,0,0,0.05); }
#layer-panel::-webkit-scrollbar { width: 4px; }
#layer-panel::-webkit-scrollbar-track { background: transparent; }
#layer-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
.layer-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border-radius: var(--radius-sm); cursor: pointer; transition: opacity .15s; min-height: 44px; }
.layer-row:hover { background: rgba(255,255,255,.05); }
.layer-row--off { opacity: 0.45; }
.layer-row--off:hover { opacity: 0.75; }
.layer-label { font-size: var(--fs-12); color: var(--text); }
/* Toggle switch with sliding thumb — clear on/off visual */
.layer-toggle {
  position: relative; width: 32px; height: 18px; border-radius: 9px; border: none;
  cursor: pointer; transition: background .2s; flex-shrink: 0;
}
.layer-toggle::before {
  content: ''; position: absolute; top: 3px;
  width: 12px; height: 12px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: left .2s;
}
.layer-toggle.on  { background: var(--accent); }
.layer-toggle.on::before  { left: 17px; }
.layer-toggle.off { background: rgba(0,0,0,0.20); }
.layer-toggle.off::before { left: 3px; }
.layer-group-header { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); padding: 8px 8px 4px; }
.layer-group-mt { margin-top: 6px; }
/* Active Now section */
.layer-active-header { color: var(--accent) !important; font-weight: 700; }
.layer-active-divider { height: 1px; background: var(--border); margin: 4px 0 2px; }

/* Section-header + global bulk on/off (task #66) */
.layer-group-header--bulk { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.layer-global-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 8px; margin: 0 0 4px; border-bottom: 1px solid var(--border);
}
.layer-global-label { font-size: var(--fs-12); font-weight: 700; color: var(--text); }
.layer-bulk-pair { display: flex; gap: 4px; flex-shrink: 0; }
.layer-bulk-btn {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
  padding: 3px 9px; min-height: 22px; line-height: 1; border-radius: 10px;
  border: 1px solid var(--border); background: transparent; color: var(--text-muted);
  cursor: pointer;
}
.layer-bulk-btn:hover { background: rgba(0,0,0,0.06); color: var(--text); }
.layer-bulk-btn:active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Layer panel help button ── */
.layer-help-btn {
  width: 44px; height: 44px; border-radius: 50%;  /* 44px: Apple HIG tap target */
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted); font-size: var(--fs-13); font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 1;
}
.layer-help-btn:hover { background: rgba(0,0,0,0.06); color: var(--text); }

/* ── Feature guide modal ── */
.mfg-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 10000; display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.mfg-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); width: 100%; max-width: 400px;
  max-height: 82vh; max-height: 82dvh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
}
.mfg-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 12px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.mfg-title { font-size: 15px; font-weight: 700; color: var(--text); }
.mfg-close {
  background: none; border: none; color: var(--text-muted);
  font-size: var(--fs-16); cursor: pointer; padding: 4px 6px; border-radius: var(--radius-sm); line-height: 1;
}
.mfg-close:hover { background: rgba(0,0,0,0.06); color: var(--text); }
.mfg-body { padding: 4px 0 8px; }
.mfg-section { padding: 10px 18px; border-bottom: 1px solid var(--border); }
.mfg-section:last-of-type { border-bottom: none; }
.mfg-section-title { font-size: var(--fs-13); font-weight: 600; color: var(--text); margin-bottom: 3px; }
.mfg-section p { font-size: var(--fs-12); color: var(--text-muted); line-height: 1.55; margin: 0; }
.mfg-footer { padding: 12px 18px; text-align: center; border-top: 1px solid var(--border); }
.mfg-footer a { font-size: var(--fs-12); color: var(--accent); text-decoration: none; }
.mfg-footer a:hover { text-decoration: underline; }

/* ── Map-mode bar (SEGMENTED Flat/3D + Map/Secret toggles) ───────────────── */
/* Top-right vertical stack, just below the layers icon button (#layer-panel-btn
   top ~52px, 40px tall → bottom ~92px). Clears the crowded bottom UI on mobile.
   Each control is a SEGMENTED toggle: a pill-shaped container split into two
   equal halves. The ACTIVE half is gold-filled (white text); the inactive half
   is transparent + muted text. Both toggles are an EQUAL-WIDTH matched pair —
   the bar has a fixed width and each toggle is width:100%. The gold-filled
   segment unambiguously signals the CURRENT mode. */

/* ── MODE CONTROLS ─────────────────────────────────────────────────────────── */
:root {
  --mode-pill-h:  44px;   /* bumped from 36 → 44 to meet Apple HIG 44px tap target */
  --mode-pill-fs: 12px;
  --mode-pill-r:  22px;   /* updated radius to match taller pill (half of 44px) */
}

/* Flat/3D: single small icon button below #layer-panel-btn (top-right).
   Shows what mode you'd switch TO — Google Maps convention. */
#mode-dim-btn {
  position: absolute;
  top: calc(104px + var(--safe-t, 0px));  /* below layers button */
  right: 12px;
  z-index: 201;
  width: 44px; height: 44px;   /* bumped height 36→44 for Apple HIG tap target */
  border-radius: 8px;
  background: rgba(var(--glass-rgb),0.95);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  color: var(--text);
  font-size: var(--fs-11); font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}
#mode-dim-btn:active { background: var(--gold); color: #fff; }

/* Segmented toggle — reusable for Map/Secret pill. */
.mode-seg {
  display: flex;
  height: var(--mode-pill-h);
  border-radius: var(--mode-pill-r);
  border: 1px solid var(--border);
  background: rgba(var(--glass-rgb),0.95);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  overflow: hidden;
}
.mode-seg-btn {
  flex: 1 1 0; min-width: 0; height: 100%;
  padding: 0 8px; border: none; background: transparent;
  color: var(--text-muted);
  font-size: var(--mode-pill-fs); font-weight: 600; line-height: 1;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  white-space: nowrap; cursor: pointer;
  transition: background .18s, color .18s;
}
.mode-seg-btn.is-active { background: var(--gold); color: #fff; }

/* Map/Secret: small pill, bottom-left. Hidden when hotel/poker drawer is open
   (they render their own mode switcher inside the drawer content). */
#mode-detail-bar {
  position: absolute;
  bottom: var(--bottom-clear);
  left: 12px;
  z-index: 400;
}

/* Map/Secret toggle pill removed at all widths (full removal, no replacement).
   The mobile bottom sheet is NOT display:none — it still hosts Find Food
   results + Save Trip, driven by JS into half/full state. Its idle "peek"
   chrome is instead neutralized: sheet parked off-screen by default (see
   [data-state="peek"] above), trip-chip row + empty events wrapper hidden. */
#mode-detail-bar { display: none; }
#sheet-events-list { display: none; }

/* Desktop */
@media (min-width: 1024px) {
  /* Bottom sheet is mobile-only. Keep it fully suppressed on desktop regardless
     of data-state, so a stray JS `dataset.state = 'half'` (e.g. food.js) can
     never slide the mobile sheet over the desktop map. */
  #mobile-sheet { display: none; }
  #trip-chips-bar { left: 12px; transform: none; }
}
/* Mobile: top trip-chips hidden — bottom-sheet chips replace them */
@media (max-width: 1023px) {
  #trip-chips-bar { display: none; }
}

/* ── Food search ─────────────────────────────────────────────────────────── */
/* Sits directly ABOVE #date-bar-chip in the bottom-right stack: same anchor
   (--bottom-clear) + the date chip's height + a gap so they never overlap. */
#food-search-btn {
  position: absolute;
  bottom: calc(var(--bottom-clear) + 37px + 10px);  /* above the Add-dates chip */
  right: 12px;
  z-index: var(--z-bottom-controls);
  padding: 9px 14px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(251,146,60,0.5);
  background: rgba(14,21,32,0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--accent-orange-2);
  font-size: var(--fs-12);
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
#food-search-btn:hover {
  background: rgba(251,146,60,0.15);
  border-color: var(--accent-orange-2);
}
#food-search-btn:disabled { opacity: 0.6; cursor: wait; }
/* Active state — food floor filter is engaged (mirrors LIVE-bar Food pill) */
#food-search-btn.food-btn-active {
  background: var(--accent-orange-2);
  border-color: var(--accent-orange-2);
  color: var(--surface-darkest);
  box-shadow: 0 0 0 2px rgba(251,146,60,0.35);
}
#food-search-btn.food-btn-active:hover {
  background: var(--accent-orange-2);
  border-color: var(--accent-orange-2);
}

/* ── Save Trip entry point ────────────────────────────────────────────────── */
/* Small round icon button in the bottom-right stack, directly ABOVE Find Food.
   Reveals the bottom sheet's Save Trip section. Hidden by default; shown only
   when logged in (.is-authed, toggled by user-identity.js off the same signal
   as the account pill) AND on mobile (the sheet it opens is desktop-suppressed).
   Gating is a class on the button (specificity 1,1,0) — deliberately LOWER than
   the body.hdb-open/pdb-open/wep-expanded/vnm-search-open suppression rules
   (1,1,1) so those correctly hide it while a competing panel is open. */
#save-trip-fab {
  position: absolute;
  bottom: calc(var(--bottom-clear) + 37px + 10px + 34px + 12px);  /* above Find Food */
  right: 12px;
  z-index: var(--z-bottom-controls);
  display: none;
  width: 44px;   /* 44x44 min tap target (Apple HIG) — matches the other round icon buttons */
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(0,194,255,0.5);
  background: rgba(14,21,32,0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--accent-cyan);
  font-size: var(--fs-16);
  line-height: 1;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
#save-trip-fab.is-authed { display: inline-flex; }
#save-trip-fab:hover { background: rgba(0,194,255,0.15); border-color: var(--accent-cyan); }
@media (min-width: 1024px) { #save-trip-fab { display: none !important; } }

#food-results-panel {
  padding: 8px 0;
  max-height: 50vh;
  max-height: 50dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Custom map welcome banner ───────────────────────────────────────────── */
#map-welcome-banner {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-opacity-slider);
  display: none;
  flex-direction: column;
  gap: 4px;
  background: rgba(var(--glass-rgb),0.97);
  border: 1px solid rgba(45,212,191,0.4);
  border-radius: var(--radius-md);
  padding: 10px 36px 10px 14px;
  max-width: min(340px, calc(100vw - 24px));
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
}
#map-welcome-title {
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--accent-teal);
}
#map-welcome-note {
  font-size: var(--fs-12);
  color: var(--slate-500);
  line-height: 1.4;
}
#map-welcome-dismiss {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--slate-400);
  font-size: var(--fs-14);
  cursor: pointer;
  line-height: 1;
  padding: 2px;
}
#map-welcome-dismiss:hover { color: var(--slate-600); }

/* ── Share button (in layer panel) ──────────────────────────────────────── */
.layer-share-btn {
  display: block;
  width: calc(100% - 16px);
  margin: 8px 8px 4px;
  padding: 7px 0;
  background: rgba(45,212,191,0.10);
  border: 1px solid rgba(45,212,191,0.35);
  border-radius: var(--radius-sm);
  color: var(--accent-teal);
  font-size: var(--fs-12);
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.layer-share-btn:hover { background: rgba(45,212,191,0.20); }
.layer-share-btn.copied { color: #10b981; border-color: rgba(16,185,129,0.5); }

/* ── Save Map button (in layer panel, shown only when MAP_SAVE_ENABLED) ─── */
.layer-save-btn {
  display: block;
  width: calc(100% - 16px);
  margin: 4px 8px 6px;
  padding: 7px 0;
  background: rgba(14,165,233,0.12);
  border: 1px solid rgba(14,165,233,0.40);
  border-radius: var(--radius-sm);
  color: var(--accent-sky-2);
  font-size: var(--fs-12);
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.layer-save-btn:hover { background: rgba(14,165,233,0.22); }

/* ── 3D pitch control buttons ────────────────────────────────────────────── */
.vnm-pitch-ctrl { overflow: hidden; }
.vnm-pc-btn {
  display: block;
  width: 29px;
  height: 29px;
  background: var(--surface);
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: var(--fs-13);
  line-height: 29px;
  text-align: center;
  padding: 0;
  color: var(--text);
  transition: background .15s;
}
.vnm-pc-btn:last-child { border-bottom: none; }
.vnm-pc-btn:hover { background: var(--bg-2); }

/* ── Floor plan overlay sub-panel controls ───────────────────────────────── */
.layer-subpanel {
  padding: 6px 10px 8px 28px;
  background: rgba(0,0,0,0.03);
  border-left: 2px solid rgba(45,212,191,0.25);
  margin: 0 0 4px 0;
}
.ov-variants {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ov-variant-opt {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: var(--fs-11);
  color: var(--slate-600);
  cursor: pointer;
}
.ov-variant-opt input { cursor: pointer; accent-color: var(--accent-teal); }
.ov-opacity-row { display: flex; flex-direction: column; gap: 4px; }
.ov-opacity-label { font-size: 10px; color: var(--slate-400); text-transform: uppercase; letter-spacing: 0.05em; }
.ov-opacity-presets { display: flex; gap: 4px; }
.ov-preset {
  flex: 1;
  padding: 3px 0;
  font-size: 10px;
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 4px;
  cursor: pointer;
  color: var(--slate-600);
  transition: background .15s;
}
.ov-preset.active, .ov-preset:hover {
  background: rgba(45,212,191,0.15);
  border-color: rgba(45,212,191,0.4);
  color: var(--accent-teal);
}
.ov-opacity-slider {
  accent-color: var(--accent-teal);
  cursor: pointer;
}

/* ── Universal search ── */
#vnm-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
#vnm-search-btn:hover { background: rgba(255,255,255,0.1); }

#vnm-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  background: rgba(28,25,23,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .2s cubic-bezier(.4,0,.2,1);
}
#vnm-search-overlay.vnm-search-visible { opacity: 1; }

#vnm-search-bar {
  position: fixed;
  top: calc(8px + var(--safe-t, 0px));
  left: 8px;
  right: 8px;
  background: var(--surface, var(--surface-dark));
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  padding: 6px 10px;
  gap: 8px;
  z-index: 601;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .25s cubic-bezier(.4,0,.2,1), transform .25s cubic-bezier(.4,0,.2,1);
}
#vnm-search-overlay.vnm-search-visible #vnm-search-bar {
  opacity: 1;
  transform: translateY(0);
}

#vnm-search-input {
  flex: 1;
  border: none;
  background: none;
  font-size: var(--fs-16); /* 16px = no iOS auto-zoom */
  color: var(--text, #f8fafc);
  outline: none;
  min-width: 0;
}
/* Placeholder previously used a near-white rgba() left over from an assumed
   dark search-bar background; #vnm-search-bar actually renders on the app's
   real (light) --surface (#FFFFFF — see app.css:16, never redefined), the
   same bug already fixed once for .vsr-sub below. Use --text-dim (the app's
   existing most-de-emphasized text token) so it's legible against white. */
#vnm-search-input::placeholder { color: var(--text-dim); }
#vnm-search-input::-webkit-search-cancel-button { display: none; }

#vnm-search-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text, #f8fafc);
  opacity: 0.65;
  font-size: var(--fs-16);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
#vnm-search-close:hover { opacity: 1; }

#vnm-search-results {
  position: fixed;
  top: calc(62px + var(--safe-t, 0px));
  left: 8px;
  right: 8px;
  max-height: 55vh;
  max-height: 55dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface, var(--surface-dark));
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  z-index: 601;
}

.vsr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  min-height: 44px; /* iOS tap target */
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.vsr-row:last-child { border-bottom: none; }
.vsr-row:hover, .vsr-row:focus { background: var(--bg-2); outline: none; }
.vsr-row.vsr-empty { cursor: default; color: var(--text-muted); font-size: var(--fs-13); }
.vsr-row.vsr-empty:hover { background: none; }

.vsr-icon { font-size: var(--fs-16); flex-shrink: 0; }
.vsr-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.vsr-label-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vsr-label { font-size: var(--fs-14); font-weight: 600; color: var(--text, #f8fafc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }

/* Type chip — disambiguates rows that share a label (e.g. a hotel and its
   floor-plan entry both named "Caesars Palace"). Reuses the app's existing
   category color tokens so it reads as part of the same system as WSOP chips. */
.vsr-chip {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1.4;
  flex-shrink: 0;
}
.vsr-chip-hotel     { background: rgba(2,132,199,0.12);  color: var(--col-hotel); }
.vsr-chip-venue     { background: rgba(124,58,237,0.12); color: var(--col-venue); }
.vsr-chip-show      { background: rgba(124,58,237,0.12); color: var(--col-venue); }
.vsr-chip-floorplan { background: rgba(217,119,6,0.12);  color: var(--gold); }

.vsr-meta { display: flex; align-items: center; gap: 5px; min-width: 0; }
.vsr-meta-dot { font-size: var(--fs-12); color: var(--text-dim); }
/* Sub-text uses the shared muted-text token (matches .hrl-resort, .rfi-label,
   etc.) — the previous hardcoded near-white rgba() was unreadable on the
   app's light (white) surface. */
.vsr-sub { font-size: var(--fs-12); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Star rating — filled stars in gold to the rating value, remainder in the
   dim token, instead of a single flat grey string that read as broken/unloaded.
   Never rendered when rating data is absent (see search.js: e.rating is 0/undefined). */
.vsr-stars { font-size: var(--fs-11); letter-spacing: 1px; flex-shrink: 0; }
.vsr-stars-filled { color: var(--gold); }
.vsr-stars-empty { color: var(--text-dim); }

/* Staggered rise — applied only to the first results render right after the overlay
   opens (JS toggles .vsr-stagger), never on per-keystroke re-renders, so retyping
   doesn't re-flicker the rows in. Capped at 6 rows; any row past that just slides in
   with the last delay. Transform-only (no opacity keyframe): fill-mode:both holds
   the "from" keyframe's styles during animation-delay, so an opacity:0->1 keyframe
   left a row non-hit-testable for up to ~390ms right after render (later rows get
   .17s delay + .22s duration) — a real, independent micro-regression from this
   animation, though NOT the cause of a since-retracted 30s click-timeout report
   (that was a test-locator ambiguity, unrelated). Fixing it anyway: rows are now
   fully opaque and hit-testable the instant they're inserted; only position animates. */
@keyframes vnm-vsr-row-in {
  from { transform: translateY(6px); }
  to   { transform: translateY(0); }
}
#vnm-search-results.vsr-stagger .vsr-row {
  animation: vnm-vsr-row-in .22s cubic-bezier(.4,0,.2,1) both;
}
#vnm-search-results.vsr-stagger .vsr-row:nth-child(1) { animation-delay: .02s; }
#vnm-search-results.vsr-stagger .vsr-row:nth-child(2) { animation-delay: .05s; }
#vnm-search-results.vsr-stagger .vsr-row:nth-child(3) { animation-delay: .08s; }
#vnm-search-results.vsr-stagger .vsr-row:nth-child(4) { animation-delay: .11s; }
#vnm-search-results.vsr-stagger .vsr-row:nth-child(5) { animation-delay: .14s; }
#vnm-search-results.vsr-stagger .vsr-row:nth-child(n+6) { animation-delay: .17s; }

@media (prefers-reduced-motion: reduce) {
  #vnm-search-overlay,
  #vnm-search-bar,
  #vnm-search-results.vsr-stagger .vsr-row {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Hide competing bottom widgets while search is open */
body.vnm-search-open #hotel-rail-bar,
body.vnm-search-open #tonight-deals-rail,
body.vnm-search-open #trip-chips-bar,
body.vnm-search-open #food-search-btn,
body.vnm-search-open #date-bar-chip,
body.vnm-search-open #date-nudge-banner,
body.vnm-search-open #save-trip-fab,
body.vnm-search-open #tdr-reopen { display: none !important; }
body.vnm-search-open #mobile-sheet { transform: translateY(110%) !important; visibility: hidden; }

/* Date quick-select chips inside date picker popup */
.date-quick-chips {
  display: flex;
  gap: 8px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  margin-bottom: 0;
}
.dqc {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  color: var(--text);
  font-size: var(--fs-13);
  padding: 5px 14px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
}
.dqc:hover { background: rgba(249,115,22,0.12); border-color: var(--accent-orange); color: var(--accent-orange); }

/* Hotel drawer enrichment */
#hdb-enrichment { padding: 0 16px; margin-bottom: 8px; }
.hdb-review { font-size: var(--fs-13); color: var(--text, #1C1917); margin-bottom: 6px; }
.hdb-facilities { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.hdb-facility {
  background: rgba(2,132,199,0.10);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: var(--fs-12);
  color: var(--text);
}
.hdb-checkin { font-size: var(--fs-12); color: var(--slate-500); margin-bottom: 4px; }

/* Walk time — hotel drawer + callout card */
.hdb-walktime {
  font-size: var(--fs-12);
  color: var(--slate-500);
  padding: 0 0 6px;
  margin-bottom: 2px;
}
.vc-walk {
  font-size: var(--fs-12);
  color: var(--slate-500);
  margin-top: 2px;
  display: inline-block;
}

/* Save to Trip button. Its only caller outside #vnm-callout is hotels.js,
   which appends it into #hotel-detail-bar — a real (always-white) surface,
   not the dark surface these rgba(248,250,252,…) values were written for.
   Reuse the same light-surface treatment #vnm-callout .vnm-save-pin already
   uses below, since that's the one variant that was actually tuned for a
   light background. */
.vnm-save-pin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: var(--radius-xl);
  color: var(--slate-600);
  font-size: var(--fs-13);
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.15s;
  margin: 8px 16px 4px;
  font-family: inherit;
  line-height: 1;
}
.vnm-save-pin:hover { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.22); }
.vnm-save-pin.pin-saved { border-color: var(--accent-rose); color: var(--accent-rose); background: rgba(244,63,94,0.08); }
.vnm-save-pin.pin-saved:hover { background: rgba(244,63,94,0.16); }
/* In callout (light background) */
#vnm-callout .vnm-save-pin {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.14);
  color: var(--slate-600);
  margin: 8px 0 0;
  width: 100%;
  justify-content: center;
}
#vnm-callout .vnm-save-pin:hover { background: rgba(0,0,0,0.08); }

/* ── Nearby section (hotel drawer) ── */
.hdb-nearby { padding: 12px 16px 0; border-top: 1px solid rgba(0,0,0,0.08); margin-top: 8px; }
.hdb-nearby-header { font-size: var(--fs-11); font-weight: 600; color: var(--slate-400); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.hdb-nearby-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; text-decoration: none; color: var(--text); font-size: var(--fs-13); border-bottom: 1px solid var(--border); }
.hdb-nearby-row:last-child { border-bottom: none; }
.hdb-nearby-row--static { cursor: default; }
.hdb-nearby-row--static .hdb-nearby-name { color: var(--slate-400); }
.hdb-nearby-icon { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }
.hdb-nearby-name { flex: 1; font-weight: 500; }
.hdb-nearby-dist { font-size: var(--fs-11); color: var(--slate-400); white-space: nowrap; }

/* ── Post-booking return panel ── */
.booking-return-panel {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: var(--surface-darker); border: 1px solid rgba(248,250,252,0.15);
  border-radius: var(--radius-lg); padding: 16px 20px; width: calc(100% - 32px); max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5); z-index: 9000;
  animation: brpSlideUp 0.3s ease;
}
.brp-header { font-size: var(--fs-16); font-weight: 700; color: #f8fafc; margin-bottom: 6px; }
.brp-body { font-size: var(--fs-13); color: rgba(248,250,252,0.65); margin-bottom: 14px; line-height: 1.5; }
.brp-actions { display: flex; gap: 8px; }
.brp-btn { flex: 1; padding: 10px; border-radius: var(--radius-md); border: none; font-size: var(--fs-13); font-weight: 600; cursor: pointer; }
.brp-primary { background: var(--accent-rose); color: white; }
.brp-secondary { background: rgba(248,250,252,0.1); color: rgba(248,250,252,0.7); }
@keyframes brpSlideUp { from { transform: translateX(-50%) translateY(20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
#vnm-callout .vnm-save-pin.pin-saved { color: var(--col-race); border-color: var(--col-race); background: rgba(225,29,72,0.06); }

/* ── Floor toast pills (overlays.js _spawnFloorToast family) ── */
@keyframes vnm-toast-fade-out {
  from { transform: translateX(-50%) translateY(0);   opacity: 1; }
  to   { transform: translateX(-50%) translateY(8px); opacity: 0; }
}
.vnm-toast-pill { animation: brpSlideUp 0.28s cubic-bezier(.4,0,.2,1) both; }
.vnm-toast-pill.vnm-toast-exit { animation: vnm-toast-fade-out 0.18s cubic-bezier(.4,0,.2,1) both; }
@media (prefers-reduced-motion: reduce) {
  .vnm-toast-pill, .vnm-toast-pill.vnm-toast-exit {
    animation: none !important;
    transform: translateX(-50%) !important;
    opacity: 1 !important;
  }
}

/* ── GPS Accuracy Feedback ───────────────────────────────────────────────── */
/* Dull the location dot when GPS accuracy is poor (>50m radius) */
body.gps-inaccurate .maplibregl-user-location-dot {
  background: var(--slate-400) !important;
  box-shadow: 0 0 0 2px rgba(100,116,139,0.6) !important;
}
body.gps-inaccurate .maplibregl-user-location-dot::before {
  background: rgba(148,163,184,0.3) !important;
}

/* WiFi help banner */
#gps-wifi-banner {
  position: fixed;
  bottom: calc(var(--bottom-clear, 80px) + 8px);
  left: 12px; right: 12px;
  z-index: var(--z-opacity-slider);
  background: rgba(15,23,42,0.93);
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: 12px;
  padding: 10px 14px;
  display: none;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: var(--fs-13);
  color: #e2e8f0;
  line-height: 1.4;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
body.gps-inaccurate #gps-wifi-banner:not(.dismissed) {
  display: flex;
}
body.hdb-open #gps-wifi-banner,
body.pdb-open #gps-wifi-banner { display: none !important; }
#gps-wifi-banner-close {
  background: none; border: none; color: var(--slate-500); cursor: pointer;
  font-size: 18px; padding: 2px 4px; line-height: 1; flex-shrink: 0;
  min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center;
}
#gps-wifi-banner-close:hover { color: #e2e8f0; }

/* ── iOS / Apple HIG: 44×44px minimum tap targets ───────────────────────────
   Interactive controls below 44×44 are hard to tap reliably on iPhone.
   Elements in our own CSS are resized directly above.  Rules below override
   JS-injected <style> blocks (floor-live-bar.js, floor-card.js,
   floor-proximity.js) which insert their own selectors after app.css loads;
   !important is required to beat same-specificity injected rules.         */

/* floor-live-bar.js chips */
#vnm-live-bar .vnm-chip { min-height: 44px !important; }

/* floor-card.js close button */
.vnm-fc-close {
  min-width: 44px !important; min-height: 44px !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
}

/* floor-proximity.js pill and its close button */
.vnm-floor-prox-pill { min-height: 44px; }
.fnp-close {
  min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
}

/* Opacity slider controls (poi-popup.css) */
.vnm-op-auto  { min-width: 44px; min-height: 44px; }
.vnm-op-thumb { min-width: 44px; min-height: 44px; }

/* Restaurant legend open/close button */
.vnm-rest-legend-btn { min-height: 44px; }

/* ── Header theme toggle (task #64) ──────────────────────────────────────
   3-segment Auto/Light/Dark pill, wired live (no reload) by theme-toggle.js
   via window.VNM_applyTheme. Sized to stay a compact utility control — three
   26px segments + 2px padding/gaps ≈ 86px total, in the same header slot
   (order:3, see nav order-priority comment above) the old single 32px
   round button occupied; verified it doesn't crowd Explore at 390px. */
#vnm-theme-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  flex-shrink: 0;
}
#vnm-theme-toggle .vtt-seg {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.6;
}
#vnm-theme-toggle .vtt-seg:hover { background: rgba(255,255,255,0.1); opacity: 0.85; }
#vnm-theme-toggle .vtt-seg[aria-pressed="true"] {
  background: rgba(255,255,255,0.22);
  opacity: 1;
}
:root[data-theme="dark"] #vnm-theme-toggle { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.10); }
:root[data-theme="dark"] #vnm-theme-toggle .vtt-seg:hover { background: rgba(255,255,255,0.09); }
:root[data-theme="dark"] #vnm-theme-toggle .vtt-seg[aria-pressed="true"] { background: rgba(255,255,255,0.18); }

/* Visually-hidden but screen-reader-accessible label text (each .vtt-seg's
   icon is aria-hidden; this carries the real accessible name). */
.vnm-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;
}

/* ── Dark-chrome sweep: leftover literals that assumed a light surface and
   don't self-correct via the token remap above (subtle rgba(0,0,0,X) overlays
   used for hover/borders on what's now a dark surface, plus the couple of
   components with their own hardcoded hex). Same components, same roles,
   just the inverse-luminance overlay for a dark surface. Flat selectors to
   match this file's convention (no CSS nesting used elsewhere). */
:root[data-theme="dark"] .sheet-handle-pill         { background: rgba(255,255,255,0.20); }
:root[data-theme="dark"] .drawer-close-btn          { background: rgba(255,255,255,0.10); color: var(--slate-400); }
:root[data-theme="dark"] .drawer-close-btn:active   { background: rgba(255,255,255,0.20); }
:root[data-theme="dark"] .layer-panel-close:hover   { background: rgba(255,255,255,0.08); }
:root[data-theme="dark"] .layer-help-btn:hover      { background: rgba(255,255,255,0.10); }
:root[data-theme="dark"] .mfg-close:hover           { background: rgba(255,255,255,0.10); }
:root[data-theme="dark"] .date-quick-chips          { border-bottom-color: rgba(255,255,255,0.10); }
:root[data-theme="dark"] .vnm-save-pin              { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.16); }
:root[data-theme="dark"] .vnm-save-pin:hover        { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.28); }
:root[data-theme="dark"] #vnm-callout .vnm-save-pin { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.16); }
:root[data-theme="dark"] .hdb-nearby                { border-top-color: rgba(255,255,255,0.10); }
:root[data-theme="dark"] #gps-wifi-banner-close:hover { color: #f1f5f9; }

/* ── Dark-mode contrast fix (review Finding-1) ─────────────────────────────
   var(--slate-500)/-600 are fixed (non-remapped) palette tokens, unlike
   --text-muted/-dim which the :root[data-theme="dark"] block above already
   lifts for AA. Several secondary-text spots were wired to the raw slate
   tokens instead of the semantic ones, so they landed at ~3:1 (slate-500)
   or ~1.9:1 (slate-600) against the new dark surfaces — below the 4.5:1 body
   text needs. Dark-only overrides here, so light stays byte-identical to
   what it already was (no new light-mode deltas). The three CSS-class rules
   (.hdb-checkin/.hdb-walktime/.vc-walk, plus the new .hdb-meta-line/
   -price-suffix/-resort-fee classes) win on selector specificity alone; the
   JS-inline ones (hotels.js/callout.js set color via style="") need
   !important to beat an inline style at all. */
:root[data-theme="dark"] .hdb-checkin,
:root[data-theme="dark"] .hdb-walktime,
:root[data-theme="dark"] .vc-walk,
:root[data-theme="dark"] .hdb-meta-line,
:root[data-theme="dark"] .hdb-price-suffix,
:root[data-theme="dark"] .hdb-resort-fee { color: var(--text-muted) !important; }
:root[data-theme="dark"] #callout-desc { color: var(--text-muted) !important; }
/* Close "×" icon — was the fixed slate-600 (~1.9:1), near-invisible on the
   dark callout; match the drawer-close-btn's dark icon treatment above. */
:root[data-theme="dark"] #callout-close { color: var(--slate-400) !important; }
/* Search placeholder — --text-dim resolves to slate-600 in dark (~1.9:1);
   placeholders can be subtle but not unreadable, so this is scoped to just
   the search input rather than re-tuning --text-dim globally (that token
   also drives purely decorative dim states elsewhere that are fine as-is). */
:root[data-theme="dark"] #vnm-search-input::placeholder { color: var(--slate-500); }
