/* Card-deal and flipping geometry. The two surfaces stay independent 3D planes. */
.pack-room .manual-reveal-row {
 max-width:none;
 align-items:start;
}
.pack-room .manual-reveal-row .reveal-slot > .cyber-mystery {
 height:auto;
 min-height:280px;
 aspect-ratio:7/10;
}
.pack-room .manual-reveal-row .reveal-slot {
 perspective:1180px;
}
.pack-room .manual-reveal-row.cards-arriving .reveal-slot {
 animation:mystery-deal .54s cubic-bezier(.2,.68,.24,1.2) both;
 animation-delay:calc(var(--slot)*100ms);
}
@keyframes mystery-deal {
 0% {transform:translate3d(calc((1 - var(--slot))*22px),28px,0) rotate(calc((var(--slot) - 1)*4deg)) scale(.92)}
 100% {transform:none}
}
.pack-room .manual-reveal-row .flip-shell {perspective:1100px;position:relative;display:grid;isolation:auto}
.pack-room .manual-reveal-row .flip-rotor {display:grid;position:relative;transform:rotateY(0deg);transform-style:preserve-3d}
.pack-room .manual-reveal-row .flip-face {
 display:grid;
 grid-area:1/1;
 transform-style:preserve-3d;
 backface-visibility:hidden;
 -webkit-backface-visibility:hidden;
}
/* The card turns edge-on before the DOM switches to the other face. Never
   composite the holographic cover and the interactive PopCard at once. */
.pack-room .manual-reveal-row .flip-back {transform:translateZ(.1px);visibility:visible}
.pack-room .manual-reveal-row .flip-front {transform:rotateY(180deg) translateZ(.1px);visibility:hidden}
.pack-room .manual-reveal-row .flip-face > .cyber-mystery {height:100%;transform:none!important;opacity:1}
.pack-room .manual-reveal-row .flip-shell.turn-over:not(.half-turn) .flip-rotor {
 animation:manual-flip-close 245ms cubic-bezier(.44,.08,.62,.89) both;
}
.pack-room .manual-reveal-row .flip-shell.turn-over.half-turn .flip-rotor {
 animation:manual-flip-open 375ms both;
}
.pack-room .manual-reveal-row .flip-shell.half-turn .flip-back {visibility:hidden}
.pack-room .manual-reveal-row .flip-shell.half-turn .flip-front {visibility:visible}
@keyframes manual-flip-close {
 from {transform:rotateY(0deg)}
 to {transform:translateY(-14px) rotateY(90deg) scale(1.025)}
}
@keyframes manual-flip-open {
 0% {transform:translateY(-14px) rotateY(90deg) scale(1.025);animation-timing-function:cubic-bezier(.18,.55,.38,1)}
 62% {transform:translateY(-5px) rotateY(187deg) scale(1.012);animation-timing-function:ease-out}
 100% {transform:rotateY(180deg)}
}
.manual-draw-actions {
 display:flex;
 justify-content:center;
 padding:0 18px 10px;
}
.manual-draw-actions[hidden] {display:none}
.collectible-room .draw-flip-all.g-button {
 min-height:44px;
 padding:6px 22px;
 color:#19284a;
 border:1px solid #8599ba;
 border-radius:12px;
 background:linear-gradient(122deg,#ffffff,#deeaff 51%,#efe0f9);
 box-shadow:inset 0 0 0 2px #ffffff80,0 3px 10px #6481ad24;
 font-size:14px;
 font-weight:800;
 transition:box-shadow .18s ease-out,background .18s ease-out;
}
.collectible-room .draw-flip-all.g-button:hover:not(:disabled) {
 background:linear-gradient(122deg,#fff,#deefff 42%,#f9dcf7);
 box-shadow:inset 0 0 0 2px #ffffffa0,0 4px 13px #6481ad4c;
}
.collectible-room .draw-flip-all.g-button:focus-visible {outline:3px solid #3558a0;outline-offset:3px}
@media(max-width:760px) {
 .pack-room .manual-reveal-row {
  grid-template-columns:none;
  grid-auto-columns:min(87%,360px);
  grid-auto-flow:column;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scroll-snap-type:x proximity;
  padding-inline:14px;
  gap:12px;
 }
 .pack-room .manual-reveal-row > .reveal-slot{scroll-snap-align:center}
}
@media(prefers-reduced-motion:reduce) {
 .pack-room .manual-reveal-row.cards-arriving .reveal-slot {animation:none!important}
 .pack-room .manual-reveal-row .flip-shell.turn-over .flip-rotor,
 .pack-room .manual-reveal-row .flip-shell.turn-over .flip-face {animation:none!important;transform:none}
 .pack-room .manual-reveal-row .flip-shell.half-turn .flip-back {visibility:hidden}
 .pack-room .manual-reveal-row .flip-shell.half-turn .flip-front {visibility:visible}
}


/* While the outer blind-box rotor is moving, paint a flat sheet of the
   approved front. Its own interactive depth is enabled only after landing. */
.pack-room .manual-reveal-row .flip-front > .pop-reveal-card {
 transform-style:flat;
 isolation:isolate;
}
.pack-room .manual-reveal-row .flip-front :is(.pop-card,.pop-tilt,.pop-rotor,.pop-face,.pop-art-window) {
 transform-style:flat;
 transform:none;
 perspective:none;
 transition:none;
}
.pack-room .manual-reveal-row .flip-front .pop-face.back {visibility:hidden}
.pack-room .manual-reveal-row .flip-front .pop-face.front {backface-visibility:visible}
.pack-room .manual-reveal-row .flip-front .pop-pattern-shell {z-index:0}
.pack-room .manual-reveal-row .flip-front .pop-character-layer {z-index:2}
.pack-room .manual-reveal-row .flip-front .pop-name-sticker {z-index:3}
