/* U4 (#16): one shared layout frame for tablet and desktop widths.
   The header, every screen and the footer use the same outer width and left edge: a frame of at most
   --frame px, centred, with at least --gutter px on each side. Form-like screens keep a narrower
   column centred inside the frame. The space beside the frame shows the existing page background.
   Loaded last so it wins over the older layers. Phone widths (600 px and below) are untouched. */
@media (min-width:601px){
 :root{--frame:1280px;--gutter:clamp(24px,3.2vw,40px);--column:740px;--frame-inline:max(var(--gutter),calc((100% - var(--frame))/2))}

 /* Header, content and footer are siblings inside .shell, so the same percentage gives the same edge. */
 .topbar.app-topbar,.app-topbar.topbar{padding-left:var(--frame-inline);padding-right:var(--frame-inline)}
 .shell>.content{max-width:none;margin:0;padding-left:var(--frame-inline);padding-right:var(--frame-inline)}
 .shell>.footer{max-width:none;margin:0;padding-left:var(--frame-inline);padding-right:var(--frame-inline)}

 /* Every screen fills the frame: no own width cap, no own side margin or side padding. */
 .content>.app-home,.content>.home-stage,.content>.page,.content>.lobby-page,.content>.profile-page,
 .content>.game-page,.content>.live-game-page,.content>.results-page{max-width:none;margin-left:0;margin-right:0;padding-left:0!important;padding-right:0!important}

 /* Form-like screens: a narrower column centred inside the frame. */
 .content>.page.narrow{padding-left:max(0px,calc((100% - var(--column))/2))!important;padding-right:max(0px,calc((100% - var(--column))/2))!important}

 /* One vertical rhythm: every screen starts the same distance below the header. */
 .content>.page,.content>.lobby-page,.content>.profile-page,.content>.game-page,.content>.live-game-page{padding-top:40px}

 /* Offline Classic (/offline.html): the same frame. */
 .offline-header{padding-left:var(--frame-inline);padding-right:var(--frame-inline)}
 .offline-root{width:auto;margin:0;padding-left:var(--frame-inline);padding-right:var(--frame-inline)}
 .offline-intro:before{left:calc(-1*var(--gutter));right:calc(-1*var(--gutter))}
}
