/* ============================================================
   Konfigurator v2 — nur auf /editor-neu geladen.
   Nutzt die Tokens aus frontend.css (--pink/--coral/--ink ...).
   Klassen sind mit .ed- präfixiert wegen Bootstrap-Kollisionen.
   ============================================================ */

.ed-wrap { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px) 80px; }

/* ---------------- Intro ---------------- */
.ed-intro { padding: clamp(28px, 5vw, 56px) 0 clamp(20px, 3vw, 32px); text-align: center; }
.ed-eyebrow { font-family: var(--font-serif); font-style: italic; color: var(--coral); margin: 0 0 6px; }
.ed-title { font-family: var(--font-sans); font-weight: 800; color: var(--ink); font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 0 0 10px; }
.ed-title em { font-family: var(--font-script); font-style: normal; font-weight: 700; color: var(--coral); font-size: 1.25em; }
.ed-sub { color: var(--muted); margin: 0; }

/* ---------------- Split-Layout ----------------
   Steuerung scrollt, Vorschau klebt. Unter 1100px stapelt es und die
   Vorschau wandert als Leiste an den unteren Rand (siehe unten). */
.ed-shell { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(20px, 2.5vw, 36px); align-items: start; }
@media (max-width: 1100px) { .ed-shell { grid-template-columns: minmax(0, 1fr); } }

.ed-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ---------------- Sektion ---------------- */
.ed-sec { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(16px, 2vw, 24px); }
.ed-sec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.ed-sec-h h2 { font-size: 1.12rem; font-weight: 800; color: var(--ink); margin: 0; font-family: var(--font-sans); }
.ed-num { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 999px; background: linear-gradient(100deg, var(--pink), var(--coral));
  color: #fff; font-size: .82rem; font-weight: 800; display: grid; place-items: center; }
.ed-info { margin-left: auto; width: 24px; height: 24px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper-2);
  color: var(--muted); font-size: .78rem; font-weight: 800; cursor: pointer; line-height: 1; padding: 0; flex: 0 0 auto; }
.ed-info:hover { border-color: var(--coral); color: var(--coral); }

.ed-field { margin-bottom: 14px; }
.ed-field:last-child { margin-bottom: 0; }
.ed-lbl { display: flex; align-items: baseline; gap: 8px; font-size: .84rem; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.ed-lbl-hint, .ed-count { font-weight: 400; color: var(--muted); font-size: .78rem; }
.ed-count { margin-left: auto; }
.ed-count.over { color: var(--coral-deep); font-weight: 700; }

/* Versteckte Selects: Quelle der Wahrheit, von den Kacheln gesetzt. */
.ed-hidden-src { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }

/* ---------------- Eingabefelder ---------------- */
.ed-in { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 10px 13px; font-size: .95rem; color: var(--ink);
  background: var(--paper); transition: border-color .18s, box-shadow .18s; height: auto; }
.ed-in:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 30%, transparent); background: #fff; }
.ed-in::placeholder { color: #c9b8bc; }
/* Beschriftungsfelder rendern sich in der gewählten Schrift/Farbe — das Feld
   ist damit seine eigene Mini-Vorschau. */
.ed-in-styled { font-size: 1.18rem; padding: 12px 14px; }
.ed-in.err { border-color: var(--coral-deep); }
.ed-in.dupe { border-color: var(--gold); background: #fffaf0; }

.ed-sel { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; font-size: .88rem; color: var(--ink);
  background: var(--paper); height: auto; }
.ed-sel:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 30%, transparent); }

/* ---------------- Schrift-/Farbauswahl mit Vorschau ----------------
   Ersetzt den nativen <select>: der kann Optionen nicht in der jeweiligen
   Schrift zeigen, und mobil öffnet ohnehin der System-Picker. Das <select>
   bleibt versteckt im DOM (Quelle der Wahrheit fürs Backend). */
.ed-pick-src { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }

.ed-pick { position: relative; }
.ed-pick-btn { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper); padding: 7px 11px; min-height: 40px;
  transition: border-color .18s, box-shadow .18s; }
.ed-pick-btn:hover { border-color: var(--pink); }
.ed-pick.open .ed-pick-btn, .ed-pick-btn:focus-visible { outline: none; border-color: var(--pink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 30%, transparent); }
.ed-pick-val { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.ed-pick-chev { flex: 0 0 auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; }
.ed-pick.open .ed-pick-chev { transform: rotate(-135deg) translate(-3px, -3px); }

.ed-pick-menu { position: absolute; z-index: 1045; top: calc(100% + 5px); left: 0; right: 0; margin: 0; padding: 5px; list-style: none;
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--pink); border-radius: 12px;
  box-shadow: var(--shadow-soft); max-height: 264px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ed-pick-opt { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; cursor: pointer; min-height: 40px; }
.ed-pick-opt:hover { background: color-mix(in srgb, var(--pink) 20%, transparent); }
.ed-pick-opt.on { background: color-mix(in srgb, var(--pink) 30%, transparent); }
.ed-pick-opt.on::after { content: ""; margin-left: auto; flex: 0 0 auto; width: 5px; height: 9px;
  border: solid var(--coral-deep); border-width: 0 2px 2px 0; transform: rotate(45deg); }
/* Schriftnamen in ihrer eigenen Schrift — groß genug, dass man sie erkennt. */
.ed-pick[data-kind="font"] .ed-pick-label { font-size: 1.24rem; line-height: 1.35; color: var(--ink); }
.ed-pick[data-kind="font"] .ed-pick-val .ed-pick-label { font-size: 1.15rem; }
.ed-pick-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Farbklecks: heller Rahmen, damit Weiß auf Weiß nicht verschwindet. */
.ed-pick-sw { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; border: 1px solid rgba(0,0,0,.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.ed-pick[data-kind="color"] .ed-pick-label { font-size: .88rem; color: var(--ink); }

/* ---------------- Format: Datei / Druck ---------------- */
.ed-variations { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
@media (max-width: 560px) { .ed-variations { grid-template-columns: 1fr; } }
.ed-vcard { display: grid; gap: 3px; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--paper); cursor: pointer; transition: border-color .18s, background .18s, transform .18s; position: relative; }
.ed-vcard:hover { border-color: var(--pink); transform: translateY(-1px); }
.ed-vcard.on { border-color: var(--coral); background: color-mix(in srgb, var(--pink) 14%, #fff); }
.ed-vcard-ico { width: 26px; height: 26px; border-radius: 8px; background: var(--pink-soft); margin-bottom: 4px;
  background-repeat: no-repeat; background-position: center; background-size: 15px; }
.ed-vcard-ico[data-ico="file"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23E36159'%3E%3Cpath d='M4 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.5L9.5 0H4zm5 1.5L12.5 5H10a1 1 0 0 1-1-1V1.5z'/%3E%3C/svg%3E"); }
.ed-vcard-ico[data-ico="print"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23E36159'%3E%3Cpath d='M5 1a2 2 0 0 0-2 2v2H2a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h1v1a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-1h1a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-1V3a2 2 0 0 0-2-2H5zm-1 2a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2H4V3zm0 7h8v3a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-3z'/%3E%3C/svg%3E"); }
.ed-vcard-t { font-weight: 800; color: var(--ink); font-size: .98rem; }
.ed-vcard-d { color: var(--muted); font-size: .78rem; }
.ed-vcard-p { font-weight: 800; color: var(--coral); font-size: .86rem; margin-top: 2px; }

.ed-vshow { display: none; }
.ed-vshow.on { display: block; }

/* ---------------- Chips ---------------- */
.ed-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.ed-chip { padding: 8px 15px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  font-size: .87rem; font-weight: 600; cursor: pointer; transition: border-color .18s, background .18s, color .18s; }
.ed-chip:hover { border-color: var(--pink); }
.ed-chip.on { border-color: var(--coral); background: color-mix(in srgb, var(--pink) 20%, #fff); color: var(--coral-deep); font-weight: 800; }
/* Ausrichtungs-Chips: größere Buttons, Icon oben, Text darunter */
.ed-chip-orient { display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 26px; min-width: 108px; border-radius: 14px; font-size: .9rem; line-height: 1; }
.ed-chip-orient svg { flex: 0 0 auto; width: 30px; height: 30px; color: var(--muted); transition: color .15s; }
.ed-chip-orient:hover svg { color: var(--coral); }
.ed-chip-orient.on svg { color: var(--coral-deep); }
.ed-chip-2l { display: grid; gap: 1px; text-align: left; border-radius: 12px; padding: 8px 15px; }
.ed-chip-t { font-weight: 800; font-size: .9rem; }
.ed-chip-d { font-size: .72rem; color: var(--muted); font-weight: 400; }
.ed-chip-2l.on .ed-chip-d { color: var(--coral); }

/* ---------------- Größen-Kacheln (Preis direkt drauf) ---------------- */
.ed-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.ed-size { display: none; position: relative; text-align: left; padding: 11px 12px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--paper); cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.ed-size.avail { display: grid; gap: 1px; }
.ed-size:hover { border-color: var(--pink); transform: translateY(-1px); }
.ed-size.on { border-color: var(--coral); background: color-mix(in srgb, var(--pink) 16%, #fff); }
.ed-size-badge { position: absolute; top: 9px; right: 10px; font-size: .62rem; font-weight: 800; color: var(--muted);
  background: var(--pink-soft); border-radius: 5px; padding: 1px 5px; letter-spacing: .04em; }
.ed-size.on .ed-size-badge { background: var(--coral); color: #fff; }
.ed-size-fmt { font-weight: 800; color: var(--ink); font-size: .93rem; }
.ed-size-qty { font-size: .75rem; color: var(--muted); }
.ed-size-dims { font-size: .69rem; color: #bfaeb2; }
.ed-size-price { font-weight: 800; color: var(--coral); font-size: .93rem; margin-top: 3px; }

/* ---------------- Stilwelten ---------------- */
.ed-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; margin-bottom: 14px; }
.ed-preset { display: grid; gap: 2px; padding: 14px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper);
  cursor: pointer; text-align: center; transition: border-color .18s, background .18s, transform .18s; overflow: hidden; }
.ed-preset:hover { border-color: var(--pink); transform: translateY(-1px); }
.ed-preset.on { border-color: var(--coral); background: color-mix(in srgb, var(--pink) 14%, #fff); }
.ed-preset-demo { font-size: 1.32rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-preset-demo2 { font-size: .84rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.ed-preset-n { font-weight: 800; font-size: .84rem; color: var(--ink); font-family: var(--font-sans); }
.ed-preset-note { font-size: .7rem; color: var(--muted); font-family: var(--font-sans); }

.ed-details { border-top: 1px solid var(--line); padding-top: 10px; }
.ed-details > summary { cursor: pointer; font-size: .96rem; font-weight: 800; color: var(--coral-deep); list-style: none;
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; border: 1.5px solid var(--pink);
  border-radius: 999px; background: color-mix(in srgb, var(--pink) 14%, #fff);
  transition: border-color .15s, background .15s; }
.ed-details > summary:hover { border-color: var(--coral); background: color-mix(in srgb, var(--pink) 26%, #fff); }
.ed-details[open] > summary { margin-bottom: 6px; }
.ed-details > summary::-webkit-details-marker { display: none; }
.ed-details > summary::before { content: "▸"; font-size: .85em; display: inline-block; transition: transform .2s; }
.ed-details[open] > summary::before { content: "▾"; }
.ed-details-in { padding-top: 10px; display: grid; gap: 8px; }
.ed-mrow { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 7px; align-items: center; }
@media (max-width: 620px) { .ed-mrow { grid-template-columns: 1fr; } }
.ed-mrow-l { font-size: .82rem; color: var(--ink); font-weight: 600; }

/* ---------------- Dekoration ---------------- */
.ed-deco { display: none; margin-top: 13px; padding: 13px; border-radius: 13px; background: var(--paper-2); border: 1px solid var(--line); }
.ed-deco.on { display: block; }
.ed-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 7px; max-height: 290px; overflow-y: auto; }
.ed-thumb { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 9px; border: 2px solid transparent;
  background: #fff; padding: 3px; cursor: pointer; transition: border-color .18s, transform .18s; }
.ed-thumb:hover { transform: scale(1.04); }
.ed-thumb.on { border-color: var(--coral); }
.ed-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.ed-swatch { aspect-ratio: 1; border-radius: 9px; border: 2px solid var(--line); cursor: pointer; padding: 0;
  transition: transform .18s, border-color .18s; }
.ed-swatch:hover { transform: scale(1.09); }
.ed-swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }

.ed-check { display: flex; gap: 10px; align-items: flex-start; font-size: .76rem; color: var(--muted); line-height: 1.5; margin-bottom: 11px; }
.ed-check input { flex: 0 0 auto; width: 19px; height: 19px; margin-top: 1px; accent-color: var(--coral); }
.ed-progress { height: 21px; border-radius: 999px; background: var(--pink-soft); overflow: hidden; margin-top: 11px; }
.ed-progress-bar { height: 100%; background: linear-gradient(100deg, var(--pink), var(--coral)); color: #fff; font-size: .68rem;
  font-weight: 800; display: grid; place-items: center; transition: width .2s; }
.ed-upload-preview { display: block; max-width: 220px; width: 100%; height: auto; border-radius: 11px; margin: 11px auto 0; }

/* ---------------- Fragen & Antworten ---------------- */
.ed-qa-count { font-size: .76rem; font-weight: 700; color: var(--coral); background: var(--pink-soft); border-radius: 999px; padding: 3px 10px; }
.ed-qa-head, .ed-qa { display: grid; grid-template-columns: 26px minmax(0, 1fr) minmax(0, 150px) 30px; gap: 7px; align-items: start; }
.ed-qa-head { padding: 0 0 6px; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 620px) {
  .ed-qa-head { display: none; }
  .ed-qa { grid-template-columns: 26px minmax(0, 1fr) 30px; }
  .ed-qa .ed-qa-f:nth-of-type(2) { grid-column: 2 / 3; }
}
.ed-qa-list { display: flex; flex-direction: column; gap: 6px; }
.ed-qa { padding: 2px 0; }
.ed-qa-n { font-size: .82rem; font-weight: 800; color: var(--muted); text-align: right; padding-top: 11px; }
.ed-qa-f { min-width: 0; }
.ed-qa-del { width: 30px; height: 38px; border: none; background: none; color: #d8c6ca; font-size: 1.3rem; line-height: 1; cursor: pointer;
  border-radius: 8px; transition: color .18s, background .18s; }
.ed-qa-del:hover { color: var(--coral-deep); background: var(--pink-soft); }
.ed-err { font-size: .72rem; color: var(--coral-deep); margin: 3px 0 0; }
.ed-qa-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ed-dupe { font-size: .78rem; color: #9a7b28; background: #fffaf0; border: 1px solid var(--gold); border-radius: 9px; padding: 7px 11px; margin: 10px 0 0; }
.ed-offers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.ed-offer { padding: 6px 12px; border-radius: 999px; border: 1px dashed var(--line); background: var(--paper-2); color: var(--ink);
  font-size: .8rem; cursor: pointer; text-align: left; transition: border-color .18s, background .18s; }
.ed-offer:hover { border-style: solid; border-color: var(--coral); background: #fff; color: var(--coral-deep); }

/* ---------------- Lösung ---------------- */
.ed-solrow { display: flex; gap: 8px; }
@media (max-width: 560px) { .ed-solrow { flex-direction: column; } }
.ed-solrow .ed-in { text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.ed-solresult:empty { display: none; }
.ed-solresult { margin-top: 10px; display: grid; gap: 5px; }
.ed-msg { font-size: .82rem; border-radius: 9px; padding: 8px 12px; }
.ed-msg-ok { background: #eef8f0; color: #2c6b3f; border: 1px solid #cfe8d6; }
.ed-msg-bad { background: #fdeeec; color: #97372f; border: 1px solid #f6d5d0; }

/* ---------------- Buttons ---------------- */
.ed-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; cursor: pointer;
  font-family: var(--font-sans); font-weight: 800; font-size: .9rem; border-radius: 999px; padding: 11px 22px;
  text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s, color .2s; }
.ed-btn-primary { background: linear-gradient(100deg, var(--pink), var(--coral)); color: #fff !important; box-shadow: 0 12px 26px -12px var(--coral); }
.ed-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 34px -14px var(--coral); color: #fff !important; }
.ed-btn-ghost { background: var(--card); color: var(--ink) !important; border: 1.5px solid var(--line); }
.ed-btn-ghost:hover { border-color: var(--coral); color: var(--coral) !important; }
.ed-btn-block { display: flex; width: 100%; }
.ed-btn[disabled], .ed-btn.disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none; pointer-events: none; }
.ed-btn.busy { pointer-events: none; opacity: .75; }

/* ---------------- Vorschau-Panel: klebt seitlich (Desktop) ---------------- */
.ed-side { position: sticky; top: 94px; }
.ed-panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow-soft); }
.ed-side-bar { display: none; }

/* ---------------- ... und wird mobil zur Leiste am unteren Rand ----------------
   Ohne das läge die Vorschau erst NACH dem gesamten Formular — also wieder
   genau die Blind-Ausfüllen-Schleife der v1, nur auf klein. */
@media (max-width: 1100px) {
  .ed-side { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1020;
    background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -14px 40px -18px rgba(58,42,46,.5); }

  .ed-side-bar { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 14px; min-height: 62px;
    border: none; background: none; cursor: pointer; text-align: left; }
  .ed-side-thumb { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 8px; background: var(--paper-2);
    border: 1px dashed var(--line); overflow: hidden; display: grid; place-items: center; }
  .ed-side-thumb.has-img { border-style: solid; }
  .ed-side-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .ed-side-info { flex: 1 1 auto; display: grid; gap: 1px; min-width: 0; }
  .ed-side-price { font-weight: 800; color: var(--coral); font-size: 1.05rem; }
  .ed-side-price:empty::before { content: "—"; }
  .ed-side-sub { font-size: .74rem; color: var(--muted); }
  .ed-side-chev { flex: 0 0 auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(-135deg); transition: transform .22s; margin-right: 4px; }
  .ed-side.open .ed-side-chev { transform: rotate(45deg); }

  .ed-panel { display: none; border: none; border-radius: 0; box-shadow: none; max-height: 76vh;
    overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 14px 18px; }
  .ed-side.open .ed-panel { display: block; }

  /* Platz schaffen, damit die Leiste nichts verdeckt. */
  .ed-wrap { padding-bottom: 86px; }

  /* iOS zoomt beim Fokus in jedes Feld unter 16px hinein und verschiebt dabei
     das Layout — deshalb hier hart 16px. */
  .ed-in, .ed-sel, .ed-pick-btn, .ed-qa .q, .ed-qa .a { font-size: 16px; }
  .ed-in-styled { font-size: 1.18rem; }

  /* Fingerfreundlichere Ziele. */
  .ed-chip { padding: 10px 16px; }
  .ed-qa-del { width: 34px; height: 42px; font-size: 1.45rem; }
  .ed-swatch { border-radius: 10px; }

}

.ed-preview { position: relative; border-radius: 13px; background: var(--paper-2); border: 1px dashed var(--line); overflow: hidden;
  min-height: 260px; display: grid; place-items: center; margin-bottom: 11px; }
.ed-preview img { display: block; width: 100%; height: auto; border-radius: 12px; }
.ed-preview-empty { text-align: center; padding: 28px 20px; color: var(--muted); }
.ed-preview-empty p { font-weight: 700; color: var(--ink); margin: 9px 0 3px; font-size: .9rem; }
.ed-preview-empty small { font-size: .74rem; display: block; line-height: 1.5; }
.ed-preview-ico { display: block; width: 38px; height: 38px; margin: 0 auto; border-radius: 9px; background: var(--pink-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23E36159'%3E%3Cpath d='M6.002 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z'/%3E%3Cpath d='M1.5 2A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h13a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 14.5 2h-13zm13 1a.5.5 0 0 1 .5.5v6l-3.775-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062L1 12.5v-9a.5.5 0 0 1 .5-.5h13z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 20px; }

/* Vorschau ist veraltet, sobald sich ein Feld ändert — ehrlicher als eine
   automatische Neuberechnung, die 30 s dauern würde. */
.ed-preview.stale img { opacity: .4; filter: grayscale(.6); }
.ed-preview.stale::after { content: "Einstellung geändert — Vorschau neu erstellen"; position: absolute; inset: auto 0 0 0;
  background: rgba(74, 56, 60, .88); color: #fff; font-size: .72rem; font-weight: 700; text-align: center; padding: 7px 10px; }
.ed-preview.busy::before { content: ""; position: absolute; inset: 0; z-index: 2; background: rgba(255, 252, 251, .72); }
.ed-preview.busy::after { content: ""; position: absolute; z-index: 3; top: 50%; left: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border: 3px solid var(--pink-soft); border-top-color: var(--coral); border-radius: 50%; animation: ed-spin .7s linear infinite; }
@keyframes ed-spin { to { transform: rotate(360deg); } }

.ed-preview-note { font-size: .69rem; color: var(--muted); line-height: 1.45; margin: 8px 0 13px; text-align: center; }

/* ---------------- Checkliste ---------------- */
.ed-checklist { list-style: none; margin: 0 0 13px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: grid; gap: 6px; }
.ed-checklist li { display: flex; align-items: center; gap: 9px; font-size: .82rem; color: var(--muted); }
.ed-checklist li.ok { color: var(--ink); }
.ed-tick { flex: 0 0 auto; width: 16px; height: 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper);
  position: relative; transition: background .18s, border-color .18s; }
.ed-checklist li.ok .ed-tick { background: #4caf7d; border-color: #4caf7d; }
.ed-checklist li.ok .ed-tick::after { content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ---------------- Preise ---------------- */
.ed-prices { margin-bottom: 13px; }
.ed-product, .ed-delivery { font-size: .74rem; color: var(--muted); margin: 0 0 4px; line-height: 1.45; }
.ed-product strong, .ed-delivery strong { color: var(--ink); }
/* Österreich-Hinweis: sichtbar, aber dem Hauptdatum untergeordnet. */
.ed-delivery-at { display: inline-block; margin-top: 2px; color: var(--coral); }
.ed-price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .82rem; color: var(--muted); padding: 3px 0; }
.ed-price-row strong { color: var(--ink); font-weight: 700; }
.ed-price-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 800; color: var(--ink); }
.ed-price-total strong { font-size: 1.32rem; color: var(--coral); font-weight: 800; }
.ed-checkout-hint { font-size: .69rem; color: var(--muted); text-align: center; margin: 8px 0 0; line-height: 1.45; }
.ed-checkout-hint:empty { display: none; }

/* GPSR/EU-Angaben (Hersteller, Produktsicherheit, EU-Label) im Zusammenfassungs-Panel */
.ed-gpsr { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ed-gpsr > summary { cursor: pointer; list-style: none; padding: 11px 14px; font-size: .82rem; font-weight: 700;
  color: var(--ink); display: flex; align-items: center; gap: 8px; }
.ed-gpsr > summary::-webkit-details-marker { display: none; }
.ed-gpsr > summary::after { content: "\203A"; margin-left: auto; font-size: 1.1em; color: var(--muted); transition: transform .2s; }
.ed-gpsr[open] > summary::after { transform: rotate(90deg); }
.ed-gpsr-in { padding: 10px 14px 12px; border-top: 1px solid var(--line); font-size: .78rem; line-height: 1.5; color: var(--muted); }
.ed-gpsr-in p { margin: 0 0 8px; }
.ed-gpsr-in p:last-child { margin-bottom: 0; }
.ed-gpsr-in strong { color: var(--ink); }
.ed-gpsr-in a { color: var(--coral-deep); text-decoration: underline; }
.ed-eu { color: var(--ink); font-weight: 600; }
.ed-eu-tag { display: inline-block; background: #003399; color: #ffcc00; font-weight: 800; font-size: .7rem;
  letter-spacing: .06em; padding: 2px 7px; border-radius: 5px; margin-right: 5px; }

/* ---------------- Info-Popover ---------------- */
.ed-info-pop { position: absolute; z-index: 1050; max-width: 320px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--pink);
  border-radius: 13px; box-shadow: var(--shadow-soft); padding: 14px 34px 14px 15px; font-size: .8rem; color: var(--ink); line-height: 1.55; }
.ed-info-pop a { color: var(--coral); }
.ed-info-x { position: absolute; top: 6px; right: 8px; border: none; background: none; color: var(--muted); font-size: 1.15rem;
  line-height: 1; cursor: pointer; padding: 3px; }
.ed-info-x:hover { color: var(--ink); }

/* ---------------- Fehler-Modal bei „Vorschau erstellen" ---------------- */
.ed-errmodal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(40, 24, 28, .55); animation: ed-errfade .18s ease; }
@keyframes ed-errfade { from { opacity: 0; } to { opacity: 1; } }
.ed-errmodal-card { position: relative; background: #fff; border-radius: 18px; max-width: 470px; width: 100%;
  padding: 32px 30px 26px; box-shadow: 0 24px 60px rgba(30, 16, 20, .35); text-align: center;
  animation: ed-errpop .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes ed-errpop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.ed-errmodal-ic { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--coral) 18%, #fff); color: var(--coral-deep); font-size: 30px; font-weight: 800;
  font-family: var(--font-serif, serif); line-height: 1; }
.ed-errmodal-card h3 { margin: 0 0 6px; font-size: 1.22rem; color: var(--ink); font-weight: 800; }
.ed-errmodal-sub { margin: 0 0 18px; color: var(--muted); font-size: .92rem; }
.ed-errmodal-list { text-align: left; margin: 0 0 22px; padding: 0; list-style: none; display: grid; gap: 9px; }
.ed-errmodal-list li { position: relative; padding: 11px 14px 11px 42px; border: 1px solid var(--line); border-radius: 12px;
  background: color-mix(in srgb, var(--pink) 12%, #fff); font-size: .9rem; color: var(--ink); line-height: 1.45; }
.ed-errmodal-list li::before { content: "!"; position: absolute; left: 13px; top: 11px; width: 19px; height: 19px;
  border-radius: 50%; background: var(--coral); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.ed-errmodal-x { position: absolute; top: 12px; right: 15px; background: none; border: 0; font-size: 1.6rem; line-height: 1;
  color: var(--muted); cursor: pointer; }
.ed-errmodal-x:hover { color: var(--ink); }
.ed-errmodal-ok { min-width: 150px; justify-content: center; }

/* ---------------- Entwurf-wiederhergestellt-Hinweis ---------------- */
.ed-restored { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px;
  padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--pink, #FEA794) 30%, #fff);
  border: 1px solid var(--line, #ecd9de); font-size: .9rem; color: var(--ink, #2b2b2b); }
.ed-restored-txt { flex: 1 1 auto; }
.ed-restored-new { border: 1px solid var(--coral-deep, #E36159); background: #fff; color: var(--coral-deep, #E36159);
  font-weight: 700; font-size: .82rem; border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.ed-restored-new:hover { background: var(--coral-deep, #E36159); color: #fff; }
.ed-restored-x { border: none; background: none; font-size: 1.3rem; line-height: 1; color: var(--muted, #7a6a6f);
  cursor: pointer; padding: 0 4px; }
.ed-restored-x:hover { color: var(--ink, #2b2b2b); }

/* Test-/Demo-Leiste (CSS) für den Go-Live entfernt. */
