/* assets/css/style.css - Nha Trang The Endless Journey PRO 3D & Vietnamese Typography System */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600;1,700&family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,700&family=Playfair+Display:ital,wght@0,600;0,700;0,800;0,900;1,400;1,600;1,700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;600;700&subset=vietnamese&display=swap');

:root {
  --primary-gold: #d4af37;
  --gold-glow: rgba(212, 175, 55, 0.45);
  --ocean-deep: #020b18;
  --ocean-mid: #052042;
  --ocean-cyan: #38bdf8;
  --text-pure: #ffffff;
  --text-muted: #94a3b8;
  --glass-bg: rgba(6, 17, 36, 0.75);
  --glass-border: rgba(255, 255, 255, 0.14);
}

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

html {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  overscroll-behavior-x: none !important;
  touch-action: pan-y !important;
  -webkit-text-size-adjust: 100%;
}

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Base Body with Standard Vietnamese Typography */
body {
  font-family: 'Be Vietnam Pro', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--ocean-deep);
  color: #f1f5f9;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  overscroll-behavior-x: none !important;
  touch-action: pan-y !important;
  position: relative;
  cursor: default;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

main {
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
}

/* Headings with Perfect Vietnamese Kerning */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Be Vietnam Pro', sans-serif;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.font-cinzel {
  font-family: 'Montserrat', 'Be Vietnam Pro', sans-serif;
  letter-spacing: 0.05em;
  font-weight: 800;
}

.hero-title {
  white-space: nowrap !important;
  display: inline-block;
  text-align: center;
  max-width: 100%;
}

.font-serif {
  font-family: 'Playfair Display', 'Be Vietnam Pro', serif;
  line-height: 1.35;
}

.font-mono-tech {
  font-family: 'Space Grotesk', 'Be Vietnam Pro', monospace;
}

/* Custom Magnetic Glow Cursor */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: #facc15;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
  box-shadow: 0 0 12px #facc15;
}

.cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(250, 204, 21, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease-out, width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
}

.cursor-hover .custom-cursor {
  width: 14px;
  height: 14px;
  background: #38bdf8;
  box-shadow: 0 0 16px #38bdf8;
}

.cursor-hover .cursor-follower {
  width: 65px;
  height: 65px;
  border-color: rgba(56, 189, 248, 0.7);
  background: rgba(56, 189, 248, 0.08);
}

/* Ambient Canvas Background */
#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 1s ease;
}

/* Film Grain Overlay */
.film-grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: 0.65;
}

/* Dynamic Vignette */
.cinematic-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(2, 11, 24, 0) 45%, rgba(1, 6, 14, 0.85) 100%);
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}

.glass-pill {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--primary-gold);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(212, 175, 55, 0.25);
}

/* 3D Earth Globe Section */
#hero-globe-section {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 10;
}

#globe-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#globe-canvas:active {
  cursor: grabbing;
}

/* Holographic Target Beacon HUD */
.globe-hud {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 20;
}

.target-crosshair {
  width: 160px;
  height: 160px;
  border: 1px dashed rgba(56, 189, 248, 0.4);
  border-radius: 50%;
  animation: spinSlow 20s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.radar-ring {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #38bdf8;
  animation: radarPing 2.4s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.radar-ring:nth-child(2) {
  animation-delay: 0.8s;
}

.radar-ring:nth-child(3) {
  animation-delay: 1.6s;
}

@keyframes radarPing {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(3.5); opacity: 0; }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spinReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* Floating Physics Animations */
.float-element {
  animation: floatMotion 6s ease-in-out infinite alternate;
}

.float-slow {
  animation: floatMotion 8s ease-in-out infinite alternate;
}

.float-medium {
  animation: floatMotion 5s ease-in-out infinite alternate;
}

.float-fast {
  animation: floatMotion 3.5s ease-in-out infinite alternate;
}

@keyframes floatMotion {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1.2deg); }
  100% { transform: translateY(5px) rotate(-1.2deg); }
}

/* Rotating Sacred Mandala / Cham Wheel */
.rotating-mandala {
  animation: spinSlow 35s linear infinite;
  transform-origin: center center;
}

.rotating-mandala-reverse {
  animation: spinReverse 25s linear infinite;
  transform-origin: center center;
}

/* Kinetic Typography Marquee Track */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  position: relative;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 11, 24, 0.6);
  backdrop-filter: blur(8px);
}

.marquee-track {
  display: inline-flex;
  gap: 3rem;
  animation: marqueeLeft 30s linear infinite;
}

.marquee-track-reverse {
  display: inline-flex;
  gap: 3rem;
  animation: marqueeRight 30s linear infinite;
}

.marquee-container:hover .marquee-track,
.marquee-container:hover .marquee-track-reverse {
  animation-play-state: paused;
}

@keyframes marqueeLeft {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

@keyframes marqueeRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0%); }
}

.marquee-text-outline {
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(255, 255, 255, 0.35);
  transition: -webkit-text-stroke 0.3s;
}

.marquee-text-outline:hover {
  -webkit-text-stroke: 1.2px #d4af37;
  color: rgba(212, 175, 55, 0.15);
}

/* 3D Tilt Card Component */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s;
  position: relative;
}

.tilt-card-content {
  transform: translateZ(35px);
  transform-style: preserve-3d;
}

.tilt-card-badge {
  transform: translateZ(60px);
}

.tilt-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

/* Glow & Accent Texts */
.gold-gradient-text {
  background: linear-gradient(135deg, #fff7d6 0%, #e8c872 50%, #c4962e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ocean-gradient-text {
  background: linear-gradient(135deg, #e0f2fe 0%, #38bdf8 50%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.neon-violet-text {
  background: linear-gradient(135deg, #f5d0fe 0%, #c084fc 50%, #7e22ce 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Side Progress Navigator */
.side-nav-rail {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.side-nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  cursor: pointer;
}

.side-nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.side-nav-item.active .side-nav-dot {
  width: 12px;
  height: 28px;
  background-color: var(--primary-gold);
  box-shadow: 0 0 16px var(--gold-glow);
}

.side-nav-label {
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
  pointer-events: none;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary-gold);
  white-space: nowrap;
}

.side-nav-item:hover .side-nav-label,
.side-nav-item.active .side-nav-label {
  opacity: 1;
  transform: translateX(0);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 8, 18, 0.88);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

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

.modal-content {
  background: #091528;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1.5rem;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#explorer-results-grid,
#post-detail-scroll-body {
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 158, 11, 0.4) transparent;
}

#explorer-results-grid::-webkit-scrollbar,
#post-detail-scroll-body::-webkit-scrollbar {
  width: 6px;
}
#explorer-results-grid::-webkit-scrollbar-thumb,
#post-detail-scroll-body::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.4);
  border-radius: 9999px;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

/* Grand Post Detail Modal (Always above all other modals & widgets) */
#post-detail-modal {
  z-index: 99999 !important;
}

#post-detail-modal.active {
  z-index: 99999 !important;
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#post-detail-modal .modal-content {
  z-index: 100000 !important;
  position: relative !important;
  pointer-events: auto !important;
}

/* Audio Visualizer Waves in Navbar */
.audio-bar {
  width: 3px;
  background-color: var(--primary-gold);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.audio-playing .audio-bar:nth-child(1) { animation: bounce 0.8s infinite ease-in-out alternate; }
.audio-playing .audio-bar:nth-child(2) { animation: bounce 1.1s infinite ease-in-out alternate 0.2s; }
.audio-playing .audio-bar:nth-child(3) { animation: bounce 0.9s infinite ease-in-out alternate 0.4s; }
.audio-playing .audio-bar:nth-child(4) { animation: bounce 1.2s infinite ease-in-out alternate 0.1s; }

@keyframes bounce {
  0% { height: 4px; }
  100% { height: 18px; }
}

/* 360 Panorama Canvas */
#panorama-canvas {
  width: 100%;
  height: 520px;
  border-radius: 1rem;
  cursor: grab;
}

#panorama-canvas:active {
  cursor: grabbing;
}

/* =========================================================================
   AI Chatbot Tourist Consultant (Góc phải phía dưới)
   ========================================================================= */
#ai-chat-toggle-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.45), 0 0 20px rgba(6, 182, 212, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#ai-chat-toggle-btn:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.6), 0 0 30px rgba(6, 182, 212, 0.5);
}

#ai-chat-toggle-btn.chat-open {
  transform: scale(0.9) rotate(90deg);
  background: #0f172a;
  border-color: #f59e0b;
}

#ai-chat-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 998;
  width: calc(100vw - 32px);
  max-width: 420px;
  height: 580px;
  max-height: calc(100vh - 120px);
  background: rgba(4, 13, 29, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 28px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 35px rgba(245, 158, 11, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(25px) scale(0.92);
  transform-origin: bottom right;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overscroll-behavior: contain !important;
}

#ai-chat-messages {
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 158, 11, 0.4) transparent;
}

#ai-chat-messages::-webkit-scrollbar {
  width: 6px;
}

#ai-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

#ai-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.35);
  border-radius: 9999px;
}

#ai-chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.65);
}

#ai-chat-window.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Chat Message Bubbles */
.chat-msg-user {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  border-radius: 20px 20px 4px 20px;
  box-shadow: 0 4px 15px rgba(217, 119, 6, 0.25);
}

.chat-msg-ai {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  border-radius: 20px 20px 20px 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* AI Typing Indicator */
.typing-dot {
  width: 7px;
  height: 7px;
  background-color: #38bdf8;
  border-radius: 50%;
  display: inline-block;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Chat Prompt Chips */
.chat-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 9999px;
  font-size: 11px;
  padding: 6px 12px;
  white-space: nowrap;
  transition: all 0.2s ease;
  cursor: pointer;
}

.chat-chip:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fef08a;
  transform: translateY(-1px);
}

/* =========================================================================
   Mobile First & Responsive Layout Enhancements
   ========================================================================= */
.chapter-section {
  position: relative;
  min-height: auto;
  padding: 2.25rem 1.5rem;
  z-index: 10;
}

/* Mobile Scroll Tray with Native Snap */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.mobile-scroll-tray {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
}
.mobile-scroll-tray > * {
  scroll-snap-align: center;
  flex-shrink: 0;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.8), 0 0 1px rgba(255, 255, 255, 0.1);
}

.mobile-nav-link {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.mobile-nav-link:active {
  transform: scale(0.92);
}

/* Responsive Media Queries for Mobile & Tablets */
@media (max-width: 768px) {
  html, body {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    overscroll-behavior-x: none !important;
    touch-action: pan-y !important;
    position: relative !important;
  }

  main,
  section,
  .chapter-section,
  .marquee-container,
  #hero-globe-section {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* Disable 3D tilt transforms entirely on mobile to fix rigid */
  .tilt-card {
    transform: none !important;
  }
  .tilt-card-content,
  .tilt-card-badge {
    transform: none !important;
  }
  .tilt-glare {
    display: none !important;
  }

  .chapter-section {
    min-height: auto;
    padding: 1.5rem 1rem;
  }

  .marquee-container {
    padding: 1rem 0;
  }

  .marquee-track,
  .marquee-track-reverse {
    gap: 1.5rem;
  }

  /* Prevent iOS Safari 16px font-size auto-zoom */
  input[type="text"],
  input[type="search"],
  select,
  textarea,
  #db-search-input,
  #ai-chat-input {
    font-size: 16px !important;
  }

  /* Adjust Modals for Mobile Screen Real Estate */
  .modal-overlay {
    padding: 0.5rem;
  }

  .modal-content {
    padding: 1rem !important;
    border-radius: 1.25rem !important;
    max-height: calc(100dvh - 1rem) !important;
  }

  #panorama-canvas {
    height: 300px;
  }

  #interactive-map-canvas {
    height: 280px;
  }
}

@media (max-width: 640px) {
  /* Near Edge-to-Edge Frames for Mobile (Gần tràn viền) */
  .chapter-section {
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  .chapter-section > div,
  #itineraries > div {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }

  .tilt-card {
    padding: 1rem 0.85rem !important;
    border-radius: 1.25rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }

  .glass-panel {
    border-radius: 1.25rem !important;
  }

  /* Modals near edge-to-edge on mobile */
  .modal-overlay {
    padding: 0.35rem !important;
  }

  .modal-content {
    border-radius: 1.25rem !important;
    max-height: calc(100dvh - 0.75rem) !important;
  }

  #post-detail-modal {
    padding: 0 !important;
  }

  #post-detail-modal .modal-content {
    border-radius: 1.5rem 1.5rem 0 0 !important;
    max-height: 94dvh !important;
    height: 94dvh !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
  }

  #post-detail-scroll-body {
    max-height: calc(94dvh - 15px) !important;
  }

  #post-detail-scroll-body .relative.h-64 {
    height: 220px !important;
  }

  /* AI Chatbot Mobile Layout */
  #ai-chat-toggle-btn {
    bottom: 74px;
    right: 14px;
    width: 52px;
    height: 52px;
  }

  #ai-chat-window {
    bottom: 70px;
    left: 8px;
    right: 8px;
    width: calc(100vw - 16px);
    max-width: none;
    height: calc(100dvh - 82px);
    max-height: calc(100dvh - 82px);
    border-radius: 20px;
  }

  .chat-msg-user,
  .chat-msg-ai {
    font-size: 13px;
    line-height: 1.5;
  }

  /* Footer safe-area spacing above mobile bottom nav */
  footer {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}
