/* VG-451: safe-area geometry shared by HUD, menus and touch input. Overrides are test-only CSS hooks. */
:root {
  --ga-safe-top:env(safe-area-inset-top, 0px);
  --ga-safe-right:env(safe-area-inset-right, 0px);
  --ga-safe-bottom:env(safe-area-inset-bottom, 0px);
  --ga-safe-left:env(safe-area-inset-left, 0px);
}
body .ga-hud,body .ga-screen,body .ga-vs,body .ga-scoreboard {
  inset:var(--ga-safe-top) var(--ga-safe-right) var(--ga-safe-bottom) var(--ga-safe-left);
}
body .ga-screen,body .ga-vs,body .ga-scoreboard {box-sizing:border-box;padding:8px;overscroll-behavior:contain}
.ga-screen .ga-panel,.ga-vs .ga-vs-panel,.ga-scoreboard .ga-scoreboard-panel {max-width:100%;min-width:0}
.ga-screen button,.ga-screen select,.ga-screen input,.ga-hud button {min-width:44px;min-height:44px;box-sizing:border-box}
.ga-screen .ga-modifier {min-height:44px;align-content:center}
.ga-screen .ga-modifier input {width:44px;height:44px;margin:0;vertical-align:middle}
.ga-screen select {max-width:100%}
/* World tags use viewport projection coordinates, independently of the inset HUD frame. */
.ga-hud .ga-tags {position:fixed;inset:0}
.ga-hud .ga-tag-self .ga-tag-bar {border-color:white}
.ga-hud .ga-tag-self .ga-tag-fill {box-shadow:none}
.ga-hud .ga-touch-pause {position:absolute;top:66px;right:18px;display:grid;place-items:center;width:44px;height:44px;
  border:3px solid #1c1a24;border-radius:12px;background:linear-gradient(#3a3646,#22202b);color:white;
  box-shadow:0 4px 0 #0d0c1288;pointer-events:auto;cursor:pointer;touch-action:manipulation}
.ga-touch-pause::before {content:"";box-sizing:border-box;width:14px;height:18px;border-inline:5px solid currentColor}
.ga-hud .ga-touch-pause[hidden] {display:none}
.ga-touch-pause:focus-visible {outline:3px solid white;outline-offset:2px}
.ga-hud .ga-speaker {width:44px;height:44px;padding:0;pointer-events:auto;cursor:pointer;color:inherit}
body .ga-announcer {
  top:calc(var(--ga-safe-top) + 80px);
  left:calc(var(--ga-safe-left) + (100vw - var(--ga-safe-left) - var(--ga-safe-right))/2);
  max-width:calc(100vw - var(--ga-safe-left) - var(--ga-safe-right) - 16px);
  box-sizing:border-box;white-space:normal;text-align:center;
}
body .ga-touch-pad {bottom:calc(var(--ga-safe-bottom) + 24px)}
body .ga-touch-left {left:calc(var(--ga-safe-left) + 24px)}
body .ga-touch-right {right:calc(var(--ga-safe-right) + 24px)}
/* VG-725: the MOVE zone starts 24 px in from the left edge, where iPad Safari's swipe-back begins (a match also holds
   a history guard entry, menu-nav.js); the ring itself already rests 24 px in and its centre is clamped 94 px in. */
body .ga-touch-zone {
  left:calc(var(--ga-safe-left) + 24px);bottom:var(--ga-safe-bottom);
  width:calc((100vw - var(--ga-safe-left) - var(--ga-safe-right))/2 - 24px);
  height:calc((100dvh - var(--ga-safe-top) - var(--ga-safe-bottom))*.6);
}
/* Keep scrolling menu content clipped to its safe frame, including short landscape screens. */
@media(max-width:600px) {
  .ga-hud .ga-score {left:calc(50% - 22px)}
  .ga-hud .ga-team {min-width:96px;padding:0 6px;gap:4px}
  .ga-hud .ga-clock {min-width:54px}
  .ga-hud .ga-speaker {right:4px;top:8px}
  .ga-hud .ga-touch-pause {right:4px;top:58px}
  body .ga-announcer {
    top:calc(var(--ga-safe-top) + 120px);left:calc(var(--ga-safe-left) + 90px);transform:none;
    max-width:calc(100vw - var(--ga-safe-left) - var(--ga-safe-right) - 98px);
  }
  .ga-screen .ga-panel {padding:22px 16px}
}
@media(max-height:500px) and (min-width:601px) {
  .ga-hud .ga-minimap {width:72px;height:120px}
  .ga-hud .ga-ring {left:calc(50% + 196px);width:56px;height:56px}
  .ga-hud .ga-super {right:184px;bottom:24px;width:88px;height:88px}
  .ga-hud .ga-super.ga-dash {bottom:124px;width:76px;height:76px;right:190px}
}
