/* Madryn Box: marcador, botones y elección de personaje */

/* El marcador común queda debajo de las barras de vida */
#hud.own { top: calc(var(--safe-top) + 100px); padding-top: 0; }
#hud.own .time, #hud.own .hud-row { display: none; }
#hud.own .target { margin: 0 auto; }
#hud.own .hud-tag { display: table; margin: 6px auto 0; }

.av-emo {
  display: inline-grid; place-items: center; width: 1.45em; height: 1.45em; margin-right: 6px; vertical-align: -0.3em;
  border-radius: 50%; background: var(--c, #fff); font-size: 0.95em; line-height: 1;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15);
}

.pz-ui { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.pz-ui.flash::after { content: ''; position: absolute; inset: 0; background: #fff; animation: pzflash .6s ease-out forwards; }
@keyframes pzflash { 0% { opacity: 1; } 100% { opacity: 0; } }

/* Barras de vida */
.pz-top {
  position: absolute; left: 0; right: 0; top: 0; padding: calc(var(--safe-top) + 8px) 8px 0;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: start;
  transition: opacity .35s ease-out, transform .35s cubic-bezier(.2, 1.4, .4, 1);
}
/* un velo suave arriba: las barras se leen bien aunque atrás pasen las luces y los banderines */
.pz-top::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--safe-top) + 112px); z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 30, 58, .34) 0%, rgba(10, 30, 58, .16) 55%, rgba(10, 30, 58, 0) 100%);
}
/* en "listo" el marcador espera arriba (ahí está el botón Volver) y baja cuando empieza la pelea */
.pz-ui:not(.playing) .pz-top { opacity: 0; transform: translateY(-16px); }
.pz-ui.duel .pz-top::before { display: none; }
.pz-side { display: flex; gap: 6px; align-items: center; min-width: 0; }
.pz-side.r { flex-direction: row-reverse; text-align: right; }
.pz-face .pz-emo {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 26px;
  background: var(--c); border: 3px solid #fff; box-shadow: 0 3px 0 rgba(10, 52, 84, .35);
}
/* Aliento del público: aro dorado alrededor de la cara que se llena; lleno, brilla y suena la hinchada */
.pz-face {
  position: relative; display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%;
  background: conic-gradient(var(--hc, #FFB020) calc(var(--h, 0) * 360deg), rgba(28, 39, 64, .45) 0);
}
.pz-face.hot { --hc: #FFD23F; box-shadow: 0 0 10px rgba(255, 201, 60, .7); }
.pz-face.boost { --hc: #FFE14D; animation: pzhype .45s ease-in-out infinite alternate; }
.pz-face.boost::after { content: '📣'; position: absolute; right: -7px; bottom: -5px; font-size: 18px; line-height: 1; filter: drop-shadow(0 2px 0 rgba(10, 52, 84, .4)); }
.pz-side.r .pz-face.boost::after { right: auto; left: -7px; transform: scaleX(-1); }
@keyframes pzhype { from { box-shadow: 0 0 4px 1px rgba(255, 201, 60, .6); } to { box-shadow: 0 0 16px 6px rgba(255, 225, 77, .95); } }
.pz-face .pz-emo .mf-face { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2.5px var(--c); background: #fff; }
.pz-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pz-name { font-size: 13px; font-weight: 700; color: #fff; text-shadow: 0 1px 0 rgba(10, 52, 84, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-hp { position: relative; height: 14px; border-radius: 8px; background: rgba(28, 39, 64, .55); border: 2px solid #fff; overflow: hidden; box-shadow: 0 2px 0 rgba(10, 52, 84, .3); }
.pz-hp i { position: absolute; inset: 0; transform-origin: left; border-radius: 5px; }
.pz-side.r .pz-hp i { transform-origin: right; }
.pz-hp .lag { background: #fff; }
.pz-hp .cur { background: linear-gradient(180deg, #7CF29A, #2EC46B); transition: transform .08s; }
.pz-hp .cur.mid { background: linear-gradient(180deg, #FFE27A, #FFB020); }
.pz-hp .cur.low { background: linear-gradient(180deg, #FF8A9E, #E6304F); animation: pzlow .5s ease-in-out infinite alternate; }
@keyframes pzlow { to { filter: brightness(1.35); } }
/* Aire: se gasta al pegar y esquivar */
.pz-air { position: relative; height: 5px; border-radius: 4px; background: rgba(28, 39, 64, .45); overflow: hidden; }
.pz-air i { position: absolute; inset: 0; transform-origin: left; background: linear-gradient(90deg, #7FD8FF, #C6F0FF); transition: transform .1s; }
.pz-side.r .pz-air i { transform-origin: right; }
.pz-air.out { box-shadow: 0 0 0 2px #fff; }
.pz-air.out i { background: #FF6B81; }
.pz-air.out { animation: pzout .35s ease-in-out infinite alternate; }
@keyframes pzout { to { background: rgba(230, 48, 79, .55); } }
.pz-sp { position: relative; height: 6px; border-radius: 4px; background: rgba(28, 39, 64, .45); overflow: hidden; }
.pz-sp i { position: absolute; inset: 0; transform-origin: left; background: var(--sol); transform: scaleX(0); transition: transform .15s; }
.pz-side.r .pz-sp i { transform-origin: right; }
.pz-sp.full { box-shadow: 0 0 0 2px #fff, 0 0 10px var(--sol); }
.pz-sp.full i { background: linear-gradient(90deg, #FFC93C, #FFF3A0, #FFC93C); background-size: 200% 100%; animation: pzshine .6s linear infinite; }
@keyframes pzshine { to { background-position: -200% 0; } }
.pz-mid { display: flex; flex-direction: column; align-items: center; gap: 3px; padding-top: 2px; }
.pz-clock {
  min-width: 46px; text-align: center; font-family: var(--display); font-size: 27px; line-height: 1; font-weight: 400; color: #fff;
  background: var(--tinta); border-radius: 12px; padding: 5px 6px 6px; border: 2px solid #fff; font-variant-numeric: tabular-nums;
}
.pz-clock.low { background: var(--krill); animation: bump .5s ease-out infinite; }
.pz-dots { display: flex; gap: 4px; }
.pz-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .45); border: 2px solid #fff; }
.pz-dots i.now { background: #fff; }
.pz-dots i.w { background: var(--sol); }
.pz-dots i.l { background: #3A86FF; }
.pz-score {
  margin: 0; text-align: center; font-family: var(--display); font-size: 18px; font-weight: 400; line-height: 1; color: #fff; letter-spacing: .02em;
  text-shadow: 0 2px 0 rgba(10, 52, 84, .7); font-variant-numeric: tabular-nums;
}
.pz-ui.duel .pz-top { top: calc(var(--safe-top) + 150px); }
.pz-ui.duel .pz-score { display: none; }

/* Cortina entre peleas: azul noche con filetes dorados, en diagonal */
.pz-wipe {
  position: absolute; top: -10%; bottom: -10%; left: -35%; right: -35%; pointer-events: none; transform: translateX(-125%);
  background: linear-gradient(104deg, transparent 0 17%, #FFC93C 17% 18.6%, #22397E 18.6% 19.4%, #13245C 19.4% 80.6%, #22397E 80.6% 81.4%, #FFC93C 81.4% 83%, transparent 83%);
}
.pz-wipe::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; opacity: .95;
  background: #FFC93C; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.pz-wipe.in { animation: pzwipein .3s cubic-bezier(.55, 0, .8, .2) forwards; }
.pz-wipe.out { animation: pzwipeout .42s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes pzwipein { from { transform: translateX(-125%); } to { transform: translateX(0); } }
@keyframes pzwipeout { from { transform: translateX(0); } to { transform: translateX(125%); } }

/* Carteles grandes */
.pz-banner { position: absolute; left: 0; right: 0; top: 36%; display: grid; place-items: center; }
.pz-bn {
  grid-area: 1 / 1; max-width: 92%; text-align: center;
  font-family: var(--display); font-size: 48px; font-weight: 400; line-height: 1; color: #fff; letter-spacing: .015em;
  text-shadow: 0 4px 0 var(--krill-dark), 0 8px 18px rgba(10, 52, 84, .4);
  animation: pzbn 1.2s cubic-bezier(.2, 1.5, .4, 1) forwards;
}
.pz-bn.go { color: var(--sol); text-shadow: 0 4px 0 #B8461A, 0 8px 18px rgba(10, 52, 84, .4); }
.pz-bn.ko { font-size: 72px; color: #fff; text-shadow: 0 5px 0 #B8341F, 0 0 30px rgba(255, 201, 60, .9); }
.pz-bn.smash { font-size: 40px; color: var(--sol); text-shadow: 0 4px 0 #B8461A; transform: rotate(-6deg); }
.pz-bn.perfect, .pz-bn.won { font-size: 34px; color: var(--menta); text-shadow: 0 3px 0 var(--hondo), 0 6px 16px rgba(10, 52, 84, .35); margin-top: 90px; }
/* "¡Ganaste la pelea!" sale junto con la presentación del rival que sigue: va debajo de las tarjetas */
.pz-bn.won { margin-top: 170px; }
.pz-bn.champ { font-size: 52px; color: var(--sol); text-shadow: 0 5px 0 #B8461A, 0 0 34px rgba(255, 201, 60, .9); animation-duration: 2.4s; }
.pz-bn.lost { font-size: 36px; color: #fff; text-shadow: 0 4px 0 var(--hondo); }
.pz-bn.hype { font-size: 28px; color: var(--sol); text-shadow: 0 3px 0 #B8461A, 0 0 26px rgba(255, 201, 60, .9); margin-top: -96px; }
.pz-bn.fin { font-size: 64px; color: #FFE14D; text-shadow: 0 5px 0 #B8341F, 0 0 30px rgba(255, 140, 66, .9); transform: rotate(-4deg); }
.pz-bn.out { font-size: 58px; color: #fff; text-shadow: 0 5px 0 #0F86A0, 0 0 30px rgba(125, 227, 255, .95); margin-top: -50px; }
.pz-bn.wind { font-size: 24px; color: #fff; text-shadow: 0 3px 0 #2A9BD8, 0 6px 14px rgba(10, 52, 84, .35); margin-top: 210px; }
.pz-bn.tip {
  font-family: inherit; font-weight: 700; letter-spacing: 0; font-size: 17px; line-height: 1.25; color: var(--tinta); text-shadow: none; background: rgba(255, 255, 255, .95);
  padding: 9px 14px; border-radius: 14px; box-shadow: 0 4px 0 rgba(10, 76, 112, .25); margin-top: 150px; animation-name: pztip;
}
@keyframes pzbn {
  0% { opacity: 0; transform: scale(2.2); }
  18% { opacity: 1; transform: scale(.94); }
  28% { transform: scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.05) translateY(-10px); }
}
@keyframes pztip { 0% { opacity: 0; transform: translateY(10px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.pop.pz-dmg, .pop.pz-evade, .pop.pz-tired, .pop.pz-air-pop, .pop.pz-heal, .pop.pz-gull, .pop.pz-sp-name { font-family: var(--display); font-weight: 400; letter-spacing: .02em; }
.pop.pz-dmg { font-size: 28px; color: #fff; -webkit-text-stroke: 5px #B8341F; paint-order: stroke fill; text-shadow: 0 3px 0 #7A1E10; }
.pop.pz-dmg.big { font-size: 36px; color: var(--sol); }
.pop.pz-evade { font-size: 26px; color: #fff; -webkit-text-stroke: 5px #6A50E0; paint-order: stroke fill; text-shadow: 0 3px 0 #3B2A99; }
.pop.pz-tired { font-size: 22px; color: #fff; -webkit-text-stroke: 4px #E6304F; paint-order: stroke fill; }
.pop.pz-air-pop { font-size: 20px; color: #fff; -webkit-text-stroke: 4px #2A9BD8; paint-order: stroke fill; }
.dot.esq { background: #7B61F0; border-radius: 50% 4px 4px 50%; }
.dot.air { background: #7FD8FF; border-radius: 4px; height: 8px; }
.pop.pz-heal { font-size: 26px; color: #7DFF9A; text-shadow: 0 2px 0 #1E7A3A; }
.pop.pz-gull { font-size: 24px; color: #fff; -webkit-text-stroke: 5px #2A9BD8; paint-order: stroke fill; text-shadow: 0 3px 0 #0A4C70; }
.pop.pz-sp-name { font-size: 22px; color: #fff; background: var(--krill); padding: 3px 10px; border-radius: 999px; text-shadow: none; box-shadow: 0 3px 0 var(--krill-dark); animation-duration: 1.2s; }

/* Presentación de cada pelea */
.pz-vs {
  position: absolute; left: 10px; right: 10px; top: 21%;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px;
  animation: zoom .4s cubic-bezier(.2, 1.6, .4, 1);
}
.pz-vs-title, .pz-vs-place { grid-column: 1 / -1; margin: 0; text-align: center; font-weight: 700; color: #fff; text-shadow: 0 2px 0 rgba(10, 52, 84, .6); }
.pz-vs-title { font-family: var(--display); font-weight: 400; font-size: 22px; justify-self: center; background: var(--tinta); border-radius: 999px; padding: 4px 16px 5px; text-shadow: none; }
.pz-vs-place { font-size: 14px; justify-self: center; background: rgba(28, 39, 64, .75); border-radius: 999px; padding: 3px 12px 4px; text-shadow: none; }
.pz-vs-card {
  background: rgba(255, 255, 255, .96); border-radius: 18px; padding: 10px 8px 9px; text-align: center; min-width: 0;
  box-shadow: 0 5px 0 rgba(10, 52, 84, .3); border-top: 6px solid var(--c);
}
.pz-vs-card.me { animation: pzin-l .45s ease-out; }
.pz-vs-card.foe { animation: pzin-r .45s ease-out; }
@keyframes pzin-l { from { transform: translateX(-60px); opacity: 0; } }
@keyframes pzin-r { from { transform: translateX(60px); opacity: 0; } }
.pz-vs-emo { display: grid; place-items: center; width: 54px; height: 54px; margin: -2px auto 4px; border-radius: 50%; background: var(--c); font-size: 32px; }
.pz-vs-emo .mf-face { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--c); background: #fff; }
.pz-vs-card b { display: block; font-family: var(--display); font-weight: 400; font-size: 18px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-vs-card small { display: block; font-size: 12px; color: var(--gris); line-height: 1.2; margin-top: 2px; }
.pz-vs-card q { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--krill-dark); line-height: 1.15; }
.pz-vs-card q::before, .pz-vs-card q::after { content: ''; }
.pz-vs-x { font-family: var(--display); font-size: 38px; font-weight: 400; color: var(--sol); text-shadow: 0 3px 0 #B8461A; }

/* Botones de pelea: pulgar izquierdo Defensa y Esquive, pulgar derecho Golpe y Especial */
.pz-pad {
  position: absolute; left: 0; right: 0; bottom: calc(var(--safe-bottom) + 12px); padding: 0 12px;
  display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none;
  opacity: 0; transition: opacity .2s;
}
.pz-cl { position: relative; flex: none; }
.pz-cl.l { width: 142px; height: 146px; }
.pz-cl.r { width: 166px; height: 162px; }
.pz-cl .pz-btn { position: absolute; }
.pz-ui.playing .pz-pad.p1 { opacity: 1; }
.pz-ui.playing.duel .pz-pad.p2 { opacity: 1; }
.pz-pad.p2 { display: none; top: calc(var(--safe-top) + 12px); bottom: auto; transform: rotate(180deg); }
.pz-ui.duel .pz-pad.p2 { display: flex; }
.pz-btn {
  pointer-events: auto; position: relative; border: 0; border-radius: 50%; cursor: pointer; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  color: #fff; font-weight: 700; font-size: 13px; touch-action: none; -webkit-user-select: none; user-select: none;
  transition: transform .06s;
}
.pz-ui:not(.playing) .pz-btn { pointer-events: none; }
.pz-btn svg { width: 40%; height: 40%; fill: #fff; stroke: none; }
.pz-btn.atk svg { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pz-btn span { line-height: 1; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.pz-btn small { font-size: 10px; font-weight: 600; opacity: .9; line-height: 1; }
.pz-btn.def {
  left: 0; bottom: 0; width: 88px; height: 88px;
  background: radial-gradient(circle at 35% 30%, #5FF2E2, #12A899 70%); box-shadow: 0 6px 0 #0B7A70, 0 8px 16px rgba(10, 52, 84, .35);
}
.pz-btn.atk {
  right: 0; bottom: 0; width: 112px; height: 112px; font-size: 15px;
  background: radial-gradient(circle at 35% 30%, #FF8DA8, #E6304F 70%); box-shadow: 0 7px 0 #A81E3B, 0 9px 18px rgba(10, 52, 84, .35);
}
.pz-btn.esq {
  left: 76px; bottom: 80px; width: 66px; height: 66px; font-size: 12px;
  background: radial-gradient(circle at 35% 30%, #C9B8FF, #7B61F0 70%); box-shadow: 0 5px 0 #4F3BB5, 0 7px 14px rgba(10, 52, 84, .3);
}
.pz-btn.esq svg { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pz-btn.esq.low { filter: grayscale(.85) brightness(.9); opacity: .65; }
.pz-btn.esq.on { box-shadow: 0 2px 0 #4F3BB5; }
.pz-btn.esq.warn { animation: pzwarn2 .28s ease-in-out infinite alternate; }
@keyframes pzwarn2 { from { box-shadow: 0 5px 0 #4F3BB5, 0 0 0 3px #fff; } to { box-shadow: 0 5px 0 #4F3BB5, 0 0 0 7px #fff, 0 0 26px 6px #C9B8FF; transform: scale(1.1); } }
.pz-btn.spe {
  right: 100px; bottom: 96px; width: 66px; height: 66px; font-size: 12px;
  background: radial-gradient(circle at 35% 30%, #B9C3D3, #7D889B 70%); box-shadow: 0 5px 0 #5A6577; opacity: .8;
}
.pz-btn.spe.ready {
  opacity: 1; color: var(--tinta);
  background: radial-gradient(circle at 35% 30%, #FFF3A0, #FFC93C 65%); box-shadow: 0 5px 0 #C48A00, 0 0 0 4px rgba(255, 255, 255, .9), 0 0 22px #FFD23F;
  animation: pzready .8s ease-in-out infinite;
}
.pz-btn.spe.ready svg { fill: var(--tinta); }
.pz-btn.spe.ready span { text-shadow: none; }
@keyframes pzready { 50% { transform: scale(1.09); } }
.pz-btn.on { transform: translateY(4px) scale(.94); }
.pz-btn.def.warn { animation: pzwarn .28s ease-in-out infinite alternate; }
@keyframes pzwarn { from { box-shadow: 0 6px 0 #0B7A70, 0 0 0 3px #fff; } to { box-shadow: 0 6px 0 #0B7A70, 0 0 0 7px #fff, 0 0 26px 6px #7DFFD8; transform: scale(1.08); } }
.pz-btn.atk.hint::before {
  content: '¡Tocá!'; position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  background: #fff; color: var(--krill-dark); font-size: 16px; padding: 5px 12px; border-radius: 999px;
  box-shadow: 0 3px 0 rgba(10, 52, 84, .25); white-space: nowrap; animation: pzhint .6s ease-in-out infinite alternate;
}
@keyframes pzhint { to { transform: translate(-50%, -8px); } }
.pz-btn.def.on { box-shadow: 0 2px 0 #0B7A70; }
.pz-btn.atk.on { box-shadow: 0 2px 0 #A81E3B; }
/* Celus bajitos y duelo (los botones del jugador 2 van arriba): todo un poco más chico */
@media (max-height: 640px) {
  .pz-cl.l { width: 124px; height: 126px; } .pz-cl.r { width: 142px; height: 136px; }
  .pz-btn.def { width: 76px; height: 76px; }
  .pz-btn.atk { width: 94px; height: 94px; }
  .pz-btn.esq { left: 66px; bottom: 68px; width: 58px; height: 58px; }
  .pz-btn.spe { right: 84px; bottom: 78px; width: 58px; height: 58px; }
}
.pz-ui.duel .pz-cl.l { width: 124px; height: 126px; } .pz-ui.duel .pz-cl.r { width: 142px; height: 136px; }
.pz-ui.duel .pz-btn.def { width: 76px; height: 76px; }
.pz-ui.duel .pz-btn.atk { width: 94px; height: 94px; }
.pz-ui.duel .pz-btn.esq { left: 66px; bottom: 68px; width: 58px; height: 58px; }
.pz-ui.duel .pz-btn.spe { right: 84px; bottom: 78px; width: 58px; height: 58px; }
.pz-ui.duel .pz-btn small { display: none; }

/* Globo del grito de guerra */
.pz-bubble {
  position: absolute; z-index: 5; transform: translate(-30%, -100%); pointer-events: none;
  background: #fff; color: var(--tinta); font-weight: 700; font-size: 16px; line-height: 1.15;
  padding: 8px 12px; border-radius: 16px; max-width: 180px; box-shadow: 0 4px 0 rgba(10, 52, 84, .25);
  animation: zoom .3s cubic-bezier(.2, 1.6, .4, 1);
}
.pz-bubble::after { content: ''; position: absolute; left: 22%; bottom: -9px; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; }
/* Lo que dicen los rivales en la pelea */
.pz-quip { transform: none; font-size: 15px; max-width: 170px; text-align: center; margin-top: -12px; }
.pz-quip::after { left: calc(50% - 10px); }
.pz-quip.in { animation: zoom .3s cubic-bezier(.2, 1.6, .4, 1); }

/* Repetición del K.O.: franjas de cine, cartel y tocar para seguir */
.pz-replay { position: absolute; inset: 0; z-index: 6; cursor: pointer; }
.pz-replay .bar { position: absolute; left: 0; right: 0; height: 11%; background: #0B0F18; transition: transform .35s ease-out; }
.pz-replay .bar.t { top: 0; transform: translateY(-100%); }
.pz-replay .bar.b { bottom: 0; transform: translateY(100%); }
.pz-replay.on .bar { transform: none; }
.pz-replay .rec {
  position: absolute; left: 14px; top: calc(11% + 10px); display: flex; align-items: center; gap: 7px;
  font-family: var(--display); font-weight: 400; font-size: 20px; color: #fff; text-shadow: 0 2px 0 rgba(10, 15, 24, .7);
}
.pz-replay .rec::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: #FF3B3B; box-shadow: 0 0 8px #FF3B3B; animation: pzrec 1s steps(2, start) infinite; }
@keyframes pzrec { to { visibility: hidden; } }
.pz-replay .skip { position: absolute; left: 0; right: 0; bottom: calc(5.5% - 9px); text-align: center; font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, .78); letter-spacing: .02em; opacity: 0; transition: opacity .3s .35s; }
.pz-replay.on .skip { opacity: 1; }
.pz-ui.replaying .pz-pad.p1, .pz-ui.replaying .pz-pad.p2, .pz-ui.replaying .pz-banner { opacity: 0 !important; }
.pz-ui.replaying .pz-top { opacity: .35; }

/* Elegir personaje */
#custom { z-index: 4; }
.pz-pick { position: absolute; inset: 0; display: flex; flex-direction: column; }
.pz-pick-top { display: flex; justify-content: space-between; align-items: center; padding: calc(var(--safe-top) + 12px) 14px 0; }
.pz-back, .pz-step { border: 0; border-radius: 999px; background: rgba(255, 255, 255, .92); padding: 7px 14px; font-weight: 600; font-size: 15px; box-shadow: 0 3px 0 rgba(10, 52, 84, .25); }
.pz-back { cursor: pointer; }
.pz-step { max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pz-card {
  position: absolute; left: 12px; top: calc(var(--safe-top) + 58px); width: 46%; max-width: 190px;
  background: rgba(255, 255, 255, .94); border-radius: 16px; padding: 9px 10px 10px; box-shadow: 0 4px 0 rgba(10, 52, 84, .2);
}
.pz-card h2 { margin: 0; font-size: 19px; line-height: 1.1; }
.pz-card p { margin: 1px 0 0; font-size: 12px; color: var(--gris); line-height: 1.2; }
.pz-card .pz-special { margin: 5px 0 4px; color: var(--tinta); font-size: 12px; }
.pz-stat { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 5px; font-size: 11px; margin-top: 3px; }
.pz-stat em { font-style: normal; color: var(--gris); font-weight: 600; }
.pz-stat i { height: 7px; border-radius: 4px; background: #E3EEF1; overflow: hidden; }
.pz-stat b { display: block; height: 100%; background: linear-gradient(90deg, var(--krill), var(--sol)); border-radius: 4px; }
.pz-sheet {
  margin-top: auto; height: 42%; overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch;
  background: #fff; border-radius: 24px 24px 0 0; padding: 14px 14px 12px; box-shadow: 0 -8px 24px rgba(10, 52, 84, .2);
}
.pz-sheet h3 { margin: 0 0 8px; font-size: 20px; }
.pz-sheet h4 { margin: 14px 0 7px; font-size: 15px; color: var(--gris); }
.pz-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 340px) { .pz-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pz-ch {
  border: 0; border-radius: 14px; background: #EEF6F8; padding: 7px 2px 6px; cursor: pointer; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 3px 0 #D3E4E8;
}
.pz-ch span { font-size: 30px; line-height: 1.1; }
.pz-ch span .mf-face { display: block; width: 50px; height: 50px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2.5px var(--c); }
.pz-ch b { font-family: var(--display); font-weight: 400; font-size: 12px; line-height: 1.1; color: var(--tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 2px; }
.pz-ch.on { background: var(--papel); box-shadow: 0 0 0 3px var(--krill), 0 3px 0 var(--krill-dark); }
.pz-cols { display: flex; flex-wrap: wrap; gap: 8px; }
.pz-col { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; background: var(--c); cursor: pointer; box-shadow: 0 0 0 2px #D3E4E8; }
.pz-col.on { box-shadow: 0 0 0 3px var(--tinta); transform: scale(1.08); }
.pz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pz-chip { border: 0; border-radius: 999px; background: #EEF6F8; padding: 7px 12px; font-weight: 600; font-size: 14px; cursor: pointer; }
.pz-chip.on { background: var(--tinta); color: #fff; }
.pz-actions { background: #fff; padding: 8px 14px calc(var(--safe-bottom) + 12px); display: flex; flex-direction: column; gap: 8px; box-shadow: 0 -6px 12px rgba(255, 255, 255, .9); }
.pz-actions .btn-play { padding: 11px 16px 10px; }

@media (prefers-reduced-motion: reduce) {
  .pz-wipe, .pz-bn, .pz-vs, .pz-vs-card, .pz-btn.spe.ready, .pz-hp .cur.low, .pz-clock.low, .pz-air.out, .pz-btn.esq.warn, .pz-face.boost, .pz-quip.in, .pz-replay .rec::before { animation: none; }
}
