.classroom-media-panel{min-width:0;margin:14px 0 0;padding:13px 0 0;border-top:1px solid var(--ui-line,#dce5df);color:var(--ui-text,#233e35);font-size:11px}
.classroom-media-heading{display:flex;align-items:center;justify-content:space-between;gap:7px;margin-bottom:8px;line-height:1.5}
.classroom-media-heading>strong{font-size:12px;font-weight:600}.classroom-media-heading>span{font-size:10px;color:var(--ui-muted,#718078);white-space:nowrap}.classroom-media-heading>span[data-connected=true]{color:var(--ui-primary,#28745b)}
.classroom-media-status,.classroom-media-hint,.classroom-media-error{font-size:11px;line-height:1.7;overflow-wrap:anywhere;margin:0 0 9px;color:var(--ui-muted,#718078)}.classroom-media-hint{font-size:10px;margin:8px 0 0}.classroom-media-error{margin-top:8px;color:var(--ui-error,#a64a3e)}
.classroom-media-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.classroom-media-button{display:flex;align-items:center;justify-content:flex-start;gap:6px;width:100%;min-width:0;min-height:34px;padding:7px 8px;border:1px solid var(--ui-line,#dce5df);border-radius:7px;background:var(--ui-surface,#fff);color:var(--ui-text,#233e35);font:inherit;font-size:11px;line-height:1.5;text-align:left;overflow-wrap:anywhere;cursor:pointer}
.classroom-media-button>svg{width:14px;height:14px;flex:none}.classroom-media-button>span{min-width:0}.classroom-media-button:hover:enabled{background:var(--ui-bg,#f3f6f1);border-color:var(--ui-primary,#28745b)}.classroom-media-button[aria-pressed=true]{background:var(--ui-soft,#e6f0e3);color:var(--ui-primary,#28745b);border-color:var(--ui-soft,#e6f0e3)}.classroom-media-button:focus-visible{outline:2px solid var(--ui-primary,#28745b);outline-offset:2px}.classroom-media-button:disabled{cursor:not-allowed;opacity:.55}
.classroom-media-actions>[data-media-action=screen],.classroom-media-actions>[data-media-action=request]{grid-column:1/-1}.classroom-media-panel[data-media-role=student] .classroom-media-actions{grid-template-columns:minmax(0,1fr)}.classroom-media-panel[data-media-role=student] .classroom-media-button{min-height:44px;font-size:11px;gap:8px}
.classroom-media-playback{margin-top:9px;color:var(--ui-primary,#28745b)}.classroom-media-requests{border-top:1px solid var(--ui-line,#dce5df);margin-top:10px;padding-top:5px}.classroom-media-requests>summary{cursor:pointer;min-height:32px;padding:6px 0;font-weight:550;line-height:1.6}.classroom-media-empty{font-size:10px;line-height:1.7;color:var(--ui-muted,#718078);padding:7px 0}.classroom-media-request{padding:9px 0;border-top:1px solid var(--ui-line,#dce5df)}.classroom-media-request>strong{display:block;min-width:0;font-size:11px;font-weight:500;overflow-wrap:anywhere;margin-bottom:6px}.classroom-media-request-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.classroom-media-request-actions>.classroom-media-button{justify-content:center;min-height:30px;font-size:10px;padding:5px}.classroom-media-request-actions>[data-media-action=revoke]{grid-column:1/-1}
.classroom-media-peer-videos{display:grid;gap:8px;min-width:0}.classroom-media-peer-videos>figure{margin:0;min-width:0}.classroom-media-peer-video{display:block;width:100%;max-height:130px;object-fit:contain;background:#101818;border-radius:7px}.classroom-media-peer-videos figcaption{padding:4px 0;font-size:10px;color:var(--ui-muted,#718078);overflow-wrap:anywhere}
.classroom-media-request>small{display:block;margin:-2px 0 7px;color:var(--ui-muted,#718078);font-size:10px}
.classroom-media-stage{position:absolute;inset:0;z-index:4;min-width:0;min-height:0;overflow:hidden;background:#101818;color:#fff}.tw-classroom-workspace>.classroom-media-stage{left:var(--tw-teach-rail-width,236px)}.student-room-pane[data-student-room-pane=lesson]:has(>.classroom-media-stage){position:relative}
.classroom-media-stage.is-camera-only{background:transparent;pointer-events:none}
.classroom-media-main-video{display:block;width:100%;height:100%;object-fit:contain}.classroom-media-camera-video{position:absolute;right:12px;bottom:12px;width:min(24%,220px);max-height:32%;object-fit:contain;border:1px solid #ffffff66;border-radius:8px;background:#101818}.classroom-media-stage-label{position:absolute;top:12px;left:12px;z-index:1;max-width:calc(100% - 24px);padding:5px 9px;border-radius:6px;background:#101818b3;color:#fff;font-size:11px;line-height:1.5;pointer-events:none}
.classroom-media-stage[hidden],.classroom-media-stage [hidden],.classroom-media-panel [hidden]{display:none!important}
@media(max-width:600px){.classroom-media-panel{padding-top:11px;margin-top:12px}.classroom-media-heading{align-items:flex-start;flex-direction:column;gap:2px}.classroom-media-heading>strong{font-size:11px}.classroom-media-status{font-size:10px}.classroom-media-panel[data-media-role=student] .classroom-media-button{padding:9px 7px;font-size:10px}.classroom-media-camera-video{right:7px;bottom:7px;width:30%;border-radius:5px}.classroom-media-stage-label{top:7px;left:7px;font-size:10px;padding:4px 7px}}

/* One narrow strip belongs to the teacher stage; details open over it on demand. */
.tw-classroom-workspace>.classroom-media-topbar{position:absolute;inset:0 0 auto var(--tw-teach-rail-width,236px);z-index:25;height:34px;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;padding:2px 9px;border:0;border-bottom:1px solid var(--ui-line,#dce5df);background:var(--ui-surface,#fff);font-size:11px}
.classroom-media-topbar>.classroom-media-heading,.classroom-media-topbar>.classroom-media-status,.classroom-media-topbar>.classroom-media-hint{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.classroom-media-topbar>.classroom-media-actions,.classroom-student-actions{display:flex;align-items:center;gap:4px;min-width:0}
.classroom-media-topbar>.classroom-media-actions,.classroom-media-topbar>.classroom-student-actions{max-width:calc(50% - 4px);overflow-x:auto;scrollbar-width:none}.classroom-media-topbar>.classroom-media-actions::-webkit-scrollbar,.classroom-media-topbar>.classroom-student-actions::-webkit-scrollbar{display:none}
.classroom-media-topbar .classroom-media-button{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;min-width:28px;height:28px;min-height:28px;padding:5px;border:0;border-radius:5px;background:transparent;color:var(--ui-muted,#65766b)}
.classroom-media-topbar .classroom-media-button>svg{width:16px;height:16px}
.classroom-media-topbar .classroom-media-button>[data-media-label]{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.classroom-media-topbar .classroom-media-button[aria-pressed=true],.classroom-media-topbar .classroom-media-button[data-connected=true]{background:var(--ui-soft,#e6f0e3);color:var(--ui-primary,#28745b)}
.classroom-media-topbar .classroom-media-playback{margin:0}
.classroom-media-topbar .classroom-media-button[data-pending=true]{color:#b33440;background:#fff0f1}
.classroom-media-topbar .classroom-media-button[data-count]:not([data-count=""])::after{content:attr(data-count);position:absolute;right:-2px;top:-2px;min-width:13px;height:13px;padding:0 2px;border-radius:8px;background:#be3745;color:white;font-size:9px;line-height:13px;text-align:center}
.classroom-media-topbar>.classroom-media-error{position:absolute;left:8px;top:36px;z-index:2;max-width:min(410px,calc(100vw - 60px));margin:0;padding:8px 12px;background:var(--ui-surface,#fff);border:1px solid #ead3d3;border-radius:8px;box-shadow:0 5px 20px #18243815}
.classroom-media-topbar>.classroom-media-requests,.classroom-student-roster{position:absolute;right:8px;top:38px;width:min(440px,calc(100vw - 34px));max-height:calc(100dvh - 110px);overflow:auto;overscroll-behavior:contain;margin:0;padding:12px;border:1px solid var(--ui-line,#dce5df);border-radius:10px;background:var(--ui-surface,#fff);box-shadow:0 8px 35px #16263c22;scrollbar-width:thin}
.classroom-media-topbar>.classroom-media-requests:not([open]){display:none}
.classroom-media-topbar>.classroom-media-requests{z-index:3}
.classroom-student-roster{z-index:2}
.classroom-student-roster>header{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;margin-bottom:5px}.classroom-student-roster>header>button{border:0;background:transparent;color:var(--ui-muted,#65766b);min-width:28px;min-height:28px;font-size:19px;cursor:pointer}
.classroom-roster-hint{margin:0 0 8px;font-size:10px;line-height:1.7;color:var(--ui-muted,#65766b)}
.classroom-student-row{display:grid;grid-template-columns:minmax(64px,1fr) repeat(8,28px);align-items:center;gap:3px;padding:7px 0;border-top:1px solid var(--ui-line,#dce5df)}
.classroom-student-roster>[data-media-roster]{overflow-x:auto;overscroll-behavior:contain}.classroom-student-row{min-width:312px}
.classroom-student-row>strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:500}
.classroom-student-row .classroom-media-button[data-student-state=in_room]{color:#28805d;background:#eaf4ee}
.classroom-student-row .classroom-media-button[data-student-state=unstable],.classroom-student-row .classroom-media-button[data-student-state=pending]{color:#bd3644;background:#fff0f1}
.classroom-student-row .classroom-media-button[data-student-state=away]{color:#ad7a22;background:#fff8e9}
.classroom-student-row .classroom-media-button:is([data-student-state=not_entered],[data-student-state=left],[data-student-state=unknown],[data-student-state=off]){color:#98a1aa}
[data-media-thumbnail-preview]>img{display:block;max-width:100%;width:100%;height:auto;border:1px solid var(--ui-line,#dce5df);border-radius:7px;margin-top:10px}
[data-media-thumbnail-preview]>p{margin:10px 0 4px;color:var(--ui-muted,#65766b);font-size:10px;line-height:1.7}
.tw-classroom-workspace:has(>.classroom-media-topbar) .tw-rail-permissions>summary{display:none}
/* Keep both closed and open permission states out of the measured left rail. */
.tw-classroom-workspace:has(>.classroom-media-topbar) .tw-rail-permissions{position:fixed;display:none;z-index:1200;top:84px;right:16px;left:auto;width:min(680px,calc(100vw - 32px));max-height:calc(100dvh - 110px);overflow:auto;margin:0;border:1px solid var(--ui-line,#dce5df);border-radius:10px;background:var(--ui-surface,#fff);box-shadow:0 8px 35px #16263c22}
.tw-classroom-workspace:has(>.classroom-media-topbar) .tw-rail-permissions[open]{display:block;padding:14px}
.tw-classroom-workspace:has(>.classroom-media-topbar) .tw-rail-permissions .live-controls-row>[data-live-action=hands]{display:none}
@media(max-width:600px){.tw-classroom-workspace>.classroom-media-topbar{padding:2px 4px;gap:3px}.classroom-media-topbar>.classroom-media-actions,.classroom-student-actions{gap:1px}.classroom-media-topbar .classroom-media-button{width:25px;min-width:25px;padding:4px}.classroom-student-roster{right:4px;padding:9px}.classroom-student-row{grid-template-columns:minmax(54px,1fr) repeat(8,26px);gap:2px}.classroom-student-row .classroom-media-button{width:26px;min-width:26px}}

/* One 34px student strip shares the hand/fullscreen controls supplied by the room shell. */
.student-room-interaction-bar{position:relative;z-index:10;display:flex;align-items:center;gap:4px;flex:0 0 34px;height:34px;min-height:34px;min-width:0;padding:2px 8px;border-bottom:1px solid var(--ui-line,#dce5df);background:var(--ui-surface,#fff);color:var(--ui-text,#233e35)}
.student-room-interaction-bar>[data-student-media-controls]{display:flex;align-items:center;flex:1;min-width:0}
.student-room-interaction-bar [data-student-hand-control]{display:flex;align-items:center;flex:none}
.student-room-interaction-bar [data-student-hand-control]:empty{display:none}
.classroom-media-student-topbar{position:relative;display:flex;align-items:center;flex:none;height:34px;min-height:34px;min-width:0;max-width:100%;margin:0;padding:2px 8px;border:0;border-bottom:1px solid var(--ui-line,#dce5df);background:var(--ui-surface,#fff)}
.student-room-interaction-bar .classroom-media-student-topbar{position:static;height:28px;min-height:28px;margin:0;padding:0;border:0}
.classroom-media-student-topbar>.classroom-media-heading,.classroom-media-student-topbar>.classroom-media-status,.classroom-media-student-topbar>.classroom-media-hint{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.classroom-media-student-topbar>.classroom-media-actions{display:flex;align-items:center;gap:4px;min-width:0;max-width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.classroom-media-panel.classroom-media-student-topbar .classroom-media-button,.student-room-interaction-bar :is([data-live-action=raise],[data-student-fullscreen]){position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;min-width:28px;height:28px;min-height:28px;margin:0;padding:5px;border:0;border-radius:5px;background:transparent;color:var(--ui-muted,#65766b);font:inherit;font-size:11px;line-height:1;box-shadow:none;cursor:pointer}
.classroom-media-student-topbar .classroom-media-button>svg,.student-room-interaction-bar :is([data-live-action=raise],[data-student-fullscreen])>svg{width:16px;height:16px;flex:none}
.classroom-media-student-topbar .classroom-media-button>[data-media-label],.student-room-interaction-bar :is([data-student-fullscreen-label],[data-live-action=raise]>span){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.classroom-media-student-topbar .classroom-media-button:hover:enabled,.student-room-interaction-bar :is([data-live-action=raise],[data-student-fullscreen]):hover:enabled{background:var(--ui-soft,#e6f0e3);color:var(--ui-primary,#28745b)}
.classroom-media-student-topbar .classroom-media-button[aria-pressed=true],.student-room-interaction-bar :is([data-live-action=raise],[data-student-fullscreen])[aria-pressed=true]{background:var(--ui-soft,#e6f0e3);color:var(--ui-primary,#28745b)}
.classroom-media-student-topbar .classroom-media-button[data-pending=true]{color:#ad7a22;background:#fff8e9}
.classroom-media-student-topbar .classroom-media-button:focus-visible,.student-room-interaction-bar :is([data-live-action=raise],[data-student-fullscreen]):focus-visible{outline:2px solid var(--ui-primary,#28745b);outline-offset:1px}
.classroom-media-student-topbar .classroom-media-button:disabled,.student-room-interaction-bar :is([data-live-action=raise],[data-student-fullscreen]):disabled{opacity:.5;cursor:not-allowed}
.classroom-media-student-topbar .classroom-media-playback{margin:0;color:var(--ui-primary,#28745b)}
.classroom-media-student-topbar>.classroom-media-error{position:absolute;top:34px;left:8px;z-index:12;width:min(410px,calc(100% - 16px));max-width:calc(100% - 16px);margin:0;padding:8px 12px;border:1px solid #ead3d3;border-radius:8px;background:var(--ui-surface,#fff);box-shadow:0 5px 20px #18243815;font-size:11px;line-height:1.7;color:var(--ui-error,#a64a3e)}
@media(max-width:600px){.student-room-interaction-bar{gap:3px;padding:2px 5px}.classroom-media-student-topbar{padding:2px 5px}.classroom-media-student-topbar>.classroom-media-actions{gap:3px}}
