/* Stable play surface: no global zoom lock, no body position:fixed. */
html,body{max-width:100%;min-height:0;overflow-x:hidden;overscroll-behavior:none}
@supports(overflow:clip){html,body{overflow-x:clip}}
main,.cabinet,.machine-stage{min-width:0;overflow-anchor:none}
.cabinet{touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.machine-stage,.control-deck,.jackpot-banner,.awakening-strip,#insertion-status{touch-action:none}
.machine-stage{contain:layout paint;overflow:hidden}
#scene,#aim{touch-action:none}
.cabinet button,.cabinet select{touch-action:none}
.bet-control select{font-size:16px}
#aim{height:32px;background:linear-gradient(#070410,#070410) center/100% 6px no-repeat;border:0;box-shadow:none}
.aim-control label{margin-bottom:0}
dialog{touch-action:auto;user-select:text;-webkit-user-select:text;overscroll-behavior:contain;overflow:auto;-webkit-overflow-scrolling:touch}
dialog button{touch-action:manipulation}
dialog::backdrop{backdrop-filter:none}
#insertion-status,#insertion-status:empty{display:block;flex:0 0 18px;height:18px;min-height:18px;line-height:18px;padding:0 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#insertion-status:empty{visibility:hidden}
body[data-signal] .machine-stage{animation:none!important;transform:none!important}
.slot-reach .slot-screen{transform:translateX(-50%);transition:none}
.slot-screen,.slot-grid,.slot-column{contain:layout paint}
.slot-cell .symbol-mark{position:relative}
.slot-cell .yona-symbol{display:none;position:absolute;inset:0;margin:auto}
.slot-cell[data-symbol=yona] .yona-symbol{display:block}
.slot-cell[data-symbol=yona] .slot-sprite{visibility:hidden}
.slot-cell .slot-sprite,.slot-cell .yona-symbol{filter:none!important}
.slot-column.rolling .symbol-mark{animation:none!important;filter:none}
.slot-column.rolling .slot-sprite,.slot-column.rolling .yona-symbol{will-change:transform}
.slot-column.stopped{animation:none}
.slot-column.stopped .symbol-mark{animation:medal-reel-settle .16s ease-out}
@keyframes medal-reel-settle{50%{transform:translateY(2px)}to{transform:translateY(0)}}
#slot-lines{contain:strict}
#reward-overlay,#kurun,#cinematic{max-width:100%;box-sizing:border-box;overflow:hidden;contain:layout paint;overflow-anchor:none}
.reward-object{transition:transform .35s,opacity .2s}
#reward-overlay[data-phase=glow] .reward-object,#reward-overlay[data-phase=reveal] .reward-object{box-shadow:none}
#reward-art .slot-sprite,.reward-yona.awake{filter:none!important}
#fever-fill{width:100%!important;transform:scaleX(0);transform-origin:left;transition:transform .35s}
@media(max-width:650px){
 header{height:calc(44px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 8px 0;gap:5px;box-sizing:border-box}
 header .logo{display:none}header .balances{margin-left:0;flex:1;min-width:0;gap:7px}
 header .balance b,header .yona-wallet b{font-size:16px;min-width:0}
 header .balance small,header .yona-wallet small{font-size:10px}
 header .icon-button{min-width:30px;padding:4px;font-size:11px}
 main{height:calc(100svh - 44px - env(safe-area-inset-top));min-height:0;padding:32px 8px calc(8px + env(safe-area-inset-bottom));box-sizing:border-box}
 .cabinet{height:100%;min-height:0}
 .jackpot-banner{flex:0 0 63px;min-height:63px;padding:5px 20px}
 .machine-stage{min-height:0;flex:1 1 0;--rig-height:clamp(170px,29svh,250px)}
 .rig-chassis{height:var(--rig-height)}
 .orbit-rack{top:2px;height:calc(var(--rig-height)*.59)}
 .orbit-unit[data-stage="1"]{top:calc(var(--rig-height)*.34);height:calc(var(--rig-height)*.24)}
 .orbit-unit[data-stage="2"]{top:calc(var(--rig-height)*.28);height:calc(var(--rig-height)*.26)}
 .orbit-unit[data-stage="3"]{top:0;height:calc(var(--rig-height)*.36)}
 #chance-zone,body[data-chance] #chance-zone{top:calc(var(--rig-height)*.445);width:86px;height:82px;left:calc(50% - 43px)}
 .chamber-moon{width:54px;height:54px;top:9px}
 #chance-zone .chance-eyes{inset:29px 16px auto}
 #companion{top:calc(var(--rig-height)*.69);height:calc(var(--rig-height)*.27)}
 .slot-screen{top:calc(var(--rig-height)*.755);height:calc(var(--rig-height)*.26);width:150px;max-width:42%}
 .slot-screen .slot-grid{height:auto;min-height:0}
 .slot-caption{flex:0 0 8px}
 .win-meter{top:calc(var(--rig-height)*.80)}
 .reward-port{top:calc(var(--rig-height)*.72)}
 .field-header{top:calc(var(--rig-height)*.99);height:12px}
 #scene{top:calc(var(--rig-height)*1.035);bottom:0}
 .control-deck{flex:0 0 72px;min-height:72px;gap:7px;padding:5px 8px;grid-template-columns:minmax(58px,1fr) 44px minmax(100px,1.5fr) 46px}
 .insert{min-height:50px}.bet-control select{width:42px;height:42px;font-size:16px}#auto{width:44px;height:44px}
 .machine-status{display:none}
 .awakening-strip{flex:0 0 14px;height:14px;min-height:14px}
 #kurun,#kurun[data-phase=roll],#kurun[data-phase=land],#kurun[data-phase=result]{height:min(310px,90%);max-height:100%}
 #kurun-canvas{height:auto;max-height:75%;width:min(100%,300px);aspect-ratio:1.2}
 #reward-overlay{gap:6px;padding:8px}.reward-object{width:140px;height:140px;flex-shrink:1;min-height:70px}
 #reward-title{font-size:23px}#reward-detail{font-size:14px;line-height:1.4}
}
/* At very short / enlarged viewports keep controls readable instead of clipping them. */
@media(max-width:650px) and (max-height:560px){main{height:760px}}
@media(prefers-reduced-motion:reduce){.slot-column.stopped .symbol-mark{animation:none!important}}
