:root{
  --bg:#f5f7fb;
  --panel:#ffffff;
  --muted:#777;
  --accent:#667eea;
}
*{box-sizing:border-box}
body{font-family:Arial,Helvetica,sans-serif;background:var(--bg);margin:0;height:100vh;display:flex;flex-direction:column}
.toolbar{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;background:linear-gradient(90deg,#fff,#f7f9fc);border-bottom:1px solid #e6e9ef}
.toolbar h1{font-size:16px;margin:0}
.btn{background:#fff;border:1px solid #ddd;padding:8px 12px;border-radius:6px;cursor:pointer;margin-left:8px}
.btn.primary{background:var(--accent);color:#fff;border-color:transparent}
.editor-root{display:flex;flex:1;overflow:hidden}
.sidebar{width:220px;padding:18px;background:var(--panel);border-right:1px solid #e6e9ef}
.sidebar h3{margin:0 0 8px}
.pages-panel{margin-bottom:12px}
.pages-list{list-style:none;padding:0;margin:8px 0 6px;max-height:160px;overflow:auto}
.pages-list li{padding:8px;border-radius:6px;background:#fbfcff;border:1px solid #eef2ff;margin-bottom:6px;display:flex;justify-content:space-between;align-items:center}
.pages-list li.active{background:#eaf0ff}
.pages-list .name{flex:1}
.new-page{display:flex;gap:6px;margin-top:6px}
.new-page input{flex:1;padding:6px;border:1px solid #e6e9ef;border-radius:6px}
/*. properties panel */
.props-panel{background:#fff;border:1px solid #eef2ff;padding:10px;border-radius:8px}
.props-panel h4{margin:0 0 8px;font-size:13px}
.prop-row{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.prop-row label{width:80px;font-size:13px;color:#333}
.prop-row input,.prop-row select{flex:1;padding:6px;border:1px solid #e6e9ef;border-radius:6px}
.props-panel .small{margin-left:0}
.gallery{display:flex;gap:8px;flex-wrap:wrap}
.gallery img{width:100px;height:70px;object-fit:cover;border-radius:6px}
.template-list{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.template-list button{padding:8px;border-radius:6px;border:1px solid #e6e9ef;background:#fbfcff;cursor:pointer}
.site-styles input[type="color"]{height:30px;padding:2px}
.site-styles input[type="text"], .site-styles input[type="url"]{padding:6px;border:1px solid #e6e9ef;border-radius:6px}
.site-styles .btn{padding:6px 8px}
.block{padding:10px;background:#f1f5ff;border:1px dashed #cbd7ff;border-radius:6px;margin-bottom:8px;cursor:grab}
.block:active{cursor:grabbing}
.muted{color:var(--muted);font-size:13px}
.canvas-wrap{flex:1;padding:18px;overflow:auto}
.canvas{min-height:400px;background:linear-gradient(180deg,#fff,#fbfdff);border:2px dashed #e4e7ee;padding:16px;border-radius:8px}
.canvas .placeholder{color:var(--muted);text-align:center;padding:60px 10px}
.canvas .page-block{padding:12px;border:1px solid #eee;border-radius:6px;background:#fff;margin-bottom:12px;position:relative}
.block-controls{position:absolute;right:8px;top:8px;display:flex;gap:6px}
.small{font-size:12px;padding:4px 8px}

/* responsive */
@media(max-width:800px){.sidebar{display:none}.toolbar h1{font-size:14px}}
