/* Juegos de Ciudad Brócoli: capa visual (Halloween + celular).
   Estilo sticker plano: contorno café #8C5A34 y borde crema. */
:root {
  --hw-naranja: #F28C28;
  --hw-naranja-claro: #FFB55A;
  --hw-morado: #4B2A6B;
  --hw-lila: #8E6BBF;
  --hw-noche: #1E2240;
  --hw-pocion: #9BD15A;
  --cafe: #8C5A34;
}
body.universo { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
body.en-juego, body.en-juegos { overscroll-behavior: none; }
body.en-juego .juego-pantalla, .menu-juegos { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.juego-pantalla img, .menu-juegos img { -webkit-user-drag: none; }
.juego-pantalla button, .juego-pantalla .boton, .menu-juegos .boton { min-height: 44px; min-width: 44px; }

/* ---------- Escenario (fondo de cada juego) ---------- */
.escenario {
  position: relative;
  isolation: isolate;
  background: var(--fondo) center / cover no-repeat, #f6efe2;
}
body.tema-halloween .escenario { background-color: var(--hw-noche); color: #fffaf3; }
body.tema-halloween .escenario::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(30, 34, 64, 0.15), rgba(30, 34, 64, 0.35) 60%, rgba(75, 42, 107, 0.55));
}
.tarjeta-sticker {
  background: #fffaf3; color: #4a3428;
  border: 3px solid var(--cafe); border-radius: 22px;
  box-shadow: 0 0 0 5px #fffaf3, 0 10px 24px rgba(20, 12, 40, 0.35);
}
body:not(.tema-halloween) .tarjeta-sticker { box-shadow: 0 0 0 4px #fff, var(--sombra); }
.barra-juego {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding-top: env(safe-area-inset-top);
}
.barra-juego h1 {
  flex: 1; margin: 0; font-size: clamp(1.05rem, 4.6vw, 1.5rem); text-align: center;
  color: inherit; text-shadow: 0 2px 0 rgba(75, 42, 107, 0.7);
}
body:not(.tema-halloween) .barra-juego h1 { text-shadow: none; }
.icono-juego { width: 44px; height: 44px; padding: 0; font-size: 20px; border-radius: 50%; }
.boton.naranja { background: var(--hw-naranja); border-color: var(--cafe); color: #fffaf3; }
.boton.morado { background: var(--hw-morado); border-color: var(--cafe); color: #fffaf3; }
body.tema-halloween .juego-pantalla .boton:not(.crema),
body.tema-halloween .menu-juegos .boton:not(.crema) {
  background: var(--hw-naranja); border: 3px solid var(--cafe); color: #fffaf3;
  box-shadow: 0 4px 0 #b8611a; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
body.tema-halloween .juego-pantalla .boton.crema, body.tema-halloween .menu-juegos .boton.crema {
  border: 3px solid var(--cafe); background: #fffaf3; color: #4a3428;
}
.juego-pantalla .boton:active, .menu-juegos .boton:active { transform: translateY(2px); }
.juego-pantalla .boton[aria-pressed="true"] { outline: 3px solid var(--hw-pocion); outline-offset: 2px; }

/* ---------- Personajes con accesorios en capas ---------- */
.retrato-hw { position: relative; display: inline-block; line-height: 0; }
.retrato-hw .pj { position: relative; z-index: 1; display: block; width: 100%; height: auto; max-width: none; }
.retrato-hw .acc { position: absolute; max-width: none; height: auto; pointer-events: none; }
.retrato-hw .capa { z-index: 0; }
.retrato-hw .sombrero, .retrato-hw .prop { z-index: 2; transform: rotate(var(--rot, 0deg)); transform-origin: 50% 100%; }
.retrato-hw.flota { animation: flota 3.2s ease-in-out infinite; }
@keyframes flota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- Menú de juegos ---------- */
.menu-juegos {
  min-height: 100%; padding: 12px 12px calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 12px; overflow: hidden;
}
.menu-juegos .titulo-hw { width: min(92%, 520px); height: auto; margin: 4px auto 0; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.menu-juegos h1.sin-tema { margin: 8px 0 0; }
.menu-juegos .bajada { margin: 0; text-align: center; font-weight: 600; max-width: 520px; }
.lista-juegos { display: grid; gap: 14px; width: 100%; max-width: 980px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .lista-juegos { grid-template-columns: repeat(3, 1fr); } }
.carta-juego {
  position: relative; display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 10px;
  padding: 10px 12px; text-decoration: none; min-height: 116px; overflow: visible;
  transition: transform 0.15s ease;
}
.carta-juego:hover, .carta-juego:focus-visible { transform: translateY(-3px) rotate(-0.5deg); }
.carta-juego .retrato-hw { width: 84px; justify-self: center; }
.carta-juego h2 { margin: 0 0 2px; font-size: 1.15rem; }
.carta-juego p { margin: 0; font-size: 0.92rem; line-height: 1.25; }
.carta-juego .meta { margin-top: 4px; font-size: 0.82rem; color: #6d5848; }
.carta-juego .jugar {
  position: absolute; right: 10px; bottom: -14px; min-height: 40px; padding: 4px 16px;
}
@media (min-width: 700px) {
  .carta-juego { grid-template-columns: 1fr; text-align: center; padding: 14px 14px 30px; }
  .carta-juego .retrato-hw { width: 120px; }
  .carta-juego .jugar { left: 50%; right: auto; transform: translateX(-50%); }
}
.carta-juego.pronto { opacity: 0.85; grid-template-columns: 1fr; min-height: 0; text-align: center; }
.menu-juegos .volver-mapa { margin-top: 10px; }

/* Decoración de noche: papel picado y calabacitas (sin animales vivos) */
.deco-noche { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.deco-picado { position: absolute; top: 0; left: 0; right: 0; height: 58px; display: flex; justify-content: space-around; align-items: flex-start;
  background: linear-gradient(transparent 5px, rgba(255,250,243,.7) 5px, rgba(255,250,243,.7) 7px, transparent 7px); }
.deco-picado i { display: block; width: 7%; max-width: 42px; height: 48px; margin-top: 6px; transform-origin: 50% 0; animation: picado 3.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.37s); background: var(--c, #f28c28); opacity: .92;
  clip-path: polygon(0 0, 100% 0, 100% 86%, 87.5% 100%, 75% 86%, 62.5% 100%, 50% 86%, 37.5% 100%, 25% 86%, 12.5% 100%, 0 86%);
  -webkit-mask: radial-gradient(circle at 30% 34%, transparent 0 13%, #000 14%), radial-gradient(circle at 70% 60%, transparent 0 11%, #000 12%);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.deco-picado i:nth-child(6n+1) { --c: #f28c28; } .deco-picado i:nth-child(6n+2) { --c: #8e4fc9; } .deco-picado i:nth-child(6n+3) { --c: #e2457a; }
.deco-picado i:nth-child(6n+4) { --c: #3fae5a; } .deco-picado i:nth-child(6n+5) { --c: #f6c445; } .deco-picado i:nth-child(6n) { --c: #2fa7d8; }
@keyframes picado { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
.deco-cala { position: absolute; top: 64px; width: 40px; filter: drop-shadow(0 3px 2px rgba(0,0,0,.4)); animation: brinca 2.6s ease-in-out infinite; }
.deco-cala.c1 { left: 6%; } .deco-cala.c2 { right: 7%; width: 32px; animation-delay: -1.3s; }
@keyframes brinca { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
.menu-juegos > *:not(.deco-noche) { position: relative; z-index: 1; }

/* ---------- Pantalla de juego común ---------- */
body.en-juego .juego-pantalla.escenario {
  max-width: none; width: 100%; margin: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}
@media (min-width: 1024px) {
  body.en-juego #contenido:has(.escenario) { grid-column: 1 / -1; }
  body.en-juego:has(.escenario) #panel-brotito, body.en-juego:has(.escenario) #panel-misiones { display: none; }
  body.en-juego .juego-pantalla.escenario { max-height: none; height: 100%; }
}
.panel-juego { padding: 14px; width: min(100%, 560px); margin: 0 auto; display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.panel-juego p { margin: 0; }
.panel-juego .cuidados { justify-content: center; }
.estrellas-fin { font-size: 44px; margin: 0; letter-spacing: 4px; color: var(--hw-naranja); }
.estrellas-fin span { display: inline-block; animation: estrella 0.5s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(var(--i) * 0.18s + 0.2s); }
.estrellas-fin .vacia { color: #c9b9a6; }
@keyframes estrella { from { transform: scale(0) rotate(-40deg); } to { transform: scale(1) rotate(0); } }
.sacude { animation: sacude 0.42s ease; }
@keyframes sacude { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px) rotate(-2deg); } 40% { transform: translateX(6px) rotate(2deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.capa-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }
.globo {
  position: relative; background: #fffaf3; color: #4a3428; border: 3px solid var(--cafe); border-radius: 18px;
  padding: 8px 12px; font-weight: 600; text-align: left;
}
.globo::after {
  content: ""; position: absolute; left: -10px; top: 18px; border: 8px solid transparent; border-right-color: var(--cafe);
}

/* ---------- Arma tu plato ---------- */
.plato-hw { display: grid; gap: 8px; height: 100%; grid-template-rows: auto auto 1fr auto auto; justify-items: center; }
.pedido-hw { display: flex; align-items: center; gap: 10px; width: min(100%, 560px); }
.pedido-hw .retrato-hw { width: 58px; flex: none; }
.pedido-hw .globo { flex: 1; font-size: 0.95rem; line-height: 1.25; }
.progreso-calabazas { display: flex; gap: 6px; justify-content: center; margin: 0; }
.progreso-calabazas img { width: 26px; height: 26px; opacity: 0.3; filter: grayscale(1); transition: all .3s; }
.progreso-calabazas img.hecho { opacity: 1; filter: none; transform: scale(1.1); }
.progreso-calabazas img.ahora { opacity: 0.85; filter: none; animation: flota 1.6s ease-in-out infinite; }
.mesa-hw { display: flex; align-items: center; justify-content: center; min-height: 0; width: 100%; }
.mantel {
  border-radius: 50%; padding: 4%; width: min(84vw, 44vh, 400px); aspect-ratio: 1;
  border: 3px solid var(--cafe); box-shadow: 0 0 0 5px #fffaf3, 0 12px 26px rgba(0,0,0,.35);
  background: #ffb55a;
}
body.tema-halloween .mantel { background: url("/static/universo/arte/halloween/mantel.webp?v=20261004q") center / 80px; }
.mantel .plato { width: 100%; margin: 0; }
.plato .zona { touch-action: none; transition: background-color .2s; }
.plato .zona.blanco { background: rgba(155, 209, 90, 0.35); outline: 3px dashed var(--cafe); }
.plato .zona img { width: clamp(40px, 12vw, 64px); height: auto; filter: drop-shadow(0 3px 0 rgba(140,90,52,.5)); animation: cae .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes cae { from { transform: translateY(-30px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.canasta-hw { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 560px); }
@media (min-width: 700px), (orientation: landscape) { .canasta-hw { grid-template-columns: repeat(6, 1fr); } }
.canasta-hw .alimento {
  border: 3px solid var(--cafe); background: #fffaf3; color: #4a3428; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 4px; min-height: 64px; font-size: 0.8rem; font-weight: 700; touch-action: none;
}
.canasta-hw .alimento img { width: 44px; height: 44px; object-fit: contain; pointer-events: none; }
.canasta-hw .alimento[aria-pressed="true"] { background: #ffe2b8; outline: 3px solid var(--hw-naranja); transform: translateY(-3px); }
.fantasma-pista { display: flex; align-items: center; gap: 8px; width: min(100%, 560px); min-height: 52px; }
.fantasma-pista img { width: 44px; height: 44px; flex: none; }
.fantasma-pista p { margin: 0; font-weight: 600; text-shadow: 0 1px 0 rgba(0,0,0,.35); }
body:not(.tema-halloween) .fantasma-pista p { text-shadow: none; }
.fantasma-pista.vacio img { opacity: 0; }
.arrastre {
  position: fixed; z-index: 70; width: 64px; height: 64px; pointer-events: none; margin: -32px 0 0 -32px;
  filter: drop-shadow(0 6px 6px rgba(0,0,0,.35));
}
@media (orientation: landscape) and (max-height: 520px) {
  .plato-hw { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; column-gap: 14px; align-items: center; }
  .plato-hw .barra-juego { grid-column: 1 / -1; }
  .plato-hw .pedido-hw { grid-column: 2; grid-row: 2; }
  .plato-hw .progreso-calabazas { grid-column: 2; grid-row: 4; }
  .plato-hw .mesa-hw { grid-column: 1; grid-row: 2 / span 3; }
  .plato-hw .canasta-hw { grid-column: 2; grid-row: 3; grid-template-columns: repeat(3, 1fr); }
  .plato-hw .fantasma-pista { grid-column: 1 / -1; display: none; }
  .mantel { width: min(46vw, 70vh); }
}

/* ---------- Memoria ---------- */
.juego-pantalla.memoria.escenario { gap: 6px; }
.juego-pantalla.memoria .rejilla { perspective: 900px; }
.memoria .carta { border: 0; background: transparent; padding: 0; touch-action: manipulation; }
.memoria .carta-inner { transition: transform .38s cubic-bezier(.4, 1.4, .5, 1); transform-style: preserve-3d; }
.memoria .carta.vista .carta-inner, .memoria .carta.par .carta-inner { transform: rotateY(180deg); }
.memoria .cara, .memoria .dorso {
  display: flex !important; align-items: center; justify-content: center;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 3px solid var(--cafe); border-radius: 14px; box-shadow: 0 0 0 3px #fffaf3, 0 5px 10px rgba(0,0,0,.3);
}
.memoria .cara { transform: rotateY(180deg); background: #fffaf3; }
body.tema-halloween .memoria .cara {
  background: radial-gradient(circle at 50% 45%, #fffaf3 55%, #ffe2b8 100%);
}
.memoria .dorso { background: #4B2A6B; }
.memoria .dorso img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transform: none; }
body:not(.tema-halloween) .memoria .dorso img { transform: scale(1.9); }
.memoria .cara img { width: 70%; height: 70%; object-fit: contain; }
.memoria .carta.par .cara { animation: brilla 0.9s ease; box-shadow: 0 0 0 3px #fffaf3, 0 0 18px 6px rgba(255,181,90,.9); }
@keyframes brilla { 0% { transform: rotateY(180deg) scale(1); } 40% { transform: rotateY(180deg) scale(1.08); } 100% { transform: rotateY(180deg) scale(1); } }
.memoria #marcador { margin: 0; text-align: center; font-weight: 700; }
.reverso-hw { width: 128px; height: auto; transform: rotate(-4deg); filter: drop-shadow(0 8px 10px rgba(0,0,0,.35)); }
.reverso-hw.dos { transform: rotate(6deg) translateY(6px); margin-left: -60px; }
.mazo-muestra { display: flex; justify-content: center; align-items: center; }

/* ---------- El Brócoli Infectado ---------- */
.infectado.escenario.en-menu, .infectado.escenario.en-fin { overflow: auto !important; }
.infectado .titulo-bloque { display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.infectado .titulo-bloque .retrato-hw { width: 110px; }
.infectado h1.titulo-juego { margin: 0; font-size: clamp(1.5rem, 7vw, 2.3rem); color: var(--hw-pocion); text-shadow: 0 3px 0 var(--hw-morado), 0 0 2px #000; }
body:not(.tema-halloween) .infectado h1.titulo-juego { color: var(--verde-oscuro); text-shadow: none; }
.elige-pj { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.elige-pj button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px;
  border: 3px solid var(--cafe); border-radius: 16px; background: #fffaf3; color: #4a3428; font-weight: 700; font-size: .8rem;
}
.elige-pj button .retrato-hw { width: 52px; }
.elige-pj button[aria-pressed="true"] { background: #ffe2b8; outline: 3px solid var(--hw-naranja); }
.elige-pj button:disabled { opacity: .45; }
.nota-movil { font-size: .9rem; opacity: .9; }
.infectado.en-partida.escenario { padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 6px; }
.infectado .barra-infectado { gap: 6px; }
.infectado .barra-infectado .reloj {
  margin: 0 auto; display: flex; align-items: center; gap: 6px; background: #fffaf3; color: #4a3428;
  border: 3px solid var(--cafe); border-radius: 999px; padding: 2px 12px 2px 4px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.infectado .barra-infectado .reloj img { width: 30px; height: 30px; }
.infectado .marcador-infectado { justify-content: center; }
.infectado .marcador-infectado li { color: #4a3428; font-size: 13px; padding: 1px 8px 1px 1px; }
.infectado .marcador-infectado li.yo { outline: 3px solid var(--hw-naranja); }
.infectado .marcador-infectado li .cara-mini { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; background: #fff; }
.infectado .marcador-infectado li.contaminado { background: #e3f5c8; }
.infectado .marcador-infectado li.contaminado .cara-mini { box-shadow: 0 0 0 2px var(--hw-lila); }
.lienzo-envoltura { position: relative; flex: 1; min-height: 0; width: 100%; touch-action: none; }
.lienzo-envoltura .lienzo-infectado { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 18px; background: #1d2a2a; }
.palanca { position: absolute; width: 132px; height: 132px; margin: -66px 0 0 -66px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,250,243,.25), rgba(255,250,243,.12)); border: 3px solid rgba(255,250,243,.7); opacity: 0; transition: opacity .15s; }
.palanca.activa { opacity: 1; }
.palanca .perilla { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  background: var(--hw-naranja); border: 3px solid var(--cafe); box-shadow: 0 0 0 3px #fffaf3; }
.ayuda-tactil { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; pointer-events: none;
  background: rgba(30,34,64,.75); color: #fffaf3; border-radius: 999px; padding: 6px 14px; font-size: .9rem; white-space: nowrap; transition: opacity .4s; }
.ayuda-tactil.oculta { opacity: 0; }
.pausa-infectado { border-radius: 18px; }
body.tema-halloween .pausa-infectado { background: rgba(30, 34, 64, .92); color: #fffaf3; }
.fin-infectado .retrato-hw { width: 120px; }
.fin-infectado ul { text-align: left; margin: 0; padding-left: 18px; }
@media (orientation: landscape) and (max-height: 520px) {
  .infectado.en-partida .marcador-infectado { position: absolute; top: 52px; left: 12px; flex-direction: column; z-index: 3; pointer-events: none; }
  .infectado.en-partida .marcador-infectado li { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .deco-picado i, .deco-cala, .retrato-hw.flota { animation: none; }
}
.menu-juegos h1.sr:focus, .menu-juegos h1.sr:focus-visible { outline: none; }
body.tema-halloween .menu-juegos .bajada { text-shadow: 0 2px 4px rgba(20, 12, 40, 0.9), 0 0 2px #000; }
@media (max-width: 699px) {
  .carta-juego { padding-bottom: 18px; }
  .carta-juego .meta { margin-right: 84px; }
  .carta-juego .jugar { bottom: -12px; }
}
.mantel .plato { width: 100%; height: 100%; max-width: none; }
.plato .zona span { color: #4a3428; font-weight: 700; }
body.tema-halloween .fantasma-pista .nota { color: #fffaf3; }
.barra-juego h1:focus { outline: none; }
body.tema-halloween .memoria .dorso {
  background: #4B2A6B url("/static/universo/arte/halloween/patron_noche.webp?v=20261004q") center / 64px;
  box-shadow: inset 0 0 0 4px #F28C28, inset 0 0 0 6px #4B2A6B, 0 0 0 3px #fffaf3, 0 5px 10px rgba(0,0,0,.3);
}
.memoria .dorso img.dorso-calabaza { position: static; width: 62%; height: 62%; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(0,0,0,.25)); }
@media (max-width: 1023px) {
  body.en-juego #contenido .juego-pantalla.escenario { height: 100dvh; max-height: none; }
  body.en-juego #contenido .juego-pantalla.escenario.en-menu { overflow: auto; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .infectado.en-partida .marcador-infectado li > span:first-of-type { display: none; }
  .infectado.en-partida .marcador-infectado li { opacity: .92; }
}

/* Plaza de noche con arte propio en vertical y reverso de carta de IA */
@media (orientation: portrait) {
  body.tema-halloween .escenario.con-v { background-image: var(--fondo-v, var(--fondo)); background-position: center top; }
}
body.tema-halloween .menu-juegos.escenario::before {
  background: linear-gradient(180deg, rgba(20, 14, 48, 0.35), rgba(20, 14, 48, 0) 22%, rgba(20, 14, 48, 0) 45%, rgba(30, 20, 60, 0.45) 75%, rgba(40, 22, 70, 0.6));
}
body.tema-halloween .memoria .dorso { background: transparent; border: 0; box-shadow: none; }
.memoria .dorso img.dorso-carta { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; filter: drop-shadow(0 4px 4px rgba(0,0,0,.35)); }
/* Celular vertical: el letrero va sobre el cielo, el kiosco queda libre debajo
   y las tarjetas (compactas) empiezan en su base, para que quepan sin scroll. */
@media (orientation: portrait) and (max-width: 760px) {
  body.tema-halloween .menu-juegos.escenario.con-v { background-size: 100% auto; background-position: center -22vw; background-color: #795b7f; gap: 6px; padding-top: 6px; }
  body.tema-halloween .menu-juegos .titulo-hw { width: min(66%, 320px); margin-top: 0; }
  body.tema-halloween .menu-juegos .bajada { font-size: .85rem; max-width: 300px; }
  body.tema-halloween .menu-juegos.con-v .lista-juegos { margin-top: 30vw; gap: 12px; }
  body.tema-halloween .menu-juegos .carta-juego { grid-template-columns: 72px 1fr; min-height: 0; padding: 8px 10px 12px; }
  body.tema-halloween .menu-juegos .carta-juego .retrato-hw { width: 62px; }
  body.tema-halloween .menu-juegos .carta-juego h2 { font-size: 1.05rem; }
  body.tema-halloween .menu-juegos .carta-juego p { font-size: .84rem; }
  body.tema-halloween .menu-juegos .carta-juego .meta { font-size: .76rem; margin-top: 2px; }
  body.tema-halloween .menu-juegos .carta-juego .jugar { bottom: -12px; min-height: 44px; }
  body.tema-halloween .menu-juegos.escenario::before {
    background: linear-gradient(180deg, rgba(20, 14, 48, 0.3), rgba(20, 14, 48, 0) 12%, rgba(20, 14, 48, 0) 32%, rgba(40, 22, 70, 0.35) 50%, rgba(40, 22, 70, 0.5));
  }
}
/* Horizontal / escritorio: la plaza a todo lo ancho arriba. */
@media (orientation: landscape), (min-width: 761px) {
  body.tema-halloween .menu-juegos.escenario.con-v { background-size: 100% auto; background-position: center top; background-color: #795b7f; }
  body.tema-halloween .menu-juegos .titulo-hw { width: min(78%, 420px); }
  body.tema-halloween .menu-juegos.con-v .lista-juegos { margin-top: max(0px, calc(14vw - 120px)); }
}
/* Celular horizontal: letrero y bajada a la izquierda para que el kiosco del centro no quede tapado. */
@media (orientation: landscape) and (max-height: 520px) {
  body.tema-halloween .menu-juegos .titulo-hw { width: min(36%, 340px); align-self: flex-start; margin: 0 0 0 2%; }
  body.tema-halloween .menu-juegos .bajada { align-self: flex-start; text-align: left; max-width: 36%; margin-left: 2%; font-size: .85rem; }
  body.tema-halloween .menu-juegos.con-v .lista-juegos { margin-top: 6vw; }
}

/* ---------- El Brócoli Infectado: modo historia (fase 2) ---------- */
.boton-historia { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 64px; margin: 10px 0; font-size: 1.25rem; }
.boton-historia img { width: 44px; height: 56px; object-fit: contain; }
.historia { color: #fffaf3; }
.historia .barra-historia { display: flex; align-items: center; gap: 8px; }
.historia .barra-historia .contador { margin: 0 auto 0 0; }
.historia .icono-juego { min-width: 48px; min-height: 48px; font-size: 1.4rem; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; }
.historia .icono-juego img { width: 36px; height: 36px; object-fit: contain; }
.historia .contador { display: inline-flex; align-items: center; gap: 4px; font-size: 1.3rem; font-weight: 800; background: rgba(30,34,64,.7); border-radius: 999px; padding: 2px 12px 2px 4px; }
.historia .contador img { width: 36px; height: 36px; }
.historia .contador.grande { font-size: 1.8rem; }
.historia .contador.grande img { width: 52px; height: 52px; }
.historia .estrellas { display: inline-flex; gap: 2px; }
.historia .estrellas img { width: 22px; height: 22px; }
.historia .estrellas img.apagada, .historia img.apagado { filter: grayscale(1) brightness(.6); opacity: .6; }
.historia .ic { width: 32px; height: 32px; object-fit: contain; vertical-align: middle; }
.historia .ic-ch { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; }
.historia .ic-grande { width: 96px; height: 96px; object-fit: contain; }
/* Mapa de noches: la caja guarda la proporción del dibujo para que las paradas caigan en su lugar. */
.historia.en-mapa { gap: 6px; }
.mapa-noches-caja { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; container-type: size; }
.mapa-noches { position: relative; background-size: 100% 100%; border-radius: 18px; border: 3px solid #8C5A34; box-shadow: 0 0 0 3px #fffaf3; }
.mapa-noches.h { aspect-ratio: 16 / 9; width: min(100cqw, 100cqh * 16 / 9); }
.mapa-noches.v { aspect-ratio: 9 / 16; height: min(100cqh, 100cqw * 16 / 9); }
.parada { position: absolute; width: 13%; max-width: 76px; min-width: 48px; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 0; background: transparent; cursor: pointer; padding: 0; }
.mapa-noches.v .parada { width: 15%; }
.parada.actual { animation: latido 1.2s ease-in-out infinite; box-shadow: 0 0 0 4px #FFD36B, 0 0 18px #FFD36B; }
.parada.cerrada { background: rgba(30,34,64,.55); cursor: default; }
.parada .candado { font-size: 1.4rem; }
.parada .estrellas { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); }
.parada .estrellas img { width: 18px; height: 18px; }
.parada .yo { position: absolute; left: 50%; bottom: 78%; width: 120%; transform: translateX(-50%); pointer-events: none; }
@keyframes latido { 50% { transform: translate(-50%, -50%) scale(1.08); } }
/* Viñetas */
.historia.en-vineta { padding: 0; }
.vineta { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #1e1a33; border-radius: 18px; overflow: hidden; }
.vineta > img { width: 100%; height: 100%; object-fit: contain; }
.vineta .saltar { position: absolute; top: 10px; right: 10px; left: auto; width: auto; min-width: 52px; min-height: 52px; font-size: 1.4rem; }
.vineta .sigue { position: absolute; right: 14px; bottom: 14px; left: auto; width: auto; padding: 0; min-width: 72px; min-height: 72px; font-size: 2rem; border-radius: 50%; }
.vineta .puntos { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 8px; margin: 0; }
.vineta .puntos span { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,250,243,.4); }
.vineta .puntos span.si { background: #FFD36B; }
/* Armario */
.armario { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; background-size: cover; background-position: center; border-radius: 18px; padding: 10px; overflow: hidden; }
.armario-centro { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.armario-centro > img { max-height: min(46vh, 300px); max-width: 70vw; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.armario-centro > img.bloqueado { filter: brightness(.35) drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.nombre-pj { margin: 0; font-weight: 800; background: rgba(30,34,64,.7); border-radius: 999px; padding: 2px 12px; }
.accion-armario { min-width: 120px; min-height: 56px; font-size: 1.5rem; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.accion-armario img { width: 36px; height: 36px; }
.perchero { list-style: none; margin: 0; padding: 6px; display: flex; gap: 6px; overflow-x: auto; max-width: 100%; background: rgba(30,34,64,.6); border-radius: 16px; }
.percha { position: relative; width: 64px; height: 64px; border-radius: 14px; border: 3px solid #8C5A34; background: #fffaf3; padding: 2px; cursor: pointer; }
.percha img { width: 100%; height: 100%; object-fit: contain; }
.percha.ajeno img { filter: brightness(.35); }
.percha.viendo { box-shadow: 0 0 0 3px #FFD36B; }
.percha .precio, .percha .marca { position: absolute; right: -4px; bottom: -4px; background: #F28C28; color: #fff; border-radius: 999px; font-size: 12px; font-weight: 800; padding: 0 5px; border: 2px solid #fffaf3; }
/* Antes de la noche y resultado */
.historia .antes, .historia .resultado { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: #4a3428; }
.historia .num-noche { display: inline-flex; align-items: center; gap: 4px; margin: 0 auto; font-size: 2rem; }
.historia .num-noche img { width: 40px; height: 40px; }
.metas-grandes { list-style: none; display: flex; gap: 12px; padding: 0; margin: 0; }
.metas-grandes li { display: flex; align-items: center; gap: 2px; font-size: 1.4rem; }
.metas-grandes .ic { width: 64px; height: 64px; }
.jugar-grande { min-width: 96px; min-height: 72px; font-size: 2.2rem; border-radius: 999px; }
.pj-resultado { max-height: 34vh; max-width: 60vw; object-fit: contain; }
.resultado .estrellas img { width: 56px; height: 56px; }
.resultado .estrellas img:nth-child(2) { transform: translateY(-10px); }
.acciones-resultado { display: flex; gap: 12px; align-items: center; }
.poderes-nuevos { margin: 0; }
/* Partida: HUD con íconos y botones grandes */
.hud-historia { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.hud-historia .vidas { display: flex; gap: 1px; margin: 0; }
.hud-historia .vidas img { width: 26px; height: 26px; }
.hud-historia .metas { list-style: none; display: flex; gap: 4px; margin: 0 auto; padding: 0; }
.hud-historia .metas li { display: flex; align-items: center; gap: 2px; background: rgba(30,34,64,.75); border-radius: 999px; padding: 1px 8px 1px 2px; font-size: .9rem; font-weight: 800; }
.hud-historia .metas li.hecho { box-shadow: 0 0 0 2px #9BD15A; }
.hud-historia .metas .ic { width: 28px; height: 28px; }
.hud-historia .reloj-h { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 2px; }
.hud-historia .reloj-h.poco { color: #FFB04A; }
.botones-accion { position: absolute; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: flex-end; gap: 10px; z-index: 3; }
.btn-farol, .btn-poder { position: relative; border-radius: 50%; border: 4px solid #8C5A34; background: rgba(30,34,64,.82); box-shadow: 0 0 0 3px #fffaf3; padding: 0; cursor: pointer; touch-action: none; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.btn-farol { width: 104px; height: 104px; }
.btn-poder { width: 72px; height: 72px; }
.btn-farol .ic-farol { position: relative; width: 74%; height: 84%; object-fit: contain; }
.btn-poder img { position: relative; width: 76%; height: 76%; object-fit: contain; }
.btn-farol .carga, .btn-poder .carga { position: absolute; left: 0; right: 0; bottom: 0; height: var(--carga, 0%); background: rgba(255,211,107,.45); }
.btn-poder .carga { background: rgba(123,195,90,.5); }
.btn-farol:not(.listo) img, .btn-poder:not(.listo) img { filter: grayscale(.7) brightness(.7); }
.btn-farol.listo { box-shadow: 0 0 0 3px #fffaf3, 0 0 22px #FFD36B; }
.btn-poder.listo { box-shadow: 0 0 0 3px #fffaf3, 0 0 18px #9BD15A; }
.historia .pausa-infectado { flex-direction: row; }
@media (orientation: landscape) and (max-height: 520px) {
  .btn-farol { width: 88px; height: 88px; }
  .btn-poder { width: 64px; height: 64px; }
  .hud-historia .metas .ic { width: 24px; height: 24px; }
  .pj-resultado { max-height: 28vh; }
  .metas-grandes .ic { width: 48px; height: 48px; }
  .historia .ic-grande { width: 64px; height: 64px; }
  .armario-centro > img { max-height: 30vh; }
  .percha { width: 50px; height: 50px; }
  .accion-armario { min-height: 48px; }
  .pj-resultado { max-height: 22vh; }
  .resultado .estrellas img { width: 40px; height: 40px; }
  .historia .contador.grande img { width: 40px; height: 40px; }
  .parada .yo { width: 90%; }
}
@media (max-width: 380px) {
  .hud-historia .vidas img { width: 22px; height: 22px; }
  .hud-historia .metas li { padding: 1px 6px 1px 1px; }
}
/* Modo historia: insignias, tutorial, golpe, álbum, compartir */
.historia .con-insignia { position: relative; }
.historia .insignia { position: absolute; top: -6px; right: -6px; background: #F28C28; color: #fff; border: 2px solid #fffaf3; border-radius: 999px; font-size: 12px; font-weight: 800; padding: 0 5px; line-height: 18px; }
.historia .insignia.ok { background: #5E8F3C; }
.historia .barra-historia { flex-wrap: nowrap; overflow-x: auto; }
.manita { position: absolute; z-index: 4; font-size: 64px; line-height: 1; pointer-events: none; transform: translate(-30%, 0); filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.manita.toca { animation: manita-toca 0.9s ease-in-out infinite; }
.manita.arrastra { animation: manita-arrastra 1.6s ease-in-out infinite; }
@keyframes manita-toca { 50% { transform: translate(-30%, 14px) scale(.9); } }
@keyframes manita-arrastra { 0%, 100% { transform: translate(-30%, 0); } 40% { transform: translate(30%, -40px); } 70% { transform: translate(-80%, -20px); } }
.destello { position: absolute; inset: 0; pointer-events: none; border-radius: 18px; box-shadow: inset 0 0 60px 20px rgba(240, 90, 90, .65); opacity: 0; z-index: 2; }
.destello.on { animation: destello .45s ease-out; }
@keyframes destello { 0% { opacity: 1; } 100% { opacity: 0; } }
.pj-resultado.baila { animation: baila 0.9s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes baila { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-14px) rotate(-5deg); } 75% { transform: translateY(-14px) rotate(5deg); } }
.resultado.gano .estrellas img { animation: estrella-sale .5s cubic-bezier(.3,1.6,.5,1) backwards; }
.resultado.gano .estrellas img:nth-child(2) { animation-delay: .2s; }
.resultado.gano .estrellas img:nth-child(3) { animation-delay: .4s; }
@keyframes estrella-sale { from { transform: scale(0) rotate(-90deg); opacity: 0; } }
.estampas-nuevas { display: inline-flex; align-items: center; gap: 4px; font-size: 1.6rem; border: 3px dashed #F28C28; border-radius: 16px; background: #fff7e8; padding: 4px 10px; min-height: 48px; cursor: pointer; }
.estampas-nuevas .ic { width: 44px; height: 44px; }
.historia .premio-reto { display: inline-flex; align-items: center; font-size: 1.3rem; }
.historia .premio-reto img { width: 30px; height: 30px; }
.album { list-style: none; margin: 0; padding: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; align-content: start; overflow: auto; flex: 1; min-height: 0; }
.estampa { width: 100%; aspect-ratio: 1; border-radius: 18px; border: 4px solid #8C5A34; background: #fffaf3; box-shadow: 0 0 0 3px #fffaf3, 0 4px 8px rgba(0,0,0,.3); padding: 6px; cursor: pointer; }
.estampa img { width: 100%; height: 100%; object-fit: contain; }
.estampa.oculta { background: rgba(30,34,64,.6); cursor: default; }
.estampa.oculta img { filter: brightness(0) opacity(.45); }
.estampa.nueva { animation: latido-estampa 1s ease-in-out 3; box-shadow: 0 0 0 3px #FFD36B, 0 0 18px #FFD36B; }
@keyframes latido-estampa { 50% { transform: scale(1.08); } }
.ficha-estampa { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(20, 14, 48, .75); padding: 16px; }
.ficha-estampa[hidden] { display: none; }
.ficha-estampa .tarjeta-sticker { max-width: 420px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; color: #4a3428; text-align: center; }
.ficha-estampa #ficha-img { width: min(60vw, 220px); max-height: 38vh; object-fit: contain; }
.ficha-estampa p { margin: 0; font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.vista-compartir { width: min(80vw, 320px); border-radius: 16px; }
.whatsapp { background: #25D366 !important; color: #fff !important; font-weight: 800; font-size: 1rem !important; }
.historia.en-album { position: relative; min-height: min(80vh, 640px); }
/* Juegos fuera de su mes: candado */
.carta-juego.cerrada { opacity: .9; filter: grayscale(.6); cursor: default; }
.carta-juego.cerrada .retrato-hw { opacity: .6; }
.carta-juego .ya-no { font-weight: 800; color: #6d5848; }
.juego-cerrado { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; margin: auto; max-width: 420px; }
.juego-cerrado .candado-grande { font-size: 64px; margin: 0; }
@media (orientation: landscape) and (max-height: 520px) {
  .manita { font-size: 48px; }
  .ficha-estampa #ficha-img { max-height: 30vh; }
}

/* Escritorio: los menús del Brócoli Infectado usan toda la pantalla (antes quedaban en un cuadro a la izquierda). */
@media (min-width: 1024px) {
  body.en-juego .juego-pantalla.infectado.escenario.en-menu,
  body.en-juego .juego-pantalla.infectado.escenario.en-fin { max-width: none; max-height: none; width: 100%; height: 100%; }
  .infectado.escenario.en-menu .panel-juego,
  .infectado.escenario.en-fin .panel-juego { width: min(100%, 640px); margin: auto; }
  .infectado .elige-pj button .retrato-hw { width: 72px; }
  .infectado .elige-pj button { font-size: .95rem; }
}

/* ---------- «¿Cómo se juega?» (ayuda.js) ---------- */
.boton-ayuda { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.boton-ayuda b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--hw-naranja, #f28c28); color: #fff; font-size: 1.25rem; line-height: 1; }
.boton-ayuda span { display: none; }
@media (min-width: 700px) { .boton-ayuda span { display: inline; } }
.ayuda-capa {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px;
  background: rgba(30, 20, 45, .72); backdrop-filter: blur(2px);
}
.ayuda-tarjeta {
  position: relative; width: min(92vw, 460px); padding: 26px 18px 18px; border-radius: 28px; text-align: center;
  background: #fffaf3; color: #4a3428; border: 4px solid var(--cafe, #6b4a36); box-shadow: 0 14px 40px rgba(0,0,0,.4);
  display: flex; flex-direction: column; align-items: center; gap: 12px; animation: ayuda-entra .25s ease-out;
}
@keyframes ayuda-entra { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.ayuda-cerrar { position: absolute; top: 8px; right: 8px; width: 48px; height: 48px; border-radius: 50%; border: 3px solid #d9c6b0; background: #fff; font-size: 1.3rem; color: #4a3428; }
.ayuda-ic { min-height: 170px; display: grid; place-items: center; }
.ayuda-ic img { width: 120px; height: 120px; object-fit: contain; }
.ayuda-ic img.grande { width: 160px; height: 160px; }
.ayuda-ic img.chico { width: 52px; height: 52px; }
.ayuda-txt { margin: 0; font-size: clamp(1.6rem, 6.5vw, 2.1rem); font-weight: 900; line-height: 1.15; }
.ayuda-puntos { display: flex; gap: 8px; margin: 0; }
.ayuda-puntos span { width: 14px; height: 14px; border-radius: 50%; background: #e3d3c0; }
.ayuda-puntos span.ya { background: var(--hw-naranja, #f28c28); }
.ayuda-nav { display: flex; gap: 12px; width: 100%; justify-content: center; }
.ayuda-nav .boton { min-height: 64px; min-width: 88px; font-size: 1.8rem; border-radius: 20px; }
.ayuda-nav .ayuda-sig { flex: 1; max-width: 260px; }
.ayuda-nav .ayuda-sig.jugar { font-size: 1.4rem; }
.demo { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.demo.fila img { width: 96px; height: 96px; }
.demo .flecha { font-size: 2.6rem; font-weight: 900; }
.demo .num { font-size: 2.4rem; }
.demo.emoji { font-size: 110px; line-height: 1; }
.demo.dos { gap: 18px; }
.demo .dedo { position: absolute; font-size: 64px; filter: drop-shadow(0 3px 2px rgba(0,0,0,.3)); pointer-events: none; }
.demo-desliza { width: 170px; height: 170px; }
.demo-desliza .base { width: 140px; height: 140px; border-radius: 50%; border: 6px dashed #c9a988; background: #f4e6d4; }
.demo-desliza .dedo { left: 50%; top: 50%; animation: ayuda-desliza 2.4s ease-in-out infinite; }
@keyframes ayuda-desliza {
  0%, 100% { transform: translate(-50%, -30%); } 25% { transform: translate(10%, -30%); }
  50% { transform: translate(-50%, 10%); } 75% { transform: translate(-110%, -30%); }
}
.demo-toca .dedo { right: -14px; bottom: -22px; animation: ayuda-toca 1s ease-in-out infinite; }
.demo-toca img.carta { width: 110px; height: 150px; border-radius: 14px; }
@keyframes ayuda-toca { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-6px, -10px) scale(.88); } }
.demo img.carta-cara { width: 90px; height: 90px; padding: 8px; background: #fff; border: 4px solid var(--cafe, #6b4a36); border-radius: 16px; }
.demo-arrastra { width: 240px; height: 170px; }
.demo-arrastra img.plato { width: 150px; height: 150px; position: absolute; right: 0; top: 10px; }
.demo-arrastra .lleva { position: absolute; left: 0; top: 50px; animation: ayuda-arrastra 2.2s ease-in-out infinite; }
.demo-arrastra .lleva img { width: 70px; height: 70px; }
.demo-arrastra .lleva .dedo { left: 30px; top: 34px; font-size: 48px; }
@keyframes ayuda-arrastra { 0%, 15% { transform: translate(0, 0); } 70%, 100% { transform: translate(130px, -10px); } }
.teclas { flex-direction: column; gap: 6px; }
.fila-teclas { display: flex; gap: 6px; }
.teclas kbd, .varios kbd {
  display: inline-grid; place-items: center; min-width: 52px; height: 52px; padding: 0 10px; border-radius: 12px;
  background: #fff; border: 3px solid #6b4a36; box-shadow: 0 4px 0 #6b4a36; font: 900 1.5rem system-ui, sans-serif; color: #4a3428;
}
.teclas .hueco { width: 52px; }
.varios { flex-direction: column; gap: 8px; }
.varios .jt { display: flex; align-items: center; gap: 10px; }
.varios .jt b { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.3rem; }
.varios kbd { min-width: 150px; height: 40px; font-size: 1.15rem; box-shadow: 0 3px 0 #6b4a36; }
@media (prefers-reduced-motion: reduce) { .demo .dedo, .demo-arrastra .lleva { animation: none; } }
.barra-juego .boton-ayuda, .boton-ayuda.icono-juego { flex: 0 0 auto; width: auto; min-width: 44px; white-space: nowrap; padding-left: 8px; padding-right: 10px; border-radius: 999px; }

/* ---------- Tutorial con manita (ayuda.js v2) ---------- */
.tuto-capa {
  position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(30, 20, 45, .78); cursor: pointer; -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.tuto-capa.tuto-final { background: rgba(30, 20, 45, .45); }
.tuto-escena {
  position: relative; width: min(94vw, 640px); aspect-ratio: 16 / 11; overflow: hidden; border-radius: 26px;
  border: 5px solid #fffaf3; box-shadow: 0 14px 40px rgba(0,0,0,.45); background: #2d2440 center / cover no-repeat;
}
.tuto-saltar {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 64px; height: 64px; border-radius: 50%;
  border: 4px solid #fffaf3; background: var(--hw-naranja, #f28c28); color: #fff; font-size: 30px; line-height: 1; z-index: 3;
  box-shadow: 0 4px 0 rgba(0,0,0,.25);
}
.tuto-puntos { display: flex; gap: 10px; margin: 0; }
.tuto-puntos span { width: 16px; height: 16px; border-radius: 50%; background: rgba(255,250,243,.35); }
.tuto-puntos span.ya { background: var(--hw-naranja, #f28c28); box-shadow: 0 0 0 3px #fffaf3; }
.tuto-final .tuto-puntos { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); }
.tuto-seguir { margin: 0; font-size: 34px; animation: tuto-latir 1.2s ease-in-out infinite; filter: drop-shadow(0 3px 2px rgba(0,0,0,.4)); }
@keyframes tuto-latir { 0%, 100% { transform: scale(1); opacity: .75; } 50% { transform: scale(1.18); opacity: 1; } }
.t-obj { position: absolute; pointer-events: none; }
.t-spr img, .t-plato img, .t-ficha img { display: block; width: 100%; height: auto; filter: drop-shadow(0 4px 2px rgba(0,0,0,.3)); }
.t-mano { z-index: 5; width: auto; }
.t-dedo { display: block; font-size: clamp(44px, 11vw, 70px); line-height: 1; filter: drop-shadow(0 4px 3px rgba(0,0,0,.45)); }
.t-pulso { z-index: 4; width: 70px; height: 70px; border-radius: 50%; border: 6px solid #fffaf3; box-shadow: 0 0 0 4px rgba(242,140,40,.8); }
.t-palanca { aspect-ratio: 1; border-radius: 50%; background: rgba(255,250,243,.25); border: 5px dashed rgba(255,250,243,.8); }
.t-tecla kbd {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1; box-sizing: border-box; border-radius: 12px; background: #fff;
  border: 3px solid #6b4a36; box-shadow: 0 5px 0 #6b4a36; font: 900 clamp(1rem, 3.4vw, 1.7rem) system-ui, sans-serif; color: #4a3428;
}
.t-tecla[style*="width: 22%"] kbd { aspect-ratio: auto; height: clamp(38px, 9vw, 58px); font-size: clamp(.9rem, 2.6vw, 1.3rem); }
.t-peligro { position: absolute; left: 50%; top: 55%; width: 120%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(240,70,70,.55), rgba(240,70,70,0) 70%); animation: tuto-latir .9s ease-in-out infinite; }
.t-alerta { position: absolute; left: 50%; top: -18%; transform: translateX(-50%); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: #e84a4a; color: #fff; font: 900 26px system-ui, sans-serif; border: 3px solid #fffaf3; animation: tuto-latir .9s ease-in-out infinite; }
.t-tu { position: absolute; left: 50%; top: -14%; transform: translateX(-50%); padding: 2px 10px; border-radius: 999px; background: #e07a2f; color: #fff; font: 900 18px system-ui, sans-serif; border: 3px solid #fffaf3; }
.t-humo { font-size: 38px; }
.t-aura { aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(140,210,60,.65), rgba(140,210,60,0) 70%); animation: tuto-latir 1s ease-in-out infinite; }
.t-brillo { font-size: 46px; z-index: 4; }
.t-chip b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font: 900 22px system-ui, sans-serif; border: 3px solid #fffaf3; }
.t-boton-farol { aspect-ratio: 1; border-radius: 50%; background: #fffaf3; border: 4px solid var(--hw-naranja, #f28c28); display: grid; place-items: center; }
.t-boton-farol img { width: 70%; height: auto; }
.t-ficha { aspect-ratio: 1; padding: 6px; box-sizing: border-box; border-radius: 16px; background: #fffaf3; border: 3px solid #6b4a36; }
.t-lleva { z-index: 4; }
.t-carta { aspect-ratio: 3 / 4; }
.t-carta > span { position: absolute; inset: 0; border-radius: 14px; overflow: hidden; }
.t-dorso img { width: 100%; height: 100%; object-fit: cover; }
.t-cara { background: #fffaf3; border: 4px solid #6b4a36; display: grid; place-items: center; opacity: 0; }
.t-cara img { width: 78%; height: auto; }
.tuto-mano-fija { position: fixed; z-index: 5; transform: translate(-38%, -6%); pointer-events: none; animation: tuto-toque 1.4s ease-in-out infinite; }
.t-pulso-fijo { position: absolute; left: 38%; top: 6%; width: 80px; height: 80px; margin: -40px 0 0 -40px; border-radius: 50%; border: 6px solid #fffaf3; animation: tuto-onda 1.4s ease-out infinite; }
@keyframes tuto-toque { 0%, 100% { transform: translate(-38%, 8%) scale(1); } 40% { transform: translate(-38%, -6%) scale(.85); } 60% { transform: translate(-38%, -6%) scale(.85); } }
@keyframes tuto-onda { 0%, 35% { transform: scale(.4); opacity: 0; } 45% { opacity: 1; } 100% { transform: scale(1.9); opacity: 0; } }
.tuto-jugar { position: fixed; transform: translate(-50%, -50%); width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center;
  background: #6aa84f; color: #fff; font-size: 56px; border: 6px solid #fffaf3; box-shadow: 0 6px 0 rgba(0,0,0,.3); }
.t-resaltado { position: relative; z-index: 1001 !important; box-shadow: 0 0 0 6px #fffaf3, 0 0 0 12px rgba(242,140,40,.9) !important; animation: tuto-latir 1.2s ease-in-out infinite; }
/* Frase corta para quien sabe leer: debajo de la escena (no tapa la acción). */
.tuto-texto {
  margin: 0; max-width: min(94vw, 640px); padding: 8px 18px; box-sizing: border-box; border-radius: 999px; text-align: center;
  background: #fffaf3; color: #4a2f22; border: 3px solid var(--hw-naranja, #f28c28); box-shadow: 0 4px 0 rgba(0,0,0,.25);
  font: 800 clamp(1.05rem, 4.6vw, 1.45rem) / 1.2 system-ui, sans-serif; text-wrap: balance; pointer-events: none;
}
.tuto-texto-final { position: fixed; left: 50%; transform: translateX(-50%); width: max-content; z-index: 6; }
.tuto-texto-final.arriba { top: calc(88px + env(safe-area-inset-top)); }
.tuto-texto-final.abajo { bottom: calc(52px + env(safe-area-inset-bottom)); }
@media (orientation: landscape) and (max-height: 520px) {
  .tuto-capa { gap: 6px; }
  .tuto-escena { width: auto; height: 66vh; }
  .tuto-texto { padding: 4px 14px; font-size: 1rem; }
  .tuto-seguir { font-size: 24px; }
  .tuto-texto-final.arriba { top: 12px; }
  .tuto-texto-final.abajo { bottom: 34px; }
}
@media (prefers-reduced-motion: reduce) { .tuto-seguir, .tuto-mano-fija, .t-pulso-fijo { animation: none; } }
@media (orientation: portrait) {
  .tuto-escena { width: min(92vw, 520px); aspect-ratio: 3 / 4; max-height: 72vh; }
  .t-tu { font-size: 14px; }
  .t-alerta { width: 32px; height: 32px; font-size: 20px; }
}

/* ---------- Arma tu plato: Plato del Bien Comer 2023 (5 grupos + agua al centro) ---------- */
.plato5 { --plato: conic-gradient(from 270deg, #5BA83C 0% 50%, #F2C230 50% 72%, #E8913A 72% 87%, #D9452B 87% 95%, #C9A06E 95% 100%); }
.plato.plato5 {
  border-radius: 50%; background: var(--plato); background-size: auto; aspect-ratio: 1;
  border: 6px solid #fffaf3; box-shadow: 0 0 0 3px #2f5fa8, 0 0 0 6px #fffaf3, inset 0 0 0 3px rgba(255,255,255,.55);
  box-sizing: border-box; cursor: pointer; touch-action: none;
}
.plato5-jarra {
  position: absolute; left: 50%; top: 50%; width: 25%; aspect-ratio: 1; transform: translate(-50%, -50%); box-sizing: border-box;
  border-radius: 50%; background: radial-gradient(circle at 40% 35%, #e9f8ff, #8fd3f4 70%); border: 5px solid #fffaf3;
  box-shadow: 0 0 0 3px #2f5fa8; display: grid; place-items: center; pointer-events: none;
}
.plato5-jarra img { width: 64%; height: auto; opacity: .9; }
.plato.plato5 .zona[data-zona] {
  position: absolute; transform: translate(-50%, -50%); width: auto; height: auto; min-width: 44px; min-height: 44px;
  padding: 2px; gap: 2px; background: transparent; border: 0; border-radius: 50%;
}
.plato.plato5 .zona span {
  font-size: clamp(9px, 2.3vw, 12px); padding: 1px 6px; white-space: nowrap; background: rgba(255,250,243,.92);
  border: 2px solid rgba(140,90,52,.5);
}
.plato.plato5 .zona[data-zona="origen_animal"] span, .plato.plato5 .zona[data-zona="grasas_saludables"] span { font-size: clamp(8px, 2vw, 11px); padding: 1px 4px; }
.plato.plato5 .zona[data-zona="agua"] { min-width: 23%; min-height: 23%; }
.plato.plato5 .zona[data-zona="agua"] span { background: #2f5fa8; color: #fff; border-color: #fffaf3; }
.plato.plato5 .zona img { width: clamp(34px, 10vw, 58px); }
.plato.plato5 .zona[data-zona="origen_animal"] img, .plato.plato5 .zona[data-zona="grasas_saludables"] img { width: clamp(30px, 8vw, 48px); }
.plato.plato5 .zona.blanco { background: rgba(255,250,243,.45); outline: 3px dashed var(--cafe); }
.plato.plato5 .zona.brilla { animation: plato-brilla .55s ease-in-out 4; }
@keyframes plato-brilla { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,250,243,0); } 50% { box-shadow: 0 0 0 10px rgba(255,250,243,.95), 0 0 24px 14px rgba(255,215,90,.9); } }
.plato-muestra { width: 180px; height: 180px; }
.plato-muestra .plato5 { width: 100%; height: 100%; margin: 0; cursor: default; }
.canasta-hw { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 700px), (orientation: landscape) { .canasta-hw { grid-template-columns: repeat(4, 1fr); } }
@media (orientation: landscape) and (max-height: 520px) { .plato-hw .canasta-hw { grid-template-columns: repeat(4, 1fr); } }
/* Tutorial: el mismo plato dibujado */
.t-plato5 { aspect-ratio: 1; }
.t-plato5 .plato5 { position: relative; width: 100%; height: 100%; }
.mantel .plato.plato5 { width: 100%; height: auto; max-width: none; aspect-ratio: 1; margin: 0; }
/* Los toques los decide el plato por ángulo (exacto aunque las rebanadas sean angostas); los botones quedan para el teclado. */
.plato.plato5 .zona[data-zona] { pointer-events: none; }
.plato.plato5 .zona.lleno span { display: none; }
.mantel { padding: clamp(8px, 3.2vw, 18px); }
.mantel { width: min(84vw, 40vh, 400px); }
@media (orientation: landscape) and (max-height: 520px) { .mantel { width: min(46vw, 70vh); } }

/* ---------- Caritas (modo zombie) ---------- */
.caritas { display: inline-flex; }
.caritas img { width: 34px; height: 34px; object-fit: contain; margin-right: -8px; filter: drop-shadow(0 2px 1px rgba(0,0,0,.25)); }
.caritas img:last-child { margin-right: 0; }

/* ---------- Modo zombie ---------- */
.z-menu { gap: 10px; }
.z-portada { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 34vh; border-radius: 18px; border: 4px solid var(--cafe); background-size: cover; background-position: center; overflow: hidden; }
.z-portada .z-heroe { position: absolute; left: 50%; bottom: 4%; height: 82%; transform: translateX(-50%); filter: drop-shadow(0 6px 6px rgba(0,0,0,.35)); }
.z-portada .z-obj { position: absolute; bottom: 8%; height: 40%; filter: drop-shadow(0 4px 4px rgba(0,0,0,.3)); }
.z-portada .z-o1 { left: 6%; } .z-portada .z-o2 { right: 6%; } .z-portada .z-o3 { left: 28%; height: 20%; bottom: 14%; }
.z-cantidad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.z-cantidad button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 3px solid var(--cafe); border-radius: 16px; background: #fffaf3; color: #4a3428; font: inherit; }
.z-cantidad button b { font-size: 1.4rem; line-height: 1; }
.z-cantidad button[aria-pressed="true"] { background: #ffe2b8; outline: 3px solid var(--hw-naranja); }
.z-cantidad .caritas img { width: 30px; height: 30px; }
.z-menu .elige-pj button .retrato-hw { width: 64px; }
.z-teclas { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.z-teclas li { display: flex; align-items: center; gap: 8px; background: #fffaf3; color: #4a3428; border: 3px solid var(--cafe); border-radius: 14px; padding: 4px 8px; }
.z-teclas li img { width: 40px; height: 40px; object-fit: contain; }
.z-teclas .teclas { display: inline-flex; flex-direction: row; gap: 3px; }
.z-teclas kbd { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border: 2px solid var(--cafe); border-radius: 7px; background: #fff; font-weight: 800; }
.z-teclas kbd.k-accion { margin-left: auto; background: #ffd36b; min-width: 40px; }
.z-jugar { font-size: 2rem; min-height: 64px; }
.zombie .marcador-infectado li { display: flex; align-items: center; gap: 4px; padding: 1px 6px 1px 1px; }
.zombie .marcador-infectado li.escondido { opacity: .6; }
.zombie .marcador-infectado .z-num:empty { display: none; }
.z-num { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; color: #fffaf3; font-weight: 900; font-size: 12px; border: 2px solid #fffaf3; }
.z-lleva { display: inline-flex; gap: 2px; }
.z-lleva img { width: 20px; height: 20px; object-fit: contain; }
.z-accion {
  position: absolute; right: calc(14px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 3;
  width: 96px; height: 96px; border-radius: 50%; padding: 0; display: grid; place-items: center;
  background: #fffaf3; border: 5px solid var(--cafe); box-shadow: 0 0 0 4px rgba(255,211,107,.85), 0 6px 0 rgba(74,47,34,.35);
  animation: tuto-latir 1.1s ease-in-out infinite; touch-action: none;
}
.z-accion[hidden] { display: none; }
.z-accion img { width: 74%; height: 74%; object-fit: contain; pointer-events: none; }
.z-accion kbd { position: absolute; right: -4px; bottom: -4px; min-width: 26px; height: 26px; border-radius: 7px; background: var(--cafe); color: #fffaf3; font-weight: 900; display: grid; place-items: center; }
.z-accion kbd:empty { display: none; }
.z-fin { align-items: center; text-align: center; }
.z-fin .z-heroe { width: 150px; }
.z-grande { font-size: 3rem; margin: 0; }
.z-resultado { list-style: none; display: flex; justify-content: center; gap: 8px; padding: 0 !important; margin: 0; flex-wrap: wrap; }
.z-resultado li { position: relative; display: grid; justify-items: center; }
.z-resultado img { width: 84px; height: 84px; object-fit: contain; }
.z-resultado li.zombi img { width: 92px; height: 92px; }
.z-premio { font-size: 1.5rem; font-weight: 900; margin: 0; }
.z-fin .cuidados .boton { font-size: 1.8rem; min-width: 90px; justify-content: center; }
.zombie .pausa-infectado .boton { font-size: 2rem; min-width: 110px; }
.t-accion { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 50%; background: #fffaf3; border: 5px solid #8C5A34; box-shadow: 0 0 0 4px rgba(255,211,107,.85); }
.t-accion img { width: 74%; height: 74%; object-fit: contain; }
.t-duda { background: #8E6BBF !important; }
.portada-juego img.pj { width: 100%; height: auto; }

/* ---------- Casa de Brotito: sol, lluvia, tierra y Chispas de Sabor ---------- */
.casa-titulo { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.casa-titulo h1 { margin: 0; }
.nutrientes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 520px; margin: 10px auto; }
.nutriente {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: 18px; cursor: pointer;
  background: #fff; border: 3px solid #8C5A34; box-shadow: 0 4px 0 rgba(74,47,34,.3); font: 800 .95rem/1.1 inherit; color: #4a2f22;
  transition: transform .12s ease;
}
.nutriente img { width: min(64px, 15vw); height: min(64px, 15vw); object-fit: contain; }
.nutriente span { text-align: center; }
.nutriente small { color: #e8960f; letter-spacing: 1px; font-size: .8rem; }
.nutriente:active { transform: scale(.94); }
.nutriente[aria-disabled="true"] { opacity: .5; }
.nutriente:disabled { opacity: .6; }
.nutriente-vuela { position: fixed; z-index: 50; width: 64px; height: 64px; margin: -32px 0 0 -32px; pointer-events: none;
  transition: transform .6s cubic-bezier(.3,.7,.4,1), opacity .6s ease; }
#foto-brotito.brilla { filter: drop-shadow(0 0 14px #ffe58a); }
.cuidados-hoy .puntos { display: flex; gap: 8px; justify-content: center; }
.punto-nutriente { opacity: .3; filter: grayscale(1); }
.punto-nutriente.listo { opacity: 1; filter: none; }
.t-ficha-activa { box-shadow: 0 0 0 4px #ffd36b; }
@media (prefers-reduced-motion: reduce) { .nutriente-vuela { transition: none; } }
/* La bienvenida comparte la clase .historia con El Gran Rumor: aquí el texto va oscuro sobre fondo claro. */
.historia.bienvenida { color: var(--tinta, #4A2F22); }

/* ---------- Halloween (octubre): casa del Brotito, bienvenida y tutoriales ---------- */
/* Iconos de nutrientes con capa extra (p. ej. calabacita junto a la maceta); el Brotito no se toca. */
.ico-nutriente { position: relative; display: inline-block; width: var(--t, 64px); height: var(--t, 64px); flex: none; }
.ico-nutriente > img:first-child { width: 100%; height: 100%; object-fit: contain; }
.nutriente .ico-nutriente { width: min(var(--t, 64px), 15vw); height: min(var(--t, 64px), 15vw); }
.ico-extra, .t-ficha .ico-extra { position: absolute; right: -8%; bottom: -6%; width: 48% !important; height: auto; filter: drop-shadow(0 2px 1px rgba(0,0,0,.35)); }
.punto-nutriente { display: inline-block; }
body.tema-halloween .casa.escenario, body.tema-halloween .historia.bienvenida.escenario {
  border-radius: 24px; overflow: hidden; padding: 14px 12px 18px; min-height: 70vh; box-sizing: border-box;
  background-position: center top; background-size: cover;
}
body.tema-halloween .casa.escenario .casa-titulo h1 { color: #fffaf3; text-shadow: 0 2px 4px rgba(20,12,40,.9), 0 0 2px #000; }
body.tema-halloween .casa-panel {
  background: #fffaf3; color: #4a3428; border: 3px solid var(--hw-naranja); border-radius: 22px;
  box-shadow: 0 0 0 5px rgba(255,250,243,.85), 0 10px 24px rgba(20,12,40,.45); padding: 12px; margin: 10px auto 12px; max-width: 600px; position: relative;
}
body.tema-halloween .casa-panel .burbuja { border-color: var(--hw-lila); }
body.tema-halloween .casa-panel .banner-noche { background: var(--hw-morado); color: #fffaf3; }
body.tema-halloween .casa-panel .nota { color: #5a4636; }
body.tema-halloween .nutriente { background: #fffaf3; border-color: var(--hw-naranja); color: var(--hw-morado); box-shadow: 0 4px 0 rgba(75,42,107,.45); }
body.tema-halloween .nutriente small { color: var(--hw-naranja); }
body.tema-halloween .cuidados-hoy { background: #f3ecfb; border: 2px dashed var(--hw-lila); border-radius: 16px; padding: 6px 10px; }
body.tema-halloween .cuidados-hoy h2 { color: var(--hw-morado); }
body.tema-halloween .t-ficha { background: #2b1f45; border-color: var(--hw-naranja); }
body.tema-halloween .t-ficha-activa { box-shadow: 0 0 0 4px var(--hw-naranja); }
/* Frase del tutorial (zombie, plato, memoria, Brotito) en la paleta de noche. */
body.tema-halloween .tuto-texto { background: #2b1f45; color: #fffaf3; border-color: var(--hw-naranja); box-shadow: 0 4px 0 rgba(0,0,0,.35), 0 0 12px rgba(242,140,40,.35); }
body.tema-halloween .casa.escenario > :not(.deco-noche):not(.deco-calabaza),
body.tema-halloween .historia.bienvenida.escenario > :not(.deco-noche):not(.deco-calabaza) { position: relative; z-index: 1; }
.deco-calabaza { position: absolute; bottom: 6px; width: 64px; height: auto; z-index: 0; pointer-events: none; filter: drop-shadow(0 4px 3px rgba(0,0,0,.4)); }
.deco-calabaza.izq { left: 8px; }
.deco-calabaza.der { right: 8px; width: 52px; }
@media (max-width: 760px) { .deco-calabaza { width: 46px; } .deco-calabaza.der { width: 38px; } }
/* Mapa de Ciudad Brócoli de noche: velo morado sobre el fondo (debajo de edificios y personajes). */
body.tema-halloween .mapa.mapa-hw {
  background-color: var(--hw-noche);
  background-image: linear-gradient(180deg, rgba(30,34,64,.66), rgba(75,42,107,.38) 45%, rgba(30,34,64,.3)), url("/static/universo/arte/fondos/fondo_ciudad_brocoli_v2_m.webp?v=20260927");
}
.mapa-hw .deco-noche { z-index: 1; }
.luna-mapa { position: absolute; top: 3%; right: 5%; width: clamp(48px, 9vw, 84px); z-index: 1; pointer-events: none; filter: drop-shadow(0 0 14px rgba(255,240,190,.8)); }
.calabaza-mapa { position: absolute; z-index: 2; pointer-events: none; width: clamp(34px, 5vw, 54px); filter: drop-shadow(0 3px 2px rgba(0,0,0,.4)); }
.calabaza-mapa.c1 { left: 4%; bottom: 3%; }
.calabaza-mapa.c2 { right: 5%; bottom: 4%; width: clamp(28px, 4vw, 44px); }

/* ---------- Modo zombie: nivel Calma / Reto (caché 20261011nv) ---------- */
.z-nivel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.z-nivel button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 8px; padding: 6px 10px; border: 3px solid var(--cafe); border-radius: 16px; background: #fffaf3; color: #4a3428; font: inherit; text-align: left; }
.z-nivel button img { grid-row: 1 / 3; width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 2px 1px rgba(0,0,0,.25)); }
.z-nivel button b { font-size: 1.15rem; line-height: 1.1; }
.z-nivel button .z-rec { font-size: .8rem; letter-spacing: -1px; opacity: .9; min-height: 1em; }
.z-nivel button[aria-pressed="true"] { background: #ffe2b8; outline: 3px solid var(--hw-naranja); }
.z-apagada { opacity: .25; filter: grayscale(1); }
.z-nuevo { font-size: 2rem; margin: -6px 0 0; animation: tuto-latir 1.1s ease-in-out infinite; }
.z-nivel-fin { margin: 0; font-weight: 800; opacity: .8; }
.infectado .barra-infectado .reloj.jefe { background: #ffe2b8; border-color: var(--hw-naranja); animation: tuto-latir 1s ease-in-out infinite; }

/* Infectado · letreros del menú (17/10): títulos de sección y una frase corta bajo cada opción. */
.z-menu .z-titulo { display: flex; align-items: center; gap: 8px; width: 100%; margin: 4px 0 -4px; padding: 0 4px; font-size: 1.02rem; font-weight: 800; line-height: 1.2; color: #5a3d22; text-align: left; }
.z-menu .z-titulo::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--hw-naranja, #f0922c); border: 2px solid #8B6B2E; }
.z-menu .z-reloj { margin-left: auto; padding: 1px 8px; border: 2px solid #8B6B2E; border-radius: 999px; background: #fff3d6; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.z-menu .z-expl { display: block; font-size: .74rem; font-weight: 600; line-height: 1.15; color: #6b4e33; text-wrap: balance; }
.z-cantidad button .z-expl { margin-top: 2px; text-align: center; }
.z-nivel button { grid-template-rows: auto 1fr; align-items: start; padding: 8px 10px; }
.z-nivel button img { align-self: center; }
.z-nivel button .z-expl { grid-column: 2; margin-top: 2px; }
.z-nivel button .z-rec { font-size: .8rem; letter-spacing: -1px; }
@media (max-width: 420px) {
  .z-menu .z-titulo { font-size: .95rem; }
  .z-nivel button { column-gap: 6px; padding: 6px 8px; }
  .z-nivel button img { width: 38px; height: 38px; }
  .z-menu .z-expl { font-size: .72rem; }
}
/* En la compu caben los 3 letreros sin tener que bajar: la escena se hace más bajita. */
@media (min-width: 900px) {
  .z-menu .z-portada { max-height: 22vh; }
  .z-menu .elige-pj button .retrato-hw { width: 54px; }
  .z-menu .elige-pj button { padding-top: 4px; padding-bottom: 4px; }
  .z-cantidad button { padding: 5px 4px; }
  .z-menu .z-jugar { min-height: 54px; }
}
@media (min-width: 900px) and (max-height: 780px) {
  .z-menu { gap: 7px; }
  .z-menu .z-portada { max-height: 13vh; }
  .z-menu .elige-pj button .retrato-hw { width: 46px; }
  .z-cantidad .caritas img { width: 24px; height: 24px; }
  .z-cantidad button b { font-size: 1.15rem; }
  .z-menu .z-titulo { margin: 0 0 -5px; }
  .z-nivel button { padding: 5px 8px; }
}
.z-teclas li { padding: 3px 8px; }
.z-teclas li img { width: 34px; height: 34px; }

/* Sin murciélagos ni telarañas (reglas del universo): los fondos de noche de ciudad y cocina traían
   una telaraña arriba a la izquierda y 3 murciélagos pintados. Se cambian por la versión retocada
   (cielo limpio con estrellitas). Va por CSS con !important para no tocar halloween.js, que importan 16 módulos. */
.escenario[style*="fondo_ciudad_noche.webp"] { --fondo: url("/static/universo/arte/halloween/fondo_ciudad_noche_estrellas.webp?v=20261017sala") !important; }
.escenario[style*="fondo_ciudad_noche_m.webp"] { --fondo: url("/static/universo/arte/halloween/fondo_ciudad_noche_estrellas_m.webp?v=20261017sala") !important; }
.escenario[style*="fondo_cocina_noche.webp"] { --fondo: url("/static/universo/arte/halloween/fondo_cocina_noche_estrellas.webp?v=20261017sala") !important; }
.escenario[style*="fondo_cocina_noche_m.webp"] { --fondo: url("/static/universo/arte/halloween/fondo_cocina_noche_estrellas_m.webp?v=20261017sala") !important; }
