/* App de visitantes de la Festa do Marisco.
   Movil primero. La pantalla principal no debe hacer scroll: la botonera reparte
   el alto disponible entre los botones que haya, asi que un boton de mas encoge
   en vez de desbordar. */

:root {
    --fondo:     #12141a;
    --fondo-alt: #1b1f28;
    --amarillo:  #f6c92b;
    --tinta:     #14161a;
    --texto:     #f2f3f5;
    --texto-sub: #a8adb8;
    --radio:     999px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: var(--fondo);
    color: var(--texto);
    font-family: "Helvetica Neue", Arial, system-ui, sans-serif;
    -webkit-text-size-adjust: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

.app {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3vh, 28px);
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
    min-height: 0;
}

/* ---------- Marca ---------- */

.marca {
    text-align: center;
    flex: 0 0 auto;
}

.marca-logo {
    width: clamp(72px, 18vh, 132px);
    height: auto;
    display: block;
    margin: 0 auto clamp(6px, 1.5vh, 14px);
}

.marca-titulo {
    margin: 0;
    font-size: clamp(1.6rem, 7vw, 2.4rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    line-height: 1.05;
}

.marca-sub {
    margin: 4px 0 0;
    color: var(--amarillo);
    font-size: clamp(0.85rem, 3.4vw, 1.05rem);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* ---------- Botonera ---------- */

.botonera {
    flex: 1 1 auto;
    display: grid;
    grid-template-rows: repeat(var(--n, 6), minmax(0, 1fr));
    gap: clamp(8px, 1.6vh, 16px);
    min-height: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.boton {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 18px;
    background: var(--amarillo);
    color: var(--tinta);
    border-radius: var(--radio);
    text-decoration: none;
    font-size: clamp(0.95rem, 4.2vw, 1.25rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    transition: transform .08s ease, filter .15s ease;
}

.boton:active { transform: scale(.98); filter: brightness(.94); }

.boton-volver {
    background: transparent;
    color: var(--texto-sub);
    border: 2px solid var(--fondo-alt);
    font-weight: 700;
}

/* ---------- Bloques de contenido ---------- */

.diagnostico, .aviso {
    background: var(--fondo-alt);
    border-radius: 18px;
    padding: 18px;
}

.diagnostico h2, .aviso h1 {
    margin: 0 0 12px;
    font-size: 1.1rem;
    color: var(--amarillo);
}

.diagnostico dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    font-size: .9rem;
}

.diagnostico dt { color: var(--texto-sub); }
.diagnostico dd { margin: 0; font-weight: 700; word-break: break-all; }

.nota {
    margin: 14px 0 0;
    font-size: .82rem;
    color: var(--texto-sub);
}

/* ---------- Pie ---------- */

.app-pie {
    flex: 0 0 auto;
    text-align: center;
    padding-top: 14px;
}

.idiomas {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.idiomas a {
    color: var(--texto-sub);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    padding: 4px 2px;
}

.idiomas a.activo { color: var(--amarillo); }

.creditos {
    margin: 10px 0 0;
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--texto-sub);
}

/* ---------- Pantallas con contenido (sorteos, bases) ----------
   A diferencia de la principal, estas si pueden hacer scroll. */

.marca-compacta .marca-logo { width: clamp(56px, 11vh, 88px); }
.marca-compacta .marca-titulo { font-size: clamp(1.3rem, 5.5vw, 1.9rem); }

.lista {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2vh, 18px);
}

.tarjeta {
    background: var(--fondo-alt);
    border-radius: 18px;
    padding: 16px 18px;
}

.tarjeta-cabecera {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.tarjeta h2 {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.25;
}

.tarjeta p { margin: 0 0 10px; font-size: .92rem; line-height: 1.45; }

.etiqueta {
    flex: 0 0 auto;
    background: #2a2f3a;
    color: var(--texto-sub);
    border-radius: var(--radio);
    padding: 3px 10px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.etiqueta-abierta { background: var(--amarillo); color: var(--tinta); }

.premio { color: var(--texto); }
.ganador { background: #22273212; border-top: 1px solid #2a2f3a; padding-top: 10px; }
.ganador .ig { color: var(--amarillo); }

.enlace-bases { margin: 6px 0 0; }
.enlace-bases a, .texto-legal a { color: var(--amarillo); font-size: .84rem; }

/* ---------- Formulario ---------- */

.formulario {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--fondo-alt);
    border-radius: 18px;
    padding: 18px;
}

.campo { display: flex; flex-direction: column; gap: 6px; }

.campo > span {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--texto-sub);
}

.campo input {
    width: 100%;
    /* 16px o mayor: por debajo, iOS hace zoom al enfocar el campo. */
    font-size: 16px;
    padding: 12px 14px;
    border: 2px solid #2a2f3a;
    border-radius: 12px;
    background: #0e1015;
    color: var(--texto);
}

.campo input:focus { outline: none; border-color: var(--amarillo); }

.casilla {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .86rem;
    line-height: 1.4;
    color: var(--texto-sub);
}

.casilla input { width: 1.15em; height: 1.15em; margin-top: .15em; flex: 0 0 auto; accent-color: var(--amarillo); }
.casilla a { color: var(--amarillo); }

.formulario .boton { border: 0; cursor: pointer; font-family: inherit; }

/* Señuelo antispam: invisible para las personas, presente para los robots.
   Sin display:none, que algunos robots detectan. */
.senuelo {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Avisos ---------- */

.aviso ul { margin: 0; padding-left: 18px; }
.aviso li { margin-bottom: 4px; }
.aviso-error { border-left: 4px solid #e5484d; }
.aviso-ok { border-left: 4px solid var(--amarillo); }

.texto-legal {
    background: var(--fondo-alt);
    border-radius: 18px;
    padding: 18px;
    font-size: .88rem;
    line-height: 1.55;
    color: var(--texto-sub);
}

.texto-legal h2 { font-size: 1rem; color: var(--texto); margin: 18px 0 8px; }
.texto-legal p { margin: 0 0 10px; }

/* ---------- Franja en vivo de la portada ----------
   Alto fijo: la botonera es la que reparte el alto sobrante, así que los seis
   botones siguen entrando sin scroll. */

.franja {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 14px;
    background: var(--fondo-alt);
    border-radius: 14px;
    text-decoration: none;
    color: var(--texto);
    overflow: hidden;
}

.franja-etiqueta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--texto-sub);
}

.franja-viva { color: var(--amarillo); }

.franja-texto {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .86rem;
    font-weight: 700;
    /* Una sola línea: los títulos largos se cortan en vez de romper el alto. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.franja-flecha {
    flex: 0 0 auto;
    color: var(--texto-sub);
    font-size: 1.3rem;
    line-height: 1;
}

/* Punto que late, para que se vea que es algo que está pasando ahora. */
.punto {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--amarillo);
    animation: latido 2s ease-in-out infinite;
}

@keyframes latido {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .45; transform: scale(.8); }
}

@media (prefers-reduced-motion: reduce) {
    .punto { animation: none; }
}

/* ---------- Pantalla de actividades ---------- */

.bloque { margin-bottom: 4px; }

.bloque-titulo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--texto-sub);
}

.bloque-vivo { color: var(--amarillo); }

.bloque-vacio {
    margin: 0;
    padding: 14px 16px;
    background: var(--fondo-alt);
    border-radius: 14px;
    font-size: .88rem;
    color: var(--texto-sub);
}

.acto {
    display: flex;
    gap: 12px;
    background: var(--fondo-alt);
    border-radius: 14px;
    padding: 13px 15px;
    margin-bottom: 8px;
}

.acto-agora {
    border-left: 4px solid var(--amarillo);
    background: #232838;
}

.acto-hora {
    flex: 0 0 52px;
    font-size: .95rem;
    font-weight: 800;
    color: var(--amarillo);
    padding-top: 1px;
}

.acto-todoodia { font-size: .7rem; }

.acto-texto { flex: 1 1 auto; min-width: 0; }

.acto-texto h3 {
    margin: 0 0 4px;
    font-size: .98rem;
    line-height: 1.25;
    font-weight: 700;
}

.acto-detalle {
    font-size: .84rem;
    line-height: 1.45;
    color: var(--texto-sub);
}

.acto-detalle p { margin: 0; }

.acto-empezou {
    margin: 6px 0 0;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--amarillo);
}

.conta-atras {
    margin: 0 0 2px;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--amarillo);
}

.conta-fecha {
    margin: 0 0 12px;
    font-size: .84rem;
    color: var(--texto-sub);
}

.sello {
    margin: 4px 0 0;
    text-align: center;
    font-size: .7rem;
    color: var(--texto-sub);
}

/* ---------- Grupo desplegado en una sola fila ----------
   Redes sociales ocupa una fila de la rejilla y se reparte entre Facebook e
   Instagram, cada uno directo a su red. */

.boton-par {
    display: flex;
    gap: clamp(6px, 1.4vw, 12px);
    min-height: 0;
}

.boton-medio {
    flex: 1 1 0;
    /* 0 de base para que los dos midan lo mismo aunque el texto no. */
    min-width: 0;
    padding-inline: 10px;
    font-size: clamp(.8rem, 3.4vw, 1.05rem);
    gap: 8px;
}

.boton-medio span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.icono {
    flex: 0 0 auto;
    width: clamp(17px, 4.6vw, 22px);
    height: auto;
}

/* ---------- Visor de carteles ----------
   Se abre encima de la app para no sacar al visitante de ella. */

body.sin-scroll { overflow: hidden; }

.visor {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(8, 9, 13, .96);
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
}

.visor[hidden] { display: none; }

.visor-marco {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    overflow: auto;
    /* Con la imagen ampliada se arrastra para moverse por el cartel. */
    -webkit-overflow-scrolling: touch;
}

.visor-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    cursor: zoom-in;
    transition: opacity .2s ease;
}

/* Ampliada: se sale del marco a propósito, para que haya algo que recorrer. */
.visor-marco-zoom { align-items: flex-start; justify-content: flex-start; }

.visor-img-zoom {
    max-width: none;
    max-height: none;
    width: 250%;
    cursor: zoom-out;
}

.visor-cargando .visor-img { opacity: 0; }

.visor-cargando .visor-marco::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid var(--fondo-alt);
    border-top-color: var(--amarillo);
    border-radius: 50%;
    animation: girar .8s linear infinite;
}

@keyframes girar { to { transform: rotate(360deg); } }

.visor-cerrar {
    flex: 0 0 auto;
    align-self: flex-end;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--fondo-alt);
    color: var(--texto);
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.visor-cerrar:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; }

.visor-pista {
    flex: 0 0 auto;
    margin: 0;
    font-size: .74rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--texto-sub);
}

@media (prefers-reduced-motion: reduce) {
    .visor-cargando .visor-marco::after { animation: none; }
}

/* ---------- Mapa 3D del recinto (/mapa) ----------
   Pantalla fija a toda ventana, encima de la plantilla. El lienzo de three.js y
   la capa de etiquetas van abajo; herramientas, ficha y pista, por encima. */

.mapa {
    --mapa-vermello: #d6361f;
    --mapa-crema:    #f4eee4;
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    background: var(--fondo);
    color: var(--texto);
}

.mapa-barra {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: max(10px, env(safe-area-inset-top)) 12px 10px;
}

.mapa-icono {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--fondo-alt);
    color: var(--texto);
}

.mapa-titulo {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: clamp(1rem, 4.6vw, 1.3rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mapa-plano {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 2px solid var(--fondo-alt);
    border-radius: var(--radio);
    color: var(--texto-sub);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
}

.mapa-lenzo {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    touch-action: none;
    background: var(--fondo);
}

.mapa-vista {
    position: absolute;
    inset: 0;
}

.mapa-vista[hidden] { display: none; }

.mapa-vista canvas {
    position: absolute;
    inset: 0;
    display: block;
    touch-action: none;
    outline: none;
}

.mapa-capa-etiquetas {
    position: absolute;
    z-index: 1;     /* contexto propio: CSS2DRenderer pone z-index altos a cada etiqueta */
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Las etiquetas no capturan el puntero: asi no estorban al arrastrar. El toque
   sobre ellas lo resuelve mapa3d.js mirando sus rectangulos. */
.mapa-capa-etiquetas * { pointer-events: none !important; }

.mapa-etiqueta {
    padding: 3px 8px;
    border: 1.5px solid var(--mapa-vermello);
    border-radius: var(--radio);
    background: rgba(255, 255, 255, 0.94);
    color: #b3261e;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.mapa-etiqueta-1 {
    background: var(--mapa-vermello);
    color: #fff;
    font-size: 12px;
}

.mapa-num {
    min-width: 16px;
    padding: 0 3px;
    border: 1px solid var(--mapa-vermello);
    border-radius: 4px;
    background: #fff;
    color: var(--mapa-vermello);
    font-size: 10px;
    font-weight: 800;
    line-height: 14px;
    text-align: center;
}

/* Pin del punto elegido: la punta cae justo en el sitio. */
.mapa-pin { width: 0; height: 0; }

.mapa-pin::after {
    content: "";
    position: absolute;
    left: -7px;
    top: -3px;
    width: 14px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.28);
}

.mapa-pin span {
    position: absolute;
    left: -14px;
    bottom: 6px;
    width: 28px;
    height: 28px;
    border: 3px solid var(--tinta);
    border-radius: 50% 50% 50% 0;
    background: var(--amarillo);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    transform: rotate(-45deg);
    animation: mapa-bote 1.3s ease-in-out infinite;
}

@keyframes mapa-bote {
    0%, 100% { transform: translateY(0) rotate(-45deg); }
    50%      { transform: translateY(-7px) rotate(-45deg); }
}

.mapa-cargando {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--texto-sub);
    font-size: 0.9rem;
}

.mapa-cargando span {
    width: 30px;
    height: 30px;
    border: 3px solid var(--fondo-alt);
    border-top-color: var(--amarillo);
    border-radius: 50%;
    animation: girar .8s linear infinite;
}

.mapa-listo .mapa-cargando,
.mapa-sen3d .mapa-cargando { display: none; }

.mapa-pista {
    position: absolute;
    z-index: 4;
    top: 12px;
    left: 50%;
    width: max-content;
    max-width: calc(100% - 96px);
    margin: 0;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(18, 20, 26, 0.88);
    color: var(--texto);
    font-size: 0.85rem;
    line-height: 1.3;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
}

.mapa-pista[hidden] { display: none; }

.mapa-ferramentas {
    position: absolute;
    z-index: 4;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mapa-ferramenta {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: rgba(18, 20, 26, 0.86);
    color: var(--texto);
    cursor: pointer;
}

.mapa-ferramenta.activo { background: var(--amarillo); color: var(--tinta); }

.mapa-ficha {
    position: absolute;
    z-index: 4;
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: 520px;
    margin: 0 auto;
    padding: 14px 100px 14px 16px;
    border-radius: 16px;
    background: var(--fondo-alt);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    animation: mapa-sube .22s ease-out;
}

.mapa-ficha[hidden] { display: none; }

@keyframes mapa-sube {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

.mapa-ficha-titulo {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
}

.mapa-ficha-sub {
    margin: 4px 0 0;
    color: var(--amarillo);
    font-size: 0.88rem;
    font-weight: 700;
}

.mapa-ficha-texto {
    margin: 6px 0 0;
    color: var(--texto-sub);
    font-size: 0.9rem;
    line-height: 1.35;
}

.mapa-ficha-sub[hidden],
.mapa-ficha-texto[hidden] { display: none; }

.mapa-ficha-centrar,
.mapa-ficha-pechar {
    position: absolute;
    top: 10px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.mapa-ficha-centrar { right: 56px; background: var(--amarillo); color: var(--tinta); }
.mapa-ficha-pechar  { right: 10px; background: var(--fondo); color: var(--texto); font-size: 1.6rem; line-height: 1; }

.mapa-menu {
    flex: 0 0 auto;
    padding: 10px 0 max(10px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--fondo-alt);
    background: var(--fondo);
}

.mapa-cats {
    display: flex;
    gap: 6px;
    max-width: 560px;
    margin: 0 auto;
    padding: 0 12px 10px;
}

.mapa-cat {
    flex: 1 1 0;
    min-height: 38px;
    padding: 6px 8px;
    border: 2px solid var(--fondo-alt);
    border-radius: var(--radio);
    background: transparent;
    color: var(--texto-sub);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
}

.mapa-cat.activa { border-color: var(--texto); background: var(--texto); color: var(--tinta); }

.mapa-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 12px 2px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.mapa-chips::-webkit-scrollbar { display: none; }

.mapa-chip {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 8px 15px;
    border: 0;
    border-radius: var(--radio);
    background: var(--fondo-alt);
    color: var(--texto);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    scroll-snap-align: start;
    cursor: pointer;
}

.mapa-chip.activo { background: var(--amarillo); color: var(--tinta); }

.mapa-alternativa {
    position: absolute;
    inset: 0;
    z-index: 5;
    overflow: auto;
    padding: 16px;
    background: var(--fondo);
    text-align: center;
}

.mapa-alternativa[hidden] { display: none; }
.mapa-alternativa p { margin: 0 0 12px; color: var(--texto-sub); }
.mapa-alternativa img { display: block; width: 100%; max-width: 700px; height: auto; margin: 0 auto; border-radius: 8px; }

.mapa-sen3d .mapa-ferramentas,
.mapa-sen3d .mapa-menu { display: none; }

@media (prefers-reduced-motion: reduce) {
    .mapa-pin span,
    .mapa-ficha { animation: none; }
}

/* Onde estou: punto azul con halo, y aviso flotante */
.mapa-eu { width: 0; height: 0; }

.mapa-eu span {
    position: absolute;
    left: -9px;
    top: -9px;
    width: 18px;
    height: 18px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #2f7cf6;
    box-shadow: 0 0 0 0 rgba(47, 124, 246, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
    animation: mapa-latexo 2s ease-out infinite;
}

@keyframes mapa-latexo {
    0%   { box-shadow: 0 0 0 0 rgba(47, 124, 246, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35); }
    70%  { box-shadow: 0 0 0 16px rgba(47, 124, 246, 0), 0 2px 6px rgba(0, 0, 0, 0.35); }
    100% { box-shadow: 0 0 0 0 rgba(47, 124, 246, 0), 0 2px 6px rgba(0, 0, 0, 0.35); }
}

.mapa-gps.activo { background: #2f7cf6; color: #fff; }
.mapa-gps.buscando svg { animation: mapa-busca 1s ease-in-out infinite alternate; }

@keyframes mapa-busca { from { opacity: 1; } to { opacity: 0.3; } }

.mapa-ferramenta[hidden] { display: none; }

.mapa-norte svg { transition: transform .15s linear; }

.mapa-aviso {
    position: absolute;
    z-index: 5;
    left: 12px;
    right: 68px;
    top: 12px;
    margin: 0;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(18, 20, 26, 0.92);
    color: var(--texto);
    font-size: 0.88rem;
    line-height: 1.35;
    pointer-events: none;
}

.mapa-aviso[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
    .mapa-eu span,
    .mapa-gps.buscando svg { animation: none; }
}

/* Actos en el mapa: "AGORA" late en rojo; lo siguiente, en blanco con su hora */
.mapa-evento {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 200px;
    padding: 4px 10px 4px 4px;
    border-radius: var(--radio);
    background: #fff;
    color: var(--tinta);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
}

.mapa-evento b {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: var(--radio);
    background: var(--tinta);
    color: #fff;
    font-size: 10.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mapa-evento span { overflow: hidden; text-overflow: ellipsis; }

.mapa-evento-agora b {
    background: var(--mapa-vermello);
    animation: mapa-agora 1.4s ease-in-out infinite;
}

@keyframes mapa-agora { 50% { opacity: 0.55; } }

.mapa-cat-agora {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-color: var(--mapa-vermello);
}
.mapa-cat-agora.activa { background: var(--mapa-vermello); border-color: var(--mapa-vermello); color: #fff; }
.mapa-cat[hidden] { display: none; }

.mapa-cat-agora .punto {
    display: inline-block;
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    margin-right: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: mapa-agora 1.4s ease-in-out infinite;
}

.mapa-chip-evento b {
    margin-right: 8px;
    font-weight: 800;
    color: var(--amarillo);
}

.mapa-chip-evento.mapa-chip-agora b { color: #ff6b57; text-transform: uppercase; }
.mapa-chip-evento.activo b { color: var(--tinta); }

@media (prefers-reduced-motion: reduce) {
    .mapa-evento-agora b,
    .mapa-cat-agora .punto { animation: none; }
}

/* ---------- Sorteos: imagen encima del titulo y participacion en Instagram ----------
   La imagen va en un recuadro BLANCO a todo el ancho de la tarjeta: los logos
   suelen tener fondo transparente y letras oscuras, que sobre el fondo oscuro de
   la app desaparecerian. object-fit:contain para que un logo no se recorte. */
.tarjeta-con-imagen {
    padding-top: 0;
    overflow: hidden;
}
.tarjeta-imagen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    margin: 0 -18px 14px;
    padding: 14px;
    border-radius: 18px 18px 0 0;
}
.tarjeta-imagen img {
    display: block;
    max-width: 100%;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
}
/* En la pagina del formulario va suelta bajo el logo de la Festa, como tarjeta. */
.tarjeta-imagen-cabecera {
    margin: 4px auto 14px;
    max-width: 420px;
    border-radius: 18px;
}
/* El boton de Instagram saca de la app: la flecha lo anuncia. */
.boton-instagram::after {
    content: "\2197";
    font-size: 1.1em;
    line-height: 1;
}
