/* Keep the real game controls available while maximising the stage. The same
   state is used for browser fullscreen, mobile immersive and dialog fallback. */
body[data-sumo-fullscreen] {
 max-width: none;
 width: 100%;
 min-height: 100dvh;
 box-sizing: border-box;
}

body[data-sumo-fullscreen][data-view=arena] {
 display: flex;
 flex-direction: column;
 height: 100dvh;
 min-height: 100dvh;
 overflow: auto;
}
body[data-sumo-fullscreen][data-view=arena] > .sumo-header {flex: 0 0 auto;}
body[data-sumo-fullscreen][data-view=arena] > main {
 display: flex;
 flex: 1 1 auto;
 min-height: 0;
 min-width: 0;
 width: 100%;
 max-width: none;
}
body[data-sumo-fullscreen][data-view=arena] #arena-view {
 flex: 1 1 auto;
 width: 100%;
 min-height: 0;
 grid-template:
  "controls" auto
  "room" auto
  "stage" minmax(240px,1fr)
  / minmax(0,1fr);
}
body[data-sumo-fullscreen][data-view=arena][data-room-view="1"] #arena-view {
 grid-template:
  "room" auto
  "stage" minmax(240px,1fr)
  / minmax(0,1fr);
}
body[data-sumo-fullscreen][data-view=arena] #canvas-wrap {
 height: 100%;
 min-height: 0;
}
body[data-sumo-fullscreen][data-view=arena] :is(#arena-view > .rules,.arena-rules,footer) {display:none;}
body[data-sumo-fullscreen] #room-panel {overflow:auto;overscroll-behavior:contain;}
body[data-sumo-fullscreen] #sumo-fullscreen {min-width:36px;}
@media (orientation:landscape) and (min-width:700px) {
 body[data-sumo-fullscreen][data-view=arena] #arena-view {
  grid-template:
   "controls stage" minmax(0,1fr)
   "room stage" auto
   / clamp(205px,25vw,340px) minmax(0,1fr);
 }
 body[data-sumo-fullscreen][data-view=arena][data-room-view="1"] #arena-view {
  grid-template: "room stage" minmax(0,1fr) / clamp(205px,25vw,340px) minmax(0,1fr);
 }
 body[data-sumo-fullscreen][data-view=arena] #stage-panel > .controls {align-self:start;}
}
