:root{
  --bg:#090a12;
  --panel:#121520;
  --panel2:#0d1018;
  --border:#2a3040;
  --text:#f7f7fb;
  --muted:#9aa5b7;
  --accent:#f2bd56;
  --accent2:#ef7ea8;
  --shadow:0 26px 60px rgba(0,0,0,.38);
}
*{box-sizing:border-box}
html{min-height:100%;background:radial-gradient(circle at top,#17142b 0%,var(--bg) 48%)}
body{margin:0;min-height:100vh;overflow-x:hidden;overflow-y:auto;color:var(--text);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.app-shell{display:grid;grid-template-columns:minmax(350px,400px) minmax(0,1fr);gap:18px;align-items:start;min-height:100vh;padding:18px}
.sidebar,.workspace{background:linear-gradient(180deg,rgba(20,22,33,.98),rgba(13,16,24,.98));border:1px solid var(--border);border-radius:22px;box-shadow:var(--shadow)}
.sidebar{padding:20px}
.workspace{padding:18px;min-width:0}
.brand{display:flex;gap:14px;align-items:center;margin-bottom:22px}
.brand-mark{width:56px;height:56px;border-radius:18px;display:grid;place-items:center;flex:0 0 auto;font-size:28px;background:linear-gradient(135deg,#f3cf72,#f07da7);box-shadow:0 12px 28px rgba(240,125,167,.18)}
.brand h1,.topbar h2{margin:0;font-size:22px}.brand p,.topbar p,.help{margin:5px 0 0;color:var(--muted);font-size:13px;line-height:1.45}
.panel-section{padding:16px;margin-bottom:14px;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.065);border-radius:16px}
.panel-section.compact{padding:14px 16px}.panel-section h2{margin:0 0 14px;font-size:15px}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:12px}.full-span{grid-column:1/-1}
label{display:grid;gap:8px;color:#e9ecf3;font-size:13px;margin-bottom:12px}
input[type="text"],select,button{width:100%;border-radius:12px;border:1px solid #363e50;background:#0c0f17;color:var(--text);padding:10px 12px;font-size:13px}
input[type="text"]:focus,select:focus{outline:2px solid rgba(242,189,86,.25);border-color:#8a7042}
button{cursor:pointer;transition:.2s ease}button:hover{transform:translateY(-1px);border-color:#58647c}
button.primary{background:linear-gradient(135deg,#f4c55f,#ef7fa8);border-color:transparent;color:#1d1520;font-weight:800}
button.active{background:rgba(242,189,86,.16);border-color:rgba(242,189,86,.62)}
input[type="range"]{width:100%;appearance:none;height:6px;border-radius:999px;background:#293145}
input[type="range"]::-webkit-slider-thumb{appearance:none;width:18px;height:18px;border-radius:50%;background:linear-gradient(135deg,#f4c55f,#ef7fa8);border:2px solid #fff}
.inline-check{display:flex;align-items:center;gap:10px;background:#0d1119;border:1px solid #2c3444;padding:10px 12px;border-radius:12px}.inline-check input{width:16px;height:16px}
.preset-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.file-upload{background:#0d1119;border:1px dashed #454f65;border-radius:14px;padding:12px}.file-upload input[type="file"]{max-width:100%;font-size:12px;color:var(--muted)}
.actions{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.status{min-height:42px;background:#0d1220;border:1px solid #2b3548;border-radius:12px;padding:10px 12px;color:#eef4ff;font-size:13px;display:flex;align-items:center}
.topbar{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:14px}
.pill-row{display:flex;gap:9px;flex-wrap:wrap}.pill{padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.09);font-size:12px;color:#dfe7f4}.loop-pill{color:#f4d584;border-color:rgba(244,213,132,.24)}
.canvas-wrap{display:grid;place-items:center;min-height:360px;padding:20px;border-radius:18px;border:1px solid rgba(255,255,255,.06);background:radial-gradient(circle at top,rgba(240,125,167,.075),transparent 38%),linear-gradient(180deg,rgba(255,255,255,.025),rgba(255,255,255,.008))}
canvas{display:block;width:100%;height:auto;max-width:100%;border-radius:18px;background:#0a0c16;box-shadow:0 22px 50px rgba(0,0,0,.48)}
@media(min-width:1181px){.workspace{position:sticky;top:18px}}
@media(max-width:1180px){.app-shell{grid-template-columns:1fr}.workspace{position:static}}
@media(max-width:640px){.app-shell{padding:10px}.sidebar,.workspace{border-radius:14px}.two-col,.actions,.preset-grid{grid-template-columns:1fr}}