/* LEGEND BALL X1000 V9. Isolated review branch.
   1080x1920 scaled uniformly. Presentation values from Studio JSON only.
   No CSS positions/widths/heights for individual layers.
 */
/* Extend the existing artwork behind the fixed-ratio game stage.
   The reels/panels stay in their approved 9:16 safe frame while the
   atmospheric source image fills spare PWA/browser viewport space. */
.game.has-published-scene{
 background-color:#0b1026!important;
 background-image:url('/play/assets/legend-v10/background.webp')!important;
 background-position:center center!important;
 background-size:cover!important;
 background-repeat:no-repeat!important;
}
.game.has-published-scene > .legend-scene[data-ui-version="unified-v10"]{
 position:absolute!important;
 left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;
 width:min(100%,56.25dvh)!important;
 height:177.777777cqw!important;
 min-width:0!important;max-width:100%!important;
 margin:0!important;transform:translate(-50%,-50%)!important;
 transform-origin:center center!important;
 overflow:hidden!important;container-type:inline-size!important;
 isolation:isolate!important;background:transparent!important;
 /* Fade only the outermost scene pixels into the matching viewport art.
    All HUD controls stay opaque in the central 94%+ of the frame. */
 -webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 4%,#000 98%,transparent 100%)!important;
 mask-image:linear-gradient(to bottom,transparent 0%,#000 4%,#000 98%,transparent 100%)!important;
}
.legend-scene[data-ui-version="unified-v10"] .published-layer{
 border:0!important;border-radius:0!important;box-shadow:none!important;
 background:transparent!important;
}
.legend-scene[data-ui-version="unified-v10"] .published-layer.legend-art>img{
 width:100%!important;height:100%!important;
 object-fit:contain!important;mix-blend-mode:normal!important;
 filter:none!important;animation:none!important;
}
.legend-scene[data-ui-version="unified-v10"] .legend-art[data-layer="sky"] img{
 object-fit:cover!important;opacity:1!important;
}
.legend-scene[data-ui-version="unified-v10"] .legend-art[data-layer="guardian"],
.legend-scene[data-ui-version="unified-v10"] .legend-art[data-layer="dragon"],
.legend-scene[data-ui-version="unified-v10"] .legend-art[data-layer="logo"]{
 display:flex!important;visibility:visible!important;pointer-events:none!important;
 filter:none!important;animation:none!important;
}
.legend-scene[data-ui-version="unified-v10"] .live-grid{
 border:0!important;border-radius:0!important;
 background:#180a2a!important;box-shadow:none!important;
 isolation:isolate!important;
}
.legend-scene[data-ui-version="unified-v10"] #reels{
 width:100%!important;height:100%!important;
 border:0!important;border-radius:0!important;
 display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;
 background:#1b0a2c!important;overflow:hidden!important;gap:0!important;
}
.legend-scene[data-ui-version="unified-v10"] .reel-column{
 width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
}
.legend-scene[data-ui-version="unified-v10"] .tile{
 aspect-ratio:1/1!important;overflow:hidden!important;
 border-right:1px solid #d6aa7933!important;border-bottom:1px solid #af6c9930!important;
 background:radial-gradient(ellipse,#37104b,#180720 78%)!important;
}
.legend-scene[data-ui-version="unified-v10"] .tile .symbol{
 width:83%!important;height:83%!important;object-fit:contain!important;
 filter:drop-shadow(0 2px 3px #02030b5a)!important;
}
.legend-scene[data-ui-version="unified-v10"] .scatter-label{
 bottom:2%!important;font:900 1.65cqw/1 system-ui!important;
 white-space:nowrap!important;max-width:100%!important;overflow:hidden!important;
}
.legend-scene[data-ui-version="unified-v10"] .legend-winamount{
 flex-direction:column!important;gap:0!important;align-items:center!important;
 justify-content:center!important;overflow:hidden!important;
}
.legend-scene[data-ui-version="unified-v10"] .legend-winamount .legend-value-caption{
 display:block!important;font:950 2.45cqw/1.0 system-ui!important;
 color:#fff3c7!important;letter-spacing:.08em!important;
 margin:0!important;
}
.legend-scene[data-ui-version="unified-v10"] .legend-winamount #win{
 font:1000 6.2cqw/1.0 Georgia,serif!important;color:#ffe6a7!important;
 text-shadow:0 0 5px #ff9c4177!important;white-space:nowrap!important;
}
.legend-scene[data-ui-version="unified-v10"] .legend-copy[data-layer="bonuscopy"]{
 display:flex!important;align-items:center!important;justify-content:center!important;
 overflow:hidden!important;white-space:nowrap!important;
 font:900 2.7cqw/1.08 system-ui!important;color:#f9e2ba!important;
 letter-spacing:.02em!important;text-shadow:0 2px 3px #090215!important;
}
.legend-scene[data-ui-version="unified-v10"] .published-layer[data-layer="buybtn"],
.legend-scene[data-ui-version="unified-v10"] .published-layer[data-layer="antebtn"]{
 background:none!important;overflow:visible!important;pointer-events:auto!important;
}
.legend-scene[data-ui-version="unified-v10"] .feature{
 position:relative!important;inset:auto!important;width:100%!important;height:100%!important;
 border:0!important;border-radius:0!important;padding:0!important;margin:0!important;
 display:flex!important;align-items:center!important;justify-content:center!important;
 background:transparent!important;color:#fff0d1!important;box-shadow:none!important;
 text-align:center!important;overflow:visible!important;isolation:isolate!important;
}
.legend-scene[data-ui-version="unified-v10"] .feature:before{
 display:none!important;content:none!important;
}
.legend-scene[data-ui-version="unified-v10"] .feature:after{
 content:''!important;display:block!important;position:absolute!important;
 inset:0!important;border:0!important;z-index:0!important;
 background:var(--legend-panel) center/100% 100% no-repeat!important;
 pointer-events:none!important;filter:none!important;
}
.legend-scene[data-ui-version="unified-v10"] .feature>span{
 position:relative!important;z-index:2!important;width:77%!important;max-width:77%!important;
 min-width:0!important;margin:0!important;padding:0!important;
 display:flex!important;flex-direction:column!important;align-items:center!important;
 justify-content:center!important;gap:.45cqw!important;line-height:1.05!important;
 white-space:nowrap!important;overflow:hidden!important;
 font:950 2.5cqw/1.05 system-ui!important;color:#fff0c1!important;
 text-shadow:0 1px 4px #080416!important;
}
.legend-scene[data-ui-version="unified-v10"] .feature-buy strong{
 font:1000 4.3cqw/1 system-ui!important;
 color:#ffe6a0!important;display:block!important;margin:0!important;
 white-space:nowrap!important;max-width:100%!important;overflow:hidden!important;
}
.legend-scene[data-ui-version="unified-v10"] .feature-ante>span{
 display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
 grid-template-rows:auto auto!important;column-gap:1.1cqw!important;
 width:82%!important;max-width:82%!important;
 font:950 2.1cqw/1.06 system-ui!important;
}
.legend-scene[data-ui-version="unified-v10"] .feature-ante>span>b{
 font:1000 3.6cqw/1 system-ui!important;color:#fbe39c!important;
 white-space:nowrap!important;
}
.legend-scene[data-ui-version="unified-v10"] .feature-ante small{
 font:850 1.65cqw/1 system-ui!important;grid-column:1/-1!important;
 white-space:nowrap!important;margin:0!important;
}
.legend-scene[data-ui-version="unified-v10"] .feature-ante small b{color:#ffe2a1!important}
.legend-scene[data-ui-version="unified-v10"] .legend-credits,
.legend-scene[data-ui-version="unified-v10"] .legend-betlabel{
 flex-direction:column!important;align-items:center!important;justify-content:center!important;
 gap:.4cqw!important;overflow:hidden!important;padding:0!important;
}
.legend-scene[data-ui-version="unified-v10"] .legend-value-caption{
 font:950 2.3cqw/1.05 system-ui!important;letter-spacing:.035em!important;
 text-align:center!important;max-width:100%!important;white-space:nowrap!important;
}
.legend-scene[data-ui-version="unified-v10"] .legend-credits #credits,
.legend-scene[data-ui-version="unified-v10"] .legend-betlabel #betText{
 font:950 4cqw/1.06 system-ui!important;white-space:nowrap!important;
 max-width:100%!important;min-width:0!important;overflow:hidden!important;
 color:#fff0b7!important;text-align:center!important;
}
.legend-scene[data-ui-version="unified-v10"] .legend-master-control{
 background:transparent!important;isolation:isolate!important;
 border:0!important;overflow:visible!important;pointer-events:auto!important;
}
.legend-scene[data-ui-version="unified-v10"] .legend-master-control-image{
 display:block!important;position:absolute!important;inset:0!important;
 width:100%!important;height:100%!important;object-fit:contain!important;
 pointer-events:none!important;z-index:0!important;
 filter:none!important;
}
.legend-scene[data-ui-version="unified-v10"] .legend-master-control button.round{
 position:relative!important;z-index:1!important;width:100%!important;height:100%!important;
 min-width:0!important;min-height:0!important;border:0!important;
 background:transparent!important;box-shadow:none!important;
 border-radius:0!important;font-size:0!important;color:transparent!important;
 clip-path:none!important;
}
.legend-scene[data-ui-version="unified-v10"] .legend-master-control button.round > small,
.legend-scene[data-ui-version="unified-v10"] .legend-master-control button.round > i,
.legend-scene[data-ui-version="unified-v10"] .legend-master-control button.round > span{
 position:absolute!important;width:1px!important;height:1px!important;
 overflow:hidden!important;clip-path:inset(50%)!important;
 white-space:nowrap!important;padding:0!important;margin:0!important;
}
.legend-scene[data-ui-version="unified-v10"] .legend-master-control button.round::before,
.legend-scene[data-ui-version="unified-v10"] .legend-master-control button.round::after{
 display:none!important;content:none!important;
}
.legend-scene[data-ui-version="unified-v10"] #spin{
 width:100%!important;height:100%!important;background:transparent!important;
 padding:0!important;margin:0!important;border:0!important;
 border-radius:0!important;box-shadow:none!important;filter:none!important;
}
.legend-scene[data-ui-version="unified-v10"] #spin .spin-frame{
 width:100%!important;height:100%!important;display:block!important;
 object-fit:contain!important;opacity:1!important;
 filter:none!important;animation:none!important;
}
.legend-scene[data-ui-version="unified-v10"] .published-layer[data-layer="spinbutton"]::before,
.legend-scene[data-ui-version="unified-v10"] .published-layer[data-layer="spinbutton"]::after{
 display:none!important;content:none!important;
}
.legend-scene[data-ui-version="unified-v10"] .legend-copy[data-layer="provider"]{
 display:flex!important;align-items:center!important;justify-content:center!important;
 font:800 1.9cqw/1 system-ui!important;white-space:nowrap!important;
 overflow:hidden!important;color:#f9dfc0!important;letter-spacing:.12em!important;
}
.legend-scene[data-ui-version="unified-v10"] button svg{
 display:none!important;
}
.legend-scene[data-ui-version="unified-v10"] button:focus-visible{
 outline:2px solid #78deff!important;outline-offset:2px!important;
}
@media(prefers-reduced-motion:reduce){
 .legend-scene[data-ui-version="unified-v10"] *{animation:none!important;transition:none!important}
}

/* Preserve the locked approved splash composition unchanged. This rule is
   isolated from gameplay and does not override Studio layer geometry. */
#bootSplash{
 position:fixed!important;inset:0!important;width:100%!important;height:100%!important;
 background-color:#050711!important;
 background-image:url('/play/assets/legend-master/splash-master.jpg')!important;
 background-size:cover!important;background-position:center center!important;
 background-repeat:no-repeat!important;isolation:isolate!important;overflow:hidden!important;
}
#bootSplash .splash-art,
#bootSplash .splash-shade,
#bootSplash .splash-title,
#bootSplash .splash-logo-text,
#bootSplash .boot-progress,
#bootSplash .splash-footer>small,
#bootSplash .splash-play-icon,
#bootSplash .splash-play-label,
#bootSplash noscript{display:none!important}
#bootSplash .splash-footer{
 position:static!important;inset:auto!important;width:auto!important;height:auto!important;
 padding:0!important;margin:0!important;display:block!important;background:none!important;
 border:0!important;box-shadow:none!important;transform:none!important;pointer-events:none!important;
}
#bootSplash #bootPlay{
 display:block!important;position:absolute!important;left:10.5%!important;top:79.3%!important;
 width:79%!important;height:15.6%!important;max-width:none!important;margin:0!important;padding:0!important;
 background:transparent!important;border:0!important;color:transparent!important;
 opacity:0!important;filter:none!important;outline:0!important;box-shadow:none!important;
 z-index:9!important;pointer-events:auto!important;
 cursor:pointer!important;touch-action:manipulation!important;
}
#bootSplash #bootPlay:disabled{cursor:progress!important;pointer-events:none!important}
#bootSplash #bootPlay:not(:disabled):focus-visible{
 opacity:1!important;outline:3px solid #a9f6ff!important;outline-offset:3px!important;border-radius:30px!important;
}
#bootSplash #bootRetry{
 position:absolute!important;z-index:12!important;top:85%!important;left:20%!important;
 width:60%!important;background:#39122b!important;color:#ffe5a8!important;
 border:2px solid #ffd476!important;border-radius:20px!important;min-height:60px!important;
 pointer-events:auto!important;
}
#bootSplash #bootStatus{
 position:absolute!important;z-index:12!important;top:73%!important;left:7%!important;
 width:86%!important;color:#fff6d7!important;display:none!important;
 font:700 14px/1.45 system-ui,sans-serif!important;text-shadow:0 3px 8px #080312!important;
}
html[data-boot="error"] #bootSplash #bootStatus{display:block!important;}

/* V10 source artwork, bounded motion and physical touch areas. */
.legend-scene[data-ui-version="unified-v10"] .legend-motion-source{position:absolute;inset:0;width:100%;height:100%;opacity:.001;pointer-events:none}
.legend-scene[data-ui-version="unified-v10"] .legend-motion{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none}
.legend-scene[data-ui-version="unified-v10"] .legend-motion.ready{opacity:1}
/* A playing character replaces its poster; stacking both creates a second jaw
   or hair outline when the video pose moves. Pausing restores the clean WebP. */
.legend-scene[data-ui-version="unified-v10"] .legend-art:has(> .legend-motion.ready) > img{visibility:hidden!important}
.legend-scene[data-ui-version="unified-v10"] [data-layer="spinbutton"] .legend-motion{inset:-15%;width:130%;height:130%;z-index:0;mix-blend-mode:screen;mask-image:radial-gradient(circle,#000 42%,transparent 70%)}
.legend-scene[data-ui-version="unified-v10"] #spin{position:relative!important;z-index:1!important}
.legend-scene[data-ui-version="unified-v10"] [data-layer="thunder"]{animation:storm-pulse 5s ease-in-out infinite!important;pointer-events:none}
.legend-scene[data-ui-version="unified-v10"] .legend-art{pointer-events:none}
.legend-scene[data-ui-version="unified-v10"] .tile .symbol{width:100%!important;height:100%!important;filter:none!important}
.legend-scene[data-ui-version="unified-v10"] .tile{border:1px solid #e5ac6744!important;border-radius:2px!important}
.legend-scene[data-ui-version="unified-v10"] .orb-num{font:950 5.1cqw/1 system-ui!important;background:#091730dd;padding:.3cqw .6cqw;border-radius:.7cqw;color:#ffeaba!important;text-shadow:0 1px 2px #000!important}
.legend-scene[data-ui-version="unified-v10"] .scatter-label{display:none!important}
.legend-scene[data-ui-version="unified-v10"] .symbol-tier{position:absolute;right:3%;top:3%;font:800 1.3cqw/1.2 system-ui;background:#120a22e8;color:#ffe5a0;padding:.2cqw .3cqw;border-radius:.3cqw}
.legend-scene[data-ui-version="unified-v10"] #spin:active{scale:.96}
.legend-scene[data-ui-version="unified-v10"] button{touch-action:manipulation}
.legend-scene[data-ui-version="unified-v10"] #reels{gap:0!important}
@keyframes storm-pulse{0%,42%,49%,100%{filter:brightness(.85)}45%,51%{filter:brightness(1.35)}}
@media(prefers-reduced-motion:reduce){.legend-scene[data-ui-version="unified-v10"] *{animation:none!important;translate:none!important}.legend-motion{display:none!important}}

/* V12 uses the approved empty HUD frames with live DOM values. */
.legend-scene[data-layout-version="12"] :is([data-layer="winbanner"],[data-layer="creditpanel"],[data-layer="betpanel"],[data-layer="lavaground"]) > img{
 object-fit:fill!important;
}
.legend-scene[data-layout-version="12"] .legend-winamount .legend-value-caption{display:none!important}
.legend-scene[data-layout-version="12"] [data-layer="lavaground"]{
 mask-image:linear-gradient(to bottom,transparent,#000 35%);pointer-events:none!important;
}
.legend-scene[data-layout-version="12"] [data-layer="reelframe"] > img{visibility:hidden!important}
.legend-scene[data-layout-version="12"] [data-layer="reelframe"]::before{
 content:'';position:absolute;inset:0;box-sizing:border-box;
 border-style:solid;border-width:var(--reel-border-width);
 border-image:var(--reel-border-image) 56 80 fill stretch;
 pointer-events:none;
}
.legend-scene[data-layout-version="12"] :is([data-layer="minusbtn"],[data-layer="plusbtn"]) button.round{
 position:relative!important;display:grid!important;place-items:center!important;
 width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
 padding:0!important;margin:0!important;clip-path:none!important;
 border:0!important;border-radius:0!important;
 background:transparent!important;
 box-shadow:none!important;color:#ffe6a0!important;
 font:500 6cqw/1 system-ui!important;
}
.legend-scene[data-layout-version="12"] :is([data-layer="minusbtn"],[data-layer="plusbtn"]) button.round::before{display:none!important;content:none!important}
.legend-scene[data-layout-version="12"] :is([data-layer="minusbtn"],[data-layer="plusbtn"]) button.round::after{
 position:static!important;display:block!important;background:none!important;
 width:auto!important;height:auto!important;transform:none!important;
 border:0!important;box-shadow:none!important;font:inherit!important;color:inherit!important;
}
.legend-scene[data-layout-version="12"] #minus::after{content:'−'!important}
.legend-scene[data-layout-version="12"] #plus::after{content:'+'!important}

/* Normalize the approved HUD skins to the same visible border rectangle.
   The source WebPs have different transparent margins; retain the original
   images and glow while mapping each solid frame into its Studio layer. */
.legend-scene[data-layout-version="12"] [data-layer="buybtn"]{--panel-x:-2.477477%;--panel-y:-19.634703%;--panel-w:105.855856%;--panel-h:128.767123%}
.legend-scene[data-layout-version="12"] [data-layer="antebtn"]{--panel-x:-2.127660%;--panel-y:-8.571429%;--panel-w:105.263158%;--panel-h:120%}
.legend-scene[data-layout-version="12"] [data-layer="creditpanel"]{--panel-x:-4.513889%;--panel-y:-11.979167%;--panel-w:108.796296%;--panel-h:126.041667%}
.legend-scene[data-layout-version="12"] [data-layer="betpanel"]{--panel-x:-4.667445%;--panel-y:-7.526882%;--panel-w:109.684947%;--panel-h:121.505376%}
.legend-scene[data-layout-version="12"] :is([data-layer="buybtn"],[data-layer="antebtn"]) .feature::after,
.legend-scene[data-layout-version="12"] :is([data-layer="creditpanel"],[data-layer="betpanel"]) > img{
 position:absolute!important;inset:auto!important;
 left:var(--panel-x)!important;top:var(--panel-y)!important;
 width:var(--panel-w)!important;height:var(--panel-h)!important;
 max-width:none!important;max-height:none!important;object-fit:fill!important;
}
.legend-scene[data-layout-version="12"] .feature{
 min-height:0!important;max-height:100%!important;box-sizing:border-box!important;
}
.legend-scene[data-layout-version="12"] .feature > span{
 width:76%!important;max-width:76%!important;max-height:76%!important;
 gap:.2cqw!important;font-size:2.15cqw!important;line-height:1!important;
}
.legend-scene[data-layout-version="12"] .feature-buy strong{
 font-size:3.5cqw!important;line-height:1!important;
}
.legend-scene[data-layout-version="12"] .feature-ante > span{
 width:76%!important;max-width:76%!important;
 grid-template-columns:minmax(0,1fr) auto!important;
 column-gap:1cqw!important;row-gap:.4cqw!important;
 font-size:2cqw!important;line-height:1!important;
}
.legend-scene[data-layout-version="12"] .feature-ante > span > b{font-size:3.5cqw!important;line-height:1!important}
.legend-scene[data-layout-version="12"] .feature-ante small{font-size:1.5cqw!important;line-height:1!important}
.legend-scene[data-layout-version="12"] :is(.legend-credits,.legend-betlabel){gap:.2cqw!important}
.legend-scene[data-layout-version="12"] :is(.legend-credits,.legend-betlabel) .legend-value-caption{font-size:2.15cqw!important;line-height:1!important}
.legend-scene[data-layout-version="12"] :is(.legend-credits #credits,.legend-betlabel #betText){font-size:3.5cqw!important;line-height:1!important}
/* The enlarged sprite has a transparent top margin. Keep its touch target
   below the HUD without changing the 30% larger rendered image. */
.legend-scene[data-layout-version="12"] #spin{
 position:absolute!important;left:0!important;top:15%!important;height:85%!important;
}
.legend-scene[data-layout-version="12"] #spin .spin-frame{
 position:absolute!important;left:0!important;top:-17.647059%!important;
 width:100%!important;height:117.647059%!important;max-height:none!important;pointer-events:none!important;
}
/* Spin movement stays sharp; neither blur nor speed-streak overlays are used. */
.legend-scene[data-layout-version="12"] .reels.rolling .tile .symbol{filter:none!important}
.legend-scene[data-layout-version="12"] .reels.rolling .reel-column::after{display:none!important;content:none!important;animation:none!important}

/* Mobile/standalone/PWA safe frames.
   The approved 864x1536 splash JPEG contains its logo and ENTER artwork.
   Keep the entire image visible within the usable safe viewport, while
   retaining a dimmed full-bleed backdrop outside the safe image frame. */
@media (max-width:960px){
 #bootSplash{
  height:var(--sg-pwa-full-height,100dvh)!important;
  min-height:var(--sg-pwa-full-height,100dvh)!important;
  max-height:var(--sg-pwa-full-height,100dvh)!important;
  background-image:none!important;background-color:#050711!important;
  --legend-safe-top:var(--legend-test-safe-top,env(safe-area-inset-top,0px));
  --legend-safe-bottom:var(--legend-test-safe-bottom,env(safe-area-inset-bottom,0px));
  --legend-device-height:var(--sg-pwa-full-height,100dvh);
  --legend-frame-width:min(
   calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)),
   calc((var(--legend-device-height) - var(--legend-safe-top) - var(--legend-safe-bottom) - 20px) * 0.5625)
  );
  --legend-safe-center-y:calc(50% + (var(--legend-safe-top) - var(--legend-safe-bottom)) / 2);
  --legend-safe-center-x:calc(50% + (env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)) / 2);
 }
 #bootSplash::after{
  content:"";position:absolute;inset:-30px;z-index:0;
  background:url('/play/assets/legend-master/splash-master.jpg') center/cover no-repeat;
  filter:blur(24px) brightness(.45);pointer-events:none;
 }
 #bootSplash::before{
  content:"";position:absolute;z-index:1;pointer-events:none;
  left:var(--legend-safe-center-x);top:var(--legend-safe-center-y);
  width:var(--legend-frame-width);height:auto;aspect-ratio:9/16;
  transform:translate(-50%,-50%);
  background:url('/play/assets/legend-master/splash-master.jpg') center/100% 100% no-repeat;
 }
 #bootSplash .splash-footer{
  position:absolute!important;inset:auto!important;
  left:var(--legend-safe-center-x)!important;top:var(--legend-safe-center-y)!important;
  width:var(--legend-frame-width)!important;height:auto!important;
  aspect-ratio:9/16!important;max-width:none!important;max-height:none!important;
  transform:translate(-50%,-50%)!important;z-index:8!important;
  pointer-events:none!important;
 }
 #bootSplash #bootPlay{
  left:10.5%!important;top:79.3%!important;width:79%!important;height:15.6%!important;
 }
 .game.has-published-scene{
  /* Keep existing illustrated backdrop visible above/below the safe-area stage. */
  --legend-safe-top:var(--legend-test-safe-top,env(safe-area-inset-top,0px));
  --legend-safe-bottom:var(--legend-test-safe-bottom,env(safe-area-inset-bottom,0px));
  --legend-device-height:var(--sg-pwa-full-height,100dvh);
  --legend-game-width:min(
   100%,
   calc((var(--legend-device-height) - var(--legend-safe-top) - var(--legend-safe-bottom) - 20px) * 0.5625)
  );
  --legend-safe-center-y:calc(50% + (var(--legend-safe-top) - var(--legend-safe-bottom)) / 2);
 }
 .game.has-published-scene > .legend-scene[data-ui-version="unified-v10"]{
  left:50%!important;top:var(--legend-safe-center-y)!important;
  width:var(--legend-game-width)!important;height:auto!important;aspect-ratio:9/16!important;
  transform:translate(-50%,-50%)!important;
 }
}


/* Landscape browsers retain the portrait game instead of clipping a
   desktop-width 9:16 stage below the short viewport. */
@media (max-width:960px) and (orientation:landscape){
 html,body{
  width:100%!important;height:100dvh!important;min-height:100dvh!important;
  margin:0!important;overflow:hidden!important;
 }
 body{
  display:flex!important;align-items:center!important;justify-content:center!important;
  padding:0!important;
 }
 .game{
  width:min(100vw,calc((100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)) * 0.5625))!important;
  max-width:none!important;height:auto!important;min-height:0!important;
  aspect-ratio:9/16!important;flex:none!important;box-shadow:none!important;
 }
}
