/* Редактор областей перемещения (W-24): слой поверх карты и панель мастера. Подключается после skins.css.
   Цвета только из токенов оформления (--ok/--bad/--brass/--glass/--ink/--line-2 есть во всех шести вариантах);
   «можно» и «нельзя» различимы и без цвета: точечный узор + сплошной контур против штриховки + пунктирного контура. */
.ae-layer,.ae-hand{position:absolute;inset:0;pointer-events:none}
.ae-layer{z-index:2}
.ae-hand{z-index:6}
.ae-f{position:absolute;inset:0}
.ae-f.ok{background:radial-gradient(circle,rgba(var(--ok-rgb),.75) 1.3px,transparent 1.8px) 0 0/10px 10px,rgba(var(--ok-rgb),.16)}
.ae-f.no{background:repeating-linear-gradient(45deg,rgba(var(--bad-rgb),.62) 0 2px,transparent 2px 9px),rgba(var(--bad-rgb),.18)}
.ae-f.sel{filter:brightness(1.18) saturate(1.2)}
.ae-svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.ae-svg .ae-bg{fill:none;stroke:rgba(0,0,0,.55);stroke-width:5;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
.ae-svg .ae-o{fill:none;stroke-width:2.4;stroke-linejoin:round;stroke-linecap:round;vector-effect:non-scaling-stroke}
.ae-svg .ae-o.ok{stroke:var(--ok)}
.ae-svg .ae-o.no{stroke:var(--bad);stroke-dasharray:7 5}
.ae-svg .ae-o.sel{stroke-width:3.6}
.ae-svg .ae-o.draft{stroke-dasharray:3 5}
.ae-svg .ae-o.rub{opacity:.7}
.ae-t{position:absolute;transform:translate(-50%,-50%);padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;line-height:1.5;white-space:nowrap;max-width:60%;overflow:hidden;text-overflow:ellipsis;background:var(--glass);color:var(--ink);border:1.5px solid var(--line-2)}
.ae-t.ok{border-color:var(--ok)}
.ae-t.no{border-color:var(--bad);border-style:dashed}
.ae-t.sel{box-shadow:0 0 0 2px var(--focus)}
.ae-d{position:absolute;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;background:var(--brass);border:2px solid var(--glass);box-shadow:0 0 0 1.5px rgba(0,0,0,.6)}
.ae-d.first{width:18px;height:18px;margin:-9px 0 0 -9px;background:var(--ink)}
.ae-h,.ae-m{position:absolute;width:44px;height:44px;margin:-22px 0 0 -22px;padding:0;border:0;background:none;cursor:grab;pointer-events:auto;touch-action:none;-webkit-tap-highlight-color:transparent}
.ae-h::before{content:"";position:absolute;left:50%;top:50%;width:16px;height:16px;margin:-8px 0 0 -8px;border-radius:50%;background:var(--ink);border:3px solid var(--brass);box-shadow:0 0 0 1.5px rgba(0,0,0,.7)}
.ae-h.on::before{background:var(--brass);border-color:var(--ink);width:20px;height:20px;margin:-10px 0 0 -10px}
.ae-h:focus-visible::before,.ae-m:focus-visible::before{outline:3px solid var(--focus);outline-offset:2px}
.ae-h:active{cursor:grabbing}
.ae-m{cursor:copy;z-index:-1}
.ae-m::before{content:"+";position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-9px 0 0 -9px;border-radius:50%;display:grid;place-items:center;font:700 14px/1 var(--mono,monospace);background:var(--glass);color:var(--ink);border:1.5px solid var(--line-2);opacity:.85}
.ae-m:hover::before{opacity:1;border-color:var(--brass)}

/* панель */
.ae-bar{position:absolute;z-index:40;top:46px;left:10px;width:min(330px,calc(100% - 20px));max-height:calc(100% - 60px);overflow:auto;display:flex;flex-direction:column;gap:8px;padding:10px 12px;border-radius:14px;background:var(--glass);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);border:1px solid var(--line-2);box-shadow:var(--shadow-2);color:var(--ink);font-size:13px;overscroll-behavior:contain}
.ae-bar .ae-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
.ae-bar .ae-head{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.ae-bar .ae-head.grab{cursor:grabbing}
.ae-bar .ae-head .sp{flex:1}
.ae-bar .ae-head .btn{min-height:32px;padding:2px 10px;font-size:12px}
.ae-bar .ae-head b{font-family:"Cormorant Garamond",serif;font-size:17px}
.ae-bar .ae-loc{display:flex;gap:8px;align-items:center}
.ae-bar .ae-loc select{flex:1;min-width:0}
.ae-bar .seg button{min-height:34px}
.ae-bar .ae-hint{margin:0;color:var(--muted);font-size:12px;line-height:1.4}
.ae-bar .ae-msg:empty{display:none}
.ae-bar .ae-list{list-style:none;margin:0;padding:0;display:grid;gap:4px;max-height:160px;overflow:auto}
.ae-bar .ae-item{display:flex;align-items:center;gap:8px;width:100%;min-height:34px;padding:4px 8px;border-radius:9px;border:1px solid var(--line);background:var(--fill);color:var(--ink);text-align:left;cursor:pointer;font-size:13px}
.ae-bar .ae-item span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ae-bar .ae-item small{color:var(--muted)}
.ae-bar .ae-item.on{border-color:var(--brass);box-shadow:inset 0 0 0 1px var(--brass);background:var(--fill-2)}
.ae-bar .ae-item.no{border-style:dashed}
.ae-sw{flex:none;width:22px;height:14px;border-radius:4px;border:1.5px solid var(--ok)}
.ae-sw.ok{background:radial-gradient(circle,rgba(var(--ok-rgb),.9) 1.2px,transparent 1.7px) 0 0/6px 6px,rgba(var(--ok-rgb),.2)}
.ae-sw.no{border-color:var(--bad);border-style:dashed;background:repeating-linear-gradient(45deg,rgba(var(--bad-rgb),.8) 0 2px,transparent 2px 5px),rgba(var(--bad-rgb),.2)}
.ae-sel{display:grid;gap:6px;padding-top:6px;border-top:1px solid var(--line)}
.ae-sel label{display:grid;gap:3px;font-size:12px;color:var(--muted)}
.ae-sel input[type=text]{width:100%;min-height:34px}
.ae-opts{flex-direction:column;align-items:stretch}
.ae-opts .chk{display:flex;gap:8px;align-items:flex-start}
.ae-opts .chk small{display:block;color:var(--muted)}
#ae-open-bar[aria-pressed="true"]{box-shadow:inset 0 0 0 2px var(--brass)}
body.phone .vp-bar #ae-open-bar{display:none}/* на телефоне строка над картой — столбик масштаба: редактор открывается из Мастерской и из сцены в конструкторе */
@media (pointer:coarse){
  .ae-bar .btn,.ae-bar .seg button,.ae-bar .ae-item,.ae-bar select,.ae-bar input[type=text]{min-height:44px}
  .ae-bar .btn.sq-btn{min-width:44px}
  .ae-bar input[type=checkbox]{width:22px;height:22px}
}
@media (max-width:860px){
  .ae-bar{top:8px;left:8px;right:8px;width:auto;max-height:44%}
}
body.phone .ae-bar .btn,body.phone .ae-bar .seg button,body.phone .ae-bar .ae-item,body.phone .ae-bar select,body.phone .ae-bar input[type=text]{min-height:44px}
body.phone .ae-bar .btn.sq-btn{min-width:44px}
body.phone .ae-bar .ae-head .btn{min-height:44px}
body.phone .ae-bar input[type=checkbox]{width:22px;height:22px}
/* телефон: область карты — часть длинной страницы, поэтому панель крепим к экрану под шапкой (положение, которое задаёт перетаскивание, отключено) */
body.phone .ae-bar{position:fixed;top:calc(62px + env(safe-area-inset-top,0px))!important;left:8px!important;right:8px!important;width:auto!important;max-height:40vh}
@media (prefers-reduced-motion:reduce){.ae-h,.ae-m{transition:none}}
