:root {
  --noche: #170d22; --morado: #2a1840; --morado2: #3d2457; --naranja: #ff8a1f; --naranja2: #ffb65c;
  --texto: #fff4e6; --tenue: #c9b6dd; --verde: #7cf2a2; --oro: #ffd23f;
  --sombra: 0 6px 24px rgba(0, 0, 0, .45);
  --arriba: env(safe-area-inset-top, 0px); --abajo: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--noche); color: var(--texto);
  font-family: 'Fredoka', system-ui, sans-serif; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
#mapa { position: fixed; inset: 0; }
.maplibregl-ctrl-attrib { background: rgba(23, 13, 34, .7) !important; color: var(--tenue); }
.maplibregl-ctrl-attrib a { color: var(--tenue) !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1); }
.maplibregl-ctrl-bottom-right { bottom: calc(150px + var(--abajo)); }

/* la neblina y la viñeta encima del mapa */
.niebla { position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 60%, transparent 40%, rgba(10, 4, 18, .75) 100%),
    linear-gradient(to bottom, rgba(23, 13, 34, .85), transparent 22%, transparent 70%, rgba(23, 13, 34, .9)); }
.niebla::after { content: ''; position: absolute; inset: -20%; opacity: .16; animation: niebla 40s linear infinite;
  background: radial-gradient(circle at 20% 30%, #c9b6dd 0, transparent 25%), radial-gradient(circle at 70% 60%, #c9b6dd 0, transparent 22%),
    radial-gradient(circle at 40% 80%, #c9b6dd 0, transparent 20%); filter: blur(30px); }
@keyframes niebla { to { transform: translateX(15%); } }

/* murciélagos que cruzan el cielo de vez en cuando */
.murcielagos { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.murcielagos i { position: absolute; left: -60px; top: 20%; width: 34px; height: 18px; opacity: .85;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Cpath d='M30 12c-3-6-8-8-14-6 2 3 1 6-2 7-3-3-8-3-14 1 7 1 11 5 12 10 3-3 7-4 10-1 2-3 5-4 8-3 3-1 6 0 8 3 3-3 7-2 10 1 1-5 5-9 12-10-6-4-11-4-14-1-3-1-4-4-2-7-6-2-11 0-14 6z' fill='%23140a1c'/%3E%3C/svg%3E");
  animation: vuela 14s linear infinite; }
.murcielagos i:nth-child(2) { top: 34%; width: 24px; animation-duration: 19s; animation-delay: 6s; }
.murcielagos i:nth-child(3) { top: 12%; width: 28px; animation-duration: 23s; animation-delay: 11s; }
@keyframes vuela { 0% { transform: translate(0, 0) scaleY(1); } 10% { transform: translate(12vw, -3vh) scaleY(.4); } 20% { transform: translate(24vw, 2vh) scaleY(1); }
  30% { transform: translate(36vw, -2vh) scaleY(.4); } 40% { transform: translate(50vw, 3vh) scaleY(1); } 50% { transform: translate(64vw, -1vh) scaleY(.4); }
  60% { transform: translate(80vw, 2vh) scaleY(1); } 70%, 100% { transform: translate(calc(100vw + 120px), 0) scaleY(.4); } }

/* barra de arriba */
.capas { position: fixed; right: 12px; top: calc(128px + var(--arriba)); display: flex; flex-direction: column; gap: 8px; z-index: 5; }
.capa { width: 52px; padding: 6px 0 4px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(42, 24, 64, .85);
  backdrop-filter: blur(6px); box-shadow: var(--sombra); display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.capa span { font-size: 1.3rem; }
.capa small { font-size: .7rem; font-weight: 600; color: var(--tenue); }
.capa[aria-pressed="true"] { border-color: var(--naranja); box-shadow: 0 0 12px rgba(255, 138, 31, .45), var(--sombra); }
.capa[aria-pressed="true"] small { color: var(--naranja2); }
.capa[aria-pressed="false"] span { filter: grayscale(1); opacity: .5; }
.barra { position: fixed; top: calc(10px + var(--arriba)); left: 12px; right: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.logo { font-weight: 700; font-size: 1.15rem; text-shadow: 0 2px 8px #000; white-space: nowrap; }
.logo span { color: var(--naranja2); }
.boton-chico { border: 1px solid rgba(255, 255, 255, .18); background: rgba(42, 24, 64, .85); backdrop-filter: blur(6px);
  border-radius: 999px; padding: 8px 14px; font-weight: 600; box-shadow: var(--sombra); }
.boton-chico[aria-pressed="true"] { background: var(--naranja); color: #2a1300; }
.hora { position: fixed; top: calc(58px + var(--arriba)); left: 50%; transform: translateX(-50%); font-size: .85rem; white-space: nowrap;
  background: rgba(23, 13, 34, .75); padding: 5px 12px; border-radius: 999px; color: var(--tenue); }
.hora.brillante { color: var(--oro); box-shadow: 0 0 18px rgba(255, 210, 63, .35); }
.demo-ayuda { display: none; position: fixed; top: calc(92px + var(--arriba)); left: 50%; transform: translateX(-50%); font-size: .78rem;
  background: rgba(124, 242, 162, .15); color: var(--verde); padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
body.demo .demo-ayuda { display: block; }
.alerta { position: fixed; top: calc(124px + var(--arriba)); left: 16px; right: 76px; text-align: center; padding: 10px 14px;
  border-radius: 14px; background: #c4213b; font-weight: 600; box-shadow: var(--sombra); }
.alerta.suave { background: rgba(42, 24, 64, .92); font-weight: 400; }

/* abajo: los cercanos */
.abajo { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(14px + var(--abajo)); }
.cerca-titulo { font-size: .8rem; color: var(--tenue); margin: 0 4px 6px; text-transform: uppercase; letter-spacing: .12em; }
.cercanos { display: flex; gap: 8px; min-height: 84px; align-items: stretch; }
.cercano { flex: 1; max-width: 25%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px;
  border-radius: 16px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(42, 24, 64, .88); font-size: .82rem; }
.cercano.listo { border-color: var(--oro); background: rgba(90, 60, 10, .9); animation: latido 1.2s ease-in-out infinite; }
.mini svg { width: 46px; height: 46px; display: block; }
.silueta svg { filter: brightness(0) drop-shadow(0 0 2px rgba(255, 255, 255, .6)); opacity: .8; }
.nadie { color: var(--tenue); font-size: .9rem; align-self: center; padding: 0 6px; }
.boton-redondo { position: absolute; right: 14px; top: -58px; width: 50px; height: 50px; border-radius: 50%; font-size: 1.5rem;
  border: 2px solid var(--naranja); background: var(--morado); box-shadow: var(--sombra); }
@keyframes latido { 50% { transform: scale(1.05); } }

/* tú en el mapa */
.yo { width: 70px; height: 70px; position: relative; pointer-events: none; }
.yo-halo { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 63, .55), rgba(255, 138, 31, 0) 70%);
  animation: halo 2.2s ease-in-out infinite; }
.yo-farol { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; filter: drop-shadow(0 0 8px #ffb238); }
.yo-cono { display: none; }
@keyframes halo { 50% { transform: scale(1.25); opacity: .7; } }

/* los monstruos en el mapa */
.monstruo { width: 64px; height: 74px; border: 0; background: none; padding: 0; position: relative; transition: opacity .3s, filter .3s; }
.monstruo svg { width: 64px; height: 64px; display: block; animation: flotar 2.4s ease-in-out infinite; animation-delay: var(--retraso);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .6)); }
.monstruo-sombra { position: absolute; left: 16px; right: 16px; bottom: 2px; height: 8px; border-radius: 50%; background: rgba(0, 0, 0, .55); filter: blur(2px); }
.monstruo:not(.alcanzable) { opacity: .78; filter: saturate(.7); }
.monstruo.alcanzable::before { content: ''; position: absolute; left: 6px; right: 6px; bottom: -4px; height: 18px; border-radius: 50%;
  border: 3px solid var(--oro); animation: anillo 1.4s ease-out infinite; }
.monstruo.epico svg { filter: drop-shadow(0 0 8px #c38bff) drop-shadow(0 4px 6px rgba(0, 0, 0, .6)); }
.monstruo.legendario svg { width: 78px; height: 78px; margin: -14px 0 0 -7px; filter: drop-shadow(0 0 12px #ffd23f) drop-shadow(0 4px 6px rgba(0, 0, 0, .6)); }
.monstruo.saluda svg { animation: saluda .5s ease 2; }
@keyframes flotar { 50% { transform: translateY(-8px); } }
@keyframes anillo { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@keyframes saluda { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }

/* avisos y tarjeta */
.aviso { position: fixed; left: 50%; bottom: calc(150px + var(--abajo)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--naranja); color: #2a1300; font-weight: 600; padding: 10px 16px; border-radius: 14px; box-shadow: var(--sombra);
  transition: .3s; max-width: calc(100% - 32px); text-align: center; z-index: 30; }
.aviso.visible { opacity: 1; transform: translate(-50%, 0); }
.tarjeta { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(10, 4, 18, .7); backdrop-filter: blur(4px); padding: 16px; }
.tarjeta[hidden] { display: none; }
.tarjeta-caja { width: min(360px, 100%); text-align: center; background: linear-gradient(170deg, var(--morado2), var(--morado));
  border: 2px solid color-mix(in srgb, var(--c) 70%, white); border-radius: 26px; padding: 18px 20px 22px; box-shadow: 0 0 40px color-mix(in srgb, var(--c) 40%, transparent);
  animation: entra .45s cubic-bezier(.2, 1.4, .4, 1); }
.tarjeta-titulo { margin: 0; color: var(--oro); font-weight: 700; letter-spacing: .05em; }
.tarjeta-dibujo svg { width: 170px; height: 170px; animation: flotar 2.4s ease-in-out infinite; }
.tarjeta-caja h2 { margin: 0 0 4px; font-size: 1.7rem; }
.tarjeta-caja p { color: var(--tenue); line-height: 1.35; }
.tarjeta-caja .fuerza { margin-top: 8px; color: var(--tenue); font-size: .9rem; }
.fuerza i { font-style: normal; filter: grayscale(1); opacity: .35; }
.tarjeta-caja .extra { color: var(--verde); font-weight: 600; }
.rareza { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; color: #170d22; background: var(--c); }
@keyframes entra { from { transform: scale(.6); opacity: 0; } }
.boton { border: 0; border-radius: 999px; padding: 12px 26px; font-weight: 700; font-size: 1.05rem; background: var(--naranja); color: #2a1300;
  box-shadow: 0 4px 0 #b55400, var(--sombra); }
.boton:active { transform: translateY(3px); box-shadow: 0 1px 0 #b55400; }
.boton.grande { font-size: 1.3rem; padding: 15px 40px; }

/* bestiario */
.bestiario { position: fixed; inset: 0; z-index: 50; background: linear-gradient(var(--morado), var(--noche)); overflow-y: auto;
  padding: calc(14px + var(--arriba)) 14px calc(20px + var(--abajo)); }
.bestiario[hidden] { display: none; }
.bestiario header { display: flex; justify-content: space-between; align-items: center; }
.bestiario h2 { margin: 0; }
.resumen { color: var(--tenue); font-size: .9rem; }
.fichas { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.ficha { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 18px;
  border: 2px solid color-mix(in srgb, var(--r) 60%, transparent); background: rgba(255, 255, 255, .05); }
.ficha-dibujo svg { width: 76px; height: 76px; }
.ficha small { color: var(--tenue); }
.ficha.oculta { border-color: rgba(255, 255, 255, .1); }
.ficha.oculta svg { filter: brightness(0); opacity: .55; }
.ficha.oculta b { color: var(--tenue); }

/* portada */
.portada { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; overflow-y: auto;
  background: radial-gradient(circle at 50% 20%, #4a2a6e, var(--noche) 70%); transition: opacity .6s; }
.portada.fuera { opacity: 0; pointer-events: none; }
.portada-caja { max-width: 420px; text-align: center; }
.portada-logo { font-size: 3.4rem; animation: flotar 3s ease-in-out infinite; }
.portada h1 { margin: 4px 0; font-size: 2.3rem; color: var(--naranja2); text-shadow: 0 0 24px rgba(255, 138, 31, .6); }
.sub { color: var(--tenue); font-size: 1.1rem; margin-top: 0; }
.casa-aviso { background: rgba(255, 210, 63, .15); border: 1px solid var(--oro); color: var(--oro); padding: 10px; border-radius: 14px; }
.reglas { list-style: none; padding: 0; text-align: left; display: grid; gap: 10px; margin: 20px 0 24px; }
.reglas li { display: flex; gap: 10px; align-items: flex-start; background: rgba(255, 255, 255, .06); padding: 10px 12px; border-radius: 14px; line-height: 1.3; }
.reglas b { font-size: 1.3rem; }
.letra-chica { color: var(--tenue); font-size: .78rem; margin-top: 18px; opacity: .8; }

/* ============ el encuentro ============ */
.encuentro { position: fixed; inset: 0; z-index: 70; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background: var(--noche); animation: aparece .35s ease; }
.encuentro.cerrando { opacity: 0; transition: opacity .25s; }
@keyframes aparece { from { opacity: 0; transform: scale(1.06); } }
.enc-camara { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.con-camara .enc-camara { display: block; }
.con-camara .enc-noche { display: none; }
.enc-noche { position: absolute; inset: 0; background: linear-gradient(#1b0f33, #3a1f4f 55%, #241433 56%, #120a1a); }
.enc-luna { position: absolute; width: 90px; height: 90px; border-radius: 50%; right: 14%; top: 12%; background: #fff4d6;
  box-shadow: 0 0 60px 20px rgba(255, 244, 214, .35); }
.enc-casas { position: absolute; left: 0; right: 0; top: 38%; height: 18%;
  background: linear-gradient(transparent 0 30%, #120a1a 30%) 0 0 / 90px 100%, linear-gradient(135deg, transparent 50%, #120a1a 50%) 0 0 / 45px 30%,
    linear-gradient(225deg, transparent 50%, #120a1a 50%) 45px 0 / 45px 30%; background-repeat: repeat-x; opacity: .9; }
.enc-top { position: absolute; top: calc(10px + var(--arriba)); left: 12px; right: 12px; display: flex; justify-content: space-between; z-index: 3; }
.enc-nombre { position: absolute; top: calc(60px + var(--arriba)); left: 0; right: 0; text-align: center; z-index: 3; text-shadow: 0 2px 8px #000; }
.enc-nombre small { display: block; color: var(--oro); font-weight: 600; }
.enc-nombre b { font-size: 1.6rem; margin-right: 8px; }
.enc-monstruo { position: absolute; left: 0; top: 0; will-change: transform; }
.enc-monstruo svg { width: 100%; height: 100%; position: relative; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); }
.enc-monstruo.epico svg { filter: drop-shadow(0 0 16px #c38bff); }
.enc-monstruo.legendario svg { filter: drop-shadow(0 0 22px #ffd23f); }
.enc-piso { position: absolute; left: 18%; right: 18%; bottom: 0; height: 12%; border-radius: 50%; background: rgba(0, 0, 0, .35); filter: blur(6px); }
.enc-monstruo.absorbido { transition: transform .38s cubic-bezier(.6, 0, .9, .5), filter .38s; filter: brightness(3); }
.enc-monstruo.huyendo { animation: huye 1s ease-in forwards; }
@keyframes huye { to { opacity: 0; translate: 0 -60vh; } }
/* la Trampa Atrapasustos */
.enc-trampa { position: absolute; left: 0; top: 0; width: 120px; height: 82px; z-index: 4; touch-action: none; cursor: grab;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .55)); transform-origin: 50% 50%; }
.enc-trampa.agarrada { cursor: grabbing; filter: drop-shadow(0 0 18px rgba(255, 138, 31, .9)); }
.enc-trampa svg { width: 100%; height: 100%; overflow: visible; }
.enc-trampa .t-tapa { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); transform-box: fill-box; }
.enc-trampa .t-izq { transform-origin: 0% 100%; }
.enc-trampa .t-der { transform-origin: 100% 100%; }
.enc-trampa.abierta .t-izq { transform: rotate(-105deg); }
.enc-trampa.abierta .t-der { transform: rotate(105deg); }
.enc-trampa .t-luz { opacity: 0; transition: opacity .2s; }
.enc-trampa.abierta .t-luz { opacity: 1; }
.enc-trampa.abierta .t-foco, .enc-trampa.lista .t-foco { animation: foco .25s steps(2) infinite; }
.enc-trampa.lista .t-foco { fill: #7cf2a2; animation-duration: .6s; }
.enc-trampa.sacude svg { animation: sacude .6s ease; }
@keyframes foco { 50% { fill: #fff3b0; } }
@keyframes sacude { 20% { transform: translateX(-8px) rotate(-6deg); } 50% { transform: translateX(7px) rotate(5deg); } 80% { transform: translateX(-3px); } }
.enc-rayo { position: absolute; left: 0; top: 0; width: 200px; z-index: 2; pointer-events: none; mix-blend-mode: screen;
  background: repeating-linear-gradient(to top, rgba(255, 255, 255, .0) 0 14px, rgba(255, 255, 255, .35) 14px 18px),
    linear-gradient(to top, rgba(255, 243, 176, 1), rgba(255, 210, 63, .6) 45%, rgba(195, 139, 255, .25));
  background-size: 100% 36px, 100% 100%; animation: energia .4s linear infinite;
  clip-path: polygon(calc(12% + var(--sesgo, 0px)) 0, calc(88% + var(--sesgo, 0px)) 0, 62% 100%, 38% 100%);
  filter: blur(2px); transition: opacity .1s; }
@keyframes energia { to { background-position: 0 -36px, 0 0; } }
.enc-rayo[hidden] { display: none; }
.enc-jalar { position: absolute; left: 50%; bottom: calc(18px + var(--abajo)); transform: translateX(-50%); z-index: 5; width: 150px; height: 150px;
  border-radius: 50%; border: 0; display: grid; place-content: center; gap: 2px; font-weight: 700; font-size: .95rem; color: #2a1300;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background: radial-gradient(circle, var(--naranja2) 0 58%, transparent 59%),
    conic-gradient(var(--oro) calc(var(--p, 0) * 360deg), rgba(255, 255, 255, .15) 0);
  box-shadow: 0 0 30px rgba(255, 138, 31, .5); }
.enc-jalar .enc-cuenta { font-size: 2.6rem; line-height: 1; }
.enc-jalar span { font-size: .9rem; }
.enc-jalar.toque { animation: toque .15s ease; }
@keyframes toque { 50% { transform: translateX(-50%) scale(.9); box-shadow: 0 0 60px rgba(255, 210, 63, 1); } }
.enc-fuerza { display: block; font-size: .95rem; margin-top: 2px; letter-spacing: 1px; }
.enc-fuerza i { font-style: normal; filter: grayscale(1); opacity: .35; }
.enc-jalar[hidden] { display: none; }
.enc-pista { position: absolute; left: 0; right: 0; bottom: calc(160px + var(--abajo)); text-align: center; color: var(--texto); opacity: .85;
  text-shadow: 0 2px 6px #000; animation: latido 1.6s ease-in-out infinite; z-index: 3; }
.enc-pista[hidden] { display: none; }
.enc-mensaje { position: absolute; left: 16px; right: 16px; top: 17%; text-align: center; font-size: 2rem; font-weight: 700; z-index: 5; pointer-events: none;
  opacity: 0; transform: scale(.6); transition: .25s cubic-bezier(.2, 1.5, .4, 1); text-shadow: 0 3px 12px #000; }
.enc-mensaje.visible { opacity: 1; transform: scale(1); }
.enc-mensaje.bueno { color: var(--oro); }
.enc-flecha { position: absolute; left: 0; top: 0; width: 48px; height: 48px; display: grid; place-items: center; font-size: 2rem; color: var(--oro);
  text-shadow: 0 0 10px #000; z-index: 3; pointer-events: none; }
.enc-flecha[hidden] { display: none; }
.chispa { position: absolute; width: 10px; height: 10px; border-radius: 50%; z-index: 6; pointer-events: none; animation: chispa .9s ease-out forwards; }
@keyframes chispa { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }

/* ============ pestañas del bestiario, retos y estadísticas ============ */
.pestanas { display: flex; gap: 6px; margin: 10px 0 4px; }
.pestanas button { flex: 1; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); color: var(--tenue); border-radius: 12px; padding: 8px 4px; font-weight: 600; }
.pestanas button.activa { background: var(--naranja); color: #2a1300; border-color: var(--naranja); }
.centrado { text-align: center; margin: 16px 0 6px; }
.retos { display: grid; gap: 8px; }
.reto { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.reto.hecho { border-color: var(--oro); background: rgba(255, 210, 63, .1); }
.reto-emoji { font-size: 1.8rem; width: 40px; text-align: center; }
.reto.hecho .reto-emoji { filter: drop-shadow(0 0 8px var(--oro)); }
.reto-texto { flex: 1; min-width: 0; }
.reto-texto b { display: block; }
.reto-texto small { color: var(--tenue); }
.reto-barra { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); margin-top: 6px; overflow: hidden; }
.reto-barra i { display: block; height: 100%; background: linear-gradient(90deg, var(--naranja), var(--oro)); border-radius: 3px; transition: width .4s; }
.reto-num { font-weight: 700; color: var(--naranja2); white-space: nowrap; font-size: .9rem; }
.reto.hecho .reto-num { color: var(--oro); font-size: 1.3rem; }
.stats { white-space: pre-wrap; font: 500 .85rem/1.5 ui-monospace, Consolas, monospace; background: rgba(0, 0, 0, .3); padding: 12px; border-radius: 14px; color: var(--texto); user-select: text; -webkit-user-select: text; }
.tarjeta-caja.insignia .insignia-emoji { font-size: 6rem; line-height: 1.2; filter: drop-shadow(0 0 24px var(--oro)); animation: flotar 2.4s ease-in-out infinite; }
.tenue { color: var(--tenue); }

/* ============ modo familia ============ */
.capa.familia-boton.activo { border-color: var(--verde); box-shadow: 0 0 12px rgba(124, 242, 162, .45), var(--sombra); }
.capa.familia-boton.activo small { color: var(--verde); }
.panel-familia .campo { display: block; font-weight: 600; margin: 10px 0 6px; }
.panel-familia input { display: block; width: 100%; margin-top: 6px; font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid #5d4279; background: rgba(0, 0, 0, .25); color: #fff; }
.iconos { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.iconos .icono { font-size: 1.4rem; width: 46px; height: 46px; border-radius: 12px; border: 2px solid transparent; background: rgba(255, 255, 255, .06); }
.iconos .icono.elegido { border-color: var(--naranja); background: rgba(255, 138, 31, .2); }
.o { text-align: center; color: var(--tenue); margin: 14px 0 6px; }
.fila { display: flex; gap: 8px; align-items: center; }
.fila input { flex: 1; margin: 0 !important; text-transform: uppercase; letter-spacing: .15em; }
.codigo { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0; }
.codigo b { font-size: 2rem; letter-spacing: .25em; color: var(--oro); }
.qr { text-align: center; margin: 8px 0; }
.qr img { width: 180px; image-rendering: pixelated; border-radius: 12px; }
.miembros { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.miembros li { background: rgba(255, 255, 255, .05); padding: 8px 12px; border-radius: 12px; }
.companero { display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.companero-icono { font-size: 30px; filter: drop-shadow(0 0 8px #7cf2a2) drop-shadow(0 3px 4px rgba(0, 0, 0, .6)); animation: flotar 2.4s ease-in-out infinite; }
.companero-nombre { font-size: .72rem; font-weight: 700; background: rgba(23, 13, 34, .85); color: var(--verde); padding: 2px 8px; border-radius: 999px; margin-top: -4px; white-space: nowrap; }

/* sin GPS */
.gps { position: fixed; left: 12px; right: 12px; bottom: calc(160px + var(--abajo)); z-index: 40; }
.gps[hidden] { display: none; }
.gps-caja { background: rgba(42, 24, 64, .96); border: 2px solid var(--naranja); border-radius: 20px; padding: 14px 16px; box-shadow: var(--sombra); text-align: center; }
.gps-caja h3 { margin: 0 0 6px; }
.gps-caja p { margin: 6px 0; line-height: 1.35; }
.gps-caja .boton { margin: 8px 6px 4px; }
.capa.gps-boton { border-color: var(--oro); }
.capa.gps-boton small { color: var(--oro); }
.alerta.sospecha { background: #5d34a0; border: 1px solid var(--oro); }
.alerta.sospecha + .alerta { top: calc(190px + var(--arriba)); }
