/* v91 runtime performance pass.
 * Keep the visual layout and game rules intact while removing post-processing
 * that forces mobile browsers to re-filter a continuously changing game frame.
 */
.gamewrap>canvas#game,
.gamewrap>canvas#worldGL{
  filter:none!important;
  -webkit-filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  box-shadow:none!important;
}
.gamewrap{contain:paint}

/* Backdrop blur over a 60 fps game canvas is expensive on mobile because the
 * browser must sample the changing pixels behind every overlay each frame. */
body[data-phase="placement"] #phaseBanner,
body[data-phase="placement"] #controlsHint,
body[data-phase="countdown"] #phaseBanner,
body[data-phase="countdown"] #controlsHint,
body[data-phase="run"] #phaseBanner,
body[data-phase="run"] #controlsHint,
body[data-phase="scoring"] #phaseBanner,
body[data-phase="gameover"] #phaseBanner,
body[data-phase="placement"] #app header,
body[data-phase="countdown"] #app header,
body[data-phase="run"] #app header,
body[data-phase="scoring"] #app header,
body[data-phase="gameover"] #app header,
.touchUI[data-phase="placement"] #mobile button,
.touchUI[data-phase="run"] #mobile button,
.touchUI[data-phase="countdown"] #mobile button,
.touchUI[data-phase="placement"] #mobile .moveTrack,
.touchUI[data-phase="run"] #mobile .moveTrack,
.touchUI[data-phase="countdown"] #mobile .moveTrack{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

/* Avoid transition/compositing work on the performance-only HUD. */
.perfHud{transition:none!important;contain:layout paint style}

/* Keep placement confirmation away from the right-hand jump/aim area.
   The parent still controls phase visibility and the original button keeps
   its pointer handler and disabled state. */
body.touchUI.touchPlacing #mobile .movementKeys{display:none!important}
body.touchUI.touchPlacing #mobile .placementKeys{
  position:fixed!important;
  right:max(12px,env(safe-area-inset-right))!important;
  bottom:max(12px,env(safe-area-inset-bottom))!important;
  left:auto!important;top:auto!important;
  display:flex!important;align-items:center;gap:8px!important;
}
body.touchUI #mobile .placementKeys #touchPlace{
  position:static!important;
  transform:none!important;
  width:64px!important;
  height:64px!important;
  margin:0!important;
  pointer-events:auto;
  touch-action:none;
}
body.touchUI #mobile .placementKeys #touchRotate{width:58px!important;height:58px!important}
