/* G2: one root shell. No floating footer, no duplicated game navigation. */
html.rc12-g2-playing {--g2-bar:calc(42px + env(safe-area-inset-top,0px));--g2-preview:0px}
html.rc12-g2-playing.rc12-netlify-preview{--g2-preview:54px}
html.rc12-g2-playing body.arena-playing,html.rc12-g2-playing body.arena-playing .container{overscroll-behavior:none;overflow:hidden!important;touch-action:none}
html.rc12-g2-playing body.arena-playing #arenaMobileBar{
 display:flex!important;position:fixed!important;top:var(--arena-screen-top,0px)!important;left:var(--arena-screen-left,0px)!important;right:auto!important;
 width:var(--arena-screen-width,100vw)!important;height:var(--g2-bar)!important;z-index:1000!important;box-sizing:border-box;
 padding:env(safe-area-inset-top,0px) max(5px,env(safe-area-inset-right,0px)) 0 max(5px,env(safe-area-inset-left,0px))!important;
 gap:3px;background:#101a29!important;border-bottom:1px solid #ffffff18;pointer-events:auto!important;box-shadow:none;
}
html.rc12-g2-playing body.arena-playing #arenaMobileBar #arenaMobileTitle{font:600 12px/1.15 system-ui,sans-serif;letter-spacing:.01em;min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e7eef6}
html.rc12-g2-playing body.arena-playing #arenaMobileBar button{
 box-sizing:border-box;flex:0 0 40px!important;width:40px!important;min-width:40px!important;height:38px!important;min-height:38px!important;
 font:600 19px/1 system-ui,sans-serif;padding:0!important;border:1px solid #ffffff18;border-radius:9px;background:#24364a;color:#f4f7fb;touch-action:none!important;
}
html.rc12-g2-playing body.arena-playing #arenaMobileBar button:active{background:#42627f}
html.rc12-g2-playing body.arena-playing #arenaMobileBar button[hidden],html.rc12-g2-playing body.arena-playing #arenaRotateHint{display:none!important}
html.rc12-g2-playing body.arena-playing .container .game-view.active,
html.rc12-g2-playing body.arena-playing .container .game-view.active.rc12-scene,
html.rc12-g2-playing body.arena-playing .container .game-view.active.premium-active,
html.rc12-g2-playing body.arena-playing .container .game-view.active.rc12-board-a3,
html.rc12-g2-playing body.arena-playing .container .game-view.active:has(.v9-stage,.v8-stage){
 position:absolute!important;inset:var(--g2-bar) 0 calc(env(safe-area-inset-bottom,0px) + var(--g2-preview))!important;
 height:auto!important;width:auto!important;min-height:0!important;max-height:none!important;margin:0!important;border:0!important;box-sizing:border-box;
}
html.rc12-g2-playing body.arena-playing #turnBanner,html.rc12-g2-playing body.arena-playing #arenaFullNotice,
html.rc12-g2-playing body.arena-playing .game-view.active>.game-header,
html.rc12-g2-playing body.arena-playing .game-view.active .v8-exit{display:none!important}
html.rc12-g2-playing body.arena-playing .game-view.active.premium-active{padding:0!important;gap:0!important}
html.rc12-g2-playing body.arena-playing .game-view.active.premium-active iframe{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}
html.rc12-g2-playing body.arena-playing .game-view.active:not(.premium-active) :is(.v9-hud,.v8-stage-caption){top:4px!important;max-height:64px;overflow:auto;font-size:11px;pointer-events:none}
html.rc12-g2-playing body.arena-playing .game-view.active:not(.premium-active) :is(.v9-hud,.v8-stage-caption) button{pointer-events:auto}
html.rc12-g2-playing body.arena-playing .game-view.active :is(.rc12-overlay,.v9-controls>.v9-act:not(#v9P2),.v9-controls>.v10-stick){bottom:clamp(8px,calc(var(--rc11-offset,56px) - 35px),64px)!important}
html.rc12-g2-playing body.arena-playing .game-view.active :is(.rc12-overlay.rc12-dual,.rc12-legacy-stage>.v8-control){top:max(36px,calc(var(--rc12-hud-height,28px) + 8px))!important;bottom:clamp(8px,calc(var(--rc11-offset,56px) - 35px),64px)!important}
html.rc12-g2-playing body.arena-playing .game-view.active :is(.rc12-overlay,.v9-controls,.v8-control) button{max-height:22dvh;min-height:min(var(--rc11-size,64px),22dvh)!important}
html.rc12-g2-playing body.arena-playing .game-view.active :is(.v9-controls,.v8-control,.rc12-overlay,.rc12-bound-control,.vox-act-btn,.v10-stick,canvas,iframe){touch-action:none!important;-webkit-user-select:none!important;user-select:none!important;-webkit-touch-callout:none!important}
html.rc12-g2-playing body.arena-playing .game-view.active .v9-controls:has(>.v10-stick)>.v9-pad{display:none!important}
html.rc12-g2-playing body.arena-playing .game-view.active .v9-controls>.v10-stick{display:block!important}
html.rc12-g2-playing[data-rc9-pad=transparent] body.arena-playing .game-view.active :is(.v9-controls,.v8-control,.rc12-overlay,.gta-pad,.mc-controls-grid){opacity:var(--rc11-opacity,.4)!important}
html.rc12-g2-playing[data-rc9-pad=invisible] body.arena-playing .game-view.active :is(.v9-controls,.v8-control,.rc12-overlay,.gta-pad,.mc-controls-grid){opacity:0!important}
html.rc12-g2-playing[data-rc9-pad=visible] body.arena-playing .game-view.active :is(.v9-controls,.v8-control,.rc12-overlay,.gta-pad,.mc-controls-grid){opacity:1!important}
html.rc12-g2-playing body.arena-playing #arenaPauseMenu{z-index:1100!important;padding: max(8px,env(safe-area-inset-top,0px)) max(8px,env(safe-area-inset-right,0px)) max(8px,env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px))}
html.rc12-g2-playing body.arena-playing #arenaPauseMenu section{max-height:100%;box-sizing:border-box;background:#111c2b;border:1px solid #ffffff30;border-radius:16px;padding:14px;gap:8px}
html.rc12-g2-playing body.arena-playing #arenaPauseMenu section button{min-height:44px}
html.rc12-g2-playing body.arena-playing #arenaPauseMenu section input{touch-action:pan-x}
@media(max-height:480px){html.rc12-g2-playing{--g2-bar:calc(40px + env(safe-area-inset-top,0px))}html.rc12-g2-playing.rc12-netlify-preview{--g2-preview:44px}html.rc12-g2-playing body.arena-playing #arenaMobileBar button{height:36px!important;min-height:36px!important}}

/* Opacity belongs to the control group, not each nested action. */
html.rc12-g2-playing body.arena-playing .game-view.active .v9-controls>*{opacity:1!important}
html.rc12-g2-playing body.arena-playing .game-view.active .v9-controls .v9-act button{opacity:1!important}
html.rc12-g2-playing body.arena-playing #arenaMobileBar #arenaPadBtn[data-mode=transparent]{background:#365166}
html.rc12-g2-playing body.arena-playing #arenaMobileBar #arenaPadBtn[data-mode=invisible]{background:#172334;color:#aab6c2}
html.rc12-g2-playing body.arena-playing .game-view.active .rc12-board-stage{touch-action:none!important}

/* G2 landscape and viewport corrections: one measured root rectangle. */
html.rc12-g2-playing body.arena-playing .container{position:fixed!important;top:var(--arena-screen-top,0px)!important;left:var(--arena-screen-left,0px)!important;right:auto!important;bottom:auto!important;width:var(--arena-screen-width,100vw)!important;height:var(--arena-screen-height,100dvh)!important;max-height:none!important;max-width:none!important}
html.rc12-g2-playing body.arena-playing .container .game-view.active.premium-active{inset:var(--g2-bar) env(safe-area-inset-right,0px) calc(env(safe-area-inset-bottom,0px) + var(--g2-preview)) env(safe-area-inset-left,0px)!important;min-width:0!important;min-height:0!important;max-width:none!important}
html.rc12-g2-playing body.arena-playing .container .game-view.active.premium-active iframe{max-width:none!important;max-height:none!important;min-height:0!important;min-width:0!important;border-radius:0!important}
html.rc12-g2-playing body.arena-playing .container .game-view.active.rc12-board-a3{padding:5px!important}
html.rc12-g2-playing body.arena-playing #arenaMobileBar button{flex:0 0 40px!important;min-width:40px!important;width:40px!important}
html.rc12-g2-playing body.arena-playing #arenaMobileBar #arenaMobileTitle{font-size:11px}
.g2-orient{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.g2-orient button[aria-pressed=true]{background:#345b74!important}
#g2OrientationHint{position:fixed;top:calc(var(--g2-bar,42px) + 4px);left:50%;transform:translateX(-50%);z-index:1200;max-width:90%;padding:6px 12px;background:#12263bea;color:white;border-radius:8px;font:12px system-ui;pointer-events:none}
#g2OrientationHint[hidden]{display:none}
@media(max-width:380px){html.rc12-g2-playing body.arena-playing #arenaMobileBar button{flex-basis:38px!important;min-width:38px!important;width:38px!important}html.rc12-g2-playing body.arena-playing #arenaMobileBar{gap:2px}}
html.rc12-g2-playing body.arena-playing :is(canvas,button,.v10-stick,.v9-controls,.rc12-overlay){-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:none}
html.rc12-g2-playing body.arena-playing #arenaPauseMenu :is(input,select){touch-action:auto!important}

.g2-result-actions{display:flex;gap:8px;margin-top:8px}.g2-result-actions button{flex:1;min-height:44px;border:1px solid #ffffff35;border-radius:10px;background:#253b51;color:white;font:600 14px system-ui;touch-action:none}

/* Do not multiply transparent alpha through nested control wrappers. */
html.rc12-g2-playing[data-rc9-pad] body.arena-playing .game-view.active.rc12-scene .v9-stage>.v9-controls>*{opacity:1!important}
html.rc12-g2-playing[data-rc9-pad] body.arena-playing .game-view.active.rc12-scene .v9-stage>.v9-controls .v9-act button{opacity:1!important}

/* G3: scene controls are anchored to their actual stage, not document height. */
html.rc12-g2-playing,html.rc12-g2-playing body{overscroll-behavior:none;overflow:hidden!important;touch-action:none!important}
html.rc12-g2-playing body.arena-playing .container .game-view.active{max-width:none!important;min-width:0!important;padding:0!important;transform:none!important}
html.rc12-g2-playing body.arena-playing #game-v9play[data-rc12-sport-input=court] .v9-controls{display:none!important}
html.rc12-g2-playing body.arena-playing #game-v9play[data-rc12-sport-input=court] #v9Mount,html.rc12-g2-playing body.arena-playing #game-v9play[data-rc12-sport-input=court] canvas{touch-action:none!important}
html.rc12-g2-playing body.arena-playing #game-v9play[data-rc9-drive=true] .v9-stage>.v9-controls{--g3-size:clamp(42px,var(--rc11-size,64px),min(76px,16vw,20dvh));--g3-edge:clamp(8px,var(--rc12-horizontal,12px),5vw);--g3-bottom:clamp(8px,calc(var(--rc11-offset,56px) - 40px),35px)}
html.rc12-g2-playing body.arena-playing #game-v9play[data-rc9-drive=true] .v9-controls>.v10-stick{position:absolute!important;left:var(--g3-edge)!important;right:auto!important;top:auto!important;bottom:var(--g3-bottom)!important;width:calc(var(--g3-size)*1.6)!important;height:calc(var(--g3-size)*1.6)!important;min-width:0!important;min-height:0!important;transform:none!important}
html.rc12-g2-playing body.arena-playing #game-v9play[data-rc9-drive=true] .v9-controls>.v9-act:not(#v9P2){position:absolute!important;left:auto!important;right:var(--g3-edge)!important;top:auto!important;bottom:var(--g3-bottom)!important;display:grid!important;grid-template-columns:repeat(2,var(--g3-size));gap:6px!important;max-width:none!important;transform:none!important}
html.rc12-g2-playing body.arena-playing #game-v9play[data-rc9-drive=true] .v9-act:not(#v9P2) button{width:var(--g3-size)!important;height:var(--g3-size)!important;min-width:0!important;min-height:0!important;max-height:none!important;padding:3px!important;white-space:normal!important;font-size:11px!important;line-height:1.1}
html.rc12-g2-playing body.arena-playing #game-v9play[data-rc9-drive=true] .v9-act:not(#v9P2) [data-key=w]{order:-2;background:#256c45}
html.rc12-g2-playing body.arena-playing #game-v9play[data-rc9-drive=true] .v9-act:not(#v9P2) [data-key=s]{order:-1;background:#9c3447}
html.rc12-g2-playing body.arena-playing #game-v9play[data-rc9-drive=true] #v9P2:not([hidden]){position:absolute!important;top:36px!important;bottom:auto!important;left:var(--g3-edge)!important;right:var(--g3-edge)!important;max-width:none!important}
html.rc12-g2-playing body.arena-playing #game-v9play[data-rc9-drive=true] #v9P2:not([hidden]) button{min-width:0!important;min-height:0!important;height:var(--g3-size)!important;width:var(--g3-size)!important;padding:3px!important;font-size:10px!important}
html.rc12-g2-playing.arena-full-active{--g2-bar:calc(40px + env(safe-area-inset-top,0px))}
html.rc12-g2-playing.arena-full-active body.arena-playing #arenaMobileTitle{display:none!important}
html.rc12-g2-playing.arena-full-active body.arena-playing #arenaMobileBar{justify-content:center}
html.rc12-g2-playing.arena-full-active body.arena-playing #arenaFullBtn{background:#2c6a82!important;border-color:#94d6e6!important}

/* Immersive fallback is visibly different from the ordinary toolbar. */
html.rc12-g2-playing.arena-full-active.rc12-g3-tools-collapsed{--g2-bar:env(safe-area-inset-top,0px)}
html.rc12-g2-playing.arena-full-active.rc12-g3-tools-collapsed body.arena-playing #arenaMobileBar{top:calc(var(--arena-screen-top,0px) + env(safe-area-inset-top,0px) + 3px)!important;left:auto!important;right:calc(env(safe-area-inset-right,0px) + 5px)!important;width:auto!important;height:34px!important;padding:0!important;gap:3px!important;background:transparent!important;border:0!important}
html.rc12-g2-playing.arena-full-active.rc12-g3-tools-collapsed body.arena-playing #arenaMobileBar>*:not(#arenaFullBtn):not(#arenaToolsBtn){display:none!important}
html.rc12-g2-playing.arena-full-active.rc12-g3-tools-collapsed body.arena-playing #arenaMobileBar button{height:34px!important;min-height:34px!important;width:38px!important;min-width:38px!important;flex-basis:38px!important;background:#14283cbb!important}
html.rc12-g2-playing.arena-full-active body.arena-playing #arenaToolsBtn{display:block!important}
