/* BIBLIAGAME 1.9 — viewport-safe layout & accessible fixed-screen shells */
html,body{margin:0;padding:0;width:100%;max-width:100%;overscroll-behavior:none}
.legado-root{width:100%;width:100vw;height:100vh;height:100dvh;min-height:0;max-width:none;overflow:hidden;overscroll-behavior:contain}
.legado-root :is(.lg-screen,.lg-ui,.lg-home,.lg-quiz-screen){max-width:none}
.legado-root .lg-header{max-width:100%;min-width:0}
.legado-root .lg-header .lg-wordmark{min-width:0;flex:0 1 auto;max-width:clamp(115px,19vw,208px);overflow:visible}
.legado-root .lg-header .bg-header-logo{width:100%;height:auto;max-width:208px;max-height:68px;object-fit:contain;object-position:left center}
.legado-root .lg-header-actions{min-width:0;flex:0 0 auto}
.legado-root .lg-header .lg-mv-nav{min-width:0}
.legado-root .lg-ui .lg-screen{width:100%;max-width:100%;overflow-x:hidden;overscroll-behavior:contain}
.legado-root .lg-panel{box-sizing:border-box;max-width:calc(100% - 0px)}
/* The background bleeds to every edge, while paragraphs keep readable measure. */
body .bgj{max-width:none!important;width:100%!important}
body .bgj-root{max-width:none!important;width:100%!important}
body #bg-party{width:100vw;max-width:none;min-height:100vh;min-height:100dvh;top:0;right:0;bottom:0;left:0}
body #bg-party .bgp-background{inset:0;width:100%;background-size:cover}
body #bg-party .bgp-head{width:100%;max-width:none;padding-inline:clamp(13px,2.7vw,48px);min-width:0}
body #bg-party .bgp-home{min-width:0;flex:0 1 150px;overflow:visible;max-width:155px}
body #bg-party .bgp-home img{width:100%;max-width:155px;height:auto;object-fit:contain}
body #bg-party .bgp-head-right{min-width:0;flex-shrink:0}
body #bg-party .bgp-main{max-width:1750px;width:100%;padding-inline:clamp(12px,3vw,50px)}
body #bg-party .bgp-catalog{max-width:none}
body #bg-party :is(input,select){max-width:100%}
body #bg-party .bgp-btn{touch-action:manipulation}
/* On iPhone, requestFullscreen for arbitrary elements is not offered by Safari.
   This class maximizes the available content viewport, not the browser chrome. */
html .legado-root.bg-immersive-fallback{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;z-index:9999}
@supports(height:100svh){.legado-root{min-height:0;height:100dvh}}
@media(max-width:930px){
 .legado-root .lg-header .lg-mv-nav{display:none}
 .legado-root .lg-header{padding:8px max(12px,env(safe-area-inset-left));height:64px;min-height:64px;gap:6px}
 .legado-root .lg-header .lg-wordmark{flex:0 1 145px;max-width:min(44vw,145px)}
 .legado-root .lg-header .bg-header-logo{max-height:51px;max-width:100%}
 .legado-root .lg-header-actions{gap:6px}
 .legado-root .lg-header-actions .lg-circle{width:36px;height:36px;flex:0 0 36px;min-width:0;padding:0}
 body #bg-party .bgp-head-center{display:none!important}
 body #bg-party .bgp-head{height:64px;min-height:64px;gap:8px;padding:7px max(11px,env(safe-area-inset-left))}
 body #bg-party .bgp-home{flex:0 1 142px;max-width:min(38vw,142px)}
 body #bg-party .bgp-home img{max-height:52px;object-position:left center}
 body #bg-party .bgp-head-right{gap:5px}
 body #bg-party .bgp-wallet{min-width:0;padding:8px;border-radius:12px;font-size:11px}
 body #bg-party .bgp-icon{width:35px;height:35px;border-radius:10px;font-size:16px}
 body #bg-party .bgp-main{padding-top:18px;padding-bottom:max(25px,env(safe-area-inset-bottom))}
 body #bg-party .bgp-trail{gap:5px;margin-bottom:17px}
 body #bg-party .bgp-trail span{padding:6px 8px;font-size:9px;gap:4px;letter-spacing:0}
 body #bg-party .bgp-trail b{width:17px;height:17px;font-size:9px}
 body #bg-party .bgp-game-card{min-width:0}
}
@media(max-width:380px){
 .legado-root .lg-header .lg-wordmark{flex-basis:108px;max-width:33vw}
 .legado-root .lg-header-actions .lg-circle{width:32px;height:32px;flex-basis:32px}
 body #bg-party .bgp-home{max-width:min(34vw,118px)}
 body #bg-party .bgp-icon{width:32px;height:32px}
 body #bg-party .bgp-wallet{font-size:10px;padding:6px}
}
@media(prefers-reduced-motion:reduce){.legado-root :is(.lg-button,.lg-mode){animation:none!important;transition:none!important}}
