:root{--bg:#0c090a;--panel:#171314;--panel2:#211a1c;--line:#382b2f;--text:#f8f5f5;--muted:#a09296;--orange:#e60023;--orange2:#ff344d;--danger:#ff5252}
*{box-sizing:border-box}html,body{height:100%;margin:0}body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;background:var(--bg);color:var(--text);overflow:hidden}
button,input,textarea,select{font:inherit}.topbar{height:68px;display:flex;align-items:center;justify-content:space-between;padding:0 22px;border-bottom:1px solid var(--line);background:#111318}.brand{display:flex;align-items:center;gap:12px}.brand-mark{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:linear-gradient(135deg,var(--orange2),var(--orange));font-weight:900;color:#16110d}.brand div{display:flex;flex-direction:column}.brand strong{font-size:16px}.brand small{color:var(--muted);font-size:11px;margin-top:2px}.top-actions{display:flex;gap:8px;align-items:center}.button,.icon-btn,.mini-btn,.wide-btn,.danger-btn{border:0;cursor:pointer;color:var(--text)}.button{height:38px;padding:0 15px;border-radius:9px;font-weight:700}.button.ghost,.icon-btn{background:var(--panel2);border:1px solid var(--line)}.button.primary{background:linear-gradient(135deg,var(--orange2),var(--orange));color:#1c1007}.icon-btn{width:38px;height:38px;border-radius:9px;font-size:20px}.workspace{display:grid;grid-template-columns:268px 1fr 286px;height:calc(100vh - 68px)}.panel{background:var(--panel);overflow-y:auto;padding:18px;border-color:var(--line);border-style:solid}.left-panel{border-width:0 1px 0 0}.right-panel{border-width:0 0 0 1px}.section-title{display:flex;justify-content:space-between;align-items:center;font-weight:800;font-size:13px;margin-bottom:14px;text-transform:uppercase;letter-spacing:.08em}.mini-btn{background:#2a2d34;border-radius:7px;padding:6px 9px;font-size:11px}.add-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:15px}.upload-card{min-height:72px;border:1px dashed #3a3f49;border-radius:10px;background:#1b1e24;color:var(--muted);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;cursor:pointer;text-align:center;padding:8px;font-size:11px}.upload-card:hover{border-color:var(--orange);color:#fff}.upload-card span{font-size:20px;color:var(--orange2)}input[type=file]{display:none}.layer-list{display:flex;flex-direction:column;gap:6px}.layer-item{display:grid;grid-template-columns:28px 1fr 26px;align-items:center;gap:8px;padding:8px;border:1px solid transparent;border-radius:9px;background:#1a1d22;cursor:pointer}.layer-item:hover{background:#20242a}.layer-item.selected{border-color:var(--orange);background:#24211f}.layer-icon{width:28px;height:28px;border-radius:7px;display:grid;place-items:center;background:#292d34;color:var(--orange2);font-weight:900}.layer-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;font-weight:650}.visibility{background:transparent;color:var(--muted);border:0;cursor:pointer;font-size:14px}.project-section{margin-top:24px;padding-top:18px;border-top:1px solid var(--line)}.wide-btn,.danger-btn{display:flex;align-items:center;justify-content:center;width:100%;min-height:38px;border-radius:8px;background:#22252b;border:1px solid #30343c;margin-top:7px;font-size:12px}.file-btn{cursor:pointer}.danger-btn{background:#2b1c1e;border-color:#4a252a;color:#ff8585;margin-top:14px}.stage-wrap{min-width:0;display:flex;flex-direction:column;background:#0b0c0f}.stage-toolbar{height:50px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid #202329}.size-control{display:flex;gap:9px;font-size:12px;color:var(--muted)}.size-control b{color:#d9dbe0}.zoom-control{display:flex;align-items:center;background:#17191e;border:1px solid var(--line);border-radius:8px;overflow:hidden}.zoom-control button{width:32px;height:30px;border:0;background:transparent;color:#fff;cursor:pointer}.zoom-control span{font-size:11px;color:var(--muted);min-width:48px;text-align:center}.canvas-scroller{flex:1;min-height:0;display:grid;place-items:center;overflow:auto;padding:28px;background-image:radial-gradient(#252932 1px,transparent 1px);background-size:20px 20px}.canvas-shell{box-shadow:0 25px 70px #000b;line-height:0;transform-origin:center}canvas{display:block;background:#111;max-width:none;touch-action:none}.stage-hint{text-align:center;color:#777e8a;font-size:11px;margin:0;padding:10px;border-top:1px solid #202329}.pill{font-size:9px;color:var(--orange2);background:#2b211a;padding:5px 7px;border-radius:999px}.empty-state{color:var(--muted);font-size:12px;line-height:1.6;padding:18px 4px}.hidden{display:none!important}.properties{display:flex;flex-direction:column;gap:11px}.properties label{display:flex;flex-direction:column;gap:6px;color:#aeb3bd;font-size:11px}.properties input[type=text],.properties input[type=number],.properties textarea,.properties select{width:100%;background:#0f1115;color:#fff;border:1px solid #30343c;border-radius:7px;padding:8px;outline:none}.properties input:focus,.properties textarea:focus,.properties select:focus{border-color:var(--orange)}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:8px}.property-group{display:flex;flex-direction:column;gap:10px;padding-bottom:11px;border-bottom:1px solid var(--line)}.check-row{display:flex;gap:18px}.check-row label{flex-direction:row;align-items:center}.properties input[type=color]{width:100%;height:34px;padding:2px;background:#111;border:1px solid #30343c;border-radius:7px}.properties input[type=range]{accent-color:var(--orange);width:100%}.button-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.toast{position:fixed;left:50%;bottom:22px;transform:translate(-50%,20px);background:#f2f2ed;color:#181818;padding:11px 16px;border-radius:9px;font-size:12px;font-weight:700;opacity:0;pointer-events:none;transition:.25s}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:980px){.workspace{grid-template-columns:220px 1fr}.right-panel{position:fixed;right:0;top:68px;bottom:0;width:270px;z-index:4;box-shadow:-10px 0 30px #0008}.stage-wrap{padding-right:270px}.brand small{display:none}}
@media(max-width:720px){body{overflow:auto}.topbar{position:sticky;top:0;z-index:10}.button.ghost,.icon-btn{display:none}.workspace{display:flex;flex-direction:column;height:auto}.left-panel,.right-panel{position:static;width:auto;border:0}.stage-wrap{order:-1;padding:0;height:72vh}.left-panel{border-top:1px solid var(--line)}.canvas-scroller{place-items:start center}.right-panel{box-shadow:none}.stage-hint{display:none}}
.mini-actions{display:flex;gap:5px}
.properties input:disabled,.properties button:disabled{opacity:.42;cursor:not-allowed}
.generator-panel{padding-bottom:18px;margin-bottom:18px;border-bottom:1px solid var(--line)}.generator-panel>label,.generator-grid label{display:flex;flex-direction:column;gap:5px;color:#aeb3bd;font-size:10px}.generator-panel select,.generator-panel input{width:100%;background:#0f1115;color:#fff;border:1px solid #30343c;border-radius:7px;padding:7px;outline:none}.generator-panel select:focus,.generator-panel input:focus{border-color:var(--orange)}.generator-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}.generator-panel .wide-btn{margin-top:9px}
.amount-hint{margin-top:9px;padding:8px 9px;border-radius:7px;background:#251c0d;border:1px solid #5c4310;color:#ffe600;font-size:10px;font-weight:800;line-height:1.35;text-align:center}
.render-mode{margin:0;overflow:hidden;background:#000}.render-mode .topbar,.render-mode .left-panel,.render-mode .right-panel,.render-mode .stage-toolbar,.render-mode .stage-hint{display:none!important}.render-mode .workspace,.render-mode .stage-wrap,.render-mode .canvas-scroller{display:block;width:100vw;height:100vh;padding:0;overflow:hidden;background:none}.render-mode .canvas-shell{box-shadow:none}
