:root{color-scheme:light;--bg:#f3f6fb;--surface:#fff;--ink:#1c2b42;--muted:#65748a;--line:#dce4ef;--blue:#285fbc;--blue-hover:#194a9b;--blue-soft:#edf3fe;--green:#23754e;--green-soft:#edf7f0;--amber:#865610;--amber-soft:#fff4dd;--red:#a52b41;--red-soft:#fff0f3;--shadow:0 8px 28px #20395a09;font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-size:14px;line-height:1.5}button,input,select,textarea{font:inherit;color:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}a{color:var(--blue)}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,canvas:focus-visible{outline:3px solid #608fe6;outline-offset:3px}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}h1,h2,h3,p{margin:0}button svg{width:18px;height:18px;flex:none}
.global-header{min-height:76px;display:flex;align-items:center;gap:28px;padding:12px 24px;background:var(--surface);border-bottom:1px solid var(--line)}.brand{display:inline-flex;gap:8px;align-items:center;flex:none;text-decoration:none;font-size:19px;font-weight:750;letter-spacing:-.5px}.brand-mark{display:grid;place-items:center;width:32px;height:34px;border-radius:9px;background:var(--blue-soft);font:28px/1 Georgia,serif}.lesson-heading{min-width:0;border-left:1px solid var(--line);padding-left:24px}.eyebrow{display:block;color:var(--muted);font-size:10px;font-weight:750;letter-spacing:1.25px}.lesson-heading h1{font-size:16px;line-height:1.4;font-weight:650;overflow-wrap:anywhere}.session-info{display:flex;gap:9px;align-items:center;margin-left:auto;flex-wrap:wrap;justify-content:flex-end}.role-badge,.connection-status{font-size:12px;border-radius:7px;padding:5px 9px;background:var(--bg);color:var(--muted)}.connection-status{display:inline-flex;align-items:center;gap:6px}.connection-status::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.connection-status.ok,.connection-status.online,.connection-status.connected,.connection-status[data-state=connected]{color:var(--green);background:var(--green-soft)}.connection-status.bad,.connection-status.error,.connection-status[data-state=error]{background:var(--red-soft);color:var(--red)}.connection-status.wait,.connection-status[data-state=connecting]{background:var(--amber-soft);color:var(--amber)}
.global-messages{padding:0 18px}.notice:empty{display:none}.notice,.error-notice{padding:10px 14px;border-radius:8px;margin:10px 0;font-size:13px}.notice{color:#305680;background:var(--blue-soft);border:1px solid #d6e4fb}.error-notice{color:var(--red);background:var(--red-soft);border:1px solid #edc8d0;overflow-wrap:anywhere}.setup{max-width:1120px;margin:0 auto;padding:62px 30px 60px;display:grid;grid-template-columns:minmax(0,1fr) minmax(350px,.94fr);gap:72px;align-items:start}.setup-intro{padding-top:18px}.section-kicker{display:block;font-size:11px;letter-spacing:1.45px;font-weight:750;color:var(--blue);margin-bottom:20px}.setup-intro h2{font-size:clamp(29px,2.8vw,40px);line-height:1.22;font-weight:650;letter-spacing:-1.15px}.intro-copy{font-size:16px;line-height:1.75;color:var(--muted);margin-top:20px;max-width:440px}.setup-steps{list-style:none;padding:0;margin:32px 0 26px;display:grid;gap:24px}.setup-steps li{display:flex;gap:14px;align-items:start}.step-number{width:28px;height:28px;display:grid;place-items:center;background:#e5edf9;border-radius:8px;font-size:12px;font-weight:750;color:var(--blue);flex:none}.setup-steps strong{font-size:14px;font-weight:650}.setup-steps p{color:var(--muted);font-size:13px;line-height:1.65;margin-top:3px}.quiet-link{display:inline-flex;gap:8px;align-items:center;text-decoration:none;font-size:13px}.quiet-link:hover{text-decoration:underline}.setup-card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:30px;box-shadow:var(--shadow)}.card-heading{margin-bottom:24px}.card-heading h2{font-size:23px;letter-spacing:-.4px;font-weight:650;margin:4px 0 5px}.card-heading p{color:var(--muted);font-size:13px}.field{display:grid;gap:7px;margin-bottom:19px}.field>label{font-size:13px;font-weight:650}.field-optional{font-size:12px;color:var(--muted);font-weight:450;margin-left:5px}input[type=text],input[type=url],select,textarea{width:100%;border:1px solid #ccd6e4;border-radius:8px;background:#fff;padding:10px 12px;min-height:43px;font-size:14px;transition:border-color .15s}input::placeholder,textarea::placeholder{color:#8490a3;font-size:13px}textarea{resize:vertical;min-height:132px;line-height:1.7}input:hover,textarea:hover,select:hover{border-color:#a3b4ca}input:focus,textarea:focus,select:focus{border-color:var(--blue)}.field-hint{font-size:12px;line-height:1.55;color:var(--muted)}.connection-settings{border-top:1px solid var(--line);padding-top:15px}.connection-settings summary{cursor:pointer;color:var(--muted);font-size:12px;list-style-position:inside}.connection-settings[open] summary{margin-bottom:14px}.connection-settings .field{margin-bottom:9px}.setup-status{font-size:12px;line-height:1.6;color:var(--muted);margin:12px 0}.setup-status:empty{margin:0}.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:#fff;font-size:13px;line-height:1.3;font-weight:600;white-space:nowrap;text-decoration:none;transition:background .12s,border-color .12s}.button:hover{border-color:#a6bbdb;background:#f7faff}.button.primary{color:#fff;background:var(--blue);border-color:var(--blue)}.button.primary:hover{background:var(--blue-hover);border-color:var(--blue-hover)}.button.subtle{color:var(--muted);background:transparent}.button[aria-pressed=true]{background:var(--blue-soft);border-color:#aec8f0;color:var(--blue)}.button.create-button{width:100%;justify-content:space-between;min-height:46px;margin-top:19px;padding-left:16px;padding-right:16px}.button.create-button span{font-size:20px;font-weight:400}
.lesson-app{display:flex;flex-direction:column;min-height:calc(100dvh - 77px);padding:0 18px}.lesson-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px 0 10px}.toolbar-start,.toolbar-end{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.roster{display:flex;gap:7px;flex-wrap:wrap;padding:1px 0 11px;border-bottom:1px solid var(--line)}.roster>button,.roster-chip{display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);font-size:12px;white-space:nowrap}.roster>button:hover,.roster-chip:hover{border-color:#9eb8dd;background:var(--blue-soft)}.roster>button[aria-current=true],.roster>button[aria-pressed=true],.roster-chip.active{border-color:var(--blue);color:var(--blue);background:var(--blue-soft)}.roster>button[data-help=true],.roster-chip.needs-help,.roster-chip.help{background:var(--amber-soft);border-color:#edce92;color:var(--amber)}.roster-chip .student-name{font-size:12px}.roster-chip small{font-size:11px;color:var(--muted)}.status-dot{display:inline-block;width:7px;height:7px;background:#a8b2c1;border-radius:50%;flex:none}.status-dot.online{background:var(--green)}.status-dot.help{background:#ce8a23}.overview{display:flex;flex:1;flex-direction:column;min-height:0}.overview-heading{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:12px 0 9px}.overview-heading p{font-size:12px;font-weight:650;color:#47586f}.overview-heading>span{color:var(--muted);font-size:11px}.student-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(240px,1fr));gap:12px;flex:1;padding-bottom:14px;min-height:0}.student-card{position:relative;display:flex;flex-direction:column;min-width:0;min-height:250px;border:1px solid var(--line);border-radius:11px;overflow:hidden;background:var(--surface);text-align:left;box-shadow:0 2px 6px #20395a04}.student-card:hover{border-color:#98b4db}.student-card:focus-within{border-color:var(--blue)}button.student-card{padding:0;color:inherit;cursor:pointer}.student-card-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 13px;border-bottom:1px solid var(--line)}.student-name{font-size:14px;font-weight:650;overflow-wrap:anywhere}.student-status{font-size:11px;font-weight:500;padding:3px 7px;border-radius:5px;background:var(--bg);color:var(--muted);flex:none}.student-status.help,.student-status[data-help=true]{background:var(--amber-soft);color:var(--amber)}.student-status.online,.student-status.ok{background:var(--green-soft);color:var(--green)}.student-task{padding:8px 13px;color:var(--muted);font-size:12px;border-bottom:1px solid #edf1f7;overflow-wrap:anywhere}.student-preview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);flex:1;min-height:155px;overflow:hidden}.preview-trainer,.preview-board{position:relative;min-width:0;min-height:0;overflow:hidden}.preview-trainer{border-right:1px solid var(--line)}.preview-trainer iframe{border:0;display:block;pointer-events:none}.preview-board canvas{display:block;width:100%;height:100%;background:#fff}.student-card-foot{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:8px 12px;font-size:11px;color:var(--muted);border-top:1px solid var(--line)}.student-card-foot .open-label{color:var(--blue);white-space:nowrap}.empty-preview,.empty-state{display:grid;place-content:center;min-height:130px;padding:22px;text-align:center;color:var(--muted);font-size:13px;line-height:1.65}.empty-preview strong,.empty-state strong{display:block;color:#455770;font-size:14px;margin-bottom:4px}.sheet-tabs{display:flex;gap:4px;align-items:stretch;margin:0 -18px;padding:0 18px;background:#ebf0f7;border-top:1px solid #d4deeb;min-height:47px;position:sticky;bottom:0;z-index:3}.sheet-tabs>button,.sheet-tab{min-height:46px;border:0;border-bottom:3px solid transparent;background:transparent;padding:10px 17px;color:#596b80;font-size:12px;white-space:nowrap}.sheet-tabs>button:hover,.sheet-tab:hover{color:var(--blue);background:#f8faff}.sheet-tabs>button[aria-selected=true],.sheet-tabs>button[aria-pressed=true],.sheet-tab.active{background:#fff;border-bottom-color:var(--green);color:var(--green);font-weight:650}.sheet-tabs .help-count{display:inline-block;background:#f4dfb6;color:var(--amber);border-radius:9px;min-width:17px;padding:0 4px;margin-left:5px;font-size:10px;text-align:center}
.focus{display:flex;flex:1;flex-direction:column;min-height:0;padding-bottom:14px}.focus-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0}.focus-heading-main{display:flex;gap:13px;align-items:center;min-width:0}.focus-heading h2{font-size:17px;font-weight:650;overflow-wrap:anywhere}.workspace-meta{font-size:11px;color:var(--muted);margin-top:2px}.back-button{font-size:12px;min-height:34px;align-self:center}.focus-actions{display:flex;flex-wrap:wrap;gap:7px;justify-content:flex-end}.focus-actions .button{font-size:12px}.help-button{color:var(--amber);border-color:#ecd4a6;background:#fffbf2}.help-button[aria-pressed=true]{background:var(--amber-soft);color:var(--amber);border-color:#ddb777}.help-notice{margin:0 0 10px;padding:9px 12px;background:var(--amber-soft);border:1px solid #e9d09d;border-radius:8px;font-size:12px;color:var(--amber)}.workspace-panels{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;flex:1;min-height:450px}.trainer-panel,.board-panel{display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--surface);border:1px solid var(--line);border-radius:10px;overflow:hidden}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 13px;min-height:44px;border-bottom:1px solid var(--line)}.panel-heading h3{font-size:13px;font-weight:650}.panel-status,.panel-caption{font-size:11px;color:var(--muted)}.panel-status{max-width:65%;text-align:right}.trainer-host{position:relative;min-height:0;flex:1;display:flex;flex-direction:column}.trainer-host>iframe{display:block;border:0;width:100%;height:100%;min-height:470px;flex:1;background:#fff}.trainer-host>.empty-state{height:100%;flex:1}.board-tools{display:flex;align-items:center;gap:6px;padding:8px 10px;background:#fbfcff;border-bottom:1px solid var(--line);flex-wrap:wrap}.tool-button{padding:6px 9px;font-size:12px;min-height:32px}.tool-divider{height:23px;border-left:1px solid var(--line);margin:0 2px}.color-tool{display:flex;align-items:center}.color-tool input{width:32px;height:32px;padding:3px;border-radius:7px;border:1px solid var(--line);background:#fff;cursor:pointer}.width-tool{display:flex;gap:5px;align-items:center;margin-left:2px;color:var(--muted);font-size:10px}.width-tool input{width:66px;margin:0;accent-color:var(--blue)}.undo-button{margin-left:auto}.canvas-wrap{position:relative;display:flex;flex:1;min-height:330px;padding:10px;background:#edf2f8}.canvas-wrap canvas{display:block;width:100%;height:100%;min-height:330px;border:1px solid #dee5ef;border-radius:5px;background-color:#fff;background-image:linear-gradient(#e5ecf580 1px,transparent 1px),linear-gradient(90deg,#e5ecf580 1px,transparent 1px);background-size:24px 24px;touch-action:none;cursor:crosshair}.history-panel{margin-top:12px;background:#f8faff;border:1px solid #cddcf0;border-radius:10px;padding:14px 16px}.history-heading{display:flex;gap:12px;justify-content:space-between;align-items:center}.history-heading h3{font-size:13px;font-weight:650}.history-heading p{font-size:11px;color:var(--muted);margin-top:3px}.history-heading .button{font-size:12px}.history-timeline{display:flex;gap:16px;align-items:center;margin-top:12px}.history-timeline input{min-width:0;flex:1;margin:0;accent-color:var(--blue)}.history-timeline output{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;min-width:75px;text-align:right}.workspace-dialog{width:min(520px,calc(100% - 32px));max-height:calc(100dvh - 48px);margin:auto;padding:25px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 22px 80px #14274335;color:var(--ink);overflow:auto}.workspace-dialog::backdrop{background:#14274370;backdrop-filter:blur(2px)}.dialog-heading{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:24px}.dialog-heading h2{margin-top:4px;font-size:21px;font-weight:650;letter-spacing:-.4px}.close-button{font-size:23px;font-weight:400;width:33px;min-height:33px;padding:0;line-height:1}.dialog-help{font-size:12px;color:var(--muted);line-height:1.65}.dialog-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:24px}.invite-dialog{width:min(660px,calc(100% - 32px))}.invite-list{display:grid;gap:10px;margin:20px 0}.invite-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px 10px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:9px}.invite-row strong,.invite-row label{font-size:13px;font-weight:650}.invite-row input,.invite-row .invite-link{grid-column:1;font-size:11px;min-width:0;overflow:hidden;text-overflow:ellipsis}.invite-row .button{grid-column:2;grid-row:1 / 3;min-height:35px;font-size:12px}.teacher-link-section{border-top:1px solid var(--line);padding-top:18px}.teacher-link-section strong{font-size:13px}.teacher-link-section p{margin:5px 0 12px}.noscript-notice{margin:20px;padding:16px;border:1px solid #e4be85;background:var(--amber-soft);color:var(--amber);border-radius:8px}body[data-role=student] .teacher-only,body[data-role=teacher] .student-only{display:none!important}
@media(min-width:1050px) and (min-height:650px){.lesson-app{height:calc(100dvh - 77px)}.student-grid{grid-template-rows:repeat(2,minmax(190px,1fr))}.student-card{min-height:190px}.workspace-panels{min-height:0}.trainer-host>iframe{min-height:0}.canvas-wrap,.canvas-wrap canvas{min-height:200px}.global-messages:has(.notice:not(:empty))+.setup{padding-top:30px}.global-messages:has(.notice:not(:empty))~.lesson-app,.global-messages:has(.error-notice:not([hidden]))~.lesson-app{height:calc(100dvh - 136px);min-height:calc(100dvh - 136px)}}
@media(min-width:1600px){.global-header{padding-left:28px;padding-right:28px}.lesson-app{padding-left:24px;padding-right:24px}.sheet-tabs{margin-left:-24px;margin-right:-24px;padding-left:24px}.student-grid{gap:16px}.student-card-head{padding:12px 16px}.student-task{padding:8px 16px}.workspace-panels{gap:16px}}
@media(max-width:1049px){.global-header{gap:18px}.setup{gap:36px;padding-top:40px}.setup-intro h2{font-size:32px}.setup-card{padding:24px}.lesson-heading{padding-left:18px}.focus-heading{align-items:flex-start;flex-wrap:wrap}.workspace-panels{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.trainer-host>iframe{min-height:500px}.board-tools{gap:4px}.width-tool>span{display:none}.width-tool input{width:48px}.overview-heading>span{font-size:10px}}
@media(max-width:760px){.global-header{padding:12px 14px;gap:14px;flex-wrap:wrap}.brand{font-size:17px}.brand-mark{width:27px;height:29px;font-size:25px}.lesson-heading{padding-left:14px;flex:1}.lesson-heading h1{font-size:14px}.session-info{width:100%;justify-content:flex-start;margin:0;padding-top:1px;gap:6px}.role-badge,.connection-status{font-size:10px;padding:3px 7px}.eyebrow{font-size:9px}.setup{display:block;max-width:520px;padding:25px 18px 36px}.setup-intro{padding-top:0}.section-kicker{font-size:10px;margin-bottom:12px}.setup-intro h2{font-size:29px;letter-spacing:-.8px}.intro-copy{font-size:14px;line-height:1.7;margin-top:14px}.setup-steps{gap:15px;margin:23px 0}.setup-steps p{font-size:12px}.setup-card{margin-top:25px;padding:23px}.setup-intro .quiet-link{font-size:12px}.global-messages{padding:0 12px}.lesson-app{padding:0 10px;min-height:calc(100dvh - 105px)}.lesson-toolbar{align-items:flex-start;gap:8px;flex-wrap:wrap}.toolbar-start,.toolbar-end{gap:6px}.lesson-toolbar .button{min-height:35px;font-size:11px;padding:7px 9px}.roster{gap:5px;padding-bottom:9px}.roster>button,.roster-chip{font-size:10px;padding:5px 7px;min-height:31px}.overview-heading>span{display:none}.student-grid{gap:9px;grid-template-rows:repeat(2,minmax(240px,1fr))}.student-card-head{padding:8px;flex-wrap:wrap;gap:4px}.student-name{font-size:12px}.student-status{font-size:10px;padding:2px 5px}.student-task{padding:6px 8px;font-size:10px}.student-preview{grid-template-columns:1fr;min-height:175px}.preview-trainer{border-right:0;border-bottom:1px solid var(--line)}.student-card-foot{font-size:10px;padding:7px 8px;flex-wrap:wrap;gap:3px}.sheet-tabs{margin:0 -10px;padding:0 7px;overflow-x:auto}.sheet-tabs>button,.sheet-tab{font-size:11px;padding:10px 12px;flex:none}.focus-heading{gap:9px}.focus-heading-main{gap:9px}.focus-heading h2{font-size:15px}.focus-actions{justify-content:flex-start}.focus-actions .button{font-size:11px;min-height:33px}.workspace-panels{grid-template-columns:1fr;gap:11px}.trainer-host>iframe{min-height:500px}.canvas-wrap,.canvas-wrap canvas{min-height:390px}.history-heading{align-items:flex-start}.history-heading .button{font-size:10px;white-space:normal}.history-timeline{gap:8px}.history-timeline output{font-size:10px}.workspace-dialog{padding:21px;max-height:calc(100dvh - 24px)}.invite-row{padding:10px;gap:6px}.invite-row .button{font-size:10px;padding:6px 8px}.dialog-heading{margin-bottom:20px}.width-tool>span{display:inline}.width-tool input{width:65px}}
@media(max-width:420px){.student-grid{grid-template-columns:1fr;grid-template-rows:auto}.student-preview{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.preview-trainer{border-right:1px solid var(--line);border-bottom:0}.student-card{min-height:240px}.setup-card{padding:20px}.setup-intro h2{font-size:26px}.toolbar-end{width:100%}.toolbar-end .button{flex:1}.focus-heading-main .back-button span{display:none}.invite-row{grid-template-columns:1fr}.invite-row .button{grid-column:1;grid-row:auto;justify-self:start}.width-tool input{width:46px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* Live workspace integrations: previews swap between a trainer and its board. */
.connection-status[data-state=saved]{color:var(--green);background:var(--green-soft)}
.connection-status[data-state=pending]{color:var(--amber);background:var(--amber-soft)}
.connection-status[data-state=offline]{color:var(--red);background:var(--red-soft)}
.student-card[data-help=true]{border-color:#e2be7c}
.student-card[data-help=true] .student-status{color:var(--amber);background:var(--amber-soft)}
.student-preview{position:relative;display:flex;align-items:center;justify-content:center;container-type:size;isolation:isolate;min-height:110px;background:#f5f8fc}
.preview-trainer{position:absolute;inset:0;width:100%;height:100%;border:0;background:#fff}
.preview-trainer>.empty-state{height:100%;min-height:0;padding:14px 22px;font-size:12px}
canvas.preview-board{display:block;width:min(100%,calc(100cqh * 4 / 3));height:auto;aspect-ratio:4/3;flex:none;background:#fff;border:1px solid #e4eaf3}
.preview-open{position:absolute;inset:0;z-index:3;width:100%;height:100%;padding:0;border:0;border-radius:0;background:transparent;color:transparent;font-size:0;cursor:zoom-in}
.preview-open::after{content:"Открыть работу ↗";position:absolute;bottom:7px;right:8px;border:1px solid #d9e4f4;border-radius:6px;padding:4px 7px;background:#fffffff0;color:var(--blue);font-size:10px;line-height:1.35;box-shadow:0 1px 5px #20395a0d}
.preview-open:hover::after{background:var(--blue-soft);border-color:#a6bfdf}
.preview-open:focus-visible{outline-offset:-4px}
.student-card-foot .button{font-size:10px;min-height:28px;padding:5px 8px;flex:none}
.preview-summary{min-width:0;font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.trainer-host>.group-trainer-frame{flex:1;min-height:470px!important}
.canvas-wrap{display:grid;place-items:start center;min-height:0;container-type:inline-size}
.canvas-wrap canvas{width:100%;height:auto;aspect-ratio:4/3;min-height:0;flex:none}
@media(min-width:1050px) and (min-height:650px){
  .student-card{min-height:0}.student-grid{grid-template-rows:repeat(2,minmax(0,1fr))}
  .student-preview{min-height:0}.student-card-head{padding-top:8px;padding-bottom:8px}.student-task{padding-top:6px;padding-bottom:6px}
  .trainer-host>.group-trainer-frame{min-height:0!important}
  .canvas-wrap{container-type:size;min-height:0}
  .canvas-wrap canvas{width:min(100%,calc(100cqh * 4 / 3));height:auto;min-height:0}
}
@media(max-width:760px){.preview-summary{font-size:10px}.student-card-foot .button{font-size:9px;padding:4px 6px;min-height:26px}.trainer-host>.group-trainer-frame{min-height:500px!important}.canvas-wrap,.canvas-wrap canvas{min-height:0}.student-preview{min-height:150px}}

/* Keep four live works legible on a laptop; focused work retains full controls. */
@media(min-width:1050px) and (min-height:650px){
  body:has(#app:not([hidden]) #overview:not([hidden])) .global-header{min-height:62px;padding-top:7px;padding-bottom:7px}
  body:has(#app:not([hidden]) #overview:not([hidden])) .lesson-app{height:calc(100dvh - 63px);min-height:calc(100dvh - 63px)}
  body:has(#app:not([hidden]) #overview:not([hidden])) .notice{margin-top:6px;margin-bottom:6px;padding-top:7px;padding-bottom:7px;font-size:12px;line-height:1.4}
  body:has(#app:not([hidden]) #overview:not([hidden])) .global-messages:has(.notice:not(:empty))~.lesson-app{height:calc(100dvh - 108px);min-height:calc(100dvh - 108px)}
  body:has(#app:not([hidden]) #overview:not([hidden])) .global-messages:has(.error-notice:not([hidden]))~.lesson-app{height:calc(100dvh - 126px);min-height:calc(100dvh - 126px)}
  body:has(#app:not([hidden]) #overview:not([hidden])) .global-messages:has(.error-notice:not([hidden])):has(.notice:not(:empty))~.lesson-app{height:calc(100dvh - 171px);min-height:calc(100dvh - 171px)}
  body:has(#app:not([hidden]) #overview:not([hidden])) .lesson-toolbar{padding-top:8px;padding-bottom:7px}
  body:has(#app:not([hidden]) #overview:not([hidden])) .lesson-toolbar .button{min-height:34px;padding-top:6px;padding-bottom:6px;font-size:12px}
  body:has(#app:not([hidden]) #overview:not([hidden])) .roster{padding-bottom:7px;gap:6px}
  body:has(#app:not([hidden]) #overview:not([hidden])) .roster>button{min-height:29px;padding:4px 8px;font-size:11px}
  body:has(#app:not([hidden]) #overview:not([hidden])) .overview-heading{padding-top:7px;padding-bottom:6px}
  body:has(#app:not([hidden]) #overview:not([hidden])) .student-grid{gap:10px;padding-bottom:10px}
  body:has(#app:not([hidden]) #overview:not([hidden])) .student-card-head{padding:6px 11px}
  body:has(#app:not([hidden]) #overview:not([hidden])) .student-task{padding:4px 11px;font-size:11px}
  body:has(#app:not([hidden]) #overview:not([hidden])) .student-card-foot{padding:5px 10px;gap:8px}
  body:has(#app:not([hidden]) #overview:not([hidden])) .student-card-foot .button{min-height:26px;padding:4px 7px}
}

/* A pupil can keep their own work open beside the teacher's shared explanation. */
.workspace-layout{display:flex;flex:1;min-height:0;min-width:0;gap:16px;align-items:stretch}
.workspace-layout:has(>.focus[hidden]){display:none}
.workspace-layout>.focus{min-width:0}
.teacher-watch{display:flex;flex-direction:column;flex:0 0 31%;min-width:280px;max-width:410px;min-height:0;margin:12px 0 14px;background:#fff;border:1px solid #cfddf0;border-radius:10px;overflow:hidden}
.teacher-watch-heading{padding:15px 15px 12px;background:#f7faff;border-bottom:1px solid #dee7f4}
.teacher-watch-heading .eyebrow{color:var(--blue);font-size:9px}
.teacher-watch-heading h2{font-size:16px;line-height:1.4;font-weight:650;margin-top:5px;letter-spacing:-.2px}
.teacher-watch-heading p{font-size:11px;color:var(--muted);margin-top:5px}
.teacher-watch-status{padding:9px 13px;font-size:11px;color:var(--muted);border-bottom:1px solid var(--line);line-height:1.5}
.teacher-watch-status:empty{display:none}
.teacher-watch-content{display:grid;place-items:start center;position:relative;flex:1;min-height:220px;container-type:size;background:#f2f6fc;overflow:hidden}
.teacher-watch-trainer{position:absolute;inset:0;width:100%;height:100%;background:#fff}
.teacher-watch-trainer>.empty-state{display:grid;place-content:center;height:100%;min-height:0;padding:22px;font-size:12px;line-height:1.65}
.teacher-watch-canvas{display:block;width:min(100%,calc(100cqh * 4 / 3));height:auto;aspect-ratio:4/3;background:#fff;border:1px solid #e1e8f2;pointer-events:none}
.teacher-watch-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:space-between;padding:10px;border-top:1px solid var(--line)}
.teacher-watch-actions .button{font-size:11px;min-height:33px;padding:6px 8px}
.presentation-status{display:inline-flex;align-items:center;gap:6px;max-width:320px;font-size:11px;line-height:1.4;color:var(--blue);background:var(--blue-soft);padding:5px 8px;border-radius:6px}
.presentation-status::before{content:"";width:6px;height:6px;flex:none;background:var(--blue);border-radius:50%}
#presentButton[aria-pressed=true]{color:var(--green);background:var(--green-soft);border-color:#98c9aa}
@media(min-width:1050px){
  body[data-role=student][data-view=personal] .workspace-layout>.focus{flex:1;width:0}
  body[data-role=student][data-view=personal] .focus-heading{flex-wrap:wrap;gap:8px}
  body[data-role=student][data-view=personal] .focus-heading-main{flex:1}
  body[data-role=student][data-view=personal] .workspace-panels{display:flex;flex-direction:column;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:3px}
  body[data-role=student][data-view=personal] .workspace-panels>.trainer-panel{flex:0 0 48vh;min-height:360px}
  body[data-role=student][data-view=personal] .workspace-panels>.board-panel{flex:0 0 auto;min-height:0}
  body[data-role=student][data-view=personal] .canvas-wrap{container-type:inline-size;flex:none;min-height:0}
  body[data-role=student][data-view=personal] .canvas-wrap canvas{width:100%;height:auto;min-height:0;aspect-ratio:4/3}
}
@media(max-width:1049px){.teacher-watch{display:none}.workspace-layout{display:block;flex:1}.workspace-layout>.focus{min-height:100%}}
