/* v152 staging: category navigation and space-conscious drawing controls. */
#studentPaint #paintSidebar{background:none!important;border:0!important;min-width:0!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;gap:0!important}
#studentPaint #paintToolScroll{width:100%!important;max-width:100%!important;min-width:0!important;padding:0!important;overflow:hidden!important}
#studentPaint #paintToolRail{display:none!important}
#paintCategoryLayout{display:grid;grid-template-columns:minmax(74px,38%) minmax(0,1fr);height:100%;width:100%;max-width:100%;min-height:0;gap:0;background:#faf7f2;border:1px solid #ded6e5;border-radius:11px;overflow:hidden}
#paintCategoryRail{display:flex;flex-direction:column;gap:3px;padding:7px 5px;background:#473c79;min-width:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#aca3cf transparent}
#paintCategoryRail .paint-category-btn{display:flex;gap:6px;align-items:center;justify-content:flex-start;min-height:39px!important;padding:7px 5px!important;background:transparent!important;color:#fff!important;border:1px solid transparent!important;border-radius:8px!important;font-size:11px!important;font-weight:650!important;line-height:1.1!important;box-shadow:none!important;width:100%!important;text-align:left}
#paintCategoryRail .paint-category-btn svg{flex:none}
#paintCategoryRail .paint-category-btn span{overflow-wrap:normal;word-break:normal}
#paintCategoryRail .paint-category-btn.active{background:#f0e7ff!important;color:#403076!important;border-color:#b7a4ef!important;box-shadow:inset 3px 0 #8b69dc!important}
#paintCategoryRail .paint-category-btn:focus-visible{outline:2px solid #ffd96a;outline-offset:-2px}
#paintCategoryContent{overflow-y:auto;overflow-x:hidden;min-width:0;min-height:0;padding:6px;background:#faf7f2;scrollbar-width:thin}
#paintCategoryContent .paint-tool-category[hidden]{display:none!important}
#paintCategoryContent .paint-tool-category{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;align-content:start}
#paintCategoryContent .paint-tool-category-title{grid-column:1/-1;font-size:11px;color:#5b4a77;font-weight:700;margin:1px 0 4px}
#studentPaint #paintCategoryContent .category-tool{display:flex!important;flex-direction:column!important;align-items:center;justify-content:center;gap:1px;min-width:0!important;width:100%!important;min-height:51px!important;height:auto!important;max-height:none!important;padding:5px 3px!important;font-size:10px!important;line-height:1.12!important;white-space:normal!important;overflow:hidden!important;overflow-wrap:normal!important;border-radius:7px!important}
#studentPaint #paintCategoryContent .category-tool:disabled{opacity:.65}
#paintCategoryContent .paint-sample-stroke{display:block;position:relative;width:82%;max-width:80px;height:11px;margin-top:3px;pointer-events:none;border-radius:4px;background:transparent}
#paintCategoryContent .sample-pencil{background:linear-gradient(170deg,transparent 31%,#e7d7ff 32%,#e7d7ff 37%,transparent 38%,transparent 47%,#e7d7ff 48%,#e7d7ff 56%,transparent 57%)}
#paintCategoryContent .sample-marker{background:linear-gradient(174deg,transparent 25%,#e5c7ff 26%,#e5c7ff 77%,transparent 78%)}
#paintCategoryContent .sample-spray{background:radial-gradient(circle,#f5eaff 1px,transparent 1.5px) 0 0/6px 5px}
#paintCategoryContent .sample-airbrush{background:radial-gradient(ellipse at center,#ede0ff 0%,#ddc5ff99 40%,transparent 76%)}
#paintCategoryContent .sample-blend{background:linear-gradient(90deg,#ffbdbe,#bdb1ff,#83def3);filter:blur(1px)}
#paintCategoryContent .sample-eraser{background:linear-gradient(90deg,#d8bdff 0 28%,transparent 28% 72%,#d8bdff 72% 100%),repeating-conic-gradient(#ffffff33 0 25%,#6a589755 0 50%) 50%/8px 8px}
#paintCategoryContent .sample-fill{background:linear-gradient(160deg,transparent 15%,#ceb4ff 15% 85%,transparent 85%)}
#paintCategoryContent .sample-stamp{background:radial-gradient(circle,#efd9ff 3px,transparent 4px) 1px 1px/12px 11px}
#studentPaint #paintSharedSettings{margin:3px 0 5px!important;border:1px solid #d9d0df;border-radius:7px;padding:3px 5px;background:#fffdf9}
#paintSharedSettings>summary{cursor:pointer;color:#58488c;font-size:11px;font-weight:700;padding:3px 0}
#paintSharedSettings #paintQuickControls{margin:4px 0 0!important}
#paintExportChoice{display:flex;align-items:center;gap:4px;min-width:0}
#paintExportChoice label{font-size:11px;font-weight:750;white-space:nowrap}
#paintExportChoice select{min-width:0;flex:1;width:85px;height:33px;padding:3px!important;font-size:11px!important}
#studentPaint #paintExportBtn{min-width:0!important;width:auto!important;min-height:33px!important;padding:5px 9px!important;font-size:11px!important}
#studentPaint #paintSavePngBtn[hidden],#studentPaint #paintSaveJpgBtn[hidden]{display:none!important}
#studentPaint .paper-orientation-control{font-size:11px!important}
#studentPaint .paper-orientation-control select{font-size:11px!important;min-width:110px}
#paintInspector #paintColorRow{flex-wrap:wrap;align-items:center;overflow:visible!important}
#paintInspector #paintColorRow>.paint-hex-control{flex:1 1 110px;min-width:110px!important}
#paintInspector #paintColorRow input#colorHex{min-width:88px!important;width:96px!important}
#textOverlay .text-object:not(.selected){outline:none!important;border:none!important;box-shadow:none!important;background:transparent!important}
#textOverlay .text-object-content{white-space:pre-wrap!important;tab-size:4}
@media(max-width:600px){
 #paintCategoryLayout{grid-template-columns:minmax(84px,29%) minmax(0,1fr)}
 #paintCategoryRail .paint-category-btn{min-height:34px!important;padding:5px!important}
 #paintCategoryContent .paint-tool-category{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 #studentPaint #paintCategoryContent .category-tool{min-height:42px!important;font-size:10px!important}
 #studentPaint #paintSidebar{height:min(270px,42dvh)!important;max-height:min(270px,42dvh)!important}
}
@media(min-width:1050px){#paintCategoryLayout{grid-template-columns:minmax(72px,43%) minmax(0,1fr)}}

#studentPaint .text-style-settings{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin:6px 0}
#studentPaint .text-style-settings label{font-size:11px;display:flex;align-items:center;gap:4px}
#studentPaint .text-style-settings input[type="number"]{width:48px;min-width:0}
#studentPaint .text-style-settings input[type="color"]{width:32px;height:26px;padding:0}
#studentPaint .text-style-settings select{max-width:100px;font-size:11px}
#textureMakerModal .texture-brush-row{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:6px}
#textureMakerModal .texture-brush-row label{display:flex;align-items:center;gap:4px;font-size:12px}
#textureMakerModal #textureMakerHex{width:89px;font:12px ui-monospace,Consolas,monospace}
#textureMakerModal #textureMakerPicker{width:30px;height:28px;padding:0}
#textureMakerModal #textureFixedAngleRow[hidden]{display:none}
#textureMakerModal .texture-brush-row .active{background:#5b4aa8!important;color:#fff!important}
/* v152 layout correction: reserve actual room for the two-column tool palette. */
@media(min-width:1001px){
 #studentPaint.panel{grid-template-columns:230px 170px minmax(0,1fr) 86px!important}
 #studentPaint #paintSidebar{grid-column:1!important;min-width:230px!important;max-width:230px!important}
}
@media(min-width:601px) and (max-width:1000px){
 #studentPaint.panel{grid-template-columns:204px 160px minmax(0,1fr) 72px!important}
 #studentPaint #paintSidebar{grid-column:1!important;min-width:204px!important;max-width:204px!important}
}
#paintCategoryLayout{grid-template-columns:82px minmax(0,1fr)!important}
#paintCategoryRail .paint-category-btn{font-size:10.5px!important;gap:4px!important}
#paintCategoryRail .paint-category-btn svg{width:15px;height:15px}
#studentPaint #paintCategoryContent .category-tool{min-height:48px!important}
#studentPaint #paintWorkspaceHeading{display:flex;flex-wrap:wrap;align-items:center;gap:5px 12px}
#paintWorkspaceHeading #paintPromptHighlight{flex:1 1 100%;min-width:0}
#paintWorkspaceHeading #paintExportChoice{margin:0!important;width:min(300px,100%);flex:0 1 265px}
#paintWorkspaceHeading #paintExportChoice select{width:128px}
#paintWorkspaceHeading #paintExportChoice label{display:inline!important}
@media(max-width:600px){
 #paintCategoryLayout{grid-template-columns:88px minmax(0,1fr)!important}
 #studentPaint #paintSidebar{width:100%!important;min-width:0!important;max-width:none!important}
 #paintWorkspaceHeading #paintExportChoice{flex:1 1 175px}
}

#paintZoomControls{display:inline-flex;align-items:center;gap:3px;font-size:11px}
#studentPaint #paintZoomControls button{width:auto!important;min-height:28px!important;padding:3px 8px!important;font-size:11px!important;border-radius:6px!important}
#paintZoomValue{min-width:36px;text-align:center;font-variant-numeric:tabular-nums}
#studentPaint #canvasStage.paint-zoomed{overflow:auto!important;justify-content:flex-start!important;align-items:flex-start!important}
#studentPaint #canvasStage.paint-zoomed #canvasWrap{flex:none!important;max-height:none!important;max-width:none!important}
#painterCropSurface{position:absolute;inset:0;background:rgba(35,27,72,.19);z-index:100010;cursor:crosshair;touch-action:none;user-select:none}
#painterCropSurface[hidden]{display:none!important}
#painterCropBox{position:absolute;border:2px dashed #ffdf6f;background:rgba(255,255,255,.13);outline:1px solid #43306a;box-sizing:border-box;pointer-events:none;box-shadow:0 0 0 1px #fff}
#painterCropActions{position:absolute;bottom:7px;right:7px;display:flex;gap:5px}
#studentPaint #painterCropActions button{width:auto!important;min-height:29px!important;padding:4px 7px!important;font-size:11px!important}

/* PDF mode is shown only when PDF is chosen; preserve room for the canvas. */
#paintPdfMode[hidden]{display:none!important}
#paintExportChoice:has(#paintPdfMode:not([hidden])){flex-wrap:wrap!important;max-width:370px!important}
#paintExportChoice #paintPdfMode{width:118px!important;flex:1 1 112px!important}

/* Art tools review: history stays above Brushes, selection controls stay beside Select All. */
#paintCategoryRail #paintUndoControls{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-row:auto!important;width:100%!important;gap:4px;margin:0 0 5px!important;position:sticky;top:0;z-index:2;background:#473c79;padding:0 0 5px;flex:none}
#paintCategoryRail #paintUndoControls button{min-height:44px!important;min-width:0!important;width:100%!important;padding:6px 2px!important;font-size:11px!important;line-height:1.2}
#paintSelectionShortcuts{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:5px 0}
#studentPaint #paintSelectionShortcuts button{min-height:36px!important;width:100%!important;padding:5px!important;font-size:11px!important}
.painter-selection-marquee{position:absolute;border:1px dashed #5b4aa8;background:#8b69dc22;pointer-events:none;z-index:100010;box-sizing:border-box}
#paintShortcutsHelp{margin:4px 0;font-size:12px}#paintShortcutsHelp summary{cursor:pointer}#paintShortcutsHelp dl{display:grid;grid-template-columns:auto 1fr;gap:4px 8px;margin:7px 0}#paintShortcutsHelp dd{margin:0}
#shapePreview.removing-points .shape-node.control{pointer-events:none;opacity:.35}
#shapePreview.points-editing .shape-handle{z-index:8}

/* Resize controls sit outside point-editing controls instead of covering white anchors. */
#shapePreview.points-editing .shape-handle.nw{left:-36px;top:-36px}#shapePreview.points-editing .shape-handle.ne{right:-36px;top:-36px}
#shapePreview.points-editing .shape-handle.sw{left:-36px;bottom:-36px}#shapePreview.points-editing .shape-handle.se{right:-36px;bottom:-36px}
#shapePreview.removing-points .shape-handle{pointer-events:none;opacity:.35}
#studentPaint #canvasStage.paint-full-height{overflow:hidden!important;align-items:flex-start!important;justify-content:flex-start!important}
#studentPaint #canvasStage.paint-full-height #canvasWrap{flex:none!important;max-width:none!important;max-height:none!important;margin-inline:auto!important}
/* Preserve the mobile landscape canvas column when the category palette widens. */
@media(orientation:landscape) and (max-width:1000px) and (max-height:600px){
 #studentPaint.panel{grid-template-columns:minmax(0,1fr) 204px!important}
 #studentPaint #canvasStage{grid-column:1!important;grid-row:2!important;min-width:0!important;width:100%!important}
 #studentPaint #paintSidebar{grid-column:2!important;grid-row:2!important;min-width:204px!important;max-width:204px!important;width:204px!important;height:var(--paint-landscape-paper-height,240px)!important;max-height:var(--paint-landscape-paper-height,240px)!important}
 #studentPaint #paintActions,#studentPaint #paintInspectorScrollBox,#studentPaint #mobilePaintBar{grid-column:1 / -1!important}
}

/* Choose scrollbar presence from the stable viewport; never let the canvas choose it. */
#studentPaint #canvasStage.paint-full-height.paint-full-pan{overflow-x:scroll!important;overflow-y:hidden!important}
#studentPaint #canvasStage.paint-full-height.paint-full-zoom{overflow:scroll!important}

/* Inspector order: history, Colors, selection, current controls, collapsed shortcuts. */
#paintInspector #paintUndoControls{display:grid!important;grid-template-columns:1fr 1fr!important;gap:4px!important;margin:0 0 5px!important;width:100%!important;position:static!important}
#paintInspector #paintUndoControls button{min-height:32px!important;font-size:11px!important;padding:5px 2px!important;width:100%!important}
#paintShortcutsHelp{margin-top:7px;border-top:1px solid #d8d0df;padding-top:5px}
#inkAngleControls{margin:5px 0}#inkAngleControls[hidden]{display:none!important}#inkAngleControls label{display:flex;justify-content:space-between;font-size:11px}#inkNibAngle{width:100%}
#defaultRainbowSwatch.selected{outline:2px solid #ed9900;outline-offset:1px}
#studentPaint #editRainbowGradient{width:25px!important;min-width:25px!important;min-height:27px!important;padding:2px!important}
#paintInspector #paintColorsPanel #rainbowBtn{flex:0 1 auto!important;min-width:90px!important;width:auto!important;font-size:10px!important}
/* Match Vector: small visible dots, a modest surrounding hit target, yellow selection. */
#shapePreview .shape-node,#shapePreview .shape-handle,#shapePreview .shape-rotate-handle{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;padding:0!important;border:0!important;background:transparent!important;outline:none!important;box-shadow:none!important}
#shapePreview .shape-node::after,#shapePreview .shape-handle::after,#shapePreview .shape-rotate-handle::after{content:'';position:absolute;width:8px;height:8px;left:50%;top:50%;transform:translate(-50%,-50%);box-sizing:border-box;border:1.5px solid #5b4aa8;border-radius:50%;background:white;pointer-events:none}
#shapePreview .shape-node.control::after,#shapePreview .shape-rotate-handle::after{width:7px;height:7px;background:#b9e3ff;border-color:#2674b5}
#shapePreview .shape-node.selected::after{background:#ffe565;border-color:#c17900;box-shadow:0 0 0 1px #c17900}
#shapePreview .shape-node.control.selected::after{background:#329cff;border-color:#2674b5;box-shadow:none}
#shapePreview .shape-node:focus-visible::after,#shapePreview .shape-handle:focus-visible::after{outline:2px solid #ed9900;outline-offset:2px}
#shapePreview.points-editing .shape-handle.nw{left:-25px;top:-25px}#shapePreview.points-editing .shape-handle.ne{right:-25px;top:-25px}
#shapePreview.points-editing .shape-handle.sw{left:-25px;bottom:-25px}#shapePreview.points-editing .shape-handle.se{right:-25px;bottom:-25px}
#paintInspector .size-control-row{display:flex!important;align-items:center!important;gap:3px!important;font-size:11px!important;min-width:0}
#paintInspector .size-control-row>span:first-child,#paintInspector .size-control-row>label{font-size:11px!important;flex:0 0 38px!important;min-width:38px!important;margin:0!important}
#paintInspector .size-control-row .size-step-btn{min-width:18px!important;width:18px!important;height:25px!important;min-height:25px!important;padding:1px!important;flex:0 0 18px!important}
#paintInspector .size-control-row input[type=range]{flex:1 1 0!important;width:0!important;min-width:16px!important;margin:0!important}
#paintInspector #sizeValue{font-size:10px;flex:0 0 14px;min-width:14px}


#stampRotationControls[hidden]{display:none!important}
#stampRotationControls{margin:4px 0 8px;font-size:11px;border-bottom:1px solid #d8d0df;padding-bottom:6px}
#stampRotationControls>label{display:block;font-size:11px;margin-bottom:3px}
#stampRotationControls .stamp-random-toggle{display:flex;align-items:center;gap:5px}#stampRotationMode{width:auto!important;min-width:0;margin:0}.texture-rotation-settings[hidden]{display:none!important}
.stamp-angle-row{display:flex;align-items:center;gap:3px;margin:5px 0}.stamp-angle-row input[type=range]{width:0;min-width:25px;flex:1;margin:0}.stamp-angle-row input[type=number]{width:43px;min-width:43px;font-size:11px;padding:2px!important}
.stamp-preview-row{display:flex;align-items:center;gap:5px;font-size:10px;line-height:1.3}.stamp-preview-row canvas{width:50px!important;height:50px!important;min-width:50px;border:1px solid #b9aec9;border-radius:4px}

#paintCategoryContent .sample-smudge{background:linear-gradient(110deg,#f1a6a8 10%,#b6a3eb 45%,transparent 85%);transform:skewX(-20deg);border-radius:70% 15% 70% 15%}

/* Match the draft-shape dots after placement; retain the modest 18px target. */
.clip-art-object .clip-art-handle,.clip-art-object .clip-art-rotate{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;border:0!important;background:transparent!important;box-shadow:none!important}
.clip-art-handle::after,.clip-art-rotate::after{content:'';position:absolute;width:8px;height:8px;left:50%;top:50%;transform:translate(-50%,-50%);border:1.5px solid #5b4aa8;box-sizing:border-box;border-radius:50%;background:white;pointer-events:none}
.clip-art-rotate::after{width:7px;height:7px;background:#b9e3ff;border-color:#2674b5}
.clip-art-handle.nw{left:-9px;top:-9px}.clip-art-handle.ne{right:-9px;top:-9px}.clip-art-handle.sw{left:-9px;bottom:-9px}.clip-art-handle.se{right:-9px;bottom:-9px}
.clip-art-object .clip-art-flip{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;font-size:11px;line-height:16px;border-width:1px;box-shadow:none}
#smudgeSmoothnessControls[hidden]{display:none!important}
#smudgeSmoothnessControls{font-size:11px;margin:5px 0}#smudgeSmoothnessControls input{width:100%;min-width:0}


.text-object .text-object-handle,.text-object .text-object-rotate,.selection-handle{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
.text-object-handle::after,.text-object-rotate::after,.selection-handle::after{content:'';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:8px;height:8px;border:1.5px solid #5b4aa8;border-radius:50%;background:white;box-sizing:border-box;pointer-events:none}
.text-object-rotate::after{width:7px;height:7px;background:#b9e3ff;border-color:#2674b5}
.selection-handle.nw{left:-9px;top:-9px}.selection-handle.ne{right:-9px;top:-9px}.selection-handle.sw{left:-9px;bottom:-9px}.selection-handle.se{right:-9px;bottom:-9px}
.clip-art-object .clip-art-lock,.selection-move{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;padding:0!important;font-size:10px;border-width:1px;line-height:16px}
.text-object-handle.nw{left:-9px;top:-9px}.text-object-handle.ne{right:-9px;top:-9px}.text-object-handle.sw{left:-9px;bottom:-9px}.text-object-handle.se{right:-9px;bottom:-9px}
.text-object-handle.n{top:-9px}.text-object-handle.s{bottom:-9px}.text-object-handle.w{left:-9px}.text-object-handle.e{right:-9px}

#paintInspector #rainbowSwatches{display:grid!important;grid-template-columns:repeat(7,14px);gap:3px!important;justify-content:start;max-width:100%;min-width:0}
#paintInspector #rainbowSwatches .rainbow-swatch{width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;max-width:14px!important;padding:0!important;box-shadow:0 0 0 1px white,0 0 0 2px #999;flex:none}
#paintInspector #rainbowPanel{max-width:100%;min-width:0;box-sizing:border-box}
#paintActions #sendPainterToVector{margin:0}
#paintInspector .palette-row-head:has(#editRainbowGradient){display:grid;grid-template-columns:minmax(0,1fr) 22px 22px;gap:2px;align-items:center}
#paintInspector #editRainbowGradient,#paintInspector #deleteGradientBtn{width:22px!important;min-width:22px!important;margin:0}

/* v192: reserve only the viewport space below the actual Painter heading.
   Fit uses both axes; source pixel dimensions never change to fit an existing work. */
@media(min-width:1001px){
 #studentPaint.panel:not(.comic-studio-open):not(.painter-maximized){height:var(--paint-workspace-height,calc(100dvh - 160px))!important}
}
#studentPaint:not(.comic-studio-open) #canvasWrap{flex:none!important}
#studentPaint:not(.comic-studio-open) #canvasStage{min-width:0!important}

/* v193: equal spacing for workspace launch controls and helper sections. */
#studentPaint #paintInspector{gap:6px!important}
#studentPaint #paintInspector>:is(#paintLayersPanel,#paintFramesPanel,#gridDrawingLauncher,#comicCreationLauncher,#paintUndoControls,#paintColorsToggle){margin:0!important}
#comicLaunchStatus{font:12px/1.4 Arial,sans-serif;margin:0;padding:5px;color:#643b22;background:#fff2d5;border-radius:5px;overflow-wrap:anywhere}
#comicLaunchStatus[hidden]{display:none!important}

/* v194: collapsible secondary workspaces; v242 moves the menu above Layers. */
#paintInspector #creativeToolsMenu{display:block;flex:0 0 auto!important;min-height:0;margin:0!important;padding:0;border:1px solid #d8cee5;border-radius:6px;background:#faf8fe}
#paintInspector #creativeToolsMenu>summary{display:block;cursor:pointer;font:700 11px Arial,sans-serif;color:#5b4aa8;padding:9px 8px;list-style:revert}
#paintInspector #creativeToolsMenu>#paintFramesPanel{margin:5px!important;max-width:calc(100% - 10px)}
#paintInspector #creativeToolsMenu>#gridDrawingLauncher,#paintInspector #creativeToolsMenu>#comicCreationLauncher{display:block;width:calc(100% - 10px)!important;margin:4px 5px!important;min-height:28px!important;border-radius:6px}
#paintInspector #creativeToolsMenu>#comicLaunchStatus[hidden]{display:none!important}

/* v198: on-canvas crop instructions remain visible even when side status is offscreen. */
#painterCropHint{position:absolute;top:8px;left:50%;transform:translateX(-50%);max-width:calc(100% - 24px);padding:7px 10px;background:#fcf6ddf2;color:#34254e;font:600 12px/1.3 Arial,sans-serif;border:1px solid #9a80c0;border-radius:7px;text-align:center;box-shadow:0 1px 4px #0002;pointer-events:none;z-index:2}
#studentPaint #painterCropActions #applyPainterCrop:disabled{opacity:.5;cursor:not-allowed}
/* Placed editable SVG shape controls, in the existing scrolling tool column. */
.placed-shape-style{margin:5px 1px;padding:7px;border:1px solid #c1b1d3;border-radius:7px;background:#fffaf6;display:grid;grid-template-columns:minmax(0,1fr) 42px;align-items:center;gap:6px;font-size:12px;min-width:0}
.placed-shape-style[hidden]{display:none!important}
.placed-shape-style legend{font-weight:bold;color:#58418e;padding:0 4px}
.placed-shape-style input[type=color]{height:28px;width:100%;min-width:0;padding:2px;cursor:pointer}
.placed-shape-style input[type=range],.placed-shape-style button{grid-column:1/-1;min-width:0;width:100%}
.placed-shape-style label{min-width:0;white-space:normal}

/* v200: Reliable native disclosure for Creative Tools. Do not force-open the GIF timeline. */
#paintInspector #creativeToolsMenu>summary{list-style:none!important;display:flex!important;align-items:center;gap:5px;min-height:30px;user-select:none}
#paintInspector #creativeToolsMenu>summary::-webkit-details-marker{display:none}
#paintInspector #creativeToolsMenu>summary::before{content:'\25B8';display:inline-block;flex:0 0 10px;color:#5b4aa8;font-size:12px}
#paintInspector #creativeToolsMenu[open]>summary::before{content:'\25BE'}
#paintInspector #creativeToolsMenu>summary:focus-visible{outline:2px solid #6347b8;outline-offset:-2px;border-radius:5px}
#paintInspector #creativeToolsMenu:not([open])>:not(summary){display:none!important}

/* v201: compact, visible draft-placement controls in Comic Creator; no art model changes. */
.shape-quick-actions{position:absolute;display:flex;align-items:center;justify-content:center;gap:5px;transform:translateX(-50%);z-index:100002;pointer-events:auto!important;touch-action:manipulation;background:#fffcf4;border:1px solid #a99ac8;border-radius:9px;padding:4px;box-shadow:0 2px 9px #32244740;white-space:nowrap}
.shape-quick-actions[hidden]{display:none!important}
.shape-quick-actions button{min-height:31px!important;min-width:58px!important;font:700 11px Arial,sans-serif!important;padding:4px 9px!important;cursor:pointer;touch-action:manipulation}
.shape-quick-actions button:focus-visible{outline:3px solid #f5a623;outline-offset:1px}

/* v242: Make the Creative Tools workspace chooser prominent above Layers.
   Existing native <details> keyboard/touch disclosure and the nested tools are retained. */
#paintInspector #creativeToolsMenu {
 border:1px solid #6c58b2;
 border-radius:9px;
 background:#f4efff;
 box-shadow:0 2px 6px rgba(68,47,126,.16);
 overflow:hidden;
}
#paintInspector #creativeToolsMenu>summary {
 box-sizing:border-box;
 display:flex!important;
 align-items:center;
 gap:8px;
 min-height:44px;
 padding:10px 11px;
 background:linear-gradient(112deg,#6150a7,#8270ca);
 border-radius:8px;
 color:#fff!important;
 font:700 13px/1.25 Arial,sans-serif!important;
 letter-spacing:.1px;
 line-height:1.25;
 cursor:pointer;
}
#paintInspector #creativeToolsMenu>summary::before,
#paintInspector #creativeToolsMenu[open]>summary::before {
 content:'\2726';
 color:#f7efff;
 font-size:16px;
 flex:0 0 16px;
}
#paintInspector #creativeToolsMenu>summary::after {
 content:'\25B8';
 color:#fff;
 margin-left:auto;
 font-size:15px;
}
#paintInspector #creativeToolsMenu[open]>summary::after {content:'\25BE'}
#paintInspector #creativeToolsMenu>summary:hover {background:linear-gradient(112deg,#57449e,#7662c1)}
#paintInspector #creativeToolsMenu>summary:focus-visible {
 outline:3px solid #d7c7ff;
 outline-offset:-4px;
 border-radius:8px;
}
#paintInspector #creativeToolsMenu[open]>summary {border-radius:8px 8px 0 0}
