/* Keep the existing Games Fruit and sticky controls; isolate its scene. */
body.etti-game-fullscreen *{visibility:hidden!important;}
body.etti-game-fullscreen :is(.game-stage-expanded,.game-stage-expanded *,.trinbago-scene,.trinbago-scene *){visibility:visible!important;}
body.etti-game-fullscreen .game-stage-ancestor{transform:none!important;filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;contain:none!important;perspective:none!important;will-change:auto!important;overflow:visible!important;content-visibility:visible!important;}
body.etti-game-fullscreen :is(#composer-collapse-btn,#composer,#etti-notifications){display:none!important;}
#games-panel.game-stage-expanded{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;transform:none!important;z-index:10000!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;}
#games-panel.game-stage-expanded.hidden{display:none!important;}
#games-panel.game-stage-expanded > :is(.mw-chrome,.settings-header){display:flex!important;position:relative!important;inset:auto!important;flex:0 0 auto!important;flex-wrap:wrap!important;width:100%!important;box-sizing:border-box;margin:0!important;gap:5px;padding:6px max(10px,env(safe-area-inset-right)) 6px max(10px,env(safe-area-inset-left))!important;}
#games-panel.game-stage-expanded > header .actions{display:flex;flex-wrap:wrap;min-width:0;max-width:100%;gap:4px;}
#games-panel .game-stage-tools{display:flex;position:static;inset:auto;flex-wrap:wrap;align-items:center;gap:5px;min-width:0;max-width:100%;margin:0;pointer-events:auto;}
#games-panel .game-selector-chip{padding:0;border:0;background:transparent;box-shadow:none;max-width:100%;min-width:0;}
#games-panel .game-selector-chip select{max-width:min(200px,45vw);}
#games-panel .game-stage-tools > button{width:auto;min-width:32px;min-height:32px;font-size:.8rem;padding:5px 8px;}
#games-panel.game-stage-expanded #games-body{padding:8px;box-sizing:border-box;flex:1 1 0;min-height:0;overflow:hidden;}
#games-panel.game-stage-expanded .games-shell{min-height:0;height:100%;}
#games-panel .ttt-board-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr));gap:12px;width:100%;min-width:0;box-sizing:border-box;}
#games-panel .ttt-board-list .multi-ttt{display:contents;}
#games-panel .ttt-board-list :is(.ttt-board-tile,.multi-ttt > div){min-width:0;max-width:100%;box-sizing:border-box;}
#games-panel .ttt-board-list h4{margin:2px 0 5px;font-size:.85rem;line-height:1.2;}
#games-panel .ttt-board-list p{margin:5px 0 0;font-size:.75rem;line-height:1.2;}
#games-panel .ttt-board-list .ttt-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));width:100%!important;height:auto!important;aspect-ratio:1;max-width:100%;box-sizing:border-box;}
#games-panel .ttt-board-list .ttt-cell{min-width:0;min-height:0;aspect-ratio:1;padding:0;}
#games-panel .ttt-board-list[data-layout=vertical]{display:flex;flex-direction:column;align-items:center;overflow:auto;}
#games-panel .ttt-board-list[data-layout=horizontal]{display:flex;flex-direction:row;align-items:flex-start;overflow:auto;}
#games-panel .ttt-board-list:not([data-layout=grid]) :is(.ttt-board-tile,.multi-ttt > div){flex:0 0 auto;width:var(--ttt-fit-size,min(300px,100%));}
#games-panel .ttt-board-list[data-fit=true]:not([data-layout=grid]){overflow:hidden;}
#games-panel.game-stage-expanded .game-play-area:has(> .ttt-board-list){display:block;overflow:auto;}
#games-panel.game-stage-expanded .ttt-board-list{height:100%;align-content:start;}
#games-panel.game-stage-expanded .ttt-board-list[data-layout=grid]{grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr));overflow:auto;}
#games-panel.game-stage-expanded .ttt-board-list[data-layout=vertical][data-fit=true]{justify-content:center;}
#games-panel.game-stage-expanded .ttt-board-list[data-layout=horizontal][data-fit=true]{align-items:center;justify-content:center;}
#games-panel.game-stage-expanded > :is(.mw-chrome,.settings-header){height:auto!important;min-height:44px!important;max-height:none!important;overflow:visible!important;align-items:center!important;}
#games-panel.game-stage-expanded > header > :is(h2,h3,strong){flex:0 1 auto!important;width:auto!important;min-height:0!important;max-height:none!important;white-space:normal!important;}
#games-panel.game-stage-expanded > header .actions{flex:1 1 260px!important;height:auto!important;max-height:none!important;overflow:visible!important;}
#games-panel .ttt-board-list[data-fit=true]:not([data-layout=grid]) :is(h4,p){white-space:nowrap;text-align:center;}
