/* ---------- tela principal ---------- */
.map-wrap { position: absolute; inset: 0; isolation: isolate; background: #EEF0F2; }
#map { position: absolute; inset: 0; background-color: #EEF0F2; background-image: linear-gradient(#E3E5E8 1px, transparent 1px), linear-gradient(90deg, #E3E5E8 1px, transparent 1px); background-size: 32px 32px; }
#map.no-tiles { background-color: #EEF0F2; background-image: linear-gradient(#E3E5E8 1px, transparent 1px), linear-gradient(90deg, #E3E5E8 1px, transparent 1px); background-size: 32px 32px; }
.trip-card { position: absolute; z-index: 1001; left: 16px; right: 16px; top: var(--safe-top); display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 16px; background: var(--surface); border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,.10); }
.trip-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.trip-card strong { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-tx span { font-size: 13px; color: var(--sec); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* clima do dia escolhido, dentro da ilha do topo */
.wx { flex: none; display: flex; align-items: center; gap: 8px; padding: 2px 0 2px 12px; border-left: 1px solid var(--line); }
.wx svg { flex: none; }
.wx > span { display: flex; flex-direction: column; gap: 0; }
.wx b { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.wx small { font-size: 11px; font-weight: 500; color: var(--sec); white-space: nowrap; }
.fab { position: absolute; z-index: 1001; right: 16px; bottom: calc(var(--sheet-h, 50%) + 12px); transition: bottom .3s cubic-bezier(.2, .8, .2, 1); width: 44px; height: 44px; border: 0; border-radius: 22px; background: var(--surface); box-shadow: 0 2px 10px rgba(0,0,0,.14); display: grid; place-items: center; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1002; height: var(--sheet-h, 50%); background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,.08); display: flex; flex-direction: column; transition: height .5s cubic-bezier(.22, 1, .36, 1); touch-action: none; user-select: none; -webkit-user-select: none; }
.sheet .list { touch-action: pan-y; padding-bottom: calc(130px + var(--tb)); scroll-padding-bottom: calc(130px + var(--tb)); }
.sheet .chips, .sheet .day-strip { touch-action: pan-x; }
#main.resizing .sheet, #main.resizing .fab, #main.resizing .leaflet-bottom { transition: none; }
.sheet.collapsed .list, .sheet.collapsed .day-strip { visibility: hidden; }
.sheet:not(.full) .list { overflow: hidden; }
.sheet.full .list { overscroll-behavior: contain; }
.grabber-btn { flex: none; width: 100%; height: 22px; border: 0; background: none; display: grid; place-items: center; cursor: grab; touch-action: none; }
.grabber-btn span { width: 36px; height: 5px; border-radius: 3px; background: #D1D1D6; }
.map-note { position: absolute; z-index: 1001; top: calc(var(--safe-top) + 122px); left: 16px; right: 16px; margin: 0 auto; width: fit-content; max-width: calc(100% - 32px); padding: 8px 14px; border-radius: 12px; background: var(--brand); color: var(--surface); font-size: 13px; line-height: 1.4; text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: #D1D1D6; margin: 8px auto 0; }
.places-head { flex: none; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 20px; }
.places-head div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.places-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.4px; }
.places-head > div > span { font-size: 13px; color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; gap: 8px; padding: 12px 20px; overflow-x: auto; flex: none; }
.list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 8px; display: flex; flex-direction: column; }
.day-pill { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px 0 12px; text-transform: capitalize; font-variant-numeric: tabular-nums; }
/* roteiro do dia: saída do hotel, paradas numeradas (iguais aos pins) e o trajeto entre elas */
.rt-start { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 8px; font-size: 14px; color: var(--sec); }
.rt-start b { font-weight: 600; color: var(--ink); }
.rt-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--surface); display: grid; place-items: center; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rt-n.home { background: var(--fill); color: var(--ink); }
.rt-leg { margin-left: 22px; padding: 4px 0 4px 21px; border-left: 2px dotted #C7C7CC; font-size: 12px; color: var(--sec); font-variant-numeric: tabular-nums; }
.stop { width: 100%; min-height: 60px; display: flex; align-items: center; gap: 12px; padding: 8px; border: 0; border-radius: 14px; background: transparent; text-align: left; transition: background .15s; }
.stop[aria-pressed="true"] { background: var(--fill); }
.stop-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stop-tx strong { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop-tx small { font-size: 14px; color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop-tx small b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.stop-go { flex: none; color: #C7C7CC; display: grid; }
.rt-empty { margin: 4px 8px; padding: 24px 20px; border: 1.5px dashed #D0D0D5; border-radius: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.rt-empty strong { font-size: 17px; font-weight: 600; }
.rt-empty p { font-size: 14px; color: var(--sec); }
.rt-empty .btn-out { margin-top: 6px; }

/* pins */
.pin { width: 44px; height: 44px; display: grid; place-items: center; position: relative; }
.pin-dot { width: 34px; height: 34px; border-radius: 50%; background: var(--surface); color: var(--ink); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.2); transition: all .15s; }
.pin-dot { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pin.home .pin-dot { width: 30px; height: 30px; background: var(--fill); border: 2px solid var(--surface); }
.pin.sel .pin-dot { width: 44px; height: 44px; background: var(--brand); color: var(--surface); border: 3px solid var(--surface); }
.pin-label { position: absolute; top: 50px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--surface); border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.me { width: 18px; height: 18px; position: relative; }
.me::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--brand); animation: pulse 2s ease-out infinite; }
.me::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--brand); border: 3px solid var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
@keyframes pulse { 0% { transform: scale(.6); opacity: .35; } 100% { transform: scale(2.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Leaflet core (stylesheet inlined: CDN stylesheets are blocked) */
.leaflet-pane, .leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow, .leaflet-tile-container, .leaflet-pane > svg, .leaflet-pane > canvas, .leaflet-zoom-box, .leaflet-image-layer, .leaflet-layer { position: absolute; left: 0; top: 0; }
.leaflet-container { overflow: hidden; -webkit-tap-highlight-color: transparent; font-family: var(--font); outline: none; }
.leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow { user-select: none; -webkit-user-drag: none; }
.leaflet-container img.leaflet-tile, .leaflet-container .leaflet-marker-pane img { max-width: none !important; max-height: none !important; width: auto; padding: 0; }
.leaflet-container img.leaflet-tile { width: 256px; height: 256px; }
.leaflet-tile { filter: inherit; visibility: hidden; }
.leaflet-tile-loaded { visibility: inherit; }
.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
#map.raster .leaflet-tile-pane { filter: saturate(1.2); }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg { z-index: 200; }
.leaflet-control { position: relative; z-index: 800; pointer-events: auto; }
.leaflet-top, .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-top { top: 0; } .leaflet-right { right: 0; } .leaflet-bottom { bottom: calc(var(--sheet-h, 50%) + 2px); transition: bottom .3s cubic-bezier(.2, .8, .2, 1); } .leaflet-left { left: 0; }
.leaflet-zoom-animated { transform-origin: 0 0; }
.leaflet-zoom-anim .leaflet-zoom-animated { transition: transform .25s cubic-bezier(0,0,.25,1); }
.leaflet-zoom-anim .leaflet-tile, .leaflet-pan-anim .leaflet-tile { transition: none; }
.leaflet-zoom-anim .leaflet-zoom-hide { visibility: hidden; }
.leaflet-interactive { cursor: pointer; }
.leaflet-grab { cursor: grab; }
.leaflet-dragging .leaflet-grab { cursor: grabbing; }
.leaflet-marker-icon, .leaflet-marker-shadow, .leaflet-image-layer, .leaflet-pane > svg path, .leaflet-tile-container { pointer-events: none; }
.leaflet-marker-icon.leaflet-interactive, .leaflet-pane > svg path.leaflet-interactive { pointer-events: auto; }
.leaflet-control-attribution { margin: 0 4px 4px 0; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.8); font-size: 10px; color: var(--sec); }
.leaflet-control-attribution a { color: var(--sec); text-decoration: none; }
.leaflet-div-icon { background: none; border: 0; }

/* busca: lupa acima do botão de localização, painel de busca e cartão do resultado no mapa */
.fab.fab-search { bottom: calc(var(--sheet-h, 50%) + 64px); }
#main.has-found .fab { display: none; }
.search-view { position: absolute; inset: 0; z-index: 1100; background: var(--surface); display: flex; flex-direction: column; animation: rise-in .3s cubic-bezier(.2, .8, .2, 1); }
.sv-head { flex: none; display: flex; align-items: center; gap: 4px; padding: var(--safe-top) 20px 0 8px; }
.sv-head .search { flex: 1; min-width: 0; min-height: 48px; }
.sv-head .search input { font-size: 16px; }
.sv-head .search input::-webkit-search-cancel-button { display: none; }
.search-view .chips { padding: 12px 20px 4px; }
.sv-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 20px 24px; display: flex; flex-direction: column; }
.sv-label { padding: 4px 0 2px; }
.sv-row { width: 100%; }
.sv-row .tx { min-width: 0; }
.sv-row strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.sv-rate { flex: none; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.found { position: absolute; z-index: 1003; left: 12px; right: 12px; bottom: calc(var(--sheet-h, 50%) + 12px); padding: 12px 12px 14px 14px; border-radius: 20px; background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.16); display: flex; flex-direction: column; gap: 10px; animation: rise .25s cubic-bezier(.2, .8, .2, 1); }
.found-top { display: flex; align-items: center; gap: 12px; }
.found-top .ic { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--fill); display: grid; place-items: center; }
.found-top .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.found-top strong { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.found-top small { font-size: 14px; color: var(--sec); }
.found-meta { font-size: 13px; color: var(--sec); font-variant-numeric: tabular-nums; }
.found-act { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* Decidir no destino: "Agora" e plano B (pesquisa de rua, nov. 2026) */
/* Perto de você agora: depois do roteiro, cartões com foto em fila, fundo branco e sem borda */
.now { margin: 20px -12px 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.now-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 12px 10px; }
.now-head strong { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.now-head span { font-size: 13px; font-weight: 600; color: var(--sec); font-variant-numeric: tabular-nums; }
.now-row { display: flex; gap: 10px; overflow-x: auto; padding: 0 12px 4px; scroll-padding-inline: 12px; touch-action: pan-x pan-y; scroll-snap-type: x mandatory; scrollbar-width: none; }
.now-row::-webkit-scrollbar { display: none; }
.now-card { flex: 0 0 148px; min-width: 0; padding: 0; border: 0; background: none; text-align: left; display: flex; flex-direction: column; gap: 2px; scroll-snap-align: start; color: var(--ink); transition: transform .15s; }
.now-card:active { transform: scale(.96); }
.now-ph { position: relative; display: grid; place-items: center; height: 104px; margin-bottom: 6px; border-radius: 20px; overflow: hidden; background: var(--fill); color: var(--ink); }
.now-ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.now-card:hover .now-ph img { transform: scale(1.05); }
.now-ph i { position: absolute; left: 8px; bottom: 8px; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.92); font-style: normal; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.now-card strong { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-card small { font-size: 13px; color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.planb-go { flex: none; min-width: 44px; }
/* plano B: cartão claro, ícone de chuva num círculo branco e um botão preto pequeno */
.planb { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; margin: 2px 0 10px; border-radius: 24px; background: var(--fill); color: var(--ink); }
.planb-ic { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.planb-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.planb-tx small { font-size: 12px; font-weight: 600; color: var(--sec); }
.planb-tx strong { font-size: 15px; font-weight: 600; line-height: 1.3; }
.planb-go { flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; }
.planb-go:hover { background: var(--brand-deep); }
/* painel aberto até o topo: os botões redondos saem para não cobrir o cartão da viagem */
#main.sheet-full .fab { opacity: 0; pointer-events: none; transform: scale(.8); }
.fab { transition: bottom .3s cubic-bezier(.2, .8, .2, 1), opacity .2s, transform .2s; }

/* chuva caindo sobre o mapa nos dias de chuva (traços finos em duas camadas, cinza azulado bem leve) */
.rain { position: absolute; inset: 0; z-index: 450; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity 1s; }
.rain.on { opacity: 1; }
/* sombra de nuvem passando: escurece e clareia devagar */
.rain::before { content: ""; position: absolute; inset: 0; background: rgb(40, 55, 80); opacity: .08; animation: rain-cloud 14s ease-in-out infinite; }
@keyframes rain-cloud { 50% { opacity: .17; } }
/* gotas: cada uma com tamanho, velocidade, atraso e posição próprios (montadas no map.js) */
.rain i { position: absolute; top: 0; left: var(--x); width: var(--w); height: var(--h); border-radius: 2px; background: rgba(255, 255, 255, var(--o)); box-shadow: 0 0 1.5px rgba(30, 40, 60, .55); transform: translate3d(0, -12vh, 0) rotate(12deg); animation: rain-drop var(--d) linear var(--dl) infinite; }
@keyframes rain-drop { to { transform: translate3d(calc(var(--fall) * -0.21), var(--fall), 0) rotate(12deg); } }
/* respingos: um anel que abre e some onde a gota bate */
.rain b { position: absolute; left: var(--x); top: var(--y); width: 18px; height: 7px; margin: -3.5px 0 0 -9px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .85); opacity: 0; animation: rain-splash var(--d) ease-out var(--dl) infinite; }
@keyframes rain-splash { 0% { opacity: 0; transform: scale(.2); } 10% { opacity: .9; } 60%, 100% { opacity: 0; transform: scale(1.4); } }
@media (prefers-reduced-motion: reduce) { .rain i, .rain b { display: none; } .rain::before { animation: none; } }
/* roteiro do dia no painel: os mesmos cartões do Roteiro; o escolhido no mapa ganha contorno preto */
.map-tl { flex: none; min-height: auto; overflow: visible; padding: 4px 4px 0; }
.map-tl .ev-card { cursor: pointer; }
.map-tl .ev.sel .ev-card { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.map-tl .ev-time { pointer-events: auto; }
.list .rt-start { margin-bottom: 6px; }
/* parceiros no mapa: pílula preta com ícone, nome e estrela, sempre visível */
/* parceiros em destaque: círculo preto com estrela dourada e anel que pulsa; nome e oferta aparecem ao passar o mouse
   (as ofertas ficam todas na faixa "Parceiros perto", então o mapa fica limpo) */
.pin-pt { position: relative; width: 40px; height: 40px; border-radius: 50%; background: #111; color: #fff; display: grid; place-items: center; border: 2.5px solid #fff; box-shadow: 0 6px 16px rgba(0,0,0,.3); cursor: pointer; animation: pt-pop .6s cubic-bezier(.34, 1.56, .64, 1) backwards; animation-delay: calc(var(--i, 0) * 90ms + .3s); transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.pin-pt:hover, .map-mk:focus-visible .pin-pt { transform: scale(1.12); z-index: 5; }
.pin-pt-ic { display: grid; place-items: center; }
.pin-pt-star { position: absolute; right: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; background: #111; color: #FFD34D; border: 2px solid #fff; display: grid; place-items: center; }
.pin-pt-star svg { width: 10px; height: 10px; }
.pin-pt-ring { position: absolute; inset: -2.5px; border-radius: 50%; border: 2px solid #111; animation: pt-ring 2.2s cubic-bezier(.2, .8, .2, 1) infinite; pointer-events: none; }
.pin-pt-tx { position: absolute; bottom: calc(100% + 10px); left: 50%; display: flex; flex-direction: column; padding: 7px 12px; border-radius: 16px; background: #111; color: #fff; white-space: nowrap; line-height: 1.2; box-shadow: 0 8px 22px rgba(0,0,0,.3); opacity: 0; transform: translate(-50%, 6px) scale(.9); transition: opacity .18s, transform .25s cubic-bezier(.34, 1.56, .64, 1); pointer-events: none; }
.pin-pt:hover .pin-pt-tx, .map-mk:focus-visible .pin-pt-tx { opacity: 1; transform: translate(-50%, 0) scale(1); }
.pin-pt-tx b { font-size: 13px; font-weight: 800; letter-spacing: -0.2px; }
.pin-pt-tx small { font-size: 11px; font-weight: 600; color: #C7C7CC; }
@keyframes pt-pop { from { opacity: 0; transform: scale(.4); } }
@keyframes pt-ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.9); opacity: 0; } }
/* faixa de ofertas dos parceiros logo abaixo do cartão da viagem */
.pt-strip { position: absolute; z-index: 1001; left: 0; right: 0; top: calc(var(--safe-top) + 70px); display: flex; align-items: center; gap: 8px; padding: 2px 16px 8px; overflow-x: auto; scrollbar-width: none; }
.pt-strip::-webkit-scrollbar { display: none; }
.pts-lab { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 14px; border-radius: 999px; background: #111; color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.pts-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 5px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); box-shadow: 0 4px 16px rgba(0,0,0,.14); font: inherit; white-space: nowrap; animation: up .5s cubic-bezier(.34, 1.56, .64, 1) backwards; animation-delay: calc(var(--i) * 70ms + .2s); transition: transform .15s; }
.pts-chip:active { transform: scale(.95); }
.pts-ic { width: 30px; height: 30px; border-radius: 50%; background: #111; color: #fff; display: grid; place-items: center; }
.pts-chip b { font-size: 13px; font-weight: 700; }
.pts-chip small { font-size: 12px; color: var(--sec); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .pin-pt, .pin-pt-ring, .pts-chip { animation: none; } }

/* mapa 3D (MapLibre GL): botão 2D/3D, marcadores e créditos acompanhando o painel */
.fab.fab-tilt { bottom: calc(var(--sheet-h, 50%) + 116px); font: 800 14px/1 var(--font); letter-spacing: -0.2px; }
.map-mk { cursor: pointer; }
.map-mk:focus-visible { outline: none; }
#map.gl .maplibregl-ctrl-bottom-left { bottom: calc(var(--sheet-h, 50%) + 2px); transition: bottom .3s cubic-bezier(.2, .8, .2, 1); }
#main.resizing #map.gl .maplibregl-ctrl-bottom-left { transition: none; }
#map.gl .maplibregl-ctrl-attrib { font-size: 10px; }
