/* Editor visual Cielō — solo activo con ?edit=1 */
.ed-toolbar{
  position:fixed;top:0;left:0;right:0;z-index:99999;
  background:#2C2520;color:#EDE8E1;
  font-family:system-ui,sans-serif;font-size:13px;
  display:flex;align-items:center;gap:12px;
  padding:10px 16px;box-shadow:0 6px 24px rgba(0,0,0,.25);
}
.ed-toolbar strong{color:#C4A882;letter-spacing:.08em;text-transform:uppercase;font-size:11px}
.ed-toolbar button{
  background:#C4A882;color:#2C2520;border:0;padding:7px 14px;
  border-radius:3px;font-weight:600;cursor:pointer;font-size:12px;
  letter-spacing:.04em;transition:opacity .15s;
}
.ed-toolbar button.ghost{background:transparent;color:#EDE8E1;border:1px solid #8C7B6E}
.ed-toolbar button:hover{opacity:.85}
.ed-toolbar .ed-status{margin-left:auto;color:#8C7B6E;font-size:11px}
body.ed-active{padding-top:48px !important}

/* Marcadores sobre elementos editables */
body.ed-active [data-editable]{
  position:relative;outline:1px dashed rgba(196,168,130,.5);
  outline-offset:2px;cursor:grab;
}
body.ed-active [data-editable]:hover{outline:2px solid #C4A882}
body.ed-active [data-editable].ed-selected{outline:2px solid #C4A882;box-shadow:0 0 0 4px rgba(196,168,130,.25)}
body.ed-active [data-editable].ed-dragging{cursor:grabbing;opacity:.85}

/* Panel contextual flotante */
.ed-popover{
  position:absolute;z-index:99998;background:#2C2520;color:#EDE8E1;
  border:1px solid #C4A882;border-radius:4px;padding:10px;
  font-family:system-ui,sans-serif;font-size:12px;
  display:flex;flex-direction:column;gap:8px;min-width:220px;
  box-shadow:0 10px 30px rgba(0,0,0,.4);
}
.ed-popover h4{margin:0 0 4px;color:#C4A882;font-size:11px;letter-spacing:.1em;text-transform:uppercase}
.ed-popover label{display:flex;flex-direction:column;gap:4px;font-size:11px;color:#EDE8E1}
.ed-popover input[type=range]{width:100%}
.ed-popover .row{display:flex;gap:6px}
.ed-popover button{
  background:#C4A882;color:#2C2520;border:0;padding:6px 10px;border-radius:3px;
  font-weight:600;cursor:pointer;font-size:11px;flex:1;
}
.ed-popover button.ghost{background:transparent;color:#EDE8E1;border:1px solid #8C7B6E}
.ed-popover .close{position:absolute;top:4px;right:6px;background:none;color:#8C7B6E;font-size:18px;line-height:1;padding:2px 6px;flex:0;border:0}
.ed-hidden{display:none !important}

/* Panel hero */
.ed-hero-panel{
  position:fixed;inset:0;z-index:99999;
  background:rgba(20,16,14,.65);
  display:flex;align-items:center;justify-content:center;
  font-family:system-ui,sans-serif;
}
.ed-hero-panel .ed-hero-card{
  position:relative;background:#EDE8E1;color:#2C2520;
  width:min(560px, 92vw);max-height:88vh;overflow:auto;
  border-radius:6px;padding:24px 22px;box-shadow:0 30px 80px rgba(0,0,0,.4);
}
.ed-hero-panel h3{margin:0 0 6px;font-size:18px;color:#2C2520;letter-spacing:.04em}
.ed-hero-panel .hint{margin:0 0 16px;font-size:12px;color:#8C7B6E}
.ed-hero-panel .close{
  position:absolute;top:8px;right:12px;background:none;border:0;
  font-size:24px;line-height:1;color:#8C7B6E;cursor:pointer;
}
.ed-hero-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:12px}
.ed-hero-list li{
  display:grid;grid-template-columns:72px 1fr auto;gap:12px;align-items:center;
  background:#F7F4F0;border:1px solid rgba(140,123,110,.25);
  border-radius:4px;padding:10px;
}
.ed-hero-list .thumb{width:72px;height:54px;object-fit:cover;border-radius:3px;background:#ccc}
.ed-hero-list .meta{display:flex;flex-direction:column;gap:2px;font-size:12px;min-width:0}
.ed-hero-list .meta strong{color:#2C2520;font-size:13px}
.ed-hero-list .meta span{color:#8C7B6E;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ed-hero-list .acts{display:flex;gap:4px}
.ed-hero-list .acts button{
  background:#2C2520;color:#EDE8E1;border:0;padding:6px 10px;
  border-radius:3px;font-size:12px;cursor:pointer;font-weight:600;
}
.ed-hero-list .acts button[data-act="replace"]{background:#C4A882;color:#2C2520}
.ed-hero-list .acts button:disabled{opacity:.35;cursor:not-allowed}

/* Texto editable */
body.ed-active [data-editable="text"]{
  outline:1px dashed rgba(140,123,110,.45);
  outline-offset:2px;cursor:text;
}
body.ed-active [data-editable="text"]:hover{outline:2px solid #C4A882}
body.ed-active [data-editable="text"].ed-editing{
  outline:2px solid #C4A882;
  box-shadow:0 0 0 4px rgba(196,168,130,.25);
  background:rgba(255,255,255,.6);
  cursor:text;
}
/* Modo filtro: ocultar marcadores del tipo no activo */
body.ed-mode-text [data-editable="image"]{outline:none !important;cursor:default !important}
body.ed-mode-image [data-editable="text"]{outline:none !important;cursor:default !important}
body.ed-mode-text [data-editable="image"]:hover,
body.ed-mode-image [data-editable="text"]:hover{outline:none !important}