/* Juegos interactivos de preescolar */

.juego-body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 12% 8%, #FFF1E8 0%, #FFFCF6 45%, #F3FBF7 100%);
  font-family: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #1F2937;
}

.juego-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem clamp(1rem, 3vw, 2rem);
}

.juego-volver {
  font-weight: 800;
  color: #2B4C7E;
  text-decoration: none;
  padding: .45rem .9rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #E5E7EB;
}

.juego-volver:hover { text-decoration: none; border-color: #E14B3C; color: #E14B3C; }

.juego-titulo {
  font-weight: 900;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  color: #2B4C7E;
  text-align: center;
  flex: 1;
}

.juego-puntos {
  font-weight: 900;
  font-size: 1.15rem;
  background: #FFF3D6;
  border: 2px solid #F5B301;
  color: #8A5A00;
  padding: .35rem .9rem;
  border-radius: 999px;
  transition: transform .18s ease;
}

.juego-puntos.late { animation: late .45s ease; }

@keyframes late {
  0% { transform: scale(1); }
  40% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

.juego-main {
  max-width: 940px;
  margin: 0 auto;
  padding: .5rem clamp(1rem, 3vw, 2rem) 3rem;
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.juego-consigna {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin: .5rem 0 1.4rem;
}

#consigna {
  margin: 0;
  font-size: clamp(1.15rem, 2.8vw, 1.7rem);
  font-weight: 900;
  text-align: center;
  color: #1F2937;
}

.juego-audio {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid #E14B3C;
  background: #fff;
  color: #E14B3C;
  font-size: 1.15rem;
  cursor: pointer;
}

.juego-audio:hover { background: #FDF1EC; }

.juego-tablero[hidden],
.juego-final[hidden] { display: none !important; }

.juego-tablero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.7rem, 2vw, 1.2rem);
  place-items: center;
  padding: .5rem;
  min-height: 260px;
  max-width: 620px;
  margin: 0 auto;
}

.juego-tablero.tipo-busca,
.juego-tablero.tipo-ordena {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 620px;
  margin: 0 auto;
}

.juego-tablero.tipo-clasifica,
.juego-tablero.tipo-reacciona,
.juego-tablero.tipo-mezcla,
.juego-tablero.tipo-ruleta {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
}

.juego-tablero.memoria {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 470px;
  place-items: stretch;
  gap: .7rem;
}

.figura svg { width: 100%; height: auto; max-width: 118px; display: block; }

.figura {
  background: none;
  border: 0;
  padding: .35rem;
  border-radius: 18px;
  cursor: pointer;
  line-height: 0;
  transition: transform .12s ease, box-shadow .12s ease;
}

.figura:hover { transform: scale(1.07); }
.figura:focus-visible { outline: 4px solid #2B4C7E; outline-offset: 4px; }

.figura.ok {
  box-shadow: 0 0 0 5px #34A853 inset, 0 0 0 3px #34A853;
  border-radius: 18px;
}

.figura.mal { animation: sacudir .42s ease; }

@keyframes sacudir {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px) rotate(-3deg); }
  40% { transform: translateX(7px) rotate(3deg); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.cajas {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(.8rem, 2.5vw, 1.6rem);
  justify-content: center;
  margin-top: 1rem;
}

.caja {
  background: #fff;
  border: 4px dashed #CBD5E1;
  border-radius: 22px;
  padding: .9rem 1.2rem;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.caja:hover { border-color: #E14B3C; background: #FDF1EC; }

.pieza-actual { display: flex; justify-content: center; margin-bottom: .6rem; }

.luz {
  width: min(230px, 46vw);
  aspect-ratio: 1;
  border-radius: 50%;
  margin: 0 auto 1.6rem;
  background: #E5E7EB;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .16), inset 0 -10px 30px rgba(0, 0, 0, .12);
  transition: background .25s ease;
}

.accion {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 900;
  padding: 1rem 1.4rem;
  border-radius: 18px;
  border: 3px solid #2B4C7E;
  background: #fff;
  color: #2B4C7E;
  cursor: pointer;
  transition: transform .12s, background .15s;
}

.accion:hover { background: #EAF0F8; transform: translateY(-2px); }

.accion.mal { animation: sacudir .42s ease; }

.mezcla-mesa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin-bottom: 1.2rem;
}

.mas { font-size: 2rem; font-weight: 900; color: #6B7280; }

.hueco {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px dashed #CBD5E1;
  font-size: 2rem;
  font-weight: 900;
  color: #9CA3AF;
}

.carta {
  width: 100%;
  aspect-ratio: 1;
  min-height: 84px;
  border-radius: 16px;
  border: 3px solid #F3C9BE;
  background: #FDF1EC;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .15s, background .15s;
}

.carta svg { width: 70%; height: auto; }

.carta:hover { transform: translateY(-3px); }
.carta.abierta { background: #fff; border-color: #E14B3C; }
.carta.ok { border-color: #34A853; box-shadow: 0 0 0 4px #34A85333; }

.juego-final { text-align: center; padding: 2rem 1rem; }
/* Globos: flotan en una rejilla y se revientan */
.juego-tablero.tipo-globos {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 560px;
  margin: 0 auto;
  gap: .4rem;
}

.globo {
  width: 96px;
  height: 96px;
  padding: 0;
  margin: 0;
  animation-name: flotar;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-duration: 3s;
}

.globo:nth-child(2n) { animation-delay: -.9s; }
.globo:nth-child(3n) { animation-delay: -1.6s; }
.globo:nth-child(4n) { animation-delay: -2.3s; }

.globo svg {
  width: 100%;
  height: 100%;
  max-width: none;
}

@keyframes flotar {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-16px) rotate(4deg); }
}

.globo.reventado {
  animation: none;
  transition: transform .3s ease, opacity .3s ease;
  transform: scale(1.7);
  opacity: 0;
}

/* Topos */
.juego-tablero.tipo-topos {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 470px;
  margin: 0 auto;
  gap: .8rem;
  place-items: stretch;
}

.agujero {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  background: radial-gradient(ellipse at 50% 70%, #E8D5B7 0 42%, #B99A72 43% 100%);
  box-shadow: inset 0 10px 20px rgba(0, 0, 0, .22);
}

.agujero .topo {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 110%);
  animation: asomar .2s ease forwards;
  line-height: 0;
}

@keyframes asomar {
  to { transform: translate(-50%, 6%); }
}

.topo.atrapado {
  animation: atrapar .3s ease forwards;
}

@keyframes atrapar {
  to { transform: translate(-50%, 110%) scale(.5); opacity: .2; }
}

.agujero.bien { box-shadow: inset 0 0 0 5px #34A853; }

@media (prefers-reduced-motion: reduce) {
  .juego-tablero.tipo-globos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: auto;
  }
  .globo { position: static; animation: none; }
  .agujero .topo { animation: none; transform: translate(-50%, 6%); }
  .topo.atrapado { animation: none; }
}

/* Cajas sorpresa */
.juego-tablero.tipo-cajas {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 470px;
  margin: 0 auto;
  gap: .9rem;
  place-items: stretch;
}

.caja-sorpresa {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  background: linear-gradient(160deg, #F5B301, #E14B3C);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .16);
  display: grid;
  place-items: center;
  transition: transform .15s ease;
}

.caja-sorpresa:hover { transform: translateY(-3px); }

.caja-sorpresa .tapa {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .2);
}

.caja-sorpresa.abierta {
  background: #FFF7EC;
  box-shadow: inset 0 0 0 3px #E8D9C7;
  cursor: default;
}

.caja-sorpresa.acierto { box-shadow: inset 0 0 0 5px #34A853; }
.caja-sorpresa .contenido { display: block; line-height: 0; }

/* Ruleta */
.ruleta-envoltura {
  position: relative;
  width: min(340px, 72vw);
  aspect-ratio: 1;
  margin: 0 auto 1.2rem;
}

.ruleta {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 8px solid #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

.ruleta-aguja {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 28px solid #E14B3C;
  z-index: 2;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25));
}

.ruleta-centro {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .22);
}

.ruleta-resultado {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  margin-top: 1rem;
  text-align: center;
}

.ruleta-resultado strong { font-size: clamp(1.05rem, 2.4vw, 1.4rem); }

/* Fiesta: confeti al ganar */
.confeti-capa {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 9999;
}

.confeti-pieza {
  position: absolute;
  top: -26px;
  display: block;
  border-radius: 2px;
  opacity: .95;
  animation-name: caer;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes caer {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(112vh) rotate(900deg); opacity: .85; }
}

.final-charles {
  display: block;
  width: 128px;
  height: auto;
  margin: 0 auto .2rem;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .16));
}

.juego-final-estrella { animation: saltar .8s ease infinite alternate; }

@keyframes saltar {
  from { transform: translateY(0) scale(1); }
  to   { transform: translateY(-10px) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  /* Aun sin animación, el festejo se ve: confeti quieto repartido. */
  .confeti-capa { display: block; }
  .confeti-pieza { animation: none !important; top: 50%; }
  .confeti-pieza:nth-child(3n)  { top: 18%; }
  .confeti-pieza:nth-child(3n+1){ top: 38%; }
  .confeti-pieza:nth-child(4n)  { top: 62%; }
  .confeti-pieza:nth-child(5n)  { top: 78%; }
  .confeti-pieza:nth-child(7n)  { top: 28%; }
  .juego-final-estrella { animation: none; }
}
.juego-final-titulo { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 900; margin: .4rem 0; color: #2B4C7E; }
.juego-final-resumen { font-size: 1.1rem; color: #4B5563; margin-bottom: 1.4rem; }
.juego-final-botones {
  display: flex;
  gap: .8rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.juego-final-enlace {
  font-size: .9rem;
  color: #4B5563;
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .figura, .carta, .accion, .juego-puntos { transition: none; }
  .figura.mal, .accion.mal, .juego-puntos.late, .juego-final-estrella { animation: none; }
}

@media (max-width: 520px) {
  .juego-tablero { grid-template-columns: repeat(3, 1fr); }
  .juego-tablero.memoria { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Letras ---- */
.juego-tablero.tipo-letras {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 460px;
  margin: 0 auto;
  place-items: stretch;
  gap: 1rem;
}

.letra-btn {
  aspect-ratio: 1 / .8;
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 900;
  color: #2B4C7E;
  background: #fff;
  border: 4px solid #E14B3C;
  border-radius: 20px;
  cursor: pointer;
  transition: transform .12s ease, background .15s;
}

.letra-btn:hover { transform: translateY(-3px); background: #FDF1EC; }
.letra-btn.mal { animation: sacudir .42s ease; }

/* ---- Lados ---- */
.juego-tablero.tipo-lados {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
}

.lado-escena {
  position: relative;
  width: min(560px, 92vw);
  height: 240px;
  border-radius: 20px;
  background: linear-gradient(180deg, #FFF7EC, #FDF1EC);
  border: 3px dashed #E8D9C7;
  overflow: hidden;
}

.lado-animal {
  position: absolute;
  bottom: 6px;
  height: 200px;
  width: auto;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .14));
}

.lado-animal.izquierda { left: 8%; }
.lado-animal.derecha   { right: 8%; }

.lado-btn { min-width: 180px; }

/* ---- Patrones e intruso ---- */
.juego-tablero.tipo-patrones {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
}

.patron-fila {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 1.4rem;
}

.patron-pieza {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid var(--line, #E5E7EB);
}

.patron-hueco {
  font-size: 2rem;
  font-weight: 900;
  color: #9CA3AF;
  border-style: dashed;
  border-width: 3px;
}

.juego-tablero.tipo-intruso {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 460px;
  margin: 0 auto;
  place-items: stretch;
  gap: 1rem;
}

.intruso-pieza {
  background: #fff;
  border: 3px solid var(--line, #E5E7EB);
  border-radius: 18px;
  padding: .8rem;
  display: grid;
  place-items: center;
}

.intruso-pieza:hover { border-color: #E14B3C; }

/* Posiciones del animal en la escena */
.lado-animal.arriba  { top: 10px; left: 50%; transform: translateX(-50%); bottom: auto; }
.lado-animal.abajo   { bottom: 10px; left: 50%; transform: translateX(-50%); }
.lado-animal.izquierda { left: 8%; right: auto; bottom: 10px; }
.lado-animal.derecha   { right: 8%; left: auto; bottom: 10px; }

/* Reverso de las cartas de memoria: que no parezcan vacías */
.carta:not(.abierta)::before {
  content: "?";
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 900;
  color: #E14B3C;
  opacity: .55;
}

.carta:not(.abierta) {
  background: linear-gradient(160deg, #FFF3EC, #FDE3D8);
  border-color: #F3C9BE;
}

/* Globos ilustrados */
.globo-img{display:block;margin:0 auto;animation:flotar 3.2s ease-in-out infinite;filter:drop-shadow(0 8px 12px rgba(0,0,0,.16))}

/* Figuras ilustradas en los juegos */
.figura-img{display:inline-block;vertical-align:middle;pointer-events:none}

/* Color y palabra: círculos animados */
.color-bola img{display:block;width:100%;height:100%;object-fit:contain}

/* ---------------------------------------------------------------
   Red de seguridad: ningún botón de juego puede colapsar a 0.
   Todas las vistas de juego usan rejillas con aspect-ratio; si el
   contenedor no aporta ancho, el botón desaparece. Un tamaño mínimo
   garantiza que siempre se vea algo.
   --------------------------------------------------------------- */
.num-bola, .fruta-bola, .img-bola, .let-opcion, .fig-opcion,
.letra-btn, .conteo-num, .mir-boton, .mem-pieza, .patron-pieza {
  min-width: 96px;
  min-height: 96px;
}

.mem-carta, .globo, .mem-pieza, .img-bola {
  min-width: 74px;
  min-height: 74px;
}

/* Selector para cambiar de juego sin salir. */
.juego-cambiar select {
  appearance: none;
  border: 2px solid var(--line, #E5E7EB);
  background: #fff;
  color: #2B4C7E;
  font-weight: 800;
  font-size: .82rem;
  padding: .45rem .8rem;
  border-radius: 999px;
  max-width: 190px;
  cursor: pointer;
}
.juego-cambiar select:hover { border-color: #E14B3C; }

/* ---------------------------------------------------------------
   Cambiar de juego: rejilla de imágenes, sin texto que leer.
   --------------------------------------------------------------- */
.juego-menu { position: relative; }

.juego-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: .15rem;
  background: #fff;
  border: 2px solid var(--line, #E5E7EB);
  border-radius: 999px;
  padding: .25rem .5rem .25rem .25rem;
  cursor: pointer;
  transition: border-color .15s, transform .12s;
}
.juego-menu summary::-webkit-details-marker { display: none; }
.juego-menu summary:hover { border-color: #E14B3C; transform: translateY(-1px); }
.juego-menu summary img { width: 34px; height: 34px; object-fit: contain; display: block; }
.juego-menu-mas { font-size: .8rem; color: #2B4C7E; font-weight: 900; line-height: 1; }

.juego-menu-lista {
  position: absolute;
  top: calc(100% + .5rem);
  left: 0;
  z-index: 10000;
  display: grid;
  grid-template-columns: repeat(5, 56px);
  gap: .45rem;
  padding: .6rem;
  background: #fff;
  border: 2px solid var(--line, #E5E7EB);
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .16);
  max-height: 60vh;
  overflow-y: auto;
}

.juego-menu-item {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #FFF6EC;
  border: 2px solid transparent;
  transition: transform .12s, border-color .15s;
}
.juego-menu-item img { width: 44px; height: 44px; object-fit: contain; }
.juego-menu-item:hover { transform: scale(1.06); border-color: #E14B3C; }
.juego-menu-item.actual { border-color: #34A853; background: #F2FBF4; }

/* Etiqueta flotante propia, más agradable que el title del navegador. */
.juego-menu-item { position: relative; }

.juego-menu-item::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #2B4C7E;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.2;
  padding: .35rem .6rem;
  border-radius: 10px;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
  z-index: 10001;
}

.juego-menu-item:hover::after,
.juego-menu-item:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Las piezas de confeti necesitan tamaño propio: las vistas de juego no lo
   fijan por JavaScript, así que sin esto medían 0 × 0 y no se veía nada. */
.confeti-pieza {
  width: 9px;
  height: 13px;
}

/* Los juegos ya traen su propio altavoz. Se oculta para que quede solo la
   bocina nueva, que late y lee también el nombre del juego. */
.juego-audio,
#escuchar,
[class*="altavoz"],
[class*="bocina-vieja"] {
  display: none !important;
}


/* ==========================================================================
   Felicitación al terminar un juego (festejo.js)
   Charles en video (negro recortado) + cuetes + confeti
   ========================================================================== */
.festejo-banner {
  position: fixed;
  left: 50%;
  top: 22%;
  transform: translate(-50%, 0) scale(.6);
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .9rem 1.5rem .9rem 1rem;
  border-radius: 26px;
  background: linear-gradient(150deg, #FFFFFF 0%, #FFF6EC 55%, #FFE9D6 100%);
  border: 4px solid #F5B301;
  box-shadow: 0 20px 44px rgba(120, 60, 20, .3), 0 0 0 9px rgba(255, 255, 255, .6);
  z-index: 10000;
  pointer-events: none;
  animation: festejoEntra .5s cubic-bezier(.2, 1.4, .4, 1) forwards;
}
.festejo-banner.festejo-saliendo { animation: festejoSale .6s ease forwards; }
.festejo-medio {
  width: 168px;
  height: 150px;
  display: grid;
  place-items: end center;
  overflow: visible;
}
.festejo-video {
  height: 152px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(120, 60, 20, .25));
  animation: festejoBaila 1.2s ease-in-out infinite;
}
.festejo-texto { display: flex; flex-direction: column; line-height: 1; }
.festejo-arriba {
  font-size: clamp(2rem, 5.4vw, 3.1rem);
  font-weight: 900;
  letter-spacing: .01em;
  color: #E14B3C;
  -webkit-text-stroke: 4px #fff;
  paint-order: stroke fill;
  text-shadow: 0 7px 0 rgba(225, 75, 60, .22);
}
.festejo-abajo {
  margin-top: .4rem;
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  font-weight: 800;
  color: #2B4C7E;
}
.festejo-fx {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
}
.festejo-estrellas {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 9999;
}
.festejo-estrellas span {
  position: absolute;
  bottom: -40px;
  animation-name: festejoSube;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}
@keyframes festejoEntra {
  0%   { opacity: 0; transform: translate(-50%, -30px) scale(.6) rotate(-6deg); }
  70%  { opacity: 1; transform: translate(-50%, 0) scale(1.05) rotate(2deg); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(0deg); }
}
@keyframes festejoSale {
  to { opacity: 0; transform: translate(-50%, -26px) scale(.85); }
}
@keyframes festejoBaila {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50%      { transform: rotate(3deg) translateY(-5px); }
}
@keyframes festejoSube {
  0%   { transform: translateY(0) scale(.6) rotate(0deg); opacity: 0; }
  15%  { opacity: 1; }
  100% { transform: translateY(-92vh) scale(1.15) rotate(220deg); opacity: 0; }
}
@media (max-width: 640px) {
  .festejo-banner { top: 14%; padding: .7rem 1rem; }
  .festejo-medio { width: 130px; height: 110px; }
  .festejo-video { height: 108px; max-width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .festejo-banner, .festejo-video, .festejo-estrellas span { animation: none; }
}
