/* ============================================================
   Qulinarik.club — Street-Food Sticker Design System
   Verspielt, illustrativ, bold. Dicke Outlines, harte Schatten.
   ============================================================ */
:root {
  /* Brand colors (aus Logo & GFF-Assets) */
  --cream: #F5EEDC;
  --cream-deep: #EFE5CE;
  --paper: #FFFDF7;
  --ink: #1A1410;
  --yellow: #F7C600;
  --yellow-deep: #E8B400;
  --magenta: #D4006A;
  --magenta-deep: #A80054;
  --grape: #A93C9E;
  --teal: #2FB59E;
  --teal-deep: #1F9B85;
  --red: #E63329;

  --text: #1A1410;
  --text-soft: #6B6358;
  --text-faint: #A39A8B;

  /* Sticker tokens (Schatten bleiben unverändert — nur Outlines werden vereinheitlicht) */
  --bw: 1.5px;
  --shadow: 2px 2px 0 var(--ink), 0 6px 18px rgba(26,20,16,0.07);
  --shadow-sm: 1px 1px 0 var(--ink), 0 4px 12px rgba(26,20,16,0.06);
  --shadow-lg: 3px 3px 0 var(--ink), 0 12px 28px rgba(26,20,16,0.09);
  --surface: var(--cream-deep);
  --glass-surface:
    radial-gradient(circle at 100% 0%, rgba(255,255,255,0.72), transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,0.82), rgba(245,238,220,0.62));
  --glass-border: rgba(255,255,255,0.72);

  /* Vereinheitlichte Glas-Outline: helle, transparente Linie mit sanftem
     Verlauf, die an eine Glasspiegelung erinnert (Vorbild: .social-feature-card).
     Ersetzt die frühere harte Sticker-Outline (--border) auf allen Flächen. */
  --outline-glass: 1px solid rgba(255,255,255,0.55);
  /* Für farbige Flächen (Gelb/Magenta/Teal/Grape), wo eine helle Linie kaum
     sichtbar wäre — dunklere, transparente Variante mit gleichem "Glas"-Charakter. */
  --outline-glass-strong: 1.5px solid rgba(26,20,16,0.15);
  --border: var(--outline-glass);
  --image-bg: #F8F1E4;
  --image-outline: rgba(255,253,247,0.92);
  --image-outline-shadow: rgba(26,20,16,0.10);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-full: 999px;
  --nav-height: 58px;
  --max-width: 480px;
  --page-max: 1180px;
  --content-pad: clamp(18px, 4vw, 40px);

  --display: 'Fredoka', system-ui, sans-serif;
  --hand: 'Caveat', cursive;
  --body: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.18s cubic-bezier(.2,.7,.3,1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);

  /* Glas-Vokabular: nur für schwebende/überlagernde Ebenen (Nav, Cook-Bar,
     Toast, Timer, Modal-Backdrop, Hero-Buttons) — nie als Karten-Deko. */
  --glass-bg: rgba(255, 253, 247, 0.72);
  --glass-bg-strong: rgba(255, 253, 247, 0.86);
  --glass-bg-dark: rgba(26, 20, 16, 0.78);
  --glass-blur: blur(18px) saturate(1.3);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  /* Transluzente Flächen-Stufen: günstig (ohne Blur) für wiederholte Karten,
     die die Farb-Glows des Bodys durchscheinen lassen. Blur bleibt den
     wenigen Singleton-Ebenen vorbehalten (Robustheit auf Mobilgeräten). */
  --paper-glass: rgba(255, 253, 247, 0.8);
  --paper-glass-strong: rgba(255, 253, 247, 0.9);
  --surface-glass: rgba(239, 229, 206, 0.55);
  --cream-glass: rgba(245, 238, 220, 0.88);
}

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

/* Solide PNG-Icons (assets/icons/noun/) — Fallback-Größe, wird an den
   jeweiligen Einsatzorten per Container-Selektor (z.B. .btn .icon-img)
   überschrieben, analog zu den bisherigen "X svg { width/height }"-Regeln. */
.icon-img { width: 1em; height: 1em; object-fit: contain; vertical-align: middle; display: inline-block; }

html {
  font-family: var(--body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  background: var(--cream);
  /* Doppel-Tipp zoomt nicht mehr (nervt bei Portionen-Steppern & Checkboxen).
     Scrollen und Pinch-Zoom (Barrierefreiheit) bleiben vollständig erhalten. */
  touch-action: manipulation;
}
button, a, input, [role="button"], [role="checkbox"] {
  touch-action: manipulation;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.42), rgba(255,255,255,0) 42%),
    radial-gradient(circle at 12% 8%, rgba(247,198,0,0.10), transparent 38%),
    radial-gradient(circle at 88% 22%, rgba(47,181,158,0.10), transparent 36%),
    var(--cream);
}

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; border: none; outline: none; }
a { color: inherit; text-decoration: none; }

/* ── Layout Shell ── */
#app {
  width: min(100%, var(--max-width));
  max-width: none;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
}

@media (min-width: 768px) { :root { --max-width: 600px; } }
@media (min-width: 1024px) {
  :root { --max-width: var(--page-max); }
  #app { width: 100%; }
}
@media (min-width: 1440px) { :root { --page-max: 1240px; } }

.screen {
  display: none;
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 20px);
  animation: pop 0.3s var(--ease-out-quint);
}
.screen.active { display: block; }
.screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 4%, rgba(255,255,255,0.46), transparent 32%),
    radial-gradient(circle at 92% 18%, rgba(255,255,255,0.28), transparent 30%),
    linear-gradient(180deg, rgba(255,253,247,0.34), rgba(255,253,247,0) 320px);
}
#screen-cook.active { padding-bottom: 0; }

@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   Bottom Navigation — Sticker pills
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: max(10px, calc(env(safe-area-inset-bottom, 0px) + 8px));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 340px);
  max-width: 340px;
  height: var(--nav-height);
  background: var(--glass-bg);
  border: 1px solid rgba(26,20,16,0.10);
  border-radius: var(--radius-full);
  box-shadow: 0 10px 26px rgba(26,20,16,0.10), var(--glass-highlight);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding: 5px;
}
.nav-indicator {
  position: absolute;
  top: 5px; left: 0; bottom: 5px;
  height: calc(100% - 10px);
  background: rgba(247,198,0,0.82);
  border-radius: var(--radius-full);
  border: 1px solid rgba(26,20,16,0.08);
  box-shadow: none;
  z-index: 0;
  transition: transform 0.22s cubic-bezier(.2,.7,.3,1), width 0.22s cubic-bezier(.2,.7,.3,1);
  will-change: transform;
  pointer-events: none;
}
.nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: var(--bw) solid transparent;
  background: transparent;
  transition: var(--transition);
  color: var(--text-soft);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 600;
  min-height: 44px;
  justify-content: center;
}
.nav-item svg, .nav-item .icon-img { width: 20px; height: 20px; }
.nav-item.active {
  color: var(--ink);
  transform: none;
}

/* ============================================================
   Header + Brand
   ============================================================ */
/* Sticky Glas-Bar: das Logo bleibt beim Scrollen präsent, der Inhalt zieht
   sichtbar darunter durch — gleiche Glas-Ebene wie Nav und Kochmodus-Leisten.
   Sticky sitzt auf dem Panel (.home-control-panel), nicht auf der Bar selbst:
   deren Container wäre nur so hoch wie die Bar und würde sofort mitscrollen. */
.home-control-panel {
  position: sticky;
  top: 0;
  z-index: 60;
}
.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: max(12px, env(safe-area-inset-top, 0px)) 20px 12px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 6px 20px rgba(26,20,16,0.05), var(--glass-highlight);
}
.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-logo {
  width: 118px;
  height: auto;
  display: block;
  object-fit: contain;
  /* Optischer Ausgleich: Logo-PNG trägt eigenes Weißraum-Padding. */
  margin-left: -4px;
}
/* Page header (Plan, Box, Collections) */
.page-header {
  padding: 20px 20px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  border-radius: 0 0 22px 22px;
  box-shadow: 0 8px 22px rgba(26,20,16,0.045);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.page-title {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
}
.page-subtitle {
  font-size: 14px;
  color: var(--text-soft);
  margin-top: 2px;
  font-weight: 500;
}

.about-modal-copy {
  display: grid;
  gap: 10px;
  padding: 2px 0 4px;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.55;
  font-weight: 500;
}
.about-modal-copy strong { color: var(--text); }

/* ============================================================
   Search + Filter chips
   ============================================================ */
.discover-section {
  margin: 14px 20px 0;
  padding: 14px 14px 12px;
  background: var(--surface-glass);
  border: none;
  border-radius: var(--radius);
  box-shadow: none;
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}
.search-bar {
  margin: 0;
  background: var(--paper-glass-strong);
  border: none;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 10px rgba(26,20,16,0.06);
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  transition: var(--transition);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
}
.search-bar:focus-within { box-shadow: 0 0 0 3px rgba(212,0,106,0.12); transform: none; }
.search-bar svg, .search-bar .icon-img { width: 19px; height: 19px; color: var(--ink); flex-shrink: 0; }
.search-bar input {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  background: transparent;
  color: var(--text);
}
.search-bar input::placeholder { color: var(--text-soft); font-weight: 500; }

.filter-chips {
  display: flex;
  gap: 8px;
  padding: 10px 0 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent);
  mask-image: linear-gradient(to right, black calc(100% - 24px), transparent);
  padding-right: 26px;
}
.discover-section .filter-chips {
  padding-left: 0;
  padding-right: 0;
}
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-family: var(--display);
  font-size: 13.5px;
  font-weight: 600;
  border: var(--outline-glass);
  background: var(--paper-glass);
  color: var(--ink);
  transition: var(--transition);
  white-space: nowrap;
  min-height: 38px;
  display: flex;
  align-items: center;
  box-shadow: none;
}
.chip:active { transform: translate(1px,1px); box-shadow: none; }
.chip.active { background: var(--magenta); border-color: var(--magenta); color: #fff; box-shadow: 0 4px 12px rgba(212,0,106,0.28); }

/* ============================================================
   Latest recipes slider + Good Food Friday
   ============================================================ */
.latest-section { padding: 12px 20px 0; }
.latest-head {
  padding: 0 0 8px;
}
.latest-slider {
  position: relative;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  /* overflow:hidden blendet die nicht-aktiven Slides aus. Der harte Schatten
     der Karte bleibt dank Slide-Gutter (siehe .latest-slide) innerhalb des
     eigenen Slides und wird daher NICHT abgeschnitten. */
  overflow: hidden;
}
.latest-slider.is-dragging {
  cursor: grabbing;
}
.latest-track {
  display: flex;
  align-items: flex-start;
  width: 100%;
  transition: transform 0.58s cubic-bezier(.22,.61,.27,1);
  will-change: transform;
}
.latest-slide {
  flex: 0 0 100%;
  min-width: 0;
  /* Gutter: Seiten ≥ Schattenbreite (6px) + Press-Versatz (3px), unten ebenso.
     Dadurch endet der Karten-Schatten innerhalb des eigenen Slides und der
     Abstand zum nächsten Slide ist sauber – keine Überschneidung mehr. */
  padding: 3px 10px 11px;
}
.latest-index {
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  background: var(--paper);
  border: var(--outline-glass-strong);
  border-radius: var(--radius-full);
  padding: 5px 9px;
  box-shadow: 2px 2px 0 var(--ink);
}
.latest-dots {
  display: flex;
  gap: 7px;
  justify-content: center;
  padding-top: 6px;
}
.latest-dot {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  border: var(--outline-glass-strong);
  background: var(--paper);
  transition: var(--transition);
}
.latest-dot.active {
  width: 28px;
  background: var(--magenta);
}
.latest-controls {
  position: absolute;
  right: 22px;
  top: 16px;
  display: flex;
  gap: 8px;
  z-index: 2;
}
/* Glas-Controls wie der Hero-Back-Button: schwebende Ebene über Inhalt. */
.latest-control {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(255,253,247,0.6);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 4px 14px rgba(26,20,16,0.14), var(--glass-highlight);
  transition: var(--transition);
}
.latest-control:active { transform: translate(1px,1px); box-shadow: 0 2px 8px rgba(26,20,16,0.12); }
.latest-control svg {
  width: 18px;
  height: 18px;
}
.gff-week-section {
  padding: 0 20px;
  margin: 20px 0 0;
}
.gff-banner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--paper);
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(26,20,16,0.06);
}
.gff-banner-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gff-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
}
.gff-pill {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--teal);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: var(--border);
  box-shadow: none;
}
.gff-banner-text { font-size: 14px; line-height: 1.5; color: var(--text-soft); font-weight: 500; }
.gff-week-title {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.05;
}
.gff-social-link {
  width: fit-content;
  min-height: 40px;
  margin-top: 2px;
  padding: 10px 16px;
  font-family: var(--display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: none;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 22px rgba(26,20,16,0.08);
  transition: var(--transition);
}
.gff-social-link svg {
  width: 18px;
  height: 18px;
}
.gff-social-link:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

.social-feature-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(212,0,106,0.12), transparent 42%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(245,238,220,0.94));
  border: var(--outline-glass);
  box-shadow: 0 10px 28px rgba(26,20,16,0.08);
  align-items: end;
}
.social-feature-kicker {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 6px;
}
.social-feature-title {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0;
}
.social-feature-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 44ch;
}
.social-feature-link {
  justify-self: start;
  padding-inline: 14px 18px;
}
.social-feature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.social-feature-link-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #E1306C;
}
.social-feature-link-icon svg {
  width: 20px;
  height: 20px;
}
.social-feature-link-icon-tiktok {
  color: inherit;
}
.social-feature-link-icon-tiktok svg {
  width: 21px;
  height: 21px;
}

.featured-card {
  background: var(--paper-glass);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: var(--transition);
}
.featured-card:active { transform: translate(3px,3px); box-shadow: var(--shadow-sm); }
.featured-card-image-wrap { position: relative; background: var(--image-bg); overflow: hidden; }
.featured-card-image {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  background: var(--image-bg);
  border-bottom: 1px solid var(--image-outline);
  box-shadow: inset 0 0 0 2px var(--image-outline);
}
.featured-card-body { padding: 16px 18px 18px; }
.featured-card-title {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 6px;
}
.featured-card-desc {
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-card-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 0;
  margin-top: 14px;
  padding: 5px;
  border: var(--outline-glass-strong);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.84), rgba(245,238,220,0.66));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 8px 18px rgba(26,20,16,0.06);
}
.meta-stat {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 10px 11px;
  border-radius: 11px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.meta-stat + .meta-stat {
  border-left: 1px solid rgba(26,20,16,0.12);
}
.meta-stat-value {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meta-stat-label {
  font-size: 9px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   Recipe list
   ============================================================ */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 20px 20px 10px;
}
.section-title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}
.section-count { font-size: 13px; color: var(--text-soft); font-weight: 600; }

.recipe-list { padding: 0 20px; display: flex; flex-direction: column; gap: 12px; }
.recipe-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px;
  background: var(--paper-glass);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
}
.recipe-card:active { transform: translate(2px,2px); box-shadow: none; }
.recipe-card-image {
  width: 66px; height: 82px;
  aspect-ratio: 4/5;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--image-bg);
  flex-shrink: 0;
  border: 2px solid var(--image-outline);
  box-shadow: 0 0 0 1px var(--image-outline-shadow), 0 5px 14px rgba(26,20,16,0.06);
}
.recipe-card-info { flex: 1; min-width: 0; }
.recipe-card-title {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recipe-card-meta { font-size: 12px; color: var(--text-soft); margin-top: 5px; font-weight: 400; }
.home-category-section { margin-top: 8px; }
.recipe-tile-grid {
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: start;
}
.recipe-tile {
  background: var(--paper-glass);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}
.recipe-tile:nth-child(2n) { margin-top: 14px; }
.recipe-tile:nth-child(4n) { margin-top: 6px; }
.recipe-tile:active { transform: translate(2px,2px); box-shadow: none; }
.recipe-tile-image {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  background: var(--image-bg);
  border-bottom: 1px solid var(--image-outline);
  box-shadow: inset 0 0 0 2px var(--image-outline);
}
.recipe-tile-body { padding: 10px 11px 12px; }
.recipe-tile-title {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}
.recipe-tile-meta {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--text-soft);
  font-weight: 400;
}

/* ============================================================
   Recipe Detail
   ============================================================ */
.detail-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  line-height: 0;
  border-bottom: 1px solid var(--image-outline);
  background: var(--cream-deep);
}
.detail-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--image-bg);
  box-shadow: inset 0 0 0 2px var(--image-outline);
}
.detail-hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
}
.detail-hero-btn {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  /* Glas über dem Rezeptfoto: Bild bleibt sichtbar, Button bleibt lesbar. */
  background: rgba(255,253,247,0.6);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 4px 14px rgba(26,20,16,0.14), var(--glass-highlight);
  transition: var(--transition);
}
.detail-hero-btn:active { transform: translate(2px,2px); box-shadow: none; }
.detail-hero-btn svg { width: 21px; height: 21px; color: var(--ink); }
.detail-hero-btn.favorited { background: var(--magenta); }
.detail-hero-btn.favorited svg { color: #fff; fill: #fff; }

.detail-content { padding: 20px; }
.detail-title {
  font-family: var(--display);
  font-size: 29px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: 12px;
}

/* Author chip — Luis */
.author-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 14px 9px 9px;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  width: fit-content;
  cursor: pointer;
}
.author-avatar {
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  background: var(--yellow);
  border: var(--outline-glass-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  flex-shrink: 0;
  overflow: hidden;
}
.author-avatar img { width: 100%; height: 100%; object-fit: contain; }
.author-meta-name { font-family: var(--display); font-weight: 600; font-size: 14px; line-height: 1.1; }
.author-meta-role { font-size: 11.5px; color: var(--text-soft); font-weight: 500; }

.detail-desc {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 20px;
}

.detail-badges-row { display: flex; gap: 10px; margin-bottom: 22px; }
.detail-stat {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.detail-stat:nth-child(1) { background: var(--yellow); }
.detail-stat:nth-child(2) { background: var(--teal); }
.detail-stat:nth-child(3) { background: var(--cream); }
.detail-stat-value { font-family: var(--display); font-size: 21px; font-weight: 700; color: var(--ink); line-height: 1; }
.detail-stat-label { font-size: 10.5px; color: var(--ink); margin-top: 4px; font-weight: 600; opacity: 0.7; }

/* Portion stepper */
.portion-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
/* Nährwerte gelten pro 100 g: Stepper wird gedimmt statt entfernt, damit
   die Seitenhöhe stabil bleibt und der Viewport beim Tab-Wechsel nicht
   springt. Interaktion sperrt JS via inert. */
.portion-stepper.stepper-hidden {
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out-quint);
}
.portion-label { font-family: var(--display); font-size: 16px; font-weight: 600; }
.portion-controls { display: flex; align-items: center; gap: 14px; }
.portion-btn {
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  border: var(--border);
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  transition: var(--transition);
}
.portion-btn:active { transform: translate(2px,2px); }
.portion-btn:disabled { opacity: 0.3; pointer-events: none; }
.portion-value { font-family: var(--display); font-size: 22px; font-weight: 700; min-width: 30px; text-align: center; }

/* Tabs */
.tabs {
  position: relative;
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--cream-deep);
  padding: 5px;
  border-radius: var(--radius-full);
  border: var(--border);
}
.tab-indicator {
  position: absolute;
  top: 5px; bottom: 5px; left: 0;
  background: var(--yellow);
  border-radius: var(--radius-full);
  border: var(--outline-glass);
  box-shadow: var(--shadow-sm);
  z-index: 0;
  transition: transform 0.22s cubic-bezier(.2,.7,.3,1), width 0.22s cubic-bezier(.2,.7,.3,1);
  will-change: transform;
  pointer-events: none;
}
.tab {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 11px 0;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--text-soft);
  background: transparent;
  border-radius: var(--radius-full);
  transition: var(--transition);
  min-height: 44px;
}
.tab.active { color: var(--ink); }
.tab-content { display: none; }
/* Mindesthöhe dämpft Scroll-Sprünge, wenn ein kurzer Tab (Nährwerte) auf
   einen langen (Zutaten) folgt und die Seite sonst unter die Scroll-Position
   schrumpfen würde. */
.tab-content.active { display: block; min-height: 280px; animation: pop 0.25s var(--ease-out-quint); }

/* Ingredients */
.ingredient-group-name {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  color: var(--magenta);
  margin: 20px 0 10px;
}
.ingredient-group-name:first-child { margin-top: 0; }
.ingredient-item {
  display: grid;
  grid-template-columns: minmax(56px, 68px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  margin-top: 7px;
  font-size: 15px;
  font-weight: 500;
  background:
    linear-gradient(135deg, rgba(255,253,247,0.84), rgba(255,253,247,0.56));
  border: var(--outline-glass);
  border-radius: 12px;
  box-shadow: none;
  min-height: 46px;
  cursor: default;
}
.ingredient-item:last-child { border-bottom: none; }
.ingredient-amount {
  min-width: 0;
  height: 100%;
  padding-right: 12px;
  border-right: var(--outline-glass);
  background: transparent;
  border-radius: 0;
  color: var(--ink);
  font-family: var(--body);
  text-align: left;
  box-shadow: none;
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 4px;
}
.ingredient-amount-value {
  max-width: 100%;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ingredient-amount-unit {
  max-width: 100%;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: var(--text-soft);
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ingredient-name {
  min-width: 0;
  color: var(--text);
  line-height: 1.34;
  font-weight: 500;
}
.ingredient-name:first-child { grid-column: 1 / -1; }
.check-box {
  width: 24px; height: 24px;
  border-radius: 7px;
  /* Sichtbare Affordanz: die helle Glas-Outline verschwand auf Papier —
     das Kern-Control des Supermarkt-Flows braucht Kontrast. */
  border: 1.5px solid rgba(26,20,16,0.35);
  background: var(--paper);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.check-box::before { content: ""; position: absolute; width: 44px; height: 44px; border-radius: 10px; }
.check-box.checked { background: var(--magenta); }
.check-box.checked::after { content: "✓"; color: #fff; font-size: 14px; font-weight: 800; }
.ingredient-item.checked-item { opacity: 0.45; text-decoration: line-through; }

/* Steps preview */
.step-item { display: flex; gap: 14px; padding: 13px 0; align-items: flex-start; }
.step-number {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  background: var(--yellow);
  border: var(--outline-glass-strong);
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.step-text { font-size: 15px; line-height: 1.6; color: var(--text); padding-top: 4px; }

/* Nutrition */
.nutrition-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nutrition-item {
  padding: 16px;
  background: var(--paper-glass);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.nutrition-value { font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--magenta); }
.nutrition-label { font-size: 11px; color: var(--text-soft); margin-top: 3px; font-weight: 400; }

/* Luis tip — handwritten speech bubble */
.luis-tip {
  position: relative;
  margin: 24px 0 0;
  padding: 18px 18px 18px 16px;
  background: var(--yellow);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.luis-tip-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.luis-tip-avatar {
  width: 30px; height: 30px;
  border-radius: var(--radius-full);
  background: var(--paper);
  border: var(--outline-glass-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 13px;
  flex-shrink: 0;
  overflow: hidden;
}
.luis-tip-avatar img { width: 100%; height: 100%; object-fit: contain; }
.luis-tip-label { font-family: var(--display); font-weight: 600; font-size: 14px; }
.luis-tip-text { font-family: var(--hand); font-size: 19px; font-weight: 600; line-height: 1.3; color: var(--ink); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-full);
  font-family: var(--display);
  font-size: 16.5px;
  font-weight: 700;
  text-align: center;
  border: var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.btn:active { transform: translate(4px,4px); box-shadow: none; }
.btn svg, .btn .icon-img { width: 20px; height: 20px; }
.btn-primary { background: var(--magenta); color: #fff; }
/* Dunkle PNG-Icons neben weißem Text auf Farbflächen → weiß invertieren. */
.btn-primary .icon-img,
.cook-nav-next .icon-img,
.cook-timer-main .icon-img { filter: brightness(0) invert(1); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-row { display: flex; gap: 12px; }
.btn-row .btn { font-size: 15px; min-height: 52px; }
.btn-stack { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }

/* ============================================================
   Cooking Mode
   ============================================================ */
.cook-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 12px;
  /* Glas-Kopfzeile: Titel + Beenden bleiben beim Scrollen erreichbar,
     der Inhalt zieht sichtbar darunter durch. */
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 6px 20px rgba(26,20,16,0.06);
}
.cook-top-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cook-top-title { font-family: var(--display); font-size: 19px; font-weight: 700; }
.cook-top-sub { font-size: 13px; color: var(--text-soft); margin-top: 2px; font-weight: 400; }
.cook-close {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  background: var(--paper); border: var(--border); box-shadow: var(--shadow-sm);
}
.cook-close:active { transform: translate(2px,2px); box-shadow: none; }
.cook-close svg { width: 22px; height: 22px; }

.cook-progress {
  display: flex; gap: 5px;
  padding: 16px 20px 0;
}
.cook-pip {
  flex: 1; height: 8px;
  border-radius: var(--radius-full);
  background: var(--cream-deep);
  border: var(--outline-glass-strong);
  transition: var(--transition);
}
.cook-pip.done { background: var(--magenta); }
.cook-pip.current { background: var(--yellow); }

.cook-step-card {
  margin: 22px 20px 0;
  padding: 24px 22px;
  background: var(--paper-glass-strong);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
}
.cook-step-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}
.cook-step-num { font-family: var(--display); font-size: 40px; font-weight: 700; color: var(--magenta); line-height: 0.9; }
.cook-step-of { font-family: var(--display); font-size: 16px; font-weight: 600; color: var(--text-faint); }
.cook-step-text { font-size: 17px; line-height: 1.6; color: var(--ink); font-weight: 500; }

.cook-timer-start-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 14px;
  margin-top: 20px;
  background: var(--cream);
  border: var(--border);
  border-radius: var(--radius-full);
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  min-height: 52px;
}
.cook-timer-start-btn:active { transform: translate(3px,3px); box-shadow: none; }
.cook-timer-start-btn svg, .cook-timer-start-btn .icon-img { width: 20px; height: 20px; flex-shrink: 0; }
.cook-timer-running {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  margin-top: 20px;
  background: var(--magenta);
  border: var(--outline-glass-strong);
  border-radius: var(--radius);
  color: #fff;
}
.cook-timer-main {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cook-timer-main svg, .cook-timer-main .icon-img { width: 22px; height: 22px; flex-shrink: 0; }
.cook-timer-controls,
.cook-timer-adjust {
  display: flex;
  gap: 8px;
}
.cook-timer-adjust[hidden] { display: none; }
.cook-timer-controls button,
.cook-timer-adjust button {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition);
}
.cook-timer-controls button {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
}
.cook-timer-controls button:active { transform: scale(0.94); }
.cook-timer-controls button .icon-img { width: 16px; height: 16px; filter: brightness(0) invert(1); }
.cook-timer-adjust button {
  background: rgba(255,255,255,0.92);
  border: none;
  color: var(--magenta-deep);
}
.cook-timer-adjust button:active { transform: scale(0.94); }

/* Inline-Timer im Kochschritt: „Fertig!"-Zustand pulsiert kurz. */
.cook-timer-running.cook-timer-done { animation: timerPulse 0.7s ease 3; }
.cook-timer-done .cook-timer-main span { font-size: 22px; }

@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}


.cook-ingredients { margin: 20px 20px 0; }
.cook-ingredients-title { font-family: var(--display); font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.cook-ingredients-list {
  background: var(--paper-glass);
  border: var(--outline-glass);
  border-radius: var(--radius);
  padding: 4px 16px;
}
.cook-ingredient-line {
  font-size: 14.5px;
  padding: 9px 0;
  color: var(--text-soft);
  font-weight: 400;
  transition: var(--transition);
  border-bottom: 1px solid rgba(26,20,16,0.06);
}
.cook-ingredient-line:last-child { border-bottom: none; }
.cook-ingredient-line.is-active-step { color: var(--ink); font-weight: 700; }

.cook-equipment { margin: 20px 20px 0; }
.cook-equipment-title { font-family: var(--display); font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.cook-equipment-sub { font-size: 12px; color: var(--text-soft); margin-bottom: 12px; font-weight: 500; }
.cook-equipment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.cook-equipment-item {
  padding: 11px 14px;
  background: var(--paper-glass);
  border: var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 2px 2px 0 var(--ink);
}

.cook-nav {
  display: flex; gap: 12px;
  /* Glas-Aktionsleiste: „Weiter" klebt am unteren Rand — einhändig ohne
     Scrollen erreichbar, auch mit Öl-Fingern (P2 aus dem Critique). */
  position: sticky;
  bottom: 0;
  z-index: 50;
  margin-top: 24px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 -8px 24px rgba(26,20,16,0.08);
}
.cook-nav-single { justify-content: flex-end; }
.cook-nav-btn {
  flex: 1;
  padding: 16px;
  border-radius: var(--radius-full);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  border: var(--border);
  box-shadow: var(--shadow);
  transition: var(--transition);
  min-height: 58px;
  display: flex; align-items: center; justify-content: center;
}
.cook-nav-btn:active { transform: translate(4px,4px); box-shadow: none; }
.cook-nav-back { background: var(--paper); color: var(--ink); }
.cook-nav-next { background: var(--magenta); color: #fff; }
.cook-done-note { text-align: center; font-family: var(--hand); font-size: 19px; color: var(--magenta); font-weight: 600; padding: 20px 20px 0; }

/* ============================================================
   Plan / Week
   ============================================================ */
.week-strip { padding: 4px 20px 0; display: flex; gap: 7px; }
.plan-layout { display: block; }
.plan-main, .shopping-panel { min-width: 0; }
.week-day {
  flex: 1;
  text-align: center;
  padding: 11px 2px;
  border-radius: var(--radius-sm);
  border: var(--border);
  background: var(--paper-glass);
  cursor: pointer;
  transition: var(--transition);
  min-height: 52px;
  box-shadow: 2px 2px 0 var(--ink);
}
.week-day.filled { background: var(--yellow); }
.week-day-name { font-family: var(--display); font-size: 13px; font-weight: 700; }
.week-day-sub { font-size: 9.5px; margin-top: 2px; font-weight: 600; opacity: 0.65; }
.week-day-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--magenta); margin-top: 4px;
}

.plan-recipes { padding: 0 20px; display: flex; flex-direction: column; gap: 12px; }
.plan-card {
  display: flex; align-items: center; gap: 13px;
  padding: 11px;
  background: var(--paper-glass);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.plan-card img {
  width: 66px;
  height: 66px;
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--image-bg);
  border: 2px solid var(--image-outline);
  box-shadow: 0 0 0 1px var(--image-outline-shadow), 0 5px 14px rgba(26,20,16,0.06);
  cursor: pointer;
}
.plan-card-info { flex: 1; min-width: 0; cursor: pointer; }
.plan-card-day {
  display: inline-block;
  font-family: var(--display); font-size: 11px; font-weight: 700;
  background: var(--teal); color: var(--ink);
  padding: 2px 9px; border-radius: var(--radius-full);
  border: var(--outline-glass-strong); margin-bottom: 5px;
}
.plan-card-title { font-family: var(--display); font-size: 15.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-card-meta { font-size: 12px; color: var(--text-soft); margin-top: 2px; font-weight: 500; }
.plan-card-remove {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-faint);
  flex-shrink: 0;
  transition: var(--transition);
}
.plan-card-remove:active { transform: scale(0.85); color: var(--red); }
.plan-card-remove svg, .plan-card-remove .icon-img { width: 19px; height: 19px; }

/* Shopping list */
.shopping-wrap { padding: 0 20px; }
.shopping-cat {
  margin-bottom: 18px;
  background: var(--paper-glass);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.shopping-cat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--cream);
  border-bottom: var(--border);
}
.shopping-cat-name { font-family: var(--display); font-size: 14px; font-weight: 700; color: var(--ink); }
.shopping-cat-check {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: var(--border);
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.shopping-cat-check.all-checked { background: var(--magenta); }
.shopping-cat-check.all-checked::after { content: "✓"; color: #fff; font-size: 15px; font-weight: 800; }
.shopping-items { padding: 4px 16px 8px; }
.shopping-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0;
  font-size: 14.5px; font-weight: 500;
  min-height: 44px;
  cursor: pointer;
  border-bottom: 2px solid var(--cream-deep);
}
.shopping-item:last-child { border-bottom: none; }
.shopping-item.checked-item { opacity: 0.42; text-decoration: line-through; }
.shopping-item .check-box { width: 22px; height: 22px; }

/* ============================================================
   Box / Profile / Collections
   ============================================================ */
.luis-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  margin: 18px 20px 0;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.luis-profile-avatar {
  width: 70px; height: 70px;
  border-radius: var(--radius-full);
  background: var(--yellow);
  border: var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.luis-profile-avatar img { width: 78%; height: 78%; object-fit: contain; transform: rotate(-4deg); }
.luis-profile-name { font-family: var(--display); font-size: 19px; font-weight: 700; line-height: 1.05; }
.luis-profile-role { font-size: 12.5px; color: var(--magenta); font-weight: 600; margin-top: 1px; }
.luis-profile-bio { font-family: var(--hand); font-size: 18px; font-weight: 600; color: var(--text); line-height: 1.25; margin-top: 7px; }

.collections-row { padding: 0 20px; display: flex; flex-direction: column; gap: 12px; }
.collection-card {
  display: flex; align-items: center; gap: 14px;
  padding: 11px;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
}
.collection-card:active { transform: translate(2px,2px); box-shadow: none; }
.collection-thumb {
  width: 60px; height: 60px;
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--image-bg);
  border: 2px solid var(--image-outline);
  box-shadow: 0 0 0 1px var(--image-outline-shadow), 0 5px 14px rgba(26,20,16,0.06);
  flex-shrink: 0;
}
.collection-emoji {
  width: 60px; height: 60px;
  border-radius: var(--radius-sm);
  border: var(--outline-glass-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
}
.collection-info { flex: 1; }
.collection-title { font-family: var(--display); font-size: 16px; font-weight: 600; }
.collection-sub { font-size: 12.5px; color: var(--text-soft); margin-top: 2px; font-weight: 500; }
.collection-arrow { color: var(--text-faint); }
.collection-arrow svg { width: 22px; height: 22px; }

.recently { padding: 0 20px; display: flex; gap: 13px; overflow-x: auto; scrollbar-width: none; padding-right: 40px;
  -webkit-mask-image: linear-gradient(to right, black calc(100% - 24px), transparent);
  mask-image: linear-gradient(to right, black calc(100% - 24px), transparent); }
.recently::-webkit-scrollbar { display: none; }
.recent-card { flex-shrink: 0; width: 144px; cursor: pointer; }
.recent-card img {
  width: 144px;
  height: 144px;
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--image-bg);
  border: 2px solid var(--image-outline);
  box-shadow: 0 0 0 1px var(--image-outline-shadow), 0 5px 14px rgba(26,20,16,0.06);
  margin-bottom: 8px;
}
.recent-title { font-family: var(--display); font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-meta { font-size: 11px; color: var(--text-soft); margin-top: 1px; font-weight: 500; }

/* ============================================================
   Empty states
   ============================================================ */
.empty-state { text-align: center; padding: 48px 32px; }
.empty-emoji { font-size: 52px; margin-bottom: 16px; }
.empty-title { font-family: var(--display); font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.empty-desc { font-size: 14px; line-height: 1.5; color: var(--text-soft); max-width: 280px; margin: 0 auto; }
.empty-state .btn { max-width: 260px; margin: 18px auto 0; }
.no-results {
  text-align: center;
  padding: 44px 20px;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
  display: grid;
  gap: 16px;
  justify-items: center;
}
.no-results-reset { max-width: 320px; min-height: 48px; font-size: 14.5px; }

/* ============================================================
   Toast
   ============================================================ */
/* Dunkles Glas-Instrument wie der Timer: keine Sticker-Rotation mehr,
   ruhige Typo, Aktion als transluzenter Chip. */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + 22px);
  left: 50%;
  transform: translateX(-50%) translateY(16px) scale(0.98);
  background: var(--glass-bg-dark);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: rgba(255,253,247,0.94);
  padding: 12px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 12px 32px rgba(26,20,16,0.24), inset 0 1px 0 rgba(255,255,255,0.12);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out-quint), transform 0.35s var(--ease-out-quint);
  pointer-events: none;
  /* width: max-content verhindert Shrink-to-fit auf 50% Viewport
     (fixed + left:50%); max-width kappt und lässt den Text umbrechen. */
  width: max-content;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.toast.toast-action { pointer-events: auto; }

/* ============================================================
   Modal / Bottom sheet
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,20,16,0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  background: var(--cream-glass);
  border-top: var(--border);
  border-left: var(--border);
  border-right: var(--border);
  border-radius: 24px 24px 0 0;
  padding: 22px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  animation: slideUp 0.32s var(--ease-out-quint);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.modal-close-btn {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
  border: var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  cursor: pointer;
  z-index: 1;
}
.modal-close-btn svg { width: 16px; height: 16px; }
.modal-close-btn:active { transform: translate(1px,1px); box-shadow: none; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-handle { width: 44px; height: 5px; background: var(--text-faint); border-radius: 3px; margin: 0 auto 18px; }
.modal-title { font-family: var(--display); font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.modal-subtitle { font-size: 13.5px; color: var(--text-soft); margin-bottom: 14px; font-weight: 500; }

.modal-portions {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--paper-glass);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.modal-day-label { font-family: var(--display); font-weight: 600; font-size: 14px; margin: 18px 0 10px; }
.modal-day-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.modal-day {
  padding: 12px 0;
  text-align: center;
  border-radius: var(--radius-sm);
  border: var(--border);
  background: var(--paper-glass);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  min-height: 46px;
  transition: var(--transition);
}
.modal-day:active { transform: translate(2px,2px); }
.modal-day.selected { background: var(--magenta); color: #fff; }
.modal .btn { margin-top: 20px; }
.quick-list { max-height: 46vh; overflow-y: auto; margin: 6px -4px 0; padding: 0 4px; }
.quick-list .shopping-cat { box-shadow: 2px 2px 0 var(--ink); }

/* ============================================================
   Home workspace
   ============================================================ */
.home-shell { display: block; }
.home-control-panel,
.home-results-panel,
.home-shopping-panel { min-width: 0; }
.home-shopping-panel { padding: 24px 20px 0; }
.home-shopping-card {
  background: var(--paper-glass-strong);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
}
.home-shopping-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.home-shopping-kicker {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--magenta);
}
.home-shopping-title {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}
.home-shopping-icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  background: var(--yellow);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.home-shopping-icon svg, .home-shopping-icon .icon-img { width: 21px; height: 21px; }
.home-shopping-meta {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 12px;
}
.home-shopping-cat {
  border-top: 2px dashed var(--cream-deep);
  padding-top: 10px;
  margin-top: 10px;
}
.home-shopping-cat-title {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
}
.home-shopping-item {
  min-height: 28px;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}
.home-shopping-empty {
  padding: 18px 0 4px;
  border-top: 2px dashed var(--cream-deep);
  border-bottom: 2px dashed var(--cream-deep);
  margin-bottom: 14px;
}
.home-shopping-empty-title {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
}
.home-shopping-empty-copy {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-soft);
  margin-top: 4px;
}
.home-shopping-cta { margin-top: 16px; }

/* ============================================================
   Responsive layouts
   ============================================================ */
@media (max-width: 380px) {
  .brand-header,
  .page-header { padding-left: 16px; padding-right: 16px; }
  .discover-section { margin-left: 16px; margin-right: 16px; }
  .filter-chips,
  .latest-section,
  .gff-week-section,
  .section-head,
  .recipe-list,
  .detail-content,
  .week-strip,
  .plan-recipes,
  .shopping-wrap,
  .collections-row,
  .recently { padding-left: 16px; padding-right: 16px; }
  .btn-row { flex-direction: column; }
  .nav-item { padding-left: 10px; padding-right: 10px; }
}

@media (min-width: 768px) {
  .filter-chips,
  .recently {
    -webkit-mask-image: none;
    mask-image: none;
    padding-right: 20px;
  }

  .recipe-list,
  .collections-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .recipe-card {
    align-items: center;
    min-height: 116px;
  }

  .recipe-card-image {
    width: 84px;
    height: 105px;
  }

  .recipe-card-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .recently {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    overflow: visible;
  }

  .recent-card,
  .recent-card img {
    width: 100%;
  }

  .recent-card img {
    height: auto;
  }
}

@media (min-width: 1024px) {
  :root { --nav-height: 52px; }

  .screen {
    padding-bottom: calc(var(--nav-height) + 40px);
  }

  .page-header,
  .filter-chips,
  .latest-section,
  .gff-week-section,
  .section-head,
  .recipe-list,
  .detail-content,
  .week-strip,
  .plan-recipes,
  .shopping-wrap,
  .collections-row,
  .recently,
  .luis-profile {
    padding-left: 0;
    padding-right: 0;
  }

  .page-header {
    padding-top: 32px;
  }

  .filter-chips {
    flex-wrap: wrap;
    overflow: visible;
    padding: 18px 0 4px;
  }

  .section-head {
    padding-top: 32px;
  }

  #screen-detail.active {
    display: grid;
    grid-template-columns: minmax(320px, 460px) minmax(0, 640px);
    gap: clamp(30px, 5vw, 72px);
    align-items: start;
    justify-content: center;
    padding: 32px var(--content-pad) calc(var(--nav-height) + 40px);
  }

  #screen-detail .detail-hero {
    position: sticky;
    top: 32px;
    align-self: start;
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
  }

  #screen-detail .detail-content {
    padding: 0;
  }

  .detail-title {
    font-size: 44px;
  }

  #screen-cook.active {
    display: block;
    padding: 0 0 0;
  }

  #screen-cook .cook-top,
  #screen-cook .cook-progress,
  #screen-cook .cook-step-card,
  #screen-cook .cook-equipment,
  #screen-cook .cook-ingredients,
  #screen-cook .cook-nav,
  #screen-cook .cook-done-note {
    width: min(100%, 760px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
  }

  /* Sticky Glas-Leisten als freistehende Bars im 760px-Spaltenmaß. */
  #screen-cook .cook-top {
    padding: 18px 20px 14px;
    border-radius: 0 0 var(--radius) var(--radius);
    border: 1px solid rgba(255,255,255,0.5);
    border-top: none;
  }
  #screen-cook .cook-nav {
    padding: 14px 18px;
    border-radius: var(--radius) var(--radius) 0 0;
    border: 1px solid rgba(255,255,255,0.5);
    border-bottom: none;
  }

  #screen-cook .cook-step-card {
    padding: 34px;
  }

  .cook-step-text {
    font-size: 20px;
  }

  .cook-equipment-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cook-nav-single .cook-nav-btn {
    max-width: 360px;
    margin-left: auto;
  }

  #screen-plan.active {
    padding: 32px var(--content-pad) calc(var(--nav-height) + 40px);
  }

  #screen-plan .page-header {
    padding-top: 0;
  }

  .plan-layout {
    display: grid;
    grid-template-columns: minmax(300px, 0.82fr) minmax(420px, 1.18fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
    margin-top: 16px;
  }

  .plan-main {
    position: sticky;
    top: 24px;
  }

  .plan-main .section-head,
  .shopping-panel .section-head {
    padding-left: 0;
    padding-right: 0;
  }

  .plan-main .week-strip,
  .plan-main .plan-recipes,
  .shopping-panel .shopping-wrap,
  .shopping-panel > .btn-row {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .shopping-panel {
    padding: 22px;
    background: rgba(255, 253, 247, 0.62);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
  }

  .shopping-panel .section-head {
    padding-top: 0;
  }

  .shopping-wrap {
    column-count: 2;
    column-gap: 16px;
  }

  .shopping-cat {
    break-inside: avoid;
  }

  #screen-box.active {
    padding: 32px var(--content-pad) calc(var(--nav-height) + 40px);
  }

  #screen-box .page-header {
    padding-top: 0;
  }

  .luis-profile {
    margin-left: 0;
    margin-right: 0;
    max-width: 720px;
  }

  .collections-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .modal-overlay {
    align-items: center;
    padding: 24px;
  }

  .modal {
    max-width: 720px;
    border: var(--border);
    border-radius: var(--radius);
    padding: 26px;
    max-height: min(820px, calc(100dvh - 48px));
    overflow: auto;
    box-shadow: var(--shadow-lg);
  }

  .quick-list {
    max-height: min(560px, 58vh);
  }

  .toast {
    bottom: calc(var(--nav-height) + 32px);
  }
}

@media (min-width: 1180px) {
  #screen-home .recipe-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recipe-card {
    min-height: 122px;
  }
}

/* ============================================================
   Desktop web app override
   ============================================================ */
@media (min-width: 1024px) {
  :root { --nav-height: 52px; }

  #app {
    width: 100%;
  }

  .screen {
    padding: calc(var(--nav-height) + 34px) 0 48px;
  }

  .bottom-nav {
    top: 18px;
    bottom: auto;
    width: min(calc(100% - 48px), 320px);
    max-width: 320px;
    height: 46px;
  }

  .nav-item {
    flex: 1;
    flex-direction: row;
    justify-content: center;
    gap: 6px;
    padding: 5px 10px;
    min-height: 36px;
    font-size: 12px;
  }

  .nav-item svg, .nav-item .icon-img { width: 18px; height: 18px; }

  /* Badge klar über dem Icon statt darauf (Pille ist am Desktop flacher). */
  .nav-badge { top: -10px; right: -14px; }

  /* Einheitlicher Desktop-Gutter: Home bekommt denselben --content-pad-Rand
     wie Einkauf und Detail; die Shell zentriert sich auf --page-max. */
  #screen-home.active {
    display: block;
    padding-left: var(--content-pad);
    padding-right: var(--content-pad);
  }

  .home-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
    gap: clamp(24px, 3vw, 40px);
    width: min(100%, var(--page-max));
    margin: 0 auto;
    align-items: start;
  }

  .home-shopping-card {
    position: sticky;
    top: calc(var(--nav-height) + 34px);
  }

  /* Desktop: das Logo kehrt als fixe Glas-Pille oben links zurück —
     Gegenstück zur zentrierten Nav-Pille (top 18px, Höhe 46px). */
  .home-control-panel {
    display: block;
    position: fixed;
    top: 18px;
    left: max(24px, env(safe-area-inset-left, 0px));
    z-index: 95;
    width: auto;
  }

  .home-results-panel {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .home-shopping-panel {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
  }

  .home-results-panel .gff-week-section,
  .home-results-panel .section-head,
  .home-results-panel .recipe-list,
  .home-shopping-panel {
    padding-left: 0;
    padding-right: 0;
  }

  /* Kein Kasten ums Logo: die Wortmarke steht frei, nur das ?-Icon behält
     eine dezente Glas-Fläche. Vertikal auf die Nav-Pille (46px) zentriert. */
  .home-control-panel .brand-header {
    position: static;
    height: 46px;
    padding: 0;
    align-items: center;
    gap: 14px;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .home-control-panel .brand-logo {
    width: auto;
    height: 44px;
    margin-left: 0;
  }


  .home-results-panel .discover-section {
    margin: 0 0 14px;
  }

  .home-results-panel .filter-chips {
    flex-wrap: wrap;
    overflow: visible;
    padding-top: 12px;
    padding-bottom: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .home-results-panel .chip {
    min-height: 38px;
    padding: 8px 13px;
    font-size: 13px;
  }

  .home-control-panel .gff-banner {
    align-items: flex-start;
    margin-bottom: 10px;
  }

  .home-control-panel .gff-banner-text {
    font-size: 12px;
    line-height: 1.35;
  }

  .home-control-panel .featured-card {
    max-width: none;
    box-shadow: var(--shadow);
  }

  .home-control-panel .featured-card-image {
    max-height: 270px;
  }

  .home-control-panel .featured-card-body {
    padding: 14px 16px 16px;
  }

  .home-control-panel .featured-card-title {
    font-size: 19px;
  }

  .home-control-panel .featured-card-desc {
    -webkit-line-clamp: 3;
  }

  .home-control-panel .featured-card-meta {
    gap: 10px;
  }

  .home-results-panel .section-head {
    padding-top: 0;
    padding-bottom: 12px;
  }

  .home-results-panel .latest-section {
    padding: 0 0 18px;
  }

  .home-results-panel .latest-head {
    padding-bottom: 10px;
  }

  .home-results-panel .latest-slide {
    padding: 4px 6px 12px;
  }

  /* Die Featured-Karte füllt die Spalte komplett: gleiche Kante wie Suche
     und Tile-Grid → ein Raster. Die Pfeile liegen dadurch IN der Karte. */
  .home-results-panel .featured-card {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    align-items: stretch;
    height: 360px;
    max-width: none;
  }

  .home-results-panel .featured-card-image {
    height: 100%;
    min-height: 360px;
    object-position: top;
    border-bottom: 0;
    border-right: 1px solid var(--image-outline);
  }

  .home-results-panel .featured-card-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    overflow: hidden;
  }

  .home-results-panel .featured-card-title {
    font-size: 38px;
    line-height: 1;
  }

  .home-results-panel .featured-card-desc {
    font-size: 15px;
    -webkit-line-clamp: 3;
  }

  .home-results-panel .latest-dots {
    justify-content: center;
    padding-top: 10px;
  }

  /* Pfeile innerhalb der Karte (oben rechts im leeren Body-Bereich);
     der 1/5-Sticker entfällt am Desktop — Dots + Pfeile genügen. */
  .home-results-panel .latest-controls {
    right: 26px;
    top: 22px;
  }
  .home-results-panel .latest-index { display: none; }

  .home-results-panel .section-title {
    font-size: 28px;
  }

  .home-results-panel .recipe-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .home-results-panel .recipe-card {
    min-height: 108px;
    padding: 12px;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .home-results-panel .recipe-card-image {
    width: 78px;
    height: 98px;
  }

  .home-results-panel .recipe-card-title {
    font-size: 15.5px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  #screen-detail.active {
    grid-template-columns: minmax(320px, 430px) minmax(0, 640px);
    padding-top: calc(var(--nav-height) + 34px);
    padding-bottom: 48px;
  }

  #screen-detail .detail-hero {
    top: calc(var(--nav-height) + 34px);
  }

  #screen-cook.active {
    padding-top: 0;
    padding-bottom: 0;
  }

  #screen-plan.active,
  #screen-box.active {
    padding: calc(var(--nav-height) + 34px) var(--content-pad) 48px;
  }

  #screen-plan .page-header,
  #screen-box .page-header,
  #screen-box .luis-profile,
  #screen-box .section-head,
  #screen-box .collections-row,
  #screen-box .recently {
    width: min(100%, var(--page-max));
    margin-left: auto;
    margin-right: auto;
  }

  #screen-plan .page-header,
  #screen-box .page-header {
    padding-top: 0;
  }

  .plan-layout {
    width: min(100%, var(--page-max));
    margin: 18px auto 0;
  }

  .plan-main {
    top: calc(var(--nav-height) + 34px);
  }

  .shopping-panel {
    background: var(--paper);
  }

  .toast {
    bottom: 34px;
  }
}

@media (min-width: 1180px) {
  .home-shell {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 330px);
  }

  .home-results-panel {
    grid-column: 1;
    grid-row: 1;
  }

  .home-shopping-panel {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (min-width: 1380px) {
  .home-results-panel .recipe-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .home-results-panel .recipe-card {
    min-height: 116px;
  }

  .home-results-panel .recipe-card-image {
    width: 92px;
    height: 115px;
  }

  .home-results-panel .recipe-card-title {
    font-size: 18px;
    -webkit-line-clamp: 2;
  }

  .home-results-panel .recipe-card-meta {
    font-size: 13px;
  }
}

@media (min-width: 1500px) {
  :root { --page-max: 1320px; }

  .home-shell {
    grid-template-columns: minmax(0, 1fr) minmax(310px, 350px);
  }
}

/* ============================================================
   Final product scope: recipes + shopping
   ============================================================ */
@media (max-width: 380px) {
  .recipe-tile-grid {
    padding-left: 16px;
    padding-right: 16px;
    gap: 10px;
  }
}

@media (min-width: 1024px) {
  .home-results-panel .recipe-tile-grid {
    padding-left: 0;
    padding-right: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  /* Kein gestaffelter Versatz am Desktop: die Tiles sitzen auf einer klaren
     Rasterlinie (der mobile 2-Spalten-Rhythmus bleibt unberührt). */
  .home-results-panel .recipe-tile:nth-child(n) { margin-top: 0; }

  .home-results-panel .home-category-section:first-child .section-head {
    padding-top: 0;
  }

  .home-results-panel .recipe-tile-title {
    font-size: 15.5px;
  }

  .social-feature-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 20px 22px;
  }

  .social-feature-link {
    justify-self: end;
  }

  #screen-plan.active {
    padding: calc(var(--nav-height) + 34px) var(--content-pad) 48px;
  }

  #screen-plan .page-header {
    width: min(100%, var(--page-max));
    margin-left: auto;
    margin-right: auto;
    padding-top: 0;
  }
}

@media (min-width: 1180px) {
  .home-results-panel .recipe-tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ============================================================
   Polish layer — nutrition note, image fit, hover micro-UI,
   scroll-reveal, focus states, reduced-motion
   ============================================================ */

/* Nutrition disclaimer — dezenter Hinweistext unter dem Grid */
.nutrition-note {
  margin-top: 12px;
  font-size: 11.5px;
  line-height: 1.45;
  font-weight: 500;
  color: var(--text-faint);
  text-align: left;
}

/* ── Image fit: sauberes Clipping, keine Verzerrung, keine Leerränder ── */
.featured-card-image,
.recipe-card-image,
.recipe-tile-image,
.detail-hero img {
  object-fit: cover;
  object-position: center;
}
/* Plan-Card-Bild quadratisch füllen statt letterboxen */
.plan-card img {
  object-fit: cover;
  background: var(--image-bg);
}
/* Bilder, die in geclippten Containern sitzen, sanft zoombar machen */
.featured-card-image,
.recipe-tile-image {
  transition: transform 0.5s cubic-bezier(.2,.8,.2,1);
}

/* ── Detail-Hero: dezenter Scale-in beim Öffnen ── */
@keyframes heroIn {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}
#screen-detail.active .detail-hero img {
  animation: heroIn 0.7s cubic-bezier(.2,.8,.2,1) both;
}

/* ── Hover / Pointer-Feinheiten (nur Geräte mit echtem Hover) ── */
@media (hover: hover) and (pointer: fine) {
  .recipe-card:hover,
  .recipe-tile:hover,
  .plan-card:hover,
  .collection-card:hover {
    transform: translate(-1px, -2px);
    box-shadow: var(--shadow);
  }
  .featured-card:hover {
    transform: translate(-1px, -2px);
    box-shadow: var(--shadow-lg);
  }
  .recipe-tile:hover .recipe-tile-image,
  .featured-card:hover .featured-card-image {
    transform: scale(1.045);
  }
  .nav-item:not(.active):hover {
    color: var(--ink);
    background: var(--cream-deep);
  }
  .chip:not(.active):hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow);
  }
  .btn:hover {
    transform: translate(-1px, -1px);
  }
  .latest-control:hover,
  .detail-hero-btn:hover,
  .cook-close:hover {
    transform: translate(-1px, -1px);
  }
}

/* ── Accessibility: deutlich sichtbarer Fokus-Ring auf echten Controls ── */
button:focus-visible,
input:focus-visible,
a:focus-visible,
.chip:focus-visible,
.nav-item:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.search-bar input:focus-visible { outline: none; }

/* ── Entrance-Reveal ──
   .reveal wird NUR per JS gesetzt – und nur auf Elemente, die beim Rendern
   bereits im Viewport sind. Ohne JS oder mit reduced-motion bleibt alles
   sichtbar (kein opacity:0 im Default). So bleibt nie Inhalt unsichtbar. */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(.2,.8,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.reveal-in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Einkaufsliste 2.0 — Stepper, manuelle Artikel, Vorrat, Badge
   ============================================================ */

/* „Liste leeren" im Page-Header */
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px 13px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text-soft);
  background: var(--paper);
  border: 2px solid var(--cream-deep);
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.list-clear-btn svg, .list-clear-btn .icon-img { width: 15px; height: 15px; }
.list-clear-btn:active { transform: scale(0.94); }

/* Portions-Stepper direkt auf der Rezept-Karte in der Liste */
.plan-card-stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  background: var(--cream);
  border: var(--outline-glass-strong);
  border-radius: var(--radius-full);
  padding: 2px;
}
.plan-step {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1;
  color: var(--ink);
  background: var(--paper);
  transition: transform 0.12s ease, background 0.15s ease;
}
.plan-step:active { transform: scale(0.86); background: var(--yellow); }
.plan-step-value {
  min-width: 22px;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* Eingabe „Eigenen Artikel hinzufügen" */
.shopping-add {
  display: flex;
  gap: 8px;
  padding: 0 20px 14px;
}
.shopping-add input {
  flex: 1;
  min-width: 0;
  padding: 11px 15px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--cream-deep);
  border-radius: var(--radius-full);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.shopping-add input::placeholder { color: var(--text-soft); }
.shopping-add input:focus {
  border-color: rgba(26,20,16,0.15);
  box-shadow: 0 0 0 3px rgba(212,0,106,0.12);
}
.shopping-add-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 26px;
  line-height: 1;
  color: #fff;
  background: var(--magenta);
  border: var(--outline-glass-strong);
  border-radius: var(--radius-full);
  box-shadow: 2px 2px 0 var(--ink);
  transition: var(--transition);
}
.shopping-add-btn:active { transform: translate(2px, 2px); box-shadow: none; }

/* Manuelle Artikel: dezentes Entfernen-Kreuz, das beim Hover/Touch erscheint */
.shopping-item-manual { padding-right: 8px; }
.shopping-item-remove {
  margin-left: auto;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-faint);
  border-radius: var(--radius-full);
  transition: color 0.15s ease, transform 0.12s ease;
}
.shopping-item-remove svg { width: 14px; height: 14px; }
.shopping-item-remove:active { transform: scale(0.85); color: var(--red); }

/* Vorrats-Kategorie („hast du wahrscheinlich zuhause") gedämpft */
.shopping-cat-pantry { opacity: 0.72; }
.shopping-cat-pantry .shopping-cat-name { color: var(--text-soft); }

/* Live-Badge in der Bottom-Nav */
.nav-icon-wrap { position: relative; display: inline-flex; }
.nav-badge {
  position: absolute;
  top: -7px;
  right: -11px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  color: #fff;
  background: var(--magenta);
  border: 2px solid var(--paper);
  border-radius: var(--radius-full);
  font-variant-numeric: tabular-nums;
}
.nav-badge.show { display: inline-flex; }
.nav-badge.bump { animation: badgePop 0.4s cubic-bezier(.34,1.56,.64,1); }
@keyframes badgePop {
  0% { transform: scale(0.4); }
  55% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

/* ============================================================
   Premium-Mikrointeraktionen — subtil, mit Liebe zum Detail
   ============================================================ */

/* Checkbox: weicher Übergang + Häkchen, das beim Abhaken aufpoppt */
.check-box {
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.18s cubic-bezier(.34,1.56,.64,1);
}
.check-box.checked { animation: checkPop 0.32s cubic-bezier(.34,1.56,.64,1); }
.check-box.checked::after { animation: checkMark 0.28s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes checkPop {
  0% { transform: scale(1); }
  45% { transform: scale(0.82); }
  100% { transform: scale(1); }
}
@keyframes checkMark {
  0% { opacity: 0; transform: scale(0.2) rotate(-12deg); }
  60% { opacity: 1; transform: scale(1.18) rotate(3deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
/* Abgehakte Zeile gleitet sanft in den „erledigt"-Zustand */
.shopping-item {
  transition: opacity 0.3s ease, color 0.3s ease;
}
.shopping-item span:first-of-type,
.shopping-item > span {
  transition: opacity 0.3s ease;
}

/* Portions-Wert im Detail-Stepper: kurzer Tick beim Ändern */
.portion-value, .plan-step-value { display: inline-block; }
.portion-value.tick, .plan-step-value.tick { animation: valueTick 0.26s cubic-bezier(.34,1.56,.64,1); }
@keyframes valueTick {
  0% { transform: translateY(0); }
  40% { transform: translateY(-3px) scale(1.12); }
  100% { transform: translateY(0) scale(1); }
}

/* Slider-Karte: aktiver Slide bekommt beim Wechsel einen Hauch Tiefe */
.latest-slide .featured-card { transition: var(--transition), box-shadow 0.45s ease; }

/* Finale Typo-Schicht: UI bleibt ruhig in Geist, Headlines behalten Fredoka. */
.nav-item,
.chip,
.latest-index,
.gff-pill,
.gff-social-link,
.tab,
.portion-label,
.portion-btn,
.portion-value,
.btn,
.list-clear-btn,
.modal-day,
.home-shopping-kicker,
.home-shopping-meta,
.home-shopping-cat-title,
.shopping-cat-name,
.plan-step,
.plan-step-value,
.toast,
.toast-btn {
  font-family: var(--body);
}

/* Toast mit Aktions-Button (Undo / Zur Liste) */
.toast-action {
  display: flex;
  align-items: center;
  gap: 14px;
}
.toast-msg { white-space: normal; overflow-wrap: anywhere; min-width: 0; text-align: left; }
.toast-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  min-height: 32px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius-full);
  transition: transform 0.12s ease, background 0.15s ease;
}
.toast-btn:active { transform: scale(0.94); background: rgba(255,255,255,0.22); }

/* ── prefers-reduced-motion: nicht-essentielle Bewegung aus ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  #screen-detail.active .detail-hero img {
    animation: none !important;
  }
  .featured-card-image,
  .recipe-tile-image { transition: none !important; }
}

/* ── Glas-Fallbacks: ohne backdrop-filter (alte Browser) und bei
   prefers-reduced-transparency werden die Glas-Ebenen opak. ── */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bottom-nav, .cook-top, .cook-nav { background: rgba(255,253,247,0.97); }
  .toast { background: var(--ink); }
  .detail-hero-btn { background: var(--paper); }
  .modal-overlay { background: rgba(26,20,16,0.45); }
}
@media (prefers-reduced-transparency: reduce) {
  .bottom-nav, .cook-top, .cook-nav {
    background: var(--paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .toast {
    background: var(--ink);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .detail-hero-btn {
    background: var(--paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .modal-overlay {
    background: rgba(26,20,16,0.5);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ── Herz-Partikel (Portions-Plus): fixed über allem, rein dekorativ ── */
.portion-heart {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 210;
  pointer-events: none;
  will-change: transform;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Erweiterte Fallbacks für die zusätzlichen Glas-/Transluzenz-Flächen ── */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .search-bar, .cook-step-card, .home-shopping-card { background: var(--paper); }
  .discover-section { background: var(--surface); }
  .modal { background: var(--cream); }
  .page-header { background: rgba(255,253,247,0.97); }
}
@media (prefers-reduced-transparency: reduce) {
  .search-bar, .cook-step-card, .home-shopping-card,
  .recipe-card, .recipe-tile, .featured-card, .chip,
  .cook-ingredients-list, .cook-equipment-item, .nutrition-item,
  .plan-card, .shopping-cat, .week-day, .modal-day,
  .about-luis, .modal-portions {
    background: var(--paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .discover-section { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .modal { background: var(--cream); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .page-header { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ── Logo als Home-Link ── */
.brand-home-link { border-radius: var(--radius-sm); }
.brand-home-link:focus-visible { outline: 3px solid rgba(212,0,106,0.5); outline-offset: 4px; }

/* ── Einkaufslisten-Hinweis (Erstnutzung, wegklickbar, transluzent) ── */
.plan-hint {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 20px 14px;
  padding: 12px 12px 12px 16px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 20px rgba(26,20,16,0.07), var(--glass-highlight);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-soft);
  transition: opacity 0.2s var(--ease-out-quint), transform 0.2s var(--ease-out-quint);
}
.plan-hint strong { color: var(--text); font-weight: 650; }
.plan-hint-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin: -4px -2px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-soft);
  background: rgba(255,253,247,0.6);
  border: 1px solid rgba(26,20,16,0.08);
}
.plan-hint-close svg { width: 14px; height: 14px; }
.plan-hint-out { opacity: 0; transform: translateY(-6px); }
@media (min-width: 1024px) {
  .plan-hint { margin-left: 0; margin-right: 0; }
}
@media (prefers-reduced-transparency: reduce) {
  .plan-hint { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ── Site-Footer: dezenter Impressum-Zugang auf den Hub-Screens ── */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px 20px 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-soft);
}
.site-footer a {
  color: var(--text-soft);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(26,20,16,0.25);
}
.site-footer a:focus-visible { outline: 3px solid rgba(212,0,106,0.5); outline-offset: 2px; border-radius: 4px; }

/* ── Impressum ── */
.legal-content {
  padding: 20px;
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.legal-card {
  background: var(--paper-glass);
  border: var(--outline-glass);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.legal-name { font-family: var(--display); font-size: 22px; font-weight: 700; }
.legal-sub { font-size: 14px; color: var(--text-soft); font-weight: 500; margin: 2px 0 16px; }
.legal-h { font-family: var(--display); font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.legal-rows { display: grid; gap: 14px; }
.legal-rows dt {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 2px;
}
.legal-rows dd { font-size: 14.5px; line-height: 1.5; color: var(--text); font-weight: 500; }
.legal-rows a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(26,20,16,0.25); }
.legal-links { list-style: none; display: grid; gap: 8px; }
.legal-links a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(26,20,16,0.25);
}
.legal-text p { font-size: 13.5px; line-height: 1.65; color: var(--text-soft); font-weight: 500; }
.legal-text h3 { font-family: var(--display); font-size: 14px; font-weight: 700; margin: 16px 0 6px; color: var(--text); }
@media (min-width: 1024px) {
  #screen-impressum .page-header {
    width: min(100%, 720px);
    margin: 0 auto;
    padding-top: 0;
  }
  #screen-impressum.active { padding-left: var(--content-pad); padding-right: var(--content-pad); }
}
