/* =========================================================
   Pulso — Editor de e-mail (.ed-)
   ========================================================= */
.ed {
  --ed-left: 272px;
  --ed-right: 324px;
  position: relative;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-h));
  height: calc(100dvh - var(--topbar-h));
  overflow: hidden;
}

/* ---------- Barra superior ---------- */
.ed-bar {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); background: rgba(12, 12, 13, 0.78);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); position: relative; z-index: 5;
}
.ed-title { display: flex; flex-direction: column; gap: 1px; min-width: 120px; padding: 0 4px; }
.ed-title .row { min-width: 0; }
.ed-title-input {
  width: 100%; min-width: 0; margin-left: -7px; padding: 3px 7px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; outline: none; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--text);
  text-overflow: ellipsis; transition: border-color 0.2s, background 0.2s;
}
.ed-title-input:hover { border-color: var(--line-2); }
.ed-title-input:focus { border-color: var(--cyan-2); background: rgba(255, 255, 255, 0.05); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12); }
.ed-title-input[readonly] { pointer-events: none; }
.ed-title-input::placeholder { color: var(--subtle); font-weight: 500; }
.ed-status { display: inline-flex; align-items: center; gap: 7px; padding: 0 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.ed-status.is-dirty { color: var(--yellow-2); }
.ed-status .dot { width: 7px; height: 7px; }
.ed-device button { height: 28px; }
.ed-device .iconify { font-size: 15px; }
.ed-bar .btn[disabled] { opacity: 0.35; }
.ed-narrow { display: none !important; }

/* ---------- Corpo ---------- */
.ed-body { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--ed-left) minmax(0, 1fr) var(--ed-right); }
.ed-left, .ed-right {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.ed-left { border-right: 1px solid var(--line); }
.ed-right { border-left: 1px solid var(--line); }
.ed-tabs { position: sticky; top: 0; z-index: 3; padding: 0 8px; background: rgba(17, 17, 19, 0.94); backdrop-filter: blur(12px); }
.ed-tabs .tab { flex: 1; justify-content: center; padding: 0 6px; font-size: 12px; gap: 5px; }
.ed-tabs .tab .iconify { font-size: 15px; }
.ed-pane { padding: 16px; }
.ed-group-label { margin: 18px 0 8px; }
.ed-pane > .ed-group-label:first-of-type { margin-top: 14px; }

/* Paleta de blocos */
.ed-palette { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ed-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; min-height: 74px;
  border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.035);
  font-size: 12px; font-weight: 500; color: var(--text-2); text-align: left; cursor: grab; user-select: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease), color 0.2s, box-shadow 0.2s;
}
.ed-tile .iconify { font-size: 21px; color: var(--cyan-2); transition: transform 0.25s var(--ease); }
.ed-tile:hover { background: rgba(34, 211, 238, 0.08); border-color: rgba(34, 211, 238, 0.35); color: var(--text); transform: translateY(-1px); box-shadow: 0 10px 24px -14px rgba(6, 182, 212, 0.7); }
.ed-tile:hover .iconify { transform: scale(1.1); }
.ed-tile:active { cursor: grabbing; transform: scale(0.98); }
.ed-left-cta { padding: 16px; margin-top: 22px; }
.ed-left-cta .h4 { color: #fff; }

/* Estilos globais */
.ed-themes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ed-theme { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 2px; border-radius: 12px; border: 1px solid transparent; transition: background 0.2s, border-color 0.2s; }
.ed-theme:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--line); }
.ed-theme small { font-size: 10px; color: var(--muted); }
.ed-theme-sw { position: relative; width: 36px; height: 36px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, 0.18); overflow: hidden; }
.ed-theme-sw i { position: absolute; left: 7px; right: 7px; top: 7px; bottom: 0; border-radius: 5px 5px 0 0; }
.ed-theme-sw b { position: absolute; left: 12px; right: 12px; bottom: 7px; height: 5px; border-radius: 4px; }

/* Campos personalizados */
.ed-merge-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.ed-merge-row:last-child { border-bottom: 0; }
.ed-code-chip { display: inline-block; margin-top: 3px; padding: 2px 7px; border-radius: 6px; font-family: var(--mono); font-size: 11px; color: var(--cyan-2); background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.2); }

/* ---------- Palco (canvas) ---------- */
.ed-stage {
  position: relative; min-height: 0; overflow: auto; overscroll-behavior: contain;
  background-color: #0c0c0e;
  background-image: radial-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1px);
  background-size: 18px 18px;
}
.ed-stage-inner { position: relative; min-height: 100%; padding: 18px 24px 110px; }
.ed-banner { max-width: 720px; margin: 0 auto 14px; padding: 10px 14px; }
.ed-stage-top { display: flex; justify-content: center; margin-bottom: 14px; }
.ed-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 12px; border-radius: 99px;
  font-size: 11px; color: var(--text-2); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
}
.ed-chip .iconify { font-size: 14px; color: var(--cyan-2); }
.ed-frame {
  position: relative; margin: 0 auto; width: min(100%, var(--ed-w, 696px)); border-radius: 18px; overflow: hidden;
  box-shadow: 0 40px 90px -36px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.07);
  transition: width 0.4s var(--ease), border-radius 0.4s var(--ease), border-width 0.4s;
  border: 0 solid #1c1c1f;
}
.ed-frame.is-mobile { width: 395px; max-width: 100%; border-width: 10px; border-radius: 44px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.12); }
.ed-frame.is-mobile::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 112px; height: 22px; z-index: 6;
  background: #1c1c1f; border-radius: 0 0 14px 14px; pointer-events: none;
}
.ed-frame.is-mobile .email-root { padding-top: 34px !important; padding-left: 0 !important; padding-right: 0 !important; }
.ed-frame.is-mobile .email-content { border-radius: 0 !important; }
.ed-frame.is-mobile .eb[data-type="products"] > div > div { width: 100% !important; display: block !important; }
.ed-frame .email-root { min-height: 440px; }
.ed-frame p { margin: 0 0 12px; }
.ed-frame p:last-child { margin-bottom: 0; }
.ed-frame ul { list-style: disc; padding-left: 22px; }
.ed-frame ol { list-style: decimal; padding-left: 22px; }
.ed-frame b, .ed-frame strong { font-weight: 700; }
.ed-frame img { max-width: 100%; }

/* Blocos editáveis */
.ed-frame .eb { position: relative; cursor: pointer; }
.ed-frame .eb::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border: 2px solid transparent; transition: border-color 0.15s;
}
.ed-frame .eb:hover::after { border-color: rgba(34, 211, 238, 0.45); }
.ed-frame .eb.is-selected::after { border-color: #22d3ee; }
.ed-frame .eb.is-editing::after { border-color: #facc15; }
.ed-frame .eb.is-editing { cursor: text; }
.ed-frame .eb.is-dragging { opacity: 0.32; }
.ed-frame [contenteditable="true"] { outline: none; cursor: text; caret-color: #0891b2; }
.ed-frame .eb.ed-flash::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: rgba(34, 211, 238, 0.2); animation: ed-fade 1.1s ease forwards;
}
.ed-tag {
  position: absolute; top: 0; left: 0; z-index: 4; display: none; align-items: center; gap: 5px;
  padding: 3px 9px 3px 7px; border-radius: 0 0 9px 0; background: #22d3ee; color: #052e33;
  font: 600 10px/1.3 var(--font); letter-spacing: 0.02em; pointer-events: none; white-space: nowrap;
}
.ed-tag .iconify { font-size: 12px; }
.ed-frame .eb:hover > .ed-tag, .ed-frame .eb.is-selected > .ed-tag { display: inline-flex; }
.ed-frame .eb.is-editing > .ed-tag { display: inline-flex; background: #facc15; color: #422006; }
.is-dragging .ed-frame .eb:hover::after { border-color: transparent; }
.is-dragging .ed-frame .eb:hover > .ed-tag { display: none; }

/* Marcador de soltura */
.ed-ph { position: relative; height: 0; z-index: 5; }
.ed-ph::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: -2px; height: 4px; border-radius: 4px;
  background: #22d3ee; box-shadow: 0 0 14px rgba(34, 211, 238, 0.9);
}
.ed-ph span {
  position: absolute; left: 50%; top: -11px; transform: translateX(-50%); padding: 3px 10px; border-radius: 99px;
  background: #22d3ee; color: #052e33; font: 600 10px/1.2 var(--font); white-space: nowrap; box-shadow: 0 6px 18px -6px rgba(6, 182, 212, 0.9);
}

/* Estado vazio */
.ed-empty {
  margin: 18px; padding: 54px 20px; border: 2px dashed #cbd5e1; border-radius: 16px; background: #f8fafc;
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: #64748b;
  font: 400 14px/1.5 var(--font); transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.ed-empty > .iconify { font-size: 42px; color: #06b6d4; margin-bottom: 8px; animation: float 4s ease-in-out infinite; }
.ed-empty b { font-size: 16px; color: #0f172a; font-weight: 600; }
.ed-empty.is-over { border-color: #06b6d4; background: #ecfeff; color: #0e7490; }
.ed-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.ed-empty-actions button {
  height: 34px; padding: 0 14px; border-radius: 99px; font: 500 13px var(--font); color: #0f172a;
  background: #fff; border: 1px solid #cbd5e1; transition: border-color 0.2s, background 0.2s;
}
.ed-empty-actions button:first-child { background: #0891b2; border-color: #0891b2; color: #fff; }
.ed-empty-actions button:hover { border-color: #06b6d4; }

/* Barra flutuante de ações e formatação */
.ed-float {
  position: absolute; z-index: 20; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px;
  border-radius: 14px; background: rgba(24, 24, 27, 0.97); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg);
  animation: pop-in 0.18s var(--ease) both;
}
.ed-float.is-row { flex-direction: row; }
.ed-float button {
  width: 30px; height: 30px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 15px;
  color: var(--text-2); transition: background 0.15s, color 0.15s;
}
.ed-float button:hover { background: rgba(255, 255, 255, 0.09); color: var(--text); }
.ed-float button.danger:hover { background: rgba(244, 63, 94, 0.18); color: var(--rose-2); }
.ed-float .ed-drag { cursor: grab; color: var(--cyan-2); }
.ed-float .ed-drag:active { cursor: grabbing; }
.ed-float-sep { width: 18px; height: 1px; margin: 2px 0; background: var(--line-2); flex-shrink: 0; }
.ed-float.is-row .ed-float-sep { width: 1px; height: 18px; margin: 0 2px; }
.ed-fmt button.ed-fmt-wide { width: auto; display: inline-flex; gap: 5px; padding: 0 9px; font-size: 12px; font-weight: 500; }
.ed-fmt button.ed-fmt-done { background: #facc15; color: #422006; margin-left: 2px; }
.ed-fmt button.ed-fmt-done:hover { background: #fde047; color: #422006; }
.ed-merge-wrap { position: relative; }
.ed-merge-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 2; min-width: 240px; padding: 6px; border-radius: 14px;
  background: #18181b; border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); animation: pop-in 0.16s var(--ease) both;
}
.ed-float .ed-merge-menu button { width: 100%; height: auto; display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; font-size: 12px; text-align: left; }
.ed-merge-menu code { font-family: var(--mono); font-size: 10px; color: var(--cyan-2); }

/* ---------- Painel de propriedades ---------- */
.ed-props-head {
  position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 14px 14px 14px 16px;
  border-bottom: 1px solid var(--line); background: rgba(17, 17, 19, 0.94); backdrop-filter: blur(12px);
}
.ed-props-head .btn-xs { width: 26px; height: 26px; }
.ed-props-head .ed-del:hover { color: var(--rose-2); background: rgba(244, 63, 94, 0.12); }
.ed-props { display: flex; flex-direction: column; gap: 16px; padding: 16px 16px 40px; }
.ed-colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ed-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ed-color { display: flex; align-items: center; gap: 6px; }
.ed-color .input-color { width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0; }
.ed-color .input { min-width: 0; font-size: 12px; text-transform: lowercase; }
.ed-val { font-size: 11px; color: var(--cyan-2); font-weight: 500; }
.ed-seg { display: flex; width: 100%; }
.ed-seg button { flex: 1; justify-content: center; padding: 0 8px; }
.ed-seg .iconify { font-size: 15px; }
.ed-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); cursor: pointer; }
.ed-code { font-size: 11.5px; line-height: 1.55; min-height: 180px; }

.ed-img-field { display: flex; gap: 10px; align-items: stretch; }
.ed-img-prev {
  position: relative; width: 86px; min-height: 74px; flex-shrink: 0; overflow: hidden; border-radius: 12px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.05); display: grid; place-items: center; font-size: 22px; color: var(--muted);
}
.ed-img-prev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ed-img-over { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.55); color: #fff; opacity: 0; transition: opacity 0.2s; font-size: 20px; }
.ed-img-prev:hover .ed-img-over { opacity: 1; }

.ed-rich { display: flex; flex-direction: column; }
.ed-rich-bar { display: flex; align-items: center; gap: 2px; padding: 4px; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 12px 12px 0 0; background: rgba(255, 255, 255, 0.03); }
.ed-rich-bar button { height: 26px; min-width: 28px; padding: 0 6px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: var(--text-2); }
.ed-rich-bar button .iconify { font-size: 14px; }
.ed-rich-bar button:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.ed-rich textarea { border-radius: 0 0 12px 12px; font-family: var(--mono); font-size: 12px; min-height: 150px; }

.ed-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ed-item { border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.025); overflow: hidden; }
.ed-item[open] { border-color: rgba(34, 211, 238, 0.3); }
.ed-item summary { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; list-style: none; font-size: 13px; color: var(--text-2); }
.ed-item summary::-webkit-details-marker { display: none; }
.ed-item summary img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.ed-item .ed-chev { color: var(--subtle); transition: transform 0.2s; }
.ed-item[open] .ed-chev { transform: rotate(180deg); }
.ed-item-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 12px 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.ed-mini-btn { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; color: var(--subtle); flex-shrink: 0; }
.ed-mini-btn:hover { background: rgba(244, 63, 94, 0.14); color: var(--rose-2); }
.ed-net { display: grid; grid-template-columns: 28px 112px minmax(0, 1fr) 26px; gap: 6px; align-items: center; }
.ed-net-ic { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; }

/* Resumo */
.ed-health { padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.ed-sum-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ed-sum-grid > div { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.ed-sum-grid b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ed-check { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; font-size: 12px; color: var(--text-2); line-height: 1.45; }
.ed-check .iconify { font-size: 16px; margin-top: 1px; }
.ed-layer { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border-radius: 10px; font-size: 12px; text-align: left; transition: background 0.15s; }
.ed-layer:hover { background: rgba(255, 255, 255, 0.05); }
.ed-layer .iconify { font-size: 15px; color: var(--cyan-2); }
.ed-layer-n { width: 18px; font-size: 10px; color: var(--subtle); font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- Modais do editor ---------- */
.ed-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; max-height: 50vh; overflow-y: auto; padding: 2px; }
.ed-lib-item { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; border: 2px solid transparent; background: rgba(255, 255, 255, 0.04); transition: border-color 0.2s, transform 0.2s var(--ease); }
.ed-lib-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.ed-lib-item:hover img { transform: scale(1.05); }
.ed-lib-item.is-picked { border-color: var(--cyan-2); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2); }
.ed-lib-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 8px 6px; font-size: 11px; text-align: left; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-lib-up { position: absolute; top: 6px; left: 6px; padding: 2px 7px; border-radius: 99px; font-size: 10px; font-weight: 600; color: #052e33; background: var(--emerald-2); }
.ed-lib-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--cyan); color: #fff; font-size: 13px; opacity: 0; transform: scale(0.6); transition: opacity 0.2s, transform 0.2s var(--ease); }
.ed-lib-item.is-picked .ed-lib-check { opacity: 1; transform: none; }

.ed-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 14px; }
.ed-preset { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); text-align: left; transition: transform 0.25s var(--ease), border-color 0.2s, box-shadow 0.25s; }
.ed-preset:hover { transform: translateY(-3px); border-color: rgba(34, 211, 238, 0.5); box-shadow: 0 18px 40px -20px rgba(6, 182, 212, 0.6); }
.ed-thumb { position: relative; height: 236px; overflow: hidden; background: #eef2f6; }
.ed-thumb::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 50px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.25)); pointer-events: none; }
.ed-thumb-inner { width: 660px; transform: scale(0.34); transform-origin: top left; pointer-events: none; }
.ed-preset-meta { padding: 12px 14px; border-top: 1px solid var(--line); }

.ed-pv-stage {
  border-radius: 18px; padding: 22px; max-height: 62vh; overflow: auto; background-color: #0c0c0e;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px); background-size: 18px 18px;
}
.ed-pv-frame { margin: 0 auto; width: 100%; max-width: 760px; transition: max-width 0.35s var(--ease); }
.ed-pv-frame.is-mobile { max-width: 395px; border: 10px solid #1c1c1f; border-radius: 40px; overflow: hidden; background: #fff; }
.ed-pv-frame.is-mobile .ed-inbox { border-radius: 0; margin: 0; padding-top: 28px; border-bottom: 1px solid #e2e8f0; }
.ed-pv-iframe { display: block; width: 100%; min-height: 420px; border: 0; background: #fff; border-radius: 0 0 14px 14px; }
.ed-pv-frame.is-mobile .ed-pv-iframe { border-radius: 0; }
.ed-inbox { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; margin-bottom: 0; border-radius: 14px 14px 0 0; background: #fff; color: #0f172a; font-size: 13px; border-bottom: 1px solid #e2e8f0; }
.ed-inbox b { font-weight: 700; }
.ed-inbox-subj { font-weight: 600; margin-top: 1px; }
.ed-inbox-pre { color: #64748b; font-size: 12px; }
.ed-inbox-time { font-size: 11px; color: #94a3b8; flex-shrink: 0; }

@keyframes ed-fade { from { opacity: 1; } to { opacity: 0; } }

/* ---------- Responsivo ---------- */
.ed-scrim { display: none; }
@media (max-width: 1360px) {
  .ed { --ed-left: 252px; --ed-right: 300px; }
}
@media (max-width: 1280px) {
  .ed-lbl { display: none; }
  .ed-bar .btn:has(> .ed-lbl) { padding: 0 9px; }
}
@media (max-width: 1024px) {
  .ed-body { grid-template-columns: minmax(0, 1fr); }
  .ed-left, .ed-right {
    position: fixed; top: var(--topbar-h); bottom: 0; z-index: 46; width: min(330px, 88vw);
    background: rgba(16, 16, 18, 0.985); transition: transform 0.35s var(--ease), box-shadow 0.35s;
  }
  .ed-left { left: 0; transform: translateX(-104%); }
  .ed-right { right: 0; transform: translateX(104%); }
  .ed.show-left .ed-left, .ed.show-right .ed-right { transform: none; box-shadow: var(--shadow-lg); }
  .ed-scrim { display: block; position: fixed; top: var(--topbar-h); left: 0; right: 0; bottom: 0; z-index: 45; background: rgba(0, 0, 0, 0.55); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .ed.show-left .ed-scrim, .ed.show-right .ed-scrim { opacity: 1; pointer-events: auto; }
  .ed-narrow { display: inline-flex !important; }
  .ed-stage-inner { padding: 16px 16px 100px; }
}
@media (max-width: 760px) {
  .ed-hide-md { display: none !important; }
  .ed-bar { gap: 6px; padding: 8px 10px; min-height: 56px; }
  .ed-status-txt { display: none; }
  .ed-status { padding: 0 2px; }
  .ed-sum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .ed-hide-sm { display: none !important; }
  .ed-eyebrow { display: none; }
  .ed-title { min-width: 0; }
  .ed-lbl-s { display: none; }
  .ed-bar .btn-primary { width: 30px; padding: 0; }
  .ed-stage-inner { padding: 12px 8px 96px; }
  .ed-frame.is-mobile { border-width: 6px; border-radius: 32px; }
  .ed-empty { margin: 10px; padding: 40px 14px; }
  .ed-presets { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .ed-thumb { height: 190px; }
  .ed-thumb-inner { transform: scale(0.25); }
  .ed-pv-stage { padding: 10px; }
}
