@font-face {
  font-family: "Anton";
  src: url("anton.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #0d0a16;
  --painel: #151022;
  --painel-2: #1e1731;
  --painel-3: #281f42;
  --linha: rgba(255, 255, 255, .11);
  --texto: #ffffff;
  --suave: #c9c1e2;
  --apagado: #9389b3;
  --roxo: #8b2cf5;
  --roxo-escuro: #2a0f5c;
  --rosa: #ff3ea5;
  --lima: #c6ff1a;
  --alerta: #ffc23d;
  --mar: #2F90B0;
  --raio: 14px;
  --sombra: 0 10px 34px rgba(0, 0, 0, .5);
  --grad: linear-gradient(135deg, #8b2cf5 0%, #d42fd0 55%, #ff3ea5 100%);
  --fonte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --titulo: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--texto);
  font: 15px/1.45 var(--fonte);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

#app { height: 100%; display: grid; grid-template-columns: 380px 1fr; }

/* ---------- Painel (barra lateral) ---------- */
.painel {
  background: var(--painel);
  border-right: 1px solid var(--linha);
  display: flex; flex-direction: column;
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  z-index: 900;
}
.painel > * { flex-shrink: 0; }
/* até os dados chegarem, o conteúdo da lista fica invisível (evita salto de layout) */
body.iniciando .painel > :not(.marca):not(.painel-alca) { visibility: hidden; }
.painel-alca, .painel-fechar { display: none; }
.marca {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 18px 12px;
  position: sticky; top: 0; background: var(--painel); z-index: 2;
}
.marca-logo { border-radius: 12px; flex: none; box-shadow: 0 0 0 2px rgba(198, 255, 26, .7); }
.marca-txt { min-width: 0; flex: 1; }
.marca-nome { display: block; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--lima); }
.marca-titulo { margin: 0; font: 400 23px/1.08 var(--titulo); letter-spacing: .01em; }

.cats { display: flex; gap: 6px; padding: 4px 18px 12px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--painel-2); border: 1px solid var(--linha);
  font-size: 13px; font-weight: 700; color: var(--suave);
}
.cat.ativa { background: var(--grad); border-color: transparent; color: #fff; }
.cat[disabled] { cursor: default; opacity: .62; }
.cat em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); }

.progresso { margin: 0 18px 12px; padding: 12px 14px; background: var(--painel-2); border-radius: var(--raio); border: 1px solid var(--linha); }
.progresso-topo { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 15px; }
.progresso-topo b { font-size: 20px; color: var(--lima); }
.troca { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--suave); cursor: pointer; user-select: none; }
.troca input { width: 18px; height: 18px; accent-color: var(--lima); margin: 0; }
.barra { height: 7px; margin-top: 9px; background: rgba(255, 255, 255, .09); border-radius: 99px; overflow: hidden; }
.barra span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lima), #7dff6a); border-radius: inherit; transition: width .35s ease; }

.busca { position: relative; margin: 0 18px 10px; color: var(--apagado); }
.busca svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); }
.busca input {
  width: 100%; height: 46px; padding: 0 14px 0 40px;
  border-radius: 12px; border: 1px solid var(--linha);
  background: #0f0b1b; color: var(--texto); font: 16px var(--fonte);
  outline: none;
}
.busca input:focus { border-color: var(--roxo); box-shadow: 0 0 0 3px rgba(139, 44, 245, .3); }
.busca input::placeholder { color: var(--apagado); }

.filtros { padding: 0 18px; display: grid; gap: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 650;
  background: transparent; border: 1px solid var(--linha); color: var(--suave);
}
.chip svg { width: 18px; height: 18px; fill: currentColor; }
.chip[aria-pressed="true"] { background: var(--texto); color: #160d2a; border-color: var(--texto); }
.chip .q { font-size: 11px; opacity: .7; font-weight: 700; }
.lista-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 18px 4px; }
.contagem { margin: 0; font-size: 13px; color: var(--apagado); }
.contagem button { background: none; border: 0; padding: 10px 2px; margin: -10px 0; color: var(--rosa); text-decoration: underline; font-size: 13px; }
.ordem { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--painel-2); border: 1px solid var(--linha); flex: none; }
.ordem button { border: 0; background: none; color: var(--suave); font-size: 12.5px; font-weight: 800; padding: 6px 11px; border-radius: 8px; min-height: 32px; }
.ordem button[aria-pressed="true"] { background: var(--texto); color: #160d2a; }
.regiao-tit {
  position: sticky; top: var(--marca-h, 76px); z-index: 1;
  margin: 10px 6px 2px; padding: 6px 10px; border-radius: 8px;
  background: var(--painel-3); font-size: 12px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; color: var(--lima);
}
.regiao-tit::after { content: " · " attr(data-n); color: var(--apagado); }

.lista { list-style: none; margin: 0; padding: 0 10px 10px; }
.item { display: flex; align-items: center; gap: 4px; border-radius: 12px; }
.item:hover, .item.ativo { background: var(--painel-2); }
.item.ativo { box-shadow: inset 3px 0 0 var(--rosa); }
.item-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 9px 8px; min-height: 52px; background: none; border: 0; text-align: left;
}
.item-n {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--grad); font-size: 13px; font-weight: 800;
}
.item-n svg { display: none; }
.item-txt { min-width: 0; }
.item-txt b { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-txt small { display: block; font-size: 12.5px; color: var(--apagado); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item.pego .item-n { background: var(--lima); color: #11210a; }
.item.pego .item-txt b { color: var(--suave); text-decoration: line-through; text-decoration-color: rgba(198, 255, 26, .6); }
.chk {
  flex: none; width: 44px; height: 44px; border-radius: 10px; margin-right: 2px;
  background: none; border: 0; display: grid; place-items: center; color: var(--apagado);
}
.chk span { width: 24px; height: 24px; border-radius: 7px; border: 2px solid currentColor; display: grid; place-items: center; }
.chk svg { opacity: 0; }
.chk[aria-pressed="true"] { color: var(--lima); }
.chk[aria-pressed="true"] span { background: var(--lima); border-color: var(--lima); }
.chk[aria-pressed="true"] svg { opacity: 1; }
.vazio { padding: 18px; color: var(--apagado); text-align: center; }

.painel-rodape { margin-top: auto; padding: 14px 18px 22px; border-top: 1px solid var(--linha); }
.seguir { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seguir img { border-radius: 10px; }
.seguir div { flex: 1; min-width: 150px; }
.seguir p { margin: 0; font-size: 14px; }
.seguir small { color: var(--apagado); font-size: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 16px; border-radius: 12px; border: 0;
  font-weight: 800; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.btn-ig { background: var(--grad); color: #fff; width: 100%; }
.creditos { margin: 12px 0 6px; font-size: 11.5px; line-height: 1.5; color: var(--apagado); }
.creditos a { color: var(--suave); }
.link-zerar { background: none; border: 0; padding: 12px 0; min-height: 44px; font-size: 12px; color: var(--apagado); text-decoration: underline; }

/* ---------- Mapa ---------- */
.mapa-wrap { position: relative; min-width: 0; min-height: 0; }
#mapa { position: absolute; inset: 0; background: var(--mar); outline: none; }
.leaflet-container { font: 14px/1.4 var(--fonte); background: var(--mar); }
.leaflet-tile-pane { filter: saturate(1.05); }
/* os tiles se sobrepõem 1px (ver app.js): sem o plus-lighter do Leaflet 1.9 a emenda some */
.leaflet-container img.leaflet-tile { mix-blend-mode: normal; }
.topo-mobile, .fab { display: none; }

.carregando {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(circle at 50% 40%, #2a0f5c 0%, var(--bg) 70%);
  text-align: center; padding: 24px; transition: opacity .35s ease;
}
.carregando img { border-radius: 18px; box-shadow: 0 0 0 3px var(--lima), 0 10px 30px rgba(0, 0, 0, .5); }
.carregando b { font: 400 26px/1.1 var(--titulo); letter-spacing: .01em; }
.carregando small { color: var(--suave); font-size: 14px; max-width: 300px; }
.carregando.saindo { opacity: 0; pointer-events: none; }
.carregando.erro .giro { display: none; }
.carregando.erro small { color: #ffe7b0; }
.giro { width: 34px; height: 34px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .15); border-top-color: var(--rosa); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* Controles do Leaflet */
.leaflet-bar { border: 0 !important; box-shadow: var(--sombra) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-bar a, .leaflet-bar button.ctl {
  width: 44px !important; height: 44px !important; line-height: 44px !important;
  background: rgba(21, 16, 34, .94) !important; color: #fff !important;
  border: 0 !important; border-bottom: 1px solid var(--linha) !important;
  font: 700 24px/44px var(--fonte) !important; display: grid !important; place-items: center; padding: 0;
}
.leaflet-bar a:hover, .leaflet-bar button.ctl:hover { background: var(--painel-3) !important; }
.leaflet-bar a:last-child, .leaflet-bar button.ctl:last-child { border-bottom: 0 !important; }
.leaflet-bar a.leaflet-disabled { color: #6c6388 !important; }
.leaflet-control-attribution {
  background: rgba(13, 10, 22, .78) !important; color: var(--suave) !important;
  font-size: 12px !important; padding: 3px 9px !important; border-radius: 0 8px 0 0;
}
.attr-curto { display: none; }
.leaflet-control-attribution a { color: #fff !important; }

/* Pinos */
.pino-wrap { background: none; border: 0; }
.pino {
  position: relative; width: 38px; height: 46px;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .55));
  transition: transform .15s ease;
  transform-origin: 50% 100%;
}
.pino-svg { position: absolute; inset: 0; width: 38px; height: 46px; overflow: visible; }
.pino-forma { fill: url(#gp); stroke: #fff; stroke-width: 2.6; }
.pino-ic { fill: #fff; }
.pino-n {
  position: absolute; right: -10px; top: -9px; min-width: 24px; height: 23px; padding: 0 4px;
  border-radius: 12px; background: #fff; color: #170d2c; border: 2px solid #170d2c;
  font: 800 12px/19px var(--fonte); text-align: center;
}
.zoom-longe .pino { transform: scale(.66); }
.zoom-medio .pino { transform: scale(.82); }
.pino-wrap:hover .pino, .pino-wrap.ativo .pino { transform: scale(1.18); }
.pino-wrap.ativo { z-index: 100000 !important; }
.pino-wrap.ativo .pino-forma { fill: #fff; stroke: var(--rosa); stroke-width: 3.2; }
.pino-wrap.ativo .pino-ic { fill: var(--roxo); }
.pino-wrap.pego .pino { opacity: .7; }
.pino-wrap.pego .pino-forma { fill: #3c3553; }
.pino-wrap.pego .pino-n { background: var(--lima); }
.pino-wrap.a-confirmar .pino-forma { stroke-dasharray: 4 3; }

.cluster { background: none; border: 0; }
.cluster span {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); border: 3px solid #fff; color: #fff; font-weight: 900; font-size: 15px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .5), 0 0 0 5px rgba(139, 44, 245, .35);
}

.leaflet-tooltip.dica {
  background: #fff; color: #160d2a; border: 0; border-radius: 10px; padding: 6px 10px;
  font: 700 13.5px/1.25 var(--fonte); box-shadow: 0 6px 18px rgba(0, 0, 0, .45); text-align: center;
}
.leaflet-tooltip.dica small { display: block; font-weight: 600; font-size: 12px; color: #5b4f78; }
.leaflet-tooltip-top.dica::before { border-top-color: #fff; }

/* no PC os botões de zoom ficam à esquerda, para o cartão (à direita) não cobrir */
@media (min-width: 900px) {
  .leaflet-bottom.leaflet-right { right: auto; left: 0; bottom: 28px; }
  .leaflet-bottom.leaflet-right .leaflet-control { float: left; clear: both; margin-left: 16px; margin-right: 0; }
}

/* ---------- Cartão ---------- */
.cartao {
  position: absolute; top: 16px; right: 16px; z-index: 950;
  width: 390px; max-height: calc(100% - 32px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--painel); border: 1px solid var(--linha); border-radius: 18px;
  box-shadow: var(--sombra);
  animation: entra .2s ease;
}
@keyframes entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cartao-alca { display: none; }
.cartao-topo { display: flex; gap: 12px; align-items: flex-start; padding: 16px 16px 0; }
.cartao-n {
  flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--grad);
  display: grid; place-items: center; position: relative;
}
.cartao-n svg { width: 34px; height: 34px; fill: #fff; }
.cartao-n b { position: absolute; right: -7px; bottom: -7px; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px; background: #fff; color: #170d2c; font-size: 12px; line-height: 24px; text-align: center; border: 2px solid var(--painel); }
.cartao-tit { flex: 1; min-width: 0; }
.cartao-tit h2 { margin: 1px 0 3px; font: 400 25px/1.08 var(--titulo); letter-spacing: .01em; overflow-wrap: anywhere; }
.cartao-tit p { margin: 0; font-size: 13.5px; color: var(--suave); }
.cartao-fechar { flex: none; width: 44px; height: 44px; margin: -6px -6px 0 0; border-radius: 12px; background: var(--painel-2); border: 0; display: grid; place-items: center; }
.cartao-corpo { padding: 14px 16px 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 8px; font-size: 12.5px; font-weight: 750; background: var(--painel-3); color: #fff; }
.tag-modo { background: rgba(139, 44, 245, .28); color: #e9dcff; }
.tag-perdivel { background: rgba(255, 62, 165, .22); color: #ffd1e8; }
.tag-gratis { background: rgba(198, 255, 26, .16); color: var(--lima); }
.tag-confirmar { background: rgba(255, 194, 61, .2); color: #ffe4a6; }
.lugar { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; font-size: 14px; color: var(--suave); }
.lugar svg { flex: none; margin-top: 2px; fill: var(--rosa); }
.cartao h3 { margin: 0 0 4px; font-size: 12px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; color: var(--lima); }
.como { margin: 0 0 12px; font-size: 16px; line-height: 1.5; }
.caixa { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: #0e0a19; border: 1px solid var(--linha); }
.caixa small { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--apagado); }
.caixa b { font-size: 17px; letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.caixa-codigo b { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--lima); font-size: 18px; }
.obs { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 194, 61, .1); border: 1px solid rgba(255, 194, 61, .3); color: #ffe7b0; font-size: 13.5px; }
.acoes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.btn-pego { background: var(--painel-3); color: #fff; border: 2px solid transparent; }
.btn-pego[aria-pressed="true"] { background: var(--lima); color: #11210a; }
.btn-link { background: transparent; color: #fff; border: 2px solid var(--linha); }
.btn-link.ok { border-color: var(--lima); color: var(--lima); }
.nav-itens { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.nav-itens button { flex: 1; min-height: 44px; background: none; border: 1px solid var(--linha); border-radius: 10px; padding: 8px; font-size: 13.5px; color: var(--suave); }
.cartao-rodape { display: flex; align-items: center; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--linha); font-size: 12.5px; color: var(--apagado); }
.cartao-rodape img { border-radius: 7px; }
.cartao-rodape a { margin-left: auto; color: var(--rosa); font-weight: 800; text-decoration: none; white-space: nowrap; padding: 12px 0; margin-top: -12px; margin-bottom: -12px; }

.aviso {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: #fff; color: #160d2a; font-weight: 800; padding: 10px 16px; border-radius: 12px;
  box-shadow: var(--sombra); z-index: 2000; font-size: 14px;
}

:focus-visible { outline: 3px solid var(--lima); outline-offset: 2px; }

/* ---------- Celular ---------- */
@media (max-width: 899px) {
  #app { display: block; }
  .mapa-wrap { position: fixed; inset: 0; }

  .topo-mobile {
    display: flex; align-items: center; gap: 10px;
    position: absolute; z-index: 940;
    top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px;
    padding: 7px 8px 7px 7px; border-radius: 16px;
    background: rgba(21, 16, 34, .94); border: 1px solid var(--linha); box-shadow: var(--sombra);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  .topo-mobile img { border-radius: 10px; flex: none; }
  .topo-titulo { flex: 1; min-width: 0; line-height: 1.12; }
  .topo-titulo span { display: block; font: 400 19px/1.1 var(--titulo); letter-spacing: .01em; }
  .topo-titulo small { display: block; font-size: 12px; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pilula { flex: none; padding: 6px 10px; border-radius: 10px; background: var(--lima); color: #11210a; font-weight: 900; font-size: 14px; }

  .fab {
    display: inline-flex; align-items: center; gap: 8px;
    position: absolute; z-index: 930; left: 50%; transform: translateX(-50%);
    bottom: calc(18px + env(safe-area-inset-bottom));
    height: 50px; padding: 0 22px; border-radius: 999px; border: 0;
    background: var(--grad); color: #fff; font-weight: 850; font-size: 16px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .55);
  }

  .leaflet-bottom.leaflet-right { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .leaflet-control-attribution { font-size: 12px !important; max-width: 64vw; line-height: 1.35 !important; border-radius: 0 8px 8px 0 !important; }
  .attr-longo { display: none; }
  .attr-curto { display: inline; }

  .painel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
    height: 88vh; height: 88dvh; border-right: 0;
    border-radius: 20px 20px 0 0; border-top: 1px solid var(--linha);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .6);
    transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    visibility: hidden;
  }
  .painel.aberto { transform: none; visibility: visible; }
  .painel-alca { display: block; width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .28); margin: 9px auto 0; flex: none; }
  .marca { padding: 10px 14px 10px; }
  .marca-titulo { font-size: 21px; }
  .painel-fechar { display: grid; }
  .btn-icone { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--painel-2); place-items: center; flex: none; }
  .cats, .filtros { padding-left: 14px; padding-right: 14px; }
  .progresso, .busca { margin-left: 14px; margin-right: 14px; }
  .lista { padding: 0 6px 8px; }
  .painel-rodape { padding: 14px 14px calc(22px + env(safe-area-inset-bottom)); }

  .cartao {
    position: fixed; top: auto; right: 0; left: 0; bottom: 0; width: auto;
    max-height: 64vh; max-height: 64dvh; border-radius: 20px 20px 0 0;
    border-bottom: 0; animation: sobe .24s cubic-bezier(.2, .8, .2, 1);
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1100;
  }
  @keyframes sobe { from { transform: translateY(100%); } to { transform: none; } }
  .cartao-alca { display: block; width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .28); margin: 9px auto -4px; }
  .cartao.cheio { max-height: 92vh; max-height: 92dvh; }
  .cartao.arrastando, .painel.arrastando { transition: none !important; animation: none; }
  .cartao-topo, .marca { touch-action: none; }

  /* alvos de toque >= 44px */
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; overscroll-behavior-x: contain; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; min-height: 44px; padding: 0 14px; font-size: 14px; }
  .cat { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .troca { min-height: 44px; }
  .troca input { width: 22px; height: 22px; }
  .ordem button { min-height: 44px; padding: 0 15px; font-size: 14px; }
  .lista-topo { margin-left: 14px; margin-right: 14px; }
  .leaflet-bottom.leaflet-left { bottom: calc(80px + env(safe-area-inset-bottom)); }

  /* busca com o teclado aberto: some o que não é resultado */
  .painel.buscando .cats, .painel.buscando .progresso, .painel.buscando .filtros,
  .painel.buscando .marca-nome, .painel.buscando .marca-logo, .painel.buscando .painel-rodape { display: none; }
  .painel.buscando .marca-titulo { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .painel.buscando .marca { padding-top: 6px; padding-bottom: 6px; }
  .cartao-tit h2 { font-size: 23px; }
  .como { font-size: 16.5px; }
  .aviso { bottom: calc(90px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Foto no cartão ---------- */
.foto { position: relative; margin: 0; aspect-ratio: 16 / 9; background: #0e0a19; border-radius: 18px 18px 0 0; overflow: hidden; }
.foto-ph { position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(139, 44, 245, .45), rgba(13, 10, 22, .2) 60%), linear-gradient(135deg, #1e1731, #0e0a19); }
.foto-ph svg { width: 34%; height: auto; fill: rgba(255, 255, 255, .22); }
.foto-btn { position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: zoom-in; display: block; width: 100%; height: 100%; }
.foto-btn img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .25s ease; }
.foto.carregada .foto-btn img { opacity: 1; }
.foto.falhou .foto-btn, .foto.falhou figcaption, .foto.falhou .foto-abas { display: none; }
.foto figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 7px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78)); color: #e8e2fa; font-size: 12px; line-height: 1.35; pointer-events: none;
}
.foto figcaption a { color: #fff; font-weight: 750; pointer-events: auto; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); }
.foto-abas { position: absolute; top: 10px; left: 10px; display: flex; gap: 4px; padding: 3px; border-radius: 11px; background: rgba(13, 10, 22, .82); }
.foto-abas button { border: 0; background: none; color: #e8e2fa; font-size: 13px; font-weight: 800; padding: 0 12px; min-height: 34px; border-radius: 8px; }
.foto-abas button[aria-pressed="true"] { background: #fff; color: #160d2a; }
.cartao .foto + .cartao-topo { padding-top: 14px; }
.luz { position: fixed; inset: 0; z-index: 4000; background: rgba(5, 3, 10, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: calc(16px + env(safe-area-inset-bottom)); cursor: zoom-out; }
.luz img { max-width: 100%; max-height: calc(100% - 80px); object-fit: contain; border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
.luz p { margin: 0; color: #e8e2fa; font-size: 14px; text-align: center; max-width: 720px; }
.luz p a { color: #fff; font-weight: 750; }
.luz-fechar { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 48px; height: 48px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; }
@media (max-width: 899px) {
  .cartao .foto { border-radius: 20px 20px 0 0; }
  .cartao-alca { position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: 2; margin: 8px 0 0 !important; background: rgba(255, 255, 255, .7) !important; }
  .foto-abas button { min-height: 40px; }
}
.link-manual { width: 100%; margin-top: 8px; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--lima); background: #0e0a19; color: #fff; font: 14px ui-monospace, Menlo, monospace; }

/* ---------- Raridade (estrelas no estilo do HUD do GTA 6) ---------- */
.estrelas { display: inline-flex; gap: 1px; vertical-align: middle; flex: none; }
.estrelas svg { width: 13px; height: 13px; display: block; }
.estrelas.mini svg { width: 11px; height: 11px; }
.estrelas.grande svg { width: 19px; height: 19px; }
.estrelas.max svg { filter: drop-shadow(0 0 2.5px rgba(255, 255, 255, .85)) drop-shadow(0 0 6px rgba(255, 62, 165, .55)); }
.item-nome { display: flex; align-items: center; gap: 7px; min-width: 0; }
.item-nome b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cartao-tit .estrelas { margin: 2px 0 4px; }
.raridade-motivo { margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); border: 1px solid var(--linha); font-size: 14px; color: #ecE6ff; }
.raridade-motivo b { color: var(--lima); margin-right: 4px; }
.legenda-raridade { margin: 8px 18px 0; font-size: 12.5px; line-height: 1.7; color: var(--suave); }
.legenda-raridade .estrelas { margin-right: 3px; position: relative; top: -1px; }
.chip-rar { gap: 7px; }
.chip-rar .estrelas svg { width: 12px; height: 12px; }
.chip-rar[aria-pressed="true"] { background: #2b2440; color: #fff; border-color: var(--lima); box-shadow: inset 0 0 0 1px var(--lima); }
.leaflet-tooltip.dica .estrelas { display: flex; justify-content: center; margin-bottom: 3px; }
.pino-wrap.raro6 .pino { transform: scale(1.14); }
.zoom-longe .pino-wrap.raro6 .pino { transform: scale(.8); }
.zoom-medio .pino-wrap.raro6 .pino { transform: scale(.96); }
.pino-wrap.raro6 .pino-forma { stroke: #ffd34d; stroke-width: 3.4; }
.pino-wrap.raro6 .pino-n { background: #ffd34d; }
.pino-wrap.raro6:hover .pino, .pino-wrap.raro6.ativo .pino { transform: scale(1.3); }
.pino-wrap.aproximado .pino-forma { stroke-dasharray: 5 3; }
@media (max-width: 899px) {
  .legenda-raridade { margin-left: 14px; margin-right: 14px; }
  .estrelas svg { width: 12px; height: 12px; }
}
.onde-fica { margin: 0 0 12px; }
.onde-fica .foto { border-radius: 12px; }
.foto figcaption span { color: #fff; font-weight: 700; }
