/* KÜBLER Fotobox. Ruhige, helle Oberfläche wie eine Handy-App: ein Schritt je Ansicht, ein Hauptknopf unten.
   Farben der Marke: Rot #FF0032, Blau #003170. DIN Pro mit Systemschrift als Ersatz (keine Schriftdateien im
   Repository). Abweichung vom Design System auf Wunsch (26.11.2026): weiche Ecken statt eckig. Mobil zuerst. */
:root {
  --rot: #FF0032;
  --blau: #003170;
  --text: #1d1d1f;
  --leise: #6e6e73;
  --grund: #f5f5f7;
  --flaeche: #ffffff;
  --linie: #d2d2d7;
  --rund: 22px;
  --schrift: "DIN Pro", "DINPro", "DIN Next LT Pro", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Kopf: schmal, durchscheinend, bleibt oben */
.kopf {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: calc(6px + env(safe-area-inset-top)) 16px 6px;
  background: rgba(245, 245, 247, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.marke { display: flex; align-items: baseline; gap: 8px; flex: 1; }
.marke b { font-size: 19px; font-weight: 800; letter-spacing: 0.05em; color: var(--blau); }
.marke span { font-size: 15px; color: var(--leise); }
.zurueck {
  appearance: none; -webkit-appearance: none;
  width: 40px; height: 40px; margin-left: -10px; padding: 8px;
  border: 0; border-radius: 50%; background: none; color: var(--blau); cursor: pointer;
}
.zurueck svg, .zeile svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fortschritt { display: flex; gap: 5px; }
.fortschritt i { width: 22px; height: 4px; border-radius: 2px; background: var(--linie); transition: background 0.3s, width 0.3s; }
.fortschritt i.an { background: var(--blau); }
.fortschritt i.jetzt { width: 34px; background: var(--rot); }

main { max-width: 560px; margin: 0 auto; padding: 20px 20px 8px; }

h1 { font-size: 34px; line-height: 1.08; letter-spacing: -0.01em; font-weight: 800; margin: 0 0 10px; }
h2 { font-size: 22px; line-height: 1.15; font-weight: 800; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.auge { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rot); }
.unter { color: var(--leise); font-size: 18px; margin-bottom: 20px; }
.klein { color: var(--leise); font-size: 14px; text-align: center; }

.schritt { animation: rein 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes rein { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.testhinweis { background: #fff6d6; border-radius: 14px; padding: 10px 14px; font-size: 14px; font-weight: 600; color: #6b5200; }
.blatt { background: var(--flaeche); border-radius: var(--rund); padding: 22px; box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06); }

/* Auswahl Frau / Mann */
.tabs { display: flex; padding: 3px; margin-bottom: 16px; background: #e8e8ed; border-radius: 12px; }
.tabs button {
  appearance: none; -webkit-appearance: none; flex: 1; min-height: 40px; border: 0; border-radius: 10px;
  background: none; color: var(--text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.tabs button[aria-selected="true"] { background: var(--flaeche); box-shadow: 0 1px 3px rgba(0,0,0,0.14); }

/* Motivkarten */
.karten { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.motivkarte {
  appearance: none; -webkit-appearance: none;
  position: relative; display: block; width: 100%; padding: 0; margin: 0; overflow: hidden;
  border: 0; border-radius: var(--rund); background: #e8e8ed; color: #fff; font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 8px 22px rgba(0,0,0,0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.motivkarte:active { transform: scale(0.97); }
.motivkarte img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.motivkarte .titel {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.62));
  font-size: 16px; font-weight: 700;
}
.motivkarte .haken {
  position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--rot); display: none; align-items: center; justify-content: center;
}
.motivkarte .haken::after { content: ""; width: 12px; height: 7px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.motivkarte[aria-checked="true"] { box-shadow: 0 0 0 4px var(--rot), 0 10px 26px rgba(0,0,0,0.14); }
.motivkarte[aria-checked="true"] .haken { display: flex; }

/* Zeile „Lieber ohne KI?“ */
.zeile {
  appearance: none; -webkit-appearance: none;
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 16px; padding: 16px 16px 16px 18px;
  border: 0; border-radius: 18px; background: var(--flaeche); color: var(--leise); font: inherit; font-size: 15px; text-align: left; cursor: pointer;
}
.zeile span { flex: 1; }
.zeile b { display: block; color: var(--text); font-size: 17px; font-weight: 600; }
.zeile svg { width: 20px; height: 20px; flex: none; color: var(--linie); }
.zeile[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--rot); }

/* Schritt 2: Motiv und Selfie nebeneinander als kleine Bühne */
.buehne { position: relative; width: min(72%, 280px); margin: 6px auto 34px; }
.buehne-motiv, .buehne-rahmen {
  display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--rund);
  box-shadow: 0 12px 34px rgba(0,0,0,0.16);
}
.buehne-rahmen { display: flex; align-items: flex-end; padding: 0 16px 14px; background: var(--grund); border: 12px solid var(--blau); border-bottom-width: 54px; color: var(--blau); font-weight: 800; }
.selfie {
  position: absolute; right: -22px; bottom: -22px; width: 46%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: var(--flaeche); border: 4px solid var(--flaeche); box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  display: flex; align-items: center; justify-content: center;
}
.selfie img { width: 100%; height: 100%; object-fit: cover; }
.selfie svg { width: 58%; height: 58%; fill: none; stroke: var(--linie); stroke-width: 1.6; stroke-linecap: round; }
.selfie.da { border-color: var(--rot); }

/* Knöpfe */
.knopf {
  appearance: none; -webkit-appearance: none;
  display: block; width: 100%; min-height: 56px; padding: 14px 18px;
  border: 0; border-radius: 16px; background: var(--rot); color: #fff;
  font: inherit; font-size: 18px; font-weight: 700; text-align: center; cursor: pointer;
  transition: transform 0.15s ease, background 0.2s, color 0.2s;
}
.knopf:active { transform: scale(0.98); }
.knopf:disabled { background: #e8e8ed; color: #86868b; cursor: default; transform: none; }
.knopf.zweit { background: #e8e8ed; color: var(--blau); }
.textlink { display: block; width: 100%; background: none; border: 0; padding: 12px 0; color: var(--blau); font: inherit; font-size: 16px; font-weight: 600; text-align: center; cursor: pointer; }
.mittig { margin-top: 8px; }
.knopf:focus-visible, .textlink:focus-visible, .feld:focus-visible, .motivkarte:focus-visible, .zeile:focus-visible, .tabs button:focus-visible, .zurueck:focus-visible { outline: 3px solid var(--blau); outline-offset: 3px; }

.versteckt { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }

.mehr { text-align: center; }
.mehr summary { display: inline-block; list-style: none; cursor: pointer; padding: 10px; color: var(--leise); font-size: 15px; }
.mehr summary::-webkit-details-marker { display: none; }

.feld-label { display: block; font-size: 14px; font-weight: 600; color: var(--leise); margin-bottom: 6px; }
.feld { display: block; width: 100%; min-height: 54px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--linie); border-radius: 14px; background: var(--flaeche); color: var(--text); font: inherit; font-size: 19px; }

.meldung { background: #fff0f3; border-radius: var(--rund); padding: 18px; margin-bottom: 14px; }
p.meldung { padding: 12px 14px; border-radius: 14px; font-size: 15px; }
.meldung .knopf { margin-top: 6px; background: var(--flaeche); }

/* Warten */
.warten { text-align: center; }
.warte-bild { position: relative; width: min(72%, 280px); margin: 6px auto 26px; border-radius: var(--rund); overflow: hidden; box-shadow: 0 12px 34px rgba(0,0,0,0.16); }
.warte-bild img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; filter: blur(10px) saturate(0.8); transform: scale(1.12); }
.schimmer { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.5) 50%, transparent 70%); background-size: 220% 100%; animation: schimmer 1.9s linear infinite; }
@keyframes schimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.ring { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.45); border-top-color: #fff; animation: dreh 0.9s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }

/* Ergebnis */
.ergebnis { text-align: center; }
#ergebnis-bild { display: block; width: 100%; height: auto; margin-top: 8px; border-radius: var(--rund); box-shadow: 0 14px 40px rgba(0,0,0,0.18); animation: auf 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes auf { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
.danach { margin-top: 4px; }
.tabs.format { margin: 18px 0 10px; }

/* Textvorschlag für den Beitrag */
.beitrag { margin-top: 26px; background: var(--flaeche); border-radius: var(--rund); padding: 20px; }
.beitrag .unter { font-size: 16px; margin-bottom: 14px; }
.wahl { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.wahl button { appearance: none; -webkit-appearance: none; min-height: 40px; padding: 8px 16px; border: 0; border-radius: 20px; background: #e8e8ed; color: var(--text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.wahl button[aria-checked="true"] { background: var(--blau); color: #fff; }
/* Schalter „Mit Vertriebstext“ */
.wahl.schalterzeile { flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; }
.wahl .schalter { position: relative; flex: none; width: 52px; min-height: 0; height: 32px; padding: 0; border-radius: 16px; background: #d2d2d7; transition: background 0.2s; }
.wahl .schalter::after { content: ""; position: absolute; left: 2px; top: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.25); transition: transform 0.2s; }
.wahl .schalter[aria-checked="true"] { background: #34c759; }
.wahl .schalter[aria-checked="true"]::after { transform: translateX(20px); }
.beitragstext { font-size: 15px; line-height: 1.45; min-height: 240px; resize: vertical; background: var(--grund); border-color: transparent; }

.fuss { height: 120px; }

/* Kameraansicht mit Oval */
.kamera { position: fixed; inset: 0; z-index: 20; background: #000; overflow: hidden; }
.kamera video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.oval {
  position: absolute; left: 50%; top: 44%; width: min(64vw, 46vh, 320px); aspect-ratio: 3 / 4;
  transform: translate(-50%, -50%); border-radius: 50%; border: 3px solid rgba(255,255,255,0.95);
  box-shadow: 0 0 0 200vmax rgba(0,0,0,0.5); pointer-events: none;
}
.kamera-tipp {
  position: absolute; left: 0; right: 0; top: calc(18px + env(safe-area-inset-top)); margin: 0; padding: 0 64px;
  color: #fff; font-size: 18px; font-weight: 700; text-align: center; text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}
.kamera-zu {
  appearance: none; -webkit-appearance: none; position: absolute; right: 14px; top: calc(10px + env(safe-area-inset-top));
  width: 44px; height: 44px; padding: 11px; border: 0; border-radius: 50%; background: rgba(255,255,255,0.22); color: #fff; cursor: pointer;
}
.kamera-zu svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.ausloeser {
  appearance: none; -webkit-appearance: none; position: absolute; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom));
  width: 76px; height: 76px; margin-left: -38px; border-radius: 50%; border: 5px solid rgba(255,255,255,0.55);
  background: #fff; background-clip: padding-box; cursor: pointer; transition: transform 0.12s ease;
}
.ausloeser:active { transform: scale(0.92); }
.ausloeser:focus-visible, .kamera-zu:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* Leiste unten mit dem einen Hauptknopf */
.leiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: rgba(245, 245, 247, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.leiste .knopf { max-width: 520px; margin: 0 auto; }

@media (min-width: 620px) {
  h1 { font-size: 40px; }
  .karten { grid-template-columns: repeat(4, 1fr); }
  main { max-width: 760px; }
  .leiste .knopf { max-width: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  .schritt, #ergebnis-bild, .schimmer, .ring { animation: none; }
  .motivkarte, .knopf { transition: none; }
}
