:root{--bg-base:#0d0d10;--bg-surface:#141418;--bg-surface-2:#1b1b21;--bg-elevated:#1f1f26;--bg-input:#17171c;--bg-hover:#25252e;--text-primary:#f0f0f4;--text-secondary:#a8a8b3;--text-tertiary:#6b6b78;--text-disabled:#45454f;--accent:#8b5cf6;--accent-hover:#9d70f8;--accent-press:#7c4ddf;--accent-subtle:#8b5cf61f;--accent-border:#8b5cf68c;--border:#2a2a33;--border-subtle:#202027;--border-strong:#3a3a45;--space-1:2px;--space-2:4px;--space-3:8px;--space-4:12px;--space-5:16px;--space-6:24px;--radius-sm:4px;--radius-md:5px;--radius-lg:6px;--radius-pill:999px;--text-xs:10px;--text-sm:12px;--text-md:13px;--text-lg:15px;--font-ui:"Inter", "Segoe UI", system-ui, -apple-system, sans-serif;--font-mono:"JetBrains Mono", "SF Mono", "Consolas", monospace;--toolbar-h:52px;--statusbar-h:30px;--props-w:248px;--t-fast:80ms;--t-med:.14s;--ease:cubic-bezier(.4, 0, .2, 1)}html.light{--bg-base:#f4f4ef;--bg-surface:#fff;--bg-surface-2:#f0f0eb;--bg-elevated:#fff;--bg-input:#f3f3ee;--bg-hover:#e7e7e0;--text-primary:#16161a;--text-secondary:#54545f;--text-tertiary:#8a8a95;--text-disabled:#b7b7be;--accent-subtle:#8b5cf624;--accent-border:#8b5cf680;--border:#d9d9d2;--border-subtle:#e7e7e0;--border-strong:#c4c4bc}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{width:100%;height:100%;overflow:hidden}body{font-family:var(--font-ui);background:var(--bg-base);color:var(--text-primary);font-size:var(--text-md);-webkit-font-smoothing:antialiased;-webkit-user-select:none;user-select:none}button{cursor:pointer;color:inherit;background:0 0;border:none;font-family:inherit}input,select,textarea{font-family:inherit}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:var(--radius-pill)}::-webkit-scrollbar-thumb:hover{background:var(--text-tertiary)}.btn{align-items:center;gap:var(--space-2);height:32px;padding:0 var(--space-4);border-radius:var(--radius-sm);font-size:var(--text-sm);color:var(--text-secondary);background:var(--bg-surface-2);border:1px solid var(--border);transition:background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);font-weight:500;display:inline-flex}.btn:hover{background:var(--bg-hover);color:var(--text-primary)}.btn:disabled{color:var(--text-disabled);cursor:not-allowed}.btn-primary{background:var(--accent);color:#fff;border-color:#0000}.btn-primary:hover{background:var(--accent-hover);color:#fff}.btn-ghost{background:0 0;border-color:#0000}.btn-ghost:hover{background:var(--bg-hover)}.tool-btn{border-radius:var(--radius-sm);width:34px;height:34px;color:var(--text-secondary);transition:background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);justify-content:center;align-items:center;display:flex}.tool-btn:hover{background:var(--bg-hover);color:var(--text-primary)}.tool-btn.active{background:var(--accent-subtle);color:var(--accent)}.color-swatch-indicator{border-radius:2px;width:16px;height:4px;margin:2px auto 0;display:block}.tool-btn:disabled{color:var(--text-disabled);cursor:not-allowed}.tool-sep{background:var(--border);width:1px;height:18px;margin:0 var(--space-2)}.field{height:24px;padding:0 var(--space-3);background:var(--bg-input);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text-primary);font-size:var(--text-sm);width:100%;transition:border-color var(--t-fast) var(--ease);outline:none}.field:focus{border-color:var(--accent)}.field-mono{font-family:var(--font-mono)}.prop-label{font-size:var(--text-xs);color:var(--text-tertiary);text-transform:uppercase;letter-spacing:.06em;margin-bottom:var(--space-2);font-weight:600}.prop-row{margin-bottom:var(--space-4)}.properties-panel-float{z-index:100;background:var(--panel-fill,#18181e);width:252px;max-height:calc(100vh - 32px);color:var(--panel-text,var(--text-primary));border:1px solid var(--panel-border,#ffffff18);border-radius:11px;padding:18px;transition:opacity .15s,transform .15s;position:fixed;overflow-y:auto;box-shadow:0 6px 18px #0005}.properties-panel-float.entering{opacity:0;transform:translate(8px)}.properties-panel-float.visible{opacity:1;transform:translate(0)}.properties-panel-float.exiting{opacity:0;transition:opacity .1s}.tool-strip{z-index:100;background:var(--panel-fill,#18181e);color:var(--panel-text,var(--text-primary));border:1px solid var(--panel-border,#ffffff18);border-radius:10px;align-items:center;padding:10px 14px;transition:opacity .15s,transform .15s;display:flex;position:fixed;left:50%;transform:translate(-50%);box-shadow:0 6px 18px #0005}.tool-strip.entering{opacity:0}.tool-strip.visible{opacity:1}.tool-strip.exiting{opacity:0;transition:opacity .1s}.tool-strip .prop-row{align-items:center;gap:var(--space-3);margin-bottom:0;display:flex}.tool-strip .prop-label{white-space:nowrap;margin-bottom:0}.properties-panel-float .panel-close{width:20px;height:20px;color:var(--text-tertiary);border-radius:4px;justify-content:center;align-items:center;display:flex;position:absolute;top:8px;right:8px}.properties-panel-float .panel-close:hover{background:var(--bg-hover);color:var(--text-primary)}.scene-panel{top:calc(var(--toolbar-h) + 8px);left:8px;bottom:calc(var(--statusbar-h) + 8px);z-index:40;background:var(--bg-surface);border:1px solid var(--border);border-radius:10px;flex-direction:column;width:210px;display:flex;position:absolute;overflow:hidden;box-shadow:0 6px 18px #00000040}.scene-panel-head{align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-bottom:1px solid var(--border-subtle);display:flex}.scene-list{padding:var(--space-2);gap:var(--space-1);flex-direction:column;flex:1;display:flex;overflow-y:auto}.scene-row{align-items:center;gap:var(--space-3);padding:var(--space-2);border-radius:var(--radius-sm);cursor:pointer;border-left:2px solid #0000;display:flex;position:relative}.scene-row:hover{background:var(--bg-hover)}.scene-row.active{background:var(--accent-subtle);border-left-color:var(--accent)}.scene-thumb{background:var(--bg-input);border:1px solid var(--border-subtle);border-radius:4px;flex-shrink:0;width:60px;height:45px;overflow:hidden}.scene-thumb img{-o-object-fit:cover;object-fit:cover;width:100%;height:100%}.scene-thumb-empty{width:100%;height:100%}.scene-name{font-size:var(--text-sm);color:var(--text-primary);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.scene-name-edit{width:100%;font-size:var(--text-sm);padding:1px 4px}.scene-time{font-size:var(--text-xs);color:var(--text-tertiary);margin-top:1px}.scene-menu-btn{opacity:0}.scene-row:hover .scene-menu-btn{opacity:1}.scene-menu{z-index:51;background:var(--bg-elevated);border:1px solid var(--border-strong);border-radius:var(--radius-sm);padding:var(--space-1);flex-direction:column;min-width:120px;display:flex;position:absolute;top:32px;right:6px;box-shadow:0 6px 18px #00000050}.scene-menu button{text-align:left;font-size:var(--text-sm);color:var(--text-secondary);border-radius:4px;padding:6px 10px}.scene-menu button:hover:not(:disabled){background:var(--bg-hover);color:var(--text-primary)}.scene-menu button:disabled{color:var(--text-disabled);cursor:not-allowed}.home-overlay{background:var(--bg-base);z-index:100;justify-content:center;align-items:flex-start;padding:48px 24px;display:flex;position:fixed;top:0;bottom:0;left:0;right:0;overflow-y:auto}.home-content{width:100%;max-width:900px}.home-header{align-items:center;gap:10px;margin-bottom:32px;display:flex}.home-appname{color:var(--text-primary);font-size:22px;font-weight:600}.home-section-row{justify-content:space-between;align-items:center;margin-bottom:16px;display:flex}.home-section-label{text-transform:uppercase;letter-spacing:.06em;color:var(--text-secondary);font-size:12px;font-weight:600}.home-scene-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px;margin-bottom:32px;display:grid}.scene-tile{aspect-ratio:180/160;cursor:pointer;background:var(--bg-surface);border:1px solid #ffffff12;border-radius:8px;flex-direction:column;width:100%;transition:border-color .15s,background .15s;display:flex;position:relative;overflow:hidden}.scene-tile:hover{border-color:#8b5cf68c}.scene-tile.active{border-top:2px solid var(--accent)}.scene-tile-thumb{background:var(--bg-base);justify-content:center;align-items:center;width:100%;height:75%;display:flex;overflow:hidden}.scene-tile-meta{flex:1;min-width:0;padding:8px 10px}.scene-tile-name{white-space:nowrap;text-overflow:ellipsis;color:var(--text-primary);font-size:12px;font-weight:500;overflow:hidden}.scene-tile-time{color:var(--text-secondary);align-items:center;gap:4px;margin-top:2px;font-size:11px;display:flex}.scene-tile-active-dot{background:var(--accent);border-radius:50%;width:6px;height:6px;display:inline-block}.tile-open-hint{height:75%;color:var(--text-primary);opacity:0;pointer-events:none;background:#8b5cf61f;justify-content:center;align-items:center;font-size:13px;font-weight:600;transition:opacity .15s;display:flex;position:absolute;top:0;left:0;right:0}.scene-tile:hover .tile-open-hint{opacity:1}.home-footer{border-top:1px solid #ffffff0f;align-items:center;gap:16px;padding-top:16px;display:flex}.home-empty{text-align:center;flex-direction:column;align-items:center;gap:16px;padding:64px 0;display:flex}.home-empty-title{color:var(--text-primary);font-size:20px;font-weight:600}.home-empty-sub{font-size:var(--text-sm);color:var(--text-secondary)}.scene-menu-sep{background:var(--border);height:1px;margin:var(--space-1) 0}.scene-menu-danger:not(:disabled){color:var(--c-red,#d9434e)}.toast-wrap{gap:var(--space-3);z-index:9000;pointer-events:none;flex-direction:column;display:flex;position:fixed;bottom:40px;left:50%;transform:translate(-50%)}.toast{background:var(--bg-elevated);border:1px solid var(--border-strong);border-radius:var(--radius-sm);padding:var(--space-3) var(--space-5);font-size:var(--text-sm);color:var(--text-primary);min-width:200px;animation:toast-in var(--t-med) var(--ease)}@keyframes toast-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.fade-in{animation:fade-in var(--t-med) var(--ease)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@font-face{font-family:Patrick Hand;font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/PatrickHand-Regular.ttf)format("truetype")}
