/* 2026-10-25: shared game/editor base layout. Stored user offsets retain priority. */
.scene-shade{background:linear-gradient(90deg,#08030250,#080302a6),linear-gradient(0deg,#080302b3,transparent 65%)}
.game-canvas{inset:0;width:100%;height:100%;aspect-ratio:auto;transform:none}
.reel-machine{height:auto;aspect-ratio:16/9;overflow:visible}
.reel-window,.reel-dim{left:12.3%;top:22%;width:73.8%;height:69.1%}
.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;border:1px solid #b88b48;border-radius:7px;background:#170b07e8;overflow:visible}
.metric-card,.metric-card--bet,.metric-card--win{background:#170b07df;box-shadow:none;border:0;border-radius:5px;padding:3px 6px}
.metric-card span{color:#c9ac78;font-size:10px;line-height:1.2}
.metric-value{font-size:18px;line-height:1.2;color:#fff0bd}
.jackpot-bar{background:#1b0c08e6;border:1px solid #b88b4866;box-shadow:none;border-radius:5px;letter-spacing:0}
.result-panel{background:#160a06dc;border:1px solid #b88b4877;border-radius:7px;box-shadow:none;display:flex;justify-content:space-between;gap:8px;padding:4px 10px}
.result-panel span{text-align:left;font-size:11px!important}
.result-panel strong{font-size:23px!important;line-height:1;min-height:0}
.top-tools{display:block;inset:12px 16px auto;width:auto;height:40px;pointer-events:none}
.top-tools>*{pointer-events:auto}
.player-chip{position:absolute;left:100px;top:0;width:200px;height:36px;border:0;background:#140905b3;box-shadow:none;border-radius:8px}
.top-actions{position:absolute;right:0;top:0;width:auto;height:36px;gap:8px}
.top-actions .icon-button,#menu-button{width:36px;height:36px}
#menu-button{position:absolute;left:auto;right:88px;top:0}
.secondary-controls{display:contents}
.secondary-controls .text-button{position:absolute;margin:0;height:36px;font-size:11px;border-radius:8px;z-index:25;background:#1c0d08da;border:1px solid #aa8144;box-shadow:none;padding:0 8px}
#lobby-button{left:64px;top:12px;width:44px;overflow:hidden;font-size:0}
#lobby-button::after{content:'返回';font-size:11px}
#info-button{right:148px;top:12px;width:64px}
#wallet-button{display:none}
#gc-btn-menu{left:16px!important;top:12px!important;right:auto!important;bottom:auto!important;width:40px!important;height:36px!important;min-height:0!important;transform:none!important;border-radius:8px!important;padding:4px!important}
#gc-btn-menu .gc-bars{gap:3px!important}#gc-btn-menu .gc-bars span{height:2px!important;width:16px!important}#gc-btn-menu .gc-menu-label{font-size:8px!important;line-height:1!important;margin-top:1px!important}
#gc-cs-btn{right:16px!important;bottom:12px!important;min-height:30px!important;height:30px!important;width:66px!important;border-radius:8px!important;font-size:10px!important;padding:0 6px!important;flex-direction:row!important}
.controls{display:grid;justify-items:center;align-items:center;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr 44px}
.controls .game-button{position:relative;inset:auto;width:auto;height:100%;max-width:100%;aspect-ratio:1}
#spin-button{grid-area:1/1/2/3}#auto-button{grid-area:2/1}#turbo-button{grid-area:2/2}
#bet-minus,#bet-plus{position:fixed;width:38px;height:38px;max-width:none}
.game-canvas .game-button-label{font-size:12px}.game-canvas .spin-button-label{font-size:22px}
@media(orientation:landscape){
.game-stage{--machine-w:min(70vw,calc((100dvh - 140px)*1.7777778));--machine-x:calc((73vw - var(--machine-w))/2);--machine-y:84px}
.reel-machine{left:var(--machine-x);top:var(--machine-y);width:var(--machine-w)}
.metrics{left:calc(var(--machine-x) + var(--machine-w)*.123);top:calc(var(--machine-y) - 33px);width:calc(var(--machine-w)*.738);height:34px}
.metric-card--bet{position:fixed;left:auto;right:calc(3vw + 42px);top:27%;width:calc(23vw - 84px);height:40px;border:1px solid #b88b4877}
.metric-card--bet .metric-value{font-size:16px}
#bet-minus{left:auto;right:calc(26vw - 38px);top:calc(27% + 1px)}#bet-plus{left:auto;right:3vw;top:calc(27% + 1px)}
.jackpot-bar{left:calc(var(--machine-x) + var(--machine-w)*.123);top:calc(var(--machine-y) + var(--machine-w)*.5625 - 9px);width:calc(var(--machine-w)*.738);height:24px;font-size:11px;gap:6px}
.result-panel{left:calc(var(--machine-x) + var(--machine-w)*.123);right:auto;top:calc(var(--machine-y) + var(--machine-w)*.5625 + 17px);width:calc(var(--machine-w)*.738);height:32px}
.controls{left:auto;right:3vw;top:43%;width:23vw;height:43%;grid-template-rows:minmax(0,1fr) 40px}
.free-status{left:auto;right:3vw;top:88%;width:23vw;height:22px;font-size:9px}
}
@media(orientation:portrait){
.game-stage{--machine-w:100vw;--machine-x:0px;--machine-y:calc(40dvh - 28.125vw)}
.top-tools{inset:max(14px,env(safe-area-inset-top)) 12px auto;height:76px}
#gc-btn-menu{left:12px!important;top:14px!important}
#lobby-button{left:60px;top:14px}
.player-chip{left:96px;right:0;width:auto;height:36px}
#menu-button{top:44px;right:88px}
.top-actions{top:44px}
#info-button{top:58px;right:144px;height:36px}
.reel-machine{left:0;top:var(--machine-y);width:100%;height:auto;aspect-ratio:16/9}
.metrics{left:12.3%;top:calc(var(--machine-y) - 38px);width:73.8%;height:38px}
.metric-card--bet{position:fixed;right:calc(12vw + 44px);top:72%;width:calc(76vw - 88px);height:44px;border:1px solid #b88b4877}
#bet-minus{left:12vw;right:auto;top:calc(72% + 3px)}#bet-plus{left:auto;right:12vw;top:calc(72% + 3px)}
.jackpot-bar{left:12.3%;top:calc(var(--machine-y) + 56.25vw - 7px);width:73.8%;height:26px;font-size:11px;gap:6px}
.result-panel{left:12.3%;right:auto;top:calc(var(--machine-y) + 56.25vw + 21px);width:73.8%;height:38px}
.controls{left:16%;right:auto;top:79%;width:68%;height:16%;grid-template-rows:1fr;grid-template-columns:1fr 1.6fr 1fr;gap:10px}
#auto-button{grid-area:1/1;height:44px}#spin-button{grid-area:1/2;max-height:88px}#turbo-button{grid-area:1/3;height:44px}
.free-status{left:12.3%;right:auto;top:65%;width:73.8%;height:24px;font-size:10px}
}
@media(orientation:landscape) and (max-height:340px){.top-tools{top:7px}#lobby-button,#info-button{top:7px}#gc-btn-menu{top:7px!important}.metric-value{font-size:15px}.metrics{height:29px;top:calc(var(--machine-y) - 28px)}.result-panel{height:26px}.result-panel strong{font-size:18px!important}.player-chip{width:170px}}

@media(orientation:landscape) and (max-height:340px){.game-stage{--machine-y:74px;--machine-w:min(70vw,calc((100dvh - 124px)*1.7777778))}.jackpot-bar{height:20px}.result-panel{top:calc(var(--machine-y) + var(--machine-w)*.5625 + 13px)}}
