/* Andis feine Rezepte: mobil zuerst, Firmengruen #5a8533 */
:root {
  --gruen: #5a8533;
  --bg: #eef3e6;
  --zeile: #f6f9f1;
  --rand: #d7e2c8;
  --rand-stark: #bccaa8;
  --tinte: #1d2a22;
  --grau: #55615a;
  --weiss: #fff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--tinte);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: inherit; }
h1 { margin: 0; font-weight: 800; letter-spacing: -0.01em; }
button, input { font: inherit; color: inherit; }
.klein { font-size: 13px; color: var(--grau); }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.leer { text-align: center; color: var(--grau); padding: 40px 0; }

/* Uebersicht */
.kopf { padding: 28px 0 12px; display: flex; flex-direction: column; gap: 4px; }
.kopf h1 { font-size: 28px; line-height: 1.1; }
.suche { padding-bottom: 12px; }
.suche input[type=search] {
  width: 100%; height: 48px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--rand-stark); background: var(--weiss);
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 16px; align-items: center; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips-label { flex-shrink: 0; font-size: 13px; color: var(--grau); }
.chip {
  flex-shrink: 0; min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center;
  border-radius: 22px; border: 1px solid var(--rand-stark); background: var(--weiss);
  text-decoration: none; font-weight: 500; font-size: 15px;
}
.chip.aktiv { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.chip.unter { background: transparent; font-size: 14px; padding: 0 16px; border-width: 2px; }
.chip.unter.aktiv { background: #dfe9d0; border-color: var(--gruen); color: var(--tinte); font-weight: 700; }

.raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-bottom: 120px; }
@media (min-width: 700px) { .raster { grid-template-columns: repeat(3, minmax(0, 1fr)); } .wrap { max-width: 820px; } }
.karte { display: block; text-decoration: none; background: var(--weiss); border: 1px solid var(--rand); border-radius: 18px; overflow: hidden; }
.foto { position: relative; height: 128px; }
.foto img, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.herz { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 16px; background: #fff; display: flex; align-items: center; justify-content: center; }
.karte-text { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.karte-titel { font-weight: 700; line-height: 1.25; }

.fab {
  position: fixed; right: 20px; bottom: calc(24px + env(safe-area-inset-bottom));
  width: 64px; height: 64px; border-radius: 32px; background: var(--gruen); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(29, 42, 34, .25);
}
.fab svg { width: 28px; height: 28px; stroke-width: 2.6; }

/* Rezeptansicht */
.hero { position: relative; height: 230px; }
.rund {
  position: absolute; top: 20px; left: 16px; width: 44px; height: 44px; border-radius: 22px;
  background: #fff; border: 2px solid var(--gruen); display: flex; align-items: center; justify-content: center;
  text-decoration: none; cursor: pointer; padding: 0;
}
.rund.rechts { left: auto; right: 16px; }
.rund svg { width: 22px; height: 22px; }
.blatt { position: relative; margin-top: -24px; background: var(--bg); border-radius: 24px 24px 0 0; padding-top: 24px; padding-bottom: 130px; }
.rezept-titel { font-size: 30px; line-height: 1.1; margin-bottom: 8px; }
.meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--grau); margin-bottom: 20px; }
.ofen { display: flex; background: #fff; border: 1px solid var(--rand); border-radius: 16px; padding: 14px 8px; margin-bottom: 20px; }
.ofen > div { flex: 1; text-align: center; display: flex; flex-direction: column; }
.ofen > div + div { border-left: 1px solid var(--rand); }
.ofen strong { font-size: 22px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: #dfe9d0; margin-bottom: 20px; }
.tabs button { flex: 1; min-height: 44px; border: 0; border-radius: 12px; background: transparent; font-weight: 700; color: var(--grau); cursor: pointer; }
.tabs button[aria-selected=true] { background: #fff; color: var(--tinte); }
[hidden] { display: none !important; }

.portionen { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--rand); border-radius: 16px; padding: 8px 8px 8px 16px; margin-bottom: 12px; font-weight: 500; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--rand-stark); background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.stepper svg { width: 20px; height: 20px; }
.stepper output { min-width: 36px; text-align: center; font-size: 20px; font-weight: 700; }

.zutaten { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--rand); border-radius: 16px; overflow: hidden; }
.zutaten li { background: var(--zeile); border-bottom: 1px solid #e4ecd7; }
.zutaten li:nth-child(even) { background: #fff; }
.zutaten li:last-child { border-bottom: 0; }
.zutaten label { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 16px; cursor: pointer; }
.zutaten input { position: absolute; opacity: 0; pointer-events: none; }
.haken { flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; border: 2px solid #9aa699; background: #fff; display: flex; align-items: center; justify-content: center; }
.zutaten input:checked + .haken { background: var(--tinte); border-color: var(--tinte); }
.zutaten input:checked + .haken::after { content: ""; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); }
.zutaten input:focus-visible + .haken { outline: 3px solid var(--gruen); outline-offset: 2px; }
.zname { flex: 1; }
.zmenge { font-weight: 700; white-space: nowrap; }
.zutaten input:checked ~ .zname, .zutaten input:checked ~ .zmenge { color: #6a766e; text-decoration: line-through; }

.schritte { list-style: none; margin: 0; padding: 0; counter-reset: s; display: flex; flex-direction: column; gap: 14px; }
.schritte li { counter-increment: s; display: flex; gap: 14px; background: #fff; border: 1px solid var(--rand); border-radius: 16px; padding: 16px; line-height: 1.5; }
.schritte li::before { content: counter(s); flex-shrink: 0; width: 32px; height: 32px; border-radius: 16px; background: var(--tinte); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.hinweis { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; color: var(--grau); font-weight: 600; }
.hinweis svg { width: 18px; height: 18px; flex-shrink: 0; }

.leiste { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 20px calc(20px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--rand); }
.knopf { display: flex; align-items: center; justify-content: center; max-width: 600px; margin: 0 auto; height: 56px; border-radius: 28px; background: var(--gruen); color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; border: 0; cursor: pointer; padding: 0 24px; }
.knopf-rand { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 22px; border: 2px solid var(--gruen); text-decoration: none; font-weight: 700; background: #fff; }

/* Kochmodus */
body.koch { background: #1f2a17; color: var(--bg); }
.koch-seite { min-height: 100vh; min-height: 100dvh; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; }
.koch-kopf { padding: 20px 16px 0; display: flex; align-items: center; gap: 12px; }
.koch-kopf .klein { color: #c3d1b0; }
.koch .rund { position: static; flex-shrink: 0; background: transparent; border: 1px solid #52653f; color: var(--bg); }
.koch .rund.gross { width: 72px; height: 72px; border-radius: 36px; }
.koch .rund.gross svg { width: 26px; height: 26px; }
.balken { margin: 16px 20px 0; height: 6px; border-radius: 3px; background: #33422a; }
.balken div { height: 6px; border-radius: 3px; background: var(--gruen); transition: width .2s; }
.folien { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 24px; }
.folie { display: flex; flex-direction: column; gap: 24px; }
.koch-zutaten { background: #2c3b21; border: 1px solid #52653f; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.koch-zutaten .zeile { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; }
.koch-text { margin: 0; font-size: 24px; line-height: 1.35; font-weight: 600; }
.koch-hinweis { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; padding: 0 24px; }
.koch-hinweis.klein { font-size: 14px; font-weight: 400; color: #c3d1b0; }
.folie .koch-hinweis { padding: 0; }
.koch-hinweis svg { width: 22px; height: 22px; }
.timer-knopf { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border-radius: 28px; border: 2px solid #7f9468; background: transparent; font-weight: 700; font-size: 17px; cursor: pointer; }
.timer-knopf svg { width: 22px; height: 22px; }
.timer-knopf.laeuft { background: var(--bg); border-color: var(--bg); color: #1f2a17; }
.koch-fuss { display: flex; gap: 12px; padding: 16px 20px calc(28px + env(safe-area-inset-bottom)); }
.koch .knopf.gross { flex: 1; max-width: none; height: 72px; border-radius: 36px; font-size: 20px; margin: 0; }
.koch .knopf.hell { background: var(--bg); color: #1f2a17; }

/* Meldungen */
.meldung { margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; font-weight: 600; background: #dfe9d0; border: 1px solid var(--gruen); }
.meldung.fehler { background: #fbe6e1; border-color: #c8452d; color: #7a2112; }
.blatt .meldung { margin-top: 4px; }

/* Kopfzeile Uebersicht */
.kopf-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kopf-link { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--rand-stark); background: #fff; display: flex; align-items: center; justify-content: center; text-decoration: none; flex-shrink: 0; }
.kopf-link svg { width: 22px; height: 22px; }

/* Formulare */
.form-seite { padding-bottom: 140px; }
.form-kopf { display: flex; align-items: center; gap: 14px; padding: 20px 0 16px; }
.form-kopf h1 { font-size: 26px; }
.form-kopf .rund { position: static; flex-shrink: 0; }
.formkarte { background: #fff; border: 1px solid var(--rand); border-radius: 18px; padding: 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 14px; }
.feld, .feld-klein { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.feld > span, .feld-klein > span, .beschr { font-size: 13px; font-weight: 700; color: var(--grau); }
.formkarte input[type=text], .formkarte input[type=number], .formkarte input[type=search], .formkarte select, .formkarte textarea,
.verw-suche {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--rand-stark);
  background: #fff; font-size: 16px;
}
.verw-suche { margin-bottom: 12px; }
.formkarte textarea { resize: vertical; line-height: 1.4; }
.formkarte input:focus, .formkarte select:focus, .formkarte textarea:focus, .verw-suche:focus { outline: 3px solid rgba(90, 133, 51, .45); outline-offset: 1px; border-color: var(--gruen); }
.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drei-spalten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.abschnitt { font-size: 20px; margin: 24px 0 6px; }
.hilfe { margin: 0 0 12px; }
.breit { width: 100%; justify-content: center; margin-bottom: 16px; cursor: pointer; }
button.knopf-rand { font-size: 16px; cursor: pointer; color: var(--tinte); }

/* Auswahl-Chips (Radio) */
.wahl-reihe { display: flex; flex-wrap: wrap; gap: 8px; }
.wahl { position: relative; }
.wahl input { position: absolute; opacity: 0; pointer-events: none; }
.wahl span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1px solid var(--rand-stark); background: #fff; font-weight: 500; cursor: pointer; }
.wahl input:checked + span { background: var(--gruen); border-color: var(--gruen); color: #fff; font-weight: 700; }
.wahl input:focus-visible + span { outline: 3px solid var(--gruen); outline-offset: 2px; }

/* Haken-Zeile */
.haken-zeile { display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; font-weight: 500; }
.haken-zeile input { position: absolute; opacity: 0; pointer-events: none; }
.haken-zeile input:checked + .haken { background: var(--tinte); border-color: var(--tinte); }
.haken-zeile input:checked + .haken::after { content: ""; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); }
.haken-zeile input:focus-visible + .haken { outline: 3px solid var(--gruen); outline-offset: 2px; }

/* Foto */
.vorschau { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; }
.foto-knopf { position: relative; justify-content: center; cursor: pointer; overflow: hidden; }
.foto-knopf input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; font-size: 0; }

/* Schritte und Zutaten-Zeilen */
.schritt-kopf { display: flex; align-items: center; justify-content: space-between; }
.schritt-nr { font-size: 17px; }
.schritt-knoepfe { display: flex; gap: 6px; }
.klein-knopf { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--rand-stark); background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex-shrink: 0; }
.klein-knopf svg { width: 20px; height: 20px; }
.schritt-optionen { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; }
.feld-klein input { max-width: 100%; }
.zutaten-titel { font-size: 13px; font-weight: 700; color: var(--grau); border-top: 1px solid var(--rand); padding-top: 12px; }
.zutaten-titel.erste { border-top: 0; padding-top: 0; }
.zutat-zeilen { display: flex; flex-direction: column; gap: 10px; }
.zutat-zeile { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; background: var(--zeile); border: 1px solid #e4ecd7; }
.zeile-name { position: relative; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.zeile-name .zname-input { flex: 1; min-width: 0; width: auto; }
.zeile-menge { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.zeile-menge input { flex: 1; min-width: 70px; width: auto; }
.zeile-menge select { flex: 1; min-width: 90px; width: auto; }
.neu-hinweis { font-size: 13px; font-weight: 700; color: var(--gruen); }

/* Autocomplete */
.vorschlaege { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; z-index: 20; background: #fff; border: 1px solid var(--rand-stark); border-radius: 12px; box-shadow: 0 8px 20px rgba(29, 42, 34, .2); overflow: hidden; }
.vorschlag { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 14px; border: 0; border-bottom: 1px solid #e4ecd7; background: #fff; text-align: left; cursor: pointer; font-size: 16px; }
.vorschlag:last-child { border-bottom: 0; }
.vorschlag:hover, .vorschlag:focus { background: var(--zeile); }
.vorschlag small { color: var(--grau); font-size: 13px; }

/* Loeschen */
.loeschen-form { margin: 8px 0 0; text-align: center; }
.knopf-gefahr, .knopf-klein.gefahr { border: 2px solid #c8452d; color: #a2301b; background: #fff; border-radius: 22px; min-height: 44px; padding: 0 20px; font-weight: 700; cursor: pointer; }

/* Verwaltung */
.verw-zeile { display: flex; flex-direction: column; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid #e4ecd7; }
.verw-zeile:last-child { border-bottom: 0; padding-bottom: 0; }
.verw-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.verw-form input[type=text] { flex: 1 1 180px; width: auto; min-width: 0; }
.verw-form select { flex: 0 1 110px; width: auto; }
.knopf-klein { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 2px solid var(--gruen); background: #fff; font-weight: 700; cursor: pointer; }
.verw-form.neu { margin-top: 4px; }

/* Anmeldung */
.login-seite { padding-top: 40px; padding-bottom: 40px; }
.login-kopf { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 24px; text-align: center; }
.login-kopf h1 { font-size: 26px; }
.login-logo { border-radius: 22px; }
.login-knopf { width: 100%; max-width: none; margin: 4px 0 0; }
.meldung a { color: inherit; }

.rund.rechts.zweit { right: 68px; }
