html,body{max-width:100%;overflow-x:hidden}button,a,select,input,textarea{touch-action:manipulation}
@media(max-width:700px){
body{font-size:16px}.topbar{min-height:68px;height:auto;gap:10px;padding:10px 14px;flex-wrap:wrap}.topbar .brand{min-width:0}.topbar .brand span:last-child{min-width:0}.topbar .brand small{white-space:normal;line-height:1.2}.account-controls{gap:7px}.sign-out{min-height:42px;padding:8px 11px}
main{width:100%;padding:22px 14px 46px}.intro{gap:18px}.intro-copy{min-width:0}.intro h1{font-size:clamp(2rem,10vw,2.65rem);line-height:1.08}.state-selector{width:100%;padding:14px}.state-selector select{width:100%;min-height:48px}
.dashboard-tabs{margin-inline:-2px;scrollbar-width:thin;overscroll-behavior-inline:contain}.dashboard-tabs button{min-width:152px;min-height:58px;padding:9px 11px}.dashboard-panel{padding:18px 14px}.dashboard-panel-head h2{font-size:1.55rem}.path-summary{grid-template-columns:1fr 1fr}.path-summary>div{min-width:0;padding:13px 10px}
.module-strip{width:100%;padding:20px 17px;border-radius:16px;gap:17px}.module-strip h2{font-size:1.4rem;line-height:1.25}.module-meta{flex-wrap:wrap}.module-card-actions{width:100%}.module-card-actions button{min-height:48px;white-space:normal}.topic{min-height:72px;padding:14px;gap:11px}.topic h3{font-size:1rem}.topic p{font-size:.84rem;line-height:1.45}.chat{padding:15px}.chat-form{display:grid;grid-template-columns:1fr}.chat-form button{width:100%}
.modal{padding:0;align-items:stretch}.modal-card{width:100%;max-height:100dvh;overflow:auto;border-radius:0;padding:20px 16px}.lesson-shell,.exam-shell,.planner-shell,.bank-shell{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0}.lesson-content{padding:21px 16px 34px}.lesson-content h1{font-size:1.8rem}.lesson-progress{align-items:flex-start;flex-wrap:wrap}.lesson-progress .progress{width:100%}.lesson-actions{display:grid;grid-template-columns:1fr;position:sticky;bottom:0;background:#fff;padding:13px 0 max(13px,env(safe-area-inset-bottom));z-index:2}.lesson-actions button,.lesson-actions .primary{width:100%;min-height:48px}.concept,.memory-card,.mini-check{padding:14px}.mini-check button{min-height:46px}
dialog.module-quiz-shell{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}.module-quiz-head{position:sticky;top:0;z-index:3;padding:15px 16px}.module-quiz-head h2{font-size:1.25rem;line-height:1.25}.module-quiz-head .eyebrow{font-size:.7rem}.module-quiz-head button{min-width:44px;min-height:44px}.module-quiz-main{padding:18px 15px 32px}.module-quiz-progress{position:sticky;top:78px;z-index:2;margin:-18px -15px 15px;padding:11px 15px;background:#f3f7f8;font-size:.88rem}.module-quiz-question{font-size:1.2rem}.module-quiz-answers button{min-height:52px;padding:13px 14px;line-height:1.45}.choice-rationales p{overflow-wrap:anywhere}.module-quiz-next{min-height:50px}.module-quiz-actions{display:grid;grid-template-columns:1fr}.module-quiz-actions button{width:100%;min-height:48px}
.exam-header{gap:10px}.exam-header h2{font-size:1.05rem;line-height:1.2}.exam-clock{margin-left:auto}.exam-clock strong{font-size:1.05rem}.exam-close{flex:0 0 42px;width:42px;height:42px}.exam-nav{max-width:100vw;overflow-x:auto}.exam-grid{display:flex;gap:7px;overflow-x:auto;padding:2px 1px 8px}.exam-grid button{flex:0 0 40px;width:40px;height:40px;aspect-ratio:auto}.exam-question{padding:20px 15px 34px}.exam-question-meta{gap:10px;flex-wrap:wrap}.exam-question h1{font-size:1.45rem;margin:17px 0}.exam-answers button{min-height:52px;padding:13px;line-height:1.45}.exam-actions button{min-height:46px}.exam-start{overflow:auto}.exam-start .primary{max-width:none;min-height:50px}
.planner-header{padding:15px 16px}.planner-header h2{font-size:1.25rem}.planner-controls{grid-template-columns:1fr;padding:15px}.planner-controls .primary{grid-column:auto;width:100%;min-height:48px}.planner-tabs{overflow-x:auto}.planner-tabs button{flex:0 0 auto}.plan-day{grid-template-columns:1fr}.plan-day>span{grid-column:auto}
.bank-shell .exam-header h2{font-size:1.05rem}.bank-shell .bank-setup,.bank-shell .bank-practice,.bank-shell .bank-results{padding:18px 15px 32px;overflow:auto}.bank-shell .bank-options{grid-template-columns:1fr}.bank-shell select,.bank-shell button{min-height:48px}
dialog.flash-shell,dialog.report-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:18px 15px;overflow:auto}.flash-shell header,.report-dialog header{position:sticky;top:-18px;z-index:2;background:#fff;padding-top:18px}.flash-shell button,.report-dialog button,.report-dialog select,.report-dialog textarea{min-height:46px}.flash-actions,.result-actions{display:grid;grid-template-columns:1fr}.flash-actions button,.result-actions button{width:100%}.site-footer{padding:28px 16px}.site-footer nav{display:grid;grid-template-columns:1fr 1fr;width:100%}
}
@media(max-width:390px){.path-summary{grid-template-columns:1fr}.dashboard-tabs button{min-width:138px}.dashboard-tabs button>span{width:30px;height:30px}.module-quiz-progress{font-size:.8rem}.exam-actions>div{grid-template-columns:1fr}.site-footer nav{grid-template-columns:1fr}}
@media(orientation:landscape) and (max-height:520px){dialog.module-quiz-shell,.lesson-shell,.exam-shell,.planner-shell,.bank-shell{height:100dvh}.module-quiz-head{padding-block:10px}.module-quiz-main{padding-top:12px}.module-quiz-progress{position:static;margin:0 0 12px}}
