:root{--navy:#132c3f;--navy-2:#1b3c53;--accent:#16b8a6;--bg:#eef3f5;--line:#dbe4e8;--muted:#6d7c85;--white:#fff;--shadow:0 18px 50px rgba(20,50,66,.13)}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--navy);background:var(--bg);overflow:hidden}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
.app-shell{height:100%;display:grid;grid-template-rows:68px 1fr}
.topbar{display:flex;align-items:center;justify-content:space-between;padding:0 22px;background:#fff;border-bottom:1px solid var(--line);z-index:5}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--navy);font-size:21px;font-weight:800;letter-spacing:-.7px}
.brand>span:last-child span{color:var(--accent)}.brand small{font-size:12px;color:#81909a;margin-left:2px}
.brand-mark{position:relative;display:block;width:31px;height:31px;border:2px solid var(--navy);border-radius:8px}
.brand-mark i{position:absolute;display:block;background:var(--accent);border-radius:2px}.brand-mark i:nth-child(1){width:7px;height:14px;left:5px;bottom:5px}.brand-mark i:nth-child(2){width:7px;height:20px;left:14px;bottom:5px}.brand-mark i:nth-child(3){width:5px;height:5px;right:-4px;top:-4px;box-shadow:0 0 0 3px white}
.topbar-actions{display:flex;align-items:center;gap:10px}.save-state{font-size:12px;color:#73828a;margin-right:10px}.save-state span{display:inline-block;width:7px;height:7px;background:#39bd83;border-radius:50%;margin-right:5px}
.button{height:38px;border:0;border-radius:8px;padding:0 15px;font-weight:700;color:var(--navy);background:#fff;display:inline-flex;align-items:center;justify-content:center;gap:7px}.button svg{width:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.button.ghost{border:1px solid var(--line)}.button.primary{background:var(--accent);color:#073d39;box-shadow:0 5px 13px rgba(22,184,166,.2)}.button.danger{background:#e95b5b;color:#fff}
.workspace{min-height:0;display:grid;grid-template-columns:316px 1fr}.sidebar{position:relative;background:#fff;border-right:1px solid var(--line);display:flex;min-height:0;flex-direction:column}.sidebar-scroll{overflow:auto;padding-bottom:135px;scrollbar-width:thin;scrollbar-color:#cbd5d9 transparent}
.plan-switch{margin:14px 17px 8px;background:#edf2f4;padding:4px;display:grid;grid-template-columns:1fr 1fr;border-radius:9px}.plan-switch button{border:0;background:transparent;height:32px;border-radius:6px;color:#7a8790;font-size:12px;font-weight:800}.plan-switch button.active{background:#fff;color:var(--navy);box-shadow:0 2px 9px rgba(20,50,66,.09)}.plan-switch span{font-size:8px;background:linear-gradient(135deg,#7755ec,#ad62ee);color:#fff;padding:2px 4px;border-radius:4px;margin-left:3px}
.control-section{padding:12px 17px;border-bottom:1px solid #edf1f3}.section-title{display:flex;align-items:center;justify-content:space-between;font-size:12px;font-weight:850;letter-spacing:.01em;margin-bottom:10px}.section-title small{font-size:9px;color:#94a0a6;font-weight:600}.section-title>b{font-size:8px;background:#8b5ce7;color:#fff;border-radius:4px;padding:2px 5px}.icon-button{border:0;background:none;color:#84929a}.control-content{display:grid;gap:9px}.control-content label,.field-label{font-size:10px;color:#708089;font-weight:700}.control-content input,.control-content textarea,.control-content select,select{width:100%;margin-top:4px;border:1px solid #dce4e7;border-radius:7px;padding:8px 9px;color:#263e4d;background:#fff;outline:none;font-size:11px;resize:vertical}.control-content input:focus,.control-content textarea:focus,select:focus{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent),transparent 84%)}.top-gap{margin-top:4px}
.palette-list{display:flex;gap:7px;align-items:center}.palette,.custom-color{width:31px;height:31px;border:1px solid #dce4e7;background:#fff;border-radius:7px;padding:4px;position:relative}.palette i{display:block;width:100%;height:100%;background:var(--c);border-radius:4px}.palette.active{border-color:var(--navy);box-shadow:0 0 0 1px var(--navy)}.palette b,.custom-color b,.element-grid b{position:absolute;right:-3px;top:-5px;font-size:6px;background:#8b5ce7;color:#fff;padding:1px 3px;border-radius:3px}.custom-color input{position:absolute;opacity:0;width:1px;height:1px}.custom-color span{display:grid;place-items:center;height:100%;font-size:17px;color:#8b5ce7;background:#f2edfc;border-radius:4px}
.element-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.element-grid button{height:56px;border:1px solid #e0e7e9;background:#fff;border-radius:8px;color:#425966;font-size:9px;font-weight:750;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;position:relative;transition:.18s}.element-grid button:hover{border-color:var(--accent);transform:translateY(-1px);box-shadow:0 5px 12px rgba(20,50,66,.08)}.element-grid button>span{font-size:17px;color:var(--accent)}
.block-list{display:grid;gap:5px}.block-item{display:grid;grid-template-columns:18px 1fr 26px;align-items:center;min-height:34px;padding:3px 5px;background:#f7f9fa;border:1px solid #e6ecee;border-radius:6px;font-size:10px;font-weight:700}.block-item[draggable=true]{cursor:grab}.block-item.dragging{opacity:.4}.drag-handle{color:#a1adb3;letter-spacing:-2px}.remove-block{border:0;background:transparent;color:#a2adb2;font-size:15px}.remove-block:hover{color:#db5f5f}
.pro-feature.locked{opacity:.45;filter:saturate(.45)}.pro-feature.locked::after{content:"";position:absolute;inset:0}.pro-settings{position:relative}
.upgrade-card{position:absolute;left:13px;right:13px;bottom:12px;background:linear-gradient(135deg,#1f4058,#132c3f);color:#fff;border-radius:12px;padding:12px;display:grid;grid-template-columns:35px 1fr;gap:9px;box-shadow:0 13px 30px rgba(16,44,62,.27)}.upgrade-card.hidden{display:none}.upgrade-icon{width:35px;height:35px;background:rgba(22,184,166,.17);color:#55dccd;border-radius:9px;display:grid;place-items:center}.upgrade-card strong{display:block;font-size:11px}.upgrade-card small{display:block;font-size:8px;color:#b8c6ce;margin-top:3px;line-height:1.35}.upgrade-card>button:last-child{grid-column:1/-1;border:0;border-radius:7px;background:var(--accent);color:#063b37;font-weight:800;height:28px;font-size:9px}.close-upgrade{position:absolute;right:7px;top:5px;color:#91a5b0;background:transparent;border:0}
.stage{min-width:0;display:grid;grid-template-rows:49px 1fr 36px;background:radial-gradient(circle at 55% 15%,#fff 0,#f0f5f6 43%,#e7eef0 100%)}.stage-toolbar{display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid #dce5e8;background:rgba(255,255,255,.65);backdrop-filter:blur(8px)}.stage-toolbar strong{font-size:12px}.stage-toolbar>div:first-child span{font-size:7px;font-weight:850;color:#258b7f;background:#d9f5f0;padding:4px 6px;border-radius:4px;margin-left:7px}.stage-toolbar>div:first-child span.pro{color:#7444cc;background:#eee5ff}.device-switch{background:#e5ecee;padding:3px;border-radius:7px;display:flex}.device-switch button{width:33px;height:26px;border:0;background:transparent;color:#8b979d;border-radius:5px;font-size:14px}.device-switch button.active{background:#fff;color:var(--navy);box-shadow:0 2px 6px rgba(20,50,66,.1)}
.preview-area{display:flex;align-items:center;justify-content:center;min-height:0;padding:22px;overflow:auto}.browser-frame{width:min(980px,94%);height:min(670px,92%);min-height:420px;border-radius:11px;background:#fff;box-shadow:var(--shadow);overflow:hidden;border:1px solid #cedadd;transition:width .25s ease}.browser-frame.tablet{width:700px}.browser-frame.mobile{width:390px}.browser-bar{height:34px;background:#f7f9fa;border-bottom:1px solid #e7ecee;display:grid;grid-template-columns:70px 1fr 70px;align-items:center}.browser-dots{display:flex;gap:4px;padding-left:13px}.browser-dots i{width:7px;height:7px;border-radius:50%;background:#d3dce0}.browser-dots i:first-child{background:#ff8178}.browser-dots i:nth-child(2){background:#ffc65d}.browser-dots i:nth-child(3){background:#58d28f}.address{justify-self:center;min-width:280px;text-align:center;background:#edf1f3;border-radius:5px;padding:4px 12px;font-size:8px;color:#87949b}.browser-menu{text-align:right;padding-right:14px;color:#9ba7ad;font-size:11px}iframe{width:100%;height:calc(100% - 34px);border:0;background:#fff}.stage-help{display:flex;align-items:center;justify-content:center;gap:13px;color:#718089;font-size:9px;background:rgba(255,255,255,.65);border-top:1px solid #dce5e8}.stage-help i{width:55px;height:1px;background:#ccd7da}.stage-help kbd{border:0;border-radius:50%;background:#dfe8ea;color:#48606d;width:17px;height:17px;display:inline-grid;place-items:center;font-family:inherit;font-size:8px}
.toast{position:fixed;right:22px;bottom:22px;background:#18364a;color:#fff;padding:12px 16px;border-radius:9px;box-shadow:0 12px 35px rgba(18,44,62,.25);font-size:12px;font-weight:700;transform:translateY(90px);opacity:0;transition:.25s;z-index:20}.toast.show{transform:none;opacity:1}
dialog{border:0;border-radius:16px;padding:0;box-shadow:0 30px 80px rgba(15,40,55,.32);color:var(--navy)}dialog::backdrop{background:rgba(13,35,48,.5);backdrop-filter:blur(3px)}dialog form{width:360px;text-align:center;padding:28px}.dialog-icon{width:46px;height:46px;border-radius:50%;background:#eaf6f4;color:var(--accent);display:grid;place-items:center;margin:0 auto;font-size:22px}.dialog-actions{display:flex;gap:10px;justify-content:center;margin-top:21px}dialog h2{font-size:19px;margin:13px 0 5px}dialog p{font-size:12px;color:var(--muted)}
@media(max-width:880px){body{overflow:auto}.app-shell{min-height:100%;height:auto}.workspace{grid-template-columns:1fr}.sidebar{min-height:650px}.stage{min-height:720px}.save-state{display:none}.preview-area{padding:12px}.topbar{padding:0 12px}.button.ghost{display:none}.brand{font-size:17px}.brand-mark{transform:scale(.85)}.browser-frame{width:100%}.upgrade-card{position:relative;margin:12px}.sidebar-scroll{padding-bottom:0}}
@media(max-width:520px){.topbar-actions .button.primary{font-size:0;width:42px;padding:0}.topbar-actions .button.primary svg{width:19px}.workspace{display:block}.stage-toolbar{padding:0 12px}.address{min-width:190px}.stage-help i{width:12px}.preview-area{justify-content:flex-start}.browser-frame.mobile,.browser-frame.tablet{width:100%}}
