/* #148: the app installed on an iPhone (Add to Home Screen) runs full screen with viewport-fit=cover and a
   black-translucent status bar, so the page starts under the status bar and the notch / Dynamic Island.
   The top bar grows by the top inset (its background runs behind the status bar, like a native app) and its
   buttons stay below it; in landscape the bar, the screens and the footer keep clear of the side insets.
   Loaded last. In a normal browser tab every inset is 0, so nothing changes there.
   Tests set --safe-top/--safe-left/--safe-right on :root to stand in for a phone's insets.
   #235 (owner, 2026-11-15): on the owner's iPhone the slim in-game bar's buttons sat right at the inset edge, under the
   clock and the Dynamic Island. --safe-top-pad is the inset plus a small gap (--safe-gap), and 0 when there is no
   inset (min() picks 0 because 0 × 1000 is 0), so a normal browser tab does not move. Everything at the top uses it. */
:root{--safe-top:env(safe-area-inset-top,0px);--safe-gap:6px;--safe-top-pad:min(calc(var(--safe-top) * 1000),calc(var(--safe-top) + var(--safe-gap)));--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px);
 --bar-side:11px;--bar-height:65px;--offline-side:clamp(14px,4vw,56px);--offline-height:80px}
@media(min-width:601px){:root{--bar-side:var(--frame-inline);--bar-height:76px;--offline-side:var(--frame-inline)}}
@media(max-width:530px){:root{--offline-height:66px}}

/* the game's top bar: same height and sides as before, plus the insets */
.topbar.app-topbar,.app-topbar.topbar{height:calc(var(--bar-height) + var(--safe-top-pad));padding-top:var(--safe-top-pad);
 padding-left:calc(var(--bar-side) + var(--safe-left));padding-right:calc(var(--bar-side) + var(--safe-right))}

/* landscape: the screens and the footer stay clear of the notch side (layout.css frame from 601 px) */
@media(min-width:601px){
 .shell>.content,.shell>.footer{padding-left:calc(var(--frame-inline) + var(--safe-left));padding-right:calc(var(--frame-inline) + var(--safe-right))}
}

/* Offline Classic has its own header */
.offline-header{height:calc(var(--offline-height) + var(--safe-top-pad));padding-top:var(--safe-top-pad);
 padding-left:calc(var(--offline-side) + var(--safe-left));padding-right:calc(var(--offline-side) + var(--safe-right))}

/* full-screen overlays keep their content below the status bar */
.report-overlay{padding-top:calc(20px + var(--safe-top-pad))}.install-shade{padding-top:var(--safe-top-pad)}
/* #254 (owner, 2026-11-15): on the owner's iPhone the buttons still looked sunk into the top edge. Every top bar keeps its
   buttons about 16 px below the inset: the 65/76 px bars centre them ~10 px down already, so 6 px more; the slim match
   header (44 px, #150) centres them only 2 px down, so it adds 14 px. With no inset both are 0, as before. */
.app-topbar.game-topbar{--safe-top-pad:min(calc(var(--safe-top) * 1000),calc(var(--safe-top) + 14px))}
/* messages pinned to the top of the screen (a nudge, an error) */
.flash-banner{top:calc(var(--safe-top-pad) + 10px)}
/* «Ποιος είναι;»: the guesses' column heads stick below the status bar, not under it */
.wi-heads{top:var(--safe-top-pad)}
