/* BEAT SURGE PRISMA COMPLETO · bloque E · PAUSA (24) · DUELO (21 · 25 · 26 · 27) · RESULTADOS (10 · 21 · 24) · CELEBRACIONES (38)
 * Clases bso-pz-* (dueño: bloque E). 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.
 *
 * Las pantallas se HORNEAN en un <canvas> del tamaño exacto del lienzo del juego (.bso-pz-caja, ubicado con Z.ox / Z.oy /
 * Z.cssW / Z.cssH) y los botones de siempre van encima en coordenadas lógicas del prototipo (660 × 360):
 *   left = x · u, top = centro · u (translateY −50 %), width = w · u, height = máx(44 px, h · u). u = px CSS por unidad.
 * Reglas viejas que quedan muertas mientras el modal lleva [data-pz] (beat-surge-overdrive.css, dueño A; no se borran):
 *   #bso-m-pausa .bso-panel · .bso-pausa-sub · .bso-pausa-opc (y su .bso-btn) · .bso-pausa-aj · #bso-m-pausa[data-duelo] .bso-pausa-opc ·
 *   .bso-resultado .bso-panel · .bso-res-titulo (y [data-gano] / [data-rango]) · .bso-res-marcador · .bso-res-a/b/vs · .bso-res-conteo ·
 *   .bso-res-j · .bso-res-xp · .bso-res-acc · .bso-res-cand* · .bso-res-solo · .bso-res-prec · .bso-res-combo · .bso-res-barras ·
 *   #bso-root .bso-resultado::before · #bso-root .bso-resultado .bso-panel (1367–1391) · .bso-res-des (posición) ·
 *   #bso-root.bso-root[data-pantalla="partida"][data-prisma="1"] .bso-btn-pausa (posición 128 u, v548). */

/* ── caja y capas ───────────────────────────────────────────────────────────────────────── */
#bso-root .bso-pz-caja { position: absolute; left: 0; top: 0; width: 100%; height: 100%; min-width: 0; pointer-events: none; --u: 1; contain: layout; letter-spacing: 0; }   /* el lienzo hereda letter-spacing: el de #bso-root (−0,16 px) achicaba el texto horneado */
#bso-root .bso-pz-lienzo { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
#bso-root .bso-pz-capa {
  position: absolute; display: block; pointer-events: none;
  left: calc(var(--x) * var(--u) * 1px); top: calc(var(--y) * var(--u) * 1px);
  width: calc(var(--w) * var(--u) * 1px); height: calc(var(--h) * var(--u) * 1px);
}
#bso-root .bso-pz-capa-datos { left: 0; top: 0; width: 100%; height: 100%; }
#bso-root .bso-pz-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }

/* ── los botones de siempre, transparentes sobre su arte horneado (guarda de 3 ids: las skins no los mueven) ── */
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root .bso-pz-caja .bso-pz-hit {
  position: absolute !important; display: block !important; z-index: 2;
  left: calc(var(--x) * var(--u) * 1px) !important; top: calc((var(--y) + var(--h) / 2) * var(--u) * 1px) !important;
  right: auto !important; bottom: auto !important;
  width: calc(var(--w) * var(--u) * 1px) !important; min-width: 44px !important;
  height: max(44px, calc(var(--h) * var(--u) * 1px)) !important; min-height: 44px !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 4px !important;
  background: transparent !important; box-shadow: none !important; color: transparent !important; text-shadow: none !important;
  font-size: 1px !important; line-height: 1 !important; overflow: hidden; pointer-events: auto; cursor: pointer;
  transform: translateY(-50%); animation: none !important; opacity: 1 !important; filter: none !important;
  transition: transform 120ms cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root .bso-pz-caja .bso-pz-hit[hidden] { display: none !important; }
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root .bso-pz-caja .bso-pz-hit::before,
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root .bso-pz-caja .bso-pz-hit::after { display: none !important; content: none !important; }
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root .bso-pz-caja .bso-pz-hit * { color: transparent !important; text-shadow: none !important; }
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root .bso-pz-caja .bso-pz-hit:active { transform: translateY(-50%) scale(0.97); }
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root .bso-pz-caja .bso-pz-hit:focus-visible { outline: 2px solid #ffffff !important; outline-offset: 1px; box-shadow: 0 0 14px rgba(0, 240, 255, 0.55) !important; }
/* Filas de AJUSTES (18 u = 19,5 px a 844 × 390): el área táctil es la fila completa de la lámina (DUDA E-2, no llegan a 44 px de alto). */
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root .bso-pz-pausa #bso-aj-cuenta8.bso-pz-hit,
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root .bso-pz-pausa #bso-aj-sincro.bso-pz-hit,
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root .bso-pz-pausa #bso-aj-reducido.bso-pz-hit,
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root .bso-pz-pausa #bso-pausa-ajustes.bso-pz-hit { height: calc(var(--h) * var(--u) * 1px) !important; min-height: 0 !important; }
/* SEGUIR (28 u) y REINICIAR (24 u) están a 34 u: los 44 px de cada uno se reparten sin pisarse en la mitad */
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root .bso-pz-pausa #bso-pausa-seguir.bso-pz-hit { z-index: 3; }

/* ═══ PAUSA (lámina 24) ═════════════════════════════════════════════════════════════════════ */
#bso-root #bso-m-pausa[data-pz] { padding: 0; background: rgba(4, 3, 12, 0.72); animation: bsoPzFundido 200ms cubic-bezier(0.16, 1, 0.3, 1) both; }
#bso-root #bso-m-pausa[data-pz]::before { display: none; }
#bso-root #bso-m-pausa[data-pz] > .bso-panel { display: none !important; }
@keyframes bsoPzFundido { from { opacity: 0; } to { opacity: 1; } }

/* El botón de PAUSA del HUD (pantallas3.js:273): círculo r 11 en (196, 19) con sus dos barras; 44 px de área táctil. */
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root.bso-root[data-pantalla="partida"][data-prisma="1"] .bso-btn-pausa {
  left: calc(196 * var(--bso-u, 1) * 1px - 22px); top: calc(19 * var(--bso-u, 1) * 1px - 22px);
  width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0;
  border: 0; border-color: transparent; background: transparent; box-shadow: none;
}
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root.bso-root[data-pantalla="partida"][data-prisma="1"] .bso-btn-pausa::before {
  content: ""; display: block; position: absolute; left: 50%; top: 50%;
  width: calc(22 * var(--bso-u, 1) * 1px); height: calc(22 * var(--bso-u, 1) * 1px); margin: calc(-11 * var(--bso-u, 1) * 1px) 0 0 calc(-11 * var(--bso-u, 1) * 1px);
  border-radius: 50%; background: rgba(8, 8, 24, 0.8); box-shadow: inset 0 0 0 calc(0.8 * var(--bso-u, 1) * 1px) rgba(255, 255, 255, 0.5);
  pointer-events: none;
}
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root.bso-root[data-pantalla="partida"][data-prisma="1"] .bso-btn-pausa::after {
  content: ""; display: block; position: absolute; left: 50%; top: 50%;
  width: calc(6.6 * var(--bso-u, 1) * 1px); height: calc(10 * var(--bso-u, 1) * 1px); margin: calc(-5 * var(--bso-u, 1) * 1px) 0 0 calc(-4 * var(--bso-u, 1) * 1px);
  background: linear-gradient(90deg, #ffffff 0 39.4%, transparent 39.4% 60.6%, #ffffff 60.6% 100%);
  pointer-events: none;
}
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root.bso-root[data-pantalla="partida"][data-prisma="1"] .bso-btn-pausa .bso-pausa-ico,
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root.bso-root[data-pantalla="partida"][data-prisma="1"] .bso-btn-pausa .bso-btn-txt { opacity: 0; }

/* ═══ RESULTADOS (láminas 10 · 21 · 24 · 26) ════════════════════════════════════════════════
 * Revelación del prototipo (lobby.js · p en 2,2 s): medalla ×2,4 → ×1 (0–0,55 s), rango (0,33 s), números (0,55 s),
 * barras de juicio (0,88 s + 0,13 s por fila, 0,55 s), combo y precisión (1,54 s), XP (1,76 s). */
#bso-root #bso-resultado[data-pz] { padding: 0; background: rgba(5, 4, 14, 0.62); }
#bso-root #bso-resultado[data-pz]::before { display: none; }
#bso-root #bso-resultado[data-pz] > .bso-panel { display: none !important; }
#bso-root .bso-pz-res .bso-pz-barra {
  position: absolute; display: block; pointer-events: none;
  left: calc(var(--x) * var(--u) * 1px); top: calc(var(--y) * var(--u) * 1px);
  width: calc(var(--w) * var(--u) * 1px); height: calc(var(--h) * var(--u) * 1px);
  background: var(--c, #00f0ff); box-shadow: inset 0 calc(2 * var(--u) * 1px) 0 rgba(255, 255, 255, 0.35);
  transform-origin: 0 50%; transform: scaleX(1);
}
#bso-root .bso-pz-res .bso-pz-xp { --c: #00f0ff; box-shadow: none; }
#bso-root .bso-pz-res .bso-pz-barra[hidden] { display: none; }
#bso-root .bso-pz-res .bso-pz-des {
  position: absolute; left: calc(20 * var(--u) * 1px); top: calc(262 * var(--u) * 1px); width: calc(262 * var(--u) * 1px);
  margin: 0; min-width: 0; font: 700 calc(6.5 * var(--u) * 1px)/1.3 "BSU", "PrismaU", "Inter", system-ui, sans-serif; letter-spacing: 0.04em;
  color: #ffd25a; text-align: center; pointer-events: none; overflow-wrap: anywhere;
}
#bso-root .bso-pz-res .bso-pz-des[hidden] { display: none; }
#bso-root .bso-pz-res[data-tipo="duelo"] .bso-pz-capa-rayos,
#bso-root .bso-pz-res[data-tipo="duelo"] .bso-pz-capa-medalla,
#bso-root .bso-pz-res[data-tipo="duelo"] .bso-pz-barra { display: none; }
#bso-root .bso-pz-res[data-tipo="duelo"] .bso-pz-des { top: calc(336 * var(--u) * 1px); left: calc(150 * var(--u) * 1px); width: calc(360 * var(--u) * 1px); }
#bso-root .bso-pz-res[data-ver="1"] > .bso-pz-lienzo { animation: bsoPzFundido 330ms cubic-bezier(0.16, 1, 0.3, 1) both; }
#bso-root .bso-pz-res[data-ver="1"] .bso-pz-capa-medalla { animation: bsoPzMedalla 550ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
#bso-root .bso-pz-res[data-ver="1"] .bso-pz-capa-rayos { animation: bsoPzFundido 550ms cubic-bezier(0.16, 1, 0.3, 1) both, bsoPzGiro 20944ms steps(240) infinite; }
#bso-root .bso-pz-res[data-ver="1"] .bso-pz-capa-datos { animation: bsoPzFundido 440ms cubic-bezier(0.16, 1, 0.3, 1) 550ms both; }
#bso-root .bso-pz-res[data-ver="1"] .bso-pz-barra { animation: bsoPzBarra 550ms cubic-bezier(0.16, 1, 0.3, 1) both; }
#bso-root .bso-pz-res[data-ver="1"] .bso-pz-barra[data-k="0"] { animation-delay: 880ms; }
#bso-root .bso-pz-res[data-ver="1"] .bso-pz-barra[data-k="1"] { animation-delay: 1012ms; }
#bso-root .bso-pz-res[data-ver="1"] .bso-pz-barra[data-k="2"] { animation-delay: 1144ms; }
#bso-root .bso-pz-res[data-ver="1"] .bso-pz-barra[data-k="3"] { animation-delay: 1276ms; }
#bso-root .bso-pz-res[data-ver="1"] .bso-pz-xp { animation-delay: 1760ms; animation-duration: 440ms; }
@keyframes bsoPzMedalla { from { opacity: 0; transform: scale(2.4); } to { opacity: 1; transform: scale(1); } }
@keyframes bsoPzGiro { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes bsoPzBarra { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ═══ CELEBRACIONES Y AVISOS (lámina 38) ═════════════════════════════════════════════════════
 * Un cartel de 2,4 s: entra en 12 %, queda y se va en el último 12 % (pantallas4.js:517); los rayos giran 0,0004 rad/ms. */
#bso-root .bso-pz-cel { position: absolute; inset: 0; z-index: 7; background: rgba(4, 3, 12, 0.62); pointer-events: auto; }
#bso-root .bso-pz-cel[hidden] { display: none !important; }
#bso-root .bso-pz-cel .bso-pz-caja[data-ver="1"] > .bso-pz-lienzo { animation: bsoPzCelEntra 720ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
#bso-root .bso-pz-cel .bso-pz-caja[data-ver="1"] .bso-pz-capa-rayos { animation: bsoPzFundido 290ms cubic-bezier(0.16, 1, 0.3, 1) both, bsoPzGiro 15708ms steps(240) infinite; }
#bso-root .bso-pz-cel .bso-pz-caja[data-ver="1"]:not([data-tipo="ruptura"]) { animation: bsoPzCelVida 2400ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes bsoPzCelEntra { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }
@keyframes bsoPzCelVida { 0% { opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root .bso-pz-cel .bso-pz-cel-x { z-index: 1; border-radius: 0 !important; }
html:not(#pz-a):not(#pz-b):not(#pz-c) body #bso-root .bso-pz-cel .bso-pz-cel-x:focus-visible { outline-offset: -4px; box-shadow: none !important; }

/* ── Movimiento reducido: sin rayos que giran, la medalla y el texto aparecen sin rebote, sin barras que corren. */
#bso-root[data-reducido="1"] .bso-pz-capa-rayos,
#bso-root[data-reducido="1"] .bso-pz-capa-medalla,
#bso-root[data-reducido="1"] .bso-pz-barra,
#bso-root[data-reducido="1"] .bso-pz-cel .bso-pz-caja > .bso-pz-lienzo { animation: bsoPzFundido 200ms cubic-bezier(0.16, 1, 0.3, 1) both !important; }
@media (prefers-reduced-motion: reduce) {
  #bso-root .bso-pz-capa-rayos, #bso-root .bso-pz-capa-medalla, #bso-root .bso-pz-barra,
  #bso-root .bso-pz-cel .bso-pz-caja > .bso-pz-lienzo { animation: bsoPzFundido 200ms cubic-bezier(0.16, 1, 0.3, 1) both !important; }
}
