/* A non-modal desk: the course and every control behind it stay interactive. */
.floating-editor{position:fixed;z-index:90;display:flex;flex-direction:column;min-width:0;min-height:0;background:#f3f1eb;color:#202a2d;border:1px solid #63716d;border-radius:8px;box-shadow:0 12px 40px #1b2e362b,0 2px 5px #1b2e3614;overflow:hidden;isolation:isolate}
.floating-editor[hidden],.fe-reopen[hidden]{display:none!important}
.scene-controls .editor-entry{background:#fff7e8;color:#744329;border-color:#d9aa7c;white-space:nowrap}.scene-controls .editor-entry:hover{background:#f5e4ca;border-color:#b57f50}.scene-controls .editor-entry[aria-expanded=true]{box-shadow:inset 0 -2px #b35f35}
.fe-titlebar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:62px;flex:none;padding:8px 12px;background:#202a2d;color:#f3f1eb;border-bottom:3px solid #e2673f}
.fe-drag-grip{display:flex;align-items:center;gap:10px;align-self:stretch;min-width:0;flex:1;cursor:grab;touch-action:none;user-select:none;border-radius:3px}
.fe-drag-grip:active{cursor:grabbing}.fe-drag-grip[aria-disabled=true]{cursor:default}.fe-grip-mark{font-size:25px;color:#a7b7b2;line-height:1}
.fe-eyebrow{font:600 8px/1.5 var(--font);letter-spacing:1.7px;color:#a5bab2;display:block}
.fe-titlebar h2{font-size:15px;line-height:1.6;color:#fff;margin:0;font-weight:700}
.fe-window-actions{display:flex;align-items:center;gap:4px;flex:none}
.fe-window-actions button{border:1px solid #62716c;background:#2b3638;color:#fff;border-radius:4px;width:34px;height:34px;padding:0;line-height:1;font-size:20px}
.fe-window-actions button:hover{background:#456052}.fe-window-actions button:disabled{opacity:.35}
.fe-transport{flex:none;padding:9px 12px;background:#fffdfa;border-bottom:1px solid #d3d7cd;display:flex;flex-wrap:wrap;gap:9px 12px;align-items:center;justify-content:space-between}
.fe-run-controls{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
.fe-run-controls button,.fe-dock-placeholder button{border:1px solid #c8cec4;background:#fff;color:#31433e;border-radius:4px;padding:6px 9px;font-size:11px;font-weight:700;min-height:33px;line-height:1.4}
.fe-run-controls .fe-run{background:#21594e;color:#fff;border-color:#21594e;min-width:80px}.fe-run-controls .fe-run:hover{background:#16443b}
.fe-run-controls button:hover,.fe-dock-placeholder button:hover{border-color:#21594e}.fe-run-controls button:disabled{opacity:.45}
.fe-run-controls .fe-course-button{font-size:10px;color:#925032;background:#fff4e9;border-color:#ead1bc}
.fe-live-metrics{display:flex;align-items:center;gap:12px;flex-wrap:wrap;line-height:1.25;color:#42574d}
.fe-live-metrics>span{display:inline-flex;align-items:baseline;gap:3px}.fe-live-metrics small{font:700 8px var(--font);letter-spacing:.7px;color:#67796f}
.fe-live-metrics b{font:600 14px var(--font);color:#202a2d;font-variant-numeric:tabular-nums}.fe-live-metrics em{font-style:normal;font-size:9px;color:#697a72}
.fe-live-metrics .fe-state{font:600 8px var(--font);border:1px solid #c8cfc7;border-radius:3px;padding:3px 5px;letter-spacing:.5px;background:#f4f5f1;color:#6f7c70}
.fe-live-metrics .fe-state.is-running{background:#e0eedc;color:#275b35;border-color:#9ec3a0}.fe-live-metrics .fe-state.has-error{background:#fff0df;color:#a24a28;border-color:#e6b48e}
.fe-sensor-strip{display:flex;align-items:center;gap:10px;padding:6px 12px;background:#efeee7;border-bottom:1px solid #d6d9d0;flex:none;font-size:10px;color:#53665b;flex-wrap:wrap}
.fe-sensor-strip>span{font-weight:700}.fe-sensor-strip small{font-size:9px;font-weight:400}.fe-sensors{display:flex;align-items:center;gap:4px}.fe-sensor{display:flex;align-items:center;gap:5px;border:1px solid #cad3c6;background:#fffef8;color:#294b3d;padding:2px 6px;border-radius:3px;min-width:39px}.fe-sensor b{font:700 12px var(--font)}.fe-sensor.is-black{background:#263b34;border-color:#263b34;color:#fff}
.fe-content{min-height:0;min-width:0;flex:1;overflow:hidden;display:flex;background:#fff}
.floating-editor .program-card{display:flex;flex-direction:column;min-height:0;min-width:0;flex:1;border:0!important;border-radius:0!important;box-shadow:none!important;margin:0!important;overflow:hidden}
.floating-editor .program-card>.card-heading{flex:none;padding:8px 12px!important;gap:8px;align-items:center;border-radius:0!important;min-height:0;border-bottom:1px solid #e2e5dd;background:#fff}
.floating-editor .program-card>.card-heading>div:first-child{display:none}.floating-editor .program-header-actions{margin-left:0;justify-content:flex-start;width:100%;gap:5px}
.floating-editor .program-header-actions button{font-size:10px;min-height:30px;padding:5px 8px;border-radius:4px}.floating-editor #editor-size{margin-left:auto}
.floating-editor .program-information{margin:0;padding:6px 12px;border:0;border-bottom:1px solid #e5e8e1;border-radius:0;flex:none;font-size:10px;line-height:1.6;background:#f6f8f2;color:#51634f;max-height:56px;overflow:auto}
.floating-editor .program-body,.floating-editor .program-body:has(.be-palette){height:auto!important;max-height:none!important;flex:1;min-height:0;padding:0;overflow:hidden;display:flex;min-width:0}
.floating-editor #block-container{height:100%;width:100%;min-height:0;min-width:0}
.floating-editor .block-editor .be-workspace{min-height:80px;max-height:none;flex:1;padding:20px 18px}
.floating-editor .block-editor .be-palette{padding:9px 12px 7px}.floating-editor .block-editor .be-palette-list{gap:5px;grid-template-columns:repeat(3,minmax(0,1fr))}.floating-editor .block-editor .be-palette-tile{font-size:11px;min-height:32px;white-space:normal;padding:6px}
.floating-editor .block-editor .be-palette-hint{display:none}.floating-editor .block-editor .be-categories{margin-bottom:7px}
.floating-editor .block-editor .be-workspace-head{padding:8px 12px;font-size:11px}.floating-editor .block-editor .be-status{font-size:10px;padding:6px 12px}
.floating-editor .program-runtime{padding:7px 12px;font-size:10px;flex:none;max-height:52px;overflow:auto;border-radius:0;background:#f4f5f0;border-top:1px solid #dce1d7}
.floating-editor .be-block-content{font-size:12px}.floating-editor .be-number{font-size:12px}.floating-editor .be-condition select{font-size:11px}
.fe-statusbar{flex:none;display:flex;justify-content:space-between;gap:12px;padding:4px 26px 4px 12px;font-size:9px;color:#667265;background:#e9e8df;border-top:1px solid #d7dbd0;min-height:23px;line-height:1.6}
.fe-resize{position:absolute;right:0;bottom:0;width:26px;height:26px;background:transparent;color:#66796d;cursor:nwse-resize;font-size:17px;padding:0;line-height:26px;touch-action:none}
.fe-resize:hover{color:#e2673f;background:#f7f4e9}.fe-adjusting{user-select:none}.fe-adjusting *{cursor:inherit}
.fe-reopen{position:fixed;right:20px;bottom:20px;z-index:89;display:flex;align-items:center;gap:11px;padding:12px 16px;border:1px solid #142a25;border-left:4px solid #e2673f;border-radius:5px;background:#202a2d;color:#fff;box-shadow:0 4px 18px #10282029;text-align:left;font-size:12px;font-weight:700;line-height:1.5}.fe-reopen>span:first-child{font-size:23px;color:#d5dfc9}.fe-reopen small{display:block;font-size:9px;color:#b8c8be;font-weight:400}.fe-reopen>b{font-size:20px;margin-left:12px;color:#efa37d}.fe-reopen:hover{background:#2d403a}
.fe-dock-placeholder{padding:26px 20px;border:1px dashed #bdc8bb;border-radius:6px;background:#efeee6;color:#465a4e;min-height:184px}.fe-dock-placeholder .fe-eyebrow{color:#8d6349;font-size:9px}.fe-dock-placeholder h3{font-size:18px;line-height:1.5;margin:8px 0 6px;color:#263f34}.fe-dock-placeholder p{font-size:12px;line-height:1.8;max-width:34em}.fe-dock-placeholder>div{display:flex;gap:7px;flex-wrap:wrap;margin-top:18px}.fe-dock-placeholder button{font-size:11px}.fe-dock-placeholder [data-return="show"]{background:#21594e;color:#fff;border-color:#21594e}
/* A wide desk gives the palette a separate rail; smaller desks keep it above. */
.floating-editor.fe-wide .block-editor:has(.be-palette){display:grid;grid-template-columns:180px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto}
.floating-editor.fe-wide .be-palette{grid-column:1;grid-row:1/-1;border-bottom:0;border-right:1px solid #dbe2d8;overflow:auto}
.floating-editor.fe-wide .block-editor .be-palette-list{grid-template-columns:1fr;gap:7px}.floating-editor.fe-wide .block-editor .be-palette-tile{min-height:36px}
.floating-editor.fe-wide .be-workspace-head{grid-column:2;grid-row:1}.floating-editor.fe-wide .be-workspace{grid-column:2;grid-row:2}.floating-editor.fe-wide .be-status{grid-column:2;grid-row:3}
.floating-editor.fe-compact .fe-titlebar{min-height:52px;padding:6px 9px}.floating-editor.fe-compact .fe-titlebar h2{font-size:13px}.floating-editor.fe-compact .fe-grip-mark{display:none}.floating-editor.fe-compact .fe-transport{padding:7px 9px;gap:7px}.floating-editor.fe-compact .fe-live-metrics{gap:9px}.floating-editor.fe-compact .fe-window-actions button{width:32px;height:32px}.floating-editor.fe-compact .fe-statusbar{display:none}.floating-editor.fe-compact .program-information{max-height:42px;font-size:9px;padding:5px 9px}.floating-editor.fe-compact .block-editor .be-workspace{padding:14px 10px}.floating-editor.fe-compact .program-header-actions button{font-size:9px;padding:5px 6px}.floating-editor.fe-compact .fe-sensor-strip{padding:5px 9px;gap:7px}.floating-editor.fe-compact .block-editor .be-palette{padding:7px 9px 6px;max-height:157px;overflow:auto}.floating-editor.fe-compact .block-editor .be-palette-tile{font-size:10px;min-height:29px;padding:4px}.floating-editor.fe-compact .program-runtime{max-height:39px;font-size:9px;padding:5px 9px}
@media(max-width:700px){.fe-reopen{right:12px;bottom:12px;max-width:calc(100vw - 24px)}.fe-dock-placeholder{min-height:150px;padding:20px 16px}.fe-reopen small{font-size:8px}}
/* Use the desk's actual height, including a desktop user resizing only this window. */
.floating-editor.fe-short .fe-titlebar{min-height:44px;padding:4px 9px}.floating-editor.fe-short .fe-titlebar h2{font-size:13px}.floating-editor.fe-short .fe-titlebar .fe-eyebrow{display:none}.floating-editor.fe-short .fe-window-actions button{height:30px;width:30px}
.floating-editor.fe-short .fe-transport{padding:5px 9px;gap:5px}.floating-editor.fe-short .fe-run-controls button{min-height:29px;padding:4px 7px;font-size:10px}.floating-editor.fe-short .fe-live-metrics{gap:9px}.floating-editor.fe-short .fe-live-metrics b{font-size:12px}
.floating-editor.fe-short .fe-sensor-strip,.floating-editor.fe-short .program-information,.floating-editor.fe-short .block-editor .be-status,.floating-editor.fe-short .fe-statusbar{display:none}
.floating-editor.fe-short .program-card>.card-heading{padding:4px 9px!important;min-height:34px}.floating-editor.fe-short .program-header-actions{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;min-width:0}.floating-editor.fe-short .program-header-actions button{flex:none;min-height:26px;padding:3px 6px;font-size:9px;white-space:nowrap}
.floating-editor.fe-short .block-editor .be-palette{max-height:92px;overflow-y:auto;padding:5px 9px;scrollbar-width:thin}.floating-editor.fe-short .block-editor .be-categories{margin-bottom:5px}.floating-editor.fe-short .block-editor .be-palette-tile{min-height:28px;padding:4px;font-size:10px}
.floating-editor.fe-short .block-editor .be-workspace-head{padding:5px 9px;font-size:10px;min-height:29px}.floating-editor.fe-short .block-editor .be-workspace{min-height:0!important;padding:12px 10px}.floating-editor.fe-short .program-runtime{max-height:26px;line-height:1.5;padding:4px 9px;font-size:9px}
.floating-editor.fe-tiny .block-editor .be-palette{max-height:64px}.floating-editor.fe-tiny .fe-live-metrics .fe-state{display:none}.floating-editor.fe-tiny .fe-titlebar{min-height:40px}.floating-editor.fe-tiny .fe-live-metrics small{font-size:7px}.floating-editor.fe-tiny .block-editor .be-workspace-head{min-height:27px;padding:4px 9px}
.floating-editor.fe-micro .fe-live-metrics,.floating-editor.fe-micro .program-runtime,.floating-editor.fe-micro .fe-course-button{display:none}.floating-editor.fe-micro .block-editor .be-palette{max-height:56px}.floating-editor.fe-micro .fe-titlebar{min-height:38px}
.floating-editor.fe-wide.fe-short .block-editor .be-palette{max-height:none}

/* Keep shape previews legible in both a floating desk and a narrow screen. */
.floating-editor .block-editor .be-palette{max-height:192px;padding:10px 12px 8px}
.floating-editor .block-editor .be-palette-list{gap:9px;grid-template-columns:repeat(3,minmax(0,1fr))}
.floating-editor .block-editor .be-palette-tile{padding:0;min-height:0;font-size:11px}
.floating-editor.fe-wide .block-editor .be-palette{max-height:none}
.floating-editor.fe-wide .block-editor .be-palette-list{grid-template-columns:1fr;gap:12px}
.floating-editor.fe-wide .block-editor .be-shape-legend{gap:7px;align-items:flex-start}
.floating-editor.fe-compact .block-editor .be-palette{max-height:188px;padding:7px 9px}
.floating-editor.fe-compact .block-editor .be-palette-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.floating-editor.fe-compact .block-editor .be-palette-tile{padding:0;min-height:0}
.floating-editor.fe-short .block-editor .be-palette{max-height:100px;padding:5px 9px}
.floating-editor.fe-short .block-editor .be-shape-legend,.floating-editor.fe-short .block-editor .be-shape-help{display:none}
.floating-editor.fe-short .block-editor .be-palette-tile{padding:0;min-height:0}
.floating-editor.fe-tiny .block-editor .be-palette{max-height:72px}
.floating-editor.fe-micro .block-editor .be-palette{max-height:60px}
.floating-editor.fe-wide.fe-short .block-editor .be-palette{max-height:none}
.floating-editor.fe-wide.fe-short .block-editor .be-shape-legend,.floating-editor.fe-wide.fe-short .block-editor .be-shape-help{display:block}
@media(prefers-reduced-motion:reduce){.floating-editor,.fe-reopen{transition:none!important}}
