/* ==============================================================================
   LUGAREIROS - Design System & Estilos Visuais
   "O lugar é a gente que faz."
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --lugareiros-bg: #090d16;
  --lugareiros-surface: #111827;
  --lugareiros-surface-card: rgba(17, 24, 39, 0.75);
  --lugareiros-border: rgba(255, 255, 255, 0.08);
  --lugareiros-border-glow: rgba(16, 185, 129, 0.35);

  --lugareiros-emerald: #10b981;
  --lugareiros-emerald-dark: #064e3b;
  --lugareiros-amber: #f59e0b;
  --lugareiros-cyan: #06b6d4;
  --lugareiros-terracotta: #ea580c;
}

html {
  background-color: var(--lugareiros-bg);
  color: #f3f4f6;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

/* Custom Sleek Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.45);
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--lugareiros-bg);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 32px 32px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.02em;
}

/* Glassmorphism Classes */
.glass-card {
  background: var(--lugareiros-surface-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--lugareiros-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-nav {
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--lugareiros-border);
}

/* Badges & Tags */
.badge-verified {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.badge-founder {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 88, 12, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

/* Micro-interações */
.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 600;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.55);
}

/* Mobile Bottom Navigation Bar */
.mobile-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(62px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-top: 4px;
  background: rgba(11, 19, 36, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  z-index: 50;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-sizing: border-box;
}

.mobile-nav-link {
  flex: 1;
  text-align: center;
  padding: 3px 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  cursor: pointer;
}

.mobile-nav-link.active {
  color: #34d399 !important;
}

.mobile-nav-link.active span:last-child {
  font-weight: 700;
  color: #34d399;
}

/* Espaçamento seguro no rodapé para dispositivos móveis */
@media (max-width: 767px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Hero Scenic Background com Trilha Local */
.hero-scenic {
  position: relative;
  background-image: 
    linear-gradient(180deg, rgba(9, 13, 22, 0.45) 0%, rgba(9, 13, 22, 0.85) 75%, #090d16 100%),
    url('/static/img/hero_scenic_banner.svg');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}

.hero-trail-glow {
  box-shadow: 0 0 50px -10px rgba(16, 185, 129, 0.3);
}

@media (min-width: 768px) {
  .mobile-nav-bar {
    display: none;
  }
}

/* ==============================================================================
   MAPA DE EXPEDIÇÃO INTERATIVO (INDEX EXPEDITION MAP)
   "O lugar é a gente que faz."
   ============================================================================== */

/* 1. Viewport e Superfície do Mapa */
#expedition-map-root {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  background-color: #060911;
  user-select: none;
  -webkit-user-select: none;
}

.expedition-map-viewport {
  position: absolute;
  inset: 0;
  cursor: grab;
  touch-action: pan-x pan-y;
  overflow: hidden;
}

.expedition-map-viewport.is-dragging {
  cursor: grabbing;
}

/* 2. Camada Cartográfica (Mundo do Mapa) */
.expedition-map-world {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1400px;
  height: 700px;
  transform: translate3d(-50%, -50%, 0) scale(1);
  transform-origin: center center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.expedition-map-world.no-transition {
  transition: none !important;
}

/* Fundo Cartográfico: Textura, Grade e Contornos Topográficos Leves */
.expedition-map-bg {
  position: absolute;
  inset: 0;
  background-color: #080c16;
  background-image:
    radial-gradient(circle at 45% 45%, rgba(16, 185, 129, 0.08) 0%, transparent 55%),
    radial-gradient(circle at 75% 60%, rgba(245, 158, 11, 0.07) 0%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 70px 70px, 70px 70px;
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.8);
}

/* Curvas de Nível Topográficas SVG */
.topo-contour-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.35;
}

/* Trilha de Aventura (Linha Tracejada Conectando os Marcos - Otimizada a 60 FPS) */
.expedition-trail-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.trail-path-back {
  stroke: rgba(16, 185, 129, 0.2);
  stroke-width: 5;
  stroke-linecap: round;
  fill: none;
}

.trail-path-active {
  stroke: #34d399;
  stroke-width: 2.2;
  stroke-dasharray: 8 8;
  stroke-linecap: round;
  fill: none;
  filter: drop-shadow(0 0 5px rgba(52, 211, 153, 0.45));
}

/* Alternância de SVGs entre Paisagem e Retrato */
.trail-portrait,
.topo-portrait {
  display: none;
}
.trail-landscape,
.topo-landscape {
  display: block;
}

#expedition-map-root.is-portrait .trail-landscape,
#expedition-map-root.is-portrait .topo-landscape {
  display: none;
}
#expedition-map-root.is-portrait .trail-portrait,
#expedition-map-root.is-portrait .topo-portrait {
  display: block;
}

#expedition-map-root.is-portrait .expedition-map-world {
  width: 500px;
  height: 820px;
}

/* 3. Elementos do Mapa: Bússola e Coordenadas HUD */
.map-hud-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
}

.map-compass-rose {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 80px;
  height: 80px;
  opacity: 0.65;
  pointer-events: auto;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.map-compass-rose:hover {
  opacity: 1;
  transform: rotate(15deg);
}

.map-legend-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  pointer-events: auto;
}

/* 4. Marcadores de Expedição (Waypoints no Mapa) */
.map-waypoint {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  pointer-events: auto;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), z-index 0.1s ease, left 0.35s ease, top 0.35s ease;
  user-select: none;
}

/* Posições no modo Paisagem / Desktop (Padrão 1400x700) */
.marker-start { left: 12%; top: 62%; }
.marker-categories { left: 26%; top: 32%; }
.marker-places { left: 42%; top: 22%; }
.marker-o { left: 52%; top: 58%; }
.marker-summit { left: 68%; top: 30%; }
.marker-x { left: 82%; top: 56%; }
.marker-add { left: 92%; top: 28%; }
.marker-login { left: 91% !important; top: 72% !important; }

/* Posições no modo Retrato / Mobile (Adaptação 500x820) */
#expedition-map-root.is-portrait .marker-start { left: 26%; top: 11%; }
#expedition-map-root.is-portrait .marker-categories { left: 74%; top: 24%; }
#expedition-map-root.is-portrait .marker-places { left: 26%; top: 37%; }
#expedition-map-root.is-portrait .marker-o { left: 74%; top: 50%; }
#expedition-map-root.is-portrait .marker-summit { left: 26%; top: 63%; }
#expedition-map-root.is-portrait .marker-x { left: 70%; top: 76%; }
#expedition-map-root.is-portrait .marker-add { left: 50%; top: 90%; }
#expedition-map-root.is-portrait .marker-login { left: 75% !important; top: 88% !important; }

.map-waypoint:hover,
.map-waypoint:focus-visible {
  transform: translate(-50%, -50%) scale(1.18);
  z-index: 20;
}

.map-waypoint.is-active {
  transform: translate(-50%, -50%) scale(1.22);
  z-index: 22;
}

/* Halo de Pulso Cartográfico Otimizado (Sem animações infinitas simultâneas) */
.waypoint-radar-pulse {
  position: absolute;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  pointer-events: none;
  border: 1.5px dashed rgba(255, 255, 255, 0.22);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.map-waypoint:hover .waypoint-radar-pulse,
.map-waypoint.is-active .waypoint-radar-pulse {
  border-style: solid;
  opacity: 1;
  transform: scale(1.2);
  animation: radarWave 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

@keyframes radarWave {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Símbolo do Marcador (Pill / Stamp) */
.waypoint-symbol-box {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.7);
  transition: all 0.25s ease;
  position: relative;
}

/* Símbolo X: O Tesouro dos Planos */
.marker-x .waypoint-symbol-box {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 60%, #7f1d1d 100%);
  color: #ffffff;
  border: 2.5px solid #fca5a5;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.5);
  font-size: 26px;
  letter-spacing: -1px;
}
.marker-x .waypoint-radar-pulse {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.4) 0%, transparent 70%);
}

/* Símbolo O: Como Funciona (Guia / Acampamento) */
.marker-o .waypoint-symbol-box {
  background: linear-gradient(135deg, #10b981 0%, #047857 70%, #064e3b 100%);
  color: #ecfdf5;
  border: 2.5px solid #6ee7b7;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
  font-size: 24px;
}
.marker-o .waypoint-radar-pulse {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, transparent 70%);
}

/* Símbolo ▲: Níveis do Viajante (Pico de Altitude) */
.marker-summit .waypoint-symbol-box {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 70%, #78350f 100%);
  color: #fffbeb;
  border: 2.5px solid #fde68a;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.5);
  font-size: 22px;
}
.marker-summit .waypoint-radar-pulse {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.4) 0%, transparent 70%);
}

/* Símbolo 📍: Lugares / Paradas Recomendadas */
.marker-places .waypoint-symbol-box {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 70%, #164e63 100%);
  color: #ffffff;
  border: 2.5px solid #a5f3fc;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.5);
  font-size: 24px;
}
.marker-places .waypoint-radar-pulse {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.4) 0%, transparent 70%);
}

/* Símbolo 🧭: Categorias / Estilos de Viagem */
.marker-categories .waypoint-symbol-box {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 70%, #4c1d95 100%);
  color: #ffffff;
  border: 2.5px solid #c4b5fd;
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
  font-size: 24px;
}
.marker-categories .waypoint-radar-pulse {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
}

/* Símbolo 🏕️: Ponto de Partida (Início & Busca) */
.marker-start .waypoint-symbol-box {
  background: linear-gradient(135deg, #14b8a6 0%, #0f766e 70%, #134e4a 100%);
  color: #ffffff;
  border: 2.5px solid #5eead4;
  box-shadow: 0 0 25px rgba(20, 184, 166, 0.5);
  font-size: 24px;
}
.marker-start .waypoint-radar-pulse {
  background: radial-gradient(circle, rgba(20, 184, 166, 0.4) 0%, transparent 70%);
}

/* Símbolo 🚩: Cadastrar Lugar (Marco da Trilha) */
.marker-add .waypoint-symbol-box {
  background: linear-gradient(135deg, #f97316 0%, #c2410c 70%, #7c2d12 100%);
  color: #ffffff;
  border: 2.5px solid #fdba74;
  box-shadow: 0 0 25px rgba(249, 115, 22, 0.5);
  font-size: 22px;
}
.marker-add .waypoint-radar-pulse {
  background: radial-gradient(circle, rgba(249, 115, 22, 0.4) 0%, transparent 70%);
}

/* Símbolo 🔑: Portal de Acesso & Login */
.marker-login .waypoint-symbol-box {
  background: linear-gradient(135deg, #10b981 0%, #059669 70%, #064e3b 100%);
  color: #ffffff;
  border: 2.5px solid #34d399;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
  font-size: 22px;
}
.marker-login .waypoint-radar-pulse {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, transparent 70%);
}

/* Rótulo Embaixo do Marcador */
.waypoint-label-badge {
  margin-top: 7px;
  background: rgba(9, 13, 22, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 4px 10px;
  border-radius: 9999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  pointer-events: none;
  transition: all 0.2s ease;
}

.map-waypoint:hover .waypoint-label-badge {
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(2px);
}

.waypoint-main-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #f8fafc;
  text-transform: uppercase;
}

.waypoint-sub-desc {
  font-size: 9px;
  font-weight: 500;
  color: #94a3b8;
  margin-top: -1px;
}

/* Tooltip flutuante de preview */
.waypoint-preview-card {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 220px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 30;
}

.map-waypoint:hover .waypoint-preview-card {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* 5. Controles de Zoom e Centralização do Mapa */
.map-floating-controls {
  position: absolute;
  bottom: 5.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 25;
  pointer-events: auto;
}

.map-control-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.map-control-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(52, 211, 153, 0.4);
  color: #34d399;
  transform: scale(1.06);
}

/* 6. Dock de Navegação da Trilha (Barra de Acesso Rápido Inferior) */
#expedition-dock {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 2rem);
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 9999px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  z-index: 25;
  pointer-events: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

#expedition-dock::-webkit-scrollbar {
  display: none;
}

.dock-item-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.dock-item-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}

.dock-item-btn.is-active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.dock-symbol-badge {
  font-weight: 900;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

/* 7. Painel de Expedição / Drawer Modal (Abre a Seção ao Clicar) */
#expedition-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#expedition-panel-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.expedition-sheet-container {
  width: 100%;
  max-width: 980px;
  max-height: calc(100vh - 4rem);
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.9), 0 0 40px rgba(16, 185, 129, 0.15);
  border-radius: 1.75rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(24px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#expedition-panel-overlay.is-open .expedition-sheet-container {
  transform: translateY(0) scale(1);
}

/* Cabeçalho do Painel */
.expedition-sheet-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9, 13, 22, 0.6);
}

.sheet-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sheet-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

/* Corpo do Conteúdo do Painel */
.expedition-sheet-body {
  padding: 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 185, 129, 0.4) transparent;
}

.expedition-sheet-body::-webkit-scrollbar {
  width: 5px;
}

.expedition-sheet-body::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.4);
  border-radius: 9999px;
}

/* Ocultar footer estático global na página do mapa para manter foco na expedição */
body:has(#expedition-map-root) footer {
  display: none !important;
}

/* Responsividade Mobile Fluida */
@media (max-width: 768px) {
  #expedition-map-root {
    height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
  }
  
  /* Se não houver classe .is-landscape (padrão em telas verticais mobile), ativa mundo retrato */
  #expedition-map-root:not(.is-landscape) .expedition-map-world {
    width: 500px;
    height: 820px;
  }

  #expedition-map-root:not(.is-landscape) .trail-landscape,
  #expedition-map-root:not(.is-landscape) .topo-landscape {
    display: none;
  }

  #expedition-map-root:not(.is-landscape) .trail-portrait,
  #expedition-map-root:not(.is-landscape) .topo-portrait {
    display: block;
  }

  #expedition-map-root:not(.is-landscape) .marker-start { left: 26%; top: 11%; }
  #expedition-map-root:not(.is-landscape) .marker-categories { left: 74%; top: 24%; }
  #expedition-map-root:not(.is-landscape) .marker-places { left: 26%; top: 37%; }
  #expedition-map-root:not(.is-landscape) .marker-o { left: 74%; top: 50%; }
  #expedition-map-root:not(.is-landscape) .marker-summit { left: 26%; top: 63%; }
  #expedition-map-root:not(.is-landscape) .marker-x { left: 70%; top: 76%; }
  #expedition-map-root:not(.is-landscape) .marker-add { left: 50%; top: 90%; }
  #expedition-map-root:not(.is-landscape) .marker-login { left: 75% !important; top: 88% !important; }

  .map-compass-rose {
    display: none;
  }

  .map-legend-badge {
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 1rem);
    padding: 3px 10px;
    font-size: 10.5px;
    justify-content: center;
  }

  .waypoint-symbol-box {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .marker-x .waypoint-symbol-box {
    font-size: 20px;
  }

  .waypoint-main-title {
    font-size: 9px;
  }

  .waypoint-sub-desc {
    display: none;
  }

  .map-floating-controls {
    bottom: 4.5rem;
    right: 0.6rem;
  }

  .map-control-btn {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  #expedition-dock {
    bottom: 0.4rem;
    padding: 3px 5px;
    gap: 3px;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .dock-item-btn {
    padding: 4px 8px;
    font-size: 11px;
  }

  .expedition-sheet-container {
    max-height: calc(100dvh - 2rem);
    border-radius: 1.25rem;
  }

  .expedition-sheet-body {
    padding: 1rem;
  }
}

/* ==============================================================================
   PWA Floating Install Modal Styles & Animations
   ============================================================================== */
.pwa-modal-enter {
  animation: pwaSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pwa-modal-exit {
  animation: pwaFadeDown 0.25s ease forwards;
}

@keyframes pwaSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pwaFadeDown {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
}

/* Lugareiros IA Widget Responsive Positioning */
@media (min-width: 768px) {
  #ai-widget-container {
    bottom: 2rem !important;
    right: 2rem !important;
  }
  #ai-widget-modal {
    bottom: 6.5rem !important;
    right: 2rem !important;
  }
}

