/* Shared, content-driven layout for learner pages and administration. */
html{box-sizing:border-box;-webkit-text-size-adjust:100%;text-size-adjust:100%}*,*:before,*:after{box-sizing:inherit}body{margin:0;min-width:0}img,video,iframe{max-width:100%}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,input,select,textarea{font-size:16px}button{touch-action:manipulation;min-height:40px}input,select,textarea{min-width:0}p,h1,h2,h3{overflow-wrap:anywhere}[hidden]{display:none!important}
body:has(#shell){display:block;padding:0;background:#f4f2f3}.desktop-intro{display:none!important}#shell{width:100%;max-width:1200px;margin:0 auto;min-height:100dvh;border:0;border-radius:0;overflow:visible;box-shadow:none}#app{min-height:100dvh;padding-bottom:calc(80px + env(safe-area-inset-bottom));background-color:white}#app>header{height:auto;min-height:70px;padding-top:env(safe-area-inset-top);padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right));gap:8px}.subhead{min-width:0}.subhead+.tag{flex-shrink:0}#nav{position:fixed;left:50%;transform:translateX(-50%);bottom:0;max-width:1200px;width:100%;padding-bottom:env(safe-area-inset-bottom);z-index:10}#nav button{height:64px}.schedule,.help-content{min-height:55dvh}.course-info{min-width:0}.course-list,.chapter-groups{min-height:0}.camp-banner>div{min-width:0}.filters{flex-wrap:wrap}.lesson-card h2{white-space:normal}.lesson-bottom{flex-wrap:wrap}.progress-link{min-width:0;flex-wrap:wrap;gap:8px}.calendar{gap:4px;padding-inline:14px}.day{min-width:0;padding:4px}.screen{min-height:0;aspect-ratio:16/9}.screen video{object-fit:contain}.preview-room{min-height:calc(100dvh - 145px);padding-top:clamp(25px,7vh,70px)}.preview-poster{margin-bottom:35px}.preview-reminder{flex-wrap:wrap}.preview-clock{white-space:normal}
body:is(.watching-live,.watching-replay) #app{min-height:100dvh;padding-bottom:0}body:is(.watching-live,.watching-replay) #app>header{height:auto;min-height:64px;background:white;padding-top:env(safe-area-inset-top)}body:is(.watching-live,.watching-replay) .classroom{min-height:calc(100dvh - 64px - env(safe-area-inset-top));padding-top:clamp(75px,13dvh,120px);padding-bottom:calc(100px + env(safe-area-inset-bottom));width:100%;max-width:none}body:is(.watching-live,.watching-replay) .screen{width:100%;aspect-ratio:16/9;flex-shrink:0}body:is(.watching-live,.watching-replay) .screen video{aspect-ratio:auto;height:100%;width:100%;object-fit:contain}.room-dock{bottom:calc(18px + env(safe-area-inset-bottom));left:max(14px,env(safe-area-inset-left));right:max(14px,env(safe-area-inset-right));gap:10px}.room-new-message{bottom:calc(83px + env(safe-area-inset-bottom))}.watching-replay .replay-bottom{bottom:calc(85px + env(safe-area-inset-bottom));z-index:4;background:linear-gradient(transparent,#333b);padding:8px;border-radius:12px}.replay-top,.live-overlay{top:22px}.watching-replay .replay-center{gap:clamp(20px,7vw,45px)}.history-items,.comments-list{overscroll-behavior:contain}body:is(.watching-live,.watching-replay) .history-items,body:is(.watching-live,.watching-replay) .comments-list{max-height:clamp(130px,25dvh,320px)}
dialog{max-height:calc(var(--visual-height,100dvh) - 24px);max-width:calc(100vw - 24px);overscroll-behavior:contain}dialog.room-sheet{bottom:var(--keyboard-offset,0px);height:calc(var(--visual-height,100dvh)*.55);max-height:calc(var(--visual-height,100dvh) - 12px);padding-bottom:max(18px,env(safe-area-inset-bottom));max-width:calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right))}.room-sheet:has(.room-more-grid){height:330px;max-height:calc(var(--visual-height,100dvh) - 12px)}.room-sheet:has(#room-feedback-form){height:calc(var(--visual-height,100dvh)*.75)}.room-sheet #dialog-content{overflow:auto}.room-sheet:has(.sheet-inbox) #dialog-content{overflow:hidden}.sheet-inbox{overscroll-behavior:contain}.room-sheet .close-modal{min-width:44px;min-height:44px;top:4px;right:8px}#private-reply-form{flex-wrap:wrap}#private-reply-body{flex-basis:160px}#toast,#manage-toast{bottom:calc(90px + env(safe-area-inset-bottom) + var(--keyboard-offset,0px))}
.admin-body{padding:max(18px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));display:block}.admin-wrap{width:100%;max-width:760px;padding:clamp(18px,4vw,32px)}.support-wrap{width:100%;padding:clamp(12px,2vw,24px)}.support-grid>*{min-width:0}.support-grid section{padding:clamp(15px,2vw,24px)}.sidebar{overflow-y:auto}.workspace{min-width:0}.table-wrap{max-width:100%;overscroll-behavior-x:contain}.table-wrap table{min-width:620px}.toolbar input{max-width:100%;min-width:0}.form-grid>*{min-width:0}.pagination{flex-wrap:wrap;gap:12px}.embedded{height:calc(100dvh - 160px);min-height:450px}.workspace>header{flex-wrap:wrap}.sidebar-bottom{flex-shrink:0}.sidebar nav{flex-shrink:0}
@media(min-width:600px){.course-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding:24px}.course-list .course{margin:0;padding:18px;background:#fff;border:1px solid #f1e8e8;border-radius:14px}.chapter-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.chapter-groups>h2{grid-column:1/-1}.chapter-group{margin:0}.camp-banner{padding:28px;align-items:center}.camp-banner img{max-width:260px}.schedule{padding:28px}.menu{max-width:850px;margin:auto}.preview-poster{width:min(640px,calc(100% - 40px));margin-inline:auto}.preview-bottom{padding-inline:max(25px,calc((100% - 680px)/2))}.class-info,.system-directory{padding-inline:24px}.broadcast-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.broadcast-list>.manage-link{grid-column:1/-1}}
@media(min-width:1000px){body:has(#shell){padding:24px}#shell{min-height:calc(100dvh - 48px);border-radius:18px;box-shadow:0 12px 50px #45202c0c;overflow:clip}#app{min-height:calc(100dvh - 48px)}#nav{width:calc(100% - 48px)}body:is(.watching-live,.watching-replay) .classroom{display:grid;grid-template-columns:minmax(0,1fr) 300px;grid-template-rows:1fr;gap:20px;align-items:start;min-height:calc(100dvh - 112px);padding:85px 22px 120px}body:is(.watching-live,.watching-replay) .screen{grid-column:1;grid-row:1;align-self:center}body:is(.watching-live,.watching-replay) .replay-history,body:is(.watching-live,.watching-replay) .live-comments{grid-column:2;grid-row:1;margin:0;align-self:center;width:100%}body:is(.watching-live,.watching-replay) .history-items,body:is(.watching-live,.watching-replay) .comments-list{max-height:55dvh}.watching-replay .replay-bottom{left:22px;right:342px;bottom:85px}.room-dock{left:auto;width:360px;right:22px}.room-new-message{left:auto;width:360px;right:22px}.course-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:750px){.sidebar{padding-top:max(14px,env(safe-area-inset-top))}.sidebar-bottom{display:flex;flex-wrap:wrap;gap:12px;margin:10px 0 0;padding:0}.sidebar-bottom small{display:none}.sidebar-bottom button,.sidebar-bottom a{font-size:13px}.sidebar nav{scrollbar-width:thin}.workspace{padding:16px 12px}.panel{padding:14px}.toolbar{align-items:stretch}.toolbar input{width:100%}.form-grid{grid-template-columns:minmax(0,1fr)}.support-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:360px){#app>header{padding-inline:12px}.tag{font-size:11px}.camp-banner{gap:10px;padding:18px 12px}.camp-banner h2{font-size:16px}.room-dock{gap:7px;left:10px;right:10px}.dock-comment>button:first-child{width:40px}.dock-comment>button:last-child{font-size:13px;padding-inline:4px}.room-dock>.dock-cart{width:35px}.room-dock>#room-menu{width:42px;height:42px}.replay-time{font-size:14px}.preview-reminder button{font-size:16px;padding:12px 16px}.more-icon-item{font-size:13px}.cards{gap:10px}.metric{padding:12px}.metric strong{font-size:26px}}
@media(orientation:landscape) and (max-height:550px){body:is(.watching-live,.watching-replay) .classroom{padding-top:65px;padding-bottom:100px;min-height:calc(100dvh - 64px)}body:is(.watching-live,.watching-replay) .screen{max-width:640px;margin:auto;aspect-ratio:16/9}.room-sheet{height:calc(var(--visual-height,100dvh)*.85)!important}.more-primary,.more-secondary{padding-block:5px}.more-icon-item{min-height:75px}.more-icon{height:42px;width:42px}.preview-room{padding-top:20px}.sidebar{position:relative;width:100%}.sidebar nav{display:flex;overflow-x:auto}.sidebar nav button{white-space:nowrap}.workspace{margin-left:0}}
body:is(.watching-live,.watching-replay) .classroom:fullscreen{min-height:100dvh;padding-top:max(70px,env(safe-area-inset-top));padding-bottom:calc(110px + env(safe-area-inset-bottom));overflow:auto}.classroom:fullscreen .room-dock{bottom:max(18px,env(safe-area-inset-bottom))}

@media(min-width:1000px){body:is(.watching-live,.watching-replay) #app{min-height:calc(100dvh - 48px)}body:is(.watching-live,.watching-replay) .classroom{padding-top:75px;padding-bottom:95px}}

dialog[open]:not(.room-sheet){position:fixed;top:calc(var(--visual-top,0px) + var(--visual-height,100dvh)/2);bottom:auto;left:0;right:0;margin:0 auto;transform:translateY(-50%)}
/* Playback controls replace the social dock instead of stacking above it. */
.watching-replay .classroom .replay-bottom{bottom:calc(18px + env(safe-area-inset-bottom));left:20px;right:20px;z-index:8;background:linear-gradient(transparent,#171717dd);padding:18px 8px 8px}
.watching-replay .classroom.replay-controls-visible .room-dock{visibility:hidden;opacity:0;pointer-events:none}
.watching-replay .classroom.replay-controls-visible .room-new-message{bottom:calc(140px + env(safe-area-inset-bottom))}
/* Fullscreen uses the entire viewport for the video, with overlay UI. */
body.room-fullscreen-active{overflow:hidden;padding:0}
body.room-fullscreen-active #shell{overflow:visible;max-width:none;border-radius:0;box-shadow:none}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded){position:fixed;inset:0;width:100%;height:100dvh;min-height:0;max-height:none;margin:0;padding:0;display:block;overflow:hidden;background:#000;z-index:1000;border-radius:0}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .screen{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;min-height:0;aspect-ratio:auto;margin:0;display:block}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .screen video{display:block;width:100%;height:100%;max-height:none;aspect-ratio:auto;object-fit:contain}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) :is(.replay-top,.live-overlay){top:0;left:0;right:0;padding:calc(14px + env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) 20px max(20px,env(safe-area-inset-left));z-index:10;background:linear-gradient(#0009,transparent)}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) :is(.replay-history,.live-comments){position:absolute;left:max(16px,env(safe-area-inset-left));bottom:calc(100px + env(safe-area-inset-bottom));width:min(420px,calc(100% - 32px));max-height:28dvh;margin:0;padding:0;z-index:3}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) :is(.history-items,.comments-list){max-height:28dvh}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .room-dock{left:max(16px,env(safe-area-inset-left));right:auto;width:min(420px,calc(100% - 32px));bottom:calc(18px + env(safe-area-inset-bottom))}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .room-new-message{left:max(16px,env(safe-area-inset-left));right:auto;width:min(420px,calc(100% - 32px))}
.watching-replay .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .replay-center{inset:0;top:0;align-items:center;z-index:2}
.watching-replay .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .replay-bottom{left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right))}
.watching-replay .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded).replay-controls-visible .replay-history{bottom:calc(145px + env(safe-area-inset-bottom))}
.classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) #live-play-status{position:absolute;top:85px;left:20px;z-index:4;background:#0008}
@media(orientation:landscape) and (max-height:550px){body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) :is(.history-items,.comments-list){max-height:22dvh}.classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .history-items article,.classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .comment-item{padding:4px 10px}.watching-replay .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .replay-bottom{padding-top:8px}.classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .replay-time{margin-top:4px}}
/* Portrait devices still enter a landscape player when orientation lock is unavailable. */
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded).room-landscape-rotated{inset:auto!important;top:50%!important;left:50%!important;width:100dvh!important;height:100dvw!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important;transform:translate(-50%,-50%) rotate(90deg);transform-origin:center}
body:is(.watching-live,.watching-replay) .classroom.room-landscape-rotated :is(.history-items,.comments-list){max-height:22dvw}
body:is(.watching-live,.watching-replay) .classroom.room-landscape-rotated :is(.replay-history,.live-comments){max-height:22dvw;width:min(360px,45dvh)}
body.room-landscape-rotated dialog.room-sheet{inset:auto!important;top:50%!important;left:50%!important;bottom:auto!important;right:auto!important;width:min(560px,calc(100dvh - 24px))!important;height:calc(85dvw - 24px)!important;max-height:calc(100dvw - 24px)!important;transform:translate(-50%,-50%) rotate(90deg)!important;border-radius:18px}
/* Spread the fullscreen social dock across the landscape player. */
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .room-dock{left:max(24px,env(safe-area-inset-left));right:max(24px,env(safe-area-inset-right));width:auto;bottom:max(20px,env(safe-area-inset-bottom));gap:14px;min-height:44px;align-items:center}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .dock-comment{flex:0 1 320px;width:40%;max-width:calc(100% - 120px);height:44px;margin-right:auto;border:1px solid #ffffff26;background:#191919b8;backdrop-filter:blur(8px)}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .dock-comment>button:first-child{width:46px;height:42px;padding:7px;flex:none}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .dock-comment>button:first-child span{font-size:20px}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .dock-comment>button:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:14px;line-height:20px;padding:10px 12px 10px 5px}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .room-dock>:is(.dock-cart,#room-menu){flex:0 0 44px;width:44px;height:44px;padding:10px;border-radius:50%;border:1px solid #ffffff26;background:#191919b8;backdrop-filter:blur(8px)}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .room-dock>.dock-cart{padding:8px}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) :is(.replay-history,.live-comments){left:max(24px,env(safe-area-inset-left));bottom:84px;width:min(440px,48%)}
body:is(.watching-live,.watching-replay) .classroom:is(:fullscreen,:-webkit-full-screen,.room-expanded) .room-new-message{left:auto;right:max(24px,env(safe-area-inset-right));width:min(320px,45%);bottom:84px}
body:is(.watching-live,.watching-replay) .classroom.room-landscape-rotated .room-dock{left:max(24px,env(safe-area-inset-top));right:max(24px,env(safe-area-inset-bottom));bottom:20px}
.screen>.autoplay-action{position:absolute;top:16px;right:16px;z-index:12;background:#171717b8;color:white;border:1px solid #ffffff60;border-radius:22px;padding:9px 16px;font-size:14px;min-height:40px;backdrop-filter:blur(6px)}
body.room-fullscreen-active .screen>.autoplay-action{top:80px;right:24px}
.directory-lesson.lesson-locked{color:#aaa;background:transparent;cursor:pointer}.directory-lesson.lesson-locked h3{color:#aaa}.directory-lesson.lesson-locked .directory-icon{opacity:.4}.directory-lesson.lesson-locked p{color:#888}.lesson-lock-icon{width:23px;height:23px;fill:none;stroke:#bbb;stroke-width:1.6;flex-shrink:0}#lesson-locked-notice{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:10000;background:#222e;color:white;border-radius:12px;padding:22px 28px;font-size:17px;white-space:nowrap;box-shadow:0 8px 30px #0002;pointer-events:none}.locked-course-preview{text-align:center;padding:24px;background:#fafafa}.locked-course-preview img{max-width:300px;width:65%;border-radius:12px}.locked-course-preview p{color:#777}.locked-course-preview small{color:#999}
