:root{--bg: #F2EDE6;--bg-2: #EAE3D9;--bg-3: #C4B8A8;--surface: #FFFFFF;--text: #1C1612;--muted: #888076;--accent: #B5622A;--accent-dk: #9A5022;--border: rgba(28, 22, 18, .12);--radius: 10px;--radius-sm: 6px}*{box-sizing:border-box}html,body{margin:0;height:100%;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.app{display:flex;flex-direction:column;height:100vh}.topbar{display:flex;align-items:center;padding:14px 24px;border-bottom:1px solid var(--border);background:var(--bg)}.topbar h1{font-size:17px;font-weight:700;letter-spacing:-.02em;margin:0}.brand-sub{display:block;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--accent);margin-top:2px}.toolbar{display:flex;align-items:center;gap:4px;padding:8px 24px;border-bottom:1px solid var(--border);background:var(--bg-2)}.toolbar-divider{width:1px;height:20px;background:var(--border);margin:0 6px}.toolbar-spacer{flex:1}.icon-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:transparent;color:var(--muted);border:1px solid transparent;border-radius:var(--radius-sm);cursor:pointer;transition:background .12s ease,color .12s ease,border-color .12s ease}.icon-btn svg{width:17px;height:17px}.icon-btn:hover{background:var(--surface);color:var(--text);border-color:var(--border)}.icon-btn:disabled{opacity:.35;cursor:not-allowed}.icon-btn:disabled:hover{background:transparent;color:var(--muted);border-color:transparent}.icon-btn-primary{color:var(--accent)}.icon-btn-primary:hover{background:#b5622a1f;color:var(--accent);border-color:var(--accent)}.btn{background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:var(--radius-sm);padding:9px 16px;font-size:13px;font-weight:500;cursor:pointer;transition:background .15s ease,border-color .15s ease}.btn:hover{border-color:var(--bg-3);background:var(--bg-2)}.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary:hover{background:var(--accent-dk);border-color:var(--accent-dk)}.btn-block{width:100%;text-align:center}.main{flex:1;display:flex;overflow:hidden;min-height:0}.sidebar{width:300px;flex-shrink:0;background:var(--bg);border-right:1px solid var(--border);padding:16px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--bg-3) transparent}.sidebar::-webkit-scrollbar{width:8px}.sidebar::-webkit-scrollbar-thumb{background:var(--bg-3);border-radius:4px}.section{margin-bottom:12px}.section summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;padding:10px 12px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--text);-webkit-user-select:none;user-select:none;border-radius:var(--radius-sm)}.section summary::-webkit-details-marker{display:none}.summary-label{display:flex;align-items:center;gap:9px}.summary-icon{width:15px;height:15px;flex-shrink:0;color:var(--muted)}.section summary:after{content:"";width:7px;height:7px;flex-shrink:0;border-right:1.6px solid var(--muted);border-bottom:1.6px solid var(--muted);transform:rotate(-45deg);transition:transform .15s ease;margin-left:8px}.section[open] summary:after{transform:rotate(45deg)}.section summary:hover{background:var(--bg-2)}.section summary:hover .summary-icon{color:var(--accent)}.section-body{background:var(--bg-2);border:1px solid var(--border);border-radius:var(--radius);margin-top:6px;padding:14px}.hint{font-size:12px;color:var(--muted);margin:0;line-height:1.5}.field{margin-bottom:14px}.field:last-child{margin-bottom:0}.field label{display:block;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:6px}.field-row{display:flex;gap:10px;margin-bottom:14px}.field-row:last-child{margin-bottom:0}.field-row .field{flex:1;min-width:0;margin-bottom:0}.field-size{flex:0 0 84px}.checkbox-row{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text);cursor:pointer;margin-bottom:14px}.checkbox-row:last-child{margin-bottom:0}.checkbox-row input{cursor:pointer;accent-color:var(--accent)}.field select,.field input[type=text],.field input[type=file],.field textarea{width:100%;background:var(--surface);border:1px solid var(--border);color:var(--text);border-radius:var(--radius-sm);padding:8px 10px;font-size:13px;font-family:inherit}.field select:focus,.field input[type=text]:focus,.field textarea:focus{outline:none;border-color:var(--accent)}.field textarea{resize:vertical;font-family:inherit}.field input[type=color]{display:block}.slider-with-number{display:flex;align-items:center;gap:10px}.slider-with-number input[type=range]{flex:1;accent-color:var(--accent)}.slider-with-number input[type=number]{width:56px;flex-shrink:0;background:var(--surface);border:1px solid var(--border);color:var(--text);border-radius:var(--radius-sm);padding:6px 7px;font-size:13px}.color-field{position:relative;display:inline-block}.color-field-native{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.color-field-swatch{width:32px;height:28px;padding:0;border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer}.color-field-swatch:hover{border-color:var(--accent)}.color-popover{position:fixed;z-index:1000;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:12px;width:200px;box-shadow:0 12px 30px #1c16122e}.color-popover-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:10px 0 6px}.color-popover-more{display:block;width:100%;margin-top:10px;background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:var(--radius-sm);padding:6px 0;font-size:12px;cursor:pointer}.color-popover-more:hover{border-color:var(--accent);color:var(--accent)}.segmented{display:flex;border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden}.segmented button{flex:1;background:var(--surface);color:var(--muted);border:none;padding:7px 0;font-size:12px;cursor:pointer;border-right:1px solid var(--border)}.segmented button:last-child{border-right:none}.segmented button.active{background:var(--accent);color:#fff}input[type=color]{width:32px;height:28px;padding:0;border:1px solid var(--border);border-radius:var(--radius-sm);background:none}input[type=range]{width:100%;accent-color:var(--accent)}.hidden{display:none!important}.swatch-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px}.swatch{width:20px;height:20px;border-radius:5px;border:1px solid var(--border);cursor:pointer;padding:0}.swatch:hover{border-color:var(--accent)}.canvas-area{flex:1;display:flex;align-items:center;justify-content:center;overflow:auto;padding:24px;min-width:0;background:var(--bg-2)}.canvas-stage{display:flex;align-items:center;justify-content:center}.canvas-wrap{position:relative;display:inline-block;box-shadow:0 16px 40px #1c161238;line-height:0}#previewCanvas{max-height:calc(100vh - 220px);max-width:100%;display:block}.layer-overlay{position:absolute;top:0;right:0;bottom:0;left:0}.layer-box{position:absolute;border:1px dashed rgba(181,98,42,.45);cursor:move;touch-action:none;transform-origin:50% 50%}.layer-box:hover{border-color:var(--accent)}.layer-box.selected{border:2px solid var(--accent);background:#b5622a14}.resize-handle{position:absolute;width:11px;height:11px;background:var(--accent);border:2px solid #fff;border-radius:3px;touch-action:none}.handle-nw{top:0;left:0;transform:translate(-50%,-50%);cursor:nwse-resize}.handle-se{bottom:0;right:0;transform:translate(50%,50%);cursor:nwse-resize}.handle-ne{top:0;right:0;transform:translate(50%,-50%);cursor:nesw-resize}.handle-sw{bottom:0;left:0;transform:translate(-50%,50%);cursor:nesw-resize}.handle-n{top:0;left:50%;transform:translate(-50%,-50%);cursor:ns-resize}.handle-s{bottom:0;left:50%;transform:translate(-50%,50%);cursor:ns-resize}.handle-e{top:50%;right:0;transform:translate(50%,-50%);cursor:ew-resize}.handle-w{top:50%;left:0;transform:translate(-50%,-50%);cursor:ew-resize}.rotate-handle{position:absolute;top:-28px;left:50%;width:12px;height:12px;background:var(--accent);border:2px solid #fff;border-radius:50%;transform:translate(-50%,-50%);cursor:grab;touch-action:none}.rotate-handle:before{content:"";position:absolute;top:100%;left:50%;width:1px;height:16px;background:#b5622a80;transform:translate(-50%)}.line-body{position:absolute;height:16px;transform-origin:left center;cursor:move;touch-action:none}.line-body:before{content:"";position:absolute;top:50%;left:0;right:0;height:1px;background:#b5622a73;transform:translateY(-50%)}.line-body:hover:before{background:var(--accent)}.line-body.selected:before{height:2px;background:var(--accent)}.line-endpoint{position:absolute;width:13px;height:13px;background:var(--accent);border:2px solid #fff;border-radius:50%;transform:translate(-50%,-50%);cursor:grab;touch-action:none}.layers-panel{width:230px;flex-shrink:0;background:var(--bg);border-left:1px solid var(--border);padding:16px;overflow-y:auto}.layers-panel-header{font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;margin-bottom:10px}.layers-list{display:flex;flex-direction:column;gap:6px}.layer-row{display:flex;align-items:center;gap:8px;padding:8px 10px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;font-size:13px}.layer-row:hover{border-color:var(--bg-3)}.layer-row.selected{border-color:var(--accent);background:#b5622a14}.layer-row-icon{width:15px;height:15px;flex-shrink:0;color:var(--muted)}.layer-row-icon svg{width:100%;height:100%}.layer-row-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layer-row-remove{background:none;border:none;color:var(--muted);cursor:pointer;font-size:14px;line-height:1;padding:2px 4px;flex-shrink:0}.layer-row-remove:hover{color:var(--text)}.slide-strip{flex-shrink:0;border-top:1px solid var(--border);background:var(--bg);padding:12px 16px;overflow-x:auto}.slide-strip-list{display:flex;gap:10px;width:max-content}.slide-strip-thumb{width:56px;height:84px;border:2px solid var(--border);border-radius:var(--radius-sm);overflow:hidden;cursor:pointer;position:relative;background:var(--bg-2);flex-shrink:0}.slide-strip-thumb img{width:100%;height:100%;object-fit:cover}.slide-strip-thumb.active{border-color:var(--accent)}.slide-strip-thumb .remove{position:absolute;top:2px;right:2px;background:#1c161299;color:#fff;border:none;border-radius:3px;width:16px;height:16px;font-size:10px;line-height:1;cursor:pointer}.slide-strip-add{width:56px;height:84px;border:2px dashed var(--border);border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;color:var(--muted);cursor:pointer;font-size:20px;flex-shrink:0}
