/* Constrain mobile student layout; scroll wide academic tables inside their own wrappers. */
.ecd-shell>main.study-mode :is(#librarypanel,#libcatalog,#liblist,.libfilters,.libfilters>div,.libgroup,.libcards,.libcard,.libhero,.libhero>div:first-child,#ecdLibQuick,#quizchooser,#ecdQuizModes,#examcards,.ecd-exam-card){min-width:0;max-width:100%}
main.study-mode .libhero>div:first-child{flex:1 1 0;overflow-wrap:anywhere}
main.study-mode .libcard :is(h4,p,button),main.study-mode .ecd-exam-card :is(strong,small){overflow-wrap:anywhere;white-space:normal}
main.study-mode #ecdQuizModes button{white-space:normal;overflow-wrap:anywhere;max-width:100%}
@media(max-width:700px){
 html:has(body.ecd-internal main.study-mode),body.ecd-internal:has(main.study-mode){width:100%;max-width:100%;overflow-x:clip}
 body.ecd-internal:has(main.study-mode) .ecd-shell{width:100%;max-width:100%;min-width:0}
 .ecd-shell>main.study-mode{width:100%;max-width:100%;min-width:0;margin-inline:0}
 main.study-mode #librarypanel,main.study-mode #libcatalog{width:100%;max-width:100%}
 main.study-mode #ecdLibQuick,main.study-mode #ecdQuizModes{display:flex;flex-wrap:wrap;overflow:visible;width:100%;max-width:100%;gap:6px;padding:0}
 main.study-mode #ecdLibQuick button,main.study-mode #ecdQuizModes button{flex:0 1 auto;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;padding:8px 10px;min-height:44px}
 main.study-mode .libfilters{grid-template-columns:minmax(0,1fr);width:100%}
 main.study-mode .libfilters>div:first-child{grid-column:auto}
 main.study-mode .libfilters :is(input,select,button){width:100%;min-width:0;max-width:100%}
 main.study-mode .libhero{gap:10px;padding:14px}
 main.study-mode .libhero h2{font-size:clamp(20px,5.8vw,26px);overflow-wrap:anywhere}
 main.study-mode .libheroicon{width:44px;height:44px;flex:0 0 44px}
 main.study-mode .libheroicon svg{width:29px;height:29px}
 main.study-mode .ecd-lib-section .libcards{grid-template-columns:minmax(0,1fr)}
 main.study-mode .ecd-lib-section>summary{overflow-wrap:anywhere}
 main.study-mode .studybar>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
 main.study-mode .studybar :is(button,.previewlink){flex:1 1 130px;white-space:normal}
 .ecd-shell:has(main.study-mode) .ecd-sidebar{width:100%;min-width:0;max-width:100%}
 .ecd-shell:has(main.study-mode) .ecd-sidebar #studynav{max-width:100%;min-width:0}
}
@media(max-width:360px){main.study-mode .libheroicon{display:none}main.study-mode #ecdQuizModes button{flex:1 1 120px}}
