/* Passeie por Ivaiporã com a IVA — mapa interativo de Ivaiporã.
   Identidade da IVA: verde #2BB673, verde escuro #1C4B42, lima #B4E717, laranja #F8991C, creme #F6F5F2, Work Sans.
   Superfícies em "vidro líquido": translúcidas, com desfoque e saturação do mapa por trás, brilho na
   borda de cima e sombra macia. Só os elementos flutuantes de primeiro nível desfocam o fundo (o
   desfoque custa GPU a cada quadro em que o mapa se mexe); o que fica dentro do painel é só translúcido. */

@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(../vendor/fonts/work-sans/work-sans-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(../vendor/fonts/work-sans/work-sans-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(../vendor/fonts/work-sans/work-sans-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(../vendor/fonts/work-sans/work-sans-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --verde: #2BB673;
  --verde-escuro: #1C4B42;
  --verde-claro: #E3F4E9;
  --lima: #B4E717;
  --laranja: #F8991C;
  --creme: #F6F5F2;
  --texto: #1F2A27;
  --texto-suave: #4F5E58;
  --borda: #E3DED2;
  --branco: #FFFFFF;
  --sombra: 0 8px 24px rgba(28, 75, 66, 0.16);
  --topo-altura: 108px;      /* altura do topo com o menu; o app.js atualiza com a medida real */
  --margem: 10px;
  --painel-altura: 0px;
  --painel-largura: 392px;   /* painel lateral do computador */
  --area-topo: max(var(--margem), env(safe-area-inset-top));

  /* Vidro líquido */
  --vidro: rgba(246, 251, 248, 0.6);
  --vidro-denso: rgba(246, 251, 248, 0.8);
  --vidro-brilho: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.1) 55%, rgba(255, 255, 255, 0.22) 100%);
  --vidro-desfoque: blur(16px) saturate(180%);
  --vidro-desfoque-forte: blur(24px) saturate(185%);
  --vidro-relevo: inset 0 1px 0.5px rgba(255, 255, 255, 0.95), inset 0 -1px 0.5px rgba(255, 255, 255, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.32);
  --vidro-sombra: 0 1px 2px rgba(16, 48, 42, 0.08), 0 10px 28px -6px rgba(16, 48, 42, 0.26);
  /* Peças dentro do painel: translúcidas, sem desfoque próprio. */
  --placa: rgba(255, 255, 255, 0.64);
  --placa-relevo: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 0 0 1px rgba(28, 75, 66, 0.08);
  --placa-sombra: 0 1px 2px rgba(16, 48, 42, 0.06), 0 4px 12px -6px rgba(16, 48, 42, 0.18);
  /* Curvas */
  --ease-saida: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Work Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--texto);
  background: #F3F0E7;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button, a, input { font: inherit; }
:focus-visible { outline: 3px solid var(--laranja); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pular-conteudo { position: fixed; left: 12px; top: -60px; z-index: 50; background: var(--verde-escuro); color: #fff; padding: 10px 14px; border-radius: 12px; }
.pular-conteudo:focus { top: 12px; }

/* ---------------------------------------------------------------- vidro */
.vidro {
  background: var(--vidro-brilho), var(--vidro);
  -webkit-backdrop-filter: var(--vidro-desfoque);
  backdrop-filter: var(--vidro-desfoque);
  box-shadow: var(--vidro-relevo), var(--vidro-sombra);
}
/* Borda especular: clara no alto à esquerda, some no meio e volta fraca embaixo. */
.vidro::before {
  content: ''; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.25) 30%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.2) 78%, rgba(255, 255, 255, 0.65) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* ---------------------------------------------------------------- topo: o menu único do app
   No celular, duas linhas no mesmo vidro: marca e chat em cima, os botões do menu embaixo (rolam
   para o lado). No computador, uma barra só: marca, menu e chat. */
.topo {
  position: fixed; z-index: 20;
  top: var(--area-topo); left: var(--margem); right: var(--margem);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'logo titulo chat' 'menu menu menu';
  align-items: center; column-gap: 10px; row-gap: 7px;
  padding: 8px 10px 9px 14px;
  border-radius: 22px;
}
.topo-logo { grid-area: logo; height: 26px; width: auto; flex: none; }
.topo-titulo { grid-area: titulo; min-width: 0; margin: 0; font-size: 15px; line-height: 1.15; font-weight: 700; color: var(--verde-escuro); }
.topo-titulo span { display: block; font-weight: 500; }
/* "Falar com a IVA": abre o webchat. Gota de vidro verde com o balão de conversa e um ponto
   "online"; enquanto o widget carrega, um anel gira em volta. */
.topo-chat {
  grid-area: chat; position: relative; flex: none; width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50%; color: #fff; text-decoration: none;
  background: radial-gradient(circle at 32% 24%, #5FD69A 0%, var(--verde) 46%, #1E8A57 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), inset 0 -3px 6px rgba(14, 60, 40, 0.3), 0 6px 16px -4px rgba(30, 138, 87, 0.55);
  transition: transform 160ms var(--ease-saida), filter 160ms ease;
}
.topo-chat svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 1px rgba(14, 60, 40, 0.3)); }
.topo-chat:active { transform: scale(0.94); }
.topo-chat-ponto {
  position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--lima); box-shadow: 0 0 0 2px #fff, 0 0 8px rgba(180, 231, 23, 0.8);
}
.topo-chat.carregando::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2.5px solid rgba(43, 182, 115, 0.25); border-top-color: var(--verde-escuro);
  animation: girar 0.8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }
/* No celular o botão flutuante do widget fica escondido: o chat abre pelo botão do topo, por cima
   de tudo. No computador é o contrário (ver "telas largas"): fica o botão flutuante no canto, como
   no site da IVA, e o do topo sai quando ele aparece. */
@media (max-width: 899px) { .h-widget-float { display: none !important; } }

/* ---------------------------------------------------------------- mapa */
.palco { position: fixed; inset: 0; }
.mapa { position: absolute; inset: 0; background: #F3F0E7; }
.mapa-falhou {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: calc(var(--area-topo) + var(--topo-altura) + 20px) 24px calc(var(--painel-altura) + 16px); text-align: center; background: var(--creme); color: var(--verde-escuro);
}
.mapa-falhou img { width: 150px; height: auto; border-radius: 28px; box-shadow: 0 14px 30px -12px rgba(16, 48, 42, 0.45); }
/* "Carregando o mapa…": pílula de vidro no meio da área do mapa, até o MapLibre terminar de abrir. */
.mapa-carregando {
  position: fixed; z-index: 5; left: 50%;
  top: calc(var(--area-topo) + var(--topo-altura) + (100vh - var(--area-topo) - var(--topo-altura) - var(--painel-altura)) / 2);
  transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px 7px 7px; border-radius: 999px; pointer-events: none;
  color: var(--verde-escuro); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.mapa-carregando img { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; animation: carregando-pulsa 1.4s ease-in-out infinite; }
/* Os botões do mapa só aparecem quando ele abre: antes, tocar neles não faria nada. */
.controles-mapa { transition: opacity 0.25s ease; }
body:not(.mapa-pronto) .controles-mapa, body:not(.mapa-pronto) .maplibregl-ctrl { opacity: 0; pointer-events: none; }
@keyframes carregando-pulsa { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.mapa-falhou p { margin: 0; max-width: 320px; font-size: 15px; line-height: 1.4; }
.controles-mapa { position: fixed; z-index: 6; right: var(--margem); top: calc(var(--area-topo) + var(--topo-altura) + 10px); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.botao-flutuante {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px;
  border: 0; border-radius: 999px; color: var(--verde-escuro);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform 160ms var(--ease-saida), background-color 160ms ease;
}
.botao-flutuante svg { width: 20px; height: 20px; }
.botao-flutuante:active { transform: scale(0.96); }
/* "Onde estou": azul quando a localização está ligada; gira enquanto o aparelho procura. */
.botao-local[aria-pressed='true'] { color: #1A73E8; }
.botao-local.carregando svg { animation: girar 1s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
/* Recados do mapa (localização negada, fora da cidade...), acima dos botões. */
.aviso-mapa {
  position: fixed; z-index: 7; right: var(--margem); top: calc(var(--area-topo) + var(--topo-altura) + 120px);
  max-width: min(330px, calc(100vw - 2 * var(--margem))); margin: 0; padding: 10px 14px; border-radius: 16px;
  color: var(--texto); font-size: 13.5px; line-height: 1.35; animation: balao-entra 0.22s var(--ease-saida);
}
/* Menu (dentro do topo): pílulas com ícone e nome (pontos turísticos, hotéis, restaurantes, outros,
   saúde, assistência social e secretarias). Quando não cabem, rolam para o lado e a borda esmaece
   do lado em que há mais botões. */
.filtro {
  grid-area: menu; min-width: 0; display: flex; gap: 6px;
  margin: 0 -10px 0 -14px; padding: 2px 10px 3px 14px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
}
.filtro::-webkit-scrollbar { display: none; }
.filtro.rola:not(.no-inicio):not(.no-fim) {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 26px, #000 calc(100% - 30px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 26px, #000 calc(100% - 30px), transparent);
}
.filtro.rola.no-inicio:not(.no-fim) {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent);
}
.filtro.rola.no-fim:not(.no-inicio) {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 26px);
  mask-image: linear-gradient(90deg, transparent, #000 26px);
}
.filtro-botao {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 13px 0 10px;
  border: 0; border-radius: 999px; color: var(--verde-escuro); background: var(--placa); box-shadow: var(--placa-relevo), var(--placa-sombra);
  font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: transform 160ms var(--ease-saida), background-color 160ms ease, color 160ms ease;
}
.filtro-botao svg { width: 18px; height: 18px; flex: none; }
/* Rótulo "Cadastur" antes de Hotéis, Restaurantes e Outros: mostra de onde vem a lista. É também um
   botão discreto (o "i"): abre "Sua empresa no mapa". A área de toque tem a altura dos botões, mas o
   traço que separa do resto do menu continua curto. */
.filtro-rotulo {
  position: relative; flex: none; align-self: center; display: inline-flex; align-items: center; gap: 4px;
  min-height: 34px; margin-left: 6px; padding: 0 4px 0 8px; border: 0; border-radius: 0 999px 999px 0; background: none;
  color: #1F4E79; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; cursor: pointer;
}
.filtro-rotulo::before { content: ''; position: absolute; left: 0; top: 50%; height: 18px; margin-top: -9px; border-left: 1.5px solid rgba(31, 78, 121, 0.35); }
.filtro-rotulo svg { width: 15px; height: 15px; flex: none; opacity: 0.75; transition: opacity 160ms ease, transform 160ms var(--ease-saida); }
.filtro-rotulo:hover svg, .filtro-rotulo:focus-visible svg { opacity: 1; transform: scale(1.12); }
.filtro-rotulo:active svg { transform: scale(0.92); }
.filtro-botao:active { transform: scale(0.95); }
.filtro-botao[aria-pressed='true'] {
  color: #fff; background: radial-gradient(circle at 32% 24%, #5FD69A 0%, var(--verde) 46%, #1E8A57 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.55), 0 4px 10px -3px rgba(30, 138, 87, 0.55);
}
.ver-iva { position: fixed; z-index: 7; right: var(--margem); bottom: calc(var(--painel-altura) + 36px); padding-left: 6px; }
.ver-iva img { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9); }
.ver-iva[hidden] { display: none; }

.maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: var(--painel-altura); transition: bottom 0.2s ease; }
/* Zoom do mapa (telas de 600 px ou mais): logo abaixo do topo. */
.maplibregl-ctrl-top-right { top: calc(var(--area-topo) + var(--topo-altura) + 10px); }
.maplibregl-ctrl-top-right .maplibregl-ctrl { margin: 0 var(--margem) 0 0; }
.maplibregl-ctrl-group:not(:empty) {
  overflow: hidden; border-radius: 16px;
  background: var(--vidro-brilho), var(--vidro);
  -webkit-backdrop-filter: var(--vidro-desfoque); backdrop-filter: var(--vidro-desfoque);
  box-shadow: var(--vidro-relevo), var(--vidro-sombra);
}
.maplibregl-ctrl-group button { width: 40px; height: 40px; background-color: transparent; }
.maplibregl-ctrl-group button + button { border-top: 1px solid rgba(28, 75, 66, 0.1); }
/* Crédito do OpenStreetMap no mapa: só nos primeiros 5 s (js/mapa.js); depois some e fica no fim
   da lista (.creditos-mapa). */
.maplibregl-ctrl-attrib {
  font-size: 11px; border-radius: 12px; margin: 0 8px 8px 0;
  background: rgba(246, 251, 248, 0.72) !important;
  -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%);
  transition: opacity 0.6s ease, visibility 0s linear 0s;
}
.maplibregl-ctrl-attrib.credito-oculto { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.6s ease, visibility 0s linear 0.6s; }
.creditos-mapa { margin: 16px 2px 2px; font-size: 11.5px; line-height: 1.4; color: var(--texto-suave); text-align: center; }
.creditos-mapa a { color: inherit; }
.creditos-privacidade { margin-top: 4px; }
.maplibregl-ctrl-attrib a { color: var(--verde-escuro); }
@media (max-width: 599px) { .maplibregl-ctrl-top-right .maplibregl-ctrl-group { display: none; } }

/* Marcadores dos lugares: contas de vidro. Sem "position" aqui: o MapLibre posiciona o elemento
   (absolute + transform). */
.marcador { display: block; width: 48px; height: 56px; padding: 0; border: 0; background: none; cursor: pointer; z-index: 2; }
.marcador-icone {
  position: absolute; left: 2px; top: 0; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; color: var(--verde-escuro); border: 3px solid var(--verde);
  background: radial-gradient(circle at 32% 26%, #FFFFFF 0%, #F4FAF6 46%, #DCECE2 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.95), inset 0 -3px 6px rgba(28, 75, 66, 0.14), 0 5px 14px rgba(16, 48, 42, 0.3);
}
.marcador-icone::after {
  content: ''; position: absolute; left: 50%; bottom: -10px; width: 12px; height: 12px; margin-left: -6px;
  background: var(--verde); clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.marcador-icone svg { width: 24px; height: 24px; }
.marcador-nome {
  position: absolute; left: 50%; top: calc(100% + 4px); transform: translateX(-50%);
  white-space: nowrap; padding: 4px 10px; border-radius: 999px; color: #fff;
  background: linear-gradient(180deg, rgba(42, 99, 87, 0.95), rgba(22, 64, 56, 0.95));
  font-size: 12px; font-weight: 600; line-height: 1.1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 3px 10px rgba(16, 48, 42, 0.28);
}
.marcador.ativo .marcador-icone { background: radial-gradient(circle at 32% 26%, #2E6E61 0%, #1C4B42 70%); color: var(--lima); border-color: var(--lima); }
.marcador.ativo .marcador-icone::before {
  content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--lima);
  animation: pulso 1.8s ease-out infinite;
}
.marcador.ativo .marcador-icone::after { background: var(--lima); }
/* Arredores (de carro): anel laranja. */
.marcador.arredores .marcador-icone { border-color: var(--laranja); }
.marcador.arredores .marcador-icone::after { background: var(--laranja); }
/* Hotéis, restaurantes e outros serviços: cada grupo com a sua cor de anel e de ícone. */
.marcador.grupo-hoteis .marcador-icone { border-color: #3D7DCA; color: #1F4E79; }
.marcador.grupo-hoteis .marcador-icone::after { background: #3D7DCA; }
.marcador.grupo-restaurantes .marcador-icone { border-color: #E0583A; color: #8A2A14; }
.marcador.grupo-restaurantes .marcador-icone::after { background: #E0583A; }
.marcador.grupo-outros .marcador-icone { border-color: #8A63C9; color: #4B2F7A; }
.marcador.grupo-outros .marcador-icone::after { background: #8A63C9; }
/* Serviços públicos: saúde (vermelho), assistência social (azul-petróleo) e secretarias (ardósia). */
.marcador.grupo-saude .marcador-icone { border-color: #D93A5B; color: #8E1A33; }
.marcador.grupo-saude .marcador-icone::after { background: #D93A5B; }
.marcador.grupo-social .marcador-icone { border-color: #13939F; color: #0B5560; }
.marcador.grupo-social .marcador-icone::after { background: #13939F; }
.marcador.grupo-secretarias .marcador-icone { border-color: #5C6B85; color: #2E3A4F; }
.marcador.grupo-secretarias .marcador-icone::after { background: #5C6B85; }
.marcador.grupo-educacao .marcador-icone { border-color: #5B63D3; color: #2B3190; }
.marcador.grupo-educacao .marcador-icone::after { background: #5B63D3; }
.marcador.grupo-transporte .marcador-icone { border-color: #C9920E; color: #6B4E00; }
.marcador.grupo-transporte .marcador-icone::after { background: #C9920E; }
/* Mapa afastado: só os ícones; o nome volta no destino, onde a IVA está e ao passar o mouse
   (no pino ou no lugar da lista, que realça o pino). */
.marcador-nome { transition: opacity 0.2s ease; }
.mapa-afastado .marcador:not(.ativo):not(.com-iva):not(.realce):not(:hover):not(:focus-visible) .marcador-nome { opacity: 0; }
/* Nome de outro lugar que ficaria por baixo da IVA parada: some até ela sair dali (js: sob-iva);
   o pino que fica atrás dela (pino-sob-iva) só clareia. */
.marcador.sob-iva:not(.realce):not(:hover):not(:focus-visible) .marcador-nome { opacity: 0; }
.marcador.pino-sob-iva:not(.realce):not(:hover):not(:focus-visible) .marcador-icone { opacity: 0.35; }
/* Lugar realçado pela lista (mouse em cima): o pino cresce e passa à frente dos outros. */
.marcador.realce { z-index: 5; }
/* Prévia do pino (computador, mouse em cima): o cartãozinho já traz o nome, que sai de baixo do pino. */
.marcador.com-previa { z-index: 5; }
.marcador.com-previa .marcador-nome { opacity: 0; }
.previa-pino {
  position: fixed; left: 0; top: 0; z-index: 9; display: flex; align-items: center; gap: 11px;
  width: max-content; max-width: 310px; padding: 8px 16px 8px 8px; border-radius: 18px; pointer-events: none;
  color: var(--texto); background: linear-gradient(180deg, #FFFFFF 0%, #F5FAF7 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(28, 75, 66, 0.07), 0 1px 2px rgba(16, 48, 42, 0.08), 0 16px 32px -10px rgba(16, 48, 42, 0.36);
  animation: previa-entra 0.16s var(--ease-saida);
}
.previa-pino .item-foto, .previa-pino .item-icone { flex: none; width: 56px; height: 56px; }
.previa-texto { min-width: 0; display: grid; gap: 2px; }
.previa-nome { font-size: 14px; font-weight: 700; line-height: 1.2; color: var(--verde-escuro); }
.previa-detalhe { font-size: 12px; line-height: 1.3; color: var(--texto-suave); }
.previa-acao { margin-top: 2px; font-size: 11.5px; font-weight: 600; color: #1E7A4C; }
@keyframes previa-entra { from { opacity: 0; translate: 0 4px; } to { opacity: 1; translate: 0 0; } }
/* Onde a IVA está, ela mesma marca o lugar: o pino some e fica só o nome, sob os pés dela. */
.marcador.com-iva .marcador-icone { opacity: 0; }
.marcador.com-iva .marcador-nome { background: linear-gradient(180deg, #43C487, var(--verde)); color: #0E2B25; }
@keyframes pulso { 0% { transform: scale(0.8); opacity: 0.9; } 100% { transform: scale(1.35); opacity: 0; } }
/* Mapa afastado: pinos menores, para não se amontoarem. */
.marcador-icone { transition: transform 0.2s ease; transform-origin: 50% 120%; }
.mapa-afastado .marcador:not(.ativo):not(.com-iva):not(.realce):not(.com-previa) .marcador-icone { transform: scale(0.74); }
.marcador.realce .marcador-icone, .marcador.com-previa .marcador-icone { transform: scale(1.12); }
/* Pinos que acabam de aparecer (entrada, troca de grupo, busca) brotam do chão, um pouco depois do
   outro (--atraso, js/app.js). "scale" e "translate" somam com o "transform" do mapa afastado. */
.marcador.brotando:not(.com-iva):not(.pino-sob-iva) .marcador-icone { animation: pino-brota 0.42s var(--ease-saida) var(--atraso, 0ms) backwards; }
.marcador.brotando .marcador-nome { animation: pino-nome 0.3s ease-out calc(var(--atraso, 0ms) + 140ms) backwards; }
@keyframes pino-brota { 0% { opacity: 0; scale: 0.3; translate: 0 12px; } 60% { opacity: 1; scale: 1.08; translate: 0 -2px; } 100% { scale: 1; translate: 0 0; } }
@keyframes pino-nome { from { opacity: 0; } }

/* "Você está aqui": ponto azul (a convenção dos mapas), com halo pulsando e o nome embaixo. */
.voce-aqui { width: 22px; height: 22px; z-index: 3; pointer-events: none; }
.voce-aqui-ponto {
  position: absolute; inset: 2px; border-radius: 50%; background: #1A73E8;
  box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(10, 40, 90, 0.45);
}
.voce-aqui-halo { position: absolute; inset: -9px; border-radius: 50%; background: rgba(26, 115, 232, 0.28); animation: pulso 2s ease-out infinite; }
.voce-aqui-rotulo {
  position: absolute; left: 50%; top: calc(100% + 7px); transform: translateX(-50%);
  white-space: nowrap; padding: 4px 10px; border-radius: 999px; color: #fff;
  background: linear-gradient(180deg, #3B8BF0, #1A63C9);
  font-size: 12px; font-weight: 600; line-height: 1.1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 3px 10px rgba(10, 40, 90, 0.3);
}
/* Convite da IVA no balão da saudação. */
.balao-acao {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 7px 12px; border: 0; border-radius: 999px;
  background: #E8F1FE; color: #1A5DBF; font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(26, 115, 232, 0.25);
}
.balao-acao:active { transform: scale(0.97); }

/* IVA no mapa */
.iva { width: 80px; height: 100px; pointer-events: none; z-index: 4; }
.iva-sprite { position: absolute; inset: 0; background-repeat: no-repeat; image-rendering: auto; transform-origin: 50% 88%; }
/* Molinhas do corpo inteiro, a partir dos pés (a âncora do sprite fica a 88% da altura): achata,
   estica e assenta ao chegar; achata de leve ao sair andando e ao baixar a mão do aceno. */
.iva-sprite.pulinho { animation: iva-pulinho 0.5s ease-in-out; }
.iva-sprite.molinha { animation: iva-molinha 0.28s ease-out; }
@keyframes iva-pulinho {
  0%, 100% { transform: none; }
  20% { transform: scale(1.08, 0.9); }
  48% { transform: scale(0.95, 1.07); }
  74% { transform: scale(1.03, 0.97); }
}
@keyframes iva-molinha {
  0%, 100% { transform: none; }
  35% { transform: scale(1.05, 0.93); }
}
/* O balão fica centrado na IVA, mas desliza (--desloc) para não sair da tela; a ponta continua nela.
   Ele anda junto com a IVA, então não desfoca o fundo: é um vidro "leitoso", quase opaco. */
.iva-balao {
  position: absolute; left: 50%; bottom: calc(100% - 12px); transform: translateX(calc(-50% + var(--desloc, 0px)));
  width: max-content; max-width: min(290px, 80vw); padding: 10px 14px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F5FAF7 100%); color: var(--texto); border-radius: 18px;
  font-size: 14px; font-weight: 500; line-height: 1.35; pointer-events: auto;
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(28, 75, 66, 0.07), 0 1px 2px rgba(16, 48, 42, 0.08), 0 12px 28px -6px rgba(16, 48, 42, 0.3);
  transform-origin: 50% 100%; animation: balao-entra 0.22s var(--ease-saida);
}
.iva-balao::after {
  content: ''; position: absolute; left: calc(50% - var(--desloc, 0px)); bottom: -7px; width: 14px; height: 14px; margin-left: -7px;
  background: #F5FAF7; box-shadow: 1px 1px 0 rgba(28, 75, 66, 0.07); transform: rotate(45deg);
}
.iva-balao strong { color: var(--verde-escuro); }
@keyframes balao-entra { from { opacity: 0; scale: 0.94; } to { opacity: 1; scale: 1; } }

/* Figurinhas: rostinho da IVA + emoji, saindo da cabeça dela e subindo rápido. */
.figurinha {
  position: absolute; left: 50%; top: 2px; width: 46px; height: 46px; margin-left: -23px; z-index: 5;
  pointer-events: none; animation: figurinha-sobe 1.1s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}
.figurinha-rosto {
  position: absolute; inset: 0; border-radius: 50%; background-size: cover; background-position: center;
  border: 3px solid #fff; box-shadow: 0 4px 10px rgba(28, 75, 66, 0.35);
}
.figurinha-emoji {
  position: absolute; right: -9px; bottom: -7px; font-size: 22px; line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
}
.figurinha.com-flash::before {
  content: ''; position: absolute; inset: -16px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 70%);
  animation: figurinha-flash 0.45s ease-out forwards;
}
@keyframes figurinha-sobe {
  0% { opacity: 0; transform: translate(0, 16px) scale(0.3) rotate(0deg); }
  14% { opacity: 1; transform: translate(calc(var(--dx) * 0.2), -2px) scale(1.15) rotate(calc(var(--rot) * 0.5)); }
  26% { transform: translate(calc(var(--dx) * 0.35), -10px) scale(1) rotate(var(--rot)); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), -80px) scale(0.88) rotate(var(--rot)); }
}
@keyframes figurinha-flash { 0% { opacity: 0; transform: scale(0.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.7); } }

/* ---------------------------------------------------------------- painel (folha de vidro) */
.painel {
  position: fixed; z-index: 8; left: 0; right: 0; bottom: 0;
  max-height: min(64dvh, 64vh); overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 16px calc(14px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0, rgba(255, 255, 255, 0) 120px), var(--vidro-denso);
  -webkit-backdrop-filter: var(--vidro-desfoque-forte);
  backdrop-filter: var(--vidro-desfoque-forte);
  box-shadow: inset 0 1px 0.5px rgba(255, 255, 255, 0.95), inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 -14px 40px -10px rgba(16, 48, 42, 0.3);
}
.painel-alca { width: 40px; height: 5px; margin: 2px auto 8px; border-radius: 5px; background: rgba(28, 75, 66, 0.2); }
/* No celular, a ficha deixa espaço para a IVA e o balão; o resto rola dentro do painel.
   A lista de lugares também fica baixa e rola, para o mapa ter espaço. */
@media (max-width: 899px) {
  body[data-modo='ficha'] .painel { max-height: min(56dvh, 56vh); }
  body[data-modo='explorar'] .painel { max-height: min(46dvh, 46vh); }
  body[data-modo='ficha'] .controles-mapa { display: none; }
  /* Com a ficha aberta sobra pouco mapa: a linha do menu sai e o topo encolhe, para a IVA e o
     balão caberem. */
  body[data-modo='ficha'] .filtro { display: none; }
  body[data-modo='ficha'] .topo { grid-template-areas: 'logo titulo chat'; }
  .controles-mapa { top: auto; right: auto; left: var(--margem); bottom: calc(var(--painel-altura) + 34px); flex-direction: row; align-items: center; }
  .controles-mapa .botao-flutuante { min-height: 40px; padding: 0 13px 0 10px; font-size: 13px; }
  /* No celular, "Onde estou" é só o ícone (redondo), para caber ao lado de "Ver IVA". */
  .controles-mapa .botao-local { width: 40px; padding: 0; justify-content: center; }
  .botao-local span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* No celular o recado fica no alto, logo abaixo do topo: embaixo ele cobriria o ponto azul. */
  .aviso-mapa { top: calc(var(--area-topo) + var(--topo-altura) + 8px); left: var(--margem); right: var(--margem); max-width: none; }
  .item-lugar { min-height: 60px; grid-template-columns: 46px 1fr 18px; gap: 11px; }
  .item-foto, .item-icone { width: 46px; height: 46px; }
  .item-nome { font-size: 14.5px; }
  .item-detalhe { font-size: 12px; }
  .cartao-cidade { min-height: 92px; }
}
.painel-titulo { margin: 2px 2px 10px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; color: var(--verde-escuro); }
/* Busca */
.busca { position: relative; margin: -2px 0 12px; color: var(--texto-suave); }
.busca svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; margin-top: -9px; pointer-events: none; }
.busca-campo {
  width: 100%; min-height: 44px; padding: 0 14px 0 40px; border: 0; border-radius: 14px; color: var(--texto);
  font: inherit; font-size: 16px; background: var(--placa); box-shadow: var(--placa-relevo), var(--placa-sombra);
}
.busca-campo::placeholder { color: #7A8782; }
.busca-campo:focus-visible { outline: 3px solid var(--laranja); outline-offset: 1px; }
.lista-vazia { margin: 6px 2px; font-size: 14px; line-height: 1.4; color: var(--texto-suave); }
.lista-nota a { color: inherit; font-weight: 700; }
.lista-nota { margin: -4px 2px 12px; font-size: 12.5px; line-height: 1.35; color: var(--texto-suave); }
/* "Saiba como aparecer no mapa" (nota do Cadastur e busca sem resultado): parece link, abre o diálogo. */
.nota-acao {
  display: inline; padding: 0; border: 0; background: none; color: #1F4E79; font-weight: 700;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.lista-nota strong { color: #1F4E79; }
.item-distancia { color: #1A5FB4; font-weight: 600; }
.lista-erro { margin: 8px 2px; font-size: 14px; line-height: 1.4; color: var(--texto); }
.lista-erro .botao { margin-top: 10px; }
.painel-modo[hidden] { display: none; }
.painel-modo { animation: modo-entra 0.22s var(--ease-saida); }
@keyframes modo-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Cartão "Conheça Ivaiporã" */
.cartao-cidade {
  position: relative; isolation: isolate; display: flex; align-items: flex-end; gap: 12px; width: 100%; min-height: 104px;
  margin: 0 0 14px; padding: 12px 12px 12px 16px; border: 0; border-radius: 20px; overflow: hidden;
  color: #fff; text-align: left; cursor: pointer; background: var(--verde-escuro);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 10px 24px -10px rgba(16, 48, 42, 0.55);
  transition: transform 160ms var(--ease-saida);
}
.cartao-cidade:active { transform: scale(0.98); }
.cartao-cidade-foto { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.cartao-cidade::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(9, 32, 27, 0) 15%, rgba(9, 32, 27, 0.74) 100%); }
.cartao-cidade-texto { flex: 1; min-width: 0; }
.cartao-cidade-titulo { display: block; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35); }
.cartao-cidade-detalhe { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 500; opacity: 0.94; }
.cartao-cidade-seta {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, 0.22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.cartao-cidade-seta svg { width: 20px; height: 20px; }

/* Lista de lugares */
.lista-secao + .lista-secao { margin-top: 16px; }
.lista-secao-titulo {
  display: flex; align-items: center; gap: 8px; margin: 0 2px 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--verde-escuro);
}
.lista-secao-titulo span {
  padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none;
  color: var(--texto-suave); background: var(--placa); box-shadow: var(--placa-relevo);
}
.lista-lugares { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
/* Troca de grupo: as seções da lista entram deslizando, uma logo depois da outra (js: animarLista). */
.lista-grupos.trocou > * { animation: lista-entra 0.34s var(--ease-saida) backwards; }
.lista-grupos.trocou > :nth-child(2) { animation-delay: 50ms; }
.lista-grupos.trocou > :nth-child(3) { animation-delay: 100ms; }
@keyframes lista-entra { from { opacity: 0; translate: 0 10px; } }
/* Enquanto os lugares chegam: cartões vazios pulsando de leve, no lugar da lista. */
.lista-esqueleto { display: grid; gap: 8px; }
.lista-esqueleto span {
  height: 66px; border-radius: 18px; box-shadow: var(--placa-relevo);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.5) 30%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0.5) 70%) 0 0 / 220% 100%;
  animation: esqueleto 1.4s ease-in-out infinite;
}
.lista-esqueleto span:nth-child(2) { animation-delay: 0.12s; }
.lista-esqueleto span:nth-child(3) { animation-delay: 0.24s; }
@keyframes esqueleto { from { background-position: 100% 0; } to { background-position: -120% 0; } }
.item-lugar {
  width: 100%; min-height: 66px; display: grid; grid-template-columns: 52px 1fr 20px; align-items: center; gap: 12px;
  padding: 7px 12px 7px 7px; border: 0; border-radius: 18px; color: var(--texto); text-align: left; cursor: pointer;
  background: var(--placa); box-shadow: var(--placa-relevo), var(--placa-sombra);
  transition: transform 160ms var(--ease-saida), background-color 160ms ease;
}
.item-lugar:active { transform: scale(0.98); }
.item-foto, .item-icone { position: relative; width: 52px; height: 52px; border-radius: 14px; overflow: hidden; }
.item-foto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.item-foto::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.item-icone { display: grid; place-items: center; color: var(--verde-escuro); background: linear-gradient(160deg, #EDF8F1, #D3ECDD); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(28, 75, 66, 0.06); }
.item-icone svg { width: 24px; height: 24px; }
.item-texto { min-width: 0; }
.item-nome { display: block; font-size: 15px; font-weight: 600; color: var(--verde-escuro); }
.item-detalhe { display: block; margin-top: 2px; font-size: 12.5px; color: var(--texto-suave); }
.item-seta { width: 20px; height: 20px; color: var(--texto-suave); opacity: 0.7; transition: transform 160ms var(--ease-saida), opacity 160ms ease; }
.item-lugar[aria-current='true'] { background: rgba(227, 244, 233, 0.86); box-shadow: inset 0 0 0 1.5px rgba(43, 182, 115, 0.55), var(--placa-sombra); }
.item-lugar[aria-current='true'] .item-detalhe::after { content: ' · a IVA está aqui'; color: #1E7A4C; font-weight: 600; }
.nota-rodape { margin: 12px 2px 0; font-size: 12px; line-height: 1.4; color: var(--texto-suave); }

/* Caminhando */
.status-caminhada { display: flex; align-items: center; gap: 12px; }
.status-avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px #fff, 0 4px 10px -4px rgba(16, 48, 42, 0.4); }
.status-texto { flex: 1; min-width: 0; }
.status-linha { margin: 0 0 7px; font-size: 14px; font-weight: 600; color: var(--verde-escuro); line-height: 1.25; }
.progresso { height: 7px; border-radius: 999px; background: rgba(28, 75, 66, 0.1); box-shadow: inset 0 1px 1px rgba(16, 48, 42, 0.08); overflow: hidden; }
.progresso span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--verde), var(--lima)); box-shadow: 0 0 10px rgba(180, 231, 23, 0.6); }
.trocar-destino {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin: 10px -16px 0; padding: 2px 16px 6px;
  overflow-x: auto; scrollbar-width: none; font-size: 13px; color: var(--texto-suave);
  /* A borda direita esmaece: mostra que há mais destinos para o lado. */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
}
.trocar-destino::-webkit-scrollbar { display: none; }
.trocar-destino > span { flex: none; }
.trocar-destino:empty { display: none; }
.chip-destino {
  flex: none; white-space: nowrap; min-height: 44px; padding: 0 15px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--placa); color: var(--verde-escuro); font-size: 14px; font-weight: 600;
  box-shadow: var(--placa-relevo), var(--placa-sombra);
  transition: transform 160ms var(--ease-saida), background-color 160ms ease;
}
.chip-destino:active { transform: scale(0.96); }

/* Botões */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 14px;
  border: 0; border-radius: 14px; font-size: 14px; font-weight: 600; line-height: 1.15; text-align: center; text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-saida), background-color 160ms ease, filter 160ms ease;
}
.botao svg { width: 20px; height: 20px; flex: none; }
.botao:active:not(:disabled) { transform: scale(0.97); }
.botao-primario {
  color: #fff; background: linear-gradient(180deg, #2D6E61 0%, #1C4B42 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 6px 16px -6px rgba(28, 75, 66, 0.6);
}
.botao-secundario { color: var(--verde-escuro); background: rgba(255, 255, 255, 0.72); box-shadow: var(--placa-relevo), 0 2px 6px -3px rgba(16, 48, 42, 0.22); }
.botao:disabled { cursor: not-allowed; color: #7C8984; background: rgba(240, 243, 241, 0.7); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
#pular-passeio { flex: none; }

/* Ficha */
.ficha { position: relative; padding-bottom: 4px; }
.ficha-fechar {
  position: absolute; top: -4px; right: -6px; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer; color: var(--verde-escuro);
  background: rgba(255, 255, 255, 0.72); box-shadow: var(--placa-relevo), 0 2px 8px -3px rgba(16, 48, 42, 0.25);
  transition: transform 160ms var(--ease-saida);
}
.ficha-fechar:active { transform: scale(0.94); }
.ficha-fechar svg { width: 20px; height: 20px; }
.ficha-selos { display: flex; gap: 6px; flex-wrap: wrap; padding-right: 48px; }
.selo { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.selo-categoria { background: rgba(227, 244, 233, 0.95); color: var(--verde-escuro); }
.selo-arredores { background: rgba(255, 230, 196, 0.95); color: #7A4100; text-transform: none; letter-spacing: 0; }
.selo-cadastur { background: rgba(214, 232, 250, 0.95); color: #1F4E79; text-transform: none; letter-spacing: 0; }
.selo-publico { background: rgba(214, 238, 240, 0.95); color: #0B5560; text-transform: none; letter-spacing: 0; }
.ficha-fotos-link, .ficha-info a { color: #1F4E79; font-weight: 600; }
.ficha-fotos-link { display: inline-block; margin: 2px 2px 0; font-size: 12.5px; }
/* Site oficial: pílula translúcida logo abaixo da galeria. */
.ficha-site {
  display: inline-flex; align-items: center; min-height: 36px; margin: 4px 8px 2px 0; padding: 0 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--verde-escuro); text-decoration: none;
  background: var(--placa); box-shadow: var(--placa-relevo), var(--placa-sombra);
  transition: transform 160ms var(--ease-saida), background-color 160ms ease;
}
.ficha-site:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .ficha-site:hover { background-color: rgba(255, 255, 255, 0.92); } }
.ficha-nome { margin: 8px 48px 4px 0; font-size: 23px; line-height: 1.18; font-weight: 700; letter-spacing: -0.01em; color: var(--verde-escuro); }
.ficha-nome:focus { outline: none; }

/* Galeria de fotos da ficha */
.ficha-galeria {
  position: relative; isolation: isolate; margin: 10px 0 6px; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden;
  background: #DCE8E0; box-shadow: 0 12px 26px -12px rgba(16, 48, 42, 0.5);
}
.ficha-galeria::after { content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.galeria-trilho {
  display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.galeria-trilho::-webkit-scrollbar { display: none; }
.galeria-trilho:focus-visible { outline: 3px solid var(--laranja); outline-offset: -3px; }
.galeria-slide { position: relative; flex: 0 0 100%; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.galeria-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.galeria-slide.conter img { object-fit: contain; background: #fff; }
.galeria-slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 10px; color: #fff;
  background: linear-gradient(180deg, rgba(8, 24, 21, 0) 0%, rgba(8, 24, 21, 0.7) 100%);
}
.galeria-slide.conter figcaption { padding-top: 18px; }
.galeria-legenda { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4); }
.galeria-contador {
  position: absolute; top: 10px; right: 10px; z-index: 4; padding: 4px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--verde-escuro); font-variant-numeric: tabular-nums;
  background: rgba(246, 251, 248, 0.6); -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 8px rgba(0, 0, 0, 0.15);
}
.galeria-seta {
  position: absolute; top: 50%; z-index: 4; width: 38px; height: 38px; margin-top: -19px; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer; color: var(--verde-escuro);
  background: rgba(246, 251, 248, 0.62); -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 3px 10px rgba(0, 0, 0, 0.18);
  transition: transform 160ms var(--ease-saida);
}
.galeria-seta.anterior { left: 10px; }
.galeria-seta.proxima { right: 10px; }
.galeria-seta svg { width: 20px; height: 20px; }
.galeria-seta:active { transform: scale(0.94); }
@media (hover: none) { .galeria-seta { display: none; } }

.ficha-resumo { margin: 12px 0 10px; font-size: 15px; line-height: 1.5; }
.ficha-info { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid rgba(28, 75, 66, 0.1); font-size: 13px; line-height: 1.35; }
.ficha-info dt { font-weight: 600; color: var(--texto-suave); }
.ficha-info dd { margin: 0; }
/* Agenda (evento datado, some depois do dia): cartão laranja-claro logo abaixo do resumo, com a data
   em destaque. Chama a atenção sem virar alerta. */
.ficha-agenda { display: grid; gap: 8px; margin: -2px 0 12px; }
.agenda-item {
  display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; align-items: start; margin: 0; padding: 10px 12px;
  border-radius: 16px; font-size: 13.5px; line-height: 1.4; color: #4A2B00;
  background: linear-gradient(160deg, #FFF6E8 0%, #FFEBCF 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), inset 0 0 0 1px rgba(248, 153, 28, 0.28), 0 4px 12px -8px rgba(122, 65, 0, 0.45);
}
.agenda-icone {
  grid-row: span 2; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: #fff;
  background: linear-gradient(160deg, #FDB04A, #E8830B); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 3px 8px -3px rgba(178, 92, 0, 0.6);
}
.agenda-icone svg { width: 19px; height: 19px; }
.agenda-quando { font-weight: 700; color: #7A4100; }
.agenda-item a { color: #7A4100; font-weight: 700; }
/* Na lista: selinho "Agenda" ao lado do tipo, nos lugares com evento chegando. */
.item-agenda {
  display: inline-flex; align-items: center; gap: 3px; margin-right: 4px; padding: 1px 7px 1px 5px; border-radius: 999px; vertical-align: 1px;
  font-size: 11px; font-weight: 700; color: #7A4100; background: #FFEBCF; box-shadow: inset 0 0 0 1px rgba(248, 153, 28, 0.3);
}
.item-agenda svg { width: 12px; height: 12px; }
.ficha-acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.ficha-acoes.sem-mais #acao-chegar { grid-column: 1 / -1; }
/* Comércios com telefone: "Ligar" e "Como chegar" lado a lado. */
.ficha-acoes.sem-mais.com-ligar #acao-chegar { grid-column: auto; }
.ficha-acoes.com-ligar:not(.sem-mais) #acao-ligar { grid-column: 1 / -1; }
/* Serviço sem local confirmado: sem "Como chegar", o "Ligar" ocupa a linha. */
.ficha-acoes.sem-chegar #acao-ligar { grid-column: 1 / -1; }
.ficha-mais { margin-top: 12px; padding: 12px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; background: var(--placa); box-shadow: var(--placa-relevo); }
.ficha-mais p { margin: 0 0 8px; }
.ficha-mais h3 { margin: 12px 0 6px; font-size: 14px; color: #6B3D00; }
.ficha-mais ul { margin: 0; padding-left: 18px; }
.ficha-mais li { margin-bottom: 4px; }

/* "Sua empresa no mapa" (diálogo nativo, por cima de tudo): no celular sobe de baixo, como o painel;
   a partir de 600 px, cartão no meio da tela. O texto fica sobre vidro quase opaco, para ler fácil. */
.dialogo-empresa {
  position: fixed; width: min(460px, calc(100vw - 24px)); max-width: none; max-height: min(88vh, 720px); margin: auto;
  padding: 18px 20px 20px; border: 0; border-radius: 26px; overflow-y: auto; overscroll-behavior: contain;
  color: var(--texto); background: var(--vidro-brilho), rgba(248, 251, 249, 0.97);
  box-shadow: var(--vidro-relevo), 0 24px 60px -18px rgba(16, 48, 42, 0.55);
  scrollbar-width: thin; scrollbar-color: rgba(28, 75, 66, 0.28) transparent;
}
.dialogo-empresa[open] { animation: dialogo-entra 0.28s var(--ease-saida); }
.dialogo-empresa::backdrop { background: rgba(16, 48, 42, 0.34); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
@keyframes dialogo-entra { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
@media (max-width: 599px) {
  .dialogo-empresa {
    width: 100%; max-height: 88vh; max-height: 88dvh; margin: auto 0 0; border-radius: 26px 26px 0 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}
.dialogo-empresa .ficha-fechar { top: 10px; right: 10px; }
.dialogo-empresa .selo { display: inline-block; margin-right: 48px; }
.dialogo-titulo { margin: 10px 48px 8px 2px; font-size: 22px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; color: var(--verde-escuro); }
.dialogo-texto { margin: 0 2px 14px; font-size: 14.5px; line-height: 1.45; }
.dialogo-texto strong { color: #1F4E79; }
.dialogo-passos { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; counter-reset: passo; }
.dialogo-passos li { position: relative; min-height: 26px; padding-left: 36px; font-size: 14px; line-height: 1.42; counter-increment: passo; }
.dialogo-passos li::before {
  content: counter(passo); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 50%; color: #fff; font-size: 13px; font-weight: 700; background: linear-gradient(180deg, #2C6496 0%, #1F4E79 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.dialogo-nota {
  margin: 0 0 16px; padding: 10px 12px; border-radius: 14px; font-size: 12.5px; line-height: 1.4; color: var(--texto-suave);
  background: var(--placa); box-shadow: var(--placa-relevo);
}
.dialogo-acoes { display: grid; gap: 8px; }

.medidor-fps { position: fixed; z-index: 60; left: 8px; bottom: calc(var(--painel-altura) + 8px); padding: 4px 8px; border-radius: 8px; background: rgba(28, 75, 66, 0.85); color: #fff; font: 600 12px/1.2 ui-monospace, Consolas, monospace; }

/* Passar o mouse (só em telas com mouse): o vidro clareia um pouco. */
@media (hover: hover) and (pointer: fine) {
  .botao-flutuante:hover { background-color: rgba(255, 255, 255, 0.82); }
  .filtro-botao:not([aria-pressed='true']):hover { background-color: rgba(255, 255, 255, 0.75); }
  .item-lugar:hover {
    background-color: rgba(255, 255, 255, 0.9); transform: translateY(-1px);
    box-shadow: var(--placa-relevo), 0 2px 4px rgba(16, 48, 42, 0.06), 0 12px 24px -12px rgba(16, 48, 42, 0.34);
  }
  .item-lugar:hover .item-seta { opacity: 1; transform: translateX(2px); }
  .item-lugar:active { transform: scale(0.98); }
  .chip-destino:hover, .botao-secundario:hover, .ficha-fechar:hover { background-color: rgba(255, 255, 255, 0.92); }
  .botao-primario:hover { filter: brightness(1.08); }
  .cartao-cidade:hover .cartao-cidade-seta { background: rgba(255, 255, 255, 0.34); }
}

/* ---------------------------------------------------------------- telas largas */
@media (min-width: 900px) {
  /* O painel cresce com a tela: 380 px num notebook de 1280, ~420 px em 1440 e 452 px em Full HD. */
  :root { --margem: 16px; --painel-largura: clamp(392px, calc(22vw + 100px), 452px); }
  /* Barra única no alto: marca à esquerda, menu no meio e chat à direita. */
  .topo { grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: 'logo titulo menu chat'; column-gap: 12px; padding: 8px 10px 8px 16px; }
  .topo-titulo { white-space: nowrap; }
  .filtro { margin: 0; padding: 2px 4px 3px 14px; border-left: 1px solid rgba(28, 75, 66, 0.12); }
  /* Centralizado quando cabe; quando não cabe, rola a partir do começo. */
  .filtro > :first-child { margin-left: auto; }
  .filtro > :last-child { margin-right: auto; }
  /* Painel lateral: cartão flutuante com a altura do conteúdo (a ficha curta não deixa um vão
     embaixo); a lista longa vai até o pé da tela e rola por dentro, com uma barra fina. */
  .painel {
    top: calc(var(--area-topo) + var(--topo-altura) + 12px); bottom: auto; left: 16px; right: auto; width: var(--painel-largura);
    max-height: calc(100vh - var(--area-topo) - var(--topo-altura) - 28px);
    max-height: calc(100dvh - var(--area-topo) - var(--topo-altura) - 28px);
    /* À direita, menos margem: a faixa da barra de rolagem (sempre reservada) completa o espaço. */
    border-radius: 26px; padding: 16px 12px 20px 20px;
    box-shadow: var(--vidro-relevo), 0 1px 2px rgba(16, 48, 42, 0.08), 0 24px 50px -16px rgba(16, 48, 42, 0.38);
    scrollbar-width: thin; scrollbar-color: rgba(28, 75, 66, 0.28) transparent; scrollbar-gutter: stable;
  }
  .painel::-webkit-scrollbar { width: 10px; }
  .painel::-webkit-scrollbar-track { background: transparent; margin: 20px 0; }
  .painel::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 10px; background: rgba(28, 75, 66, 0.28) padding-box; }
  .painel-alca { display: none; }
  .painel-titulo { font-size: 20px; }
  .ficha-nome { font-size: 25px; }
  .ficha-galeria { margin-top: 12px; }
  .ficha-resumo { font-size: 15.5px; }
  .ficha-acoes { gap: 10px; margin-top: 8px; }
  .ficha-acoes .botao { white-space: nowrap; }
  .controles-mapa { top: calc(var(--area-topo) + var(--topo-altura) + 12px); right: 16px; flex-direction: row; }
  .aviso-mapa { top: auto; right: auto; bottom: 24px; left: calc(50% + (var(--painel-largura) + 32px) / 2); transform: translateX(-50%); }
  .maplibregl-ctrl-top-right { top: calc(var(--area-topo) + var(--topo-altura) + 68px); }
  .maplibregl-ctrl-top-right .maplibregl-ctrl { margin-right: 16px; }
  .maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: 0; }
  .ver-iva { bottom: 40px; right: 16px; }
  /* Chat do widget no canto de baixo à direita (botão de 70 px a 30 px das bordas, janelinha logo
     acima dele): o ícone do topo sai e o "Ver IVA" vai para a esquerda do botão. */
  .chat-flutuante .topo-chat { display: none; }
  .chat-flutuante .ver-iva { right: 116px; bottom: 43px; }
  .medidor-fps { left: auto; right: 16px; bottom: 96px; }
  .mapa-falhou { padding-left: calc(var(--painel-largura) + 28px); padding-bottom: 24px; }
  .mapa-carregando { top: 50%; left: calc(50% + (var(--painel-largura) + 32px) / 2); }
}
/* Telas grandes: miniaturas um pouco maiores na lista. */
@media (min-width: 1400px) {
  .item-lugar { min-height: 70px; grid-template-columns: 56px 1fr 20px; }
  .item-foto, .item-icone { width: 56px; height: 56px; }
}
/* Notebooks (até 1559 px): o menu fica mais compacto para os 9 botões caberem sem rolar. */
@media (min-width: 900px) and (max-width: 1559px) {
  .topo { column-gap: 10px; padding-left: 14px; }
  .filtro { gap: 4px; padding-left: 10px; }
  .filtro-botao { min-height: 36px; padding: 0 9px 0 7px; gap: 5px; font-size: 12.5px; }
  .filtro-botao svg { width: 16px; height: 16px; }
  .filtro-rotulo { margin-left: 4px; padding-left: 7px; font-size: 10px; }
  .filtro-rotulo svg { width: 14px; height: 14px; }
}
@media (min-width: 900px) and (max-width: 1399px) {
  .filtro-botao svg { display: none; }
  .filtro-botao { padding: 0 8px; }
}
/* Telas de 900 a 1179 px: o nome do app sai da barra (continua para leitores de tela) e o
   menu ganha o espaço. Abaixo de 1000 px sai também o rótulo "Cadastur" (fica no título dos botões). */
@media (min-width: 900px) and (max-width: 1179px) {
  .topo-titulo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topo { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'logo menu chat'; }
}
@media (min-width: 900px) and (max-width: 999px) {
  .filtro-rotulo { display: none; }
  .filtro { gap: 3px; }
  .filtro-botao { padding: 0 8px; font-size: 12px; }
}
@media (max-width: 380px) {
  .topo-titulo { font-size: 14px; }
  .ficha-acoes { gap: 6px; }
  .botao { padding: 0 10px; font-size: 13.5px; }
}

/* Sem desfoque: navegador sem backdrop-filter, preferência por menos transparência ou ?vidro=0. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .vidro, .painel, .maplibregl-ctrl-group:not(:empty) { background: rgba(248, 251, 249, 0.96); }
}
@media (prefers-reduced-transparency: reduce) {
  .vidro, .painel, .maplibregl-ctrl-group:not(:empty), .maplibregl-ctrl-attrib, .galeria-contador, .galeria-seta, .cartao-cidade-seta {
    -webkit-backdrop-filter: none; backdrop-filter: none; background: #F7FAF8 !important;
  }
}
.sem-vidro .vidro, .sem-vidro .painel, .sem-vidro .maplibregl-ctrl-group:not(:empty), .sem-vidro .maplibregl-ctrl-attrib,
.sem-vidro .galeria-contador, .sem-vidro .galeria-seta, .sem-vidro .cartao-cidade-seta {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: rgba(248, 251, 249, 0.97) !important;
}

/* Movimento reduzido: nada de animação longa (RF09). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.movimento-reduzido *, .movimento-reduzido *::before, .movimento-reduzido *::after { animation: none !important; transition: none !important; }
