/* Embedded Local Variable Font for Instant Offline Zero-Shift Paint */
@font-face {
  font-family: 'DM Sans';
  src: url('./fonts/DMSans-VariableFont.woff2') format('woff2-variations'),
       url('./fonts/DMSans-VariableFont.woff2') format('woff2');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

/* Eats Map Night Market Brand & Sun Map Layout Architecture */
:root {
  /* Typography Stack: DM Sans Bedrock + Safe Multi-OS Fallback */
  --font-primary: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --bg-dark: #0b0c10;
  --bg-card: #171923;
  --bg-surface: #13151f;
  --bg-surface-elevated: #1e2230;
  --header-footer-bg: #10121a;
  --border-color: #2b2f42;
  --border-subtle: #1e2230;
  
  /* FoodieLand Neon Palette */
  --fl-orange: #ff5e36;
  --fl-yellow: #ffc837;
  --fl-pink: #ff2a6d;
  --fl-teal: #05d9e8;
  --fl-purple: #9d4edd;
  --fl-green: #00f090;
  --fl-amber: #ff9f1c;
  --alert-red: #ff3b30;

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent: var(--fl-orange);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-glow: 0 0 20px rgba(255, 94, 54, 0.25);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}

html, body, button, input, select, textarea {
  font-family: var(--font-primary);
}

html, body {
  background-color: #000000;
  color: var(--text-primary);
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app-container, .app-container {
  width: 100%;
  max-width: 480px;
  height: 100%;
  height: 100dvh;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-dark);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

/* TOP APP BAR (Snapped Flush to Top of Viewport) */
#top-bar {
  background-color: var(--header-footer-bg);
  border-bottom: none; /* remove dividing line between buttons and Eats Map brand margin */
  padding: 8px 8px 4px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 100;
}

/* BRAND & FESTIVAL STATUS BAND (Sits seamlessly in the margin directly below the top buttons) */
.brand-status-band {
  background-color: var(--header-footer-bg); /* matches top button background seamlessly */
  border-bottom: 1px solid var(--border-color);
  padding: 2px 12px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  z-index: 95;
}

#brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sun-icon {
  font-size: 1.05rem;
  line-height: 1;
}

#festival-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

#top-bar-event-name {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.status-badge {
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 99px;
  letter-spacing: 0.04em;
}

.status-badge.live {
  background: rgba(0, 240, 144, 0.15);
  color: var(--fl-green);
  border: 1px solid rgba(0, 240, 144, 0.4);
}

/* TOP NAV PILLS */
#top-nav-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.top-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  cursor: pointer;
  transition: var(--transition);
}

.top-btn:active, .top-btn.active {
  border-color: var(--fl-orange);
  background: rgba(255, 94, 54, 0.15);
  color: #fff;
}

.btn-top-icon {
  font-size: 1.05rem;
  line-height: 1;
  margin-bottom: 2px;
}

.dialog-modal-title {
  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.01em;
  margin: 0;
}

.timeline-event-header h3 {
  font-family: var(--font-primary);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}

.btn-top-title {
  font-family: var(--font-primary);
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.btn-top-subtitle {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--fl-yellow);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ALLERGEN PREFERENCE DRAWER (Sticky inside Menu Viewport & Modal Card) */
.allergen-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  flex-shrink: 0;
  z-index: 90;
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.allergen-bar.menu-sticky-top {
  position: sticky;
  top: -20px; /* locks flush to the top edge of scrollable #main-viewport */
  margin: -20px -16px 14px; /* expands to the container boundaries */
  border-top: 1px solid var(--border-color);
  z-index: 95;
}

/* First-visit Attention Flash: High-Impact Golden Amber Illumination (450ms) */
@keyframes menu-allergen-flash-glow {
  0% {
    background-color: var(--fl-yellow);
    border-color: #ffffff;
    box-shadow: 0 0 24px rgba(255, 200, 55, 0.85);
  }
  40% {
    background-color: var(--fl-yellow);
    border-color: #ffffff;
    box-shadow: 0 0 28px rgba(255, 200, 55, 0.95);
  }
  100% {
    background-color: var(--bg-surface);
    border-color: var(--border-color);
    box-shadow: none;
  }
}

.allergen-bar.flash-attention {
  animation: menu-allergen-flash-glow 0.65s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

.allergen-bar.flash-attention .allergen-title span,
.allergen-bar.flash-attention .chevron-toggle {
  color: #0b0c10 !important;
  font-weight: 900 !important;
  transition: color 0.6s ease;
}

.allergen-bar.flash-attention .count-pill {
  background: #000000 !important;
  color: var(--fl-yellow) !important;
  border-color: #000000 !important;
}

/* FULL-WIDTH SCROLLING SECTION STRIPES (EDGE-TO-EDGE ACCROSS VIEWPORT) */
.section-stripe-stage {
  margin: 14px -16px 14px;
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, rgba(38, 20, 52, 0.95) 0%, rgba(24, 15, 36, 0.95) 100%);
  border-top: 1px solid rgba(255, 94, 54, 0.25);
  border-bottom: 1px solid rgba(255, 94, 54, 0.25);
}

.section-stripe-featured {
  margin: 14px -16px -36px;
  padding: 16px 16px 36px;
  background: linear-gradient(180deg, rgba(16, 24, 38, 0.95) 0%, rgba(11, 14, 22, 0.98) 100%);
  border-top: 1px solid rgba(5, 217, 232, 0.25);
}

/* Large Eats Map Dietary Card Button (Matching Yellow Golden Palette) */
.eats-map-dietary-card {
  background: linear-gradient(135deg, rgba(255, 200, 55, 0.16) 0%, rgba(255, 94, 54, 0.12) 100%);
  border: 1.5px solid rgba(255, 200, 55, 0.55);
  border-left: 5px solid var(--fl-yellow);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0 16px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.eats-map-dietary-card:hover, .eats-map-dietary-card:active {
  border-color: var(--fl-yellow);
  background: linear-gradient(135deg, rgba(255, 200, 55, 0.26) 0%, rgba(255, 94, 54, 0.18) 100%);
  box-shadow: 0 0 20px rgba(255, 200, 55, 0.45);
  transform: translateY(-1px);
}

.allergen-header {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.allergen-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.allergen-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-pill {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--fl-yellow);
  font-size: 0.80rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 99px;
}

.chevron-toggle {
  font-size: 0.80rem;
  color: var(--fl-orange);
  transition: transform 0.2s ease;
}

.allergen-bar.is-expanded .chevron-toggle {
  transform: rotate(180deg);
}

.chips-tray {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  padding: 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.allergen-bar.is-expanded .chips-tray {
  max-height: 200px;
  padding: 8px 16px 16px;
}

/* MAIN SCROLLABLE VIEWPORT */
#main-viewport {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 16px 36px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
}

#main-viewport::-webkit-scrollbar {
  width: 4px;
}

#main-viewport::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

/* BOTTOM AREA (Cockpit Sloped 2x7 Coarse Grid Architecture: 2-Bay Left | 3-Bay Center Sun + Wings | 2-Bay Right) */
#bottom-bar, .dashboard-bottom {
  display: grid;
  grid-template-columns: 2fr 3fr 2fr; /* 2 / 7 (28.5%) | 3 / 7 (43%) | 2 / 7 (28.5%) */
  background-color: var(--header-footer-bg);
  border-top: 1px solid var(--border-color);
  padding: 8px 10px 10px;
  gap: 8px;
  z-index: 100;
  flex-shrink: 0;
  align-items: end;
  overflow: visible; /* prevents clipping of raised sun button and wing shoulders */
}

.home-btn-container {
  position: relative;
  height: 74px;
  margin-top: -24px; /* apply upward break to viewport boundary */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 105;
  width: 100%;
}

.bottom-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  width: 100%;
}

.bottom-btn:active {
  background: rgba(255, 94, 54, 0.15);
  transform: scale(0.97);
}

.bottom-btn.active {
  border-color: var(--fl-orange);
  background: rgba(255, 94, 54, 0.14);
}

/* Center Sun / Brand Raised Cockpit Anchor Button (Spans Full Width of the 3-Unit Central Bay) */
.bottom-btn.center-brand-btn {
  height: 74px;
  width: 100%;
  border-radius: 36px 36px 12px 12px;
  background: radial-gradient(ellipse at top center, #522209 0%, #241004 70%, #150902 100%);
  border: 2px solid var(--fl-orange);
  outline: 1.5px solid rgba(255, 200, 55, 0.6);
  box-shadow: 0 -6px 24px rgba(255, 94, 54, 0.75), 
              0 0 16px rgba(255, 200, 55, 0.4),
              inset 0 4px 14px rgba(255, 200, 55, 0.3),
              inset 0 -4px 12px rgba(0, 0, 0, 0.9);
  z-index: 105;
  padding: 6px 40px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  pointer-events: auto;
}

.bottom-btn.center-brand-btn:active {
  background: #451b06;
  transform: scale(0.98);
}

/* Wing Buttons: Transparent by default and tucked cleanly into upper corners */
.tiny-foot-btn {
  position: absolute;
  top: 6px;
  height: 32px;
  width: 32px;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: var(--radius-full);
  color: #cbd5e1;
  font-size: 1.15rem;
  font-weight: 900;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 106;
  transition: all 0.18s ease;
}

#btn-foot-map {
  left: 8px; /* tucked right into the upper left corner of Eats Map */
}

#btn-foot-help {
  right: 8px; /* tucked right into the upper right corner of Eats Map */
}

.tiny-foot-btn:hover, .tiny-foot-btn:active {
  background: rgba(255, 94, 54, 0.25);
  border: 1px solid var(--fl-orange);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(255, 94, 54, 0.6);
}

.nav-icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 2px;
}

.center-brand-btn .nav-icon {
  font-size: 2.1rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(255, 200, 55, 0.75));
  margin-bottom: 2px;
}

.nav-label {
  font-family: var(--font-primary);
  font-size: 0.82rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-label.one-line {
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--fl-yellow);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-subtext {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--fl-teal);
  margin-top: 2px;
}

/* Jumbo Grounds Map Button */
.jumbo-map-btn {
  width: 100%;
  background: linear-gradient(135deg, rgba(5, 217, 232, 0.18) 0%, rgba(255, 94, 54, 0.14) 100%);
  border: 1.5px solid var(--fl-teal);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.jumbo-map-btn:hover, .jumbo-map-btn:active {
  border-color: var(--fl-yellow);
  background: linear-gradient(135deg, rgba(5, 217, 232, 0.28) 0%, rgba(255, 94, 54, 0.22) 100%);
  box-shadow: 0 0 20px rgba(5, 217, 232, 0.45);
  transform: translateY(-1px);
}

/* MENU STICKY BOTTOM SEARCH BAR */
.menu-bottom-search-wrapper {
  position: sticky;
  bottom: -36px; /* pins flush to bottom of scrollable viewport */
  margin: 16px -16px -36px;
  padding: 10px 16px 14px;
  background: rgba(11, 12, 16, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  z-index: 85;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.6);
}

.menu-bottom-search-input {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 11px 14px 11px 36px;
  color: #fff;
  font-size: 0.90rem;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

.menu-bottom-search-input:focus {
  border-color: var(--fl-orange);
  box-shadow: 0 0 12px rgba(255, 94, 54, 0.4);
}

/* CUISINE & GENRE SWIPER PILLS (Shared across Eats Map Home & Menu) */
.cuisine-swiper-tray, .menu-genre-tray {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cuisine-swiper-tray::-webkit-scrollbar, .menu-genre-tray::-webkit-scrollbar {
  display: none;
}

.cuisine-map-pill, .menu-genre-chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: #f1f5f9;
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cuisine-map-pill:hover, .cuisine-map-pill:active,
.menu-genre-chip:hover, .menu-genre-chip:active {
  border-color: var(--fl-orange);
  background: rgba(255, 94, 54, 0.15);
  color: #fff;
  transform: translateY(-1px);
}

.cuisine-map-pill.active, .menu-genre-chip.active {
  background: var(--fl-orange);
  border-color: var(--fl-orange);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 94, 54, 0.6);
  transform: scale(1.04);
}

.menu-genre-chip.genre-latin.active, .cuisine-map-pill.pill-latin:active {
  background: #ff5e36;
  border-color: #ff5e36;
  color: #fff;
}

.menu-genre-chip.genre-sweet.active, .cuisine-map-pill.pill-sweet:active {
  background: #ff2a6d;
  border-color: #ff2a6d;
  color: #fff;
}

.menu-genre-chip.genre-asian.active, .cuisine-map-pill.pill-asian:active {
  background: #ffc837;
  border-color: #ffc837;
  color: #000;
}

.menu-genre-chip.genre-bbq.active, .cuisine-map-pill.pill-bbq:active {
  background: #05d9e8;
  border-color: #05d9e8;
  color: #000;
}

.btn-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.btn-title {
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.btn-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* VENUE SUB-HEADER ACTIONS */
.sub-header-venue {
  display: flex;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-color);
  padding: 6px 10px;
  gap: 8px;
  justify-content: space-around;
  flex-shrink: 0;
}

.sub-venue-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sub-venue-btn.car-saved {
  border-color: var(--fl-green);
  color: var(--fl-green);
}

.sub-venue-btn.nav-directions {
  border-color: var(--fl-teal);
  color: #fff;
}

/* Tiny dev GPS status indicator dot inside button capsule */
.gps-dot-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #64748b; /* Default / Pending (Grey) */
  display: inline-block;
  flex-shrink: 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.gps-dot-indicator.granted {
  background-color: var(--fl-green); /* Green = Live GPS active & permitted */
  box-shadow: 0 0 6px rgba(0, 240, 144, 0.7);
}

.gps-dot-indicator.denied {
  background-color: var(--alert-red); /* Red = Permission denied or error */
}

.gps-dot-indicator.prompt {
  background-color: var(--fl-amber); /* Amber = Prompting / checking */
}

/* STATUS BANNER WITH F / C TOGGLE */
.status-banner {
  background: rgba(255, 94, 54, 0.15);
  border-bottom: 1px solid rgba(255, 94, 54, 0.3);
  padding: 4px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fl-yellow);
  flex-shrink: 0;
  gap: 8px;
}

.banner-center-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  text-align: center;
  overflow: hidden;
}

.banner-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.temp-unit-toggle {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--fl-orange);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.temp-unit-toggle:hover {
  background: var(--fl-orange);
  color: #fff;
}

/* ALLERGEN FLAG TRAY (Collapsible Dropdown Overlay) */
.allergen-pref-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 1000;
  flex-shrink: 0;
}

.allergen-toggle-header {
  width: 100%;
  background: transparent;
  border: none;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--text-primary);
  outline: none;
  transition: background 0.15s ease;
}

.allergen-toggle-header:hover, .allergen-toggle-header:active {
  background: rgba(255, 94, 54, 0.08);
}

.allergen-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.allergen-title-icon {
  font-size: 0.85rem;
}

.allergen-title-text {
  font-size: 0.76rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.02em;
}

.allergen-badge {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.allergen-badge.has-active {
  background: rgba(255, 159, 28, 0.25);
  border-color: var(--fl-amber);
  color: var(--fl-yellow);
}

.allergen-caret {
  font-size: 0.65rem;
  color: var(--fl-orange);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.allergen-pref-bar.is-expanded .allergen-caret {
  transform: rotate(180deg);
}

/* Dropdown Expansion Panel (Covers roughly halfway into main area) */
.allergen-expand-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-bottom: 2px solid var(--fl-orange);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.9);
  padding: 12px 14px 16px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.3s ease;
  z-index: 1100;
}

.allergen-pref-bar.is-expanded .allergen-expand-panel {
  max-height: 48vh;
  opacity: 1;
  pointer-events: auto;
  overflow-y: auto;
  scrollbar-width: none;
}
.allergen-pref-bar.is-expanded .allergen-expand-panel::-webkit-scrollbar {
  display: none;
}

.allergen-panel-instruction {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 500;
}

.allergen-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.82rem;
  padding: 8px 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 700;
  font-family: inherit;
}

.chip-btn:hover {
  border-color: var(--text-secondary);
  color: #fff;
}

.chip-btn.active {
  background: rgba(255, 94, 54, 0.22);
  border-color: var(--fl-orange);
  color: var(--fl-yellow);
  font-weight: 800;
  box-shadow: 0 0 10px rgba(255, 94, 54, 0.3);
}

.chip-btn-custom {
  border-style: dashed;
  color: var(--fl-teal);
  border-color: rgba(5, 217, 232, 0.4);
}
.chip-btn-custom:hover {
  border-color: var(--fl-teal);
  color: #fff;
}
.chip-btn-custom.active {
  background: rgba(5, 217, 232, 0.18);
  border-color: var(--fl-teal);
  border-style: solid;
  color: #fff;
  box-shadow: 0 0 10px rgba(5, 217, 232, 0.35);
}

/* Custom Active Slot Display Bar */
.custom-active-tray {
  margin-top: 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--fl-teal);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
}

.custom-active-name {
  color: #fff;
  font-weight: 700;
}

.custom-remove-btn {
  background: transparent;
  border: none;
  color: var(--fl-orange);
  font-weight: 800;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.8rem;
}

/* Disclaimer at bottom of dropdown */
.allergen-disclaimer {
  margin-top: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Dimming Backdrop overlay */
.allergen-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 900;
}

.allergen-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Embedded Header Row Back Chevron Button */
.page-back-chevron {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--fl-yellow);
  font-size: 0.85rem;
  font-weight: 800;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 8px;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.page-back-chevron:hover, .page-back-chevron:active {
  background: var(--fl-orange);
  border-color: var(--fl-orange);
  color: #fff;
  transform: translateX(-1px);
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.page-header-left {
  display: flex;
  align-items: center;
  flex: 1;
}

/* CENTER PANEL: SQUARE VIEWPORT */
.viewport-square {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  border-bottom: 2px solid var(--border-color);
  position: relative;
  background-color: #10121a;
  overflow: hidden;
  z-index: 1;
}

/* Ensure Leaflet controls and vector map canvas stay beneath header dropdowns */
#leaflet-map {
  background-color: #0b0c10 !important;
  background-image: 
    radial-gradient(circle at center, rgba(255, 94, 54, 0.04) 0%, transparent 70%),
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 32px 32px;
  z-index: 1 !important;
}

.leaflet-pane, .leaflet-top, .leaflet-bottom {
  z-index: 10 !important;
}

/* Custom Vector Map Zoom Buttons (Clean Dark Theme) */
.leaflet-control-zoom {
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
}

.leaflet-control-zoom a {
  background-color: var(--bg-surface-elevated) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  transition: all 0.15s ease;
}

.leaflet-control-zoom a:hover {
  background-color: var(--fl-orange) !important;
  color: #ffffff !important;
}

/* Clickable Day Forecast Cards (Tapping jumps to that day's Program view) */
.forecast-day-card {
  padding: 10px 12px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.18s ease;
}

.forecast-day-card:hover, .forecast-day-card:active {
  border-color: var(--fl-orange);
  background: rgba(255, 94, 54, 0.08);
  transform: translateY(-1px);
}

.viewport-content {
  width: 100%;
  height: 100%;
  padding: 16px;
  overflow-y: auto;
  scrollbar-width: none;
}
.viewport-content::-webkit-scrollbar { display: none; }

/* Dedicated Top Back Row for Program View */
.program-top-back-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.program-back-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--fl-yellow);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.18s ease;
}

.program-back-btn:hover, .program-back-btn:active {
  background: var(--fl-orange);
  border-color: var(--fl-orange);
  color: #fff;
  transform: translateX(-2px);
}

/* Day Navigator Bar in Program View */
.day-navigator-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 14px;
}

.day-nav-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.day-nav-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  border-color: #333;
}

.day-nav-label {
  text-align: center;
}

.day-nav-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  font-family: 'Outfit', sans-serif;
}

.day-nav-sub {
  font-size: 0.72rem;
  color: var(--fl-teal);
  font-weight: 600;
}

/* View Mode Switcher (List vs Map) */
.view-mode-toggle {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.view-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.view-mode-btn.active {
  background: var(--fl-orange);
  color: #fff;
}

/* Dish / Now Playing Carousel Cards */
.dish-header {
  margin-bottom: 8px;
}

.dish-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
}

.dish-header p {
  font-size: 0.82rem;
  color: var(--fl-teal);
  font-weight: 600;
}

.dish-details-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 12px;
}

.dish-controller {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 12px;
}

.ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px 12px;
}

.dish-index {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* Vendor Cards */
.vendor-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.vendor-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 18px;
  cursor: pointer;
  transition: var(--transition);
}

.vendor-card:active {
  transform: scale(0.98);
  border-color: var(--fl-orange);
}

.vendor-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.booth-badge {
  background: linear-gradient(135deg, var(--fl-orange), var(--fl-pink));
  color: #fff;
  font-weight: 900;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(255, 94, 54, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  white-space: nowrap;
}

.booth-badge:hover, .booth-badge:active {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 4px 14px rgba(255, 94, 54, 0.6);
  border-color: #fff;
}

/* Zone Specific Color Coding */
.booth-badge.zone-latin {
  background: linear-gradient(135deg, #ff5e36, #ff9f1c);
  box-shadow: 0 2px 8px rgba(255, 94, 54, 0.4);
}

.booth-badge.zone-sweet {
  background: linear-gradient(135deg, #ff2a6d, #b5179e);
  box-shadow: 0 2px 8px rgba(255, 42, 109, 0.4);
}

.booth-badge.zone-asian {
  background: linear-gradient(135deg, #05d9e8, #0077b6);
  box-shadow: 0 2px 8px rgba(5, 217, 232, 0.4);
}

.booth-badge.zone-smokehouse {
  background: linear-gradient(135deg, #e63946, #9d0208);
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.4);
}

.allergen-warning-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 159, 28, 0.2);
  border: 1px solid var(--fl-amber);
  color: var(--fl-yellow);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

/* MAP PERMANENT TEXT LABELS BY DEFAULT */
.map-label-tooltip {
  background: rgba(16, 18, 26, 0.92) !important;
  border: 1px solid var(--border-color) !important;
  color: #ffffff !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  font-family: 'DM Sans', sans-serif !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.7) !important;
  white-space: nowrap !important;
}

/* Stage Event Card */
.stage-event-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.stage-event-card:hover, .stage-event-card:active {
  border-color: var(--fl-orange);
  background: rgba(255, 94, 54, 0.08);
}

/* Past / Concluded Events turn grey */
.stage-event-card.is-past,
.wishlist-card.is-past {
  opacity: 0.55;
  filter: grayscale(0.85);
  border-color: #334155;
  background: rgba(15, 23, 42, 0.6);
}

.stage-event-card.is-past:hover,
.wishlist-card.is-past:hover {
  opacity: 0.8;
  filter: grayscale(0.4);
}

.past-badge {
  background: #334155;
  color: #94a3b8;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.wishlist-remove-btn {
  background: rgba(255, 94, 54, 0.12);
  border: 1px solid rgba(255, 94, 54, 0.35);
  color: var(--fl-orange);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.wishlist-remove-btn:hover {
  background: var(--fl-orange);
  color: #fff;
}



/* Detail & Allergen Action Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  background: #151824;
  border: 2px solid var(--fl-orange);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  max-height: 82vh;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95), 0 0 20px rgba(255, 94, 54, 0.25);
  transform: scale(0.96) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-sheet {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  align-self: flex-end;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  border-color: var(--fl-orange);
  color: #fff;
}

.action-share-btn {
  background: linear-gradient(135deg, var(--fl-orange), var(--fl-pink));
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.78rem;
}

/* FOOTER QR CODE CARD & INTERACTIVE EXPANSION */
.qr-footer-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.qr-footer-compact {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qr-canvas-box {
  background: #ffffff;
  padding: 6px;
  border-radius: 8px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.qr-footer-card:hover .qr-canvas-box {
  transform: scale(1.03);
}

.qr-label-compact {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 4px;
}

.qr-brand-title {
  font-family: var(--font-primary);
  font-weight: 900;
  font-size: 1.15rem;
  line-height: 1.1;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.qr-subtext {
  font-size: 0.72rem;
  color: var(--fl-yellow);
  font-weight: 700;
  margin-top: 3px;
  text-transform: uppercase;
}

.qr-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* EXPANDED QR STATE */
.qr-footer-expanded {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

/* 2-RING BULLSEYE PULSE ANIMATION ON MAP */
@keyframes bullseye-pulse {
  0% {
    stroke-width: 2px;
    opacity: 0.95;
    transform: scale(0.95);
  }
  50% {
    stroke-width: 4px;
    opacity: 0.5;
    transform: scale(1.15);
  }
  100% {
    stroke-width: 2px;
    opacity: 0.95;
    transform: scale(0.95);
  }
}

.bullseye-ring-1 {
  animation: bullseye-pulse 1.6s infinite ease-in-out;
  transform-origin: center;
}

.bullseye-ring-2 {
  animation: bullseye-pulse 1.6s infinite ease-in-out 0.4s;
  transform-origin: center;
}

/* GROUNDS MAP LEGEND OVERLAY */
.map-legend-overlay {
  background: rgba(16, 18, 26, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.7rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  max-width: 145px;
}

.map-legend-overlay .legend-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
  color: var(--fl-yellow);
  font-size: 0.78rem;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 2px;
}

.map-legend-overlay .legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0;
  line-height: 1.2;
}

.map-legend-overlay .legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.8);
}

/* MAP PERMANENT TEXT LABELS BY DEFAULT */
.map-label-tooltip {
  background: rgba(16, 18, 26, 0.9) !important;
  border: 1px solid var(--border-color) !important;
  color: #ffffff !important;
  font-size: 0.66rem !important;
  font-weight: 700 !important;
  font-family: sans-serif !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6) !important;
  white-space: nowrap !important;
}

.map-label-tooltip::before {
  border-top-color: rgba(16, 18, 26, 0.9) !important;
}

.map-label-tooltip.amenity-label-wellness {
  border-color: #ff2a6d !important;
  color: #ff85a2 !important;
}

.map-label-tooltip.amenity-label-water {
  border-color: #00f090 !important;
  color: #79f8c4 !important;
}

/* Vector Parking Zone Tooltip */
.parking-label-tooltip {
  background: rgba(16, 18, 26, 0.85) !important;
  border: 1px dashed #05d9e8 !important;
  color: #05d9e8 !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  text-align: center !important;
  padding: 3px 8px !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7) !important;
}

.parking-label-tooltip::before {
  display: none !important;
}

.gate-marker-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-footer-expanded .qr-canvas-box {
  padding: 12px;
  border-radius: 12px;
}

.qr-footer-expanded .qr-brand-title {
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--fl-orange);
}

.qr-footer-expanded .qr-subtext {
  font-size: 0.76rem;
  color: #cbd5e1;
  text-transform: none;
  font-weight: 500;
}