/* KaDaWerk – Selbst gestalten (konzepte/kadawerk-seite/KONFIGURATOR.md)
   Handy zuerst: Vorschau oben fest, ein Schritt nach dem anderen, Leiste unten.
   Ab 900 px: Vorschau links, Schritte rechts. Farben/Tokens aus stil.css. */

/* Schriften für die Muster (Teilmengen der Generator-Schriften, Latein + Umlaute) */
@font-face { font-family: "kw-pacifico"; src: url("schriften/pacifico.woff") format("woff"); font-display: swap; }
@font-face { font-family: "kw-grandhotel"; src: url("schriften/grandhotel.woff") format("woff"); font-display: swap; }
@font-face { font-family: "kw-damion"; src: url("schriften/damion.woff") format("woff"); font-display: swap; }
@font-face { font-family: "kw-lobster"; src: url("schriften/lobster.woff") format("woff"); font-display: swap; }
@font-face { font-family: "kw-courgette"; src: url("schriften/courgette.woff") format("woff"); font-display: swap; }
@font-face { font-family: "kw-cookie"; src: url("schriften/cookie.woff") format("woff"); font-display: swap; }
@font-face { font-family: "kw-norican"; src: url("schriften/norican.woff") format("woff"); font-display: swap; }
@font-face { font-family: "kw-dancingscript"; src: url("schriften/dancingscript.woff") format("woff"); font-display: swap; }
@font-face { font-family: "kw-satisfy"; src: url("schriften/satisfy.woff") format("woff"); font-display: swap; }
@font-face { font-family: "kw-fredoka"; src: url("schriften/fredoka.woff") format("woff"); font-display: swap; }
@font-face { font-family: "kw-chewy"; src: url("schriften/chewy.woff") format("woff"); font-display: swap; }
@font-face { font-family: "kw-lilitaone"; src: url("schriften/lilitaone.woff") format("woff"); font-display: swap; }
.schrift-pacifico { font-family: "kw-pacifico", cursive; }
.schrift-grandhotel { font-family: "kw-grandhotel", cursive; }
.schrift-damion { font-family: "kw-damion", cursive; }
.schrift-lobster { font-family: "kw-lobster", cursive; }
.schrift-courgette { font-family: "kw-courgette", cursive; }
.schrift-cookie { font-family: "kw-cookie", cursive; }
.schrift-norican { font-family: "kw-norican", cursive; }
.schrift-dancingscript { font-family: "kw-dancingscript", cursive; }
.schrift-satisfy { font-family: "kw-satisfy", cursive; }
.schrift-fredoka { font-family: "kw-fredoka", sans-serif; }
.schrift-chewy { font-family: "kw-chewy", cursive; }
.schrift-lilitaone { font-family: "kw-lilitaone", sans-serif; }

body.seite-gestalten { padding-bottom: 84px; }
.gestalten [hidden] { display: none !important; }
.nur-leser { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.leise { font-weight: 400; color: var(--grau); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--terra-dunkel); font-weight: 600; text-decoration: underline; cursor: pointer; }

.gestalten { max-width: 1120px; margin: 0 auto; }

/* ── Vorschau ── */
.gestalten__vorschau { position: sticky; top: 0; z-index: 10; background: var(--creme); border-bottom: 1px solid var(--linie); }
.vorschau { position: relative; height: clamp(190px, 34vh, 300px); }
.vorschau__bild { position: absolute; inset: 30px 16px 40px; display: flex; align-items: center; justify-content: center;
  --kp-platte: #ccc; --kp-rahmen: #eee; --kp-name: #eee; --kp-deko: #eee; }
.vorschau__bild svg, .vorschau__bild img { max-width: 100%; max-height: 100%; width: auto; height: 100%; filter: drop-shadow(0 4px 8px rgba(40, 40, 44, .22)); }
.vorschau__bild img { object-fit: contain; }
.vorschau__bild svg .kp-platte { fill: var(--kp-platte); }
.vorschau__bild svg .kp-rahmen { fill: var(--kp-rahmen); }
.vorschau__bild svg .kp-name { fill: var(--kp-name); }
.vorschau__bild svg .kp-deko { fill: var(--kp-deko); }
.vorschau__marke { position: absolute; left: 12px; top: 10px; font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--grau); background: var(--papier); padding: 3px 9px; border-radius: 999px; }
.vorschau__variante { position: absolute; left: 12px; bottom: 10px; font-size: .85rem; font-weight: 600;
  background: var(--papier); padding: 4px 11px; border-radius: 999px; }
.vorschau__preis { position: absolute; right: 12px; bottom: 8px; font-weight: 700; color: var(--terra-dunkel);
  background: var(--terra-hell); padding: 5px 13px; border-radius: 999px; }
.vorschau__lade { position: absolute; right: 14px; top: 12px; }
.vorschau__lade span { display: block; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--linie);
  border-top-color: var(--terra-dunkel); animation: kw-dreh .8s linear infinite; }
@keyframes kw-dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vorschau__lade span { animation: none; } }
.vorschau__hinweis { margin: 0; padding: 8px 16px 10px; font-size: .88rem; color: var(--grau); }
.vorschau__hinweis--warn { color: var(--terra-dunkel); }

/* ── Schritte ── */
.gestalten__schritte { padding: 0 16px 24px; }
.stufen { list-style: none; display: flex; gap: 4px; padding: 12px 0; margin: 0 0 4px; border-bottom: 1px solid var(--linie);
  overflow-x: auto; scrollbar-width: none; }
.stufen::-webkit-scrollbar { display: none; }
.stufen button { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 6px 8px;
  font: inherit; font-size: .92rem; color: var(--grau); cursor: pointer; border-radius: 999px; min-height: 40px; }
.stufen button span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--linie); font-size: .8rem; font-weight: 700; }
.stufen button[aria-current] { color: var(--anthrazit); font-weight: 700; }
.stufen button[aria-current] span { background: var(--terra-dunkel); border-color: var(--terra-dunkel); color: #fff; }
.stufen button.erledigt { color: var(--anthrazit); }
.stufen button.erledigt span { background: var(--terra-hell); border-color: var(--terra-hell); color: var(--terra-dunkel); }
.schritt { padding-top: 14px; }
.schritt__titel { font-size: 1.35rem; margin: 4px 0 12px; }
.schritt__frage { font-size: 1.08rem; margin: 22px 0 10px; }
.klein-titel { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--grau); margin: 18px 0 8px; }

/* Formen */
.formen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.formen + .formen { margin-top: 8px; }
.formkachel { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--creme); border: 2px solid transparent; border-radius: 14px; padding: 8px 4px 9px; cursor: pointer; text-align: center; }
.formkachel img { width: 100%; max-width: 76px; height: 64px; object-fit: contain; }
.formkachel span { font-size: .82rem; font-weight: 600; line-height: 1.15; }
.formkachel.gewaehlt, .formkachel:has(input:checked) { border-color: var(--terra-dunkel); background: var(--terra-hell); }
.formkachel.gewaehlt span { color: var(--terra-dunkel); }

/* Felder: alle Auswahlknöpfe sind echte Radios, unsichtbar über der Fläche */
.formkachel input, .wahl input, .chip input, .segment input, .tupfer input {
  position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.formkachel:focus-within, .wahl:focus-within, .chip:focus-within, .segment:focus-within, .tupfer:focus-within {
  outline: 3px solid rgba(163, 70, 43, .35); outline-offset: 2px; }

.mehr-knopf { display: block; width: 100%; margin-top: 8px; min-height: 42px; background: var(--papier);
  border: 1.5px solid var(--linie); border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.mehr-knopf:hover { border-color: var(--anthrazit); }

.segmente { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--creme);
  border-radius: 14px; padding: 4px; }
.segment { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 52px; border-radius: 11px; border: 2px solid transparent; cursor: pointer; text-align: center; padding: 4px; }
.segment span { font-weight: 600; }
.segment small { font-size: .74rem; color: var(--grau); min-height: 1em; }
.segment.gewaehlt, .segment:has(input:checked) { background: var(--papier); border-color: var(--terra-dunkel); }
.segment.gewaehlt span { font-weight: 700; }

/* Name */
.feld { position: relative; display: block; background: var(--papier); border: 1.5px solid var(--linie); border-radius: 14px;
  padding: 8px 64px 8px 14px; margin-bottom: 8px; }
.feld:focus-within { border-color: var(--terra-dunkel); box-shadow: 0 0 0 3px rgba(163, 70, 43, .15); }
.feld__label { display: block; font-size: .76rem; font-weight: 600; color: var(--grau); }
.feld input { width: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.15rem; font-weight: 600;
  padding: 2px 0; color: var(--anthrazit); }
.feld input:disabled { color: var(--grau); }
.feld__zaehler { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: .82rem; color: var(--grau); }
.feld__hinweis { font-size: .86rem; color: var(--grau); margin: 2px 2px 6px; }
.feld__hinweis--warn, .feld__fehler { color: var(--terra-dunkel); font-weight: 600; }
.feld__fehler { font-size: .9rem; margin: -2px 2px 10px; }

/* Schriften */
.wahlen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.wahlen + .wahlen { margin-top: 8px; }
.wahl { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 64px; justify-content: center;
  background: var(--papier); border: 1.5px solid var(--linie); border-radius: 14px; padding: 6px 12px; cursor: pointer; overflow: hidden; }
.wahl .muster { font-size: 1.45rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wahl__klein { font-size: .74rem; color: var(--grau); }
.wahl.gewaehlt, .wahl:has(input:checked) { border: 2px solid var(--terra-dunkel); background: var(--terra-hell); padding: 5.5px 11.5px; }
.wahl.gewaehlt .wahl__klein { color: var(--terra-dunkel); }

/* Deko */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips + .chips { margin-top: 8px; }
.chip { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--papier); border: 1.5px solid var(--linie); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; }
.chip.gewaehlt, .chip:has(input:checked) { background: var(--terra-hell); border-color: var(--terra-dunkel); color: var(--terra-dunkel); }
.chip--mehr { color: var(--grau); }

/* Farben */
.kombis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.kombi { display: flex; flex-direction: column; gap: 3px; text-align: left; background: var(--papier); border: 1.5px solid var(--linie);
  border-radius: 14px; padding: 9px 12px; font: inherit; font-size: .86rem; cursor: pointer; color: var(--grau); }
.kombi__zeile { display: flex; align-items: center; gap: 8px; }
.kombi__zeile:first-child { color: var(--anthrazit); font-weight: 600; }
.kombi__punkt { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(40, 40, 44, .25); flex: none; }
.kombi.gewaehlt { border: 2px solid var(--terra-dunkel); background: var(--terra-hell); padding: 8.5px 11.5px; }

.eigene { margin-top: 12px; border: 1.5px solid var(--linie); border-radius: 14px; background: var(--papier); }
.eigene summary { cursor: pointer; padding: 12px 14px; font-weight: 600; color: var(--terra-dunkel); list-style-position: inside; }
.farbreihe { border: 0; margin: 0; padding: 4px 14px 12px; }
.farbreihe legend { font-size: .86rem; color: var(--grau); padding: 0; margin-bottom: 6px; }
.farbreihe legend strong { color: var(--anthrazit); }
.tupfer-reihe { display: flex; flex-wrap: wrap; gap: 8px; }
.tupfer { position: relative; display: inline-flex; padding: 3px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.tupfer__farbe { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(40, 40, 44, .25); }
.tupfer.gewaehlt, .tupfer:has(input:checked) { border-color: var(--terra-dunkel); }

/* Schritt 4 */
.karte-etsy { background: var(--papier); border: 1.5px solid var(--linie); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.karte-etsy h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0 0 6px; }
.karte-etsy h2 span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--terra-dunkel); color: #fff; font-size: .78rem; }
.angaben { margin: 0; }
/* eine Zeile je Feld: Bezeichnung wie bei Etsy | Wert – passt am Handy auf einen Screenshot */
.angaben div { display: grid; grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr); align-items: center; gap: 0 10px;
  padding: 5px 0; border-top: 1px solid var(--linie); }
.angaben div:first-child { border-top: 0; }
.angaben dt { font-size: .8rem; line-height: 1.2; color: var(--grau); }
.angaben dd { margin: 0; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.kopieren-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 12px 0 6px; }
.etsy-einleitung { margin: 0 0 12px; }
.karte-etsy p { margin: 0; font-size: .95rem; }
/* Entwurf: großer Knopf, darunter der Text, der kopiert wird (ein Tipp markiert alles) */
.karte-etsy .knopf--breit { margin: 4px 0 8px; }
.karte-etsy .knopf:disabled { opacity: .45; cursor: default; }
.karte-etsy p.entwurf-weg { margin-bottom: 8px; }
.karte-etsy p.entwurf-text { padding: 8px 10px; border-radius: 10px; background: var(--creme); color: var(--grau);
  font-size: .82rem; line-height: 1.4; overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; }
.feld-fuer-feld { margin-top: 10px; border-top: 1px solid var(--linie); padding-top: 8px; }
.feld-fuer-feld summary { cursor: pointer; padding: 4px 0; font-weight: 600; color: var(--terra-dunkel); }
.karte-etsy .feld-fuer-feld p.klein { margin: 4px 0 8px; font-size: .85rem; color: var(--grau); }
.karte-etsy--danach { background: var(--creme); }
.karte-etsy--danach h2 span { background: var(--anthrazit); }

/* Leiste unten */
.leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--papier); border-top: 1px solid var(--linie);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.leiste__innen { display: flex; gap: 10px; max-width: 1120px; margin: 0 auto; }
.leiste__zurueck { flex: none; width: 52px; padding: 0; font-size: 1.4rem; }
.leiste__weiter { flex: 1; }

/* Computer: Vorschau links, Schritte rechts */
@media (min-width: 900px) {
  .gestalten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding: 24px 24px 0; align-items: start; }
  .gestalten__vorschau { top: 16px; border: 1px solid var(--linie); border-radius: 18px; overflow: hidden; }
  .vorschau { height: min(62vh, 520px); }
  .vorschau__bild { inset: 44px 32px 56px; }
  .gestalten__schritte { padding: 0 0 24px; }
  .formen { grid-template-columns: repeat(3, 1fr); }
  .leiste { position: sticky; bottom: 0; grid-column: 2; border: 0; padding: 12px 0 18px; background: linear-gradient(transparent, var(--creme) 30%); }
  body.seite-gestalten { padding-bottom: 0; }
}
