/* Shared narrow-screen layout, loaded after the established page themes. */
@media(max-width:780px){
 body{word-break:normal}
 main,.page,.card,.reviewCard,.grid>*,.grid4>*,.dashgrid>*,.dashPanels>*{min-width:0;box-sizing:border-box}
 #app .page{width:100%;padding:18px 14px 32px!important}
 #app .card{padding:18px!important}
 #app :is(h1,h2,h3,p,label,.eyebrow){word-break:normal;overflow-wrap:break-word}
 #app :is(h1,h2,h3){height:auto;line-height:1.35!important}
 #app :is(.pageLead,.analyticsHead,.auditHead,.answerBoxTitle,.correctionHead){flex-wrap:wrap;gap:10px}
 #app :is(.grid4,.grid,.dashgrid,.quickgrid,.roadmap,.interviewControls,.icaoSetupGrid,.icaoPictures,.socialColumns){grid-template-columns:minmax(0,1fr)!important}
 #app .statsgrid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #app :is(input:not([type=checkbox]):not([type=radio]),select,textarea){max-width:100%!important;min-width:0!important;box-sizing:border-box;font-size:16px!important}
 #app :is(.heroactions,.reviewActions,.bankToolbar,.examTopActions,.socialActions,.socialInputRow,.purchaseNoticeActions){flex-wrap:wrap;gap:10px}
 #app :is(.heroactions,.reviewActions,.bankToolbar,.socialActions,.purchaseNoticeActions)>.btn{max-width:100%;min-width:0;white-space:normal!important;overflow-wrap:break-word}
 #app :is(.questionVisual,.studyVisualGallery) img{max-width:100%;height:auto}
 #app :is(.answerCompare,.timerResult){grid-template-columns:minmax(0,1fr)!important}
 #result .resultStats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #result .resultFilters{margin-inline:0;gap:6px}
 #result .resultFilters>.btn{width:100%;font-size:clamp(12px,3.5vw,14px)!important;letter-spacing:normal;padding-inline:3px!important}
 #app .correctionQuestion{font-size:17px!important;line-height:1.6!important}
 #studyLibrary .studyReadingToolbar{flex-wrap:wrap;gap:12px;font-size:14px}
 #studyLibrary .studyBookCover{display:block!important;position:static!important;width:100%;height:auto!important;min-height:0!important;padding:24px 20px!important;background:#0d2945!important;box-shadow:none!important;border-bottom:4px solid #7fb5dc!important}
 #studyLibrary .studyBookCover h1{margin:12px 0 18px!important;font-size:28px!important;line-height:1.3!important;color:#fff!important}
 #studyLibrary .studyBookCover .eyebrow{display:block;width:auto;color:#a9cde9!important;letter-spacing:.06em!important;line-height:1.5!important}
 #studyLibrary :is(#studyCoverage,#studyReadingMessage){color:#cad9e7!important;line-height:1.65!important}
 #studyLibrary .studyContentsPanel{padding:18px!important}
 #studyLibrary #studyContents{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
 #studyLibrary .studyChapterLink{width:100%;min-width:0;min-height:44px;white-space:normal;word-break:normal;overflow-wrap:break-word;font-size:14px;line-height:1.5;padding:10px 12px}
 #studyLibrary .studyBookPaper{padding:24px 18px!important}
 #studyLibrary .studyChapterHeading{display:block!important;position:static!important;width:100%;height:auto!important;min-height:0!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
 #studyLibrary .studyChapterHeading .eyebrow{display:block;width:auto;line-height:1.5!important}
 #studyLibrary .studyChapterHeading h2{font-size:25px!important;line-height:1.35!important;margin:10px 0 24px!important}
 #studyLibrary .studyProse{font-size:16px;line-height:1.8}
 #studyLibrary .studyChapterPager{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #studyLibrary .studyChapterPager span{grid-column:1/-1;grid-row:1;width:auto}
 #studyLibrary .studyChapterPager .btn{min-width:0;white-space:normal!important;word-break:normal;overflow-wrap:normal;padding:10px 6px!important;font-size:13px!important}
 #app :is(.analyticsModal,.auditModal){padding:8px!important;overflow-y:auto}
 #app :is(.analyticsPanel,.auditPanel){max-width:100%!important;min-width:0;padding:16px!important}
 #app :is(.analyticsToolbar,.studyFilters){display:grid;grid-template-columns:minmax(0,1fr)!important}
 #app table,.schoolWorkspace .tableWrap{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
 .schoolWorkspace .dashPanels{grid-template-columns:minmax(0,1fr)!important}
 .schoolWorkspace .row>*{min-width:0!important;max-width:100%;flex-basis:100%!important;box-sizing:border-box}
 .schoolWorkspace .modal{padding:12px;overflow-y:auto}
 .schoolWorkspace .modalBox{width:100%!important;max-width:100%;padding:18px!important;box-sizing:border-box}
 .schoolWorkspace .modalActions{flex-wrap:wrap}
 .schoolWorkspace :is(.barRow div:first-child,.item>div){flex-wrap:wrap;gap:8px}
 .examWorkspace main{width:100%;padding:0 14px;box-sizing:border-box}
 .examWorkspace :is(h1,h2,h3){overflow-wrap:break-word;line-height:1.4}
 .restoreWorkspace main{margin:18px 12px;padding:20px;box-sizing:border-box}
 .restoreWorkspace input{display:block;width:100%;box-sizing:border-box}
 .marketingPage header{flex-wrap:wrap;gap:12px}
 .marketingPage :is(h1,h2,h3,p),.plansPage :is(h1,h2,h3,p){word-break:normal;overflow-wrap:break-word}
 .marketingPage :is(input,textarea),.plansPage :is(input,select){max-width:100%;box-sizing:border-box;font-size:16px}
}
@media(max-width:380px){
 #app .page{padding-inline:10px!important}
 #app .card{padding-inline:14px!important}
 #studyLibrary .studyBookCover{padding:22px 16px!important}
 #studyLibrary .studyBookCover h1{font-size:25px!important}
 #studyLibrary .studyChapterHeading h2{font-size:23px!important}
}
