/* ==========================================================================
   0 Margin Travel — Warm Organic Atelier Design System (Responsive Mobile & PC Edition)
   "Connecting Global Travelers with Local Companions at 0% Commission"
   ========================================================================== */

:root {
  --bg-main: #0B0F19;
  --bg-card: rgba(15, 23, 42, 0.92);
  --bg-card-warm: rgba(30, 41, 59, 0.85);
  --bg-dark: #070A12;
  
  --text-primary: #F9FAFB;
  --text-secondary: #CBD5E1;
  --text-light: #94A3B8;
  --text-inverse: #0F172A;
  
  --primary-gold: #F59E0B;
  --primary-gold-light: rgba(245, 158, 11, 0.18);
  --primary-sunlight: #FCD34D;
  --primary-forest: #10B981;
  --primary-emerald: #059669;
  --primary-emerald-light: rgba(5, 150, 105, 0.2);
  --primary-wood: #FDE68A;
  --primary-navy: #0F172A;
  --primary-indigo: #6366F1;
  --primary-indigo-light: rgba(99, 102, 241, 0.2);
  
  --border-warm: rgba(255, 255, 255, 0.15);
  --border-ink: rgba(255, 255, 255, 0.22);
  
  --shadow-sketch: 0 10px 30px rgba(0, 0, 0, 0.6);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.5);
  
  --font-serif: 'Playfair Display', 'Cinzel', 'Noto Serif JP', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-hand: 'Caveat', cursive;
}

*, *::before, *::after {
  box-sizing: border-box;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 85% 65%, rgba(245, 158, 11, 0.12) 0%, transparent 45%),
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 28px 28px;
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px; /* Space for mobile sticky bottom bar */
}

@media (min-width: 769px) {
  body {
    padding-bottom: 0;
  }
}

.font-serif { font-family: var(--font-serif); }
.font-sans { font-family: var(--font-sans); }
.font-hand { 
  font-family: var(--font-hand); 
  font-size: 1.35rem; 
  color: var(--primary-gold); 
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.01em;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.875rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-gold), var(--primary-emerald));
  border: 2px solid var(--border-ink);
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  font-size: 1.15rem;
  box-shadow: 2px 3px 0px var(--border-ink);
  flex-shrink: 0;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-family: var(--font-serif);
  line-height: 1.2;
}

.brand-badge {
  font-size: 0.72rem;
  background: var(--primary-gold-light);
  color: var(--primary-wood);
  padding: 0.2rem 0.65rem;
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1.5px solid var(--border-ink);
  display: inline-block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Banner */
.slogan-banner {
  background: linear-gradient(90deg, #1E1B4B, #0F172A, #1E1B4B);
  color: #FCD34D;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  line-height: 1.4;
  word-break: break-word;
}

/* Paper Tape & Badges */
.paper-tape {
  display: inline-block;
  background: rgba(30, 41, 59, 0.95);
  color: #FCD34D;
  border: 1.5px solid #F59E0B;
  padding: 0.35rem 0.85rem;
  font-family: var(--font-hand);
  font-weight: 800;
  font-size: 1.25rem;
  transform: rotate(-1.5deg);
  box-shadow: 0 0 15px rgba(245,158,11,0.3);
  max-width: 100%;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #E0F2FE;
  color: #0369A1;
  border: 1.5px solid #0284C7;
  padding: 0.25rem 0.75rem;
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.08);
}

.seed-points-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, #FEF3C7, #D1FAE5);
  color: #064E3B;
  border: 1.5px solid #047857;
  padding: 0.25rem 0.75rem;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 2px 2px 0px #292524;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  overflow-x: hidden;
}

/* Grid Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  width: 100%;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 15px rgba(245, 158, 11, 0.2);
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.hero-tagline-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245, 158, 11, 0.15);
  color: #FCD34D;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
  margin-bottom: 1.5rem;
  max-width: 100%;
  word-break: break-word;
}

.hero-title {
  font-size: clamp(1.8rem, 5vw, 3.6rem);
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  word-break: break-word;
  overflow-wrap: break-word;
}

.hero-subtitle {
  font-size: clamp(0.92rem, 2.3vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 860px;
  margin: 0 auto 2rem;
  line-height: 1.75;
  word-break: break-word;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  width: 100%;
}

/* Prominent Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  min-height: 48px; /* Touch target requirement */
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  touch-action: manipulation;
  max-width: 100%;
  word-break: break-word;
  white-space: normal;
  text-align: center;
}

.btn:hover, .btn:active {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.btn-primary { 
  background: linear-gradient(135deg, var(--primary-gold), #D97706); 
  color: #fff; 
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.6);
}
.btn-secondary { 
  background: rgba(30, 41, 59, 0.8); 
  color: var(--text-primary); 
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-emerald { 
  background: linear-gradient(135deg, #059669, #047857); 
  color: #fff; 
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}
.btn-emerald:hover {
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.65);
}
.btn-indigo { 
  background: linear-gradient(135deg, #6366F1, #4F46E5); 
  color: #fff; 
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

/* Savings Calculator Box */
.calc-box {
  background: var(--bg-card-warm);
  border: 2px solid var(--border-ink);
  border-radius: 20px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow-sketch);
  max-width: 100%;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-warm);
  font-size: 0.92rem;
  gap: 0.5rem;
}

.calc-highlight {
  color: var(--primary-emerald);
  font-weight: 800;
  font-size: 1.15rem;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
  width: 100%;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.45rem;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  min-height: 48px; /* Prevents auto-zoom on mobile Safari */
  border: 2px solid var(--border-ink);
  border-radius: 12px;
  font-size: 1rem; /* 16px font prevents iOS input zoom */
  background: #FFFDF9;
  font-family: inherit;
  color: var(--text-primary);
  max-width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.18);
}

/* Planner Form Grid */
.planner-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

@media (max-width: 768px) {
  .planner-form-grid {
    grid-template-columns: 1fr !important;
  }
}

/* View Mode Switcher Bar */
.view-mode-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  background: rgba(15, 23, 42, 0.95);
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 2px solid var(--border-ink);
  box-shadow: 2px 2px 0px var(--border-ink);
  width: 100%;
}

.view-mode-btn {
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1.5px solid var(--border-ink);
  background: #FFFFFF;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  touch-action: manipulation;
}

.view-mode-btn.active {
  background: var(--primary-gold);
  color: #FFFFFF;
  border-color: var(--border-ink);
  box-shadow: 2px 2px 0px var(--border-ink);
}

/* Candidate Spots Cards */
.spot-card {
  background: var(--bg-card);
  border: 2px solid var(--border-ink);
  border-radius: 16px;
  padding: 1.15rem;
  box-shadow: 3px 3px 0px var(--border-ink);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
}

.spot-card:hover {
  transform: translateY(-2px);
  box-shadow: 4px 5px 0px var(--border-ink);
}

.spot-card.selected {
  background: #FEF3C7;
  border-color: var(--primary-gold);
  box-shadow: 4px 5px 0px var(--primary-gold);
}

.spot-touch-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.spot-checkbox {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  cursor: pointer;
  accent-color: var(--primary-forest);
  margin-top: 2px;
  flex-shrink: 0;
}

/* Route Results Action Cards */
.route-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
  width: 100%;
}

@media (max-width: 768px) {
  .route-actions-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Spot Item Controls (Reorder & Deletion) */
.spot-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #FFFDF9;
  border: 1.5px solid var(--border-ink);
  border-radius: 12px;
  margin-bottom: 0.65rem;
  width: 100%;
}

.spot-item-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.icon-touch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.4rem;
  border: 1.5px solid var(--border-ink);
  border-radius: 8px;
  background: #FFFFFF;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
  touch-action: manipulation;
  flex-shrink: 0;
}

.icon-touch-btn:hover, .icon-touch-btn:active {
  background: var(--primary-gold-light);
}

.icon-touch-btn.danger {
  color: #DC2626;
  border-color: #FCA5A5;
  background: #FEF2F2;
}

.icon-touch-btn.danger:hover, .icon-touch-btn.danger:active {
  background: #FEE2E2;
}

/* Sticky Mobile Bottom Navigation Bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(250, 247, 242, 0.98);
  backdrop-filter: blur(12px);
  border-top: 2px solid var(--border-ink);
  z-index: 999;
  justify-content: space-around;
  align-items: center;
  padding: 0.35rem 0.5rem;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
}

.mobile-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(30, 27, 75, 0.65);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active { display: flex; }

.modal-content {
  background: var(--bg-card);
  border-radius: 20px;
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  position: relative;
  animation: fadeIn 0.3s ease;
  border: 2.5px solid var(--border-ink);
  word-break: break-word;
}

.modal-content {
  position: relative !important;
  overflow: visible !important;
}

.modal-close {
  position: absolute;
  top: -18px;
  right: -12px;
  width: 42px;
  height: 42px;
  min-width: 44px;
  min-height: 44px;
  background: linear-gradient(135deg, #EF4444, #DC2626);
  border: 2.5px solid #FFFFFF;
  border-radius: 50%;
  color: #FFFFFF;
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.5);
  z-index: 150;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 480px) {
  .modal-close {
    top: -20px;
    right: -4px;
  }
}

.modal-close:hover,
.modal-close:focus {
  background: linear-gradient(135deg, #F87171, #EF4444);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.6);
}

.modal-close:active {
  transform: scale(0.92);
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

/* Footer */
footer {
  background: var(--bg-dark);
  color: var(--text-inverse);
  padding: 3.5rem 1.25rem 2rem;
  margin-top: 4rem;
  border-top: 4px solid var(--primary-gold);
  width: 100%;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
  width: 100%;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  margin-bottom: 0.85rem;
  color: var(--primary-gold-light);
}

.footer-text {
  color: #A0AEC0;
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.75rem;
  border-top: 1px solid #2D3748;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: #A0AEC0;
}

/* Comprehensive Media Queries for Smartphone & Tablet Responsiveness */
@media (max-width: 768px) {
  .navbar {
    padding: 0.75rem 0.85rem;
    flex-wrap: wrap;
  }
  
  .brand-title {
    font-size: 1.1rem;
  }

  .brand-badge {
    display: none; /* Keep header compact on mobile */
  }

  .mobile-bottom-bar {
    display: flex;
  }

  .hero-section {
    padding: 1.5rem 0.5rem 1rem;
  }

  .hero-tagline-box {
    padding: 0.65rem 0.85rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .card, .spot-candidate-card {
    padding: 1rem 0.85rem !important;
    border-radius: 16px !important;
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem 0.65rem;
  }

  .card {
    padding: 1rem 0.75rem !important;
    border-radius: 14px !important;
  }

  .spot-item-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .spot-item-controls {
    width: 100%;
    justify-content: flex-end;
    margin-top: 0.35rem;
  }
}

/* Category Filter Bar & Chips (Dark Theme Overrides) */
.category-filter-bar, .category-filter-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: rgba(15, 23, 42, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  color: #F9FAFB !important;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-group-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: #FCD34D !important;
  min-width: 130px;
  font-family: var(--font-sans);
}

/* Modern Horizontal Slide Toggle Switch UI */
.switch-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  user-select: none;
  background: rgba(30, 41, 59, 0.9) !important;
  color: #E2E8F0 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 999px;
  padding: 0.25rem 0.75rem 0.25rem 0.35rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
  font-size: 0.82rem;
  font-weight: 700;
}

.switch-toggle:hover {
  transform: translateY(-1px);
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: #FCD34D !important;
  color: #FFF !important;
}

.switch-toggle.active {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10B981 !important;
  color: #34D399 !important;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch-track {
  position: relative;
  width: 36px;
  height: 20px;
  background-color: #475569;
  border-radius: 20px;
  transition: background-color 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background-color: #FFF;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.switch-toggle input:checked + .switch-track {
  background-color: #059669;
}

.switch-toggle input:checked + .switch-track .switch-thumb {
  transform: translateX(16px);
}

.filter-chip {
  background: rgba(30, 41, 59, 0.9) !important;
  color: #E2E8F0 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.filter-chip:hover {
  background: rgba(245, 158, 11, 0.25) !important;
  border-color: #FCD34D !important;
  color: #FFF !important;
  transform: translateY(-1px);
}

.filter-chip.active {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #FFFFFF !important;
  border-color: #10B981 !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.5) !important;
}

.view-mode-btn {
  background: rgba(30, 41, 59, 0.9) !important;
  color: #E2E8F0 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 8px;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-mode-btn.active {
  background: #0284C7 !important;
  color: #FFFFFF !important;
  border-color: #38BDF8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5) !important;
}

.planner-outer-box {
  padding: 1.5rem 0.5rem;
}

.step1-container, .step2-container {
  padding: 1rem 0.5rem;
}

@media (max-width: 640px) {
  .container {
    padding: 0.25rem 0.15rem !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  .planner-outer-box {
    padding: 0.4rem 0.15rem !important;
  }
  .step1-container, .step2-container {
    padding: 0.35rem 0.15rem !important;
    margin-bottom: 0.85rem !important;
  }
  /* Fix route result cards & candidate cards mobile overflow */
  #aiPlanResult,
  #aiPlanResult .card,
  #routeA_itemList,
  #routeB_itemList {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  #aiPlanResult .card {
    padding: 0.75rem 0.5rem !important;
  }
  #routeA_itemList > div,
  #routeB_itemList > div {
    padding: 0.4rem 0.45rem !important;
    gap: 0.25rem !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
  }
}

@keyframes floatBounce {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-6px) rotate(3deg);
  }
}

/* Premium SNS Share Buttons & Toast Notification System */
.share-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border-ink);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 1.5px 1.5px 0px var(--border-ink);
  background: #FFFFFF;
  padding: 0;
  flex-shrink: 0;
}

.share-icon-btn:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 2.5px 3px 0px var(--border-ink);
}

.share-icon-btn:active {
  transform: translateY(0px) scale(0.95);
  box-shadow: 1px 1px 0px var(--border-ink);
}

.share-icon-btn svg {
  width: 55%;
  height: 55%;
  fill: currentColor;
}

/* Share Pill Button for Web Share */
.share-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1.5px solid #F59E0B;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 2px 2px 0px var(--border-ink);
  background: rgba(30, 41, 59, 0.95);
  color: #FFFFFF;
}

.share-pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 3px 4px 0px var(--border-ink);
  background: rgba(245, 158, 11, 0.25);
}

/* Floating Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #18181B;
  color: #FAFAFA;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.1);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0px);
  pointer-events: auto;
}

/* ==========================================================================
   HIGH-CONTRAST & READABILITY OVERRIDES (Dark Cyber Luxe Theme)
   ========================================================================== */

/* Step Containers & Outer Boxes */
.step1-container, .step2-container, .planner-outer-box, #aiPlanResult .card {
  background: rgba(15, 23, 42, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #F9FAFB !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Filter Row Labels */
.step2-container div, .step2-container label, .step2-container span {
  color: #F9FAFB;
}

/* Unselected Filter Chips */
.filter-chip {
  background: rgba(30, 41, 59, 0.92) !important;
  color: #E2E8F0 !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
}

.filter-chip:hover {
  background: rgba(245, 158, 11, 0.25) !important;
  border-color: #FCD34D !important;
  color: #FFF !important;
}

/* Selected Filter Chips */
.filter-chip.active {
  background: linear-gradient(135deg, #059669, #047857) !important;
  color: #FFFFFF !important;
  border-color: #10B981 !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.5) !important;
}

/* Spot Cards & Text Inside */
.spot-card {
  background: rgba(15, 23, 42, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #F9FAFB !important;
}

.spot-card h4, .spot-card-title, .spot-card strong {
  color: #FFFFFF !important;
  font-weight: 800 !important;
}

.spot-card p, .spot-card-desc, .spot-card span {
  color: #CBD5E1 !important;
}

.spot-card .spot-price, .spot-card .spot-fee {
  color: #FCD34D !important;
  font-weight: 700 !important;
}

/* Selected Spot Cards */
.spot-card.selected {
  background: rgba(30, 41, 59, 0.98) !important;
  border: 2px solid #F59E0B !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.45) !important;
}

/* View Mode Text & Buttons */
#candidateSpotsHeader span, #candidateSpotsHeader div {
  color: #CBD5E1 !important;
}

.view-mode-btn {
  background: rgba(30, 41, 59, 0.9) !important;
  color: #E2E8F0 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.view-mode-btn.active {
  background: #0284C7 !important;
  color: #FFFFFF !important;
  border-color: #38BDF8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5) !important;
}

.route-card-desc {
  line-height: 1.5;
  font-size: 0.9rem;
}

/* Category & Zone Badges inside Spot Cards */
.spot-card .badge, .spot-card span[style*="background"] {
  border-radius: 6px;
  font-weight: 700;
}

/* Seamless Fuzzy Hero Image Blending */
.hero-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 1.5rem auto 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-main-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 20px;
  /* Feather only the extreme outer 4% edge so all text is 100% visible */
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 96%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 96%, rgba(0,0,0,0) 100%);
  filter: drop-shadow(0 0 35px rgba(56, 189, 248, 0.25));
}

/* Global Select & Option High Contrast Rules */
select.form-control, .form-control {
  background: rgba(30, 41, 59, 0.95) !important;
  color: #FFFFFF !important;
  border: 1.5px solid #F59E0B !important;
  font-weight: 700 !important;
}

select.form-control option, option {
  background-color: #0F172A !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
}

/* Mobile Header Navbar Layout & Prominent Language Selector */
@media (max-width: 768px) {
  #topShareContainer {
    display: flex !important;
    justify-content: center;
    width: 100%;
    margin-top: 0.4rem;
  }
  #globalLanguageSelect {
    min-width: 140px !important;
    font-size: 0.92rem !important;
    padding: 0.45rem 0.75rem !important;
    background: #0F172A !important;
    color: #FFFFFF !important;
    border: 1.5px solid #F59E0B !important;
    border-radius: 10px !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4) !important;
    font-weight: 800 !important;
  }
}

.floating-cta-bar {
  position: fixed;
  bottom: -100px;
  left: 0;
  width: 100%;
  z-index: 1001;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1.5px solid #F59E0B;
  padding: 0.8rem 1rem;
  box-shadow: 0 -5px 25px rgba(0,0,0,0.6);
  transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  justify-content: center;
  align-items: center;
}
.floating-cta-bar.active {
  bottom: 0;
}
.floating-cta-bar button {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  font-weight: 800;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  font-size: 1.05rem;
  box-shadow: 0 4px 15px rgba(245,158,11,0.4);
  cursor: pointer;
  width: 100%;
  max-width: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.floating-cta-bar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.6);
}


.hero-image-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  height: 95%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.28) 0%, rgba(245, 158, 11, 0.18) 45%, transparent 75%);
  filter: blur(45px);
  z-index: -1;
  pointer-events: none;
}



