/* Mobile app shell: safe areas, thumb navigation and focused reading. */
.app-tabbar,.app-back,.app-install-card{display:none}
.app-back[hidden]{display:none!important}
.app-more-grid{display:grid;gap:7px;margin:20px 0}.app-more-grid a{display:flex;align-items:center;gap:13px;padding:14px;border-radius:14px;background:#f6f2ff;color:#40516b;min-height:48px;font-size:13px;font-weight:600}.app-more-grid a>svg{width:22px;height:22px;color:#7954e8;flex-shrink:0}.app-more-grid a>svg:last-child{margin-left:auto;width:16px}.app-more-actions{display:flex;flex-direction:column;gap:20px;align-items:center;padding:20px 0 6px}.app-more-actions .text-btn{display:flex;gap:8px}.app-more-actions svg{width:19px;height:19px}.app-install-guide{font-size:15px;line-height:1.9;padding:12px 0 22px}.app-connection{position:fixed;bottom:16px;left:16px;right:16px;z-index:70;background:#fff7df;border:1px solid #eddaad;color:#6e532b;padding:12px 16px;border-radius:14px;font-size:12px;box-shadow:0 5px 20px #38274d18}
@media(max-width:720px){
 html{scroll-padding-top:90px}body{min-height:100svh;-webkit-tap-highlight-color:transparent}body.mobile-app-shell{background:#f5f2fc}
 .mobile-app-shell #app{padding-bottom:calc(88px + env(safe-area-inset-bottom,0px))}
 .app-tabbar{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);position:fixed;bottom:0;left:0;right:0;z-index:40;gap:4px;padding:9px max(8px,env(safe-area-inset-left,0px)) calc(8px + env(safe-area-inset-bottom,0px));background:#ffffffef;backdrop-filter:blur(20px);border-top:1px solid #e8e0f7;border-radius:23px 23px 0 0;box-shadow:0 -6px 32px #5137800d}
 .app-tab{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:54px;padding:8px 3px;border:0;border-radius:16px;background:transparent;color:#7c8196;font:600 10px var(--font);text-decoration:none;transition:background .2s,color .2s;touch-action:manipulation}.app-tab>svg{width:22px;height:22px;flex-shrink:0}.app-tab.active{background:#eee7ff;color:#6541cc}.app-tab.active:before{content:'';position:absolute;width:18px;height:3px;border-radius:5px;top:1px;background:#7954e8}.app-tab:focus-visible,.app-back:focus-visible{outline:3px solid #7954e8;outline-offset:2px}
 .app-back{display:inline-flex;flex-shrink:0;width:42px;height:42px;align-items:center;justify-content:center;background:#f0eaff;color:#6541cc;border-radius:13px;padding:10px}.app-back svg{width:23px;height:23px}
 .public-header-inner{min-height:70px;padding:12px 16px;gap:10px}.public-header .brand{font-size:20px;gap:9px}.public-header .brand-mark{width:36px;height:36px}.public-header .brand>span:last-child{max-width:155px}.public-menu summary{min-height:42px;border:0;background:#f2edfc;border-radius:13px}.public-menu summary span{display:none}.public-header{padding-top:env(safe-area-inset-top,0px)}
 .public-content .main{padding:14px 16px 20px}.public-pagebar{padding:15px 16px 0}.public-pagebar .breadcrumb{font-size:11px}.public-pagebar .live-pill{font-size:9px}
 .shell{padding:0 16px}.topbar{position:sticky;top:0;z-index:25;min-height:72px;height:auto;margin:0 -16px;padding:12px 16px;padding-top:max(12px,env(safe-area-inset-top,0px));border:0;border-bottom:1px solid #ebe4f6;border-radius:0;background:#ffffffed;backdrop-filter:blur(20px);gap:8px}.topbar .menu-button{min-width:42px;min-height:42px;border-radius:13px}.header-school{flex:1;min-width:0}.header-school strong{max-width:150px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.topbar .breadcrumb b{font-size:10px;max-width:130px}.topbar .live-header{margin-left:auto}.topbar .app-back:not([hidden])~.menu-button{display:none}.shell>.main{padding-top:20px}
 .page-heading h1{font-size:23px;line-height:1.4}.page-heading p{font-size:12px}.page-heading .btn{min-height:44px}.panel,.unit-card,.document-card,.course-card,.billing-card,.stat{border-radius:21px}.course-body h3{font-size:18px}.course-footer .text-btn{min-height:44px;display:flex;align-items:center}
 .immersive-hero.live-hero{padding:24px;gap:2px;border-radius:25px}.immersive-hero .hero-copy h2{font-size:29px}.immersive-hero .hero-copy>p{font-size:13px;line-height:1.8}.immersive-hero .action-row{gap:9px}.immersive-hero .action-row .btn{font-size:11px;min-height:45px;padding:12px}.learning-scene{min-height:192px}.floating-book{width:112px;height:151px}.book-cover{padding:15px}.book-cover>span{font-size:17px}.book-cover>small{font-size:8px}.book-cover>svg{width:25px;height:25px}.scene-chip{padding:9px 11px;font-size:9px}.hero-note{font-size:9px;margin-top:16px}.discovery-strip{border-radius:21px;margin:18px 0}.discovery-pill{min-height:48px}
 .workspace-tabs.library-tabs{position:sticky;top:72px;z-index:20;background:#f5f2fcf2;backdrop-filter:blur(12px);padding:9px 0 8px;margin-bottom:17px}.library-tabs button{min-height:46px;font-size:12px}.learning-library-toolbar{border-radius:18px}.unit-card{padding:20px}.unit-copy h3{font-size:16px}.unit-card .btn{min-height:44px}
 input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px}.filter-select{min-height:46px}.btn,.icon-btn,.text-btn{touch-action:manipulation}.btn{min-height:44px}.field input,.field select{min-height:48px}.quiz-question label{min-height:48px;align-items:center}
 dialog[open]{width:100%;max-width:100%;max-height:calc(100dvh - env(safe-area-inset-top,0px) - 8px);margin:auto 0 0;inset:auto 0 0;border:0;border-radius:26px 26px 0 0;box-shadow:0 -16px 70px #24203338;animation:app-sheet-in .25s cubic-bezier(.22,1,.36,1)}.modal-content{padding:25px 21px calc(24px + env(safe-area-inset-bottom,0px))}.modal-head>.icon-btn{min-width:44px;min-height:44px;background:#f2ecfd;border-radius:13px}.modal-head h2{font-size:21px;line-height:1.5}.modal-head p{font-size:12px}.learning-reader{font-size:14px}.reader-outline{position:sticky;top:0;background:white;z-index:2;padding:9px 0}.document-editor{font-size:16px}.learning-video{min-height:0;aspect-ratio:16/9}
 .app-install-card{display:flex;align-items:center;gap:12px;padding:17px;background:linear-gradient(120deg,#eee6ff,#fff);border:1px solid #dfd2f8;border-radius:22px;margin:24px 0 12px}.app-install-mark{width:40px;height:44px;flex-shrink:0;display:grid;place-items:center;border-radius:12px;color:#7148d5;background:#e1d4fb}.app-install-mark svg{width:23px;height:23px}.app-install-card>div{flex:1;min-width:0}.app-install-card b{font-size:12px;line-height:1.6;display:block}.app-install-card p{font-size:10px;color:#7c7198;margin:4px 0 0;line-height:1.7}.app-install-card .btn{font-size:11px;padding:11px;min-height:44px}.app-install-card .btn svg{width:13px}.app-installed .app-install-card{display:none}.app-connection{bottom:calc(90px + env(safe-area-inset-bottom,0px));font-size:11px}.auth-layout{min-height:100svh;padding:16px;padding-top:max(16px,env(safe-area-inset-top,0px));padding-bottom:max(16px,env(safe-area-inset-bottom,0px))}.auth-form-wrap{border-radius:26px}.auth-story{border-radius:26px}.footer{font-size:10px;margin-top:22px}#toast,.public-view #toast{bottom:calc(96px + env(safe-area-inset-bottom,0px));width:calc(100% - 32px);max-width:420px;text-align:center}
}
@media(max-width:360px){.public-header .brand>span:last-child{max-width:125px}.public-header-inner{padding-left:12px;padding-right:12px}.app-install-mark{display:none}.immersive-hero .hero-copy h2{font-size:26px}.header-school strong{max-width:130px}.modal-content{padding-left:17px;padding-right:17px}.app-tab{font-size:9px}}
@keyframes app-sheet-in{from{opacity:.7;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){dialog[open]{animation:none}.app-tab{transition:none}}
