:root {
  --bm-bg: #f1f1f1; --bm-card: #fff; --bm-text: #303030; --bm-muted: #616161; --bm-line: #e3e3e3;
  --bm-hover: #f6f6f6; --bm-active: #ebebeb; --bm-green: #29845a; --bm-green-bg: #cdfee1; --bm-radius: 12px;
  --bm-shadow: 0 1px 0 0 rgba(26,26,26,.07), inset 0 -1px 0 0 rgba(0,0,0,.08), inset 0 0 0 1px rgba(0,0,0,.04);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bm-bg); color: var(--bm-text); font: 13px/1.45 Inter, -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, "Helvetica Neue", sans-serif; }
h1 { font-size: 20px; font-weight: 700; margin: 0; }
h2 { font-size: 16px; font-weight: 650; margin: 0; }
button { font: inherit; }
.bm-muted { color: var(--bm-muted); }
.bm-small { font-size: 12px; }
.bm-center { text-align: center; }
.bm-right { text-align: right; }
.bm-loading { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.bm-page { max-width: 1000px; margin: 0 auto; padding: 24px 20px 60px; display: flex; flex-direction: column; gap: 16px; }
.bm-page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bm-card { background: var(--bm-card); border-radius: var(--bm-radius); box-shadow: var(--bm-shadow); padding: 16px; }
.bm-card-flush { padding: 0; overflow: hidden; }
.bm-card-h { font-weight: 650; font-size: 14px; margin-bottom: 12px; }
.bm-pad { padding: 16px; }
.bm-card-flush .bm-card-h.bm-pad { margin: 0; padding-bottom: 8px; }
.bm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .bm-two { grid-template-columns: 1fr; } }
.bm-table { width: 100%; border-collapse: collapse; }
.bm-table th { text-align: left; font-weight: 550; color: var(--bm-muted); background: #f7f7f7; padding: 8px 16px; border-bottom: 1px solid var(--bm-line); }
.bm-table td { padding: 10px 16px; border-bottom: 1px solid var(--bm-line); vertical-align: middle; }
.bm-table tr:last-child td { border-bottom: 0; }
.bm-table th.bm-right, .bm-table td.bm-right { text-align: right; }
.bm-actions { white-space: nowrap; }
.bm-strong-link { color: var(--bm-text); font-weight: 600; text-decoration: none; }
.bm-strong-link:hover { text-decoration: underline; }
.bm-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 8px; background: #e3e3e3; color: #4a4a4a; font-size: 12px; font-weight: 550; }
.bm-badge-live { background: var(--bm-green-bg); color: #0c5132; }
.bm-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--bm-line); }
.bm-row:last-child { border-bottom: 0; }
.bm-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bm-fields { display: flex; flex-direction: column; gap: 14px; }
.bm-field { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.bm-label { font-weight: 450; }
.bm-help { color: var(--bm-muted); font-size: 12px; margin-top: -4px; }
.bm-reflist { width: 100%; border: 1px solid var(--bm-line); border-radius: 10px; overflow: hidden; }
.bm-ref { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-bottom: 1px solid var(--bm-line); }
.bm-ref:last-child { border-bottom: 0; }
.bm-ref img, .bm-ref-ph { width: 32px; height: 32px; object-fit: cover; border-radius: 6px; border: 1px solid var(--bm-line); background: #f4f4f4; }
.bm-ref-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-icon-btn { border: 0; background: transparent; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; color: var(--bm-muted); font-size: 14px; }
.bm-icon-btn:hover:not(:disabled) { background: var(--bm-hover); color: var(--bm-text); }
.bm-icon-btn:disabled { opacity: .35; cursor: default; }
.bm-link { border: 0; background: none; color: #005bd3; cursor: pointer; padding: 0; font-size: 12px; }
.bm-color { display: flex; flex-direction: column; gap: 4px; }
.bm-img-prev { max-width: 160px; max-height: 80px; border: 1px solid var(--bm-line); border-radius: 8px; }

/* ---------- editor ---------- */
.bm-editor { display: flex; flex-direction: column; height: 100vh; }
.bm-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; flex: 0 0 auto; flex-wrap: wrap; }
.bm-topbar-l, .bm-topbar-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bm-back { border: 0; background: transparent; font-size: 18px; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; }
.bm-back:hover { background: var(--bm-active); }
.bm-cart-select { height: 32px; border-radius: 8px; border: 1px solid #8a8a8a; padding: 0 28px 0 10px; font: inherit; font-weight: 550; background: #fff; }
.bm-rename { display: inline-flex; gap: 6px; align-items: center; }
.bm-rename input { height: 32px; border-radius: 8px; border: 1px solid #8a8a8a; padding: 0 10px; font: inherit; }
.bm-show-items { display: inline-flex; align-items: center; gap: 6px; font-weight: 550; cursor: pointer; padding: 0 6px; }
.bm-cols { flex: 1; display: grid; grid-template-columns: 260px minmax(0, 1fr) 400px; gap: 16px; padding: 0 0 0 20px; min-height: 0; }
.bm-nav, .bm-main { overflow-y: auto; padding-bottom: 40px; }
.bm-nav { display: flex; flex-direction: column; gap: 12px; }
.bm-nav-card { padding: 8px; }
.bm-nav-h { font-weight: 650; padding: 6px 8px 4px; }
.bm-nav-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; color: var(--bm-text); font-weight: 450; }
.bm-nav-item:hover { background: var(--bm-hover); }
.bm-nav-item.is-active { background: var(--bm-active); font-weight: 650; }
.bm-nav-t { flex: 1; }
.bm-ic { width: 18px; height: 18px; flex: 0 0 18px; color: #4a4a4a; }
.bm-eye-btn { border: 0; background: transparent; width: 26px; height: 26px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #8a8a8a; }
.bm-eye-btn:hover { background: #e3e3e3; color: var(--bm-text); }
.bm-eye-btn.is-off { color: #303030; }
.bm-eye { width: 18px; height: 18px; }
.bm-main { display: flex; flex-direction: column; gap: 14px; }
.bm-main-h { display: flex; align-items: center; gap: 8px; padding: 4px 2px 2px; }
.bm-main-h h2 { flex: 1; }
.bm-note { background: #eaf4ff; color: #00337a; border-radius: 10px; padding: 10px 12px; }
.bm-note-warn { background: #fff1e3; color: #5e4200; }
.bm-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 550; }
.bm-toggle input { display: none; }
.bm-toggle-ui { width: 34px; height: 20px; border-radius: 20px; background: #b5b5b5; position: relative; transition: background .2s; }
.bm-toggle-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; }
.bm-toggle input:checked + .bm-toggle-ui { background: #303030; }
.bm-toggle input:checked + .bm-toggle-ui::after { left: 16px; }
.bm-block { border: 1px solid var(--bm-line); border-radius: 10px; margin-bottom: 8px; }
.bm-block-h { display: flex; align-items: center; gap: 4px; padding: 6px 8px; cursor: pointer; }
.bm-block-h:hover { background: var(--bm-hover); border-radius: 10px; }
.bm-caret { width: 16px; color: var(--bm-muted); }
.bm-block-t { flex: 1; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-block-b { padding: 12px; border-top: 1px solid var(--bm-line); }
.bm-danger:hover:not(:disabled) { color: #8e0b21; background: #fee9e8; }
.bm-add { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.bm-preview { background: #e9e9e9; border-left: 1px solid var(--bm-line); position: relative; min-height: 0; }
.bm-preview-frame { position: absolute; inset: 0; }
.bm-preview-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.bm-preview-busy { position: absolute; top: 10px; right: 10px; z-index: 2; background: #fff; border-radius: 20px; padding: 4px; box-shadow: var(--bm-shadow); }
@media (max-width: 1100px) { .bm-cols { grid-template-columns: 220px minmax(0, 1fr) 340px; } }
@media (max-width: 860px) { .bm-cols { grid-template-columns: 1fr; padding: 0 12px; } .bm-preview { height: 640px; } .bm-nav { flex-direction: row; overflow-x: auto; } }

/* ---------- sticky / analytics / help ---------- */
.bm-sticky-demo { background: #f4f4f4; border-radius: 10px; padding: 12px; }
.bm-sticky-screen { position: relative; height: 260px; background: #fff; border-radius: 8px; border: 1px solid var(--bm-line); display: flex; align-items: center; justify-content: center; }
.bm-sticky-btn { position: absolute; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,.22); }
.bm-sticky-btn svg { width: 26px; height: 26px; }
.bm-sticky-btn.pos-bottom_right { right: 16px; bottom: 16px; } .bm-sticky-btn.pos-bottom_left { left: 16px; bottom: 16px; }
.bm-sticky-btn.pos-top_right { right: 16px; top: 16px; } .bm-sticky-btn.pos-top_left { left: 16px; top: 16px; }
.bm-sticky-q { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; border-radius: 10px; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.bm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.bm-tile-t { color: var(--bm-muted); font-weight: 550; }
.bm-tile-v { font-size: 22px; font-weight: 700; margin: 4px 0; }
.bm-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.bm-faq { border-bottom: 1px solid var(--bm-line); padding: 10px 0; }
.bm-faq:last-child { border-bottom: 0; }
.bm-faq summary { cursor: pointer; font-weight: 550; }
.bm-faq p { margin: 8px 0 0; color: var(--bm-muted); }
