/* ═══════════════════════════════════════════════════════════════════════
   PESTAÑA PINTAR (fase 1, 2026-10-19) — mockups/pintar-barrio.html
   El mapa Simpson pasa a gris y solo llevan color los hexágonos y los equipos
   (excepción deliberada al acento único: el color del barrio viene de la base y
   se pone en línea). Todo lo demás cuelga de las variables de la piel.
   ═══════════════════════════════════════════════════════════════════════ */

/* El panel deja pasar los toques al mapa; solo sus tarjetas los reciben. */
.pt-panel { position: fixed; inset: 0; bottom: calc(62px + env(safe-area-inset-bottom, 0px)); z-index: 1240; display: none; pointer-events: none; }
.pt-panel.abierto { display: block; }
#pt-cuerpo { position: absolute; inset: 0; }
.pt-copa, .pt-pie, .pt-vivo, .pt-stats, .pt-carga { pointer-events: auto; }
body.pt-saliendo #tabbar { display: none; }
body.pt-saliendo .pt-panel { bottom: 0; }

/* Con Pintar abierto el mapa se queda solo con lo suyo: sin la hoja de ofertas, sin los
   botones de arriba y sin los pines de negocio (los carteles de lugares y el Cristo se quedan). */
body.pintando .w-sheet, body.pintando .w-flota-top, body.pintando .maplibregl-ctrl-top-right { display: none; }
body.pintando .maplibregl-marker:not(.simpson-lugar):not(.simpson-cristo):not(.pt-marca):not(.pt-corona) { display: none; }

/* Carteles y Cristo en gris (el estilo del mapa ya viene en gris desde MapaSimpson.estilo({ gris: true })). */
.mapa-gris .simpson-cartel, .mapa-gris .simpson-cristo svg { filter: grayscale(1); }

.pt-trazo { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ── Copa de barrios ── */
.pt-copa { position: absolute; left: 14px; right: 14px; top: calc(14px + env(safe-area-inset-top, 0px)); max-width: 520px; margin: 0 auto;
  background: var(--surf); color: var(--ink); border-radius: var(--r-sm); padding: 12px 14px 10px; box-shadow: var(--csh); }
.pt-copa .tit { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.pt-copa .tit b { font-weight: 500; font-size: 14px; }
.pt-copa .tit small { font-size: 12px; color: var(--muted); }
.pt-eq { display: grid; grid-template-columns: 12px minmax(70px, 96px) 1fr 58px; gap: 8px; align-items: center; font-size: 13px; margin-top: 6px; }
.pt-eq i { width: 12px; height: 12px; border-radius: 4px; display: block; }
.pt-eq .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-eq .barra { height: 8px; border-radius: 999px; background: var(--field); overflow: hidden; }
.pt-eq .barra b { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.pt-eq .km { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.pt-eq.tuyo { font-weight: 500; }
.pt-eq.tuyo .km { color: var(--ink); }
.pt-copa .vacia { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.pt-carga { position: absolute; left: 14px; right: 14px; top: calc(14px + env(safe-area-inset-top, 0px)); margin: 0 auto; max-width: 520px;
  background: var(--surf); color: var(--muted); border-radius: var(--r-sm); padding: 14px; box-shadow: var(--csh); font-size: 13px; text-align: center; }

/* ── Pie: tu semana, categoría y botón grande ── */
.pt-pie { position: absolute; left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); max-width: 520px; margin: 0 auto; }
.pt-yo { background: var(--surf); color: var(--ink); border-radius: var(--r-sm); padding: 10px 14px; box-shadow: var(--csh); display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 10px; }
.pt-yo .ava { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--surf); display: grid; place-items: center; font-weight: 500; font-size: 13px; flex: none; }
.pt-yo .txt { min-width: 0; flex: 1; }
.pt-yo b { font-weight: 500; display: block; }
.pt-yo small { color: var(--muted); font-size: 12px; display: block; line-height: 1.35; }
.pt-yo button.cambiar { flex: none; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--field); color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.pt-modos { display: flex; background: var(--surf); border-radius: 999px; padding: 4px; box-shadow: var(--csh); margin-bottom: 10px; }
.pt-modos button { flex: 1; min-height: 40px; display: grid; place-items: center; font: inherit; font-size: 14px; font-weight: 500; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.pt-modos button.on { background: var(--field); color: var(--ink); }
.pt-boton { width: 100%; min-height: 54px; border: 0; border-radius: 999px; background: var(--acc); color: var(--acc-ink); display: flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 500; font-size: 16px; cursor: pointer; box-shadow: 0 10px 30px color-mix(in srgb, var(--acc) 35%, transparent); }
.pt-boton.sec { background: var(--surf); color: var(--ink); box-shadow: var(--csh); }
.pt-boton.ink { background: var(--ink); color: var(--surf); box-shadow: none; }
.pt-boton:disabled { opacity: .55; cursor: default; }
.pt-dos { display: flex; gap: 10px; }
.pt-dos .pt-boton { flex: 1; }

/* ── Salida en curso retomable ── */
.pt-retomar { background: var(--surf); color: var(--ink); border-radius: var(--r-sm); padding: 14px; box-shadow: var(--csh); }
.pt-retomar b { font-weight: 500; font-size: 15px; display: block; }
.pt-retomar small { color: var(--muted); font-size: 13px; display: block; margin: 2px 0 12px; }

/* ── Pantalla de salida ── */
.pt-vivo { position: absolute; left: 14px; right: 14px; top: calc(14px + env(safe-area-inset-top, 0px)); display: flex; justify-content: space-between; align-items: center; gap: 8px; max-width: 520px; margin: 0 auto; }
.pt-pil { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 0 12px; min-height: 36px; border-radius: 999px; background: var(--surf); color: var(--ink); box-shadow: var(--csh); white-space: nowrap; }
.pt-pil em { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); font-style: normal; }
.pt-pil.pausa em { background: var(--muted2); }
.pt-pil.gps-regular em { background: var(--warn); }
.pt-pil.gps-buscando em { background: var(--muted2); }
.pt-stats { position: absolute; left: 14px; right: 14px; top: calc(60px + env(safe-area-inset-top, 0px)); max-width: 520px; margin: 0 auto;
  background: var(--surf); color: var(--ink); border-radius: var(--r-sm); padding: 14px 16px 12px; box-shadow: var(--csh); }
.pt-stats .g { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; text-align: center; }
.pt-stats b { font-size: 28px; font-weight: 300; letter-spacing: -.02em; display: block; line-height: 1; font-variant-numeric: tabular-nums; }
.pt-stats small { font-size: 12px; color: var(--muted); display: block; margin-top: 4px; }
.pt-priv { font-size: 12px; color: var(--muted); text-align: center; margin: 10px 0 0; line-height: 1.4; }
.pt-priv.aviso { color: var(--ink); background: var(--surf); border-radius: var(--r-sm); padding: 8px 12px; box-shadow: var(--csh); }
.pt-vivo-pie { position: absolute; left: 14px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); max-width: 520px; margin: 0 auto; pointer-events: auto; }

/* ── Marcas sobre el mapa ── */
.pt-marca.aqui { width: 18px; height: 18px; border-radius: 50%; background: var(--pt-c, var(--ink)); border: 3px solid var(--surf); box-shadow: 0 0 0 6px color-mix(in srgb, var(--pt-c, var(--ink)) 25%, transparent); }

/* ── Hojas (usan la hoja inferior de cuadricula.js) ── */
.pt-h3 { font-size: 22px; font-weight: 300; line-height: 1.15; margin: 8px 0 0; }
.pt-sub { color: var(--muted); font-size: 13px; margin: 4px 0 0; line-height: 1.45; }
.pt-pildora { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--field); color: var(--ink); margin-top: 8px; }
.pt-pildora i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.pt-tarjeta { background: var(--field); border-radius: var(--r-sm); padding: 12px 14px; margin-top: 10px; }
.pt-tarjeta .t { font-size: 12px; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; gap: 8px; }
.pt-rank { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.pt-rank.primero { border-top: 0; }
.pt-rank .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surf); font-size: 12px; font-weight: 500; }
.pt-rank .n.oro { background: var(--ink); color: var(--surf); }
.pt-rank .q { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pt-rank .q i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.pt-rank .q small { color: var(--muted); font-size: 12px; }
.pt-rank .v { text-align: right; font-variant-numeric: tabular-nums; }
.pt-rank.tu { background: var(--surf); margin: 4px -8px 0; padding: 8px; border-radius: 12px; border-top: 0; }
.pt-falta { margin-top: 10px; }
.pt-falta .barra { height: 10px; border-radius: 999px; background: var(--surf); overflow: hidden; display: flex; }
.pt-falta .barra b { display: block; height: 100%; }
.pt-falta small { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.pt-insignias { display: flex; gap: 8px; margin-top: 10px; }
.pt-insignias span { flex: 1; background: var(--field); border-radius: 12px; padding: 8px 4px; font-size: 12px; text-align: center; line-height: 1.3; }
.pt-insignias span b { display: block; font-weight: 500; font-size: 17px; }
.pt-premio { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.pt-premio .logo { width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: var(--surf); display: grid; place-items: center; font-weight: 500; font-size: 13px; flex: none; }
.pt-premio .dato { min-width: 0; flex: 1; }
.pt-premio b { font-weight: 500; font-size: 14px; display: block; }
.pt-premio small { font-size: 12px; color: var(--muted); display: block; line-height: 1.35; }
.pt-premio a { flex: none; background: var(--ink); color: var(--surf); border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.pt-barrios { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.pt-barrio { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 0 14px; border: 1.5px solid transparent; border-radius: var(--r-sm); background: var(--field); color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.pt-barrio i { width: 16px; height: 16px; border-radius: 5px; flex: none; }
.pt-barrio span { flex: 1; min-width: 0; }
.pt-barrio small { color: var(--muted); font-size: 12px; }
.pt-barrio.on { border-color: var(--ink); }
.pt-barrio:disabled { opacity: .5; cursor: default; }
.pt-acciones { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.pt-acciones .pt-boton.peligro { background: transparent; color: var(--danger); box-shadow: none; min-height: 44px; font-size: 14px; }
.pt-nota { font-size: 12px; color: var(--muted); line-height: 1.45; margin: 12px 0 0; }

/* ── Fase 2: coronas de los parques, ranking, galería y "así terminó la semana" ── */
.pt-corona { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 3px 10px 3px 7px; border-radius: 999px; background: var(--surf); border: 2px solid var(--c, var(--muted2));
  color: var(--ink); font: inherit; font-size: 12px; font-weight: 500; box-shadow: var(--csh); white-space: nowrap; cursor: pointer; position: relative; }
.pt-corona::after { content: ''; position: absolute; inset: -8px; } /* área de toque de 48 px sin agrandar el marcador */
.pt-corona .pt-trazo { width: 16px; height: 16px; color: var(--c, var(--muted2)); }
.pt-cseg { display: inline-flex; align-items: center; gap: 4px; }
.pt-cseg + .pt-cseg { border-left: 1.5px solid var(--line); padding-left: 8px; margin-left: 8px; }
.pt-cseg .pt-trazo { color: var(--c, var(--muted2)); }
/* Selector "A pie / Bici" de la hoja del parque y de la pantalla del cierre */
.pt-seg { display: flex; background: var(--field); border-radius: 999px; padding: 4px; margin-top: 12px; }
.pt-seg button { flex: 1; min-height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.pt-seg button.on { background: var(--surf); color: var(--ink); box-shadow: var(--csh); }
.pt-tarjeta .pt-seg { background: var(--surf); margin: 0 0 6px; }
.pt-tarjeta .pt-seg button.on { background: var(--field); box-shadow: none; }
.pt-rank .v small { display: block; color: var(--muted); font-size: 12px; font-weight: 300; }
.pt-galeria { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pt-galeria span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surf); color: var(--muted); }
.pt-galeria span i { width: 8px; height: 8px; border-radius: 3px; display: block; flex: none; }
.pt-tarjeta .pt-nota { margin-top: 8px; }
.pt-copa-hoja .pt-eq { margin-top: 8px; }
.pt-copa-hoja .pt-eq:first-child { margin-top: 0; }
.pt-copa-hoja .pt-eq .barra { background: var(--surf); }

/* Pasaste el punto N de M, en la pantalla de salida */
.pt-paso { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pt-paso .pts { display: flex; gap: 4px; margin-left: auto; }
.pt-paso .pts i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-size: 12px; font-style: normal; }
.pt-paso .pts i.ok { background: var(--ink); color: var(--surf); }

@media (prefers-reduced-motion: reduce) { .pt-eq .barra b { transition: none; } }

/* ── Fase 3: reportar, cuenta nueva, compartir ── */
.pt-rank.con-rp { grid-template-columns: 26px 1fr auto 36px; }
.pt-rank .pt-rp { width: 36px; min-height: 36px; }
.pt-yo .nueva { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.pt-comp-img { display: block; width: 100%; height: auto; margin: 12px 0 4px; border-radius: 16px; background: var(--field); }
