/* ==========================================================================
   Manq'a Tinku · estilos
   ========================================================================== */

:root {
  --naranja: #F27329;
  --morado: #85518C;
  --verde: #3A9D3F;
  --azul: #1E5AA8;
  --rosa: #E0336F;
  --turquesa: #168C80;
  --marino: #023E73;
  --amarillo: #F2C12E;
  --crema: #FFF8EC;
  --madera-oscura: #6B3E1E;
  --madera-media: #A8693A;
  --texto: #2B1A0E;
  --fuente-titulo: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --fuente-texto: "Dosis", "Segoe UI", system-ui, sans-serif;
  --cursor-mano: url("../img/cursor-mano.png") 11 1, pointer;
  --cursor-clic: url("../img/cursor-mano-clic.png") 11 1, pointer;
  --sombra-suave: 0 10px 30px rgba(60, 30, 10, .18);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--fuente-texto);
  color: var(--texto);
  background: #9DD3F2;
  overflow-x: hidden;
  cursor: var(--cursor-mano);
}

button, a, [data-evento], .leaflet-marker-icon, .leaflet-interactive, .leaflet-container a {
  cursor: var(--cursor-mano) !important;
}
button:active, .area:active { cursor: var(--cursor-clic) !important; }
.leaflet-container, .leaflet-grab { cursor: var(--cursor-mano); }
.leaflet-dragging .leaflet-grab { cursor: grabbing; }

button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 3px; }

/* ---------------------------------------------------------------- escena */
.escena { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.cielo {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 80% 18%, rgba(255, 244, 214, .9), transparent 70%),
    linear-gradient(180deg, #6EC1EE 0%, #A9DDF6 40%, #F6E6C6 72%, #F3D3A1 100%);
}

.montanas { position: absolute; left: 0; right: 0; bottom: 24vh; width: 100%; height: 34vh; }
.m-lejos { fill: #9FC2DD; opacity: .75; }
.m-illimani { fill: #7FA6C8; }
.m-nieve { fill: #fff; opacity: .95; }

.postes span {
  position: absolute; top: 0; bottom: 18vh; width: clamp(26px, 3.2vw, 46px);
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.06) 0 3px, transparent 3px 9px),
    linear-gradient(90deg, #7A4520, #B87A44 45%, #8A522A);
  box-shadow: inset -6px 0 10px rgba(0,0,0,.25), 6px 0 18px rgba(60,30,10,.25);
}
.postes span:first-child { left: 2.5vw; }
.postes span:last-child { right: 2.5vw; }

/* toldo de aguayo con borde ondulado */
.toldo {
  position: absolute; top: 0; left: -2%; right: -2%; height: clamp(70px, 11vh, 110px);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(90deg,
      #C8102E 0 22px, #F27329 22px 34px, #F2C12E 34px 44px, #3A9D3F 44px 58px,
      #1E5AA8 58px 74px, #85518C 74px 84px, #E0336F 84px 102px, #168C80 102px 112px);
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 18px) no-repeat,
    radial-gradient(circle 19px at 50% 0, #000 96%, transparent) bottom / 38px 18px repeat-x;
          mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 18px) no-repeat,
    radial-gradient(circle 19px at 50% 0, #000 96%, transparent) bottom / 38px 18px repeat-x;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.25));
}
.toldo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.28), transparent 35%, rgba(255,255,255,.12) 70%, rgba(0,0,0,.15));
}

/* focos colgantes */
.focos span {
  position: absolute; top: clamp(70px, 11vh, 110px); left: var(--x);
  width: 2px; height: clamp(40px, 8vh, 80px); background: #3a2a1e;
  transform-origin: top center; animation: columpio 5s ease-in-out infinite; animation-delay: var(--d);
}
.focos span::after {
  content: ""; position: absolute; left: 50%; bottom: -22px; width: 22px; height: 28px; margin-left: -11px;
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 50% 40%, #fff, #FFE59A 40%, #F2C12E 75%);
  box-shadow: 0 0 22px 10px rgba(255, 214, 110, .55), 0 0 60px 30px rgba(255, 214, 110, .25);
}
@keyframes columpio { 0%, 100% { transform: rotate(4deg); } 50% { transform: rotate(-4deg); } }

/* destellos */
.chispas span {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s);
  background: var(--c);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0; animation: destello var(--t) ease-in-out infinite; animation-delay: var(--d);
}
@keyframes destello {
  0%, 100% { opacity: 0; transform: scale(.4) rotate(0); }
  50% { opacity: .9; transform: scale(1) rotate(90deg); }
}

/* piso: alfombra de aguayo en perspectiva */
.piso { position: absolute; left: 0; right: 0; bottom: 0; height: 30vh; perspective: 500px; }
.alfombra {
  position: absolute; left: -30%; right: -30%; top: 0; bottom: -40%;
  transform: rotateX(58deg); transform-origin: top center;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(180deg,
      #B5122B 0 18px, #E4572E 18px 26px, #F2A541 26px 30px, #E4572E 30px 34px,
      #8E1B2C 34px 46px, #F2C12E 46px 49px, #B5122B 49px 64px);
  box-shadow: inset 0 30px 40px rgba(0,0,0,.25);
}

/* ---------------------------------------------------------------- barra superior */
.barra {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap;
  max-width: 1240px; margin: 0 auto;
  padding: calc(clamp(70px, 11vh, 110px) + 4px) 20px 6px;
}
.marca {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--marino);
  background: rgba(255, 248, 236, .92); padding: 6px 16px 6px 8px; border-radius: 999px;
  box-shadow: var(--sombra-suave);
}
.marca-texto { font-family: var(--fuente-titulo); font-size: 1.25rem; font-weight: 600; line-height: 1; }
.marca-texto b { font-weight: 800; }
.cuando {
  margin: 0; font-weight: 800; font-size: 1rem; color: var(--marino);
  background: rgba(255, 248, 236, .75); padding: 6px 14px; border-radius: 999px;
}
.barra-der { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.reloj {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--marino); color: #fff; padding: 6px 8px 6px 14px; border-radius: 999px;
  font-weight: 800; font-size: 1.05rem; box-shadow: var(--sombra-suave);
}
.reloj svg { width: 20px; height: 20px; }
.reloj.simulado { background: repeating-linear-gradient(135deg, var(--marino) 0 10px, #0b4f8f 10px 20px); }
.estado-evento {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.18);
}
.estado-evento.vivo { background: #E0336F; animation: latido 1.4s ease-in-out infinite; }
.estado-evento.antes { background: var(--naranja); }
@keyframes latido { 50% { box-shadow: 0 0 0 6px rgba(224, 51, 111, .25); } }

.btn-sonido {
  width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255, 248, 236, .92); color: var(--marino); box-shadow: var(--sombra-suave);
}
.btn-sonido svg { width: 22px; height: 22px; }
.btn-sonido .mute { display: none; }
.btn-sonido.apagado .ondas { display: none; }
.btn-sonido.apagado .mute { display: inline; }

/* ---------------------------------------------------------------- anillos del logo */
.anillos { position: relative; display: inline-block; width: 64px; aspect-ratio: 1; }
.anillos i {
  position: absolute; border-radius: 50%;
  background: conic-gradient(#E0336F, #F27329, #F2C12E, #3A9D3F, #168C80, #1E5AA8, #85518C, #E0336F);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--g)), #000 calc(100% - var(--g) + 1px));
          mask: radial-gradient(farthest-side, transparent calc(100% - var(--g)), #000 calc(100% - var(--g) + 1px));
  animation: giro 14s linear infinite;
}
.anillos i:nth-child(1) { inset: 0; --g: 15%; }
.anillos i:nth-child(2) { inset: 22%; --g: 22%; animation-direction: reverse; animation-duration: 10s; }
.anillos i:nth-child(3) { inset: 41%; --g: 50%; animation-duration: 7s; }
.anillos-mini { width: 32px; }
@keyframes giro { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- plaza (layout) */
.plaza {
  position: relative; z-index: 2;
  max-width: 1240px; margin: 0 auto; padding: 8px 20px 0;
  display: grid; grid-template-columns: minmax(230px, .8fr) 2.2fr; gap: 10px; align-items: end;
}

.anfitrion { position: relative; display: grid; justify-items: center; gap: 6px; padding-bottom: 18px; }
.nube-logo {
  position: relative; display: grid; justify-items: center; gap: 4px;
  padding: 22px 34px 18px; background: #fff;
  border-radius: 60px 70px 60px 66px / 54px 60px 56px 60px;
  box-shadow: 0 0 0 6px rgba(255,255,255,.6), var(--sombra-suave);
  animation: flotar 6s ease-in-out infinite;
}
.nube-logo::before, .nube-logo::after {
  content: ""; position: absolute; background: #fff; border-radius: 50%; z-index: -1;
}
.nube-logo::before { width: 70px; height: 70px; top: -26px; left: 22%; }
.nube-logo::after { width: 56px; height: 56px; top: -16px; right: 18%; }
.nube-logo .anillos { width: clamp(70px, 8vw, 96px); }
.logo-texto { font-family: var(--fuente-titulo); font-size: clamp(1.5rem, 2.4vw, 2rem); color: #1b1b1f; line-height: 1; font-weight: 600; }
.logo-texto b { font-weight: 800; margin-right: .2em; }
.burbujita { position: absolute; background: #fff; border-radius: 50%; box-shadow: var(--sombra-suave); }
.b1 { width: 26px; height: 26px; bottom: -24px; left: 30%; }
.b2 { width: 14px; height: 14px; bottom: -44px; left: 24%; }
@keyframes flotar { 50% { transform: translateY(-8px); } }

.mascota { width: clamp(150px, 18vw, 250px); height: auto; margin-top: 30px; filter: drop-shadow(0 18px 18px rgba(60,30,10,.35)); }

.globo {
  position: relative; margin: 36px 0 0; max-width: 270px;
  background: #fff; border-radius: 22px; padding: 16px 22px;
  font-family: var(--fuente-titulo); font-weight: 800; font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.2; color: #1b1b1f;
  box-shadow: 0 6px 0 rgba(0,0,0,.08), var(--sombra-suave);
}
.mascota + .globo { margin-top: -20px; }
.globo::before {
  content: ""; position: absolute; top: -18px; left: 34px;
  border: 12px solid transparent; border-bottom: 18px solid #fff; border-top: 0;
}
.globo strong { display: block; color: #E8432C; text-transform: uppercase; letter-spacing: .02em; }

/* ---------------------------------------------------------------- tablero de madera */
.tablero { position: relative; aspect-ratio: 1000 / 640; filter: drop-shadow(0 26px 22px rgba(60, 30, 10, .35)); }
.tablero-madera { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.nube-canto { fill: #8A5329; transform: translateY(16px); }
.nube-cara { stroke: #B9773F; stroke-width: 8; }
.nube-brillo { stroke: rgba(255, 255, 255, .55); stroke-width: 3; transform: translate(4px, 4px) scale(.992); }

.areas {
  position: absolute; inset: 15% 8% 9% 9%;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr);
  gap: clamp(6px, 1.4vw, 18px);
}
.areas li { display: contents; }

.area {
  position: relative; border: 0; background: none; padding: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(4px, .8vw, 10px);
  border-radius: 28px; color: var(--c);
  transition: transform .25s cubic-bezier(.3,1.6,.5,1), background .25s;
  animation: entrar .7s cubic-bezier(.2,1.4,.4,1) both; animation-delay: calc(var(--i) * 90ms + 200ms);
}
@keyframes entrar { from { opacity: 0; transform: translateY(24px) scale(.8); } }

.area-icono { display: block; width: clamp(54px, 9vw, 118px); aspect-ratio: 1; transition: transform .3s cubic-bezier(.3,1.6,.5,1), filter .3s; }
.area-icono svg {
  width: 100%; height: 100%; overflow: visible;
  /* efecto tallado: luz arriba, sombra abajo */
  filter: drop-shadow(0 1.5px 0 rgba(255, 240, 210, .9)) drop-shadow(0 -1.5px 0 rgba(90, 45, 10, .45)) drop-shadow(0 4px 4px rgba(90, 45, 10, .25));
}
.area-etiqueta {
  white-space: pre-line; text-align: center; line-height: 1.05;
  font-family: var(--fuente-texto); font-weight: 800; text-transform: uppercase; letter-spacing: .02em;
  font-size: clamp(.62rem, 1.05vw, .95rem); color: #3B2210;
  padding: .45em 1.1em; border-radius: 999px; min-width: 72%;
  background: linear-gradient(180deg, #F6D8A8, #E0B074);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.6), inset 0 -3px 0 rgba(120, 60, 20, .35), 0 3px 0 #9C6232, 0 6px 10px rgba(80,40,10,.25);
  transition: background .25s, color .25s;
}

.area:hover, .area.senalado { transform: translateY(-4px); }
.area:hover .area-icono, .area.senalado .area-icono, .area:focus-visible .area-icono {
  transform: scale(1.12) rotate(-3deg);
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--c) 55%, transparent));
}
.area:hover .area-etiqueta, .area.senalado .area-etiqueta, .area:focus-visible .area-etiqueta {
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 80%, #fff), var(--c));
  color: #fff;
}
.area:active { transform: translateY(1px) scale(.97); }

/* insignia "en vivo" sobre la tarjeta */
.area-vivo {
  position: absolute; top: 2%; right: 6%;
  background: #E0336F; color: #fff; font-weight: 800; font-size: clamp(.55rem, .8vw, .75rem);
  text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 999px;
  box-shadow: 0 0 0 3px #fff, 0 4px 10px rgba(0,0,0,.2);
  animation: latido 1.2s ease-in-out infinite;
}
.area.con-pronto .area-vivo { background: var(--naranja); animation: none; }
.area.con-vivo .area-icono svg { animation: resplandor 1.6s ease-in-out infinite; }
@keyframes resplandor {
  50% { filter: drop-shadow(0 0 10px var(--c)) drop-shadow(0 0 22px color-mix(in srgb, var(--c) 60%, transparent)); }
}

/* mano gigante que recorre el tablero */
.mano-gigante {
  position: fixed; left: 0; top: 0; z-index: 20; width: clamp(64px, 7vw, 110px); height: auto;
  image-rendering: pixelated; pointer-events: none; opacity: 0;
  transition: transform .7s cubic-bezier(.5,0,.2,1), opacity .4s;
  margin: -4px 0 0 -30%;
}
.mano-gigante.visible { opacity: 1; }
.mano-gigante.toque { animation: toque .5s .65s ease-in-out; }
@keyframes toque { 40% { translate: 0 10px; scale: .94; } }

/* ---------------------------------------------------------------- cartelera "ahora" */
.cartelera { position: relative; z-index: 2; max-width: 1240px; margin: 18px auto 0; padding: 0 20px; }
.cartelera-marco {
  position: relative; border-radius: 26px; padding: 18px 20px 20px;
  background: linear-gradient(180deg, #03457F, var(--marino));
  color: #fff; box-shadow: 0 0 0 6px #F2C12E, 0 0 0 10px #8A5329, var(--sombra-suave);
}
/* bombillas de marquesina alrededor */
.cartelera-marco::before {
  content: ""; position: absolute; inset: -6px; border-radius: 30px; pointer-events: none;
  background:
    radial-gradient(circle, #FFF6C9 2.5px, transparent 3.5px) 0 0 / 22px 22px;
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  padding: 6px; animation: marquesina 1.2s steps(2) infinite;
}
@keyframes marquesina { 50% { background-position: 11px 11px; } }

.cartelera-cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cartelera-cab h2 { margin: 0; font-family: var(--fuente-titulo); font-size: clamp(1.3rem, 2.4vw, 1.8rem); display: flex; align-items: center; gap: 10px; }
.punto-vivo { width: 12px; height: 12px; border-radius: 50%; background: #9aa9b8; }
.cartelera.hay-vivo .punto-vivo { background: #FF4D7E; box-shadow: 0 0 0 0 rgba(255,77,126,.7); animation: punto 1.4s infinite; }
@keyframes punto { 70% { box-shadow: 0 0 0 12px rgba(255,77,126,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,126,0); } }
.btn-agenda {
  margin-left: auto; border: 0; border-radius: 999px; padding: 9px 18px;
  background: #F2C12E; color: #3B2210; font-weight: 800; box-shadow: 0 4px 0 #B88A12;
}
.btn-agenda:hover { transform: translateY(-2px); }

.cartelera-lista {
  display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px;
  scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #F2C12E transparent;
}
.cartelera-vacia { margin: 4px 0; opacity: .9; font-size: 1.05rem; }

.tarjeta {
  flex: 0 0 clamp(210px, 26vw, 270px); scroll-snap-align: start;
  display: grid; gap: 4px; text-align: left; border: 0; border-radius: 18px; padding: 12px 14px 14px;
  background: #fff; color: var(--texto); border-top: 7px solid var(--c);
  box-shadow: 0 6px 0 rgba(0,0,0,.18);
  transition: transform .2s;
}
.tarjeta:hover { transform: translateY(-3px) rotate(-.6deg); }
.tarjeta-estado {
  justify-self: start; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 2px 9px; border-radius: 999px; background: #EEF2F6; color: var(--marino);
}
.tarjeta.en-curso .tarjeta-estado { background: var(--c); color: #fff; animation: latido 1.3s infinite; }
.tarjeta.pronto .tarjeta-estado { background: #FFE7C9; color: #9A4A0E; }
.tarjeta-hora { font-weight: 800; color: var(--c); }
.tarjeta-titulo { font-family: var(--fuente-titulo); font-size: 1.15rem; line-height: 1.15; }
.tarjeta-area { font-size: .9rem; opacity: .75; }

.pie { position: relative; z-index: 2; text-align: center; padding: 26px 20px 30px; color: #fff; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.pie p { margin: 2px 0; }
.pie-fuente { font-size: .85rem; opacity: .9; }

/* ---------------------------------------------------------------- diálogos */
.dlg {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: transparent; overflow: hidden;
}
.dlg::backdrop { background: rgba(2, 30, 60, .6); backdrop-filter: blur(5px); }
.dlg[open] { display: grid; place-items: center; }

.hoja {
  --c: var(--naranja);
  width: min(1120px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto;
  background: var(--crema); border-radius: 30px; box-shadow: 0 0 0 6px var(--c), 0 30px 80px rgba(0,0,0,.45);
  overscroll-behavior: contain;
}
.hoja-cab {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 14px; padding: 18px 22px 16px;
  background:
    repeating-linear-gradient(90deg, #C8102E 0 14px, #F27329 14px 22px, #F2C12E 22px 28px, #3A9D3F 28px 38px, #1E5AA8 38px 48px, #85518C 48px 56px) top / 100% 8px no-repeat,
    linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 70%, #000));
  color: #fff;
}
.hoja-icono {
  flex: none; width: 60px; height: 60px; border-radius: 18px; padding: 8px;
  background: #fff; color: var(--c); box-shadow: 0 4px 0 rgba(0,0,0,.18);
}
.hoja-icono svg { width: 100%; height: 100%; }
.hoja-ante { margin: 0; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; opacity: .85; }
.hoja-cab h2 { margin: 0; font-family: var(--fuente-titulo); font-size: clamp(1.5rem, 3.2vw, 2.3rem); line-height: 1.05; }
.cerrar {
  margin-left: auto; width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.95); color: #222; font-size: 2rem; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 4px 0 rgba(0,0,0,.2); transition: transform .2s;
}
.cerrar:hover { transform: rotate(90deg); }

.hoja-cuerpo { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; padding: 22px; }
.medios { display: grid; gap: 16px; align-content: start; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #111; box-shadow: var(--sombra-suave); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sin-video {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: #fff; text-align: center;
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--c) 85%, #000) 0 18px, var(--c) 18px 36px);
}
.sin-video svg { width: 90px; height: 90px; color: #fff; opacity: .9; }
.sin-video p { margin: 0; font-weight: 800; font-size: 1.1rem; }

.foto { margin: 0; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 10; background: #f1e3cc; box-shadow: var(--sombra-suave); }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto.sin-foto {
  display: grid; place-items: center; color: var(--c);
  background: radial-gradient(circle at 30% 30%, #fff, #F3E1C3);
}
.foto.sin-foto svg { width: 42%; height: auto; }

.info { display: grid; gap: 14px; align-content: start; }
.lema { margin: 0; font-family: var(--fuente-titulo); font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.15; color: var(--c); font-weight: 800; }
.texto { margin: 0; font-size: 1.12rem; line-height: 1.5; font-weight: 500; }
.puntos { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.puntos li {
  position: relative; padding: 8px 12px 8px 40px; background: #fff; border-radius: 14px; font-weight: 700;
  box-shadow: 0 2px 0 rgba(0,0,0,.06);
}
.puntos li::before {
  content: ""; position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  background: var(--c);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
.agenda-area h3 { margin: 4px 0 8px; font-family: var(--fuente-titulo); font-size: 1.25rem; }

.btn-principal {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 999px; padding: 13px 22px; font-weight: 800; font-size: 1.05rem;
  background: var(--turquesa); color: #fff; box-shadow: 0 5px 0 #0D5C54; transition: transform .2s;
}
.btn-principal svg { width: 22px; height: 22px; }
.btn-principal:hover { transform: translateY(-2px); }

/* lista de eventos (ficha y panel del mapa) */
.lista-eventos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lista-eventos .vacio { padding: 12px 14px; background: #fff; border-radius: 14px; opacity: .85; }
.item > button {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left;
  border: 0; border-left: 6px solid var(--c); border-radius: 14px; padding: 10px 12px; background: #fff;
  box-shadow: 0 2px 0 rgba(0,0,0,.06);
}
.item strong { grid-column: 1 / -1; font-size: 1.05rem; line-height: 1.2; }
.item-hora { font-weight: 800; color: var(--c); }
.item-estado { font-size: .72rem; font-weight: 800; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: #EEF2F6; align-self: center; }
.item-area, .item-det { grid-column: 1 / -1; font-size: .92rem; opacity: .8; white-space: pre-line; }
.item.en-curso > button { background: color-mix(in srgb, var(--c) 10%, #fff); box-shadow: 0 0 0 2px var(--c); }
.item.en-curso .item-estado { background: var(--c); color: #fff; }
.item.pronto .item-estado { background: #FFE7C9; color: #9A4A0E; }
.item.terminado { opacity: .55; }

/* ---------------------------------------------------------------- mapa */
.dlg-mapa .mapa-caja {
  width: min(1400px, calc(100% - 20px)); height: calc(100dvh - 20px);
  display: grid; grid-template-rows: auto 1fr; border-radius: 26px; overflow: hidden;
  background: var(--crema); box-shadow: 0 0 0 6px var(--turquesa), 0 30px 80px rgba(0,0,0,.45);
}
.mapa-cab {
  --c: var(--turquesa);
  display: flex; align-items: center; gap: 14px; padding: 12px 18px; color: #fff;
  background:
    repeating-linear-gradient(90deg, #C8102E 0 14px, #F27329 14px 22px, #F2C12E 22px 28px, #3A9D3F 28px 38px, #1E5AA8 38px 48px, #85518C 48px 56px) top / 100% 7px no-repeat,
    linear-gradient(135deg, var(--turquesa), #0B5A52);
}
.mapa-cab .hoja-icono { width: 50px; height: 50px; }
.mapa-cab h2 { margin: 0; font-family: var(--fuente-titulo); font-size: clamp(1.3rem, 2.6vw, 1.8rem); line-height: 1; }
.mapa-cab p { margin: 2px 0 0; font-weight: 600; opacity: .9; }

.mapa-zona { position: relative; display: grid; grid-template-columns: 1fr 340px; min-height: 0; }
.mapa { width: 100%; height: 100%; min-height: 300px; background: #E8E0D2; z-index: 0; }
.panel { position: relative; display: grid; grid-template-rows: auto 1fr; min-height: 0; background: var(--crema); border-left: 3px solid #E9D7B8; }
.panel-asa {
  display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 14px 16px 8px;
  font-family: var(--fuente-titulo); font-size: 1.25rem; font-weight: 800; color: var(--marino); text-align: left;
}
.panel-asa span { display: none; width: 40px; height: 5px; border-radius: 9px; background: #CBB592; }
.panel-cuerpo { overflow: auto; padding: 4px 14px 16px; overscroll-behavior: contain; }

.editor {
  position: absolute; left: 60px; bottom: 16px; z-index: 600; width: min(420px, calc(100% - 80px));
  background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: var(--sombra-suave); font-size: .9rem;
}
.editor p { margin: 4px 0 8px; }
.editor textarea { width: 100%; font: .82rem/1.4 ui-monospace, monospace; border-radius: 10px; border: 1px solid #ddd; padding: 8px; }

/* pines del mapa */
.pin-wrap { background: none; border: 0; }
.pin { position: relative; width: 80px; height: 80px; --c: var(--naranja); }
.pin-cabeza {
  position: absolute; left: 50%; top: 10px; width: 48px; height: 48px; margin-left: -24px;
  border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
  background: var(--c); border: 4px solid #fff; box-shadow: 0 6px 12px rgba(0,0,0,.35);
  display: grid; place-items: center; transition: transform .25s cubic-bezier(.3,1.6,.5,1);
}
.pin-svg { display: block; width: 28px; height: 28px; transform: rotate(45deg); color: #fff; }
.pin-svg svg { width: 100%; height: 100%; }
.pin-svg svg path[fill="#fff8ec"] { fill: transparent; }
.pin-sombra { position: absolute; left: 50%; top: 62px; width: 26px; height: 8px; margin-left: -13px; border-radius: 50%; background: rgba(0,0,0,.28); filter: blur(2px); }
.pin:hover .pin-cabeza { transform: rotate(-45deg) scale(1.1); }
.pin-nombre {
  position: absolute; left: 50%; top: 70px; transform: translateX(-50%);
  font-family: var(--fuente-texto); font-weight: 800; font-size: .78rem; line-height: 1.05; color: #2B1A0E;
  white-space: pre-line; text-align: center;
  background: #fff; padding: 2px 9px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.25);
  border-bottom: 3px solid var(--c);
}
.pin-badge {
  position: absolute; left: 50%; top: -14px; transform: translateX(-50%); white-space: nowrap;
  background: #E0336F; color: #fff; font: 800 .7rem/1 var(--fuente-texto); text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 8px; border-radius: 999px; box-shadow: 0 0 0 2px #fff;
}
.pin-badge.suave { background: var(--naranja); }

/* luminiscencia de evento activo */
.halo {
  display: none; position: absolute; left: 50%; top: 34px; width: 150px; height: 150px; margin: -75px 0 0 -75px;
  border-radius: 50%; pointer-events: none;
}
.pin.activo .halo, .pin.pronto .halo { display: block; }
.pin.activo .halo {
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 85%, #fff) 0, color-mix(in srgb, var(--c) 55%, transparent) 30%, transparent 68%);
  animation: halo 1.8s ease-out infinite;
}
.pin.activo .h2 { animation-delay: .6s; }
.pin.activo .h3 {
  background: none; border: 4px solid var(--c); animation: onda 1.8s ease-out infinite; animation-delay: .3s;
}
.pin.activo .pin-cabeza { box-shadow: 0 0 0 4px #fff, 0 0 26px 10px var(--c), 0 6px 12px rgba(0,0,0,.35); animation: rebote 1.8s ease-in-out infinite; }
.pin.pronto .halo { background: radial-gradient(circle, color-mix(in srgb, var(--c) 45%, transparent), transparent 60%); animation: titilar 1.4s ease-in-out infinite; }
.pin.pronto .h2, .pin.pronto .h3 { display: none; }
@keyframes halo { 0% { transform: scale(.35); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes onda { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes rebote { 0%, 100% { transform: rotate(-45deg) translate(0, 0); } 50% { transform: rotate(-45deg) translate(3px, -3px); } }
@keyframes titilar { 50% { opacity: .25; } }

/* popup */
.tinku-popup .leaflet-popup-content-wrapper { border-radius: 20px; padding: 0; overflow: hidden; box-shadow: 0 14px 40px rgba(0,0,0,.3); }
.tinku-popup .leaflet-popup-content { margin: 0; width: auto !important; font-family: var(--fuente-texto); font-size: .95rem; line-height: 1.35; }
.tinku-popup .leaflet-popup-close-button { color: #fff !important; font-size: 22px !important; top: 6px !important; right: 6px !important; }
.pop-cab { display: flex; align-items: center; gap: 8px; padding: 12px 34px 10px 12px; background: var(--c); color: #fff; font-family: var(--fuente-titulo); font-weight: 800; font-size: 1.12rem; line-height: 1.1; }
.pop-icono { width: 30px; height: 30px; flex: none; background: #fff; color: var(--c); border-radius: 9px; padding: 3px; }
.pop-icono svg { width: 100%; height: 100%; }
.pop-cuerpo { padding: 10px 12px 4px; max-height: 260px; overflow: auto; }
.pop-evento { padding: 8px 10px; border-radius: 12px; background: #F6F1E8; margin-bottom: 8px; }
.pop-evento.destacado { background: color-mix(in srgb, var(--c) 14%, #fff); box-shadow: inset 0 0 0 2px var(--c); }
.pop-evento strong { display: block; font-size: 1.05rem; }
.pop-hora { display: block; font-weight: 800; color: var(--c); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
.pop-det { margin: 4px 0 0; white-space: pre-line; }
.pop-meta { margin: 3px 0 0; font-size: .85rem; opacity: .8; }
.pop-enlace { display: inline-block; margin-top: 4px; font-weight: 800; color: var(--c); }
.pop-sub { margin: 6px 0 6px; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.pop-btn { display: block; width: calc(100% - 24px); margin: 4px 12px 12px; border: 0; border-radius: 999px; padding: 9px; background: var(--c); color: #fff; font-weight: 800; }

.btn-ubicar {
  width: 34px; height: 34px; border: 2px solid rgba(0,0,0,.2); border-radius: 6px; background: #fff; color: var(--azul);
  display: grid; place-items: center; padding: 0;
}
.btn-ubicar svg { width: 20px; height: 20px; }
.leaflet-container { font-family: var(--fuente-texto); }

/* ---------------------------------------------------------------- responsivo */
@media (max-width: 980px) {
  .plaza { grid-template-columns: 1fr; }
  .tablero { order: -1; }
  .anfitrion { grid-template-columns: auto 1fr; align-items: center; justify-items: start; gap: 18px; padding: 10px 6px 0; }
  .anfitrion .mascota { grid-row: span 2; margin: 0; }
  .nube-logo { padding: 16px 24px 14px; }
  .burbujita { display: none; }
  .globo { margin: 0; }
  .globo::before { top: 50%; left: -16px; margin-top: -10px; border: 10px solid transparent; border-right: 16px solid #fff; border-left: 0; }
}

@media (max-width: 760px) {
  .barra { padding-left: 14px; padding-right: 14px; gap: 8px; }
  .cuando { order: 3; width: 100%; text-align: center; font-size: .92rem; }
  .barra-der { margin-left: auto; }
  .plaza { padding: 4px 10px 0; }
  .tablero { aspect-ratio: 1000 / 1250; margin-bottom: 26px; }
  .areas { inset: 11% 9% 11% 9%; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr); gap: 4px; }
  .area-icono { width: clamp(58px, 19vw, 96px); }
  .area-etiqueta { font-size: clamp(.62rem, 2.9vw, .82rem); min-width: 86%; }
  .anfitrion { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-top: 30px; }
  .globo::before { top: -18px; left: 50%; margin: 0 0 0 -12px; border: 12px solid transparent; border-bottom: 18px solid #fff; border-top: 0; }
  .postes { display: none; }
  .cartelera { padding: 0 12px; }
  .cartelera-marco { padding: 14px 14px 16px; }
  .btn-agenda { margin-left: 0; }
  .tarjeta { flex-basis: 78%; }

  .hoja { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; box-shadow: none; }
  .hoja-cuerpo { grid-template-columns: 1fr; padding: 14px; gap: 16px; }
  .hoja-cab { padding: 14px; }
  .hoja-icono { width: 48px; height: 48px; }
  .btn-principal { width: 100%; }

  .dlg-mapa .mapa-caja { width: 100%; height: 100dvh; border-radius: 0; box-shadow: none; }
  .mapa-cab p { display: none; }
  .mapa-zona { grid-template-columns: 1fr; }
  .panel {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 500; max-height: 46%;
    border-left: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.25);
    transition: transform .3s ease;
  }
  .panel.plegado { transform: translateY(calc(100% - 54px)); }
  .panel-asa { flex-direction: column; gap: 6px; padding: 8px 16px 6px; font-size: 1.05rem; }
  .panel-asa span { display: block; }
  .editor { left: 10px; bottom: auto; top: 10px; width: calc(100% - 70px); }
}

@media (max-width: 380px) {
  .marca-texto { font-size: 1.05rem; }
  .reloj { font-size: .95rem; padding-left: 10px; }
  .estado-evento { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
