/* Geometry only: preserve the published brand and all desktop layouts. */

@layer majdhub-mobile {
 @media (max-width:900px) {
  html,body {min-width:0!important;max-width:100%;}
  body :is(.portal,.portal-content,.student-area,.student-content,.groups-page,.learning-page,.learning-shell,.bank-page,.bank-shell,.practice-page,.challenge-page,.break-page,.sl-page,.worksheet-page,.pdf-work-page) {box-sizing:border-box!important;min-width:0!important;max-width:100%!important;width:100%!important;}
  body :is(.portal-content,.student-content,.groups-page,.learning-shell,.bank-page,.practice-page,.challenge-page,.break-page,.sl-page,.pdf-work-page) {padding-inline:12px!important;}
  body :is(.portal-header,.brochure-main-header,.bank-top,.guide-topbar,.student-area>header) {box-sizing:border-box!important;min-width:0!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;padding:12px max(12px,env(safe-area-inset-left))!important;gap:12px!important;grid-template-columns:minmax(0,1fr)!important;flex-wrap:wrap!important;}
  body :is(.portal-brand,.brochure-shared-brand,.brochure-header-lockup,.teacher-top-actions,.portal-actions,.brochure-header-actions) {min-width:0!important;max-width:100%!important;flex-wrap:wrap!important;}
  body :is(.portal-actions,.brochure-header-actions) {display:flex!important;gap:8px!important;width:100%!important;}
  body :is(.portal-actions,.brochure-header-actions)>:is(button,a,select) {width:auto!important;flex:1 1 auto!important;min-height:44px!important;height:auto!important;max-height:none!important;white-space:normal!important;font-size:14px!important;padding:8px 12px!important;}
  body :is(.brochure-shared-brand,.brochure-header-lockup) {width:min(100%,340px)!important;}
  body :is(.brochure-shared-brand,.brochure-header-lockup)>img {max-width:100%!important;width:100%!important;height:auto!important;max-height:none!important;object-fit:contain!important;}
  body :is(.portal-tools,.teacher-class-actions,.class-hub-tabs,.batch-toolbar,.student-subjects,.student-actions,.groups-controls,.groups-row,.learning-toolbar,.bank-filters,.sl-toolbar,.sl-selects,.pdf-work nav,.pdf-work footer) {min-width:0!important;max-width:100%!important;display:flex!important;flex-wrap:wrap!important;gap:8px!important;height:auto!important;}
  body :is(.portal-tools,.teacher-class-actions,.class-hub-tabs,.batch-toolbar,.student-actions,.groups-controls,.learning-toolbar,.bank-filters,.sl-toolbar) :is(button,a,select) {max-width:100%!important;white-space:normal!important;min-width:0!important;min-height:44px!important;max-height:none!important;height:auto!important;touch-action:manipulation;}
  body :is(.portal-tools,.teacher-class-actions,.class-hub-tabs,.batch-toolbar) {position:static!important;}
  body :is(.student-main,.student-card,.student-welcome,.class-file-head,.role-heading,.student-list-tools,.group-member,.compact-class-choice) {min-width:0!important;max-width:100%!important;}
  body :is(.student-welcome,.class-file-head,.role-heading,.student-list-tools) {height:auto!important;max-height:none!important;flex-wrap:wrap!important;}
  body :is(.class-list,.class-grid,.student-modules,.groups-grid,.module-grid,.bank-grid,.resource-grid) {grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))!important;min-width:0!important;}
  body :is(.student-grid,.student-grid-all) {grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))!important;min-width:0!important;}
  body :is(.student-main>span,.student-main strong,.student-name,.group-student-line,.class-file-head h2,.student-welcome h2,.module-grid h2) {min-width:0!important;white-space:normal!important;overflow-wrap:anywhere!important;max-height:none!important;}
  body :is(.action-modal,.learning-modal>section,.student-modal,.compact-share-dialog,.certificate-send-dialog,.sl-session-report-dialog,.sl-skill-window) {box-sizing:border-box!important;width:min(600px,calc(100vw - 24px))!important;min-width:0!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important;overscroll-behavior:contain;padding:14px!important;}
  body :is(.action-modal,.learning-modal,.student-modal,.compact-share-dialog,.certificate-send-dialog) :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {box-sizing:border-box!important;min-width:0!important;max-width:100%!important;font-size:16px!important;}
  body :is(.compact-share-dialog,.certificate-send-dialog,.action-modal) :is(footer,.form-actions,.modal-actions) {display:flex!important;flex-wrap:wrap!important;gap:8px!important;}
  body :is(.compact-share-dialog,.certificate-send-dialog,.action-modal) :is(footer,.form-actions,.modal-actions) button {min-height:44px!important;white-space:normal!important;}
  body :is(.table-wrap,.table-scroll,.data-table-wrap,.admin-table-wrap,.teacher-table-wrap,.grade-report,.leaderboard-table-wrap) {max-width:100%!important;overflow-x:auto!important;overscroll-behavior-inline:contain;}
  body .portal.role-admin :is(.admin-data-area,.admin-records-panel,.theme-editor,.backup-center,.admin-teacher-directory,.admin-analysis-grid,.teacher-approval-tools,.visual-site-editor,.page-design-studio) {box-sizing:border-box!important;min-width:0!important;max-width:100%!important;}
  body .portal.role-admin :is(.admin-analysis-grid,.teacher-approval-tools,.visual-site-editor,.page-design-studio,.backup-actions-grid,.theme-fields,.theme-editor-grid) {grid-template-columns:minmax(0,1fr)!important;}
  body .portal.role-admin :is(.admin-menu,.admin-platform-tools,.backup-actions,.theme-editor-actions,.admin-teacher-directory>header,.admin-analysis-grid header,.teacher-approval-actions) {display:flex!important;flex-wrap:wrap!important;max-width:100%!important;gap:8px!important;}
  body .portal.role-admin :is(.admin-menu,.admin-platform-tools,.backup-actions,.theme-editor-actions) :is(button,a) {min-height:44px!important;white-space:normal!important;max-width:100%!important;}
  body .portal.role-admin :is(.theme-editor,.teacher-approval-tools,.admin-data-area) :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {box-sizing:border-box!important;max-width:100%!important;min-width:0!important;font-size:16px!important;}
  body .portal.role-admin :is(.page-canvas,.visual-site-preview) {max-width:100%!important;overflow:auto!important;overscroll-behavior:contain;}
  body :is(.sl-page,.sl-workspace,.sl-question,.sl-question-body,.sl-journey,.sl-choices,.pdf-work,.pdf-sheet) {min-width:0!important;max-width:100%!important;}
  body .sl-workspace.is-active {grid-template-columns:minmax(0,1fr)!important;height:auto!important;max-height:none!important;overflow:visible!important;}
  body .sl-page.sl-learning-active {height:auto!important;min-height:100dvh!important;overflow:visible!important;}
  body .sl-question-body {overflow:visible!important;}
  body .sl-completion-layer {position:fixed!important;inset:0!important;display:grid!important;place-items:center!important;padding:12px!important;overflow:auto!important;}
  body .sl-lesson-completion {box-sizing:border-box!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;overflow:auto!important;}
  body .sl-lesson-completion>div {display:flex!important;flex-wrap:wrap!important;gap:8px!important;}
  body :is(.pdf-work,.worksheet-solution,.learning-resource-preview) :is(canvas,img,video,iframe) {max-width:100%!important;}
  body .pdf-sheet canvas {height:auto!important;}
  body .student-area :is(.student-welcome,.student-modules,.student-subjects) {transform:none!important;width:100%!important;}
 }
 @media (max-width:600px) {
  body :is(.student-grid,.student-grid-all,.groups-grid,.bank-grid,.resource-grid,.student-modules,.module-grid,.admin-teacher-directory>div) {grid-template-columns:minmax(0,1fr)!important;}
  body :is(.student-grid>article,.student-main) {max-height:none!important;height:auto!important;min-height:64px!important;}
  body .student-main {flex-wrap:wrap!important;gap:8px!important;}
  body :is(.student-main strong,.student-name) {font-size:16px!important;line-height:1.45!important;}
  body :is(.page-note,.student-note,.groups-note,.learning-note) {white-space:normal!important;overflow-wrap:anywhere!important;height:auto!important;max-height:none!important;}
  body .student-inline-esis {font-size:13px!important;white-space:nowrap!important;}
  body :is(.sl-choices,.student-mark-menu,.technology-mark-modal .student-mark-menu,.group-names) {grid-template-columns:minmax(0,1fr)!important;}
  body :is(.login-card,.student-login>section,.group-create,.groups-controls,.groups-grid article) {min-width:0!important;max-width:100%!important;padding:16px!important;}
  body .group-create fieldset {flex-wrap:wrap!important;gap:12px!important;}
  body .groups-row>label {flex:1 1 100%!important;width:100%!important;}
  body .groups-management select {width:100%!important;}
  body .summary-grid {position:static!important;display:flex!important;flex-wrap:wrap!important;justify-content:center!important;}
 }
}


/* Current production components: reset desktop placement only on small screens. */
@layer majdhub-mobile {
 @media (max-width:900px) {
  html,body{width:100%!important;margin-inline:0!important;}
  body :is(.portal,.portal-content,.class-file,.student-area,.student-content,.learning-shell,.learning-content,.resource-bank,.bank-hero,.bank-library-switch,.practice-shell,.practice-manage,.break-centre,.break-player,.break-scoreboard-page,.maker,.challenge-live,.sl-shell,.sl-workspace){box-sizing:border-box!important;min-width:0!important;max-width:100%!important;}
  body :is(.portal-content,.learning-content,.student-content,.resource-bank,.practice-shell,.practice-manage,.break-centre,.maker,.challenge-page,.sl-shell){width:100%!important;padding-inline:12px!important;margin-inline:0!important;}
  body :is(.brochure-main-header,.portal-header,.learning-header,.student-area>header,.bank-top,.guide-topbar){position:relative!important;inset:auto!important;transform:none!important;translate:none!important;scale:none!important;rotate:none!important;display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;flex-wrap:wrap!important;gap:12px!important;width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;max-height:none!important;box-sizing:border-box!important;padding:12px!important;}
  body :is(.brochure-main-header,.portal-header,.learning-header,.student-area>header,.bank-top,.guide-topbar)>*{box-sizing:border-box!important;position:relative!important;inset:auto!important;transform:none!important;translate:none!important;scale:none!important;rotate:none!important;grid-area:auto!important;grid-column:auto!important;grid-row:auto!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:0!important;flex:0 1 auto!important;margin:0!important;}
  body :is(.brochure-main-logo,.brochure-main-brand,.brochure-main-actions,.brochure-main-links,.brochure-header-lockup,.portal-brand,.teacher-top-actions,.teacher-contact-row,.teacher-classes-heading,.teacher-class-title-row,.teacher-summary-circles,.teacher-leaders,.class-file-head,.class-toolbar,.class-hub-tabs,.portal-tools,.learning-title,.learning-create-actions,.module-toolbar,.student-welcome,.student-subjects,.student-modules){position:relative!important;inset:auto!important;transform:none!important;translate:none!important;rotate:none!important;scale:none!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;margin-inline:0!important;grid-area:auto!important;grid-column:auto!important;grid-row:auto!important;}
  body :is(.brochure-main-logo,.brochure-header-lockup,.portal-brand,.brochure-main-brand){align-self:center!important;width:min(100%,340px)!important;flex:0 1 auto!important;}
  body :is(.brochure-main-logo,.brochure-header-lockup,.portal-brand,.brochure-main-brand) img{box-sizing:border-box!important;max-width:100%!important;height:auto!important;object-fit:contain!important;}
  body .brochure-main-logo{aspect-ratio:1024/366!important;}
  body :is(.brochure-main-actions,.brochure-main-links,.teacher-top-actions,.teacher-top-actions .portal-actions,.teacher-contact-row,.portal-actions,.class-toolbar,.class-hub-tabs,.portal-tools,.learning-create-actions,.module-toolbar,.student-welcome>div,.student-subjects,.student-actions,.bank-top nav,.bank-filters,.bank-library-switch,.bank-library-switch>div){display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:8px!important;min-width:0!important;width:100%!important;max-width:100%!important;}
  body :is(.brochure-main-actions,.teacher-top-actions,.teacher-contact-row,.portal-actions,.class-toolbar,.class-hub-tabs,.portal-tools,.learning-create-actions,.module-toolbar,.student-actions,.student-subjects,.bank-top nav,.bank-library-switch) :is(button,a,select,label){box-sizing:border-box!important;position:relative!important;inset:auto!important;transform:none!important;translate:none!important;rotate:none!important;scale:none!important;grid-area:auto!important;grid-column:auto!important;grid-row:auto!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:44px!important;max-height:none!important;white-space:normal!important;overflow-wrap:anywhere!important;font-size:16px!important;line-height:1.45!important;touch-action:manipulation;}
  body :is(.brochure-main-actions,.teacher-top-actions .portal-actions,.portal-tools,.class-hub-tabs,.learning-create-actions)>:is(button,a,label){flex:1 1 140px!important;width:auto!important;}
  body :is(.brochure-main-actions,.teacher-top-actions,.portal-actions) :is(button,a){padding:9px 12px!important;}
  body :is(.teacher-classes-heading,.teacher-class-title-row,.class-file-head,.learning-title,.role-heading,.bank-hero){display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:12px!important;}
  body :is(.teacher-class-title-row,.teacher-classes-heading,.class-file-head)>*{grid-area:auto!important;grid-column:auto!important;grid-row:auto!important;min-width:0!important;max-width:100%!important;justify-self:stretch!important;}
  body .teacher-leaders ol{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;min-width:0!important;padding:0!important;margin:0!important;}
  body .teacher-leaders .leader-place{min-width:0!important;max-width:100%!important;height:auto!important;flex-wrap:wrap!important;}
  body :is(.teacher-summary-circles,.summary-grid){display:flex!important;position:relative!important;inset:auto!important;transform:none!important;flex-wrap:wrap!important;gap:8px!important;justify-content:center!important;}
  body :is(.class-list,.student-grid,.student-grid-all,.module-grid,.student-modules,.groups-grid,.bank-grid,.resource-grid,.bank-resources,.bank-cards){min-width:0!important;max-width:100%!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))!important;}
  body :is(.student-grid,.student-grid-all,.module-grid,.class-list)>*{box-sizing:border-box!important;min-width:0!important;max-width:100%!important;}
  body :is(.class-certificate-voice-pair,.form-grid,.bank-filters,.bank-worksheet-options){grid-template-columns:repeat(2,minmax(0,1fr))!important;min-width:0!important;}
  body :is(.module-toolbar,.student-list-tools)>label{flex:1 1 200px!important;min-width:0!important;}
  body :is(.role-heading,.learning-title,.class-file-head,.student-welcome) :is(h1,h2,strong,small,span){overflow-wrap:anywhere!important;white-space:normal!important;max-width:100%!important;min-width:0!important;}
  body :is(.learning-modal,.solution-overlay,.contact-us-overlay,.certificate-send-overlay,.sl-session-report-overlay){box-sizing:border-box!important;padding:12px!important;align-items:start!important;overflow:auto!important;overscroll-behavior:contain;}
  body :is(.learning-modal,.solution-overlay,.contact-us-overlay,.certificate-send-overlay)>:is(section,form),body :is(.worksheet-builder,.compact-share-dialog,.certificate-send-dialog,.action-modal,.solution-window,.contact-us-window){box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;margin:0 auto!important;overflow:auto!important;}
  body :is(.worksheet-builder,.compact-share-dialog,.certificate-send-dialog,.action-modal,.solution-window) :is(header,footer){flex-wrap:wrap!important;gap:10px!important;height:auto!important;}
  body :is(.learning-shell,.student-area,.worksheet-builder,.resource-bank,.sl-page,.action-modal) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){box-sizing:border-box!important;min-width:0!important;max-width:100%!important;font-size:16px!important;}
  body :is(.results-table-wrap,.solution-window,.data-table-wrap,.pdf-work,.pdf-sheet){min-width:0!important;max-width:100%!important;overflow-x:auto!important;}
  body :is(.sl-header,.sl-selects,.sl-session-head,.sl-question-actions,.sl-session-progress){max-width:100%!important;min-width:0!important;flex-wrap:wrap!important;height:auto!important;gap:10px!important;}
  body .sl-selects label{flex:1 1 140px!important;min-width:0!important;max-width:100%!important;}
  body .sl-workspace.is-active{display:flex!important;flex-direction:column!important;gap:14px!important;}
  body .sl-workspace.is-active :is(.sl-session,.sl-question-reading){box-sizing:border-box!important;min-width:0!important;width:100%!important;max-width:100%!important;height:auto!important;max-height:none!important;overflow:visible!important;}
  body .sl-workspace.is-active .sl-session{position:relative!important;min-height:0!important;}
  body .sl-workspace.is-active .sl-journey{width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;max-height:none!important;}
  body .sl-question-reading :is(svg,img,math){max-width:100%!important;}
  body .sl-session .sl-question-actions{position:relative!important;inset:auto!important;display:flex!important;flex-wrap:wrap!important;padding:12px!important;}
  body .sl-session :is(.sl-prompt,.sl-choices button){white-space:normal!important;overflow-wrap:anywhere!important;max-width:100%!important;min-width:0!important;}
  body .sl-session .sl-choices{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 }
 @media (max-width:600px) {
  body :is(.teacher-class-title-row,.teacher-classes-heading,.class-file-head,.module-toolbar,.learning-title){width:100%!important;}
  body :is(.teacher-leaders ol,.class-list,.student-grid,.student-grid-all,.module-grid,.student-modules,.bank-cards,.class-certificate-voice-pair,.form-grid,.bank-worksheet-options,.sl-session .sl-choices){grid-template-columns:minmax(0,1fr)!important;}
  body :is(.teacher-top-actions,.brochure-main-actions,.portal-tools,.class-hub-tabs,.learning-create-actions)>:is(button,a,label){flex-basis:calc(50% - 8px)!important;}
  body .module-toolbar>:is(button,b){flex:1 1 auto!important;}
  body :is(.role-heading,.learning-title,.class-file-head) h1{font-size:25px!important;line-height:1.4!important;}
  body .sl-session .sl-prompt{font-size:21px!important;line-height:1.7!important;}
  body .sl-session :is(button,input){font-size:16px!important;min-height:44px!important;}
 }
}
@layer majdhub-mobile {
 @media(max-width:900px){
  body :is(#teacher-header-actions-host,#self-learning-language-host){display:block!important;min-width:0!important;max-width:100%!important;flex:1 1 100%!important;}
  body .brochure-main-message{width:100%!important;min-width:0!important;text-align:center!important;}
  body .brochure-main-message strong{white-space:normal!important;overflow-wrap:anywhere!important;font-size:22px!important;line-height:1.4!important;}
  body :is(.student-area>header,.student-welcome){transform:none!important;translate:none!important;inset:auto!important;}
 }
}
@layer majdhub-mobile {
 @media(max-width:900px){
  body :is(.student-grid,.student-grid-all,.class-list,.student-modules,.module-grid)>:is(article,button,a){position:relative!important;inset:auto!important;transform:none!important;translate:none!important;scale:none!important;rotate:none!important;margin-inline:0!important;}
 }
}
@layer majdhub-mobile {
 @media(max-width:900px){
  body :is(.class-certificate-voice-pair,.sl-session-head,.sl-question-actions) button,body .class-certificate-voice-pair a{box-sizing:border-box!important;min-height:44px!important;height:auto!important;max-height:none!important;font-size:16px!important;line-height:1.45!important;white-space:normal!important;}
 }
}
/* Phone layout follows document flow, independently of the desktop editor geometry. */
@layer majdhub-mobile{
 @media(max-width:900px){
  body :is(.portal.role-teacher,.student-area){--design-toolButtons-x:0px!important;--design-toolButtons-y:0px!important;}
  body :is(.teacher-heading-actions,.class-file-head>div:last-of-type,.class-action-tools,.student-welcome-tools,.subject-switcher,.student-header-session,.student-header-identity,.student-header-left,.student-header-details,.student-engagement-hub){box-sizing:border-box!important;position:relative!important;inset:auto!important;transform:none!important;translate:none!important;rotate:none!important;scale:none!important;float:none!important;min-width:0!important;max-width:100%!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;grid-area:auto!important;grid-column:auto!important;grid-row:auto!important;}
  body :is(.teacher-heading-actions,.class-file-head>div:last-of-type,.class-action-tools,.class-hub-tabs,.portal-tools,.student-welcome-tools){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:minmax(56px,auto)!important;align-items:stretch!important;gap:10px!important;padding:0!important;}
  body :is(.teacher-heading-actions,.class-file-head>div:last-of-type,.class-hub-tabs,.portal-tools,.student-welcome-tools)>*{box-sizing:border-box!important;position:relative!important;inset:auto!important;transform:none!important;translate:none!important;rotate:none!important;scale:none!important;min-width:0!important;max-width:100%!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;grid-column:auto!important;grid-row:auto!important;margin:0!important;}
  body :is(.portal.role-teacher,.student-area) [data-design-button],
  body :is(.teacher-heading-actions,.class-file-head>div:last-of-type,.student-welcome-tools,.student-header-session,.subject-switcher) :is(button,a){
   box-sizing:border-box!important;position:relative!important;inset:auto!important;transform:none!important;translate:none!important;scale:none!important;rotate:none!important;min-width:0!important;max-width:100%!important;width:100%!important;height:auto!important;min-height:48px!important;max-height:none!important;margin:0!important;padding:10px!important;white-space:normal!important;overflow-wrap:anywhere!important;font-size:16px!important;line-height:1.45!important;letter-spacing:normal!important;flex-shrink:1!important;grid-area:auto!important;grid-column:auto!important;grid-row:auto!important;
  }
  body :is(.portal.role-teacher,.student-area) [data-design-button] :is(span,strong,b,small){font-size:inherit!important;line-height:inherit!important;white-space:normal!important;overflow-wrap:anywhere!important;min-width:0!important;}
  body :is(.class-certificate-voice-pair,.student-engagement-hub){grid-column:1/-1!important;display:flex!important;flex-wrap:wrap!important;gap:10px!important;}
  body .class-certificate-voice-pair>*{flex:1 1 140px!important;width:auto!important;}
  body .student-welcome{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:16px!important;padding:16px!important;}
  body .student-welcome .subject-total{position:relative!important;inset:auto!important;transform:none!important;align-self:center!important;flex:none!important;}
  body .student-area>header{position:relative!important;top:auto!important;}
  body :is(.student-header-left,.student-header-identity){display:flex!important;flex-wrap:wrap!important;gap:12px!important;}
  body .student-header-details{flex:1 1 180px!important;}
  body .student-header-details :is(h1,b,small){white-space:normal!important;overflow-wrap:anywhere!important;}
  body .student-header-session{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
  body .student-area .notification-badge{position:relative!important;inset:auto!important;transform:none!important;align-self:stretch!important;min-height:48px!important;}
  body .subject-switcher{display:flex!important;flex-wrap:wrap!important;gap:8px!important;overflow:visible!important;padding:12px!important;}
  body .subject-switcher>strong{flex-basis:100%!important;}
  body .subject-switcher>button{flex:1 1 140px!important;width:auto!important;min-width:0!important;}
  body .student-modules article{box-sizing:border-box!important;position:relative!important;transform:none!important;inset:auto!important;height:auto!important;min-width:0!important;max-width:100%!important;}
  body .student-modules article footer{display:flex!important;flex-wrap:wrap!important;gap:10px!important;min-width:0!important;}
  body .student-modules article footer>*{flex:1 1 140px!important;min-width:0!important;}
  body .design-published-layer{position:relative!important;inset:auto!important;display:flex!important;flex-direction:column!important;gap:8px!important;height:auto!important;min-height:0!important;}
  body .design-published-layer>[data-design-block]{position:relative!important;inset:auto!important;transform:none!important;box-sizing:border-box!important;min-width:0!important;max-width:100%!important;width:auto!important;height:auto!important;min-height:0!important;overflow-wrap:anywhere!important;}
  body .design-published-layer>[data-design-block] img{max-width:100%!important;max-height:180px!important;object-fit:contain!important;}
 }
 @media(max-width:359px){
  body :is(.teacher-heading-actions,.class-file-head>div:last-of-type,.class-hub-tabs,.portal-tools,.student-welcome-tools,.student-header-session){grid-template-columns:minmax(0,1fr)!important;}
 }
}
