/* BEAT SURGE PRISMA COMPLETO · bloque D · ACADEMIA, PANFLETO y CARPETA (18 · 28 · 29) · LABORATORIO (30) · MUSICALIDAD + contador 1–8 (31)
 * Clases bso-pz-* (dueño: bloque D). Curvas oficiales: cubic-bezier(0.34, 1.56, 0.64, 1) y
 * cubic-bezier(0.16, 1, 0.3, 1). Táctil ≥ 44 px. Transiciones solo transform · opacity · filter.
 *
 * La capa #bso-pz-aca mide lo mismo que el lienzo del juego (660 × 360 lógicos escalados por --pz-u): el arte es un
 * lienzo pintado por estado (beat-surge-prisma-academia.js) y encima van los botones transparentes con el mismo
 * data-bso-acc del DOM de hoy. El modal viejo (#bso-m-academia · #bso-m-lab) sigue armado como fuente del estado,
 * pero no se ve ni recibe foco mientras la capa Prisma está abierta. */

.bso-pz-aca {
  position: absolute;
  inset: 0;
  z-index: 7;                       /* sobre los modales viejos (z 6, beat-surge-overdrive.css) */
  overflow: hidden;
  pointer-events: none;
  min-width: 0;
}
.bso-pz-aca[hidden] { display: none; }
.bso-pz-escenario {
  position: absolute;
  left: 0;
  top: 0;
  width: 660px;
  height: 360px;
  transform-origin: 0 0;
  pointer-events: auto;
  min-width: 0;
}
.bso-pz-vista {
  position: absolute;
  inset: 0;
  min-width: 0;
}
/* entrada de pantalla (modos.js:23 · ent = outC(e / 260): alfa y 10 lógicos hacia arriba) */
.bso-pz-vista[data-entra="1"] { animation: bso-pz-entra 260ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes bso-pz-entra {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.bso-pz-base,
.bso-pz-carta-cv,
.bso-pz-sello-cv {
  position: absolute;
  display: block;
  pointer-events: none;
}
.bso-pz-base { left: 0; top: 0; width: 660px; height: 360px; }

/* panfleto: la tarjeta entra girando desde el canto con rebote (pantallas4.js:83 · sx = outB(flip), 450 ms) */
.bso-pz-carta {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-origin: 250px 196px;
}
.bso-pz-carta[hidden] { display: none; }
.bso-pz-carta[data-flip="1"] { animation: bso-pz-flip 450ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes bso-pz-flip {
  from { transform: scaleX(0.02); }
  to { transform: scaleX(1); }
}
/* sello: entra en 380 ms (modos.js:26 · sello = (ahora − tSello) / 380, alfa outC) */
.bso-pz-sello-cv[data-anim="1"] { animation: bso-pz-sello 380ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes bso-pz-sello {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* botones: transparentes sobre el arte; el área táctil ya viene ≥ 44 px CSS (calculada en lógicos por --pz-u) */
.bso-pz-botones { position: absolute; inset: 0; min-width: 0; }
.bso-pz-bt {
  position: absolute;
  margin: 0;
  padding: 0;
  min-width: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: transparent;
  font-size: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 110ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bso-pz-bt:focus { outline: none; }
.bso-pz-bt:focus-visible {
  outline: 1px solid #00f0ff;
  outline-offset: 1px;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.55);
}
.bso-pz-bt:active:not([disabled]) { transform: scale(0.97); }
.bso-pz-bt[disabled] { cursor: not-allowed; }

/* con la capa Prisma abierta, el modal viejo queda como fuente del estado (sin verse ni recibir foco) */
.bso-root[data-pz-d] #bso-m-academia,
.bso-root[data-pz-d] #bso-m-lab { visibility: hidden !important; pointer-events: none !important; }
/* P.fondo del prototipo = el lobby (lienzo) con su velo: el DOM de la consola de encima no se transparenta a través del velo */
.bso-root[data-pz-d] .bso-escena > :not(.bso-aviso):not(#bso-aviso) { visibility: hidden; }

/* el HUD del Laboratorio ahora se pinta en el lienzo (lámina 30 · P.labHud): la línea de texto vieja queda solo para lectores */
.bso-root[data-pantalla="partida"][data-lab="1"] .bso-lab-hud {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* movimiento reducido: la tarjeta y el sello aparecen quietos (lámina 29 · reglas) */
.bso-pz-aca[data-reducido="1"] .bso-pz-vista,
.bso-pz-aca[data-reducido="1"] .bso-pz-carta,
.bso-pz-aca[data-reducido="1"] .bso-pz-sello-cv { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .bso-pz-vista[data-entra="1"],
  .bso-pz-carta[data-flip="1"],
  .bso-pz-sello-cv[data-anim="1"] { animation: none !important; }
  .bso-pz-bt { transition: none; }
}
