/* trovu – Editor: Formular links, Handy-Vorschau rechts (klebt). Auf dem Handy: Umschalter Bearbeiten | Vorschau. */
.ed-head { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: var(--head-h); z-index: 20; }
.ed-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; }
.ed-head h1 { margin: 0; font-size: 22px; letter-spacing: -0.02em; font-weight: 600; }
.ed-status { margin: 2px 0 0; font-size: 14px; color: var(--ink-3); }
.ed-status.is-ok { color: var(--ok); }
.ed-status.is-error { color: var(--rose-ink); font-weight: 600; }
.ed-tabs { display: none; gap: 0; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.ed-tab { min-height: 40px; padding: 0 14px; border: 0; background: #fff; color: var(--ink-2); font: 600 14px/1 var(--font); cursor: pointer; }
.ed-tab[aria-pressed="true"] { background: var(--ink); color: #fff; }

.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start; padding: 32px 0 80px; }
.ed-form { min-width: 0; max-width: 640px; }
.ed-sec { padding: 28px 0; border-top: 1px solid var(--line); }
.ed-sec:first-of-type { border-top: 0; padding-top: 0; }
.ed-sec > h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.015em; font-weight: 600; }
.ed-sec > .hint { margin: 0 0 16px; }
.ed-sec .field:last-child { margin-bottom: 0; }
.count { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ed-add { display: flex; align-items: center; gap: 14px; margin: 0; }
.ed-add .count { margin: 0; }

.ed-preview { position: sticky; top: calc(var(--head-h) + 104px); display: grid; justify-items: center; gap: 12px; }
.ed-preview .phone { width: 340px; height: min(680px, calc(100vh - 170px)); min-height: 520px; }
.ed-preview-note { text-align: center; max-width: 300px; margin: 0; }

/* Foto-Plätze */
.slot { display: grid; gap: 12px; }
.drop { display: grid; justify-items: center; gap: 10px; padding: 24px 16px; border: 2px dashed var(--line-2); border-radius: var(--r); background: #fff; text-align: center; }
.drop.is-over, .single.is-over { border-color: var(--rose); background: var(--rose-soft); }
.drop-text { margin: 0; font-weight: 600; }
.drop-hint { margin: 0; font-size: 13px; color: var(--ink-3); }
.slot-small .drop { padding: 16px 12px; justify-items: start; text-align: left; grid-template-columns: auto auto; align-items: center; }
.slot-small .drop-text { grid-column: 1 / -1; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.slot-small .drop-hint { grid-column: 1 / -1; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-label { cursor: pointer; background: #fff; }
.drop:focus-within .file-label, .single-tools:focus-within .file-label { outline: 3px solid var(--rose); outline-offset: 2px; }
.single { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); }
.single img { width: 160px; height: 120px; object-fit: cover; border-radius: var(--r); }
.single-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.thumb { position: relative; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); padding: 6px; }
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r); }
.thumb-tools { display: flex; justify-content: space-between; gap: 4px; margin-top: 6px; }
.icon-btn { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: var(--r);
  background: #fff; color: var(--ink); font: 600 17px/1 var(--font); cursor: pointer; }
.icon-btn:hover { background: var(--paper-2); }
.icon-btn[disabled] { opacity: .4; cursor: not-allowed; }
.progress { padding: 12px 14px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); }
.progress-text { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.progress progress { width: 100%; height: 10px; accent-color: var(--rose); }
.slot-msg { margin: 0; font-size: 14px; }
.slot-msg:empty { display: none; }
.slot-msg.is-error { color: var(--rose-ink); font-weight: 600; padding: 10px 12px; background: var(--rose-soft); border-radius: var(--r); }
.slot-msg.is-ok { color: var(--ok); }

/* Momente und Liebe */
.moments, .loves { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 14px; }
.moments:empty, .loves:empty { margin: 0; }
.moment { padding: 16px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); }
.moment-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.moment-title { margin: 0; font-size: 16px; font-weight: 600; }
.moment-tools { display: flex; gap: 6px; }
.moment-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0 12px; }
.moment .field { margin-bottom: 14px; }
.moment .field > label { font-size: 14px; }
.love-row > label { display: block; margin: 0 0 6px; font-weight: 600; font-size: 14px; }
.love-input { display: flex; gap: 8px; }
.love-input input { flex: 1; min-width: 0; }

.ed-final { }
.ed-final #pay-box > p:first-child { margin: 0 0 16px; color: var(--ink-2); }
.ed-final .check { padding: 14px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); margin: 0; }
.ed-danger .btn-danger { color: var(--rose-ink); border-color: var(--rose); }
.ed-danger .btn-danger:hover { background: var(--rose-soft); }
.ed-new { margin-left: 16px; font-size: 14px; color: var(--ink-2); }
#links-box .cta { margin: 0 0 20px; }

.dlg { max-width: min(460px, 100% - 32px); padding: 24px; border: 1px solid var(--line-2); border-radius: var(--r); background: #fff; color: var(--ink); }
.dlg::backdrop { background: rgb(36 27 27 / .45); }
.dlg h2 { margin: 0 0 10px; font-size: 20px; }
.dlg p { margin: 0 0 20px; color: var(--ink-2); }
.btn-danger-main { background: var(--rose-ink); }

@media (max-width: 980px) {
  .ed-grid { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 20px; }
  .ed-tabs { display: inline-flex; }
  .ed-grid[data-view="form"] .ed-preview { display: none; }
  .ed-grid[data-view="preview"] .ed-form { display: none; }
  .ed-preview { position: static; }
  .ed-preview .phone { width: min(340px, 100%); height: 640px; }
  .ed-form { max-width: none; }
}
@media (max-width: 560px) {
  .ed-head .wrap { padding: 12px 0; flex-wrap: wrap; gap: 10px; }
  .ed-tabs { width: 100%; }
  .ed-tab { flex: 1; }
  .page-editor .top .btn { display: none; }
  .ed-preview .phone { width: 100%; height: 72vh; min-height: 480px; padding: 0; background: none; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
  .ed-preview .phone iframe { border-radius: 0; }
  .ed-head h1 { font-size: 18px; }
  .moment-grid { grid-template-columns: minmax(0, 1fr); }
  .single { grid-template-columns: minmax(0, 1fr); }
  .single img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .ed-new { display: inline-block; margin: 12px 0 0; }
}

/* Gestaltung A: Überschriften der Abschnitte in Serif, Bedienung unverändert */
.ed-head h1 { font: 400 30px/1.1 var(--serif); letter-spacing: -0.01em; }
.ed-sec > h2 { font: 400 28px/1.15 var(--serif); letter-spacing: -0.005em; }
.ed-unwrap-btn { margin-top: 4px; }
.ed-tpl { margin: 0 0 16px; }
.ed-tpl .cta { margin-top: 10px; }
@media (max-width: 560px) { .ed-head h1 { font-size: 24px; } }

/* Fotos löschen: beschrifteter Knopf an jedem Foto, Hinweis mit „Rückgängig“ */
.btn-del { color: var(--rose-ink); border-color: var(--line-2); }
.btn-del:hover { background: var(--rose-soft); border-color: var(--rose); }
.thumb .btn-del { width: 100%; margin-top: 6px; }
.count-photos { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.undo { position: fixed; left: 50%; bottom: 20px; z-index: 50; transform: translateX(-50%); display: flex; align-items: center; gap: 16px;
  width: max-content; max-width: calc(100% - 32px); padding: 12px 12px 12px 18px; background: var(--ink); color: #fff; border-radius: var(--r);
  box-shadow: 0 16px 40px -16px rgb(30 23 22 / .5); font-size: 15px; }
.undo[hidden] { display: none; }
.undo-btn { background: #fff; color: var(--ink); min-height: 40px; }
.undo-btn:hover { background: var(--paper-2); }
@media (max-width: 560px) {
  .btn-del, .single-tools .btn, .undo-btn { min-height: 44px; }
  .icon-btn { min-width: 44px; min-height: 44px; }
  .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}