/* The Three.js canvas is the physical scene; DOM text/actions stay accessible. */
.opening-scene{--pack-light:191,230,130;--pack-secondary:68,151,112;--pack-halo:.38;--pack-rim:.13}
.opening-scene[data-pack-tier="first-tee"]{--pack-light:147,215,160;--pack-secondary:67,125,85;--pack-halo:.2;--pack-rim:.06}
.opening-scene[data-pack-tier="clubhouse"]{--pack-light:193,237,101;--pack-secondary:84,170,134;--pack-halo:.4;--pack-rim:.12}
.opening-scene[data-pack-tier="tour"]{--pack-light:120,157,255;--pack-secondary:177,160,255;--pack-halo:.65;--pack-rim:.22}
.opening-scene[data-pack-tier="majors"]{--pack-light:244,205,120;--pack-secondary:168,138,227;--pack-halo:.9;--pack-rim:.35}
/* The fallback uses vector print and light only; it never enlarges a raster. */
.opening-scene:not(.has-3d-opening){background:radial-gradient(ellipse at 50% 61%,rgba(var(--pack-light),var(--pack-rim)),transparent 47%),#04090e}
.opening-scene:before{content:'';position:absolute;left:50%;top:56%;width:min(720px,115vw);height:min(680px,67vh);transform:translate(-50%,-50%);background:radial-gradient(ellipse at 47% 55%,rgba(var(--pack-light),.42),transparent 58%),radial-gradient(ellipse at 68% 31%,rgba(var(--pack-secondary),.2),transparent 46%);opacity:var(--pack-halo);pointer-events:none;z-index:0}
.opening-scene.ripping:before,.opening-scene.result:before{opacity:0}
.opening-scene .rip-hint{border-color:rgba(var(--pack-light),.58);background:rgba(var(--pack-light),.09);box-shadow:0 0 32px rgba(var(--pack-light),var(--pack-rim));color:#e9eddd;transition:background-color .2s,box-shadow .2s}
.opening-scene .rip-hint:hover{background:rgba(var(--pack-light),.17);box-shadow:0 0 44px rgba(var(--pack-light),var(--pack-rim))}
.opening-scene .rip-hint span{color:rgb(var(--pack-light))}
/* Browsing reflects the same progression, without changing the action colour. */
.theme-first-tee .stage-light{background:radial-gradient(ellipse at 50% 45%,#93d7a02b,transparent 65%)}
.theme-clubhouse .stage-light{background:radial-gradient(ellipse at 50% 45%,#c1ed6542,transparent 65%)}
.theme-tour .stage-light{background:radial-gradient(ellipse at 50% 45%,#789dff59,transparent 65%)}
.theme-majors .stage-light{background:radial-gradient(ellipse at 50% 45%,#f4cd7870,transparent 63%),radial-gradient(ellipse at 75% 35%,#a88ae32b,transparent 45%)}
.theme-first-tee .pack-object{filter:drop-shadow(0 18px 12px #02090499) drop-shadow(0 0 10px #93d7a00b)}
.theme-clubhouse .pack-object{filter:drop-shadow(0 18px 12px #02090499) drop-shadow(0 0 14px #c1ed6524)}
.theme-tour .pack-object{filter:drop-shadow(0 18px 12px #02090499) drop-shadow(0 0 19px #789dff45)}
.theme-majors .pack-object{filter:drop-shadow(0 18px 12px #02090499) drop-shadow(0 0 23px #f4cd7866)}
.opening-3d-layer{position:absolute;inset:0;z-index:1;overflow:hidden;pointer-events:none;opacity:0;transition:opacity .18s linear;background:#050c0c;contain:strict}
.opening-3d-layer.is-active{opacity:1}
.opening-3d-layer.is-preview{transition:none}
/* Preserve the native button, focus ring, keyboard action and generous hit
   area over the physical preview. Only its fallback artwork is concealed. */
.opening-scene.has-3d-preview .rip-pack{filter:none;transition:none;transform:rotate(-5deg)}
.opening-scene.has-3d-preview .rip-pack:hover{transform:rotate(-5deg)}
.opening-scene.has-3d-preview .rip-pack>img{opacity:0}
.opening-scene.has-3d-preview .rip-pack:before,.opening-scene.has-3d-preview .rip-pack .tear-strip,.opening-scene.has-3d-preview .rip-pack .tear-line{display:none}
/* The accessible fallback already has vector foil print. An unbounded moving
   pseudo-element would look like a detached white plane beside the packet. */
.opening-scene:not(.has-3d-opening) .rip-pack:before{display:none}
.opening-3d-canvas{display:block;width:100%;height:100%;pointer-events:none}
.opening-scene.has-3d-opening.ripping,.opening-scene.has-3d-opening.result{background:#050c0c}
.opening-scene.has-3d-opening.ripping .rip-pack{visibility:hidden!important;animation:none!important}
.opening-scene.has-3d-opening.ripping .reveal-rays,.opening-scene.has-3d-opening.ripping .energy-orb,.opening-scene.has-3d-opening.ripping #particles,.opening-scene.has-3d-opening.result .reveal-rays,.opening-scene.has-3d-opening.result .energy-orb,.opening-scene.has-3d-opening.result #particles{display:none!important}
.opening-scene.has-3d-opening.ripping:after,.opening-scene.has-3d-opening.result:after{display:none!important;animation:none!important}
.opening-scene.has-3d-opening .opening-copy,.opening-scene.has-3d-opening .rip-hint,.opening-scene.has-3d-opening .skip-button,.opening-scene.has-3d-opening .reveal-word,.opening-scene.has-3d-opening .result-content{z-index:7}
.opening-scene.has-3d-opening .reveal-word{font-family:var(--sans);font-size:clamp(25px,4.5vw,50px);font-weight:600;letter-spacing:-1px;text-shadow:0 2px 18px #0008}
.opening-scene.has-3d-opening .result-content{isolation:isolate}
.opening-scene.has-3d-opening.show-word .reveal-word{animation:three-word-in .45s both;filter:none;opacity:1!important}
@keyframes three-word-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.opening-3d-layer{display:none}}
