#menu-class{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}
#menu-class .menu-item{width:100%;min-height:44px;border-radius:12px;text-transform:none;font-weight:700;text-align:left;padding:0 14px}
#menu-class #invite-student{background:linear-gradient(180deg,#f2c46b,#e7a948);color:#2a1d05;border:0}
#menu-class #end-lesson{background:rgba(224,96,90,.16);color:#ffb4ae;border:1px solid rgba(224,96,90,.4)}#menu-class #student-profiles-link{background:rgba(255,255,255,.06);color:inherit;text-decoration:none;width:100%;height:auto;border-radius:12px}
#menu-class #student-profiles-link svg{width:20px;height:20px}
#menu-class .menu-item{display:flex;align-items:center;gap:10px}
#teaching-cues [data-cue="reveal"],#teaching-cues [data-cue="clear"]{display:none!important}
#teaching-cues{align-items:center}
#teaching-cues .cues-title{font-size:12px;font-weight:800;color:#9a9aa3;padding:0 6px;text-transform:uppercase;letter-spacing:.06em}
#teaching-cues .cue-pen{flex:1;height:34px;border-radius:999px;border:0;background:rgba(255,255,255,.06);display:flex;align-items:center;justify-content:center;gap:6px;font-size:13px;font-weight:700}
#teaching-cues .cue-pen::after{content:attr(aria-label)}/* step3: Local-Blackboard style vertical tool strip */
@media (min-width:900px){
 body:has(#call:not([hidden])) .drawing-launcher{
  position:fixed!important;left:auto!important;bottom:auto!important;right:344px!important;top:50%!important;transform:translateY(-50%)!important;
  flex-direction:column!important;gap:2px!important;padding:4px!important;border-radius:17px!important;
  background:#2b2d2e!important;border:1px solid #ffffff16!important;box-shadow:0 8px 30px rgba(0,0,0,.35)!important;backdrop-filter:none!important}
}
body:has(#call:not([hidden])) .drawing-launcher .toolbar-icon{width:44px!important;height:40px!important;min-width:44px!important;border-radius:10px!important;background:transparent!important;color:#eeefeb!important}
body:has(#call:not([hidden])) .drawing-launcher .toolbar-icon:hover{background:#ffffff12!important}
body:has(#call:not([hidden])) .drawing-launcher .toolbar-icon[aria-pressed="true"],
body:has(#call:not([hidden])) .drawing-launcher .toolbar-icon.active,
body:has(#call:not([hidden])) .drawing-launcher .toolbar-icon.is-active{background:#f0b66b!important;color:#202122!important}
body:has(#call:not([hidden])) .drawing-launcher svg{width:22px;height:22px}
/* page/zoom controls under the chat */
body:has(#call:not([hidden])) .rail .pdf-controls{position:static!important;opacity:1!important;transform:none!important;margin:0;justify-content:center;flex-wrap:wrap;background:#2b2d2e;border:1px solid #ffffff16;border-radius:14px}body:has(#call:not([hidden])) .rail{min-width:0}
body:has(#call:not([hidden])) .rail .pdf-controls{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box;gap:0!important;padding:3px!important}
body:has(#call:not([hidden])) .rail .pdf-controls button{padding:0 6px!important;min-width:28px!important;font-size:12px}
body:has(#call:not([hidden])) .rail .pdf-controls input{width:34px!important}
body:has(#call:not([hidden])) .rail{padding-bottom:30px}
/* step4: zoom box = fixed 2 rows */
body:has(#call:not([hidden])) .rail .pdf-controls:not([hidden]){display:grid!important;grid-template-columns:repeat(6,1fr);grid-template-rows:38px 38px;align-items:center;justify-items:center;
 height:86px!important;min-height:86px!important;flex:0 0 86px!important;overflow:hidden!important;padding:4px 6px!important;row-gap:2px!important;column-gap:2px!important}
body:has(#call:not([hidden])) .rail .pdf-controls #page-prev{grid-area:1/1/2/2}
body:has(#call:not([hidden])) .rail .pdf-controls label{grid-area:1/2/2/4;justify-self:end}
body:has(#call:not([hidden])) .rail .pdf-controls #page-count{grid-area:1/4/2/5;justify-self:start;padding-left:4px}
body:has(#call:not([hidden])) .rail .pdf-controls #page-next{grid-area:1/6/2/7}
body:has(#call:not([hidden])) .rail .pdf-controls #fit-width{grid-area:2/1/3/3;width:100%}
body:has(#call:not([hidden])) .rail .pdf-controls #fit-page{grid-area:2/3/3/4;width:100%}
body:has(#call:not([hidden])) .rail .pdf-controls #zoom-out{grid-area:2/4/3/5}
body:has(#call:not([hidden])) .rail .pdf-controls #zoom-value{grid-area:2/5/3/6;font-size:12px}
body:has(#call:not([hidden])) .rail .pdf-controls #zoom-in{grid-area:2/6/3/7}
body:has(#call:not([hidden])) .rail .pdf-controls button{height:34px!important;white-space:nowrap}
body:has(#call:not([hidden])) .rail .pdf-controls input{height:30px;width:40px!important}body:has(#call:not([hidden])) .rail{padding-bottom:0!important;min-height:0;overflow:hidden}
body:has(#call:not([hidden])) .rail .chat-card{flex:1 1 auto!important;min-height:0!important}
body:has(#call:not([hidden])) .rail > *:not(.chat-card){flex-shrink:0}
/* Status messages share normal layout space, so neither can cover the other. */
body:has(#call:not([hidden])) .lesson-caption{flex-wrap:wrap;justify-content:flex-start;gap:4px 12px;min-width:0}
body:has(#call:not([hidden])) .lesson-caption .live-network-status{position:static;inset:auto;flex:0 1 auto;max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;margin:0}
body:has(#call:not([hidden])) .lesson{grid-template-rows:44px minmax(0,1fr) auto auto!important}
body.student:has(#call:not([hidden])) .lesson{grid-template-rows:minmax(0,1fr) auto auto!important}
body:has(#call:not([hidden])) #call{padding-bottom:0}
body:has(#call:not([hidden])) .classroom{height:calc(100dvh - 66px)!important;max-height:calc(100dvh - 66px)!important;min-height:0!important}
body:has(#call:not([hidden])) .rail{height:100%!important;max-height:100%!important;display:flex!important;flex-direction:column!important}body:has(#call:not([hidden])) .rail .pdf-controls #fit-width,body:has(#call:not([hidden])) .rail .pdf-controls #fit-page{font-size:0!important;width:auto!important;min-width:40px!important;font-weight:800;background:#ffffff0d!important}
body:has(#call:not([hidden])) .rail .pdf-controls #fit-width::after{content:"FW";font-size:13px}
body:has(#call:not([hidden])) .rail .pdf-controls #fit-page::after{content:"FP";font-size:13px}
body:has(#call:not([hidden])) .rail .pdf-controls #fit-width{grid-area:2/1/3/2!important}
body:has(#call:not([hidden])) .rail .pdf-controls #fit-page{grid-area:2/2/3/3!important}
body:has(#call:not([hidden])) .rail .pdf-controls #zoom-out{grid-area:2/3/3/4!important}
body:has(#call:not([hidden])) .rail .pdf-controls #zoom-value{grid-area:2/4/3/6!important;font-size:13px!important}/* step6: chat fills panel, input at bottom */
body:has(#call:not([hidden])) .rail .chat-card{display:flex!important;flex-direction:column!important;overflow:hidden}
body:has(#call:not([hidden])) .rail .chat-card .chat-log{flex:1 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important;overflow-y:auto!important;padding:10px 12px}
body:has(#call:not([hidden])) .rail .chat-card .chat-form{flex:0 0 auto!important;margin-top:auto}
/* step7: Save class pinned right, status pops and fades */
body:has(#call:not([hidden])) .lesson-tabs-wrap #lesson-tabs{flex:1 1 auto;min-width:0}
body:has(#call:not([hidden])) #save-page{margin:0 8px 0 auto!important;align-self:center;height:32px!important;min-height:32px!important;min-width:0!important;padding:0 14px!important;border-radius:999px!important;background:transparent!important;border:1px solid #f0b66b!important;color:#f0b66b!important;font-weight:700;font-size:13px;box-shadow:none!important}
body:has(#call:not([hidden])) #save-page:hover{background:#f0b66b22!important}
body:has(#call:not([hidden])) .lesson-tabs-wrap>[role=status]{position:fixed;top:72px;left:50%;transform:translateX(-50%);z-index:40;padding:6px 14px!important;border-radius:999px;background:#2b2d2e;color:#f0b66b;border:1px solid #f0b66b55;pointer-events:none;animation:saveNote 3.5s forwards}
body:has(#call:not([hidden])) .lesson-tabs-wrap>[role=status]:empty{display:none}
@keyframes saveNote{0%,75%{opacity:1}100%{opacity:0}}

#menu-class #mc-close-file,#menu-class #mc-share-screen,#menu-class #mc-obs{background:rgba(255,255,255,.06);color:inherit;border:1px solid #ffffff22}

/* step9: student tile pen + reward */
.tile-controls .tc-pen[aria-pressed="true"]{background:#f0b66b!important;color:#202122!important}
.tile-controls .tc-star{color:#ffd35c!important}

/* step10: student box hidden (buttons now on student tile, still work via shortcuts); pen tools across the top */
body:has(#call:not([hidden])) #teaching-cues{display:none!important}
@media (min-width:900px){
 body:has(#call:not([hidden])) .drawing-launcher{
  top:118px!important;right:auto!important;left:calc((100vw - 344px) / 2)!important;transform:translateX(-50%)!important;
  flex-direction:row!important;flex-wrap:nowrap!important;max-width:calc(100vw - 380px)!important;overflow-x:auto!important;z-index:15!important}
 body:has(#call:not([hidden])) .drawing-launcher .toolbar-icon{width:40px!important;min-width:40px!important;height:38px!important}
}
/* step11: pen tools inside the top header bar */
body:has(#call:not([hidden])) .app-header .drawing-launcher{position:static!important;transform:none!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
 display:flex;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center;gap:2px!important;padding:2px 4px!important;margin:0 8px!important;
 max-width:none!important;overflow:visible!important;border-radius:12px!important;box-shadow:none!important;height:auto!important}
body:has(#call:not([hidden])) .app-header .drawing-launcher .toolbar-icon,body:has(#call:not([hidden])) .app-header .drawing-launcher>button{width:38px!important;min-width:38px!important;height:36px!important;min-height:36px!important;padding:0!important}
body:has(#call:not([hidden])) .app-header .drawing-launcher svg{width:20px;height:20px}
/* step12: student pen lives on the student tile only */
.drawing-launcher [title="Allow or pause student drawing"]{display:none!important}

.drawing-launcher [title^="Student pen"],.drawing-launcher [aria-label^="Student pen"]{display:none!important}

/* step15: page / fit / zoom controls in the top bar */
body:has(#call:not([hidden])) .app-header .pdf-controls:not([hidden]){position:static!important;opacity:1!important;transform:none!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
 align-items:center;gap:2px!important;padding:2px 6px!important;margin:0 4px!important;width:auto!important;max-width:none!important;height:auto!important;background:#2b2d2e!important;border:1px solid #ffffff16!important;border-radius:12px!important;box-shadow:none!important}
body:has(#call:not([hidden])) .app-header .pdf-controls button{height:32px!important;min-width:30px!important;padding:0 8px!important;font-size:12px!important;white-space:nowrap}
body:has(#call:not([hidden])) .app-header .pdf-controls input{height:28px!important;width:34px!important}
body:has(#call:not([hidden])) .app-header .pdf-controls #zoom-value{font-size:12px;min-width:38px;text-align:center}
body:has(#call:not([hidden])) .app-header .pdf-controls label span{display:none}
/* Screenshot picker, shared by teacher and student. */
.screenshot-dialog{max-width:420px;width:calc(100% - 36px);box-sizing:border-box;border:1px solid #2b7a82;border-radius:18px;padding:24px;background:#173340;color:#fbf4e4}
.screenshot-dialog::backdrop{background:rgb(0 0 0 / .65)}
.screenshot-dialog h2{margin-top:0}.screenshot-dialog p{line-height:1.5}
.screenshot-options{display:flex;flex-wrap:wrap;gap:12px}.screenshot-dialog button{min-height:44px;padding:10px 16px;margin:4px 0;border-radius:10px;border:1px solid #2b7a82;background:#25525f;color:#fbf4e4;cursor:pointer}
.screenshot-dialog button:disabled{opacity:.5;cursor:default}.screenshot-dialog [data-screenshot="permission"]{display:block}.screenshot-dialog [hidden]{display:none!important}.screenshot-dialog [aria-pressed="true"]{background:#2b7a82}.screenshot-note{min-height:1.5em}

.tile-controls .tc-screenshot[aria-pressed="true"]{background:#f0b66b!important;color:#202122!important}
.tile-controls .tc-screenshot[aria-pressed="false"]{opacity:.55}

/* Type directly over the page without an opaque panel. */
body input.lesson-text-entry{background:transparent!important;border:0!important;border-bottom:2px dashed #505050!important;border-radius:0!important;box-shadow:none!important;outline:none!important;padding:0!important;min-height:0!important;height:auto!important;line-height:1.2;width:280px;max-width:calc(100vw - 24px)}
body input.lesson-text-entry::placeholder{color:#333;opacity:1;font-size:18px;font-weight:600;text-shadow:0 0 2px #fff,0 0 4px #fff}

#classroom-timer{display:flex;flex-direction:column;justify-content:center;flex:0 0 auto;padding:2px 8px;font:11px/1.4 Arial,sans-serif;color:#fbf4e4;white-space:nowrap}#classroom-timer strong{font-size:14px;font-variant-numeric:tabular-nums}#classroom-timer[hidden]{display:none}

/* Booking label is an additional grid row, not the lesson-tab row. */
body:has(#call:not([hidden])) .lesson:has(> .booking-context:not([hidden])) {
  grid-template-rows: auto 44px minmax(0, 1fr) auto auto auto !important;
}
body:has(#call:not([hidden])) .lesson > .booking-context:not([hidden]) {
  margin: 6px 10px 2px;
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
body:has(#call:not([hidden])) .lesson > .lesson-tabs-wrap {
  align-self: start;
  max-height: 40px;
}

/* Student tabs are hidden: the lesson stage must occupy the flexible row. */
body.student:has(#call:not([hidden])) .lesson:has(> .booking-context:not([hidden])) { grid-template-rows: auto minmax(0, 1fr) auto auto auto !important; }
