/* A consistent physical foil wrapper across all supported TCG expansions. */
.physical-pack-surface[data-pack-material="physical"]{position:relative;display:block;width:100%;height:auto;aspect-ratio:1/var(--pack-aspect,1.8);isolation:isolate;transform-origin:50% 55%;transition:transform .22s ease-out;--pack-outline:polygon(1.4% .4%,98.7% 1.9%,99.1% 9%,98.8% 34%,99% 65%,99.3% 91%,99% 99%,1.2% 98.7%,.8% 91%,2% 69%,1.4% 34%,.6% 9%)}
.physical-pack-surface[data-pack-material="physical"]>img{display:block;width:100%;height:100%;object-fit:fill;clip-path:var(--pack-outline);border-radius:0;user-select:none;-webkit-user-drag:none}
.wrapper-panel>.physical-pack-surface,.carousel-pack>.physical-pack-surface{height:100%;aspect-ratio:auto}
.pack-mesh{position:absolute;inset:0;display:block;width:100%;height:100%;pointer-events:none;opacity:0}
.physical-pack-surface[data-mesh-ready="true"]>.pack-mesh{opacity:1}
.physical-pack-surface[data-mesh-ready="true"]>img,.physical-pack-surface[data-mesh-ready="true"]>.pack-reflections{opacity:0}
.pack-slot.hero>.physical-pack-surface[data-mesh-ready="true"],.cinematic-opening .wrapper:has([data-mesh-ready="true"]){transform:none}
.pack-reflections{position:absolute;inset:0;pointer-events:none;clip-path:var(--pack-outline);mask-image:var(--pack-cutout);mask-size:100% 100%;mask-repeat:no-repeat}
.pack-reflections>i{position:absolute;inset:0;pointer-events:none}
.pack-volume{background:linear-gradient(90deg,#02081360,transparent 5%,#fff2 8%,transparent 15%,transparent 78%,#02071338 94%,#fff4 97%,#02081370),linear-gradient(0deg,#02071320,transparent 16%,transparent 80%,#fff1);mix-blend-mode:multiply}
.pack-softbox{background:radial-gradient(ellipse at var(--pack-x,36%) var(--pack-y,30%),#fff3,transparent 56%),linear-gradient(108deg,transparent 35%,#fff1 43%,#fff4 48%,#fff1 52%,transparent 60%);background-size:100% 100%,240% 140%;background-position:center,var(--pack-x,36%) var(--pack-y,30%);mix-blend-mode:soft-light;opacity:.7}
.pack-seal-light{background:linear-gradient(105deg,transparent 15%,#e4f2ff22 34%,#fff9 46%,#e4f2ff11 59%,transparent 80%);background-size:230% 100%;background-position:var(--pack-x,36%) 50%;mask-image:linear-gradient(#000 0 9.5%,transparent 11% 90%,#000 92% 100%);mix-blend-mode:screen;opacity:.35}
.pack-slot.hero:has(.physical-pack-surface){width:218px;filter:drop-shadow(2px 3px 2px #0008) drop-shadow(14px 30px 22px #0009)}
.pack-slot.hero>.physical-pack-surface{height:auto;transform:perspective(950px) rotateX(var(--pack-pitch,0deg)) rotateY(var(--pack-yaw,-5deg)) rotateZ(-1deg)}
.pack-slot.hero>.physical-pack-surface[data-mesh-ready="true"]{transform:none}
.pack-slot.hero>.physical-pack-surface>img{height:auto}
.pack-slot:has(.physical-pack-surface) .sheen{display:none}
.carousel-pack>.physical-pack-surface{filter:drop-shadow(2px 3px 2px #0007)}
.carousel-pack:has(.physical-pack-surface)::after{display:none}
.cinematic-opening .wrapper:has([data-pack-material="physical"]){filter:drop-shadow(2px 4px 2px #0006) drop-shadow(12px 25px 22px #0007);transform:perspective(1000px) rotateX(var(--pack-pitch,0deg)) rotateY(var(--pack-yaw,0deg));transition:transform .2s ease-out}
.cinematic-opening .is-torn .wrapper:has([data-pack-material="physical"]){transform:none;transition:none}
.cinematic-opening .wrapper:has([data-mesh-ready="true"]){transform:none}
.physical-pack-surface[data-pack-photo="true"] .pack-softbox{opacity:.4}
.batch-opening-wrapper>.physical-pack-surface{width:auto;height:min(23dvh,180px);margin:auto}
/* Thumbnail cutouts use the same clean edge as the full-size surface. */
img[src*="base1-"][src$="-studio.webp"]{clip-path:polygon(1.4% .4%,98.7% 1.9%,99.1% 9%,98.8% 34%,99% 65%,99.3% 91%,99% 99%,1.2% 98.7%,.8% 91%,2% 69%,1.4% 34%,.6% 9%)}
@media(max-width:1150px){.pack-slot.hero:has(.physical-pack-surface){width:190px}}
@media(max-width:860px){.pack-slot.hero:has(.physical-pack-surface){width:min(190px,23vh,48vw)}}
@media(prefers-reduced-motion:reduce){.pack-slot.hero>.physical-pack-surface,.cinematic-opening .wrapper:has([data-pack-material="physical"]){transform:none;transition:none}}
:root[data-motion="reduced"] .pack-slot.hero>.physical-pack-surface,:root[data-motion="reduced"] .cinematic-opening .wrapper:has([data-pack-material="physical"]){transform:none;transition:none}
