*,:before,:after{box-sizing:border-box;margin:0;padding:0}:root{--bg:#0d1117;--surface:#161b22;--border:#30363d;--text:#e6edf3;--secondary:#8b949e;--accent:#1d9bf0;--danger:#f85149;--radius:8px}html,body{background:var(--bg);height:100%;color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}#root{height:100%}.app{flex-direction:column;max-width:1200px;min-height:100%;margin:0 auto;padding:0 24px 40px;display:flex}.header{grid-template-columns:1fr minmax(0,520px) 1fr;align-items:center;gap:20px;margin-bottom:28px;padding:14px 0;display:grid}.header-brand{align-items:center;display:flex}.header-search{min-width:0}.logo{letter-spacing:-.5px;color:var(--text);font-size:24px;font-weight:700}.url-form{display:flex}.url-input{background:var(--surface);border:1px solid var(--border);color:var(--text);border-right:none;border-radius:20px 0 0 20px;outline:none;flex:1;min-width:0;padding:9px 16px;font-size:14px;transition:border-color .15s}.url-input:focus{border-color:var(--accent)}.url-input::placeholder{color:var(--secondary)}.url-button{background:var(--accent);color:#fff;cursor:pointer;white-space:nowrap;border:none;border-radius:0 20px 20px 0;flex-shrink:0;padding:9px 18px;font-size:14px;font-weight:600;transition:opacity .15s}.url-button:disabled{opacity:.5;cursor:not-allowed}.error-banner{border-radius:var(--radius);color:var(--danger);background:#f851491a;border:1px solid #f851494d;align-items:flex-start;gap:10px;max-width:700px;margin-top:16px;padding:12px 16px;font-size:14px;display:flex}.error-icon{flex-shrink:0;margin-top:1px;font-size:16px}.workspace{align-items:flex-start;gap:28px;margin-top:28px;display:flex}.preview-area{flex-direction:column;flex:1;align-items:center;gap:16px;display:flex;position:relative}.preview-wrapper{justify-content:center;width:100%;display:flex}.preview-img{border-radius:12px;max-width:100%;box-shadow:0 8px 32px #00000080}.rendering-overlay{color:var(--secondary);padding:40px;font-size:14px}.header-export{justify-content:flex-end;display:flex}.export-btn-group{display:flex}.export-btn{background:var(--accent);color:#fff;cursor:pointer;white-space:nowrap;border:none;padding:8px 16px;font-size:13px;font-weight:600;transition:opacity .15s}.export-btn:disabled{opacity:.4;cursor:not-allowed}.export-btn:not(:disabled):hover{opacity:.85}.export-btn--download{border-radius:var(--radius) 0 0 var(--radius)}.export-btn--copy{border-radius:0 var(--radius) var(--radius) 0;border-left:1px solid #ffffff40;justify-content:center;align-items:center;padding:8px 12px;display:flex}.export-btn--copy svg{width:15px;height:15px}.sidebar{flex-shrink:0;width:272px}.options-panel{background:var(--surface);border:1px solid var(--border);border-radius:12px;flex-direction:column;display:flex;overflow:hidden}.opt-section{border-bottom:1px solid var(--border)}.opt-section:last-child{border-bottom:none}.opt-section-hdr{width:100%;color:var(--text);cursor:pointer;text-align:left;letter-spacing:.2px;background:0 0;border:none;justify-content:space-between;align-items:center;padding:12px 14px;font-size:13px;font-weight:600;transition:background .1s;display:flex}.opt-section-hdr:hover{background:#ffffff0a}.opt-chevron{color:var(--secondary);font-size:16px;line-height:1;transition:transform .2s;display:inline-block;transform:rotate(90deg)}.opt-chevron.open{transform:rotate(-90deg)}.opt-section-body{flex-direction:column;gap:10px;padding:4px 14px 14px;display:flex}.opt-subsection-label{color:var(--secondary);text-transform:uppercase;letter-spacing:.5px;font-size:11px;font-weight:500}.bg-swatches{grid-template-columns:repeat(3,1fr);gap:6px;display:grid}.bg-swatch{aspect-ratio:3/2;cursor:pointer;border:2px solid #0000;border-radius:8px;outline:none;transition:transform .1s,border-color .15s}.bg-swatch:hover{transform:scale(1.05)}.bg-swatch.active{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.transparent-swatch{background:repeating-conic-gradient(#3a3a3a 0% 25%,#1e1e1e 0% 50%) 0 0/10px 10px}.custom-swatch{background:var(--bg);justify-content:center;align-items:center;display:flex;border-color:var(--border)!important}.custom-swatch.active{border-color:var(--accent)!important}.custom-swatch-icon{color:var(--secondary);font-size:20px;line-height:1}.custom-pickers{background:var(--bg);border:1px solid var(--border);border-radius:8px;flex-direction:column;gap:8px;padding:10px 12px;display:flex}.color-pick-row{align-items:center;gap:8px;font-size:12px;display:flex}.color-pick-label{width:40px;color:var(--secondary);flex-shrink:0;font-size:12px}.color-pick-input{border:1px solid var(--border);cursor:pointer;background:0 0;border-radius:6px;width:32px;height:28px;padding:2px}.to-gradient-btn{border:1px solid var(--border);color:var(--secondary);cursor:pointer;background:0 0;border-radius:6px;flex:1;padding:4px 8px;font-size:11px;transition:border-color .15s,color .15s}.to-gradient-btn:hover{border-color:var(--accent);color:var(--accent)}.opt-field{flex-direction:column;gap:6px;display:flex}.opt-field-label{color:var(--secondary);font-size:12px}.opt-segment{background:var(--bg);border:1px solid var(--border);border-radius:8px;gap:2px;padding:2px;display:flex}.opt-seg-btn{color:var(--secondary);cursor:pointer;white-space:nowrap;background:0 0;border:none;border-radius:6px;flex:1;padding:6px 4px;font-size:12px;font-weight:500;transition:background .15s,color .15s}.opt-seg-btn:hover{color:var(--text)}.opt-seg-btn.active{background:var(--surface);color:var(--text);box-shadow:0 1px 3px #0000004d}.opt-slider-row{flex-direction:column;gap:6px;display:flex}.opt-slider-meta{justify-content:space-between;align-items:baseline;display:flex}.opt-slider-label{color:var(--secondary);font-size:12px}.opt-slider-val{color:var(--secondary);font-variant-numeric:tabular-nums;font-size:11px}.opt-range{width:100%;accent-color:var(--accent)}.opt-toggle{color:var(--text);justify-content:space-between;align-items:center;font-size:13px;display:flex}.opt-switch{background:var(--border);cursor:pointer;border:none;border-radius:10px;flex-shrink:0;width:36px;height:20px;transition:background .2s;position:relative}.opt-switch:after{content:"";background:#fff;border-radius:50%;width:16px;height:16px;transition:transform .2s;position:absolute;top:2px;left:2px}.opt-switch.on{background:var(--accent)}.opt-switch.on:after{transform:translate(16px)}.opt-reset-row{padding:10px 14px}.opt-reset-btn{border:1px solid var(--border);width:100%;color:var(--secondary);cursor:pointer;background:0 0;border-radius:8px;padding:8px;font-size:12px;transition:border-color .15s,color .15s}.opt-reset-btn:hover{border-color:var(--danger);color:var(--danger)}@media (width<=768px){.workspace{flex-direction:column}.sidebar{width:100%}}.popup-app{--popup-bg:#000;--popup-surface:#16181c;--popup-border:#2f3336;--popup-text:#e7e9ea;--popup-secondary:#71767b;background:var(--popup-bg);height:100vh;color:var(--popup-text);flex-direction:column;display:flex;overflow:hidden}.popup-app--light{--popup-bg:#fff;--popup-surface:#f7f9f9;--popup-border:#eff3f4;--popup-text:#0f1419;--popup-secondary:#536471}.popup-preview{flex:1;justify-content:center;align-items:center;min-height:0;padding:16px;display:flex;overflow:hidden}.popup-preview .preview-img{width:auto;max-width:100%;height:auto;max-height:calc(100vh - 104px)}.popup-loading{color:var(--popup-secondary);flex:1;justify-content:center;align-items:center;font-size:14px;display:flex}.popup-actions{border-top:1px solid var(--popup-border);flex-shrink:0;gap:8px;padding:12px 16px;display:flex}.popup-btn{border-radius:var(--radius);cursor:pointer;border:none;flex:1;padding:10px;font-size:14px;font-weight:600;transition:opacity .15s,background .15s,border-color .15s}.popup-btn:disabled{opacity:.4;cursor:not-allowed}.popup-btn--primary{background:var(--accent);color:#fff}.popup-btn--primary:hover:not(:disabled){opacity:.85}.popup-btn--secondary{background:var(--popup-surface);color:var(--popup-text);border:1px solid var(--popup-border)}.popup-app--dark .popup-btn--secondary:hover{background:#ffffff0f;border-color:#ffffff26}.popup-app--light .popup-btn--secondary:hover{background:#0000000a;border-color:#00000026}.popup-btn-group{flex:1;display:flex}.popup-btn-group .popup-btn:first-child{border-radius:var(--radius) 0 0 var(--radius);flex:1}.popup-btn-group .popup-btn--icon{border-radius:0 var(--radius) var(--radius) 0;border-left:1px solid #fff3;flex:none;justify-content:center;align-items:center;width:40px;padding:0;display:flex}.popup-btn--icon svg{width:16px;height:16px}
