/* Saved reduced-HUD presentation. The restore control remains in every mode. */
#btnSandboxEndTurn {
  position: fixed;
  top: calc(94px + env(safe-area-inset-top));
  left: min(calc(50% + 180px), calc(100% - 44px));
  transform: translateX(-50%);
  min-height: 36px;
  z-index: 40;
  padding: 4px 8px;
  color: #fff6d7;
  background: #102331ed;
  border: 1px solid #7897a6;
  border-radius: 4px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  pointer-events: auto;
}
#btnSandboxEndTurn:disabled { opacity: .5; cursor: default; }
@media (orientation: landscape) and (max-height: 430px) {
  #btnSandboxEndTurn { top: calc(58px + env(safe-area-inset-top)); }
}
#btnHudPreference {
  position: absolute;
  z-index: 40;
  top: calc(124px + env(safe-area-inset-top));
  right: calc(8px + env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  padding: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: #fff6d7;
  background: #102331ed;
  border: 1px solid #7897a6;
  border-radius: 6px;
  font: inherit;
  font-size: 20px;
  line-height: 22px;
  pointer-events: auto;
  cursor: pointer;
}
#btnHudPreference small { font-size: 8px; line-height: 10px; font-weight: 800; }
#btnHudPreference:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

@media (max-width: 700px) {
  #btnHudPreference { top: calc(124px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); width: 36px; height: 36px; font-size: 18px; line-height: 19px; }
  #btnHudPreference small { font-size: 7px; line-height: 8px; }
}
@media (max-width: 430px) {
  #btnHudPreference { width: 36px; height: 36px; }
}
@media (orientation: landscape) and (max-height: 430px) {
  #btnHudPreference { top: calc(124px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); }
}

/* Hide corner roster tiles only; world-space names and match scores remain. */
body.hud-minimal #hudTop .squadStrip,
body.hud-minimal #hudNext,
body.hud-minimal #hintToast,
body.hud-minimal #aimHint,
body.hud-minimal #btnHelp,
body.hud-minimal #btnQuit,
body.hud-minimal #onboarding { display: none !important; }

/* Essential match information also stays visible during phone shot flight. */
body.hud-minimal.phoneActionCompact #hudTop .econ,
body.hud-minimal.phoneActionCompact #windBanner,
body.hud-minimal.phoneActionCompact #hudCenter { display: flex !important; }

body.hud-minimal #btnHudPreference { border-color: #f5d36e; box-shadow: 0 0 0 1px #f5d36e55; }
