/* Desktop-only polish; leave touch layouts unchanged. */
@media (pointer:fine) and (min-width:651px){
 html body .weight-game:is(.game-expanded,.game-immersive,:fullscreen).game-instructions-pending .game-retro-instructions{
  inset:0!important;transform:none!important;width:100%!important;height:100%!important;
  padding:72px 32px!important;display:flex!important;flex-direction:column!important;
  justify-content:center!important;align-items:center!important;gap:16px!important;
  text-align:center!important;font-size:clamp(16px,2.5vh,22px)!important;line-height:1.6!important;
 }
 html body .weight-game:is(.game-expanded,.game-immersive,:fullscreen).game-instructions-pending .game-retro-instructions>p{
  width:min(100%,680px)!important;max-width:680px!important;margin:0!important;flex:none!important;
 }
 html body .weight-game:is(.game-expanded,.game-immersive,:fullscreen).game-instructions-pending .game-retro-instructions>strong{
  font-size:clamp(22px,3.5vh,30px)!important;line-height:1.3!important;
 }
 html body .weight-game:is(.game-expanded,.game-immersive,:fullscreen).game-instructions-pending .game-instructions-start{
  position:static!important;inset:auto!important;transform:none!important;width:240px!important;
  max-width:100%!important;min-height:46px!important;margin:8px 0 0!important;flex:none!important;
 }
 html body .weight-game.runner-game .game-title-screen h3{
  position:absolute!important;inset:auto auto 84px 50%!important;transform:translateX(-50%)!important;
  display:block!important;width:max-content!important;height:auto!important;min-height:0!important;
  max-width:calc(100% - 32px)!important;margin:0!important;padding:5px 12px!important;
  font-size:clamp(18px,1.7vw,24px)!important;line-height:1.25!important;white-space:nowrap!important;
  flex:none!important;border-radius:5px!important;
 }
 html body .weight-game.runner-game .game-title-screen .game-title-start{
  position:absolute!important;inset:auto auto 24px 50%!important;transform:translateX(-50%)!important;
  width:220px!important;max-width:calc(100% - 32px)!important;min-height:44px!important;
  margin:0!important;padding:8px 16px!important;
 }
 @media(max-height:550px){
  html body .weight-game:is(.game-expanded,.game-immersive,:fullscreen).game-instructions-pending .game-retro-instructions{
   padding:60px 24px!important;gap:8px!important;font-size:15px!important;line-height:1.35!important;
  }
 }
}
/* Keep the instruction group centered despite game-specific RTL inset rules. */
@media (pointer:fine) and (min-width:651px){
 html body :is(#weight-game,#food-game,.runner-game).weight-game:is(.game-expanded,.game-immersive,:fullscreen).game-instructions-pending .game-retro-instructions{
  position:absolute!important;inset:0!important;inset-inline:0!important;transform:none!important;
  width:100%!important;max-width:none!important;margin:0!important;box-sizing:border-box!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
  text-align:center!important;padding-inline:32px!important;
 }
 html body :is(#weight-game,#food-game,.runner-game).weight-game:is(.game-expanded,.game-immersive,:fullscreen).game-instructions-pending .game-retro-instructions>:is(p,strong,.game-instructions-title,.game-instructions-start){
  position:static!important;inset:auto!important;transform:none!important;align-self:center!important;
  margin-inline:auto!important;text-align:center!important;box-sizing:border-box!important;
 }
 html body :is(#weight-game,#food-game,.runner-game).weight-game:is(.game-expanded,.game-immersive,:fullscreen).game-instructions-pending .game-retro-instructions>p{
  width:min(100%,680px)!important;max-width:680px!important;
 }
}

/* Reset both edges: the shared toolbar top offset otherwise stretches the title
   down to the runner's bottom anchor on desktop. */
@media (min-width:951px), (min-width:651px) and (pointer:fine){
 html body :is(#weight-game,#food-game,.runner-game,.weight-game).runner-game .game-title-screen h3{
  position:absolute!important;inset:auto auto 84px 50%!important;
  transform:translateX(-50%)!important;box-sizing:border-box!important;
  width:max-content!important;height:max-content!important;min-height:0!important;
  max-width:calc(100% - 32px)!important;max-height:none!important;
  margin:0!important;padding:5px 12px!important;display:block!important;
  font-size:clamp(18px,1.7vw,24px)!important;line-height:1.25!important;
  white-space:nowrap!important;flex:none!important;border-radius:5px!important;
 }
 html body :is(#weight-game,#food-game,.runner-game,.weight-game).runner-game .game-title-screen .game-title-start{
  position:absolute!important;inset:auto auto 24px 50%!important;transform:translateX(-50%)!important;
  box-sizing:border-box!important;width:220px!important;max-width:calc(100% - 32px)!important;
  min-height:44px!important;margin:0!important;padding:8px 16px!important;
 }
}

/* Lift the food result menu slightly, keeping it below the toolbar. */
@media (pointer:fine) and (min-width:651px){
 html body #food-game.weight-game.game-is-over .game-over-panel{
  inset:max(64px,calc(50% - 32px)) auto auto 50%!important;
  transform:translate(-50%,-50%)!important;
  max-height:calc(100% - 192px)!important;
 }
}
