/* Guilda · sitio
   Brandbook v1: Bosque 60 · Piedra 25 · Pergamino 10 · Oro 5
   Títulos en Pixelify Sans, texto en Manrope. Logotipo y sello: SVG oficiales en img/. */

@font-face {
  font-family: "Pixelify Sans";
  src: url("../fonts/pixelify-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter"; /* el cuerpo de la app: solo para el globo del guía */
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bosque: #1B4D3E;
  --bosque-dk: #163F33;
  --piedra: #26332D;
  --noche: #141C18;
  --oro: #F2C744;
  --oro-dk: #A67F12;
  --pergamino: #F4F1EA;
  --agua: #5DCFE0;
  --brote: #6FD99A;
  --lavanda: #B597EC;

  --text: var(--pergamino);
  --muted: rgba(244, 241, 234, .72);
  --line: rgba(244, 241, 234, .12);

  --f-title: "Pixelify Sans", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --wrap: 1120px;
  --px: 6px; /* paso de la esquina pixel */

  --seal-ring: var(--oro);
  --seal-g: var(--pergamino);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bosque);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--f-title);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: .01em;
}
h1 { font-size: clamp(2.6rem, 7vw, 4.75rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h3 { font-size: 1.35rem; font-weight: 500; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--oro); color: var(--noche); padding: 8px 12px; }

/* --- Ilustraciones de línea --- */
symbol path, symbol circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linejoin: miter;
  stroke-linecap: square;
}
symbol .ring { stroke: var(--seal-ring); stroke-width: 1; }
symbol .g { fill: var(--seal-g); stroke: none; }

/* --- Esquinas pixel (escalonadas como el logotipo) --- */
.px {
  clip-path: polygon(
    0 calc(var(--px) * 2), var(--px) calc(var(--px) * 2), var(--px) var(--px), calc(var(--px) * 2) var(--px), calc(var(--px) * 2) 0,
    calc(100% - var(--px) * 2) 0, calc(100% - var(--px) * 2) var(--px), calc(100% - var(--px)) var(--px), calc(100% - var(--px)) calc(var(--px) * 2), 100% calc(var(--px) * 2),
    100% calc(100% - var(--px) * 2), calc(100% - var(--px)) calc(100% - var(--px) * 2), calc(100% - var(--px)) calc(100% - var(--px)), calc(100% - var(--px) * 2) calc(100% - var(--px)), calc(100% - var(--px) * 2) 100%,
    calc(var(--px) * 2) 100%, calc(var(--px) * 2) calc(100% - var(--px)), var(--px) calc(100% - var(--px)), var(--px) calc(100% - var(--px) * 2), 0 calc(100% - var(--px) * 2)
  );
}

/* --- Header --- */
.top {
  position: sticky; top: 0; z-index: 5;
  background: rgba(27, 77, 62, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
/* Logotipo oficial (Brandbook v1). Mínimo digital: 120 px de ancho. */
.logo-img { height: 34px; width: auto; }
.nav { display: none; gap: 28px; margin-left: auto; font-weight: 600; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }
.top .btn { margin-left: auto; }
@media (min-width: 860px) {
  .nav { display: flex; }
  .top .btn { margin-left: 0; }
}

/* --- Botones (botón de misión: Pixelify) --- */
.btn {
  display: inline-block;
  font-family: var(--f-title);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--oro);
  color: var(--noche);
  padding: 14px 24px;
  box-shadow: 4px 4px 0 var(--oro-dk);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--oro-dk); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--oro-dk); }
.btn:focus-visible, .nav a:focus-visible { outline: 2px solid var(--agua); outline-offset: 3px; }
.btn-sm { font-size: .9rem; padding: 9px 16px; box-shadow: 3px 3px 0 var(--oro-dk); }
.btn-ghost { background: transparent; color: var(--pergamino); box-shadow: inset 0 0 0 2px var(--pergamino); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--oro); color: var(--oro); transform: none; }

/* --- Hero --- */
.hero { padding: 72px 0 88px; overflow: hidden; }
.hero-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.25fr 1fr; } }
.kicker {
  font-family: var(--f-title);
  color: var(--oro);
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
.lead strong { color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }

.hero-art { position: relative; justify-self: center; width: min(78vw, 360px); aspect-ratio: 1; }
.seal-xl { width: 100%; height: 100%; position: relative; --seal-ring: var(--oro); }
.pulse {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--oro);
  animation: pulse 3.2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: .6; }
  100% { transform: scale(1.28); opacity: 0; }
}

/* --- Tu guía (portada): Leo y su globo, como companion_overlay.dart ---
   --g = 1 punto de la app. */
.guia {
  --g: 1px; --s: 1.5; /* --s: escala de Leo (cuadro de 100×115) */
  justify-self: center; align-self: end; /* los pies a la altura de la base de los botones */
  display: flex; flex-direction: row-reverse; align-items: flex-end; gap: calc(4 * var(--g));
  width: 100%; max-width: calc(460 * var(--g));
}
@media (min-width: 600px) { .guia { --s: 1.75; } }
@media (min-width: 900px) { .guia { --g: 1.45px; } }
.guia-leo {
  flex: none;
  width: calc(100 * var(--s) * var(--g)); height: calc(115 * var(--s) * var(--g));
  background: url("../img/juego/leo_reposo.png") 0 0 / 800% 100% no-repeat;
  image-rendering: pixelated;
  animation: leo 1s steps(8, jump-none) infinite, flota 1.5s ease-in-out infinite alternate;
}
@keyframes leo { to { background-position-x: 100%; } }
/* Flota siempre: todo el cuerpo sube y baja aparte de los cuadros (skill validar-animaciones) */
@keyframes flota { from { transform: translateY(0); } to { transform: translateY(-3.5%); } }
/* Saluda, flota dos ciclos y vuelve a saludar: cuadros 0–7 saludo, 8–15 reposo */
@keyframes leo-saluda {
  0.00% { background-position-x: 0.0000%; }
  4.17% { background-position-x: 6.6667%; }
  8.33% { background-position-x: 13.3333%; }
  12.50% { background-position-x: 20.0000%; }
  16.67% { background-position-x: 26.6667%; }
  20.83% { background-position-x: 33.3333%; }
  25.00% { background-position-x: 40.0000%; }
  29.17% { background-position-x: 46.6667%; }
  33.33%, 66.67% { background-position-x: 53.3333%; }
  37.50%, 70.83% { background-position-x: 60.0000%; }
  41.67%, 75.00% { background-position-x: 66.6667%; }
  45.83%, 79.17% { background-position-x: 73.3333%; }
  50.00%, 83.33% { background-position-x: 80.0000%; }
  54.17%, 87.50% { background-position-x: 86.6667%; }
  58.33%, 91.67% { background-position-x: 93.3333%; }
  62.50%, 95.83% { background-position-x: 100.0000%; }
}

.globo {
  position: relative; flex: 1; min-width: 0;
  margin: 0 calc(13 * var(--g)) calc(115 * var(--s) * .42 * var(--g)) 0;
  padding: calc(17.5 * var(--g)) calc(16 * var(--g)) calc(12 * var(--g));
  display: flex; flex-direction: column; gap: calc(12 * var(--g));
  text-align: left; cursor: pointer;
  font: inherit; color: #fff;
  background: rgba(16, 10, 36, .95);
  border: 2px solid rgba(245, 158, 11, .75);
  border-radius: calc(18 * var(--g));
  box-shadow: 0 0 calc(16 * var(--g)) rgba(124, 58, 237, .33);
}
.globo::before { /* el pico, a la derecha y a media altura, hacia Leo */
  content: ""; position: absolute; top: 50%; right: 0;
  width: calc(15.5 * var(--g)); height: calc(15.5 * var(--g));
  background: rgb(16, 10, 36);
  border-right: 2px solid rgba(245, 158, 11, .75);
  border-top: 2px solid rgba(245, 158, 11, .75);
  transform: translate(55%, -50%) rotate(45deg);
}
.globo:focus-visible { outline: 2px solid var(--agua); outline-offset: 4px; }
.globo-cabecera {
  display: flex; align-items: center; gap: calc(6 * var(--g)); height: calc(14 * var(--g));
  font: 700 calc(9 * var(--g))/1 "Pixelify Sans", monospace; text-transform: uppercase;
  color: #FDE68A; text-shadow: 0 1px 0 rgba(0, 0, 0, .8);
}
.globo-cabecera svg { width: calc(13 * var(--g)); height: calc(13 * var(--g)); fill: rgba(253, 230, 138, .9); }
.globo-texto { display: grid; font: 400 calc(14 * var(--g))/1.45 "Inter", var(--f-body); }
.globo-completo, .globo-escrito, .globo-molde { grid-area: 1 / 1; }
.globo-completo, .globo-molde { opacity: 0; } /* reservan el alto de la línea más larga */
.globo-pie { display: flex; align-items: center; justify-content: space-between; min-height: calc(16 * var(--g)); }
.globo-puntos { display: flex; }
.globo-puntos i {
  width: calc(6 * var(--g)); height: calc(6 * var(--g)); margin-right: calc(5 * var(--g));
  border-radius: calc(3 * var(--g)); background: rgba(255, 255, 255, .3);
  transition: width .15s, background-color .15s;
}
.globo-puntos i.activo { width: calc(16 * var(--g)); background: #F59E0B; }
.globo-seguir {
  display: flex; align-items: center; gap: calc(6 * var(--g));
  font: 700 calc(9 * var(--g))/1 "Pixelify Sans", monospace; text-transform: uppercase; color: #FDE68A;
}
.globo-seguir svg { width: calc(16 * var(--g)); height: calc(16 * var(--g)); fill: #FDE68A; animation: parpadeo .7s ease-in-out infinite alternate; }
.globo .caret-listo, .globo.ultima .caret-seguir { display: none; }
.globo.ultima .caret-listo { display: block; }
.globo.escribiendo .globo-seguir { visibility: hidden; }
@keyframes parpadeo { from { opacity: .35; } to { opacity: 1; } }

/* --- Valores --- */
.values { background: var(--piedra); border-block: 1px solid var(--line); }
.chips {
  list-style: none; margin: 0; padding: 18px 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 32px;
  font-family: var(--f-title); font-size: 1.1rem; color: var(--muted);
}
.chips li::before { content: "◆"; color: var(--oro); font-size: .6em; margin-right: 10px; vertical-align: .25em; }

/* --- Secciones --- */
.section { padding: 96px 0; }
.section.alt { background: var(--noche); }
.section.light { background: var(--pergamino); color: var(--bosque); }
.section.light .kicker { color: var(--oro-dk); }
/* Somos Guilda: la sección entera es el agua de la isla; texto oscuro para que se lea sobre el turquesa */
.section.agua { background: #47ABA9; color: var(--noche); }
.section.agua .split p { color: rgba(20, 28, 24, .85); }
.section.agua .split p strong, .section.agua .split .kicker { color: var(--noche); }
.intro { font-size: 1.15rem; color: var(--muted); max-width: 40em; margin-bottom: 48px; }
.section.light .intro { color: rgba(27, 77, 62, .82); }

.cards { display: grid; gap: 20px; }
@media (min-width: 760px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--piedra); padding: 28px; }
.card p { color: var(--muted); margin: 0; }
.section.alt .card { background: var(--piedra); }
.section.light .card { background: #fff; box-shadow: inset 0 0 0 2px rgba(27, 77, 62, .14); }
.section.light .card p { color: rgba(27, 77, 62, .82); }

.icon-img { display: block; width: 72px; height: 72px; margin-bottom: 16px; }

/* Split: ilustración + texto */
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1.15fr 1fr; } }
.split p { color: var(--muted); font-size: 1.1rem; max-width: 34em; }
.split p strong { color: var(--text); }
.split .kicker { color: var(--oro); font-size: 1rem; }
.split-art { display: grid; place-items: center; }

/* --- Juego --- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step-n {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: 18px;
  font-family: var(--f-title); font-size: 1.3rem; font-weight: 600;
  border: 2px solid var(--oro); border-radius: 50%; color: var(--oro);
}


/* --- La isla (sprites de la app) --- */
/* Personajes en su islita (7 × 3 tiles de Tiny Swords, 512 × 256): cada personaje es una tira de cuadros animada con steps() */
.aventura {
  position: relative; width: min(100%, 600px); aspect-ratio: 512 / 256;
  background: url("../img/juego/islita.png") 0 0 / 100% 100% no-repeat;
  image-rendering: pixelated;
}
.pj {
  position: absolute;
  left: calc(var(--x) / 512 * 100%);
  top: calc(var(--y) / 256 * 100%);
  width: calc(var(--w) / 512 * 100%);
  aspect-ratio: var(--w) / var(--h);
  transform: translate(-50%, -100%);
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: calc(var(--n) * 100%) 100%;
  image-rendering: pixelated;
  animation: cuadros var(--d) steps(var(--n), jump-none) infinite;
}
.pj.flip { transform: translate(-50%, -100%) scaleX(-1); }
/* Los guías de los pueblos: saludan, quedan en reposo tres ciclos y vuelven a saludar.
   Cuadros 0–4 saludo, 5–12 reposo (PixelLab); cada uno desfasado con --delay. */
.pj.guia-pj { background-size: 1300% 100%; animation: guia-pueblo 4.83s step-end infinite; animation-delay: var(--delay, 0s); }
@keyframes guia-pueblo {
  0.00% { background-position-x: 0.0000%; }
  3.45% { background-position-x: 8.3333%; }
  6.90% { background-position-x: 16.6667%; }
  10.34% { background-position-x: 25.0000%; }
  13.79% { background-position-x: 33.3333%; }
  17.24%, 44.83%, 72.41% { background-position-x: 41.6667%; }
  20.69%, 48.28%, 75.86% { background-position-x: 50.0000%; }
  24.14%, 51.72%, 79.31% { background-position-x: 58.3333%; }
  27.59%, 55.17%, 82.76% { background-position-x: 66.6667%; }
  31.03%, 58.62%, 86.21% { background-position-x: 75.0000%; }
  34.48%, 62.07%, 89.66% { background-position-x: 83.3333%; }
  37.93%, 65.52%, 93.10% { background-position-x: 91.6667%; }
  41.38%, 68.97%, 96.55% { background-position-x: 100.0000%; }
}
@keyframes cuadros { to { background-position-x: 100%; } }

/* --- La ejecutiva (anfitriona de la Cuenta digital): Catalina, hoja de la app ---
   Cuadros: saludo 0–4, reposo 5–12 (PixelLab, cambia el peso), parpadeo 13.
   Saluda, queda en reposo tres ciclos con un parpadeo y vuelve a saludar. */
.fintech-top { display: grid; gap: 24px; align-items: end; }
@media (min-width: 860px) { .fintech-top { grid-template-columns: 1fr auto; } }
.ejecutiva {
  justify-self: center;
  width: clamp(160px, 22vw, 240px); aspect-ratio: 160 / 224;
  background: url("../img/juego/ejecutiva.png") 0 0 / 1400% 100% no-repeat;
  image-rendering: pixelated;
  animation: ejecutiva 5.17s step-end infinite;
  margin-bottom: 24px;
}
@keyframes ejecutiva {
  0.00% { background-position-x: 0.0000%; }
  3.23% { background-position-x: 7.6923%; }
  6.45%, 12.90% { background-position-x: 15.3846%; }
  9.68%, 16.13% { background-position-x: 23.0769%; }
  19.35% { background-position-x: 30.7692%; }
  22.58%, 74.19% { background-position-x: 38.4615%; }
  25.81%, 51.61%, 77.42% { background-position-x: 46.1538%; }
  29.03%, 54.84%, 80.65% { background-position-x: 53.8462%; }
  32.26%, 58.06%, 83.87% { background-position-x: 61.5385%; }
  35.48%, 61.29%, 87.10% { background-position-x: 69.2308%; }
  38.71%, 64.52%, 90.32% { background-position-x: 76.9231%; }
  41.94%, 67.74%, 93.55% { background-position-x: 84.6154%; }
  45.16%, 70.97%, 96.77% { background-position-x: 92.3077%; }
  48.39% { background-position-x: 100.0000%; }
}

/* --- Islita: agua, espuma animada (16 cuadros en 1,6 s, como la app) y tierra --- */
.aventura { background: #47ABA9; overflow: hidden; }
/* En el teléfono la isla llega al borde: el agua de la sección es la misma, no se nota el corte */
@media (max-width: 599px) { .aventura { width: calc(100% + 32px); margin-inline: -16px; } }
.aventura-espuma, .aventura-tierra { position: absolute; inset: 0; image-rendering: pixelated; }
.aventura-espuma {
  background: url("../img/juego/islita_espuma.png") 0 0 / 1600% 100% no-repeat;
  animation: cuadros16 1.6s steps(16, jump-none) infinite;
}
.aventura-tierra { background: url("../img/juego/islita.png") 0 0 / 100% 100% no-repeat; }
@keyframes cuadros16 { to { background-position-x: 100%; } }

/* --- El juego: el tráiler de entrada en un teléfono (js/trailer.js) ---
   Cinco tomas de 216 × 384 con zoom lento, bruma y fuego; Leo narra arriba. */
.juego-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .juego-grid { grid-template-columns: 360px 1fr; grid-template-areas: "tel ." "tel cabeza" "tel pasos" "tel ."; grid-template-rows: 1fr auto auto 1fr; gap: 24px 64px; align-items: start; } .juego-grid .steps { grid-template-columns: 1fr; } }
.telefono { margin: 0 auto; width: min(100%, 320px); }
.pantalla {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  border-radius: 13%/7%;
  box-shadow: 0 0 0 10px #0B100E, 0 0 0 12px #2B3A33, 12px 16px 0 12px rgba(0, 0, 0, .35);
  background: #0B100E;
}
.toma { position: absolute; inset: 0; opacity: 0; transition: opacity .9s; }
.toma.on { opacity: 1; }
.toma > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; transform: scale(1.18) translateY(3%); transform-origin: 50% 60%; }
.toma.on > img { animation: acerca var(--s, 10s) linear forwards; }
@keyframes acerca { from { transform: scale(1.18) translateY(3%); } to { transform: scale(1) translateY(0); } }
.toma > img.trailer-avatar { inset: auto; height: auto; transform: none; animation: respira 1.2s steps(2) infinite; }
@keyframes respira { 50% { transform: translateY(-2%); } }
.bruma {
  position: absolute; inset: -10% -40%; pointer-events: none;
  background: radial-gradient(ellipse 40% 18% at 30% 70%, rgba(150, 120, 200, .45), transparent 70%), radial-gradient(ellipse 35% 15% at 75% 55%, rgba(130, 100, 190, .4), transparent 70%), radial-gradient(ellipse 45% 20% at 50% 90%, rgba(160, 130, 210, .5), transparent 70%);
  animation: deriva 9s linear infinite alternate;
}
@keyframes deriva { to { transform: translateX(18%); } }
.brillo {
  position: absolute; aspect-ratio: 1; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255, 190, 90, .55), rgba(255, 140, 40, .15) 45%, transparent 70%);
  animation: fuego .45s steps(3) infinite alternate;
}
.brillo.late { animation: late 1.8s ease-in-out infinite alternate; }
@keyframes fuego { from { opacity: .65; transform: scale(.95); } to { opacity: 1; transform: scale(1.06); } }
@keyframes late { from { opacity: .3; } to { opacity: .95; } }
/* Fuera de pantalla o en pausa, todo queda quieto */
.trailer:not(.corre) * { animation-play-state: paused !important; }

.trailer-tocar { position: absolute; inset: 0; z-index: 2; width: 100%; border: 0; padding: 0; background: none; cursor: pointer; }
.trailer-tocar:focus-visible { outline: 3px solid var(--agua); outline-offset: -6px; }
.trailer-barra { position: absolute; z-index: 3; left: 12%; right: 12%; top: 14px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; pointer-events: none; }
.trailer-barra i { height: 3px; background: rgba(244, 241, 234, .3); }
.trailer-barra i.listo { background: var(--oro); }
.trailer-voz {
  position: absolute; z-index: 3; left: 12px; right: 12px; top: 30px; min-height: 66px; pointer-events: none;
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; align-items: start;
  padding: 8px 10px; background: var(--pergamino); color: var(--noche);
  font: 500 .82rem/1.3 var(--f-title);
  box-shadow: inset 0 0 0 3px var(--noche), 4px 4px 0 var(--noche);
  opacity: 0; transform: translateY(-12px); transition: opacity .3s, transform .3s steps(3);
}
.trailer-voz.on { opacity: 1; transform: none; }
.trailer-voz b { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--oro-dk); }
/* Leo flota siempre, también en su retrato (skill validar-animaciones) */
.trailer-leo {
  width: 40px; aspect-ratio: 100 / 115; background: var(--bosque) url("../img/juego/leo_reposo.png") 0 0 / 800% 100% no-repeat;
  image-rendering: pixelated; box-shadow: inset 0 0 0 2px var(--noche);
  animation: leo 1s steps(8, jump-none) infinite, flota 1.5s ease-in-out infinite alternate;
}
.trailer-controles { position: absolute; z-index: 4; left: 12px; right: 12px; bottom: 16px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.trailer-controles button {
  pointer-events: auto; font: 500 .8rem/1 var(--f-title); color: var(--pergamino); cursor: pointer;
  background: rgba(11, 16, 14, .7); border: 2px solid var(--pergamino); padding: 6px 10px;
}
.trailer-controles button:focus-visible, .trailer-otra:focus-visible { outline: 3px solid var(--agua); outline-offset: 2px; }
.trailer-pausa { display: grid; place-items: center; width: 34px; height: 30px; padding: 0 !important; }
.trailer-pausa[hidden] { display: none; }
.trailer-pausa svg { width: 14px; height: 14px; fill: currentColor; }
.trailer-pausa .ico-play, .trailer-pausa[aria-pressed="true"] .ico-pausa { display: none; }
.trailer-pausa[aria-pressed="true"] .ico-play { display: inline; }
.trailer-saltar { margin-left: auto; opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.trailer-saltar.on { opacity: 1; visibility: visible; transition: opacity .3s; }
.trailer-fin {
  position: absolute; z-index: 5; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 20px; text-align: center;
  background: rgba(11, 16, 14, .55); opacity: 0; visibility: hidden; transition: opacity .8s, visibility 0s .8s;
}
.trailer-fin.on { opacity: 1; visibility: visible; transition: opacity .8s; }
.trailer-fin-tit { margin: 0; font: 600 1.6rem/1.1 var(--f-title); color: var(--oro); text-shadow: 2px 2px 0 #0B100E; }
.trailer.fin .trailer-controles { display: none; }

/* --- IA --- */
.ai { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 16px; }
@media (min-width: 640px) { .ai { grid-template-columns: repeat(2, 1fr); } }
.ai-card {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 32px 16px 28px;
  background: linear-gradient(160deg, var(--bosque), var(--piedra));
  box-shadow: inset 0 0 0 1px rgba(242, 199, 68, .35);
}
.ai-name { font-family: var(--f-title); font-size: 2rem; font-weight: 600; color: var(--pergamino); }
.ai-by { font-size: .9rem; color: var(--muted); letter-spacing: .04em; }
.ai-logo { width: 56px; height: 56px; margin-bottom: 14px; }

/* --- CTA --- */
.cta { padding: 104px 0; text-align: center; background: var(--bosque); border-top: 1px solid var(--line); }
.cta-inner { display: flex; flex-direction: column; align-items: center; }
.seal-md { width: 88px; height: 88px; margin-bottom: 28px; }
.cta p { color: var(--muted); font-size: 1.15rem; max-width: 30em; }

/* --- Formulario beta (modal en piedra con borde oro) --- */
.beta-form {
  width: 100%; max-width: 520px; margin-top: 24px;
  display: grid; gap: 18px; text-align: left;
  background: var(--piedra);
  padding: 32px 28px;
  box-shadow: inset 0 0 0 2px var(--oro);
}
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .95rem; }
.field input {
  font: inherit; font-size: 1rem;
  color: var(--pergamino);
  background: var(--noche);
  border: 2px solid rgba(244, 241, 234, .2);
  border-radius: 0;
  padding: 12px 14px;
  width: 100%;
}
.field input::placeholder { color: rgba(244, 241, 234, .45); }
.field input:focus { outline: none; border-color: var(--agua); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; color: var(--muted); line-height: 1.5; }
.consent input { accent-color: var(--oro); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.beta-form .btn { justify-self: start; border: 0; cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Página de gracias --- */
.thanks { min-height: calc(100vh - 68px - 98px); display: grid; place-items: center; text-align: center; padding: 72px 0; }
.thanks p { color: var(--muted); font-size: 1.15rem; max-width: 30em; margin-inline: auto; }
.thanks .btn { margin-top: 16px; }

/* --- Footer --- */
.foot { background: var(--noche); padding: 36px 0; border-top: 1px solid var(--line); }
.foot-inner { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.foot p { margin: 0; color: var(--muted); font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse { animation: none; opacity: .25; }
  .pj, .ejecutiva, .aventura-espuma, .guia-leo, .globo-seguir svg { animation: none; }
  .toma, .toma > img, .bruma, .brillo, .trailer-leo, .trailer-voz, .trailer-fin, .trailer-saltar { animation: none !important; transition: none; }
  .toma > img { transform: none; }
  .btn { transition: none; }
}

.cta .kicker, .thanks .kicker { color: var(--oro); font-size: 1rem; margin-bottom: 12px; }

/* --- Enlace con aspecto de texto (abre la política de privacidad) --- */
.enlace {
  font: inherit; color: inherit; background: none; border: 0; padding: 0;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.enlace:hover { color: var(--oro); }
.enlace:focus-visible { outline: 2px solid var(--agua); outline-offset: 2px; }

.beta-turnstile:empty { display: none; }
.beta-error { margin: 0; padding: 10px 12px; font-size: .9rem; color: var(--pergamino); background: rgba(224, 84, 75, .18); border-left: 3px solid #E0544B; }
.field input[aria-invalid="true"] { border-color: #E0544B; }
.consent input[aria-invalid="true"] { outline: 2px solid #E0544B; outline-offset: 2px; }

/* --- Política de privacidad: popup nativo (popover), modal en piedra con borde oro --- */
.aviso {
  width: min(640px, calc(100% - 32px)); max-height: min(80vh, 720px);
  margin: auto; padding: 0; overflow: hidden;
  display: none; flex-direction: column;
  color: var(--pergamino); background: var(--piedra);
  border: 0; box-shadow: inset 0 0 0 2px var(--oro), 0 24px 64px rgba(0, 0, 0, .5);
}
.aviso:popover-open { display: flex; }
.aviso::backdrop { background: rgba(20, 28, 24, .7); }
.aviso-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 12px; }
.aviso-cabeza h2 { margin: 0; font-size: 1.6rem; }
.aviso-cerrar {
  flex: none; width: 40px; height: 40px; font: 400 1.8rem/1 var(--f-body);
  color: var(--pergamino); background: none; border: 2px solid rgba(244, 241, 234, .3); cursor: pointer;
}
.aviso-cerrar:hover { border-color: var(--oro); color: var(--oro); }
.aviso-cuerpo { padding: 4px 24px 24px; overflow-y: auto; color: var(--muted); font-size: 1rem; }
.aviso-cuerpo h3 { margin: 24px 0 8px; font: 600 1.05rem/1.3 var(--f-body); color: var(--pergamino); }
.aviso-cuerpo p, .aviso-cuerpo ul { margin: 0 0 10px; line-height: 1.55; }
.aviso-cuerpo ul { padding-left: 20px; }
.aviso-cuerpo a { color: var(--oro); }
.aviso-titulo { font-weight: 700; color: var(--pergamino); }
.aviso-fecha { font-size: .9rem; }
.aviso-cierre { margin-top: 20px !important; padding-top: 16px; border-top: 1px solid var(--line); color: var(--pergamino); }

/* --- Somos Guilda: valores dentro de la sección --- */
.section.agua .chips { justify-content: flex-start; padding: 8px 0 0; gap: 8px 24px; color: var(--noche); }
.section.agua .chips li::before { color: var(--bosque); }

/* --- Lo que viene: cartas bloqueadas --- */
.card.bloqueada { box-shadow: inset 0 0 0 2px rgba(27, 77, 62, .14); background: repeating-linear-gradient(135deg, #fff 0 14px, #FAF7EF 14px 28px); }
.card.bloqueada .icon-img { filter: grayscale(1) contrast(.7) brightness(.55); opacity: .55; }
.section.light .card.bloqueada p.candado {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
  font-family: var(--f-title); font-size: .9rem; color: var(--oro-dk);
}
.candado svg { width: 16px; height: 16px; fill: currentColor; }

/* ════════════════ Animaciones del juego (js/mision.js y js/beta.js) ════════════════ */

/* --- Nubes de la app en la portada --- */
.hero { position: relative; }
.hero > .wrap { position: relative; z-index: 1; }
.nubes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.nubes i {
  position: absolute; left: 0; width: 520px; aspect-ratio: 576 / 256;
  background: url("../img/juego/nube.png") 0 0 / 100% 100% no-repeat; image-rendering: pixelated;
  opacity: .28; animation: nube 90s linear infinite;
}
.nubes i:nth-child(1) { top: 2%; animation-delay: -20s; }
.nubes i:nth-child(2) { top: 38%; width: 400px; animation-duration: 120s; animation-delay: -75s; opacity: .2; }
.nubes i:nth-child(3) { top: 62%; width: 460px; animation-duration: 105s; animation-delay: -48s; }
@keyframes nube { from { transform: translateX(-520px); } to { transform: translateX(100vw); } }

/* --- El aviso de misión: el panel del HUD de la app, como notificación ---
   Escritorio: entra por abajo, centrado. Teléfono: baja como franja bajo el header. */
.mision {
  position: fixed; z-index: 6; left: 50%; bottom: 16px; width: 300px;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
  padding: 14px 18px;
  border: 0 solid transparent; border-image: url("../img/juego/hud/barra.png") 32 fill / 16px / 0 stretch;
  image-rendering: pixelated;
  color: #F5F3FF; font-family: var(--f-title);
  opacity: 0; transform: translate(-50%, 24px); pointer-events: none;
  transition: opacity .3s, transform .35s cubic-bezier(.2, 1.4, .4, 1);
}
.mision.visible { opacity: 1; transform: translate(-50%, 0); }
.mision-tit { grid-column: 1 / -1; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: #FDE68A; }
.mision-obj { grid-column: 1 / -1; font-size: 1rem; font-weight: 600; line-height: 1.2; margin-bottom: 4px; }
.mision-barra { display: flex; gap: 3px; }
.mision-barra i { flex: 1; height: 8px; background: rgba(255, 255, 255, .14); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .3); }
.mision-barra i.lleno { background: var(--oro); box-shadow: inset 0 -2px 0 var(--oro-dk); }
.mision-cuenta { font-size: .85rem; color: #FDE68A; }
.mision-pista { grid-column: 1 / -1; margin-top: 4px; font: 600 .85rem/1.3 var(--f-body); color: #FDE68A; }
.mision-pista[hidden] { display: none; }
.mision-pista::before { content: "▸ "; }
.mision.cumplida .mision-obj { color: var(--oro); }
.mision.cumplida.visible { animation: mision-brilla .6s steps(3) 2; }
@keyframes mision-brilla { 50% { filter: brightness(1.35); } }
@media (max-width: 719px) {
  .mision {
    top: 68px; bottom: auto; left: 0; right: 0; width: auto;
    grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 16px 10px;
    border-image: none; background: rgba(16, 10, 36, .96); border-bottom: 2px solid rgba(245, 158, 11, .6);
    transform: translateY(-100%);
  }
  .mision.visible { transform: none; }
  .mision-tit { font-size: .64rem; }
  .mision-obj { font-size: .9rem; margin: 0; }
}

/* --- Efectos: moneda que sube, destello dorado (fx/burst de la app) y letreros --- */
.fx-moneda, .fx-destello { position: fixed; z-index: 20; pointer-events: none; image-rendering: pixelated; }
.fx-moneda {
  width: 28px; height: 28px; margin: -14px 0 0 -14px;
  background: url("../img/juego/hud/moneda.png") 0 0 / 100% 100% no-repeat;
  animation: fx-sube .9s ease-out forwards, moneda .45s linear 2;
}
@keyframes fx-sube { 0% { translate: 0 0; opacity: 0; } 15% { opacity: 1; } 70% { opacity: 1; } 100% { translate: 0 -64px; opacity: 0; } }
.fx-destello {
  width: 96px; height: 96px; margin: -48px 0 0 -48px;
  background: url("../img/juego/destello.png") 0 0 / 800% 100% no-repeat;
  animation: cuadros .6s steps(8, jump-none) forwards;
}
.fx-letrero {
  position: absolute; z-index: 20; pointer-events: none; transform: translate(-50%, -100%);
  padding: 6px 12px; white-space: nowrap;
  font: 700 .95rem/1 var(--f-title); color: var(--noche); background: var(--oro); box-shadow: 3px 3px 0 var(--oro-dk);
  animation: fx-letrero 2.4s ease-out forwards;
}
@keyframes fx-letrero { 0% { opacity: 0; translate: 0 8px; } 10%, 80% { opacity: 1; translate: 0 -8px; } 100% { opacity: 0; translate: 0 -20px; } }

/* --- Saltos: Leo (secreto) y la oveja --- */
.salta { animation-name: leo, flota, salto; animation-duration: 1s, 1.5s, .35s; animation-timing-function: steps(8, jump-none), ease-in-out, ease-out; animation-iteration-count: infinite, infinite, 1; animation-direction: normal, alternate, normal; }
@keyframes salto { 40% { translate: 0 -18px; } 100% { translate: 0 0; } }
.guia-leo { cursor: pointer; }
.guia-leo.leyenda { filter: drop-shadow(0 0 10px rgba(242, 199, 68, .9)) brightness(1.15); transition: filter .3s; }

/* --- Lo que viene: el cofre se sacude, pero no abre --- */
.card.bloqueada { cursor: default; }
.card.bloqueada.sacude .icon-img { animation: sacudida .65s steps(2, jump-none); }
.card.bloqueada.sacude .candado svg { animation: candado .65s steps(2, jump-none); }
@keyframes sacudida {
  0%, 100% { transform: none; } 15% { transform: translateX(-4px) rotate(-6deg); } 30% { transform: translateX(4px) rotate(6deg); }
  45% { transform: translateX(-3px) rotate(-4deg); } 60% { transform: translateX(3px) rotate(4deg); } 80% { transform: translateX(-1px); }
}
@keyframes candado { 0%, 100% { transform: none; } 25% { transform: rotate(-18deg); } 50% { transform: rotate(14deg); } 75% { transform: rotate(-8deg); } }

/* --- Leo vuelve junto al formulario --- */
.beta-zona { position: relative; width: 100%; max-width: 520px; margin-top: 24px; }
.beta-zona .beta-form { margin-top: 0; }
.beta-guia { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-bottom: 8px; }
.beta-leo {
  flex: none; width: 150px; height: 172.5px;
  background: url("../img/juego/leo_saluda.png") 0 0 / 1600% 100% no-repeat; image-rendering: pixelated;
  animation: leo-saluda 3s step-end infinite, flota 1.5s ease-in-out infinite alternate;
}
.beta-globo {
  position: relative; margin: 0 0 96px !important; padding: 10px 14px; max-width: 200px !important;
  font: 400 .9rem/1.4 "Inter", var(--f-body) !important; color: #fff !important; text-align: left;
  background: rgba(16, 10, 36, .95); border: 2px solid rgba(245, 158, 11, .75); border-radius: 14px;
}
.beta-globo::after {
  content: ""; position: absolute; right: -7px; top: 50%; width: 12px; height: 12px;
  background: rgb(16, 10, 36); border-right: 2px solid rgba(245, 158, 11, .75); border-top: 2px solid rgba(245, 158, 11, .75);
  transform: translateY(-50%) rotate(45deg);
}
@media (min-width: 1000px) {
  /* Leo hangs to the right of the form: shift the pair by half his width so the two read centred. */
  .beta-zona { left: -115px; }
  .beta-guia { position: absolute; left: 100%; bottom: 0; width: 210px; margin: 0 0 0 20px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .beta-globo { margin: 0 !important; }
  .beta-globo::after { right: auto; left: 24px; top: auto; bottom: -7px; transform: rotate(135deg); }
}
.beta-guia.celebra .beta-leo { animation-name: leo-saluda, flota, festejo; animation-duration: 3s, 1.5s, .5s; animation-timing-function: step-end, ease-in-out, ease-out; animation-iteration-count: infinite, infinite, 3; animation-direction: normal, alternate, normal; }
@keyframes festejo { 40% { translate: 0 -22px; } 100% { translate: 0 0; } }

/* --- ¡Misión cumplida!: el formulario se vuelve el cartel (cinta de la app) --- */
.logro {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 36px 28px 32px; background: var(--piedra); box-shadow: inset 0 0 0 2px var(--oro);
  animation: logro-entra .45s ease-out;
}
.logro:focus { outline: none; }
@keyframes logro-entra { from { opacity: 0; transform: scale(.94); } }
.cinta { display: flex; height: 64px; margin: 0 !important; max-width: none !important; image-rendering: pixelated; }
.cinta::before, .cinta::after { content: ""; width: 22px; flex: none; background: url("../img/juego/hud/cinta_izq.png") 0 0 / 100% 100% no-repeat; }
.cinta::after { background-image: url("../img/juego/hud/cinta_der.png"); }
.cinta span {
  display: grid; place-items: center; padding: 0 10px 8px;
  background: url("../img/juego/hud/cinta_medio.png") 0 0 / 100% 100% repeat-x;
  font: 700 clamp(1.15rem, 4vw, 1.5rem)/1 var(--f-title); color: #fff; white-space: nowrap;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .55);
}
.logro-texto { margin: 6px 0 0 !important; font-size: 1rem !important; }

/* --- La oveja del pie (sheep_graze / sheep_move de la app) --- */
.foot { position: relative; }
.oveja {
  position: absolute; left: 0; bottom: calc(100% - 24px); width: 96px; height: 96px;
  padding: 0; border: 0; cursor: pointer;
  background: url("../img/juego/oveja.png") 0 0 / 1200% 100% no-repeat; image-rendering: pixelated;
  transform: translateX(var(--x, 55vw)) scaleX(var(--dir, 1));
  animation: cuadros calc(12s / 7) steps(12, jump-none) infinite;
}
.oveja.camina { background-image: url("../img/juego/oveja_camina.png"); background-size: 400% 100%; animation: cuadros .5s steps(4, jump-none) infinite; }
.oveja.salta { animation: cuadros calc(12s / 7) steps(12, jump-none) infinite, salto .35s ease-out; }
.oveja:focus-visible { outline: 2px solid var(--agua); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .nubes i, .beta-leo, .oveja, .oveja.camina { animation: none; }
  .mision, .mision.visible { transition: opacity .2s; transform: translateX(-50%); }
  .logro { transition: none; animation: none; }
  .beta-guia.celebra .beta-leo { animation: none; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 719px) {
  .mision, .mision.visible { transform: none; }
}

/* ════════════════ Escritorio: cada sección mide una pantalla ════════════════
   Mínimo el alto de la ventana menos el header, con el contenido centrado. Solo en
   pantallas anchas y altas: en el teléfono el contenido manda. */
@media (max-width: 899px) { .juego-grid { grid-template-areas: "cabeza" "tel" "pasos"; } }
.juego-cabeza { grid-area: cabeza; }
.telefono { grid-area: tel; }
.juego-pasos { grid-area: pasos; }
.juego-cabeza .intro { margin-bottom: 0; }

@media (min-width: 900px) and (min-height: 680px) {
  :root { --pantalla: calc(100svh - 68px); }
  main > section {
    min-height: min(var(--pantalla), 1000px);
    display: flex; flex-direction: column; justify-content: center;
    padding-block: clamp(32px, 6vh, 72px);
  }
  main > section > .wrap { width: 100%; }

  /* El juego: el teléfono a todo el alto a la izquierda; título, pasos y rangos a la derecha */
  .juego-grid {
    grid-template-columns: auto 1fr; grid-template-areas: "tel ." "tel cabeza" "tel pasos" "tel .";
    grid-template-rows: 1fr auto auto 1fr; gap: 0 72px; align-items: start;
  }
  .telefono { width: calc((min(var(--pantalla), 1000px) - 2 * clamp(32px, 6vh, 72px) - 92px) * 9 / 16); max-width: 380px; }
  .juego-cabeza { margin-bottom: 32px; }
  .juego-cabeza h2 { margin-bottom: 12px; }
  .juego-grid .steps { grid-template-columns: 1fr; gap: 14px; }
  .juego-cabeza h2 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); }
  .juego-grid .steps .card { display: grid; grid-template-columns: auto 1fr; gap: 0 18px; padding: 20px 24px; align-items: center; }
  .juego-grid .step-n { grid-row: span 2; margin: 0; }
  .juego-grid .steps h3 { margin: 0 0 2px; font-size: 1.2rem; }

  /* Tecnología: más compacta para caber en una pantalla */
  #tecnologia .intro { margin-bottom: 28px; }
  #tecnologia .ai { margin-bottom: 20px; }
  #tecnologia .ai-card { flex-direction: row; justify-content: center; gap: 16px; padding: 22px 16px; }
  #tecnologia .ai-logo { width: 44px; height: 44px; margin: 0; }
  #tecnologia .ai-name { font-size: 1.6rem; }
  #tecnologia .card { padding: 22px 24px; }
  #tecnologia .icon-img { width: 56px; height: 56px; margin-bottom: 10px; }

  /* Beta: sin el sello (Leo ya acompaña) y el formulario más compacto */
  .cta .seal-md { display: none; }
  .cta h2 { margin-bottom: 8px; }
  .cta .beta-zona { margin-top: 12px; }
  .beta-form { padding: 24px 28px; gap: 14px; }

  /* Las secciones de texto: menos aire abajo de la introducción */
  .intro { margin-bottom: 36px; }
}

/* --- Celebración al suscribirse (js/beta.js): la de la app al registrarse ---
   welcome_celebration.dart: velo oscuro, lluvia de confeti detrás y una tarjeta
   (GameStyle.card del skin clásico) que entra escalando de .82 con rebote. */
.festejo {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 16px; border: 0; background: transparent;
  display: grid; place-items: center; overflow: auto;
}
.festejo:not([open]) { display: none; }
.festejo::backdrop { background: rgba(0, 0, 0, .6); }
.festejo-confeti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.festejo-tarjeta {
  position: relative; width: min(380px, 100%);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 26px 24px 24px; color: #fff;
  background: linear-gradient(rgba(27, 17, 64, .98), rgba(11, 6, 32, .98));
  border: 2px solid rgba(245, 158, 11, .6); border-radius: 24px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .67);
  animation: festejo-entra .46s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes festejo-entra { from { opacity: 0; transform: scale(.82); } }
.festejo-tarjeta h2 {
  margin: 0; font: 700 1.25rem/1.5 var(--f-title); color: #FDE68A; text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .8);
}
.festejo-guia { position: relative; display: flex; flex-direction: column; align-items: center; margin: 14px 0 4px; }
.festejo-globo {
  position: relative; margin: 0 0 10px; padding: 10px 14px; max-width: 280px;
  font: 400 .92rem/1.4 "Inter", var(--f-body); color: #fff;
  background: rgba(16, 10, 36, .95); border: 2px solid rgba(245, 158, 11, .75); border-radius: 14px;
}
.festejo-globo::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; margin-left: -6px;
  background: rgb(16, 10, 36); border-right: 2px solid rgba(245, 158, 11, .75); border-bottom: 2px solid rgba(245, 158, 11, .75);
  transform: rotate(45deg);
}
.festejo-leo {
  width: 200px; height: 230px;
  background: url("../img/juego/leo_saluda.png") 0 0 / 1600% 100% no-repeat; image-rendering: pixelated;
  animation: leo-saluda 3s step-end infinite, flota 1.5s ease-in-out infinite alternate, festejo .5s ease-out .35s 3;
}
.festejo-sombra { width: 86px; height: 14px; margin-top: -10px; border-radius: 10px; background: radial-gradient(rgba(0, 0, 0, .45), transparent 70%); }
.festejo-texto { margin: 12px 0 22px; font-size: .95rem; line-height: 1.35; color: rgba(255, 255, 255, .72); }
.festejo .btn { border: 0; cursor: pointer; }
/* El aviso de misión espera a que se cierre la celebración */
body:has(.festejo[open]) .mision { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .festejo-tarjeta, .festejo-leo { animation: none; }
}

/* --- Aviso de cookies (js/medicion.js): panel piedra con borde oro, abajo a la derecha (a la izquierda está el texto del hero).
   En teléfono ocupa el ancho de abajo (el aviso de misión ahí sale arriba). --- */
.cookies {
  position: fixed; z-index: 7; right: 16px; bottom: 16px; width: min(380px, calc(100% - 32px));
  padding: 18px 20px 20px;
  color: var(--pergamino); background: var(--piedra);
  box-shadow: inset 0 0 0 2px var(--oro), 0 16px 48px rgba(0, 0, 0, .45);
  animation: cookies-entra .35s cubic-bezier(.2, 1.4, .4, 1);
}
.cookies-tit { margin: 0 0 6px; font: 600 .8rem var(--f-title); letter-spacing: .12em; text-transform: uppercase; color: var(--oro); }
.cookies-texto { margin: 0 0 14px; font-size: .92rem; line-height: 1.45; color: var(--muted); }
.cookies-texto .enlace { color: var(--pergamino); }
.cookies-botones { display: flex; flex-wrap: wrap; gap: 10px; }
.cookies-botones .btn { cursor: pointer; border: 0; }
@keyframes cookies-entra { from { opacity: 0; transform: translateY(24px); } }
/* Solo donde se cruzarían (el de misión va centrado, este a la derecha). */
@media (min-width: 720px) and (max-width: 1099px) {
  body.con-cookies .mision { bottom: calc(var(--alto-cookies, 160px) + 32px); }
}
@media (max-width: 719px) {
  .cookies { left: 16px; right: 16px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { .cookies { animation: none; } }
