/* Bee Randomly builder v6: Elementor-style editing (handle, drag and drop, layers, store manager). Loaded after builder-modern.css. */
.bld-main{grid-template-columns:minmax(0,1fr) 340px}
.bld-panel .tabs{width:auto;display:flex}
.bld-panel .tab{flex:1;padding:8px 6px;font-size:.88rem}
.bld-panel .tab[hidden]{display:none}
.bld-pbody{overflow-y:auto;overscroll-behavior:contain}

/* template cards */
.bld-tpl{position:relative}
.bld-tpl .cv.cv-photo{height:140px;background-color:var(--hover)}
.bld-tag{position:absolute;top:10px;left:10px;font-style:normal;font-size:.75rem;font-weight:700;background:var(--pollen);color:var(--pollen-ink);padding:3px 10px;border-radius:999px}

/* canvas overlay */
.bld-canvas{position:relative}
.bld-ov{position:absolute;inset:0;pointer-events:none;z-index:3}
.bld-handle{position:absolute;left:0;top:0;display:flex;align-items:center;gap:1px;height:30px;padding:0 3px;background:#5B46B8;color:#fff;border-radius:8px;box-shadow:0 4px 14px rgba(40,24,110,.35);pointer-events:auto;font:600 12px/1 var(--ui);white-space:nowrap}
.bld-handle[hidden]{display:none}
.bld-handle button{display:grid;place-items:center;width:26px;height:26px;padding:0;border:0;border-radius:6px;background:transparent;color:inherit;cursor:pointer}
.bld-handle button:hover,.bld-handle button:focus-visible{background:rgba(255,255,255,.18);outline:0}
.bld-handle svg.i{width:15px;height:15px}
.bld-handle .bld-hmove{cursor:grab;touch-action:none}
.bld-hname{padding:0 6px 0 2px;max-width:140px;overflow:hidden;text-overflow:ellipsis}
.bld-drop{position:absolute;background:#5B46B8;border-radius:3px;box-shadow:0 0 0 2px rgba(255,255,255,.8);pointer-events:none}
.bld-drop.in{background:rgba(91,70,184,.12);box-shadow:inset 0 0 0 2px #5B46B8}
.bld-drop[hidden]{display:none}
.bld-shield{position:fixed;inset:0;z-index:9998;cursor:grabbing}
.bld-ghost{position:fixed;left:0;top:0;z-index:9999;pointer-events:none;background:#5B46B8;color:#fff;font:600 13px/1 var(--ui);padding:8px 12px;border-radius:8px;box-shadow:0 8px 24px rgba(40,24,110,.35)}

/* right-click menu */
.bld-cm{position:fixed;z-index:9999;min-width:210px;padding:6px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:12px;box-shadow:0 18px 40px rgba(20,16,40,.22)}
.bld-cm[hidden]{display:none}
.bld-cm button{display:flex;justify-content:space-between;gap:18px;width:100%;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:inherit;font:500 .9rem var(--ui);text-align:left;cursor:pointer}
.bld-cm button:hover:not([disabled]),.bld-cm button:focus-visible{background:var(--hover);outline:0}
.bld-cm button[disabled]{opacity:.4;cursor:default}
.bld-cm button.danger{color:var(--danger)}
.bld-cm kbd{font:500 .75rem var(--ui);color:var(--muted)}
.bld-cm hr{border:0;border-top:1px solid var(--line);margin:4px 2px}

/* element panel */
.bp-ibar{display:flex;gap:4px;margin:0 0 10px}
.bp-ibar button{display:grid;place-items:center;height:34px;min-width:34px;padding:0 8px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);cursor:pointer}
.bp-ibar button:hover{border-color:var(--ink)}
.bp-ibar button.danger{color:var(--danger)}
.bp-ibar .bp-done{margin-left:auto;font:600 .85rem var(--ui)}
.bp-ibar svg.i{width:17px;height:17px}
.bp-subtabs{position:sticky;top:-14px;z-index:2;display:flex;gap:2px;margin:0 -4px 10px;padding:4px;background:var(--hover);border-radius:12px}
.bp-subtabs button{flex:1;border:0;background:transparent;border-radius:9px;padding:7px 4px;font:620 .86rem var(--ui);color:var(--muted);cursor:pointer}
.bp-subtabs button[aria-selected="true"]{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(31,27,22,.12)}
.bp-dev{margin:0 0 10px;padding:8px 10px;border-radius:10px;background:var(--lilac);color:var(--ink);font-size:.82rem}
.bp-note{margin:0 0 10px;padding:8px 10px;border-radius:10px;background:var(--lilac);font-size:.85rem}
.bp-grp{border-top:1px solid var(--line)}
.bp-grp>summary{list-style:none;display:flex;justify-content:space-between;align-items:center;padding:12px 2px;font:700 .95rem var(--ui);cursor:pointer;color:var(--ink)}
.bp-grp>summary::-webkit-details-marker{display:none}
.bp-grp>summary::after{content:"";width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg) translate(-2px,-2px);transition:transform .15s}
.bp-grp[open]>summary::after{transform:rotate(-135deg) translate(-2px,-2px)}
.bp-grp-b{padding:0 0 12px}
.bp-row input[type=range]{width:100%;accent-color:#5B46B8}
.bp-seg svg.i{width:16px;height:16px;vertical-align:middle}
.bp-unit{display:grid;grid-template-columns:minmax(0,1fr) 62px;gap:4px}
.bp-unit input,.bp-unit select{width:100%;min-width:0;border:1px solid var(--line);background:var(--paper);border-radius:10px;padding:7px 6px;font-family:var(--ui);color:var(--ink)}
.bp-two{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.bp-two input[type=color]{width:100%;height:34px;padding:2px;border:1px solid var(--line);border-radius:10px;background:var(--paper)}
.bp-quad{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) 28px;gap:4px;align-items:start;margin-bottom:10px}
.bp-quad>span{grid-column:1/-1;font-size:.88rem;font-weight:600}
.bp-quad label{display:flex;flex-direction:column;align-items:center;gap:2px}
.bp-quad input{width:100%;min-width:0;border:1px solid var(--line);background:var(--paper);border-radius:8px;padding:6px 4px;text-align:center;font-family:var(--ui);color:var(--muted)}
.bp-quad input.is-set{color:var(--ink);border-color:var(--ink)}
.bp-quad small{font-size:.7rem;color:var(--muted)}
.bp-chk{display:flex;align-items:center;gap:8px;font-size:.9rem;cursor:pointer}
.bp-chk input{width:auto;margin:0}
.bp-fmt{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:10px}
.bp-fmt button{border:1px solid var(--line);background:var(--paper);border-radius:8px;padding:6px 10px;font:600 .85rem var(--ui);color:var(--ink);cursor:pointer}
.bp-fmt button:hover{border-color:var(--ink)}
.bp-reset{margin:12px 0 0}
.bp-first{border-top:0!important;margin-top:0!important;padding-top:0!important}
.bp-sub{display:block;margin-top:4px;color:var(--muted);font-size:.78rem;line-height:1.35}
.bp-tips{margin:0;padding-left:18px;font-size:.88rem;color:var(--muted);display:grid;gap:6px}
.bp-tips b{color:var(--ink)}.bp-tips svg.i{width:14px;height:14px;vertical-align:-2px}
.bp-gh{margin:14px 0 8px;font:700 .8rem var(--ui);text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.bp-block{cursor:grab;touch-action:pan-y;user-select:none;-webkit-user-select:none}
.bp-block:active{cursor:grabbing}

/* layers */
.nv{display:grid;gap:1px}
.nv-row{display:flex;align-items:center;padding-left:calc(var(--d) * 14px);border-radius:8px}
.nv-row:hover{background:var(--hover)}
.nv-row.is-sel{background:var(--lilac)}
.nv-row.is-hid{opacity:.5}
.nv-car{flex:none;display:grid;place-items:center;width:22px;height:28px;padding:0;border:0;background:transparent;color:var(--muted);cursor:pointer}
.nv-car svg.i{width:13px;height:13px;transition:transform .12s}
.nv-car.open svg.i{transform:rotate(90deg)}
.nv-name{flex:1;min-width:0;display:flex;gap:6px;align-items:baseline;padding:6px 4px;border:0;background:transparent;color:var(--ink);text-align:left;cursor:pointer;font:500 .86rem var(--ui)}
.nv-name b{font-weight:680;white-space:nowrap}
.nv-name span{color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* site: pages */
.bp-pages{display:grid;gap:4px;margin-bottom:10px}
.bp-page{display:flex;align-items:center;gap:4px;border:1px solid var(--line);border-radius:10px;padding:2px 4px 2px 2px;background:var(--paper)}
.bp-page.is-cur{border-color:var(--ink)}
.bp-page>button:first-child{flex:1;display:flex;justify-content:space-between;align-items:baseline;gap:8px;border:0;background:transparent;padding:7px 8px;text-align:left;color:var(--ink);cursor:pointer;font:600 .88rem var(--ui)}
.bp-page small{color:var(--muted);font-weight:500}
.bp-addpage{display:flex;gap:6px;margin-top:8px}
.bp-addpage input{flex:1;min-width:0;border:1px solid var(--line);background:var(--paper);border-radius:10px;padding:7px 9px;font-family:var(--ui);color:var(--ink)}
.bp-addpage .btn{padding:8px 12px}
.bp-addpage svg.i{width:16px;height:16px}

/* store */
.st-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}
.st-head h4{margin:0}.st-head small{color:var(--muted);font-weight:500}
.st-head .btn{padding:8px 12px;font-size:.88rem}.st-head svg.i{width:16px;height:16px}
.st-list{display:grid;gap:4px}
.st-row{display:flex;align-items:center;gap:2px;border:1px solid var(--line);border-radius:12px;background:var(--paper);padding:3px}
.st-main{flex:1;min-width:0;display:flex;align-items:center;gap:10px;border:0;background:transparent;padding:3px;text-align:left;color:var(--ink);cursor:pointer;border-radius:9px}
.st-main:hover{background:var(--hover)}
.st-main img,.st-noimg{flex:none;width:40px;height:52px;object-fit:cover;border-radius:6px;background:var(--hover)}
.st-main span{min-width:0;display:flex;flex-direction:column}
.st-main b{font-size:.9rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.st-main small{color:var(--muted);font-size:.78rem}
.st-row .bp-x[disabled]{opacity:.3}
.st-setbtn{width:100%;margin-top:12px}.st-setbtn svg.i{width:17px;height:17px}
.st-back{padding:6px 10px 6px 4px;margin:0 0 6px}.st-back svg.i{width:17px;height:17px}
.st-photos{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-bottom:10px}
.st-ph{position:relative;border-radius:8px;overflow:hidden;background:var(--hover);aspect-ratio:3/4}
.st-ph img{width:100%;height:100%;object-fit:cover;display:block}
.st-ph em,.st-ph [data-ph-first]{position:absolute;left:4px;bottom:4px;font:600 .7rem var(--ui);font-style:normal;background:rgba(0,0,0,.6);color:#fff;border:0;border-radius:6px;padding:3px 6px}
.st-ph [data-ph-first]{cursor:pointer;background:rgba(255,255,255,.9);color:#111}
.st-phx{position:absolute;top:4px;right:4px;width:22px;height:22px;border:0;border-radius:50%;background:rgba(0,0,0,.6);color:#fff;font-size:.75rem;cursor:pointer;display:grid;place-items:center;padding:0}
.st-foot{display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between}
.btn.danger{color:var(--danger)}

@media (max-width:980px){.bld-main{grid-template-columns:minmax(0,1fr)}}
@media (prefers-reduced-motion:reduce){.nv-car svg.i,.bp-grp>summary::after{transition:none}}
.st-rep{position:absolute;left:4px;right:4px;bottom:4px;text-align:center;font:600 .72rem var(--ui);background:rgba(255,255,255,.92);color:#111;border-radius:6px;padding:4px;cursor:pointer}
.st-rep input{position:absolute;opacity:0;width:1px;height:1px}
.bp-pick{display:flex;gap:10px;align-items:center;margin-bottom:10px}.bp-pick img{width:54px;height:72px;object-fit:cover;border-radius:8px;background:var(--hover)}
.bp-pick div{display:flex;flex-direction:column}.bp-pick small{color:var(--muted)}
.bp-hr{border:0;border-top:1px solid var(--line);margin:14px 0}
.bld-dlm{min-width:260px}
.bld-dlm button span{display:flex;flex-direction:column;gap:2px}
.bld-dlm b{font-weight:680}.bld-dlm small{color:var(--muted);font-size:.78rem}
.bld-dlm{min-width:270px}
.bld-dlm button span{display:flex;flex-direction:column;gap:2px}
.bld-dlm b{font-weight:680}.bld-dlm small{color:var(--muted);font-size:.78rem}
.bld-tpl.is-picked{border:2px solid var(--violet)!important;box-shadow:0 0 0 4px var(--lilac)}
.bp-tn textarea{min-height:0;resize:vertical;font-size:.95rem;line-height:1.4}

/* ---------- phones: full-screen editor + bottom sheet ---------- */
.bld-exit,.bld-grab{display:none}
@media (max-width:760px){
  html.bld-m,html.bld-m body{overflow:hidden;height:100%}
  html.bld-m .bld-app{position:fixed;inset:0;z-index:1000;margin:0;background:var(--paper);display:flex;flex-direction:column;padding-top:env(safe-area-inset-top,0px)}
  html.bld-m .bld-app[hidden]{display:none}
  html.bld-m .bld-bar{flex:none;flex-wrap:nowrap;overflow-x:auto;gap:6px;padding:8px;border-radius:0;border-width:0 0 1px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  html.bld-m .bld-bar::-webkit-scrollbar{display:none}
  html.bld-m .bld-bar>*{flex:none}
  html.bld-m .bld-bar .seg2[aria-label="Screen size"],html.bld-m #bldFull,html.bld-m #bldStatus,html.bld-m .bld-bar .grow{display:none}
  html.bld-m .bld-exit{display:inline-flex}
  html.bld-m .bld-bar .btn,html.bld-m .bld-bar .seg2 button{padding:8px 12px;font-size:.88rem;min-height:38px}
  html.bld-m .bld-pages select{max-width:150px;font-size:16px;padding:7px 8px}
  html.bld-m .bld-main{flex:1;min-height:0;display:block;margin:0;position:relative}
  html.bld-m .bld-canvas{position:absolute;inset:0 0 64px;padding:0;border:0;border-radius:0}
  html.bld-m #bldFrame,html.bld-m #bldPreview{height:100%!important;width:100%!important;transform:none!important;margin:0!important;border-radius:0}
  html.bld-m .bld-panel{position:absolute;left:0;right:0;bottom:0;z-index:5;height:64px;max-height:none;min-height:0;border-radius:18px 18px 0 0;border-width:1px 0 0;box-shadow:0 -12px 30px -14px rgba(0,0,0,.35);transition:height .25s ease;padding-bottom:env(safe-area-inset-bottom,0px)}
  html.bld-m.bld-sheet .bld-panel{height:min(58%,520px)}
  html.bld-m.bld-sheet .bld-canvas{bottom:min(58%,520px)}
  html.bld-m .bld-grab{display:flex;justify-content:center;align-items:center;width:100%;height:18px;border:0;background:transparent;padding:0;cursor:pointer;flex:none}
  html.bld-m .bld-grab i{width:42px;height:5px;border-radius:3px;background:var(--line)}
  html.bld-m .bld-panel .tabs{flex:none;margin:0 8px}
  html.bld-m .bld-panel .tab{padding:9px 4px;font-size:.85rem}
  html.bld-m .bld-pbody{padding:12px 14px 24px}
  html.bld-m .bld-pbody input,html.bld-m .bld-pbody select,html.bld-m .bld-pbody textarea{font-size:16px}
  html.bld-m .bld-handle{height:38px}
  html.bld-m .bld-handle button{width:34px;height:34px}
  html.bld-m .bld-handle svg.i{width:18px;height:18px}
  html.bld-m .bp-blocks{grid-template-columns:1fr 1fr}
  html.bld-m .bld-cm button{padding:12px}
}
@media (max-width:760px){
  html.bld-m .bld-pages{order:1}html.bld-m #bldDownload{order:2;padding:8px 14px}html.bld-m .bld-bar .seg2[aria-label="Mode"]{order:3}
  html.bld-m .bld-grp{order:4}html.bld-m #bldExit{order:5}html.bld-m #bldNew{order:6}
  html.bld-m .bld-pages select{max-width:118px}
}
#bldResume{flex-wrap:wrap}
.bld-ver{margin:10px 0 0;font-size:.75rem;color:var(--muted);opacity:.7}
/* phone: Canva-style simple editing */
@media (max-width:760px){
  html.bld-m .bld-app{bottom:auto;height:100%}
  html.bld-m.bld-kb .bld-panel{height:auto!important;max-height:72%}
  html.bld-m.bld-kb .bld-canvas{bottom:0!important}
  html.bld-m.bld-kb .bld-panel .tabs,html.bld-m.bld-kb .bld-grab{display:none}
  .m-head{display:flex;justify-content:space-between;align-items:center;margin:0 0 10px}
  .m-head b{font-size:1.05rem}.m-head .btn{padding:8px 18px}
  .m-edit textarea{width:100%;font:500 17px/1.4 var(--ui);padding:12px 14px;border:2px solid #7562BE;border-radius:14px;background:var(--paper);color:var(--ink);resize:none;margin:0 0 8px;display:block}
  .m-lab{display:block;color:var(--muted);font-size:.78rem;margin:2px 0 4px}
  .m-tools{display:flex;align-items:center;gap:6px;overflow-x:auto;padding:4px 0 8px;scrollbar-width:none}
  .m-tools::-webkit-scrollbar{display:none}
  .m-tools button,.m-color{flex:none;display:grid;place-items:center;min-width:44px;height:44px;padding:0 10px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:700 1rem var(--ui)}
  .m-tools button[aria-pressed=true]{background:var(--ink);color:var(--paper)}
  .m-tools button.danger{color:var(--danger)}
  .m-tools svg.i{width:20px;height:20px}
  .m-fs{flex:none;min-width:30px;text-align:center;font-weight:700}
  .m-color{position:relative;overflow:hidden}.m-color input{position:absolute;inset:0;opacity:0;width:100%;height:100%}
  .m-color span{width:24px;height:24px;border-radius:50%;border:2px solid var(--line)}
  .m-photo img{width:100%;max-height:180px;object-fit:cover;border-radius:14px;display:block;margin-bottom:10px;background:var(--hover)}
  .m-big{width:100%;justify-content:center;padding:14px;font-size:1.05rem}
  .m-more{width:100%;margin-top:6px}
  .m-link{margin-top:6px}
}
