.mobile-material-tools{display:none}
@media(max-width:800px),(max-width:950px) and (max-height:500px){
 body.in-call #op-classroom #call-shell #video-stage{container-type:normal!important;contain:none!important;flex:0 0 auto!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
 body.in-call #op-classroom #call-shell #video-stage>.pc-whiteboard,body.in-call #op-classroom #call-shell #video-stage>#screen-stage{height:62dvh!important;min-height:300px!important;flex:0 0 auto!important}
 body.in-call #op-classroom #call-shell #video-stage>.mobile-material-focus{position:fixed!important;inset:0!important;width:100dvw!important;height:100dvh!important;min-height:0!important;z-index:10000!important}
 body.in-call #op-classroom #call-shell.pc-call-shell{width:100%!important;min-width:0!important;padding:8px!important;overflow:visible}
 #op-classroom #call-shell .pc-content{display:flex!important;flex-direction:column!important;width:100%!important;min-width:0!important;height:auto!important;max-height:none!important}
 #op-classroom #call-shell .pc-content>.pc-media-column{width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;overflow:visible!important;flex:none!important;display:flex!important;flex-direction:column!important}
 #op-classroom #call-shell .pc-call-toolbar{width:100%!important;min-width:0!important;height:auto!important;position:relative!important;inset:auto!important;transform:none!important;display:block!important}
 #op-classroom #call-shell .pc-video:not(.pc-sharing,.pc-whiteboard-open,.pc-presentation-open){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:auto!important;gap:6px!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;justify-content:stretch!important;align-items:stretch!important}
 #op-classroom #call-shell .pc-video:not(.pc-sharing,.pc-whiteboard-open,.pc-presentation-open)>.pc-person{position:relative!important;inset:auto!important;transform:none!important;grid-column:auto!important;grid-row:auto!important;width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:3/4!important;margin:0!important}
 #op-classroom #call-shell .pc-video.pc-solo:not(.pc-sharing,.pc-whiteboard-open,.pc-presentation-open){grid-template-columns:minmax(0,1fr)!important}
 body.in-call #op-classroom .pc-call-shell#call-shell .pc-controls{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;width:100%!important;min-width:0!important;gap:8px 4px!important;position:relative!important;inset:auto!important;transform:none!important;margin:8px 0!important}
 body.in-call #op-classroom .pc-call-shell#call-shell .pc-controls>.pc-control,body.in-call #op-classroom .pc-call-shell#call-shell .pc-controls>.pc-control:has(.pc-end){width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;flex:none!important;display:flex!important;flex-direction:column!important;align-items:center!important}
 body.in-call #op-classroom .pc-call-shell#call-shell .pc-controls>.pc-control button{width:42px!important;height:40px!important;min-height:40px!important;padding:8px!important;flex:none!important}
 body.in-call #op-classroom .pc-call-shell#call-shell .pc-controls>.pc-control small{font-size:10px!important;line-height:1.15!important;text-align:center;word-break:normal!important;overflow-wrap:normal!important}
 .mobile-material-tools{display:flex;gap:6px;align-items:center;flex:0 0 auto;padding:5px 8px;background:#e6eef7;color:#173f63;position:sticky;top:0;z-index:12}
 .mobile-material-tools button{font:inherit;font-size:13px!important;padding:6px 10px!important;min-height:32px;border:1px solid #9cb4cd!important;border-radius:6px;background:#fff!important;color:#173f63!important;white-space:nowrap}
 #op-classroom #call-shell .pc-video:is(.pc-whiteboard-open,.pc-sharing){display:flex!important;flex-direction:column!important;gap:8px!important;min-height:0!important;height:auto!important;max-height:none!important}
 #op-classroom #call-shell .pc-video:is(.pc-whiteboard-open,.pc-sharing)>:is(.pc-board-cameras,.pc-share-thumbs){display:flex!important;position:relative!important;inset:auto!important;flex:none!important;flex-direction:row!important;gap:6px!important;width:100%!important;height:90px!important;min-height:90px!important;overflow-x:auto!important}
 #op-classroom #call-shell .pc-video:is(.pc-whiteboard-open,.pc-sharing)>:is(.pc-board-cameras,.pc-share-thumbs)>.pc-person{position:relative!important;flex:1 0 100px!important;width:auto!important;height:90px!important;min-height:90px!important;max-height:90px!important;max-width:none!important;aspect-ratio:auto!important}
 #op-classroom #call-shell .pc-video>.pc-whiteboard,#op-classroom #call-shell .pc-video>#screen-stage{position:relative!important;inset:auto!important;flex:none!important;width:100%!important;min-width:0!important;height:62dvh!important;min-height:300px!important;max-height:none!important;display:flex!important;flex-direction:column!important;overflow:auto!important}
 #op-classroom #call-shell .pc-video.pc-sharing.pc-whiteboard-open>.pc-whiteboard{display:none!important}
 #op-classroom #screen-stage>video{position:relative!important;inset:auto!important;width:100%!important;height:calc(100% - 44px)!important;object-fit:contain!important;flex-shrink:0}
 #op-classroom #screen-stage.mobile-material-zoomed>video{width:calc(100% * var(--material-zoom))!important;height:calc((100% - 44px) * var(--material-zoom))!important;max-width:none!important;max-height:none!important;object-fit:contain!important}
 #op-classroom #call-shell .pc-video>.mobile-material-focus,.hosted-main>.mobile-material-focus,.teaching-stage>.mobile-material-focus{position:fixed!important;inset:0!important;width:100dvw!important;height:100dvh!important;min-height:0!important;max-height:none!important;z-index:10000!important;border-radius:0!important;background:#fff!important;display:flex!important;flex-direction:column!important;overflow:auto!important;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
 #op-classroom .mobile-material-focus .whiteboard-scroll{flex:1!important;min-height:0!important;height:auto!important}
 #op-classroom .pc-whiteboard .whiteboard-toolbar{flex-shrink:0!important}
 #op-classroom .pc-whiteboard .whiteboard-scroll{flex:1!important;min-height:0!important;overflow:auto!important;-webkit-overflow-scrolling:touch}
}
@media(max-width:800px),(max-width:950px) and (max-height:500px){
 body.in-call #op-classroom #call-shell #video-stage:is(.pc-whiteboard-open,.pc-sharing):not(.mobile-show-videos)>:is(.pc-board-cameras,.pc-share-thumbs){display:none!important}
 #op-classroom #call-shell .pc-content:has(.pc-whiteboard-open,.pc-sharing)>.pc-media-column{display:contents!important}
 #op-classroom #call-shell .pc-content:has(.pc-whiteboard-open,.pc-sharing) .pc-call-toolbar{order:3!important}
 #op-classroom #call-shell .pc-content:has(.pc-whiteboard-open,.pc-sharing)>.pc-panel{order:2!important;width:100%!important;min-width:0!important;height:36dvh!important;min-height:240px!important;max-height:none!important;position:relative!important;inset:auto!important;display:flex!important;flex-direction:column!important}
 #op-classroom #call-shell .pc-panel .pc-messages{min-height:0!important;flex:1!important;overflow:auto!important}
 #op-classroom #call-shell .pc-panel .pc-compose{flex:none!important;padding:6px!important}
 #op-classroom #call-shell .pc-panel .pc-compose textarea{height:56px!important;min-height:56px!important;max-height:100px!important}
 #op-classroom #call-shell .pc-content:has(>.pc-panel) #video-stage>.pc-whiteboard{height:48dvh!important;min-height:280px!important}
 .teaching-stage:not(.mobile-show-videos)>.tiles-rail,.hosted-main.with-board:not(.mobile-show-videos)>.hosted-grid{display:none!important}
 .call-layout:has(.teaching-stage):has(>.side:not(.ai-side))>.call-main,.hosted-layout:has(.with-board):has(>.side:not(.ai-side))>.hosted-main{display:contents!important}
 .call-layout:has(.teaching-stage) .controls,.hosted-layout:has(.with-board) .hosted-controls{order:3!important}
 .call-layout:has(.teaching-stage)>.side:not(.ai-side),.hosted-layout:has(.with-board)>.side:not(.ai-side){order:2!important;width:100%!important;height:36dvh!important;min-height:240px!important;max-height:none!important}
}
@media(max-width:800px),(max-width:950px) and (max-height:500px){
 body.in-call #op-classroom #call-shell.pc-call-shell .pc-content #video-stage>.mobile-material-focus{height:100dvh!important;min-height:0!important;position:fixed!important;inset:0!important}
 .board .demo-board-scroll{flex:1!important;min-height:0!important;overflow:auto!important}
}

@media(max-width:800px),(max-width:950px) and (max-height:500px){
 .call-shell .call-layout,.hosted-layout{display:flex!important;flex-direction:column!important;height:auto!important;min-height:0!important;overflow:visible!important}
 .call-main,.hosted-main{width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important;overflow:visible!important}
 .call-main .video-grid,.hosted-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;height:auto!important}
 .call-main .video-grid .tile,.hosted-grid .hosted-tile{height:auto!important;aspect-ratio:3/4!important;min-width:0!important;min-height:0!important;max-width:none!important;width:100%!important}
 .teaching-stage,.hosted-main.with-board{display:flex!important;flex-direction:column!important;height:auto!important;min-height:0!important}
 .teaching-stage .tiles-rail,.hosted-main.with-board .hosted-grid{display:flex!important;flex-direction:row!important;gap:6px!important;height:90px!important;min-height:90px!important;overflow-x:auto!important;flex:none!important}
 .teaching-stage .tiles-rail .tile,.hosted-main.with-board .hosted-tile{flex:1 0 100px!important;height:90px!important;aspect-ratio:auto!important;width:auto!important}
 .teaching-stage>.board,.hosted-main>.board,#hosted-share:not([hidden]){display:flex;flex-direction:column;width:100%!important;height:62dvh;min-height:300px;overflow:auto;flex:none!important}
 .board .board-editor{flex:1;min-height:0!important;overflow:auto!important;-webkit-overflow-scrolling:touch}
 .call-shell .controls,.hosted-controls{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:8px 4px!important;width:100%!important;min-width:0!important;position:relative!important;inset:auto!important;transform:none!important}
 .call-shell .controls>.control{width:100%!important;min-width:0!important;margin:0!important}
 .call-shell .controls>.control>button,.hosted-controls>button{min-width:0!important;max-width:100%!important;font-size:12px}
 .hosted-main>.mobile-material-focus,.teaching-stage>.mobile-material-focus{height:100dvh!important;min-height:0!important}
}
/* Student phone dock reserves the learning area above one compact row. */
@media(max-width:800px),(max-width:950px) and (max-height:500px){
 body.in-call #op-classroom #call-shell.pc-call-shell .pc-controls>[hidden]{display:none!important}
 body.in-call #op-classroom #call-shell.pc-call-shell .pc-video:not(.pc-sharing,.pc-whiteboard-open,.pc-presentation-open){grid-template-columns:minmax(0,1fr)!important;grid-auto-rows:minmax(160px,1fr)!important}
 body.in-call #op-classroom #call-shell.pc-call-shell .pc-video:not(.pc-sharing,.pc-whiteboard-open,.pc-presentation-open)>.pc-person{aspect-ratio:16/9!important;min-height:160px!important}
 body.in-call #op-classroom #call-shell[data-mobile-attendee=true] .pc-controls>.pc-control:has([data-act="share"],[data-act="sound"],[data-act="layout"],[data-act="devices"],[data-tool="presentation"]){display:none!important}
 body.in-call #op-classroom #call-shell[data-mobile-attendee=true] .pc-controls>[data-presentation-control]{display:none!important}
 body.in-call #op-classroom #call-shell[data-mobile-attendee=true] .pc-controls{grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:2px!important;margin:0!important}
 body.in-call #op-classroom #call-shell[data-mobile-attendee=true] .pc-controls>.pc-control button{height:34px!important;min-height:34px!important;width:40px!important;padding:5px!important}
 body.in-call #op-classroom #call-shell[data-mobile-attendee=true] .pc-controls>.pc-control{gap:2px!important}
 body.in-call #op-classroom #call-shell[data-mobile-attendee=true] .pc-controls>.pc-control small{font-size:9px!important}
 body.in-call #op-classroom #call-shell.pc-call-shell.is-expanded[data-mobile-attendee=true]{position:fixed!important;inset:0!important;width:100%!important;height:var(--mobile-viewport-height,100dvh)!important;max-height:var(--mobile-viewport-height,100dvh)!important;top:var(--mobile-viewport-top,0px)!important;bottom:auto!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;padding:6px!important;z-index:200!important}
 body.in-call #op-classroom #call-shell.is-expanded[data-mobile-attendee=true] .pc-lesson-head{flex:none!important;min-height:32px!important;padding:3px!important;gap:4px!important;margin:0!important}
 body.in-call #op-classroom #call-shell.is-expanded[data-mobile-attendee=true] .pc-lesson-head h1{font-size:15px!important}
 body.in-call #op-classroom #call-shell.is-expanded[data-mobile-attendee=true] .pc-content{flex:1!important;min-height:0!important;overflow:hidden!important;gap:6px!important}
 body.in-call #op-classroom #call-shell.is-expanded[data-mobile-attendee=true] .pc-media-column{flex:1!important;min-height:0!important;height:100%!important;overflow:hidden!important}
 body.in-call #op-classroom #call-shell.is-expanded[data-mobile-attendee=true] #video-stage:not(.pc-whiteboard-open,.pc-sharing,.pc-presentation-open){flex:1!important;height:0!important;min-height:0!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;grid-auto-rows:minmax(0,1fr)!important}
 body.in-call #op-classroom #call-shell.is-expanded[data-mobile-attendee=true] #video-stage:not(.pc-whiteboard-open,.pc-sharing,.pc-presentation-open)>.pc-person{height:100%!important;min-height:0!important;aspect-ratio:auto!important}
 body.in-call #op-classroom #call-shell.is-expanded[data-mobile-attendee=true] #video-stage.pc-solo{grid-template-rows:minmax(0,1fr)!important}
 body.in-call #op-classroom #call-shell[data-mobile-attendee=true] .pc-person video.live-video{object-fit:contain!important}
 body.in-call #op-classroom #call-shell.is-expanded[data-mobile-attendee=true] .pc-call-toolbar{flex:none!important;height:calc(62px + var(--mobile-browser-clearance, 0px))!important;padding:3px 0 var(--mobile-browser-clearance, 0px)!important;margin:0!important;order:3!important;background:var(--pc-bg);z-index:3}
 body.in-call #op-classroom #call-shell.is-expanded[data-mobile-attendee=true] #video-stage:is(.pc-whiteboard-open,.pc-sharing){flex:1!important;min-height:0!important;height:0!important;overflow:hidden!important}
 body.in-call #op-classroom #call-shell.is-expanded[data-mobile-attendee=true] #video-stage>.pc-whiteboard,body.in-call #op-classroom #call-shell.is-expanded[data-mobile-attendee=true] #video-stage>#screen-stage{flex:1!important;height:100%!important;min-height:0!important;max-height:100%!important}
 body.in-call #op-classroom #call-shell.is-expanded[data-mobile-attendee=true] .pc-content>.pc-panel{height:30dvh!important;min-height:170px!important;flex:0 0 30dvh!important;max-height:40dvh!important}
 .call-main .video-grid,.hosted-main:not(.with-board)>.hosted-grid{grid-template-columns:minmax(0,1fr)!important}
 .call-main .video-grid .tile,.hosted-main:not(.with-board)>.hosted-grid .hosted-tile{aspect-ratio:16/9!important}
}

/* Keep the single attendee row above Safari's floating bottom controls. */
@media(max-width:800px),(max-width:950px) and (max-height:500px){
 body.in-call #op-classroom #call-shell[data-mobile-attendee=true] .pc-controls>.pc-control small{font-size:8px!important;line-height:1.1!important;max-width:100%!important}
 body.in-call #op-classroom #call-shell[data-mobile-attendee=true] .pc-controls>.pc-control button{width:36px!important;height:36px!important;min-height:36px!important}
 body.in-call #op-classroom #call-shell:not(.is-expanded)[data-mobile-attendee=true] .pc-call-toolbar{position:sticky!important;bottom:var(--mobile-browser-clearance,0px)!important;padding:4px 0!important;background:var(--pc-bg);z-index:20}
 .hosted-controls{grid-template-columns:repeat(9,minmax(0,1fr))!important;gap:2px!important;padding-bottom:var(--mobile-browser-clearance,0px)!important;position:sticky!important;bottom:0!important;background:var(--pc-bg,#f4f7fb);z-index:20}
 .hosted-controls>button{padding:5px 1px!important;font-size:9px!important;overflow-wrap:anywhere}
}

@media(max-width:800px),(max-width:950px) and (max-height:500px){
 .call-main>.video-grid:is(.count-1,.count-2),
 .hosted-main:not(.with-board)>.hosted-grid:has(>.hosted-tile:only-child,>.hosted-tile:nth-child(2):last-child){
  width:100%;grid-template-columns:minmax(0,1fr)!important;grid-auto-rows:auto!important;
 }
 .call-main:has(>.video-grid.count-1)>.controls{width:100%}
 .call-main>.controls>.control{flex:0 1 58px;min-width:44px}
 .call-main>.controls>.control:has(.leave){margin-inline-start:0}
 .header-right:has(.peer-clock:not([hidden])){flex-wrap:wrap;column-gap:8px}
}

@media(max-width:800px),(max-width:950px) and (max-height:500px){
 .call-shell .call-main > .video-grid:is(.count-3,.count-4,.count-5){
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-rows:none;grid-auto-rows:auto;
 }
 .call-shell .call-main > .video-grid > .layout-primary{grid-column:1 / -1;order:-1;aspect-ratio:3/2!important}
 .call-shell .call-main > .video-grid.count-2:not([data-layout="balanced"]) > .tile:not(.layout-primary){width:58%!important;justify-self:end}

}

@media(max-width:800px),(max-width:950px) and (max-height:500px){
 .call-shell .call-main > .video-grid:is(.count-3,.count-4,.count-5) > .tile:not(.layout-primary){aspect-ratio:1!important}
 .call-shell .call-main > .video-grid.count-2:not([data-layout="balanced"]) > .tile:not(.layout-primary){aspect-ratio:1!important}
}


@media(max-width:800px),(max-width:950px) and (max-height:500px){
 .call-shell .teaching-stage.mobile-show-videos > .tiles-rail {
  display:flex!important;flex-wrap:wrap;justify-content:center;align-items:flex-start;
  width:100%;max-width:none;height:auto!important;min-height:0!important;overflow:visible!important;
 }
 .call-shell .teaching-stage.mobile-show-videos > .tiles-rail > .tile {
  flex:0 1 min(17%,88px)!important;height:auto!important;aspect-ratio:1!important;
 }
}

@media(max-width:800px),(max-width:950px) and (max-height:500px){
 .call-shell .controls {display:flex!important;flex-wrap:nowrap!important;justify-content:safe center;overflow-x:auto}
 .call-shell .controls > .control {flex:0 0 56px;width:56px!important}
}

@media(max-width:800px),(max-width:950px) and (max-height:500px){
 .call-shell .teaching-stage.mobile-show-videos > .tiles-rail > .portrait-0 {
  flex-basis:min(25%,124px)!important;aspect-ratio:4/3!important;
 }
}
