/* Only the navigation controls shown in the owner's v7 screenshots. */
@media(max-width:900px){
 body.mobile-shell>.header .brand-crest{transform:scale(1.18);transform-origin:center}
 body.mobile-shell>.header :is(.header-filter,.header-print,.header-install,.language-switch button),
 body.mobile-shell>.header .language-switch button[aria-pressed=true],
 body.mobile-shell .mobile-bottom-nav button,
 body.mobile-shell .mobile-bottom-nav button.active{background:rgba(255,255,255,.2)!important;opacity:1}
 body.mobile-shell:not(.mobile-tree-active)>.header .header-filter{display:grid!important}
 body.mobile-shell.mobile-light-active>.header :is(.header-filter,.header-print,.header-install,.language-switch button),
 body.mobile-shell .mobile-bottom-nav.mobile-nav-light button{background:rgba(32,43,39,.2)!important;color:#202b27;border-color:rgba(32,43,39,.48)}
 body.mobile-shell:not(.mobile-light-active)>.header :is(.header-filter,.header-print,.header-install,.language-switch button),
 body.mobile-shell .mobile-bottom-nav:not(.mobile-nav-light) button{color:#fffdf7;text-shadow:0 1px 2px #101318}
 body.mobile-shell:not(.mobile-light-active)>.header :is(.header-filter,.header-print,.header-install) svg{filter:drop-shadow(0 1px 1px #101318)}
}
.page-bottom-nav,.page-header-tools,.page-generated-header{display:none}
.page-bottom-nav,.page-bottom-nav a{box-sizing:border-box}
@media(max-width:900px){
 body.page-navigation>.page-generated-header{box-sizing:border-box;align-items:center;padding:14px 18px;background:#f3efe5;color:#202b27;border-bottom:1px solid #c8cbbf}
 .page-generated-header img{display:block;object-fit:contain}
 .page-generated-header .languages{display:flex}
 body.page-navigation{min-height:100dvh;padding-bottom:0}
 body.page-navigation>header{display:flex;flex-wrap:nowrap;gap:4px}
 body.page-navigation>header>a{flex:none}
 body.page-navigation>header>a img{transform:scale(1.1);transform-origin:center}
 body.page-navigation>header .page-header-tools{display:flex;flex:none;gap:4px;margin-left:auto}
 body.page-navigation>header :is(nav,.languages){gap:4px;margin:0;width:auto;order:0;flex-wrap:nowrap}
 body.page-navigation>header .page-header-tools a,
 body.page-navigation>header :is([data-auth-language],[data-install-language],[data-language]){display:grid;place-items:center;box-sizing:border-box;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:1px solid rgba(32,43,39,.48);border-radius:10px;background:rgba(32,43,39,.2);color:#202b27;text-decoration:none;font:600 11px/1.2 system-ui;opacity:1}
 body.page-navigation>header :is([data-auth-language=ba],[data-install-language=ba],[data-language=ba]){width:52px}
 body.page-navigation>header [aria-pressed=true]{border-color:currentColor}
 .page-header-tools svg,.page-bottom-nav svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 body.page-navigation>.page-bottom-nav{position:static;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;width:100%;height:auto;margin:24px 0 0;padding:4px max(4px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left));border:0;border-radius:0;background:transparent}
 body.page-navigation>.page-bottom-nav a{display:grid;place-items:center;align-content:center;gap:3px;min-width:0;min-height:56px;padding:4px 1px;border:1px solid rgba(32,43,39,.48);border-radius:12px;background:rgba(32,43,39,.2);color:#202b27;font:12px/1.2 system-ui;text-decoration:none;opacity:1}
 body.page-navigation[data-page]>header{flex-wrap:wrap}
 body.page-navigation[data-page]>header .brand span{display:none}
 body.page-navigation[data-page]>header>nav{order:3;width:100%}
 body.page-navigation[data-page]>header :is(.page-header-tools a,[data-language]){background:rgba(255,255,255,.2);color:#fffdf7;border-color:rgba(238,244,243,.5)}
}
@media(max-width:359px){body.page-navigation>header :is([data-auth-language=ba],[data-install-language=ba],[data-language=ba]){width:44px}}
@media print{.page-header-tools,.page-bottom-nav,.page-generated-header{display:none!important}}

/* v8: navigation belongs to the viewport, never to the end of a long article. */
@media(max-width:900px){
 body.mobile-shell .mobile-bottom-nav,
 body.page-navigation>.page-bottom-nav{position:fixed;z-index:220;inset:auto 0 0;margin:0;width:100%;min-height:calc(64px + env(safe-area-inset-bottom));align-items:end}
 body.mobile-shell .mobile-bottom-nav button,
 body.page-navigation>.page-bottom-nav a{display:grid;margin:0;min-height:56px;padding:3px 1px;gap:2px;border-radius:12px;font:400 11px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
 body.mobile-shell .mobile-bottom-nav button svg,
 body.page-navigation>.page-bottom-nav a svg{width:23px;height:23px}
 body.mobile-shell.mobile-light-active{background:#f3efe5}
 body.mobile-shell :is(.archive-reading,.archive-catalog,#research-screen,#heritage-screen){bottom:var(--mobile-nav)!important}
 body.mobile-shell .side-panel{bottom:var(--mobile-nav);height:calc(100dvh - var(--mobile-header) - var(--mobile-nav));padding-bottom:20px}
 body.mobile-shell :is(.account-dialog,.mobile-archive-sheet){margin-bottom:var(--mobile-nav);max-height:calc(100dvh - var(--mobile-nav) - env(safe-area-inset-top))}
 body.page-navigation{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
}
