:root {
  --azul: #0B6AA2; --azul-escuro: #0A5A8A; --azul-claro: #E6F0F7;
  --laranja: #C2410C; --laranja-claro: #FFF1E8;
  --verde: #15803D; --verde-claro: #DCFCE7;
  --vermelho: #B91C1C;
  --tinta: #1B1B2F; --cinza: #5B5F6B; --borda: #E7E5E4; --fundo: #F7F7F5;
  --noite: #12111F; --noite-2: #1E1C33; --noite-borda: #2E2B4A; --rosa: #F9A8D4;
  --nav: 68px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body { font-family: Inter, system-ui, sans-serif; color: var(--tinta); background: var(--fundo); font-size: 15px; line-height: 1.45;
  padding-bottom: calc(var(--nav) + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; min-height: 100vh; }
h1, h2 { font-family: 'Bricolage Grotesque', Inter, sans-serif; margin: 0; line-height: 1.15; }
h1 { font-size: 24px; } h2 { font-size: 18px; margin-top: 6px; }
p { margin: 0; }
a { color: var(--azul); }
#app { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.carregando, .vazio { color: var(--cinza); padding: 18px 4px; }
.vazio { text-align: center; background: #fff; border: 1px dashed var(--borda); border-radius: 14px; }
.sub { color: var(--cinza); font-size: 13px; display: block; }
.sub.claro { color: #CFE6F5; }
.centro { text-align: center; }
.pagina { padding: 16px; display: flex; flex-direction: column; gap: 12px; }

/* Topos */
.topo-azul { background: var(--azul); color: #fff; padding: calc(12px + env(safe-area-inset-top)) 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.topo-azul h1 { color: #fff; }
.logo { height: 54px; width: auto; align-self: flex-start; }
.cartao-bairro-atual { display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 16px; background: var(--azul-escuro); color: #fff; text-decoration: none; }
.cartao-bairro-atual img, .mini-sem-foto { width: 74px; height: 50px; object-fit: cover; border-radius: 11px; background: #2B7DB3; flex-shrink: 0; }
.cartao-bairro-atual strong { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-size: 19px; }
.cartao-bairro-atual > span:nth-child(2) { flex: 1; }
.trocar { font-weight: 600; font-size: 13px; padding-right: 8px; }
.busca input { width: 100%; height: 50px; border-radius: 14px; border: 0; padding: 0 16px; font: 500 16px Inter, sans-serif; color: var(--tinta); }
.busca-clara input { border: 1px solid var(--borda); background: var(--fundo); }
.topo-branco { background: #fff; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; border-bottom: 1px solid var(--borda); display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; z-index: 500; }
.linha-topo { display: flex; align-items: center; gap: 10px; }
.titulo-topo { flex: 1; min-width: 0; }
.titulo-topo h1 { font-size: 21px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.titulo-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }

/* Botões */
.botao { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid #D6D3D1;
  background: #fff; color: var(--tinta); font: 600 14px Inter, sans-serif; text-decoration: none; cursor: pointer; }
.botao-pequeno { min-height: 38px; padding: 0 12px; font-size: 13px; }
.botao-azul { background: var(--azul); border-color: var(--azul); color: #fff; }
.botao-zap { background: var(--verde); border-color: var(--verde); color: #fff; }
.botao-rosa { background: var(--rosa); border-color: var(--rosa); color: var(--noite); }
.largo { width: 100%; }
.botao-icone { width: 44px; height: 44px; border-radius: 22px; border: 0; background: #F1F5F9; color: var(--tinta); font-size: 26px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; flex-shrink: 0; }
.link { border: 0; background: none; color: var(--azul); font: 600 13px Inter, sans-serif; cursor: pointer; padding: 6px 0; }

/* Categorias */
.grade-categorias { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.categoria { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px; border-radius: 14px; background: #fff; border: 1px solid var(--borda);
  font-size: 12px; font-weight: 600; text-align: center; color: var(--tinta); text-decoration: none; }
.icone-cat { width: 38px; height: 38px; border-radius: 19px; background: var(--laranja-claro); display: flex; align-items: center; justify-content: center; }
.categoria-noite { background: var(--noite); border-color: var(--noite); color: #fff; }
.categoria-noite .icone-cat { background: var(--noite-borda); color: var(--rosa); }

/* Chips */
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; padding: 8px 13px; border-radius: 18px; border: 1px solid #D6D3D1; background: #fff; color: var(--tinta); font: 600 13px Inter, sans-serif; text-decoration: none; cursor: pointer; }
.chip.ativo { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.chip-noite { background: var(--noite); border-color: var(--noite); color: var(--rosa); }

/* Cartões */
.cartao-comercio { background: #fff; border: 1px solid var(--borda); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.cartao-topo { display: flex; gap: 12px; align-items: flex-start; color: inherit; text-decoration: none; }
.cartao-texto { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.linha-nome { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 15.5px; }
.avatar { width: 48px; height: 48px; border-radius: 12px; background: var(--tinta); color: #FDBA74; font: 800 18px 'Bricolage Grotesque', sans-serif;
  display: inline-flex; align-items: center; justify-content: center; object-fit: cover; flex-shrink: 0; }
.avatar.grande { width: 72px; height: 72px; border-radius: 18px; font-size: 30px; border: 4px solid var(--fundo); }
.contatos { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.selo { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .4px; padding: 3px 7px; border-radius: 7px; }
.selo-patrocinado { background: #FFEDD5; color: #9A3412; }
.selo-novo { background: var(--azul-claro); color: var(--azul-escuro); }
.selo-destaque { background: #FEF3C7; color: #92400E; }

/* Bairros */
.grade-bairros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cartao-bairro { border: 1px solid var(--borda); background: #fff; border-radius: 16px; overflow: hidden; padding: 0 0 10px; text-align: left; cursor: pointer; font: inherit; color: inherit; display: flex; flex-direction: column; gap: 2px; }
.cartao-bairro.atual { border: 2px solid var(--laranja); }
.cartao-bairro img, .cartao-bairro .sem-foto { width: 100%; height: 104px; object-fit: cover; display: flex; align-items: center; justify-content: center; background: var(--azul-claro); color: var(--azul); font-size: 12px; font-weight: 600; padding: 0 8px; text-align: center; }
.cartao-bairro .nome { font: 700 16px 'Bricolage Grotesque', sans-serif; padding: 6px 12px 0; }
.cartao-bairro .sub { padding: 0 12px; }

/* Perfil */
.capa { position: relative; height: 180px; background: var(--tinta); }
.capa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.capa .voltar { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 12px; background: #fff; }
.perfil-cabecalho { display: flex; gap: 12px; align-items: flex-end; margin-top: -46px; }
.perfil-cabecalho h1 { margin-top: 30px; }
.acoes-perfil { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.infos { margin: 0; background: #fff; border: 1px solid var(--borda); border-radius: 16px; padding: 4px 14px; display: grid; grid-template-columns: 96px 1fr; }
.infos dt, .infos dd { margin: 0; padding: 10px 0; border-bottom: 1px solid #F1F1EF; font-size: 14px; }
.infos dt { color: var(--cinza); }
.infos dd { font-weight: 600; }
.infos dt:last-of-type, .infos dd:last-of-type { border-bottom: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--laranja-claro); color: #9A3412; padding: 6px 12px; border-radius: 14px; font-size: 13px; font-weight: 600; }
.evento { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--borda); }
.galeria { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.galeria img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.opcoes-rota { display: flex; flex-direction: column; gap: 8px; }

/* Mapa */
.mapa { height: 62vh; min-height: 320px; border-radius: 16px; overflow: hidden; border: 1px solid var(--borda); z-index: 1; }
.mapa-pequeno { height: 200px; min-height: 0; }
.pino span { display: flex; align-items: center; justify-content: center; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.pino b { transform: rotate(45deg); color: #fff; font: 800 12px Inter, sans-serif; }

/* Noite */
body.modo-noite { background: var(--noite) url(/img/noite-padrao.svg) repeat; background-size: 270px 270px; background-attachment: fixed; color: #fff; }
body.modo-noite .vazio { background: var(--noite-2); border-color: var(--noite-borda); color: #B9B6D3; }
body.modo-noite .cartao-comercio { background: var(--noite-2); border-color: var(--noite-borda); }
body.modo-noite .sub { color: #B9B6D3; }
body.modo-noite .botao:not(.botao-zap):not(.botao-rosa) { background: var(--noite-borda); border-color: var(--noite-borda); color: #fff; }
.topo-noite { padding: calc(16px + env(safe-area-inset-top)) 16px 14px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--noite-borda); }
.topo-noite h1 { font-size: 26px; color: #fff; }
.topo-noite h1 span { color: var(--rosa); }
.topo-noite a { color: var(--rosa); }
.topo-noite .chip { background: transparent; color: #fff; border-color: #3D3960; }
.topo-noite .chip.ativo { background: var(--rosa); border-color: var(--rosa); color: var(--noite); }
.cartao-evento { background: var(--noite-2); border: 1px solid var(--noite-borda); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.cartao-evento a:not(.botao) { color: #fff; text-decoration: none; font-size: 16px; }
.evento-titulo { color: var(--rosa); font-weight: 600; }
.cartao-evento .botao { margin-top: 8px; }

/* Navegação inferior */
.nav-inferior { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid var(--borda); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); z-index: 900; max-width: 640px; margin: 0 auto; }
.nav-inferior a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--cinza); text-decoration: none; }
.nav-inferior svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-inferior a.ativa { color: var(--laranja); }
body.modo-noite .nav-inferior { background: #1A1830; border-color: var(--noite-borda); }
body.modo-noite .nav-inferior a { color: #B9B6D3; }
body.modo-noite .nav-inferior a.ativa { color: var(--rosa); }

/* Janela e avisos */
dialog { border: 0; border-radius: 18px; padding: 0; width: calc(100% - 24px); max-width: 480px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(15, 23, 42, .5); }
.janela { display: flex; flex-direction: column; }
.janela-topo { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--borda); }
.janela-topo h2 { font-size: 17px; margin: 0; color: var(--tinta); }
.janela-corpo { padding: 16px; display: flex; flex-direction: column; gap: 10px; color: var(--tinta); }
.janela-corpo .sub { color: var(--cinza); }
.janela-corpo .botao { background: #fff; color: var(--tinta); border-color: #D6D3D1; }
.janela-corpo .botao-azul { background: var(--azul); border-color: var(--azul); color: #fff; }
#avisos { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav) + 12px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 1000; pointer-events: none; }
.aviso { padding: 12px 16px; border-radius: 12px; color: #fff; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: 420px; }
.aviso-ok { background: var(--verde); }
.aviso-erro { background: var(--vermelho); }

/* Marca d'água: silhueta do Pão de Açúcar + BAIRROLANDO repetida (18%) */
body.fundo-marca { background-image: url(/img/marca-padrao.png); background-repeat: repeat; background-size: 340px 380px; background-attachment: fixed; }

/* Vídeo do anunciante: só toca se a pessoa apertar */
.video-perfil { margin: 4px 0 0; }
.video-perfil video { display: block; width: 100%; max-height: 70vh; border-radius: 16px; background: #000; }

/* ================= Visual por plano no perfil ================= */
.faixa-previa { background: #1B1B2F; color: #FDE68A; font-size: 13px; padding: 9px 14px; text-align: center; }
.faixa-previa strong { color: #fff; }
.selo-plano { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 11px; font-weight: 900;
  letter-spacing: .6px; padding: 4px 10px; border-radius: 8px; }
.selo-plano-destaque { background: linear-gradient(90deg, #F97316, #FB923C); color: #fff; }
.selo-plano-premium { background: linear-gradient(90deg, #B8860B, #F2D27A, #B8860B); color: #1B1406; }
.selo-premium { background: linear-gradient(90deg, #B8860B, #F2D27A); color: #1B1406; }
.cartao-premium { border-color: #E5C66A; box-shadow: 0 0 0 1px rgba(212,175,55,.25); }
.perfil-cabecalho { position: relative; z-index: 2; }

/* Destaque: laranja vibrante */
body.perfil-destaque .capa::after { content: ''; position: absolute; inset: auto 0 0 0; height: 6px; background: linear-gradient(90deg, #F97316, #FACC15); }
body.perfil-destaque .perfil .avatar.grande { border: 4px solid #F97316; box-shadow: 0 0 0 3px #FFF7ED; }
body.perfil-destaque .infos { border-color: #FDBA74; border-left: 5px solid #F97316; }
body.perfil-destaque .tag { background: #FFEDD5; }

/* Premium: escuro elegante com dourado */
body.perfil-premium { background: #121016; color: #F5F1E6; }
body.perfil-premium .capa { height: 230px; background: #000; }
body.perfil-premium .capa::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 55%, #121016 100%); }
body.perfil-premium .capa video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
body.perfil-premium .capa .voltar { z-index: 3; }
.play-capa { position: absolute; z-index: 2; left: 50%; top: 45%; transform: translate(-50%, -50%); width: 62px; height: 62px; border-radius: 31px;
  background: rgba(18,16,22,.65); border: 2px solid #D4AF37; color: #F5E6B8; font-size: 22px; cursor: pointer; }
.faixa-video { position: absolute; z-index: 2; right: 12px; top: calc(12px + env(safe-area-inset-top)); background: rgba(18,16,22,.7); color: #F5E6B8;
  font-size: 10.5px; font-weight: 800; letter-spacing: .5px; padding: 4px 8px; border-radius: 8px; border: 1px solid #D4AF37; }
body.perfil-premium .perfil .avatar.grande { border: 3px solid #D4AF37; background: #1E1A24; color: #F5E6B8;
  box-shadow: 0 0 0 4px #121016, 0 6px 18px rgba(212,175,55,.35); }
body.perfil-premium .perfil h1 { color: #FFF8E7; }
body.perfil-premium .perfil h2 { color: #E9C46A; }
body.perfil-premium .sub { color: #B9B2A2; }
body.perfil-premium .perfil p { color: #D9D2C2; }
body.perfil-premium .perfil .botao:not(.botao-zap) { background: transparent; border: 1.5px solid #D4AF37; color: #F5E6B8; }
body.perfil-premium .infos { background: #1B1820; border-color: #3A3226; }
body.perfil-premium .infos dt { color: #A79F8D; border-color: #2A2530; }
body.perfil-premium .infos dd { color: #F5F1E6; border-color: #2A2530; }
body.perfil-premium .infos a { color: #F2D27A; }
body.perfil-premium .tag { background: #2A2418; color: #F2D27A; }
body.perfil-premium .evento { border-color: #2A2530; color: #F5F1E6; }
body.perfil-premium .nav-inferior { background: #17141C; border-color: #2A2530; }
body.perfil-premium .nav-inferior a { color: #A79F8D; }
body.perfil-premium .nav-inferior a.ativa { color: #F2D27A; }
.recomenda { background: linear-gradient(90deg, rgba(212,175,55,.18), rgba(212,175,55,.04)); border: 1px solid #5C4A1E;
  color: #F2D27A; border-radius: 12px; padding: 9px 12px; font-size: 13px; font-weight: 600; }

/* Vitrine em carrossel (Premium): 3 fotos e meia à vista, desliza e encaixa */
.vitrine-wrap { position: relative; margin: 0 -16px; }
.vitrine { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px 4px; scroll-padding: 0 16px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.vitrine::-webkit-scrollbar { display: none; }
.vitrine-item { flex: 0 0 calc((100% - 32px - 16px) / 3.35); scroll-snap-align: start; padding: 0; border: 1px solid #3A3226; border-radius: 12px;
  overflow: hidden; background: #1B1820; cursor: pointer; aspect-ratio: 4 / 5; }
.vitrine-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vitrine-contador { position: absolute; right: 24px; top: 8px; background: rgba(18,16,22,.75); color: #F5E6B8; font-size: 11.5px; font-weight: 700;
  padding: 3px 8px; border-radius: 10px; border: 1px solid #5C4A1E; pointer-events: none; }

/* Fotos em tela cheia */
.tela-cheia { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.94); display: flex; flex-direction: column; }
.tela-cheia-trilho { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.tela-cheia-trilho::-webkit-scrollbar { display: none; }
.tela-cheia-trilho figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 56px 12px 24px; }
.tela-cheia-trilho img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 8px; }
.tela-cheia-trilho figcaption { color: #E7E5E4; font-size: 14px; text-align: center; }
.tela-cheia-fechar { position: absolute; z-index: 2; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 42px; height: 42px; border-radius: 21px;
  border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 18px; cursor: pointer; }
.tela-cheia-contador { position: absolute; z-index: 2; top: calc(22px + env(safe-area-inset-top)); left: 16px; color: #E7E5E4; font-size: 13px; font-weight: 700; }
