.stlg-shell .stlg-scene[hidden],.stlg-shell .stlg-editor-switch[hidden]{display:none!important}
.stlg-shell[data-stlg-editor="3d"] .stlg-detail-header,
.stlg-shell[data-stlg-editor="3d"] .stlg-panel-stack,
.stlg-shell[data-stlg-editor="3d"] .stlg-preview-trigger{display:none!important}
.stlg-shell .stlg-scene{position:relative;width:100%;height:calc(100% - var(--stlg-actions-height));min-height:0;overflow:hidden;border-radius:18px;background:#202936;isolation:isolate}
.stlg-shell[data-stlg-editor="3d"] .stlg-editor-viewport > .stlg-scene{height:100%}
.stlg-shell .stlg-scene canvas{display:block;width:100%;height:100%;touch-action:none}
.stlg-shell .stlg-scene-spinner{display:none;position:absolute;left:50%;top:50%;width:32px;height:32px;margin:-16px 0 0 -16px;box-sizing:border-box;border:3px solid #ffffff40;border-top-color:#ff944d;border-radius:50%;background:#20293680;box-shadow:0 0 0 7px #20293680;z-index:7;pointer-events:none}
.stlg-shell .stlg-scene.is-loading .stlg-scene-spinner{display:block;animation:stlg-scene-spin .8s linear infinite}
@keyframes stlg-scene-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.stlg-shell .stlg-scene.is-loading .stlg-scene-spinner{animation:none}}
.stlg-shell .stlg-scene-toolbar{position:absolute;top:14px;left:16px;right:70px;display:flex;flex-wrap:wrap;align-items:center;gap:8px;z-index:3}
.stlg-shell .stlg-scene-toolbar strong{font-size:18px;margin-right:auto;color:var(--stlg-ink)}
.stlg-shell .stlg-scene-toolbar button,.stlg-shell .stlg-editor-switch button{border:1px solid var(--stlg-line);border-radius:10px;background:#fffdf9;color:var(--stlg-ink);padding:8px 12px;font:inherit;font-size:13px;cursor:pointer}
.stlg-shell .stlg-scene-hint{position:absolute;top:62px;left:16px;margin:0;font-size:12px;color:#63686b;pointer-events:none}
.stlg-shell .stlg-scene-status{position:absolute;top:105px;left:20px;right:20px;text-align:center;pointer-events:none;z-index:4;font-size:14px}
.stlg-shell .stlg-dimension-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.stlg-shell .stlg-dimension-lines path{fill:none;stroke:#596c78;stroke-width:1.15;vector-effect:non-scaling-stroke}
.stlg-shell .stlg-dimension{position:absolute;z-index:2;transform:translate(-50%,-50%);display:grid;grid-template-columns:86px 24px;gap:0 5px;padding:6px 10px;background:rgba(255,253,249,.97);border:1px solid #c6b6a5;border-radius:10px;box-shadow:0 3px 12px #17202a12;color:#283843;cursor:text;line-height:1.3}
.stlg-shell .stlg-dimension>span{grid-column:1/-1;font-size:11px;letter-spacing:.02em;font-weight:600}
.stlg-shell .stlg-dimension input{width:86px;min-width:0;height:27px;min-height:0;padding:2px 3px;margin:0;border:0;border-bottom:1px solid #c0aa93;border-radius:0;background:transparent;font-family:inherit;font-weight:600;font-size:16px;line-height:1.2;color:#87431e;box-shadow:none}
.stlg-shell .stlg-dimension small{align-self:center;font-size:11px}
.stlg-shell .stlg-dimension:focus-within{outline:2px solid var(--stlg-brand);outline-offset:2px}
.stlg-shell .stlg-dimension.is-invalid{border-color:#a82020}
.stlg-shell .stlg-editor-switch{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:14px}
.stlg-shell .stlg-scene button:focus-visible,.stlg-shell .stlg-editor-switch button:focus-visible{outline:2px solid var(--stlg-brand);outline-offset:2px}

.stlg-shell .stlg-axis-compass{position:absolute;top:70px;right:14px;width:120px;height:120px;z-index:3;pointer-events:none;border:1px solid #d9d5ce;border-radius:50%;background:rgba(255,253,249,.88);box-shadow:0 3px 14px #17202a0c}
.stlg-shell .stlg-grid-legend{position:absolute;left:16px;bottom:calc(var(--stlg-actions-height) + 14px);padding:4px 8px;border-radius:6px;background:rgba(255,253,249,.9);color:#59666f;font-size:11px;pointer-events:none}

.stlg-shell .stlg-dimension[hidden]{display:none!important}
.stlg-shell .stlg-face-select{max-width:210px;min-height:36px;margin:0;padding:6px 26px 6px 10px;border:1px solid var(--stlg-line);border-radius:10px;background:#fffdf9;color:var(--stlg-ink);font:inherit;font-size:13px}
.stlg-shell .stlg-face-select:focus-visible{outline:2px solid var(--stlg-brand);outline-offset:2px}
.stlg-shell .stlg-scene-toolbar strong{font-size:16px}
@media(min-width:821px) and (max-width:1150px){.stlg-shell .stlg-scene-toolbar strong{flex-basis:100%}.stlg-shell .stlg-scene-hint{top:100px;right:150px}.stlg-shell .stlg-scene-status{top:138px}.stlg-shell .stlg-axis-compass{top:112px}}

/* Shared face tools: kept below the orientation compass and above the workspace. */
.stlg-cutout-toolbar{position:absolute;right:18px;z-index:5;display:flex;flex-direction:column;gap:5px;padding:7px;background:#fffaf5ee;border:1px solid #d2bca8;border-radius:12px;box-shadow:0 4px 18px #492a1926;max-height:calc(100% - 300px);overflow:auto}
.stlg-cutout-toolbar[hidden],.stlg-cutout-note[hidden],.stlg-cutout-cursor[hidden]{display:none}
.stlg-cutout-toolbar button{display:grid;place-items:center;width:38px;height:38px;min-height:38px;padding:7px!important;border:1px solid transparent;border-radius:7px;background:transparent;color:#7b4928;cursor:pointer}
.stlg-cutout-toolbar button:not(:disabled):hover{background:#ffe6ce;border-color:#df9c64}
.stlg-cutout-toolbar button:focus-visible{outline:2px solid #f07821;outline-offset:2px}
.stlg-cutout-toolbar button.is-active{background:#ef7725;color:#fff;border-color:#bc4c09;box-shadow:0 0 0 2px #ef77252a}
.stlg-cutout-toolbar button[data-cutout-tool=pointer]{margin-top:8px;border-top:1px solid #d2bca8}
.stlg-cutout-toolbar svg,.stlg-cutout-cursor svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.stlg-cutout-outlines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;overflow:hidden}
.stlg-cutout-outlines path{fill:transparent;stroke:#ffc489;stroke-width:1.4;stroke-linejoin:round}
.stlg-cutout-outlines path.is-selected{stroke:#ffed7c;stroke-width:4;filter:drop-shadow(0 0 3px #ff8c00) drop-shadow(0 0 1px #5d2c00)}
.stlg-cutout-outlines path.is-hovered{stroke:#fff9bb;stroke-width:5;filter:drop-shadow(0 0 4px #ff9300)}
.stlg-cutout-cursor{position:absolute;z-index:8;pointer-events:none;padding:3px;color:#9a430b;background:#fff8eae8;border:1px solid #e0ad77;border-radius:6px}
.stlg-scene[data-cutout-tool=hand] canvas{cursor:grab}
.stlg-scene[data-cutout-tool=rotate] canvas{cursor:crosshair}
.stlg-scene[data-cutout-tool=erase] canvas{cursor:crosshair}
.stlg-cutout-note{position:absolute;left:16px;bottom:calc(var(--stlg-actions-height,78px) + 4px);max-width:calc(100% - 100px);margin:0;padding:4px 7px;border-radius:4px;background:#fffaf0dd;color:#784321;font-size:12px;pointer-events:none;z-index:3}
.stlg-cutout-dimension{border-color:#ce8b42!important;background:#fffaf0f5!important}
.stlg-legacy-cutout-warning{flex-basis:100%;margin:8px 0;padding:10px 12px;color:#a31414;background:#fff0ef;border:1px solid #d86561;border-radius:6px;font-size:14px;font-weight:600}
@media(max-height:650px){.stlg-cutout-toolbar{gap:2px;padding:4px;max-height:calc(100% - 260px)}.stlg-cutout-toolbar button{width:30px;height:30px;min-height:30px;padding:3px!important}.stlg-cutout-toolbar button[data-cutout-tool=pointer]{margin-top:4px}}

.stlg-cutout-toolbar button:disabled{opacity:.35;cursor:not-allowed;background:transparent;box-shadow:none}

.stlg-cutout-outlines path.is-protected{stroke:#d5a475;stroke-dasharray:5 4;fill:#ad6f2420;stroke-width:1.3}

/* Spatial olive annotations; an upright input opens only for the active value. */
.stlg-shell .stlg-dimension:not(.is-editing){display:none!important}
.stlg-shell .stlg-dimension.is-editing{z-index:7;border-color:#72783e!important}
.stlg-shell .stlg-dimension-lines path{stroke:#c8d38a}
.stlg-shell button.stlg-measure-label{position:absolute;z-index:2;width:auto;min-width:0;min-height:0;margin:0;padding:3px 5px;border:0;border-radius:3px;background:#202936ed;color:#d2da9a;font-family:inherit;font-size:15px;font-weight:600;line-height:1.2;white-space:nowrap;text-shadow:none;cursor:pointer;transform-origin:center;box-shadow:none}
.stlg-shell button.stlg-measure-label:hover,.stlg-shell button.stlg-measure-label:focus-visible{color:#edf2c9;background:#303c4ced;outline:1px solid #c8d38a;outline-offset:2px}
.stlg-shell button.stlg-measure-label[hidden]{display:none!important}
.stlg-shell button.stlg-measure-label{transition:none!important;animation:none!important}

.stlg-model-settings{position:absolute;left:16px;top:106px;z-index:4;background:#fffdf4ee;border:1px solid #c6b6a5;border-radius:9px;padding:8px;max-height:45%;overflow:auto;width:190px;font-size:12px}
.stlg-model-settings summary{cursor:pointer;font-weight:600}
.stlg-shell .stlg-model-settings .stlg-model-setting{display:grid!important;position:static;transform:none;background:none;border:0;box-shadow:none;padding:6px 0;grid-template-columns:1fr 24px}
.stlg-shell .stlg-model-setting select{width:140px;max-width:100%;padding:4px;min-height:28px;font-size:13px}

.stlg-shell .stlg-model-settings .stlg-model-setting[hidden]{display:none!important}

/* Gear settings grow with their content; scroll only above the action bar. */
.stlg-scene[data-model="gear"] .stlg-model-settings,.stlg-scene[data-model="drawer_insert"] .stlg-model-settings{box-sizing:border-box;max-height:calc(100% - 106px - var(--stlg-actions-height,100px) - 16px)}

.stlg-scene[data-model="gift_box"] .stlg-model-settings{max-height:calc(100% - 250px);overflow:auto}
.stlg-scene[data-model="gift_box"] .stlg-model-setting input[type="file"]{width:100%;min-width:0;font-size:11px}

/* Name input uses the width of the settings panel rather than a numeric field. */
.stlg-scene[data-model="text_keychain"] .stlg-model-setting input[type="text"]{width:100%;grid-column:1/-1}
.stlg-scene[data-model="text_keychain"] .stlg-model-settings{max-height:calc(100% - 250px)}

/* Same font preview assets as Legacy, within the 3D settings panel. */
.stlg-shell .stlg-font-picker{grid-column:1/-1;min-width:0}
.stlg-shell .stlg-model-setting select[hidden]{display:none!important}
.stlg-shell .stlg-font-trigger,.stlg-shell .stlg-font-option{width:100%;display:flex;align-items:center;gap:8px;padding:6px 8px;border:1px solid #c6b6a5;border-radius:8px;background:#fffdf9;cursor:pointer;text-align:left}
.stlg-shell .stlg-font-trigger{min-height:38px}
.stlg-shell .stlg-font-trigger:after{content:"⌄";margin-left:auto;color:#63686b}
.stlg-shell .stlg-font-picker img{width:auto;max-width:100%;max-height:29px;object-fit:contain}
.stlg-shell .stlg-font-trigger img{max-width:calc(100% - 20px)}
.stlg-shell .stlg-font-list{display:grid;gap:5px;max-height:210px;overflow:auto;margin-top:6px;padding:5px;border:1px solid #c6b6a5;border-radius:9px;background:#fff}
.stlg-shell .stlg-font-list[hidden]{display:none!important}
.stlg-shell .stlg-font-option{border-color:transparent;min-height:38px}
.stlg-shell .stlg-font-option:hover,.stlg-shell .stlg-font-option.is-selected{border-color:#ff660066;background:#fff1e6}
.stlg-shell .stlg-font-picker,.stlg-shell .stlg-font-picker *{box-sizing:border-box}
.stlg-scene[data-model="svg_keychain"] .stlg-model-settings{max-height:calc(100% - 250px)}
.stlg-scene[data-model="svg_keychain"] .stlg-model-setting input[type="file"]{width:100%;min-width:0;grid-column:1/-1;font-size:11px}
.stlg-scene[data-model="svg_keychain"] .stlg-model-setting input[type="checkbox"]{width:18px;height:18px;padding:0;border:1px solid #c6b6a5;accent-color:#ff6600}

/* Central SVG picker and file-drop target; the same input remains in the form. */
.stlg-shell .stlg-workspace-upload{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:5;width:min(340px,80%);text-align:center}
.stlg-shell .stlg-workspace-upload[hidden],.stlg-shell .stlg-workspace-upload input[hidden],.stlg-shell .stlg-model-setting input[type="file"][hidden]{display:none!important}
.stlg-shell .stlg-workspace-upload-choose{display:inline-flex;align-items:center;gap:10px;padding:12px 20px;border:0;border-radius:9px;background:var(--stlg-brand,#ff6600);color:#fff;font-family:inherit;font-size:15px;font-weight:600;line-height:1.4;cursor:pointer;box-shadow:0 4px 16px #ff66002a}
.stlg-shell .stlg-workspace-upload-choose svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.stlg-shell .stlg-workspace-upload p{margin:10px 0 0;color:#63686b;font-size:13px}
.stlg-shell .stlg-workspace-upload .stlg-workspace-upload-message{font-size:12px}
.stlg-shell .stlg-scene.is-upload-empty .stlg-model-settings,.stlg-shell .stlg-scene.is-upload-empty .stlg-scene-hint,.stlg-shell .stlg-scene.is-upload-empty .stlg-scene-status{display:none}
.stlg-shell .stlg-workspace-upload-replace{grid-column:1/-1;padding:6px 10px;border:1px solid #c6b6a5;border-radius:8px;background:#fffdf9;cursor:pointer;font:inherit}
.stlg-shell .stlg-model-setting .stlg-workspace-upload-filename{grid-column:1/-1;overflow-wrap:anywhere;padding-top:4px}
.stlg-shell .stlg-scene.is-file-dragover:after{content:"SVG hier ablegen";position:absolute;inset:10px;z-index:8;display:grid;place-items:center;border:3px dashed #ff6600;border-radius:14px;background:#fff6eccc;color:#a94300;font-weight:700;pointer-events:none}

.stlg-shell .stlg-scene button.stlg-workspace-upload-replace{color:#283843;background:#fffdf9;font-weight:600}
.stlg-shell .stlg-scene button.stlg-workspace-upload-replace:hover,.stlg-shell .stlg-scene button.stlg-workspace-upload-replace:focus{color:#283843;background:#fff1e6}

.stlg-scene[data-cutout-tool=scale] canvas{cursor:crosshair}
.stlg-cutout-outlines path.stlg-scale-handle{fill:none;stroke:#fff4a3;stroke-width:1.8;filter:drop-shadow(0 0 2px #713508)}
.stlg-cutout-outlines path.stlg-scale-handle.is-active{stroke:#fff;stroke-width:2.5;filter:drop-shadow(0 0 3px #ff8c00)}

.stlg-shell .stlg-cutout-toolbar button.is-active,.stlg-shell .stlg-cutout-toolbar button.is-active:hover{background:#ef7725;color:#fff;border-color:#bc4c09}

/* Match the 3D Print viewport; controls remain light floating panels. */
.stlg-shell .stlg-scene-toolbar strong{color:#f1f5f9}
.stlg-shell .stlg-scene-hint{color:#c3cdd9}
.stlg-shell .stlg-scene-status{color:#f1f5f9;text-shadow:0 1px 3px #202936}
.stlg-shell .stlg-scene .stlg-workspace-upload p{color:#c3cdd9}
.stlg-shell .stlg-dimension-lines path{filter:drop-shadow(0 0 1px #202936)}
.stlg-shell .stlg-cutout-outlines path:not(.is-selected):not(.is-hovered):not(.stlg-scale-handle){filter:drop-shadow(0 0 1px #202936)}
