/* =====================================================================
   EL SOPLÓN — estética: atardecer de Leonida, neón de Vice City,
   expedientes policiales y radio pirata.
   ===================================================================== */
:root {
  --noche: #0c0718;
  --noche-2: #160d2b;
  --panel: #150c29;
  --panel-2: #1e1238;
  --borde: #35215a;
  --texto: #f6eeff;
  --suave: #b8a7d8;
  --rosa: #ff3e88;
  --naranja: #ff9a3c;
  --amarillo: #ffd23f;
  --turquesa: #2ee6d6;
  --morado: #8b5cf6;
  --verde: #4ade80;
  --rojo: #ff5c5c;
  --papel: #f3ead7;
  --tinta: #2a2333;
  --atardecer: linear-gradient(90deg, #ff3e88, #ff7a59 50%, #ffd23f);
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --neon: "Yellowtail", "Brush Script MT", cursive;
  --ancho-panel: 370px;
  --alto-barra: 62px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--noche);
  color: var(--texto);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- Cabecera: atardecer ---------- */
.cabecera {
  position: relative; overflow: hidden; flex: none;
  min-height: 92px;
  background: linear-gradient(180deg, #14082a 0%, #3a0f52 38%, #9c1b62 72%, #ff6a3d 100%);
  border-bottom: 2px solid var(--rosa);
  box-shadow: 0 0 24px rgba(255, 62, 136, .45);
}
.cabecera::after { /* líneas de VHS */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
.cielo { position: absolute; inset: 0; pointer-events: none; }
.sol {
  position: absolute; left: 62%; bottom: -70px; width: 170px; height: 170px; border-radius: 50%;
  background: linear-gradient(180deg, #ffe066 0%, #ff9a3c 45%, #ff3e88 100%);
  -webkit-mask: repeating-linear-gradient(180deg, #000 0 14px, transparent 14px 18px);
          mask: repeating-linear-gradient(180deg, #000 0 14px, transparent 14px 18px);
  filter: drop-shadow(0 0 22px rgba(255, 154, 60, .8));
}
.palmeras { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; }

.cabecera-contenido {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 20px; min-height: 92px;
}
.logo { display: flex; align-items: baseline; gap: 6px; text-decoration: none; flex: none; }
.logo-el {
  font-family: var(--display); font-size: 22px; letter-spacing: 2px; color: var(--papel);
  text-shadow: 2px 2px 0 var(--noche);
}
.logo-neon {
  font-family: var(--neon); font-size: 50px; line-height: 1; color: #fff;
  text-shadow: 0 0 4px #fff, 0 0 10px var(--rosa), 0 0 22px var(--rosa), 0 0 40px var(--rosa);
  transform: rotate(-4deg); display: inline-block;
  animation: parpadeo 6s infinite;
}
@keyframes parpadeo {
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: .55; } 94% { opacity: 1; } 96% { opacity: .7; } 97% { opacity: 1; }
}
.lema {
  margin: 0; font-family: var(--display); font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--papel); text-shadow: 2px 2px 0 rgba(12, 7, 24, .8); max-width: 300px; line-height: 1.25;
}
.lema .lema-2 { color: var(--amarillo); }
.cuenta-atras {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  background: rgba(12, 7, 24, .72); border: 1px solid rgba(255,255,255,.18);
  padding: 6px 12px; border-radius: 10px; backdrop-filter: blur(4px);
}
.cuenta-atras b { font-family: var(--display); font-size: 34px; line-height: 1; background: var(--atardecer); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cuenta-atras .corto { display: none; }
.cuenta-atras span { font-family: var(--display); font-size: 12px; letter-spacing: 1px; line-height: 1.15; color: var(--papel); }
.chip-perfil {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: rgba(12, 7, 24, .72); border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px; padding: 6px 12px; flex: none; backdrop-filter: blur(4px);
}
.cuenta-atras[hidden] + .idioma { margin-left: auto; }

/* Selector de idioma */
.idioma { position: relative; flex: none; }
.chip-idioma {
  height: 48px; padding: 0 12px; border-radius: 10px; font-weight: 700; font-size: 13px; letter-spacing: .5px;
  background: rgba(12, 7, 24, .72); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(4px);
}
.menu-idioma {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 2000; list-style: none; margin: 0; padding: 6px;
  background: var(--panel); border: 1px solid var(--borde); border-radius: 12px; min-width: 170px;
  box-shadow: 0 12px 30px rgba(0,0,0,.6);
}
.menu-idioma button { width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 8px; display: flex; justify-content: space-between; gap: 12px; }
.menu-idioma button:hover { background: var(--panel-2); }
.menu-idioma button[aria-current="true"] { color: var(--rosa); font-weight: 700; }
.menu-idioma small { color: var(--suave); font-weight: 600; }
.cabecera { overflow: visible; z-index: 1500; }
.cielo { overflow: hidden; }
.interruptor b, .barra-movil b { font-weight: inherit; }

.emisora {
  font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--turquesa);
  background: var(--noche); border: 1px solid var(--borde); border-radius: 8px; padding: 4px 6px;
}
.elegir-idioma { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--suave); }
.elegir-idioma select { background: var(--noche); border: 1px solid var(--borde); border-radius: 10px; padding: 8px 10px; color: var(--texto); }
#chipApodo { font-size: 13px; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.estrellas { color: var(--amarillo); letter-spacing: 1px; font-size: 13px; text-shadow: 0 0 6px rgba(255, 210, 63, .6); }
.estrellas.grandes { font-size: 22px; letter-spacing: 3px; }

.aviso-demo {
  padding: 7px 16px; text-align: center; font-size: 13px; flex: none;
  background: repeating-linear-gradient(45deg, #2a1a00 0 12px, #332000 12px 24px);
  color: var(--amarillo); border-bottom: 1px solid #5a4100;
}

/* ---------- Estructura ---------- */
.cuerpo { flex: 1; display: flex; min-height: 0; position: relative; }
.zona-mapa { flex: 1; position: relative; min-width: 0; z-index: 0; }
#mapa { position: absolute; inset: 0; background: #0d1033; }

.panel {
  width: var(--ancho-panel); flex: none; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel), var(--noche-2));
  border-right: 1px solid var(--borde); min-height: 0;
}
.pestanas { display: flex; border-bottom: 1px solid var(--borde); flex: none; }
.pestanas button {
  flex: 1; background: none; border: 0; padding: 12px 4px; font-size: 13px; font-weight: 600;
  color: var(--suave); border-bottom: 3px solid transparent; position: relative;
}
.pestanas button.activa { color: var(--texto); border-bottom-color: var(--rosa); }
.globo { position: absolute; top: 8px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--rosa); box-shadow: 0 0 8px var(--rosa); }

.hoja { display: none; flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px; flex-direction: column; gap: 16px; min-height: 0; }
.hoja.activa { display: flex; }

.titulo-seccion { display: flex; align-items: center; justify-content: space-between; }
.panel h2, .panel h3 { margin: 0; }
.panel h2 { font-family: var(--display); font-weight: 400; font-size: 18px; letter-spacing: 1px; text-transform: uppercase; }
.mini-botones { display: flex; gap: 4px; }
.mini-botones button {
  background: none; border: 1px solid var(--borde); border-radius: 20px;
  padding: 3px 10px; font-size: 12px; color: var(--suave);
}
.mini-botones button:hover, .mini-botones button.activo { color: var(--texto); border-color: var(--rosa); background: rgba(255, 62, 136, .12); }

/* Buscador */
.buscador input {
  width: 100%; padding: 11px 14px; border-radius: 12px; outline: none;
  background: var(--noche); border: 1px solid var(--borde);
}
.buscador input:focus { border-color: var(--turquesa); box-shadow: 0 0 0 3px rgba(46, 230, 214, .15); }
.resultados { list-style: none; margin: 6px 0 0; padding: 0; }
.resultados button { width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 8px; }
.resultados button:hover { background: var(--panel-2); }
.resultados .vacio { color: var(--suave); font-size: 13px; padding: 6px 10px; }

/* Tipos */
.tipos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.tipo {
  display: flex; align-items: center; gap: 6px; padding: 8px 8px; border-radius: 12px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--borde); user-select: none; position: relative;
  transition: border-color .15s, opacity .15s;
}
.tipo input { position: absolute; opacity: 0; pointer-events: none; }
.tipo .icono { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--c); font-size: 14px; flex: none; box-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent); }
.tipo .nombre { font-size: 12.5px; line-height: 1.15; letter-spacing: -0.1px; flex: 1; min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.tipo .cuenta { font-size: 11px; color: var(--suave); }
.tipo:has(input:checked) { border-color: var(--c); }
.tipo:not(:has(input:checked)) { opacity: .42; }
.tipo:has(input:focus-visible) { outline: 2px solid var(--turquesa); }

.interruptor { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--suave); cursor: pointer; }
.interruptor input { position: absolute; opacity: 0; }
.interruptor span { width: 36px; height: 20px; border-radius: 20px; background: var(--borde); position: relative; flex: none; transition: background .2s; }
.interruptor span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.interruptor input:checked + span { background: var(--turquesa); }
.interruptor input:checked + span::after { transform: translateX(16px); }
.interruptor input:focus-visible + span { outline: 2px solid var(--turquesa); outline-offset: 2px; }

.caja-avisos {
  border-radius: 14px; padding: 14px; border: 1px solid rgba(255, 62, 136, .45);
  background: linear-gradient(150deg, rgba(255, 62, 136, .16), rgba(255, 154, 60, .08) 60%, rgba(46, 230, 214, .08));
}
.caja-avisos h3 { font-size: 15px; }
.caja-avisos p { margin: 6px 0 10px; font-size: 13px; color: var(--suave); }
.caja-avisos form { display: flex; gap: 6px; }
.caja-avisos input { flex: 1; min-width: 0; padding: 9px 10px; border-radius: 10px; background: var(--noche); border: 1px solid var(--borde); outline: none; }
.mensaje-form { min-height: 1em; margin: 8px 0 0 !important; font-size: 13px; color: var(--suave); }
.pie { margin-top: auto; font-size: 11px; line-height: 1.5; color: var(--suave); opacity: .75; }
.enlaces-legales { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.enlaces-legales a, .enlaces-legales button { color: var(--turquesa); font-size: 12px; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }

/* Huecos de anuncios: separados de los botones para evitar clics sin querer */
.hueco-anuncio { margin: 4px 0; padding: 8px; border-radius: 12px; border: 1px dashed var(--borde); background: rgba(255, 255, 255, .02); min-height: 120px; }
.hueco-anuncio[hidden] { display: none; }
.hueco-etiqueta { display: block; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--suave); opacity: .7; margin-bottom: 4px; }

/* Botones */
.boton-principal, .caja-avisos button {
  border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700;
  background: var(--atardecer); color: #22071a; box-shadow: 0 4px 18px rgba(255, 62, 136, .35);
}
.boton-principal:disabled { opacity: .5; cursor: wait; }
.boton-secundario { border: 1px solid var(--borde); border-radius: 10px; padding: 9px 14px; background: var(--panel-2); font-weight: 600; }
.enlace { background: none; border: 0; padding: 0; color: var(--suave); text-decoration: underline; font-size: 13px; align-self: flex-start; }

/* ---------- Feed de soplos ---------- */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.feed button {
  width: 100%; text-align: left; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--borde);
  border-left: 4px solid var(--c);
}
.feed button:hover { border-color: var(--c); }
.feed .icono { font-size: 20px; }
.feed .titulo { font-weight: 600; font-size: 14px; line-height: 1.25; }
.feed .meta { font-size: 12px; color: var(--suave); margin-top: 2px; }
.feed .puntos { font-family: var(--display); font-size: 18px; color: var(--verde); text-align: center; line-height: 1; }
.feed .puntos small { display: block; font-family: Inter, sans-serif; font-size: 10px; color: var(--suave); }
.feed .vacio { color: var(--suave); font-size: 14px; text-align: center; padding: 30px 10px; }

/* ---------- Radio ---------- */
.hoja-radio { padding: 0; gap: 0; }
.radio-cabecera {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; border-bottom: 1px solid var(--borde);
  background: linear-gradient(90deg, rgba(255, 62, 136, .18), transparent);
}
.radio-cabecera strong { font-family: var(--display); font-weight: 400; letter-spacing: 1.5px; font-size: 17px; }
.en-directo { font-size: 11px; font-weight: 700; color: var(--rojo); display: flex; align-items: center; gap: 5px; letter-spacing: .5px; }
.en-directo i { width: 8px; height: 8px; border-radius: 50%; background: var(--rojo); box-shadow: 0 0 8px var(--rojo); animation: latido 1.4s infinite; }
@keyframes latido { 50% { opacity: .3; } }
.frecuencia { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--turquesa); }
.chat { list-style: none; margin: 0; padding: 12px 16px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat li { display: flex; flex-direction: column; gap: 2px; max-width: 88%; }
.chat li.mio { align-self: flex-end; align-items: flex-end; }
.chat .quien { font-size: 12px; font-weight: 700; color: var(--c, var(--turquesa)); }
.chat .quien time { font-weight: 400; color: var(--suave); margin-left: 6px; }
.chat .burbuja { background: var(--panel-2); border: 1px solid var(--borde); padding: 8px 11px; border-radius: 4px 14px 14px 14px; line-height: 1.4; word-wrap: break-word; overflow-wrap: anywhere; }
.chat li.mio .burbuja { background: linear-gradient(135deg, rgba(255, 62, 136, .35), rgba(255, 154, 60, .25)); border-color: rgba(255, 62, 136, .5); border-radius: 14px 4px 14px 14px; }
.chat .reportar { background: none; border: 0; font-size: 11px; color: var(--suave); padding: 0; opacity: 0; }
.chat li:hover .reportar { opacity: 1; }
.chat-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--borde); flex: none; }
.chat-form input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 22px; background: var(--noche); border: 1px solid var(--borde); outline: none; }
.chat-form input:focus { border-color: var(--rosa); }
.chat-form button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--atardecer); color: #22071a; font-size: 18px; flex: none; }

/* ---------- Perfil ---------- */
.ficha-policial {
  display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 6px;
  background: var(--papel); color: var(--tinta); position: relative;
  box-shadow: 0 6px 20px rgba(0,0,0,.4); transform: rotate(-1deg);
}
.ficha-foto {
  width: 70px; height: 84px; display: grid; place-items: center; font-size: 38px; flex: none;
  background: repeating-linear-gradient(180deg, #d8ccb3 0 10px, #cbbd9f 10px 11px); border: 2px solid var(--tinta);
}
.ficha-etiqueta { font-family: var(--display); font-size: 12px; letter-spacing: 2px; color: #8a2a3a; }
.ficha-apodo { font-family: var(--display); font-size: 26px; line-height: 1.1; word-break: break-all; }
.ficha-policial .estrellas { color: #c99700; text-shadow: none; }
.cifras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cifras div { background: var(--panel-2); border: 1px solid var(--borde); border-radius: 12px; padding: 10px 8px; text-align: center; }
.cifras b { display: block; font-family: var(--display); font-size: 26px; font-weight: 400; background: var(--atardecer); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cifras span { font-size: 11px; color: var(--suave); line-height: 1.2; display: block; }
.explicacion { font-size: 13px; color: var(--suave); margin: 0; line-height: 1.45; }
.normas { border: 1px dashed var(--borde); border-radius: 12px; padding: 12px 14px; }
.normas h3 { font-family: var(--display); font-weight: 400; letter-spacing: 1px; font-size: 15px; text-transform: uppercase; }
.normas ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--suave); line-height: 1.6; }

/* ---------- Mapa: etiquetas de zona ---------- */
.zona { background: none; border: 0; }
.zona span {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); white-space: nowrap; cursor: pointer;
  font-family: var(--display); font-size: calc(17px * var(--escala, 1)); letter-spacing: calc(3px * var(--escala, 1)); text-transform: uppercase;
  color: #fff; text-shadow: 0 0 6px var(--zc, var(--turquesa)), 0 0 14px var(--zc, var(--turquesa)), 0 2px 2px #000;
}
.zona.grande span { font-family: var(--neon); text-transform: none; letter-spacing: 0; font-size: calc(38px * var(--escala, 1)); --zc: var(--rosa); }

/* ---------- Mapa: chinchetas ---------- */
.pin-env { background: none; border: 0; }
/* Grupos de chinchetas (vendor/leaflet.markercluster.js): aro de colores según los tipos */
.racimo-env { background: none; border: 0; }
.racimo {
  width: 100%; height: 100%; border-radius: 50%; padding: 4px; background: var(--aro);
  box-shadow: 0 0 14px rgba(255, 62, 136, .55), 0 6px 12px rgba(0,0,0,.5); transition: transform .15s;
}
.racimo b {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  background: #120a24; color: #fff; font-family: var(--display); font-size: 15px; letter-spacing: 1px;
  text-shadow: 0 0 6px var(--rosa);
}
.racimo:hover { transform: scale(1.1); }
.pin {
  position: absolute; left: 0; top: 0; width: 34px; height: 34px;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--c); border: 2px solid #120a24;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 70%, #fff), 0 0 16px color-mix(in srgb, var(--c) 70%, transparent), 0 6px 12px rgba(0,0,0,.5);
  display: grid; place-items: center; transition: transform .15s;
}
.pin > span { transform: rotate(45deg); font-size: 16px; line-height: 1; }
.pin:hover { transform: rotate(-45deg) scale(1.15); }
.pin .medalla {
  position: absolute; right: -8px; top: -8px; transform: rotate(45deg);
  width: 17px; height: 17px; border-radius: 50%; font-size: 10px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid #120a24;
}
.pin.confirmado .medalla { background: var(--amarillo); color: #3b2a00; }
.pin.oficial .medalla { background: var(--turquesa); color: #00302c; }
.pin.sin-confirmar { box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 6px 12px rgba(0,0,0,.5); background: color-mix(in srgb, var(--c) 75%, #120a24); }
.pin.sin-confirmar::before { content: ""; position: absolute; inset: -6px; border-radius: inherit; border: 2px dashed rgba(255,255,255,.65); }
.pin.dudoso { filter: grayscale(.85); opacity: .55; }
.pin.tengo { filter: grayscale(1) brightness(.75); opacity: .75; }
.pin.tengo .medalla { background: var(--verde); color: #04310f; }
.pin.borrador { --c: #ffffff; animation: rebote .8s infinite alternate ease-in-out; }
@keyframes rebote { to { transform: rotate(-45deg) translate(4px, -4px); } }

/* ---------- Ventana del soplo: expediente ---------- */
.leaflet-popup-content-wrapper { background: transparent; box-shadow: none; padding: 0; border-radius: 0; }
.leaflet-popup-tip { background: var(--papel); }
.leaflet-popup-content { margin: 0; width: min(310px, 80vw) !important; }
.leaflet-container a.leaflet-popup-close-button { color: var(--tinta); top: 8px; right: 8px; z-index: 2; font-size: 20px; }
.expediente {
  position: relative; background: var(--papel); color: var(--tinta); border-radius: 4px;
  padding: 18px 16px 12px; font-family: Inter, sans-serif; font-size: 14px; line-height: 1.45;
  box-shadow: 0 12px 30px rgba(0,0,0,.6);
  background-image: linear-gradient(transparent 27px, rgba(42, 35, 51, .06) 28px); background-size: 100% 28px;
}
.expediente::before { /* cinta adhesiva */
  content: ""; position: absolute; top: -10px; left: 50%; width: 90px; height: 22px; transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 210, 63, .7); box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.exp-cabecera { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; padding-right: 20px; }
.exp-tipo { font-family: var(--display); letter-spacing: 1.5px; font-size: 13px; text-transform: uppercase; color: color-mix(in srgb, var(--c) 55%, var(--tinta)); }
.sello {
  font-family: var(--display); font-size: 12px; letter-spacing: 1.5px; padding: 2px 8px; border: 2px solid; border-radius: 4px;
  transform: rotate(-6deg); text-transform: uppercase; white-space: nowrap;
}
.sello.confirmado { color: #1d7a3a; }
.sello.oficial { color: #0b7b74; }
.sello.sin-confirmar { color: #c2410c; }
.sello.dudoso { color: #b91c1c; }
.expediente h3 { margin: 4px 0 6px; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.1; }
.expediente p { margin: 0 0 10px; white-space: pre-line; }
.exp-autor { font-size: 12px; color: #6b6275; margin-bottom: 10px; }
.exp-autor b { color: var(--tinta); }
.exp-autor .estrellas { color: #c99700; text-shadow: none; }
.exp-autor a { color: #be185d; font-weight: 600; }

/* Creadores verificados y pruebas */
.pin.creador .medalla { background: var(--rosa); color: #fff; }
.sello.creador { color: #be185d; }
.insignia-creador { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--rosa); color: #fff; font-size: 9px; font-weight: 800; vertical-align: 1px; }
.exp-creador { font-size: 12px !important; color: #6b6275; background: rgba(255, 62, 136, .08); border-left: 3px solid var(--rosa); padding: 6px 8px; border-radius: 4px; }
.exp-prueba { display: inline-block; margin: 0 0 10px; padding: 6px 12px; border-radius: 8px; background: var(--tinta); color: #fff !important; font-weight: 600; font-size: 13px; text-decoration: none; }
.exp-prueba:hover { background: #ff3e88; }
.feed .puntos.creador { color: var(--rosa); }
.aviso-ocultos { margin: -8px 0 0 46px; font-size: 12px; color: var(--suave); }
.aviso-ocultos:empty { display: none; }
.dialogo .ayuda { display: block; margin-top: 4px; font-size: 12px; color: var(--suave); font-weight: 400; }

.exp-votos { display: flex; gap: 6px; margin-bottom: 8px; }
.exp-votos button {
  flex: 1; padding: 8px 6px; border-radius: 8px; border: 2px solid #d8ccb3; background: #fffaf0; color: var(--tinta);
  font-weight: 600; font-size: 13px;
}
.exp-votos button b { margin-left: 4px; }
.exp-votos button:disabled { opacity: .55; cursor: default; } /* tus propios soplos: ves los votos pero no votas */
.exp-votos button.si.marcado { background: #dcfce7; border-color: #16a34a; }
.exp-votos button.no.marcado { background: #fee2e2; border-color: #dc2626; }
.lo-tengo { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin: 6px 0 8px; cursor: pointer; }
.lo-tengo input { width: 18px; height: 18px; accent-color: #16a34a; }
.exp-comentarios { border-top: 1px dashed #c9bda3; padding-top: 8px; }
.exp-comentarios summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.exp-comentarios ul { list-style: none; margin: 8px 0; padding: 0; max-height: 160px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.exp-comentarios li { font-size: 13px; background: #fffaf0; border-radius: 6px; padding: 6px 8px; }
.exp-comentarios li b { font-size: 12px; }
.exp-comentarios form { display: flex; gap: 6px; }
.exp-comentarios input { flex: 1; min-width: 0; padding: 7px 9px; border-radius: 8px; border: 1px solid #c9bda3; background: #fff; color: var(--tinta); }
.exp-comentarios form button { border: 0; border-radius: 8px; padding: 0 12px; background: var(--tinta); color: var(--papel); font-weight: 600; }
.exp-pie { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #c9bda3; }
.exp-pie button { background: none; border: 0; padding: 0; font-size: 12px; color: #6b6275; text-decoration: underline; }

/* Zonas: ventana sencilla */
.expediente.zona-info::before { background: rgba(46, 230, 214, .55); }

.leaflet-control-zoom a { background: var(--panel) !important; color: var(--texto) !important; border-color: var(--borde) !important; }
.leaflet-container { font-family: Inter, sans-serif; }
.leaflet-container.colocando { cursor: crosshair; }
/* Mientras colocas un soplo, los rótulos, chinchetas y grupos no atrapan el clic: llega al mapa */
.leaflet-container.colocando .leaflet-marker-icon { pointer-events: none; }

/* ---------- Botón "Dar un soplo" ---------- */
.boton-soplo {
  position: absolute; z-index: 600; right: 20px; bottom: 24px;
  display: flex; align-items: center; gap: 8px;
  padding: 14px 22px; border: 0; border-radius: 40px;
  font-family: var(--display); font-size: 19px; letter-spacing: 1.5px; text-transform: uppercase;
  background: var(--atardecer); color: #22071a;
  box-shadow: 0 0 0 3px rgba(12, 7, 24, .8), 0 0 28px rgba(255, 62, 136, .7);
  transition: transform .15s;
}
.boton-soplo:hover { transform: translateY(-2px) scale(1.03); }
.boton-soplo span { font-size: 22px; }
.leaflet-bottom.leaflet-right { bottom: 84px; }

.aviso-colocar {
  position: absolute; z-index: 600; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; white-space: nowrap;
  background: var(--amarillo); color: #2a1d00; font-weight: 700; padding: 8px 8px 8px 16px; border-radius: 30px;
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
.aviso-colocar button { border: 0; border-radius: 20px; background: rgba(0,0,0,.15); padding: 5px 12px; font-weight: 600; }

/* ---------- Diálogos ---------- */
.dialogo {
  border: 1px solid var(--borde); border-radius: 16px; padding: 0; width: min(480px, calc(100vw - 24px));
  background: var(--panel); color: var(--texto); box-shadow: 0 20px 60px rgba(0,0,0,.7), 0 0 0 1px rgba(255, 62, 136, .25);
}
.dialogo::backdrop { background: rgba(8, 4, 18, .7); backdrop-filter: blur(3px); }
.dialogo form { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.dialogo-cabecera { display: flex; justify-content: space-between; align-items: center; }
.sello-dialogo { font-family: var(--display); letter-spacing: 2px; font-size: 18px; background: var(--atardecer); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cerrar { background: none; border: 0; font-size: 18px; color: var(--suave); }
.dialogo label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--suave); }
.dialogo input:not([type=checkbox]), .dialogo textarea {
  padding: 10px 12px; border-radius: 10px; background: var(--noche); border: 1px solid var(--borde); outline: none; color: var(--texto); font-weight: 400; font-size: 15px;
}
.dialogo input:focus, .dialogo textarea:focus { border-color: var(--rosa); }
.dialogo textarea { resize: vertical; }
.dialogo .casilla { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; line-height: 1.4; }
.dialogo .casilla input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--rosa); flex: none; }
.dialogo fieldset { border: 0; padding: 0; margin: 0; }
.dialogo legend { font-size: 13px; font-weight: 600; color: var(--suave); margin-bottom: 8px; padding: 0; }
.coords { margin: -6px 0 0; font-size: 12px; color: var(--turquesa); font-family: ui-monospace, Consolas, monospace; }
.elegir-tipo { display: flex; flex-wrap: wrap; gap: 6px; }
.elegir-tipo label { flex-direction: row; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 20px; border: 1px solid var(--borde); background: var(--panel-2); cursor: pointer; color: var(--texto); font-weight: 500; }
.elegir-tipo input { position: absolute; opacity: 0; }
.elegir-tipo label:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 22%, var(--panel-2)); box-shadow: 0 0 12px color-mix(in srgb, var(--c) 40%, transparent); }
.elegir-tipo label:has(input:focus-visible) { outline: 2px solid var(--turquesa); }
.dialogo-botones { display: flex; justify-content: flex-end; gap: 8px; }
.codigo-editor { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* ---------- Avisos rápidos ---------- */
.tostada {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 3000; max-width: calc(100vw - 32px);
  background: var(--panel-2); border: 1px solid var(--rosa); padding: 10px 16px; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 16px rgba(255, 62, 136, .3); font-size: 14px;
}

/* ---------- Barra inferior (móvil) ---------- */
.barra-movil { display: none; }

@media (max-width: 860px) {
  :root { --ancho-panel: 100%; }
  .cabecera, .cabecera-contenido { min-height: 64px; }
  .cabecera-contenido { padding: 8px 14px; gap: 10px; }
  .logo-neon { font-size: 36px; }
  .logo-el { font-size: 16px; }
  .lema { display: none; }
  .sol { width: 110px; height: 110px; bottom: -52px; left: 55%; }
  .cuenta-atras { padding: 4px 8px; }
  .cuenta-atras b { font-size: 24px; }
  .cuenta-atras span { font-size: 10px; }
  .chip-perfil { padding: 4px 8px; }
  #chipApodo { max-width: 80px; font-size: 12px; }
  .chip-idioma { height: 40px; padding: 0 8px; font-size: 12px; }

  .panel {
    position: absolute; z-index: 1000; left: 0; right: 0; bottom: 0; height: 74%;
    border-right: 0; border-top: 2px solid var(--rosa); border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,.6);
    transform: translateY(105%); transition: transform .25s ease;
  }
  body.panel-abierto .panel { transform: none; }
  .pestanas { display: none; }

  .barra-movil {
    display: flex; flex: none; height: calc(var(--alto-barra) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--noche); border-top: 1px solid var(--borde); position: relative; z-index: 1100;
  }
  .barra-movil button {
    flex: 1; background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; font-size: 11px; font-weight: 600; color: var(--suave); position: relative;
  }
  .barra-movil button span { font-size: 19px; }
  .barra-movil button.activo { color: var(--texto); }
  .barra-movil button.activo::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: var(--rosa); box-shadow: 0 0 10px var(--rosa); }
  .barra-movil .globo { top: 8px; right: calc(50% - 18px); }

  .boton-soplo { right: 14px; bottom: 16px; padding: 12px 18px; font-size: 16px; }
  .leaflet-bottom.leaflet-right { bottom: 70px; }
  .aviso-colocar { font-size: 13px; }
}
@media (max-width: 400px) {
  .cuenta-atras span { display: none; }
  .cuenta-atras b { display: flex; flex-direction: column; align-items: center; }
  .cuenta-atras .corto { display: block; font-style: normal; font-size: 9px; letter-spacing: 1px; line-height: 1; margin-top: 1px; color: var(--papel); -webkit-text-fill-color: var(--papel); }
}

/* Panelito del modo editor (?editor=1) */
.panel-editor {
  position: fixed; top: 118px; right: 16px; z-index: 1200; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  max-width: min(440px, calc(100vw - 32px)); padding: 8px 10px; border-radius: 10px; font-size: 13px;
  background: rgba(21, 12, 41, .95); border: 1px solid var(--amarillo); color: var(--texto); box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
.panel-editor button { font: inherit; font-size: 12px; color: inherit; background: #2a1a4d; border: 1px solid var(--borde); border-radius: 7px; padding: 3px 8px; cursor: pointer; }
.panel-editor button:disabled { opacity: .45; cursor: default; }

/* "Se busca": cosas confirmadas que nadie ha encontrado todavía */
.se-busca { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--amarillo); background: rgba(255, 210, 63, .06); }
.se-busca h3 { margin: 0 0 2px; font-family: var(--display); font-size: 16px; letter-spacing: 1px; color: var(--amarillo); }
.se-busca p { margin: 0 0 8px; font-size: 12.5px; color: var(--suave); }
.se-busca ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.se-busca li { display: flex; align-items: center; gap: 8px; }
.se-busca .icono { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--c); font-size: 14px; flex: none; }
.se-busca .texto { flex: 1; min-width: 0; font-size: 13px; line-height: 1.25; }
.se-busca .texto small { display: block; color: var(--suave); font-size: 12px; }
.se-busca button, .boton-primero { font: inherit; font-size: 12px; font-weight: 600; color: #1a0b33; background: var(--amarillo); border: 0; border-radius: 8px; padding: 5px 9px; cursor: pointer; flex: none; }
.boton-primero { margin-top: 10px; font-size: 14px; padding: 8px 14px; }

/* =====================================================================
   PANEL Y FICHAS AL ESTILO MAPGENIE (2026-10-21), con los colores neón
   ===================================================================== */

/* Tu progreso */
.progreso {
  padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(46, 230, 214, .4);
  background: linear-gradient(150deg, rgba(46, 230, 214, .12), rgba(139, 92, 246, .1));
  display: flex; flex-direction: column; gap: 8px;
}
.progreso-cabecera { display: flex; align-items: baseline; justify-content: space-between; }
.progreso-cabecera b { font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--turquesa); text-shadow: 0 0 10px rgba(46, 230, 214, .6); }
.progreso-barra { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progreso-barra i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--turquesa), var(--verde)); box-shadow: 0 0 10px var(--turquesa); transition: width .4s ease; }
.progreso p { margin: 0; font-size: 12.5px; color: var(--suave); line-height: 1.4; }
.progreso .enlace { font-size: 12.5px; color: var(--turquesa); }

/* Casilla anti-robots (Cloudflare Turnstile): solo se ve si Cloudflare pide pulsarla */
.caja-turnstile { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 3000; }

/* Ventana "Llevar a otro dispositivo" */
.traspaso-paso { margin: 6px 0 0; font-size: 14px; color: var(--amarillo); }
.codigo-traspaso { margin: 0; font-size: 13px; color: var(--suave); line-height: 1.5; }
.codigo-traspaso b {
  display: block; margin: 4px 0; font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: 4px;
  color: #fff; text-shadow: 0 0 10px var(--rosa); user-select: all;
}
#dialogoTraspaso input[name="codigo"] { text-transform: uppercase; letter-spacing: 3px; }

/* Mostrar todo / Ocultar todo */
.botones-todo { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.botones-todo button {
  padding: 9px 6px; border-radius: 10px; border: 1px solid var(--borde); background: var(--panel-2);
  font-family: var(--display); font-size: 14px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--texto);
}
.botones-todo button:hover { border-color: var(--rosa); box-shadow: 0 0 12px rgba(255, 62, 136, .35); }

/* Categorías agrupadas */
.categorias { display: flex; flex-direction: column; gap: 14px; }
.grupo h3 { margin: 0 0 6px; }
.grupo h3 button {
  background: none; border: 0; padding: 0; width: 100%; text-align: left;
  font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--amarillo); text-shadow: 0 0 8px rgba(255, 210, 63, .45);
  display: flex; align-items: center; gap: 8px;
}
.grupo h3 button::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 210, 63, .5), transparent); }
.grupo h3 button[aria-pressed="false"] { opacity: .55; }
.categorias .tipos { gap: 2px 8px; }
.categorias .tipo { background: none; border: 1px solid transparent; padding: 6px 6px; border-radius: 8px; }
.categorias .tipo:hover { background: var(--panel-2); }
.categorias .tipo:has(input:checked) { border-color: transparent; }
.categorias .tipo .icono { width: 24px; height: 24px; font-size: 13px; border-radius: 7px; }
.categorias .tipo .nombre { font-size: 12.5px; font-weight: 600; }
.categorias .tipo .cuenta { font-size: 12px; font-weight: 700; color: var(--texto); opacity: .8; font-variant-numeric: tabular-nums; }
.categorias .tipo:not(:has(input:checked)) { opacity: .38; }
.categorias .tipo:not(:has(input:checked)) .nombre { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .4); }

/* Flechita para esconder el panel (solo ordenador) */
.plegar-panel {
  position: absolute; z-index: 650; left: 0; top: 14px; width: 24px; height: 46px; padding: 0;
  border: 1px solid var(--borde); border-left: 0; border-radius: 0 10px 10px 0;
  background: var(--panel); color: var(--texto); font-size: 11px; box-shadow: 4px 0 12px rgba(0, 0, 0, .4);
}
.plegar-panel:hover { color: var(--rosa); }
body.panel-plegado .panel { display: none; }
body.panel-plegado .plegar-panel span { display: inline-block; transform: scaleX(-1); }

/* Ficha: foto arriba, como MapGenie */
.leaflet-container a.leaflet-popup-close-button {
  top: 8px; right: 8px; width: 26px; height: 26px; line-height: 24px; font-size: 18px; border-radius: 50%;
  background: rgba(12, 7, 24, .75); color: #fff; text-align: center; z-index: 3;
}
.leaflet-container a.leaflet-popup-close-button:hover { color: var(--rosa); background: rgba(12, 7, 24, .9); }
.expediente { padding-top: 0; overflow: hidden; }
.expediente::before { z-index: 2; }
.expediente .exp-cabecera { margin-top: 10px; }
.exp-foto {
  position: relative; margin: 0 -16px 0; height: 150px; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--c) 70%, transparent), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #14082a, #2a0f45);
  border-bottom: 3px solid var(--c);
  box-shadow: inset 0 -12px 24px -12px color-mix(in srgb, var(--c) 60%, transparent);
}
.exp-foto span { font-size: 60px; filter: drop-shadow(0 0 16px var(--c)); }
.exp-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.expediente.zona-info { padding-top: 18px; }

/* Botón "Marcar como encontrado" */
.boton-encontrado {
  display: block; width: 100%; margin: 4px 0 2px; padding: 10px 12px; border-radius: 8px;
  border: 2px dashed #16a34a; background: #fffaf0; color: #15803d;
  font-family: var(--display); font-size: 15px; letter-spacing: 1.3px; text-transform: uppercase;
}
.boton-encontrado:hover { background: #dcfce7; }
.boton-encontrado.hecho { border-style: solid; background: #16a34a; color: #fff; box-shadow: 0 0 14px rgba(22, 163, 74, .45); }

@media (max-width: 860px) {
  .plegar-panel { display: none; }
  body.panel-plegado .panel { display: flex; }
  .exp-foto { height: 120px; }
}

/* Radio: aviso para quien entra con un idioma que no tiene emisora */
.aviso-radio { margin: 0; padding: 8px 16px; font-size: 12.5px; color: var(--suave); background: rgba(46, 230, 214, .06); border-bottom: 1px solid var(--borde); }
