#arena:fullscreen,#arena.expanded-arena{position:fixed;inset:0;z-index:100;width:100%;height:100dvh;margin:0;padding:8px 12px;background:#050900;display:grid;grid-template-rows:minmax(0,1fr) auto auto;align-items:center;box-sizing:border-box}
#arena:fullscreen .pitch-wrap,#arena.expanded-arena .pitch-wrap{width:min(100%,calc((100dvh - 66px)*16/11));max-height:100%;margin:auto}
#arena:fullscreen .toolbar,#arena.expanded-arena .toolbar{padding:6px 0;margin:0;justify-content:center}
#arena:fullscreen .toolbar>span,#arena.expanded-arena .toolbar>span{display:none}
#fullscreen{white-space:nowrap}#arena .toolbar div{flex-wrap:wrap;justify-content:flex-end}
@media(pointer:coarse){#arena:fullscreen .pitch-wrap,#arena.expanded-arena .pitch-wrap{width:min(100%,calc((100dvh - 128px)*16/11))}}
@media(max-height:500px){#arena:fullscreen,#arena.expanded-arena{padding:3px 8px}#arena:fullscreen .toolbar button,#arena.expanded-arena .toolbar button{padding:3px 8px;font-size:10px}#fullscreen{font-size:10px}}
html:fullscreen,html.expanded-game{background:#050900;overflow:auto;width:100%;height:100dvh}html.expanded-game{position:fixed;inset:0;z-index:99}#globalFullscreen{white-space:nowrap;font-size:13px;padding:7px 12px}header{flex-wrap:wrap}
html:fullscreen #arena:not([hidden]),html.expanded-game #arena:not([hidden]){position:fixed;inset:0;z-index:100;width:100%;height:100dvh;margin:0;padding:8px 12px;background:#050900;display:grid;grid-template-rows:minmax(0,1fr) auto auto;align-items:center;box-sizing:border-box}
html:fullscreen #arena .pitch-wrap,html.expanded-game #arena .pitch-wrap{width:min(100%,calc((100dvh - 66px)*16/11));max-height:100%;margin:auto}
html:fullscreen #arena .toolbar,html.expanded-game #arena .toolbar{padding:6px 0;margin:0;justify-content:center}html:fullscreen #arena .toolbar>span,html.expanded-game #arena .toolbar>span{display:none}
@media(pointer:coarse){html:fullscreen #arena .pitch-wrap,html.expanded-game #arena .pitch-wrap{width:min(100%,calc((100dvh - 128px)*16/11))}}
/* Match options occupy the upper corner; the score stays in the lower strip. */
#arena .match-top-actions{position:absolute;top:8px;right:8px;z-index:6;display:flex;align-items:flex-start;gap:6px;max-width:calc(100% - 16px);font-family:Arial,sans-serif}
#arena .match-top-actions .hud-buttons{position:static;display:flex;gap:6px;margin:0;padding:0}
#arena .match-top-actions .hud-buttons button,#arena .match-top-actions summary{display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:2px solid #f1efde;border-radius:50%;font-size:24px;line-height:1;background:#18251ee8;color:#fff;cursor:pointer;box-sizing:border-box;touch-action:manipulation}
#arena .match-top-actions #substitute{width:64px;font-size:14px;border-radius:24px}
#arena .match-top-actions summary{list-style:none;font-size:25px}
#arena .match-top-actions summary::-webkit-details-marker{display:none}
#arena .match-top-actions summary:focus-visible{outline:3px solid #ffe14c;outline-offset:2px}
#arena .match-top-actions #matchOptions[open]>summary{background:#b63d16}
#arena .match-top-actions .toolbar{position:absolute;top:52px;right:0;bottom:auto;left:auto;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;width:min(280px,calc(100vw - 32px));height:auto;max-height:min(420px,calc(100dvh - 76px));overflow:auto;margin:0;padding:10px;gap:8px;border:1px solid #8c9877;border-radius:12px;background:#101c13f5;box-shadow:0 6px 20px #0008;font-size:12px;box-sizing:border-box}
#arena .match-top-actions details:not([open])>.toolbar{display:none}
#arena .match-top-actions .toolbar>span{display:none}
#arena .match-top-actions .toolbar>div{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start!important;gap:7px}
#arena .match-top-actions .toolbar button{min-height:44px;padding:7px 12px;font-size:13px;white-space:normal}
#arena .match-top-actions #fps{text-align:center}
@media(pointer:coarse){#arena .match-top-actions{top:max(6px,env(safe-area-inset-top));right:max(6px,env(safe-area-inset-right))}#arena .match-top-actions #debug,#arena .match-top-actions #fps{display:none}}
