.workspace{grid-template-columns:230px minmax(380px,1fr) 310px}.library-body{display:flex;flex-direction:column;min-height:0}.scene-hierarchy{flex:1;min-height:140px}.scene-search{display:block;margin:12px 0}.scene-search input{width:100%;padding:9px 10px;border:1px solid #c5c6b8;border-radius:5px;background:#fffef6;font:12px inherit}.scene-tree{max-height:480px;overflow:auto}.scene-row-item{display:flex;align-items:center;min-width:0;padding-left:calc(var(--depth)*13px);border-radius:4px;margin:1px 0}.scene-row-item.selected{background:#dddff4;color:#2d3e98}.scene-row-item.related{background:#efe7f6}.scene-row-item button{border:0;background:transparent;text-align:left;box-shadow:none;min-width:0}.scene-row-item>button:last-child{display:flex;align-items:center;gap:6px;flex:1;font-size:12px;padding:7px 3px}.scene-row-item>button:last-child>span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.scene-row-item small{margin-left:auto;color:#8a8d82;font:9px monospace}.scene-fold{width:17px;flex-shrink:0;padding:0!important;color:#767c6b}.scene-icon{width:18px;text-align:center;color:#728260}.scene-tree-note{font-size:11px;color:#7f8274;line-height:1.6;padding:10px 5px}.scene-game-button{padding:10px;border:1px solid #c9cbbd;background:#f8f8ed;font-size:12px;margin-top:10px}.scene-inspector-heading{padding:16px 18px;border-bottom:1px solid #d6d8c8;background:#f5f4e9}.scene-inspector-heading h3{font-size:19px;margin:4px 0 0;overflow-wrap:anywhere}.inspector{max-height:min(810px,calc(100dvh - 24px));overflow:auto;display:flex;flex-direction:column;scrollbar-gutter:stable}.inspector>*{flex-shrink:0}.inspector .settings-scroll{overflow:visible;max-height:none;overscroll-behavior:auto;flex:none}.scene-camera-effects{flex:none;overflow:visible;border-top:2px solid #c8cbbc}.scene-camera-effects .effects-intro{font-size:12px}.scene-add{position:relative;flex-shrink:0}.scene-add summary{list-style:none;background:#f7dc7b;border:1px solid #646949;padding:8px 10px;border-radius:4px;cursor:pointer;font-weight:600;font-size:12px}.scene-add-menu{position:absolute;z-index:20;top:40px;left:0;width:320px;max-height:540px;overflow:auto;background:#fffef5;border:1px solid #69725a;border-radius:6px;box-shadow:5px 7px 0 #323e3829;padding:14px}.scene-add-menu .object-list{max-height:280px;overflow:auto}.scene-add-menu .section-label{margin:8px 0}.scene-add-menu #scene-add-special{display:grid;grid-template-columns:1fr 1fr;gap:5px}.scene-add-menu #scene-add-special button{padding:8px;text-align:left;background:#f0f1e3;border:1px solid #d2d4c3;border-radius:3px;font-size:12px}.editor-toolbar{gap:8px;flex-wrap:wrap}.scene-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:18px}.scene-actions button{font-size:11px;padding:7px;border:1px solid #c6c8b8;background:#f5f3e6}.scene-particle-properties{padding:0!important;border:0!important;background:transparent!important}.scene-particle-properties .particle-section{padding:12px 0}.scene-particle-properties .particle-light-settings{padding:12px}.scene-particle-properties .particle-field input,.scene-particle-properties select{max-width:100%}#scene-properties .trait-param{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}#scene-properties .trait-param>span{flex:1 0 100%;font-size:12px}#scene-properties .trait-param input[type=range]{flex:1;min-width:0}#scene-properties .trait-param select,#scene-properties .trait-param textarea{width:100%}#scene-properties .setting-field input{max-width:100%}.library #selected-object-tools[hidden],.library .section-line[hidden],.library .scene-row[hidden]{display:none!important}.scene-inspector-heading+.inspector-tabs[hidden]{display:none!important}@media(min-width:1500px){.workspace{grid-template-columns:260px minmax(480px,1fr) 340px}.scene-tree{max-height:560px}}@media(max-width:1000px){.workspace{grid-template-columns:190px minmax(300px,1fr)}.inspector{grid-column:1/-1;max-height:550px}.scene-tree{max-height:400px}}@media(max-width:650px){.workspace{display:flex;flex-direction:column}.scene-tree{max-height:240px}.scene-add-menu{width:280px}.inspector{max-height:none}.scene-add{order:-1}}
.editor .editor-toolbar{height:auto;min-height:48px;align-items:center;padding:8px 12px}.editor .editor-toolbar .canvas-caption{display:none}.editor .editor-toolbar .tool-group{flex-shrink:0}.scene-tree{scrollbar-gutter:stable}.scene-particle-properties [hidden]{display:none!important}
.scene-camera-effects .particle-effects-entry{display:none}.scene-fx-advanced output{float:right;color:#657547;font:11px 'Space Mono',monospace}.scene-fx-advanced input{width:100%}

/* The whole inspector owns scrolling; inner property panels must grow with their controls. */
@media(min-width:1001px){.inspector{position:sticky;top:12px;align-self:start}}

.scene-add-menu{width:min(380px,calc(100vw - 48px));max-height:min(620px,calc(100dvh - 160px));padding:0;overscroll-behavior:contain}.scene-add-heading{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;background:#fffef5;z-index:1;border-bottom:1px solid #d2d4c3}.scene-add-heading strong{font-size:13px}.scene-add-heading #scene-add-close{padding:0;width:28px;height:28px;background:#edeedc;border:1px solid #7a8067;border-radius:3px;font-size:20px;box-shadow:none}.scene-add-tabs{display:flex;gap:4px;padding:10px 12px;border-bottom:1px solid #d2d4c3}.scene-add-tabs button{flex:1;padding:8px 4px;font-size:11px;border:1px solid transparent;background:transparent;box-shadow:none;border-radius:4px;white-space:nowrap}.scene-add-tabs button[aria-selected=true]{background:#e4e9d5;border-color:#adb99a;color:#34422d}.scene-add-menu [role=tabpanel]{padding:0 14px 14px}.scene-add-menu #scene-add-special{display:block}.scene-add-hint{font-size:12px;color:#6b775c;line-height:1.5;margin:12px 0}.scene-add-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.scene-add-menu .scene-add-grid button{min-height:38px}.scene-add-menu .scene-add-item,.scene-add-menu #scene-add-special .scene-add-item{display:grid;gap:5px;text-align:left;padding:12px;background:#f2f3e6;border:1px solid #c9cfba;border-radius:4px;width:100%;font:inherit;box-shadow:none}.scene-add-item b{font-size:12px}.scene-add-item small{font-size:11px;line-height:1.5;color:#69775b;font-weight:400}.scene-story-add{display:grid;gap:8px}.scene-add-menu #scene-add-special .scene-story-library{margin-top:14px;width:100%;text-align:center;padding:10px;background:transparent}.scene-add-menu .object-list{max-height:280px;margin-bottom:12px}.scene-add-menu [hidden]{display:none!important}

.scene-add-search{display:block;margin:12px 0}
.scene-add-search input{width:100%;padding:9px 10px;border:1px solid #b5c1a1;border-radius:4px;background:#fffdf4;color:#42573b;font:12px var(--sans)}
.scene-add-menu #scene-create-sprite{margin:12px 0 8px;background:#e6ecd8;border-color:#b3c49c}
.scene-inspector-heading:focus{outline:2px solid #879c6d;outline-offset:-3px}
.scene-row-item{position:relative;user-select:none}.scene-row-item[draggable=true]{cursor:grab}.scene-row-item[draggable=true]:active{cursor:grabbing}.scene-row-item.drop-inside{background:#e4edca;outline:2px solid #829a57;outline-offset:-2px}.scene-row-item.drop-before:before,.scene-row-item.drop-after:after{content:'';position:absolute;left:calc(var(--depth)*13px);right:0;height:3px;background:#849c58;z-index:2;pointer-events:none;box-shadow:0 0 0 1px #faf9ef}.scene-row-item.drop-before:before{top:-2px}.scene-row-item.drop-after:after{bottom:-2px}.scene-row-item button:focus-visible{outline:2px solid #718d52;outline-offset:-2px}.scene-actions button:disabled{opacity:.45;cursor:default}

.scene-clipboard-actions{display:flex;flex-wrap:wrap;gap:4px;margin:8px 0 10px}.scene-clipboard-actions button{flex:1;padding:7px 5px;border:1px solid #bac5aa;background:#f7f7ed;color:#40553b;border-radius:3px;font:600 11px var(--sans);box-shadow:none}.scene-clipboard-actions button:hover:not(:disabled){background:#e5ebd8}.scene-clipboard-actions button:disabled{opacity:.45;cursor:default}.scene-clipboard-actions button:focus-visible{outline:2px solid #718d52;outline-offset:2px}

/* A fixed row keeps the full hierarchy scrollable without mounting thousands of controls. */
.scene-tree{position:relative;overflow-anchor:none}.scene-tree-space{width:1px;pointer-events:none}.scene-tree>.scene-row-item{position:absolute;left:0;right:0;height:32px;box-sizing:border-box;margin:0;overflow:hidden}.scene-tree>.scene-row-item>button:last-child{height:32px}
