*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  color-scheme:light dark;
  --orange:#e67e22;--orange-light:#f39c12;--orange-bg:#fff8f0;
  --green:#27ae60;--red:#e74c3c;--grey:#95a5a6;--grey-light:#ecf0f1;
  --grey-dark:#7f8c8d;--text:#2c3e50;--text-light:#6b7778;
  --bg:#f8f9fa;--white:#ffffff;--shadow:0 2px 8px rgba(0,0,0,.08);
  --shadow-md:0 4px 16px rgba(0,0,0,.12);
  --border:#dddddd;--border-strong:#c4c9cc;
  /* Markenfarben: in hell und dunkel gleich */
  --migros:#ff6600;--coop:#c8102e;--teal:#26a69a;--teal-dark:#00897b;--teal-light:#80cbc4;
  --blue:#1976d2;--indigo:#5c6bc0;--purple:#7b1fa2;
  /* Getönte Flächen und die Schrift darauf */
  --tint-grey:#f5f5f5;--tint-orange:#fff3e0;--tint-orange-strong:#ffe0b2;
  --tint-red:#ffebee;--tint-red-strong:#ffcdd2;--tint-green:#e8f5e9;--tint-green-strong:#c8e6c9;
  --tint-blue:#e3f2fd;--tint-blue-strong:#bbdefb;
  --on-tint-green:#1b5e20;--on-tint-red:#b71c1c;--on-tint-orange:#8a4b00;
  --radius:12px;--radius-sm:8px;
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --nav-height:64px;
}
/* Dunkle Darstellung: folgt dem System, ausser in den Einstellungen ist «Hell» gewählt.
   Nur für den Bildschirm; gedruckt wird immer hell. */
@media screen and (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
  --orange:#f0913a;--orange-light:#f5a742;--orange-bg:#2a2017;
  --green:#3ec47a;--red:#f06a5b;--grey:#7d878c;--grey-light:#2b3036;
  --grey-dark:#a3acb1;--text:#e6e9ec;--text-light:#a3acb1;
  --bg:#121417;--white:#1c1f23;--shadow:0 2px 8px rgba(0,0,0,.45);
  --shadow-md:0 4px 16px rgba(0,0,0,.6);
  --border:#3a4047;--border-strong:#4a525a;
  --tint-grey:#24282d;--tint-orange:#2e2318;--tint-orange-strong:#3d2c18;
  --tint-red:#33191b;--tint-red-strong:#4a2023;--tint-green:#16271c;--tint-green-strong:#1f3a27;
  --tint-blue:#162433;--tint-blue-strong:#1d3550;
  --on-tint-green:#8fd6a3;--on-tint-red:#f3a5a0;--on-tint-orange:#f3c08a;
  }
}
@media screen{
  :root[data-theme="dark"]{
  --orange:#f0913a;--orange-light:#f5a742;--orange-bg:#2a2017;
  --green:#3ec47a;--red:#f06a5b;--grey:#7d878c;--grey-light:#2b3036;
  --grey-dark:#a3acb1;--text:#e6e9ec;--text-light:#a3acb1;
  --bg:#121417;--white:#1c1f23;--shadow:0 2px 8px rgba(0,0,0,.45);
  --shadow-md:0 4px 16px rgba(0,0,0,.6);
  --border:#3a4047;--border-strong:#4a525a;
  --tint-grey:#24282d;--tint-orange:#2e2318;--tint-orange-strong:#3d2c18;
  --tint-red:#33191b;--tint-red-strong:#4a2023;--tint-green:#16271c;--tint-green-strong:#1f3a27;
  --tint-blue:#162433;--tint-blue-strong:#1d3550;
  --on-tint-green:#8fd6a3;--on-tint-red:#f3a5a0;--on-tint-orange:#f3c08a;
  }
}
:root[data-theme="light"]{color-scheme:light}
:root[data-theme="dark"]{color-scheme:dark}
@media print{ :root{
  --orange:#e67e22;--orange-light:#f39c12;--orange-bg:#fff8f0;
  --green:#27ae60;--red:#e74c3c;--grey:#95a5a6;--grey-light:#ecf0f1;
  --grey-dark:#7f8c8d;--text:#2c3e50;--text-light:#6b7778;
  --bg:#f8f9fa;--white:#ffffff;--shadow:0 2px 8px rgba(0,0,0,.08);
  --shadow-md:0 4px 16px rgba(0,0,0,.12);
  --border:#dddddd;--border-strong:#c4c9cc;
  /* Markenfarben: in hell und dunkel gleich */
  --migros:#ff6600;--coop:#c8102e;--teal:#26a69a;--teal-dark:#00897b;--teal-light:#80cbc4;
  --blue:#1976d2;--indigo:#5c6bc0;--purple:#7b1fa2;
  /* Getönte Flächen und die Schrift darauf */
  --tint-grey:#f5f5f5;--tint-orange:#fff3e0;--tint-orange-strong:#ffe0b2;
  --tint-red:#ffebee;--tint-red-strong:#ffcdd2;--tint-green:#e8f5e9;--tint-green-strong:#c8e6c9;
  --tint-blue:#e3f2fd;--tint-blue-strong:#bbdefb;
  --on-tint-green:#1b5e20;--on-tint-red:#b71c1c;--on-tint-orange:#8a4b00;
} }
html,body{height:100%;overflow:hidden}
body{
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg);color:var(--text);-webkit-tap-highlight-color:transparent;
  -webkit-font-smoothing:antialiased;
}
/* Zoomen mit zwei Fingern ist erlaubt (Lesbarkeit beim Kochen). Doppeltipp-Zoom
   wird unterdrückt, und Eingabefelder haben 16px, sonst zoomt iOS beim Antippen hinein. */
html{touch-action:manipulation;-webkit-text-size-adjust:100%;text-size-adjust:100%}
input,textarea,select{font-size:16px!important}
#app{height:100%;display:flex;flex-direction:column}
button{font:inherit;cursor:pointer;border:none;background:none;color:inherit}
input{font:inherit;border:none;outline:none}
img{display:block}

/* ── Login ── */
.login-screen{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  height:100%;padding:24px;background:linear-gradient(135deg,var(--orange-bg) 0%,var(--tint-orange-strong) 100%);
}
.login-logo{font-size:64px;margin-bottom:8px}
.login-title{font-size:28px;font-weight:700;color:var(--orange);margin-bottom:4px}
.login-subtitle{font-size:14px;color:var(--text-light);margin-bottom:32px}
.login-form{width:100%;max-width:320px;display:flex;flex-direction:column;gap:12px}
.login-input{
  width:100%;padding:14px 16px;border-radius:var(--radius);
  background:var(--white);border:2px solid var(--grey-light);font-size:16px;
  transition:border-color .2s;
}
.login-input:focus{border-color:var(--orange)}
.login-btn{
  width:100%;padding:14px;border-radius:var(--radius);
  background:var(--orange);color:white;font-size:16px;font-weight:600;
  transition:background .2s;
}
.login-btn:active{background:var(--orange-light)}
.login-error{color:var(--red);font-size:13px;text-align:center;min-height:20px}

/* ── Top bar ── */
.topbar{
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 16px;background:var(--white);border-bottom:1px solid var(--grey-light);
  flex-shrink:0;
}
.topbar-title{font-size:18px;font-weight:700;color:var(--text)}
.topbar-week{font-size:13px;color:var(--text-light);margin-top:1px}
.topbar-btn{
  width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:var(--grey-light);transition:background .2s;flex-shrink:0;
}
.topbar-btn:active{background:var(--border)}
.topbar-btn svg{width:18px;height:18px}
.topbar-center{text-align:center;flex:1}
.topbar-right{display:flex;gap:8px;align-items:center}
.topbar-actions{display:flex;gap:6px;align-items:center}

/* ── Main content area ── */
.main-content{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:calc(var(--nav-height) + var(--safe-bottom))}
.main-content.has-cta{padding-bottom:calc(var(--nav-height) + var(--safe-bottom) + 64px)}

/* ── Week view ── */
.week-swipe-area{overflow-x:hidden;position:relative;touch-action:pan-y}
.week-swipe-wrap{will-change:transform;width:100%}
.week-grid{padding:12px}
.day-card{
  background:var(--white);border-radius:var(--radius);
  box-shadow:var(--shadow);margin-bottom:12px;overflow:hidden;
}
.day-card.is-today{border-left:4px solid var(--orange)}
.day-header{
  padding:10px 14px;font-weight:700;font-size:14px;
  background:var(--orange-bg);color:var(--orange);
  display:flex;justify-content:space-between;align-items:center;
}
.day-header .date{font-weight:400;color:var(--text-light);font-size:13px}
.day-slots{display:flex;flex-direction:column;gap:0;padding:0 14px 10px}
.meal-slot{
  flex:1;border-radius:var(--radius-sm);min-height:80px;
  display:flex;flex-direction:column;overflow:hidden;position:relative;
  border:2px dashed var(--grey-light);transition:border-color .2s;cursor:pointer;
  /* Ohne das zeigt iOS Safari beim langen Drücken SEIN Menü ("Teilen…",
     "In Fotos sichern", "Kopieren") über dem Rezeptbild. Es legt sich über
     den Verschiebe-Modus, und Ziehen ist unmöglich.
     user-select verhindert zusätzlich die Textauswahl beim Halten. */
  -webkit-touch-callout:none;
  -webkit-user-select:none;
  user-select:none;
}
.meal-slot:active{border-color:var(--orange)}
.meal-slot.filled{border:none;box-shadow:var(--shadow)}
.meal-label{
  font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;
  color:var(--text-light);padding:6px 8px 2px;
}
.meal-slot.filled .meal-label{
  position:absolute;top:0;left:0;right:0;
  background:linear-gradient(180deg,rgba(0,0,0,.6),transparent);
  color:white;padding:4px 8px;z-index:1;
}
.slot-empty{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  color:var(--grey);line-height:1;gap:2px;
}
.slot-plus{font-size:24px;font-weight:300}
.slot-plus-txt{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.4px}
/* Gestaltung des «+ Gang»-Kastens: siehe .meal-slot.add-slot-btn weiter unten */
.slot-filled{display:flex;flex-direction:column;height:100%;position:relative}
.slot-img{
  width:100%;height:60px;object-fit:cover;
  /* Das Bild ist der Auslöser des iOS-Menüs. pointer-events:none nimmt es
     ganz aus der Berührung heraus — geklickt wird ohnehin die Kachel. */
  -webkit-touch-callout:none;-webkit-user-drag:none;pointer-events:none;
}
.slot-ordered-badge{
  position:absolute;top:34px;right:4px;z-index:2;  /* unter dem Papierkorb, der es vorher verdeckte */
  background:var(--tint-green-strong);color:var(--on-tint-green);  /* hellgrüner Kreis, dunkelgrüner Cart */
  width:24px;height:24px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 1px 3px rgba(0,0,0,.25);
  border:1.5px solid var(--on-tint-green);
}
.slot-ordered-check{display:none}  /* das Häkchen-Element gibt's noch im DOM, hide for new style */
.slot-title{
  font-size:12px;font-weight:600;padding:4px 8px 6px;line-height:1.3;
  overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
}
.slot-time{font-size:12px;color:var(--text-light);padding:0 8px 4px}
.meal-group{padding:8px 0 4px;border-bottom:1px solid var(--grey-light)}
.meal-group:last-child{border-bottom:none;padding-bottom:0}
.meal-group-slots{display:flex;gap:6px}
.meal-group-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--text-light);padding:0 2px 3px;display:flex;align-items:center;gap:4px}
.meal-group-label::before{content:'';flex:0 0 8px;height:2px;border-radius:1px}
.meal-group.lunch .meal-group-label::before{background:var(--orange)}
.meal-group.dinner .meal-group-label::before{background:var(--indigo)}
.meal-slot.extra-slot{border-color:var(--orange-light, var(--tint-orange-strong))}
.meal-slot.extra-slot .meal-label{color:var(--orange)}
/* Kids-Slot: Label vertikal links */
.meal-slot.kids-slot{border-color:var(--teal-light);padding-left:18px;position:relative}
.meal-slot.kids-slot.filled{padding-left:18px}
.kids-side-label{
  position:absolute;left:0;top:0;bottom:0;width:18px;
  background:var(--teal);color:white;
  font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1px;
  display:flex;align-items:center;justify-content:center;
  writing-mode:vertical-rl;transform:rotate(180deg);
  z-index:2;
}
.meal-slot.kids-slot .slot-img{height:50px}
.meal-slot.add-slot-btn{
  flex:0 0 48px;min-height:48px;
  border-style:dashed;border-width:2px;border-color:var(--orange);
  background:var(--orange-bg, var(--tint-orange));
  opacity:.85;transition:all .2s;
}
.meal-slot.add-slot-btn:hover,.meal-slot.add-slot-btn:active{
  opacity:1;background:var(--orange);
}
.meal-slot.add-slot-btn .slot-empty{
  color:var(--orange)!important;font-size:24px!important;font-weight:600;
}
.meal-slot.add-slot-btn:hover .slot-empty,.meal-slot.add-slot-btn:active .slot-empty{
  color:white!important;
}
.add-slot-menu{display:flex;gap:4px;flex-wrap:wrap;padding:4px 0}
.add-slot-option{font-size:12px;padding:4px 10px;border-radius:12px;border:1px solid var(--orange);color:var(--orange);background:var(--white);cursor:pointer}
.add-slot-option:active{background:var(--orange);color:white}
.add-slot-option.cancel{border-color:var(--grey);color:var(--grey)}

/* ── Slot action popover ── */
.slot-actions-overlay{
  position:fixed;inset:0;background:rgba(0,0,0,.3);z-index:90;
  display:flex;align-items:center;justify-content:center;
}
.slot-actions-card{
  background:var(--white);border-radius:var(--radius);padding:0;
  width:260px;box-shadow:var(--shadow-md);overflow:hidden;
}
.slot-actions-card img{width:100%;height:140px;object-fit:cover}
.slot-actions-title{font-size:15px;font-weight:700;padding:12px 16px 4px}
.slot-actions-time{font-size:12px;color:var(--text-light);padding:0 16px 12px}
.slot-actions-btns{display:flex;flex-direction:column;border-top:1px solid var(--grey-light)}
.slot-action-btn{
  padding:14px 16px;font-size:14px;text-align:left;
  border-bottom:1px solid var(--grey-light);display:flex;align-items:center;gap:10px;
}
.slot-action-btn:last-child{border-bottom:none}
.slot-action-btn:active{background:var(--grey-light)}
.slot-action-btn.danger{color:var(--red)}

/* ── Kochwoche-Chips ── */
.cd-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.cd-chip{
  width:42px;height:42px;border-radius:50%;
  border:1.5px solid var(--grey-light);background:var(--white);
  font-size:13px;font-weight:600;color:var(--text-light);
  cursor:pointer;transition:all .15s;
}
.cd-chip:hover{border-color:var(--orange)}
.cd-chip.active{
  background:var(--orange);color:white;border-color:var(--orange);
  box-shadow:0 1px 3px rgba(255,108,0,.3);
}
.cd-count{font-size:12px;color:var(--text-light);margin-top:6px}

/* ── Audience-Toggle (Für wen?) ── */
.audience-toggle{display:flex;gap:6px;margin-top:4px}
.audience-toggle button{
  flex:1;padding:8px 4px;border-radius:8px;border:1.5px solid var(--grey-light);
  background:var(--white);font-size:12px;font-weight:600;color:var(--text-light);cursor:pointer;transition:all .15s;
}
.audience-toggle button.active{background:var(--orange);color:white;border-color:var(--orange)}
.audience-fav-check{display:flex;align-items:center;gap:8px;margin-top:10px;font-size:13px;cursor:pointer}
.audience-fav-check input{width:18px;height:18px}

/* ── Leftover-Vorschlagskarten ── */
.lo-suggestions{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.lo-sugg-card{
  padding:12px 14px;border:1.5px solid var(--orange);border-radius:10px;
  background:var(--orange-bg);cursor:pointer;transition:all .15s;
}
.lo-sugg-card:active{transform:scale(.98);background:var(--tint-orange-strong)}
.lo-sugg-title{font-weight:700;font-size:14px;color:var(--orange-dark, var(--on-tint-orange))}
.lo-sugg-desc{font-size:12px;color:var(--text-light);margin-top:3px;line-height:1.4}

/* ── Manuelle Liste ── */
.manual-list{padding:14px 16px;max-width:600px;margin:0 auto}
.ml-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}
.ml-title{font-size:18px;font-weight:700}
.ml-count{font-size:13px;color:var(--text-light)}
.ml-print{
  border:none;background:transparent;color:var(--text-light);cursor:pointer;
  padding:6px;border-radius:6px;display:flex;align-items:center;justify-content:center;
  transition:all .2s;
}
.ml-print:hover,.ml-print:active{color:var(--orange);background:var(--orange-bg)}
.ml-hint{font-size:12px;color:var(--text-light);margin-bottom:14px;line-height:1.4}
.ml-add{display:flex;gap:8px;margin-bottom:14px}
.ml-input{
  flex:1;padding:10px 14px;border:1.5px solid var(--grey-light);border-radius:10px;
  font-size:15px;outline:none;
}
.ml-input:focus{border-color:var(--orange)}
.ml-add-btn{
  flex:0 0 44px;height:44px;border-radius:10px;border:none;
  background:var(--orange);color:white;font-size:24px;font-weight:300;
  cursor:pointer;transition:opacity .2s;
}
.ml-add-btn:disabled{opacity:.4;cursor:not-allowed}
.ml-empty{text-align:center;padding:50px 20px;color:var(--text-light)}
.ml-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.ml-item{
  display:flex;align-items:center;gap:10px;padding:10px 14px;
  background:var(--white);border-radius:10px;box-shadow:var(--shadow);
  transition:opacity .2s;
}
.ml-item.checked{opacity:.55}
.ml-item.checked .ml-text{text-decoration:line-through;color:var(--text-light)}
.ml-checkbox{position:relative;flex:0 0 22px;height:22px;cursor:pointer}
.ml-checkbox input{position:absolute;opacity:0;width:100%;height:100%;cursor:pointer;z-index:1}
.ml-checkmark{
  position:absolute;top:0;left:0;right:0;bottom:0;
  border:2px solid var(--grey);border-radius:5px;background:var(--white);
  transition:all .2s;
}
.ml-checkbox input:checked ~ .ml-checkmark{background:var(--orange);border-color:var(--orange)}
.ml-checkbox input:checked ~ .ml-checkmark::after{
  content:'';position:absolute;left:6px;top:2px;width:5px;height:10px;
  border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg);
}
.ml-text{flex:1;font-size:15px;line-height:1.3;word-break:break-word}
.ml-del{
  flex:0 0 32px;height:32px;border:none;background:transparent;cursor:pointer;
  font-size:16px;opacity:.5;border-radius:6px;
}
.ml-del:hover,.ml-del:active{opacity:1;background:rgba(220,38,38,.08)}
.ml-clear-btn{
  display:block;margin:24px auto 0;padding:10px 22px;border-radius:10px;
  border:1.5px solid var(--red);background:var(--white);color:var(--red);
  font-size:14px;font-weight:600;cursor:pointer;transition:all .2s;
}
.ml-clear-btn:hover,.ml-clear-btn:active{background:var(--red);color:white}

/* ── Shopping list ── */
.shopping-list{padding:12px 16px}
.shopping-empty{
  text-align:center;padding:60px 20px;color:var(--text-light);
}
.shopping-empty-icon{font-size:48px;margin-bottom:12px}
.shopping-item{
  display:flex;align-items:center;gap:12px;
  padding:12px 14px;background:var(--white);border-radius:var(--radius-sm);
  margin-bottom:6px;box-shadow:var(--shadow);cursor:pointer;
  transition:opacity .2s,transform .15s;
}
.shopping-item:active{transform:scale(.98)}
.shopping-item.checked{opacity:.45}
.shopping-item.checked .si-name{text-decoration:line-through}
.si-swipe-wrap{
  position:relative;overflow:hidden;border-radius:var(--radius-sm);margin-bottom:6px;
}
.si-swipe-bg{
  position:absolute;top:0;right:0;bottom:0;width:100%;
  background:var(--red);display:flex;align-items:center;justify-content:flex-end;
  padding-right:20px;color:white;font-weight:600;font-size:13px;
  border-radius:var(--radius-sm);
}
.si-swipe-wrap .shopping-item,
.si-swipe-wrap .fav-card{
  margin-bottom:0;position:relative;z-index:1;
}
.si-content{flex:1;min-width:0}
.si-name{font-size:14px;font-weight:500}
.si-recipes{font-size:12px;color:var(--orange);margin-top:2px}
.shopping-section-title{
  font-size:12px;font-weight:600;color:var(--text-light);text-transform:uppercase;
  letter-spacing:.5px;margin:16px 0 8px;
}
/* Rezept-Gruppen in der Einkaufsliste */
/* ── Haushalt-Section ── */
.household-section{margin:16px 0;border:1px solid var(--grey-light);border-radius:10px;overflow:hidden}
.household-header{
  display:flex;align-items:center;gap:8px;padding:11px 14px;background:var(--tint-grey);
  font-weight:600;font-size:14px;cursor:pointer;user-select:none;
}
.household-arrow{font-size:12px;transition:transform .2s;display:inline-block}
.household-arrow.open{transform:rotate(90deg)}
.household-count{margin-left:auto;font-size:12px;color:var(--orange);font-weight:600}
.household-body{padding:12px 14px}
.household-grid{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.household-chip{
  display:flex;align-items:center;gap:6px;padding:7px 10px 7px 12px;border-radius:18px;
  border:1.5px solid var(--grey-light);background:var(--white);font-size:13px;cursor:pointer;transition:all .15s;
}
.household-chip.checked{background:var(--orange);color:white;border-color:var(--orange)}
.household-tick{font-weight:700;font-size:12px}
/* Miniaturbild, wenn zum Eintrag ein konkretes Produkt gemerkt ist */
.household-thumb{
  width:20px;height:20px;border-radius:4px;object-fit:cover;background:var(--white);
}
.household-remove{
  border:none;background:transparent;color:inherit;opacity:.45;cursor:pointer;
  font-size:15px;line-height:1;padding:2px 4px;margin:-2px -4px -2px 0;border-radius:50%;
}
.household-remove:hover,.household-remove:active{opacity:1;background:rgba(0,0,0,.12)}
/* Die zweite Art hinzuzufügen — direkt neben dem Textfeld, damit der
   Unterschied im Namen steht und nicht in der Position auf der Seite. */
.household-search-btn{
  width:100%;margin-top:8px;padding:9px;border-radius:8px;
  border:1.5px dashed var(--orange);background:transparent;
  color:var(--orange);font-weight:600;font-size:13px;cursor:pointer;
}
.household-search-btn:active{background:var(--orange-bg)}
.household-foot{font-size:12px;color:var(--text-light);margin-top:8px;line-height:1.4}
.household-empty{font-size:12px;color:var(--text-light);margin-bottom:10px;line-height:1.4}

.recipe-group{margin-bottom:14px}
.recipe-group-header{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:6px 4px 4px;border-bottom:1px dashed var(--grey-light);margin-bottom:6px;
}
.recipe-group-title{
  font-size:12px;font-weight:600;color:var(--text-light);
  flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;
}
.recipe-group-meta{font-weight:400;font-size:12px;opacity:.85}
.recipe-group-del{
  background:transparent;color:var(--text-light);font-size:12px;font-weight:500;
  padding:3px 8px;border-radius:6px;border:1px solid var(--grey-light);
  white-space:nowrap;cursor:pointer;
}
.recipe-group-del:active{background:var(--tint-red);color:var(--on-tint-red);border-color:var(--tint-red-strong)}
.checked-toggle{display:flex;align-items:center;gap:6px;cursor:pointer;user-select:none}
.checked-arrow{font-size:11px;transition:transform .2s;color:var(--text-light)}
.checked-arrow.open{transform:rotate(90deg)}
/* ── Shop prices ── */
.shop-prices-bar{
  display:flex;gap:8px;margin-bottom:12px;align-items:center;flex-wrap:wrap;
}
.btn-shop-prices{
  /* Bewusst zurückhaltend: das ist eine Nachlade-Aktion, nicht das Ziel der
     Seite. Der auffälligste Knopf soll "Warenkörbe füllen lassen" bleiben. */
  padding:8px 16px;border-radius:20px;font-size:13px;font-weight:600;
  background:transparent;color:var(--green);cursor:pointer;
  border:1.5px solid var(--green);
  display:flex;align-items:center;gap:6px;transition:all .2s;
}
.btn-shop-prices:active{transform:scale(.95);background:var(--green);color:white}
.btn-shop-prices:disabled{opacity:.5}
/* Eine Zeile statt dreier verstreuter Zahlen */
.shop-status{font-size:12px;color:var(--text-light)}
.shop-status .warn{color:var(--orange);font-weight:600}
.si-shop-row{display:flex;gap:4px;margin-top:6px;flex-wrap:wrap}
.si-shop-match{
  display:flex;align-items:center;gap:6px;
  padding:5px 7px;background:var(--orange-bg);border-radius:6px;
  font-size:12px;flex:1;min-width:0;
}
.si-shop-match{cursor:pointer;transition:all .2s}
.si-shop-match.migros{background:var(--tint-orange)}
.si-shop-match.coop{background:var(--tint-red)}
.si-shop-match.coop.selected{background:var(--coop);color:white;box-shadow:0 1px 4px rgba(200,16,46,.3)}
.si-shop-match.coop.selected .si-shop-price{color:white}
.si-shop-match.coop.selected .si-shop-badge{background:var(--white);color:var(--coop)}
.si-shop-match.migros.selected{background:var(--migros);color:white;box-shadow:0 1px 4px rgba(255,102,0,.3)}
.si-shop-match.migros.selected .si-shop-price{color:white}
.si-shop-match.migros.selected .si-shop-badge{background:var(--white);color:var(--migros)}
.si-shop-badge{
  font-size:11px;font-weight:700;padding:1px 4px;border-radius:3px;
  color:white;flex-shrink:0;line-height:1.2;
}
.si-shop-badge.coop{background:var(--coop)}
.si-shop-badge.migros{background:var(--migros)}
/* Liste-Pill als 3. Laden */
.si-shop-match.list{
  background:var(--tint-blue);color:var(--blue);font-weight:600;
  flex:0 0 auto;padding:5px 10px;
}
.si-shop-match.list:hover,.si-shop-match.list:active{
  background:var(--tint-blue-strong);
}
.si-shop-match.list.selected{
  background:var(--blue);color:white;box-shadow:0 1px 4px rgba(25,118,210,.3);
}
.si-list-icon{width:16px;height:16px;flex-shrink:0}
.si-shop-img{width:28px;height:28px;border-radius:4px;object-fit:contain;background:var(--white);flex-shrink:0}
.si-shop-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.si-shop-price{font-weight:700;color:var(--green);white-space:nowrap}
.si-shop-bio{
  background:#27ae60;color:white;padding:1px 5px;border-radius:4px;
  font-size:11px;font-weight:600;flex-shrink:0;
}
.si-shop-unit{color:var(--text-light);font-size:12px}
/* ── Quick-select buttons ── */
.quick-select-bar{
  display:flex;gap:8px;margin-bottom:12px;
}
.quick-select-btn{
  flex:1;display:flex;align-items:center;justify-content:center;gap:6px;
  padding:10px 8px;border-radius:var(--radius);border:2px solid var(--border);
  background:var(--white);cursor:pointer;transition:all .2s;
}
.quick-select-btn:active{transform:scale(.95)}
.quick-select-btn .qs-letter{
  font-size:16px;font-weight:800;line-height:1;
}
.quick-select-btn .qs-label{
  font-size:12px;font-weight:600;color:var(--text-light);
}
.quick-select-btn.coop{border-color:var(--border)}
.quick-select-btn.coop .qs-letter{color:var(--coop)}
.quick-select-btn.coop.active{background:var(--coop);border-color:var(--coop)}
.quick-select-btn.coop.active .qs-letter,.quick-select-btn.coop.active .qs-label{color:white}
.quick-select-btn.migros{border-color:var(--border)}
.quick-select-btn.migros .qs-letter{color:var(--migros)}
.quick-select-btn.migros.active{background:var(--migros);border-color:var(--migros)}
.quick-select-btn.migros.active .qs-letter,.quick-select-btn.migros.active .qs-label{color:white}
.shop-totals-bar{
  display:flex;gap:8px;margin-bottom:12px;
}
/* Flache Zeile statt hoher Farbklotz: trug vorher eine einzige Zahl über
   ein Fünftel der Bildschirmhöhe. */
.shop-total-card{
  flex:1;display:flex;align-items:baseline;justify-content:space-between;gap:10px;
  padding:9px 13px;border-radius:var(--radius-sm);color:white;font-weight:600;
}
.shop-total-card.coop{background:var(--coop)}
.shop-total-card.migros{background:var(--migros)}
.shop-total-label{font-size:12px;opacity:.9}
.shop-total-price{font-size:17px;white-space:nowrap}

/* ── Product detail popup ── */
/* Delivery window popup */
.dw-overlay{
  position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:250;
  display:flex;align-items:center;justify-content:center;padding:16px;
}
.dw-sheet{
  background:var(--white);border-radius:var(--radius);width:100%;max-width:420px;
  max-height:85vh;overflow-y:auto;padding:20px;box-shadow:var(--shadow-md);
}
.dw-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.dw-header h3{font-size:17px;font-weight:700}
.dw-close{font-size:28px;color:var(--grey-dark);cursor:pointer;line-height:1}
.dw-shop{margin-bottom:16px;border:1px solid var(--grey-light);border-radius:var(--radius-sm);overflow:hidden}
.dw-shop-header{padding:10px 14px;font-weight:700;font-size:14px;color:white}
.dw-shop-header.coop{background:var(--coop)}
.dw-shop-header.migros{background:var(--migros)}
.dw-shop-body{padding:12px 14px}
.dw-slot{display:flex;justify-content:space-between;align-items:center;padding:6px 0;font-size:13px;border-bottom:1px solid var(--grey-light)}
.dw-slot:last-child{border-bottom:none}
.dw-slot-date{font-weight:600}
.dw-slot-time{color:var(--text-light)}
.dw-slot-price{font-size:12px;color:var(--grey-dark)}
.dw-link{display:block;text-align:center;margin-top:8px;padding:8px;background:var(--orange-bg);color:var(--orange);border-radius:var(--radius-sm);font-size:13px;font-weight:600;text-decoration:none}
.dw-loading{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-light)}
.product-detail-overlay{
  /* Muss ueber ALLEN anderen Overlays liegen: die Produktsuche wird immer aus
     etwas anderem heraus geoeffnet — aus der Einkaufsliste, aus "Anpassen"
     (custom-editor-overlay, z-index 300). Lag sie darunter, ging sie zwar auf,
     war aber unsichtbar hinter dem Fenster. */
  position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:400;
  display:flex;align-items:flex-end;justify-content:center;
}
.product-detail-sheet{
  background:var(--white);border-radius:16px 16px 0 0;width:100%;max-width:500px;
  max-height:85vh;overflow-y:auto;padding:16px 16px calc(16px + var(--safe-bottom));
}
.pd-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.pd-header h3{font-size:16px;font-weight:700}
.pd-close{font-size:28px;color:var(--grey-dark);cursor:pointer;line-height:1}
.pd-current{
  display:flex;align-items:center;gap:12px;padding:12px;
  border-radius:var(--radius-sm);border:2px solid var(--green);background:var(--tint-green);margin-bottom:12px;
}
.pd-current-img{width:64px;height:64px;border-radius:8px;object-fit:contain;background:var(--white)}
.pd-current-info{flex:1;min-width:0}
.pd-current-name{font-size:14px;font-weight:600}
.pd-current-price{font-size:13px;color:var(--green);font-weight:700}
.pd-current-bio{display:inline-block;background:var(--green);color:white;padding:1px 6px;border-radius:4px;font-size:12px;font-weight:600;margin-left:6px}
.pd-search-bar{
  display:flex;gap:8px;margin-bottom:12px;
}
.pd-search-input{
  flex:1;padding:10px 14px;border-radius:var(--radius);border:2px solid var(--grey-light);
  font-size:14px;background:var(--white);
}
.pd-search-input:focus{border-color:var(--orange)}
.pd-search-btn{
  padding:10px 16px;border-radius:var(--radius);background:var(--orange);color:white;font-weight:600;font-size:14px;
}
.pd-results{display:flex;flex-direction:column;gap:6px}
.pd-result-item{
  display:flex;align-items:center;gap:10px;padding:10px;
  border-radius:var(--radius-sm);border:1px solid var(--grey-light);cursor:pointer;transition:all .2s;
}
.pd-result-item:active{background:var(--orange-bg)}
.pd-result-item.selected{border-color:var(--green);background:var(--tint-green)}
.pd-result-img{width:48px;height:48px;border-radius:6px;object-fit:contain;background:var(--white);flex-shrink:0}
.pd-result-info{flex:1;min-width:0}
.pd-result-name{font-size:13px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pd-result-price{font-size:13px;font-weight:700;color:var(--green)}
.pd-result-bio{display:inline-block;background:var(--green);color:white;padding:1px 5px;border-radius:3px;font-size:11px;font-weight:600;margin-left:4px}
.pd-result-badge{
  font-size:11px;font-weight:700;padding:2px 5px;border-radius:3px;color:white;flex-shrink:0;
}
.pd-result-badge.coop{background:var(--coop)}
.pd-result-badge.migros{background:var(--migros)}
.pd-loading{text-align:center;padding:20px;color:var(--text-light);font-size:13px}
/* Check/done button (desktop alternative to swipe) */
.si-name-row{display:flex;align-items:center;gap:6px}
.si-name-row .si-name{flex:1}
/* Abhaken, NICHT löschen. Hier stand früher ein Papierkorb — der versprach
   eine Löschung, die gar nicht stattfindet (die Zutat wird nur gestrichen). */
.si-check-btn{
  width:28px;height:28px;border-radius:50%;
  border:1.5px solid var(--grey-light);color:var(--border-strong);
  background:transparent;display:flex;align-items:center;justify-content:center;
  flex-shrink:0;cursor:pointer;transition:all .2s;padding:0;
}
.si-check-btn:hover,.si-check-btn:active{
  color:white;background:var(--green);border-color:var(--green);
}

/* ── Bottom nav ── */
.bottom-nav{
  display:flex;position:fixed;bottom:0;left:0;right:0;
  background:var(--white);border-top:1px solid var(--grey-light);
  padding-bottom:var(--safe-bottom);z-index:50;
  height:calc(var(--nav-height) + var(--safe-bottom));
}
.nav-item{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:2px;padding:8px 0;color:var(--grey-dark);transition:color .2s;cursor:pointer;
}
.nav-item.active{color:var(--orange)}
.nav-item svg{width:24px;height:24px}
.nav-item span{font-size:12px;font-weight:600}

/* ── Bottom sheet (Recipe browse) ── */
.sheet-overlay{
  position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:100;
  opacity:0;transition:opacity .3s;pointer-events:none;
}
.sheet-overlay.open{opacity:1;pointer-events:auto}
.bottom-sheet{
  position:fixed;left:0;right:0;bottom:0;z-index:101;
  background:var(--white);border-radius:20px 20px 0 0;
  transform:translateY(100%);transition:transform .35s cubic-bezier(.4,0,.2,1);
  display:flex;flex-direction:column;
  height:90vh;max-height:90vh;
  padding-bottom:var(--safe-bottom);
}
.bottom-sheet.open{transform:translateY(0)}
.sheet-handle{
  width:36px;height:4px;border-radius:2px;background:var(--grey-light);
  margin:10px auto 0;flex-shrink:0;
}
.sheet-header{
  display:flex;align-items:center;padding:12px 16px;gap:12px;flex-shrink:0;
}
.sheet-close{
  width:32px;height:32px;border-radius:50%;background:var(--grey-light);
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.sheet-close svg{width:16px;height:16px}
.sheet-search{
  flex:1;padding:10px 14px;border-radius:var(--radius);
  background:var(--bg);font-size:15px;
}
.sheet-slot-info{
  font-size:12px;color:var(--text-light);padding:0 16px 4px;flex-shrink:0;
}

/* ── Filter chips ── */
.filter-bar{
  display:flex;flex-wrap:wrap;gap:6px;padding:0 16px 10px;flex-shrink:0;
}
.filter-chip{
  flex-shrink:0;padding:5px 11px;border-radius:18px;font-size:12px;font-weight:500;
  border:1.5px solid var(--grey-light);color:var(--text);
  transition:all .2s;white-space:nowrap;cursor:pointer;
  background:var(--white);line-height:1.2;
}
.filter-chip.active{
  background:var(--orange);color:white;border-color:var(--orange);
}
.filter-chip.chip-dimmed{
  opacity:.35;
}
.filter-chip:active{transform:scale(.95)}

.sheet-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:0 16px 16px}

/* ── Recipe result cards ── */
.recipe-card{
  display:flex;gap:12px;padding:12px;background:var(--white);
  border-radius:var(--radius);box-shadow:var(--shadow);margin-bottom:10px;
  cursor:pointer;transition:transform .15s;
}
.recipe-card:active{transform:scale(.98)}
.recipe-card-img{
  width:80px;height:80px;border-radius:var(--radius-sm);object-fit:cover;flex-shrink:0;
  background:var(--grey-light);
}
.recipe-card-info{flex:1;display:flex;flex-direction:column;justify-content:center;min-width:0}
.recipe-card-title{font-size:14px;font-weight:600;line-height:1.3;margin-bottom:4px}
.recipe-card-meta{display:flex;gap:8px;flex-wrap:wrap}
.recipe-card-time{font-size:12px;color:var(--text-light);display:flex;align-items:center;gap:4px}
.recipe-card-tag{
  font-size:12px;padding:2px 8px;border-radius:10px;
  background:var(--orange-bg);color:var(--orange);font-weight:500;
}

.search-loading,.search-empty{
  text-align:center;padding:40px 20px;color:var(--text-light);font-size:14px;
}
.search-more{
  text-align:center;padding:12px;
}
.search-more button{
  padding:10px 24px;border-radius:var(--radius);background:var(--grey-light);
  font-size:14px;font-weight:500;color:var(--text);
}
.search-more button:active{background:var(--border)}
.spinner{
  width:28px;height:28px;border:3px solid var(--grey-light);border-top-color:var(--orange);
  border-radius:50%;animation:spin .7s linear infinite;margin:0 auto 12px;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ── Autocomplete suggestions ── */
.autocomplete-wrap{position:relative}
.autocomplete-list{
  position:absolute;top:100%;left:0;right:0;z-index:10;
  background:var(--white);border-radius:0 0 var(--radius) var(--radius);
  box-shadow:0 4px 16px rgba(0,0,0,.15);max-height:200px;overflow-y:auto;
}
.autocomplete-item{
  padding:10px 14px;font-size:14px;cursor:pointer;
  border-bottom:1px solid var(--grey-light);display:flex;align-items:center;gap:8px;
}
.autocomplete-item:last-child{border-bottom:none}
.autocomplete-item:active{background:var(--orange-bg)}
.autocomplete-item .ac-match{font-weight:700}
.autocomplete-item .ac-icon{font-size:16px;flex-shrink:0;opacity:.5}

/* ── Recipe detail overlay ── */
.recipe-detail-overlay{
  position:fixed;inset:0;background:var(--white);z-index:200;
  overflow-y:auto;-webkit-overflow-scrolling:touch;
}
.rd-back{
  position:fixed;top:12px;left:12px;z-index:201;
  width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.9);
  box-shadow:var(--shadow);display:flex;align-items:center;justify-content:center;
}
.rd-back svg{width:20px;height:20px}
.rd-image{width:100%;height:240px;object-fit:cover;background:var(--grey-light)}
.rd-content{padding:16px}
.rd-title{font-size:22px;font-weight:700;margin-bottom:8px;line-height:1.3}
.rd-meta{display:flex;gap:16px;margin-bottom:16px;flex-wrap:wrap}
.rd-meta-item{font-size:13px;color:var(--text-light);display:flex;align-items:center;gap:4px}
.rd-section-title{font-size:16px;font-weight:700;margin:20px 0 10px;color:var(--orange)}
.rd-ing-group{
  font-size:13px;font-weight:700;color:var(--orange);
  margin:14px 0 2px;letter-spacing:.2px;
}
.rd-ing-group:first-of-type{margin-top:4px}
.rd-ingredients{list-style:none}
.rd-ingredients li{
  padding:8px 0;border-bottom:1px solid var(--grey-light);font-size:14px;
}
.rd-ingredients li:last-child{border-bottom:none}
.rd-steps{list-style:none;counter-reset:step}
.rd-steps li{
  counter-increment:step;padding:10px 0 10px 36px;
  border-bottom:1px solid var(--grey-light);font-size:14px;
  position:relative;line-height:1.5;
}
.rd-steps li::before{
  content:counter(step);position:absolute;left:0;top:10px;
  width:24px;height:24px;border-radius:50%;background:var(--orange);
  color:white;font-size:12px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
}
.rd-steps li:last-child{border-bottom:none}
.rd-add-btn{
  margin-top:20px;width:100%;padding:14px;border-radius:var(--radius);
  background:var(--orange);color:white;font-size:15px;font-weight:600;
}
.rd-add-btn:active{background:var(--orange-light)}

/* ── Custom recipe editor ── */
.add-custom-btn{
  width:100%;padding:12px;margin-bottom:12px;border-radius:var(--radius);
  background:var(--tint-orange);color:var(--on-tint-orange);font-size:14px;font-weight:600;
  border:2px dashed #ffab40;
}
.add-custom-btn:active{background:var(--tint-orange-strong)}
.custom-editor-overlay{
  position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:300;
  display:flex;align-items:flex-end;justify-content:center;
}
.custom-editor{
  background:var(--white);width:100%;max-width:500px;
  border-radius:18px 18px 0 0;max-height:92vh;display:flex;flex-direction:column;
}
@media(min-width:600px){
  .custom-editor-overlay{align-items:center}
  .custom-editor{border-radius:18px;max-height:88vh}
}
/* ── Shopping-Picker (Rezept-Auswahl vor Einkauf, Layout wie Wochenplan) ── */
.sp-modal{max-width:560px}
.sp-toolbar{
  display:flex;align-items:center;gap:8px;margin-bottom:10px;
  flex-wrap:wrap;
}
.sp-tool-btn{
  font-size:12px;padding:5px 11px;border-radius:16px;
  border:1.5px solid var(--orange);background:var(--white);color:var(--orange);
  font-weight:600;cursor:pointer;
}
.sp-tool-btn:hover,.sp-tool-btn:active{background:var(--orange);color:white}
.sp-count{margin-left:auto;font-size:12px;color:var(--text-light);font-weight:600}
.sp-week{display:flex;flex-direction:column;gap:10px}
.sp-week-section-label{
  font-size:12px;font-weight:700;color:var(--orange);
  text-transform:uppercase;letter-spacing:.5px;
  padding:8px 4px 2px;border-bottom:1.5px solid var(--orange-light, var(--tint-orange-strong));
  margin-top:6px;
}
.sp-week-section-label:first-child{margin-top:0}
.sp-day{
  padding:8px 10px;background:var(--white);border-radius:10px;box-shadow:var(--shadow);
}
.sp-day-header{
  font-size:12px;font-weight:700;color:var(--text);margin-bottom:6px;
  display:flex;justify-content:space-between;align-items:baseline;
}
.sp-day-date{font-size:12px;color:var(--text-light);font-weight:500}
.sp-day-groups{display:flex;flex-direction:column;gap:6px}
.sp-meal-group{}
.sp-group-label{
  font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;
  color:var(--text-light);padding:0 2px 3px;display:flex;align-items:center;gap:4px;
}
.sp-group-label::before{content:'';flex:0 0 8px;height:2px;border-radius:1px}
.sp-group-label.lunch::before{background:var(--orange)}
.sp-group-label.dinner::before{background:var(--indigo)}
.sp-group-slots{display:flex;gap:6px;flex-wrap:wrap}
.sp-slot{
  position:relative;flex:1 1 100px;min-width:90px;max-width:160px;
  border-radius:8px;overflow:hidden;cursor:pointer;
  background:var(--white);border:2px solid var(--grey-light);transition:all .15s;
  opacity:.45;filter:grayscale(.5);
}
.sp-slot:active{transform:scale(.97)}
.sp-slot.picked{
  opacity:1;filter:none;border-color:var(--teal);
  box-shadow:0 2px 6px rgba(38,166,154,.35);
}
.sp-slot.kids{border-color:var(--teal-light)}
.sp-slot.kids.picked{border-color:var(--teal)}
.sp-slot img{width:100%;height:65px;object-fit:cover;display:block}
.sp-slot-noimg{
  height:65px;display:flex;align-items:center;justify-content:center;
  font-size:22px;background:var(--bg);
}
.sp-slot-check{
  position:absolute;top:4px;right:4px;
  width:22px;height:22px;border-radius:50%;
  background:var(--teal);color:white;
  display:flex;align-items:center;justify-content:center;
  font-size:13px;font-weight:700;
  opacity:0;transition:opacity .15s;
  box-shadow:0 1px 3px rgba(0,0,0,.3);
}
.sp-slot.picked .sp-slot-check{opacity:1}
.sp-slot-meal-label{
  position:absolute;top:2px;left:4px;z-index:1;
  font-size:11px;font-weight:700;text-transform:uppercase;
  background:rgba(0,0,0,.55);color:white;padding:1px 5px;border-radius:3px;
}
.sp-slot-title{
  font-size:12px;font-weight:600;padding:4px 6px;line-height:1.3;
  overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
}
.sp-new-notice{display:flex;flex-wrap:wrap;gap:6px 12px;justify-content:space-between;align-items:center;margin:8px 0;padding:10px 12px;border-radius:10px;background:var(--tint-orange);color:var(--text);font-size:13px;border:1px solid var(--tint-orange-strong)}
.sp-new-actions{display:flex;gap:12px}
.sp-new-actions a{color:var(--orange);font-weight:600;text-decoration:none}
.sp-banner{
  display:flex;justify-content:space-between;align-items:center;
  padding:8px 12px;margin-bottom:10px;border-radius:8px;
  background:var(--tint-orange);border-left:3px solid var(--orange);
  font-size:12px;cursor:pointer;
}
.ce-header{
  display:flex;justify-content:space-between;align-items:center;
  padding:14px 16px;border-bottom:1px solid var(--grey-light);
}
.ce-title{font-size:16px;font-weight:700}
.ce-close{
  width:32px;height:32px;border-radius:50%;background:var(--grey-light);
  font-size:16px;display:flex;align-items:center;justify-content:center;
}
.ce-regen-btn{
  width:36px;height:36px;border-radius:50%;border:none;cursor:pointer;
  background:var(--teal);color:white;display:flex;align-items:center;justify-content:center;
  margin-left:auto;margin-right:8px;transition:transform .2s;
}
.ce-regen-btn:hover{background:var(--teal-dark);transform:rotate(120deg)}
.ce-regen-btn:disabled{opacity:.5;cursor:wait}
.ce-refine-box{
  background:var(--tint-blue);border-left:3px solid var(--blue);
  padding:10px 12px;border-radius:8px;margin-bottom:14px;
}
.ce-body{padding:16px;overflow-y:auto;flex:1}
.ce-label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;color:var(--text-light)}
.ce-input{
  width:100%;padding:9px 12px;border:1.5px solid var(--grey-light);
  border-radius:8px;font-size:14px;font-family:inherit;background:var(--white);box-sizing:border-box;
}
.ce-input:focus{outline:none;border-color:var(--orange)}
.ce-row{display:flex;gap:10px;align-items:flex-end}
.ce-ai-btn{
  margin-top:10px;width:100%;padding:12px;border-radius:8px;
  background:var(--blue);color:white;font-size:14px;font-weight:600;
  display:flex;align-items:center;justify-content:center;gap:8px;
}
.ce-ai-btn:disabled{background:var(--grey-light);color:var(--text-light)}
.ce-ing-row{display:flex;gap:6px;margin-bottom:6px;align-items:center}
.ce-amount{flex:0 0 70px}
.ce-unit{flex:0 0 70px}
.ce-name{flex:1;min-width:0}
.ce-step-row{display:flex;gap:6px;margin-bottom:6px;align-items:flex-start}
.ce-step-num{flex:0 0 22px;font-weight:700;color:var(--orange);padding-top:8px}
.ce-step-row textarea{flex:1}
.ce-row-del{
  flex:0 0 30px;height:34px;border-radius:6px;background:var(--tint-red);color:var(--on-tint-red);
  font-size:14px;display:flex;align-items:center;justify-content:center;
}
.ce-row-add{
  width:100%;padding:8px;margin-top:4px;border-radius:6px;
  background:var(--tint-grey);color:var(--text-light);font-size:13px;
  border:1px dashed var(--grey-light);
}
/* Foto-Doppel-Anzeige: Original + KI-generiert nebeneinander */
.ce-photos{
  display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px;
}
.ce-photos:empty{display:none}
.ce-photo-card{
  position:relative;border-radius:10px;overflow:hidden;
  box-shadow:var(--shadow);background:var(--white);
  border:1.5px solid var(--grey-light);
}
.ce-photo-label{
  position:absolute;top:6px;left:6px;z-index:2;
  background:rgba(0,0,0,.65);color:white;
  font-size:12px;font-weight:600;padding:3px 7px;border-radius:4px;
}
.ce-photo-label.generated{background:rgba(255,108,0,.85)}
.ce-photo-card img{width:100%;height:140px;object-fit:cover;display:block}
.ce-photo-trash,.ce-photo-refresh{
  position:absolute;width:30px;height:30px;border-radius:50%;
  border:none;cursor:pointer;font-size:14px;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 1px 4px rgba(0,0,0,.4);
  z-index:2;
}
.ce-photo-trash{
  top:6px;right:6px;background:var(--white);color:var(--red);
}
.ce-photo-trash:hover,.ce-photo-trash:active{background:var(--red);color:white}
/* Leftover Photo-Grid (mehrere Bilder nebeneinander) */
.lo-photo-grid{
  display:grid;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));
  gap:6px;margin-top:8px;
}
.lo-photo-thumb{
  position:relative;border-radius:8px;overflow:hidden;
  background:var(--bg);box-shadow:var(--shadow);
}
.lo-photo-thumb img{width:100%;height:90px;object-fit:cover;display:block}
/* ── Kühlschrank-Scan ── */
.fridge-scan-btn{
  background:linear-gradient(135deg,var(--teal),var(--teal-dark));
  padding:14px;font-size:15px;
}
.fridge-cam-wrap{position:relative;border-radius:12px;overflow:hidden;background:#000}
.fridge-video{width:100%;max-height:300px;object-fit:cover;display:block}
.fridge-shot-badge{
  position:absolute;top:8px;right:8px;background:rgba(0,0,0,.65);color:#fff;
  padding:4px 10px;border-radius:12px;font-size:12px;font-weight:600;
}
.fridge-rec{
  position:absolute;top:8px;left:8px;background:rgba(211,47,47,.9);color:#fff;
  padding:4px 10px;border-radius:12px;font-size:12px;font-weight:600;
  animation:fridgeBlink 1.2s ease-in-out infinite;
}
@keyframes fridgeBlink{0%,100%{opacity:1}50%{opacity:.45}}
.fridge-ing-list{display:flex;flex-direction:column;gap:6px;max-height:280px;overflow-y:auto}
.fridge-ing{
  display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:8px;
  background:var(--white);box-shadow:var(--shadow);cursor:pointer;font-size:14px;
}
.fridge-ing.unsure{background:var(--tint-grey)}
.fridge-ing.off{opacity:.45}
.fridge-ing-name{flex:1;font-weight:500}
.fridge-ing-amount{font-size:12px;color:var(--text-light)}
.fridge-count{display:flex;gap:6px;margin-left:auto}
.fridge-count button{
  width:34px;height:34px;border-radius:8px;background:var(--bg);
  font-weight:600;color:var(--text);
}
.fridge-count button.active{background:var(--orange);color:#fff}
.fridge-rec-card{
  display:flex;gap:10px;background:var(--white);border-radius:10px;
  box-shadow:var(--shadow);margin-bottom:10px;overflow:hidden;
}
.fridge-rec-img{width:88px;height:auto;min-height:88px;object-fit:cover;flex-shrink:0}
.fridge-rec-body{flex:1;padding:10px;min-width:0}
.fridge-rec-title{font-weight:600;font-size:14px;line-height:1.3}
.fridge-rec-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:12px;color:var(--text-light);margin-top:4px}
.fridge-src{padding:2px 7px;border-radius:10px;font-weight:600;color:#fff;font-size:12px}
.fridge-src.fooby{background:var(--orange)}
.fridge-src.eigenes{background:var(--blue)}
.fridge-src.ki{background:var(--purple)}
.fridge-cov{color:var(--on-tint-green);font-weight:600}
.fridge-uses{font-size:12px;color:var(--on-tint-green);margin-top:5px;line-height:1.4}
.fridge-missing{font-size:12px;color:var(--text-light);margin-top:2px;line-height:1.4}
/* Photo-Kategorisierungs-Cards */
.pc-grid{
  display:grid;grid-template-columns:repeat(auto-fill, minmax(150px, 1fr));
  gap:10px;
}
.pc-card{
  position:relative;border-radius:10px;overflow:hidden;
  border:3px solid transparent;background:var(--white);box-shadow:var(--shadow);
}
.pc-card.pc-cat-recipe{border-color:var(--blue)}
.pc-card.pc-cat-dish{border-color:var(--teal)}
.pc-card img{width:100%;height:110px;object-fit:cover;display:block}
.pc-toggle{display:flex;gap:0}
.pc-toggle button{
  flex:1;font-size:12px;font-weight:600;padding:7px 6px;
  border:none;background:var(--tint-grey);color:var(--text-light);cursor:pointer;
  transition:all .15s;
}
.pc-toggle button.active{
  background:var(--blue);color:white;
}
.pc-toggle button:nth-child(2).active{background:var(--teal)}
.pc-toggle button:active{transform:scale(.95)}
.lf-progress-bar{
  width:100%;height:8px;background:var(--grey-light);border-radius:4px;overflow:hidden;
  margin-top:8px;
}
.lf-progress-bar div{
  height:100%;background:var(--teal);transition:width .3s;
}
.ce-photo-refresh{
  bottom:6px;right:6px;background:var(--white);color:var(--orange);font-size:18px;
}
.ce-photo-refresh:hover,.ce-photo-refresh:active{background:var(--orange);color:white}
.ce-photo-refresh:disabled{opacity:.5;cursor:wait}
@media(max-width:380px){
  .ce-photos{grid-template-columns:1fr}
}
.ce-img-preview{margin-top:12px;text-align:center}
.ce-photo-choice{
  margin-top:10px;padding:10px;background:var(--orange-bg);border-radius:8px;
  border:1px solid var(--tint-orange-strong);
}
.ce-img-preview img{max-width:100%;max-height:180px;border-radius:8px}
.ce-img-remove{
  display:block;margin:6px auto 0;font-size:12px;color:var(--on-tint-red);text-decoration:underline;
}
.ce-img-gen{
  width:100%;margin-top:10px;padding:10px;border-radius:8px;
  background:var(--tint-blue);color:var(--blue);font-size:13px;font-weight:600;
}
.ce-img-gen:disabled{background:var(--grey-light);color:var(--text-light)}
.ce-error{
  color:var(--on-tint-red);font-size:12px;margin-top:6px;padding:6px 10px;
  background:var(--tint-red);border-radius:6px;
}
.load-banner{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  margin:0 0 10px;padding:10px 12px;border-radius:8px;font-size:13px;
  background:var(--white);box-shadow:var(--shadow);color:var(--text-light);
}
.load-banner.err{background:var(--tint-orange);color:var(--on-tint-orange);border-left:3px solid var(--orange)}
.retry-btn{
  padding:6px 12px;border-radius:14px;border:1px solid var(--orange);
  background:var(--white);color:var(--orange);font-size:12px;font-weight:600;cursor:pointer;
}
.search-empty.err{color:var(--on-tint-orange);line-height:1.8}
.spinner.small{width:16px;height:16px;border-width:2px;margin:0}
.offline-bar{
  background:var(--text);color:#fff;font-size:12px;text-align:center;padding:6px 12px;
  padding-top:calc(6px + env(safe-area-inset-top,0px));
}
.recipe-card.busy{opacity:.45;pointer-events:none}
.cart-cta-bar{
  position:fixed;left:0;right:0;bottom:calc(var(--nav-height) + var(--safe-bottom));
  padding:8px 12px;background:linear-gradient(180deg,rgba(245,245,245,0),var(--bg) 40%);z-index:40;
  pointer-events:none;
}
.cart-cta-bar .cart-order-btn-all{margin-top:0;pointer-events:auto;box-shadow:0 4px 14px rgba(0,0,0,.18);font-size:14px;padding:12px}
.dw-link.primary{background:var(--orange);color:#fff;border:none;font-weight:700;cursor:pointer;font-family:inherit;font-size:inherit}
.ce-footer{
  display:flex;gap:8px;padding:12px 16px;border-top:1px solid var(--grey-light);
  align-items:center;
}
.ce-cancel{
  flex:1;padding:11px;border-radius:8px;background:var(--grey-light);
  color:var(--text);font-size:14px;font-weight:600;
}
.ce-save{
  flex:2;padding:11px;border-radius:8px;background:var(--orange);
  color:white;font-size:14px;font-weight:700;
  display:flex;align-items:center;justify-content:center;gap:6px;
}
.ce-save:disabled{background:var(--grey-light);color:var(--text-light)}
.ce-del-btn{
  padding:11px 12px;border-radius:8px;background:var(--tint-red);color:var(--on-tint-red);
  font-size:13px;font-weight:600;
}
.spinner-tiny{
  display:inline-block;width:14px;height:14px;border:2px solid rgba(255,255,255,.4);
  border-top-color:white;border-radius:50%;animation:spin 0.8s linear infinite;
}

/* ── Settings overlay ── */
.settings-overlay{
  position:fixed;inset:0;background:var(--white);z-index:200;
  overflow-y:auto;-webkit-overflow-scrolling:touch;
}
.settings-header{
  display:flex;align-items:center;gap:12px;padding:14px 16px;
  border-bottom:1px solid var(--grey-light);
}
.settings-header h2{font-size:18px;font-weight:700;flex:1}
.settings-content{padding:16px}
.settings-label{font-size:14px;font-weight:600;margin-bottom:6px;display:block}
.settings-help{font-size:12px;color:var(--text-light);margin-bottom:8px}
.settings-input-field{
  width:100%;padding:12px;border-radius:var(--radius-sm);
  border:2px solid var(--grey-light);font-size:14px;
}
.settings-input-field:focus{border-color:var(--orange);outline:none}
.settings-input-sm{width:80px;padding:10px 12px;text-align:center}
.settings-save{
  margin-top:16px;width:100%;padding:14px;border-radius:var(--radius);
  background:var(--orange);color:white;font-size:15px;font-weight:600;
}
.settings-save:active{background:var(--orange-light)}
.settings-section{margin-bottom:24px;padding-bottom:24px;border-bottom:1px solid var(--grey-light)}
.settings-section:last-child{border-bottom:none}
.settings-msg{font-size:13px;margin-top:8px;padding:8px 12px;border-radius:var(--radius-sm)}
.settings-msg.ok{background:var(--tint-green);color:var(--on-tint-green)}
.settings-msg.err{background:var(--tint-red);color:var(--on-tint-red)}

/* ── Desktop ── */
@media(min-width:640px){
  .week-grid{max-width:700px;margin:0 auto}
  .day-slots{gap:12px}
  .meal-slot{min-height:100px}
  .slot-img{height:80px}
  .shopping-list{max-width:600px;margin:0 auto}
  .bottom-sheet{max-width:480px;left:50%;transform:translateX(-50%) translateY(100%);border-radius:20px 20px 0 0}
  .bottom-sheet.open{transform:translateX(-50%) translateY(0)}
}
@media(min-width:900px){
  .week-grid{max-width:900px}
  .day-card{display:flex;flex-direction:row}
  .day-header{min-width:90px;max-width:90px;flex-direction:column;align-items:flex-start;justify-content:center}
  .day-slots{flex:1;display:flex!important;flex-direction:row!important;gap:0!important;padding:0!important}
  .meal-group{flex:1;border-bottom:none!important;border-right:1px solid var(--grey-light);padding:6px!important;margin:0!important}
  .meal-group:last-child{border-right:none}
}

/* ── Print styles ── */
/* Standardanzeige: volle Wochentage zeigen, kurze verstecken */
.day-name-short{display:none}
@media print{
  /* Sehr knappe @page-Margins → kaum Platz für browser-eigene Header/Footer (URL, Datum)
     → User-Setting "Kopf-/Fusszeile drucken" hat in den meisten Browsern dann keinen Effekt mehr */
  @page{size:A4 portrait;margin:5mm}
  *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
  body{background:white!important;overflow:visible!important;font-size:10px!important;margin:0!important;padding:0!important}

  /* ── Range-Druck-Modus: nur die gewählten Tage als Tabelle drucken ──
     .print-range ist direktes Kind von #app (Vue-Template-Fragmente). */
  body.printing-range #app > *:not(.print-range){display:none!important}
  body.printing-range .print-range{
    display:block!important;position:absolute;top:0;left:0;width:100%;padding:4mm;
  }
  /* print-range nutzt echte .week-grid/.day-card-Klassen → das @media print
     day-card-CSS weiter unten greift automatisch und erzeugt das Foto-Layout. */
  /* FESTE Tageshöhe: 1/7 der A4-Seite, egal ob 5 oder 7 Tage gewählt sind.
     So bleiben die Bilder bei 5 Tagen gleich gross wie bei 7 (kein Strecken). */
  body.printing-range .print-range .week-grid{
    height:auto!important;display:block!important;
  }
  body.printing-range .print-range .day-card{
    flex:none!important;height:38mm!important;margin-bottom:2mm!important;
  }

  /* Im Druck: kurze Wochentage zeigen, lange verstecken (spart Platz) */
  .day-name-full{display:none!important}
  .day-name-short{display:inline!important}
  /* Bestellt-Badge im Druck weglassen */
  .slot-ordered-badge{display:none!important}
  #app{height:auto!important;overflow:visible!important}
  .main-content{overflow:visible!important;padding:0!important;max-width:100%!important}
  .topbar,.bottom-nav,.sheet-overlay,.bottom-sheet,.slot-actions-overlay,
  .recipe-detail-overlay,.settings-overlay,.order-overlay,.magic-overlay,
  .fav-sheet,.search-overlay,.autocomplete-list,.action-bar,.move-banner,
  .dw-overlay,.product-detail-overlay,.custom-editor-overlay{display:none!important}
  /* A4 portrait Druck-Höhe = 297mm - 2×5mm Margin = 287mm */
  .week-grid{padding:0!important;gap:0!important;display:flex!important;flex-direction:column!important;height:calc(287mm - 18mm)!important}
  /* Swipe-Wrap im Druck ausschalten (kein Transform!) */
  .week-swipe-wrap{transform:none!important;transition:none!important;width:auto!important}
  /* Header */
  .print-header{
    display:flex!important;align-items:baseline;gap:6px;
    padding:2px 0 3px;border-bottom:1.5px solid #333;margin-bottom:4px;flex-shrink:0!important;
  }
  .print-header h1{font-size:13px;margin:0;font-weight:700}
  .print-header p{font-size:10px;color:#555;margin:0}
  /* Day rows fill the page equally */
  .day-card{
    break-inside:avoid;box-shadow:none!important;
    border:none!important;margin:0!important;
    border-radius:0!important;padding:0!important;
    display:flex!important;flex-direction:row!important;
    min-height:0!important;gap:2mm!important;background:transparent!important;
    flex:1!important;margin-bottom:1.5mm!important;
  }
  .day-card:last-child{margin-bottom:0!important}
  .day-card.is-today{border:none!important}
  /* Tag/Datum */
  .day-header{
    min-width:44px!important;max-width:44px!important;
    padding:4px 3px!important;flex-direction:column!important;
    align-items:center!important;justify-content:center!important;
    border-bottom:none!important;background:#f5f5f5!important;
    border:1px solid #ddd!important;border-radius:5px!important;
  }
  .day-card.is-today .day-header{border-color:#e67e22!important;border-width:2px!important}
  .day-header span:first-child{font-size:10px!important;font-weight:700!important;line-height:1.2!important}
  .day-header .date{font-size:7px!important;color:#777!important}
  /* Mittag + Abend */
  .day-slots{
    flex:1!important;display:flex!important;flex-direction:row!important;
    gap:2mm!important;padding:0!important;min-height:0!important;
  }
  .meal-group{
    flex:1!important;border:none!important;
    padding:0!important;margin:0!important;
    display:flex!important;flex-direction:column!important;min-height:0!important;
  }
  .meal-group-label{display:none!important}
  .meal-group-slots{display:flex!important;flex-direction:column!important;gap:0!important;flex:1!important;min-height:0!important}
  /* Einzelner Slot */
  .meal-slot{
    border:1px solid #ddd!important;
    min-height:0!important;overflow:hidden!important;
    border-radius:0!important;flex:1!important;
    display:flex!important;flex-direction:column!important;
  }
  .meal-group-slots .meal-slot:first-child{border-radius:5px 5px 0 0!important}
  .meal-group-slots .meal-slot:last-child{border-radius:0 0 5px 5px!important}
  .meal-group-slots .meal-slot:first-child:last-child{border-radius:5px!important}
  .meal-group-slots .meal-slot + .meal-slot{border-top:none!important}
  .meal-slot.filled{box-shadow:none!important;display:flex!important;flex-direction:column!important}
  .meal-slot.add-slot-btn{display:none!important}
  .add-slot-menu{display:none!important}
  .meal-label{font-size:5px!important;padding:1px 3px!important;text-transform:uppercase;letter-spacing:0.3px;color:#999!important;background:#f5f5f5!important;flex-shrink:0!important}
  .slot-filled{min-height:0!important;display:flex!important;flex-direction:column!important;flex:1!important}
  /* Bilder: füllen den verfügbaren Platz, ganzes Bild sichtbar */
  .slot-img{
    flex:1!important;width:100%!important;min-height:0!important;
    object-fit:cover!important;display:block!important;
  }
  .slot-title{font-size:7.5px!important;padding:2px 4px!important;line-height:1.2!important;font-weight:600!important;
    overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;flex-shrink:0!important}
  .slot-time{font-size:6px!important;padding:0 4px 1px!important;color:#888!important;flex-shrink:0!important}
  /* Leerer Slot */
  .slot-empty{font-size:10px!important;min-height:0!important;flex:1!important;display:flex;align-items:center;justify-content:center;color:#ccc!important}

  /* Kids-Slot neben Hauptgang statt darunter */
  .meal-group-slots{
    display:grid!important;grid-template-columns:1fr!important;gap:0!important;
  }
  .meal-group-slots:has(.kids-slot){grid-template-columns:1.7fr 1fr!important;gap:1px!important}
  .meal-group-slots:has(.kids-slot) .meal-slot{grid-column:1/-1!important}
  .meal-group-slots:has(.kids-slot) .meal-slot:not(.extra-slot){grid-column:1/2!important}
  .meal-group-slots:has(.kids-slot) .meal-slot.kids-slot{grid-column:2/3!important;border-radius:5px!important}
  /* Kids-Slot Layout im Druck */
  .meal-slot.kids-slot{padding-left:0!important;border-left:3px solid #26a69a!important}
  .kids-side-label{
    position:static!important;writing-mode:horizontal-tb!important;transform:none!important;
    width:auto!important;height:auto!important;background:#26a69a!important;color:white!important;
    font-size:5px!important;padding:1px 3px!important;display:inline-block!important;
  }

  /* Manuelle Liste drucken */
  .manual-list .ml-add,.manual-list .ml-print,.manual-list .ml-clear-btn,
  .manual-list .ml-checkbox,.manual-list .ml-del,.manual-list .ml-empty,
  .manual-list .ml-hint{display:none!important}
  .manual-list{padding:0!important;max-width:none!important}
  .manual-list .ml-header{margin-bottom:8px!important;padding-bottom:4px!important;border-bottom:1.5px solid #333!important}
  .manual-list .ml-title{font-size:14px!important}
  .manual-list .ml-count{font-size:10px!important}
  .manual-list .ml-items{gap:2px!important}
  .manual-list .ml-item{
    box-shadow:none!important;border:1px solid #ddd!important;border-radius:3px!important;
    padding:5px 8px!important;display:flex!important;align-items:center!important;
  }
  .manual-list .ml-item.checked{opacity:1!important}
  .manual-list .ml-item.checked .ml-text{text-decoration:line-through!important;color:#888!important}
  .manual-list .ml-text{font-size:11px!important}
  /* Drucke nur die aktuell sichtbare Hauptansicht */
  .main-content[style*="display: none"]{display:none!important}
}
.print-header{display:none}

/* Druck-Picker Modal */
.print-mode-toggle{display:flex;gap:8px;margin-bottom:14px}
.print-mode-toggle button{
  flex:1;padding:10px;border-radius:8px;border:1.5px solid var(--grey-light);
  background:var(--white);font-size:13px;font-weight:600;color:var(--text-light);cursor:pointer;transition:all .15s;
}
.print-mode-toggle button.active{background:var(--orange);color:white;border-color:var(--orange)}
.print-day-list{display:flex;flex-direction:column;gap:2px;max-height:50vh;overflow-y:auto}
.print-day-row{
  display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:8px;
  background:var(--white);border:1px solid var(--grey-light);cursor:pointer;font-size:14px;
}
.print-day-row.empty{background:var(--orange-bg);border-color:var(--tint-orange-strong)}
.print-day-row input{width:18px;height:18px;flex:0 0 auto}
.print-day-name{flex:1;font-weight:600}
.print-day-status{font-size:12px;color:var(--text-light)}
.print-day-status.empty{color:var(--orange);font-weight:600}

/* Druck-Range-Container: am Bildschirm versteckt */
.print-range{display:none}

/* ── Move banner ── */
.move-banner{
  position:fixed;top:0;left:0;right:0;z-index:80;
  background:var(--orange);color:white;padding:14px 16px;
  display:flex;justify-content:space-between;align-items:center;
  font-size:14px;font-weight:500;
  box-shadow:0 2px 8px rgba(0,0,0,.2);
}
.move-banner button{
  background:rgba(255,255,255,.25);color:white;padding:6px 14px;
  border-radius:var(--radius-sm);font-size:13px;font-weight:600;
}
.meal-slot.move-target{border:2px solid var(--orange)!important;background:var(--orange-bg)!important}
.meal-slot.move-source{opacity:.5}
/* ── Anpassung eines geplanten Essens ── */
.slot-adj-badge{
  position:absolute;left:4px;bottom:4px;z-index:2;
  width:17px;height:17px;border-radius:50%;
  background:var(--orange);color:#fff;font-size:12px;
  display:flex;align-items:center;justify-content:center;
}
.adj-hint{font-size:12px;color:var(--text-light);line-height:1.4;margin-bottom:12px}
.adj-suggest{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  background:var(--orange-bg);border:1px solid var(--orange-light);
  border-radius:var(--radius-sm);padding:10px 12px;margin-bottom:12px;font-size:13px;
}
.adj-suggest-text{font-size:12px;color:var(--text-light);margin-top:3px}
.adj-suggest-btn{
  border:none;background:var(--orange);color:#fff;font-weight:600;font-size:12px;
  padding:7px 12px;border-radius:16px;cursor:pointer;flex-shrink:0;
}
.adj-extras{display:flex;flex-direction:column;gap:5px;margin-bottom:8px}
.adj-extra{
  display:flex;align-items:center;gap:8px;font-size:13px;
  border:1.5px solid var(--grey-light);border-radius:8px;padding:7px 10px;
}
.adj-extra-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.adj-extra-price{color:var(--text-light);font-size:12px;flex-shrink:0}
.adj-skips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:4px}
.adj-skip{
  display:flex;align-items:center;gap:5px;font-size:12.5px;cursor:pointer;
  border:1.5px solid var(--grey-light);border-radius:16px;padding:6px 11px;background:var(--white);
}
/* Abgewählt = wird nicht eingekauft */
.adj-skip.off{
  background:var(--tint-red);border-color:var(--red);color:var(--red);text-decoration:line-through;
}
.adj-skip-mark{font-weight:700;font-size:12px}
.adj-remember{
  display:flex;align-items:center;gap:8px;font-size:12.5px;
  color:var(--text-light);margin-top:14px;cursor:pointer;
}
/* Anpassung im geöffneten Rezept */
.rd-adjust{
  background:var(--orange-bg);border-left:3px solid var(--orange);
  border-radius:var(--radius-sm);padding:10px 12px;margin-bottom:12px;
}
.rd-adjust-head{font-size:12px;font-weight:700;color:var(--orange);text-transform:uppercase;letter-spacing:.4px}
.rd-adjust-note{font-size:14px;margin-top:4px;line-height:1.4}
.rd-adjust-line{font-size:13px;margin-top:4px;line-height:1.4}

/* Slot, über dem gerade der Finger/die Maus schwebt */
.meal-slot.drag-over{
  border:2px solid var(--orange)!important;background:var(--orange-bg)!important;
  transform:scale(1.04);box-shadow:var(--shadow-md);
}
/* Aufgenommenes Rezept beim Ziehen */
.meal-slot.dragging{opacity:.45;transform:scale(.96)}
.meal-slot{transition:transform .12s ease}

/* Papierkorb direkt auf dem Rezept — spart den Umweg über das Aktionsmenü */
.slot-del-btn{
  position:absolute;top:2px;right:2px;z-index:3;
  width:30px;height:30px;padding:0;border:none;border-radius:50%;
  background:rgba(0,0,0,.42);color:#fff;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;-webkit-tap-highlight-color:transparent;
}
.slot-del-btn:active{background:var(--red);transform:scale(.9)}
@media (hover:hover){
  /* Am Desktop erst beim Überfahren zeigen, damit die Kacheln ruhig bleiben */
  .slot-del-btn{opacity:0;transition:opacity .15s}
  .meal-slot:hover .slot-del-btn{opacity:1}
  .slot-del-btn:hover{background:var(--red)}
}
/* Beim Ziehen und im Verschiebe-Modus stört der Papierkorb nur */
.meal-slot.dragging .slot-del-btn,
.meal-slot.move-target .slot-del-btn,
.meal-slot.move-source .slot-del-btn{display:none}

/* Rückgängig-Leiste nach dem Löschen */
.undo-toast{
  position:fixed;left:50%;transform:translateX(-50%);
  bottom:calc(var(--nav-height) + 12px + var(--safe-bottom));
  z-index:300;display:flex;align-items:center;gap:14px;
  background:var(--text);color:#fff;border-radius:var(--radius);
  padding:11px 14px;box-shadow:var(--shadow-md);
  max-width:calc(100vw - 24px);font-size:14px;
  animation:undoIn .2s ease;
}
@keyframes undoIn{from{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%,0)}}
.undo-toast-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.undo-toast button{
  background:none;border:none;color:var(--orange-light);
  font-weight:700;font-size:14px;cursor:pointer;padding:4px 2px;flex-shrink:0;
}

/* ── Action bar (below topbar) ── */
.action-bar{
  display:flex;gap:6px;padding:6px 12px;background:var(--white);
  border-bottom:1px solid var(--grey-light);flex-shrink:0;justify-content:flex-start;
}
.action-btn{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  flex:1;min-width:0;padding:6px 4px;min-height:44px;
  border-radius:12px;font-size:12px;font-weight:600;
  background:var(--grey-light);color:var(--text);transition:all .2s;
}
.action-txt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;line-height:1}
.action-btn:active{transform:scale(.95);background:var(--border)}
.action-btn svg{width:18px;height:18px}
.action-btn.magic{background:var(--orange-bg);color:var(--orange)}
.action-btn.magic:active{background:var(--tint-orange-strong)}
.action-btn.leftover{background:var(--tint-green);color:var(--teal)}
.action-btn.leftover:active{background:#b2dfdb}
/* Inline-SVG-Icons (Person/Kühlschrank etc.) für Titel und Tags */
.icon-inline{width:18px;height:18px;vertical-align:-4px;margin-right:4px;display:inline-block}
.icon-inline.icon-small{width:11px;height:11px;vertical-align:-1px;margin-right:2px}
.action-btn.fav{background:var(--orange-bg);color:var(--orange)}
.action-btn.fav:active{background:var(--tint-orange-strong)}
.action-btn.clear{background:#fde8e8;color:var(--red)}
.action-btn.clear:active{background:#f8c4c4}

/* ── Week picker overlay ── */
.week-picker-overlay{
  position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:150;
  display:flex;align-items:center;justify-content:center;
}
.week-picker{
  background:var(--white);border-radius:var(--radius);padding:20px;
  width:300px;max-height:70vh;overflow-y:auto;box-shadow:var(--shadow-md);
}
.week-picker h3{font-size:16px;font-weight:700;margin-bottom:12px;text-align:center}
.wp-month-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.wp-month-nav button{padding:6px 12px;border-radius:var(--radius-sm);background:var(--grey-light)}
.wp-month-nav span{font-weight:600;font-size:14px}
.wp-weeks{display:flex;flex-direction:column;gap:4px}
.wp-week{
  padding:10px 12px;border-radius:var(--radius-sm);font-size:13px;
  display:flex;justify-content:space-between;cursor:pointer;transition:background .2s;
}
.wp-week:active{background:var(--grey-light)}
.wp-week.current{background:var(--orange-bg);color:var(--orange);font-weight:600}
.wp-week.selected{background:var(--orange);color:white;font-weight:600}
.wp-week-num{font-weight:600;min-width:40px}
.wp-week-dates{color:var(--text-light);font-size:12px}
.wp-week.current .wp-week-dates,.wp-week.selected .wp-week-dates{color:inherit;opacity:.8}

/* ── Favorites sheet ── */
.fav-grid{display:flex;flex-direction:column;gap:8px;padding:8px 0}
.fav-card{
  display:flex;gap:12px;padding:10px;background:var(--white);
  border-radius:var(--radius-sm);box-shadow:var(--shadow);cursor:pointer;
  transition:transform .15s;
}
.fav-card:active{transform:scale(.98)}
.fav-card-img{width:60px;height:60px;border-radius:var(--radius-sm);object-fit:cover;flex-shrink:0;background:var(--grey-light)}
.fav-card-info{flex:1;display:flex;flex-direction:column;justify-content:center;min-width:0}
.fav-card-title{font-size:13px;font-weight:600;line-height:1.3}
.fav-card-meta{font-size:12px;color:var(--text-light);margin-top:2px}

/* ── Magic wand filter popup ── */
.magic-overlay{
  position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:150;
  display:flex;align-items:center;justify-content:center;
}
.magic-popup{
  background:var(--white);border-radius:var(--radius);padding:20px;
  width:320px;box-shadow:var(--shadow-md);
}
.magic-popup h3{font-size:16px;font-weight:700;margin-bottom:4px;text-align:center}
.magic-popup p{font-size:12px;color:var(--text-light);text-align:center;margin-bottom:16px}
.magic-filters{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.magic-filters .filter-chip{font-size:12px;padding:6px 12px}
.magic-options{margin-bottom:16px}
.magic-option{
  display:flex;align-items:center;gap:8px;padding:8px 0;font-size:14px;
}
.magic-option input[type=checkbox]{width:18px;height:18px;accent-color:var(--orange)}
.magic-go{
  width:100%;padding:14px;border-radius:var(--radius);
  background:linear-gradient(135deg,#667eea,#764ba2);color:white;
  font-size:15px;font-weight:600;
}
.magic-go:active{opacity:.8}
.magic-go:disabled{opacity:.5}
.magic-cancel{
  width:100%;padding:10px;font-size:13px;color:var(--text-light);
  text-align:center;margin-top:8px;
}

/* ── Slot picker popup ── */
.slot-picker-overlay{
  position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:160;
  display:flex;align-items:center;justify-content:center;
}
.slot-picker{
  background:var(--white);border-radius:var(--radius);padding:16px;
  width:280px;max-height:60vh;overflow-y:auto;box-shadow:var(--shadow-md);
}
.slot-picker h3{font-size:15px;font-weight:700;margin-bottom:4px;text-align:center}
.slot-picker p{font-size:12px;color:var(--text-light);text-align:center;margin-bottom:12px}
.slot-picker-btn{
  width:100%;padding:12px;text-align:left;font-size:14px;
  border-bottom:1px solid var(--grey-light);display:flex;justify-content:space-between;
}
.slot-picker-btn:last-child{border-bottom:none}
.slot-picker-btn:active{background:var(--orange-bg)}
.slot-picker-day{font-weight:600}
.slot-picker-meal{color:var(--text-light);font-size:13px}

/* ── Copy week button ── */
.action-btn.copy{background:var(--tint-green);color:var(--green)}
.action-btn.copy:active{background:var(--tint-green-strong)}

/* ── Shop cart ── */
/* cart button styles removed - selection now via shop row highlight */
.cart-summary{
  margin:12px 0 24px;padding:12px;border-radius:var(--radius);
  background:var(--white);box-shadow:var(--shadow);
}
.cart-summary h3{font-size:14px;font-weight:700;margin-bottom:8px}
.cart-shop-section{margin-bottom:12px}
.cart-shop-header{
  display:flex;justify-content:space-between;align-items:center;
  padding:8px 12px;border-radius:var(--radius-sm);font-weight:600;font-size:13px;color:white;
}
.cart-shop-header.coop{background:var(--coop)}
.cart-shop-header.migros{background:var(--migros)}
.cart-item{padding:6px 12px;font-size:12px;border-bottom:1px solid var(--grey-light);display:flex;justify-content:space-between}
.cart-item:last-child{border-bottom:none}
.cart-total-line{
  display:flex;justify-content:space-between;padding:10px 12px;
  font-size:15px;font-weight:700;border-top:2px solid var(--border);margin-top:4px;
}
.cart-order-btn-all{
  width:100%;padding:14px;border-radius:var(--radius);
  font-size:15px;font-weight:700;color:white;margin-top:10px;cursor:pointer;border:none;
  background:var(--green);
}
.cart-order-btn-all:active{transform:scale(.97)}
/* Order shop cards */
.order-shop-card{
  border-radius:var(--radius);overflow:hidden;margin-bottom:10px;
  border:1px solid var(--border);background:var(--white);
}
.order-shop-card-header{
  display:flex;justify-content:space-between;align-items:center;
  padding:8px 12px;color:white;font-size:13px;
}
.order-shop-card-header.coop{background:var(--coop)}
.order-shop-card-header.migros{background:var(--migros)}
/* Schlussbericht des Warenkorb-Agenten */
.order-report{margin-top:10px;padding-top:10px;border-top:1px solid var(--grey-light)}
.order-report-head{font-size:13px;font-weight:700;color:var(--green)}
.order-report-head.teilweise{color:var(--orange)}
.order-report-sub{font-size:12px;color:var(--text-light);margin-top:6px}
.order-report-fails{margin-top:4px}
.order-report-fail{
  display:flex;justify-content:space-between;gap:10px;
  font-size:12px;padding:5px 0;border-bottom:1px solid var(--grey-light);
}
.order-report-fail:last-of-type{border-bottom:none}
.orf-name{font-weight:600;flex:1}
.orf-grund{color:var(--text-light);text-align:right;flex-shrink:0;max-width:52%}
.saved-login-box{border:1px solid var(--border,var(--border));border-radius:8px;padding:10px 12px;font-size:13px}
.saved-login-btn{padding:8px 12px;border-radius:8px;border:1px solid var(--border,var(--border));background:var(--white);font-size:13px;cursor:pointer}
.saved-login-btn.primary{background:var(--migros);border-color:var(--migros);color:#fff;font-weight:600}
.saved-login-btn:disabled{opacity:.5;cursor:default}
.si-replaced{flex-basis:100%;display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;font-size:12px;color:var(--text);background:#fff7e0;border:1px solid #f3d27a;border-radius:8px;padding:6px 8px;margin-top:2px}
.si-replaced-tag{font-size:12px;font-weight:700;color:#8a6100;background:#ffe9a8;border-radius:6px;padding:1px 6px}
.order-login-failed{font-size:13px;color:var(--red);background:var(--red-light,#fdecec);border-radius:8px;padding:10px 12px}
.order-report-hint{font-size:12px;color:var(--text-light);margin-top:8px;font-style:italic}
/* Order overlay */
.order-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:200;display:flex;align-items:flex-end;justify-content:center}
.order-sheet{background:var(--white);width:100%;max-width:480px;max-height:85vh;border-radius:18px 18px 0 0;
  display:flex;flex-direction:column;overflow:hidden;animation:slideUp .3s ease}
.order-sheet-header{padding:16px 20px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--grey-light)}
.order-sheet-header h3{font-size:16px;font-weight:700;margin:0}
.order-sheet-close{font-size:24px;cursor:pointer;color:var(--text-secondary);padding:4px 8px}
.order-sheet-body{flex:1;overflow-y:auto;padding:12px 20px}
.order-product{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--grey-light);cursor:pointer}
.order-product:last-child{border-bottom:none}
.order-product:active{background:var(--grey-light)}
.order-product-name{flex:1;font-size:13px}
.order-product-price{font-weight:600;font-size:13px;white-space:nowrap}
.order-product-link{color:var(--text-secondary);font-size:18px;flex-shrink:0}
.order-sheet-footer{padding:12px 20px calc(12px + var(--safe-bottom));border-top:1px solid var(--grey-light);display:flex;flex-direction:column;gap:8px}
.order-total{display:flex;justify-content:space-between;font-weight:700;font-size:15px;padding:0 0 4px}
.order-actions{display:flex;gap:8px}
.order-action-btn{flex:1;padding:12px;border-radius:var(--radius);font-size:13px;font-weight:600;cursor:pointer;border:none;text-align:center}
.order-action-btn.primary{color:white}
.order-action-btn.primary.coop{background:var(--coop)}
.order-action-btn.primary.migros{background:var(--migros)}
.order-action-btn.secondary{background:var(--grey-light);color:var(--text-primary)}
.order-action-btn:active{opacity:.8}

/* ── Zugänglichkeit ──
   Kleine Icon-Knöpfe bekommen eine unsichtbar vergrösserte Trefferfläche (mind. 44px),
   ohne dass sich das Layout verschiebt. */
.topbar-btn{position:relative}
.topbar-btn::after{content:"";position:absolute;inset:-4px}
.slot-del-btn::after{content:"";position:absolute;inset:-7px;border-radius:50%}
.nav-item{border:none;background:none;font:inherit}
[role="button"]:focus-visible,button:focus-visible,a:focus-visible{outline:2px solid var(--orange);outline-offset:2px}

/* ── Notfall-Liste: Bereiche ── */
.ml-group-title{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--text-light);margin:14px 2px 6px}
.ml-group-title:first-of-type{margin-top:4px}
.empty-icon{color:var(--grey);margin-bottom:8px;display:flex;justify-content:center}
.ml-del{display:flex;align-items:center;justify-content:center;color:var(--text-light)}
.si-shop-match.list.fehlt{border-color:var(--orange);color:var(--orange);background:var(--orange-bg)}
.fehlend-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;
  background:var(--orange-bg);border:1px solid var(--tint-orange-strong);border-radius:var(--radius-sm);padding:10px 12px;margin:0 0 12px;font-size:13px}
.fehlend-bar button{background:var(--orange);color:#fff;border-radius:20px;padding:7px 14px;font-weight:600;font-size:13px}

/* ── Meldungen und Bestätigung ── */
.app-toast.toast-error{background:#7f1d1d}
.app-toast .toast-close{color:#fff;opacity:.7;font-size:20px;line-height:1;padding:0 2px}
.app-toast .undo-toast-text{white-space:normal}
.confirm-overlay{display:flex;align-items:center;justify-content:center;padding:20px}
.confirm-box{background:var(--white);border-radius:var(--radius);padding:20px;max-width:340px;width:100%;box-shadow:var(--shadow-md)}
.confirm-box p{font-size:15px;line-height:1.45;margin-bottom:18px}
.confirm-actions{display:flex;gap:10px;justify-content:flex-end}
.confirm-actions button{padding:10px 16px;border-radius:20px;font-weight:600;font-size:14px}
.confirm-cancel{background:var(--grey-light)}
.confirm-ok{background:var(--red);color:#fff}

/* «+ Gang» als kleiner Knopf in der Zeile «Mittag»/«Abend» statt als grosser Kasten neben jeder Mahlzeit */
.add-gang-chip{
  margin-left:auto;text-transform:none;letter-spacing:0;
  font-size:12px;font-weight:600;color:var(--orange);
  border:1px dashed var(--orange);border-radius:12px;padding:3px 10px;background:var(--orange-bg);
  position:relative;
}
.add-gang-chip::after{content:"";position:absolute;inset:-8px -4px}
.add-gang-chip:active{background:var(--orange);color:#fff}
.meal-group-label{min-height:24px}

/* ── Aktionsleiste: «Mehr»-Menü für Kopieren und Leeren ── */
.action-more{position:relative;flex:1;min-width:0;display:flex}
.action-more .action-btn{width:100%}
.more-backdrop{position:fixed;inset:0;z-index:140}
.more-menu{
  position:absolute;right:0;top:calc(100% + 6px);z-index:150;min-width:190px;
  background:var(--white);border-radius:var(--radius-sm);box-shadow:var(--shadow-md);
  padding:6px;display:flex;flex-direction:column;
}
.more-menu button{display:flex;align-items:center;gap:10px;padding:12px 12px;border-radius:6px;font-size:15px;text-align:left;color:var(--text)}
.more-menu button svg{width:18px;height:18px;flex-shrink:0}
.more-menu button:active{background:var(--grey-light)}
.more-menu button.danger{color:var(--red)}

/* ── Vergangene Tage: eingeklappt, gedämpft ── */
.day-card.is-past .day-header{background:var(--grey-light);color:var(--text-light);cursor:pointer;gap:10px}
.day-card.is-past.collapsed{margin-bottom:6px;box-shadow:none;border:1px solid var(--grey-light)}
.day-card.is-past .past-summary{flex:1;min-width:0;font-weight:400;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.day-card.is-past .day-name-full,.day-card.is-past .date{flex-shrink:0}
.past-chevron{margin-left:4px}
.today-tag{margin-left:8px;background:var(--orange);color:#fff;font-size:11px;font-weight:700;padding:2px 8px;border-radius:10px;vertical-align:1px}
@media print{
  .day-card.collapsed .day-slots{display:flex!important}
  .past-summary,.past-chevron,.today-tag{display:none!important}
}

/* Fortschrittsbalken (Produktsuche) */
.progress-bar{flex-basis:100%;height:4px;background:var(--grey-light);border-radius:2px;overflow:hidden;margin-top:6px}
.progress-fill{height:100%;background:var(--green);transition:width .3s ease}
.theme-chips .cd-chip{width:auto;height:auto;min-height:36px;border-radius:18px;padding:6px 14px}

/* Icons im Fliesstext: an der Schrift ausrichten */
.app-icon{display:inline-block;vertical-align:-0.2em;flex-shrink:0}
.login-logo .app-icon{color:var(--orange);vertical-align:middle}

/* Ladeanzeige beim Öffnen eines Rezepts */
.detail-loading{position:fixed;inset:0;z-index:250;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;
  background:rgba(0,0,0,.25);color:#fff;font-weight:600;font-size:15px}
.detail-loading .spinner{border-color:rgba(255,255,255,.35);border-top-color:#fff}

/* Breite Ansicht: eingeklappte vergangene Tage als eine Zeile (die Desktop-Regel oben
   erzwingt sonst display:flex auf .day-slots und hebelt das Einklappen aus) */
@media screen and (min-width:900px){
  .day-card.collapsed .day-slots{display:none!important}
  .day-card.collapsed .day-header{max-width:none;flex:1;flex-direction:row;align-items:center;justify-content:space-between}
}
