/* SmartFood Advisor – simple clean UI (no frameworks) */
:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --ring:#e2e8f0;
  --primary:#1f7a5a;
  --primary2:#116d4e;
  --shadow: 0 8px 30px rgba(15,23,42,.08);
  --radius: 18px;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background: linear-gradient(180deg, #fff, var(--bg));
}

.header{
  padding: 18px 18px 0;
  max-width: 1200px;
  margin: 0 auto;
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

.brand{
  display:flex;
  gap:14px;
  align-items:center;
}

.logo{
  width:56px;
  height:56px;
  object-fit:contain;
  border-radius: 16px;
  background:#fff;
  border:1px solid var(--ring);
  box-shadow: var(--shadow);
  padding:6px;
}

.title-row{ display:flex; gap:10px; align-items:center; }
h1{ margin:0; font-size:20px; }
.subtitle{ margin:2px 0 0; color:var(--muted); font-size:13px; }

.badge{
  font-size:12px;
  padding:4px 10px;
  border-radius: 999px;
  background:#eef2ff;
  border:1px solid #e0e7ff;
  color:#334155;
}

.who{
  display:flex;
  gap:10px;
  align-items:end;
  flex-wrap:wrap;
}

.label{
  font-size:12px;
  color:var(--muted);
  display:block;
}

.main{
  max-width: 1200px;
  margin: 14px auto 40px;
  padding: 0 18px;
  display:grid;
  grid-template-columns: 1fr 1.05fr;
  gap:16px;
}
@media (max-width: 980px){
  .main{ grid-template-columns: 1fr; }
}

.panel{
  background:var(--card);
  border:1px solid var(--ring);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
}

h2{
  margin: 0;
  font-size: 16px;
}
.hint{
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 13px;
}



/* UX-feine Hinweisbox (Preise / Vorräte-Items) */
.item-hint{
  margin-top: 6px;
  font-size: 0.85rem;
  color: #8a95a3;
  line-height: 1.4;
}
.item-hint strong{
  color: #6f7b88;
  font-weight: 500;
}

.row{
  display:flex;
  gap:10px;
  align-items:center;
}

.input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--ring);
  font-size: 14px;
  outline: none;
}
.input:focus{
  border-color: #b6d7cc;
  box-shadow: 0 0 0 4px rgba(31,122,90,.12);
}

.btn{
  border: 1px solid var(--ring);
  background:#fff;
  border-radius: 14px;
  padding: 11px 12px;
  font-weight: 600;
  cursor:pointer;
  transition: transform .02s ease, box-shadow .2s ease, background .2s ease;
  white-space:nowrap;
}
.btn:hover{ box-shadow: 0 8px 22px rgba(2,6,23,.07); }
.btn:active{ transform: translateY(1px); }

.btn.primary{
  background: var(--primary);
  border-color: transparent;
  color:#fff;
}
.btn.primary:hover{ background: var(--primary2); }

.btn.wide{ flex:1; }

.mt{ margin-top: 14px; }

.status{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
}

.divider{
  height:1px;
  background: var(--ring);
  margin: 14px 0;
}

.chat{
  height: 220px;
  overflow:auto;
  border:1px solid var(--ring);
  border-radius: 14px;
  padding:10px;
  background: #fbfdff;
}
.msg{
  margin: 8px 0;
  display:flex;
  gap:8px;
}
.bubble{
  max-width: 88%;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--ring);
  background:#fff;
  font-size: 14px;
  line-height: 1.35;
}
.me .bubble{ background:#f1f5f9; }
.bot .bubble{ background:#ecfdf5; border-color:#b6d7cc; }

.tiny{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
  margin-top: 10px;
}
@media (max-width: 980px){
  .cards{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .cards{ grid-template-columns: 1fr; }
}

.card{
  border-radius: 18px;
  border:1px solid var(--ring);
  overflow:hidden;
  background:#fff;
  box-shadow: 0 8px 22px rgba(2,6,23,.06);
  cursor:pointer;
  transition: transform .08s ease, box-shadow .2s ease;
}
.card:hover{ transform: translateY(-1px); box-shadow: 0 14px 35px rgba(2,6,23,.12); }
.card.selected{ outline: 3px solid rgba(22,163,74,.55); }

.card img{
  width:100%;
  height: 150px;
  object-fit:cover;
  display:block;
}
.card .cbody{
  padding: 10px 12px 12px;
}
.card .ctitle{
  font-weight:800;
  font-size: 14px;
  margin:0;
}
.card .cmeta{
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.card.recommended{
  outline: 2px solid rgba(255, 193, 7, 0.35);
}
.card.recommended.selected{
  /* Wenn eine Empfehlung ausgewählt wurde, soll sie eindeutig grün hervorgehoben werden */
  outline: 3px solid rgba(22,163,74,.65);
}
.card.recommended .ctitle{
  letter-spacing: 0.1px;
}
.card .creason{
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}
.tags{
  margin-top: 8px;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.tag{
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background:#f1f5f9;
  border:1px solid var(--ring);
  color:#334155;
}

.selected{
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.footnote{
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--ring);
}


/* Pager + recipe */
.suggestions-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.pager-wrap{
  display:flex;
  gap:10px;
  align-items:center;
}
.pager{
  font-size:12px;
  color: var(--muted);
}

.recipe{
  border:1px solid var(--ring);
  border-radius: 16px;
  padding: 12px;
  background: #fbfdff;
}
.recipe-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  flex-wrap:wrap;
}
.recipe-title{
  margin:0;
  font-size: 16px;
  font-weight: 900;
}
.recipe-meta{
  margin-top: 6px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.recipe-media{
  display:flex;
  justify-content:center;

  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--ring);
}
.recipe-img{
  width: 100%;
  max-width: 360px;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}
@media (max-width: 560px){
  .recipe-img{ height: 200px; }
}

.pill{
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background:#eef2ff;
  border:1px solid #e0e7ff;
  color:#334155;
}
.recipe-cols{
  display:grid;
  grid-template-columns: 1fr 1.2fr;
  gap:12px;
  margin-top: 10px;
}
@media (max-width: 980px){
  .recipe-cols{ grid-template-columns: 1fr; }
}
.recipe-col h4{
  margin: 0 0 8px;
  font-size: 13px;
}
.list{
  margin: 0;
  padding-left: 18px;
  color: #334155;
  font-size: 13px;
  line-height: 1.4;
}
.list li{ margin: 6px 0; }

.auth{display:flex;flex-direction:column;gap:8px;min-width:340px}
.auth-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.auth-row .input{min-width:160px}

.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width: 980px){.grid2{grid-template-columns:1fr}}


/* --- Top navigation (clean, like smartfoodadvisor.com) --- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15,23,42,0.08);
}

.brandlink{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: inherit;
}

.brandname{
  font-weight: 700;
  letter-spacing: -0.02em;
}

.topnav{
  display:flex;
  gap: 16px;
  align-items:center;
}

.topnav a{
  text-decoration:none;
  font-weight: 600;
  color: rgba(15,23,42,0.72);
  padding: 8px 10px;
  border-radius: 12px;
}

.topnav a:hover{
  background: rgba(15,23,42,0.06);
  color: rgba(15,23,42,0.92);
}

.topactions{
  position: relative;
  display:flex;
  gap:10px;
  align-items:center;
}

.iconbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: white;
  cursor:pointer;
}

.iconbtn:hover{ background: rgba(15,23,42,0.03); }

.icon{ font-size: 18px; line-height: 1; }

.dropdown{
  position:absolute;
  right: 0;
  top: 52px;
  width: 260px;
  background: white;
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(15,23,42,0.10);
  padding: 10px;
  display:none;
}

.dropdown.open{ display:block; }

.dropdown-title{
  font-weight: 800;
  padding: 6px 10px;
}

.dropdown-status{
  padding: 0 10px 10px 10px;
  color: rgba(15,23,42,0.65);
  font-size: 13px;
}

.dropdown-item{
  width:100%;
  display:flex;
  justify-content:flex-start;
  padding: 10px;
  border-radius: 14px;
  border: none;
  background: transparent;
  cursor:pointer;
  font-weight: 700;
  text-decoration:none;
  color: rgba(15,23,42,0.85);
}

.dropdown-item:hover{ background: rgba(15,23,42,0.06); }

#btnMenu{ display:none; }

/* Hero */
.hero{
  padding: 28px 18px 10px 18px;
}
.hero-inner{
  max-width: 1120px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(15,23,42,0.03), transparent);
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 24px;
  padding: 20px 18px;
}
.hero h1{ margin: 0 0 6px 0; letter-spacing:-0.03em; }
.hero .sub{ margin: 0 0 14px 0; color: rgba(15,23,42,0.68); }
.hero-row{ display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; margin-top: 10px; }
.field{ min-width: 240px; flex: 1; }

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  display:none;
  align-items:center;
  justify-content:center;
  padding: 16px;
  z-index: 60;
}
.modal.open{ display:flex; }
.modal-card{
  width: min(560px, 100%);
  background: white;
  border-radius: 24px;
  border: 1px solid rgba(15,23,42,0.10);
  box-shadow: 0 30px 60px rgba(15,23,42,0.18);
  padding: 16px;
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.wide{ width:100%; }
.row{ display:flex; gap:10px; align-items:center; }
.mt{ margin-top: 10px; }

@media (max-width: 920px){
  #btnMenu{ display:inline-flex; }
  .topnav{
    display:none;
    position:absolute;
    left: 18px;
    right: 18px;
    top: 62px;
    background: white;
    border: 1px solid rgba(15,23,42,0.10);
    border-radius: 18px;
    padding: 10px;
    flex-direction:column;
    align-items:flex-start;
    box-shadow: 0 20px 40px rgba(15,23,42,0.10);
  }
  .topnav.open{ display:flex; }
  .topnav a{ width:100%; }
}


/* Legal pages + footer */
.legal{
  max-width: 1120px;
  margin: 18px auto 40px auto;
  padding: 0 18px;
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}
.legal-card{
  background: white;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 24px;
  padding: 18px;
}
.legal-card h1{ margin-top:0; letter-spacing:-0.03em; }
.legal-card h2{ margin-top: 18px; }
.legal-card h3{ margin-top: 14px; }
.legal-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.box{
  background: rgba(15,23,42,0.03);
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 18px;
  padding: 14px;
}
.legal-hero{
  background: linear-gradient(180deg, rgba(15,23,42,0.03), transparent);
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 24px;
  padding: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.legal-img{
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.08);
  background: white;
}
.sitefooter{
  margin-top: 30px;
  border-top: 1px solid rgba(15,23,42,0.08);
  background: rgba(15,23,42,0.02);
}
.footer-inner{
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 18px;
  display:flex;
  gap: 22px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
}
.footer-brand{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  min-width: 280px;
}
.footer-title{ font-weight: 900; }
.footer-sub{ color: rgba(15,23,42,0.68); font-size: 14px; margin-top: 2px; }
.footer-links{ display:flex; gap: 10px; flex-wrap:wrap; margin-top: 10px; }
.footer-links a{ text-decoration:none; font-weight:700; color: rgba(15,23,42,0.72); }
.footer-links a:hover{ text-decoration:underline; }
.footer-cols{
  display:flex;
  gap: 26px;
  flex-wrap:wrap;
}
.col{ display:flex; flex-direction:column; gap: 8px; min-width: 200px; }
.col-title{ font-weight: 900; }
.col a{ text-decoration:none; color: rgba(15,23,42,0.72); font-weight:600; }
.col a:hover{ text-decoration:underline; }
.newsletter{ display:flex; gap: 10px; align-items:center; margin-top: 8px; flex-wrap:wrap; }
.footer-bottom{
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px 18px 18px;
  color: rgba(15,23,42,0.55);
  font-size: 13px;
}
@media (max-width: 980px){
  .legal{ grid-template-columns: 1fr; }
  .legal-grid{ grid-template-columns: 1fr; }
}



/* Empfehlung (AI) – Stern unten */
.cfooter{
  margin-top: 10px;
  display:flex;
  align-items:center;
  gap:8px;
}
.ai-recommendation{
  display:flex;
  align-items:center;
  gap:6px;
  font-weight: 800;
  font-size: 12px;
  color: #f5c400; /* gelb */
  letter-spacing: 0.2px;
}
.ai-recommendation .ai-star{
  font-size: 14px;
  line-height: 1;
}


/* Thinking clock (loading indicator) */
.thinking{ display:flex; align-items:center; }
.thinking-clock{
  width: 22px;
  height: 22px;
  border: 2px solid var(--ring);
  border-radius: 999px;
  position: relative;
  flex: 0 0 auto;
  opacity: .9;
}
.thinking-clock::after{
  content:"";
  position:absolute;
  inset: 3px;
  border: 1px dashed rgba(2,6,23,.15);
  border-radius: 999px;
}
.thinking-clock .hand{
  position:absolute;
  left:50%;
  top:50%;
  transform-origin: 0% 50%;
  background: rgba(2,6,23,.55);
  height: 2px;
  border-radius: 2px;
}
.thinking-clock .hand.hour{ width: 6px; transform: translateY(-1px) rotate(0deg); animation: sfClockHour 6s linear infinite; }
.thinking-clock .hand.minute{ width: 8px; transform: translateY(-1px) rotate(0deg); animation: sfClockMinute 2s linear infinite; }
.thinking-clock .hand.second{ width: 9px; transform: translateY(-1px) rotate(0deg); background: rgba(2,6,23,.35); animation: sfClockSecond .9s linear infinite; }

@keyframes sfClockSecond{ from{ transform: translateY(-1px) rotate(0deg);} to{ transform: translateY(-1px) rotate(360deg);} }
@keyframes sfClockMinute{ from{ transform: translateY(-1px) rotate(0deg);} to{ transform: translateY(-1px) rotate(360deg);} }
@keyframes sfClockHour{ from{ transform: translateY(-1px) rotate(0deg);} to{ transform: translateY(-1px) rotate(360deg);} }


/* Recipe image loader */
.recipe-media{position:relative}
#recipeImageLoading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(255,255,255,.6);backdrop-filter:saturate(1.2) blur(2px);border-radius:14px;z-index:2}
#recipeImageLoading.hidden{display:none}
#recipeImageLoading .hourglass{width:32px;height:32px;border:4px solid rgba(0,0,0,.15);border-top:4px solid #388e3c;border-radius:50%;animation:sfSpin .9s linear infinite}
#recipeImageLoading .loading-text{margin-top:6px;font-size:13px;color:rgba(0,0,0,.6)}
@keyframes sfSpin{from{transform:rotate(0)}to{transform:rotate(360deg)}}
.recipe-img.sf-dim{filter:saturate(.9);opacity:.75}


/* --- Vorräte (pantry.html) --- */
.page{ max-width: 1100px; margin: 22px auto; padding: 0 14px; }
.card{ background:var(--card); border:1px solid var(--ring); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card.inner{ padding: 14px; border-radius: 16px; box-shadow:none; background:#fbfcff; }
.card-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom: 10px; }
.h1{ margin:0; font-size: 24px; letter-spacing:-.02em; }
.h2{ margin:0; font-size: 16px; letter-spacing:-.01em; }
.muted{ color: var(--muted); }
.small{ font-size: 12px; }
.hint{ margin-top:8px; color: var(--muted); font-size: 12px; }

.pantry-toolbar{ display:flex; gap:14px; flex-wrap:wrap; margin: 12px 0 18px; }
.pantry-add{ flex: 1 1 520px; }
.pantry-search{ width: 260px; }
.row{ display:flex; gap:10px; align-items:center; }
.label{ display:block; font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.input{ width:100%; }

.pantry-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 980px){
  .pantry-grid{ grid-template-columns: 1fr; }
  .pantry-search{ width:100%; }
}

.inner-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom: 10px; }

.pantry-list{ display:flex; flex-direction:column; gap: 10px; }
.pantry-row{
  display:grid;
  grid-template-columns: 1fr 220px 160px;
  gap: 10px;
  align-items:center;
  padding: 10px 10px;
  border: 1px solid var(--ring);
  border-radius: 14px;
  background: #fff;
}
@media (max-width: 780px){
  .pantry-row{ grid-template-columns: 1fr; }
}
.pantry-name{ font-weight: 700; }
.pantry-qty{ display:flex; gap: 8px; align-items:center; }
.pantry-qty input.qty{ width: 110px; }
.pantry-qty input.unit{ width: 90px; text-transform: none; }
.pantry-actions{ display:flex; gap: 8px; justify-content:flex-end; }

.btn.small{ padding: 8px 10px; font-size: 12px; border-radius: 12px; }
.btn.danger{ background:#b42318; border-color:#b42318; color:#fff; }
.btn.danger:hover{ filter: brightness(.95); }

.empty{
  padding: 12px;
  border: 1px dashed var(--ring);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(100,116,139,.04);
}

.allitems{ display:flex; flex-direction:column; gap: 12px; }
.cat{ border: 1px solid var(--ring); border-radius: 14px; background:#fff; overflow:hidden; }
.cat-title{ font-weight: 800; padding: 10px 12px; background: rgba(31,122,90,.07); }
.cat-items{ display:flex; flex-direction:column; }
.item{
  display:flex; align-items:center; justify-content:space-between;
  padding: 10px 12px;
  border-top: 1px solid var(--ring);
  gap: 10px;
}
.item:first-child{ border-top: none; }
.item-name{ font-weight: 700; }
.item-meta{ font-size: 12px; color: var(--muted); margin-top: 2px; }
.item-right{ display:flex; align-items:center; gap: 10px; }

.pill{
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--ring);
  background: #f8fafc;
  color: var(--muted);
}
.pill.ok{
  background: rgba(31,122,90,.10);
  border-color: rgba(31,122,90,.25);
  color: var(--text);
}

/* Vorräte – Kategorie-Kacheln */
.cat-overview{ margin: 6px 0 16px; }
.cat-overview-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin: 6px 0 10px; }
.cat-cards{ display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 980px){ .cat-cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cat-card{
  display:flex; gap: 12px; align-items:center;
  padding: 12px;
  border: 1px solid var(--ring);
  border-radius: 16px;
  background:#fff;
  box-shadow: none;
  cursor:pointer;
  text-align:left;
  transition: transform .08s ease, border-color .08s ease;
}
.cat-card:hover{ transform: translateY(-1px); border-color: rgba(31,122,90,.35); }
.cat-card-emoji{ font-size: 22px; width: 34px; height: 34px; display:flex; align-items:center; justify-content:center; border-radius: 12px; background: rgba(31,122,90,.08); }
.cat-card-title{ font-weight: 800; }
.cat-card-sub{ font-size: 12px; color: var(--muted); margin-top:2px; }

/* Kategorie Detail */
.cat-detail.hidden{ display:none; }
.cat-detail{ margin: 4px 0 16px; border: 1px solid var(--ring); border-radius: 18px; background:#fff; padding: 12px; }
.cat-detail-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom: 10px; }
.cat-detail-title{ display:flex; align-items:center; gap:10px; }
.cat-emoji{ font-size: 22px; width: 34px; height: 34px; display:flex; align-items:center; justify-content:center; border-radius: 12px; background: rgba(31,122,90,.08); }
.cat-items-grid{ display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 980px){ .cat-items-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px){ .cat-items-grid{ grid-template-columns: 1fr; } }

.food-card{
  border: 1px solid var(--ring);
  border-radius: 16px;
  background: #fbfcff;
  padding: 12px;
  display:flex;
  gap: 12px;
  align-items:flex-start;
}
.food-icon{ font-size: 20px; width: 34px; height: 34px; display:flex; align-items:center; justify-content:center; border-radius: 12px; background:#fff; border: 1px solid var(--ring); }
.food-main{ flex: 1 1 auto; min-width: 0; }
.food-name{ font-weight: 800; line-height: 1.15; }
.food-meta{ display:flex; flex-wrap:wrap; gap: 8px; margin-top: 8px; }
.food-actions{ display:flex; align-items:center; justify-content:flex-end; }

.chip{
  display:inline-flex; align-items:center; gap: 6px;
  border: 1px solid var(--ring);
  border-radius: 999px;
  padding: 4px 10px;
  background:#fff;
  font-size: 12px;
  color: var(--muted);
}
.chip.ok{ background: rgba(31,122,90,.10); border-color: rgba(31,122,90,.25); color: var(--text); }
.chip.unit{ cursor:pointer; }

/* Modal */
body.modal-open{ overflow:hidden; }
.modal.hidden{ display:none; }
.modal{ position:fixed; inset:0; z-index: 50; }
.modal-backdrop{ position:absolute; inset:0; background: rgba(15,23,42,.42); }
.modal-card{
  position:relative;
  width:min(520px, calc(100% - 24px));
  margin: 10vh auto 0;
  background:#fff;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 30px 70px rgba(0,0,0,.25);
  overflow:hidden;
}
.modal-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding: 14px 14px 10px; border-bottom: 1px solid var(--ring); }
.modal-title{ font-weight: 900; }
.modal-body{ padding: 14px; display:flex; flex-direction:column; gap: 12px; }
.modal-actions{ padding: 12px 14px 14px; display:flex; justify-content:flex-end; gap: 10px; border-top: 1px solid var(--ring); }
.field .hint{ margin-top: 6px; }
.stepper{ display:flex; gap:10px; align-items:center; }
.stepper input{ flex:1 1 auto; }

/* Hide full list when category detail open (mobile/cleaner) */
#allListCard.hidden{ display:none; }

.cat-title-emoji{ margin-right: 6px; }


/* --- Recipe helper boxes (shopping list + pantry ideas) --- */
.subbox{
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.6);
}
.subbox .muted{ opacity: .75; }

/* Pantry ideas formatting */
.ideas-list{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-top: 6px;
}
.idea-item{
  padding: 10px 10px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.75);
}
.idea-title{
  font-weight: 800;
  margin-bottom: 4px;
}
.idea-body{
  opacity: .9;
  line-height: 1.35;
}

/* === Fixed footer (global) === */
#fixedFooter{
  position:fixed;
  left:0; right:0; bottom:0;
  background: rgba(243,244,246,0.98);
  border-top: 1px solid rgba(15,23,42,0.10);
  padding: 10px 12px;
  z-index: 9999;
}
#fixedFooter .footer-links{
  width:100%;
  display:flex;
  justify-content:center;
  gap: 14px;
  flex-wrap:wrap;
  margin: 0;
}
body{ padding-bottom: 64px; }

/* === Active menu item highlight === */
#userMenu .dropdown-item[aria-current="page"]{
  background: rgba(99,102,241,0.10);
  font-weight: 800;
  border-left: 4px solid rgba(99,102,241,0.95);
}

/* === Pantry legacy style.css (scoped to .page-pantry, forced) === */
.page-pantry :root{
  --bg:#f6f7fb !important;
  --card:#ffffff !important;
  --text:#0f172a !important;
  --muted:#64748b !important;
  --border:#e2e8f0 !important;
  --accent:#2563eb !important;
  --accent2:#10b981 !important;
  --danger:#ef4444 !important;
  --shadow:0 10px 30px rgba(2,6,23,.08) !important;
  --radius:16px !important;
  --radius2:22px !important;
}.page-pantry *{box-sizing:border-box}.page-pantry, .page-pantry{height:100%}.page-pantry{
  margin:0 !important;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif !important;
  color:var(--text) !important;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 45%, var(--bg) 100%) !important;
}.page-pantry .container{
  max-width:1100px !important;
  margin:0 auto !important;
  padding:24px 18px 60px !important;
}.page-pantry .topbar{
  display:flex !important;
  gap:14px !important;
  align-items:center !important;
  justify-content:space-between !important;
  margin-bottom:16px !important;
}.page-pantry h1{
  margin:0 !important;
  font-size:28px !important;
  letter-spacing:-.02em !important;
}.page-pantry .sub{
  color:var(--muted) !important;
  font-size:14px !important;
  margin-top:6px !important;
}.page-pantry .badge{
  display:inline-flex !important;
  align-items:center !important;
  gap:8px !important;
  padding:8px 12px !important;
  background:rgba(37,99,235,.08) !important;
  color:var(--accent) !important;
  border:1px solid rgba(37,99,235,.18) !important;
  border-radius:999px !important;
  font-size:13px !important;
  white-space:nowrap !important;
}.page-pantry .controls{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  align-items:center !important;
  justify-content:space-between !important;
  background:rgba(255,255,255,.7) !important;
  border:1px solid var(--border) !important;
  border-radius:var(--radius) !important;
  padding:12px !important;
  box-shadow:0 6px 16px rgba(2,6,23,.04) !important;
}.page-pantry .leftControls{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  align-items:center !important;
}.page-pantry .rightControls{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  align-items:center !important;
  justify-content:flex-end !important;
}.page-pantry .input{
  display:flex !important;
  gap:10px !important;
  align-items:center !important;
  background:var(--card) !important;
  border:1px solid var(--border) !important;
  border-radius:999px !important;
  padding:10px 14px !important;
  min-width:280px !important;
}.page-pantry .input input{
  border:0 !important;
  outline:0 !important;
  width:100% !important;
  font-size:14px !important;
  background:transparent !important;
}.page-pantry .btn{
  border:1px solid var(--border) !important;
  background:var(--card) !important;
  color:var(--text) !important;
  padding:10px 12px !important;
  border-radius:12px !important;
  cursor:pointer !important;
  font-weight:600 !important;
  font-size:14px !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:8px !important;
  transition: transform .06s ease, border-color .12s ease, box-shadow .12s ease !important;
}.page-pantry .btn:hover{border-color:#cbd5e1 !important; box-shadow:0 6px 16px rgba(2,6,23,.06)}.page-pantry .btn:active{transform: translateY(1px)}.page-pantry .btnPrimary{
  background:var(--accent) !important;
  color:white !important;
  border-color: rgba(37,99,235,.4) !important;
}.page-pantry .btnPrimary:hover{box-shadow:0 10px 22px rgba(37,99,235,.22)}.page-pantry .btnSuccess{
  background:var(--accent2) !important;
  color:white !important;
  border-color: rgba(16,185,129,.4) !important;
}.page-pantry .btnDanger{
  background:rgba(239,68,68,.08) !important;
  border-color:rgba(239,68,68,.25) !important;
  color:var(--danger) !important;
}.page-pantry /* Chat under title (full width) */
.chatFull{
  margin-top:14px !important;
  padding:14px !important;
}.page-pantry /* Right sidebar categories */
.sidebar{
  grid-column: span 4 !important;
  padding:14px !important;
}.page-pantry .catList{
  display:flex !important;
  flex-direction:column !important;
  gap:10px !important;
  margin-top:10px !important;
}.page-pantry .sidebarHeader{
  display:flex !important;
  flex-direction:column !important;
  gap:2px !important;
}.page-pantry .voiceHintLine{
  margin-top:8px !important;
  padding-left:2px !important;
}.page-pantry .grid{
  margin-top:16px !important;
  display:grid !important;
  grid-template-columns: repeat(12, 1fr) !important;
  gap:14px !important;
}.page-pantry .card{
  background:var(--card) !important;
  border:1px solid var(--border) !important;
  border-radius:var(--radius2) !important;
  box-shadow: var(--shadow) !important;
  overflow:hidden !important;
}.page-pantry .catCard{
  grid-column: span 4 !important;
  padding:14px !important;
  cursor:pointer !important;
  position:relative !important;
  transition: transform .08s ease, box-shadow .12s ease !important;
}.page-pantry .catCard:hover{transform: translateY(-1px) !important; box-shadow:0 18px 38px rgba(2,6,23,.12)}.page-pantry .catHeader{
  display:flex !important;
  gap:12px !important;
  align-items:center !important;
}.page-pantry .catIcon{
  width:44px !important;height:44px !important;
  border-radius:14px !important;
  display:grid !important;
  place-items:center !important;
  font-size:22px !important;
  background:linear-gradient(135deg, rgba(37,99,235,.16), rgba(16,185,129,.14)) !important;
  border:1px solid rgba(37,99,235,.18) !important;
}.page-pantry .catTitle{font-size:16px !important; font-weight:800}.page-pantry .catMeta{color:var(--muted) !important; font-size:13px !important; margin-top:2px}.page-pantry .catFooter{
  margin-top:12px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  color:var(--muted) !important;
  font-size:13px !important;
}.page-pantry .pill{
  padding:6px 10px !important;
  border-radius:999px !important;
  border:1px solid var(--border) !important;
  background:#f8fafc !important;
  font-weight:700 !important;
  color:#334155 !important;
}.page-pantry .pillWarn{
  background:#fff7ed !important;
  border-color: rgba(234,88,12,.25) !important;
  color:#9a3412 !important;
}.page-pantry .panel{
  grid-column: span 8 !important;
  padding:14px !important;
}.page-pantry /* Chat (Vorräte-Agent) */
.chatPanel{
  display:flex !important;
  flex-direction:column !important;
  /* Fix the overall height so the message area can scroll instead of the whole card growing */
  height:420px !important;
  max-height: calc(100vh - 220px) !important;
  min-height:360px !important;
}.page-pantry .chatTopRight{display:flex !important; align-items:center !important; gap:10px !important;}.page-pantry .toggle{display:flex !important; align-items:center !important; gap:8px !important; font-weight:800 !important; color:#334155 !important; user-select:none !important;}.page-pantry .toggle input{accent-color:#22c55e !important;}.page-pantry .chatSettings{
  display:grid !important;
  grid-template-columns: 1.2fr 1fr 1fr !important;
  gap:10px !important;
  padding:10px !important;
  border:1px solid var(--border) !important;
  border-radius:16px !important;
  background:linear-gradient(180deg, #ffffff, #fbfdff) !important;
  margin-bottom:10px !important;
}.page-pantry .chatSettings label{font-size:12px !important; color:var(--muted) !important; font-weight:700 !important;}.page-pantry .chatSettings select, .page-pantry .chatSettings input[type="range"]{
  width:100% !important;
}.page-pantry /* Hide voice controls (Stimme/Speed/Pitch) while keeping TTS toggle + defaults in JS */
.chatSettings{display:none !important;}.page-pantry .chatMessages{
  flex:1 !important;
  /* keep width stable even when the scrollbar appears */
  overflow-y: auto !important;
  overflow-x: hidden !important;
  /* stable scrollbar width (supported browsers) */
  scrollbar-gutter: stable !important;
  box-sizing: border-box !important;
  border:1px solid var(--border) !important;
  border-radius:16px !important;
  padding:12px !important;
  background:#ffffff !important;
}.page-pantry .msg{max-width:78% !important; padding:10px 12px !important; border-radius:16px !important; border:1px solid var(--border) !important; margin:8px 0 !important; line-height:1.35 !important; overflow-wrap:anywhere !important; word-break:break-word !important;}.page-pantry .msgUser{margin-left:auto !important; background:#f0f9ff !important; border-color: rgba(2,132,199,.22) !important;}.page-pantry .msgBot{margin-right:auto !important; background:#f0fdf4 !important; border-color: rgba(34,197,94,.22) !important;}.page-pantry .msgMeta{font-size:11px !important; color:var(--muted) !important; margin-top:6px !important;}.page-pantry .chatComposer{display:flex !important; gap:10px !important; align-items:center !important; margin-top:10px !important;}.page-pantry .chatInput{
  flex:1 !important;
  padding:12px 12px !important;
  border-radius:14px !important;
  border:1px solid var(--border) !important;
  background:#fff !important;
  outline:none !important;
}.page-pantry .chatInput:focus{border-color: rgba(37,99,235,.35) !important; box-shadow:0 0 0 3px rgba(37,99,235,.10)}

@media (max-width: 980px){.page-pantry .panel{grid-column: span 12 !important;}.page-pantry .sidebar{grid-column: span 12 !important;}.page-pantry .chatSettings{grid-template-columns:1fr !important;}.page-pantry }
.panelHeader{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:14px !important;
  margin-bottom:10px !important;
}.page-pantry .panelTitle{
  font-size:18px !important;
  font-weight:900 !important;
  margin:0 !important;
}.page-pantry .panelSub{
  margin:5px 0 0 !important;
  color:var(--muted) !important;
  font-size:13px !important;
}.page-pantry .items{
  display:grid !important;
  grid-template-columns: 1fr !important;
  gap:10px !important;
}.page-pantry .item{
  border:1px solid var(--border) !important;
  border-radius:16px !important;
  padding:12px !important;
  display:flex !important;
  gap:12px !important;
  row-gap:10px !important;
  align-items:center !important;
  justify-content:space-between !important;
  flex-wrap:wrap !important;          /* allow content to wrap instead of being cut off */
  background:linear-gradient(180deg, #ffffff, #fbfdff) !important;
}.page-pantry .itemLeft{
  display:flex !important;
  gap:12px !important;
  align-items:center !important;
  min-width:0 !important;
  flex:1 1 320px !important;
}.page-pantry .itemEmoji{
  width:40px !important;height:40px !important;border-radius:14px !important;
  display:grid !important;place-items:center !important;
  font-size:20px !important;
  background:rgba(2,6,23,.03) !important;
  border:1px solid var(--border) !important;
}.page-pantry .itemName{
  font-weight:900 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  max-width:260px !important;
}.page-pantry .itemNote{
  color:var(--muted) !important;
  font-size:12px !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  max-width:260px !important;
}.page-pantry .qty{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  flex:0 0 auto !important;
  margin-left:auto !important; /* when wrapping, keep controls on the right */
}.page-pantry .qtyDisplay{
  min-width:110px !important;
  text-align:right !important;
  font-weight:900 !important;
}.page-pantry .qtyDisplay small{color:var(--muted) !important; font-weight:800}.page-pantry .iconBtn{
  width:36px !important;height:36px !important;
  border-radius:12px !important;
  border:1px solid var(--border) !important;
  background:white !important;
  cursor:pointer !important;
  display:grid !important;
  place-items:center !important;
  font-weight:900 !important;
}.page-pantry .iconBtn:hover{border-color:#cbd5e1}.page-pantry .iconBtn:active{transform:translateY(1px)}.page-pantry .iconBtnPrimary{
  border-color: rgba(37,99,235,.25) !important;
  background: rgba(37,99,235,.08) !important;
  color: var(--accent) !important;
}.page-pantry .iconBtnDanger{
  border-color: rgba(239,68,68,.25) !important;
  background: rgba(239,68,68,.08) !important;
  color: var(--danger) !important;
}.page-pantry .emptyState{
  border:1px dashed #cbd5e1 !important;
  background:rgba(255,255,255,.6) !important;
  padding:16px !important;
  border-radius:16px !important;
  color:var(--muted) !important;
  font-size:14px !important;
}.page-pantry .kbd{
  border:1px solid var(--border) !important;
  border-bottom:2px solid #cbd5e1 !important;
  padding:2px 8px !important;
  border-radius:8px !important;
  background:white !important;
  color:#334155 !important;
  font-weight:800 !important;
  font-size:12px !important;
}.page-pantry .modalOverlay{
  position:fixed !important; inset:0 !important;
  background:rgba(2,6,23,.55) !important;
  display:none !important;
  align-items:center !important;
  justify-content:center !important;
  padding:18px !important;
  z-index:50 !important;
}.page-pantry .modal{
  width:min(560px, 100%) !important;
  background:white !important;
  border-radius:22px !important;
  border:1px solid var(--border) !important;
  box-shadow:0 30px 80px rgba(2,6,23,.25) !important;
  overflow:hidden !important;
}.page-pantry .modalHeader{
  padding:16px 16px 10px !important;
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:12px !important;
}.page-pantry .modalTitle{margin:0 !important; font-size:18px !important; font-weight:900}.page-pantry .modalClose{
  width:38px !important;height:38px !important;border-radius:14px !important;
  border:1px solid var(--border) !important; background:white !important; cursor:pointer !important;
}.page-pantry .modalBody{padding:0 16px 16px}.page-pantry .formGrid{
  display:grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap:10px !important;
}.page-pantry .field{
  display:flex !important;
  flex-direction:column !important;
  gap:6px !important;
}.page-pantry .field label{
  font-size:12px !important;
  font-weight:900 !important;
  color:#334155 !important;
}.page-pantry .field input, .page-pantry .field select, .page-pantry .field textarea{
  border:1px solid var(--border) !important;
  border-radius:14px !important;
  padding:10px 12px !important;
  outline:none !important;
  font-size:14px !important;
}.page-pantry .field textarea{min-height:70px !important; resize:vertical}.page-pantry .modalFooter{
  display:flex !important;
  gap:10px !important;
  justify-content:flex-end !important;
  padding-top:12px !important;
}.page-pantry .small{
  font-size:12px !important;
  color:var(--muted) !important;
  margin:8px 0 0 !important;
}

@media (max-width: 960px){.page-pantry .catCard{grid-column: span 6}.page-pantry .panel{grid-column: span 12}
}
@media (max-width: 560px){.page-pantry .catCard{grid-column: span 12}.page-pantry .items{grid-template-columns:1fr}.page-pantry .input{min-width:0 !important; width:100%}.page-pantry .controls{gap:12px}.page-pantry .leftControls, .page-pantry .rightControls{width:100%}.page-pantry .rightControls{justify-content:space-between}.page-pantry .formGrid{grid-template-columns:1fr}.page-pantry }


/* Floating Back Button */
.floating-back{
  position:fixed !important;
  right:18px !important;
  bottom:18px !important;
  z-index:9999 !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:10px !important;
  padding:12px 16px !important;
  border-radius:999px !important;
  background:var(--accent) !important;
  color:#fff !important;
  text-decoration:none !important;
  font-weight:800 !important;
  box-shadow:0 12px 30px rgba(2,6,23,.25) !important;
  border:1px solid rgba(255,255,255,.18) !important;
  backdrop-filter:saturate(120%) blur(6px) !important;
}.page-pantry .floating-back:hover{
  transform:translateY(-1px) !important;
  box-shadow:0 16px 36px rgba(2,6,23,.28) !important;
}.page-pantry .floating-back:active{
  transform:translateY(0px) !important;
}
@media (max-width:480px){.page-pantry .floating-back{ right:14px !important; bottom:14px !important; padding:11px 14px !important; }.page-pantry }


/* MHD column between name and qty */
.mhd{
  flex:0 0 auto !important;
  white-space:nowrap !important;
  font-weight:800 !important;
  color:var(--muted) !important;
  padding:6px 10px !important;
  border-radius:999px !important;
  background:rgba(2,6,23,.03) !important;
  border:1px solid var(--border) !important;
}

@media (max-width:700px){.page-pantry .mhd{ display:none !important; }
}


@media (max-width:640px){.page-pantry .mhd{
    order:3 !important;
  }.page-pantry .qty{
    order:4 !important;
    width:100% !important;
    justify-content:flex-end !important;
  }.page-pantry }


/* Σ-Gesamtmenge in der Kategorie-Übersicht IMMER ausblenden */
.catCard .pill{
  display: none !important;
}

/* === Pantry legacy styles (from old style.css), scoped to .page-pantry and with local topbar renamed to .pantryTopbar === */

.page-pantry :root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e2e8f0;
  --accent:#2563eb;
  --accent2:#10b981;
  --danger:#ef4444;
  --shadow:0 10px 30px rgba(2,6,23,.08);
  --radius:16px;
  --radius2:22px;
}.page-pantry *{box-sizing:border-box}.page-pantry, .page-pantry{height:100%}.page-pantry{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color:var(--text);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 45%, var(--bg) 100%);
}.page-pantry .container{
  max-width:1100px;
  margin:0 auto;
  padding:24px 18px 60px;
}.page-pantry .pantryTopbar{
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:16px;
}.page-pantry h1{
  margin:0;
  font-size:28px;
  letter-spacing:-.02em;
}.page-pantry .sub{
  color:var(--muted);
  font-size:14px;
  margin-top:6px;
}.page-pantry .badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  background:rgba(37,99,235,.08);
  color:var(--accent);
  border:1px solid rgba(37,99,235,.18);
  border-radius:999px;
  font-size:13px;
  white-space:nowrap;
}.page-pantry .controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  background:rgba(255,255,255,.7);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:12px;
  box-shadow:0 6px 16px rgba(2,6,23,.04);
}.page-pantry .leftControls{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}.page-pantry .rightControls{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
}.page-pantry .input{
  display:flex;
  gap:10px;
  align-items:center;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:999px;
  padding:10px 14px;
  min-width:280px;
}.page-pantry .input input{
  border:0;
  outline:0;
  width:100%;
  font-size:14px;
  background:transparent;
}.page-pantry .btn{
  border:1px solid var(--border);
  background:var(--card);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:600;
  font-size:14px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition: transform .06s ease, border-color .12s ease, box-shadow .12s ease;
}.page-pantry .btn:hover{border-color:#cbd5e1; box-shadow:0 6px 16px rgba(2,6,23,.06)}.page-pantry .btn:active{transform: translateY(1px)}.page-pantry .btnPrimary{
  background:var(--accent);
  color:white;
  border-color: rgba(37,99,235,.4);
}.page-pantry .btnPrimary:hover{box-shadow:0 10px 22px rgba(37,99,235,.22)}.page-pantry .btnSuccess{
  background:var(--accent2);
  color:white;
  border-color: rgba(16,185,129,.4);
}.page-pantry .btnDanger{
  background:rgba(239,68,68,.08);
  border-color:rgba(239,68,68,.25);
  color:var(--danger);
}.page-pantry /* Chat under title (full width) */
.chatFull{
  margin-top:14px;
  padding:14px;
}.page-pantry /* Right sidebar categories */
.sidebar{
  grid-column: span 4;
  padding:14px;
}.page-pantry .catList{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}.page-pantry .sidebarHeader{
  display:flex;
  flex-direction:column;
  gap:2px;
}.page-pantry .voiceHintLine{
  margin-top:8px;
  padding-left:2px;
}.page-pantry .grid{
  margin-top:16px;
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:14px;
}.page-pantry .card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius2);
  box-shadow: var(--shadow);
  overflow:hidden;
}.page-pantry .catCard{
  grid-column: span 4;
  padding:14px;
  cursor:pointer;
  position:relative;
  transition: transform .08s ease, box-shadow .12s ease;
}.page-pantry .catCard:hover{transform: translateY(-1px); box-shadow:0 18px 38px rgba(2,6,23,.12)}.page-pantry .catHeader{
  display:flex;
  gap:12px;
  align-items:center;
}.page-pantry .catIcon{
  width:44px;height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  font-size:22px;
  background:linear-gradient(135deg, rgba(37,99,235,.16), rgba(16,185,129,.14));
  border:1px solid rgba(37,99,235,.18);
}.page-pantry .catTitle{font-size:16px; font-weight:800}.page-pantry .catMeta{color:var(--muted); font-size:13px; margin-top:2px}.page-pantry .catFooter{
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:var(--muted);
  font-size:13px;
}.page-pantry .pill{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#f8fafc;
  font-weight:700;
  color:#334155;
}.page-pantry .pillWarn{
  background:#fff7ed;
  border-color: rgba(234,88,12,.25);
  color:#9a3412;
}.page-pantry .panel{
  grid-column: span 8;
  padding:14px;
}.page-pantry /* Chat (Vorräte-Agent) */
.chatPanel{
  display:flex;
  flex-direction:column;
  /* Fix the overall height so the message area can scroll instead of the whole card growing */
  height:420px;
  max-height: calc(100vh - 220px);
  min-height:360px;
}.page-pantry .chatTopRight{display:flex; align-items:center; gap:10px;}.page-pantry .toggle{display:flex; align-items:center; gap:8px; font-weight:800; color:#334155; user-select:none;}.page-pantry .toggle input{accent-color:#22c55e;}.page-pantry .chatSettings{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap:10px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:16px;
  background:linear-gradient(180deg, #ffffff, #fbfdff);
  margin-bottom:10px;
}.page-pantry .chatSettings label{font-size:12px; color:var(--muted); font-weight:700;}.page-pantry .chatSettings select, .page-pantry .chatSettings input[type="range"]{
  width:100%;
}.page-pantry /* Hide voice controls (Stimme/Speed/Pitch) while keeping TTS toggle + defaults in JS */
.chatSettings{display:none !important;}.page-pantry .chatMessages{
  flex:1;
  /* keep width stable even when the scrollbar appears */
  overflow-y: auto;
  overflow-x: hidden;
  /* stable scrollbar width (supported browsers) */
  scrollbar-gutter: stable;
  box-sizing: border-box;
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  background:#ffffff;
}.page-pantry .msg{max-width:78%; padding:10px 12px; border-radius:16px; border:1px solid var(--border); margin:8px 0; line-height:1.35; overflow-wrap:anywhere; word-break:break-word;}.page-pantry .msgUser{margin-left:auto; background:#f0f9ff; border-color: rgba(2,132,199,.22);}.page-pantry .msgBot{margin-right:auto; background:#f0fdf4; border-color: rgba(34,197,94,.22);}.page-pantry .msgMeta{font-size:11px; color:var(--muted); margin-top:6px;}.page-pantry .chatComposer{display:flex; gap:10px; align-items:center; margin-top:10px;}.page-pantry .chatInput{
  flex:1;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  outline:none;
}.page-pantry .chatInput:focus{border-color: rgba(37,99,235,.35); box-shadow:0 0 0 3px rgba(37,99,235,.10)}

@media (max-width: 980px){.page-pantry .panel{grid-column: span 12;}.page-pantry .sidebar{grid-column: span 12;}.page-pantry .chatSettings{grid-template-columns:1fr;}.page-pantry }
.panelHeader{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:10px;
}.page-pantry .panelTitle{
  font-size:18px;
  font-weight:900;
  margin:0;
}.page-pantry .panelSub{
  margin:5px 0 0;
  color:var(--muted);
  font-size:13px;
}.page-pantry .items{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}.page-pantry .item{
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  display:flex;
  gap:12px;
  row-gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;          /* allow content to wrap instead of being cut off */
  background:linear-gradient(180deg, #ffffff, #fbfdff);
}.page-pantry .itemLeft{
  display:flex;
  gap:12px;
  align-items:center;
  min-width:0;
  flex:1 1 320px;
}.page-pantry .itemEmoji{
  width:40px;height:40px;border-radius:14px;
  display:grid;place-items:center;
  font-size:20px;
  background:rgba(2,6,23,.03);
  border:1px solid var(--border);
}.page-pantry .itemName{
  font-weight:900;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:260px;
}.page-pantry .itemNote{
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:260px;
}.page-pantry .qty{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
  margin-left:auto; /* when wrapping, keep controls on the right */
}.page-pantry .qtyDisplay{
  min-width:110px;
  text-align:right;
  font-weight:900;
}.page-pantry .qtyDisplay small{color:var(--muted); font-weight:800}.page-pantry .iconBtn{
  width:36px;height:36px;
  border-radius:12px;
  border:1px solid var(--border);
  background:white;
  cursor:pointer;
  display:grid;
  place-items:center;
  font-weight:900;
}.page-pantry .iconBtn:hover{border-color:#cbd5e1}.page-pantry .iconBtn:active{transform:translateY(1px)}.page-pantry .iconBtnPrimary{
  border-color: rgba(37,99,235,.25);
  background: rgba(37,99,235,.08);
  color: var(--accent);
}.page-pantry .iconBtnDanger{
  border-color: rgba(239,68,68,.25);
  background: rgba(239,68,68,.08);
  color: var(--danger);
}.page-pantry .emptyState{
  border:1px dashed #cbd5e1;
  background:rgba(255,255,255,.6);
  padding:16px;
  border-radius:16px;
  color:var(--muted);
  font-size:14px;
}.page-pantry .kbd{
  border:1px solid var(--border);
  border-bottom:2px solid #cbd5e1;
  padding:2px 8px;
  border-radius:8px;
  background:white;
  color:#334155;
  font-weight:800;
  font-size:12px;
}.page-pantry .modalOverlay{
  position:fixed; inset:0;
  background:rgba(2,6,23,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:50;
}.page-pantry .modal{
  width:min(560px, 100%);
  background:white;
  border-radius:22px;
  border:1px solid var(--border);
  box-shadow:0 30px 80px rgba(2,6,23,.25);
  overflow:hidden;
}.page-pantry .modalHeader{
  padding:16px 16px 10px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}.page-pantry .modalTitle{margin:0; font-size:18px; font-weight:900}.page-pantry .modalClose{
  width:38px;height:38px;border-radius:14px;
  border:1px solid var(--border); background:white; cursor:pointer;
}.page-pantry .modalBody{padding:0 16px 16px}.page-pantry .formGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}.page-pantry .field{
  display:flex;
  flex-direction:column;
  gap:6px;
}.page-pantry .field label{
  font-size:12px;
  font-weight:900;
  color:#334155;
}.page-pantry .field input, .page-pantry .field select, .page-pantry .field textarea{
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 12px;
  outline:none;
  font-size:14px;
}.page-pantry .field textarea{min-height:70px; resize:vertical}.page-pantry .modalFooter{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  padding-top:12px;
}.page-pantry .small{
  font-size:12px;
  color:var(--muted);
  margin:8px 0 0;
}

@media (max-width: 960px){.page-pantry .catCard{grid-column: span 6}.page-pantry .panel{grid-column: span 12}
}
@media (max-width: 560px){.page-pantry .catCard{grid-column: span 12}.page-pantry .items{grid-template-columns:1fr}.page-pantry .input{min-width:0; width:100%}.page-pantry .controls{gap:12px}.page-pantry .leftControls, .page-pantry .rightControls{width:100%}.page-pantry .rightControls{justify-content:space-between}.page-pantry .formGrid{grid-template-columns:1fr}.page-pantry }


/* Floating Back Button */
.floating-back{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:9999;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  border-radius:999px;
  background:var(--accent);
  color:#fff;
  text-decoration:none;
  font-weight:800;
  box-shadow:0 12px 30px rgba(2,6,23,.25);
  border:1px solid rgba(255,255,255,.18);
  backdrop-filter:saturate(120%) blur(6px);
}.page-pantry .floating-back:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 36px rgba(2,6,23,.28);
}.page-pantry .floating-back:active{
  transform:translateY(0px);
}
@media (max-width:480px){.page-pantry .floating-back{ right:14px; bottom:14px; padding:11px 14px; }.page-pantry }


/* MHD column between name and qty */
.mhd{
  flex:0 0 auto;
  white-space:nowrap;
  font-weight:800;
  color:var(--muted);
  padding:6px 10px;
  border-radius:999px;
  background:rgba(2,6,23,.03);
  border:1px solid var(--border);
}

@media (max-width:700px){.page-pantry .mhd{ display:none; }
}


@media (max-width:640px){.page-pantry .mhd{
    order:3;
  }.page-pantry .qty{
    order:4;
    width:100%;
    justify-content:flex-end;
  }.page-pantry }


/* Σ-Gesamtmenge in der Kategorie-Übersicht IMMER ausblenden */
.catCard .pill{
  display: none !important;
}


/* =========================================================
   Pantry UI visibility + layout hardening
   Fixes: hidden send/search/add buttons, items grid not showing,
   and prevents browser autofill from hiding items.
   Applies only on Pantry page (<body class="page-pantry">)
   ========================================================= */
.page-pantry .controls{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:14px !important;
  flex-wrap:wrap !important;
  margin: 14px 0 18px 0 !important;
}
.page-pantry .leftControls,
.page-pantry .rightControls{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
}
.page-pantry .rightControls{
  justify-content:flex-end !important;
  flex-wrap:wrap !important;
}
.page-pantry .input{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(0,0,0,0.10) !important;
  background: rgba(255,255,255,0.9) !important;
  min-width: 320px !important;
  max-width: 560px !important;
}
.page-pantry .input input#search{
  display:block !important;
  width: 420px !important;
  max-width: 60vw !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 16px !important;
}
.page-pantry #chatSend,
.page-pantry #addBtn,
.page-pantry #refreshBtn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  white-space:nowrap !important;
}
.page-pantry #items{
  display:grid !important;
}
.page-pantry .grid{
  display:grid !important;
}

/* Ensure footer stays fixed and not pushed by pantry legacy rules */
.page-pantry #fixedFooter{
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 50 !important;
}

/* =========================================================
   Active menu item highlight (aria-current="page")
   ========================================================= */
#userMenu a[aria-current="page"]{
  background: rgba(0,0,0,0.06) !important;
  border: 1px solid rgba(0,0,0,0.10) !important;
  border-radius: 14px !important;
}


/* =========================================================
   Prices page additions (merged)
   ========================================================= */

/* SmartFood Advisor – simple clean UI (no frameworks) */
:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --ring:#e2e8f0;
  --primary:#1f7a5a;
  --primary2:#116d4e;
  --shadow: 0 8px 30px rgba(15,23,42,.08);
  --radius: 18px;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background: linear-gradient(180deg, #fff, var(--bg));
}

.header{
  padding: 18px 18px 0;
  max-width: 1200px;
  margin: 0 auto;
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

.brand{
  display:flex;
  gap:14px;
  align-items:center;
}

.logo{
  width:56px;
  height:56px;
  object-fit:contain;
  border-radius: 16px;
  background:#fff;
  border:1px solid var(--ring);
  box-shadow: var(--shadow);
  padding:6px;
}

.title-row{ display:flex; gap:10px; align-items:center; }
h1{ margin:0; font-size:20px; }
.subtitle{ margin:2px 0 0; color:var(--muted); font-size:13px; }

.badge{
  font-size:12px;
  padding:4px 10px;
  border-radius: 999px;
  background:#eef2ff;
  border:1px solid #e0e7ff;
  color:#334155;
}

.who{
  display:flex;
  gap:10px;
  align-items:end;
  flex-wrap:wrap;
}

.label{
  font-size:12px;
  color:var(--muted);
  display:block;
}

.main{
  max-width: 1200px;
  margin: 14px auto 40px;
  padding: 0 18px;
  display:grid;
  grid-template-columns: 1fr 1.05fr;
  gap:16px;
}
@media (max-width: 980px){
  .main{ grid-template-columns: 1fr; }
}

.panel{
  background:var(--card);
  border:1px solid var(--ring);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
}

h2{
  margin: 0;
  font-size: 16px;
}
.hint{
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.row{
  display:flex;
  gap:10px;
  align-items:center;
}

.input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--ring);
  font-size: 14px;
  outline: none;
}
.input:focus{
  border-color: #b6d7cc;
  box-shadow: 0 0 0 4px rgba(31,122,90,.12);
}

.btn{
  border: 1px solid var(--ring);
  background:#fff;
  border-radius: 14px;
  padding: 11px 12px;
  font-weight: 600;
  cursor:pointer;
  transition: transform .02s ease, box-shadow .2s ease, background .2s ease;
  white-space:nowrap;
}
.btn:hover{ box-shadow: 0 8px 22px rgba(2,6,23,.07); }
.btn:active{ transform: translateY(1px); }

.btn.primary{
  background: var(--primary);
  border-color: transparent;
  color:#fff;
}
.btn.primary:hover{ background: var(--primary2); }

.btn.wide{ flex:1; }

.mt{ margin-top: 14px; }

.status{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
}

.divider{
  height:1px;
  background: var(--ring);
  margin: 14px 0;
}

.chat{
  height: 220px;
  overflow:auto;
  border:1px solid var(--ring);
  border-radius: 14px;
  padding:10px;
  background: #fbfdff;
}
.msg{
  margin: 8px 0;
  display:flex;
  gap:8px;
}
.bubble{
  max-width: 88%;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--ring);
  background:#fff;
  font-size: 14px;
  line-height: 1.35;
}
.me .bubble{ background:#f1f5f9; }
.bot .bubble{ background:#ecfdf5; border-color:#b6d7cc; }

.tiny{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
  margin-top: 10px;
}
@media (max-width: 980px){
  .cards{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .cards{ grid-template-columns: 1fr; }
}

.card{
  border-radius: 18px;
  border:1px solid var(--ring);
  overflow:hidden;
  background:#fff;
  box-shadow: 0 8px 22px rgba(2,6,23,.06);
  cursor:pointer;
  transition: transform .08s ease, box-shadow .2s ease;
}
.card:hover{ transform: translateY(-1px); box-shadow: 0 14px 35px rgba(2,6,23,.12); }
.card.selected{ outline: 3px solid rgba(22,163,74,.55); }

.card img{
  width:100%;
  height: 150px;
  object-fit:cover;
  display:block;
}
.card .cbody{
  padding: 10px 12px 12px;
}
.card .ctitle{
  font-weight:800;
  font-size: 14px;
  margin:0;
}
.card .cmeta{
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.card.recommended{
  outline: 2px solid rgba(255, 193, 7, 0.35);
}
.card.recommended.selected{
  /* Wenn eine Empfehlung ausgewählt wurde, soll sie eindeutig grün hervorgehoben werden */
  outline: 3px solid rgba(22,163,74,.65);
}
.card.recommended .ctitle{
  letter-spacing: 0.1px;
}
.card .creason{
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}
.tags{
  margin-top: 8px;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.tag{
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background:#f1f5f9;
  border:1px solid var(--ring);
  color:#334155;
}

.selected{
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.footnote{
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--ring);
}


/* Pager + recipe */
.suggestions-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.pager-wrap{
  display:flex;
  gap:10px;
  align-items:center;
}
.pager{
  font-size:12px;
  color: var(--muted);
}

.recipe{
  border:1px solid var(--ring);
  border-radius: 16px;
  padding: 12px;
  background: #fbfdff;
}
.recipe-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  flex-wrap:wrap;
}
.recipe-title{
  margin:0;
  font-size: 16px;
  font-weight: 900;
}
.recipe-meta{
  margin-top: 6px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.recipe-media{
  display:flex;
  justify-content:center;

  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--ring);
}
.recipe-img{
  width: 100%;
  max-width: 360px;
  height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}
@media (max-width: 560px){
  .recipe-img{ height: 200px; }
}

.pill{
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background:#eef2ff;
  border:1px solid #e0e7ff;
  color:#334155;
}
.recipe-cols{
  display:grid;
  grid-template-columns: 1fr 1.2fr;
  gap:12px;
  margin-top: 10px;
}
@media (max-width: 980px){
  .recipe-cols{ grid-template-columns: 1fr; }
}
.recipe-col h4{
  margin: 0 0 8px;
  font-size: 13px;
}
.list{
  margin: 0;
  padding-left: 18px;
  color: #334155;
  font-size: 13px;
  line-height: 1.4;
}
.list li{ margin: 6px 0; }

.auth{display:flex;flex-direction:column;gap:8px;min-width:340px}
.auth-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.auth-row .input{min-width:160px}

.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width: 980px){.grid2{grid-template-columns:1fr}}


/* --- Top navigation (clean, like smartfoodadvisor.com) --- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15,23,42,0.08);
}

.brandlink{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: inherit;
}

.brandname{
  font-weight: 700;
  letter-spacing: -0.02em;
}

.topnav{
  display:flex;
  gap: 16px;
  align-items:center;
}

.topnav a{
  text-decoration:none;
  font-weight: 600;
  color: rgba(15,23,42,0.72);
  padding: 8px 10px;
  border-radius: 12px;
}

.topnav a:hover{
  background: rgba(15,23,42,0.06);
  color: rgba(15,23,42,0.92);
}

.topactions{
  position: relative;
  display:flex;
  gap:10px;
  align-items:center;
}

.iconbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: white;
  cursor:pointer;
}

.iconbtn:hover{ background: rgba(15,23,42,0.03); }

.icon{ font-size: 18px; line-height: 1; }

.dropdown{
  position:absolute;
  right: 0;
  top: 52px;
  width: 260px;
  background: white;
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(15,23,42,0.10);
  padding: 10px;
  display:none;
}

.dropdown.open{ display:block; }

.dropdown-title{
  font-weight: 800;
  padding: 6px 10px;
}

.dropdown-status{
  padding: 0 10px 10px 10px;
  color: rgba(15,23,42,0.65);
  font-size: 13px;
}

.dropdown-item{
  width:100%;
  display:flex;
  justify-content:flex-start;
  padding: 10px;
  border-radius: 14px;
  border: none;
  background: transparent;
  cursor:pointer;
  font-weight: 700;
  text-decoration:none;
  color: rgba(15,23,42,0.85);
}

.dropdown-item:hover{ background: rgba(15,23,42,0.06); }

#btnMenu{ display:none; }

/* Hero */
.hero{
  padding: 28px 18px 10px 18px;
}
.hero-inner{
  max-width: 1120px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(15,23,42,0.03), transparent);
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 24px;
  padding: 20px 18px;
}
.hero h1{ margin: 0 0 6px 0; letter-spacing:-0.03em; }
.hero .sub{ margin: 0 0 14px 0; color: rgba(15,23,42,0.68); }
.hero-row{ display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; margin-top: 10px; }
.field{ min-width: 240px; flex: 1; }

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  display:none;
  align-items:center;
  justify-content:center;
  padding: 16px;
  z-index: 60;
}
.modal.open{ display:flex; }
.modal-card{
  width: min(560px, 100%);
  background: white;
  border-radius: 24px;
  border: 1px solid rgba(15,23,42,0.10);
  box-shadow: 0 30px 60px rgba(15,23,42,0.18);
  padding: 16px;
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.wide{ width:100%; }
.row{ display:flex; gap:10px; align-items:center; }
.mt{ margin-top: 10px; }

@media (max-width: 920px){
  #btnMenu{ display:inline-flex; }
  .topnav{
    display:none;
    position:absolute;
    left: 18px;
    right: 18px;
    top: 62px;
    background: white;
    border: 1px solid rgba(15,23,42,0.10);
    border-radius: 18px;
    padding: 10px;
    flex-direction:column;
    align-items:flex-start;
    box-shadow: 0 20px 40px rgba(15,23,42,0.10);
  }
  .topnav.open{ display:flex; }
  .topnav a{ width:100%; }
}


/* Legal pages + footer */
.legal{
  max-width: 1120px;
  margin: 18px auto 40px auto;
  padding: 0 18px;
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}
.legal-card{
  background: white;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 24px;
  padding: 18px;
}
.legal-card h1{ margin-top:0; letter-spacing:-0.03em; }
.legal-card h2{ margin-top: 18px; }
.legal-card h3{ margin-top: 14px; }
.legal-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.box{
  background: rgba(15,23,42,0.03);
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 18px;
  padding: 14px;
}
.legal-hero{
  background: linear-gradient(180deg, rgba(15,23,42,0.03), transparent);
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 24px;
  padding: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.legal-img{
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.08);
  background: white;
}
.sitefooter{
  margin-top: 30px;
  border-top: 1px solid rgba(15,23,42,0.08);
  background: rgba(15,23,42,0.02);
}
.footer-inner{
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 18px;
  display:flex;
  gap: 22px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
}
.footer-brand{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  min-width: 280px;
}
.footer-title{ font-weight: 900; }
.footer-sub{ color: rgba(15,23,42,0.68); font-size: 14px; margin-top: 2px; }
.footer-links{ display:flex; gap: 10px; flex-wrap:wrap; margin-top: 10px; }
.footer-links a{ text-decoration:none; font-weight:700; color: rgba(15,23,42,0.72); }
.footer-links a:hover{ text-decoration:underline; }
.footer-cols{
  display:flex;
  gap: 26px;
  flex-wrap:wrap;
}
.col{ display:flex; flex-direction:column; gap: 8px; min-width: 200px; }
.col-title{ font-weight: 900; }
.col a{ text-decoration:none; color: rgba(15,23,42,0.72); font-weight:600; }
.col a:hover{ text-decoration:underline; }
.newsletter{ display:flex; gap: 10px; align-items:center; margin-top: 8px; flex-wrap:wrap; }
.footer-bottom{
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px 18px 18px;
  color: rgba(15,23,42,0.55);
  font-size: 13px;
}
@media (max-width: 980px){
  .legal{ grid-template-columns: 1fr; }
  .legal-grid{ grid-template-columns: 1fr; }
}



/* Empfehlung (AI) – Stern unten */
.cfooter{
  margin-top: 10px;
  display:flex;
  align-items:center;
  gap:8px;
}
.ai-recommendation{
  display:flex;
  align-items:center;
  gap:6px;
  font-weight: 800;
  font-size: 12px;
  color: #f5c400; /* gelb */
  letter-spacing: 0.2px;
}
.ai-recommendation .ai-star{
  font-size: 14px;
  line-height: 1;
}


/* Thinking clock (loading indicator) */
.thinking{ display:flex; align-items:center; }
.thinking-clock{
  width: 22px;
  height: 22px;
  border: 2px solid var(--ring);
  border-radius: 999px;
  position: relative;
  flex: 0 0 auto;
  opacity: .9;
}
.thinking-clock::after{
  content:"";
  position:absolute;
  inset: 3px;
  border: 1px dashed rgba(2,6,23,.15);
  border-radius: 999px;
}
.thinking-clock .hand{
  position:absolute;
  left:50%;
  top:50%;
  transform-origin: 0% 50%;
  background: rgba(2,6,23,.55);
  height: 2px;
  border-radius: 2px;
}
.thinking-clock .hand.hour{ width: 6px; transform: translateY(-1px) rotate(0deg); animation: sfClockHour 6s linear infinite; }
.thinking-clock .hand.minute{ width: 8px; transform: translateY(-1px) rotate(0deg); animation: sfClockMinute 2s linear infinite; }
.thinking-clock .hand.second{ width: 9px; transform: translateY(-1px) rotate(0deg); background: rgba(2,6,23,.35); animation: sfClockSecond .9s linear infinite; }

@keyframes sfClockSecond{ from{ transform: translateY(-1px) rotate(0deg);} to{ transform: translateY(-1px) rotate(360deg);} }
@keyframes sfClockMinute{ from{ transform: translateY(-1px) rotate(0deg);} to{ transform: translateY(-1px) rotate(360deg);} }
@keyframes sfClockHour{ from{ transform: translateY(-1px) rotate(0deg);} to{ transform: translateY(-1px) rotate(360deg);} }


/* Recipe image loader */
.recipe-media{position:relative}
#recipeImageLoading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(255,255,255,.6);backdrop-filter:saturate(1.2) blur(2px);border-radius:14px;z-index:2}
#recipeImageLoading.hidden{display:none}
#recipeImageLoading .hourglass{width:32px;height:32px;border:4px solid rgba(0,0,0,.15);border-top:4px solid #388e3c;border-radius:50%;animation:sfSpin .9s linear infinite}
#recipeImageLoading .loading-text{margin-top:6px;font-size:13px;color:rgba(0,0,0,.6)}
@keyframes sfSpin{from{transform:rotate(0)}to{transform:rotate(360deg)}}
.recipe-img.sf-dim{filter:saturate(.9);opacity:.75}


/* --- Vorräte (pantry.html) --- */
.page{ max-width: 1100px; margin: 22px auto; padding: 0 14px; }
.card{ background:var(--card); border:1px solid var(--ring); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card.inner{ padding: 14px; border-radius: 16px; box-shadow:none; background:#fbfcff; }
.card-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom: 10px; }
.h1{ margin:0; font-size: 24px; letter-spacing:-.02em; }
.h2{ margin:0; font-size: 16px; letter-spacing:-.01em; }
.muted{ color: var(--muted); }
.small{ font-size: 12px; }
.hint{ margin-top:8px; color: var(--muted); font-size: 12px; }

.pantry-toolbar{ display:flex; gap:14px; flex-wrap:wrap; margin: 12px 0 18px; }
.pantry-add{ flex: 1 1 520px; }
.pantry-search{ width: 260px; }
.row{ display:flex; gap:10px; align-items:center; }
.label{ display:block; font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.input{ width:100%; }

.pantry-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 980px){
  .pantry-grid{ grid-template-columns: 1fr; }
  .pantry-search{ width:100%; }
}

.inner-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom: 10px; }

.pantry-list{ display:flex; flex-direction:column; gap: 10px; }
.pantry-row{
  display:grid;
  grid-template-columns: 1fr 220px 160px;
  gap: 10px;
  align-items:center;
  padding: 10px 10px;
  border: 1px solid var(--ring);
  border-radius: 14px;
  background: #fff;
}
@media (max-width: 780px){
  .pantry-row{ grid-template-columns: 1fr; }
}
.pantry-name{ font-weight: 700; }
.pantry-qty{ display:flex; gap: 8px; align-items:center; }
.pantry-qty input.qty{ width: 110px; }
.pantry-qty input.unit{ width: 90px; text-transform: none; }
.pantry-actions{ display:flex; gap: 8px; justify-content:flex-end; }

.btn.small{ padding: 8px 10px; font-size: 12px; border-radius: 12px; }
.btn.danger{ background:#b42318; border-color:#b42318; color:#fff; }
.btn.danger:hover{ filter: brightness(.95); }

.empty{
  padding: 12px;
  border: 1px dashed var(--ring);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(100,116,139,.04);
}

.allitems{ display:flex; flex-direction:column; gap: 12px; }
.cat{ border: 1px solid var(--ring); border-radius: 14px; background:#fff; overflow:hidden; }
.cat-title{ font-weight: 800; padding: 10px 12px; background: rgba(31,122,90,.07); }
.cat-items{ display:flex; flex-direction:column; }
.item{
  display:flex; align-items:center; justify-content:space-between;
  padding: 10px 12px;
  border-top: 1px solid var(--ring);
  gap: 10px;
}
.item:first-child{ border-top: none; }
.item-name{ font-weight: 700; }
.item-meta{ font-size: 12px; color: var(--muted); margin-top: 2px; }
.item-right{ display:flex; align-items:center; gap: 10px; }

.pill{
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--ring);
  background: #f8fafc;
  color: var(--muted);
}
.pill.ok{
  background: rgba(31,122,90,.10);
  border-color: rgba(31,122,90,.25);
  color: var(--text);
}

/* Vorräte – Kategorie-Kacheln */
.cat-overview{ margin: 6px 0 16px; }
.cat-overview-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin: 6px 0 10px; }
.cat-cards{ display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 980px){ .cat-cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cat-card{
  display:flex; gap: 12px; align-items:center;
  padding: 12px;
  border: 1px solid var(--ring);
  border-radius: 16px;
  background:#fff;
  box-shadow: none;
  cursor:pointer;
  text-align:left;
  transition: transform .08s ease, border-color .08s ease;
}
.cat-card:hover{ transform: translateY(-1px); border-color: rgba(31,122,90,.35); }
.cat-card-emoji{ font-size: 22px; width: 34px; height: 34px; display:flex; align-items:center; justify-content:center; border-radius: 12px; background: rgba(31,122,90,.08); }
.cat-card-title{ font-weight: 800; }
.cat-card-sub{ font-size: 12px; color: var(--muted); margin-top:2px; }

/* Kategorie Detail */
.cat-detail.hidden{ display:none; }
.cat-detail{ margin: 4px 0 16px; border: 1px solid var(--ring); border-radius: 18px; background:#fff; padding: 12px; }
.cat-detail-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom: 10px; }
.cat-detail-title{ display:flex; align-items:center; gap:10px; }
.cat-emoji{ font-size: 22px; width: 34px; height: 34px; display:flex; align-items:center; justify-content:center; border-radius: 12px; background: rgba(31,122,90,.08); }
.cat-items-grid{ display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 980px){ .cat-items-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px){ .cat-items-grid{ grid-template-columns: 1fr; } }

.food-card{
  border: 1px solid var(--ring);
  border-radius: 16px;
  background: #fbfcff;
  padding: 12px;
  display:flex;
  gap: 12px;
  align-items:flex-start;
}
.food-icon{ font-size: 20px; width: 34px; height: 34px; display:flex; align-items:center; justify-content:center; border-radius: 12px; background:#fff; border: 1px solid var(--ring); }
.food-main{ flex: 1 1 auto; min-width: 0; }
.food-name{ font-weight: 800; line-height: 1.15; }
.food-meta{ display:flex; flex-wrap:wrap; gap: 8px; margin-top: 8px; }
.food-actions{ display:flex; align-items:center; justify-content:flex-end; }

.chip{
  display:inline-flex; align-items:center; gap: 6px;
  border: 1px solid var(--ring);
  border-radius: 999px;
  padding: 4px 10px;
  background:#fff;
  font-size: 12px;
  color: var(--muted);
}
.chip.ok{ background: rgba(31,122,90,.10); border-color: rgba(31,122,90,.25); color: var(--text); }
.chip.unit{ cursor:pointer; }

/* Modal */
body.modal-open{ overflow:hidden; }
.modal.hidden{ display:none; }
.modal{ position:fixed; inset:0; z-index: 50; }
.modal-backdrop{ position:absolute; inset:0; background: rgba(15,23,42,.42); }
.modal-card{
  position:relative;
  width:min(520px, calc(100% - 24px));
  margin: 10vh auto 0;
  background:#fff;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: 0 30px 70px rgba(0,0,0,.25);
  overflow:hidden;
}
.modal-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding: 14px 14px 10px; border-bottom: 1px solid var(--ring); }
.modal-title{ font-weight: 900; }
.modal-body{ padding: 14px; display:flex; flex-direction:column; gap: 12px; }
.modal-actions{ padding: 12px 14px 14px; display:flex; justify-content:flex-end; gap: 10px; border-top: 1px solid var(--ring); }
.field .hint{ margin-top: 6px; }
.stepper{ display:flex; gap:10px; align-items:center; }
.stepper input{ flex:1 1 auto; }

/* Hide full list when category detail open (mobile/cleaner) */
#allListCard.hidden{ display:none; }

.cat-title-emoji{ margin-right: 6px; }


/* --- Recipe helper boxes (shopping list + pantry ideas) --- */
.subbox{
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.6);
}
.subbox .muted{ opacity: .75; }

/* Pantry ideas formatting */
.ideas-list{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-top: 6px;
}
.idea-item{
  padding: 10px 10px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.75);
}
.idea-title{
  font-weight: 800;
  margin-bottom: 4px;
}
.idea-body{
  opacity: .9;
  line-height: 1.35;
}


/* --- Fixed footer (global) --- */
body{ padding-bottom: 58px; } /* room for fixed footer */
#fixedFooter{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #f3f4f6;
  border-top: 1px solid rgba(15,23,42,0.10);
  padding: 10px 12px;
  z-index: 999;
}
#fixedFooter .footer-links{
  display:flex;
  gap:18px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
}
#fixedFooter .footer-links a{
  text-decoration:none;
  font-weight:700;
  color: rgba(15,23,42,0.72);
}
#fixedFooter .footer-links a:hover{ text-decoration:underline; }


/* --- Preise (prices.html) --- */
.page-prices .price-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom: 10px;
}
.page-prices .price-title{ margin:0; font-size: 24px; letter-spacing:-.02em; }
.page-prices .price-sub{ margin-top:6px; color: var(--muted); font-size: 13px; }

.page-prices .price-grid{
  display:grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap:14px;
  margin-top: 14px;
}
@media (max-width: 980px){
  .page-prices .price-grid{ grid-template-columns: 1fr; }
}

/* Chat (Preis-Agent) */
.page-prices .chatbox{ height: 240px; overflow:auto; border:1px solid var(--ring); border-radius: 14px; padding:10px; background:#fbfdff; }
.page-prices .msg.user .bubble{ background:#f1f5f9; }
.page-prices .msg.bot .bubble{ background:#ecfdf5; border-color:#b6d7cc; }
.page-prices .sourceLink{ display:inline-flex; align-items:center; gap:6px; }
.page-prices .srcFavicon{ width:14px; height:14px; border-radius:4px; flex:0 0 auto; }

.page-prices .composer{ display:flex; gap:10px; align-items:center; margin-top:10px; flex-wrap:wrap; }
.page-prices .composer .input{ flex: 1 1 320px; }
.page-prices .toggle{ display:flex; align-items:center; gap:8px; font-weight:800; color:#334155; user-select:none; }
.page-prices .toggle input{ accent-color: #22c55e; }

/* Market chips */
.page-prices .marketsWrap{ display:flex; flex-wrap:wrap; gap:10px; padding: 10px 0 0; }
.page-prices .marketChip{ position:relative; display:inline-flex; align-items:center; }
.page-prices .marketChip input{ position:absolute; opacity:0; pointer-events:none; }
.page-prices .marketChip span{
  display:inline-flex; align-items:center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--ring);
  background:#f8fafc;
  font-weight:800;
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.page-prices .marketChip span:hover{ box-shadow: 0 8px 22px rgba(2,6,23,.07); }
.page-prices .marketChip span:active{ transform: translateY(1px); }
.page-prices .marketChip[data-checked="true"] span{
  background: rgba(31,122,90,.10);
  border-color: rgba(31,122,90,.35);
  color: rgba(15,23,42,.85);
}
.page-prices .marketChip[data-checked="true"] span::before{
  content:"✓";
  display:inline-block;
  font-weight:900;
  margin-right:8px;
}

/* Categories list (right) */
.page-prices #priceCats{ display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.page-prices #priceCats .cat{
  display:flex;
  gap:12px;
  align-items:center;
  padding: 12px;
  border: 1px solid var(--ring);
  border-radius: 16px;
  background:#fff;
  cursor:pointer;
  text-align:left;
}
.page-prices #priceCats .cat:hover{ box-shadow: 0 8px 22px rgba(2,6,23,.07); }
.page-prices #priceCats .cat.active{ outline: 3px solid rgba(31,122,90,.35); }
.page-prices #priceCats .catIcon{
  font-size:22px;
  width:34px; height:34px;
  display:flex; align-items:center; justify-content:center;
  border-radius: 12px;
  background: rgba(31,122,90,.08);
}
.page-prices #priceCats .catName{ font-weight: 900; }
.page-prices #priceCats .catHint{ font-size:12px; color: var(--muted); margin-top:2px; }
.page-prices #priceCats .catMeta{ font-size:12px; color: var(--muted); margin-top:4px; }

/* Items list (left) */
.page-prices #priceItems{ display:grid; grid-template-columns: 1fr; gap:10px; margin-top:10px; }
.page-prices .itemClickable{ cursor:pointer; }
.page-prices .item{
  border: 1px solid var(--ring);
  border-radius: 16px;
  padding: 12px;
  background:#fff;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}
.page-prices .item:hover{ box-shadow: 0 8px 22px rgba(2,6,23,.07); transform: translateY(-1px); transition:.15s ease; }
.page-prices .itemLeft{ display:flex; gap:12px; align-items:center; min-width:0; flex: 1 1 360px; }
.page-prices .itemEmoji{
  width:40px;height:40px;
  border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(31,122,90,.08);
  border: 1px solid rgba(31,122,90,.18);
  font-size:20px;
}
.page-prices .itemName{ font-weight:900; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width: 460px; }
.page-prices .itemNote{ font-size:12px; color: var(--muted); margin-top:2px; }
.page-prices .mhd{
  font-size:12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--ring);
  background: #f8fafc;
  color: var(--muted);
}
.page-prices .qtyDisplay{ font-weight:900; }
.page-prices .qtyDisplay small{ color: var(--muted); font-weight:700; }

/* Accordion details + table */
.page-prices .itemDetails{
  margin-top:10px;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 16px;
  padding: 12px;
  background:#fff;
  display:none;
}
.page-prices .itemDetails.open{ display:block; }
.page-prices .detailsTop{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.page-prices .detailsTitle{ font-weight:900; }
.page-prices .miniBtn{
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 800;
  cursor:pointer;
}
.page-prices .miniBtn:hover{ background: rgba(2,6,23,.03); }
.page-prices .spinner{
  width:16px;height:16px;
  border-radius:50%;
  border:2px solid rgba(15,23,42,.15);
  border-top-color: rgba(15,23,42,.55);
  animation: sfSpin 1s linear infinite;
  display:inline-block;
}
@keyframes sfSpin{ to{ transform: rotate(360deg);} }

.page-prices .priceTable{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
}
.page-prices .priceTable th,
.page-prices .priceTable td{ padding:10px; text-align:left; vertical-align:top; font-size: 14px; }
.page-prices .priceTable thead th{
  background: rgba(15,23,42,.04);
  font-weight: 900;
  border-bottom: 1px solid rgba(15,23,42,.10);
}
.page-prices .priceTable tbody tr + tr td{ border-top: 1px solid rgba(15,23,42,.08); }
.page-prices .priceTable tbody tr:nth-child(even) td{ background: rgba(2,6,23,.015); }
.page-prices .priceTable tbody tr.bestRow td{ background: rgba(31,122,90,.10); }
.page-prices .pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-weight:900;
  font-size:12px;
  border:1px solid rgba(15,23,42,.12);
  background: rgba(2,6,23,.03);
}
.page-prices .pill.ok{ background: rgba(31,122,90,.10); border-color: rgba(31,122,90,.25); }
.page-prices .pill.warn{ background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.28); }
.page-prices .muted{ color: var(--muted); }
.page-prices .pMain{ font-weight: 900; }
.page-prices .pSub{ color: var(--muted); font-size: 12px; margin-top:2px; }


/* =========================================================
   Pantry layout hardening (keeps legacy look, prevents "too far outside")
   ========================================================= */
.page-pantry .container{
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 18px 120px 18px !important; /* space for fixed footer */
}
.page-pantry .pageContent{
  width: 100% !important;
}
.page-pantry .pageTitle,
.page-pantry .pageSub{
  padding-left: 2px !important;
}

/* Ensure panels are centered and not stretching edge-to-edge */
.page-pantry .panel{
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Chat composer: input + send visible */
.page-pantry .chatComposer{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  width:100% !important;
}
.page-pantry .chatComposer .chatInput{
  flex: 1 1 auto !important;
  min-width: 240px !important;
}
.page-pantry #chatSend{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding: 10px 16px !important;
  border-radius: 14px !important;
  white-space: nowrap !important;
}
.page-pantry #chatMic{
  display:inline-flex !important;
}

/* Bottom controls row (search + add + refresh) */
.page-pantry .controls{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:14px !important;
  flex-wrap:wrap !important;
}
.page-pantry .leftControls,
.page-pantry .rightControls{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
}
.page-pantry .leftControls{
  flex: 1 1 420px !important;
}
.page-pantry .rightControls{
  flex: 0 0 auto !important;
  margin-left:auto !important;
}
.page-pantry .controls .input{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  padding: 10px 12px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(0,0,0,0.10) !important;
  background: rgba(255,255,255,0.95) !important;
  width: min(620px, 100%) !important;
}
.page-pantry .controls .input input#search{
  width: 100% !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 16px !important;
}

/* Make sure buttons are not collapsed */
.page-pantry #addBtn,
.page-pantry #refreshBtn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding: 10px 14px !important;
  border-radius: 16px !important;
  white-space: nowrap !important;
}
.page-pantry #addBtn{
  min-width: 240px !important;
}
@media (max-width: 560px){
  .page-pantry #addBtn{ min-width: 0 !important; width: 100% !important; }
  .page-pantry #refreshBtn{ width: 100% !important; }
}

/* Footer centered */
#fixedFooter .footerInner{
  justify-content: center !important;
}


.page-pantry #addBtn{font-size:16px !important; overflow:visible !important;}
.page-pantry #refreshBtn{font-size:16px !important;}

/* =========================================================
   Pantry final polish: center chat card + ensure controls visible
   ========================================================= */
.page-pantry .chatFull.chatPanel{
  max-width: 1100px;
  margin-left: auto !important;
  margin-right: auto !important;
}
.page-pantry .chatComposer{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:nowrap !important;
}
.page-pantry .chatComposer .chatInput{
  flex: 1 1 auto !important;
  min-width: 220px !important;
}
.page-pantry #chatSend{
  flex: 0 0 auto !important;
  min-width: 110px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  white-space:nowrap !important;
}
.page-pantry .controls{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  flex-wrap:wrap !important;
}
.page-pantry .controls .input{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  min-width: 340px !important;
  flex: 1 1 420px !important;
}
.page-pantry .controls #search{
  width: 100% !important;
  min-width: 240px !important;
}
.page-pantry .controls .rightControls{
  display:flex !important;
  align-items:center !important;
  gap:12px !important;
  flex: 0 0 auto !important;
}
.page-pantry #addBtn,
.page-pantry #refreshBtn{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  white-space:nowrap !important;
}



/* =========================================================
   Pantry layout fixes (centered chat + visible controls/buttons)
   ========================================================= */

/* Keep pantry content centered like the two-column cards */
.page-pantry .chatPanel,
.page-pantry .controls{
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* Give chat panel the same "card" look */
.page-pantry .chatPanel{
  border-radius: 22px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06) !important;
  overflow: hidden;
}

/* Controls bar should look like a card and never collapse */
.page-pantry .controls{
  border-radius: 18px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Search input: prevent weird shrinking */
.page-pantry .controls .leftControls{
  flex: 1 1 420px;
  min-width: 280px;
}
.page-pantry .controls .input{
  width: 100%;
}

/* Right buttons: keep full text visible */
.page-pantry .controls .rightControls{
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.page-pantry .controls .rightControls .btn{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  white-space: nowrap !important;
  min-width: 210px;
  padding: 12px 16px !important;
  height: 44px;
  border-radius: 14px !important;
}
.page-pantry .controls #refreshBtn{
  min-width: 170px;
}

/* Chat composer: keep send button visible */
.page-pantry .chatComposer{
  display: flex !important;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.page-pantry .chatComposer input{
  flex: 1 1 auto;
  min-width: 240px;
}
.page-pantry .chatComposer #chatSend{
  flex: 0 0 auto;
  min-width: 140px;
  white-space: nowrap;
}

/* If screen is narrow, allow buttons to wrap but keep readable */
@media (max-width: 700px){
  .page-pantry .controls .rightControls .btn{
    min-width: 160px;
  }
  .page-pantry .chatComposer{
    flex-wrap: wrap;
  }
  .page-pantry .chatComposer #chatSend{
    width: 100%;
  }
}

#userMenu a:visited{ text-decoration:none; }



/* =========================================================
   PANTRY VISIBILITY FIX (generated)
   Ensures Add/Refresh/Send buttons are always visible even
   if earlier CSS is corrupted.
   ========================================================= */
.page-pantry .controls{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:12px !important;
  align-items:center !important;
  justify-content:space-between !important;
  width:100% !important;
  margin-top:12px !important;
}
.page-pantry .leftControls{display:flex !important; flex:1 1 320px !important; min-width:260px !important;}
.page-pantry .rightControls{display:flex !important; flex:0 0 auto !important; gap:10px !important; flex-wrap:wrap !important; justify-content:flex-end !important; align-items:center !important;}

.page-pantry .chatComposer{
  display:flex !important;
  gap:10px !important;
  align-items:center !important;
  width:100% !important;
}
.page-pantry .chatComposer .chatInput,
.page-pantry #chatInput{
  flex:1 1 auto !important;
  min-width:120px !important;
}
.page-pantry #chatMic,
.page-pantry #chatSend,
.page-pantry #addBtn,
.page-pantry #refreshBtn{
  display:inline-flex !important;
  visibility:visible !important;
  opacity:1 !important;
  pointer-events:auto !important;
  align-items:center !important;
  justify-content:center !important;
}

.page-pantry .btn,
.page-pantry button.btn{
  padding:10px 14px !important;
  border-radius:999px !important;
  border:1px solid rgba(15,23,42,.18) !important;
  background:#fff !important;
  color:#0f172a !important;
  font-weight:600 !important;
  line-height:1 !important;
  white-space:nowrap !important;
}
.page-pantry .btnPrimary{
  background:var(--accent, #2563eb) !important;
  color:#fff !important;
  border-color:rgba(37,99,235,.45) !important;
}
@media (max-width: 520px){
  .page-pantry #addBtn{padding:10px 12px !important;}
  .page-pantry #refreshBtn{padding:10px 12px !important;}
  .page-pantry #chatSend{padding:10px 12px !important;}
  .page-pantry #addBtn{font-size:0 !important;}
  .page-pantry #addBtn::before{content:"➕" !important; font-size:16px !important;}
  .page-pantry #refreshBtn{font-size:0 !important;}
  .page-pantry #refreshBtn::before{content:"⟳" !important; font-size:16px !important;}
  .page-pantry #chatSend{font-size:0 !important;}
  .page-pantry #chatSend::before{content:"➤" !important; font-size:16px !important;}
}


/* =========================================================
   PANTRY UI polish (buttons green, wider layout, rounded)
   ========================================================= */
.page-pantry #chatSend,
.page-pantry #addBtn{
  background: var(--primary) !important;
  color: #fff !important;
  border: 1px solid rgba(0,0,0,.06) !important;
}
.page-pantry #chatSend:hover,
.page-pantry #addBtn:hover{
  background: var(--primary2) !important;
}

.page-pantry .container{
  max-width: 1400px !important;
}

.page-pantry .grid{
  gap: 16px !important;
}

.page-pantry .panel{
  grid-column: span 9 !important;
  border-radius: 22px !important;
  padding: 16px !important;
}

.page-pantry .sidebar{
  grid-column: span 3 !important;
  border-radius: 22px !important;
  padding: 16px !important;
}

@media (max-width: 980px){
  .page-pantry .panel{ grid-column: span 12 !important; }
  .page-pantry .sidebar{ grid-column: span 12 !important; }
}

.page-pantry .card{
  border-radius: 22px !important;
}

.page-pantry .catCard{
  border-radius: 18px !important;
}

.page-pantry .catCard.isActive{
  border: 2px solid var(--primary) !important;
  background: rgba(31,122,90,.10) !important;
}

.page-pantry .catCard.isActive .catIcon{
  border-color: rgba(31,122,90,.35) !important;
  background: linear-gradient(135deg, rgba(31,122,90,.22), rgba(31,122,90,.10)) !important;
}




/* === PANTRY HOTFIX: MODALS + SIDEBAR WIDTH PRESERVE === */
/* 1) Ensure category sidebar stays wide (like before) */
.page-pantry .sidebar{
  flex: 0 0 420px !important;
  min-width: 360px !important;
  max-width: 560px !important;
}

/* 2) Keep items + categories side-by-side (no stacking) */
.page-pantry .content-grid,
.page-pantry .pantry-layout,
.page-pantry .pantry-main,
.page-pantry .pantry-columns{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  align-items:flex-start !important;
  gap:24px !important;
  width:100% !important;
  max-width:none !important;
  overflow-x:auto !important;
  -webkit-overflow-scrolling:touch;
}

/* 3) MODAL FIX:
   There is a global .modal rule (used as overlay elsewhere) that sets display:none.
   Pantry uses .modal as the dialog box, so we must force it visible when overlay is shown. */
.page-pantry .modalOverlay{
  /* JS toggles style.display = "flex" */
  display:none;
}

.page-pantry .modal{
  display:block !important;
  position:relative !important;
  background:white !important;
}

.page-pantry .modalOverlay[aria-hidden="false"]{
  display:flex !important;
}

/* Make sure dialog is above overlay background */
.page-pantry .modalOverlay{
  z-index: 9999 !important;
}
.page-pantry .modal{
  z-index: 10000 !important;
}

/* Prevent giant grey screen with no dialog on small screens */
.page-pantry .modal{
  max-height: calc(100vh - 48px) !important;
  overflow:auto !important;
}
/* Spezifische Styles für About/Index-Seite */
.page-about { padding-bottom: 72px; }

.pagewrap { 
  max-width: 980px; 
  margin: 0 auto; 
  padding: 28px 18px 24px; 
}

.block {
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  background: #f2faf7;
  border: 1px solid rgba(46,125,107,.22);
}

.about-video-wrap { 
  padding: 0; 
  margin: 0; 
  overflow: hidden; 
  border-radius: 18px; 
  background: #000; 
}

.about-video { 
  width: 100%; 
  height: auto; 
  display: block; 
  border-radius: 18px; 
}

/* Chips/Badges für die About-Seite */
.about-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.chip { 
  display: inline-block; 
  background: #e8f5e9; 
  padding: 4px 12px; 
  border-radius: 20px; 
  font-size: 0.9rem; 
  color: var(--primary);
  border: 1px solid rgba(31,122,90,0.1);
}

/* Hilfsklassen */
[hidden] { display: none !important; }


/* --- Contact Page Styles --- */
.page-contact .contact-card {
  padding: 34px 28px;
  border-radius: 24px;
}

.page-contact h1 {
  margin: 0 0 14px;
  font-size: 2rem;
  letter-spacing: -.02em;
}

.highlight-box {
  background: #eef7f4;
  border-left: 5px solid var(--primary);
  padding: 18px 20px;
  border-radius: 16px;
  margin: 18px 0;
}

.contact-cta-box {
  margin-top: 22px;
  padding: 20px;
  border-radius: 18px;
  background: #f2faf7;
  border: 1px solid rgba(46,125,107,.25);
  text-align: center;
}

.contact-label {
  font-weight: 800;
}

.contact-mail {
  display: inline-block;
  margin-top: 10px;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--primary);
  text-decoration: none;
}

.contact-mail:hover {
  text-decoration: underline;
}

.microcopy {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: .95rem;
}

@media (max-width: 560px) {
  .page-contact .contact-card {
    padding: 24px 18px;
    border-radius: 20px;
  }
  .page-contact h1 {
    font-size: 1.7rem;
  }
}

/* --- Global Uniform Typography & Layout --- */
.legal-card h1 {
  margin: 0 0 12px;
  font-size: 2.25rem; /* Gleiche Größe wie auf index.html */
  letter-spacing: -0.03em;
  font-weight: 800;
}

.feature-head {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.main-intro {
  font-size: 1.15rem; /* Uniformer Font-Size für die Einleitung */
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 24px;
}

/* Grid-System für Uniformität */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* Spezifische Kontakt-Elemente */
.highlight-box {
  background: rgba(31, 122, 94, 0.05);
  border-left: 4px solid var(--primary);
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
  font-size: 1rem;
}

.contact-cta-box {
  padding: 24px;
  border-radius: 18px;
  background: #f2faf7;
  border: 1px solid rgba(46, 125, 107, 0.2);
  text-align: center;
}

.contact-mail {
  display: block;
  font-size: 1.35rem; /* Prominente Mail-Adresse */
  font-weight: 900;
  color: var(--primary);
  text-decoration: none;
  margin: 12px 0;
}

.contact-mail:hover { text-decoration: underline; }

.microcopy {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Professional Auth Modal UI */
.modal-card {
  max-width: 400px;
  border-radius: 24px;
  padding: 40px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  border: 1px solid rgba(0,0,0,0.05);
}

.modal-head {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.modal-head h3 {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 800;
  color: var(--text);
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 8px;
}

.auth-form-group {
  margin-bottom: 20px;
}

.auth-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.auth-form-group .input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--ring);
  transition: all 0.2s;
  font-size: 1rem;
}

.auth-form-group .input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 122, 94, 0.1);
  outline: none;
}

.auth-status-message {
  min-height: 24px;
  margin-bottom: 15px;
  font-size: 0.85rem;
  text-align: center;
  border-radius: 8px;
}

.divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--ring);
  z-index: 1;
}

.divider span {
  background: #fff;
  padding: 0 10px;
  position: relative;
  z-index: 2;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
}

.btn.wide {
  width: 100%;
  padding: 14px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.1s;
}

.btn.wide:active { transform: scale(0.98); }

.btn.outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

/* Auth Status Messages */
.auth-status-message {
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 15px;
  font-size: 0.9rem;
  display: none;
  text-align: center;
}
.auth-status-message.error { background: #fef2f2; color: #dc2626; border: 1px solid #fee2e2; }
.auth-status-message.info { background: #f0fdf4; color: #16a34a; border: 1px solid #dcfce7; }

/* Modal Open State */
.modal.open { display: flex !important; }
.dropdown.open { display: block !important; }

/* Active Page Highlight */
.topnav a[aria-current="page"], 
.dropdown-item[aria-current="page"] {
  color: var(--primary) !important;
  font-weight: 800;
  background: rgba(31, 122, 90, 0.08);
}

.dropdown {
  display: none; /* Standardmäßig versteckt */
  position: absolute;
  right: 0;
  top: 52px;
  /* ... weitere Styles ... */
}

.dropdown.open {
  display: block !important; /* Wird durch JS aktiviert */
}

/* =========================================================
   KOMPAKTES AUTH-BUBBLE DESIGN (Login/Register)
   ========================================================= */

/* Die zentrale Bubble-Karte */
.auth-bubble {
  max-width: 340px !important; /* Elegant schmaler */
  border-radius: 28px !important; /* Weichere Rundung */
  padding: 24px 28px !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15) !important;
  border: 1px solid rgba(15, 23, 42, 0.05) !important;
  background: #ffffff !important;
}

/* Titel in einer Zeile */
.compact-title {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  margin: 0 !important;
  white-space: nowrap !important; /* Verhindert Umbruch */
  color: var(--text) !important;
}

/* Kompakterer Body */
.compact-body {
  padding: 12px 0 0 0 !important;
}

/* Eingabefelder im Bubble-Look */
.auth-form-group {
  margin-bottom: 12px !important;
}

.auth-form-group .input {
  width: 100% !important;
  padding: 11px 16px !important;
  border-radius: 14px !important;
  background: #f8fafc !important; /* Ganz leichtes Grau */
  border: 1px solid var(--ring) !important;
  font-size: 0.95rem !important;
  transition: all 0.2s ease !important;
}

.auth-form-group .input:focus {
  background: #fff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(31, 122, 90, 0.1) !important;
}

/* Trenner (oder) */
.divider {
  text-align: center;
  margin: 16px 0 !important;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: var(--ring);
  z-index: 1;
}

.divider span {
  background: #fff;
  padding: 0 10px;
  position: relative;
  z-index: 2;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

/* Buttons in der Bubble */
.btn.wide {
  width: 100% !important;
  padding: 12px !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  border-radius: 14px !important;
}

/* Status-Meldungen (Fehler/Info) innerhalb der Bubble */
.auth-status-message {
  font-size: 0.85rem !important;
  padding: 8px !important;
  border-radius: 12px !important;
  margin-bottom: 12px !important;
  font-weight: 600 !important;
}

/* Sicherstellen, dass das Modal zentriert bleibt */
.modal.open {
  display: flex !important;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px); /* Eleganter Hintergrund-Blur */
}
/* Preise-Seite: gleiche Headline-Optik für Sektionen wie "Preise" */
.page-prices .big-title{
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  color: var(--text, #0b1220);
}



/* ===== Manual store selection (Filiale wählen) ===== */
.miniBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.12);
  background:#fff;
  font-weight:600;
  font-size:13px;
  cursor:pointer;
}
.miniBtn:hover{ filter:brightness(0.98); }
.miniBtn:active{ transform:translateY(1px); }

.overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.35);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
  padding:16px;
}
.overlay.hidden{ display:none; }
.overlayCard{
  width:min(640px, 100%);
  background:#fff;
  border-radius:18px;
  box-shadow:0 20px 60px rgba(0,0,0,0.22);
  overflow:hidden;
}
.overlayHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid rgba(0,0,0,0.08);
}
.overlayTitle{
  font-size:18px;
  font-weight:800;
}
.overlayClose{
  width:36px;
  height:36px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,0.10);
  background:#fff;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.overlayBody{ padding:16px 18px; }
.overlayActions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  padding:14px 18px 18px;
  border-top:1px solid rgba(0,0,0,0.08);
}


/* ===============================
   Abo – FULL Dynamic Rendering
   Master + Credits + FAQ as bubbles
   =============================== */
.page-abo .abo-wrap{
  max-width: 1120px;
  margin: 18px auto 40px auto;
  padding: 0 18px;
  display: grid;
  gap: 18px;
}

.page-abo .abo-bubble-card{
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 24px;
  box-shadow: 0 18px 44px rgba(15,23,42,0.10);
  padding: 20px 20px 18px;
}

.page-abo .abo-master{
  background: linear-gradient(180deg, rgba(31,122,90,0.10) 0%, rgba(255,255,255,0.92) 55%, rgba(255,255,255,0.80) 100%);
  overflow: hidden;
  position: relative;
}
.page-abo .abo-master::before{
  content:"";
  position:absolute;
  inset:-120px -80px auto -80px;
  height: 220px;
  background: radial-gradient(circle at 30% 50%,
    rgba(31,122,90,0.35),
    rgba(31,122,90,0.00) 65%);
  pointer-events:none;
}
.page-abo #masterPlanContent{ position: relative; z-index: 1; }

.page-abo .master-title-row{
  display:flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
}
.page-abo .master-title{
  font-size: 2.35rem;
  font-weight: 950;
  letter-spacing: -0.02em;
  margin: 0;
}
.page-abo .master-badge{
  font-weight: 800;
  color: rgba(15,23,42,0.70);
  padding: 8px 12px;
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.60);
}
.page-abo .master-intro{
  margin: 10px 0 14px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(15,23,42,0.72);
}
.page-abo .chip-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom: 14px;
}
.page-abo .chip-credits{
  font-weight: 900;
}
.page-abo .master-price-row{
  display:grid;
  gap: 6px;
  margin: 10px 0 14px;
}
.page-abo .master-price{
  font-size: 1.55rem;
  font-weight: 950;
}
.page-abo .master-sub{
  color: rgba(15,23,42,0.70);
}

/* WOW box */
.page-abo .wow-box{
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 18px;
  padding: 14px 14px 12px;
  box-shadow: 0 10px 26px rgba(15,23,42,0.06);
}
.page-abo .wow-title{ font-weight: 950; margin-bottom: 6px; }
.page-abo .wow-kpis{
  display:flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.page-abo .wow-kpi{
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 16px;
  padding: 10px 12px;
}
.page-abo .wow-kpi-label{ color: rgba(15,23,42,0.65); font-weight: 800; font-size: 0.92rem; }
.page-abo .wow-kpi-value{ font-size: 1.8rem; font-weight: 950; margin-top: 2px; }
.page-abo .wow-kpi-chip{
  display:inline-flex;
  gap: 8px;
  align-items:center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(236,253,245,0.85);
  font-weight: 900;
  margin-top: 2px;
}

/* Features grid */
.page-abo .feature-grid{
  margin-top: 16px;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.page-abo .feature-card{
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 18px;
  padding: 14px 14px 12px;
  box-shadow: 0 10px 26px rgba(15,23,42,0.06);
}
.page-abo .feature-title{ font-weight: 950; margin-bottom: 8px; }
.page-abo .feature-list{ margin: 0; padding-left: 18px; color: rgba(15,23,42,0.75); line-height: 1.5; }
.page-abo .feature-list li{ margin: 6px 0; }

/* Credits packs */
.page-abo .addons-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.page-abo .pack-card{
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 18px;
  padding: 14px 14px 12px;
  box-shadow: 0 10px 26px rgba(15,23,42,0.06);
}
.page-abo .pack-title{ font-size: 1.25rem; font-weight: 950; }
.page-abo .pack-meta{ margin-top: 8px; color: rgba(15,23,42,0.78); }
.page-abo .pack-note{ margin-top: 8px; line-height: 1.45; }
.page-abo .pack-card .btn{ margin-top: 12px; }

/* CTA row */
.page-abo .abo-cta-row{
  position: relative;
  z-index: 1;
  margin-top: 16px;
}
.page-abo .abo-note{
  margin-top: 10px;
  color: rgba(15,23,42,0.65);
  font-weight: 700;
}
.page-abo .abo-status{
  margin-top: 10px;
  font-weight: 800;
  color: rgba(15,23,42,0.75);
}

/* Highlight when redirected */
.page-abo #masterPlanBubble.highlight-glow{
  box-shadow: 0 0 0 5px rgba(31,122,90,0.22), 0 18px 44px rgba(15,23,42,0.10) !important;
}

/* =========================================================
   Pantry mobile final authoritative layout
   Only mobile pantry is changed. Everything else stays as is.
   ========================================================= */
@media (max-width: 820px){
  /* quick action row */
  .page-pantry .pantryQuickActions{
    display:flex !important;
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch !important;
    gap:8px !important;
    width:100% !important;
    white-space:nowrap !important;
    padding-bottom:2px !important;
  }
  .page-pantry .pantryQuickActions::-webkit-scrollbar{ display:none !important; }
  .page-pantry .pantryQuickBtn{ flex:0 0 auto !important; min-width:max-content !important; }

  /* top controls */
  .page-pantry .controls{
    display:grid !important;
    grid-template-columns:1fr auto !important;
    gap:10px !important;
    align-items:center !important;
    padding:12px !important;
  }
  .page-pantry .controls .leftControls{
    grid-column:1 / -1 !important;
    width:100% !important;
    min-width:0 !important;
  }
  .page-pantry .controls .leftControls > div{
    display:grid !important;
    grid-template-columns:1fr auto !important;
    gap:8px !important;
    width:100% !important;
    align-items:center !important;
  }
  .page-pantry #search{
    width:100% !important;
    min-width:0 !important;
    font-size:16px !important;
  }
  .page-pantry #receiptBtn{
    width:46px !important;
    min-width:46px !important;
    height:46px !important;
    padding:0 !important;
    justify-content:center !important;
  }
  .page-pantry .controls .rightControls{
    grid-column:1 / -1 !important;
    display:grid !important;
    grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr) !important;
    gap:8px !important;
    width:100% !important;
    min-width:0 !important;
    margin-left:0 !important;
  }
  .page-pantry #addBtn,
  .page-pantry #refreshBtn{
    width:100% !important;
    min-width:0 !important;
    height:46px !important;
    border-radius:14px !important;
    font-size:14px !important;
    padding:0 12px !important;
  }
  .page-pantry #addBtn::before,
  .page-pantry #refreshBtn::before,
  .page-pantry #addBtn::after,
  .page-pantry #refreshBtn::after{
    content:none !important;
    display:none !important;
  }

  /* composer */
  .page-pantry .chatComposer{
    display:grid !important;
    grid-template-columns:46px minmax(0,1fr) auto !important;
    gap:8px !important;
    align-items:center !important;
  }
  .page-pantry #chatMic{
    width:46px !important;
    min-width:46px !important;
    height:46px !important;
    padding:0 !important;
    justify-content:center !important;
  }
  .page-pantry #chatInput{
    width:100% !important;
    min-width:0 !important;
    height:46px !important;
    min-height:46px !important;
    padding:0 14px !important;
    font-size:16px !important;
  }
  .page-pantry #chatSend{
    min-width:94px !important;
    height:46px !important;
    padding:0 14px !important;
    border-radius:14px !important;
    white-space:nowrap !important;
  }

  /* categories rail */
  .page-pantry .grid{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
  }
  .page-pantry #catsPanel{
    order:1 !important;
    grid-column:1 / -1 !important;
    position:sticky !important;
    top:72px !important;
    z-index:20 !important;
    padding:10px !important;
    background:rgba(255,255,255,.96) !important;
    backdrop-filter:blur(8px) !important;
    -webkit-backdrop-filter:blur(8px) !important;
    border-radius:18px !important;
    width:100% !important;
    max-width:none !important;
  }
  .page-pantry #panel{
    order:2 !important;
    grid-column:1 / -1 !important;
  }
  .page-pantry #catsPanel .sidebarHeader .panelSub{ display:none !important; }
  .page-pantry #cats,
  .page-pantry .catList{
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    gap:8px !important;
    padding:2px 2px 4px !important;
    -webkit-overflow-scrolling:touch;
  }
  .page-pantry #cats::-webkit-scrollbar,
  .page-pantry .catList::-webkit-scrollbar{ display:none; }
  .page-pantry .catCard{
    flex:0 0 auto !important;
    min-width:150px !important;
    max-width:72vw !important;
    padding:10px 12px !important;
    border-radius:16px !important;
  }

  /* recipe cards */
  .page-pantry .pantryMealBlock{ gap:12px !important; }
  .page-pantry .pantryRecipeGrid{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
  }
  .page-pantry .pantryRecipeCard{
    width:100% !important;
    max-width:none !important;
    padding:14px !important;
    border-radius:20px !important;
    overflow:hidden !important;
    box-shadow:0 8px 24px rgba(15,23,42,.07) !important;
  }
  .page-pantry .pantryRecipeHead{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:8px !important;
    margin-bottom:10px !important;
  }
  .page-pantry .pantryRecipeTitle{
    font-size:18px !important;
    line-height:1.22 !important;
    word-break:break-word !important;
    overflow-wrap:anywhere !important;
  }
  .page-pantry .pantryRecipeBadge{
    align-self:flex-start !important;
    white-space:normal !important;
    padding:7px 10px !important;
  }
  .page-pantry .pantryRecipeRow{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:6px !important;
    padding:10px 11px !important;
    border-radius:15px !important;
  }
  .page-pantry .pantryRecipeRowLabel{
    width:100% !important;
    font-size:11px !important;
  }
  .page-pantry .pantryRecipeRowValue{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    font-size:15px !important;
    line-height:1.4 !important;
  }

  /* missing ingredient chips */
  .page-pantry .pantryRecipeRowValue .pantryMissingList{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:12px !important;
    width:100% !important;
    max-width:none !important;
  }

  .page-pantry .pantryRecipeRowValue .pantryMissingChip{
    display:grid !important;
    grid-template-columns:30px minmax(0,1fr) !important;
    grid-template-areas:
      "icon text"
      ". actions" !important;
    align-items:start !important;
    column-gap:12px !important;
    row-gap:10px !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    padding:12px 14px !important;
    border-radius:24px !important;
    white-space:normal !important;
    overflow:visible !important;
  }

  .page-pantry .pantryRecipeRowValue .pantryMissingChip > :first-child{
    grid-area:icon !important;
    align-self:start !important;
    justify-self:start !important;
    margin:2px 0 0 0 !important;
    flex:none !important;
  }

  .page-pantry .pantryRecipeRowValue .pantryMissingChip > .pantryMissingChipText{
    grid-area:text !important;
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    padding:0 !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
    writing-mode:horizontal-tb !important;
    text-orientation:mixed !important;
    direction:ltr !important;
    transform:none !important;
    rotate:none !important;
    text-align:left !important;
    line-height:1.28 !important;
    letter-spacing:normal !important;
    font-size:16px !important;
    font-weight:700 !important;
  }

  .page-pantry .pantryRecipeRowValue .pantryMissingChip > .pantryMissingActions{
    grid-area:actions !important;
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:10px !important;
    width:auto !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
  }

  .page-pantry .pantryRecipeRowValue .pantryMissingChip > .pantryMissingActions .offer-icon-btn,
  .page-pantry .pantryRecipeRowValue .pantryMissingChip > .pantryMissingActions button,
  .page-pantry .pantryRecipeRowValue .pantryMissingChip > .pantryMissingActions a{
    display:inline-flex !important;
    width:34px !important;
    height:34px !important;
    min-width:34px !important;
    border-radius:12px !important;
    margin:0 !important;
    flex:none !important;
  }
}

@media (max-width: 520px){
  .page-pantry .controls .rightControls{
    grid-template-columns:minmax(0,1.24fr) minmax(0,.76fr) !important;
  }
  .page-pantry #addBtn,
  .page-pantry #refreshBtn{ font-size:13px !important; }
  .page-pantry #chatSend{
    min-width:84px !important;
    padding:0 12px !important;
    font-size:14px !important;
  }
  .page-pantry .catCard{
    min-width:136px !important;
    max-width:78vw !important;
  }

  .page-pantry .pantryRecipeCard{
    padding:12px !important;
    border-radius:18px !important;
  }
  .page-pantry .pantryRecipeTitle{ font-size:17px !important; }

  .page-pantry .pantryRecipeRowValue .pantryMissingChip{
    grid-template-columns:28px minmax(0,1fr) !important;
    padding:11px 12px !important;
    border-radius:22px !important;
  }
  .page-pantry .pantryRecipeRowValue .pantryMissingChip > .pantryMissingChipText{
    font-size:15px !important;
    line-height:1.24 !important;
  }
  .page-pantry .pantryRecipeRowValue .pantryMissingChip > .pantryMissingActions .offer-icon-btn,
  .page-pantry .pantryRecipeRowValue .pantryMissingChip > .pantryMissingActions button,
  .page-pantry .pantryRecipeRowValue .pantryMissingChip > .pantryMissingActions a{
    width:32px !important;
    height:32px !important;
    min-width:32px !important;
  }
}

/* === ONLY FIX: missing item text on new line full width in mobile === */
@media (max-width: 760px){
  .page-pantry .pantryRecipeRowValue .pantryMissingChip{
    grid-template-columns: 30px minmax(0,1fr) !important;
    grid-template-areas:
      "icon ."
      "text text"
      "actions actions" !important;
    row-gap: 10px !important;
    column-gap: 12px !important;
  }

  .page-pantry .pantryRecipeRowValue .pantryMissingChip > :first-child{
    grid-area: icon !important;
    align-self: start !important;
    justify-self: start !important;
    margin: 0 !important;
  }

  .page-pantry .pantryRecipeRowValue .pantryMissingChip > .pantryMissingChipText{
    grid-area: text !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    transform: none !important;
    rotate: none !important;
    text-align: left !important;
    line-height: 1.28 !important;
  }

  .page-pantry .pantryRecipeRowValue .pantryMissingChip > .pantryMissingActions{
    grid-area: actions !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

@media (max-width: 520px){
  .page-pantry .pantryRecipeRowValue .pantryMissingChip{
    grid-template-columns: 28px minmax(0,1fr) !important;
  }

  .page-pantry .pantryRecipeRowValue .pantryMissingChip > .pantryMissingChipText{
    font-size: 15px !important;
    line-height: 1.24 !important;
  }
}
