/* The editing view uses the available viewport; library pages keep normal flow. */
body.workspace-open{display:flex;flex-direction:column;height:var(--vectors-height,100dvh);overflow:hidden;padding:0!important}
body.workspace-open>.brand-bar{display:none}
body.workspace-open #main{flex:1;min-height:0;max-width:none;width:100%;overflow:hidden;display:flex;flex-direction:column}
body.workspace-open #workspace:not([hidden]){height:100%;min-height:0;display:grid;grid-template-rows:60px 50px minmax(0,1fr)}
.file-bar{position:relative;z-index:42;display:grid;grid-template-columns:minmax(120px,1fr) auto;grid-template-rows:28px 16px;column-gap:12px;row-gap:0;padding:7px 14px}
.title-label{grid-column:1;grid-row:1;max-width:380px;font-size:0;min-width:0}.title-label>span{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}.title-label input{height:28px;padding:2px 0;min-height:28px;border-radius:0;font-size:16px;text-overflow:ellipsis}
#save-status{grid-column:1;grid-row:2;max-width:none;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file-actions{grid-column:2;grid-row:1/3;flex-wrap:nowrap;gap:5px;margin:0}.file-actions>#undo,.file-actions>#redo{width:44px;min-width:44px;height:44px;min-height:44px;font-size:0;padding:0}.file-actions>#undo::before{content:'↶';font-size:24px}.file-actions>#redo::before{content:'↷';font-size:24px}
.file-menu,.view-controls{position:relative;border:0;margin:0}.file-menu>summary,.view-controls>summary{list-style:none;min-height:44px;display:flex;align-items:center;justify-content:center;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:white;font-size:13px}.file-menu>summary::-webkit-details-marker,.view-controls>summary::-webkit-details-marker{display:none}
.file-menu nav,.view-popover{position:absolute;right:0;top:100%;z-index:60;display:grid;gap:6px;width:230px;padding:12px;border:1px solid var(--line);border-radius:14px;background:white;box-shadow:0 12px 40px #17382d30;max-height:65dvh;overflow:auto}
.file-menu nav button,.file-menu nav a{font-size:14px;text-align:left;min-height:44px;padding:10px;border-radius:8px;color:var(--ink);text-decoration:none}.file-menu nav a:hover{background:var(--mint)}
.quick-tools{grid-row:2;display:flex;align-items:center;justify-content:center;gap:6px;padding:3px 10px;border-bottom:1px solid var(--line);background:white;overflow-x:auto;scrollbar-width:none}.quick-tools button{flex:none;min-width:60px;height:44px;min-height:44px;display:flex;align-items:center;justify-content:center;gap:8px;padding:4px 12px;font-size:12px}.quick-tools b{font-size:21px;font-weight:400}
body.workspace-open .workbench{grid-row:3;min-height:0;height:100%;grid-template-columns:145px minmax(0,1fr) 260px;align-items:stretch}
body.workspace-open .panel{min-height:0;max-height:100%;overflow-y:auto;position:static;padding:12px}
body.workspace-open .drawing-column{display:grid;grid-template-rows:48px minmax(0,1fr) 24px auto;min-height:0;overflow:hidden}
.canvas-controls{padding:2px 7px;gap:5px;flex-wrap:nowrap;align-items:center;justify-content:space-between;position:relative;z-index:35}.canvas-controls>label{font-size:0;max-width:130px}.canvas-controls>label select{height:40px;min-height:40px;font-size:12px;padding:5px}.canvas-controls button{font-size:12px;min-height:44px;padding:7px}.canvas-controls>.row{flex-wrap:nowrap;gap:2px}.canvas-controls .row button{width:40px;min-width:40px;min-height:44px;padding:4px}#zoom-label{font-size:10px;min-width:28px}.canvas-controls .view-popover label{font-size:15px;min-height:44px;display:flex;align-items:center;gap:12px}.view-popover input[type=checkbox]{width:24px;height:24px}.view-popover button{font-size:14px}
.drawing-frame{min-height:0;min-width:0;display:grid;grid-template-columns:24px minmax(0,1fr);grid-template-rows:24px minmax(0,1fr);overflow:hidden;background:#eef1ea}
.drawing-frame.rulers-off{grid-template-columns:0 minmax(0,1fr);grid-template-rows:0 minmax(0,1fr)}.rulers-off>.ruler,.rulers-off>.ruler-unit{visibility:hidden}
.ruler{width:100%;height:100%;display:block;fill:var(--muted);background:#f9faf7;stroke:#8b9c96;stroke-width:1;touch-action:none;user-select:none}.ruler text{font:9px system-ui;stroke:none}.ruler-x{grid-column:2;grid-row:1;cursor:ns-resize}.ruler-y{grid-column:1;grid-row:2;cursor:ew-resize}.ruler-unit{grid-column:1;grid-row:1;min-height:24px!important;min-width:24px;width:24px;height:24px;padding:0;border:0;border-radius:0;font-size:8px;background:#e7ece6}
body.workspace-open #surface{grid-column:2;grid-row:2;height:100%;min-height:0;min-width:0;isolation:isolate;background-image:none;background-color:#e8ece5}
body.workspace-open #drawing{height:100%;width:100%;touch-action:none}
body.workspace-open .canvas-bottom{font-size:10px;padding:4px 8px;overflow:hidden;white-space:nowrap}.canvas-bottom span{overflow:hidden;text-overflow:ellipsis}.canvas-bottom #measure-status{display:block;font-variant-numeric:tabular-nums}
.path-bar,.text-edit-bar{position:absolute;z-index:24;bottom:10px;left:10px;right:10px;display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;padding:8px;border:1px solid var(--line);border-radius:14px;background:#fffffff5;box-shadow:0 5px 25px #18382c24}
.path-bar button,.text-edit-bar button{min-height:44px;padding:8px 12px;font-size:13px}.path-bar>span{font-size:11px;flex-basis:100%;text-align:center}.path-bar label{font-size:11px;display:flex;flex-direction:row;align-items:center;gap:5px}.path-bar input{width:85px}
#canvas-text-editor{position:absolute;z-index:22;transform-origin:0 0;border:0;outline:2px solid #497aa5;outline-offset:4px;border-radius:0;box-shadow:0 0 0 5px #ffffffc0;background:#ffffffc9;padding:0;margin:0;resize:none;overflow:hidden;line-height:1.25;min-height:0;min-width:0;white-space:pre-wrap;word-break:normal;touch-action:auto;user-select:text;caret-color:#294e54}
.text-edit-bar label{font-size:10px;gap:2px}.text-edit-bar input,.text-edit-bar select{height:38px;font-size:16px;padding:4px}.text-edit-bar select{max-width:155px}.text-edit-bar #inline-size{width:60px}.text-edit-bar input[type=color]{width:40px}.editing-text .selection-box,.editing-text .selection-overlay>.handle{display:none}
.align-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:10px 0}.align-grid button{font-size:12px;min-height:44px;padding:7px}.object-selection{gap:5px}.object-selection button{flex:1;font-size:12px;min-height:44px}.object-row .object-toggle{min-width:40px;min-height:44px}.object-row .object-pick{min-height:44px}
.guide-row{display:flex;align-items:end;gap:10px;margin:10px 0}.guide-row label{flex:1}.guide-row button{min-height:44px}
body.workspace-open #lesson-steps{padding:5px 12px;max-height:130px;overflow:auto;font-size:12px}body.workspace-open #lesson-steps h3{margin:3px 0}body.workspace-open #lesson-steps .eyebrow{display:none}
body.workspace-open .jke-platform-footer{position:static!important;inset:auto!important;flex:none;min-height:34px;max-height:44px;display:flex;flex-wrap:nowrap;gap:12px;padding:3px 12px;margin:0;width:100%;border-radius:0;font-size:10px;overflow:hidden}
body.workspace-open .jke-platform-home{min-height:28px;gap:6px;flex:none}body.workspace-open .jke-platform-copy{display:flex;gap:6px;align-items:center}body.workspace-open .jke-platform-copy strong,body.workspace-open .jke-platform-copy small{font-size:10px}body.workspace-open .jke-platform-home svg{width:23px;height:23px}body.workspace-open .jke-platform-current{font-size:10px;min-height:0;padding:3px 8px}body.workspace-open .jke-sync-status{font-size:10px;margin-right:auto}
body.canvas-focus .workbench .panel{display:none!important}body.canvas-focus .workbench{grid-template-columns:1fr!important}body.canvas-focus .quick-tools{display:none}body.canvas-focus #workspace:not([hidden]){grid-template-rows:56px 0 minmax(0,1fr)}body.canvas-focus #lesson-steps{display:none}
@media print{body.workspace-open{display:block;height:auto;overflow:visible}body.workspace-open #workspace:not([hidden]),body.workspace-open .workbench,body.workspace-open .drawing-column,.drawing-frame{display:block;height:auto}.quick-tools,.ruler,.ruler-unit,.path-bar,.text-edit-bar,#canvas-text-editor{display:none!important}body.workspace-open #surface{height:auto;overflow:visible}}
