:root{color-scheme:dark;--bg:#0d0f13;--panel:#151820;--line:#2b303b;--muted:#9ba3b0;--text:#f5f7fa}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,.button,select{font:inherit}.topbar{min-height:64px;display:flex;align-items:center;gap:18px;justify-content:space-between;padding:10px 16px;border-bottom:1px solid var(--line);background:#10131a;position:sticky;top:0;z-index:20}.brand{font-weight:800;color:white;text-decoration:none}.top-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.button,.effect-group button,.preset-grid button{border:1px solid #343b48;background:#1b2029;color:white;border-radius:9px;padding:9px 12px;cursor:pointer}.button:disabled{opacity:.4;cursor:not-allowed}.button.primary{background:#253f72}.button.success{background:#1d5a43}
.workspace{display:grid;grid-template-columns:285px minmax(340px,1fr) 320px;height:calc(100vh - 65px)}.panel{background:var(--panel);padding:16px;overflow:auto}.effects-panel{border-right:1px solid var(--line)}.stack-panel{border-left:1px solid var(--line)}
.effect-group{padding:14px 0;border-top:1px solid var(--line)}.effect-group h3{margin:0 0 9px;font-size:.95rem}.effect-group>button{display:block;width:100%;margin:6px 0;text-align:left}.preset-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}.muted{color:var(--muted);font-size:.86rem;line-height:1.4}
.preview-panel{display:flex;flex-direction:column;min-width:0;min-height:0}.canvas-wrap{position:relative;flex:1;min-height:320px;display:flex;align-items:center;justify-content:center;overflow:auto;background:repeating-conic-gradient(#15181e 0 25%,#1c2027 0 50%) 50%/24px 24px;padding:20px}canvas{max-width:100%;max-height:100%;box-shadow:0 10px 40px #0008}.canvas-wrap.drag{outline:3px dashed #6fa3ff;outline-offset:-10px}#emptyState{position:absolute;display:flex;flex-direction:column;gap:8px;align-items:center;color:#c5cbd3;pointer-events:none}.statusbar{display:flex;justify-content:space-between;padding:9px 14px;background:#11151b;border-top:1px solid var(--line);font-size:.8rem;color:var(--muted)}
.stack-heading{display:flex;justify-content:space-between;align-items:center}.text-button{border:0;background:transparent;color:#9dc0ff;cursor:pointer}.stack-list{display:flex;flex-direction:column;gap:8px}.stack-item{border:1px solid var(--line);border-radius:10px;background:#1a1f27;padding:9px}.stack-row{display:flex;gap:7px;align-items:center}.stack-name{flex:1;font-weight:650;font-size:.9rem}.icon-btn{border:0;background:#252b35;color:white;border-radius:6px;padding:5px 7px;cursor:pointer}.stack-item.selected{outline:1px solid #6fa3ff}.controls-panel,.export-panel{margin-top:18px;border-top:1px solid var(--line);padding-top:14px}.hidden{display:none}.control{margin:11px 0}.control label{display:flex;justify-content:space-between;font-size:.85rem}.control input[type=range]{width:100%}.export-panel label{display:flex;justify-content:space-between;gap:10px;margin:10px 0}.export-panel select{background:#1b2029;color:white;border:1px solid #343b48;border-radius:7px;padding:6px}.color-readout{display:flex;gap:8px;align-items:center;margin:8px 0}.color-readout span:first-child{width:22px;height:22px;border:1px solid #666;border-radius:50%;background:#000}.recipe-chip{display:flex;gap:6px;align-items:center;margin:7px 0}.recipe-chip button:first-child{flex:1}.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#202630;border:1px solid #394252;padding:10px 16px;border-radius:10px;opacity:0;transition:.2s;pointer-events:none}.toast.show{opacity:1}
@media(max-width:960px){.workspace{grid-template-columns:1fr;height:auto}.preview-panel{order:-1;min-height:62vh}.effects-panel,.stack-panel{border:0;border-bottom:1px solid var(--line)}.topbar{position:static}.canvas-wrap{min-height:55vh}}
