.scratch-classroom{position:relative;width:calc(100vw - 24px);max-width:none;margin-left:50%;transform:translateX(-50%)}
.coding-classroom-bar{display:grid;grid-template-columns:auto minmax(0,1fr) 170px auto;align-items:center;gap:14px;background:#fff;border:1px solid #dce6f1;border-radius:18px;padding:10px 14px;margin-bottom:8px;box-shadow:0 8px 24px rgba(18,54,92,.08)}
.compact-back{padding:8px;margin:0;white-space:nowrap}.coding-task-copy h1{font-size:1.08rem;margin:2px 0}.coding-task-copy p{margin:0;color:#53647a;font-size:.88rem}.coding-task-meta{display:flex;gap:8px;align-items:center;font-size:.74rem;color:#617188}.coding-task-meta .mission-badge{padding:3px 8px}.coding-progress-compact{text-align:right}.coding-progress-compact span,.coding-progress-compact strong{display:inline-block;font-size:.78rem}.coding-progress-compact strong{margin-left:6px;color:#1762ae}.coding-progress-compact .progress{height:6px;margin:5px 0 0}.instruction-toggle{padding:9px 12px}
.lesson-drawer{background:#fff;border:1px solid #dce6f1;border-radius:16px;padding:16px;margin-bottom:8px;max-height:44vh;overflow:auto}.lesson-drawer-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.lesson-drawer h2{font-size:1rem;margin-bottom:8px}.lesson-drawer .teacher-note{margin:10px 0}.lesson-drawer .track{margin:0}.lesson-drawer .course-lesson{display:inline-grid;width:min(260px,100%);margin:2px}
.scratch-status-row{display:flex;gap:12px;align-items:center;min-height:32px;padding:4px 10px;font-size:.78rem;color:#52647b}.scratch-status-row span:first-child{font-weight:800;color:#1762ae}.scratch-status-row #codingFeedback{margin-left:auto;min-height:0}
/* The editor's own step status, beside the lesson's feedback instead of replacing it. */
.scratch-status-row #stepFeedback{font-weight:800;color:#1762ae;white-space:nowrap}.scratch-status-row #scratchSaveStatus{white-space:nowrap}
.scratch-status-row .scratch-retry{width:auto;margin:0;padding:5px 10px;font-size:inherit;white-space:nowrap}
.scratch-editor-shell{height:calc(100dvh - 190px);min-height:620px;background:#e5f0ff;border:1px solid #c7d8ed;border-radius:16px;overflow:hidden;box-shadow:0 12px 30px rgba(18,54,92,.12)}.scratch-editor-host{height:100%;width:100%;position:relative}.scratch-editor-host>div{height:100%}.scratch-editor-host [class*="gui_body-wrapper"]{height:100%}
/* The coding module's own notice, shown when the editor cannot run here (no WebGL, or a bundle
   that would not load). It sits in the page's normal flow inside #scratch: it is never an
   overlay, so it cannot cover the sign-in gate or another lesson, and it has its own Close and
   Back to home. */
.scratch-notice{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;background:#fff6e8;border:1px solid #f0d3a8;border-left:5px solid #f0a63c;border-radius:16px;padding:14px 16px;margin-bottom:8px}
.scratch-notice[hidden]{display:none}
.scratch-notice-copy{min-width:min(100%,320px);flex:1 1 320px}
.scratch-notice-copy strong{display:block;font-size:1rem;color:#8a5200}
.scratch-notice-copy p{margin:4px 0 0;color:#5c6b7f;font-size:.86rem;line-height:1.45}
.scratch-notice-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.scratch-notice-actions button{width:auto;margin:0;padding:10px 14px;white-space:nowrap}
/* With the editor unavailable the empty blue frame would only look like a broken editor. */
#scratch.scratch-editor-unavailable .scratch-editor-shell{display:none}
/* A phone hint, and only on a phone: the editor inside keeps its desktop width and is scrolled
   sideways there (see the narrow-screen rule below), which is a thing to be told about. */
.scratch-phone-hint{display:none;color:#8a5200;font-weight:800}
body:has(#scratch.active-page) .topbar{position:relative;z-index:0}
/* The editor's own menus and dropdowns may hang outside the shell on a desktop. On a narrow
   screen the shell is what keeps the editor's fixed 960px layout inside the page instead of
   stretching the whole document -- and a document wider than the viewport is what made a phone
   scale the entire site down to about 40%, buttons and text included. */
@media(min-width:1001px){#scratch .scratch-editor-shell{overflow:visible}}
.coding-step-nav{display:flex;justify-content:flex-end;gap:8px;padding-top:8px}.coding-step-nav button{width:auto;margin:0;padding:10px 14px}.coding-step-nav button:disabled{opacity:.42;cursor:not-allowed}.ai-panel{width:min(25vw,390px)}
.live-text-form{display:flex;gap:.45rem;margin-top:.65rem}.live-text-form input{min-width:0;flex:1;border:1px solid #d7ddea;border-radius:12px;padding:.62rem .72rem}.live-controls{display:flex;flex-wrap:wrap;gap:.45rem;align-items:center}.live-controls #liveStatus{flex-basis:100%;margin:.2rem 0 0}
@media(max-width:1000px){.coding-classroom-bar{grid-template-columns:auto 1fr auto}.coding-progress-compact{display:none}.scratch-editor-shell{height:calc(100dvh - 185px);min-height:560px;overflow-x:auto;overflow-y:hidden}.ai-panel{width:min(360px,calc(100vw - 1rem));max-width:none}.lesson-drawer-grid{grid-template-columns:1fr}}
@media(max-width:700px){.scratch-classroom{width:100vw}.coding-classroom-bar{border-radius:0;grid-template-columns:auto 1fr auto;padding:7px}.coding-task-copy h1{font-size:.92rem}.coding-task-meta{font-size:.66rem}.coding-task-copy p{max-height:2.5em;overflow:hidden}.instruction-toggle{font-size:0;width:38px;height:38px;padding:0}.instruction-toggle:after{content:'☰';font-size:1rem}.scratch-status-row{font-size:.68rem;flex-wrap:wrap}.scratch-status-row #codingFeedback{display:none}.scratch-phone-hint{display:inline}.scratch-notice{border-radius:12px;padding:12px}.scratch-notice-actions{width:100%}.scratch-notice-actions button{flex:1 1 auto}.scratch-editor-shell{border-radius:0;height:calc(100dvh - 158px);min-height:460px}.scratch-editor-host{min-width:960px}.coding-step-nav{padding:6px;overflow-x:auto;justify-content:flex-start}.coding-step-nav button{flex:0 0 auto;font-size:.78rem;padding:8px}.ai-panel{width:calc(100vw - 1rem);max-height:min(48dvh,400px)}}
