/* Locais › Perto de mim (views/locais/perto*.js). Prefixo .pt- . Vidro e tokens do app (vidro.css); toque >= 44 px, letra >= 11 px.
   Escuro = :root · Claro = :root[data-app='light']. A ficha e os ajustes sobem por cima da lista (z-index abaixo). */

:root {
  --pt-ok: #3ddc6a; --pt-warn: #ffb340; --pt-off: #a3a3ab; --pt-blue: #4f8cff;
  --pt-map: #18181e; --pt-rua: #26262f; --pt-av: #3a3a47; --pt-parque: #1c2a20; --pt-agua: #16222e;
}
:root[data-app='light'] {
  --pt-ok: #1a7f36; --pt-warn: #a65600; --pt-off: #6a6a74; --pt-blue: #1f6feb;
  --pt-map: #ece9e1; --pt-rua: #ffffff; --pt-av: #f7d77c; --pt-parque: #cfe6c4; --pt-agua: #bcd8ec;
}

#perto-sheet { z-index: 70; } #perto-aj { z-index: 72; } #perto-ficha { z-index: 73; }
.pt-body { padding: 0 16px calc(28px + var(--safe-b)); min-width: 0; }
.pt-body svg { width: 20px; height: 20px; }
.pt-sv { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pt-sv.f { fill: currentColor; stroke: none; }

/* ---------- cabeçalho ---------- */
.pt-head, .pt-hero { display: flex; align-items: flex-start; gap: 10px; padding-top: 2px; }
.pt-head-t { flex: 1; min-width: 0; }
.pt-head h2, .pt-hero h2 { margin: 0; font: 700 22px/1.15 var(--title); text-wrap: balance; overflow-wrap: anywhere; }
.pt-head p, .pt-hero p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.pt-head p b { color: var(--pt-ok); font-weight: 600; }
.pt-head p b.off { color: var(--pt-warn); }
.pt-xbtn { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); border: 1px solid var(--chip-line); color: var(--text); }
.pt-xbtn svg { width: 20px; height: 20px; }
.pt-xbtn:active { transform: scale(.94); }

/* ---------- janela das 3 escolhas ---------- */
.pt-perm { text-align: center; padding-top: 4px; }
.pt-radar { position: relative; display: grid; place-items: center; width: 96px; height: 96px; margin: 4px auto 14px; }
.pt-radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: pt-ring 2.4s infinite; }
.pt-radar i:nth-child(2) { animation-delay: .8s; } .pt-radar i:nth-child(3) { animation-delay: 1.6s; }
.pt-radar span { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; box-shadow: 0 8px 24px -6px var(--accent); }
.pt-radar span svg { width: 24px; height: 24px; }
.pt-radar.small { width: 64px; height: 64px; margin-bottom: 8px; }
.pt-radar.small span { width: 34px; height: 34px; } .pt-radar.small span svg { width: 18px; height: 18px; }
@keyframes pt-ring { from { transform: scale(.45); opacity: .7; } to { transform: scale(1.1); opacity: 0; } }
.pt-perm h2 { margin: 0 0 6px; font: 700 22px/1.2 var(--title); text-wrap: balance; }
.pt-perm > p { margin: 0 auto 18px; max-width: 30ch; color: var(--muted); font-size: 14.5px; }
.pt-opts { display: grid; gap: 10px; text-align: left; }
.pt-opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 16px; border-radius: 18px; text-align: left;
  background: var(--chip); border: 1px solid var(--chip-line); color: var(--text); }
.pt-opt.main { background: var(--btn); color: var(--btn-ink); border-color: transparent; }
.pt-opt:active { transform: scale(.98); }
.pt-oi { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--g2); }
.pt-opt.main .pt-oi { background: rgb(128 128 128 / .22); }
.pt-oi svg { width: 20px; height: 20px; }
.pt-opt b { display: block; font-weight: 600; font-size: 16px; }
.pt-opt small { display: block; font-size: 13px; opacity: .78; }
.pt-privacy { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: 16px; background: var(--chip); font-size: 13px; line-height: 1.4; color: var(--muted); text-align: left; }
.pt-privacy svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--pt-ok); }
.pt-load { display: grid; justify-items: center; gap: 4px; padding: 18px 0 8px; text-align: center; font-size: 14.5px; }

/* ---------- mapinha ---------- */
.pt-map { position: relative; margin: 14px 0 12px; border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; background: var(--pt-map); border: 1px solid var(--g-line); }
.pt-map svg { display: block; width: 100%; height: 100%; }
.pt-fundo { fill: var(--pt-map); }
.pt-parque { fill: var(--pt-parque); }
.pt-agua { stroke: var(--pt-agua); stroke-width: 7; fill: none; }
.pt-rua { stroke: var(--pt-rua); stroke-width: 5; }
.pt-av { stroke: var(--pt-av); stroke-width: 9; }
.pt-raio { fill: rgb(var(--accent-rgb) / .07); stroke: var(--accent); stroke-opacity: .55; stroke-dasharray: 5 5; }
.pt-pino { cursor: pointer; outline: none; }
.pt-pin-f { fill: var(--accent); stroke: var(--sheet-tint); stroke-width: 2; }
.pt-pino.off .pt-pin-f { fill: var(--pt-off); }
.pt-pin-n { fill: #fff; font: 700 11px var(--ui); pointer-events: none; }
.pt-pino:focus-visible .pt-pin-f { stroke: var(--text); }
.pt-eu { fill: var(--pt-blue); stroke: #fff; stroke-width: 3; }
.pt-eu-halo { fill: var(--pt-blue); opacity: .2; transform-box: fill-box; transform-origin: center; animation: pt-pulse 2.4s ease-in-out infinite; }
@keyframes pt-pulse { 0%, 100% { transform: scale(.7); } 50% { transform: scale(1.4); } }
.pt-rotulo { fill: var(--sheet-tint); stroke: var(--g-line); }
.pt-rotulo-t { fill: var(--text); font: 600 11px var(--ui); }
.pt-scale { position: absolute; left: 10px; bottom: 10px; padding: 4px 9px; border-radius: 99px; background: var(--sheet-tint); color: var(--text); font: 600 11px var(--ui); font-variant-numeric: tabular-nums; }

/* ---------- raio e filtros ---------- */
.pt-seg { display: flex; padding: 3px; border-radius: 99px; background: var(--chip); border: 1px solid var(--chip-line); }
.pt-seg button { flex: 1 1 0; min-width: 0; display: grid; place-items: center; text-align: center; padding: 0; min-height: 44px; border-radius: 99px; font: 600 14px var(--ui); color: var(--muted); font-variant-numeric: tabular-nums; }
.pt-seg button[aria-pressed='true'] { background: var(--btn); color: var(--btn-ink); }
.pt-filters { display: flex; gap: 8px; margin: 10px -16px 4px; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; }
.pt-filters::-webkit-scrollbar { display: none; }
.pt-fchip { flex: none; min-height: 44px; padding: 0 14px; border-radius: 99px; font: 600 14px var(--ui); color: var(--text); background: var(--chip); border: 1px solid var(--chip-line); }
.pt-fchip[aria-pressed='true'] { background: rgb(var(--accent-rgb) / .14); color: var(--accent-text); border-color: transparent; }
.pt-notice { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; padding: 8px 8px 8px 14px; border-radius: 16px; background: var(--chip); border: 1px solid transparent; font-size: 13px; color: var(--muted); }
.pt-notice > svg { flex: none; width: 18px; height: 18px; color: var(--accent-text); }
.pt-notice > span { flex: 1; min-width: 0; }
.pt-notice button { flex: none; min-height: 44px; padding: 0 10px; font: 600 13px var(--ui); color: var(--text); }
.pt-notice.warn { border-color: var(--pt-warn); }

/* ---------- lista ---------- */
.pt-list, .pt-also { display: grid; gap: 10px; margin-top: 12px; }
.pt-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 20px; text-align: left; color: var(--text);
  background: var(--chip); border: 1px solid var(--chip-line); }
.pt-item:active { transform: scale(.985); }
.pt-item.ad { border-color: var(--accent); }
.pt-tile { position: relative; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--g2); }
.pt-tile.big { width: 72px; height: 72px; border-radius: 22px; flex: none; }
.pt-tile .ic3d { width: 40px; height: 40px; } .pt-tile.big .ic3d { width: 58px; height: 58px; }
.pt-fallback { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); }
.pt-num { position: absolute; top: -5px; left: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font: 700 11px/20px var(--ui); text-align: center; }
.pt-mid { min-width: 0; display: grid; gap: 2px; }
.pt-nm { font-weight: 600; font-size: 16px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-st { font-size: 13px; font-weight: 500; }
.pt-tg { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-dist { text-align: right; font-variant-numeric: tabular-nums; }
.pt-dist b { display: block; font: 700 17px var(--title); }
.pt-dist span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pt-s-open { color: var(--pt-ok); } .pt-s-closing { color: var(--pt-warn); } .pt-s-closed { color: var(--pt-off); }
.pt-more { display: flex; margin: 12px auto 0; }
.pt-hidden { margin-top: 6px; text-align: center; font-size: 13px; color: var(--muted); }
.pt-hidden button { min-height: 44px; padding: 0 8px; font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.pt-src { margin: 10px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.pt-empty { display: grid; justify-items: center; gap: 10px; margin-top: 18px; padding: 26px 18px; border-radius: 20px; border: 1px dashed var(--line-2); text-align: center; color: var(--muted); }
.pt-empty b { color: var(--text); font-size: 15px; }

/* ---------- ficha ---------- */
.pt-hero { align-items: center; gap: 14px; }
.pt-status { margin-top: 16px; padding: 14px 16px; border-radius: 20px; background: var(--chip); border: 1px solid var(--chip-line); }
.pt-status .row1 { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.pt-status .dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent); }
.pt-status .bar { height: 6px; margin: 12px 0 8px; border-radius: 9px; overflow: hidden; background: var(--g2); }
.pt-status .bar i { display: block; height: 100%; border-radius: 9px; background: currentColor; }
.pt-status .smart { margin-top: 8px; font-size: 14px; line-height: 1.4; }
.pt-status .smart em { font-style: normal; color: var(--muted); }
.pt-trip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.pt-trip > div { display: grid; justify-items: center; padding: 12px 6px; border-radius: 18px; background: var(--chip); border: 1px solid var(--chip-line); }
.pt-trip svg { color: var(--muted); }
.pt-trip b { margin-top: 2px; font: 700 18px var(--title); font-variant-numeric: tabular-nums; }
.pt-trip span { font-size: 12px; color: var(--muted); }
.pt-trip .best { border-color: var(--text); }
.pt-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.pt-act { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 72px; padding: 10px 4px; border-radius: 18px; font: 600 13px var(--ui); color: var(--text);
  background: var(--chip); border: 1px solid var(--chip-line); text-decoration: none; }
.pt-act svg { width: 22px; height: 22px; }
.pt-act > span { display: contents; }
.pt-act.main { background: var(--btn); color: var(--btn-ink); border-color: transparent; }
.pt-act[aria-pressed='true'] { color: var(--accent-text); }
.pt-act:disabled { opacity: .45; }
.pt-act:active:not(:disabled) { transform: scale(.96); }
.pt-weather { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px 16px; border-radius: 20px; background: var(--chip); border: 1px solid var(--chip-line); font-size: 14px; }
.pt-weather svg { flex: none; width: 28px; height: 28px; color: var(--pt-blue); }
.pt-weather b { display: block; } .pt-weather small { color: var(--muted); font-size: 13px; }
.pt-sec { margin-top: 22px; }
.pt-sec h3 { margin: 0 0 10px; font: 600 12px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pt-has { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pt-has > div { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px; border-radius: 16px; font-size: 14px; background: var(--chip); border: 1px solid var(--chip-line); }
.pt-has svg { flex: none; width: 18px; height: 18px; color: var(--pt-ok); }
.pt-has .no { color: var(--muted); } .pt-has .no svg { color: var(--pt-off); }
.pt-hours, .pt-info { border-radius: 20px; overflow: hidden; background: var(--chip); border: 1px solid var(--chip-line); }
.pt-hours > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; font-size: 14px; font-variant-numeric: tabular-nums; border-top: 1px solid var(--chip-line); }
.pt-hours > div:first-child { border-top: 0; }
.pt-hours b { font-weight: inherit; text-align: right; }
.pt-hours .today { font-weight: 700; background: var(--g2); }
.pt-hours .today span::after { content: ' · hoje'; font-weight: 500; color: var(--muted); }
.pt-vazio { margin: 0; font-size: 14px; color: var(--muted); }
.pt-ln { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px 8px 14px; border-top: 1px solid var(--chip-line); }
.pt-ln:first-child { border-top: 0; }
.pt-ln > svg { flex: none; width: 20px; height: 20px; color: var(--muted); }
.pt-ln > div { flex: 1; min-width: 0; }
.pt-ln b { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.pt-ln small { font-size: 12px; color: var(--muted); }
.pt-ln button, .pt-lnk { flex: none; display: inline-grid; place-items: center; min-height: 44px; padding: 0 14px; border-radius: 99px; background: var(--g2); color: var(--text); font: 600 13px var(--ui); text-decoration: none; }
.pt-fix { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; font-size: 12px; color: var(--muted); }
.pt-fix a { display: inline-grid; place-items: center; min-height: 44px; padding: 0 12px; font: 600 13px var(--ui); color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- ajustes ---------- */
.pt-radio { display: grid; gap: 8px; margin-top: 14px; }
.pt-radio-b { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; border-radius: 18px; text-align: left; color: var(--text); background: var(--chip); border: 1px solid var(--chip-line); }
.pt-radio-b i { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--faint); }
.pt-radio-b[aria-checked='true'] i { border: 7px solid var(--accent); }
.pt-radio-b b { display: block; font-weight: 600; font-size: 15px; }
.pt-radio-b small { display: block; font-size: 13px; color: var(--muted); }

/* ---------- aba Locais: atalhos e "Entendi" ---------- */
.lx-qchip.pt-q { display: inline-flex; align-items: center; gap: 8px; padding-left: 10px; }
.lx-qchip.pt-q .ic3d { width: 26px; height: 26px; }
.pt-entendi { display: flex; align-items: center; gap: 6px; min-height: 20px; margin: -2px 6px 0; font-size: 13px; color: var(--muted); }
.pt-entendi:empty { display: none; }
.pt-entendi b { color: var(--text); font-weight: 600; }
.pt-entendi svg { width: 16px; height: 16px; color: var(--pt-ok); }

@media (max-width: 360px) { .pt-has { grid-template-columns: 1fr; } .pt-acts { gap: 6px; } }
@media (prefers-reduced-motion: reduce) { .pt-radar i, .pt-eu-halo { animation: none; } .pt-radar i { opacity: .3; } }
