/* #236 (owner, 2026-11-15): a screen shorter than the window sits in the middle of the space between the top bar and the
   bottom (the bottom dock on a phone, the footer on a desktop), instead of at the top with empty space below.
   One rule for every screen: the screen area is a full-height flex column with an empty spacer above and below the
   screen. The spacers share the free space and shrink to nothing when the screen is taller than the window, so a long
   screen starts at the top and scrolls as before, and nothing is cut off. The screen keeps its own width (the spacers
   are pseudo-elements; the screen itself is not given auto margins).
   A match is the exception: its turn card must not jump while a turn plays (a result line, the keyboard, a reaction),
   so app.js places it once per turn (placeTurn: the middle of the free space at the start of the turn, kept until the
   next turn or the Quiz question) through --turn-top. Loaded just before safe-area.css (which stays last, #148). */
.shell{display:flex;flex-direction:column;min-height:100dvh}
.shell>.content{flex:1 0 auto;display:flex;flex-direction:column;min-height:0}
.shell>.content>*{flex:none}
.shell>.content::before,.shell>.content::after{content:"";flex:1 1 0;min-height:0}
.shell>.content:has(>.live-game-page)::before,.shell>.content:has(>.live-game-page)::after{content:none}
.shell>.content>.live-game-page{margin-top:var(--turn-top,0px)}
/* #254: a phone keeps 78 px at the bottom for the navigation dock, but a match shows no dock, so the free space was 78 px
   short and the card sat high (or did not move down at all). In a match only the home-indicator inset is kept. */
@media(max-width:600px){.shell:has(>.content>.live-game-page){padding-bottom:env(safe-area-inset-bottom,0px)}
 .shell>.content>.game-page.live-game-page{padding-bottom:16px!important}} /* its 50 px bottom padding was room for that dock */

/* Offline Classic: the setup screen the same way (the match itself keeps its place) */
.offline-root:has(>.offline-setup){display:flex;flex-direction:column}
.offline-root:has(>.offline-setup)::before,.offline-root:has(>.offline-setup)::after{content:"";flex:1 1 0;min-height:0}
.offline-root>.offline-setup{flex:none}
/* The screens' bottom padding (60 px on a phone, 75 px on a desktop) was larger than the top one (14–40 px), which lifted
   a centred screen above the middle; the phone's bottom dock already has its own space (.shell's padding). So a screen
   ends with about the room it starts with. The lobby keeps its own: it makes room for the fixed ready/kick-off bar. */
.shell>.content>.page:not(.lobby-page){padding-bottom:24px}
@media(min-width:601px){.shell>.content>.page:not(.lobby-page){padding-bottom:40px}}
