/* ==========================================================================
   Custard MKE — Retro Cherry Diner & Classic Custard Stand Aesthetic
   ========================================================================== */

:root {
  --bg-page: #FAF5EE;
  --bg-card: #FFFFFF;
  --bg-subtle: #F4ECE1;
  --bg-pill: #EFE6D8;

  --ink: #1F1818;
  --ink-secondary: #5C4B4B;
  --ink-muted: #8C7A7A;

  --border: #E5D9CA;
  --border-strong: #D1BFA9;

  /* Retro Cherry Red Palette */
  --retro-red: #C81D25;
  --retro-red-dark: #9E1219;
  --retro-red-deep: #7A0D13;
  --retro-red-tint: #FCEBEC;
  --retro-red-border: #F2C2C5;

  /* Classic Cream & Soda Fountain Accents */
  --cream: #FFFDF9;
  --culvers-blue: #005696;
  --culvers-tint: #EAF3FA;

  --green-ok: #15803D;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-card: 0 3px 0 #E5D9CA, 0 4px 14px rgba(31, 24, 24, 0.05);
  --shadow-card-hover: 0 5px 0 #D1BFA9, 0 12px 26px rgba(200, 29, 37, 0.09);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  background-image: radial-gradient( rgba(200, 29, 37, 0.04) 1px, transparent 1px );
  background-size: 20px 20px;
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Navigation Header (Retro Cherry Red Banner, High Z-Index above Leaflet)
   ========================================================================== */
.site-nav {
  background: linear-gradient(180deg, var(--retro-red) 0%, var(--retro-red-dark) 100%);
  color: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 3000; /* Guaranteed to stay above Leaflet map panes (400-800) */
  border-bottom: 4px solid #FFFDF9;
  box-shadow: 0 3px 0 var(--retro-red-deep), 0 6px 20px rgba(122, 13, 19, 0.22);
}

.nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-link img {
  width: auto;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
  transition: transform 0.2s ease;
}

.brand-link:hover img {
  transform: scale(1.03);
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  text-shadow: 0 2px 0 rgba(122, 13, 19, 0.45);
}

.brand-wordmark span {
  color: #FFE8EC;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-item {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
  transition: all 0.15s ease;
}

.nav-item:hover, .nav-item.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.18);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #FFFDF9;
  color: var(--retro-red-dark);
  font-weight: 800;
  font-size: 0.86rem;
  padding: 0.52rem 1.05rem;
  border-radius: var(--radius-full);
  box-shadow: 0 3px 0 var(--retro-red-deep);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nav-cta:hover {
  background: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--retro-red-deep);
}

/* ==========================================================================
   Hero & Search Header
   ========================================================================== */
.hero-header {
  padding: 2.25rem 0 1.25rem;
}

.hero-top-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.3vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--retro-red-dark);
}

.hero-sub {
  font-size: 0.98rem;
  color: var(--ink-secondary);
  margin-top: 0.3rem;
}

/* Location Status Pill */
.loc-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-secondary);
  box-shadow: var(--shadow-card);
}

.loc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-muted);
}

.loc-dot.active {
  background: var(--retro-red);
  box-shadow: 0 0 0 3px rgba(200, 29, 37, 0.2);
}

.loc-retry-btn {
  background: none;
  border: none;
  color: var(--retro-red);
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  margin-left: 0.25rem;
}

/* Primary Control Deck */
.control-deck {
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.05rem 1.2rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.deck-row-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Tactile Segmented Filter: All | Local | Culver's */
.segmented-filter {
  display: inline-flex;
  background: var(--bg-pill);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.seg-btn {
  border: none;
  background: transparent;
  padding: 0.5rem 1.1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.seg-btn:hover {
  color: var(--ink);
}

.seg-btn.active {
  background: var(--retro-red);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(200, 29, 37, 0.28);
}

.seg-count {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--ink-secondary);
  background: rgba(255, 255, 255, 0.65);
  padding: 0.08rem 0.45rem;
  border-radius: var(--radius-full);
}

.seg-btn.active .seg-count {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}

/* Search Box */
.search-box {
  flex: 1 1 240px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 0.85rem;
  height: 44px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.search-box:focus-within {
  background: var(--bg-card);
  border-color: var(--retro-red);
}

.search-box input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.94rem;
  font-weight: 600;
}

.search-box input::placeholder {
  color: var(--ink-muted);
  font-weight: 500;
}

.clear-btn {
  display: none;
  border: none;
  background: var(--border);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.72rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Distance Filter & Map Toggle */
.deck-controls-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.distance-select {
  height: 44px;
  padding: 0 0.9rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--cream);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  outline: none;
}

.distance-select:hover {
  border-color: var(--retro-red);
}

.map-toggle-btn {
  height: 44px;
  padding: 0 1rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--retro-red-border);
  background: var(--retro-red-tint);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--retro-red-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
}

.map-toggle-btn:hover {
  border-color: var(--retro-red);
}

.map-toggle-btn.active {
  background: var(--retro-red);
  color: #fff;
  border-color: var(--retro-red);
}

/* Secondary Row: Day Scrubber Strip */
.deck-row-days {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

.day-strip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  max-width: 100%;
}

.day-pill {
  border: 1px solid transparent;
  background: transparent;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.day-pill:hover {
  background: var(--retro-red-tint);
  color: var(--retro-red-dark);
}

.day-pill.active {
  background: var(--retro-red);
  color: #FFFFFF;
}

.day-pill span {
  opacity: 0.85;
  font-weight: 500;
  margin-left: 0.2rem;
}

.results-meta {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-muted);
}

/* ==========================================================================
   Collapsible Interactive Map Drawer (Isolated Stacking Context)
   ========================================================================== */
.map-drawer {
  margin-top: 1rem;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: none;
  position: relative;
  z-index: 1;
  isolation: isolate; /* Prevents Leaflet child panes from escaping above .site-nav */
}

.map-drawer.open {
  display: block;
}

#custard-map {
  width: 100%;
  height: 390px;
  position: relative;
  z-index: 1;
}

.map-footer-bar {
  padding: 0.6rem 1rem;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.map-legend-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.35rem;
}

/* ==========================================================================
   Sponsored Posts & Ad Placements (Banner + In-Feed Native Ad Tile)
   ========================================================================== */
.top-ad-slot {
  margin-top: 1.25rem;
  background: linear-gradient(90deg, #FFFDF9 0%, #FCEBEC 100%);
  border: 1.5px solid var(--retro-red-border);
  border-radius: var(--radius-lg);
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-card);
}

.ad-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-full);
  background: #EFE6D8;
  color: var(--ink-secondary);
  border: 1px solid var(--border-strong);
}

.ad-badge.sponsored {
  background: #FEF3C7;
  color: #92400E;
  border-color: #FCD34D;
}

.custard-card.sponsored-card {
  border-top: 4px solid #D97706;
  background: linear-gradient(180deg, #FFFDF7 0%, #FFFFFF 100%);
}

.custard-card.sponsored-card .flavor-showcase {
  background: #FEF9E7;
  border-color: #FDE68A;
}

/* ==========================================================================
   Stand Cards Grid (Location Top -> Flavors Center -> Actions Bottom)
   ========================================================================== */
.stands-section {
  padding: 1.5rem 0 4rem;
  flex: 1;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.2rem;
}

.custard-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-top: 4px solid var(--retro-red);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.custard-card.culvers-card {
  border-top-color: var(--culvers-blue);
}

.custard-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-strong);
  border-top-color: var(--retro-red);
}

.custard-card.culvers-card:hover {
  border-top-color: var(--culvers-blue);
}

/* 1. TOP OF TILE: Stand Name, Location & Distance (Aligned Height across Row) */
.card-location-header {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed var(--border);
  min-height: 126px;
}

.card-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.stand-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
}

.stand-tag.local {
  background: var(--retro-red-tint);
  color: var(--retro-red-dark);
}

.stand-tag.culvers {
  background: var(--culvers-tint);
  color: var(--culvers-blue);
}

.distance-pill {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--retro-red-dark);
  background: var(--retro-red-tint);
  border: 1px solid var(--retro-red-border);
  padding: 0.18rem 0.65rem;
  border-radius: var(--radius-full);
}

.stand-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.22;
  margin-top: 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.44em; /* Reserves exact 2-line height so every flavor box aligns */
}

.stand-title a:hover {
  color: var(--retro-red);
  text-decoration: underline;
}

.stand-location {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2. MIDDLE OF TILE: Today's Flavor of the Day Showcase (Stretches to Fill Row) */
.flavor-showcase {
  flex: 1;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.flavor-label-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--retro-red);
}

.flavor-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.flavor-row + .flavor-row {
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border);
}

.scoop-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #FFFFFF;
  background: var(--bg-page);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scoop-fallback {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--retro-red-tint);
  border: 1.5px solid var(--retro-red-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--retro-red);
}

.flavor-headline {
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 800;
  line-height: 1.22;
  color: var(--ink);
}

.flavor-summary {
  font-size: 0.82rem;
  color: var(--ink-secondary);
  margin-top: 0.18rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 3. BOTTOM OF TILE: Actions & Inline Expandable Schedule */
.card-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  width: 100%;
}

.hours-note {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}

.card-action-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}

.action-pill {
  flex: 1;
  text-align: center;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  padding: 0.48rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-card);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.action-pill:hover {
  background: var(--retro-red-tint);
  border-color: var(--retro-red);
  color: var(--retro-red-dark);
}

.action-pill.primary {
  background: var(--retro-red);
  color: #FFFFFF;
  border-color: var(--retro-red-dark);
}

.action-pill.primary:hover {
  background: var(--retro-red-dark);
  color: #FFFFFF;
}

/* Inline Expandable 7-Day Forecast Drawer inside Card */
.inline-forecast {
  display: none;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  margin-top: 0.65rem;
}

.inline-forecast.open {
  display: block;
}

.forecast-mini-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.42rem 0;
  font-size: 0.82rem;
}

.forecast-mini-row + .forecast-mini-row {
  border-top: 1px dashed var(--border);
}

.forecast-day-name {
  font-weight: 700;
  color: var(--retro-red-dark);
  min-width: 78px;
  flex-shrink: 0;
}

.forecast-flavor-val {
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

/* ==========================================================================
   Content Pages (Privacy & Contact)
   ========================================================================== */
.page-shell {
  padding: 3rem 0 5rem;
  flex: 1;
}

.page-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  border-top: 5px solid var(--retro-red);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

.page-card h1 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--retro-red-dark);
  margin-bottom: 0.5rem;
}

.page-card h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink);
  margin: 1.75rem 0 0.5rem;
}

.page-card p, .page-card li {
  color: var(--ink-secondary);
  font-size: 0.96rem;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.page-card ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.1rem;
}

.form-group label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.form-input {
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--cream);
  font-size: 0.95rem;
  outline: none;
}

.form-input:focus {
  border-color: var(--retro-red);
  background: var(--bg-card);
}

/* ==========================================================================
   Footer (Retro Deep Crimson / Diner Footer)
   ========================================================================== */
.site-footer {
  background: var(--retro-red-deep);
  color: #FCEBEC;
  padding: 2.25rem 0;
  margin-top: auto;
  border-top: 4px solid var(--retro-red);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-weight: 600;
}

.footer-nav a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* ==========================================================================
   Favorites Heart Button, Upcoming Flavor Alert Badge & Notification Center
   ========================================================================== */
.nav-actions-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-alerts-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.38);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.46rem 0.9rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-alerts-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: #FFFFFF;
}

.nav-alert-badge {
  background: #FEF3C7;
  color: #92400E;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.06rem 0.45rem;
  border-radius: var(--radius-full);
  line-height: 1.3;
}

/* Favorite Stand Heart Toggle on Cards */
.card-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.fav-heart-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--cream);
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.fav-heart-btn:hover {
  border-color: var(--retro-red);
  color: var(--retro-red);
  transform: scale(1.06);
}

.fav-heart-btn.active {
  background: var(--retro-red-tint);
  border-color: var(--retro-red);
  color: var(--retro-red);
}

.fav-heart-btn.active svg {
  fill: var(--retro-red);
}

/* Upcoming Favorite Flavor Match Pill inside Card */
.flavor-alert-banner {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #FEF3C7;
  border: 1px solid #FCD34D;
  color: #92400E;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-top: auto;
}

.flavor-alert-banner strong {
  font-weight: 800;
  color: #78350F;
}

/* Notification Framework Modal */
.notif-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 24, 24, 0.58);
  backdrop-filter: blur(4px);
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.notif-modal-backdrop.open {
  display: flex;
}

.notif-modal-card {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  border-top: 6px solid var(--retro-red);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(31, 24, 24, 0.3);
  padding: 1.5rem 1.65rem;
  display: block;
  box-sizing: border-box;
}

.notif-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 1px dashed var(--border);
}

.notif-modal-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--retro-red-dark);
  line-height: 1.15;
}

.notif-close-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--cream);
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notif-close-btn:hover {
  border-color: var(--retro-red);
  color: var(--retro-red);
}

.notif-section-box {
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.notif-section-box > * + * {
  margin-top: 0.7rem;
}

.notif-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.notif-toggle-copy {
  flex: 1 1 220px;
  min-width: 0;
}

.notif-toggle-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
}

.notif-toggle-sub {
  font-size: 0.82rem;
  color: var(--ink-secondary);
  margin-top: 0.15rem;
}

.notif-push-btn {
  flex: 0 0 auto;
  padding: 0.42rem 0.8rem;
}

.notif-active-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  font-size: 0.84rem;
  cursor: pointer;
  flex: 0 0 auto;
}

.notif-controls-inline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.notif-email-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
}

.notif-email-input {
  flex: 1 1 200px;
  min-width: 0;
  width: 100%;
  height: 40px;
  padding: 0 0.85rem;
  font-size: 0.88rem;
  background: var(--bg-card);
  box-sizing: border-box;
}

.notif-email-actions {
  display: flex;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.notif-email-actions .action-pill {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 0.9rem;
}

.notif-verify-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.notif-verify-input {
  flex: 1 1 120px;
  max-width: 160px;
  min-width: 0;
  height: 38px;
  padding: 0 0.7rem;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  background: #FFFFFF;
  box-sizing: border-box;
}

.notif-verify-btn {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 0.9rem;
}

.notif-add-flavor-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.notif-flavor-input {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  height: 38px;
  padding: 0 0.8rem;
  font-size: 0.85rem;
  background: var(--bg-card);
  box-sizing: border-box;
}

.notif-add-flavor-btn {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 0.85rem;
}

.flavor-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.flavor-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--retro-red-tint);
  border: 1px solid var(--retro-red-border);
  color: var(--retro-red-dark);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.26rem 0.68rem;
  border-radius: var(--radius-full);
}

.flavor-tag-remove {
  border: none;
  background: transparent;
  color: var(--retro-red-dark);
  font-weight: 800;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1;
}

.notif-matches-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 210px;
  overflow-y: auto;
  width: 100%;
}

.notif-match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--retro-red);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  width: 100%;
  box-sizing: border-box;
}

.notif-match-info {
  flex: 1 1 0%;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.notif-remove-btn {
  flex: 0 0 auto;
  padding: 0.24rem 0.55rem;
  font-size: 0.74rem;
}

.notif-match-day {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 800;
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.notif-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
}

.notif-modal-footer > .action-pill {
  flex: 0 0 auto;
  padding: 0.55rem 1rem;
}

.notif-modal-footer-right {
  display: flex;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.notif-modal-footer-right .action-pill {
  flex: 0 0 auto;
  padding: 0.55rem 1.05rem;
}

/* ==========================================================================
   Live Open/Closed Status Pill, Share Button & 7-Day Search Match Banner
   ========================================================================== */
.open-now-toggle-btn {
  height: 44px;
  padding: 0 0.9rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--cream);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.open-now-toggle-btn:hover {
  border-color: var(--green-ok);
}

.open-now-toggle-btn.active {
  background: #DCFCE7;
  border-color: #16A34A;
  color: #14532D;
}

.hours-row-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.open-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.open-status-pill.open {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}

.open-status-pill.closing {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
}

.open-status-pill.closed {
  background: var(--bg-pill);
  color: var(--ink-muted);
  border: 1px solid var(--border);
}

.share-stand-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--cream);
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.share-stand-btn:hover {
  border-color: var(--retro-red);
  color: var(--retro-red);
  transform: scale(1.06);
}

.share-stand-btn.copied {
  background: #DCFCE7;
  border-color: #16A34A;
  color: #15803D;
}

.search-schedule-banner {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-top: auto;
}

.search-schedule-banner strong {
  font-weight: 800;
  color: #1E3A8A;
}

.nav-hamburger-btn,
.nav-mobile-only-cta {
  display: none;
}

/* ==========================================================================
   Mobile & Phone Responsive Layout (Placed at End for Cascade Priority)
   ========================================================================== */
@media (max-width: 760px) {
  .container {
    padding: 0 0.9rem;
  }
  .nav-inner {
    height: auto;
    min-height: 54px;
    padding: 0.45rem 0.9rem;
    flex-wrap: wrap;
    row-gap: 0.45rem;
    column-gap: 0.45rem;
  }
  .brand-link {
    order: 1;
    gap: 0.45rem;
  }
  .brand-link img {
    width: auto;
    height: 38px;
  }
  .brand-wordmark {
    font-size: 1.15rem;
  }
  .nav-actions-right {
    order: 2;
    margin-left: auto;
    gap: 0.4rem;
  }
  .nav-alerts-btn {
    font-size: 0.78rem;
    padding: 0.38rem 0.7rem;
    gap: 0.32rem;
  }
  .nav-cta {
    display: none;
  }
  .nav-hamburger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1.5px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.14);
    color: #FFFFFF;
    cursor: pointer;
    padding: 0;
  }
  .nav-hamburger-btn:hover,
  .nav-hamburger-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.28);
    border-color: #FFFFFF;
  }
  .nav-links {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    border-top: 1px solid rgba(255, 255, 255, 0.24);
    padding: 0.45rem 0 0.2rem;
    gap: 0.25rem;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
  }
  .nav-mobile-only-cta {
    display: block;
    font-weight: 800;
    color: #FEF3C7;
  }
  .hero-header {
    padding: 1.15rem 0 0.9rem;
  }
  .hero-top-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.9rem;
  }
  .control-deck {
    padding: 0.8rem;
    gap: 0.6rem;
  }
  .segmented-filter {
    width: 100%;
    overflow-x: auto;
  }
  .seg-btn {
    flex: 1;
    justify-content: center;
    white-space: nowrap;
    padding: 0.42rem 0.28rem;
    font-size: 0.75rem;
    gap: 0.2rem;
  }
  .seg-count {
    font-size: 0.65rem;
    padding: 0.04rem 0.32rem;
  }
  .search-box {
    flex: 1 1 100%;
    height: 40px;
  }
  .deck-controls-right {
    width: 100%;
    display: flex;
    gap: 0.38rem;
    flex-wrap: nowrap;
  }
  .open-now-toggle-btn,
  .distance-select,
  .map-toggle-btn {
    flex: 1;
    justify-content: center;
    height: 38px;
    padding: 0 0.35rem;
    font-size: 0.74rem;
    white-space: nowrap;
  }
  #custard-map {
    height: 270px;
  }
  .map-footer-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .page-card {
    padding: 1.25rem;
  }
  .notif-modal-backdrop {
    padding: 0.65rem;
    align-items: center;
  }
  .notif-modal-card {
    padding: 1.15rem 1rem;
    max-height: 90vh;
    border-radius: var(--radius-md);
  }
  .notif-modal-title {
    font-size: 1.2rem;
  }
  .notif-section-box {
    padding: 0.85rem;
    margin-bottom: 0.85rem;
  }
  .notif-toggle-row {
    display: block;
  }
  .notif-toggle-copy {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  .notif-push-btn {
    width: 100%;
    height: 36px;
    padding: 0 0.75rem;
  }
  .notif-controls-inline {
    width: 100%;
    justify-content: space-between;
  }
  .notif-email-row {
    display: block;
  }
  .notif-email-input {
    display: block;
    width: 100%;
    height: 38px;
    margin-bottom: 0.45rem;
  }
  .notif-email-actions {
    width: 100%;
    display: flex;
    gap: 0.45rem;
  }
  .notif-email-actions .action-pill {
    flex: 1;
    height: 38px;
    padding: 0 0.4rem;
    font-size: 0.78rem;
  }
  .notif-add-flavor-row {
    display: flex;
    gap: 0.4rem;
    width: 100%;
  }
  .notif-flavor-input {
    flex: 1 1 0%;
    min-width: 0;
    height: 38px;
    font-size: 0.82rem;
    padding: 0 0.65rem;
  }
  .notif-add-flavor-btn {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 0.7rem;
    font-size: 0.78rem;
  }
  .notif-match-item {
    padding: 0.5rem 0.65rem;
    gap: 0.5rem;
  }
  .notif-modal-footer {
    display: block;
  }
  .notif-modal-footer > .action-pill {
    display: inline-flex;
    width: 100%;
    height: 38px;
    margin-bottom: 0.45rem;
  }
  .notif-modal-footer-right {
    width: 100%;
    display: flex;
    gap: 0.45rem;
  }
  .notif-modal-footer-right .action-pill {
    flex: 1;
    height: 38px;
    padding: 0 0.4rem;
    font-size: 0.78rem;
  }
}
