/* The document owns page scrolling; the game retains its immersive viewport. */
html{scrollbar-gutter:stable;scrollbar-color:var(--control-line,#9b9388) var(--frost,#f7f2e8);scroll-padding-top:calc(var(--site-header-height,88px) + 20px)}
body{overflow:visible}
body .app{height:auto;min-height:100dvh;grid-template-rows:auto minmax(0,1fr)}
body .app>.header{position:sticky;top:0;align-self:start;z-index:15}
body .app>.content{height:auto;max-height:none;min-height:0;overflow:visible;scrollbar-gutter:auto;overscroll-behavior:auto}
body .content>#game,body .content .page-view{height:auto;min-height:0}
body .content>#game{min-height:calc(100dvh - var(--site-header-height,88px))}
#library-collection{scroll-margin-top:calc(var(--site-header-height,88px) + 20px)}
body.legal-page .legal-header{position:sticky;top:0;z-index:15;background:var(--frost,#f7f2e8)}
body.legal-page :is(.document-summary,.document-faq-grid>.document-hero){top:calc(var(--site-header-height,88px) + 20px)}
html:has(body.arcade-open){overflow:hidden;scrollbar-gutter:auto}
html.has-site-modal{overflow:hidden;scrollbar-gutter:auto}
body.arcade-open .app>.header{z-index:10}
/* Full-viewport modal supplies one scroll surface on short screens. */
body dialog.auth-screen{position:fixed;inset:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;min-height:0;margin:0;padding:24px;box-sizing:border-box;border:0;background:transparent;color:#171717;overflow:auto;overscroll-behavior:contain;align-items:safe center;justify-items:center}
dialog.auth-screen::backdrop{background:#17171db3;backdrop-filter:blur(3px)}
body .auth-screen .auth-card{width:min(960px,100%);max-width:960px;min-height:0;flex:none;align-items:stretch;border-radius:24px;box-shadow:7px 7px 0 #ff5472}
.auth-dialog-bar{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;padding:10px 18px;background:#fffaf2;border-bottom:2px solid #171717}
body .auth-dialog-bar .auth-back{display:flex;align-items:center;gap:9px;min-height:40px;padding:6px 8px;border:0;background:none;font-weight:750;font-size:.8125rem;color:#171717;cursor:pointer}
body .auth-dialog-bar .dialog-close{position:static;width:40px;height:40px;min-height:40px;padding:0;border:0;border-radius:50%;background:#f0e8da;color:#171717;font-size:25px;line-height:1;box-shadow:none}
body .auth-screen .auth-story{padding:28px;justify-content:space-between}
body .auth-screen .auth-form-panel{padding:22px 30px;min-width:0}
body .auth-screen .auth-story h2{font-size:clamp(64px,7vw,88px)}
body .auth-screen .signup-tooltip{max-width:100%;z-index:5}
body dialog#account-dialog{inset:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;margin:0;border:0;box-sizing:border-box;color:var(--ink)}
dialog#account-dialog::backdrop{background:#17171d66}
@media(max-width:700px){
 body dialog.auth-screen{padding:12px 12px 18px}
 body .auth-screen .auth-card{grid-template-columns:1fr;border-radius:20px;box-shadow:4px 4px 0 #ff5472}
 body .auth-screen .auth-story{display:none}
 body .auth-screen .auth-form-panel{padding:18px}
 .auth-dialog-bar{padding:6px 10px}
}
@media(max-height:740px) and (min-width:701px){
 body dialog.auth-screen{padding:14px}
 body .auth-screen .auth-form-panel{padding:14px 24px}
 body .auth-screen .auth-form-heading h1{margin:4px 0 10px;font-size:30px}
 body .auth-screen .account-tabs{margin-bottom:10px}
 body .auth-screen .account-form{gap:7px}
 body .auth-screen .auth-device-note{font-size:.75rem}
 .auth-dialog-bar{padding-block:4px}
}
