/* Complete labels and a clear work area, including narrower teaching screens. */
#teacherView .teacher-heading{height:auto!important;min-height:92px!important;align-items:flex-start!important;gap:16px!important}
#teacherView .teacher-heading .teacher-course{display:flex!important;flex-direction:column!important;align-items:flex-start!important;flex:1 1 auto!important;width:auto!important;max-width:none!important;min-width:0!important;gap:5px!important}
#teacherView .teacher-course #teacherLesson,#teacherView .teacher-course #teacherStatus{white-space:normal!important;text-overflow:clip!important;overflow:visible!important;max-width:none!important;width:auto!important;line-height:1.4!important;overflow-wrap:anywhere}
#teacherView .pzb-v2-lesson-name>strong:empty{display:none!important}
#teacherView .pzb-v2-lesson-name .pzb-v2-lesson-link{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere}
#teacherView .pzb-v2-course-context{display:none!important}
#teacherView .notes-pane .notes-foot{height:auto!important;min-height:74px!important;display:flex!important;flex-wrap:wrap!important;gap:6px!important;align-items:center!important;justify-content:space-between!important;padding:10px!important}
#teacherView .notes-pane .notes-copy{min-height:0!important;overflow-y:auto!important}
#teacherView .notes-pane .note-tabs{flex-wrap:wrap!important;height:auto!important}

/* BKF uses the same native filmstrip as the other lessons. */
#teacherView[data-course="bkf"].pzb-v2-lesson .pzb-lesson-sidebar .teaching-mid{display:flex!important;flex-direction:column!important;flex:1 1 36%!important;min-height:180px!important;overflow:hidden!important}
#teacherView[data-course="bkf"] .teaching-mid .pane-head{height:auto!important;min-height:52px!important;flex-wrap:wrap!important}
#teacherView[data-course="bkf"] #slideStrip{display:flex!important;flex-direction:column!important;overflow-y:auto!important;overflow-x:hidden!important;min-height:0!important;flex:1!important;height:auto!important}
#teacherView[data-course="bkf"] #slideStrip .slide-card{width:100%!important;max-width:none!important;min-width:0!important;flex:0 0 auto!important;min-height:52px!important}
.bkf-module-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:18px 0 28px;padding:0 10px}
.bkf-module-tile{display:flex;flex-direction:column;gap:12px;border:1px solid #d7e2d2;border-radius:14px;background:#fffdf6;padding:22px;color:#263d36}
.bkf-module-tile h2{font-size:20px;line-height:1.35;margin:0}.bkf-module-tile p{font-size:14px;line-height:1.5;margin:0}.bkf-module-tile small{color:#637465}.bkf-module-tile button{margin-top:auto;white-space:normal}
#courseView[data-course="bkf"][data-bkf-selecting="true"] .pzb-v3-course-shell{display:none!important}
#courseView[data-course="bkf"] .course-stats,#courseView[data-course="bkf"] .course-exams{display:none!important}
#courseView:not([data-course="bkf"]) #bkfChangeModule,#courseView:not([data-course="bkf"]) #bkfModulePicker{display:none!important}
#courseView .bkf-module-picker[hidden]{display:none!important}
#courseView[data-course="bkf"] #dayNumber{max-width:100%;white-space:normal}
#courseView[data-course="bkf"] .course-head{max-width:none!important}
#courseView[data-course="bkf"][data-bkf-selecting="true"]{overflow-y:auto!important;display:block!important}
@media(min-width:1100px){
 #teacherView[data-course].pzb-v5-workspace .pzb-lesson-shell{display:grid!important;grid-template-columns:minmax(205px,22%) minmax(0,1fr) minmax(250px,26%)!important;grid-template-rows:minmax(0,1fr)!important;align-items:stretch!important;min-height:0!important}
 #teacherView[data-course].pzb-v5-workspace .pzb-lesson-sidebar{grid-column:1!important;grid-row:1!important;min-height:0!important;overflow:hidden!important}
 #teacherView[data-course].pzb-v5-workspace .pzb-lesson-center{grid-column:2!important;grid-row:1!important;min-width:0!important;min-height:0!important}
 #teacherView[data-course].pzb-v5-workspace .pzb-lesson-right{grid-column:3!important;grid-row:1!important;position:static!important;top:auto!important;min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
 #teacherView[data-course].pzb-v5-workspace .notes-pane{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;height:auto!important;overflow:hidden!important}
 #teacherView[data-course].pzb-v5-workspace .notes-pane .notes-copy{flex:1 1 auto!important;min-height:0!important}
 #teacherView[data-course].pzb-v5-workspace .notes-pane .notes-foot,#teacherView[data-course].pzb-v5-workspace .notes-pane .note-tabs,#teacherView[data-course].pzb-v5-workspace .notes-pane .pane-head{flex:0 0 auto!important}
 #teacherView[data-course].pzb-v5-workspace .pzb-v2-side-actions{flex:0 0 auto!important}
 #courseView[data-course].pzb-v4-course .pzb-v3-course-shell{display:grid!important;grid-template-columns:minmax(185px,22%) minmax(0,1fr) minmax(220px,25%)!important;grid-template-rows:minmax(0,1fr)!important}
 #courseView[data-course].pzb-v4-course .pzb-v3-course-side{grid-column:1!important;grid-row:1!important}
 #courseView[data-course].pzb-v4-course .pzb-v3-course-center{grid-column:2!important;grid-row:1!important;min-width:0!important}
 #courseView[data-course].pzb-v4-course .pzb-v3-course-actions{grid-column:3!important;grid-row:1!important;position:static!important;overflow-y:auto!important}
}
@media(max-width:1099px){
 html:has(body[data-pzb-view="teacher"]),html:has(body[data-pzb-view="course"]),body[data-pzb-view="teacher"],body[data-pzb-view="course"]{height:auto!important;overflow-y:auto!important}
 body[data-pzb-view="teacher"] #protected.pzb-v2-ready,body[data-pzb-view="course"] #protected.pzb-v2-ready{height:auto!important;overflow:visible!important}
 #teacherView[data-course].pzb-v5-workspace,#courseView[data-course].pzb-v4-course{height:auto!important;max-height:none!important;overflow:visible!important}
 #teacherView[data-course].pzb-v5-workspace .pzb-lesson-shell,#courseView[data-course].pzb-v4-course .pzb-v3-course-shell{display:flex!important;flex-direction:column!important;height:auto!important;max-height:none!important}
 #teacherView[data-course].pzb-v5-workspace .pzb-lesson-shell>*,#courseView[data-course].pzb-v4-course .pzb-v3-course-shell>*{width:100%!important;max-width:none!important}
 #teacherView[data-course].pzb-v5-workspace .pzb-lesson-sidebar{max-height:650px!important;overflow-y:auto!important}
 #teacherView[data-course].pzb-v5-workspace .presentation-pane{height:450px!important;min-height:450px!important}
 #teacherView[data-course].pzb-v5-workspace .notes-pane{height:580px!important;min-height:0!important;max-height:580px!important}
 #teacherView[data-course].pzb-v5-workspace .pzb-lesson-right{position:static!important;overflow:visible!important}
}
@media(max-width:1099px){.bkf-module-picker{grid-template-columns:repeat(2,minmax(0,1fr))}#teacherView[data-course="bkf"] .pzb-lesson-sidebar .teaching-mid{max-height:280px!important}}
@media(max-width:650px){.bkf-module-picker{grid-template-columns:1fr}#teacherView .teacher-heading{flex-direction:column!important;align-items:stretch!important}#teacherView .teacher-heading .teacher-course{width:100%!important}}

/* Patch 2026-10-15: clearly separated teaching panes. */
#teacherView[data-course] .pzb-lesson-sidebar .pzb-v2-lesson-name,
#teacherView[data-course] .pzb-lesson-sidebar .pzb-v2-course-context{display:none!important}
#teacherView[data-course] .pzb-lesson-sidebar .teaching-mid{display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important;flex:1 1 auto!important}
#teacherView[data-course] .pzb-lesson-sidebar #slideStrip{display:flex!important;flex-direction:column!important;overflow-y:auto!important;overflow-x:hidden!important;flex:1 1 auto!important;min-height:0!important;height:auto!important}
#teacherView[data-course] .pzb-lesson-sidebar #slideStrip .slide-card{width:100%!important;max-width:100%!important;flex:0 0 auto!important}
#teacherView[data-course] .pzb-lesson-right .notes-pane{display:flex!important;flex-direction:column!important;min-height:0!important}
#teacherView[data-course] .pzb-lesson-right .note-tabs{order:0!important;flex:0 0 auto!important}
#teacherView[data-course] .pzb-lesson-right .notes-copy{order:1!important;overflow-y:auto!important;min-height:0!important;flex:1 1 auto!important}
#teacherView[data-course] .pzb-lesson-right .notes-foot{order:2!important;flex:0 0 auto!important}
#teacherView[data-course] .pzb-v2-side-actions{display:none!important}
#courseView[data-course="bkf"][data-bkf-selecting="true"] .pzb-v3-course-shell,
#courseView[data-course="bkf"][data-bkf-selecting="true"] .course-stats,
#courseView[data-course="bkf"][data-bkf-selecting="true"] .course-exams{display:none!important}
#courseView[data-course="bkf"][data-bkf-selecting="true"] #bkfChangeModule{display:none!important}
#courseView[data-course="bkf"] #bkfModulePicker:not([hidden]){display:grid!important}
@media(min-width:1100px){
#teacherView[data-course].pzb-v5-workspace .pzb-lesson-shell{grid-template-columns:minmax(230px,23%) minmax(0,1fr) minmax(300px,29%)!important}
#teacherView[data-course].pzb-v5-workspace .pzb-lesson-sidebar{display:flex!important;flex-direction:column!important;min-width:0!important}
#teacherView[data-course].pzb-v5-workspace .pzb-lesson-right{min-width:0!important}
}


/* Patch 6: actual native #elementStrip, shared by all course types. */
#teacherView .pzb-top-reveal{box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;max-height:none!important;overflow:visible!important;flex:0 0 auto!important;margin:0 0 12px!important;padding:8px!important}
#teacherView .pzb-top-reveal>.teaching-top{width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;overflow:hidden!important;margin:0!important}
#teacherView .pzb-top-reveal #elementStrip{display:flex!important;flex-flow:row nowrap!important;gap:10px!important;overflow-x:auto!important;overflow-y:hidden!important;width:100%!important;min-width:0!important;height:174px!important;max-height:174px!important;align-items:stretch!important;padding:6px!important;box-sizing:border-box!important}
#teacherView .pzb-top-reveal #elementStrip>.element-item{display:flex!important;flex-direction:column!important;box-sizing:border-box!important;flex:0 0 220px!important;width:220px!important;min-width:220px!important;max-width:220px!important;height:146px!important;min-height:0!important;overflow:hidden!important;padding:8px!important;gap:4px!important}
#teacherView .pzb-top-reveal .element-thumb,#teacherView .pzb-top-reveal .element-video-thumb{width:100%!important;max-width:202px!important;height:56px!important;min-height:0!important;max-height:56px!important;object-fit:contain!important;flex:0 0 56px!important}
#teacherView .pzb-top-reveal .element-summary,#teacherView .pzb-top-reveal .element-media-caption{min-height:0!important;max-height:56px!important;overflow:hidden!important;font-size:12px!important;line-height:1.4!important;flex:1 1 auto!important}
#teacherView .pzb-top-reveal .element-actions{display:flex!important;flex:0 0 auto!important;gap:4px!important;flex-wrap:nowrap!important;margin-top:auto!important}
#teacherView .pzb-top-reveal .element-type{flex:0 0 auto!important;font-size:11px!important}
#teacherView .pzb-top-reveal .pane-head{height:auto!important;min-height:0!important;padding:6px!important;flex-wrap:wrap!important}
#teacherView .pzb-top-reveal .pane-head>span{display:none!important}
#examTrainerView{padding:24px;overflow:auto}.pzb-exam-courses{display:flex;flex-wrap:wrap;gap:12px;margin:18px 0}.pzb-exam-results{max-width:850px}.pzb-exam-results button{margin:8px}
@media(min-width:950px) and (max-width:1099px){#teacherView[data-course].pzb-v5-workspace .pzb-lesson-shell{display:grid!important;grid-template-columns:minmax(180px,22%) minmax(0,1fr) minmax(240px,29%)!important}#teacherView[data-course].pzb-v5-workspace .pzb-lesson-shell>*{width:auto!important;min-width:0!important}}

/* Loaded after phase11: override its vertical teacher cards. */
#teacherView.pzb-11 .pzb-top-reveal #elementStrip{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;flex:0 0 174px!important;overflow-x:auto!important;overflow-y:hidden!important;height:174px!important;min-height:174px!important;max-height:174px!important}
#teacherView.pzb-11 .pzb-top-reveal #elementStrip .element-item{flex:0 0 220px!important;width:220px!important;min-width:220px!important;max-width:220px!important;height:146px!important;max-height:146px!important}
#teacherView.pzb-11 .pzb-top-reveal .teaching-top{flex:0 0 auto!important;min-height:0!important}
#teacherView .pzb-top-reveal{max-height:230px!important;overflow:hidden!important}
body[data-pzb-view="teacher"] #pzbot-v5-character{display:block!important;width:72px;height:102px}
#pzbot-v5-character[data-motion="approve"] .pzbot-photo{animation:pzb-mike-greeting .5s ease-in-out 4 alternate!important;transform-origin:50% 90%}
@keyframes pzb-mike-greeting{from{transform:rotate(-6deg)}to{transform:rotate(6deg)}}
@media(prefers-reduced-motion:reduce){#pzbot-v5-character[data-motion="approve"] .pzbot-photo{animation:none!important}}


/* MOBILE-LAYOUT-1: additions are conditional; no desktop overrides outside touch media. */
@media (max-width:1099px) and (pointer:coarse) {
 html:has(#protected),html body{height:auto!important;min-height:100svh;overflow-y:auto!important}
 html body #protected.pzb-v2-ready{height:auto!important;min-height:100svh;overflow:visible!important;--pzb-v2-side:0px}
 html body #protected.pzb-v2-ready>header.app-top{position:sticky!important;top:0;min-height:64px;height:auto;gap:8px;padding:8px 12px;z-index:55;flex-wrap:nowrap}
 html body #protected .app-top .brand{min-width:0;max-width:160px}
 #protected .app-top .brand img{width:42px;height:42px;object-fit:contain}
 #protected .app-top .brand strong{font-size:14px}
 #protected .app-top .brand small{font-size:11px;white-space:normal}
 #protected .app-top .top-center{display:none!important}
 #protected .pzb-v7-actions{gap:0!important;min-width:0}
 #protected .pzb-v7-action{padding:8px!important;min-width:44px;min-height:44px}
 #protected .pzb-v7-action>span:not(.pzb-v7-avatar){display:none}
 #protected .pzb-v7-profile{margin-left:0;padding-left:4px}
 #protected .pzb-v7-menu{width:min(330px,calc(100vw - 24px));min-width:0;max-width:calc(100vw - 24px);max-height:75svh;overflow-y:auto}
 #protected .pzb-v7-menu-item{white-space:normal!important;overflow-wrap:anywhere}
 html body #protected.pzb-v2-ready>.pzb-v2-nav{position:sticky!important;left:auto;top:64px;bottom:auto;display:flex!important;flex-direction:row!important;width:100%!important;height:auto;max-height:68px;padding:6px 10px;gap:6px;overflow-x:auto;overflow-y:hidden;border-right:0;border-bottom:1px solid #e3e9df;z-index:44;box-sizing:border-box;overscroll-behavior-x:contain}
 #protected.pzb-v2-ready>.pzb-v2-nav button{flex:0 0 auto;white-space:nowrap;min-height:44px;padding:10px 12px;font-size:14px;gap:7px}
 #protected>.pzb-v2-nav .pzb-nav-brand{display:none}
 html body #protected.pzb-v2-ready>#catalogView,html body #protected.pzb-v2-ready>#courseView,html body #protected.pzb-v2-ready>#teacherView,html body #protected.pzb-v2-ready>#examTrainerView{margin-left:0!important;width:100%!important;max-width:100%!important;min-width:0;box-sizing:border-box;padding:14px!important;height:auto!important;max-height:none!important;overflow:visible!important}
 #protected.pzb-v2-ready .pzb-home-main{padding:0 0 20px!important}
 #protected.pzb-v2-ready .pzb-home-hero{margin:0 0 18px!important;border-radius:14px;overflow:hidden}
 #protected .pzb-v2-featured,#protected .pzb-v2-shortcuts,#protected .pzb-v2-other{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 #protected .pzb-v2-home-bottom{grid-template-columns:minmax(0,1fr);gap:12px}
 #protected .pzb-v2-featured>*,#protected .pzb-v2-shortcuts>*{min-width:0;max-width:100%}
 html body #courseView[data-course].pzb-v4-course .pzb-v3-course-top{padding:18px;margin:10px 0 14px;display:block!important}
 #courseView .course-head h1{font-size:clamp(24px,4vw,30px);line-height:1.25;overflow-wrap:anywhere}
 #courseView .course-stats{min-width:0!important;flex-wrap:wrap;max-width:100%}
 html body #courseView[data-course].pzb-v4-course .pzb-v3-course-shell{display:grid!important;grid-template-columns:minmax(0,1fr) 220px!important;grid-template-rows:auto auto!important;height:auto!important;gap:12px}
 html body #courseView[data-course].pzb-v4-course .pzb-v3-course-shell>*{width:auto!important;min-width:0;max-width:100%;box-sizing:border-box;padding:16px}
 #courseView .pzb-v3-course-center{grid-column:1;grid-row:1}
 #courseView .pzb-v3-course-actions{grid-column:2;grid-row:1;position:static!important}
 #courseView .pzb-v3-course-side{grid-column:1/-1;grid-row:2}
 #courseView .pzb-v3-course-preview{min-height:300px!important}
 #courseView #courseSlides{max-height:300px;overflow-y:auto}
 #courseView .pzb10-card{width:100%;padding:18px!important;margin:0!important;box-sizing:border-box}
 #courseView .pzb10-card h2{font-size:clamp(23px,4vw,32px)!important;line-height:1.25}
 #courseView .pzb10-logo{max-width:140px;max-height:120px;object-fit:contain}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-shell{display:grid!important;grid-template-columns:minmax(0,1fr) 220px!important;grid-template-rows:auto auto!important;height:auto!important;max-height:none!important;align-items:start;gap:12px!important}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-shell>*{min-width:0!important;width:auto!important;max-width:100%!important}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-center{grid-column:1!important;grid-row:1!important}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-sidebar{grid-column:2!important;grid-row:1!important;max-height:540px!important}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-right{grid-column:1/-1!important;grid-row:2!important;position:static!important;max-height:none!important}
 html body #teacherView[data-course].pzb-v5-workspace .presentation-pane{height:440px!important;min-height:0!important;max-width:100%}
 html body #teacherView[data-course].pzb-v5-workspace .notes-pane{height:auto!important;min-height:0!important;max-height:none!important}
 html body #teacherView .notes-pane .notes-copy{max-height:55svh!important;overflow-y:auto!important;padding:16px!important}
 html body #teacherView .notes-pane .notes-copy p{font-size:16px!important;line-height:1.55!important}
 html body #teacherView .notes-pane .note-tabs{gap:4px;flex-wrap:wrap!important;height:auto!important}
 #teacherView .teacher-tools{display:flex!important;flex-wrap:wrap!important;gap:8px!important;max-width:100%}
 #teacherView .teacher-tools>*{min-width:0;max-width:100%;white-space:normal!important}
 #teacherView .pzb-top-reveal #elementStrip{overscroll-behavior-x:contain;scroll-snap-type:x proximity}
 #teacherView .pzb-top-reveal #elementStrip>.element-item{scroll-snap-align:start}
 #teacherView .notes-foot{flex-wrap:wrap!important;gap:8px!important}
 .bkf-module-picker{grid-template-columns:repeat(2,minmax(0,1fr))}
 #pzbot-v5-panel{width:min(360px,calc(100vw - 24px))!important;max-height:70svh!important;right:12px!important;bottom:max(12px,env(safe-area-inset-bottom))!important}
}
@media (max-width:650px) and (pointer:coarse) {
 #protected .pzb-v2-featured,#protected .pzb-v2-shortcuts,#protected .pzb-v2-other,.bkf-module-picker{grid-template-columns:minmax(0,1fr)}
 html body #courseView[data-course].pzb-v4-course .pzb-v3-course-shell,html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-shell{display:flex!important;flex-direction:column!important;gap:12px!important}
 html body #courseView[data-course].pzb-v4-course .pzb-v3-course-shell>*,html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-shell>*{width:100%!important;box-sizing:border-box}
 #courseView .pzb-v3-course-actions{order:0}
 #courseView .pzb-v3-course-center{order:1}
 #courseView .pzb-v3-course-side{order:2}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-center{order:0!important}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-right{order:1!important}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-sidebar{order:2!important;max-height:330px!important}
 html body #teacherView[data-course].pzb-v5-workspace .presentation-pane{height:360px!important}
 #protected .pzb-home-hero img{min-height:130px;object-fit:cover!important;object-position:left center}
 #teacherView .teacher-heading{gap:10px!important;padding:10px!important}
 #teacherView .teacher-tools .btn{font-size:14px!important;flex:1 1 130px;padding:10px!important}
}


/* MOBILE-LAYOUT-1: additions are conditional; no desktop overrides outside touch media. */
@media (max-width:1366px) and (pointer:coarse) {
 html:has(#protected),html body{height:auto!important;min-height:100svh;overflow-y:auto!important}
 html body #protected.pzb-v2-ready{height:auto!important;min-height:100svh;overflow:visible!important;--pzb-v2-side:0px}
 html body #protected.pzb-v2-ready>header.app-top{position:sticky!important;top:0;min-height:64px;height:auto;gap:8px;padding:8px 12px;z-index:55;flex-wrap:nowrap}
 html body #protected .app-top .brand{min-width:0;max-width:160px}
 #protected .app-top .brand img{width:42px;height:42px;object-fit:contain}
 #protected .app-top .brand strong{font-size:14px}
 #protected .app-top .brand small{font-size:11px;white-space:normal}
 #protected .app-top .top-center{display:none!important}
 #protected .pzb-v7-actions{gap:0!important;min-width:0}
 #protected .pzb-v7-action{padding:8px!important;min-width:44px;min-height:44px}
 #protected .pzb-v7-action>span:not(.pzb-v7-avatar){display:none}
 #protected .pzb-v7-profile{margin-left:0;padding-left:4px}
 #protected .pzb-v7-menu{width:min(330px,calc(100vw - 24px));min-width:0;max-width:calc(100vw - 24px);max-height:75svh;overflow-y:auto}
 #protected .pzb-v7-menu-item{white-space:normal!important;overflow-wrap:anywhere}
 html body #protected.pzb-v2-ready>.pzb-v2-nav{position:sticky!important;left:auto;top:64px;bottom:auto;display:flex!important;flex-direction:row!important;width:100%!important;height:auto;max-height:68px;padding:6px 10px;gap:6px;overflow-x:auto;overflow-y:hidden;border-right:0;border-bottom:1px solid #e3e9df;z-index:44;box-sizing:border-box;overscroll-behavior-x:contain}
 #protected.pzb-v2-ready>.pzb-v2-nav button{flex:0 0 auto;white-space:nowrap;min-height:44px;padding:10px 12px;font-size:14px;gap:7px}
 #protected>.pzb-v2-nav .pzb-nav-brand{display:none}
 html body #protected.pzb-v2-ready>#catalogView,html body #protected.pzb-v2-ready>#courseView,html body #protected.pzb-v2-ready>#teacherView,html body #protected.pzb-v2-ready>#examTrainerView{margin-left:0!important;width:100%!important;max-width:100%!important;min-width:0;box-sizing:border-box;padding:14px!important;height:auto!important;max-height:none!important;overflow:visible!important}
 #protected.pzb-v2-ready .pzb-home-main{padding:0 0 20px!important}
 #protected.pzb-v2-ready .pzb-home-hero{margin:0 0 18px!important;border-radius:14px;overflow:hidden}
 #protected .pzb-v2-featured,#protected .pzb-v2-shortcuts,#protected .pzb-v2-other{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 #protected .pzb-v2-home-bottom{grid-template-columns:minmax(0,1fr);gap:12px}
 #protected .pzb-v2-featured>*,#protected .pzb-v2-shortcuts>*{min-width:0;max-width:100%}
 html body #courseView[data-course].pzb-v4-course .pzb-v3-course-top{padding:18px;margin:10px 0 14px;display:block!important}
 #courseView .course-head h1{font-size:clamp(24px,4vw,30px);line-height:1.25;overflow-wrap:anywhere}
 #courseView .course-stats{min-width:0!important;flex-wrap:wrap;max-width:100%}
 html body #courseView[data-course].pzb-v4-course .pzb-v3-course-shell{display:grid!important;grid-template-columns:minmax(0,1fr) 220px!important;grid-template-rows:auto auto!important;height:auto!important;gap:12px}
 html body #courseView[data-course].pzb-v4-course .pzb-v3-course-shell>*{width:auto!important;min-width:0;max-width:100%;box-sizing:border-box;padding:16px}
 #courseView .pzb-v3-course-center{grid-column:1;grid-row:1}
 #courseView .pzb-v3-course-actions{grid-column:2;grid-row:1;position:static!important}
 #courseView .pzb-v3-course-side{grid-column:1/-1;grid-row:2}
 #courseView .pzb-v3-course-preview{min-height:300px!important}
 #courseView #courseSlides{max-height:300px;overflow-y:auto}
 #courseView .pzb10-card{width:100%;padding:18px!important;margin:0!important;box-sizing:border-box}
 #courseView .pzb10-card h2{font-size:clamp(23px,4vw,32px)!important;line-height:1.25}
 #courseView .pzb10-logo{max-width:140px;max-height:120px;object-fit:contain}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-shell{display:grid!important;grid-template-columns:minmax(0,1fr) 220px!important;grid-template-rows:auto auto!important;height:auto!important;max-height:none!important;align-items:start;gap:12px!important}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-shell>*{min-width:0!important;width:auto!important;max-width:100%!important}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-center{grid-column:1!important;grid-row:1!important}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-sidebar{grid-column:2!important;grid-row:1!important;max-height:540px!important}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-right{grid-column:1/-1!important;grid-row:2!important;position:static!important;max-height:none!important}
 html body #teacherView[data-course].pzb-v5-workspace .presentation-pane{height:440px!important;min-height:0!important;max-width:100%}
 html body #teacherView[data-course].pzb-v5-workspace .notes-pane{height:auto!important;min-height:0!important;max-height:none!important}
 html body #teacherView .notes-pane .notes-copy{max-height:55svh!important;overflow-y:auto!important;padding:16px!important}
 html body #teacherView .notes-pane .notes-copy p{font-size:16px!important;line-height:1.55!important}
 html body #teacherView .notes-pane .note-tabs{gap:4px;flex-wrap:wrap!important;height:auto!important}
 #teacherView .teacher-tools{display:flex!important;flex-wrap:wrap!important;gap:8px!important;max-width:100%}
 #teacherView .teacher-tools>*{min-width:0;max-width:100%;white-space:normal!important}
 #teacherView .pzb-top-reveal #elementStrip{overscroll-behavior-x:contain;scroll-snap-type:x proximity}
 #teacherView .pzb-top-reveal #elementStrip>.element-item{scroll-snap-align:start}
 #teacherView .notes-foot{flex-wrap:wrap!important;gap:8px!important}
 .bkf-module-picker{grid-template-columns:repeat(2,minmax(0,1fr))}
 #pzbot-v5-panel{width:min(360px,calc(100vw - 24px))!important;max-height:70svh!important;right:12px!important;bottom:max(12px,env(safe-area-inset-bottom))!important}
}
@media (max-width:650px) and (pointer:coarse) {
 #protected .pzb-v2-featured,#protected .pzb-v2-shortcuts,#protected .pzb-v2-other,.bkf-module-picker{grid-template-columns:minmax(0,1fr)}
 html body #courseView[data-course].pzb-v4-course .pzb-v3-course-shell,html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-shell{display:flex!important;flex-direction:column!important;gap:12px!important}
 html body #courseView[data-course].pzb-v4-course .pzb-v3-course-shell>*,html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-shell>*{width:100%!important;box-sizing:border-box}
 #courseView .pzb-v3-course-actions{order:0}
 #courseView .pzb-v3-course-center{order:1}
 #courseView .pzb-v3-course-side{order:2}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-center{order:0!important}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-right{order:1!important}
 html body #teacherView[data-course].pzb-v5-workspace .pzb-lesson-sidebar{order:2!important;max-height:330px!important}
 html body #teacherView[data-course].pzb-v5-workspace .presentation-pane{height:360px!important}
 #protected .pzb-home-hero img{min-height:130px;object-fit:cover!important;object-position:left center}
 #teacherView .teacher-heading{gap:10px!important;padding:10px!important}
 #teacherView .teacher-tools .btn{font-size:14px!important;flex:1 1 130px;padding:10px!important}
}

/* MOBILE-2: all additions are limited to compact touch screens. */
@media (max-width:1366px) and (pointer:coarse){
 #overlay:not([hidden]){padding:12px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom));box-sizing:border-box;overscroll-behavior:contain}
 html body #overlay .dialog{width:min(900px,100%);max-width:100%;max-height:calc(100svh - 24px);display:flex;flex-direction:column;overflow:hidden;margin:auto;box-sizing:border-box}
 html body #overlay .dialog-header{flex:0 0 auto;flex-wrap:wrap;padding:12px;gap:8px}
 #overlay .dialog-header h2{font-size:21px;line-height:1.25;min-width:0;overflow-wrap:anywhere;margin:0;flex:1 1 160px}
 html body #overlay #dialogBody{min-height:0;overflow:auto;overscroll-behavior:contain;padding:14px;overflow-wrap:anywhere}
 #dialogBody>*{max-width:100%;box-sizing:border-box}
 #dialogBody .dialog-grid{display:grid!important;grid-template-columns:1fr!important;gap:14px}
 #dialogBody .dialog-grid>*{min-width:0}
 #dialogBody .dialog-qr{max-width:min(240px,100%);height:auto;display:block;margin:auto}
 #dialogBody a{overflow-wrap:anywhere}
 #dialogBody .pzb-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 #dialogBody .pzb-field,#dialogBody fieldset{min-width:0;max-width:100%;box-sizing:border-box}
 #dialogBody .pzb-actions,#dialogBody .exam-actions,#dialogBody .exam-person{display:flex;flex-wrap:wrap;gap:10px}
 #dialogBody button,#dialogBody .btn{white-space:normal;overflow-wrap:anywhere;min-height:44px;max-width:100%;box-sizing:border-box;line-height:1.35}
 #dialogBody .pzb-person,#dialogBody .person-line,#dialogBody .event-line{flex-wrap:wrap;gap:10px;min-width:0}
 #dialogBody .pzb-person strong,#dialogBody .exam-person b{min-width:0;overflow-wrap:anywhere}
 #dialogBody .pzb-exercise,#dialogBody .pzb-grade-item{gap:12px;min-width:0}
 #dialogBody .pzb-exercise span,#dialogBody .pzb-grade-item span{min-width:0;overflow-wrap:anywhere}
 #dialogBody .pzb-grade-group legend{max-width:100%;white-space:normal;box-sizing:border-box}
 #dialogBody .signature{display:block;width:100%;max-width:100%;height:160px;box-sizing:border-box;touch-action:none}
 #dialogBody .confirm,#dialogBody .pzb-checkline{min-height:44px;align-items:center;gap:12px}
 #dialogBody input[type=checkbox],#dialogBody input[type=radio]{flex:0 0 22px;width:22px;height:22px}
 #pzb-admin-register,.pzb-calendar-backdrop,#pzb-d13{padding:12px!important;box-sizing:border-box;overscroll-behavior:contain}
 #pzb-admin-register .pzb-reg-dialog{width:min(900px,100%);height:min(850px,calc(100svh - 24px));max-width:100%;max-height:calc(100svh - 24px)}
 #pzb-admin-register .pzb-reg-dialog header{padding:14px;gap:10px;flex:none}
 #pzb-admin-register h2{font-size:23px;overflow-wrap:anywhere}
 #pzb-admin-register .pzb-reg-search{padding:12px 14px;flex:none}
 #pzb-admin-register .pzb-reg-results{padding:0 14px 14px;overscroll-behavior:contain}
 #pzb-admin-register .pzb-reg-row{flex-wrap:wrap;padding:12px;gap:10px;overflow-wrap:anywhere}
 #pzb-admin-register .pzb-reg-row>div{min-width:0;flex:1 1 230px}
 #pzb-admin-register a{white-space:normal;min-height:44px;display:inline-flex;align-items:center}
 #pzb-admin-register button{min-width:44px;min-height:44px;white-space:normal}
 .pzb-calendar-backdrop .pzb-calendar-dialog{width:min(520px,100%);max-height:calc(100svh - 24px);overflow:auto;box-sizing:border-box;padding:18px}
 .pzb-calendar-dialog input{min-width:0;max-width:100%;font-size:16px}
 .pzb-calendar-dialog-actions button{min-height:44px;white-space:normal}
 #pzb-d13>section{width:min(700px,100%)!important;max-width:100%;max-height:calc(100svh - 24px)!important;padding:16px!important;box-sizing:border-box}
 #pzb-d13 article{flex-wrap:wrap;overflow-wrap:anywhere}
 #examTrainerView .pzb-exam-courses{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 #examTrainerView button{white-space:normal;max-width:100%;min-width:0;min-height:44px}
 #examTrainerView .pzb-exam-results{overflow-wrap:anywhere}
 #examTrainerView .pzb-exam-results>.btn{margin:6px 6px 6px 0}
 #teacherView .slide-footer{height:auto!important;min-height:0;flex-wrap:wrap;gap:10px;padding:10px;flex-shrink:0}
 #teacherView .slide-footer>div{display:flex;flex-wrap:wrap;gap:6px;max-width:100%}
 #teacherView .slide-footer .btn,#teacherView .note-tabs .tab{min-height:44px;white-space:normal}
 #teacherView .presentation-pane{display:flex;flex-direction:column}
 #teacherView #teacherSlide{min-height:150px!important;flex:1 1 auto;min-width:0}
 #teacherView #pzb113Nav{display:flex!important;flex-direction:column;min-height:150px;max-height:360px;overflow:hidden}
 #teacherView #pzb113Nav .pzb113-list{overflow:auto;overscroll-behavior:contain}
 #teacherView .teacher-course,#teacherView .teacher-heading{min-width:0;max-width:100%;overflow-wrap:anywhere}
 #protected #pzbTeacherLanguageControl{max-width:100%;flex-wrap:wrap;margin:0!important}
 #protected .pzb-v7-menu-item{box-sizing:border-box;max-width:100%;min-height:44px}
 .pzb-dashboard-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
 .pzb-dashboard-action-copy{min-width:0;overflow-wrap:anywhere}
 .pzb-calendar-event{flex-wrap:wrap}
 .pzb-calendar-info{flex-basis:140px;overflow-wrap:anywhere}
 .pzb-calendar-panel>h3{padding-right:0}
 .pzb-calendar-add{position:static;margin:8px 0;min-height:44px}
 .history-row{grid-template-columns:minmax(0,1fr);gap:8px}
 .course-controls,.course-exam-actions{flex-wrap:wrap;gap:10px}
 .course-exam-link{min-width:0;white-space:normal}
 .course-exam-link small{white-space:normal;overflow-wrap:anywhere}
}
@media (max-width:650px) and (pointer:coarse){
 #dialogBody .pzb-form-grid,#examTrainerView .pzb-exam-courses,.pzb-dashboard-actions{grid-template-columns:minmax(0,1fr)}
 #dialogBody .pzb-exercise,#dialogBody .pzb-grade-item{display:flex;flex-direction:column;align-items:stretch}
 #dialogBody .pzb-exercise select,#dialogBody .pzb-grade-item select{width:100%;min-width:0}
 #dialogBody .pzb-actions>*,#dialogBody .exam-actions>*{flex:1 1 180px;text-align:center;justify-content:center}
 #teacherView .presentation-pane{height:auto!important;min-height:360px!important}
 #teacherView #teacherSlide{height:52vw!important;min-height:160px!important;flex:0 0 auto}
 #teacherView .notes-pane .notes-copy{max-height:none!important}
 #teacherView .notes-foot>.btn{flex:1 1 110px}
 #teacherView .teacher-tools>label{flex:1 1 100%}
}
@media (max-width:1366px) and (pointer:coarse){
 html body #overlay:not([hidden]){position:fixed;inset:0;z-index:1000000!important}
 html body dialog{max-height:calc(100svh - 24px);max-width:calc(100vw - 24px);overflow:auto;box-sizing:border-box;overscroll-behavior:contain}
 html body #pzb28-materials{width:min(850px,calc(100vw - 24px));max-height:calc(100svh - 24px);padding:16px;overflow-wrap:anywhere}
 #pzb28-materials label{display:flex;align-items:center;gap:10px;min-height:44px}
}
