/* Simplified teacher workspace: top bar, picker in the empty stage, students drawer on the right.
   Presentation only; original controls keep their handlers. */
.teacher-dashboard-source{display:none!important}
body.cp-simple{--cp-navy:#17233b;--cp-blue:#2563eb;--cp-line:#dce2ec;--cp-muted:#4a5672;--cp-drawer:440px;background:#eef1f6}

/* ---------- Top bar ---------- */
body.cp-simple .app-header.cp-header{display:block;padding:0;margin:0 0 12px;border:0}
.cp-topbar{display:flex;flex-wrap:wrap;align-items:center;gap:12px;background:var(--cp-navy);color:#fff;border-radius:14px;padding:10px 16px}
.cp-topbar-title{display:flex;align-items:center;gap:8px}
.cp-topbar-title h1{margin:0;font-size:20px;color:#fff}
.cp-topbar-logo{font-size:22px}
.cp-topbar .pointer-class-picker{display:flex;align-items:center;gap:8px;color:#c9d6f2;font-size:14px;margin:0}
.cp-topbar .pointer-class-picker select{background:#2a3a5c;color:#fff;border:0;border-radius:10px;padding:8px 12px;min-height:40px}
.cp-topbar-spacer{flex:1 1 auto}
.cp-joined{font-size:14px;color:#c9d6f2;margin:0}
.cp-joined.cp-joined-alert{color:#fde68a;font-weight:700}
.cp-topbar-btn{min-height:44px;padding:0 16px;border-radius:10px;border:1px solid #3b4d74;background:transparent;color:#fff;font-weight:600;font-size:15px;margin:0}
.cp-topbar-btn:hover:not(:disabled){background:#22314f}
/* Students (who can point & draw): the biggest, brightest button in the bar, so no teacher misses it.
   Nothing else in the bar is yellow with dark text. The drawing toolbar's Students button uses the same yellow. */
.cp-students-wrap{position:relative;display:inline-flex}
.cp-students-toggle{min-height:54px;padding:4px 14px 4px 12px;gap:10px;border-radius:14px;background:#ffd60a;border:3px solid #fff;color:#17233b;box-shadow:0 2px 0 #0006;text-align:left;cursor:pointer}
.cp-students-toggle:hover:not(:disabled){background:#ffe45c}
.cp-students-toggle:focus-visible{outline:3px solid #7dd3fc;outline-offset:3px}
.cp-students-toggle svg{flex:none}
.cp-students-text{display:flex;flex-direction:column;line-height:1.15}
.cp-students-text strong{font-size:18px;font-weight:800}
.cp-students-text small{font-size:12.5px;font-weight:700}
.cp-students-toggle[aria-expanded=true]{background:#fff3b0;box-shadow:inset 0 0 0 3px #17233b}
/* While a lesson is live and the panel is closed: a soft ring that slowly pulses. */
@keyframes cpStudentsPulse{0%{box-shadow:0 2px 0 #0006,0 0 0 0 #ffd60acc}70%{box-shadow:0 2px 0 #0006,0 0 0 12px #ffd60a00}100%{box-shadow:0 2px 0 #0006,0 0 0 0 #ffd60a00}}
body.cp-is-live.cp-drawer-closed .cp-students-toggle{animation:cpStudentsPulse 2.4s ease-out infinite}
@media (prefers-reduced-motion:reduce){body.cp-is-live.cp-drawer-closed .cp-students-toggle{animation:none;box-shadow:0 2px 0 #0006,0 0 0 4px #ffd60a66}}
/* One-time tip under the button. */
.cp-students-hint{position:absolute;z-index:60;top:calc(100% + 12px);right:0;display:flex;align-items:center;gap:8px;width:max-content;max-width:min(300px,80vw);padding:10px 8px 10px 14px;border-radius:12px;background:#ffd60a;color:#17233b;font:800 15px/1.3 system-ui,sans-serif;box-shadow:0 10px 28px #0f172a59}
.cp-students-hint::before{content:"";position:absolute;bottom:100%;right:34px;border:9px solid transparent;border-bottom-color:#ffd60a}
.cp-students-hint[hidden]{display:none}
/* The tabs row under the header sits on a very high layer (its Stop button must stay reachable), which hid this tip behind the tabs. While the tip shows, the header goes in front. */
body:not(.lesson-expanded) .app-header.cp-header:has(.cp-students-hint:not([hidden])){position:relative;z-index:2147483647}
/* Wide windows: the tip sits beside the button, inside the top bar, so it never lies over the Live label or the red Stop button in the row below. */
@media (min-width:901px){.cp-students-hint{top:50%;right:calc(100% + 12px);transform:translateY(-50%);max-width:none;white-space:nowrap;padding:4px 6px 4px 12px}.cp-students-hint::before{bottom:auto;right:auto;left:100%;top:50%;transform:translateY(-50%);border-color:transparent;border-left-color:#ffd60a}}
/* Narrow windows wrap the button to the left edge: open the tip rightwards so it stays on screen. */
@media (max-width:900px){.cp-students-hint{right:auto;left:0}.cp-students-hint::before{right:auto;left:34px}}
.cp-students-hint-x{flex:none;width:30px;height:30px;min-height:0;padding:0;margin:0;border:0;border-radius:8px;background:#17233b1f;color:#17233b;font-size:14px;font-weight:800;cursor:pointer}
.cp-students-hint-x:hover{background:#17233b33}
/* The drawing toolbar gets its own strip on the left (classroom-annotate.js sets the width), so it never covers
   the lesson, the tabs or the top bar. The whole page moves over (in full screen: the whole lesson); nothing
   inside the lesson is shifted, so pointers and drawings stay in place. */
body.teacher-view.cp-tool-gutter main{padding-left:var(--cp-tool-gutter)!important}
/* The top bar keeps its full width. The toolbar starts right under it (at the top of the screen in full screen)
   and is never taller than the space below, so it does not cover the top bar either. */
body.teacher-view.cp-tool-gutter .app-header.cp-header{margin-left:calc(16px - var(--cp-tool-gutter))}
body.teacher-view #fttAnnotate .fa-bar{top:calc(var(--cp-drawer-top,70px) + 8px);transform:none;max-height:calc(100vh - var(--cp-drawer-top,70px) - 20px)}
body.teacher-view.lesson-expanded #fttAnnotate .fa-bar{top:12px;max-height:calc(100vh - 24px)}
body.teacher-view.cp-tool-gutter.lesson-expanded #stage.lesson-fullscreen{left:var(--cp-tool-gutter)!important;width:calc(100% - var(--cp-tool-gutter))!important}
body.teacher-view.lesson-expanded #stage.lesson-fullscreen{margin:0!important}
body.teacher-view.lesson-expanded::before{content:"";position:fixed;inset:0;z-index:9999;background:#17233b}
.cp-topbar-back{color:#c9d6f2;font-size:14px}
.cp-topbar-back:hover{color:#fff}

/* ---------- Tabs: one neutral segmented control ---------- */
body.cp-simple.teacher-view .cp-workspace-tabs{display:inline-grid;grid-template-columns:repeat(3,auto);gap:4px;padding:4px;margin:0 0 10px;background:#dce2ec;border:0;border-radius:12px}
body.cp-simple.teacher-view .cp-workspace-tab{background:transparent!important;color:var(--cp-navy)!important;border:0!important;min-height:40px;padding:0 16px;font-size:15px;font-weight:500;box-shadow:none}
body.cp-simple.teacher-view .cp-workspace-tab[aria-selected=true]{background:#fff!important;font-weight:700;box-shadow:0 1px 2px #17233b26}
body.cp-simple.teacher-view .cp-workspace-tab .cp-tab-icon{display:none}
body.cp-simple #navigationHint{display:none}
body.cp-simple #connectionStatus{font-size:13px;font-weight:500;color:var(--cp-muted);min-height:0;margin:0 0 6px}

/* ---------- Tabs row: tabs left, live status right ---------- */
.cp-tabs-row{position:relative;z-index:2147483646;display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 10px}
/* Full screen: this row goes behind the lesson (the drawing toolbar has Stop, Lesson and Exit full screen), so it never covers the lesson. */
body.lesson-expanded .cp-tabs-row{z-index:40}
body.cp-simple.teacher-view .cp-tabs-row .cp-workspace-tabs{margin:0}
.cp-tabs-spacer{flex:1 1 auto}
.cp-live-wrap{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.cp-live-wrap[hidden]{display:none}
.cp-live-chip{display:inline-flex;align-items:center;gap:8px;font-weight:600;color:#b91c1c;font-size:14px;padding:0 4px}
.cp-live-chip::before{content:"";width:10px;height:10px;border-radius:50%;background:#dc2626}
.cp-live-wrap button,.cp-live-wrap .tab-controls button{min-height:44px;padding:0 16px;margin:0;border-radius:10px;border:1px solid #c3cbd9;background:#fff;color:var(--cp-navy);font-size:15px;font-weight:500}
.cp-live-wrap .tab-controls{display:inline-flex;gap:6px}
.cp-live-wrap .tab-controls[hidden]{display:none}
.cp-live-wrap .cp-icon-btn{width:44px;padding:0;display:inline-flex;align-items:center;justify-content:center}
.cp-switch-wrap{position:relative}
.cp-switch-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:240px;display:flex;flex-direction:column;gap:2px;padding:8px;background:#fff;border:1px solid var(--cp-line);border-radius:12px;box-shadow:0 10px 30px #17233b2e}
.cp-switch-menu[hidden]{display:none}
.cp-switch-menu small{font-size:12px;font-weight:600;color:var(--cp-muted);padding:4px 8px}
.cp-live-wrap .cp-switch-menu button{display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:0!important;background:transparent!important;box-shadow:none!important;min-height:44px;padding:0 10px;font-size:15px;color:var(--cp-navy)}
.cp-live-wrap .cp-switch-menu button:hover:not(:disabled){background:#f3f6fb!important}
.cp-live-wrap .cp-switch-menu button:disabled{display:none}
.cp-live-wrap .cp-switch-menu #stopScreen{display:none}
.cp-live-wrap>.cp-stop-btn{display:inline-flex;align-items:center;gap:8px;background:#dc2626;border-color:#b91c1c;color:#fff;font-weight:600}
.cp-live-wrap>.cp-stop-btn:hover{background:#b91c1c}
.cp-live-wrap>.cp-stop-btn svg{stroke:currentColor}
.cp-live-wrap button:focus-visible{outline:3px solid var(--cp-blue);outline-offset:2px}
.cp-topbar-btn,.cp-topbar-logo{display:inline-flex;align-items:center;gap:8px}

/* ---------- Source picker in the empty stage ---------- */
#stage .cp-source-picker{position:absolute;inset:0;z-index:6;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;padding:24px;background:#fff;cursor:default;overflow:auto}
#stage .cp-source-picker h2{margin:0;font-size:26px;color:var(--cp-navy);text-align:center}
.cp-source-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;width:100%;max-width:860px}
.cp-source-tile{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:18px;border-radius:14px;border:2px solid var(--cp-line);background:#f7f9fc;color:var(--cp-navy);text-align:left;margin:0}
.cp-source-tile:hover:not(:disabled){border-color:var(--cp-blue);background:#fff}
.cp-source-tile:focus-visible,.cp-source-link:focus-visible{outline:3px solid var(--cp-blue);outline-offset:2px}
.cp-source-icon{display:flex;height:32px}
.cp-source-sep{color:var(--cp-muted);margin:0 6px}
.cp-source-note{margin:0;font-size:14px;color:var(--cp-muted);text-align:center}
.cp-source-name{font-size:17px;font-weight:700}
.cp-source-desc{font-size:14px;font-weight:400;color:var(--cp-muted)}
.cp-source-foot{margin:0;text-align:center}
.cp-source-link{background:none;border:0;padding:6px;color:var(--cp-blue);font-weight:500;text-decoration:underline;margin:0}
#stage:has(.cp-source-picker:not([hidden])) #placeholder{visibility:hidden}

/* Helper bubble now lives in the Students drawer; floating Gallery button moves off the stage corner. */
body.cp-simple #activityScreenHelp,body.cp-simple #stage>a[href="../index.html"]{display:none!important}
body.cp-simple.teacher-view #fttGalleryShareButton{right:auto;left:18px}

/* ---------- Students drawer ---------- */
.cp-permissions-sidebar{background:#fff;border:1px solid var(--cp-line);border-radius:16px;padding:16px;box-sizing:border-box}
body.cp-drawer-closed .cp-permissions-sidebar{display:none}
.cp-drawer-head{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.cp-drawer-head h2{flex:1;margin:0;font-size:20px;color:var(--cp-navy)}
.cp-drawer-close{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;border-radius:10px;background:#eef1f6;color:var(--cp-navy);font-size:16px}
.cp-permissions-sidebar select{min-width:0;max-width:100%}
.teacher-dashboard-roster{position:static!important;inset:auto!important;display:block!important;visibility:visible!important;transform:none!important;width:100%!important;min-width:0!important;max-width:none!important;height:auto!important;max-height:none!important;overflow:visible!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;resize:none!important}
.teacher-dashboard-roster::before{display:none!important}
.teacher-dashboard-roster[hidden]{display:block!important}
.cp-permission-help{font-size:13px;line-height:1.4;margin:10px 0 6px;color:var(--cp-muted)}
.cp-permissions-sidebar .permission-tools{display:flex;flex-wrap:wrap;gap:8px;background:#f3f6fb;padding:12px;border-radius:12px}
.cp-permissions-sidebar .permission-tools strong{flex-basis:100%;font-size:14px}
.cp-permissions-sidebar .sharing-permissions{background:#f7f9fc!important;border:1px solid var(--cp-line)!important;border-radius:12px;padding:12px!important;margin-top:14px}
.cp-permissions-sidebar .sharing-permissions>p{font-size:13px;color:var(--cp-muted)}
.cp-permissions-sidebar .sharing-permissions-roster{max-height:30dvh!important;overflow:auto}
.cp-permissions-sidebar #roster{max-height:30dvh!important;overflow:auto}
.cp-permissions-sidebar details{margin-top:12px}
.cp-permissions-sidebar summary{cursor:pointer;font-weight:600;font-size:14px}
.cp-student-sharing{border-top:1px solid var(--cp-line);margin-top:14px;padding-top:12px}
.cp-student-sharing p{font-size:13px;color:var(--cp-muted)}

/* Original permissions menu is kept for full screen only. */
.cp-permissions-sidebar #tbStudentsMenu{display:none!important}
.cp-everyone{display:flex;flex-direction:column;gap:8px;background:#f3f6fb;border-radius:12px;padding:14px;margin-bottom:14px}
.cp-everyone strong{font-size:14px}
.cp-everyone-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:14px}
.cp-everyone-row select,.cp-level{font:inherit;font-size:14px;padding:6px 8px;border-radius:8px;border:1px solid #c3cbd9;background:#fff;color:var(--cp-navy);min-height:40px}
.cp-everyone-help{font-size:13px;color:var(--cp-muted)}
.cp-student-head,.cp-student-body{display:grid;grid-template-columns:minmax(0,1fr) 104px 42px 42px;gap:8px 6px;align-items:center;font-size:14px}
.cp-student-head{padding-bottom:6px;border-bottom:1px solid var(--cp-line);margin-bottom:8px}
.cp-student-head span{font-size:12px;font-weight:600;color:var(--cp-muted)}
.cp-student-head .cp-c{text-align:center}
.cp-student-body{max-height:none}
.cp-student-empty{grid-column:1/-1;margin:4px 0;font-size:13px;color:var(--cp-muted)}
.cp-student-name{display:flex;align-items:center;gap:6px;min-width:0}
.cp-name-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.cp-dot{width:9px;height:9px;flex-shrink:0;border-radius:50%;background:#b8c0cf}
.cp-dot.cp-dot-on{background:#16a34a}
.cp-level{font-size:13px;min-height:36px;padding:4px 4px;width:100%}
.cp-check{width:22px;height:22px;justify-self:center;margin:0;accent-color:var(--cp-blue)}
.cp-remove{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;margin:0 0 0 auto;border:0;border-radius:8px;background:transparent;color:var(--cp-muted)}
.cp-remove:hover{background:#fee2e2;color:#991b1b}
.cp-mini-btn{font-size:12px;padding:4px 8px;margin:0;border-radius:8px;border:1px solid var(--cp-blue);background:#fff;color:var(--cp-blue)}
.cp-more{border-top:1px solid var(--cp-line);margin-top:16px;padding-top:12px}
.cp-more>summary{cursor:pointer;font-weight:600;font-size:14px;min-height:32px;display:flex;align-items:center}
.cp-more-help{font-size:13px;color:var(--cp-muted);margin:8px 0 6px}
.cp-more-send{display:flex;flex-wrap:wrap;gap:8px}
.cp-more-btn{min-height:40px;padding:0 12px;margin:0;border-radius:10px;border:1px solid var(--cp-line);background:#f7f9fc;color:var(--cp-navy);font-size:14px;font-weight:500}
.cp-permissions-sidebar #startClass{margin:12px 0 0;width:100%}

/* ---------- Desktop: fill the window, drawer beside the lesson ---------- */
@media(min-width:1000px){
body.teacher-view.cp-compact-workspace{display:flex;flex-direction:column;height:100dvh;min-height:0}
body.teacher-view.cp-compact-workspace>*{flex:none}
body.teacher-view.cp-compact-workspace main{flex:1 1 0;max-width:none;margin:0;border:0;border-radius:0;background:transparent;padding:12px calc(var(--cp-drawer) + 28px) 12px 16px;height:auto;min-height:550px;display:flex;flex-direction:column;gap:0;box-sizing:border-box}
body.teacher-view.cp-compact-workspace.cp-drawer-closed main{padding-right:16px}
body.teacher-view.cp-compact-workspace main>*{flex-shrink:0}
body.teacher-view .cp-permissions-sidebar{position:fixed;right:12px;top:var(--cp-drawer-top,12px);bottom:12px;width:var(--cp-drawer);overflow:auto;z-index:8}
body.teacher-view.cp-compact-workspace:not(.cp-drawer-closed) .app-header.cp-header{margin-right:calc(-1 * (var(--cp-drawer) + 16px))}
body.teacher-view #teacherPanel{margin:0}
body.teacher-view.cp-compact-workspace #stage:not(.lesson-fullscreen):not(:fullscreen){flex:1 1 0;min-height:180px;height:auto;aspect-ratio:auto}
body.teacher-view.cp-compact-workspace .lesson-actions:empty{display:none}
body.cp-simple footer{display:none}
}
@media(max-width:999px){
.cp-permissions-sidebar{margin:10px 0}
.cp-permissions-sidebar #roster{max-height:220px!important}
body.cp-simple.teacher-view .cp-workspace-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
body.cp-simple.teacher-view .cp-workspace-tab{white-space:normal;font-size:13px;padding:0 6px}
.cp-joined{flex-basis:100%;order:10}
body.cp-simple #stage:has(.cp-source-picker:not([hidden])){aspect-ratio:auto;min-height:620px}
}

/* Full screen: Students panel as an overlay inside the lesson, opened from the Students button on the drawing toolbar. */
#stage .cp-permissions-sidebar.cp-drawer-overlay{display:none!important;position:absolute!important;top:12px!important;bottom:12px!important;right:12px!important;left:auto!important;width:min(360px,calc(100% - 80px));margin:0!important;overflow:auto;z-index:40;box-shadow:0 12px 36px #0006;cursor:default}
#stage .cp-permissions-sidebar.cp-drawer-overlay.cp-overlay-open{display:block!important}

/* Classroom Pointer cleanup: the Students drawer owns participant controls.
   Keep the actual live screen/whiteboard tiles visible, not a duplicate toolbar. */
body.teacher-view.cp-simple .boards-view > .boards-bar:first-child{display:none!important}
/* Give the floating full-screen Students drawer a larger, readable surface.
   The teacher can resize it (bottom-right corner) without affecting permissions.
   Width/height deliberately avoid !important: the browser's resize handle writes
   plain inline sizes, which an !important stylesheet value would silently override. */
#stage .cp-permissions-sidebar.cp-drawer-overlay{
  width:clamp(340px,36vw,650px);
  max-width:calc(100% - 24px)!important;
  height:min(76vh,760px);
  max-height:calc(100% - 24px)!important;
  bottom:auto!important;
  resize:both!important;
  min-width:300px!important;
  min-height:220px!important;
}
#stage .cp-permissions-sidebar.cp-drawer-overlay #roster,
#stage .cp-permissions-sidebar.cp-drawer-overlay .sharing-permissions-roster{max-height:none!important}
#stage .cp-permissions-sidebar.cp-drawer-overlay .cp-drawer-head{cursor:move;touch-action:none}
#stage .cp-permissions-sidebar.cp-drawer-overlay button,
#stage .cp-permissions-sidebar.cp-drawer-overlay select{min-height:38px}
#stage .cp-permissions-sidebar.cp-drawer-overlay .cp-level{font-size:15px;min-height:42px}

/* Teacher whiteboard: pasted pictures waiting to be placed (move / resize). */
#pdfContent .board-picture-edit{position:absolute;z-index:3;box-sizing:border-box;outline:3px dashed #2563eb;outline-offset:2px;cursor:move;touch-action:none;background:#fff;box-shadow:0 8px 26px #0f172a40}
#pdfContent .board-picture-edit.selected{outline-style:solid}
#pdfContent .board-picture-edit img{display:block;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;user-select:none}
#pdfContent .board-picture-handle{position:absolute;width:20px;height:20px;background:#fff;border:3px solid #2563eb;border-radius:50%;box-sizing:border-box;touch-action:none}
#pdfContent .board-picture-handle.nw{left:-12px;top:-12px;cursor:nwse-resize}
#pdfContent .board-picture-handle.ne{right:-12px;top:-12px;cursor:nesw-resize}
#pdfContent .board-picture-handle.sw{left:-12px;bottom:-12px;cursor:nesw-resize}
#pdfContent .board-picture-handle.se{right:-12px;bottom:-12px;cursor:nwse-resize}
#pdfContent .board-picture-remove{position:absolute;top:-16px;left:50%;transform:translateX(-50%);width:32px;height:32px;min-height:0;padding:0;border:0;border-radius:50%;background:#b4232f;color:#fff;font:700 16px/32px system-ui;cursor:pointer;box-shadow:0 2px 8px #0005}
.board-picture-bar{position:absolute;z-index:12;top:12px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;max-width:calc(100% - 24px);padding:10px 12px 10px 16px;background:#101827f0;color:#fff;border-radius:14px;box-shadow:0 10px 30px #0006;font:600 15px system-ui}
.board-picture-bar[hidden]{display:none}
.board-picture-bar .board-picture-done{min-height:44px;padding:0 18px;border:0;border-radius:11px;background:#16a34a;color:#fff;font:800 16px system-ui;cursor:pointer;white-space:nowrap}
.board-picture-bar .board-picture-done:hover{background:#15803d}
@media(max-width:640px){.board-picture-bar .board-picture-help{display:none}}

.cp-share-state{min-height:44px;padding:0 16px;border-radius:10px;border:2px solid #6b7894;background:#2a3a5c;color:#fff;font-weight:800;font-size:15px;margin:0;cursor:pointer}
.cp-share-state.cp-share-on{background:#16a34a;border-color:#bbf7d0}
.cp-share-state.cp-share-off{background:#334155;border-color:#94a3b8}
.cp-share-state:disabled{opacity:.6;cursor:not-allowed}
.cp-share-state[hidden]{display:none}

/* One Stop button: the red one above the lesson (in full screen, the red Stop on the drawing toolbar clicks it). The PDF bar's Close button is a hidden duplicate. */
body.cp-simple.teacher-view #pdfNav .pdf-close{display:none!important}

/* Reminder that the whiteboard is still on. Sits above full screen; never closes anything by itself. */
.cp-board-reminder{position:fixed;z-index:10002;top:14px;left:50%;transform:translateX(-50%);display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;max-width:calc(100vw - 24px);padding:12px 16px;background:#fff7ed;border:2px solid #ea580c;border-radius:14px;box-shadow:0 12px 36px #0006;color:#7c2d12;font:700 16px system-ui}
.cp-board-reminder[hidden]{display:none}
.cp-board-reminder button{min-height:44px;padding:0 16px;border-radius:10px;font:800 15px system-ui;cursor:pointer;border:2px solid #b91c1c}
.cp-board-reminder .cp-reminder-stop{background:#dc2626;color:#fff}
.cp-board-reminder .cp-reminder-keep{background:#fff;color:#7c2d12;border-color:#c2410c}

/* Students panel: show every boy's full name and where he is. Names wrap instead of being cut off;
   "in Home" sits on its own line under the name; a long list scrolls inside the panel. */
.cp-student-body{grid-template-columns:minmax(0,1fr) 96px 42px 42px}
.cp-student-name{flex-wrap:wrap;row-gap:2px;align-items:center}
.cp-student-name .cp-name-text{flex:1 1 0;min-width:8ch;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;font-weight:600}
.cp-student-name .cp-where{flex:1 0 100%!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;padding-left:15px}
.cp-permissions-sidebar{overflow-y:auto}
/* First-time guide (teacher-dashboard.js). */
.cp-guide-btn{white-space:nowrap}
dialog.cp-guide{width:min(620px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow:auto;padding:22px 24px;border:0;border-radius:18px;background:#fff;color:#172033;box-shadow:0 24px 70px #0f172a66;font:16px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif}
dialog.cp-guide::backdrop{background:#0f172a99}
.cp-guide-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.cp-guide-head h2{margin:0;font-size:1.45rem;color:#17395b}
.cp-guide-x{display:grid;place-items:center;width:38px;height:38px;padding:0;border-radius:10px;border:1px solid #cbd5e1;background:#fff;color:#334155;cursor:pointer}
.cp-guide-intro{margin:10px 0 14px;color:#475569}
.cp-guide-steps{margin:0;padding:0;list-style:none;counter-reset:cpstep;display:grid;gap:10px}
.cp-guide-steps li{counter-increment:cpstep;display:grid;grid-template-columns:34px 1fr;column-gap:12px;padding:10px 12px;border-radius:12px;background:#f1f5fb}
.cp-guide-steps li::before{content:counter(cpstep);grid-row:span 2;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#2563eb;color:#fff;font-weight:800}
.cp-guide-steps strong{color:#0f2a4d}
.cp-guide-steps span{color:#334155;font-size:15px}
.cp-guide-note{margin:14px 0 16px;font-size:14px;color:#64748b}
.cp-guide-ok{display:block;margin-left:auto;min-height:44px;padding:0 26px;border:0;border-radius:12px;background:#2563eb;color:#fff;font:700 16px system-ui,sans-serif;cursor:pointer}
.cp-guide-ok:focus-visible,.cp-guide-x:focus-visible{outline:3px solid #f5b800;outline-offset:2px}

/* ---------- A slim top: the lesson gets the height (teacher workspace) ---------- */
body.teacher-view.cp-compact-workspace main{padding-top:6px;padding-bottom:6px}
body.teacher-view.cp-compact-workspace .app-header.cp-header{margin-bottom:6px}
body.teacher-view.cp-compact-workspace .cp-topbar{padding:4px 12px;gap:8px;border-radius:10px}
body.teacher-view.cp-compact-workspace .cp-topbar-title h1{font-size:17px}
body.teacher-view.cp-compact-workspace .cp-topbar-btn{min-height:34px;padding:0 10px;font-size:14px}
body.teacher-view.cp-compact-workspace .cp-topbar .pointer-class-picker select{min-height:32px;padding:4px 10px}
body.teacher-view.cp-compact-workspace .cp-tabs-row{margin-bottom:4px;gap:8px}
body.cp-simple.teacher-view.cp-compact-workspace .cp-workspace-tabs{padding:3px}
body.cp-simple.teacher-view.cp-compact-workspace .cp-workspace-tab{min-height:32px;padding:0 12px;font-size:14px}
body.teacher-view.cp-compact-workspace .cp-live-wrap button,body.teacher-view.cp-compact-workspace .cp-live-wrap .tab-controls button{min-height:34px;padding:0 12px;font-size:14px}
body.teacher-view.cp-compact-workspace .cp-live-wrap .cp-icon-btn{width:34px;padding:0}
body.teacher-view.cp-compact-workspace #stage{margin:2px 0}
/* While a lesson is open: one row for the top bar (nothing wraps under it), and the message line sits inside the
   tabs row instead of taking a row of its own. */
body.teacher-view.cp-is-live .cp-topbar-back{display:none}
@media (min-width:1000px){body.teacher-view.cp-is-live .cp-topbar{flex-wrap:nowrap}}
.cp-tabs-row .cp-tabs-spacer{flex:1 1 0;min-width:0;overflow:hidden}
.cp-tabs-spacer #connectionStatus{margin:0!important;padding:0 6px!important;background:none!important;min-height:0!important;font-size:13px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
