:root{--bg:#0f1012;--surface:#17181b;--surface-2:#1e2024;--surface-3:#26282d;--border:#2a2d33;--border-strong:#3a3e46;--text:#e6e7ea;--text-muted:#9aa0a8;--text-faint:#6b7178;--accent:#6366f1;--accent-hover:#7c7ff2;--accent-soft:#6366f129;--danger:#f87171;--danger-border:#5c2b2b;--danger-bg:#2a1718;--dot:#ffffff0d;--shadow:#00000073;--radius:8px;--radius-sm:6px;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;color:var(--text);background-color:var(--bg);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}:root[data-theme=light]{--bg:#f3f4f6;--surface:#fff;--surface-2:#f3f4f6;--surface-3:#e8eaee;--border:#e3e5ea;--border-strong:#cfd2d9;--text:#1a1d21;--text-muted:#5b626d;--text-faint:#9aa0aa;--accent:#6366f1;--accent-hover:#4f46e5;--accent-soft:#6366f124;--danger:#dc2626;--danger-border:#f2c7c7;--danger-bg:#fdecec;--dot:#00000012;--shadow:#0f172a29;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}*{box-sizing:border-box}body{-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;min-height:100vh;margin:0}button:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.app{flex-direction:column;min-height:100vh;display:flex}.app-header{background:var(--surface);border-bottom:1px solid var(--border);align-items:center;gap:1.25rem;padding:.6rem 1rem;display:flex}.app-brand{letter-spacing:-.01em;font-size:.95rem;font-weight:650}.app-header-end{align-items:center;gap:.2rem;margin-left:auto;display:flex}.app-header,.panel,.app-main,.tool-btn,.ghost-button,.danger-button,.field input,.color-control,.zoom-controls{transition:background-color .25s,border-color .25s,color .25s}.toolbar{align-items:center;gap:.35rem;display:flex}.toolbar-group{gap:.2rem;display:flex}.toolbar-divider{background:var(--border);width:1px;height:20px;margin:0 .4rem}.tool-btn{width:34px;height:34px;color:var(--text-muted);border-radius:var(--radius-sm);cursor:pointer;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;transition:background .14s,color .14s,border-color .14s,transform 80ms;display:inline-flex;position:relative}.tool-btn:hover{color:var(--text);background:var(--surface-3)}.tool-btn:active{transform:scale(.94)}.tool-btn:focus-visible{border-color:var(--accent);outline:none}.tool-btn:disabled{opacity:.35;cursor:not-allowed}.tool-btn:disabled:hover{color:var(--text-muted);background:0 0}.tool-btn[data-tooltip]:after{content:attr(data-tooltip);white-space:nowrap;color:var(--text);background:var(--surface-3);border:1px solid var(--border);box-shadow:0 6px 18px var(--shadow);opacity:0;pointer-events:none;z-index:10;border-radius:6px;padding:.3rem .5rem;font-size:.72rem;transition:opacity .14s,transform .14s;position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%)translateY(-2px)}.tool-btn[data-tooltip]:hover:not(:disabled):after{opacity:1;transform:translate(-50%)translateY(0)}.app-body{flex:1;min-height:0;display:flex}.app-main{background-color:var(--bg);background-image:radial-gradient(var(--dot) 1.5px, transparent 1.5px);background-size:22px 22px;flex:1;min-width:0;position:relative;overflow:hidden}.editor-canvas{touch-action:none;width:100%;height:100%;display:block}.empty-state{text-align:center;pointer-events:none;flex-direction:column;justify-content:center;align-items:center;gap:.35rem;display:flex;position:absolute;inset:0}.empty-title{color:var(--text);margin:0;font-size:1.05rem;font-weight:600}.empty-sub{color:var(--text-muted);margin:0;font-size:.85rem}.zoom-controls{background:color-mix(in srgb, var(--surface) 88%, transparent);border:1px solid var(--border);box-shadow:0 6px 20px var(--shadow);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);border-radius:999px;align-items:center;gap:.15rem;padding:.2rem;display:flex;position:absolute;bottom:1rem;right:1rem}.zoom-btn,.zoom-pct{height:28px;color:var(--text-muted);cursor:pointer;background:0 0;border:none;border-radius:999px;justify-content:center;align-items:center;transition:background .14s,color .14s;display:inline-flex}.zoom-btn{width:28px}.zoom-pct{font-variant-numeric:tabular-nums;min-width:48px;color:var(--text);padding:0 .4rem;font-size:.78rem}.zoom-btn:hover,.zoom-pct:hover{background:var(--surface-3);color:var(--text)}.modal-backdrop{z-index:50;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#00000073;justify-content:center;align-items:center;padding:1rem;display:flex;position:fixed;inset:0}.modal{background:var(--surface);border:1px solid var(--border);width:min(420px,100%);max-height:85vh;box-shadow:0 20px 60px var(--shadow);border-radius:12px;padding:1.25rem;overflow-y:auto}.modal-header{justify-content:space-between;align-items:center;margin-bottom:1rem;display:flex}.modal-header h2{margin:0;font-size:1rem;font-weight:600}.shortcut-list{flex-direction:column;gap:.1rem;margin:0;display:flex}.shortcut-row{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;gap:1rem;padding:.4rem 0;display:flex}.shortcut-row:last-child{border-bottom:none}.shortcut-row dt{color:var(--text);font-size:.85rem}.shortcut-row dd{margin:0}.shortcut-row kbd{color:var(--text-muted);background:var(--surface-2);border:1px solid var(--border);white-space:nowrap;border-radius:5px;padding:.15rem .45rem;font-family:inherit;font-size:.72rem;display:inline-block}.panel{background:var(--surface);border-left:1px solid var(--border);flex-direction:column;flex-shrink:0;gap:1.25rem;width:248px;padding:1rem;display:flex;overflow-y:auto}.icon-row{gap:.35rem;display:flex}.icon-action{width:34px;height:32px;color:var(--text-muted);background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;justify-content:center;align-items:center;transition:background .14s,color .14s,border-color .14s;display:inline-flex}.icon-action:hover{color:var(--text);background:var(--surface-3);border-color:var(--border-strong)}.icon-action svg{width:16px;height:16px}.layers{flex-direction:column;gap:.5rem;display:flex}.layer-list{flex-direction:column;gap:.1rem;margin:0;padding:0;list-style:none;display:flex}.layer-row{border-radius:var(--radius-sm);align-items:center;gap:.15rem;display:flex}.layer-row.selected{background:var(--accent-soft)}.layer-name{text-align:left;min-width:0;color:var(--text);border-radius:var(--radius-sm);cursor:pointer;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:none;flex:1;padding:.35rem .45rem;font-size:.82rem;overflow:hidden}.layer-name:hover{background:var(--surface-3)}.layer-icon{width:26px;height:26px;color:var(--text-faint);border-radius:var(--radius-sm);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;transition:color .14s,background .14s;display:inline-flex}.layer-icon:hover{color:var(--text);background:var(--surface-3)}.layer-icon[aria-pressed=true]{color:var(--accent)}.layer-icon svg{width:15px;height:15px}.properties{flex-direction:column;gap:1rem;display:flex}.panel-section-title{text-transform:uppercase;letter-spacing:.08em;color:var(--text-faint);font-size:.7rem;font-weight:600}.panel-hint{color:var(--text-faint);margin:0;font-size:.8rem}.field-grid{grid-template-columns:1fr 1fr;gap:.6rem;display:grid}.field{flex-direction:column;gap:.3rem;display:flex}.field-label{color:var(--text-muted);font-size:.68rem;font-weight:500}.field input[type=number],.field input[type=text]{font-variant-numeric:tabular-nums;width:100%;color:var(--text);background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:.4rem .55rem;font-size:.85rem;transition:border-color .14s,box-shadow .14s}.field input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);outline:none}.toggle-button{color:var(--text-muted);background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;padding:.4rem .55rem;font-size:.82rem;transition:background .14s,border-color .14s,color .14s}.toggle-button[aria-pressed=true]{color:var(--accent);border-color:var(--accent);background:var(--accent-soft);font-weight:600}.text-editor{white-space:pre;caret-color:var(--accent);background:0 0;border:none;outline:none;margin:0;padding:0;font-family:system-ui,sans-serif;line-height:1.3;position:absolute;overflow:hidden}.color-control{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);align-items:center;gap:.55rem;padding:.3rem .4rem;display:flex}.color-control input[type=color]{cursor:pointer;background:0 0;border:none;border-radius:5px;width:28px;height:24px;padding:0}.color-control input[type=color]::-webkit-color-swatch-wrapper{padding:0}.color-control input[type=color]::-webkit-color-swatch{border:1px solid var(--border-strong);border-radius:4px}.color-value{font-variant-numeric:tabular-nums;color:var(--text-muted);font-size:.8rem}.preset-list{flex-wrap:wrap;gap:.35rem;display:flex}.preset-button{color:var(--text-muted);background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;padding:.3rem .5rem;font-size:.75rem;transition:background .14s,border-color .14s,color .14s}.preset-button:hover{color:var(--text);background:var(--surface-3);border-color:var(--border-strong)}.preset-button[aria-pressed=true]{color:var(--accent);border-color:var(--accent);background:var(--accent-soft)}.panel-actions{gap:.5rem;display:flex}.ghost-button,.danger-button{border-radius:var(--radius-sm);cursor:pointer;flex:1;justify-content:center;align-items:center;gap:.35rem;padding:.5rem .6rem;font-size:.82rem;font-weight:500;transition:background .14s,border-color .14s,transform 80ms;display:inline-flex}.ghost-button svg,.danger-button svg{width:15px;height:15px}.ghost-button{color:var(--text);background:var(--surface-2);border:1px solid var(--border)}.ghost-button:hover{background:var(--surface-3);border-color:var(--border-strong)}.danger-button{color:var(--danger);background:var(--danger-bg);border:1px solid var(--danger-border)}.danger-button:hover{background:color-mix(in srgb, var(--danger-bg) 70%, var(--danger) 12%)}.ghost-button:active,.danger-button:active{transform:scale(.98)}@media (width<=760px){.panel{width:200px}.app-brand{display:none}.app-header{gap:.75rem}}
