.ea-dialog {
  width: min(1180px, calc(100% - 24px));
  max-height: min(92svh, 1020px);
  overscroll-behavior: contain;
}
.ea-dialog [hidden] { display: none !important; }
.ea-head { align-items: center; z-index: 3; }
.ea-head p { margin: 3px 0 0; }
.ea-body { display: grid; gap: 20px; padding: 20px; }
.ea-selectors, .ea-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ea-columns {
  display: grid;
  grid-template-columns: minmax(320px, .87fr) minmax(0, 1.13fr);
  gap: 20px;
  align-items: start;
}
.ea-field, .ea-form, .ea-controls, .ea-section-body { display: grid; gap: 8px; }
.ea-controls { min-width: 0; margin: 0; padding: 0; border: 0; gap: 10px; }
.ea-field { min-width: 0; margin: 0; font-weight: 600; font-size: .83rem; color: var(--ink); }
.ea-field input, .ea-field select, .ea-field textarea { width: 100%; min-width: 0; margin: 0; background-color: #fff; }
.ea-field textarea { resize: vertical; }
.ea-section { border: 1px solid var(--line,#d8e2d8); border-radius: 11px; background: #fff; overflow: clip; }
.ea-section > summary { padding: 14px 16px; cursor: pointer; font-size: .94rem; font-weight: 700; color: var(--ink); }
.ea-section[open] > summary { border-bottom: 1px solid var(--line,#d8e2d8); }
.ea-section-body { padding: 14px 16px; gap: 13px; }
.ea-input { min-width: 0; align-self: start; display: grid; gap: 3px; }
.ea-input-row { display: flex; align-items: end; min-width: 0; gap: 6px; }
.ea-input-row .ea-field { flex: 1; }
.ea-input-row input.ea-color { flex: 0 0 36px; width: 36px; height: 38px; min-height: 0; padding: 3px; margin: 0; cursor: pointer; border-radius: 6px; align-self: end; }
.ea-link { justify-self: start; display: inline; padding: 2px 0; background: none; border: 0; border-radius: 0; color: var(--green,#315c43); text-decoration: underline; text-underline-offset: 2px; font: inherit; font-size: .81rem; cursor: pointer; }
.ea-field-reset { font-size: .74rem; }
.ea-logo-panel { display: grid; place-items: center; min-height: 84px; padding: 12px; border: 1px dashed #adbdaf; border-radius: 8px; background: #f7f9f5; }
.ea-logo-panel img { width: auto; max-width: 100%; max-height: 70px; object-fit: contain; }
.ea-logo-panel span, .ea-section small, .ea-preview small, .ea-hint, .ea-feedback { color: var(--muted); font-size: .8rem; line-height: 1.5; }
.ea-section .ea-hint, .ea-feedback { margin: 0; }
.ea-file { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.ea-logo-actions, .ea-actions, .ea-preview-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.ea-actions { justify-content: space-between; }
.ea-actions, .ea-form > .ea-field { margin-top: 6px; }
.ea-error { color: #8c2929; }
.ea-feedback:empty { display: none; }
.ea-preview { position: sticky; top: 90px; display: grid; gap: 8px; min-width: 0; }
.ea-preview-head { justify-content: space-between; }
.ea-preview h3 { font-size: 1rem; margin: 0; }
.ea-preview iframe { display: block; width: 100%; height: min(64svh, 720px); min-height: 285px; border: 1px solid var(--line,#d8e2d8); border-radius: 9px; background: #fff; }
@media (max-width: 780px) {
  .ea-columns { grid-template-columns: minmax(0,1fr); }
  .ea-preview { position: static; }
  .ea-preview iframe { height: 60svh; }
}
@media (max-width: 500px) {
  .ea-body { padding: 12px; gap: 12px; }
  .ea-selectors { grid-template-columns: minmax(0,1fr); }
  .ea-section-body { padding: 12px; }
  .ea-grid { grid-template-columns: minmax(0,1fr); }
  .ea-actions .button { flex: 1 1 auto; }
}
