:root { color-scheme: dark; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #e8eaf0; background: #111419; font-size: 13px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; border: 1px solid #39414d; border-radius: 5px; background: #20262f; padding: 7px 9px; }
button { cursor: pointer; white-space: nowrap; }
button:hover:not(:disabled) { background: #303949; border-color: #707d94; }
button:disabled { opacity: .4; cursor: default; }
button.primary, button[aria-pressed="true"] { background: #32513d; border-color: #629474; color: #eefbf2; }
:focus-visible { outline: 2px solid #a0dfb4; outline-offset: 2px; }
a { color: #a0dfb4; }
.app-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid #303742; gap: 16px; background: #181d24; }
.brand { color: #fff; font-size: 18px; font-weight: 720; text-decoration: none; white-space: nowrap; }
.brand span { font-size: 13px; font-weight: 400; color: #a5b0c0; margin-left: 12px; }
nav, .tool-group, .editor-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#video-settings { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; width: 100%; }
#video-settings label { display: flex; align-items: center; gap: 6px; }
#video-settings input { width: 70px; }
#video-settings .editor-note { margin: 0; }
.workspace { display: grid; grid-template-columns: 235px minmax(250px, 1fr) 290px; flex: 1; min-height: 0; }
aside { background: #191e26; padding: 16px; overflow: auto; }
.objects-panel { border-right: 1px solid #303742; display: flex; flex-direction: column; gap: 22px; }
.inspector-panel { border-left: 1px solid #303742; }
h2 { font-size: 13px; letter-spacing: .025em; margin: 0 0 13px; font-weight: 650; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.section-heading span, .editor-note { color: #a5b0c0; }
.editor-note { line-height: 1.5; font-size: 12px; }
.asset-hint { margin: -6px 0 12px; overflow-wrap: anywhere; }
.editor-error { margin: 9px 0; color: #ffb5ad; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.editor-field { display: flex; flex-direction: column; gap: 5px; margin: 0 0 12px; color: #b7c0ce; font-size: 12px; }
.editor-field input, .editor-field select, .editor-field textarea { width: 100%; min-width: 0; color: #f0f2f6; }
.editor-check { display: flex; align-items: center; gap: 6px; margin: 9px 0; font-size: 12px; }
input[type="checkbox"] { accent-color: #86bf98; }
.wide { width: 100%; }
.scene-list-section { flex: 1; min-height: 120px; }
#objects { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.object-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 38px; width: 100%; align-items: center; gap: 4px; padding: 5px; border: 1px solid transparent; border-radius: 5px; background: transparent; }
.object-row[aria-selected="true"] { background: #2a3d33; border-color: #4d6c58; }
.object-select { padding: 5px 2px; font-size: 10px; text-transform: uppercase; color: #b7c0ce; }
.object-row .object-name { width: 100%; min-width: 0; padding: 5px 3px; border-color: transparent; background: transparent; text-overflow: ellipsis; }
.object-row .object-name:hover, .object-row .object-name:focus { border-color: #566579; background: #20262f; }
.object-visibility { padding: 5px 2px; font-size: 11px; }
.object-row.hidden-object .object-select, .object-row.hidden-object .object-name { opacity: .55; }
.object-row[aria-busy="true"] { border-color: #64758d; }
.object-loading { grid-column: 1 / -1; margin: 0; padding: 2px 3px; color: #b7c0ce; font-size: 11px; }
.local-save .editor-note { margin-bottom: 0; }
summary { cursor: pointer; color: #bdc8d7; margin-bottom: 12px; }
.scene-settings { border-top: 1px solid #303742; padding-top: 16px; }
.viewport-panel { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.viewport-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; background: #1b2028; border-bottom: 1px solid #303742; z-index: 1; }
.viewport-toolbar .editor-check { margin: 0; }
.history { margin-left: auto; }
#viewport { flex: 1; min-height: 0; position: relative; background: radial-gradient(ellipse at center, #242e3d, #141a23); }
#viewport canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.viewport-help { position: absolute; bottom: 8px; left: 16px; right: 16px; pointer-events: none; color: #aab7c9; font-size: 11px; text-align: center; text-shadow: 0 1px 3px #000; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.transform-vector { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-bottom: 12px; }
.transform-vector .editor-field { margin: 0; }
.vector-label { margin: 12px 0 6px; color: #b7c0ce; font-size: 12px; }
.editor-section { border-top: 1px solid #303742; margin-top: 15px; padding-top: 15px; }
.editor-section h3 { font-size: 13px; margin: 0 0 12px; }
.gui-layer { margin: 8px 0; padding: 10px; border: 1px solid #39414d; border-radius: 6px; }
.gui-layer-header { margin-bottom: 0; font-weight: 600; overflow-wrap: anywhere; }
.gui-layer[open] > .gui-layer-header { margin-bottom: 12px; }
.gui-layer-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.gui-layer-actions button { flex: 1; padding: 5px; font-size: 11px; }
.tint-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tint-row > .editor-field { flex: 1; min-width: 96px; margin: 0; }
.tint-row > .editor-note { flex-basis: 100%; margin: 0; }
.tint-row input[type="color"] { height: 34px; padding: 3px; }
.editor-json { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; width: 100%; min-height: 90px; resize: vertical; }
.editor-row > .editor-field { flex: 1; min-width: 0; }
footer { min-height: 29px; border-top: 1px solid #303742; background: #181d24; display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 5px 14px; color: #a5b0c0; font-size: 11px; }
#status.error { color: #ffb5ad; }
#status { overflow-wrap: anywhere; }
dialog { width: min(820px, 95vw); border: 1px solid #465163; border-radius: 9px; padding: 22px; background: #1b222c; color: #e8eaf0; }
dialog::backdrop { background: #070b12b3; }
#code-output { width: 100%; height: 400px; resize: vertical; margin: 10px 0; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
body.loading #viewport { cursor: progress; }
@media (max-width: 1050px) { .workspace { grid-template-columns: 200px minmax(200px, 1fr) 250px; } .brand span { display: none; } aside { padding: 12px; } .app-header { padding: 9px 12px; } }
@media (max-width: 760px) { body { overflow: auto; height: auto; min-height: 100dvh; } .app-header { flex-wrap: wrap; } .workspace { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; } .viewport-panel { grid-column: 1 / -1; grid-row: 1; height: 55dvh; min-height: 350px; } aside { max-height: 60dvh; } footer { position: sticky; bottom: 0; } .viewport-help { display: none; } }
