@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.hidden{display:none}.resize{resize:both}}:root{--background:#f3f5f9;--foreground:#152033;--panel:#fff;--panel-border:#d9e0ee;--muted:#65728a;--accent:#2764f6;--accent-strong:#174ac6;--danger:#d92d20}*{box-sizing:border-box}html,body{height:100%;min-height:100%}body{color:var(--foreground);background:0 0;margin:0;font-family:PingFang SC,Microsoft YaHei,Noto Sans SC,Arial,Helvetica,sans-serif}button,input,textarea,select{font:inherit}button,label.file-button{-webkit-user-select:none;user-select:none}.editor-shell{background:var(--background);flex-direction:column;gap:16px;height:100dvh;min-height:0;padding:18px;display:flex;overflow:hidden}.editor-toolbar{background:var(--panel);border:1px solid var(--panel-border);border-radius:8px;flex:none;justify-content:space-between;align-items:center;gap:16px;padding:14px 16px;display:flex}.eyebrow{color:var(--muted);letter-spacing:0;text-transform:uppercase;margin:0 0 4px;font-size:12px;font-weight:800}h1,h2,p{margin:0}h1{font-size:24px;line-height:1.2}.toolbar-actions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.primary-button,.secondary-button,.danger-button{cursor:pointer;border:0;border-radius:6px;min-height:38px;padding:0 14px;font-size:14px;font-weight:800}.primary-button{color:#fff;background:var(--accent)}.primary-button:hover{background:var(--accent-strong)}.primary-button.muted{background:#1f2937}.secondary-button{color:#1c2a3d;background:#eef3fb;border:1px solid #d4deef}.secondary-button:hover{background:#e4ecf8}.toolbar-template-button.active{border-color:var(--accent);color:var(--accent);background:#eaf1ff}.danger-button{color:#fff;background:var(--danger);width:100%}.file-button{justify-content:center;align-items:center;display:inline-flex;position:relative;overflow:hidden}.file-button input,.toolbar-actions input[type=file]{opacity:0;cursor:pointer;position:absolute;inset:0}.export-control{border-radius:6px;align-items:center;min-height:38px;display:inline-flex;overflow:hidden}.export-control .primary-button{border-radius:0 6px 6px 0}.export-format-select{color:#fff;cursor:pointer;appearance:none;background:linear-gradient(45deg,#0000 50%,#fff 50%) calc(100% - 14px) 16px/5px 5px no-repeat,linear-gradient(135deg,#fff 50%,#0000 50%) calc(100% - 9px) 16px/5px 5px no-repeat,#1f2937;border:1px solid #111827;border-right:0;border-radius:6px 0 0 6px;outline:none;width:76px;min-height:38px;padding:0 26px 0 10px;font-size:14px;font-weight:900}.export-format-select:focus{box-shadow:inset 0 0 0 2px #ffffff38}.template-save-panel{background:var(--panel);border:1px solid var(--panel-border);border-radius:8px;flex:none;grid-template-columns:minmax(220px,360px) auto auto;align-items:end;gap:10px;padding:12px 16px;animation:.2s slideDown;display:grid}.template-save-panel .primary-button,.template-save-panel .secondary-button{min-width:96px}.editor-grid{flex:auto;grid-template-columns:minmax(240px,300px) minmax(360px,1fr) minmax(270px,340px);gap:16px;min-height:0;display:grid;overflow:hidden}.left-panel,.right-panel,.stage-panel{background:var(--panel);border:1px solid var(--panel-border);border-radius:8px;min-height:0}.left-panel,.right-panel{padding:14px;overflow:auto}.sidebar-context{background:#f8fbff;border:1px solid #cdd9ee;border-radius:8px;flex-direction:column;gap:3px;margin:0 0 12px;padding:12px;display:flex}.context-label{color:var(--muted);font-size:11px;font-weight:900}.sidebar-context strong{color:#1f2d44;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:900;overflow:hidden}.sidebar-context small{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:700;overflow:hidden}.sidebar-section{border-top:1px solid #e4ebf6;padding:12px 0}.sidebar-section:first-of-type{border-top:0}.sidebar-section-header{color:#1f2d44;cursor:pointer;text-align:left;background:0 0;border:0;grid-template-columns:minmax(0,1fr) auto 18px;align-items:center;gap:8px;width:100%;min-height:34px;padding:0;display:grid}.sidebar-section-header span{text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:900;overflow:hidden}.sidebar-section-header small{color:var(--muted);white-space:nowrap;font-size:12px;font-weight:800}.sidebar-section-header b{color:var(--muted);text-align:right;font-size:15px;line-height:1}.sidebar-section-body{flex-direction:column;gap:10px;padding-top:10px;display:flex}.section-fields{flex-direction:column;gap:10px;display:flex}.source-create-row{grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;display:grid}.source-create-row span{color:#39485f;font-size:12px;font-weight:900}.panel-title{justify-content:space-between;align-items:baseline;gap:10px;margin:2px 0 12px;display:flex}.panel-title h2{font-size:16px;line-height:1.2}.panel-title span{color:var(--muted);white-space:nowrap;font-size:12px}.element-list,.inspector{flex-direction:column;gap:10px;display:flex}.element-row{color:#243247;cursor:pointer;text-align:left;background:#f8fafc;border:1px solid #d9e0ee;border-radius:6px;justify-content:space-between;align-items:center;gap:8px;width:100%;min-height:42px;padding:8px 10px;display:flex}.element-row span{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-weight:800;overflow:hidden}.element-row small{color:var(--muted);font-size:11px}.element-row.active{border-color:var(--accent);background:#eaf1ff}.layer-list{flex-direction:column;gap:6px;display:flex}.layer-row{background:#f8fafc;border:1px solid #d9e0ee;border-radius:8px;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;padding:7px;display:grid}.layer-row.active{border-color:var(--accent);background:#eaf1ff;box-shadow:0 0 0 1px #2764f659}.layer-row.muted{opacity:.58}.layer-row.locked .layer-name{color:#43516a}.layer-main{color:#243247;cursor:pointer;text-align:left;background:0 0;border:0;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:7px;min-width:0;padding:0;display:grid}.layer-type{width:24px;height:24px;color:var(--accent);background:#edf4ff;border-radius:6px;justify-content:center;align-items:center;font-size:11px;font-weight:900;display:inline-flex}.layer-name{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:900;overflow:hidden}.layer-main small{color:var(--muted);white-space:nowrap;font-size:11px;font-weight:800}.layer-actions{align-items:center;gap:3px;display:flex}.layer-action{color:#46566f;cursor:pointer;background:#fff;border:1px solid #d9e0ee;border-radius:5px;justify-content:center;align-items:center;width:24px;height:24px;font-size:11px;font-weight:900;line-height:1;display:inline-flex}.layer-action:hover:not(:disabled),.layer-action.active{border-color:var(--accent);color:var(--accent);background:#f0f4ff}.layer-action:disabled{cursor:default;opacity:.38}.live-url-section{flex-direction:column;gap:8px;margin:14px 0 22px;display:flex}.live-url-header{justify-content:space-between;align-items:center;gap:8px;display:flex}.live-url-header span{color:#39485f;font-size:13px;font-weight:900}.template-select-dropdown{color:#39485f;cursor:pointer;appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 10px center no-repeat;border:1px solid #d9e0ee;border-radius:6px;outline:none;flex:1;max-width:280px;height:32px;padding:0 32px 0 10px;font-size:12px;font-weight:700;transition:all .15s}.template-select-dropdown:hover{border-color:var(--accent)}.template-select-dropdown:focus{border-color:var(--accent);box-shadow:0 0 0 2px #4e72ff26}.live-url-empty{text-align:center;border:1px dashed #d9e0ee;border-radius:6px;flex-direction:column;align-items:center;gap:10px;padding:16px 12px;display:flex}.live-url-empty p{color:var(--muted);margin:0;font-size:12px;font-weight:700}.slot-list{flex-direction:column;gap:6px;display:flex}.slot-item{cursor:pointer;background:#f8fafc;border:1px solid #d9e0ee;border-radius:8px;flex-direction:column;gap:8px;padding:10px 12px;transition:all .2s;display:flex;box-shadow:0 1px 2px #0000000a}.slot-item:hover{background:#fff;border-color:#c7d2e2;transform:translateY(-1px);box-shadow:0 2px 8px #00000014}.slot-item.active{border-color:var(--accent);background:#eaf1ff;box-shadow:0 0 0 2px #4e72ff26}.slot-item-header{justify-content:space-between;align-items:center;gap:6px;display:flex}.slot-title-group{grid-template-columns:auto minmax(0,1fr);align-items:center;gap:6px;min-width:0;display:grid}.slot-edit-icon{color:var(--muted);opacity:.6;flex-shrink:0;transition:color .15s}.slot-item:hover .slot-edit-icon{color:var(--accent);opacity:1}.slot-name{color:#243247;cursor:text;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px dashed #0000;flex:1;min-width:0;font-size:12px;font-weight:800;transition:border-color .15s,color .15s;overflow:hidden}.slot-name:hover{border-bottom-color:var(--accent);color:var(--accent)}.slot-name-input{color:#243247;border:1px solid var(--accent);box-sizing:border-box;background:#fff;border-radius:4px;outline:none;width:100%;min-width:0;padding:2px 6px;font-size:12px;font-weight:800}.slot-delete-button{width:20px;height:20px;color:var(--muted);cursor:pointer;background:0 0;border:none;border-radius:4px;flex-shrink:0;justify-content:center;align-items:center;padding:0;font-size:14px;font-weight:900;line-height:1;display:flex}.slot-delete-button:hover{color:#dc2626;background:#fee2e2}.slot-item-url{background:#fff;border-radius:4px;justify-content:space-between;align-items:center;gap:6px;padding:6px 8px;transition:background .15s;display:flex}.slot-item-url:hover{background:#f0f4ff}.slot-item-url:active{background:#e8eeff}.slot-item-url code{color:var(--accent);text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:11px;font-weight:800;overflow:hidden}.slot-copy-button{color:var(--muted);cursor:pointer;background:#fff;border:1px solid #d9e0ee;border-radius:4px;flex-shrink:0;padding:2px 8px;font-size:10px;font-weight:800;line-height:1.4;transition:all .15s}.slot-copy-button:hover{border-color:var(--accent);color:var(--accent);background:#f0f4ff}.slot-copy-button:active{transform:scale(.95)}.slot-template-badge{color:var(--accent);text-overflow:ellipsis;white-space:nowrap;background:#e8eeff;border-radius:3px;flex-shrink:0;max-width:120px;padding:2px 6px;font-size:10px;font-weight:800;overflow:hidden}.template-library{flex-direction:column;gap:16px;margin:0;display:flex}.template-section{flex-direction:column;gap:8px;display:flex}.template-section-header{justify-content:space-between;align-items:center;gap:8px;padding:6px 4px;display:flex}.template-section-title{color:#39485f;font-size:13px;font-weight:900}.template-section-count{color:var(--muted);font-size:12px;font-weight:700}.template-list{flex-direction:column;gap:6px;display:flex}.template-card{background:#f8fafc;border:1px solid #d9e0ee;border-radius:8px;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;padding:8px;transition:all .15s;display:grid}.template-card:hover{background:#f1f5f9;border-color:#c7d2e2;transform:translate(2px)}.template-card.active{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent);background:#eaf1ff}.template-card-button{color:#243247;cursor:pointer;text-align:left;background:0 0;border:0;border-radius:6px;align-items:center;gap:8px;min-width:0;padding:6px 8px;display:flex}.template-card-button:hover{background:#2764f60f}.template-card-content{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.template-card-name{text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:900;line-height:1.3;overflow:hidden}.template-card-desc{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:700;line-height:1.3;overflow:hidden}.template-card-badge{min-height:24px;color:var(--accent);white-space:nowrap;background:#edf4ff;border-radius:5px;align-items:center;padding:0 8px;font-size:11px;font-weight:900;display:inline-flex}.template-card-delete{min-width:28px;min-height:28px;color:var(--danger);cursor:pointer;background:#fff1f0;border:0;border-radius:6px;justify-content:center;align-items:center;padding:0;font-size:18px;font-weight:900;line-height:1;transition:all .15s;display:inline-flex}.template-card-delete:hover{background:#ffe3e0;transform:scale(1.05)}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.stage-panel{flex-direction:column;display:flex;overflow:hidden}.stage-header{color:var(--muted);border-bottom:1px solid var(--panel-border);justify-content:space-between;gap:10px;padding:10px 14px;font-size:13px;font-weight:700;display:flex}.stage-viewport{background:linear-gradient(45deg,#dfe5ef 25%,#0000 25%) 0 0/24px 24px,linear-gradient(45deg,#0000 75%,#dfe5ef 75%) 0 0/24px 24px,#eef2f7;flex:1;place-items:center;min-height:0;padding:18px;display:grid;overflow:auto}.scene-preview{aspect-ratio:941/1672;border-radius:4px;width:min(100%,56.3vh - 84.45px);max-width:560px;height:auto;display:block;box-shadow:0 18px 50px #0f172a42}.scene-element{cursor:move}.scene-element.locked{cursor:default}.selection-handle{cursor:nwse-resize}.field,.color-field{flex-direction:column;gap:6px;display:flex}.field span{color:#39485f;font-size:12px;font-weight:900}.field input,.field textarea,.field select{color:#142033;background:#fff;border:1px solid #cfd8e8;border-radius:6px;outline:none;width:100%;min-height:36px;padding:8px 9px}.field textarea{resize:vertical;line-height:1.45}.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--accent);box-shadow:0 0 0 3px #2764f624}.checkbox-field{grid-template-columns:1fr auto;align-items:center;gap:10px;display:grid}.checkbox-field input{width:20px;min-height:20px}.field-help{color:var(--muted);font-size:12px;line-height:1.5}.field-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.color-field>div{grid-template-columns:44px 1fr;gap:8px;display:grid}.color-field input[type=color]{padding:3px}.opacity-field>div{grid-template-columns:1fr 72px;align-items:center;gap:8px;display:grid}.opacity-field input[type=range]{padding:0}.empty-state{color:var(--muted);font-size:14px;line-height:1.6}.live-shell{background:0 0;place-items:center;width:100vw;height:100vh;display:grid;overflow:hidden}.live-canvas{width:100vw;height:100vh;display:block}@media (max-width:1180px){.editor-grid{grid-template-columns:minmax(220px,280px) minmax(360px,1fr)}.right-panel{grid-column:1/-1}}@media (max-width:820px){.editor-shell{padding:10px}.editor-toolbar{flex-direction:column;align-items:flex-start}.toolbar-actions{justify-content:flex-start}.template-save-panel{grid-template-columns:1fr;align-items:stretch}.editor-grid{grid-template-columns:1fr}.stage-viewport{min-height:640px}}
