* {
  box-sizing: border-box;
}
/* Gemeinsame Gestaltungswerte: Schrift, neutrale Farben, Radien und Schatten. Die Produktfarben
   (--flavor, --tint, --soft, --line) bleiben je Produkt eigen und überschreiben die Flächen. */
:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --brand: #2f5d8a;
  --text: #1c2733;
  --muted: #56616e;
  --link: #1d5aa6;
  --surface: #f5f7fa;
  --surface-2: #e9eef4;
  --border: #d6dde5;
  --border-strong: #a7b3c0;
  /* Seit 21.11.2026 flacher: kleine Rundung, keine weichen Schatten an Kacheln und Kästen; Schatten nur noch an aufklappenden Ebenen. */
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: none;
  /* Seitengrund und Zustandsfarben; im Dunkelmodus unten überschrieben. */
  --bg: #fff;
  --input-hover: #7d8a99;
  --nav-hover: rgb(255 255 255 / 60%);
  --row-hover: #e8edf5;
  --accent-text: #234b70;
  --notice-bg: #eaf1f8;
  --notice-text: #1e3a5f;
  --badge-bg: #e5edf7;
  --badge-text: #243d5b;
  --tooltip-bg: #1c2733;
  --danger: #a31515;
  --danger-alt: #a32626;
  --danger-bg: #fff1f1;
  --warn: #984300;
  --warn-bg: #fff4e5;
  --warn-line: #d66a00;
  /* Periodensystem: Stufen der Elemente (Anhang I 2002/46/EG mit oder ohne EU-NRV, eigene Seite ohne Anhang I). */
  --pse-nrv-bg: #deedd5;
  --pse-nrv-line: #3f7136;
  --pse-nem-bg: #e5edf7;
  --pse-nem-line: #1d5aa6;
  --pse-other-bg: #fbe0c5;
  --pse-other-line: #a45120;
  --pse-part-bg: #f3e5eb;
  --pse-part-line: #884459;
  /* Farbstufen der Matrix auf mineralstoffverbindungen.html (Elementaranteil unter 15 % … ab 60 %). */
  --vm-1: #eef3f9;
  --vm-2: #d3e2f2;
  --vm-3: #a9c7e7;
  --vm-4: #7aa7d8;
  --vm-5: #2f6fb5;
  --vm-5-text: #ffffff;
}
.colloid-page .controls .field { flex: 1 1 200px; max-width: 290px; min-width: 0; }
.colloid-page input, .colloid-page select { width: 100%; min-width: 0; }
.colloid-page .colloid-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.colloid-page .results > div { min-width: 0; overflow-wrap: anywhere; }
.colloid-page .results strong { font-size: 25px; }
.colloid-page [aria-invalid="true"] { border: 2px solid var(--danger); }
.colloid-page .stack-chart-track > span { background: var(--flavor, var(--brand)); }
/* Kolloid: dezimale Verdünnungsreihe als Treppe (logarithmische Höhe), Ziellinie C₂ gestrichelt, Werte als Text über den Säulen. */
.serial-chart { margin: 12px auto; max-width: 640px; }
.serial-chart .stack-chart-axis { text-align: center; }
/* Verdünnungskurve: höchstens 560 px breit (viewBox 480 × 285, also rund 330 px hoch), sonst füllt sie über die allgemeine svg-Regel die ganze Breite. */
#dilution-chart svg { max-width: 560px; margin: 0 auto; }
.serial-plot { position: relative; display: flex; align-items: flex-end; gap: 8px; height: 160px; margin-top: 26px; border-bottom: 1.5px solid var(--border-strong); }
.serial-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; border-radius: 3px 3px 0 0; }
.serial-col:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.serial-bar { position: relative; display: block; width: 100%; background: var(--flavor, var(--brand)); border-radius: 3px 3px 0 0; }
.serial-col:hover .serial-bar, .serial-col:focus-visible .serial-bar { filter: brightness(1.15); }
.serial-value { position: absolute; left: 0; right: 0; bottom: 100%; font-size: 13px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; line-height: 1.2; padding-bottom: 3px; color: var(--text); }
.serial-labels { display: flex; gap: 8px; margin-top: 4px; }
.serial-labels span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 420px) { .serial-labels span, .serial-value { font-size: 11px; } .serial-plot, .serial-labels { gap: 4px; } }
.serial-target { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed var(--text); pointer-events: none; }
.serial-target span { position: absolute; right: 0; bottom: 2px; z-index: 1; font-size: 12px; font-weight: 600; background: var(--bg); padding: 0 4px; }
.colloid-curve-table tr.is-marked td { background: var(--surface-2); }
/* Umschalter direkt in einem Diagrammfeld (Kollagen-Ring) mittig über dem Diagramm. */
.chart-panel > .scale-toggle { display: flex; width: fit-content; max-width: 100%; margin: 0 auto 12px; }
/* Lange Namen in der Ringlegende (z. B. Glutaminsäure) mit Trennstrich statt mitten im Wort umbrechen. */
.donut-legend-item span { hyphens: auto; -webkit-hyphens: auto; }
/* Tagebuch: Suchfeld für den Blutwert mit Vorschlagsliste (Combobox), gestaltet wie die Startseitensuche. */
.diary-picker-field { flex: 1 1 280px; }
.diary-picker { position: relative; }
.diary-picker input { width: 100%; }
.diary-picker-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; max-height: min(50vh, 360px); overflow-y: auto; margin: 0; padding: 4px 0; list-style: none; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg); box-shadow: 0 10px 30px rgb(16 24 40 / 14%); }
.diary-picker-list [role="option"] { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; cursor: pointer; }
.diary-picker-list [role="option"] small { color: var(--muted); white-space: nowrap; }
.diary-picker-list [role="option"]:hover, .diary-picker-list [role="option"][aria-selected="true"] { background: var(--surface-2); }
.diary-picker-label { padding: 8px 12px 2px; color: var(--muted); font-size: 13px; font-weight: 600; }
/* Blutwerte: Link ins Tagebuch unter jedem Umrechner. */
.blood-diary { margin-top: 4px; }
/* Kapselfüllung: Balken je Größe sind wählbar; die gewählte Größe trägt einen Rahmen. */
.caps-size-track { cursor: pointer; }
.caps-size-track[aria-pressed="true"] { outline: 2px solid var(--text); outline-offset: 2px; }
/* Tagebuch: Zeitraum über der Kurve, Kennzahlen darunter als Kacheln. */
.diary-range-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin: 0 0 8px; }
.diary-range-row > span { font-weight: 600; font-size: 14px; }
.diary-range-row .scale-toggle button { white-space: nowrap; padding: 7px 10px; }
/* Verlaufskurve höchstens 560 px breit (viewBox 480 × 300), sonst füllt sie über die allgemeine svg-Regel die ganze Breite. */
#diary-chart svg { max-width: 560px; margin: 0 auto; }
.diary-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 8px; margin: 12px 0 0; }
.diary-stats > div { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; background: var(--bg); }
.diary-stats dt { font-size: 13px; color: var(--muted); }
.diary-stats dd { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.colloid-costs > div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); padding: 12px 0; }
.colloid-costs dd { margin: 0; font-weight: bold; text-align: right; }
.colloid-page .table-note, .colloid-page .intro, .colloid-costs { overflow-wrap: anywhere; }
.colloid-page .table-note { margin-top: 12px; }
.colloid-page .product-nav button { min-height: 42px; }
.colloid-page .colloid-toggle , .eaa-filter .eaa-toggle, .game-modes .game-mode-toggle {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0;
  max-width: 100%;
  border: 1px solid var(--line, var(--border-strong));
  border-radius: 7px;
  overflow: hidden;
  background: var(--soft, var(--surface-2));
}
.colloid-page .colloid-toggle button , .eaa-filter .eaa-toggle button, .game-modes .game-mode-toggle button {
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.colloid-page .colloid-toggle button + button , .eaa-filter .eaa-toggle button + button, .game-modes .game-mode-toggle button + button { border-left: 1px solid var(--line, var(--border-strong)); }
.colloid-page .colloid-toggle button[aria-pressed="true"] , .eaa-filter .eaa-toggle button[aria-pressed="true"], .game-modes .game-mode-toggle button[aria-pressed="true"] { background: var(--flavor, var(--brand)); color: #fff; }
.colloid-page .colloid-toggle button:focus-visible , .eaa-filter .eaa-toggle button:focus-visible, .game-modes .game-mode-toggle button:focus-visible { outline-offset: -4px; outline-color: currentColor; }
.colloid-page #calculator > .controls:first-of-type { justify-content: center; text-align: center; }
.colloid-page #calculator fieldset.field { display: flex; flex-direction: column; align-items: center; }
.colloid-page #calculator fieldset.field legend { width: 100%; text-align: center; }
.colloid-page input:disabled { background: var(--soft, var(--surface)); color: var(--muted); border-style: dashed; cursor: not-allowed; }
.colloid-page #product-image[hidden] { display: none; }
.colloid-page #product-credit[hidden] { display: none; }
.colloid-page #product-price-terms[hidden] { display: none; }
.colloid-curve-table { table-layout: fixed; margin-top: 12px; }
.colloid-curve-table th, .colloid-curve-table td { white-space: normal; overflow-wrap: anywhere; padding: 8px 4px; font-size: 13px; text-align: left; }
.colloid-page .product-nav button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 620px) {
  .colloid-page .colloid-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .colloid-page .colloid-summary strong { font-size: 21px; }
  .colloid-costs > div { flex-wrap: wrap; gap: 6px; }
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.price-terms {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  font-weight: normal;
}
.package-controls .field:has(.price-terms) {
  max-width: 230px;
}
.package-controls .field > p:has(.price-terms) {
  display: block;
}
.package-controls #grundpreis {
  max-width: 230px;
  overflow-wrap: anywhere;
}
.stack-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.my-product {
  border: 1px solid var(--line, var(--border));
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
.my-product .calculator-actions {
  justify-content: flex-start;
  margin-bottom: 0;
}
.stack-card[data-custom] {
  overflow-wrap: anywhere;
}
.stack-card[data-custom] input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  vertical-align: middle;
}
.stack-card {
  border: 1px solid var(--line, var(--border));
  border-top: 4px solid var(--flavor, var(--border-strong));
  background: var(--soft, var(--bg));
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
  box-shadow: var(--shadow);
}
.stack-card h2 {
  color: var(--flavor-text, var(--flavor, var(--text)));
}
.stack-card input {
  accent-color: var(--flavor, var(--muted));
}
.stack-card select,
.stack-card > input {
  border-color: var(--line, var(--border-strong));
}
.stack-card h2 {
  font-size: 20px;
  margin: 0 0 16px;
  text-align: left;
}
.stack-card h2 input {
  min-height: 20px;
  width: 20px;
  height: 20px;
}
.stack-card > label {
  display: block;
  margin: 12px 0 6px;
  font-weight: bold;
}
.stack-card > input,
.stack-card select {
  width: 100%;
  min-width: 0;
}
.stack-card-summary {
  line-height: 1.6;
}
.stack-card.is-disabled {
  opacity: 0.65;
}
.stack-card-placeholder {
  border-style: dashed;
}
.stack-card.is-disabled input:disabled,
.stack-card.is-disabled select:disabled,
.stack-card.is-disabled button:disabled {
  cursor: not-allowed;
}
.stack-chart-axis {
  text-align: right;
  font-size: 13px;
  color: var(--muted);
}
.stack-chart-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(60px, 2fr) var(
      --stack-value-width,
      16ch
    );
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  font-size: 14px;
}
.stack-chart-row > strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.stack-chart-track {
  display: flex;
  position: relative;
  height: 22px;
  background: var(--surface-2);
  border-radius: 3px;
}
.stack-chart-track > span:not(.stack-chart-tip) {
  display: block;
  height: 100%;
}
.stack-chart-track:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}
.stack-chart-tip {
  display: none;
  position: absolute;
  z-index: 2;
  bottom: 28px;
  left: 0;
  width: min(260px, 60vw);
  padding: 8px;
  background: var(--tooltip-bg);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.stack-chart-track:hover .stack-chart-tip,
.stack-chart-track:focus .stack-chart-tip {
  display: block;
}
@media (max-width: 620px) {
  .stack-chart-row {
    grid-template-columns: minmax(0, 1fr) var(--stack-value-width, 16ch);
  }
  .stack-chart-row > span {
    grid-column: 1 / -1;
  }
}
.stack-dose-buttons {
  margin-top: 16px;
}
.stack-dose-buttons legend {
  font-weight: bold;
  margin-bottom: 8px;
}
.stack-dose-buttons .dose-buttons {
  flex-wrap: wrap;
}
.stack-card .amount-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stack-card .amount-controls input {
  width: 110px;
  min-width: 0;
}
.stack-card .dose-buttons button[aria-pressed="true"] {
  background: var(--flavor);
  border-color: var(--flavor);
}
/* Nachkaufplan der Stack-Analyse (Tabelle im Stil der Referenztabellen). */
.stack-reorder {
  margin: 24px 0;
}
.stack-reorder .controls {
  align-items: flex-end;
}
/* Spaltenköpfe nicht mitten im Wort trennen (Referenztabellen erlauben sonst Umbruch an jeder Stelle). */
main #stack-reorder-table th {
  overflow-wrap: normal;
  hyphens: auto;
}
.stack-table {
  margin: 20px 0 32px;
  table-layout: fixed;
}
.stack-table th,
.stack-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}
.stack-badge {
  display: block;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 6px;
  background: var(--badge-bg);
  color: var(--badge-text);
  border-radius: 4px;
  font-size: 12px;
}
@media (max-width: 620px) {
  .stack-products {
    grid-template-columns: 1fr;
  }
  .stack-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .stack-table,
  .stack-table tbody,
  .stack-table tr {
    display: block;
    width: 100%;
  }
  .stack-table tr {
    border: 1px solid var(--border);
    margin-bottom: 12px;
  }
  .stack-table td {
    display: block;
    border: 0;
  }
  .stack-table td::before {
    content: attr(data-label) " ";
    font-weight: bold;
  }
}
.discount-control {
  text-align: center;
  margin: 16px 0 24px;
}
#share-status {
  text-align: center;
}
#slot-row {
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
#slot-row select {
  max-width: 280px;
}
#stack-save-name {
  max-width: 200px;
}
.discount-control label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: bold;
}
.discount-control input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  accent-color: var(--flavor, var(--muted));
}
/* Nur die Zeile „… % Mengenrabatt.“ direkt im Absatz; Spans im Label (Prozentwert aus data-discount) bleiben im Textfluss. */
.discount-control > span {
  display: inline-block;
  margin-top: 8px;
}
body[data-flavor="kollagen"]
  section[aria-labelledby="amino-heading"]
  th:nth-child(3),
body[data-flavor="kollagen"]
  section[aria-labelledby="amino-heading"]
  td:nth-child(3) {
  width: 190px;
  min-width: 190px;
}
body[data-flavor="kollagen"]
  section[aria-labelledby="amino-heading"]
  .nutrient-input {
  width: 170px;
}
.nutrient-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.nutrient-table-wrap {
  min-width: 0;
  overflow-x: auto;
}
.nutrient-tables th,
.nutrient-tables td {
  padding-inline: 8px;
}
@media (max-width: 700px) {
  .nutrient-tables {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
/* Umschalter als Segmentleiste: ein gemeinsamer Rahmen, Trennlinien zwischen den Teilen, der gewählte Teil in Seiten- bzw. Produktfarbe.
   Auf schmalen Bildschirmen schrumpfen die Teile; lange Wörter trennen an weichen Trennstellen (&shy;). */
.scale-toggle {
  display: inline-flex;
  max-width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.scale-toggle button {
  min-width: 0;
  flex: 0 1 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  padding: 7px 14px;
  font-size: 14px;
  line-height: 1.3;
}
.scale-toggle button + button {
  border-left: 1px solid var(--border-strong);
}
.scale-toggle button:not([aria-pressed="true"]):not(:disabled):hover {
  background: var(--surface-2);
  filter: none;
}
.scale-toggle button[aria-pressed="true"] {
  background: var(--flavor, var(--brand));
  color: #fff;
  font-weight: 600;
}
.scale-toggle button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -4px;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  font-size: 13px;
}
.chart-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.chart-legend i {
  display: inline-block;
  width: 18px;
  height: 10px;
  background: var(--flavor, var(--muted));
}
/* Legendeneinträge als Knöpfe (Stack-Analyse): heben ein Produkt in allen Diagrammen hervor, gedrückt = hervorgehoben. */
.chart-legend .chart-legend-toggle {
  display: inline-flex; gap: 6px; align-items: center; min-height: 32px; padding: 4px 8px;
  border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.chart-legend .chart-legend-toggle:hover { border-color: var(--border); }
.chart-legend .chart-legend-toggle[aria-pressed="true"] { border-color: var(--border-strong); background: var(--surface-2); font-weight: 600; }
/* Teilbalken anderer Produkte bei Hervorhebung blass; Linie bei einem Bezugswert (100 % NRV) quer über den Balken. */
.stack-chart-track > span.is-dimmed { opacity: 0.25; }
.stack-chart-marker { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px dashed var(--text); pointer-events: none; }
/* Regler der Trinkmenge (Mineralwasser) unter dem Textfeld, so breit wie das Feld. */
/* Regler unter einem Zahlenfeld (Trinkmenge, Tagesmenge im Preisvergleich). */
.field-range { display: block; width: 100%; max-width: 260px; margin-top: 8px; }
/* Elementaranteil: Regler und Mengenanzeige des Verbindungsvergleichs in einer Zeile, auf schmalen Bildschirmen umbrechend. */
.el-compare-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 28px; margin: 4px 0 12px; }
.el-compare-controls .el-compare-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.el-compare-controls .el-compare-group > span, .el-compare-controls label { font-weight: 600; font-size: 14px; }
.el-compare-field { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.el-compare-controls .el-compare-field label { margin: 0; }
.el-compare-field input[type="range"] { flex: 1 1 160px; width: 200px; max-width: 100%; }
.el-compare-field output { font-weight: 700; font-variant-numeric: tabular-nums; }
/* Ringdiagramm (js/donut-chart.js): Ring links, Legende mit Werten rechts; schmal untereinander. */
.donut-chart { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 32px; }
/* Feste Größe auch in .chart-panel, dessen allgemeine svg-Regel sonst die volle Breite setzt. */
.donut-chart .donut-svg { width: min(200px, 60vw); max-width: 200px; height: auto; flex: none; }
.donut-segment { cursor: pointer; stroke: var(--bg); stroke-width: 1.5; transition: opacity 150ms ease; }
.donut-segment.is-dimmed { opacity: 0.25; }
.donut-segment.is-selected { stroke: var(--text); stroke-width: 2.5; }
.donut-segment:focus-visible { outline: none; stroke: var(--text); stroke-width: 3; }
.donut-center, .donut-center-value, .donut-center-unit { text-anchor: middle; fill: var(--text); }
.donut-chart .donut-center { font: 13px var(--font); }
.donut-chart .donut-center.donut-center-long { font-size: 10.5px; }
.donut-chart .donut-center-value { font: 700 16px var(--font); }
.donut-chart .donut-center-unit { font: 11px var(--font); fill: var(--muted); }
.donut-legend { list-style: none; margin: 0; padding: 0; min-width: min(100%, 260px); flex: 1 1 260px; max-width: 420px; }
.donut-legend li { margin: 0; }
.donut-legend li.is-dimmed { opacity: 0.55; }
.donut-legend-item {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; min-height: 40px;
  padding: 6px 8px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.donut-legend-item:hover { border-color: var(--border); }
.donut-legend-item[aria-pressed="true"] { border-color: var(--border-strong); background: var(--surface-2); }
.donut-legend-item i { display: block; width: 18px; height: 12px; }
.donut-legend-item span { overflow-wrap: anywhere; }
.donut-legend-item strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .donut-segment { transition: none; } }
@media print { .donut-segment.is-dimmed, .stack-chart-track > span.is-dimmed { opacity: 1; } }
.chart-legend .legend-dot {
  width: 10px;
  border-radius: 50%;
}
.chart-legend .legend-line {
  height: 3px;
}
.chart-legend .legend-pale {
  background: var(--tint, var(--border));
  border: 1px solid var(--line, var(--border-strong));
}
[hidden] {
  display: none !important;
}
.budget-slider {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.budget-slider input {
  width: min(400px, 100%);
}
input[type="range"],
progress {
  accent-color: var(--flavor, var(--muted));
}
.extra-tools {
  max-width: 1000px;
  margin: 24px auto;
  padding: 24px;
  border-top: 1px solid var(--line, var(--border));
}
.target-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.target-row input {
  width: 130px;
}
/* Elementaranteil: Verbindungszeilen als gemeinsames Raster, damit Auswahl, Verbindungsmenge, Elementarmenge und Schaltfläche über alle Zeilen fluchten. */
.el-table {
  max-width: 660px;
  margin: 0 auto;
}
#el-rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 130px auto;
  align-items: center;
  gap: 8px;
}
.el-row {
  display: contents;
}
.el-head {
  font-size: 13px;
  color: var(--muted);
}
.el-label {
  display: none;
}
.el-row .el-sel {
  grid-column: 1;
}
.el-row .el-compound {
  grid-column: 2;
}
.el-row .el-elemental {
  grid-column: 3;
}
.el-row .el-btn {
  grid-column: 4;
}
.el-row select,
.el-row input {
  width: 100%;
  box-sizing: border-box;
}
.el-row button {
  min-height: 42px;
  padding: 8px 12px;
  background: var(--soft, var(--surface-2));
  border: 1px solid var(--line, var(--border-strong));
  border-radius: 5px;
}
#rechner .controls {
  justify-content: space-between;
  gap: 12px;
  max-width: 660px;
  margin: 0 auto 4px;
}
#rechner .controls .field:first-child {
  flex: 1 1 240px;
}
#rechner .controls select {
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 700px) {
  #el-rows {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  }
  .el-head {
    display: none;
  }
  .el-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
  }
  .el-row .el-label-compound {
    grid-column: 1;
  }
  .el-row .el-label-elemental {
    grid-column: 2;
  }
  .el-row .el-sel {
    grid-column: 1 / -1;
  }
  .el-row .el-compound {
    grid-column: 1;
  }
  .el-row .el-elemental {
    grid-column: 2;
  }
  .el-row .el-btn {
    grid-column: 3;
  }
  #rechner .controls .field {
    flex: 1 1 100%;
  }
  #rechner .controls select {
    width: 100%;
  }
  #rechner .controls .field:last-child {
    display: flex;
    justify-content: flex-end;
  }
}
.extra-tools button,
.calculator-actions button {
  padding: 9px 15px;
  border: 1px solid var(--line, var(--border-strong));
  background: var(--soft, var(--surface-2));
  border-radius: var(--radius-sm);
}
.extra-tools button:disabled {
  opacity: 0.5;
  cursor: default;
}
#chart-tooltip {
  position: fixed;
  z-index: 20;
  max-width: 280px;
  padding: 10px 14px;
  background: var(--tooltip-bg);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 14px;
  pointer-events: none;
  box-shadow: 0 6px 20px rgb(16 24 40 / 25%);
}
[data-nrv-name] {
  cursor: help;
}
.amount-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.amount-controls button,
.controls .field > button {
  min-height: 42px;
  padding: 8px 12px;
  background: var(--soft, var(--surface-2));
  border: 1px solid var(--line, var(--border-strong));
  border-radius: var(--radius-sm);
}
/* Zweiter Knopf im selben Feld (Zurücksetzen und Kalendertermin auf nachkaufdatum.html). */
.controls .field > button + button {
  margin-left: 8px;
}
.controls .field > button:disabled {
  opacity: 0.45;
}
.calculator-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}
.calculator-actions button:disabled {
  opacity: 0.45;
  cursor: default;
}
.editor-close {
  justify-content: flex-end;
  margin: 0 0 8px;
}
.my-product #an-editor,
.my-product #analysis-editor,
.my-product #stack-editor {
  margin-top: 16px;
}
#cost-chart svg,
#range-chart [data-portion] {
  cursor: pointer;
}
#range-chart [data-portion]:hover rect:not([fill="transparent"]) {
  filter: brightness(0.85);
}
.charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 30px 0;
}
.chart-panel {
  border: 1px solid var(--line, var(--border));
  border-radius: var(--radius);
  padding: 12px;
  min-width: 0;
  background: var(--bg);
  box-shadow: var(--shadow);
}
.chart-panel h2,
.chart-panel h3 {
  text-align: center;
  font-size: 21px;
  line-height: 1.3;
  margin: 8px 0 16px;
}
.chart-panel p {
  text-align: center;
  font-size: 14px;
}
.chart-panel svg {
  display: block;
  width: 100%;
  height: auto;
}
.chart-panel svg text {
  font: 12px var(--font);
  fill: var(--text);
}
.chart-grid {
  stroke: var(--border);
}
.cost-line {
  fill: none;
  stroke: var(--flavor, var(--muted));
  stroke-width: 3;
}
.chart-guide {
  stroke: var(--flavor, var(--muted));
  stroke-dasharray: 4 4;
}
.chart-point,
.range-active {
  fill: var(--flavor, var(--muted));
}
.chart-point {
  stroke: var(--bg);
  stroke-width: 2;
}
.range-bar {
  fill: var(--tint, var(--border));
  stroke: var(--line, var(--border-strong));
}
.chart-summary {
  font-weight: bold;
}
/* Platz für per JS gerenderte Diagramme reservieren (weniger Layout Shift).
   Sobald Inhalt drin ist, greift :empty nicht mehr und volle Höhe gilt. */
#cost-chart:empty,
#range-chart:empty,
[id$="-nrv-chart"]:empty,
#dilution-chart:empty,
#an-chart:empty,
[id^="drops-"][id$="-chart"]:empty,
[id^="stack-"][id$="-chart"]:empty {
  min-height: 120px;
}
@media (max-width: 700px) {
  .charts {
    grid-template-columns: 1fr;
  }
}
.multi-variants {
  display: block;
  width: 50%;
  max-width: 400px;
  height: auto;
  margin: 24px auto;
}
body[data-flavor="silver"] {
  --flavor: #975109;
  --tint: #f7dfb7;
  --soft: #fff6e8;
  --line: #d4a35d;
}
body[data-flavor="gold"] {
  --flavor: #943d32;
  --tint: #f1d6cf;
  --soft: #fcf1ee;
  --line: #c98e81;
}
body[data-flavor="wildheidelbeere"],
.stack-card[data-flavor="wildheidelbeere"] {
  --flavor: #884459;
  --tint: #f3e5eb;
  --soft: #faf3f6;
  --line: #cfabb9;
}
body[data-flavor="kakao"],
.stack-card[data-flavor="kakao"] {
  --flavor: #69504f;
  --tint: #eee5e2;
  --soft: #f8f4f2;
  --line: #c7b4ad;
}
body[data-flavor="zitrone"],
.stack-card[data-flavor="zitrone"] {
  --flavor: #756400;
  --tint: #f8efac;
  --soft: #fffbe8;
  --line: #d6c959;
}
body[data-flavor="mango_vanille"],
.stack-card[data-flavor="mango_vanille"] {
  --flavor: #a45120;
  --tint: #fbe0c5;
  --soft: #fff5eb;
  --line: #e4b184;
}
body[data-flavor="grassaft"],
.stack-card[data-flavor="grassaft"] {
  --flavor: #3f7136;
  --tint: #deedd5;
  --soft: #f2f8ee;
  --line: #aac59a;
}
body[data-flavor] .navigation,
body[data-flavor] thead,
body[data-flavor] footer {
  background: var(--tint);
  border-color: var(--line);
}
body[data-flavor] .product-nav,
body[data-flavor] .site-notices {
  background: var(--tint);
  border-color: var(--line);
}
body[data-flavor] .results,
body[data-flavor] details,
body[data-flavor] .table-actions button,
body[data-flavor] .dose-buttons button {
  background: var(--soft);
  border-color: var(--line);
}
body[data-flavor] .is-style-stripes tbody tr:nth-child(odd) {
  background: var(--soft);
}
body[data-flavor] tbody tr:hover {
  background: var(--tint) !important;
}
body[data-flavor] .dose-buttons button[aria-pressed="true"] {
  background: var(--flavor);
  border-color: var(--flavor);
  color: #fff;
}
body[data-flavor] .product-nav button[aria-pressed="true"] {
  color: var(--flavor-text, var(--flavor));
  text-decoration: underline;
  text-underline-offset: 5px;
}
.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
/* Statuszeile des Teilen-Links in den Produktrechnern; leer ohne Abstand. */
#calc-share-status { text-align: right; margin: 6px 0 0; }
#calc-share-status:empty { display: none; }
.table-actions button {
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
}
.table-actions + figure {
  margin-top: 8px;
}
.site-notices {
  margin: 0;
  padding: 20px max(24px, calc((100% - 952px) / 2));
  background: var(--notice-bg);
  border-top: 1px solid var(--border);
  color: var(--notice-text);
  font-size: 14px;
  line-height: 1.6;
}
.site-notices p {
  margin: 0 0 16px;
}
.site-notices p:last-child {
  margin-bottom: 0;
}
.site-notices a {
  color: inherit;
  text-decoration: underline;
}
.purchase-action {
  text-align: center;
  margin: 24px 0 30px;
}
.purchase-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 16px 30px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--flavor, var(--muted));
  color: #fff;
  line-height: 1.4;
  text-decoration: none;
  transition: filter 150ms ease;
}
.purchase-title {
  font-size: 21px;
  font-weight: 700;
}
.purchase-discount {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 14px;
}
.purchase-disclosure {
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}
.purchase-code {
  padding: 2px 8px;
  border: 1px solid #ffffff66;
  border-radius: 5px;
  background: #ffffff1a;
  font-weight: 700;
  letter-spacing: 0.5px;
}
/* PGP-Angaben auf kontakt.html: fett gesetzte Bezeichnung, Wert darunter; Schlüssel aufklappbar und waagerecht scrollbar. */
.pgp-facts dt { font-weight: 700; }
.pgp-facts dd { margin: 0 0 10px; }
.pgp-fingerprint { font-family: ui-monospace, Consolas, "Courier New", monospace; letter-spacing: 0.02em; }
.pgp-key-details summary { cursor: pointer; }
.pgp-key {
  max-width: 100%;
  overflow-x: auto;
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.35;
}
/* Stempel für Aktionscodes (js/product-config.js, applyDiscountTexts): oben rechts im Inhalt, leicht gedreht, als Werbung gekennzeichnet. */
.discount-stamp {
  float: right;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 12.5rem;
  margin: 4px 0 12px 16px;
  padding: 8px 14px;
  border: 3px double var(--danger);
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  color: var(--danger);
  text-align: center;
  line-height: 1.25;
  transform: rotate(4deg);
}
.discount-stamp-ad {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.discount-stamp-title {
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.discount-stamp-offer { font-weight: 700; }
.discount-stamp-dates { font-size: 0.85rem; }
@media (max-width: 620px) {
  /* Schmal: eigene Zeile rechts über der Überschrift, damit die Überschrift nicht neben dem Stempel umbricht. */
  .discount-stamp { float: none; width: fit-content; max-width: 11rem; margin: 4px 4px 8px auto; padding: 6px 10px; }
  .discount-stamp-title { font-size: 1rem; }
}
@media print {
  .discount-stamp { display: none; }
}
.purchase-button:hover {
  color: #fff;
  filter: brightness(1.06);
  text-decoration: none;
}
.purchase-button:active {
  filter: brightness(0.96);
}
@media (prefers-reduced-motion: reduce) {
  .purchase-button {
    transition: none;
  }
}
.intro {
  text-align: center;
  color: var(--muted);
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 4px;
}
.navigation {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 30px;
  font-weight: bold;
}
.navigation .current {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  box-shadow: inset 0 0 0 1px var(--border);
}
.navigation .nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  margin-left: 0;
  border-radius: 12px;
  background: var(--flavor, var(--brand));
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  line-height: 1;
}
.navigation .nav-badge[hidden] {
  display: none;
}
.product-nav {
  background: var(--surface);
  padding: 9px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.product-nav button {
  background: transparent;
  border: 0;
  color: var(--link);
  font-weight: bold;
  padding: 3px 15px;
}
#an-product-nav button {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.page-anchors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  margin: 0 0 8px;
  padding: 10px 12px;
  background: var(--soft, var(--surface));
  border: 1px solid var(--line, var(--border));
  border-radius: var(--radius);
  font-size: 14px;
}
.page-anchors a::after {
  content: " ↓";
}
.page-anchors[hidden] {
  display: none;
}
main {
  max-width: 1000px;
  margin: auto;
  padding: 12px 24px 50px;
}
/* Logo NSV links neben der Überschrift der Startseite; dekorativ (alt=""), weil die H1 den Namen nennt. */
.home-logo {
  display: block;
  width: 80px;
  height: 40px;
  flex: none;
}
h1 {
  text-align: center;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 8px 0;
}
h2 {
  text-align: center;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 26px 0 20px;
}
section {
  scroll-margin-top: 20px;
}
.calculator {
  border-top: 1px solid var(--border);
}
.calculator h3 {
  text-align: center;
  font-size: 21px;
  line-height: 1.3;
  margin: 8px 0 16px;
}
.controls {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px 40px;
  padding: 4px 0 25px;
}
.field label,
.field legend {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
select,
input {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: var(--bg);
  color: var(--text);
  min-height: 42px;
  transition: border-color 120ms ease;
}
select:hover,
input:hover {
  border-color: var(--input-hover);
}
/* Einheitliche Rückmeldung für Schaltflächen: leicht abdunkeln beim Überfahren und Drücken. */
button {
  transition: filter 120ms ease, background-color 120ms ease, border-color 120ms ease;
}
button:not(:disabled):hover {
  filter: brightness(0.96);
}
button:not(:disabled):active {
  filter: brightness(0.9);
}
@media (prefers-reduced-motion: reduce) {
  select, input, button { transition: none; }
}
.dose-warning {
  color: var(--danger);
  background: var(--danger-bg);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.dose-warning-orange {
  color: var(--warn);
  background: var(--warn-bg);
  border-left-color: var(--warn-line);
}

.dose-buttons {
  display: flex;
  gap: 5px;
}
.dose-buttons button {
  min-width: 44px;
  min-height: 42px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.dose-buttons button[aria-pressed="true"] {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
.package-controls {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.package-controls {
  align-items: flex-start;
}
.package-controls .field > strong,
.package-controls .field > label {
  display: block;
  margin: 0 0 8px;
}
.package-controls .field > p {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 42px;
  margin: 0;
}
.package-controls input {
  width: 150px;
}
.results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  gap: 20px;
}
.results strong {
  display: block;
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.results span.label {
  font-size: 14px;
  color: var(--muted);
}
figure {
  margin: 20px 0;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
main .reference-table th, main .reference-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}
.table-scroll { max-width: 100%; overflow-x: auto; }
@media (max-width: 620px) {
  .reference-table th, .reference-table td { padding: 10px 6px; }
}
.nutrient-input {
  width: 105px;
  max-width: 100%;
  text-align: right;
  padding: 7px;
}
.nrv-input {
  width: 95px;
  text-align: right;
  padding: 7px;
}
.ingredients {
  margin: 20px 0 28px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
th,
td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
thead {
  background: var(--surface-2);
}
.is-style-stripes tbody tr:nth-child(odd) {
  background: var(--surface);
}
td:not(:nth-child(3n + 1)),
th:not(:nth-child(3n + 1)) {
  white-space: nowrap;
  text-align: right;
}
td:nth-child(3),
th:nth-child(3) {
  border-right: 2px solid var(--bg);
}
tbody tr:hover {
  background: var(--row-hover) !important;
}
.table-note {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
}
.results + .table-note {
  margin-top: 12px;
}
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 20px;
}
summary {
  cursor: pointer;
  color: var(--link);
  font-weight: 600;
}
details p {
  margin-bottom: 4px;
}
/* Rechenweg „So wird gerechnet“ in den Produktrechnern: eine Zeile je Schritt, lange Formeln umbrechen. */
.calc-steps-list { margin: 12px 0 8px; padding-left: 1.4em; }
.calc-steps-list li { margin: 6px 0; overflow-wrap: anywhere; }
.calc-step-label { font-weight: 600; }
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
footer a {
  margin-left: 20px;
}
/* Copyright-Hinweis unter den Footer-Links. */
.footer-copyright {
  margin: 12px 0 0;
}
@media (max-width: 620px) {
  /* Keep long vitamin names and editable values inside the mobile viewport. */
  .nutrient-tables table {
    table-layout: fixed;
  }
  .nutrient-tables th:first-child {
    width: 36%;
  }
  .nutrient-tables th:nth-child(2) {
    width: 34%;
  }
  .nutrient-tables th:nth-child(3) {
    width: 30%;
  }
  .nutrient-tables td:first-child {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
  }
  .nutrient-tables td:not(:first-child) {
    white-space: normal;
  }
  .nutrient-tables .nutrient-input,
  .nutrient-tables .nrv-input {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding-inline: 3px;
    font-size: 16px;
  }
  main {
    padding: 16px 12px 30px;
  }
  h1 {
    font-size: 25px;
  }
  h2 {
    font-size: 22px;
  }
  .navigation {
    gap: 10px 18px;
  }
  .product-nav button {
    padding: 4px 8px;
    font-size: 14px;
  }
  .controls {
    gap: 20px;
  }
  th,
  td {
    padding: 9px 7px;
    font-size: 14px;
  }
  .results {
    padding: 16px 8px;
    gap: 10px;
  }
  .results strong {
    font-size: 26px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.legal {
  max-width: 850px;
  min-height: 65vh;
}
.legal h1 {
  margin: 20px 0 35px;
}
.legal h2 {
  text-align: left;
  margin-top: 32px;
}
.legal h3 {
  font-size: 21px;
  line-height: 1.3;
  margin-top: 26px;
}
.legal p {
  line-height: 1.7;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 12px;
}
.footer-links a {
  margin: 0;
}
/* Seitenbezogener Link „Fehler melden“ über den Footer-Links. */
.page-feedback {
  margin: 0;
}
.page-feedback a {
  margin: 0;
}
/* Hervorgehobener Mail-Link auf kontakt.html. */
.contact-mail {
  margin: 24px 0;
  font-size: 18px;
  font-weight: bold;
}

body[data-flavor="suess_zitrone"],
.stack-card[data-flavor="suess_zitrone"] {
  --flavor: #59612a;
  --tint: #e7ebae;
  --soft: #f7f8e8;
  --line: #c5ce80;
}
body[data-flavor="hibiskus"],
.stack-card[data-flavor="hibiskus"] {
  --flavor: #42645a;
  --tint: #d7ebd0;
  --soft: #eff7ec;
  --line: #abc9ae;
}

body[data-flavor="kollagen"],
.stack-card[data-flavor="kollagen"] {
  --flavor: #355e50;
  --tint: #cce8cf;
  --soft: #edf7ed;
  --line: #98c8a1;
}

body[data-flavor="omega3"],
.stack-card[data-flavor="omega3"] {
  --flavor: #087269;
  --tint: #c7ebe0;
  --soft: #edf8f4;
  --line: #8ecbbc;
}
body[data-flavor="protect"],
.stack-card[data-flavor="protect"] {
  --flavor: #9a6500;
  --tint: #f7edbd;
  --soft: #fffbea;
  --line: #d6c777;
}
body[data-flavor="eisen"],
.stack-card[data-flavor="eisen"] {
  --flavor: #8c3b2e;
  --tint: #f3dcd2;
  --soft: #faf0ea;
  --line: #d3a48f;
}
body[data-flavor="jod"],
.stack-card[data-flavor="jod"] {
  --flavor: #5d3a8c;
  --tint: #e4d9f2;
  --soft: #f4effa;
  --line: #b79ed6;
}
body[data-flavor="omega3"] .nutrient-input {
  width: 170px;
}

body[data-flavor="analyse"] {
  --flavor: #2f5d8a;
  --tint: #e0eaf4;
  --soft: #f2f6fb;
  --line: #a9c0d8;
}
body[data-flavor="analyse"] main {
  overflow-wrap: anywhere;
}
body[data-flavor] .analyse-row {
  background: var(--soft);
  border-color: var(--line);
}
.analyse-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  list-style: none;
  margin: 8px 0 4px;
  padding: 0;
  color: var(--muted);
}
.controls.analysis-setup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}
.controls.stack-name-controls {
  justify-content: flex-start;
}
.analysis-setup .field {
  min-width: 0;
}
.analysis-setup input,
.analysis-setup select {
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 700px) {
  .controls.analysis-setup {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .analysis-setup .field:last-child {
    grid-column: 1 / -1;
  }
}
.analyse-product {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr);
  gap: 16px;
  align-items: end;
}
.analyse-product .field {
  min-width: 0;
  width: 100%;
}
.analyse-product input,
.analyse-product select {
  width: 100%;
}
.analyse-results {
  grid-template-columns: repeat(4, 1fr);
}
#an-rows {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}
.analyse-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.7fr) minmax(0, 0.7fr) minmax(265px, 2fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 12px;
}
.analyse-row .field label {
  display: block;
  font-weight: bold;
  margin-bottom: 0;
  font-size: 14px;
}
.analyse-row .field {
  min-width: 0;
}
.analyse-product input[aria-invalid="true"],
.analyse-row input[aria-invalid="true"] {
  border-color: var(--danger-alt);
  box-shadow: 0 0 0 1px var(--danger-alt);
}
.analyse-row input,
.analyse-row select {
  display: block;
  margin-top: 6px;
  min-height: 42px;
  width: 100%;
  min-width: 0;
}
.analyse-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.analyse-row-actions button {
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  border-radius: 5px;
  min-height: 42px;
}
.analyse-row input,
.analyse-row select {
  font-weight: normal;
}
.analyse-row-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.analyse-import textarea {
  width: 100%;
  font: inherit;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  padding: 8px 10px;
  margin-top: 8px;
}
.analyse-bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(80px, 2fr) 5em;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
  font-size: 14px;
}
.analyse-bar-name {
  text-align: right;
  overflow-wrap: anywhere;
}
.analyse-bar-track {
  position: relative;
  display: block;
  height: 22px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}
.analyse-bar-fill {
  display: block;
  height: 100%;
  background: var(--flavor, var(--brand));
}
.analyse-bar-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--text);
  transform: translateX(-100%);
}
.analyse-bar-val {
  font-variant-numeric: tabular-nums;
}
/* Mengen statt Prozent (Nährstoffseiten): breitere Wertspalte; verlinkte Balken mit Fokusrahmen. */
.analyse-bar-row.is-amount {
  grid-template-columns: minmax(110px, 1fr) minmax(80px, 2fr) 11ch;
}
.analyse-bar-row.is-amount .analyse-bar-val {
  text-align: right;
}
a.analyse-bar-track:hover .analyse-bar-fill {
  filter: brightness(1.15);
}
a.analyse-bar-track:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}
/* Quellen-Diagramme (Stack, eigene Produkte) und feste Diagramme der Nährstoffseiten (Referenzwerte, Verbindungen). */
.nutrient-source-chart,
.nutrient-reference-chart {
  margin: 8px 0 16px;
}
/* Nachkauf-Datum: Verlauf der Rest-Reichweite (SVG in voller Breite, Farben über Tokens für hell und dunkel). */
.reorder-chart {
  width: 100%;
  margin: 8px 0;
}
.reorder-chart svg {
  display: block;
  max-width: 100%;
  touch-action: manipulation;
  cursor: crosshair;
}
.reorder-chart svg:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
/* Stack-Analyse: Zeitleiste des Nachkaufplans (Balken je Packung, Bestellstrich, Linie für heute). */
.stack-timeline { margin: 12px 0 16px; }
.stack-timeline .stack-chart-axis { text-align: center; }
.stack-timeline-track { cursor: pointer; }
.stack-timeline-track.is-dimmed .stack-timeline-bar { opacity: .25; }
.stack-timeline-track[aria-pressed="true"] { outline: 2px solid var(--text); outline-offset: 2px; }
.stack-timeline-track > .stack-timeline-order { position: absolute; top: -3px; bottom: -3px; width: 3px; height: auto; margin-left: -1.5px; background: var(--text); }
.stack-timeline-track > .stack-timeline-today { position: absolute; top: -6px; bottom: -6px; width: 0; height: auto; border-left: 2px dashed var(--muted); }
.reorder-axis { stroke: var(--border-strong); stroke-width: 1.5; }
.reorder-grid { stroke: var(--border); stroke-dasharray: 3 4; }
.reorder-label { fill: var(--muted); font-size: 12px; }
.reorder-line { fill: none; stroke: var(--link); stroke-width: 3; stroke-linejoin: round; }
.reorder-mark line { stroke-width: 2; stroke-dasharray: 5 4; }
.reorder-mark text { font-size: 12px; font-weight: 600; }
.reorder-mark.is-order line { stroke: var(--link); }
.reorder-mark.is-order text { fill: var(--link); }
.reorder-mark.is-today line { stroke: var(--text); }
.reorder-mark.is-today text { fill: var(--text); }
.reorder-mark.is-end line { stroke: var(--muted); }
.reorder-mark.is-end text { fill: var(--muted); }
.reorder-cursor line { stroke: var(--text); stroke-width: 1; opacity: 0.45; }
.reorder-cursor circle { fill: var(--surface); stroke: var(--link); stroke-width: 3; }
.analyse-list {
  list-style: none;
  margin: 12px 0;
  padding: 0;
}
.analyse-list li {
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  font-size: 14px;
}
@media (max-width: 1000px) {
  .analyse-product {
    grid-template-columns: 1fr 1fr;
  }
  .analyse-product .field:first-child {
    grid-column: 1 / -1;
  }
  .analyse-row {
    grid-template-columns: 1fr 1fr;
  }
  .analyse-row .field:first-child {
    grid-column: 1 / -1;
  }
  .analyse-row .field:nth-child(4) {
    grid-column: 1 / -1;
  }
  .analyse-row-actions {
    grid-column: 1 / -1;
  }
  .analyse-bar-row {
    grid-template-columns: minmax(0, 1fr) 5em;
  }
  .analyse-bar-row.is-amount {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .analyse-bar-track {
    grid-column: 1 / -1;
    order: 3;
  }
  .analyse-results {
    grid-template-columns: 1fr 1fr;
  }
}
/* Sehr schmale Bildschirme: eine Spalte, damit lange Wörter wie „Berechnungsmenge“ in den Beschriftungen Platz haben. */
@media (max-width: 360px) {
  .analyse-product {
    grid-template-columns: 1fr;
  }
}

.dose-buttons {
  flex-wrap: wrap;
}
@media (max-width: 620px) {
  .controls .field {
    max-width: 100%;
  }
  .controls select {
    max-width: 100%;
  }
  .results {
    grid-template-columns: 1fr;
  }
}
/* Shared navigation: native disclosure controls also work without JavaScript. */
.navigation { position: relative; align-items: flex-start; gap: 8px 24px; }
.navigation > a, .navigation > a.current, .nav-group > summary {
  display: block; padding: 10px 12px; min-height: 44px;
}
.navigation .nav-group { position: relative; margin: 0; padding: 0; background: transparent; border: 0; }
.nav-group > summary { display: list-item; list-style-position: inside; border-radius: var(--radius-sm); }

/* Gruppenzeichen in Menü und Startseite (Vorgabe des Nutzers vom 21.11.2026): nur per CSS am ersten Link der Gruppe erkannt,
   damit Menütexte, Parser und Prüfungen unverändert bleiben; „/ ""“ hält das Zeichen aus der Vorlese-Ausgabe heraus. */
.nav-group:has(a[href="multi.html"]) > summary::before, .home-category:has(a[href="multi.html"]) > h2::before { content: "🧮\a0"; content: "🧮\a0" / ""; }
.nav-group:has(a[href="meine-produkte.html"]) > summary::before, .home-category:has(a[href="meine-produkte.html"]) > h2::before { content: "📋\a0"; content: "📋\a0" / ""; }
.nav-group:has(a[href="aminosaeuren.html"]) > summary::before, .home-category:has(a[href="aminosaeuren.html"]) > h2::before { content: "🔧\a0"; content: "🔧\a0" / ""; }
.nav-group:has(a[href="naehrstoffe.html"]) > summary::before, .home-category:has(a[href="naehrstoffe.html"]) > h2::before { content: "💊\a0"; content: "💊\a0" / ""; }
.nav-group:has(a[href="anteil-duell.html"]) > summary::before, .home-category:has(a[href="anteil-duell.html"]) > h2::before { content: "🎲\a0"; content: "🎲\a0" / ""; }
/* Logo NSV (assets/logo.svg, Seitenverhältnis 2:1) klein vor „Start“: dekorativ per CSS, damit Linktext und Menüprüfungen unverändert bleiben. */
.navigation > a[href="index.html"] { display: inline-flex; align-items: center; gap: 8px; }
.navigation > a[href="index.html"]::before {
  content: ""; flex: none; width: 48px; height: 24px;
  background: url(assets/logo.svg) center / contain no-repeat;
}
.navigation > a:hover, .nav-group > summary:hover { background: var(--nav-hover); border-radius: var(--radius-sm); text-decoration: none; }
.nav-group > .current-group { background: var(--bg); text-decoration: underline; text-underline-offset: 4px; box-shadow: inset 0 0 0 1px var(--border); }
.nav-group-links {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0;
  width: max-content; min-width: 100%; max-width: min(320px, calc(100vw - 32px));
  padding: 6px; border: 1px solid var(--line, var(--border)); border-radius: var(--radius);
  background: var(--soft, var(--bg)); box-shadow: 0 10px 30px rgb(16 24 40 / 14%);
}
/* Die hinteren drei Gruppen (Tools, Nährstoffe, Spiele) klappen rechtsbündig auf, damit sie bei mittleren Breiten nicht über den Rand ragen. */
.nav-group:nth-last-of-type(-n+3) .nav-group-links { left: auto; right: 0; }
.nav-group-links a, .nav-group-links a.current { display: block; padding: 10px 12px; min-height: 44px; overflow-wrap: anywhere; border-radius: var(--radius-sm); }
.nav-group-links a:hover { background: var(--tint, var(--surface-2)); text-decoration: none; }
/* Gruppe „Nährstoffe“: Untergruppen Überblick, Vitamine, Mineralstoffe mit Zwischenüberschrift. Breit: Überblick oben, darunter
   Vitamine und Mineralstoffe nebeneinander in Spalten (von oben nach unten alphabetisch); das Fenster richtet sich an der ganzen
   Navigation aus, damit es nicht links über den Rand ragt. Schmal (bis 620 px): untereinander, einspaltig. */
.navigation .nav-group:has(.nav-group-columns) { position: static; }
.navigation .nav-group:nth-last-of-type(-n+3) .nav-group-columns { right: 16px; }
.nav-group-links.nav-group-columns {
  display: flex; flex-wrap: wrap; gap: 4px 20px; box-sizing: border-box;
  width: min(760px, calc(100vw - 32px)); min-width: 0; max-width: min(760px, calc(100vw - 32px)); padding: 8px 10px;
}
.nav-subgroup { flex: 1 1 auto; min-width: 0; }
.nav-subgroup:first-child { flex-basis: 100%; }
.nav-subheading { margin: 4px 12px 2px; font-size: 13px; font-weight: bold; color: var(--muted); }
.nav-subgroup-links { columns: 9em 3; column-gap: 4px; }
.nav-subgroup:first-child .nav-subgroup-links { columns: auto; display: flex; flex-wrap: wrap; gap: 0 4px; }
#nav-sub-vitamine + .nav-subgroup-links { columns: 7em 2; }
.nav-subgroup-links a { break-inside: avoid; }
/* Menüsuche (js/site-layout.js): Feld in der Navigation, Treffer im Stil der Menügruppen. */
.nav-search { position: relative; }
.nav-search input {
  box-sizing: border-box; width: 190px; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font: inherit;
}
.nav-search .nav-search-results { left: auto; right: 0; min-width: 260px; max-height: min(60vh, 420px); overflow-y: auto; }
.nav-search-group { color: var(--muted); font-size: 13px; margin-left: 4px; }
.nav-search-empty { margin: 0; padding: 10px 12px; color: var(--muted); }
.nav-entry { display: flex; align-items: center; gap: 6px; }
.nav-entry a { flex: 1; }
.data-navigation { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin: 16px 0; }
.data-navigation a { padding: 10px 12px; min-height: 44px; border-radius: 5px; }
.data-navigation .current { background: var(--tint, var(--surface-2)); font-weight: bold; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 620px) {
  .navigation { display: block; padding: 8px 12px; }
  .navigation > a { width: fit-content; }
  .nav-group-links, .nav-group:last-of-type .nav-group-links {
    position: static; width: 100%; max-width: 100%; box-shadow: none; margin: 4px 0 8px;
  }
  .nav-group-links.nav-group-columns { display: block; width: 100%; max-width: 100%; }
  .nav-subgroup-links, #nav-sub-vitamine + .nav-subgroup-links { columns: 2; }
  .nav-subgroup:first-child .nav-subgroup-links { display: block; }
  .nav-subgroup + .nav-subgroup { margin-top: 6px; }
  .nav-search { margin: 6px 0; }
  .nav-search input { width: 100%; }
  .nav-search .nav-search-results { box-sizing: border-box; min-width: 0; max-height: none; }
}
/* Existing neutral action style is secondary; only save and delete need distinct roles. */
.calculator-actions button, .table-actions button, .product-nav button,
.analyse-row-actions button, .amount-controls button, .controls .field > button {
  min-height: 44px; min-width: 44px;
}
.calculator-actions .btn-primary { background: var(--flavor, var(--brand)); color: #fff; border-color: var(--flavor, var(--brand)); }
.calculator-actions .btn-danger { color: var(--danger); border-color: var(--danger); background: var(--danger-bg); }
.analyse-row-actions button, .el-row button { border-radius: var(--radius-sm); }
button:disabled { cursor: not-allowed; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger);
}
input:disabled, select:disabled, textarea:disabled { background: var(--surface); color: var(--muted); border-style: dashed; }
.amount-controls { flex-wrap: wrap; }
.controls .field { min-width: 0; }
.results > div { min-width: 0; overflow-wrap: anywhere; }

#blood-search-controls .field:first-child {
  flex: 1 1 360px;
  max-width: 560px;
}
#blood-search {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
}
@media (max-width: 600px) {
  #blood-search-controls .field:first-child { flex-basis: 100%; }
}

/* Nährstoffvergleich: vorhandene Übersichtsdaten, gemeinsame logarithmische Skala. */
.nutrient-explorer { --flavor: #2f5d8a; --soft: #f2f6fb; --line: #a9c0d8; margin: 32px 0 48px; }
.nutrient-explorer > h2 { text-align: left; margin-bottom: 12px; }
.compare-tools { margin: 24px 0 12px; padding: 20px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); }
.compare-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.compare-filters legend { font-weight: bold; margin-bottom: 10px; }
.compare-filters button, #compare-reset { padding: 9px 12px; min-height: 42px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--accent-text); }
.compare-filters button[aria-pressed="true"] { background: var(--flavor); color: white; border-color: var(--flavor); text-decoration: underline; text-underline-offset: 4px; }
.compare-options { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin-top: 18px; }
.compare-options .field { flex: 1 1 180px; min-width: 0; }
.compare-options .field:last-of-type { flex-basis: 145px; }
.compare-options input, .compare-options select { width: 100%; }
#compare-reset:disabled { opacity: .5; cursor: default; }
#compare-count { font-size: 14px; color: var(--muted); }
.compare-axis, .compare-rows a { display: grid; grid-template-columns: minmax(185px, 1.15fr) minmax(0, 2.5fr) minmax(115px, .8fr); gap: 20px; }
.compare-axis { position: sticky; top: 0; z-index: 2; padding: 18px 14px 30px; background: var(--bg); border-block: 1px solid var(--line); font-size: 12px; }
.compare-axis > span:last-child { text-align: right; }
.compare-ticks { position: relative; height: 18px; margin: 0 6px; }
.compare-ticks span { position: absolute; white-space: nowrap; transform: translateX(-50%); }
.compare-ticks span:first-child { transform: none; }
.compare-ticks span:last-child { transform: translateX(-100%); }
.compare-rows, .compare-missing { padding: 0; margin: 0; list-style: none; }
.compare-rows a, .compare-missing a { padding: 18px 14px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--border); align-items: center; }
.compare-name { font-weight: bold; min-width: 0; }
.compare-name small, .compare-value small { display: block; font-size: 12px; font-weight: normal; color: var(--muted); line-height: 1.4; margin-top: 4px; }
.compare-value { text-align: right; font-weight: bold; font-variant-numeric: tabular-nums; }
.compare-track { position: relative; height: 40px; margin: 0 6px; background: repeating-linear-gradient(to right, #a9c0d866 0 1px, transparent 1px var(--compare-step)); border-right: 1px solid #a9c0d866; }
.is-ready .has-reference .compare-track::before { content: ''; position: absolute; top: 19px; left: 0; width: var(--compare-position); height: 2px; background: #a9c0d8; }
.is-ready .has-reference .compare-track::after { content: ''; position: absolute; left: var(--compare-position); top: 13px; width: 14px; height: 14px; transform: translateX(-50%); background: var(--flavor); border: 2px solid var(--bg); border-radius: 50%; box-shadow: 0 0 0 1px var(--flavor); }
.compare-rows [data-category="Mineralstoffe"] { --flavor: #42645a; }
.compare-rows [data-category="Spurenelemente"] { --flavor: #5d3a8c; }
.compare-rows [data-category="Mineralstoffe"] .compare-track::after { border-radius: 2px; }
.compare-rows [data-category="Spurenelemente"] .compare-track::after { border-radius: 0; transform: translateX(-50%) rotate(45deg); }
.compare-rows a:hover, .compare-rows a:focus-visible, .compare-missing a:hover { background: var(--soft); }
.compare-rows a:hover .compare-name, .compare-rows a:focus-visible .compare-name { text-decoration: underline; }
.compare-missing a { display: flex; justify-content: space-between; gap: 16px; }
.is-compact .compare-rows a { padding-block: 7px; }
.is-compact .compare-track { height: 28px; }
.is-compact .compare-track::before { top: 13px !important; }
.is-compact .compare-track::after { top: 7px !important; }
.nutrient-explorer [hidden] { display: none; }
@media (max-width: 620px) {
  .compare-tools { padding: 12px; }
  .compare-options { gap: 12px; }
  .compare-axis { display: block; padding: 12px 14px 22px; }
  .compare-axis > span { display: none; }
  .compare-rows a { grid-template-columns: minmax(0, 1fr) minmax(80px, .65fr); gap: 8px; padding: 14px; }
  .compare-track { grid-column: 1 / -1; grid-row: 2; height: 30px; }
  .compare-value { grid-column: 2; grid-row: 1; }
  .is-ready .has-reference .compare-track::before { top: 14px; }
  .is-ready .has-reference .compare-track::after { top: 8px; }
  .compare-ticks span { font-size: 10px; }
}
.compare-missing .compare-track { display: none; }

.price-comparison .stack-card legend { font-size: 21px; font-weight: bold; }
.price-comparison .field { margin: 14px 0; min-width: 0; }
.price-comparison .field input, .price-comparison .field select { width: 100%; min-width: 0; }
.price-comparison .controls { margin-top: 20px; gap: 16px; }
.price-comparison .controls .field { flex: 1 1 170px; max-width: 260px; margin: 0; }
.price-comparison #price-reset, .price-comparison #price-share { height: 42px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.price-comparison [aria-invalid="true"] { border: 2px solid var(--danger); }
.price-comparison-page #price-results[hidden] { display: none; }
.price-comparison-page .results > div { min-width: 0; overflow-wrap: anywhere; }
.price-comparison-page .results small { display: block; margin-top: 10px; }
.price-comparison-page .results small:empty { display: none; }
/* Günstigstes Produkt im Preisvergleich: Rahmen statt Farbe allein, der Text „Rechnerisch am günstigsten“ steht zusätzlich in der Kachel. */
.price-comparison-page .results > .price-cheapest { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: var(--radius-sm); }
.price-comparison .stack-card .calculator-actions { justify-content: flex-end; margin: 8px 0 0; }

/* Begriffsliste (begriffe.html): Begriff fett, Erklärung eingerückt; Sprungziele bleiben unter der Kopfzeile sichtbar. */
.glossary { margin: 24px 0; }
.glossary dt { font-weight: bold; font-size: 18px; margin-top: 22px; scroll-margin-top: 80px; }
.glossary dt dfn { font-style: normal; }
.glossary dd { margin: 6px 0 0; padding-left: 14px; border-left: 3px solid var(--border-strong); overflow-wrap: anywhere; }
.glossary dd ul { margin: 6px 0; padding-left: 20px; }
.glossary dt:target { color: var(--brand); }
/* Periodensystem (periodensystem.html): 18 gleich breite Gruppenspalten, Elemente mit Nährstoffseite als hervorgehobene Links;
   auf schmalen Bildschirmen seitlich verschiebbar statt unlesbar klein. */
.pse-scroll { position: relative; max-width: 100%; overflow-x: auto; margin: 16px 0; }
.pse { table-layout: fixed; min-width: 900px; border-collapse: separate; border-spacing: 2px; }
.pse caption { caption-side: bottom; font-size: 13px; color: var(--muted); padding-top: 6px; }
.pse th, .pse td { padding: 0; border: 0; white-space: normal; text-align: center; vertical-align: middle; }
.pse thead { background: none; }
.pse thead th, .pse tbody th { font-size: 11px; font-weight: normal; color: var(--muted); }
.pse thead th:first-child, .pse tbody th { width: 34px; }
.pse tbody tr:hover { background: none !important; }
.pse td:not(:empty) { border: 1px solid var(--border); border-radius: 4px; background: var(--surface); color: var(--muted); height: 52px; }
.pse td.pse-ref { font-size: 11px; border-style: dashed; background: none; }
.pse td.pse-page { color: var(--text); }
/* Stufen: Farbe und Rahmenart (durchgezogen, gestrichelt, gepunktet), damit sie auch ohne Farbsehen unterscheidbar sind. */
.pse td.pse-nrv, .pse-swatch.pse-nrv { background: var(--pse-nrv-bg); border: 2px solid var(--pse-nrv-line); }
.pse td.pse-nem, .pse-swatch.pse-nem { background: var(--pse-nem-bg); border: 2px dashed var(--pse-nem-line); }
.pse td.pse-other, .pse-swatch.pse-other { background: var(--pse-other-bg); border: 2px dotted var(--pse-other-line); }
.pse td.pse-part, .pse-swatch.pse-part { background: var(--pse-part-bg); border: 3px double var(--pse-part-line); }
.pse-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; padding: 0; margin: 12px 0; list-style: none; font-size: 14px; }
.pse-legend li { display: flex; align-items: center; gap: 8px; }
/* Legende als Filter (js/periodensystem.js): Einträge als Umschaltknöpfe; aktiv sind die Elemente anderer Stufen blasser. */
.pse-filter { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 10px; border: 1px solid transparent; border-radius: var(--radius-sm); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pse-filter:hover { background: var(--surface-2); }
.pse-filter[aria-pressed="true"] { border-color: var(--border-strong); background: var(--surface-2); font-weight: bold; }
.pse td.pse-dim { opacity: .25; }
/* Die Filterknöpfe (.pse-filter) nutzt auch vitaminformen.html. */

/* Mineralstoffverbindungen (js/mineralstoffverbindungen.js): Matrix Element × Verbindung, erste Spalte bleibt beim Scrollen stehen. */
.vm-scroll { position: relative; max-width: 100%; overflow-x: auto; margin: 12px 0; }
.vm-matrix { border-collapse: separate; border-spacing: 2px; font-size: 13px; margin: 0 auto; }
.vm-matrix th, .vm-matrix td { padding: 0; text-align: center; vertical-align: middle; border: 0; }
.vm-matrix thead th { padding: 4px 2px; font-size: 12px; font-weight: 600; color: var(--muted); vertical-align: bottom; }
.vm-matrix tbody th { position: sticky; left: 0; z-index: 1; padding: 4px 10px 4px 4px; font-weight: 600; text-align: left; background: var(--bg, var(--surface)); white-space: nowrap; }
.vm-matrix thead th.vm-corner { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--bg, var(--surface)); }
.vm-matrix td { min-width: 64px; height: 40px; border-radius: var(--radius-sm); background: var(--surface); }
.vm-matrix td.vm-empty { background: transparent; border: 1px dotted var(--border); }
.vm-value { display: flex; flex-direction: column; justify-content: center; min-height: 40px; padding: 2px 3px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; line-height: 1.2; }
.vm-value + .vm-value { margin-top: 2px; }
.vm-value:hover, .vm-value:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.vm-pct { font-weight: 600; }
.vm-form { font-size: 10px; opacity: .85; }
.vm-l1, .vm-swatch.vm-l1 { background: var(--vm-1); }
.vm-l2, .vm-swatch.vm-l2 { background: var(--vm-2); }
.vm-l3, .vm-swatch.vm-l3 { background: var(--vm-3); }
.vm-l4, .vm-swatch.vm-l4 { background: var(--vm-4); }
.vm-l5, .vm-swatch.vm-l5 { background: var(--vm-5); }
a.vm-value.vm-l5 { color: var(--vm-5-text); }
.vm-scale { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 0; margin: 8px 0 12px; list-style: none; font-size: 14px; }
.vm-scale li { display: flex; align-items: center; gap: 6px; }
.vm-swatch { display: inline-block; width: 22px; height: 16px; border: 1px solid var(--border-strong); border-radius: 3px; }
/* Unter 980 px (Matrix braucht rund 870 px): statt seitlich zu scrollen je Verbindung ein Block; leere Zellen entfallen,
   jedes Feld trägt den Elementnamen. */
@media (max-width: 979px) {
  .vm-scroll { overflow-x: visible; }
  .vm-matrix, .vm-matrix tbody, .vm-matrix tr, .vm-matrix tbody th { display: block; }
  .vm-matrix { border-spacing: 0; }
  .vm-matrix thead { display: none; }
  .vm-matrix tr { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .vm-matrix tbody th { position: static; flex-basis: 100%; padding: 0 0 2px; background: none; }
  .vm-matrix td.vm-empty { display: none; }
  .vm-matrix td { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; height: auto; background: none; }
  .vm-matrix td .vm-value { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 6px; min-height: 32px; padding: 4px 8px; }
  .vm-value + .vm-value { margin-top: 0; }
  .vm-matrix td .vm-value::before { content: attr(data-element); font-weight: 600; }
}
.vm-annex { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 24px; margin: 12px 0; }
.vm-annex-group h3 { margin: 8px 0 4px; font-size: 17px; }
.vm-count { font-weight: normal; color: var(--muted); font-size: 14px; }
.vm-annex-group ul { margin: 0; padding-left: 20px; font-size: 14px; }
.vm-annex-share { color: var(--muted); font-size: 13px; }

/* Vitaminformen (js/vitaminformen.js): Kacheln je Vitamin, Filter wie die Legende des Periodensystems. */
.vf-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; margin: 12px 0; }
.vf-filters .pse-filter { border-color: var(--border-strong); }
.vf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin: 12px 0; }
.vf-tile { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); transition: opacity .15s; }
/* Aminosäuren-Tafel (js/aminosaeuren-tafel.js): je Gruppe der Seitenkette eine Zeile mit Kacheln, Gruppenfarbe als linker Rand. */
.as-group { margin: 14px 0; padding-left: 10px; border-left: 4px solid var(--border-strong); }
.as-group h3 { margin: 0 0 6px; font-size: 16px; }
.as-unpolar { border-left-color: var(--pse-other-line); }
.as-aromatisch { border-left-color: var(--pse-part-line); }
.as-polar { border-left-color: var(--pse-nem-line); }
.as-positiv { border-left-color: var(--pse-nrv-line); }
.as-negativ { border-left-color: var(--link); }
.as-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.as-tile { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 13px; line-height: 1.3; transition: opacity .15s; }
.as-tile[data-essential="ja"] { border: 2px solid var(--pse-nrv-line); }
.as-tile p { margin: 0; }
.as-codes { display: flex; justify-content: space-between; align-items: baseline; }
.as-c3 { font-size: 20px; font-weight: 700; }
.as-c1 { font-size: 14px; font-weight: 600; color: var(--muted); }
.as-name { margin: 0 0 2px; font-size: 14px; }
.as-formula, .as-mass { color: var(--muted); }
.as-tag { margin-top: 4px !important; }
.as-tile[data-essential="ja"] .as-tag { font-weight: 600; }
.as-ref { margin-top: 4px !important; font-size: 12px; }
:target.as-tile { outline: 3px solid var(--link); outline-offset: 2px; }
/* Farbproben der Legende (js/tile-filter.js), gleiche Rahmen wie die Kacheln. */
.tile-swatch { display: inline-block; width: 22px; height: 16px; border-radius: 3px; background: var(--surface); }
.as-sw-ess { border: 2px solid var(--pse-nrv-line); }
.as-sw-non { border: 1px solid var(--border-strong); }
/* Blasse Kacheln bei aktivem Filter (js/tile-filter.js). */
.tile-dim { opacity: .3; }
.vf-tile h3 { margin: 0 0 4px; font-size: 18px; }
.vf-tag { display: inline-block; margin: 0 0 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--border-strong); }
.vf-tag.vf-fett { background: var(--pse-other-bg); border-color: var(--pse-other-line); }
.vf-tag.vf-wasser { background: var(--pse-nem-bg); border-color: var(--pse-nem-line); }
.vf-facts { margin: 0 0 6px; font-size: 14px; }
.vf-facts span { display: block; }
.vf-forms-title { margin: 6px 0 2px; font-size: 13px; color: var(--muted); }
.vf-forms { margin: 0; padding-left: 18px; font-size: 14px; }
.vf-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.pse-swatch { flex: none; display: inline-block; width: 26px; height: 20px; box-sizing: border-box; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); }
.pse-el { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 50px; padding: 2px 1px; box-sizing: border-box; }
a.pse-el { color: inherit; text-decoration: none; border-radius: 3px; }
a.pse-el:hover, a.pse-el:focus-visible { background: var(--row-hover); outline: 2px solid var(--link); outline-offset: 1px; }
.pse-z { font-size: 9px; line-height: 1.1; }
.pse-sym { font-size: 15px; font-weight: bold; line-height: 1.2; }
.pse-name { font-size: 8.5px; line-height: 1.1; max-width: 100%; overflow-wrap: normal; hyphens: manual; }
/* Atommasse und NRV stehen nur für Bildschirmleser im Linktext; sichtbar werden sie im Infokasten. */
.pse-mass, .pse-nrv-value { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Infokasten in der freien Fläche (breit, bei Maus oder Tastaturfokus) und unter der Tabelle (Handy, nach Tipp), js/periodensystem.js. */
.pse td.pse-info { vertical-align: top; text-align: left; padding: 4px 14px; font-size: 13px; line-height: 1.35; color: var(--text); }
.pse-info p { margin: 1px 0; }
.pse-info .pse-detail-title { font-size: 16px; }
.pse-info-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 12px; }
.pse-info .pse-compounds-line { font-size: 12px; line-height: 1.3; margin-top: 3px; }
.pse-compounds-title { font-size: 12px; color: var(--muted); }
.pse-compounds { columns: 11em 3; column-gap: 14px; margin: 0 0 2px; padding-left: 16px; font-size: 12px; line-height: 1.3; }
.pse-compounds li { break-inside: avoid; }
.pse-info .pse-detail-links a { min-height: 24px; }
.pse td.pse-selected { outline: 2px solid var(--text); outline-offset: 1px; }
.pse-detail { margin: 8px 0 16px; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.pse-detail p { margin: 4px 0; }
.pse-detail-title { font-size: 18px; font-weight: bold; }
.pse-detail-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.pse-detail-links a { display: inline-flex; align-items: center; min-height: 44px; }
/* Handy: Das Raster passt auf die Breite und zeigt nur Symbole; Ordnungszahl, Name, Atommasse und NRV bleiben für Bildschirmleser
   im Linktext und erscheinen nach einem Tipp im Infokasten. Die Stufen bleiben an Farbe und Rahmenart erkennbar. */
@media (max-width: 620px) {
  .pse-scroll { overflow-x: visible; max-width: none; margin-inline: -10px; }
  .pse { min-width: 0; width: 100%; border-spacing: 1px; }
  .pse thead th, .pse tbody th { font-size: 8px; }
  .pse thead th:first-child, .pse tbody th { width: 8px; }
  .pse tbody th.pse-f-label { font-size: 7px; padding-right: 2px; line-height: 1.1; }
  .pse td:not(:empty) { height: 30px; border-radius: 2px; }
  .pse td.pse-nrv, .pse td.pse-nem, .pse td.pse-other { border-width: 1.5px; }
  .pse td.pse-part { border-width: 3px; }
  .pse-el { min-height: 0; padding: 0; cursor: pointer; }
  .pse-sym { font-size: 10px; }
  .pse-z, .pse-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pse td.pse-info > * { display: none; }
  .pse td.pse-ref span { font-size: 0; }
  .pse td.pse-ref span::after { content: "*"; font-size: 10px; }
}
.pse .pse-gap td { height: 8px; border: 0; background: none; }
.pse tbody th.pse-f-label { font-size: 11px; text-align: right; padding-right: 6px; hyphens: manual; }
/* Startseite „Was möchtest Du tun?“: Suchfeld mit aufklappender Trefferliste (Pulldown) über dem folgenden Inhalt. */
.home-tasks { margin-top: 24px; }
.home-search { position: relative; max-width: 640px; margin: 0 auto; }
.home-search input { width: 100%; font-size: 1.05em; }
.home-search-results { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; max-height: min(60vh, 440px); overflow-y: auto; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg); box-shadow: 0 10px 30px rgb(16 24 40 / 14%); overflow-wrap: anywhere; }
.home-search-results a.home-search-hit { display: block; padding: 10px 12px; }
.home-search-results a.home-search-hit:hover, .home-search-results a.home-search-hit:focus-visible { background: var(--surface-2); }
.home-search-label { margin: 0; padding: 8px 12px 2px; color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.home-search-label ~ .home-search-label { border-top: 1px solid var(--border); margin-top: 4px; }
.home-search-note, .home-search-contact { margin: 0; padding: 10px 12px; color: var(--muted); }
.home-search-contact { border-top: 1px solid var(--border); }
.home-search-results > .home-search-contact:first-child { border-top: 0; }
.home-category { margin-top: 36px; }
/* Startseite linksbündig wie ein Inhaltsverzeichnis: Kopf mit Logo, kurzer Einstieg, Listen statt Kacheln. */
.home-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 16px 0 8px; }
.home h1, .home h2 { text-align: left; }
.home h1 { margin: 0; font-size: clamp(24px, 7vw, 32px); letter-spacing: 0; min-width: 0; overflow-wrap: anywhere; }
.home h2 { font-size: 21px; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--text); }
.home-lead { max-width: 62ch; margin: 0 0 24px; font-size: 17px; line-height: 1.6; }
.home-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); column-gap: 32px; }
.home-list li { padding: 9px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.home-list a { font-weight: 600; }
.home-list span { display: block; color: var(--muted); font-size: 15px; line-height: 1.45; }
.home-category .stack-card h3 { color: var(--flavor-text, var(--flavor, var(--text))); font-size: 20px; line-height: 1.3; margin: 0 0 12px; text-align: left; }
/* Produktkacheln der Startseite: Die Überschrift ist der Link, die ganze Kachel ist per ::after anklickbar (seit 21.11.2026 ohne „Zum …“-Zeile). */
.home-category .stack-card { position: relative; }
.home-category .stack-card h3 a { color: inherit; }
.home-category .stack-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.home-category .stack-card:hover h3 a { text-decoration: underline; }
.home-category .stack-card h3 a:focus-visible { outline: none; }
.home-category .stack-card:has(h3 a:focus-visible) { outline: 3px solid var(--link); outline-offset: 2px; }
.home-category .stack-card p:last-child { margin-bottom: 0; }
.home-nutrient-links { margin: 14px 0 0; line-height: 1.8; }
.home .affiliate-intro { margin: 0 0 12px; text-align: left; }

.eaa-visual { margin: 28px 0; padding: 20px 0; border-block: 1px solid var(--border); }
.eaa-visual > h3 { text-align: left; }
.eaa-visual .controls { justify-content: flex-start; gap: 20px; }
.eaa-bars { list-style: none; margin: 0; padding: 0; }
.eaa-bars li { display: grid; grid-template-columns: minmax(180px,1.2fr) minmax(0,2fr) 95px; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.eaa-bar-name { font-weight: bold; }
.eaa-bar-track { height: 24px; background: var(--surface-2); border-radius: 3px; }
.eaa-bar-track > span { display: block; height: 100%; background: #2f5d8a; border-radius: 3px; }
.eaa-bars .is-bcaa .eaa-bar-track > span { background: #42645a; }
.eaa-bars strong { text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 620px) {
  .eaa-bars li { grid-template-columns: minmax(0,1fr) 95px; gap: 8px; }
  .eaa-bar-track { grid-column: 1 / -1; grid-row: 2; }
  .eaa-bars strong { grid-column: 2; grid-row: 1; }
}
.eaa-visual .results { margin-bottom: 16px; }
.eaa-visual .results > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 620px) { .eaa-visual .results { grid-template-columns: 1fr; } }
.eaa-bar-reference { display: block; margin-top: 5px; font-size: 13px; line-height: 1.4; font-weight: normal; color: var(--muted); }
/* Two textual bases inside one continuous amount bar. */
.eaa-bars li { grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr); }
.eaa-bar-track { position: relative; display: grid; grid-template-columns: 1fr 1fr; height: auto; min-height: 46px; overflow: hidden; }
.eaa-bar-track > .eaa-bar-fill { position: absolute; top: 0; left: 0; height: 100%; opacity: .2; }
.eaa-bar-track > .eaa-bar-reference, .eaa-bar-track > .eaa-bar-amount { position: relative; display: flex; align-items: center; justify-content: center; padding: 10px 8px; margin: 0; height: auto; width: auto; background: transparent; border-radius: 0; color: var(--text); font-size: 14px; line-height: 1.4; text-align: center; }
.eaa-bar-track > .eaa-bar-amount { border-left: 1px solid var(--border-strong); }
.eaa-bars .is-bcaa .eaa-bar-track > .eaa-bar-reference, .eaa-bars .is-bcaa .eaa-bar-track > .eaa-bar-amount { background: transparent; }
@media (max-width: 620px) {
  .eaa-bars li { grid-template-columns: minmax(0, 1fr); }
  .eaa-bar-track { grid-column: 1; grid-row: auto; }
  .eaa-bars .eaa-bar-amount { grid-column: 2; grid-row: 1; }
}
/* One proportional quantity bar; captions are independent of its length. */
.eaa-bars li { grid-template-columns: minmax(185px, 1.1fr) minmax(0, 1.8fr) minmax(110px, .7fr); }
.eaa-bar-track { display: block; height: 26px; min-height: 0; }
.eaa-bar-track > .eaa-bar-fill { opacity: 1; }
.eaa-bars > li > .eaa-bar-amount { font-size: 14px; line-height: 1.4; }
@media (max-width: 620px) {
  .eaa-bars li { grid-template-columns: minmax(0, 1fr) minmax(90px, .65fr); }
  .eaa-bar-track { grid-column: 1 / -1; grid-row: 2; }
  .eaa-bars > li > .eaa-bar-amount { grid-column: 2; grid-row: 1; }
}
.eaa-visual > h3, .eaa-visual > p:first-of-type { text-align: center; }
.eaa-visual .controls { justify-content: center; }
/* Visual midpoint belongs to the proportional fill, not the full track. */
.eaa-bar-track > .eaa-bar-fill { position: absolute; background: linear-gradient(to right, #6688aa 0 50%, #2f5d8a 50% 100%); }
.eaa-bars .is-bcaa .eaa-bar-track > .eaa-bar-fill { background: linear-gradient(to right, #78948c 0 50%, #42645a 50% 100%); }
.eaa-bar-fill::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--bg); }
.eaa-bar-hover { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: center; opacity: 0; pointer-events: none; font-size: 12px; line-height: 1.3; text-align: center; color: var(--text); text-shadow: 0 0 3px var(--bg), 0 0 5px var(--bg); }
.eaa-bar-hover span { padding: 2px 4px; }
.eaa-bar-track:hover .eaa-bar-hover, .eaa-bar-track:focus-visible .eaa-bar-hover { opacity: 1; }
.eaa-bar-track:has(.eaa-bar-hover) { height: 42px; }
.eaa-filter legend { font-weight: bold; margin-bottom: 8px; }



.eaa-visual .eaa-export-actions { justify-content: flex-end; }
.eaa-bar-share { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--muted); font-weight: normal; }

.mix-part { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr) auto; gap: 16px; align-items: end; margin: 16px 0; }
.mix-part legend { font-weight: bold; }
.mix-part input { width: 100%; min-width: 0; }
.mix-part button { min-height: 42px; }
.mix-page [aria-invalid="true"] { border: 2px solid var(--danger); }
.mix-table-wrap { overflow-x: auto; }
.mix-table-wrap th, .mix-table-wrap td { white-space: normal; overflow-wrap: anywhere; }
/* Mineralwasser-Rechner: Eingabe- und Ergebnistabelle scrollen bei Bedarf in ihrem Rahmen, nicht die Seite. */
.water-input-wrap, .water-result-wrap { max-width: 100%; overflow-x: auto; margin: 16px 0; }
.water-input { width: 100%; min-width: 300px; table-layout: fixed; }
.water-input th { text-align: left; }
.water-input th[scope="row"] { width: 36%; font-weight: normal; overflow-wrap: break-word; hyphens: auto; }
.water-input td { padding: 4px; }
.water-input input { width: 100%; min-width: 0; box-sizing: border-box; }
.water-page .unit { color: var(--muted); font-size: 0.9em; white-space: nowrap; }
.water-result-wrap th, .water-result-wrap td { white-space: normal; overflow-wrap: break-word; hyphens: auto; text-align: left; }
.water-page [aria-invalid="true"] { border: 2px solid var(--danger); }
.csv-export-actions { justify-content: flex-end; }
button.csv-button { padding: 9px 15px; border: 1px solid var(--line, var(--border-strong)); background: var(--soft, var(--surface-2)); border-radius: var(--radius-sm); min-height: 44px; min-width: 44px; }
.storage-table-wrap { overflow-x: auto; }
.storage-page table { table-layout: fixed; min-width: 640px; }
.storage-page th:nth-child(2), .storage-page td:nth-child(2) { width: 200px; }
.storage-page .storage-usage ul { margin: 0; padding: 0; list-style: none; }
.storage-page .storage-usage li + li { margin-top: 8px; }
.storage-page th, .storage-page td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; text-align: left; }
.storage-page th:first-child, .storage-page td:first-child { width: 128px; white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.storage-page pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; font-weight: normal; text-align: left; margin: 8px 0 0; min-height: 1.5em; }
.storage-page .storage-key { display: block; }
.storage-page .storage-entry-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.storage-page .storage-entry-heading .storage-key { min-width: 0; }
.storage-page .storage-delete { flex: 0 0 44px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--danger); border-radius: 5px; background: var(--danger-bg); color: var(--danger); }
.storage-page .storage-value-note { margin: 8px 0 0; font-size: 13px; font-weight: normal; }
.storage-page .storage-entry-row > td, .storage-page .storage-entry-row > th { border-bottom: 0; }
.storage-page .storage-value-row > td { width: auto; white-space: normal; overflow-wrap: anywhere; word-break: normal; padding-top: 0; }
.storage-page .storage-value-row .storage-value-note { margin-top: 0; }
.storage-page input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; padding: 0; margin: 0; vertical-align: middle; }
.storage-page thead th { vertical-align: middle; line-height: 24px; }
.storage-page .storage-selection-header { display: flex; align-items: center; gap: 6px; white-space: nowrap; min-height: 24px; margin: 0; line-height: 24px; }
.storage-page .storage-selection-header input { flex: 0 0 20px; margin: 0; }
.storage-page .storage-entry-row > td:first-child input { display: block; margin-top: 2px; }
.storage-page input[type="file"] { max-width: 100%; }
.storage-page .storage-export-actions { justify-content: flex-end; }
@media (max-width: 700px) {
  /* Beide Speichertabellen passen in die mobile Breite; Rohwerte bleiben vollständig sichtbar. */
  .storage-page table { min-width: 0; width: 100%; font-size: 13px; }
  .storage-page th, .storage-page td { padding: 8px 6px; }
  .storage-page thead th:first-child, .storage-page .storage-entry-row > td:first-child { width: 100px; }
  .storage-page th:nth-child(2), .storage-page td:nth-child(2) { width: 26%; }
  .storage-page .storage-entry-heading { flex-wrap: wrap; }
  .storage-page .storage-entry-heading .storage-key { flex: 1 1 100%; }
  .storage-page .storage-value-row > td { width: auto; padding-top: 0; }
}
@media(max-width:620px) { .mix-part { grid-template-columns: minmax(0,1fr); } .mix-part button { justify-self: end; } }

/* Knopf ☰ des Menüs „Einstellungen und Infos“. Ohne JavaScript verborgen. */
.site-menu-button {
  min-width: 44px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}
.site-menu { position: relative; }
.site-menu-button[aria-expanded="true"] { background: var(--nav-hover, var(--surface-2)); }
.site-menu-panel {
  position: absolute; z-index: 40; top: calc(100% + 6px); right: 0;
  /* Breite in Fensterbreite minus Rand; bei vergrößerter Schrift (zoom) durch den Faktor geteilt, damit sie im Fenster bleibt. */
  box-sizing: border-box; width: min(340px, calc((100vw - 24px) / var(--font-zoom, 1)));
  padding: 12px; border: 1px solid var(--line, var(--border)); border-radius: var(--radius);
  background: var(--soft, var(--bg)); color: var(--text); box-shadow: 0 10px 30px rgb(16 24 40 / 14%);
  font-weight: normal; text-align: left;
}
.site-menu-heading { margin: 0 0 8px; font-weight: bold; }
.site-menu-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
/* Auswahl aus mehreren Knöpfen (Farbschema, Schriftgröße, Offline): gedrückte Wahl hervorgehoben. */
.site-menu-choice { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.site-menu-choice button { min-height: 44px; min-width: 44px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font: inherit; }
.site-menu-choice button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: bold; }
.site-menu-choice button:disabled { opacity: .55; }
.site-menu-choice output { min-width: 4.5em; text-align: center; }
.site-menu-offline { padding: 6px 0 8px; border-bottom: 1px solid var(--border); }
.site-menu-offline-heading { margin: 0; }
.site-menu-info { margin: 8px 0; font-size: 14px; }
.site-menu-info > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.site-menu-info dt { color: var(--muted); }
.site-menu-info dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.site-menu-copy { width: 100%; min-height: 44px; }
.site-menu-status { margin: 6px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.site-menu-status:empty { display: none; }
.site-menu-links { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.site-menu-links a { display: block; padding: 10px 12px; min-height: 44px; box-sizing: border-box; border-radius: var(--radius-sm); }
.site-menu-links a:hover { background: var(--tint, var(--surface-2)); text-decoration: none; }
.site-menu [hidden] { display: none; }
/* Schriftgröße aus dem Menü ☰ (theme.js setzt data-font-scale): vergrößert die ganze Seite wie der Browser-Zoom,
   weil viele Größen in px angegeben sind. Nur am Bildschirm; gedruckt wird in Normalgröße. */
@media screen {
  :root[data-font-scale="90"] { --font-zoom: 0.9; }
  :root[data-font-scale="110"] { --font-zoom: 1.1; }
  :root[data-font-scale="125"] { --font-zoom: 1.25; }
  :root[data-font-scale] body { zoom: var(--font-zoom); }
}
@media (max-width: 620px) {
  .navigation .site-menu { position: absolute; top: 8px; right: 12px; }
  .site-menu-panel { right: 0; }
}
/* Menü am Handy eingeklappt: nur „Start“, „Menü“ und ☰ in einer Zeile. Die Klasse „js“ setzt js/theme.js im Kopf, also vor dem
   ersten Zeichnen (kein Sprung); den Knopf setzt js/site-layout.js (enhanceNavToggle) absolut positioniert ein.
   Ohne JavaScript fehlen Klasse und Knopf, das Menü bleibt offen. */
.nav-toggle { display: none; }
@media (max-width: 620px) {
  .navigation .nav-toggle {
    display: block; position: absolute; top: 8px; right: 68px; min-height: 44px; padding: 8px 16px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font: inherit; font-weight: 600;
  }
  .navigation .nav-toggle[aria-expanded="true"] { background: var(--surface-2); }
  :root.js .navigation:not(.nav-open) > .nav-group,
  :root.js .navigation:not(.nav-open) > .nav-search { display: none; }
}

/* Dunkelmodus: theme.js setzt data-theme am Wurzelelement (gespeicherte Wahl, sonst Systemeinstellung).
   Nur am Bildschirm: Gedruckt wird immer hell, weil Browser Hintergründe beim Druck weglassen und helle Schrift auf Papier unlesbar wäre. */
@media screen {
:root[data-theme="dark"] {
  color-scheme: dark;
  --pse-nrv-bg: #1f3421;
  --pse-nrv-line: #8cc47f;
  --pse-nem-bg: #1b2a3c;
  --pse-nem-line: #85b6f0;
  --pse-other-bg: #3b2914;
  --pse-other-line: #e3a462;
  --pse-part-bg: #3a2230;
  --pse-part-line: #d99bb8;
  --vm-1: #1b2430;
  --vm-2: #1f3450;
  --vm-3: #284a78;
  --vm-4: #3566a5;
  --vm-5: #7fb0ec;
  --vm-5-text: #0b121a;
  --brand: #3d72aa;
  --text: #e2e8ef;
  --muted: #a2adba;
  --link: #85b6f0;
  --surface: #171e27;
  --surface-2: #212a36;
  --border: #2e3846;
  --border-strong: #4b5768;
  --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 2px 10px rgb(0 0 0 / 30%);
  --bg: #10151c;
  --input-hover: #6b788a;
  --nav-hover: rgb(255 255 255 / 8%);
  --row-hover: #1d2938;
  --accent-text: #a9c8ec;
  --notice-bg: #152030;
  --notice-text: #b9d0ea;
  --badge-bg: #22324a;
  --badge-text: #c4d6ee;
  --tooltip-bg: #2a3442;
  --danger: #ff8a80;
  --danger-alt: #ff8a80;
  --danger-bg: #3a1716;
  --warn: #ffb366;
  --warn-bg: #3a2610;
  --warn-line: #d66a00;
}
/* Produktflächen aus der Produktfarbe auf dunklem Grund ableiten; Schrift in aufgehellter Produktfarbe. */
:root[data-theme="dark"] body[data-flavor],
:root[data-theme="dark"] .stack-card[data-flavor],
:root[data-theme="dark"] .nutrient-explorer,
:root[data-theme="dark"] .compare-rows [data-category] {
  --soft: color-mix(in srgb, var(--flavor) 12%, #10151c);
  --tint: color-mix(in srgb, var(--flavor) 26%, #10151c);
  --line: color-mix(in srgb, var(--flavor) 55%, #10151c);
  --flavor-text: color-mix(in srgb, var(--flavor) 45%, #fff);
}
:root[data-theme="dark"] #chart-tooltip,
:root[data-theme="dark"] .stack-chart-tip {
  border: 1px solid var(--border-strong);
}
/* Diagramme: per JavaScript fest gesetzte Gitter- und Linienfarben (stack.js) an den dunklen Grund anpassen,
   dunkle Produktfarben bei Linien und Punkten aufhellen. CSS hat Vorrang vor SVG-Attributen. */
:root[data-theme="dark"] .chart-panel svg line[stroke="#ddd"] { stroke: var(--border); }
:root[data-theme="dark"] .chart-panel svg [stroke="#344d67"] { stroke: #5f86ad; }
:root[data-theme="dark"] .chart-panel svg [fill="#344d67"] { fill: #5f86ad; }
:root[data-theme="dark"] .chart-panel svg :is(path:not(.donut-segment), polyline, circle, .range-active) { filter: brightness(1.45); }
/* Produktbilder enthalten dunkle Beschriftungen im Bild: im Dunkelmodus auf heller Unterlage zeigen. */
:root[data-theme="dark"] img.multi-variants {
  background: #eef2f6;
  border-radius: var(--radius);
  padding: 12px;
}
}

/* Druckansicht (Strg+P, „Als PDF speichern“): ohne eigene Druckknöpfe. Navigation, Footer, Kaufbuttons und alle
   Bedienknöpfe entfallen; Ergebnisse, Eingabewerte, Tabellen, Diagramme, Quellen, Werbekennzeichnung und
   Gesundheitshinweis bleiben. Immer helles Schema (siehe Dunkelmodus oben). */
@media print {
  @page {
    margin: 15mm 12mm;
  }
  html {
    scroll-behavior: auto;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    /* Balken der Diagramme sind Hintergrundfarben; ohne diese Angabe ließe der Browser sie weg. */
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  header,
  footer,
  .page-anchors,
  .purchase-action,
  .product-nav,
  button,
  input[type="range"],
  #chart-tooltip,
  .stack-chart-tip,
  img.multi-variants,
  img.multi-variants + .table-note {
    display: none !important;
  }
  main {
    max-width: none;
    padding: 0;
  }
  *,
  *::before,
  *::after {
    box-shadow: none !important;
    text-shadow: none !important;
  }
  /* Eingaben zeigen ihren Wert wie Text in einem dünnen Rahmen. */
  input,
  select,
  textarea {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #888 !important;
    appearance: none;
  }
  /* Zugeklappte Abschnitte (z. B. Zutaten, Erläuterungen) mitdrucken. */
  details::details-content {
    content-visibility: visible;
    display: block;
  }
  details > summary {
    list-style: none;
    font-weight: bold;
  }
  .table-scroll,
  .storage-table-wrap {
    overflow: visible;
  }
  main svg {
    max-width: 100%;
  }
  main svg[viewBox] {
    height: auto;
  }
  /* Ziel externer Quellen sichtbar machen, da sich auf Papier nicht klicken lässt. */
  main a[href^="https:"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    overflow-wrap: anywhere;
  }
  h1,
  h2,
  h3 {
    break-after: avoid;
  }
  tr,
  .results > div,
  .chart-panel,
  .stack-card,
  .analyse-bar-row,
  .nutrient-compare-row,
  .reorder-chart-panel,
  figure,
  svg {
    break-inside: avoid;
  }
  .site-notices,
  body[data-flavor] .site-notices {
    padding: 12px 0 0;
    background: #fff;
    color: #000;
    border-top: 1px solid #888;
    break-inside: avoid;
  }
}

/* Spiel „Nährstoff-Fänger“ (naehrstoff-faenger.html, js/naehrstoff-faenger.js): Anzeigen, Spielfeld mit Zeichenfläche und Karten für Start und Ende.
   Die Zeichenfläche liest --game-* am Spielfeld; Farben der Anzeigen je Nährstoff über data-nutrient. */
.game {
  --game-plate: #fff;
  --game-rim: #8aa0b5;
  --game-ink: var(--text);
  --game-danger: var(--danger);
  /* Hintergrund „Kräuterwiese“ (gezeichnet in js/naehrstoff-faenger.js), Tag */
  --game-halo: rgba(255, 255, 255, 0.9);
  --game-sky-top: #bfe0f5;
  --game-sky-bottom: #eef7e6;
  --game-sun: #ffd76a;
  --game-sun-glow: rgba(255, 215, 106, 0.45);
  --game-cloud: rgba(255, 255, 255, 0.85);
  --game-hill-far: #c6e0a8;
  --game-hill-near: #a5cd85;
  --game-grass: #86ba68;
  --game-blade: #4f8a3c;
  --game-petal: #fff;
  --game-center: #f2b632;
  --game-lavender: #9b7bd4;
  --game-hypericum: #f5c518;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.game-time { margin: 0; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.game-time strong { color: var(--text); font-size: 1.25rem; }
.game-gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; margin: 0; padding: 0; list-style: none; }
.game-gauge { font-size: 0.85rem; min-width: 0; }
.game-gauge span { display: block; color: var(--muted); margin-bottom: 3px; overflow-wrap: anywhere; }
.game-bar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.game-fill { height: 100%; width: 60%; border-radius: 5px; background: var(--gauge, var(--brand)); }
.game-gauge.is-low span { color: var(--danger); font-weight: 600; }
/* Name als Link auf die Nährstoffseite: Farbe der Beschriftung (auch „is-low“), erkennbar an der Unterstreichung.
   Während des Spiels nicht antippbar, damit ein Fehlgriff neben dem Spielfeld die Seite nicht verlässt. */
.game-gauge span a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.game:has(.game-stage.is-running) .game-gauge a { pointer-events: none; }
.game-gauge.is-low .game-bar { box-shadow: 0 0 0 2px var(--danger); }
.game-gauge[data-nutrient="c"] { --gauge: #e0861a; }
.game-gauge[data-nutrient="a"] { --gauge: #c2541f; }
.game-gauge[data-nutrient="b"] { --gauge: #b0479a; }
.game-gauge[data-nutrient="d"] { --gauge: #b38a00; }
.game-gauge[data-nutrient="fe"] { --gauge: #a23b3b; }
.game-gauge[data-nutrient="zn"] { --gauge: #6d7f8f; }
.game-gauge[data-nutrient="ca"] { --gauge: #5f84a8; }
.game-gauge[data-nutrient="j"] { --gauge: #7a5cc2; }
.game-gauge[data-nutrient="se"] { --gauge: #4f7d5c; }
.game-gauge[data-nutrient="k"] { --gauge: #8f6aa8; }
.game-gauge[data-nutrient="o3"] { --gauge: #2b7a8c; }
.game-gauge[data-nutrient="p"] { --gauge: #8a6d3b; }
.game-stage {
  position: relative;
  height: min(70vh, 520px);
  min-height: 320px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
/* Nur während des laufenden Spiels: Wischen bewegt den Teller statt die Seite (sonst ließe sich auf dem Spielfeld nicht scrollen). */
.game-stage.is-running { touch-action: none; }
.game-stage:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.game-stage canvas { display: block; width: 100%; height: 100%; cursor: none; }
/* Start- und Endkarte: mittig, solange sie passen. Bei wenig Höhe (320 px, Querformat, Schrift 125 %) ist die Karte höher als das
   Spielfeld (overflow: hidden): dann beginnt sie oben (margin: auto statt align-items: center, das oben abschneiden würde) und
   das Overlay scrollt, damit Titel und Knöpfe immer erreichbar bleiben. */
.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-y: auto;
  padding: 20px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}
.game-overlay[hidden], .game-card[hidden] { display: none; }
.game-card { max-width: 30rem; margin: auto; text-align: center; }
.game-card h2 { margin: 0 0 8px; font-size: 1.4rem; }
.game-card p { margin: 0 0 12px; color: var(--muted); }
.game-card .game-tip { color: var(--text); }
.game-card button {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 10px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}
.game-card button:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.game-card .game-hint { font-size: 0.85rem; margin-top: 1.5em; }
.game-saved { margin: 0; text-align: center; color: var(--muted); }
.game-saved:empty { display: none; }
.game-saved button { margin-left: 6px; padding: 4px 12px; min-height: 32px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); }
.game-gauge[hidden] { display: none; }
.game-modes { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin: 4px 0 16px; }
.game-modes > span { font-weight: 600; }
.game-modes .game-mode-toggle button { color: var(--text); padding: 8px 16px; }
.game-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.game-card .game-secondary { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
@media screen {
  :root[data-theme="dark"] .game { --game-plate: #dce4ec; --game-rim: #6f8399; }
  /* Kräuterwiese am Abend: Mond statt Sonne, gedämpfte Farben, dunkler Rand um Texte. */
  :root[data-theme="dark"] .game {
    --game-halo: rgba(14, 20, 28, 0.85);
    --game-sky-top: #121d33;
    --game-sky-bottom: #2b3b45;
    --game-sun: #e9e4c8;
    --game-sun-glow: rgba(233, 228, 200, 0.16);
    --game-cloud: rgba(255, 255, 255, 0.07);
    --game-hill-far: #25392c;
    --game-hill-near: #1f3325;
    --game-grass: #1b2d20;
    --game-blade: #34593b;
    --game-petal: #d8d4c6;
    --game-center: #c9982c;
    --game-lavender: #8a72bd;
    --game-hypericum: #c9a325;
  }
  :root[data-theme="dark"] .game-gauge[data-nutrient="c"] { --gauge: #f2a040; }
  :root[data-theme="dark"] .game-gauge[data-nutrient="a"] { --gauge: #f0875a; }
  :root[data-theme="dark"] .game-gauge[data-nutrient="b"] { --gauge: #d97cc4; }
  :root[data-theme="dark"] .game-gauge[data-nutrient="d"] { --gauge: #e6c04a; }
  :root[data-theme="dark"] .game-gauge[data-nutrient="fe"] { --gauge: #e07070; }
  :root[data-theme="dark"] .game-gauge[data-nutrient="zn"] { --gauge: #a8b8c6; }
  :root[data-theme="dark"] .game-gauge[data-nutrient="ca"] { --gauge: #8fb4d8; }
  :root[data-theme="dark"] .game-gauge[data-nutrient="j"] { --gauge: #a98fe6; }
  :root[data-theme="dark"] .game-gauge[data-nutrient="se"] { --gauge: #7fbf8f; }
  :root[data-theme="dark"] .game-gauge[data-nutrient="k"] { --gauge: #c39bdc; }
  :root[data-theme="dark"] .game-gauge[data-nutrient="o3"] { --gauge: #5fb8ca; }
  :root[data-theme="dark"] .game-gauge[data-nutrient="p"] { --gauge: #d1ad6f; }
}

/* Spiel „Einheiten-Duell“ (einheiten-duell.html, js/einheiten-duell.js): Start-, Aufgaben- und Endkarte in einem Rahmen,
   Mengen A und B nebeneinander (schmal untereinander), drei Antwortknöpfe, Erklärung nach der Antwort.
   Knöpfe und Modusumschalter wie beim Nährstoff-Fänger (.game-card, .game-modes). */
.duel { --duel-ok: #1f7a3a; --duel-ok-bg: #e8f5ec; }
.duel-board { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 24px 20px; }
.duel-panel[hidden] { display: none; }
.duel-play { display: flex; flex-direction: column; gap: 16px; }
.duel-progress { margin: 0; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.duel-progress strong { color: var(--text); }
.duel-progress strong:focus { outline: none; }
.duel-progress strong:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.duel-cards { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 12px; }
.duel-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 18px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg); text-align: center; }
.duel-letter { font-weight: 700; color: var(--muted); font-size: 0.85rem; }
.duel-amount { font-size: 1.6rem; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.duel-name { font-weight: 600; overflow-wrap: anywhere; }
.duel-detail { color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.duel-detail[hidden] { display: none; }
.duel-vs { align-self: center; text-align: center; color: var(--muted); font-size: 0.9rem; }
.duel-answers { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.duel-answers button, .duel-feedback button {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.duel-answers button:disabled { cursor: default; opacity: 0.6; }
.duel-answers button.is-correct { opacity: 1; border: 2px solid var(--duel-ok); background: var(--duel-ok-bg); }
.duel-answers button.is-correct::before { content: "✓ "; }
.duel-answers button.is-wrong { opacity: 1; border: 2px solid var(--danger); background: var(--danger-bg); }
.duel-answers button.is-wrong::before { content: "✗ "; }
.duel-feedback .duel-next, .duel-feedback button { background: var(--brand); border-color: var(--brand); color: #fff; }
.duel-answers button:focus-visible, .duel-feedback button:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.duel-feedback { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.duel-feedback[hidden] { display: none; }
.duel-feedback p { margin: 0 0 6px; }
.duel-feedback .duel-verdict { font-weight: 600; }
.duel-review { margin: 0 0 16px; padding-left: 1.4em; text-align: left; }
.duel-review li { margin-bottom: 6px; overflow-wrap: anywhere; }
.duel-review li.is-correct::marker { color: var(--duel-ok); }
.duel-review li.is-wrong::marker { color: var(--danger); }
@media (max-width: 560px) {
  .duel-board { padding: 18px 12px; }
  .duel-cards { grid-template-columns: minmax(0, 1fr); }
  .duel-answers button { flex: 1 1 100%; }
}
@media screen {
  :root[data-theme="dark"] .duel { --duel-ok: #7fd49a; --duel-ok-bg: #16301f; }
}
/* Spiel „Anteil-Schätzer“ (anteil-schaetzer.html): nutzt Rahmen, Karten, Knöpfe und Rückblick des Einheiten-Duells;
   dazu Regler über die volle Breite und eine Marke für den echten Anteil (Mitte des Knopfs, gesetzt in js/anteil-schaetzer.js). */
.guess-card { align-self: center; width: min(100%, 28rem); }
.guess-input { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.guess-input label { font-weight: 600; text-align: center; }
.guess-scale { position: relative; width: min(100%, 32rem); padding: 6px 0 14px; }
.guess-scale input { display: block; width: 100%; margin: 0; }
.guess-marker { position: absolute; bottom: 0; width: 0; height: 0; transform: translateX(-50%); border: 8px solid transparent; border-bottom: 10px solid var(--duel-ok); border-top: 0; }
.guess-marker[hidden] { display: none; }
.guess-value { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
/* NRV-Schätzer: Beschriftung des logarithmischen Reglers bei 1 µg, 1 mg und 1 g (Stellung 0, 300 und 600 von 700). */
.guess-ticks { position: relative; width: min(100%, 32rem); height: 1.2em; margin: -6px 0 0; color: var(--muted); font-size: 0.8rem; }
.guess-ticks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.guess-ticks span:nth-child(1) { left: 8px; transform: none; }
.guess-ticks span:nth-child(2) { left: calc(8px + (100% - 16px) * 3 / 7); }
.guess-ticks span:nth-child(3) { left: calc(8px + (100% - 16px) * 6 / 7); }
/* Anteil-Duell und NRV-Duell: Frage über den beiden Karten. */
.duel-question { margin: 0; text-align: center; font-weight: 600; }
/* Anteil- und NRV-Duell: Die Kacheln selbst sind die Antwortknöpfe (button.duel-choice, js/vergleichsspiel.js). */
.duel-hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.9rem; }
.duel-choice { font: inherit; color: var(--text); border-color: var(--brand); cursor: pointer; min-height: 44px; transition: background-color 0.15s, transform 0.15s; }
.duel-choice:hover:not(:disabled) { background: var(--surface); transform: translateY(-2px); }
.duel-choice:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.duel-choice:disabled { cursor: default; opacity: 0.6; }
.duel-choice.is-correct { opacity: 1; border: 2px solid var(--duel-ok); background: var(--duel-ok-bg); }
.duel-choice.is-wrong { opacity: 1; border: 2px solid var(--danger); background: var(--danger-bg); }
.duel-choice.is-correct .duel-letter::before { content: "✓ "; color: var(--duel-ok); }
.duel-choice.is-wrong .duel-letter::before { content: "✗ "; color: var(--danger); }
@media (prefers-reduced-motion: reduce) { .duel-choice { transition: none; } .duel-choice:hover:not(:disabled) { transform: none; } }
/* Einheiten-Duell: Knopf „Gleich viel“ zwischen den Kacheln A und B. */
.duel-equal { align-self: center; justify-self: center; font: inherit; font-weight: 600; min-height: 44px; padding: 10px 18px; border: 1px solid var(--brand); border-radius: 999px; background: var(--bg); color: var(--text); cursor: pointer; white-space: nowrap; }
.duel-equal:hover:not(:disabled) { background: var(--surface); }
.duel-equal:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.duel-equal:disabled { cursor: default; opacity: 0.6; }
.duel-equal.is-correct { opacity: 1; border: 2px solid var(--duel-ok); background: var(--duel-ok-bg); }
.duel-equal.is-correct::before { content: "✓ "; }
.duel-equal.is-wrong { opacity: 1; border: 2px solid var(--danger); background: var(--danger-bg); }
.duel-equal.is-wrong::before { content: "✗ "; }
/* Druck blendet Knöpfe aus; die Kacheln der Duelle tragen aber die Aufgabe und bleiben sichtbar. */
@media print { button.duel-choice { display: flex !important; } }
/* Spiel „SfH-Memory“ (sfh-memory.html, js/sfh-memory.js): Start- und Endkarte wie beim Einheiten-Duell, dazu ein Raster aus
   24 quadratischen Karten (4 Spalten, ab 700 px 6). Jede Karte ist ein Knopf mit Rückseite („?“) und Vorderseite, die sich
   beim Aufdecken dreht. Vorderseite (Produktbild) immer hell, weil die Produktbilder einen durchsichtigen Hintergrund haben. */
.memory { --memory-ok: #1f7a3a; --memory-front: #fff; --memory-front-ink: #1d2a36; }
.memory-board { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 20px 16px; }
.memory-panel[hidden] { display: none; }
.memory-play { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.memory-stats { margin: 0; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.memory-stats strong { color: var(--text); }
.memory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: min(100%, 34rem); }
@media (min-width: 700px) { .memory-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); width: 100%; } }
.memory-card { position: relative; aspect-ratio: 1; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; perspective: 600px; }
.memory-card[aria-disabled="true"] { cursor: default; }
.memory-card:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: var(--radius-sm); }
.memory-inner { position: absolute; inset: 0; transition: transform 0.35s ease; transform-style: preserve-3d; }
.memory-card.is-open .memory-inner { transform: rotateY(180deg); }
.memory-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); backface-visibility: hidden; overflow: hidden; }
.memory-back { background: var(--brand); color: #fff; font-size: 1.6rem; font-weight: 700; box-shadow: inset 0 0 0 4px color-mix(in srgb, #fff 25%, transparent); }
.memory-front { transform: rotateY(180deg); background: var(--memory-front); color: var(--memory-front-ink); border: 1px solid var(--border-strong); padding: 4px; }
.memory-front img { width: 100%; height: 100%; object-fit: contain; }
/* Zahnpulver: Dose füllt nur einen kleinen Teil des Bilds, deshalb um die Dose herum vergrößert (Rand schneidet .memory-face ab). */
.memory-front img[src*="Zahnpulver"] { transform: scale(1.8); transform-origin: 50% 65%; }
.memory-card.is-found .memory-front { border: 3px solid var(--memory-ok); }
.memory-card.is-found .memory-front::after { content: "✓"; position: absolute; top: 2px; right: 6px; color: var(--memory-ok); font-weight: 700; }
.memory-message { margin: 0; min-height: 1.5em; text-align: center; }
.memory-actions { margin: 0; }
.memory-secondary { font: inherit; min-height: 44px; padding: 8px 20px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-2); color: var(--text); cursor: pointer; }
.memory-secondary:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.memory-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 0 0 16px; padding: 0; list-style: none; }
@media (max-width: 560px) {
  .memory-board { padding: 16px 10px; }
  .memory-grid { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { .memory-inner { transition: none; } }
@media screen {
  :root[data-theme="dark"] .memory { --memory-ok: #7fd49a; }
}
