.tabbar{display:none}
@media(max-width:1139px){
.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:-14px;color:#eef6dc}
.tabbar .tb-mine svg{box-sizing:content-box;width:21px;height:21px;padding:10px;border-radius:50%;background:linear-gradient(160deg,#d8ff7c,var(--lime,#c8f169));color:#0b271f;stroke:#0b271f;box-shadow:0 0 0 4px #0b271f,0 8px 18px -8px #c8f169aa}
.tabbar .tb-mine[aria-current=page] span{color:var(--lime,#c8f169)}
/* the header keeps the logo and a profile button (signed.js opens /profile); the menu (≡) is the last tab of the bar and
   opens the account menu just above the bar (owner, 15 Nov 2026); the account menu has its own day/night switch */
.signed .nav .theme-btn,.signed .topbar{display:none!important}
.signed details.acct .acct-menu{position:fixed;top:auto;right:10px;bottom:calc(84px + env(safe-area-inset-bottom));max-height:calc(100vh - 170px);overflow:auto}
.signed .tabbar .tb-menu[aria-expanded=true]{color:var(--lime,#c8f169)}
.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(calc(100% + 40px));pointer-events:none}
.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}
}
/* everyone (owner, 15 Nov 2026): scrolling down hides the header, the Support button and the Login button; scrolling up
   brings them back (signed.js) */
.nav{transition:transform .3s ease,background .35s,box-shadow .35s}
.sup-fab,.login-fab{transition:transform .3s ease,opacity .3s ease}
.bars-off .nav{transform:translateY(-100%)}
.bars-off .sup-fab,.bars-off .login-fab{transform:translateY(160%);opacity:0;pointer-events:none}
/* while the account menu is open the page behind it is blurred and a little dimmed; a tap on it closes the menu (owner, 15 Nov 2026) */
html:has(details.acct[open]) body::after{content:"";position:fixed;inset:0;z-index:49;background:#0b271f2e;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);animation:acct-dim .2s ease-out}
@keyframes acct-dim{from{opacity:0}}
/* and the page does not scroll while it is open, so the menu stays where it is; the menu itself scrolls if it is taller (owner, 15 Nov 2026) */
html:has(details.acct[open]),html:has(details.acct[open]) body{overflow:hidden;overscroll-behavior:none}
html:has(details.acct[open]) body::after{touch-action:none}
.acct-menu{overscroll-behavior:contain}
/* a signed-in student (owner, 15 Nov 2026): no "Login করলেই পাবে Free Books" line (they have it in the Free tab); the
   collection switch is a dark, premium bar of three, and My Library is a back button above it, on the left */
.signed .free-kit{display:none!important}
.signed .tabs[aria-label="Admission collections"]{position:relative;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px;margin-top:54px;padding:5px;border:1px solid #c6f25a33;border-radius:18px;background:linear-gradient(180deg,#123a2e,#0b271f);box-shadow:0 18px 30px -18px #0b271fcc,inset 0 1px 0 #ffffff1a}
.signed .tabs[aria-label="Admission collections"] a{min-height:48px;padding:6px 8px;border:0;border-radius:13px;background:none;color:#d6e6c6;font:700 13.5px/1.2 var(--f-body);box-shadow:none}
.signed .tabs[aria-label="Admission collections"] a:hover{background:#ffffff14}
.signed .tabs[aria-label="Admission collections"] [aria-current=page]{background:linear-gradient(180deg,#dcff86,#c6f25a);color:#0b271f;font-weight:800;box-shadow:0 8px 18px -10px #c6f25acc,inset 0 1px 0 #ffffffaa}
.signed .tabs[aria-label="Admission collections"] [aria-current=page]::before{content:none}
.signed .tabs[aria-label="Admission collections"] a.tab-lib{position:absolute;top:-50px;left:0;min-height:38px;height:38px;margin:0;padding:0 16px 0 12px;gap:6px;border:1px solid #0b271f26;border-radius:99px;background:#fff;color:#0b271f;font:700 13.5px var(--f-body);box-shadow:0 8px 18px -12px #0b271f88}
.signed .tabs[aria-label="Admission collections"] a.tab-lib::before{content:"←";font-weight:800}
[data-theme=dark].signed .tabs[aria-label="Admission collections"] a.tab-lib{background:#ffffff12;border-color:#ffffff30;color:#eef6dc}
/* no floating Support button for a signed-in student: Support is in the Menu, open (owner, 15 Nov 2026) */
.signed .sup-fab{display:none!important}
/* tablets: the five tabs keep to a phone's width in the middle of the bar, so each stays near its icon (owner, 16 Nov 2026) */
@media(min-width:600px) and (max-width:1139px){.signed .tabbar{padding-inline:max(6px,calc(50% - 280px))}.signed details.acct .acct-menu{right:max(10px,calc(50% - 280px))}}
