/* Nährstoff-Katalog. Nutzt die Design-Tokens des Themes (--rot, --petrol …). */

/* Beim Ansichtswechsel springt die Seite an den Anfang des Optimizers. Ohne
   Abstand landet der genau unter der klebenden Menüleiste und die erste Zeile
   verschwindet darunter. */
.veg-nst { margin: 1.5rem 0; scroll-margin-top: 4.5rem; }

/* ---- Umschalter & Auswahl ---- */
.veg-nst-modi,
.veg-nst-wahl {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  margin-bottom: 1rem;
}
.veg-nst-modi__label { font-weight: 600; margin-right: .25rem; }

/* Die Sortiervorschläge stehen bewusst untereinander statt in einer Zeile:
   sechs Chips nebeneinander brachen je nach Wortlänge unterschiedlich um und
   sahen jedes Mal anders aus. Zwei feste Spalten stehen ruhig. */
.veg-nst-sort { margin-bottom: 1rem; }
.veg-nst-sort__kopf { margin-bottom: .5rem; }
.veg-nst-sort__raster {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem; max-width: 24rem;
}
/* Kompakter als die Umschalter darüber: Das hier sind Vorschläge, keine
   Hauptnavigation — sie sollen zur Hand sein, ohne den Blick auf die
   Lebensmittel zu verstellen. */
.veg-nst-sort__raster .veg-nst-sort__knopf {
  text-align: center;
  font-size: .85rem;
  padding: .25rem .5rem;
  border-width: 1px;
}
.veg-nst-sort__alle { margin-top: .35rem; max-width: 24rem; }
.veg-nst-sort__alle .veg-nst-filter { font-size: .85rem; padding: .25rem .5rem; }
.veg-nst-sort__alle .veg-nst-filter { width: 100%; }
@media (max-width: 26rem) {
  .veg-nst-sort__raster { grid-template-columns: minmax(0, 1fr); }
}
.veg-nst-modi__knopf,
.veg-nst-sort__knopf {
  font: inherit; cursor: pointer;
  padding: .4rem .9rem;
  color: var(--rot); background: var(--papier);
  border: 2px solid var(--rot); border-radius: 999px;
  line-height: 1.2;
}
.veg-nst-modi__knopf:hover,
.veg-nst-sort__knopf:hover { background: var(--petrol-hell); }
.veg-nst-modi__knopf.ist-aktiv,
.veg-nst-sort__knopf.ist-aktiv { color: var(--papier); background: var(--rot); }

.veg-nst-filter {
  font: inherit; padding: .35rem .6rem;
  border: 2px solid var(--rot); border-radius: var(--radius);
  background: var(--papier); color: var(--text);
  max-width: 100%;
}

/* ---- Brotkrumen ---- */
.veg-nst-krumen {
  margin: 0 0 1rem; font-size: .95rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem;
}
.veg-nst-krumen__link {
  font: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--rot-dunkel); text-decoration: underline;
}
.veg-nst-krumen__hier { font-weight: 700; color: var(--text); }
.veg-nst-krumen__trenner { color: var(--text-leise); }

.veg-nst-hinweis { color: var(--text-leise); margin: 0 0 1rem; font-size: .95rem; }

/* ---- Kacheln ---- */
.veg-nst-kacheln {
  display: grid; gap: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
}
.veg-nst-kacheln--lm { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }

.veg-nst-kachel {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: .3rem; text-align: center;
  font: inherit; cursor: pointer;
  padding: 1rem .75rem;
  background: var(--papier); color: var(--text);
  border: 1px solid var(--petrol); border-radius: var(--radius);
}
.veg-nst-kachel:hover { border-color: var(--rot); background: var(--petrol-hell); }
.veg-nst-kachel--lm { padding-top: 1.9rem; }
.veg-nst-kachel__symbol { font-size: 1.9rem; line-height: 1; }
.veg-nst-kachel--lm .veg-nst-kachel__symbol { font-size: 1.4rem; }
/* Gezeichnete Symbole füllen ihr Feld ganz aus und wirken darum bei gleicher
   Kantenlänge größer als ein Emoji — deshalb etwas knapper gefasst. */
.veg-nst-kachel__symbol.ist-gezeichnet { width: 2.7rem; height: 2.7rem; display: block; }
.veg-nst-kachel--lm .veg-nst-kachel__symbol.ist-gezeichnet { width: 2.1rem; height: 2.1rem; }
.veg-nst-kachel__name { font-weight: 700; line-height: 1.25; }
.veg-nst-kachel__zahl { font-size: .8rem; color: var(--text-leise); line-height: 1.3; }

/* Das Farbband am oberen Rahmen: die Stufe von „viel“ nach „wenig“. */
.veg-nst-kachel__band {
  position: absolute; inset: 0 0 auto 0; height: .45rem;
  background: transparent;
}
.veg-nst-kachel.ist-ohne-wert { opacity: .72; }

/* Rang und Krone — die Farbe ist nie der einzige Träger der Aussage. */
.veg-nst-kachel__rang {
  position: absolute; top: .85rem; left: .6rem;
  font-size: .8rem; font-weight: 700; color: var(--text-leise);
  font-variant-numeric: tabular-nums;
}
.veg-nst-kachel__krone {
  position: absolute; top: .75rem; right: .55rem;
  font-size: 1.15rem; line-height: 1;
}
.veg-nst-kachel__krone.ist-platz-2 { font-size: .95rem; opacity: .85; }
.veg-nst-kachel__krone.ist-platz-3 { font-size: .85rem; opacity: .7; }
.veg-nst-kachel:has(.veg-nst-kachel__krone.ist-platz-1) { border-color: var(--rot); }

.veg-nst-kachel__gruppe {
  font-size: .72rem; color: var(--text-leise); line-height: 1.2;
  text-transform: uppercase; letter-spacing: .03em;
}
.veg-nst-kachel__wert {
  font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums;
  margin-top: .1rem;
}
.veg-nst-kachel__wert--leer { font-weight: 400; font-size: .9rem; color: var(--text-leise); }

/* Warengruppen-Kachel im Nährwert-Zugang: zeigt den Gruppendurchschnitt. */
.veg-nst-kachel--gruppe { padding-top: 1.5rem; }

/* ---- Häkchen & Sortier-Umschalter ---- */
.veg-nst-haken {
  display: inline-flex; align-items: center; gap: .4rem;
  cursor: pointer; font-size: .95rem;
}
.veg-nst-haken input { width: 1.05rem; height: 1.05rem; accent-color: var(--rot); cursor: pointer; }
.veg-nst-sort__gruppe { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

/* ---- Legende zum Farbband ---- */
.veg-nst-legende { margin: 1.25rem 0 0; }
.veg-nst-legende__skala {
  display: flex; flex-wrap: wrap; align-items: center; gap: .25rem;
  margin-bottom: .5rem;
}
.veg-nst-legende__feld {
  width: 1.75rem; height: .6rem; border-radius: 2px;
}
.veg-nst-legende__verlauf {
  width: 9rem; height: .6rem; border-radius: 2px;
}
.veg-nst-legende__ende {
  font-size: .8rem; color: var(--text-leise); margin: 0 .35rem;
}

/* ---- Die Lebensmittelkarte ---- */
.veg-nst-karte {
  background: var(--papier); border: 1px solid var(--petrol);
  border-radius: var(--radius); padding: 1.5rem;
}
.veg-nst-karte__kopf {
  display: flex; align-items: center; gap: 1rem;
  padding-bottom: 1rem; border-bottom: 2px solid var(--petrol);
}
.veg-nst-karte__symbol { font-size: 3rem; line-height: 1; flex: 0 0 auto; }
.veg-nst-karte__symbol.ist-gezeichnet { width: 3.4rem; height: 3.4rem; }
.veg-nst-karte__titelblock { min-width: 0; }
.veg-nst-karte__titel { margin: 0; font-size: 1.75rem; line-height: 1.15; }
.veg-nst-karte__titel a { color: var(--rot-dunkel); text-decoration: none; }
.veg-nst-karte__titel a:hover { text-decoration: underline; }
.veg-nst-karte__latein {
  margin: .15rem 0 0; font-style: italic; color: var(--text-leise); font-size: 1rem;
}
.veg-nst-karte__gruppe { margin: .3rem 0 0; font-size: .9rem; color: var(--text-leise); }

.veg-nst-karte__ueberschrift {
  margin: 1.5rem 0 .5rem; font-size: 1rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-leise);
}
.veg-nst-karte__unterzeile {
  margin: -.35rem 0 .6rem; font-size: .85rem; color: var(--text-leise);
}
.veg-nst-karte__fuss {
  margin: 1.5rem 0 0; padding-top: .75rem; border-top: 1px solid var(--petrol-hell);
  font-size: .85rem; color: var(--text-leise);
}

/* Basics: die fünf Angaben, die auf jeder Verpackung stehen */
.veg-nst-basics {
  display: grid; gap: .6rem;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
}
.veg-nst-basics__feld {
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
  padding: .75rem .5rem; text-align: center;
  background: var(--papier-artikel); border-radius: var(--radius);
}
.veg-nst-basics__symbol { font-size: 1.3rem; line-height: 1; }
.veg-nst-basics__wert { font-weight: 700; font-variant-numeric: tabular-nums; }
.veg-nst-basics__name { font-size: .78rem; color: var(--text-leise); line-height: 1.2; }

/* Highlights: wovon besonders viel drin ist */
.veg-nst-highlights { display: flex; flex-wrap: wrap; gap: .5rem; }
.veg-nst-highlight {
  display: inline-flex; align-items: center; gap: .4rem;
  font: inherit; cursor: pointer;
  padding: .4rem .8rem;
  background: #eef6e2; color: var(--text);
  border: 1px solid #9cc75a; border-radius: 999px;
}
.veg-nst-highlight:hover { background: #e2efd0; border-color: var(--rot); }
.veg-nst-highlight__wert { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Aufklappen & Sprungmarken */
.veg-nst-karte__schalter {
  font: inherit; cursor: pointer; margin-top: 1.5rem;
  padding: .5rem 1.1rem;
  color: var(--rot); background: var(--papier);
  border: 2px solid var(--rot); border-radius: 999px;
}
.veg-nst-karte__schalter:hover { background: var(--petrol-hell); }
.veg-nst-sprung {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
  margin: 1.25rem 0 .5rem; padding: .75rem;
  background: var(--papier-artikel); border-radius: var(--radius);
  position: sticky; top: 0; z-index: 2;
}
.veg-nst-sprung__knopf {
  font: inherit; font-size: .88rem; cursor: pointer;
  padding: .25rem .7rem;
  color: var(--rot-dunkel); background: var(--papier);
  border: 1px solid var(--petrol); border-radius: 999px;
}
.veg-nst-sprung__knopf:hover { background: var(--petrol-hell); border-color: var(--rot); }
.veg-nst-abschnitt { scroll-margin-top: 4rem; }

/* ---- Profil-Kopf auf der Einzelseite ---- */
.veg-nst-kopf { margin: 0 0 1.25rem; }
.veg-nst-kopf__titel { margin: 0 0 .25rem; font-size: 1.5rem; }
.veg-nst-kopf__titel a { color: var(--rot-dunkel); }
.veg-nst-kopf__portion { margin: 0; color: var(--text-leise); font-size: .9rem; }

.veg-nst-sektion {
  margin: 1.5rem 0 .5rem; font-size: 1.1rem;
  padding-bottom: .25rem; border-bottom: 2px solid var(--petrol);
}

.veg-nst-tabelle,
.veg-nst-rang { width: 100%; border-collapse: collapse; }
.veg-nst-tabelle td,
.veg-nst-rang td {
  padding: .4rem .5rem; border-bottom: 1px solid var(--petrol-hell);
  vertical-align: baseline;
}
.veg-nst-tabelle__name { width: 34%; }
.veg-nst-tabelle__wert { width: 26%; font-variant-numeric: tabular-nums; white-space: nowrap; }
.veg-nst-tabelle__wert.ist-text { white-space: normal; font-variant-numeric: normal; }
.veg-nst-tabelle__deckung { width: 40%; }
.veg-nst-tabelle__link {
  font: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--rot-dunkel); text-align: left;
}
.veg-nst-tabelle__link:hover { color: var(--rot); }
.veg-nst-quelle { color: var(--text-leise); font-size: .85em; }
.veg-nst-fussnote { cursor: help; color: var(--text-leise); }

/* ---- Balken ---- */
.veg-nst-balken { display: flex; align-items: center; gap: .5rem; }
.veg-nst-balken__schiene {
  display: block; flex: 1 1 auto; width: 100%; min-width: 3rem; height: .6rem;
  background: var(--petrol-hell); border-radius: 999px; overflow: hidden;
}
.veg-nst-balken__fuell { display: block; height: 100%; background: var(--petrol); }
.veg-nst-balken__fuell.ist-voll { background: var(--rot); }
.veg-nst-balken__fuell.ist-warnung { background: #d97706; }
/* Marke bei 100 % auf der 0–300-%-Skala: dort ist der Tagesbedarf gedeckt. */
.veg-nst-balken__schiene.ist-skala { position: relative; }
.veg-nst-balken__schiene.ist-skala::after {
  content: ""; position: absolute; left: 33.33%; top: 0; bottom: 0;
  width: 1px; background: rgba(31, 42, 44, .35);
}
.veg-nst-balken__zahl {
  flex: 0 0 auto; font-variant-numeric: tabular-nums;
  font-size: .9rem; color: var(--text-leise); min-width: 4.5rem; text-align: right;
}
.veg-nst-balken__zahl.ist-ueber { font-weight: 700; color: var(--text); }

/* ---- Rangliste ---- */
.veg-nst-rang__platz {
  width: 2.5rem; color: var(--text-leise); font-variant-numeric: tabular-nums;
  text-align: right;
}
.veg-nst-rang__name { width: 45%; }
.veg-nst-rang__gruppe { color: var(--text-leise); font-size: .85em; white-space: nowrap; }
.veg-nst-rang__wert {
  width: 22%; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600;
}
.veg-nst-rang__balken { width: 30%; }
.veg-nst-rang tr:nth-child(-n+3) .veg-nst-rang__platz { color: var(--rot); font-weight: 700; }

/* ---- Einzelseite ---- */
.veg-nst-detail {
  background: var(--papier-artikel); border-radius: var(--radius);
  padding: 1.5rem; margin: 1.5rem 0;
}
.veg-nst-detail__zurueck { margin: 0 0 1rem; font-size: .95rem; }
.veg-nst-detail__rubrik { margin: 0 0 .25rem; color: var(--text-leise); font-size: .95rem; }
.veg-nst-detail__bild { margin: 0 0 1.25rem; }
.veg-nst-detail__bild img { max-width: 100%; height: auto; border-radius: var(--radius); }
.veg-nst-detail__text { margin: 0 0 1.5rem; }
.veg-nst-detail .veg-nst-kopf__titel { font-size: 2rem; }
.veg-nst-detail__symbol { font-size: 1.1em; margin-right: .2em; }

/* ---- Qualitative Angaben ---- */
.veg-nst-textliste { margin: 0; }
.veg-nst-textliste dt { font-weight: 700; margin-top: .75rem; }
.veg-nst-textliste dd { margin: .15rem 0 0; color: var(--text-leise); white-space: pre-line; }

@media (max-width: 40rem) {
  .veg-nst-tabelle__deckung,
  .veg-nst-rang__balken { display: none; }
  .veg-nst-tabelle__name { width: 50%; }
  .veg-nst-rang__gruppe { display: block; }
}

/* Umschalter nativ / raffiniert — erscheint nur, wo Öle in der Auswahl sind.
   Bewusst über dem Raster: Die Rangfolge darunter hängt davon ab. */
.veg-nst-varianten {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  margin: 0 0 .9rem;
}
.veg-nst-varianten__leiste {
  display: inline-flex; border-radius: 999px; overflow: hidden;
  border: 1px solid var(--rot);
}
.veg-nst-variante {
  font: inherit; font-size: .85rem; line-height: 1.5; cursor: pointer;
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .15rem .8rem; border: 0; background: var(--papier); color: var(--rot);
}
.veg-nst-variante + .veg-nst-variante { border-left: 1px solid var(--rot); }
.veg-nst-variante:hover { background: var(--petrol-hell); }
.veg-nst-variante.ist-aktiv { background: var(--rot); color: var(--papier); font-weight: 700; }
.veg-nst-variante__symbol { font-size: .95em; line-height: 1; }
.veg-nst-varianten__text {
  flex: 1 1 100%; margin: 0; font-size: .85rem; line-height: 1.45;
  color: var(--text-leise);
}

/* Menge je 100 g steht vor der Sattdeckung — die Zahl mit der Einheit ist das
   Greifbare, der Prozentwert die Einordnung dahinter. */
.veg-nst-highlight__menge {
  font-variant-numeric: tabular-nums; color: var(--text-leise); font-size: .92em;
}

/* Unsichere Werte: eine Reihe darunter, grau und etwas kleiner. Sie sollen
   sichtbar bleiben, aber nicht dieselbe Geltung beanspruchen wie gemessene. */
.veg-nst-highlights--unsicher { margin-top: .45rem; }
.veg-nst-highlight.ist-unsicher {
  background: var(--papier-artikel); border-color: #c9ccc6; color: var(--text-leise);
  font-size: .88rem; padding: .3rem .65rem;
}
.veg-nst-highlight.ist-unsicher:hover { background: #eceee9; border-color: #a8aeab; }
.veg-nst-highlight.ist-unsicher .veg-nst-highlight__wert { font-weight: 600; }
.veg-nst-unsicher-hinweis { margin-top: .4rem; font-size: .8rem; }

/* ---- Tagesplan ---- */
.veg-nst-korbknopf {
  font: inherit; font-size: .8rem; cursor: pointer;
  padding: .2rem .55rem; line-height: 1.2;
  color: var(--rot); background: var(--papier);
  border: 1px solid var(--rot); border-radius: 999px;
}
.veg-nst-korbknopf:hover { background: var(--petrol-hell); }
.veg-nst-korbknopf.ist-drin { color: var(--papier); background: var(--rot); }
.veg-nst-korbknopf--karte { margin-top: 1rem; font-size: .9rem; padding: .35rem .9rem; }

.veg-nst-plan__liste { list-style: none; margin: 0 0 1rem; padding: 0; }
.veg-nst-plan__zeile {
  display: flex; align-items: center; gap: .5rem;
  padding: .4rem 0; border-bottom: 1px solid var(--petrol-hell);
}
.veg-nst-plan__symbol { font-size: 1.3rem; line-height: 1; flex: 0 0 auto; }
.veg-nst-plan__symbol.ist-gezeichnet { width: 1.6rem; height: 1.6rem; }
/* Der Name nimmt den Rest — so stehen Menge und Löschknopf immer rechtsbündig,
   egal wie lang das Lebensmittel heißt. */
.veg-nst-plan__name {
  flex: 1 1 auto; min-width: 0; text-align: left;
  font: inherit; font-weight: 600; cursor: pointer;
  background: none; border: 0; padding: 0; color: var(--rot-dunkel);
}
.veg-nst-plan__name:hover { text-decoration: underline; }

/* Fertigware führt zu keinem Profil: normale Textfarbe, kein Zeigefinger,
   keine Unterstreichung — sie soll nicht wie ein Link aussehen. */
.veg-nst-plan__name--fertig {
  color: var(--text); cursor: default; font-weight: 600;
}
.veg-nst-plan__name--fertig:hover { text-decoration: none; }

/* Das Merkzeichen erklärt die kleinere Datenbasis weiter unten im Plan. */
.veg-nst-plan__fertig {
  flex: 0 0 auto; font-size: .72rem; color: var(--text-leise);
  border: 1px solid var(--petrol); border-radius: var(--radius);
  padding: .05rem .35rem; white-space: nowrap; cursor: help;
}

.veg-nst-plan__zustand { font-size: .75rem; color: var(--text-leise); flex: 0 0 auto; }
.veg-nst-plan__menge {
  font: inherit; width: 4.5rem; text-align: right;
  padding: .2rem .35rem; border: 1px solid var(--petrol); border-radius: var(--radius);
}
.veg-nst-plan__einheit { font-size: .85rem; color: var(--text-leise); }
.veg-nst-plan__weg {
  font: inherit; font-size: 1.15rem; line-height: 1; cursor: pointer;
  width: 1.6rem; height: 1.6rem; flex: 0 0 auto;
  /* Dunkelrot statt grau: Löschen ist die einzige Handlung in der Zeile, die
     etwas wegnimmt — das darf man sehen. */
  color: var(--rot-dunkel); background: none; border: 0; font-weight: 700;
}
.veg-nst-plan__weg:hover { color: var(--rot); background: var(--petrol-hell); border-radius: 50%; }
.veg-nst-plan__leeren {
  font: inherit; font-size: .85rem; cursor: pointer;
  background: none; border: 0; padding: 0; color: var(--text-leise);
  text-decoration: underline;
}

.veg-nst-plan__block { margin-bottom: 1.25rem; }
.veg-nst-plan__hinweis { margin: -.25rem 0 .6rem; font-size: .85rem; color: var(--text-leise); }
.veg-nst-plan__nliste { list-style: none; margin: 0; padding: 0; }
.veg-nst-plan__nzeile {
  display: grid; align-items: center; gap: .5rem;
  grid-template-columns: 1.5rem minmax(6rem, 1fr) 5.5rem minmax(4rem, 8rem) 3.5rem;
  padding: .25rem 0;
}
.veg-nst-plan__nzeile--text { grid-template-columns: 1.5rem 1fr; }
.veg-nst-plan__nsymbol { font-size: 1rem; line-height: 1; }
.veg-nst-plan__nmenge {
  font-size: .85rem; text-align: right; color: var(--text-leise);
  font-variant-numeric: tabular-nums;
}
.veg-nst-plan__schiene {
  display: block; height: .5rem; border-radius: 999px;
  /* Deutlich hellere Schiene als der Füllstand: --petrol und --petrol-hell liegen
     zu dicht beieinander, ein halb gefüllter Balken war nicht vom leeren zu
     unterscheiden. */
  background: #e8eff0; overflow: hidden;
}
.veg-nst-plan__fuell { display: block; height: 100%; background: #5a939b; }
/* Ampel. Was sie bedeutet, hängt am Nährstoff und entscheidet sich im Skript:
   Bei Kalorien und Natrium ist Grün „noch darunter", bei Eiweiß, Ballaststoffen
   und den Mikronährstoffen ist Grün „schon erreicht". Die Farben selbst sind
   gedeckt gewählt — eine Bilanz ist kein Alarm. */
.veg-nst-plan__fuell.ist-gruen { background: #7fae3c; }
.veg-nst-plan__fuell.ist-gelb  { background: #d9a520; }
.veg-nst-plan__fuell.ist-rot   { background: #c2431f; }
.veg-nst-plan__nprozent {
  font-size: .85rem; text-align: right; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.veg-nst-plan__nprozent--leer { font-weight: 400; color: var(--text-leise); }
.veg-nst-plan__basis { grid-column: 2 / -1; font-size: .72rem; color: var(--text-leise); }
.veg-nst-plan__aufklapp { cursor: pointer; font-size: .9rem; color: var(--rot-dunkel); }
.veg-nst-plan__untext { font-size: .85rem; line-height: 1.45; }
.veg-nst-plan__block.ist-unerreichbar { border-top: 1px solid var(--petrol); padding-top: 1rem; }

@media (max-width: 34rem) {
  .veg-nst-plan__nzeile { grid-template-columns: 1.5rem 1fr 4.5rem 3rem; }
  .veg-nst-plan__schiene { display: none; }
}

/* Der Korbknopf liegt über der Kachel, nicht darin: Ein Knopf im Knopf wäre
   ungültig und mit der Tastatur nicht zu erreichen. */
.veg-nst-kachelbox { position: relative; display: flex; }
/* Unten Platz für den Korbknopf freihalten — sonst läuft die Wertzeile dahinter. */
.veg-nst-kachelbox > .veg-nst-kachel { flex: 1 1 auto; padding-bottom: 2.1rem; }
.veg-nst-korbknopf--kachel {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: .5rem;
  font-size: .68rem; padding: .1rem .45rem; white-space: nowrap;
  opacity: .55;
}
.veg-nst-kachelbox:hover .veg-nst-korbknopf--kachel,
.veg-nst-korbknopf--kachel:focus,
.veg-nst-korbknopf--kachel.ist-drin { opacity: 1; }

/* --- Fertigware ------------------------------------------------------------
   Die Kachel ist hier kein Knopf: Zu vier Etikettenwerten gibt es kein Profil
   zu öffnen. Der Zeigefinger wäre ein Versprechen, das sie nicht einlöst. */
.veg-nst-kachel--fertig { cursor: default; }

/* Der Hersteller unter dem Namen — bei „Bratwurst“ das einzige Unterscheidungs-
   merkmal zwischen zweiundvierzig Einträgen. */
.veg-nst-kachel__marke {
  font-size: .78rem; color: var(--text-leise); line-height: 1.2;
}

.veg-nst-fertig__kopf { margin: 1.6rem 0 .6rem; font-size: 1.05rem; }
.veg-nst-fertig__kopf:first-of-type { margin-top: .5rem; }
.veg-nst-plan__teilen {
  font: inherit; font-size: .85rem; cursor: pointer;
  background: none; border: 0; padding: 0; margin-right: 1rem;
  color: var(--rot-dunkel); text-decoration: underline;
}
.veg-nst-plan__teilen[disabled] { color: var(--text-leise); text-decoration: none; cursor: default; }
.veg-nst-plan__linkfeld {
  display: block; width: 100%; margin-top: .5rem;
  font: inherit; font-size: .8rem; padding: .3rem .5rem;
  border: 1px solid var(--petrol); border-radius: var(--radius);
  background: var(--papier); color: var(--text-leise);
}
.veg-nst-plan__weiter {
  display: inline-block; margin: 0 0 .75rem;
  font: inherit; font-size: .9rem; cursor: pointer;
  padding: .3rem .8rem;
  color: var(--rot); background: var(--papier);
  border: 1px solid var(--rot); border-radius: 999px;
}
.veg-nst-plan__weiter:hover { background: var(--petrol-hell); }

/* ---- Tauschvorschläge ---- */
.veg-nst-plan__tausch { border-left: 3px solid var(--petrol); padding-left: .9rem; }
.veg-nst-tausch {
  padding: .6rem 0; border-bottom: 1px solid var(--petrol-hell);
}
.veg-nst-tausch:last-child { border-bottom: 0; }
.veg-nst-tausch__kopf { margin: 0 0 .2rem; }
.veg-nst-tausch__menge { color: var(--text-leise); font-size: .85rem; }
/* Die Energie hinter dem Tausch — sie erklärt, warum die Menge sich ändert,
   soll aber leiser stehen als die Gramm selbst. */
.veg-nst-tausch__kcal { color: var(--text-leise); font-size: .78rem; }
.veg-nst-tausch__folgen { margin: 0 0 .4rem; font-size: .88rem; }
/* Gewinn und Preis müssen sich unterscheiden lassen, ohne dass Farbe der
   einzige Träger ist — deshalb zusätzlich das Vorzeichen im Text. */
.veg-nst-tausch__plus { color: #3f6d1f; font-weight: 600; }
.veg-nst-tausch__minus { color: #a1521a; font-weight: 600; }
.veg-nst-tausch__warnung { margin: .2rem 0 .4rem; font-size: .78rem; color: var(--text-leise); }
.veg-nst-tausch__knopf {
  font: inherit; font-size: .82rem; cursor: pointer;
  padding: .2rem .7rem;
  color: var(--rot); background: var(--papier);
  border: 1px solid var(--rot); border-radius: 999px;
}
.veg-nst-tausch__knopf:hover { background: var(--petrol-hell); }

/* Blättern durch die weiteren Möglichkeiten. Zurückhaltend gesetzt: Der
   Vorschlag selbst soll die Aufmerksamkeit bekommen, das Blättern ist ein
   Angebot für die, denen der erste nicht passt. */
.veg-nst-tausch__weitere {
  display: flex; align-items: center; gap: .4rem;
  margin: .5rem 0 0;
}
.veg-nst-tausch__pfeil {
  font: inherit; line-height: 1; cursor: pointer;
  width: 1.5rem; height: 1.5rem; padding: 0;
  color: var(--text-leise); background: transparent;
  border: 1px solid var(--linie, rgba(0,0,0,.18)); border-radius: 50%;
}
.veg-nst-tausch__pfeil:hover { color: var(--rot); border-color: var(--rot); }
.veg-nst-tausch__zaehler { font-size: .76rem; color: var(--text-leise); }
.veg-nst-plan__voll { border-left: 3px solid #9cc75a; padding-left: .9rem; }

/* Die drei Zugänge sollen in eine Zeile passen — ohne die Beschriftung davor
   und mit knapperem Zuschnitt reicht der Platz auch auf schmalen Schirmen. */
.veg-nst-modi__knopf {
  font-size: .92rem; padding: .32rem .75rem;
}
@media (max-width: 30rem) {
  .veg-nst-modi__knopf { font-size: .82rem; padding: .28rem .55rem; }
}

/* ------------------------------------------------- Tagesplan: Bedienung -- */

/* Die Zugänge kleben unter dem Leitmenü. --navleiste-hoehe setzt das Theme,
   sobald die Navigation klebt; ohne das Theme (oder ohne JavaScript) ist der
   Wert 0 und die Leiste klebt schlicht am oberen Rand. */
.veg-nst-modi {
  position: sticky;
  top: var(--navleiste-hoehe, 0px);
  z-index: 30;
  background: var(--papier);
  padding: .4rem 0;
}

/* Der Knopf „weitere Lebensmittel" hängt sich unter die Zugänge. */
.veg-nst-plan__leiste {
  position: sticky;
  top: calc(var(--navleiste-hoehe, 0px) + var(--nst-modi-hoehe, 0px));
  z-index: 25;
  display: flex; align-items: center; gap: .75rem;
  background: var(--papier);
  padding: .4rem 0 .5rem;
  border-bottom: 1px solid var(--petrol-hell);
  margin-bottom: .5rem;
}
.veg-nst-plan__zahl { font-size: .85rem; color: var(--text-leise); }

/* Körpermaße: ein Satz mit zwei Feldern darin, kein Formular mit Beschriftungen.
   Die Angabe ist freiwillig — sie soll wie eine Randnotiz aussehen, nicht wie
   eine Hürde vor dem Ergebnis. */
.veg-nst-plan__koerper { margin: .75rem 0 .25rem; }
.veg-nst-plan__koerperzeile { margin: 0; font-size: .95rem; }
.veg-nst-plan__gewicht {
  font: inherit; width: 4.2rem; padding: .15rem .3rem; text-align: right;
  border: 1px solid var(--petrol); border-radius: var(--radius, 4px);
}
.veg-nst-plan__geschlecht {
  font: inherit; padding: .15rem .3rem;
  border: 1px solid var(--petrol); border-radius: var(--radius, 4px);
}
.veg-nst-plan__koerperhinweis {
  margin: .3rem 0 0; font-size: .8rem; color: var(--text-leise); line-height: 1.45;
}

/* Teilen und Leeren: kleine Textlinks, keine Knöpfe. */
.veg-nst-plan__fuss {
  margin: .75rem 0 1.25rem; font-size: .85rem; color: var(--text-leise);
}
.veg-nst-plan__fusstrenner { margin: 0 .5rem; }

/* ------------------------------------------------------------- Suche -- */

.veg-nst-suche__kopf {
  display: flex; gap: .6rem; align-items: center; flex-wrap: wrap;
  margin-bottom: .75rem;
}
.veg-nst-suche__feld {
  font: inherit; font-size: 1.05rem; flex: 1 1 14rem; min-width: 0;
  padding: .5rem .7rem;
  border: 2px solid var(--petrol); border-radius: var(--radius, 4px);
}
.veg-nst-suche__feld:focus { border-color: var(--rot-dunkel); outline: none; }
.veg-nst-suche__stoebern {
  font: inherit; font-size: .9rem; cursor: pointer; white-space: nowrap;
  padding: .5rem .8rem;
  background: var(--petrol-hell); border: 1px solid var(--petrol);
  border-radius: var(--radius, 4px);
}
.veg-nst-suche__stoebern:hover { background: var(--petrol); color: #fff; }

.veg-nst-suche__quittung {
  margin: 0 0 .75rem; font-size: .88rem; color: var(--rot-dunkel);
}

.veg-nst-suche__liste { list-style: none; margin: 0; padding: 0; }
.veg-nst-suche__zeile { border-bottom: 1px solid var(--petrol-hell); }
.veg-nst-suche__treffer {
  display: flex; align-items: center; gap: .6rem; width: 100%;
  font: inherit; text-align: left; cursor: pointer;
  padding: .5rem .25rem; background: none; border: 0;
}
.veg-nst-suche__treffer:hover { background: var(--petrol-hell); }
/* Ohne feste Maße läuft das gezeichnete Symbol als SVG auf volle Spaltenbreite
   auseinander — dieselbe Falle wie bei den Kacheln. */
.veg-nst-suche__symbol { flex: 0 0 auto; font-size: 1.3rem; line-height: 1; }
.veg-nst-suche__symbol.ist-gezeichnet { width: 1.6rem; height: 1.6rem; display: block; }
.veg-nst-suche__name { font-weight: 600; }
/* Die Warengruppe rechts: Sie erklärt die vorgeschlagene Menge und trennt
   gleichnamige Einträge, drängt sich aber nicht vor den Namen. */
.veg-nst-suche__gruppe {
  margin-left: auto; font-size: .8rem; color: var(--text-leise); white-space: nowrap;
}
.veg-nst-suche__drin { font-size: .8rem; color: var(--rot-dunkel); white-space: nowrap; }

.veg-nst-suche__menge {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .5rem .25rem .75rem 2.2rem;
}
.veg-nst-suche__dazu {
  font: inherit; font-size: .9rem; cursor: pointer;
  padding: .3rem .8rem;
  background: var(--rot-dunkel); color: #fff; border: 0;
  border-radius: var(--radius, 4px);
}
.veg-nst-suche__vorgabe { font-size: .78rem; color: var(--text-leise); }
.veg-nst-suche__raus {
  font: inherit; font-size: .8rem; cursor: pointer;
  background: none; border: 0; padding: 0; color: var(--text-leise);
  text-decoration: underline;
}

/* Ein Tausch über die Gruppengrenze braucht eine Begründung — sonst sieht er
   aus wie ein Fehler in der Logik. */
.veg-nst-tausch__nachbar {
  margin: .2rem 0 .3rem; font-size: .78rem; color: var(--text-leise);
  font-style: italic;
}

/* Die Quelle unter dem Obergrenzen-Block: klein, aber vorhanden. Wer eine
   Warnung ausspricht, muss sagen, worauf sie sich stützt. */
.veg-nst-plan__quelle {
  margin: .5rem 0 0; font-size: .72rem; color: var(--text-leise); line-height: 1.5;
}

/* ------------------------------------- Fett- und Kohlenhydratprofil -- */

.veg-nst-plan__nname--klick {
  font: inherit; text-align: left; cursor: pointer;
  background: none; border: 0; padding: 0; color: var(--rot-dunkel);
}
.veg-nst-plan__nname--klick:hover { text-decoration: underline; }

.veg-nst-plan__profilzeile { list-style: none; padding: 0; }
.veg-nst-profil {
  margin: .25rem 0 .75rem; padding: .75rem .9rem;
  background: var(--petrol-hell); border-radius: var(--radius, 4px);
}
.veg-nst-profil__titel { margin: 0 0 .5rem; font-size: .95rem; color: var(--rot); }
.veg-nst-profil__liste { list-style: none; margin: 0 0 .6rem; padding: 0; }
.veg-nst-profil__zeile {
  display: grid; align-items: center; gap: .5rem;
  grid-template-columns: minmax(8rem, 1fr) 4.5rem minmax(3rem, 7rem) 3rem;
  padding: .15rem 0; font-size: .9rem;
}
.veg-nst-profil__menge,
.veg-nst-profil__anteil {
  text-align: right; font-variant-numeric: tabular-nums; color: var(--text-leise);
}
/* Die Schiene liegt hier auf farbigem Grund — sie braucht mehr Kontrast als
   in der Bilanz, sonst verschwindet der leere Teil im Hintergrund. */
.veg-nst-profil .veg-nst-plan__schiene { background: #fff; }

.veg-nst-profil__kennzahl { margin: .5rem 0; }
.veg-nst-profil__kennzeile { margin: 0; font-size: .92rem; }
.veg-nst-profil__punkt {
  display: inline-block; width: .6rem; height: .6rem; border-radius: 50%;
  margin-right: .4rem; background: #bbb;
}
.veg-nst-profil__punkt.ist-gruen { background: #7fae3c; }
.veg-nst-profil__punkt.ist-gelb  { background: #d9a520; }
.veg-nst-profil__punkt.ist-rot   { background: #c2431f; }
.veg-nst-profil__erklaerung {
  margin: .15rem 0 0 1rem; font-size: .78rem; color: var(--text-leise); line-height: 1.5;
}
.veg-nst-profil__regel {
  margin: .5rem 0; font-size: .8rem; color: var(--text-leise); font-style: italic;
}
.veg-nst-profil__verbessern {
  font: inherit; font-size: .9rem; cursor: pointer;
  padding: .35rem .9rem; margin-top: .3rem;
  background: var(--rot-dunkel); color: #fff; border: 0;
  border-radius: var(--radius, 4px);
}
.veg-nst-profil__tausch { margin-top: .75rem; }

@media (max-width: 34rem) {
  .veg-nst-profil__zeile { grid-template-columns: 1fr 4.5rem 3rem; }
  .veg-nst-profil .veg-nst-plan__schiene { display: none; }
}

/* Zwischenüberschrift im Nährwert-Menü — trennt „Fette“ und „Kohlenhydrate“
   von den fünf Grundwerten darüber. */
.veg-nst-menue__titel {
  margin: 1.25rem 0 .5rem; font-size: 1rem; color: var(--rot);
  border-bottom: 1px solid var(--petrol-hell); padding-bottom: .2rem;
}

/* Warnungen — sichtbar getrennt vom erklärenden Text darüber. */
.veg-nst-warnung {
  margin: .5rem 0 0; padding: .5rem .7rem;
  font-size: .85rem; line-height: 1.5;
  background: #fdf4e3; border-left: 3px solid #d9a520;
  border-radius: 0 var(--radius, 4px) var(--radius, 4px) 0;
}
.veg-nst-warnung__zeichen { font-weight: 700; color: #a86f00; }
.veg-nst-fussnote--warnung { color: #a86f00; cursor: help; }
