/* Bestellseite – gleiche Farben und Schrift wie die Otto-App (web/app.css), mobil zuerst. */
:root {
  --akzent: #0f6e8c;
  --akzent-text: var(--akzent);
  --auf-akzent: #fff;
  --grund: #f3f5f6;
  --flaeche: #ffffff;
  --flaeche-2: #eef2f4;
  --text: #17222a;
  --text-2: #55636d;
  --linie: #dbe2e6;
  --rot: #c62828;
  --rot-flaeche: #fdecea;
  --gruen: #2e7d32;
  --gruen-flaeche: #e8f5e9;
  --schatten: 0 1px 2px rgb(16 32 40 / .06), 0 4px 14px rgb(16 32 40 / .06);
  --rund: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --akzent-text: color-mix(in srgb, var(--akzent) 55%, #fff);
    --grund: #0f1519;
    --flaeche: #172026;
    --flaeche-2: #1f2a31;
    --text: #e6edf1;
    --text-2: #9aa9b2;
    --linie: #2a363e;
    --rot: #ef5350;
    --rot-flaeche: #3a1b1b;
    --gruen: #66bb6a;
    --gruen-flaeche: #1b3320;
    --schatten: 0 1px 2px rgb(0 0 0 / .4);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button, textarea, input, select { font: inherit; color: inherit; }
a { color: var(--akzent-text); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Kopf ---------- */
.kopf {
  background: var(--flaeche);
  border-bottom: 1px solid var(--linie);
  padding-top: env(safe-area-inset-top);
}
.kopf-zeile {
  display: flex; align-items: center; gap: 10px;
  max-width: 720px; margin: 0 auto;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
}
.logo {
  flex: none; width: 36px; height: 36px; border-radius: 10px;
  background: var(--akzent); color: var(--auf-akzent);
  display: grid; place-items: center; font-weight: 800; font-size: 20px;
}
.marke-name { font-weight: 700; font-size: 17px; line-height: 1.2; }
.unterzeile { font-size: 13px; color: var(--text-2); }

/* ---------- Seite ---------- */
.seite {
  max-width: 720px; margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left));
}
.einleitung h1 { font-size: 24px; line-height: 1.25; margin: 6px 0 6px; }
.einleitung p { margin: 0 0 16px; color: var(--text-2); }
form { display: block; }
.sperre { display: grid; gap: 16px; margin: 0; padding: 0; border: 0; min-width: 0; }
.sperre:disabled .karte { opacity: .7; }
.pruefung { margin-bottom: 16px; }
.balken.laufend > div { width: 35%; animation: hin 1.6s ease-in-out infinite alternate; }
@keyframes hin { from { transform: translateX(0); } to { transform: translateX(185%); } }
@media (prefers-reduced-motion: reduce) { .balken.laufend > div { animation: none; width: 100%; opacity: .4; } }

.karte {
  background: var(--flaeche); border-radius: var(--rund); box-shadow: var(--schatten);
  border: 1px solid var(--linie);
}
.karte-kopf { display: flex; align-items: center; gap: 10px; padding: 16px 16px 4px; }
.karte-kopf h2 { font-size: 19px; margin: 0; }
.nr {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--flaeche-2); color: var(--akzent-text);
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.felder { display: grid; gap: 14px; padding: 10px 16px 18px; }
.text { margin: 0; color: var(--text-2); }

/* ---------- Felder ---------- */
.feld { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.feld > label, .feld > legend { font-weight: 600; font-size: 15px; padding: 0; }
.feld-paar { display: grid; grid-template-columns: 1fr; gap: 14px; }
.optional { font-weight: 400; color: var(--text-2); }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px;
  font-size: 17px;
}
textarea { resize: vertical; line-height: 1.4; }
input:focus-visible, textarea:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--akzent) 45%, transparent); outline-offset: 1px;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--text-2) 70%, transparent); }
.feld.ungueltig input, .feld.ungueltig textarea { border-color: var(--rot); }
.hilfe { margin: 0; font-size: 14px; color: var(--text-2); }
.hilfe.zentriert { text-align: center; }
.fehler { margin: 0; font-size: 14px; color: var(--rot); font-weight: 600; }

.wahl, .haken {
  display: flex; align-items: flex-start; gap: 12px; min-height: 48px;
  padding: 12px; border: 1px solid var(--linie); border-radius: 10px; cursor: pointer;
}
.wahl { align-items: center; padding: 10px 12px; }
.wahl input { margin: 0; }
.wahl:has(input:checked) { border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 8%, var(--flaeche)); }
.wahl input, .haken input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--akzent); }
.haken { border: 0; padding: 6px 0; }
.haken.ungueltig span { color: var(--rot); }

.farbe-feld input[type=color] {
  width: 72px; height: 48px; padding: 4px; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche);
}
.kuerzel-zeile { display: flex; align-items: center; gap: 6px; }
.kuerzel-zeile input { flex: 1 1 auto; min-width: 0; }
.domain { flex: none; color: var(--text-2); font-size: 15px; }

.erklaerung {
  background: var(--flaeche-2); border-radius: 10px; padding: 0 12px;
}
.erklaerung summary {
  min-height: 44px; display: flex; align-items: center; cursor: pointer;
  font-weight: 600; color: var(--akzent-text);
}
.erklaerung[open] { padding-bottom: 12px; }
.erklaerung p { margin: 0 0 10px; font-size: 15px; }
.erklaerung .feld-paar { margin-bottom: 10px; }
.anbieter { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 10px; padding: 0; }
.anbieter a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 20px;
  text-decoration: none; font-weight: 600; font-size: 15px;
}

/* ---------- Knöpfe & Meldungen ---------- */
.knopf {
  min-height: 52px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--linie);
  background: var(--flaeche); font-weight: 600; cursor: pointer; width: 100%;
}
.knopf.haupt { background: var(--akzent); color: var(--auf-akzent); border-color: transparent; font-size: 18px; }
.knopf:disabled { opacity: .55; cursor: progress; }
.knopf:active { transform: scale(.98); }

.meldung {
  border-radius: 10px; padding: 12px 14px; font-size: 16px;
  background: var(--flaeche-2); border-left: 4px solid var(--akzent);
}
.meldung.gut { background: var(--gruen-flaeche); border-left-color: var(--gruen); }
.meldung.schlecht { background: var(--rot-flaeche); border-left-color: var(--rot); }
.meldung .titel { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.meldung .klein { font-size: 14px; color: var(--text-2); margin-top: 4px; overflow-wrap: anywhere; }
.haken-gross {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--gruen); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800;
}

/* ---------- Zusammenfassung ---------- */
.uebersicht { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 16px; }
.uebersicht dt { color: var(--text-2); }
.uebersicht dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.preis {
  background: var(--flaeche-2); border-radius: 12px; padding: 14px 16px; text-align: center;
}
.preis-betrag { font-size: 22px; font-weight: 800; }
.preis-zusatz { font-size: 15px; color: var(--text-2); }
.paypal { min-height: 52px; }

.fuss { text-align: center; font-size: 14px; color: var(--text-2); padding: 0 16px 32px; }

/* Honeypot: aus dem Blick, aber nicht display:none (manche Bots ignorieren das). */
.honig { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Danke-Seite ---------- */
.schritte { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.schritt { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--text-2); }
.schritt .punkt {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--linie); display: grid; place-items: center; font-size: 14px; font-weight: 800;
}
.schritt.erledigt { color: var(--text); }
.schritt.erledigt .punkt { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.schritt.aktiv { color: var(--text); font-weight: 700; }
.schritt.aktiv .punkt { border-color: var(--akzent); border-top-color: transparent; animation: dreh 1s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .schritt.aktiv .punkt { animation: none; border-top-color: var(--akzent); } }
.balken { height: 8px; border-radius: 4px; background: var(--flaeche-2); overflow: hidden; }
.balken > div { height: 100%; width: 0; background: var(--akzent); transition: width .4s; }

/* ---------- Rechtstexte ---------- */
.entwurf-banner {
  background: #fff4d6; color: #5b4300; border: 1px solid #f0d58a; border-radius: 10px;
  padding: 12px 14px; font-weight: 700;
}
@media (prefers-color-scheme: dark) { .entwurf-banner { background: #3a3014; color: #f5dc93; border-color: #6b5520; } }

/* ---------- breitere Bildschirme ---------- */
@media (min-width: 640px) {
  .einleitung h1 { font-size: 28px; }
  .feld-paar { grid-template-columns: 1fr 1fr; }
  .erklaerung .feld-paar { grid-template-columns: 1fr 110px; }
  .felder { padding: 10px 24px 22px; }
  .karte-kopf { padding: 20px 24px 4px; }
  .knopf { width: auto; justify-self: start; min-width: 220px; }
}
