:root {
  /* Paleta del partido */
  --verde: rgb(80, 185, 72);         /* #50B948 */
  --verde-hoja: rgb(31, 178, 90);    /* #1FB25A */
  --verde-claro: rgb(200, 223, 142); /* #C8DF8E */
  --amarillo: rgb(255, 240, 0);      /* #FFF000 */
  --naranja: rgb(239, 64, 53);       /* #EF4035 */
  --negro: #000;
  --blanco: #fff;

  --fondo: #f4f7f1;
  --superficie: var(--blanco);
  --texto: #111;
  --texto-suave: #5a6158;
  --borde: #d8dfd2;
  --primario: var(--verde-hoja);
  --primario-oscuro: #178a46;        /* verde hoja oscurecido para textos legibles */
  --primario-claro: #eef6dc;
  --peligro: var(--naranja);
  --aviso: #fff4e0;
  --aviso-borde: #f0b45a;
  --sombra: 0 4px 18px rgba(20, 25, 40, .14);
  --radio: 10px;
  --barra: 56px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texto);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--fondo); }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; }
.sub { color: var(--texto-suave); font-size: .85rem; }
.error { color: var(--peligro); margin: 0; font-size: .9rem; }

/* ---------- Botones y formularios ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  border: 1px solid var(--borde); background: var(--superficie); border-radius: 8px;
  padding: .45rem .8rem; cursor: pointer; text-decoration: none; white-space: nowrap; font-size: .9rem;
}
.btn:hover { background: #eef0f4; }
.btn.primario { background: var(--primario); border-color: var(--primario); color: #fff; font-weight: 700; }
.btn.primario:hover { filter: brightness(1.1); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.pequeno { padding: .25rem .6rem; font-size: .82rem; }
.btn.peligro { color: var(--peligro); }

label { display: flex; flex-direction: column; gap: .25rem; font-size: .82rem; color: var(--texto-suave); }
label.chk, .menu label { flex-direction: row; align-items: center; gap: .45rem; color: var(--texto); font-size: .9rem; }
input:not([type=checkbox]), select, textarea {
  border: 1px solid var(--borde); border-radius: 7px; padding: .45rem .55rem; background: #fff;
  font-size: .95rem; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primario); outline-offset: -1px; }
textarea { resize: vertical; }

/* ---------- Login ---------- */
.pantalla-login {
  position: fixed; inset: 0; display: grid; place-items: center; padding: 16px;
  background: linear-gradient(135deg, var(--verde) 0%, var(--verde-hoja) 55%, #0f5c2f 100%);
}
.tarjeta-login {
  background: var(--superficie); padding: 2rem; border-radius: 14px; width: min(360px, 100%);
  display: flex; flex-direction: column; gap: .9rem; box-shadow: var(--sombra);
}
.tarjeta-login { border-top: 6px solid var(--amarillo); }
.tarjeta-login h1 { color: var(--primario-oscuro); }
.tarjeta-login .sub { margin: -0.6rem 0 .4rem; }

/* ---------- Barra superior ---------- */
#app { height: 100%; display: flex; flex-direction: column; }
.barra {
  height: var(--barra); flex: none; display: flex; align-items: center; gap: .6rem; padding: 0 .75rem;
  background: var(--superficie); position: relative; z-index: 20;
  border-bottom: 4px solid var(--verde-hoja);
}
.marca { font-weight: 800; color: var(--primario-oscuro); white-space: nowrap; }
.buscador { position: relative; flex: 1; max-width: 420px; }
.resultados {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--superficie);
  border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra);
  max-height: 60vh; overflow: auto; z-index: 30;
}
.resultados button {
  display: block; width: 100%; text-align: left; border: 0; background: none; padding: .55rem .8rem;
  cursor: pointer; border-bottom: 1px solid #f0f1f4;
}
.resultados button:hover, .resultados button.sel { background: var(--primario-claro); }
.resultados .vacio { padding: .7rem .8rem; color: var(--texto-suave); }
.resultados small { color: var(--texto-suave); margin-left: .4rem; }

.segmentado { display: inline-flex; border: 1px solid var(--borde); border-radius: 8px; overflow: hidden; flex: none; }
.segmentado button { border: 0; background: var(--superficie); padding: .45rem .8rem; cursor: pointer; font-size: .9rem; }
.segmentado button.activo { background: var(--primario); color: #fff; font-weight: 700; }

.desplegable { position: relative; flex: none; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); background: var(--superficie); min-width: 220px;
  border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); padding: .4rem; z-index: 30;
  display: flex; flex-direction: column;
}
.menu > button { border: 0; background: none; text-align: left; padding: .55rem .7rem; border-radius: 6px; cursor: pointer; }
.menu > button:hover { background: #f0f1f4; }
.panel-capas { padding: .7rem .9rem; gap: .45rem; width: 270px; max-height: calc(100vh - 80px); overflow: auto; }
.panel-capas h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-suave); margin-top: .5rem; }
.panel-capas h4:first-child { margin-top: 0; }
.panel-capas label.fila { flex-direction: row; align-items: center; justify-content: space-between; color: var(--texto); font-size: .9rem; }
.panel-capas label.fila select { width: 150px; }
.contador { margin: .3rem 0 0; font-size: .82rem; color: var(--texto-suave); }
.usuario { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
body:not(.es-admin) .solo-admin { display: none !important; }
body:not(.es-estructura) .solo-estructura { display: none !important; }

/* ---------- Mapa ---------- */
.contenido { flex: 1; position: relative; min-height: 0; isolation: isolate; /* Google Maps usa z-index enormes */ }
#mapa { position: absolute; inset: 0; z-index: 0; /* Street View queda debajo del panel del lote */ }
.leyenda {
  position: absolute; left: 10px; bottom: 26px; background: rgba(255,255,255,.95); border-radius: var(--radio);
  box-shadow: var(--sombra); padding: .55rem .75rem; font-size: .8rem; z-index: 5; display: flex; flex-direction: column; gap: .25rem;
}
.leyenda strong { font-size: .75rem; text-transform: uppercase; color: var(--texto-suave); }
.leyenda span { display: flex; align-items: center; gap: .45rem; }
.leyenda i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #333; display: inline-block; }
.aviso-mapa {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 6; max-width: 90%;
  background: var(--aviso); border: 1px solid var(--aviso-borde); padding: .5rem .8rem; border-radius: 8px; font-size: .85rem;
}

/* ---------- Panel del lote ---------- */
.panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100%; z-index: 10;
  background: var(--superficie); box-shadow: var(--sombra); display: flex; flex-direction: column;
}
.panel-cabecera { display: flex; justify-content: space-between; align-items: flex-start; padding: .9rem 1rem .4rem; }
.panel-cabecera h2 { font-size: 1.2rem; }
.cerrar { border: 0; background: none; font-size: 1.7rem; line-height: 1; cursor: pointer; color: var(--texto-suave); padding: 0 .2rem; }
.panel-acciones { display: flex; gap: .4rem; padding: .3rem 1rem .7rem; border-bottom: 1px solid var(--borde); flex-wrap: wrap; }
.panel-cuerpo { overflow-y: auto; padding: .8rem 1rem 1.5rem; display: flex; flex-direction: column; gap: 1.1rem; }
#form-lote { display: flex; flex-direction: column; gap: .7rem; }
.rejilla2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.rejilla4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.visita { display: flex; flex-direction: column; justify-content: flex-end; gap: .3rem; }
.ubicacion { border: 1px solid var(--borde); border-radius: var(--radio); padding: .4rem .7rem .7rem; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.ubicacion legend { font-size: .78rem; color: var(--texto-suave); padding: 0 .3rem; }
.ubicacion input:disabled { background: #f4f5f7; color: var(--texto); font-weight: 600; border-color: transparent; padding-left: .2rem; }
.ayuda { margin: 0; font-size: .78rem; color: var(--texto-suave); }
.alerta { background: var(--aviso); border: 1px solid var(--aviso-borde); border-radius: 8px; padding: .55rem .7rem; font-size: .85rem; }
.guardar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; position: sticky; bottom: -1.5rem; background: var(--superficie); padding: .5rem 0; }
.titulo-seccion { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
section h3 { font-size: .95rem; margin-bottom: .5rem; }
.titulo-seccion h3 { margin: 0; }
.titulo-seccion label.btn { flex-direction: row; color: var(--texto); }
.fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.fotos figure { margin: 0; position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #eee; }
.fotos img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.fotos button { position: absolute; top: 4px; right: 4px; border: 0; border-radius: 50%; width: 24px; height: 24px; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
.fotos .vacio, .historial .vacio { grid-column: 1 / -1; color: var(--texto-suave); font-size: .85rem; }
.historial { list-style: none; margin: 0; padding: 0; font-size: .82rem; display: flex; flex-direction: column; gap: .5rem; }
.historial li { border-left: 3px solid var(--borde); padding-left: .6rem; }
.historial .quien { color: var(--texto-suave); }

/* ---------- Diálogos ---------- */
.dialogo { border: 0; border-radius: 14px; padding: 0; width: min(420px, calc(100vw - 32px)); box-shadow: var(--sombra); }
.dialogo.ancho { width: min(900px, calc(100vw - 32px)); }
.dialogo::backdrop { background: rgba(10, 12, 20, .45); }
.dlg-cabecera { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem .5rem; }
.dlg-cuerpo > * { flex-shrink: 0; }
.dlg-cuerpo { padding: .5rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .8rem; max-height: 75vh; overflow: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tabla th, .tabla td { padding: .4rem .5rem; border-bottom: 1px solid #eceef2; text-align: left; white-space: nowrap; }
.tabla th { color: var(--texto-suave); font-weight: 600; font-size: .75rem; text-transform: uppercase; }
.tabla td.num, .tabla th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tabla-scroll { overflow-x: auto; }
.tabla .fila-total td { font-weight: 800; border-top: 2px solid var(--texto); background: var(--primario-claro); }
.rejilla-usuario { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; align-items: end; }
.rejilla-usuario .chk { grid-column: span 2; }
.rejilla-usuario button { grid-column: 4; }
.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; }
.tarjeta { background: var(--fondo); border-radius: var(--radio); padding: .7rem .9rem; border-left: 4px solid var(--verde-claro); }
.tarjeta b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.tarjeta span { color: var(--texto-suave); font-size: .8rem; }
.barra-progreso { height: 8px; background: #e6e8ee; border-radius: 4px; overflow: hidden; min-width: 80px; }
.barra-progreso div { height: 100%; background: var(--verde); }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1d2330; color: #fff;
  padding: .65rem 1rem; border-radius: 8px; box-shadow: var(--sombra); z-index: 100; font-size: .9rem; max-width: calc(100vw - 32px);
}
.toast.error { background: var(--peligro); }

/* Lienzo con capas, lotes y etiquetas (lo posiciona app.js) */
.lienzo-mapa { position: absolute; pointer-events: none; }
.control-mapa {
  margin: 10px; padding: .5rem .8rem; border: 0; border-radius: 8px; background: #fff; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.3); font: 600 .85rem system-ui, sans-serif; color: var(--primario-oscuro);
}
.control-mapa:hover { background: var(--primario-claro); }
/* Botones del mapa en una columna, todos del mismo ancho y con la misma separación */
.grupo-controles { margin: 10px; width: 170px; display: flex; flex-direction: column; gap: 8px; }
.grupo-controles .control-mapa {
  margin: 0; width: 100%; height: 40px; display: flex; align-items: center; justify-content: center; gap: .35rem;
  font-size: .9rem;
}
.salir-sv { background: var(--primario); color: #fff; font-size: .95rem; padding: .6rem 1.1rem; }
.salir-sv:hover { background: var(--primario-oscuro); }
.chip-seccion {
  margin: 10px; /* es un control del mapa (centrado arriba) */
  font: 800 .95rem system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex; align-items: center; gap: .6rem; padding: .35rem .4rem .35rem .9rem;
  background: var(--naranja); color: #fff; border-radius: 999px; box-shadow: var(--sombra); font-weight: 800;
}
.chip-seccion button {
  border: 0; border-radius: 999px; background: rgba(255,255,255,.95); color: var(--negro);
  padding: .3rem .7rem; font: 700 .85rem system-ui, sans-serif; cursor: pointer;
}
.titulo-mapa {
  /* El tamaño crece con el ancho de la pantalla (proporcional), con mínimo y máximo */
  margin-top: 12px; padding: .15em .6em .2em; pointer-events: none; user-select: none;
  font: 900 clamp(2rem, 3.6vw, 3.6rem)/1.1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: .08em;
  color: var(--primario-oscuro); background: rgba(255,255,255,.9); border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12); position: relative; overflow: hidden;
}
.titulo-mapa::after {
  /* Franja en proporción áurea: verde = φ·amarillo, amarillo = φ·rojo (φ ≈ 1.618)
     → verde 50 %, amarillo 30.9017 %, rojo 19.0983 % */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: .14em;
  background: linear-gradient(90deg, var(--verde-hoja) 0 50%, var(--amarillo) 50% 80.9017%, var(--naranja) 80.9017% 100%);
}
body.modo-agregar .titulo-mapa, body.modo-poligonos .titulo-mapa { display: none; }
.control-etiquetas {
  margin: 0 10px 10px; display: flex; align-items: center; gap: .3rem; padding: .3rem .35rem .3rem .6rem;
  background: #fff; border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,.3); font: 600 .82rem system-ui, sans-serif;
}
.ce-titulo { color: var(--texto-suave); margin-right: .15rem; }
.control-etiquetas button {
  border: 1px solid var(--borde); background: #fff; color: var(--texto); border-radius: 999px;
  padding: .25rem .65rem; font: 700 .8rem system-ui, sans-serif; cursor: pointer;
}
.control-etiquetas button[aria-pressed="true"] { background: var(--primario); border-color: var(--primario); color: #fff; }
body.modo-agregar .control-etiquetas { display: none; }
.grupo-estructura { display: flex; flex-direction: column; gap: .3rem; border-top: 1px solid var(--borde); padding-top: .4rem; margin-top: .2rem; }
.sub-estructura { display: flex; flex-direction: column; gap: .25rem; padding-left: 1.4rem; }
.sub-estructura label:nth-child(1) { color: #7B1FA2; }
.sub-estructura label:nth-child(2) { color: #1565C0; }
.sub-estructura label:nth-child(3) { color: #00838F; }
.leyenda-estructura { display: flex; flex-wrap: wrap; gap: .5rem; }
.leyenda-estructura span { display: inline-flex; align-items: center; gap: .25rem; }
.icono-leyenda { width: 16px; height: 16px; }
.ficha-estructura { font: 13px system-ui, sans-serif; width: 240px; display: flex; flex-direction: column; gap: .3rem; }
.ficha-foto { width: 100%; max-height: 260px; object-fit: cover; border-radius: 8px; background: #eee; }
.ficha-sin-foto { height: 70px; display: grid; place-items: center; background: #f1f1f1; border-radius: 8px; color: #777; }
.ficha-cargo { align-self: flex-start; color: #fff; font-weight: 800; border-radius: 999px; padding: .1rem .6rem; font-size: .75rem; }
.ficha-nombre { font-weight: 800; font-size: 15px; }
.ficha-botones { display: flex; flex-wrap: wrap; gap: .3rem; }
.ficha-sv { width: 100%; margin-top: .25rem; padding: .5rem; font-size: .88rem; }
.ficha-sv:focus:not(:focus-visible) { outline: none; } /* Google enfoca el botón al abrir la ficha */
.ficha-ayuda { font-size: .75rem; color: #777; text-align: center; line-height: 1.3; }
.ficha-dato { color: #444; }
.ficha-ok { color: #1b7a3d; }
.ficha-sin { color: #777; }
.ficha-alerta { color: #c22a20; font-weight: 700; }
.lista-estructura { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.lista-estructura li { display: flex; gap: .55rem; align-items: center; cursor: pointer; border: 1px solid var(--borde); border-radius: 8px; padding: .35rem; }
.lista-estructura li:hover { background: var(--primario-claro); }
.lista-estructura img, .lista-estructura .sin-foto { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; flex: none; display: grid; place-items: center; background: #eee; }
/* ---------- Configuración (panel a un lado, para ver el mapa mientras se ajusta) ---------- */
.dialogo.lateral { position: fixed; inset: 70px 16px auto auto; margin: 0; width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 90px); display: none; flex-direction: column; }
.dialogo.lateral[open] { display: flex; }
.cf-pestanas { display: flex; gap: .3rem; padding: 0 1.2rem .5rem; }
.cf-pestanas button { border: 1px solid var(--borde); background: #fff; border-radius: 8px; padding: .35rem .7rem; font-weight: 700; cursor: pointer; color: var(--texto-suave); }
.cf-pestanas button.activo { background: var(--primario); border-color: var(--primario); color: #fff; }
.cf-cuerpo { overflow-y: auto; max-height: none; flex: 1; }
.cf-grupo { border: 1px solid var(--borde); border-radius: var(--radio); padding: .55rem .7rem; display: flex; flex-direction: column; gap: .45rem; }
.cf-grupo h4 { font-size: .85rem; color: var(--primario-oscuro); }
.cf-fila { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .5rem; font-size: .85rem; color: var(--texto); }
.cf-fila input[type=color] { width: 44px; height: 28px; padding: 0; border: 1px solid var(--borde); border-radius: 6px; background: none; }
.cf-fila input[type=range] { width: 140px; accent-color: var(--primario); }
.cf-fila select { width: 140px; }
.cf-fila .cf-valor { font-size: .75rem; color: var(--texto-suave); margin-left: .3rem; min-width: 2.5em; display: inline-block; }
.cf-pie { display: flex; flex-wrap: wrap; gap: .4rem; padding: .7rem 1.2rem 1rem; border-top: 1px solid var(--borde); align-items: center; justify-content: flex-end; }
.cf-espacio { flex: 1; }

/* ---------- Estructura · Street View ---------- */
.dialogo.extra-ancho { width: min(1200px, calc(100vw - 24px)); height: min(820px, calc(100vh - 40px)); }
.dialogo.extra-ancho[open] { display: flex; flex-direction: column; }
.esv { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px 1fr; gap: .8rem; padding: 0 1.2rem 1.2rem; }
.esv-lista { display: flex; flex-direction: column; min-height: 0; gap: .4rem; }
.esv-filtros { display: grid; gap: .35rem; }
.esv-items { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: .25rem; }
.esv-items li { display: flex; align-items: center; gap: .5rem; padding: .35rem .45rem; border-radius: 8px; cursor: pointer; border: 1px solid transparent; font-size: .85rem; }
.esv-items li:hover { background: var(--primario-claro); }
.esv-items li.activo { border-color: var(--primario); background: var(--primario-claro); }
.esv-items img, .esv-items .sin-foto { width: 38px; height: 38px; object-fit: cover; border-radius: 6px; flex: none; background: #eee; display: grid; place-items: center; }
.esv-items small { color: var(--texto-suave); }
.esv-detalle { display: flex; flex-direction: column; min-height: 0; gap: .6rem; }
.esv-cabecera { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; flex-wrap: wrap; }
.esv-info { font-size: .9rem; }
.esv-info .nombre { font-size: 1.15rem; font-weight: 800; }
.esv-nav { display: flex; gap: .4rem; flex-wrap: wrap; }
.esv-vistas { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: .6rem; }
.esv-izq { display: grid; grid-template-rows: 2fr 3fr; gap: .6rem; min-height: 0; }
.esv-foto { background: #f1f1f1; border-radius: var(--radio); overflow: hidden; display: grid; place-items: center; color: var(--texto-suave); min-height: 0; }
.esv-mapita { position: relative; border-radius: var(--radio); overflow: hidden; background: #ddd; min-height: 160px; }
#esv-mapita { position: absolute; inset: 0; }
.esv-mover { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; background: var(--fondo); border-radius: 8px; padding: .4rem .6rem; }
.esv-mover.cambiado { background: var(--aviso); border: 1px solid var(--aviso-borde); }
.esv-foto img { width: 100%; height: 100%; object-fit: contain; background: #111; }
.esv-pano { position: relative; border-radius: var(--radio); overflow: hidden; background: #1d2330; min-height: 300px; }
#esv-pano { position: absolute; inset: 0; }
@media (max-width: 760px) {
  .esv { grid-template-columns: 1fr; grid-template-rows: 220px 1fr; }
  .esv-vistas { grid-template-columns: 1fr; grid-template-rows: 260px 1fr; }
  .esv-izq { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
}
.tooltip-mapa {
  position: absolute; z-index: 7; pointer-events: none; background: rgba(17,17,17,.88); color: #fff;
  padding: .25rem .5rem; border-radius: 6px; font-size: .8rem; white-space: nowrap;
}

/* ---------- Edificios y votantes ---------- */
.edificio { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap;
  background: var(--fondo); border-radius: 8px; padding: .5rem .7rem; }
.edificio .fila-depto { flex-direction: row; align-items: center; gap: .5rem; color: var(--texto); }
.edificio .fila-depto input { width: 90px; }
.contador-chip { display: inline-block; min-width: 1.6em; padding: 0 .4em; border-radius: 999px; text-align: center;
  background: var(--verde-claro); color: var(--negro); font-size: .8rem; margin-left: .3rem; }
.votantes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.votantes li { border: 1px solid var(--borde); border-radius: 8px; padding: .5rem .6rem; display: flex; gap: .5rem; align-items: flex-start; }
.votantes .info { flex: 1; min-width: 0; font-size: .85rem; }
.votantes .nombre { font-weight: 700; font-size: .92rem; }
.votantes .depto { display: inline-block; background: var(--fondo); border-radius: 4px; padding: 0 .35rem; margin-right: .3rem; font-size: .78rem; font-weight: 700; }
.votantes .detalle { color: var(--texto-suave); }
.votantes .notas { color: var(--texto-suave); font-style: italic; overflow-wrap: anywhere; }
.votantes .acciones { display: flex; gap: .25rem; flex: none; }
.votantes .vacio { border: 0; color: var(--texto-suave); font-size: .85rem; padding: 0; }
.punto-postura { display: inline-block; width: .7em; height: .7em; border-radius: 50%; border: 1px solid #333; margin-right: .25rem; vertical-align: middle; }
.leyenda .formas { border-top: 1px solid var(--borde); padding-top: .25rem; margin-top: .1rem; color: var(--texto-suave); }

/* ---------- Lista de secciones (derecha) ---------- */
.lista-secciones {
  position: absolute; top: 0; right: 0; bottom: 0; width: 300px; z-index: 4; display: none; flex-direction: column;
  background: var(--superficie); border-left: 1px solid var(--borde); box-shadow: -2px 0 10px rgba(0,0,0,.06);
}
body.secciones-abiertas .lista-secciones { display: flex; }
body.secciones-abiertas #mapa { right: 300px; }
body.secciones-abiertas .ls-abrir { display: none; }
.ls-cabecera { display: flex; justify-content: space-between; align-items: center; padding: .7rem .8rem .3rem; }
.ls-cabecera h3 { font-size: 1rem; color: var(--primario-oscuro); }
.ls-pestanas { display: inline-flex; border: 1px solid var(--borde); border-radius: 8px; overflow: hidden; }
.ls-pestanas button { border: 0; background: #fff; padding: .35rem .8rem; font-weight: 700; cursor: pointer; color: var(--texto-suave); }
.ls-pestanas button.activo { background: var(--primario); color: #fff; }
.ls-filtros { display: flex; flex-direction: column; gap: .4rem; padding: 0 .8rem .6rem; border-bottom: 1px solid var(--borde); }
.ls-items { overflow-y: auto; flex: 1; padding: .4rem; display: flex; flex-direction: column; gap: .25rem; }
.ls-item {
  display: block; width: 100%; text-align: left; border: 1px solid transparent; background: none; border-radius: 8px;
  padding: .45rem .6rem; cursor: pointer;
}
.ls-item:hover { background: var(--primario-claro); }
.ls-item.activa { background: var(--naranja); color: #fff; border-color: var(--naranja); }
.ls-item.activa .ls-detalle { color: rgba(255,255,255,.9); }
.ls-item.activa .barra-progreso { background: rgba(255,255,255,.35); }
.ls-item.activa .barra-progreso div { background: #fff; }
.ls-item.vacia { opacity: .55; }
.ls-item b { display: block; font-size: .92rem; }
.ls-coord { display: block; font-size: .74rem; font-weight: 600; color: var(--primario-oscuro); margin-top: .05rem; }
.ls-item.activa .ls-coord { color: #fff; }
.tabla-coord input { min-width: 0; }
.tabla-coord td:first-child { width: 40%; }
.tabla-coord td { white-space: normal; }
.tabla-coord td.acciones-tabla { white-space: nowrap; width: 1%; }
.rejilla-coord { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: .5rem; align-items: end; }
.filtros-bitacora { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; align-items: end; }
.filtros-bitacora .fb-texto { grid-column: span 2; }
.filtros-bitacora .ag-botones { grid-column: span 2; }
.tabla-bitacora td { white-space: normal; vertical-align: top; }
.tabla-bitacora td:first-child { white-space: nowrap; color: var(--texto-suave); }
.tabla-bitacora .accion { font-weight: 700; white-space: nowrap; }
.tabla-bitacora .accion.peligro { color: var(--peligro); }
.ls-detalle { display: block; font-size: .76rem; color: var(--texto-suave); margin: .1rem 0 .25rem; }
.ls-item .barra-progreso { height: 5px; min-width: 0; }
.ls-todo { border-color: var(--borde); font-weight: 700; color: var(--primario-oscuro); }
.ls-vacio { color: var(--texto-suave); font-size: .85rem; padding: .5rem; }
.ls-abrir {
  position: absolute; right: 0; top: 45%; z-index: 4; border: 0; border-radius: 8px 0 0 8px; cursor: pointer;
  background: var(--primario); color: #fff; font-weight: 700; padding: .55rem .7rem; box-shadow: var(--sombra);
}
body.modo-agregar .lista-secciones, body.modo-agregar .ls-abrir { display: none !important; }

/* Una sola salida a la vez: en Street View solo queda «Salir de Street View» */
body.en-streetview #leyenda, body.en-streetview .ls-abrir, body.en-streetview #tooltip-mapa { display: none !important; }
/* En computadora el mapa termina donde empieza el panel del lote (no queda debajo) */
@media (min-width: 761px) {
  body.panel-abierto #mapa { right: 420px; }
  body.panel-abierto .ls-abrir { display: none; }
}

/* ---------- Edición de polígonos ---------- */
.tarjeta-poligonos { display: none; }
body.modo-poligonos .tarjeta-poligonos {
  display: flex; flex-direction: column; gap: .5rem; position: absolute; z-index: 8; left: 10px; top: 10px;
  width: min(380px, calc(100% - 20px)); background: var(--superficie); border-radius: var(--radio);
  box-shadow: var(--sombra); padding: .8rem .9rem; border-top: 5px solid var(--naranja);
}
.pg-botones { flex-wrap: wrap; }
.pg-restaurar { background: var(--aviso); border: 1px solid var(--aviso-borde); border-radius: 8px; padding: .45rem .6rem; display: flex; flex-direction: column; gap: .35rem; }
.pg-restaurar .ag-botones { justify-content: flex-start; }
body.modo-poligonos #mapa { right: 0 !important; }
body.modo-poligonos #panel, body.modo-poligonos .lista-secciones, body.modo-poligonos .ls-abrir,
body.modo-poligonos #chip-seccion, body.modo-poligonos .boton-agregar, body.modo-poligonos .boton-poligonos { display: none !important; }
.boton-poligonos { color: var(--naranja); }
.boton-estructura { color: #7b1fa2; }
.etq-permiso { color: #7b1fa2; font-weight: 700; }
.ag-persona { display: flex; flex-direction: column; gap: .4rem; }
.tarjeta-agregar > *, .ag-persona > * { flex-shrink: 0; } /* que se deslice en lugar de encogerse y cortarse */
.per-prev { flex: none; width: 100%; height: 180px; object-fit: contain; background: #1d2330; border-radius: 8px; }
.per-cargos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem; }
.per-cargos label { display: block; margin: 0; position: relative; min-width: 0; }
.per-cargos input { position: absolute; inset: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.per-cargos span {
  display: block; text-align: center; padding: .45rem .2rem; border: 2px solid var(--borde, #d0d5dd); border-radius: 8px;
  font-weight: 700; font-size: .85rem; cursor: pointer; user-select: none;
}
.per-cargos input:checked + span { border-color: var(--primario); background: var(--primario); color: #fff; }
.per-cargos input:focus-visible + span { outline: 2px solid var(--amarillo); outline-offset: 1px; }
.per-acciones { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
body.modo-registro .ag-coords { display: none; }
.per-paso { display: flex; align-items: center; gap: .45rem; font-weight: 800; font-size: .9rem; color: var(--primario-oscuro, #1b5e20); margin-top: .3rem; }
.per-paso span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--primario); color: #fff; font-size: .8rem; }
.per-ubicacion { display: flex; flex-direction: column; gap: .4rem; background: #eef4fd; border: 1px solid #c6dafc; border-radius: 10px; padding: .5rem .6rem; }
.per-ubic-estado { margin: 0; font-size: .85rem; line-height: 1.3; }
.per-ubic-estado.ok { color: #1b5e20; }
.per-ubic-estado.aviso { color: #8a5a00; }
.per-ubic-botones { display: grid; grid-template-columns: 1fr; gap: .35rem; }
.per-ubic-botones .btn { padding: .55rem .4rem; font-weight: 700; justify-content: center; }
.per-ver-calle { display: none !important; }
.per-fuera { display: flex; flex-direction: column; gap: .35rem; background: var(--aviso, #fff4d6); border: 1px solid var(--aviso-borde, #e8c36a); border-radius: 10px; padding: .5rem .6rem; font-size: .85rem; line-height: 1.3; }
.per-fuera[hidden] { display: none; }
.per-fuera b { color: #8a4b00; }
.per-fuera textarea { width: 100%; resize: vertical; font: inherit; }
.marca-fuera { display: inline-block; background: #fff1d6; color: #8a4b00; border: 1px solid #e8c36a; border-radius: 4px; padding: 0 .35rem; font-size: .75rem; font-weight: 700; }
.ficha-fuera { background: #fff4d6; border: 1px solid #e8c36a; border-radius: 6px; padding: .3rem .45rem; font-size: .82rem; color: #6b3d00; }
.per-boton { display: flex; align-items: center; justify-content: center; text-align: center; font-size: .82rem; cursor: pointer; margin: 0; white-space: nowrap; }
.per-gps { background: #1a73e8; border-color: #1a73e8; color: #fff; font-weight: 700; }
.per-gps.esperando { animation: gps-parpadeo 1s ease-in-out infinite; }
@keyframes gps-parpadeo { 50% { opacity: .55; } }
body.modo-agregar .boton-estructura { display: none; }

/* ---------- Usuario de solo registro: sin lotes ni herramientas de análisis ---------- */
.solo-registro-ver, .boton-mis-registros { display: none !important; }
body.solo-registro .solo-registro-ver { display: block !important; }
body.solo-registro .boton-mis-registros { display: flex !important; }
body.solo-registro .no-solo-registro, body.solo-registro .buscador, body.solo-registro [data-abre="menu-capas"],
body.solo-registro .lista-secciones, body.solo-registro .ls-abrir, body.solo-registro #leyenda { display: none !important; }
body.solo-registro #mapa { right: 0 !important; }
body.solo-registro.modo-agregar #mapa { right: 50% !important; }
.mr-filtros { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.mr-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; max-height: 60vh; overflow-y: auto; }
.mr-lista li { display: grid; grid-template-columns: 52px 1fr auto; gap: .6rem; align-items: center; padding: .45rem; border: 1px solid var(--borde); border-radius: 8px; cursor: pointer; }
.mr-borrar { min-width: 40px; min-height: 40px; font-size: 1.05rem; border-color: #e5a5a5 !important; background: #fdeeee !important; }
.mr-lista li:hover { background: var(--fondo, #f4f6f1); }
.mr-lista img, .mr-sin-foto { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; background: #e8ebe4; display: grid; place-items: center; font-size: 1.3rem; }
.mr-nombre { font-weight: 700; }
.mr-dato { font-size: .82rem; color: #555; }
.mr-cargo { display: inline-block; color: #fff; border-radius: 4px; padding: 0 .35rem; font-size: .75rem; font-weight: 700; margin-right: .3rem; }

/* ---------- Agregar lote (pantalla dividida mapa / Street View) ---------- */
.sv-agregar, .tarjeta-agregar { display: none; }
body.modo-agregar #mapa { right: 50%; }
body.modo-agregar .sv-agregar {
  display: block; position: absolute; top: 0; right: 0; bottom: 0; width: 50%;
  border-left: 4px solid var(--amarillo); background: #1d2330;
}
#sv-pano { position: absolute; inset: 0; }
.sv-vacio {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 2rem; text-align: center;
  color: #fff; font-size: 1rem; background: #1d2330;
}
body.modo-agregar .tarjeta-agregar {
  display: flex; flex-direction: column; gap: .5rem; position: absolute; z-index: 8; left: 10px; bottom: 26px;
  width: min(340px, calc(50% - 20px)); background: var(--superficie); border-radius: var(--radio);
  box-shadow: var(--sombra); padding: .8rem .9rem; border-top: 5px solid var(--primario);
  max-height: calc(100% - 40px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
}
body.modo-agregar #panel, body.modo-agregar #leyenda, body.modo-agregar #chip-seccion { display: none !important; }
body.modo-agregar .boton-agregar { display: none; }
.ag-cabecera { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.rejilla3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.ag-botones { display: flex; justify-content: flex-end; gap: .5rem; }
.boton-agregar { background: var(--primario); color: #fff; }
.boton-agregar:hover { background: var(--primario-oscuro); }

/* ---------- Celular ---------- */
@media (max-width: 760px) {
  :root { --barra: auto; }
  .barra { flex-wrap: wrap; padding: .5rem 16px; row-gap: .5rem; }
  .marca { font-size: .95rem; }
  .buscador { order: 10; flex-basis: 100%; max-width: none; }
  .segmentado button, .btn { padding: .4rem .6rem; }
  .barra { justify-content: space-between; }
  .marca { display: none; }
  .usuario #nombre-usuario { display: none; }
  .usuario::before { content: "☰"; font-size: 1.1rem; }
  .menu { position: fixed; left: 16px; right: 16px; top: auto; width: auto; }
  .panel-capas { width: auto; max-height: 70vh; }
  .panel { top: auto; height: 68%; width: 100%; border-radius: 14px 14px 0 0; }
  .leyenda { bottom: 26px; font-size: .72rem; padding: .4rem .55rem; }
  .rejilla-usuario { grid-template-columns: 1fr 1fr; }
  .rejilla-coord { grid-template-columns: 1fr; }
  .filtros-bitacora { grid-template-columns: 1fr 1fr; }
  body.secciones-abiertas #mapa { right: 0; }
  .txt-control { display: none; }
  .control-etiquetas { margin: 0 8px 8px; padding: .2rem .25rem .2rem .45rem; }
  .ce-titulo { display: none; }
  .control-etiquetas button { padding: .2rem .5rem; }
  .titulo-mapa { font-size: clamp(1.3rem, 7vw, 1.8rem); margin-top: 60px; }
  .control-mapa { padding: .5rem .75rem; font-size: 1rem; }
  .grupo-controles { width: 44px; margin: 8px; }
  .grupo-controles .control-mapa { height: 44px; padding: 0; font-size: 1.15rem; }
  .chip-seccion { font-size: .85rem; padding: .3rem .35rem .3rem .75rem; }
  .lista-secciones { width: min(300px, 85%); z-index: 9; box-shadow: var(--sombra); }
  .ls-abrir { top: auto; bottom: 120px; }
  body.modo-agregar #mapa { right: 0; bottom: 45%; }
  body.modo-agregar .sv-agregar { top: 55%; width: 100%; border-left: 0; border-top: 4px solid var(--amarillo); }
  body.modo-agregar .tarjeta-agregar { left: 8px; right: 60px; bottom: calc(45% + 8px); width: auto; padding: .55rem .65rem; gap: .3rem; }
  body.modo-agregar .tarjeta-agregar .ayuda { display: none; }
  /* Registro de estructura en el celular: mapa arriba, formulario abajo, sin Street View */
  body.modo-registro #mapa, body.solo-registro.modo-registro #mapa { bottom: 52%; }
  body.solo-registro.modo-registro #mapa { right: 0 !important; }
  body.modo-registro .sv-agregar { display: none; }
  body.modo-registro .tarjeta-agregar {
    left: 0; right: 0; bottom: 0; top: 48%; border-radius: 14px 14px 0 0; overflow-y: auto; padding: .6rem 16px;
  }
  body.modo-registro .tarjeta-agregar input, body.modo-registro .tarjeta-agregar select { font-size: 16px; } /* evita el zoom de iOS */
  body.modo-registro .per-boton { padding: .55rem .3rem; }
  body.modo-registro .per-ubic-botones { grid-template-columns: 1.2fr 1fr; }
  body.modo-registro .per-ver-calle { display: flex !important; }
  /* «Ver la calle»: el Street View ocupa el lugar del mapa */
  body.modo-registro.ver-calle .sv-agregar { display: block; top: 0; bottom: 52%; height: auto; width: 100%; border: 0; border-bottom: 4px solid var(--amarillo); z-index: 6; }
  body.modo-registro #ag-titulo { font-size: 1rem; white-space: nowrap; }
  body.modo-registro .ag-botones {
    position: sticky; bottom: -.6rem; margin: 0 -16px -.6rem; padding: .45rem 16px .6rem;
    background: var(--superficie); border-top: 1px solid var(--borde);
  }
  body.modo-registro .ag-botones .btn { flex: 1; padding: .6rem; }
}

/* ---------- Celular: diálogos, tablas, leyenda y Street View de estructura ---------- */
.leyenda.plegable strong { cursor: pointer; user-select: none; }
.leyenda.plegable strong::after { content: " ▾"; }
.leyenda.plegada strong::after { content: " ▸"; }
.leyenda.plegada > :not(strong) { display: none !important; }
@media (max-width: 760px) {
  /* Los diálogos ocupan todo el ancho y salen desde abajo; los grandes, toda la pantalla */
  .dialogo, .dialogo.ancho, .dialogo.extra-ancho {
    width: 100vw; max-width: 100vw; max-height: 100dvh; margin: auto 0 0; border-radius: 14px 14px 0 0;
  }
  .dialogo[open] { display: flex; flex-direction: column; }
  .dialogo.ancho, .dialogo.extra-ancho { height: 100dvh; border-radius: 0; }
  .dlg-cabecera { padding: .8rem 16px .4rem; }
  .dlg-cabecera h2 { font-size: 1.2rem; }
  .dlg-cuerpo { max-height: none; flex: 1; min-height: 0; padding: .4rem 16px 1.2rem; }
  .dialogo .cerrar { min-width: 40px; min-height: 40px; }
  /* Configuración: hoja abajo para seguir viendo el mapa arriba */
  .dialogo.lateral { inset: auto 0 0 0; width: 100vw; max-width: 100vw; max-height: 60dvh; border-radius: 14px 14px 0 0; }

  /* Tablas anchas: se deslizan de lado dentro del diálogo */
  .dialogo .tabla:not(#tabla-usuarios):not(#tabla-bitacora) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Usuarios como tarjetas */
  #tabla-usuarios, #tabla-usuarios tbody { display: block; }
  #tabla-usuarios tr:first-child { display: none; }
  #tabla-usuarios tr { display: grid; grid-template-columns: 1fr auto; gap: .15rem .6rem; padding: .6rem 0; border-bottom: 1px solid var(--borde); }
  #tabla-usuarios td { border: 0; padding: 0; white-space: normal; }
  #tabla-usuarios td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 800; }
  #tabla-usuarios td:nth-child(2) { grid-column: 1; grid-row: 2; color: var(--texto-suave); }
  #tabla-usuarios td:nth-child(3) { grid-column: 2; grid-row: 1; }
  #tabla-usuarios td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; font-size: .8rem; }
  #tabla-usuarios td:nth-child(5) { grid-column: 1 / -1; grid-row: 3; display: flex; gap: .4rem; margin-top: .3rem; }
  #tabla-usuarios td:nth-child(5) .btn { flex: 1; }
  .rejilla-usuario { grid-template-columns: 1fr; }
  .rejilla-usuario .chk, .rejilla-usuario button { grid-column: auto; }

  /* Bitácora como tarjetas: fecha y usuario arriba, acción y detalle abajo */
  #tabla-bitacora, #tabla-bitacora tbody { display: block; }
  #tabla-bitacora tr:first-child { display: none; }
  #tabla-bitacora tr { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; padding: .5rem 0; border-bottom: 1px solid var(--borde); }
  #tabla-bitacora td { border: 0; padding: 0; white-space: normal; overflow-wrap: anywhere; }
  #tabla-bitacora td:nth-child(1) { color: var(--texto-suave); font-size: .78rem; }
  #tabla-bitacora td:nth-child(2) { font-size: .78rem; text-align: right; font-weight: 600; }
  #tabla-bitacora td:nth-child(3), #tabla-bitacora td:nth-child(4) { grid-column: 1 / -1; }

  /* Street View de estructura: una sola columna que se desliza */
  .esv { display: block; overflow-y: auto; flex: 1; min-height: 0; padding: 0 16px 16px; }
  .esv-lista { margin-bottom: .7rem; }
  .esv-filtros { grid-template-columns: 1fr 1fr; }
  .esv-items { max-height: 170px; border: 1px solid var(--borde); border-radius: 8px; padding: .25rem; }
  .esv-vistas { display: flex; flex-direction: column; gap: .6rem; margin-top: .6rem; }
  .esv-izq { grid-template-columns: 1fr 1fr; grid-template-rows: 190px; }
  .esv-pano { min-height: 0; height: 48dvh; }
  .esv-mover .btn { min-height: 36px; }

  /* Leyenda compacta (se despliega al tocarla) y panel del lote un poco más bajo */
  .leyenda { max-width: calc(100% - 90px); }
  .panel { height: 62%; }
  body.panel-abierto .titulo-mapa, body.modo-agregar .titulo-mapa { display: none; }
}

/* ---------- Registro en celular · paso 1: pin fijo al centro y el mapa se mueve debajo ---------- */
.barra-ubicar, .pin-centro, .per-cambiar { display: none !important; }
@media (max-width: 760px) {
  body.modo-registro .per-ver-calle, body.modo-registro #ag-gps { display: none !important; }
  body.modo-registro .per-cambiar { display: flex !important; }
  body.modo-registro .per-ubic-botones { grid-template-columns: 1fr; }

  body.fase-ubicar #mapa { top: 0; bottom: 196px !important; right: 0 !important; }
  body.fase-ubicar .tarjeta-agregar, body.fase-ubicar .sv-agregar { display: none !important; }
  body.fase-ubicar .pin-centro { display: block !important; }
  body.fase-ubicar .barra-ubicar {
    display: flex !important; flex-direction: column; gap: .45rem; position: absolute; left: 0; right: 0; bottom: 0; height: 196px;
    z-index: 8; background: var(--superficie); border-top: 5px solid var(--primario); border-radius: 14px 14px 0 0;
    padding: .6rem 16px .7rem; box-shadow: var(--sombra);
  }
  /* Ver calle: Street View arriba y el mapa con el pin abajo, los dos a la vez */
  body.fase-ubicar.ver-calle .sv-agregar { display: block !important; top: 0; bottom: auto; height: calc((100% - 196px) * .5); width: 100%; border: 0; border-bottom: 4px solid var(--amarillo); }
  body.fase-ubicar.ver-calle #mapa { top: calc((100% - 196px) * .5) !important; }
}
.bu-titulo { font-weight: 800; font-size: .95rem; }
.bu-botones { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; }
.bu-botones .btn { justify-content: center; padding: .55rem .2rem; font-size: .85rem; white-space: nowrap; }
.bu-final { grid-template-columns: 1fr 2fr; margin-top: auto; }
.bu-final .primario { font-weight: 800; font-size: .95rem; }
#bu-gps { background: #1a73e8; border-color: #1a73e8; color: #fff; font-weight: 700; }
#bu-gps.esperando { animation: gps-parpadeo 1s ease-in-out infinite; }
.pin-centro {
  position: absolute; left: 50%; top: 50%; z-index: 5; width: 44px; height: 54px; transform: translate(-50%, -100%);
  pointer-events: none; filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)); transition: transform .12s;
}
.pin-centro.moviendo { transform: translate(-50%, -112%); }
.pin-centro::after { /* sombra en el punto exacto */
  content: ""; position: absolute; left: 50%; bottom: -3px; width: 10px; height: 4px; margin-left: -5px; border-radius: 50%; background: rgba(0,0,0,.45);
}

/* ---------- Listas del formulario de registro: botones grandes en lugar de listas nativas ---------- */
.campo-elegir { display: flex; flex-direction: column; gap: .25rem; }
.ce-etq { font-size: .85rem; color: var(--texto-suave); }
.btn-elegir {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem; width: 100%; padding: .6rem .75rem;
  border: 1px solid var(--borde); border-radius: 8px; background: var(--superficie); color: var(--texto);
  font: inherit; font-size: 1rem; text-align: left; cursor: pointer;
}
.btn-elegir span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-elegir i { font-style: normal; color: var(--texto-suave); }
.chips-seccion { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-sec {
  min-width: 62px; padding: .5rem .75rem; border: 2px solid var(--borde); border-radius: 999px; background: var(--superficie);
  color: var(--texto); font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer;
}
.chip-sec.activo { background: var(--primario); border-color: var(--primario); color: #fff; }
.chip-otra { font-weight: 600; font-size: .85rem; color: var(--texto-suave); border-style: dashed; }
.el-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; overflow-y: auto; max-height: 60vh; }
.el-lista button {
  width: 100%; display: flex; flex-direction: column; gap: .1rem; padding: .7rem .85rem; text-align: left; cursor: pointer;
  border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); color: var(--texto); font: inherit; font-size: 1rem;
}
.el-lista button.activo { border: 2px solid var(--primario); background: var(--primario-claro); }
.el-lista small { color: var(--texto-suave); font-size: .82rem; }
.el-lista .vacio { padding: .8rem; color: var(--texto-suave); }
@media (max-width: 760px) { .el-lista { max-height: none; } #dlg-elegir { max-height: 85dvh; } }
