/* ==========================================================================
   SOUTHERN TIER LIGHTS - FESTIVE DESIGN SYSTEM
   Dark Navy • Warm Gold • Crisp White
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-deep: #070d1e;
  --bg-surface: #0e172e;
  --bg-elevated: #162343;
  --bg-card: #121c38;
  --border-subtle: #24355d;
  --border-gold: rgba(245, 184, 46, 0.4);

  --gold-primary: #f5b82e;
  --gold-bright: #ffd56b;
  --gold-dark: #c48b15;
  --gold-glow: rgba(245, 184, 46, 0.35);

  --text-white: #ffffff;
  --text-body: #e2e8f0;
  --text-muted: #94a3b8;
  
  --accent-red: #e63946;
  --accent-green: #2a9d8f;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shadows & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.55);
  --shadow-gold: 0 4px 18px rgba(245, 184, 46, 0.3);

  /* Transitions */
  --trans-quick: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Mobile Viewport */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

/* Global Utility */
.hidden {
  display: none !important;
}

/* Map tiles styling: crisp with dark border integration */
.leaflet-tile-pane {
  filter: brightness(0.9) contrast(1.05);
}

/* App Shell Layout */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

/* Top Navigation Bar */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(14, 23, 46, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  flex-shrink: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-sparkle {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 6px var(--gold-primary));
  animation: gentleTwinkle 3s ease-in-out infinite;
}

@keyframes gentleTwinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.9; }
  50% { transform: scale(1.15) rotate(10deg); opacity: 1; filter: drop-shadow(0 0 10px var(--gold-bright)); }
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--gold-bright);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* View Switcher Pill Toggle */
.view-toggle-group {
  display: inline-flex;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.toggle-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--trans-quick);
}

.toggle-btn.active {
  background: var(--bg-elevated);
  color: var(--gold-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.toggle-btn:hover:not(.active) {
  color: var(--text-white);
}

.display-count-pill {
  background: var(--gold-primary);
  color: var(--bg-deep);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

/* Buttons */
.gold-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%);
  color: #0b1122;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: var(--trans-quick);
}

.gold-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 184, 46, 0.45);
}

.gold-cta-btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--trans-quick);
}

.btn-secondary:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

.btn-primary-outline {
  background: transparent;
  color: var(--gold-primary);
  border: 1px dashed var(--gold-primary);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--trans-quick);
}

.btn-primary-outline:hover {
  background: rgba(245, 184, 46, 0.1);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.88rem;
  cursor: pointer;
}

.btn-ghost:hover {
  color: var(--text-white);
}

.btn-danger {
  background: var(--accent-red);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--trans-quick);
}

.btn-danger:hover {
  opacity: 0.9;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.78rem;
}

.full-width {
  width: 100%;
}

.desktop-only {
  display: none;
}

.phone-only {
  display: block;
}

/* Desktop & Tablet: Show header CTA, hide phone FAB and footer CTA */
@media (min-width: 768px) and (min-height: 501px) {
  .desktop-only {
    display: inline-flex !important;
  }
  .phone-only {
    display: none !important;
  }
  .mobile-fab-container {
    display: none !important;
  }
}

/* Holiday Etiquette Reminder Banner */
.etiquette-banner {
  background: linear-gradient(90deg, #101c38 0%, #15254d 100%);
  border-bottom: 1px solid rgba(245, 184, 46, 0.35);
  padding: 7px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-body);
  z-index: 900;
  flex-shrink: 0;
}

.etiquette-banner.hidden {
  display: none;
}

.etiquette-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.etiquette-icon {
  font-size: 1.1rem;
}

.etiquette-text strong {
  color: var(--gold-bright);
}

.dismiss-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  padding: 4px 6px;
  cursor: pointer;
}

.dismiss-btn:hover {
  color: var(--text-white);
}

/* Main Content Area */
.main-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
}

.view-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: opacity 0.25s ease;
}

.view-panel.hidden {
  display: none !important;
}

/* Interactive Map Styling */
.interactive-map {
  width: 100%;
  height: 100%;
  background: #091024;
}

.map-floating-bar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 800;
}

.map-control-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(14, 23, 46, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--gold-bright);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-pill);
  padding: 7px 13px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--trans-quick);
}

.map-control-pill:hover {
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.region-badge {
  pointer-events: auto;
  display: none;
  background: rgba(14, 23, 46, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

@media (min-width: 500px) {
  .region-badge {
    display: block;
  }
}

/* Pin Picking Helper Banner */
.pin-pick-helper {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold-primary) 100%);
  color: #0b1122;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 6px 25px rgba(245, 184, 46, 0.5);
  z-index: 1200;
  font-size: 0.88rem;
  animation: bounceDown 0.4s ease;
}

@keyframes bounceDown {
  0% { transform: translate(-50%, -20px); opacity: 0; }
  100% { transform: translate(-50%, 0); opacity: 1; }
}

.pin-pick-helper .btn-ghost {
  color: #0b1122;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* Mobile Floating Action Button (FAB) */
.mobile-fab-container {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom, 16px));
  right: max(16px, env(safe-area-inset-right, 16px));
  z-index: 950;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
}

.mobile-fab-container > * {
  pointer-events: auto;
}

/* Hidden state whenever the footer is in view so it cannot cover footer text or links */
.mobile-fab-container.fab-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(24px) scale(0.9) !important;
  visibility: hidden !important;
}

.fab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold-primary) 60%, var(--gold-dark) 100%);
  color: #081022;
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  border: none;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(245, 184, 46, 0.45), 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: var(--trans-quick);
  animation: pulseFab 4s infinite;
}

.fab-btn:active {
  transform: scale(0.96);
}

.fab-icon {
  font-size: 1.2rem;
}

@keyframes pulseFab {
  0%, 100% { box-shadow: 0 8px 24px rgba(245, 184, 46, 0.4), 0 2px 8px rgba(0, 0, 0, 0.4); }
  50% { box-shadow: 0 8px 30px rgba(245, 184, 46, 0.65), 0 0 16px rgba(255, 213, 107, 0.5); }
}

/* Phone Landscape adjustments (height <= 500px) */
@media (max-height: 500px) {
  .mobile-fab-container {
    bottom: max(10px, env(safe-area-inset-bottom, 10px));
    right: max(18px, env(safe-area-inset-right, 18px));
  }
  .fab-btn {
    padding: 9px 15px;
    font-size: 0.85rem;
    gap: 6px;
  }
  .fab-icon {
    font-size: 1.05rem;
  }
}

@media (max-width: 375px) {
  .mobile-fab-container {
    right: max(12px, env(safe-area-inset-right, 12px));
    bottom: max(12px, env(safe-area-inset-bottom, 12px));
  }
  .fab-btn {
    padding: 10px 16px;
    font-size: 0.88rem;
    gap: 6px;
  }
  .fab-icon {
    font-size: 1.1rem;
  }
}

@media (max-width: 330px) {
  .mobile-fab-container {
    right: 10px;
    bottom: 10px;
  }
  .fab-btn {
    padding: 8px 12px;
    font-size: 0.82rem;
  }
}

/* List View Container */
#listViewContainer {
  background: var(--bg-deep);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 90px;
}

.list-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

@media (min-width: 600px) {
  .list-controls-bar {
    flex-direction: row;
  }
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-muted);
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-white);
  font-size: 0.9rem;
  width: 100%;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.town-select {
  background: var(--bg-deep);
  color: var(--text-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
}

/* Display Cards Grid */
.displays-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 680px) {
  .displays-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.display-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--trans-quick);
  cursor: pointer;
}

.display-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md);
}

.card-photo {
  height: 180px;
  width: 100%;
  object-fit: cover;
  background: #091124;
}

.card-placeholder-photo {
  height: 140px;
  background: linear-gradient(135deg, #0f1c3a 0%, #172852 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-bright);
  font-size: 2.2rem;
}

.card-content {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-town {
  display: inline-block;
  align-self: flex-start;
  background: rgba(245, 184, 46, 0.15);
  color: var(--gold-bright);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 6px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.25;
  margin-bottom: 6px;
}

.card-address {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}

.card-meta-line {
  font-size: 0.8rem;
  color: var(--text-body);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.card-meta-line strong {
  color: var(--gold-bright);
  font-weight: 600;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.card-dir-btn {
  flex: 1;
  text-decoration: none;
  font-size: 0.82rem;
  padding: 8px 12px;
}

.card-details-btn {
  background: var(--bg-elevated);
  color: var(--text-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-gold);
  border-radius: var(--radius-lg);
  margin: 20px 0;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px var(--gold-glow));
}

.empty-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text-white);
  margin-bottom: 8px;
}

.empty-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 20px auto;
}

/* Modals & Overlays */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 20, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fadeIn 0.25s ease;
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

.modal-overlay.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-sheet {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  width: 100%;
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  .modal-sheet {
    border-radius: var(--radius-lg);
    max-width: 580px;
  }
  .modal-sheet.modal-sm {
    max-width: 440px;
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(22, 35, 67, 0.6);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-sparkle {
  font-size: 1.4rem;
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-white);
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
}

.close-modal-btn:hover {
  color: var(--text-white);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-intro {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.45;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 6px;
}

.required-star {
  color: var(--gold-bright);
}

.form-input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: var(--trans-quick);
}

.form-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 2px var(--gold-glow);
}

textarea.form-input {
  resize: vertical;
}

.form-row {
  display: flex;
  gap: 12px;
}

.col-half {
  flex: 1;
}

.input-with-action {
  display: flex;
  gap: 8px;
}

/* Location Selector Box */
.location-selector-box {
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
}

.location-choice-tabs {
  display: flex;
  background: var(--bg-surface);
  border-radius: var(--radius-pill);
  padding: 3px;
  margin-bottom: 12px;
  gap: 4px;
}

.loc-tab {
  flex: 1;
  padding: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--trans-quick);
}

.loc-tab.active {
  background: var(--bg-elevated);
  color: var(--gold-bright);
}

.geocode-feedback {
  font-size: 0.78rem;
  margin-top: 6px;
  color: var(--gold-bright);
}

.coords-badge {
  margin-top: 10px;
  background: rgba(42, 157, 143, 0.2);
  border: 1px solid var(--accent-green);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #a7f3d0;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.helper-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* File Dropzone */
.file-dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-deep);
  position: relative;
  transition: var(--trans-quick);
}

.file-dropzone:hover {
  border-color: var(--gold-primary);
}

.file-input-hidden {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.dropzone-content {
  pointer-events: none;
}

.upload-icon {
  font-size: 2rem;
  margin-bottom: 6px;
}

.dropzone-main {
  display: block;
  font-weight: 600;
  color: var(--text-white);
  font-size: 0.88rem;
}

.dropzone-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.photo-preview-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.preview-img {
  max-height: 160px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-gold);
}

.remove-photo-tag {
  display: block;
  margin: 6px auto 0 auto;
  background: rgba(230, 57, 70, 0.2);
  color: #fca5a5;
  border: 1px solid var(--accent-red);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  cursor: pointer;
}

/* Form Feedback Alerts */
.form-feedback-box {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.form-feedback-box.success {
  background: rgba(42, 157, 143, 0.2);
  border: 1px solid var(--accent-green);
  color: #a7f3d0;
}

.form-feedback-box.error {
  background: rgba(230, 57, 70, 0.2);
  border: 1px solid var(--accent-red);
  color: #fca5a5;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

/* Detail Drawer / Bottom Sheet */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 20, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.drawer-overlay.hidden {
  display: none !important;
}

.drawer-panel {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-gold);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.drawer-drag-pill {
  width: 44px;
  height: 5px;
  background: var(--border-subtle);
  border-radius: var(--radius-pill);
  margin: 10px auto 4px auto;
}

.close-drawer-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-white);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.drawer-body {
  padding: 16px 20px 24px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.drawer-photo-wrap {
  margin: -16px -20px 16px -20px;
  height: 220px;
  overflow: hidden;
  background: #091024;
}

.drawer-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-town-badge {
  display: inline-block;
  background: rgba(245, 184, 46, 0.15);
  color: var(--gold-bright);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 6px;
}

.drawer-display-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.25;
  margin-bottom: 8px;
}

.drawer-address-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.drawer-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 14px;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.72rem;
  color: var(--gold-bright);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.meta-val {
  font-size: 0.88rem;
  color: var(--text-white);
  font-weight: 500;
  margin-top: 2px;
}

.drawer-desc {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.5;
  margin-bottom: 20px;
  white-space: pre-line;
}

.drawer-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.directions-link {
  flex: 1;
  text-decoration: none;
  padding: 12px 18px;
  font-size: 0.95rem;
}

.btn-report {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 11px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--trans-quick);
}

.btn-report:hover {
  border-color: var(--accent-red);
  color: #fca5a5;
}

.btn-removal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #f87171;
  border: 1px dashed rgba(239, 68, 68, 0.5);
  border-radius: var(--radius-pill);
  padding: 11px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--trans-quick);
}

.btn-removal:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
}

/* Homeowner Consent Box */
.consent-group-box {
  background: rgba(245, 184, 46, 0.08);
  border: 1px solid rgba(245, 184, 46, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--text-white);
}

.checkbox-container input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--gold-primary);
  flex-shrink: 0;
}

.consent-sub-input {
  margin-top: 10px;
}

.form-input-sm {
  font-size: 0.82rem;
  padding: 7px 10px;
}

.footer-sub-btn {
  background: transparent;
  border: none;
  color: #fca5a5;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
  text-decoration-style: dotted;
}

.footer-sub-btn:hover {
  color: #ffffff;
}

/* Status Consent Badges in Admin */
.consent-badge-ok {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid #4ade80;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.consent-badge-warn {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid #ef4444;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* Footer & Attribution */
.app-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
  padding-left: max(16px, env(safe-area-inset-left, 16px));
  padding-right: max(16px, env(safe-area-inset-right, 16px));
  font-size: 0.75rem;
  color: var(--text-muted);
  z-index: 100;
  flex-shrink: 0;
  position: relative;
  width: 100%;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.footer-cta-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 2px;
}

.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold-primary) 60%, var(--gold-dark) 100%);
  color: #081022;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: none;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 184, 46, 0.4);
  transition: var(--trans-quick);
}

.footer-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 184, 46, 0.55);
}

.footer-cta-btn:active {
  transform: scale(0.97);
}

.cta-sparkle {
  font-size: 1.1rem;
}

.etiquette-micro {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.35;
  max-width: 580px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ==========================================================================
   Responsive Phone Scroll & Safe Area Rules
   Allows phones to scroll full-bleed map to footer, hiding FAB when footer shows
   ========================================================================== */
@media (max-width: 767px), (max-height: 500px) {
  html, body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    height: auto !important;
    min-height: 100% !important;
  }

  .app-shell {
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  .main-content {
    flex: none !important;
    height: calc(100dvh - 54px);
    min-height: calc(100dvh - 54px);
    position: relative;
    overflow: hidden;
  }

  .view-panel {
    position: relative;
    height: 100%;
    width: 100%;
  }

  #listViewContainer {
    height: auto;
    min-height: calc(100dvh - 54px);
    overflow-y: visible;
    padding-bottom: 24px;
  }

  .app-footer {
    position: relative;
    width: 100%;
    z-index: 100;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 10px;
  line-height: 1.4;
}

.stnym-credit {
  color: var(--gold-bright);
  text-decoration: none;
  font-weight: 600;
  transition: var(--trans-quick);
}

.stnym-credit:hover {
  text-decoration: underline;
  color: var(--text-white);
}

.footer-sep {
  color: var(--border-subtle);
}

.admin-link-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 4px;
}

.admin-link-btn:hover {
  color: var(--text-white);
}

/* Leaflet Custom Marker & Popup Styles */
.custom-gold-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
}

.marker-bulb {
  width: 32px;
  height: 32px;
  background: radial-gradient(circle, #ffe394 15%, var(--gold-bright) 45%, var(--gold-dark) 100%);
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 0 14px var(--gold-primary), 0 3px 8px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.marker-bulb:hover {
  transform: rotate(-45deg) scale(1.15);
}

.marker-icon-inner {
  transform: rotate(45deg);
  font-size: 14px;
}

/* Leaflet dark theme tweaks */
.leaflet-container {
  font-family: var(--font-body);
}

.leaflet-popup-content-wrapper {
  background: var(--bg-surface);
  color: var(--text-white);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 4px;
}

.leaflet-popup-tip {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
}

.popup-card {
  padding: 6px 8px;
  min-width: 180px;
}

.popup-town {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gold-bright);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.popup-title {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 4px;
}

.popup-hours {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.popup-btn {
  display: block;
  text-align: center;
  background: var(--gold-primary);
  color: #0b1122;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

/* Community Ratings */
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  margin: 2px 0 10px;
  padding: 5px 9px;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-pill);
  background: rgba(245, 184, 46, 0.1);
  color: var(--gold-bright);
  font-size: 0.78rem;
  line-height: 1;
}
.rating-badge.compact { margin: 7px 0 5px; padding: 4px 8px; }
.rating-badge.empty { color: var(--text-muted); border-color: var(--border-subtle); background: rgba(148, 163, 184, 0.08); }
.rating-badge-star { font-size: 0.95rem; }
.rating-count { color: var(--text-muted); font-weight: 500; }
.rating-panel {
  margin: 18px 0;
  padding: 14px 15px;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(245, 184, 46, 0.1), rgba(22, 35, 67, 0.7));
}
.rating-panel-copy { margin-bottom: 10px; }
.rating-kicker {
  display: block;
  color: var(--gold-bright);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rating-panel h3 {
  margin: 2px 0 1px;
  color: var(--text-white);
  font-family: var(--font-heading);
  font-size: 1.05rem;
}
.rating-summary { color: var(--text-muted); font-size: 0.86rem; }
.rating-stars { display: flex; gap: 3px; align-items: center; }
.rating-star-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #53617d;
  font-size: 1.85rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--trans-quick);
}
.rating-star-btn:hover,
.rating-star-btn:focus-visible,
.rating-star-btn.selected {
  color: var(--gold-primary);
  transform: translateY(-1px) scale(1.06);
}
.rating-star-btn:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.rating-star-btn:disabled { cursor: wait; opacity: 0.55; transform: none; }
.rating-feedback {
  min-height: 18px;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.rating-feedback.success { color: var(--accent-green); font-weight: 600; }

@media (max-width: 480px) {
  .rating-panel { margin: 16px 0; padding: 13px; }
  .rating-stars { justify-content: space-between; gap: 0; }
  .rating-star-btn { width: 44px; height: 44px; font-size: 1.95rem; }
}

/* Holiday marketing and house sharing */
.holiday-hub{max-width:1200px;margin:24px auto;padding:24px;display:grid;gap:18px;color:var(--text-primary)}
.holiday-hub h2{font-family:var(--font-heading);font-size:clamp(1.4rem,3vw,2rem);margin:8px 0}.holiday-hub p{line-height:1.6}.holiday-box{background:var(--bg-card,#101a30);border:1px solid var(--border-subtle,#34405c);border-radius:16px;padding:20px;margin:14px 0;overflow-wrap:anywhere}.holiday-box h3,.holiday-box h4{margin:0 0 10px}.holiday-box p{margin:10px 0;line-height:1.55}.holiday-button-row{display:flex;gap:10px;flex-wrap:wrap}.offer-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:16px}.mk-check{display:flex;align-items:flex-start;gap:12px;margin:16px 0;line-height:1.5;cursor:pointer}.mk-check input{flex:none;width:18px;height:18px;margin-top:3px;accent-color:var(--gold-primary,#f5b82e)}.marketing-consents fieldset{border:0;padding:0;margin:20px 0}.marketing-consents legend{font-weight:700}.mk-fine{font-size:.8rem;color:var(--text-muted,#c1c9d8);line-height:1.6}.mk-fine a,.holiday-box a{color:var(--gold-bright,#f6cb70)}.trap-field{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}#dealsModal .modal-panel,#marketingNotice .modal-panel{max-width:620px;width:calc(100% - 24px);max-height:90dvh;overflow-y:auto}#dealsModal .modal-body,#marketingNotice .modal-body{padding:20px}#dealsModal .form-input,.holiday-box .form-input{margin:6px 0 14px}#houseSharePanel button:disabled{opacity:.6;cursor:default}.marketing-admin{margin:24px 0;border-top:1px solid var(--border-subtle);padding-top:24px}.marketing-admin summary{font-size:1.2rem;font-weight:700;cursor:pointer}.marketing-admin-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr));gap:18px}.marketing-admin label{display:block;margin:12px 0 4px}.marketing-admin textarea{min-height:90px}.marketing-admin button{margin:8px 6px 8px 0}.marketing-admin table{width:100%;border-collapse:collapse;font-size:.8rem}.marketing-admin td,.marketing-admin th{padding:9px;text-align:left;border-bottom:1px solid var(--border-subtle)}.mk-scroll{overflow-x:auto}.mk-warning{border-left:4px solid #f5b82e;padding:12px;background:rgba(245,184,46,.08)}@media(max-width:600px){.holiday-hub{padding:16px;margin:12px 0}.holiday-box{padding:16px}.holiday-button-row button{flex:1 1 100%}}
/* Keep the map spacious while allowing the holiday hub below it to scroll. */
html,body{overflow-y:auto;overflow-x:hidden}#app.app-shell{height:auto;min-height:100dvh;overflow:visible}#app .main-content{flex:none;height:calc(100dvh - 150px);min-height:460px}.holiday-quickbar{display:flex;justify-content:center;align-items:center;gap:12px;padding:10px 16px;background:rgba(245,184,46,.06);border-bottom:1px solid var(--border-subtle);font-size:.85rem}.holiday-quickbar button{padding:7px 12px;font-size:.8rem}#dealsModal .modal-panel,#marketingNotice .modal-panel{background:var(--bg-surface);border:1px solid var(--border-subtle);border-radius:20px;box-shadow:var(--shadow-lg)}#marketingNotice{z-index:2200}#dealsModal{z-index:2100}@media(max-width:767px){#app .main-content{height:calc(100dvh - 140px);min-height:440px}.holiday-quickbar{font-size:.75rem;gap:8px}.holiday-quickbar span{max-width:210px}}
html,body{height:auto;min-height:100%}.holiday-hub{width:100%;flex-shrink:0}#dealsModal .modal-header,#marketingNotice .modal-header{position:sticky;top:0;background:var(--bg-surface);z-index:1}
/* Slim sponsor placements: logo 2:1, desktop 6:1, mobile 4:1. Old artwork displays uncropped. */
.sponsor-showcase h3{margin:8px 0 16px}.sponsor-placement{margin:20px 0;border:1px solid var(--border-subtle);border-radius:16px;overflow:hidden;background:var(--bg-card)}.sponsor-placement-link{display:block;color:inherit;text-decoration:none}.sponsor-placement-link:hover{background:var(--bg-elevated)}.sponsor-banner{display:block;width:100%;background:#0e172e}.sponsor-banner img{display:block;width:100%;height:auto;aspect-ratio:6/1;object-fit:contain}.sponsor-banner.mobile-only{max-width:800px;margin-inline:auto}.sponsor-banner.mobile-only img{aspect-ratio:4/1}.sponsor-brand-row{display:flex;align-items:center;gap:20px;padding:20px}.sponsor-brand-row h4{font-size:1.1rem;margin:0}.sponsor-brand-row p{margin:6px 0;line-height:1.5}.sponsor-logo{display:block;width:180px;max-width:35%;height:auto;aspect-ratio:2/1;object-fit:contain;flex-shrink:0}.offer-sponsor-logo{display:block;width:160px;max-width:100%;height:auto;aspect-ratio:2/1;object-fit:contain;margin:0 0 12px}.sponsor-artwork-fields{border:1px solid var(--border-subtle);border-radius:12px;padding:14px;margin:16px 0;min-width:0}.sponsor-artwork-fields legend{font-weight:700;padding:0 6px}.sponsor-artwork-upload{padding:12px 0;border-top:1px solid var(--border-subtle);min-width:0}.sponsor-artwork-upload label .mk-fine{display:block;margin:6px 0}.sponsor-artwork-upload input[type=file]{display:block;max-width:100%;font-size:.8rem;color:var(--text-body);padding:8px 0}.sponsor-artwork-preview img{display:block;max-width:100%;max-height:150px;object-fit:contain;border:1px dashed var(--border-subtle);background:repeating-conic-gradient(#172343 0% 25%,#101a30 0% 50%) 50%/16px 16px}.sponsor-artwork-upload button:disabled{opacity:.5}@media(max-width:767px){.sponsor-banner img{aspect-ratio:4/1}.sponsor-brand-row{padding:16px;gap:12px}.sponsor-logo{width:120px;max-width:35%}}

#voteModal{z-index:2150}#voteModal .modal-panel{max-width:520px;width:calc(100% - 24px);max-height:90dvh;overflow-y:auto;background:var(--bg-surface);border:1px solid var(--border-subtle);border-radius:20px;box-shadow:var(--shadow-lg)}#voteModal .modal-body{padding:20px}#voteModal .form-input{margin:6px 0 14px}

/* Keep the map controls reachable after adding Top 5 navigation. */
@media (max-width: 600px) {
  .top-nav { padding: 8px 12px; }
  .brand-sub { display: none; }
  .brand-title { font-size: 1.05rem; white-space: nowrap; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn-ghost { padding: 6px 10px; font-size: 0.82rem; white-space: nowrap; }
}

/* Leading Houses & Explore Controls */
.leading-houses-section { margin: 18px 0 22px; padding: 16px 18px; background: rgba(14, 23, 46, 0.7); border: 1px solid var(--border-subtle); border-radius: 16px; }
.leading-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.leading-header h2 { font-size: 1.25rem; margin: 2px 0 0; }
.leading-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
.leading-card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.15s ease, border-color 0.15s ease; }
.leading-card:hover { transform: translateY(-2px); border-color: var(--gold-primary); }
.leading-card .photo-wrap { position: relative; width: 100%; aspect-ratio: 16/10; background: #0b1120; overflow: hidden; }
.leading-card .photo-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.leading-card .photo-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--gold-primary); }
.leading-card .rank-pill { position: absolute; top: 8px; left: 8px; background: rgba(8, 16, 34, 0.88); color: var(--gold-bright); border: 1px solid var(--gold-primary); border-radius: 999px; font-size: 0.75rem; font-weight: 800; padding: 2px 8px; }
.leading-card .card-body { padding: 12px; display: flex; flex-direction: column; flex: 1; }
.leading-card h3 { font-size: 0.95rem; margin: 0 0 4px; line-height: 1.3; }
.leading-card .town { font-size: 0.8rem; color: var(--text-muted); margin: 0 0 8px; }
.leading-card .votes-pill { font-size: 0.8rem; color: var(--gold-bright); font-weight: 600; margin-bottom: 10px; margin-top: auto; }
.leading-card .actions-row { display: flex; gap: 6px; }
.leading-card .actions-row button, .leading-card .actions-row a { flex: 1; padding: 6px 8px; font-size: 0.78rem; text-align: center; }

/* Explore filters bar */
.explore-filters-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; border-top: 1px solid var(--border-subtle); padding-top: 12px; align-items: center; }
.filter-chip { background: var(--bg-surface); color: var(--text-body); border: 1px solid var(--border-subtle); border-radius: 999px; padding: 6px 14px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.15s ease; }
.filter-chip:hover, .filter-chip.active { background: var(--gold-primary); color: #081022; border-color: var(--gold-primary); }

/* Share Modal & Tools */
#shareModal { z-index: 2250; }
#shareModal .modal-panel { max-width: 500px; width: calc(100% - 24px); background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 20px; box-shadow: var(--shadow-lg); }

/* Scanner confirmation banner/modal */
#voteScannerModal { z-index: 2300; }
#voteScannerModal .modal-panel { max-width: 480px; width: calc(100% - 24px); background: var(--bg-surface); border: 1px solid var(--gold-primary); border-radius: 20px; box-shadow: 0 10px 40px rgba(245,184,46,0.3); }

/* Permanent vote lead */
.permanent-vote-lead { font-size: 1.05rem; color: var(--gold-bright); font-weight: 700; margin: 10px 0; }

/* Prioritize the map on phone and tablet: keep the deals CTA directly after it. */
@media (max-width: 1100px) {
  #app > .top-nav { order: 0; }
  #app > #etiquetteBanner { order: 1; }
  #app > .main-content { order: 2; }
  #app > .holiday-quickbar { order: 3; }
  #app > #holidayHub { order: 4; }
  #app > .app-footer { order: 5; }
}

@media (min-width: 601px) and (max-width: 900px) {
  #app > .top-nav { gap: 8px; padding: 8px 12px; }
  #app .brand-sub { display: none; }
  #app .brand-title { font-size: 1.05rem; white-space: nowrap; }
  #app .nav-actions { gap: 6px; }
  #app .toggle-btn { padding: 6px 8px; }
  #app .gold-cta-btn { padding: 7px 10px; font-size: 0.8rem; }
}

/* Main holiday sponsor: visible on initial load, without covering map controls. */
.presenting-sponsor { width:100%; flex-shrink:0; padding:7px 12px 9px; background:#101b32; border-bottom:1px solid var(--border-subtle); }
.presenting-sponsor-inner { width:min(100%,1000px); margin:0 auto; }
.presenting-sponsor-label { color:var(--gold-bright); font-size:.72rem; font-weight:700; letter-spacing:.025em; line-height:1.3; margin-bottom:4px; }
.presenting-sponsor-link { display:block; background:#0e172e; border:1px solid var(--border-subtle); border-radius:10px; overflow:hidden; }
a.presenting-sponsor-link:hover, a.presenting-sponsor-link:focus-visible { border-color:var(--gold-primary); }
.presenting-sponsor-art, .presenting-sponsor-art img { display:block; width:100%; }
.presenting-sponsor-art img { height:auto; max-height:160px; aspect-ratio:6/1; object-fit:contain; background:#0e172e; }
#app.has-presenting-sponsor .main-content { height:calc(100dvh - 285px); min-height:365px; }
@media (max-width:1100px) {
 #app > .top-nav { order:0; }
 #app > #etiquetteBanner { order:1; }
 #app > #presentingSponsor { order:2; }
 #app > .main-content { order:3; }
 #app > .holiday-quickbar { order:4; }
 #app > #holidayHub { order:5; }
 #app > .app-footer { order:6; }
}
@media (max-width:767px) {
 .presenting-sponsor { padding:5px 9px 7px; }
 .presenting-sponsor-label { font-size:.65rem; margin-bottom:3px; }
 .presenting-sponsor-link { border-radius:7px; }
 .presenting-sponsor-art img { max-height:105px; aspect-ratio:4/1; }
 #app.has-presenting-sponsor .main-content { height:calc(100dvh - 245px); min-height:330px; }
}
