.tabbar{display:none}
@media(max-width:900px){
.signed .tabbar{position:fixed;z-index:58;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(5,1fr);align-items:end;padding:6px 6px calc(6px + env(safe-area-inset-bottom));background:#0b271ff2;border-top:1px solid #ffffff1f;box-shadow:0 -10px 30px -18px #000;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);transition:transform .3s ease}
.tabbar a{display:flex;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:52px;padding:4px 2px;border-radius:14px;color:#c9d8bd;font:600 11px/1.15 var(--f-lat,system-ui);text-align:center;-webkit-tap-highlight-color:transparent}
.tabbar svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.tabbar a[aria-current=page]{color:var(--lime,#c8f169)}
.tabbar a[aria-current=page]:not(.tb-mine) svg{filter:drop-shadow(0 0 6px #c8f16966)}
.tabbar a:focus-visible{outline:2px solid var(--lime,#c8f169);outline-offset:-2px}
.tabbar .tb-mine{position:relative;margin-top:-22px;color:#eef6dc}
.tabbar .tb-mine svg{box-sizing:content-box;width:24px;height:24px;padding:13px;border-radius:50%;background:linear-gradient(160deg,#d8ff7c,var(--lime,#c8f169));color:#0b271f;stroke:#0b271f;box-shadow:0 0 0 5px #0b271f,0 10px 22px -8px #c8f169aa}
.tabbar .tb-mine[aria-current=page] span{color:var(--lime,#c8f169)}
/* the header keeps the logo and one menu (the account menu, drawn as ≡); profile is in the tab bar, the account menu has its own day/night switch */
.signed .nav .theme-btn,.signed .topbar{display:none!important}
.signed .acct>summary svg{display:none}
.signed .acct>summary::before{content:"";width:18px;height:2px;border-radius:2px;background:currentColor;box-shadow:0 -6px 0 currentColor,0 6px 0 currentColor}
.signed .nav{transition:transform .3s ease,background .35s,box-shadow .35s}
.signed footer{display:none}
.signed body{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
/* the floating buttons and the cart bar sit above the tab bar */
.signed .sup-fab,.signed .to-top,.signed .has-basket .sup-fab,.signed .has-basket .to-top{bottom:calc(84px + env(safe-area-inset-bottom))}
.signed .basket{bottom:calc(78px + env(safe-area-inset-bottom))}
.signed.has-basket .sup-fab,.signed.has-basket .to-top,.signed .has-basket .sup-fab{bottom:calc(150px + env(safe-area-inset-bottom))}
/* scrolling down hides the header and the tab bar; any scroll up brings them back (signed.js) */
.signed.bars-off .nav{transform:translateY(-100%)}
.signed.bars-off .tabbar{transform:translateY(110%)}
.signed.bars-off .sup-fab,.signed.bars-off .to-top{bottom:calc(16px + env(safe-area-inset-bottom))}
/* My Library: each tab of the bar is its own page, so the page head, the view switch and the WhatsApp line go;
   a short title names the page instead (owner, 14 Nov 2026) */
.signed main:has(.lib-views)>.zone,.signed .lib-views,.signed main:has(.lib-views) .lib-ask{display:none}
.signed main:has(.lib-views)>.body{margin-top:0;padding-top:0;border-radius:0}
.signed main:has(.lib-views)>.body>.sec:first-child{padding-top:14px}
.signed main:has(.lib-views)>.body::before{display:block;padding:20px var(--pad,20px) 0;font:700 22px/1.25 var(--f-head,inherit);color:var(--ink,#0b271f)}
[data-theme=dark].signed main:has(.lib-views)>.body::before{color:#eef6dc}
.signed main:has(.lib-views a.on[href="/library?v=free"])>.body::before{content:"Free Books & Tests"}
.signed main:has(.lib-views a.on[href="/library?v=mine"])>.body::before{content:"My Books"}
.signed main:has(.lib-views a.on[href="/library?v=tests"])>.body::before{content:"Tests"}
/* not while reading a book or taking a test: those pages keep their own controls */
.signed body:is(.reading,.testing) .tabbar{display:none}
.signed body:is(.reading,.testing){padding-bottom:0}
}
