/* ============================================================
   Schmecki - Design
   Creme, Altrosa, Bordeaux. Runde Karten, weiche Schatten,
   Herzchen und Food-Doodles. Hell und dunkel.
   ============================================================ */

/* ---------------------------------------------- Schriften
   Lokal eingebunden, damit die App auch ohne Internet gleich
   aussieht. Fehlen die Dateien, greift der System-Fallback. */

@font-face {
  font-family: 'Caveat';
  src: url('assets/fonts/caveat.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('assets/fonts/nunito.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}

/* ---------------------------------------------- Farben & Maße */

:root {
  --creme: #fff8f4;
  --creme-2: #fdf1ed;
  --karte: #ffffff;
  --karte-2: #fff6f7;
  --altrosa: #f4c3cb;
  --altrosa-sanft: #fbe4e8;
  --rose: #e8879c;
  --rose-tief: #d4677f;
  --bordeaux: #8c2f45;
  --bordeaux-tief: #5e1f2e;
  --text: #3d2229;
  --text-leise: #8a6b72;
  --rand: #f3dee2;
  --gruen: #6fa287;
  --warn: #c9743f;

  --schatten-s: 0 2px 8px rgba(140, 47, 69, 0.06);
  --schatten-m: 0 6px 20px rgba(140, 47, 69, 0.09);
  --schatten-l: 0 16px 44px rgba(140, 47, 69, 0.14);

  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 24px;
  --radius-xl: 32px;

  --font-script: 'Caveat', 'Segoe Script', 'Bradley Hand', 'Brush Script MT', cursive;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --sidebar-breite: 232px;
  --kopf-hoehe: 60px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-thema='hell']) {
    --creme: #171113;
    --creme-2: #1d1619;
    --karte: #241b1e;
    --karte-2: #2b2024;
    --altrosa: #4d2c34;
    --altrosa-sanft: #332328;
    --rose: #e8879c;
    --rose-tief: #f0a2b3;
    --bordeaux: #f3c4ce;
    --bordeaux-tief: #f8dde3;
    --text: #f6e9ec;
    --text-leise: #b1959c;
    --rand: #38272c;
    --gruen: #8bbba2;
    --warn: #dd9a63;

    --schatten-s: 0 2px 8px rgba(0, 0, 0, 0.3);
    --schatten-m: 0 6px 20px rgba(0, 0, 0, 0.38);
    --schatten-l: 0 16px 44px rgba(0, 0, 0, 0.5);

    color-scheme: dark;
  }
}

:root[data-thema='dunkel'] {
  --creme: #171113;
  --creme-2: #1d1619;
  --karte: #241b1e;
  --karte-2: #2b2024;
  --altrosa: #4d2c34;
  --altrosa-sanft: #332328;
  --rose: #e8879c;
  --rose-tief: #f0a2b3;
  --bordeaux: #f3c4ce;
  --bordeaux-tief: #f8dde3;
  --text: #f6e9ec;
  --text-leise: #b1959c;
  --rand: #38272c;
  --gruen: #8bbba2;
  --warn: #dd9a63;

  --schatten-s: 0 2px 8px rgba(0, 0, 0, 0.3);
  --schatten-m: 0 6px 20px rgba(0, 0, 0, 0.38);
  --schatten-l: 0 16px 44px rgba(0, 0, 0, 0.5);

  color-scheme: dark;
}

/* ---------------------------------------------- Grundlagen */

*, *::before, *::after { box-sizing: border-box; }

/*
 * hidden muss gewinnen.
 *
 * Der Browser setzt fuer [hidden] nur display:none in seinem Standard-Stylesheet -
 * jede eigene Klassenregel mit display schlaegt das. Genau das ist hier passiert:
 * die Modal-Schicht (display:grid) lag dauerhaft ueber der Seite, hat alles
 * milchig gemacht und saemtliche Mausklicks geschluckt.
 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--creme);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; font-weight: 800; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 .8em; }

a { color: var(--bordeaux); text-decoration: none; }
a:hover { color: var(--rose-tief); }

button { font-family: inherit; font-size: inherit; }

:focus-visible {
  outline: 2.5px solid var(--rose);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--altrosa); color: var(--bordeaux-tief); }

/* Schmale, unauffällige Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--altrosa) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: var(--altrosa); border-radius: 99px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------- Grundgerüst */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-breite) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: var(--creme-2);
  border-right: 1px solid var(--rand);
}

.logo {
  font-family: var(--font-script);
  font-size: 2.15rem;
  font-weight: 700;
  color: var(--bordeaux);
  padding: 0 8px;
  line-height: 1;
  letter-spacing: .3px;
}
.logo:hover { color: var(--rose-tief); }

.seiten-nav { display: flex; flex-direction: column; gap: 3px; }

.seiten-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  color: var(--text);
  font-weight: 600;
  font-size: .96rem;
  position: relative;
  transition: background .16s, color .16s, transform .16s;
}
.seiten-nav a:hover { background: var(--karte); transform: translateX(2px); }
.seiten-nav a.aktiv { background: var(--rose); color: #fff; box-shadow: var(--schatten-s); }
.seiten-nav a.aktiv .nav-icon { filter: saturate(0) brightness(3); }

.nav-icon { font-size: 1.05rem; width: 1.3em; text-align: center; }

.nav-badge {
  margin-left: auto;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--bordeaux);
  color: #fff;
  font-size: .74rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.seiten-nav a.aktiv .nav-badge { background: #fff; color: var(--rose-tief); }

.sidebar-fuss { margin-top: auto; }
.sidebar-fuss .ikon-knopf {
  width: 100%;
  justify-content: flex-start;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  font-weight: 600;
  font-size: .93rem;
  color: var(--text-leise);
}
.sidebar-fuss .ikon-knopf:hover { background: var(--karte); color: var(--text); }

.haupt { display: flex; flex-direction: column; min-width: 0; }

.kopf {
  height: var(--kopf-hoehe);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 clamp(16px, 3vw, 34px);
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--creme) 88%, transparent);
  backdrop-filter: blur(9px);
}

.logo-mobil { display: none; margin-right: auto; font-size: 1.75rem; padding: 0; }

.kopf-aktionen { display: flex; gap: 6px; }

#view {
  flex: 1;
  padding: 8px clamp(16px, 3vw, 34px) 120px;
  max-width: 1220px;
  width: 100%;
  outline: none;
}

/* ---------------------------------------------- Bottom-Nav (Handy) */

.bottom-nav { display: none; }

/* ---------------------------------------------- Knöpfe */

.knopf, .knopf-2, .knopf-3 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 99px;
  padding: 11px 22px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .14s, box-shadow .18s, background .18s, color .18s;
  white-space: nowrap;
}

.knopf {
  background: linear-gradient(135deg, var(--rose), var(--rose-tief));
  color: #fff;
  box-shadow: var(--schatten-m);
}
.knopf:hover { transform: translateY(-2px); box-shadow: var(--schatten-l); }
.knopf:active { transform: translateY(0); }

.knopf-2 {
  background: var(--karte);
  color: var(--bordeaux);
  border: 1.5px solid var(--rand);
  box-shadow: var(--schatten-s);
}
.knopf-2:hover { border-color: var(--rose); transform: translateY(-1px); }

.knopf-3 {
  background: transparent;
  color: var(--text-leise);
  padding: 8px 14px;
}
.knopf-3:hover { background: var(--karte); color: var(--text); }

.knopf:disabled, .knopf-2:disabled, .knopf-3:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.knopf-gefahr { color: #c2415a; }
:root[data-thema='dunkel'] .knopf-gefahr { color: #ffa3b5; }
.knopf-gefahr:hover { background: #fdeaee; }
:root[data-thema='dunkel'] .knopf-gefahr:hover { background: #3d222a; }

.ikon-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1.05rem;
  transition: background .16s, transform .16s;
}
.ikon-knopf:hover { background: var(--altrosa-sanft); transform: scale(1.07); }
:root[data-thema='dunkel'] .ikon-knopf:hover { background: var(--karte-2); }

.fab {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 30;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--rose-tief));
  color: #fff;
  font-size: 1.9rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--schatten-l);
  transition: transform .18s, box-shadow .18s;
}
.fab:hover { transform: scale(1.08) rotate(90deg); }
.fab:active { transform: scale(.97); }

/* ---------------------------------------------- Chips */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  border: 1.5px solid var(--rand);
  background: var(--karte);
  color: var(--text);
  border-radius: 99px;
  padding: 7px 15px;
  font-size: .87rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .16s;
  white-space: nowrap;
}
.chip:hover { border-color: var(--rose); transform: translateY(-1px); }
.chip.aktiv {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
  box-shadow: var(--schatten-s);
}
.chip-zahl { opacity: .65; font-weight: 600; margin-left: 3px; }

.tag {
  display: inline-block;
  background: var(--altrosa-sanft);
  color: var(--bordeaux);
  border-radius: 99px;
  padding: 3px 11px;
  font-size: .78rem;
  font-weight: 700;
}
:root[data-thema='dunkel'] .tag { background: var(--karte-2); }

/* ---------------------------------------------- Eingaben */

input[type='text'], input[type='search'], input[type='number'], input[type='url'], textarea, select {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--karte);
  border: 1.5px solid var(--rand);
  border-radius: var(--radius-s);
  padding: 11px 15px;
  width: 100%;
  transition: border-color .16s, box-shadow .16s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3.5px var(--altrosa-sanft);
}
:root[data-thema='dunkel'] input:focus,
:root[data-thema='dunkel'] textarea:focus { box-shadow: 0 0 0 3.5px rgba(232, 135, 156, .18); }
input::placeholder, textarea::placeholder { color: var(--text-leise); opacity: .8; }
textarea { resize: vertical; min-height: 130px; line-height: 1.55; }

.suche { position: relative; }
.suche input { padding-left: 40px; border-radius: 99px; }
.suche::before {
  content: '🔍';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .9rem;
  opacity: .55;
  pointer-events: none;
}

/* Häkchen im Schmecki-Stil */
.haken {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--altrosa);
  border-radius: 6px;
  background: var(--karte);
  cursor: pointer;
  position: relative;
  transition: background .16s, border-color .16s;
}
.haken:checked { background: var(--rose); border-color: var(--rose); }
.haken:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(42deg);
  animation: haken-pop .22s ease-out;
}
@keyframes haken-pop {
  from { transform: rotate(42deg) scale(0); }
  to   { transform: rotate(42deg) scale(1); }
}

/* ---------------------------------------------- Karten */

.karte {
  background: var(--karte);
  border-radius: var(--radius-l);
  box-shadow: var(--schatten-s);
  border: 1px solid var(--rand);
  padding: 22px;
}

.seiten-kopf {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 14px 0 20px;
}
.seiten-kopf h1 { margin: 0; }
.seiten-kopf .unterzeile { color: var(--text-leise); font-size: .94rem; margin: 4px 0 0; }

.abschnitt { margin: 34px 0 0; }
.abschnitt > h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}

.leer {
  text-align: center;
  padding: 54px 24px;
  color: var(--text-leise);
}
.leer .leer-emoji { font-size: 3rem; display: block; margin-bottom: 10px; }
.leer h3 { color: var(--text); }
.leer p { max-width: 42ch; margin: 0 auto 16px; }

/* ---------------------------------------------- Rezeptkarten */

.rezept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 18px;
}

.rezept-karte {
  position: relative;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius-l);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--schatten-s);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  color: inherit;
  width: 100%;
}
.rezept-karte:hover { transform: translateY(-5px); box-shadow: var(--schatten-l); }

.rezept-bild {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--altrosa-sanft);
}

.rezept-karte-text { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.rezept-karte-titel { font-weight: 800; font-size: .99rem; line-height: 1.3; }
.rezept-karte-fuss {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-leise);
  font-size: .82rem;
  font-weight: 600;
}

/* Herz oben rechts auf der Karte */
.herz-knopf {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(4px);
  color: var(--rose-tief);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 7px;
  box-shadow: var(--schatten-s);
  transition: transform .18s, background .18s;
}
:root[data-thema='dunkel'] .herz-knopf { background: rgba(36, 27, 30, .85); }
.herz-knopf:hover { transform: scale(1.14); }
.herz-knopf svg { width: 100%; height: 100%; }
.herz-knopf.gefuellt { color: var(--rose); }
.herz-knopf.pop svg { animation: herz-pop .42s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes herz-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.45); }
  60%  { transform: scale(.9); }
  100% { transform: scale(1); }
}

/* Platzhalter statt Foto */
.platzhalter {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.platzhalter-emoji { font-size: 2.7rem; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .12)); }
.platzhalter-doodle {
  position: absolute;
  right: -6px;
  bottom: -8px;
  color: rgba(140, 47, 69, .17);
}
.platzhalter-doodle.zwei { right: auto; left: -4px; top: -6px; bottom: auto; }
:root[data-thema='dunkel'] .platzhalter-doodle { color: rgba(255, 255, 255, .13); }

.stimmung-warm  { background: linear-gradient(140deg, #ffe3d3, #fbc9c0); }
.stimmung-rose  { background: linear-gradient(140deg, #fcdfe5, #f6bcc8); }
.stimmung-creme { background: linear-gradient(140deg, #fff1e2, #fadfd0); }
.stimmung-beere { background: linear-gradient(140deg, #f9d7e3, #eebfd4); }
:root[data-thema='dunkel'] .stimmung-warm  { background: linear-gradient(140deg, #4a2f2c, #3a2426); }
:root[data-thema='dunkel'] .stimmung-rose  { background: linear-gradient(140deg, #4b2a33, #38222a); }
:root[data-thema='dunkel'] .stimmung-creme { background: linear-gradient(140deg, #46332b, #352723); }
:root[data-thema='dunkel'] .stimmung-beere { background: linear-gradient(140deg, #45283a, #33202c); }

/* ---------------------------------------------- Startseite */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 30px;
  align-items: center;
  background: linear-gradient(135deg, var(--creme-2), var(--altrosa-sanft));
  border: 1px solid var(--rand);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 48px);
  overflow: hidden;
  margin-top: 8px;
}
:root[data-thema='dunkel'] .hero { background: linear-gradient(135deg, var(--creme-2), var(--karte-2)); }

.hero h1 {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.06;
  color: var(--bordeaux);
  margin-bottom: .3em;
}
.hero .hero-text { max-width: 46ch; color: var(--text-leise); font-size: 1.02rem; }

.import-zeile { display: flex; gap: 10px; margin: 22px 0 16px; flex-wrap: wrap; }
.import-zeile input { flex: 1; min-width: 210px; border-radius: 99px; }

.hero-hinweis { font-size: .85rem; color: var(--text-leise); }

.beispiel-reihe { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.beispiel-reihe .label { font-size: .87rem; color: var(--text-leise); font-weight: 600; }

.beispiel-kachel {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  border: 2px solid var(--karte);
  box-shadow: var(--schatten-s);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  transition: transform .18s, box-shadow .18s;
}
.beispiel-kachel:hover { transform: translateY(-4px) rotate(-3deg); box-shadow: var(--schatten-m); }

/* Handy-Attrappe im Hero */
.telefon {
  position: relative;
  width: min(230px, 100%);
  margin: 0 auto;
  aspect-ratio: 9 / 18.5;
  background: #221b1d;
  border-radius: 32px;
  padding: 9px;
  box-shadow: var(--schatten-l);
  transform: rotate(2.5deg);
}
.telefon-schirm {
  width: 100%;
  height: 100%;
  border-radius: 25px;
  background: linear-gradient(165deg, #f7c9b6, #e79a92 45%, #b96a6a);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 14px 14px;
  overflow: hidden;
  position: relative;
}
.telefon-titel {
  font-family: var(--font-script);
  font-size: 1.6rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  line-height: 1.1;
}
.telefon-teller { font-size: 3.6rem; text-align: center; }
.telefon-leiste { display: flex; justify-content: space-around; font-size: .8rem; opacity: .85; }

.hero .deko { position: absolute; inset: 0; pointer-events: none; color: var(--rose); opacity: .22; }
.deko span { position: absolute; }
.deko .deko-1 { left: 3%;  bottom: 8%;  transform: rotate(-14deg); }
.deko .deko-2 { right: 6%; top: 9%;     transform: rotate(12deg); }
.deko .deko-3 { left: 42%; bottom: 3%;  transform: rotate(6deg); }

.schnell-reihe {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 26px;
}
.schnell-karte {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius-m);
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--schatten-s);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  color: inherit;
  width: 100%;
}
.schnell-karte:hover { transform: translateY(-3px); box-shadow: var(--schatten-m); border-color: var(--rose); }
.schnell-karte .gross { font-size: 1.6rem; }
.schnell-karte .titel { font-weight: 800; }
.schnell-karte .unter { font-size: .83rem; color: var(--text-leise); }

/* ---------------------------------------------- Rezeptansicht */

.rezept-ansicht { max-width: 860px; }

.rezept-hero {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--schatten-m);
  margin-bottom: 20px;
}
.rezept-hero .rezept-bild { aspect-ratio: 16 / 10; }
.rezept-hero .platzhalter-emoji { font-size: 5rem; }

.rezept-hero-aktionen {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
}
.rezept-hero-aktionen .ikon-knopf {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(5px);
  box-shadow: var(--schatten-s);
  color: var(--bordeaux);
}
:root[data-thema='dunkel'] .rezept-hero-aktionen .ikon-knopf { background: rgba(36, 27, 30, .88); }

.rezept-titel {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: .25em;
}

.meta-reihe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  color: var(--text-leise);
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: 14px;
}
.meta-reihe .meta { display: inline-flex; align-items: center; gap: 6px; }
.meta-reihe .trenner { opacity: .4; }

.quelle-zeile {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .87rem;
  color: var(--text-leise);
  background: var(--karte-2);
  border: 1px solid var(--rand);
  border-radius: var(--radius-s);
  padding: 9px 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.aktions-reihe { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px; }

.portionen-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--karte-2);
  border: 1px solid var(--rand);
  border-radius: var(--radius-m);
  padding: 12px 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.zaehler { display: flex; align-items: center; gap: 4px; }
.zaehler button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--rand);
  background: var(--karte);
  color: var(--bordeaux);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all .15s;
}
.zaehler button:hover:not(:disabled) { border-color: var(--rose); background: var(--rose); color: #fff; }
.zaehler button:disabled { opacity: .4; cursor: not-allowed; }
.zaehler .wert { min-width: 42px; text-align: center; font-weight: 800; font-size: 1.1rem; }

.zutaten-liste { list-style: none; margin: 0; padding: 0; }
.zutaten-liste li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 2px;
  border-bottom: 1px dashed var(--rand);
}
.zutaten-liste li:last-child { border-bottom: 0; }
.zutaten-liste .menge { font-weight: 800; min-width: 74px; color: var(--bordeaux); }
.zutaten-liste .name { flex: 1; }
.zutaten-liste .hinweis { color: var(--text-leise); font-size: .87rem; }
.zutaten-liste input:checked ~ .name,
.zutaten-liste input:checked ~ .menge { opacity: .45; text-decoration: line-through; }

.schritte-liste { list-style: none; margin: 0; padding: 0; counter-reset: schritt; }
.schritte-liste li {
  display: flex;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--rand);
}
.schritte-liste li:last-child { border-bottom: 0; }
.schritte-liste .nummer {
  counter-increment: schritt;
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--altrosa-sanft);
  color: var(--bordeaux);
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: .88rem;
}
:root[data-thema='dunkel'] .schritte-liste .nummer { background: var(--karte-2); }
.schritte-liste .nummer::before { content: counter(schritt); }
.schritt-meta { display: flex; gap: 12px; margin-top: 5px; font-size: .82rem; color: var(--text-leise); font-weight: 600; }

.hinweis-box {
  display: flex;
  gap: 11px;
  background: var(--karte-2);
  border: 1px solid var(--rand);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius-s);
  padding: 13px 16px;
  font-size: .9rem;
  margin: 16px 0;
}
.hinweis-box ul { margin: 4px 0 0; padding-left: 18px; }
.hinweis-box.gut { border-left-color: var(--gruen); }

.sterne { display: inline-flex; gap: 2px; }
.sterne button {
  border: 0;
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 1px;
  line-height: 1;
  filter: grayscale(1) opacity(.4);
  transition: filter .15s, transform .15s;
}
.sterne button.an { filter: none; }
.sterne button:hover { transform: scale(1.22); }

/* ---------------------------------------------- Einkaufsliste */

.liste-gruppe { margin-bottom: 22px; }
.liste-gruppe > h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--altrosa-sanft);
  margin-bottom: 4px;
}
:root[data-thema='dunkel'] .liste-gruppe > h3 { border-bottom-color: var(--rand); }
.liste-gruppe .anzahl { margin-left: auto; font-size: .82rem; color: var(--text-leise); font-weight: 600; }

.liste-zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 6px;
  border-radius: var(--radius-s);
  transition: background .14s;
}
.liste-zeile:hover { background: var(--karte-2); }
.liste-zeile.erledigt .liste-text { opacity: .45; text-decoration: line-through; }
.liste-text { flex: 1; min-width: 0; }
.liste-text .liste-name { font-weight: 700; }
.liste-text .liste-unter { font-size: .8rem; color: var(--text-leise); }
.liste-menge { font-weight: 800; color: var(--bordeaux); white-space: nowrap; }
.liste-zeile .ikon-knopf { width: 32px; height: 32px; font-size: .9rem; opacity: 0; }
.liste-zeile:hover .ikon-knopf, .liste-zeile:focus-within .ikon-knopf { opacity: 1; }

.liste-spalten { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 8px 26px; }

/* ---------------------------------------------- Wochenplan */

.plan-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.woche {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.tag-spalte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius-m);
  padding: 10px 9px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 190px;
}
.tag-spalte.heute { border-color: var(--rose); box-shadow: 0 0 0 2px var(--altrosa-sanft); }
.tag-kopf { text-align: center; }
.tag-kopf .tag-name { font-weight: 800; font-size: .88rem; }
.tag-kopf .tag-datum { font-size: .74rem; color: var(--text-leise); }

.slot {
  border: 1.5px dashed var(--rand);
  border-radius: var(--radius-s);
  padding: 7px;
  min-height: 62px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: .8rem;
  cursor: pointer;
  transition: border-color .16s, background .16s;
  position: relative;
  text-align: left;
  background: transparent;
  color: inherit;
  width: 100%;
}
.slot:hover { border-color: var(--rose); background: var(--karte-2); }
.slot.ueber { border-color: var(--rose); background: var(--altrosa-sanft); border-style: solid; }
.slot.belegt { border-style: solid; border-color: var(--rand); background: var(--karte-2); }
.slot .slot-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-leise); font-weight: 700; }
.slot .slot-emoji { font-size: 1.25rem; }
.slot .slot-titel { font-weight: 700; line-height: 1.25; }
.slot .slot-weg {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 21px;
  height: 21px;
  border: 0;
  border-radius: 50%;
  background: var(--karte);
  color: var(--text-leise);
  font-size: .7rem;
  cursor: pointer;
  display: none;
  place-items: center;
  box-shadow: var(--schatten-s);
}
.slot.belegt:hover .slot-weg { display: grid; }

.plan-fuss {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--karte-2);
  border: 1px solid var(--rand);
  border-radius: var(--radius-m);
  padding: 16px 20px;
  margin-top: 18px;
}

.zieh-quelle { cursor: grab; }
.zieh-quelle:active { cursor: grabbing; }
.zieht { opacity: .45; }

/* ---------------------------------------------- Würfeln */

.wuerfel-buehne {
  text-align: center;
  background: linear-gradient(140deg, var(--creme-2), var(--altrosa-sanft));
  border: 1px solid var(--rand);
  border-radius: var(--radius-xl);
  padding: clamp(26px, 5vw, 52px);
  position: relative;
  overflow: hidden;
}
:root[data-thema='dunkel'] .wuerfel-buehne { background: linear-gradient(140deg, var(--creme-2), var(--karte-2)); }

.wuerfel-buehne h1 {
  font-family: var(--font-script);
  font-size: clamp(2rem, 4.5vw, 3rem);
  color: var(--bordeaux);
}

.walze {
  font-size: clamp(3.4rem, 9vw, 5.4rem);
  height: 1.4em;
  line-height: 1.4em;
  margin: 10px 0;
}
.walze.dreht { animation: walze-zittern .28s linear infinite; }
@keyframes walze-zittern {
  0%   { transform: translateY(-6px) rotate(-4deg); }
  50%  { transform: translateY(6px) rotate(4deg); }
  100% { transform: translateY(-6px) rotate(-4deg); }
}

.wuerfel-ergebnis {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius-l);
  padding: 22px;
  max-width: 480px;
  margin: 0 auto 20px;
  box-shadow: var(--schatten-m);
  cursor: pointer;
  transition: transform .2s;
}
.wuerfel-ergebnis:hover { transform: translateY(-3px); }
.wuerfel-ergebnis .vorspann { font-size: .87rem; color: var(--text-leise); font-weight: 700; }
.wuerfel-ergebnis .gericht {
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--bordeaux);
  line-height: 1.1;
  margin: 4px 0 10px;
}

/* ---------------------------------------------- Vorrat */

.vorrat-wolke { display: flex; flex-wrap: wrap; gap: 9px; }
.vorrat-pille {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--karte);
  border: 1.5px solid var(--rand);
  border-radius: 99px;
  padding: 7px 8px 7px 15px;
  font-weight: 700;
  font-size: .9rem;
}
.vorrat-pille button {
  border: 0;
  background: var(--altrosa-sanft);
  color: var(--bordeaux);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: .72rem;
  display: grid;
  place-items: center;
}
:root[data-thema='dunkel'] .vorrat-pille button { background: var(--karte-2); }
.vorrat-pille button:hover { background: var(--rose); color: #fff; }

.treffer-karte {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius-m);
  padding: 13px 16px;
  cursor: pointer;
  box-shadow: var(--schatten-s);
  transition: transform .17s, box-shadow .17s;
  text-align: left;
  color: inherit;
  width: 100%;
  margin-bottom: 10px;
}
.treffer-karte:hover { transform: translateX(3px); box-shadow: var(--schatten-m); }
.treffer-karte .emoji { font-size: 1.8rem; }
.treffer-karte .treffer-text { flex: 1; min-width: 0; }
.treffer-karte .treffer-titel { font-weight: 800; }
.treffer-karte .treffer-unter { font-size: .85rem; color: var(--text-leise); }
.treffer-balken {
  height: 6px;
  border-radius: 99px;
  background: var(--altrosa-sanft);
  overflow: hidden;
  margin-top: 6px;
  max-width: 190px;
}
:root[data-thema='dunkel'] .treffer-balken { background: var(--rand); }
.treffer-balken i { display: block; height: 100%; background: var(--rose); border-radius: 99px; }
.treffer-karte.komplett .treffer-balken i { background: var(--gruen); }

/* ---------------------------------------------- Modal */

.modal-schicht {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(61, 34, 41, .45);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 18px;
  overflow-y: auto;
  animation: ein .18s ease-out;
}
@keyframes ein { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--karte);
  border-radius: var(--radius-xl);
  box-shadow: var(--schatten-l);
  width: min(620px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 26px;
  position: relative;
  animation: hoch .24s cubic-bezier(.2, 1.2, .4, 1);
}
@keyframes hoch { from { transform: translateY(18px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-schliessen { position: absolute; top: 14px; right: 14px; }
.modal h2 { font-family: var(--font-script); font-size: 2rem; color: var(--bordeaux); }

.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--rand); margin: 16px 0 20px; }
.tab {
  border: 0;
  background: transparent;
  color: var(--text-leise);
  font-weight: 700;
  font-size: .92rem;
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  transition: color .16s, border-color .16s;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.aktiv { color: var(--rose-tief); border-bottom-color: var(--rose); }

.tab-inhalt { display: none; }
.tab-inhalt.aktiv { display: block; }

.ablage {
  border: 2.5px dashed var(--altrosa);
  border-radius: var(--radius-m);
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .18s;
  background: var(--karte-2);
}
.ablage:hover, .ablage.ueber { border-color: var(--rose); background: var(--altrosa-sanft); transform: scale(1.01); }
.ablage .ablage-emoji { font-size: 2.4rem; display: block; margin-bottom: 8px; }
.ablage .ablage-gross { font-weight: 800; }
.ablage .ablage-klein { font-size: .84rem; color: var(--text-leise); }

.feld-label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 6px; }
.feld-hilfe { font-size: .82rem; color: var(--text-leise); margin-top: 6px; }

/* Ladeanimation beim Import */
.laden { text-align: center; padding: 22px 6px 8px; }
.laden .kessel { font-size: 3rem; animation: wackeln 1.1s ease-in-out infinite; display: inline-block; }
@keyframes wackeln {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50%      { transform: rotate(8deg) translateY(-5px); }
}
.laden .spruch { font-weight: 700; margin: 12px 0 14px; min-height: 1.5em; }

.balken { height: 9px; border-radius: 99px; background: var(--altrosa-sanft); overflow: hidden; }
:root[data-thema='dunkel'] .balken { background: var(--rand); }
.balken i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--altrosa), var(--rose));
  transition: width .4s ease;
}
.balken.unbestimmt i {
  width: 40% !important;
  animation: rutschen 1.5s ease-in-out infinite;
}
@keyframes rutschen {
  0%   { margin-left: -40%; }
  100% { margin-left: 100%; }
}
.laden .prozent { font-size: .84rem; color: var(--text-leise); margin-top: 8px; font-weight: 700; }

.fehler-box {
  display: flex;
  gap: 12px;
  background: #fdeef1;
  border: 1px solid #f3c9d2;
  border-left: 3px solid var(--rose-tief);
  border-radius: var(--radius-s);
  padding: 14px 16px;
  margin: 14px 0;
  font-size: .92rem;
}
:root[data-thema='dunkel'] .fehler-box { background: #3a2229; border-color: #563039; }
.fehler-box .fehler-emoji { font-size: 1.3rem; }

.gefunden-box {
  display: flex;
  gap: 13px;
  align-items: center;
  background: var(--karte-2);
  border: 1px solid var(--rand);
  border-radius: var(--radius-m);
  padding: 12px 14px;
  margin: 14px 0;
}
.gefunden-box img { width: 54px; height: 68px; object-fit: cover; border-radius: 10px; }
.gefunden-box .gefunden-titel { font-weight: 800; font-size: .92rem; }
.gefunden-box .gefunden-unter { font-size: .82rem; color: var(--text-leise); }

/* ---------------------------------------------- Toasts */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(420px, calc(100vw - 32px));
}

.toast {
  background: var(--bordeaux);
  color: #fff;
  border-radius: 99px;
  padding: 11px 22px;
  font-weight: 700;
  font-size: .92rem;
  box-shadow: var(--schatten-l);
  animation: toast-ein .26s cubic-bezier(.2, 1.3, .4, 1);
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
}
:root[data-thema='dunkel'] .toast { background: var(--rose-tief); color: #2a1a1e; }
.toast.weg { animation: toast-weg .24s ease-in forwards; }
@keyframes toast-ein { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-weg { to { transform: translateY(10px); opacity: 0; } }

/* ---------------------------------------------- Kleinigkeiten */

.leise { color: var(--text-leise); }
.klein { font-size: .85rem; }
.mittig { text-align: center; }
.reihe { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reihe-ende { margin-left: auto; }
.abstand-oben { margin-top: 18px; }
.nur-mobil { display: none; }


/* ---------------------------------------------- Responsive */

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .telefon { display: none; }
  .woche { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  :root { --kopf-hoehe: 56px; }

  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .logo-mobil { display: block; }
  .nur-mobil { display: inline-flex; }

  .kopf {
    justify-content: space-between;
    background: color-mix(in srgb, var(--creme) 94%, transparent);
  }

  #view { padding: 6px 16px 108px; }

  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--karte) 96%, transparent);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--rand);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 2px;
    font-size: .68rem;
    font-weight: 700;
    color: var(--text-leise);
    border-radius: var(--radius-s);
    position: relative;
    transition: color .16s, background .16s;
  }
  .bottom-nav a span:first-child { font-size: 1.25rem; line-height: 1.1; }
  .bottom-nav a.aktiv { color: var(--rose-tief); background: var(--altrosa-sanft); }
  .bottom-nav .nav-badge {
    position: absolute;
    top: 2px;
    right: 50%;
    margin-right: -22px;
    min-width: 17px;
    height: 17px;
    font-size: .66rem;
  }

  .fab { right: 16px; bottom: calc(74px + env(safe-area-inset-bottom)); width: 54px; height: 54px; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }

  .woche { grid-template-columns: 1fr; }
  .tag-spalte { min-height: 0; flex-direction: row; align-items: center; }
  .tag-kopf { min-width: 66px; text-align: left; }
  .tag-spalte .slots { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; flex: 1; }

  .modal { padding: 20px 18px; border-radius: var(--radius-l); }
  .rezept-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 13px; }
  .zutaten-liste .menge { min-width: 62px; }
}

@media (min-width: 781px) {
  .tag-spalte .slots { display: flex; flex-direction: column; gap: 7px; flex: 1; }
}

/* ---------------------------------------------- Wer es ruhiger mag */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .fab:hover { transform: none; }
}

/* ---------------------------------------------- Drucken
   Ein Rezept auf Papier: nur Titel, Meta, Zutaten, Schritte. */

@media print {
  .sidebar, .kopf, .bottom-nav, .fab, .toasts, .modal-schicht,
  .aktions-reihe, .rezept-hero-aktionen, .herz-knopf, .deko,
  .portionen-box .zaehler button { display: none !important; }

  body { background: #fff; color: #000; font-size: 11.5pt; }
  .app { display: block; }
  #view { padding: 0; max-width: none; }
  .rezept-hero { box-shadow: none; max-height: 8cm; }
  .karte { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .schritte-liste li, .zutaten-liste li { break-inside: avoid; }
  a[href^='#']::after { content: ''; }
}

/* ---------------------------------------------- Nachtrag: Dialoge */

.modal-schmal { width: min(430px, 100%); }

.knopf-gefahr-voll {
  background: linear-gradient(135deg, #d8657c, #b03050);
}

/* ---------------------------------------------- Nachtrag: Kartenhülle */

.karte-huelle { position: relative; display: flex; }
.karte-huelle .rezept-karte { flex: 1; }
.bild-halter { display: block; }

/* Nur für Screenreader */
.nur-lesegeraet {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Großes Herz in der Rezeptansicht */
.herz-gross { color: var(--bordeaux); }
.herz-gross svg { width: 19px; height: 19px; }
.herz-gross.gefuellt { color: var(--rose); }
.herz-gross.pop svg { animation: herz-pop .42s cubic-bezier(.3, 1.6, .5, 1); }

/* ---------------------------------------------- Rezept-Schublade & Auswahl */

.schublade {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x proximity;
}

.schub-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  scroll-snap-align: start;
  background: var(--karte);
  border: 1.5px solid var(--rand);
  border-radius: 99px;
  padding: 8px 16px 8px 12px;
  font-weight: 700;
  font-size: .88rem;
  color: inherit;
  cursor: grab;
  box-shadow: var(--schatten-s);
  transition: transform .15s, border-color .15s;
  max-width: 240px;
}
.schub-chip > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.schub-chip:hover { border-color: var(--rose); transform: translateY(-2px); }
.schub-chip:active { cursor: grabbing; }
.schub-chip.zieht { opacity: .4; }

.plan-auswahl { max-height: 48vh; overflow-y: auto; display: grid; gap: 5px; }

.auswahl-zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--rand);
  background: var(--karte);
  border-radius: var(--radius-s);
  padding: 10px 14px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  transition: border-color .15s, transform .15s;
}
.auswahl-zeile:hover { border-color: var(--rose); transform: translateX(2px); }
.auswahl-zeile > span:first-child { font-size: 1.4rem; }
.auswahl-text { display: flex; flex-direction: column; min-width: 0; }
.auswahl-titel { font-weight: 700; }
