/* Quellcode & Söhne – gemeinsames Design „dunkel & edel“: Dunkelgrau als Standard, Grün als Akzent; der helle Modus behält die Farben mit
   Markengrün #009640. Umschaltung ohne JavaScript über das Cookie qs_modus (data-theme am html-Element). Schriften lokal, keine Fremdadressen. */
@font-face {
  font-family: "Space Grotesk";
  src: url("assets.php?f=fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets.php?f=fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
}

/* Dunkel (Standard): Grund #12161c, Flächen #1b212a/#222a35, Grün als Akzent. Knöpfe tragen dunkle Schrift auf Grün.
   Alle Paare Text/Fläche erreichen WCAG AA (Fließtext ≥ 4,5:1) – geprüft in gemeinsam/tests/DesignTest.php. */
:root, html[data-theme="dunkel"] {
  /* Marke und Akzent */
  --gruen: #22c56a;            /* Akzent: Rahmen, Fokus, Linien, Füllungen */
  --gruen-knopf: #22c56a;      /* Knopffläche – mit dunkler Schrift (--knopf-text, 7,9:1) */
  --gruen-hover: #3fd27e;      /* Knopf beim Überfahren */
  --gruen-dunkel: #4cc38a;     /* grüne Schrift und Verweise auf dunklem Grund */
  --gruen-hell: #4cc38a;
  --gruen-mint: #22c56a;       /* das & in der Wortmarke */
  --gruen-flaeche: #1c3532;    /* getönte Grünfläche (Marken, aktive Auswahl) */
  --gruen-linie: #2b5a46;
  --knopf-text: #0b1a12;       /* Schrift auf grünen Knöpfen */
  /* Grund, Flächen, Text */
  --grund: #12161c;
  --flaeche: #1b212a;
  --flaeche-2: #222a35;
  --linie: #2c3540;
  --text: #e6e9ee;
  --text-leise: #9aa4b1;
  /* Hinweise: Schrift (--warnung, --fehler, --info), Rand/Symbol, getönte Fläche */
  --warnung: #e8b84a;
  --warnung-rand: #9a7a2e;
  --warnung-flaeche: #33332d;
  --fehler: #ef7672;           /* Schrift: etwas heller als #e5605c, damit sie auch auf Fläche 2 AA erreicht */
  --fehler-rand: #e5605c;
  --fehler-zeichen: #e5605c;
  --fehler-flaeche: #33292f;
  --info: #5aa9e6;
  --info-rand: #3b6f99;
  --info-flaeche: #22313f;
  /* Eingaben und Zweitknöpfe */
  --eingabe: #151a21;
  --eingabe-rand: #3a4553;
  --knopf2-bg: #1f2630;
  --knopf2-text: #e6e9ee;
  /* Kopfzeile */
  --kopf: #151a21;
  --kopf-text: #e6e9ee;
  --kopf-leise: #9aa4b1;
  --kopf-aktiv: #22c56a;
  --kopf-rand: #3a4553;
  --kopf-hover: rgba(255, 255, 255, .06);
  --admin: #5aa9e6;            /* Akzentleiste des Admin-Bereichs */
  /* Kanäle (Kennzeichen und Diagramme) */
  --kanal-shopify: #4cc38a;
  --kanal-etsy: #d9894a;
  --kanal-shopify-flaeche: #1c3833;
  --kanal-etsy-flaeche: #36302e;
  --kanal-etsy-text: #e0995f;
  /* Glas: halbtransparente Fläche, feine Kante, leichter Lichtrand oben, weicher Schatten */
  --glas: rgba(27, 33, 42, .8);
  --glas-rand: rgba(255, 255, 255, .07);
  --glas-licht: inset 0 1px 0 rgba(255, 255, 255, .05);
  --schatten: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .28);
  --hover: rgba(255, 255, 255, .035);
  --fokus: #4cc38a;
  --fokus-ring: rgba(76, 195, 138, .32);
  --schein: rgba(34, 197, 106, .07);   /* Lichtschein hinter den Karten */
  --schein-2: rgba(90, 169, 230, .045);
  /* Maße: 8-px-Raster; Radien 8–12 px, kleine Bauteile proportional kleiner (bleiben Rechtecke) */
  --a1: 8px;
  --a2: 16px;
  --a3: 24px;
  --a4: 32px;
  --a5: 48px;
  --radius: 12px;
  --radius-s: 8px;
  --radius-xs: 4px;
  --sans: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, "Cascadia Mono", monospace;
  color-scheme: dark;
}

/* Heller Modus: dieselbe Formensprache, die Farben wie bisher (Markengrün #009640, grüne Kopfzeile, weiße Karten). */
html[data-theme="hell"] {
  --gruen: #009640;            /* Quellcode-&-Söhne-Grün */
  --gruen-knopf: #008238;      /* Flächen mit weißer Schrift (Kontrast 4,9:1) */
  --gruen-hover: #00702f;
  --gruen-dunkel: #00702f;     /* kleiner Text auf hellem Grund */
  --gruen-hell: #22c56a;
  --gruen-mint: #ecfff4;       /* auf Grün: das & in der Wortmarke */
  --gruen-flaeche: #e6f5ec;
  --gruen-linie: #b8e0c8;
  --knopf-text: #ffffff;
  --grund: #f5f7f6;
  --flaeche: #ffffff;
  --flaeche-2: #eef2f0;
  --linie: #dde3e0;
  --text: #14181b;
  --text-leise: #56605e;
  --warnung: #8a5a00;
  --warnung-rand: #c99a20;
  --warnung-flaeche: #fff6df;
  --fehler: #8c1d1d;
  --fehler-rand: #f0c2c2;
  --fehler-zeichen: #c62828;
  --fehler-flaeche: #fff5f5;
  --info: #1d6aa8;
  --info-rand: #8fb9dd;
  --info-flaeche: #eef5fb;
  --eingabe: #ffffff;
  --eingabe-rand: #c5ceca;
  --knopf2-bg: #ffffff;
  --knopf2-text: #14181b;
  --kopf: #008238;
  --kopf-text: #ffffff;
  --kopf-leise: #ffffff;
  --kopf-aktiv: #ffffff;
  --kopf-rand: rgba(255, 255, 255, .55);
  --kopf-hover: rgba(255, 255, 255, .14);
  --admin: #1d6aa8;
  --kanal-shopify: #008238;
  --kanal-etsy: #b45309;
  --kanal-shopify-flaeche: #008238;
  --kanal-etsy-flaeche: #b45309;
  --kanal-etsy-text: #ffffff;
  --glas: rgba(255, 255, 255, .88);
  --glas-rand: #dde3e0;
  --glas-licht: inset 0 1px 0 rgba(255, 255, 255, .9);
  --schatten: 0 1px 3px rgba(11, 13, 15, .05), 0 8px 24px rgba(11, 13, 15, .06);
  --hover: rgba(0, 130, 56, .045);
  --fokus: #00702f;
  --fokus-ring: rgba(0, 150, 64, .24);
  --schein: rgba(0, 150, 64, .05);
  --schein-2: rgba(29, 106, 168, .035);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { font-size: 16px; background: var(--grund); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--grund); color: var(--text); font-family: var(--sans); line-height: 1.5; position: relative; isolation: isolate; -webkit-font-smoothing: antialiased; }
/* Ruhiger Lichtschein hinter den Glas-Karten: fest stehend, ohne Bewegung */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60rem 30rem at 10% -6rem, var(--schein), transparent 70%), radial-gradient(48rem 26rem at 100% 0, var(--schein-2), transparent 70%); }
[hidden] { display: none !important; }
::selection { background: var(--fokus-ring); }
a { color: var(--gruen-dunkel); text-underline-offset: .18em; text-decoration-thickness: 1px; transition: color .15s; }
a:hover { color: var(--gruen); }
:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
h1, h2, h3 { font-weight: 600; line-height: 1.25; margin: 0 0 var(--a2); }
h1 { font-size: 1.75rem; letter-spacing: -.015em; line-height: 1.2; }
h2 { font-size: 1.125rem; letter-spacing: -.005em; margin-top: var(--a4); }
h3 { font-size: .75rem; color: var(--text-leise); text-transform: uppercase; letter-spacing: .14em; font-weight: 500; margin-bottom: var(--a1); }
p { margin: 0 0 var(--a2); }
code, .mono { font-family: var(--mono); font-size: .9em; overflow-wrap: anywhere; } /* lange Adressen und Kennungen brechen um, statt die Seite zu verbreitern */
.leise { color: var(--text-leise); }
.klein-text { color: var(--text-leise); font-size: .875rem; }
/* nur für Vorleseprogramme */
.nur-lesen-weg { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- Kopfzeile: schlank, aktive Seite klar markiert, Händlername und Konto rechts ---------- */
.kopf { background: var(--kopf); color: var(--kopf-text); border-bottom: 1px solid var(--linie); }
html[data-theme="hell"] .kopf { border-bottom-color: transparent; }
.kopf-innen { max-width: 76rem; margin: 0 auto; padding: 14px var(--a3) 6px; display: flex; align-items: center; justify-content: space-between; gap: var(--a1) var(--a2); flex-wrap: wrap; }
.marke-zeile { display: flex; align-items: baseline; gap: 6px var(--a2); flex-wrap: wrap; min-width: 0; }
.wortmarke { font-weight: 700; letter-spacing: .22em; font-size: .75rem; color: var(--kopf-leise); white-space: nowrap; }
.wortmarke span { color: var(--gruen-mint); margin: 0 .05em; }
.produkt { font-weight: 600; font-size: 1.0625rem; letter-spacing: -.01em; color: var(--kopf-text); }
.kopf-rechts { display: flex; align-items: center; gap: var(--a1) var(--a2); flex-wrap: wrap; }
.konto { display: flex; align-items: center; gap: var(--a1) 12px; font-size: .875rem; color: var(--kopf-leise); flex-wrap: wrap; }
.konto-name { color: var(--kopf-text); font-weight: 500; }
.kopf .modus, .konto-link { display: inline-flex; align-items: center; min-height: 32px; color: var(--kopf-text); text-decoration: none; font-size: .8125rem; font-weight: 500; padding: 4px 12px;
  border: 1px solid var(--kopf-rand); border-radius: var(--radius-s); white-space: nowrap; transition: background-color .15s, border-color .15s; }
.kopf .modus:hover, .konto-link:hover, .konto-link.aktiv { background: var(--kopf-hover); border-color: var(--kopf-aktiv); color: var(--kopf-text); }
.konto .knopf.zweit { background: transparent; color: var(--kopf-text); border-color: var(--kopf-rand); }
.konto .knopf.zweit:hover { background: var(--kopf-hover); border-color: var(--kopf-aktiv); color: var(--kopf-text); }
.reiter { max-width: 76rem; margin: 0 auto; padding: 0 var(--a2); display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
.reiter a { position: relative; display: block; color: var(--kopf-leise); text-decoration: none; padding: 10px 12px 12px; white-space: nowrap; font-size: .9375rem; font-weight: 500;
  border-radius: var(--radius-s) var(--radius-s) 0 0; transition: color .15s, background-color .15s; }
.reiter a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--kopf-aktiv); opacity: 0; transform: scaleX(.4); transition: transform .2s, opacity .2s; }
.reiter a:hover { color: var(--kopf-text); background: var(--kopf-hover); }
.reiter a.aktiv { color: var(--kopf-text); font-weight: 600; }
.reiter a.aktiv::after { opacity: 1; transform: none; }
/* Admin: eigene Akzentleiste (blau) über der Kopfzeile und als Markierung der aktiven Seite */
.bereich-admin .kopf { box-shadow: inset 0 4px 0 var(--admin); background: linear-gradient(180deg, rgba(90, 169, 230, .09), transparent 70%), var(--kopf); }
html[data-theme="hell"] .bereich-admin .kopf { background: var(--kopf); }
.bereich-admin .reiter a::after { background: var(--admin); }
html[data-theme="hell"] .bereich-admin .reiter a::after { background: #ffffff; }

/* ---------- Seite, Fußzeile, Leisten und Hinweise ---------- */
.seite { max-width: 76rem; margin: 0 auto; padding: var(--a4) var(--a3) var(--a5); }
/* Fußzeile: Marken-Hinweis (Etsy), Support, Verweise auf Bedingungen – gut lesbar, ohne Logo und ohne Fremdfarben */
.fuss { max-width: 76rem; margin: 0 auto; padding: var(--a3) var(--a3) var(--a5); border-top: 1px solid var(--linie); color: var(--text-leise); font-size: .8125rem; line-height: 1.6; }
.fuss p { margin: 4px 0; }
.fuss a { color: inherit; text-decoration: underline; }
.fuss a:hover { color: var(--text); }
.leiste { padding: var(--a1) var(--a3); text-align: center; font-size: .875rem; border-bottom: 1px solid var(--linie); }
.leiste.warn { background: var(--warnung-flaeche); color: var(--warnung); border-bottom-color: var(--warnung-rand); }
.leiste.err { background: var(--fehler-flaeche); color: var(--fehler); border-bottom-color: var(--fehler-rand); }
.leiste.info { background: var(--info-flaeche); color: var(--text); border-bottom-color: var(--info-rand); }
.leiste.ok { background: var(--gruen-flaeche); color: var(--gruen-dunkel); border-bottom-color: var(--gruen-linie); }
/* Hinweise, Fehler, leere Zustände: ein Kasten mit Rechteck-Symbol links; die nächste Handlung steht im Text */
.meldung { --m: var(--info); --mf: var(--glas); --mr: var(--glas-rand); position: relative; padding: 12px 16px 12px 48px; border: 1px solid var(--mr); border-radius: var(--radius-s);
  margin-bottom: var(--a2); background: var(--mf); box-shadow: var(--glas-licht); }
.meldung::before { content: "i"; content: "i" / ""; position: absolute; left: 14px; top: 13px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: var(--radius-xs);
  font: 700 .75rem/1 var(--mono); color: var(--m); border: 1.5px solid var(--m); }
.meldung.ok { --m: var(--gruen-dunkel); --mf: var(--gruen-flaeche); --mr: var(--gruen-linie); }
.meldung.ok::before { content: ""; }
.meldung.ok::after { content: ""; position: absolute; left: 21px; top: 17px; width: 5px; height: 9px; border: solid var(--m); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.meldung.warn { --m: var(--warnung); --mf: var(--warnung-flaeche); --mr: var(--warnung-rand); }
.meldung.warn::before, .meldung.err::before { content: "!"; content: "!" / ""; }
.meldung.err { --m: var(--fehler); --mf: var(--fehler-flaeche); --mr: var(--fehler-rand); }
.meldung > :last-child { margin-bottom: 0; }
.meldung .knopf, .meldung button { margin-left: 4px; }

/* ---------- Karten (Glas) und Kennzahlen ---------- */
.karte { background: var(--glas); border: 1px solid var(--glas-rand); border-radius: var(--radius); padding: var(--a3); margin-bottom: var(--a2); box-shadow: var(--glas-licht), var(--schatten); }
.karte > h2:first-child, .karte > h3:first-child, .karte > h1:first-child { margin-top: 0; }
.karte h3 { margin-top: var(--a3); }
.karte > :last-child { margin-bottom: 0; }
.raster { display: grid; gap: var(--a2); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-bottom: var(--a2); }
.raster .karte { margin-bottom: 0; }
.kennzahl { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 2rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.15; margin: 4px 0 var(--a1); }
.kennzahl.warn { color: var(--warnung); }
.kennzahl.err { color: var(--fehler); }
.kennzahl.ok { color: var(--gruen-dunkel); }
details.karte > summary { cursor: pointer; padding: 4px 0; font-weight: 500; }
details.karte[open] > summary { margin-bottom: var(--a2); }
details.karte h3 { margin: var(--a2) 0 4px; }
details.karte .aktionen input[type=file] { max-width: 100%; }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  /* Weichzeichner nur auf wenigen, großen Flächen – auf langen Tabellen bliebe das Scrollen sonst nicht flüssig */
  .haupt, .leiste4 .kachel, .anmeldung .karte { -webkit-backdrop-filter: blur(14px) saturate(125%); backdrop-filter: blur(14px) saturate(125%); }
}
@media (prefers-reduced-transparency: reduce) {
  :root, html[data-theme] { --glas: var(--flaeche); }
}

/* ---------- Statusmarken: Rechteck mit leicht runden Ecken, Farbe und Wort (nie nur Farbe) ---------- */
.marke { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 500; line-height: 1.45; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--linie);
  color: var(--text-leise); background: var(--flaeche-2); white-space: nowrap; vertical-align: baseline; }
.marke.ok, .marke.warn, .marke.err { font-weight: 600; }
.marke.ok::before, .marke.warn::before, .marke.err::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 1px; background: currentColor; }
/* Im Fließtext darf eine lange Marke umbrechen (statt über den Rand zu ragen); in Tabellenzellen bleibt sie einzeilig */
p > .marke, li > .marke, dd > .marke { white-space: normal; }
.marke.ok { color: var(--gruen-dunkel); border-color: var(--gruen-linie); background: var(--gruen-flaeche); }
.marke.warn { color: var(--warnung); border-color: var(--warnung-rand); background: var(--warnung-flaeche); }
.marke.err { color: var(--fehler); border-color: var(--fehler-rand); background: var(--fehler-flaeche); }
a.hinweis { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: var(--radius-xs); background: var(--warnung-flaeche); color: var(--warnung);
  border: 1px solid var(--warnung-rand); font: 700 .75rem/1 var(--mono); text-decoration: none; margin-left: 4px; vertical-align: 1px; }

/* ---------- Formulare und Knöpfe ---------- */
form.inline { display: inline; }
.feld { margin-bottom: var(--a2); }
.feld label { display: block; font-size: .8125rem; font-weight: 500; color: var(--text-leise); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 40px; font: inherit; color: var(--text); background: var(--eingabe); border: 1px solid var(--eingabe-rand); border-radius: var(--radius-s); padding: 8px 12px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--text-leise); opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--gruen); outline: none; box-shadow: 0 0 0 3px var(--fokus-ring); }
textarea { min-height: 5rem; resize: vertical; }
input[type=checkbox] { accent-color: var(--gruen); width: 18px; height: 18px; vertical-align: -3px; margin: 0 8px 0 0; }
.feld label:has(input[type=checkbox]) { color: var(--text); font-size: .9375rem; font-weight: 400; display: flex; align-items: flex-start; gap: 0; }
.feld label:has(input[type=checkbox]) input { margin-top: 3px; flex: none; }
.zeile { display: flex; gap: 12px var(--a2); flex-wrap: wrap; align-items: flex-end; }
.zeile .feld { margin-bottom: 0; flex: 1 1 10rem; }
.knopf, button {
  font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer; border-radius: var(--radius-s); padding: 8px 16px; min-height: 40px; border: 1px solid var(--gruen-knopf);
  background: var(--gruen-knopf); color: var(--knopf-text); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--a1); line-height: 1.2;
  vertical-align: middle; transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.knopf:hover, button:hover { background: var(--gruen-hover); border-color: var(--gruen-hover); color: var(--knopf-text); }
.knopf:active, button:active { transform: translateY(1px); }
.knopf.zweit, button.zweit { background: var(--knopf2-bg); color: var(--knopf2-text); border-color: var(--eingabe-rand); font-weight: 500; }
.knopf.zweit:hover, button.zweit:hover { border-color: var(--gruen); background: var(--gruen-flaeche); color: var(--knopf2-text); }
.knopf.zweit.aktiv { border-color: var(--gruen); background: var(--gruen-flaeche); color: var(--gruen-dunkel); }
.knopf.gefahr, button.gefahr { background: var(--knopf2-bg); color: var(--fehler); border-color: var(--fehler-rand); font-weight: 500; }
.knopf.gefahr:hover, button.gefahr:hover { background: var(--fehler-flaeche); border-color: var(--fehler); color: var(--fehler); }
.knopf.klein, button.klein { padding: 4px 12px; min-height: 32px; font-size: .8125rem; font-weight: 500; white-space: nowrap; }
button:disabled, button:disabled:hover { opacity: .45; cursor: not-allowed; background: var(--knopf2-bg); color: var(--knopf2-text); border-color: var(--eingabe-rand); transform: none; }
.aktionen { display: flex; gap: var(--a1); flex-wrap: wrap; margin: var(--a2) 0; align-items: center; }
.aktionen input[type=search] { width: auto; min-width: 12rem; min-height: 32px; padding: 4px 12px; }
.aktionen .trenner { width: 1px; height: 24px; background: var(--linie); margin: 0 4px; }
.aktionen label { display: inline-flex; align-items: center; gap: 6px; }
.aktionen label input[type=text] { width: 8.5rem; min-height: 32px; padding: 4px 12px; }
/* Filter als ruhige Segmentknöpfe: eine Leiste, die Auswahl ist hinterlegt und unten grün markiert */
.segmente, .kurs-gruppe { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--eingabe); border: 1px solid var(--linie); border-radius: 10px; max-width: 100%; }
.segmente > .knopf.zweit, .kurs-gruppe > .knopf.zweit { min-height: 30px; padding: 4px 12px; border-radius: 7px; border-color: transparent; background: transparent; color: var(--text-leise); font-weight: 500; }
.segmente > .knopf.zweit:hover, .kurs-gruppe > .knopf.zweit:hover { background: var(--hover); color: var(--text); border-color: transparent; }
.segmente > .knopf.zweit.aktiv, .kurs-gruppe > .knopf.zweit.aktiv { background: var(--flaeche-2); color: var(--text); border-color: var(--glas-rand); box-shadow: inset 0 -2px 0 var(--gruen), 0 1px 2px rgba(0, 0, 0, .18); }
html[data-theme="hell"] .segmente > .knopf.zweit.aktiv, html[data-theme="hell"] .kurs-gruppe > .knopf.zweit.aktiv { background: #ffffff; }

/* ---------- Tabellen: mehr Zeilenhöhe, Zahlen rechtsbündig in Mono, Zeilen-Hover, klebende Kopfzeile ---------- */
.tabellen-rahmen { overflow-x: auto; }
table.tabelle { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.tabelle th { text-align: left; font-weight: 500; color: var(--text-leise); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; padding: 10px 12px; border-bottom: 1px solid var(--linie);
  white-space: nowrap; background: var(--flaeche); }
.tabelle td { padding: 12px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:not(.abweichung):not(.warnung):hover td { background: var(--hover); }
.tabelle .zahl { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.tabelle th.zahl { font-family: inherit; }
.tabelle td.mono { white-space: nowrap; }
.tabelle tr.abweichung td { background: var(--warnung-flaeche); }
.tabelle tr.abweichung td:first-child { box-shadow: inset 3px 0 0 var(--warnung); }
.tabelle tr.warnung td { background: var(--fehler-flaeche); }
.tabelle tr.warnung td:first-child { box-shadow: inset 3px 0 0 var(--fehler-rand); }
.tabelle .notiz { color: var(--text-leise); font-size: .8125rem; }
.tabelle td[colspan].leise { text-align: center; padding: var(--a4) var(--a2); }
/* In Tabellen trägt der Hauptknopf einen grünen Rand statt der grünen Fläche – ruhiger bei vielen Zeilen; gefüllt erst beim Überfahren */
.tabelle button:not(.zweit):not(.gefahr):not(.kurs-sort):not(:disabled), .tabelle .knopf:not(.zweit):not(.gefahr) { background: transparent; color: var(--gruen-dunkel); border-color: var(--gruen-linie); }
.tabelle button:not(.zweit):not(.gefahr):not(.kurs-sort):not(:disabled):hover, .tabelle .knopf:not(.zweit):not(.gefahr):hover { background: var(--gruen-knopf); border-color: var(--gruen-knopf); color: var(--knopf-text); }
pre { margin: 0; white-space: pre-wrap; word-break: break-word; }
@media (min-width: 641px) {
  /* Lange und breite Tabellen scrollen in ihrem Kasten (nie die ganze Seite); die Kopfzeile bleibt dabei oben stehen */
  .tabellen-rahmen { max-height: calc(100vh - 3rem); overflow: auto; }
  .tabelle thead th { position: sticky; top: 0; z-index: 2; }
}

/* ---------- Händlersicht ---------- */
.seitenkopf { display: flex; align-items: center; justify-content: space-between; gap: var(--a2); flex-wrap: wrap; margin-bottom: var(--a1); }
.seitenkopf h1 { margin-bottom: 0; }
a.kachel { display: block; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
a.kachel:hover { border-color: var(--gruen); }
.status-zeile { margin: var(--a4) 0 0; font-size: .875rem; color: var(--text-leise); text-align: center; }
.status-zeile.ok::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--gruen); margin-right: var(--a1); vertical-align: 1px; }
.status-zeile.warn { color: var(--warnung); }
/* Wächter-Zeile: das Kästchen in der Farbe des Zustands, der Zustand steht immer auch im Text */
.status-zeile.waechter a { color: inherit; text-decoration: none; }
.status-zeile.waechter a:hover, .status-zeile.waechter a:focus-visible { text-decoration: underline; }
.status-zeile.waechter span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--text-leise); margin-right: var(--a1); vertical-align: 1px; }
.status-zeile.waechter .ok::before { background: var(--gruen); }
.status-zeile.waechter .warn { color: var(--warnung); }
.status-zeile.waechter .warn::before { background: var(--warnung); }
.status-zeile.waechter .err { color: var(--fehler); font-weight: 600; }
.status-zeile.waechter .err::before { background: var(--fehler-zeichen); }

/* ---------- Anmeldung und Einrichtung: zentrierte Karte, Wortmarke darüber ---------- */
.anmeldung { max-width: 27rem; margin: clamp(var(--a3), 6vh, 4rem) auto var(--a5); }
.anmeldung .karte { padding: var(--a4); }
.anmeldung h1 { font-size: 1.5rem; margin-bottom: var(--a2); }
.anmeldung form > button, .anmeldung form > .knopf { width: 100%; margin-top: var(--a1); }
body:has(.anmeldung) .kopf { --kopf: transparent; --kopf-text: var(--text); --kopf-leise: var(--text-leise); --kopf-rand: var(--eingabe-rand); --kopf-hover: var(--hover); --kopf-aktiv: var(--gruen);
  border-bottom-color: transparent; box-shadow: none; }
body:has(.anmeldung) .kopf-innen { position: relative; flex-direction: column; justify-content: center; padding-top: clamp(var(--a4), 9vh, 6rem); }
body:has(.anmeldung) .marke-zeile { flex-direction: column; align-items: center; gap: 6px; }
body:has(.anmeldung) .wortmarke { font-size: .8125rem; }
body:has(.anmeldung) .wortmarke span { color: var(--gruen-dunkel); }
body:has(.anmeldung) .produkt { font-size: 1.5rem; }
/* Produktzeichen (z. B. ShopSync: zwei Bögen mit Pfeilen) über der Wortmarke; im dunklen Modus mit leichtem Schein wie im Film */
.produkt-zeichen { display: block; line-height: 0; color: var(--gruen); }
.produkt-zeichen svg { width: 5.5rem; height: 5.5rem; overflow: visible; }
body:has(.anmeldung) .produkt-zeichen { margin-bottom: var(--a2); }
html:not([data-theme="hell"]) .produkt-zeichen svg { filter: drop-shadow(0 0 14px rgba(34, 197, 106, .35)); }
body:has(.anmeldung) .kopf-rechts { position: absolute; top: var(--a2); right: var(--a3); }
body:has(.anmeldung) .seite { padding-top: 0; }

/* ---------- Handy: Tabellen werden zu Karten-Zeilen ---------- */
@media (max-width: 640px) {
  .seite { padding: var(--a3) var(--a2) var(--a5); }
  .fuss { padding: var(--a3) var(--a2) var(--a5); }
  .kopf-innen { padding: 12px var(--a2) 4px; }
  /* Navigation als waagerecht scrollbare Leiste: rechts blendet sie weich aus (es geht weiter), die aktive Seite rückt beim Laden ins Bild */
  .reiter { padding: 0 28px 0 var(--a1); scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .reiter::-webkit-scrollbar { display: none; }
  .reiter a.aktiv { scroll-initial-target: nearest; scroll-snap-align: center; } /* die aktive Seite steht beim Öffnen mittig, vorn bleibt der Anfang */
  .karte { padding: var(--a2); }
  h1 { font-size: 1.5rem; }
  table.tabelle.stapel, .tabelle.stapel tbody, .tabelle.stapel tr, .tabelle.stapel td { display: block; width: 100%; }
  .tabelle.stapel thead { display: none; }
  .tabelle.stapel tr { border: 1px solid var(--linie); border-radius: var(--radius-s); margin-bottom: var(--a1); padding: 6px 4px; background: var(--flaeche); }
  .tabelle.stapel tbody tr:hover td { background: transparent; }
  .tabelle.stapel td { border: 0; padding: 4px 12px; text-align: left; }
  .tabelle.stapel td::before { content: attr(data-label); display: block; font-size: .6875rem; color: var(--text-leise); text-transform: uppercase; letter-spacing: .1em; }
  .tabelle.stapel td.zahl { text-align: left; }
  .tabelle.stapel td.wahl::before { display: none; } /* das Kästchen nennt seinen Artikel selbst („… auswählen“) */
  .tabelle.stapel tr.abweichung { background: var(--warnung-flaeche); box-shadow: inset 3px 0 0 var(--warnung); }
  .tabelle.stapel tr.warnung { background: var(--fehler-flaeche); box-shadow: inset 3px 0 0 var(--fehler-rand); }
  .tabelle.stapel tr.abweichung td, .tabelle.stapel tr.warnung td { background: transparent; box-shadow: none; }
  /* Tabellen ohne eigenen Rahmen (z. B. im aufklappbaren Monatsabgleich) scrollen für sich, nie die Seite */
  table.tabelle:not(.stapel) { display: block; max-width: 100%; overflow-x: auto; }
  .marke { white-space: normal; }
  .anmeldung .karte { padding: var(--a3); }
  body:has(.anmeldung) .kopf-innen { padding-top: var(--a5); }
  body:has(.anmeldung) .kopf-rechts { right: var(--a2); }
}
/* Fingerbedienung: Bedienflächen mindestens 44 px hoch – als Untergrenze (!important), die auch engere Regeln einzelner Bausteine nicht unterschreiten */
@media (pointer: coarse), (max-width: 640px) {
  .knopf, button, .kopf .modus, .konto-link, input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=file], select, summary, .wahl-feld { min-height: 44px !important; }
  summary { align-content: center; }
  .wahl-feld { min-width: 44px; }
  /* Kästchen mit Beschriftung: die ganze Zeile ist die Bedienfläche */
  label:has(> input[type=checkbox]) { display: inline-flex; align-items: center; min-height: 44px; }
  .feld label:has(input[type=checkbox]) { align-items: center; }
  .feld label:has(input[type=checkbox]) input { margin-top: 0; }
  .reiter a { padding-top: 12px; padding-bottom: 14px; }
  input[type=checkbox] { width: 22px; height: 22px; }
}

/* ---------- Live-Seite: der Leitstand des Händlers ---------- */
.tafel { display: grid; gap: var(--a2); }
.tafelkopf { display: flex; align-items: center; justify-content: space-between; gap: var(--a2); color: var(--text-leise); font-size: .875rem; }
.knopfreihe { display: flex; gap: var(--a1); }
.haupt { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--a1); border: 1px solid var(--glas-rand); border-radius: var(--radius); padding: 24px 32px 32px;
  background: radial-gradient(42rem 18rem at 0 0, var(--schein), transparent 70%), var(--glas); box-shadow: var(--glas-licht), var(--schatten); }
.haupt::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); box-shadow: inset 0 0 0 2px var(--gruen); opacity: 0; pointer-events: none; transition: opacity .9s; }
.haupt.blitz::after { opacity: 1; transition: opacity .05s; }
.haupt h2, section.feld h2 { margin: 0; font: 500 .75rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-leise); }
.gross { display: flex; align-items: flex-end; white-space: nowrap; font-family: var(--sans); font-weight: 700; line-height: .9; font-size: clamp(4.2rem, 16vw, 10.5rem); font-variant-numeric: tabular-nums; color: var(--gruen-dunkel); letter-spacing: -.01em; padding-top: .08em; }
.gross .cent, .gross .eur { font-size: .42em; margin-bottom: .12em; font-weight: 700; }
.gross .cent { margin-left: .04em; }
.gross .eur { margin-left: .18em; opacity: .85; }
.walzen { display: inline-flex; align-items: flex-end; }
.walze { display: inline-block; height: 1em; overflow: hidden; vertical-align: bottom; }
.walze span { display: block; transition: transform .9s cubic-bezier(.2, .75, .2, 1); }
.walze span i { display: block; height: 1em; font-style: normal; text-align: center; }
.fest { display: inline-block; }
.haupt .unter { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: var(--a1) 0 0; color: var(--text-leise); font-size: 1rem; }
.haupt .unter b { color: var(--text); font-weight: 600; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .9375rem; }
.haupt .weitere { margin: var(--a1) 0 0; font-size: .875rem; color: var(--text-leise); }
/* Veränderung (+/− %) als kleine Marke */
.vergleich { font-variant-numeric: tabular-nums; }
.vergleich.hoch, .vergleich.runter { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 6px; font-family: var(--mono); font-size: .8125rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.vergleich.hoch { color: var(--gruen-dunkel); background: var(--gruen-flaeche); border: 1px solid var(--gruen-linie); }
.vergleich.runter { color: var(--fehler); background: var(--fehler-flaeche); border: 1px solid var(--fehler-rand); }
/* Ziele (Bauauftrag 16): je gesetztem Ziel ein Energiebalken, nebeneinander; auf dem Handy untereinander in voller Breite */
.ziele-liste { display: grid; grid-template-columns: repeat(var(--ziele, 4), minmax(0, 1fr)); gap: var(--a2) var(--a3); }
.ziele-liste.n1 { --ziele: 1; }
.ziele-liste.n2 { --ziele: 2; }
.ziele-liste.n3 { --ziele: 3; }
.ziel-zeile { position: relative; z-index: 0; min-width: 0; }
.ziel-zeile h3 { margin: 0; }
.ziel-zeitraum { text-transform: none; letter-spacing: 0; font-weight: 400; }
.ziele .energie { max-width: none; }
.ziel-stand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0; font-size: .875rem; color: var(--text-leise); overflow-wrap: anywhere; }
.ziel-stand b { color: var(--text); font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.ziel-zeile.erreicht .ziel-rest { color: var(--gruen-dunkel); font-weight: 600; }
.ziel-hochrechnung { margin: 4px 0 0; font-size: .8125rem; color: var(--text-leise); }
.ziele-hinweis { margin: 0; font-size: .875rem; color: var(--text-leise); }
/* Ziel erreicht: einmal dezent aufleuchten – beim Anzeigen und wenn das Nachladen das Ziel erreicht –, danach steht alles still (die Fläche liegt hinter dem Inhalt) */
.ziel-zeile::after { content: ""; position: absolute; z-index: -1; inset: -6px -8px; border-radius: var(--radius-s); background: var(--gruen-flaeche); box-shadow: inset 0 0 0 1px var(--gruen-linie);
  opacity: 0; pointer-events: none; }
.ziel-zeile.erreicht::after { animation: ziel-leuchten 1.6s ease-out 1.3s backwards; }
@keyframes ziel-leuchten { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
.leiste4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--a2); }
.leiste4 .kachel { display: block; color: inherit; text-decoration: none; background: var(--glas); border: 1px solid var(--glas-rand); border-radius: var(--radius); padding: var(--a2) 20px 20px; min-width: 0;
  box-shadow: var(--glas-licht), var(--schatten); }
.leiste4 a.kachel:hover { border-color: var(--gruen); }
.leiste4 .kachel h3 { margin: 0 0 var(--a1); }
.leiste4 .wert { font-family: var(--mono); font-weight: 500; font-size: clamp(1.35rem, 4.2vw, 1.875rem); letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.leiste4 .wert.warn { color: var(--warnung); }
.leiste4 .wert.err { color: var(--fehler); }
.leiste4 .wert.ok { color: var(--gruen-dunkel); }
.leiste4 .kachel p { margin: 6px 0 0; font-size: .8125rem; color: var(--text-leise); }
/* Kennzahlen-Leiste der Live-Tafel: Jahreskurs hervorgehoben, kleiner 30-Tage-Verlauf, Bestand als Zeile darunter */
.leiste4 .kachel.kurs { border-color: var(--gruen-linie); background: linear-gradient(180deg, var(--gruen-flaeche), transparent 70%), var(--glas); }
.leiste4 .kachel.kurs .wert { color: var(--gruen-dunkel); }
.leiste4 .spark { display: block; width: 100%; height: 34px; margin-top: var(--a1); overflow: visible; }
.leiste4 .spark-linie { fill: none; stroke: var(--gruen); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.leiste4 .spark-flaeche { fill: var(--gruen); opacity: .14; }
.bestand-zeile { margin: 0; font-size: .875rem; color: var(--text-leise); }
.bestand-zeile a { color: inherit; }
.bestand-zeile .warn { color: var(--warnung); font-weight: 600; }
.bestand-zeile .err { color: var(--fehler); font-weight: 600; }
.unten { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--a2); align-items: stretch; }
/* Abschnitte der Live-Tafel (section.feld – in Formularen heißt .feld ein Eingabefeld) */
section.feld { background: var(--glas); border: 1px solid var(--glas-rand); border-radius: var(--radius); padding: 20px; margin: 0; min-width: 0; box-shadow: var(--glas-licht), var(--schatten); }
section.feld h2 { margin-bottom: var(--a2); }
.ticker { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ticker li { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius-s); background: var(--hover); border: 1px solid transparent; }
.ticker li.neu { border-color: var(--gruen); animation: rein .7s ease-out; }
@keyframes rein { from { transform: translateY(-8px); opacity: .2; } to { transform: none; opacity: 1; } }
.ticker .zeit { font: 500 .78rem var(--mono); color: var(--text-leise); }
.ticker .was { min-width: 0; display: flex; align-items: center; gap: var(--a1); }
.ticker .artikel { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker .kanal { flex: none; font: 600 .66rem var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 2px 6px; border-radius: var(--radius-xs); color: var(--knopf-text); }
.ticker .kanal.shopify { background: var(--kanal-shopify-flaeche); color: var(--kanal-shopify); }
.ticker .kanal.etsy { background: var(--kanal-etsy-flaeche); color: var(--kanal-etsy-text); }
html[data-theme="hell"] .ticker .kanal.shopify { color: #fff; }
.ticker .betrag { font: 600 .9375rem var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ticker li.storniert { opacity: .55; }
.ticker li.storniert .artikel { text-decoration: line-through; }
section.feld .leer { margin: var(--a1) 0 0; color: var(--text-leise); font-size: .9rem; }
.legende { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--a1); margin: 0 0 12px; font-size: .875rem; color: var(--text-leise); }
.legende b { color: var(--text); font-weight: 600; font-family: var(--mono); font-variant-numeric: tabular-nums; margin-right: 12px; }
.legende .punkt { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legende .punkt.heute { background: var(--gruen); }
.legende .punkt.gestern { background: var(--eingabe-rand); }
.verlauffeld { display: flex; flex-direction: column; }
.verlauf { display: flex; gap: 12px; flex: 1; min-height: 11rem; }
.yachse { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; font-size: .72rem; color: var(--text-leise); font-variant-numeric: tabular-nums; white-space: nowrap; }
.verlauf svg { flex: 1; min-width: 0; height: 100%; min-height: 11rem; overflow: visible; }
.verlauf .raster { stroke: var(--linie); stroke-width: 1; vector-effect: non-scaling-stroke; }
.verlauf path { fill: none; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.verlauf .gestern { stroke: var(--eingabe-rand); stroke-width: 2; stroke-dasharray: 5 4; }
.verlauf .heute { stroke: var(--gruen); stroke-width: 3; }
.verlauf .flaeche { fill: var(--gruen); fill-opacity: .12; stroke: none; }
.verlauf .marke { stroke: var(--gruen); stroke-width: 10; stroke-linecap: square; vector-effect: non-scaling-stroke; }
.xachse { display: flex; justify-content: space-between; margin: 6px 0 0 3.6rem; font-size: .72rem; color: var(--text-leise); }
.knopf.ton.aktiv, button.ton.aktiv { border-color: var(--gruen); background: var(--gruen-flaeche); color: var(--gruen-dunkel); }
.vollbild-zu { position: fixed; bottom: 14px; right: 14px; z-index: 5; width: 44px; height: 44px; padding: 0; font-size: 1.5rem; line-height: 1; border-radius: var(--radius-s); background: var(--flaeche);
  color: var(--text); border: 1px solid var(--linie); opacity: .7; }
.vollbild-zu:hover { opacity: 1; background: var(--flaeche); color: var(--text); }
/* Vollbild: nur die Tafel, ohne Kopf und Reiter (z. B. Tablet an der Wand) */
html.live-voll .kopf, html.live-voll .leiste, html.live-voll .meldung, html.live-voll .tafelkopf { display: none; }
html.live-voll .seite { max-width: none; padding: 16px 18px 24px; }
html.live-voll body { background: var(--grund); }
@media (max-width: 1024px) {
  .ziele-liste:not(.n1) { --ziele: 2; }
}
@media (max-width: 820px) {
  .leiste4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .unten { grid-template-columns: 1fr; }
  .haupt { padding: 20px 24px 24px; }
}
@media (max-width: 640px) {
  .haupt { padding: var(--a2) var(--a2) 20px; }
  .ziele-liste { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .haupt .unter { flex-direction: column; }
  .haupt .unter .trenn { display: none; }
  .leiste4 { gap: var(--a1); }
  .leiste4 .kachel { padding: 12px 14px 14px; }
  section.feld { padding: var(--a2); }
  /* Handy: erste Zeile Uhrzeit · Kanal · Betrag, zweite Zeile der Artikel in voller Breite */
  .ticker li { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 4px; column-gap: 10px; }
  .ticker .was { display: contents; }
  .ticker .kanal { grid-column: 2; grid-row: 1; justify-self: start; }
  .ticker .zeit { grid-column: 1; grid-row: 1; }
  .ticker .betrag { grid-column: 3; grid-row: 1; }
  .ticker .artikel { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Bestand ---------- */
.tabelle.bestand td.bild { width: 3.5rem; padding-right: 0; }
.tabelle.bestand td.bild img, .bild-leer { display: flex; align-items: center; justify-content: center; color: var(--text-leise); font-weight: 600; font-size: 1rem; width: 40px; height: 40px;
  border-radius: var(--radius-s); object-fit: cover; background: var(--flaeche-2); border: 1px solid var(--linie); }
.tabelle.bestand td.wahl { width: 2.25rem; padding-right: 0; }
/* Auswahlkästchen in Tabellen: das Label ist die Bedienfläche (auf Touch-Geräten mindestens 44 × 44 px, siehe unten) */
.wahl-feld { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.wahl-feld input[type=checkbox] { margin: 0; }
form.nachfuellen { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
form.nachfuellen input[type=text] { width: 4.5rem; min-height: 32px; padding: 4px 8px; text-align: right; font-family: var(--mono); }
form.mehrfach { margin: 0 0 var(--a1); }
ul.liste { margin: var(--a1) 0 var(--a2); padding-left: 1.2rem; }
@media (max-width: 640px) {
  .tabelle.stapel.bestand tr { display: grid; grid-template-columns: 44px 2.5rem 1fr; column-gap: var(--a1); align-items: center; }
  .tabelle.stapel.bestand td { grid-column: 1 / -1; }
  .tabelle.stapel.bestand td:empty { display: none; }
  .tabelle.stapel.bestand td.wahl { grid-column: 1; grid-row: 1; padding: 0; }
  .tabelle.stapel.bestand td.bild { grid-column: 2; grid-row: 1; padding: 4px 0; width: auto; }
  .tabelle.stapel.bestand td[data-label="Artikel"] { grid-column: 3; grid-row: 1; }
  .tabelle.stapel.bestand td[data-label="SKU"], .tabelle.stapel.bestand td[data-label="Shopify"], .tabelle.stapel.bestand td[data-label="Etsy"], .tabelle.stapel.bestand td[data-label="Status"], .tabelle.stapel.bestand td[data-label="Reicht für"] {
    display: flex; justify-content: space-between; align-items: center; gap: var(--a1); padding-top: 2px; padding-bottom: 2px; }
  .tabelle.stapel.bestand td[data-label]::before { display: inline; }
  .tabelle.stapel.bestand td[data-label="Artikel"]::before, .tabelle.stapel.bestand td.wahl::before { display: none; } /* nach der Regel darüber: gleiche Gewichtung, die spätere gilt */
  form.nachfuellen input[type=text] { width: 5rem; min-height: 44px; padding: 8px; }
  form.nachfuellen button { padding: 8px 12px; }
}

/* ---------- Verkäufe ---------- */
.tabelle tr.storniert td { color: var(--text-leise); }
.tabelle tr.storniert td:nth-child(3) { text-decoration: line-through; }

/* Kursgrafik „Verkaufsverlauf“ (Seite Verkäufe, Reiter Verkäufe im Admin). Größen und Farben der SVG-Elemente stehen zusätzlich als Attribute im
   Markup – die Regeln hier gehen vor, sobald diese Datei geladen ist (Modi über die Variablen). */
.kursgrafik { margin: 0 0 var(--a4); }
.kursgrafik > h2 { margin: var(--a3) 0 12px; }
.kursgrafik.laedt .kurs-kopf, .kursgrafik.laedt .kurs-plot, .kursgrafik.laedt .kurs-x { opacity: .55; transition: opacity .15s; }
.kurs-kopf { margin: 0 0 12px; }
.kurs-gross { font-family: var(--mono); font-weight: 500; font-size: clamp(2.2rem, 8vw, 3.4rem); line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kurs-veraend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: var(--a1); }
.kurs-veraend .vergleich { font-size: .9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.kurs-veraend .vergleich.neutral { color: var(--text-leise); }
.kurs-vorher, .kurs-meta { color: var(--text-leise); font-size: .875rem; }
.kurs-meta { margin-top: 4px; }
.kurs-regler { display: flex; flex-wrap: wrap; align-items: center; gap: var(--a1) var(--a2); margin: var(--a2) 0; }
.kurs-wahl { display: contents; }
.kurs-schnitt-wahl { display: inline-flex; align-items: center; gap: 2px; font-size: .875rem; color: var(--text-leise); cursor: pointer; }
.kurs-fehler { margin: var(--a1) 0; }
.kurs-leer { padding: var(--a3); border: 1px dashed var(--eingabe-rand); border-radius: var(--radius-s); color: var(--text-leise); background: var(--hover); }
.kurs-leer p { margin: 0; }
.kurs-plot { display: flex; gap: var(--a1); }
.kurs-y { position: relative; flex: none; width: 3.6rem; height: 260px; font-size: .72rem; color: var(--text-leise); font-variant-numeric: tabular-nums; }
.kurs-y span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.kurs-y span:nth-child(1) { top: 2%; }
.kurs-y span:nth-child(2) { top: 34.2%; }
.kurs-y span:nth-child(3) { top: 66.4%; }
.kurs-y span:nth-child(4) { top: 98.7%; }
.kurs-flaeche { position: relative; flex: 1; min-width: 0; height: 260px; touch-action: pan-y; cursor: crosshair; border-radius: var(--radius-xs); }
.kurs-flaeche:focus-visible { outline: 2px solid var(--fokus); outline-offset: 3px; }
.kurs-flaeche svg { display: block; width: 100%; height: 100%; overflow: visible; }
.kurs-gitter { stroke: var(--linie); stroke-opacity: 1; stroke-width: 1; vector-effect: non-scaling-stroke; }
.kurs-flaeche-pfad { fill: var(--gruen); fill-opacity: .1; stroke: none; }
.kurs-schnitt-pfad { fill: none; stroke: var(--text-leise); stroke-opacity: 1; stroke-width: 2; stroke-dasharray: 6 5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.kurs-linie { fill: none; stroke: var(--gruen); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.kurs-marke { stroke: var(--gruen); stroke-width: 8; stroke-linecap: square; vector-effect: non-scaling-stroke; }
.kurs-kreuz { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--text-leise); opacity: .55; pointer-events: none; }
.kurs-punkt { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 2px; background: var(--gruen); box-shadow: 0 0 0 2px var(--flaeche); pointer-events: none; }
.kurs-tip { position: absolute; z-index: 3; min-width: 11rem; max-width: 18rem; padding: var(--a1) 12px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius-s); box-shadow: var(--schatten);
  font-size: .82rem; pointer-events: none; }
.kurs-tip-titel { color: var(--text-leise); font-size: .75rem; margin-bottom: 2px; }
.kurs-tip-wert { font-weight: 600; font-family: var(--mono); font-size: 1rem; font-variant-numeric: tabular-nums; }
.kurs-tip-neben { color: var(--text-leise); font-variant-numeric: tabular-nums; }
.kurs-x { display: flex; justify-content: space-between; margin: 6px 0 0 4.1rem; font-size: .72rem; color: var(--text-leise); font-variant-numeric: tabular-nums; }
.kurs-legende { margin: 12px 0 6px 4.1rem; }
.kurs-schluessel { display: inline-flex; align-items: center; gap: 6px; margin-right: var(--a2); }
.schluessel-linie.kurs { stroke: var(--gruen); }
.schluessel-linie.shopify { stroke: var(--kanal-shopify); }
.schluessel-linie.etsy { stroke: var(--kanal-etsy); }
.kurs-hinweise .meldung { margin: 10px 0; }
.kurs-hinweise .meldung p { margin: 0; }
.kurs-hinweise .meldung p + p { margin-top: 4px; }
.kurs-unter { margin: var(--a3) 0 4px; font-size: .75rem; }
.kurs-karten { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--a2); margin: 10px 0 var(--a2); }
.kurs-karten .karte { margin-bottom: 0; min-width: 0; }
.kurs-zeile2 { display: grid; gap: var(--a2); margin-bottom: var(--a2); align-items: start; }
.kurs-zeile2.zwei { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.kurs-zeile2 .karte { margin-bottom: 0; }
.kurs-karte p { margin: 4px 0 0; }
.kurs-wert { font-family: var(--mono); font-weight: 500; font-size: 1.3rem; line-height: 1.25; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kurs-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px var(--a2); margin: 4px 0 0; }
.kurs-dl dt { color: var(--text-leise); }
.kurs-dl dd { margin: 0; text-align: right; font-weight: 600; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.kurs-anteil { display: block; width: 100%; height: 10px; margin: var(--a1) 0 10px; }
.kurs-segment.shopify { fill: var(--kanal-shopify); }
.kurs-segment.etsy { fill: var(--kanal-etsy); }
.kurs-anteil-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: .88rem; }
.kurs-anteil-liste b { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.kurs-kanal::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; background: var(--text-leise); vertical-align: -.05em; }
.kurs-kanal.shopify::before { background: var(--kanal-shopify); }
.kurs-kanal.etsy::before { background: var(--kanal-etsy); }
.kurs-top-liste { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.kurs-top-liste li { display: flex; justify-content: space-between; gap: var(--a2); padding: 6px 0; border-bottom: 1px solid var(--linie); }
.kurs-top-liste li:last-child { border-bottom: 0; }
.kurs-top-stueck { white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text-leise); }
.kurs-zahlen { margin: 0 0 var(--a2); }
.kurs-zahlen summary { cursor: pointer; color: var(--gruen-dunkel); padding: 6px 0; }
.kurs-tab { margin-top: 6px; }
button.kurs-sort, button.kurs-sort:hover { background: none; border: 0; padding: 0; min-height: 0; border-radius: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.kurs-tab th[aria-sort="ascending"] .kurs-sort::after { content: " ▲"; font-size: .7em; }
.kurs-tab th[aria-sort="descending"] .kurs-sort::after { content: " ▼"; font-size: .7em; }
.kurs-fuss { margin-top: var(--a2); }
@media (max-width: 900px) {
  .kurs-karten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kurs-zeile2.zwei { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .kurs-karten { gap: var(--a1); }
  .kurs-karte { padding: 12px 14px; }
  .kurs-karte h3 { font-size: .6875rem; letter-spacing: .08em; overflow-wrap: anywhere; }
  .kurs-wert { font-size: 1.1rem; }
  .kurs-dl { display: block; }
  .kurs-dl dt { font-size: .75rem; }
  .kurs-dl dd { margin: 0 0 6px; text-align: left; }
  .kurs-y { width: 3rem; height: 220px; }
  .kurs-flaeche { height: 220px; }
  .kurs-x { margin-left: 3.5rem; }
  .kurs-legende { margin-left: 3.5rem; }
  .kurs-tip { min-width: 9.5rem; }
  .kurs-regler { gap: var(--a1) 12px; }
}
@media (max-width: 340px) {
  .kurs-karten { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- SKU-Prüfung: Ampel als Kästchen plus Wort (nie nur Farbe), Gruppen mit Anleitung ---------- */
.ampel { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--text-leise); }
.ampel.gruen { background: var(--gruen); }
.ampel.gelb { background: var(--warnung); }
.ampel.rot { background: var(--fehler-zeichen); }
.sku-ampel .marke { margin-right: var(--a1); }
.sku-ampel b { font-size: 1.05rem; }
.sku-gruppe h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sku-wo { margin: 4px 0 6px; }
.sku-anleitung { margin: 0 0 12px; max-width: 72ch; }
.sku-ok .liste { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }

/* ---------- Nachproduktion: Zahlen rechtsbündig, Vorschlag fett; die Druckansicht ist eine schlichte Tabelle ---------- */
.nachproduktion .zahl, .tabelle.nachproduktion th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.nachproduktion td form.nachfuellen input[type=text] { width: 6.6rem; }
.druck-kopf { margin-bottom: 10px; }
.tabelle.druck { width: 100%; }
@media print {
  .kopf, .reiter, .leiste, .meldung, .aktionen, .druck-kopf .aktionen, .druck-hinweis, .modus, form { display: none !important; }
  body::before { display: none; }
  body { background: #fff; color: #000; }
  .seite { padding: 0; max-width: none; }
  .karte { box-shadow: none; border: 0; padding: 0; background: #fff; }
  .tabelle th, .tabelle td { color: #000; border-color: #999; background: #fff; position: static; }
  .tabellen-rahmen { max-height: none; overflow: visible; }
  .kz-walzen { display: none !important; }
  a { color: #000; text-decoration: none; }
}

/* ---------- Artikel-Verlauf (Bestandskurve als Treppe, Zeitstrahl). Wie bei der Kursgrafik stehen Größe und Farben auch als Attribute im Markup. ---------- */
.artikel-kopf { margin: 4px 0 var(--a2); font-size: 1.05rem; }
.artikel-jetzt { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.kurs-flaeche.bv-flaeche { cursor: default; }
.bv-linie { fill: none; stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.bv-linie.shopify { stroke: var(--kanal-shopify); }
.bv-linie.etsy { stroke: var(--kanal-etsy); stroke-dasharray: 9 6; }
.bv-punkt { stroke-width: 8; stroke-linecap: square; vector-effect: non-scaling-stroke; }
.bv-punkt.shopify { stroke: var(--kanal-shopify); }
.bv-punkt.etsy { stroke: var(--kanal-etsy); }
.zeitstrahl tr.art-protokoll td, .zeitstrahl tr.art-beleg td { color: var(--text-leise); }
.zeitstrahl td a, .tabelle td.mono a { color: inherit; text-decoration-color: var(--eingabe-rand); }
.zeitstrahl td a:hover, .tabelle td.mono a:hover { color: var(--gruen-dunkel); }

/* ---------- Bericht: Wächter-Zustand und Tagesbericht (Ampel mit Wort, Tageswahl ohne Skript) ---------- */
.waechter-gesamt { margin: 4px 0 var(--a2); font-size: 1.05rem; }
.waechter-tabelle td .marke { margin-right: 0; }
.waechter-tabelle td[data-label="Zustand"] { white-space: nowrap; }
.bericht-tag h3 { margin: 10px 0 6px; }
.tagwahl { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 4px 0 var(--a2); }
.tagwahl select { width: auto; max-width: 100%; }
.bericht { display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr; gap: 12px var(--a3); margin: 0 0 var(--a2); }
.bericht dt { font-weight: 600; color: var(--text-leise); }
.bericht dd { margin: 0; }
.bericht dd ul.liste { list-style: none; padding: 0; margin: 0 0 4px; display: grid; gap: 4px; }
@media (max-width: 640px) {
  .bericht { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .bericht dd { margin-bottom: 12px; }
}

/* ---------- Lesetest-Vergleich (Admin): Summen oben, Abweichungen zuerst und farbig am Rand ---------- */
.vergleich-summe { margin: 4px 0; font-size: 1.05rem; }
.vergleich td.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.vergleich tr.vergleich-abweichend td:first-child { box-shadow: inset 3px 0 0 var(--fehler-rand); }
.vergleich tr.vergleich-offen td:first-child { box-shadow: inset 3px 0 0 var(--warnung); }

/* ---------- E-Mail-Vorschau (Admin): der Text so, wie er in der Mail steht ---------- */
.mail-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 0; padding: 12px var(--a2); background: var(--eingabe); border: 1px solid var(--linie); border-radius: var(--radius-s); font: .875rem/1.6 var(--mono); }

/* ---------- Einrichtungs-Checkliste (Admin): Kästchen statt Kreise ---------- */
ol.schritte { list-style: none; margin: 10px 0 0; padding: 0; }
.schritt { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.schritt:last-child { border-bottom: 0; }
.schritt .haken { flex: none; width: 20px; height: 20px; margin-top: 2px; border: 2px solid var(--eingabe-rand); border-radius: var(--radius-xs); position: relative; }
.schritt.erledigt .haken { background: var(--gruen-knopf); border-color: var(--gruen-knopf); }
.schritt.erledigt .haken::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid var(--knopf-text); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.schritt.teilweise .haken { border-color: var(--warnung); background: var(--warnung-flaeche); }

/* ---------- Admin: Mandantenliste als ruhige Tabelle (Name oben, die Knöpfe klein darunter) ---------- */
.bereich-admin table.tabelle { font-size: .875rem; }
.bereich-admin .tabelle td[data-label="Mandant"] > a:first-child { display: block; font-weight: 600; margin-bottom: 6px; }
.bereich-admin .tabelle td[data-label="Mandant"] .knopf.klein, .bereich-admin .tabelle td[data-label="Mandant"] button.klein { min-height: 26px; padding: 2px 8px; font-size: .75rem; margin: 2px 2px 2px 0; }
.bereich-admin .tabelle td[data-label="Letzter Lauf"] .klein-text { display: block; margin-top: 2px; font-size: .8125rem; }
.karte > .energie:first-of-type { margin-top: 0; }

/* ---------- Einkaufspreise und Gewinn-Tafel ---------- */
.tabelle.einkaufspreise td.wahl { width: 2.25rem; padding-right: 0; }
.einkaufspreise form.nachfuellen input[type=text] { width: 6.2rem; }
.einkaufspreise form.nachfuellen label { white-space: nowrap; }

/* ---------- Schrittleiste der Einrichtung (gemeinsam/src/Meter.php): Rechtecke statt Kreise ----------
   erledigt = gefüllter Balken und Haken, als Nächstes = umrandet, offen = leer; der Zustand steht auch als Text für Vorleseprogramme.
   Die erledigten Balken füllen sich beim ersten Anzeigen kurz von links (nur transform). */
.schrittleiste { margin: 0 0 var(--a3); }
.schrittleiste-titel { margin: 0 0 10px; font-size: .75rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--text-leise); }
.schrittleiste ol { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.schrittleiste li { position: relative; padding-top: 14px; font-size: .8125rem; color: var(--text-leise); min-width: 0; overflow-wrap: anywhere; }
.schrittleiste li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 2px; background: var(--flaeche-2); box-shadow: inset 0 0 0 1px var(--linie);
  transform-origin: left center; }
.schrittleiste li.erledigt::before { background: var(--gruen); box-shadow: none; animation: sl-fuellen .5s cubic-bezier(.25, .8, .25, 1) backwards; }
.schrittleiste li:nth-child(2)::before { animation-delay: 90ms; }
.schrittleiste li:nth-child(3)::before { animation-delay: 180ms; }
.schrittleiste li:nth-child(4)::before { animation-delay: 270ms; }
.schrittleiste li.aktuell::before { background: var(--gruen-flaeche); box-shadow: inset 0 0 0 1px var(--gruen); }
.schrittleiste li.erledigt, .schrittleiste li.aktuell { color: var(--text); }
.schrittleiste li.aktuell { font-weight: 600; }
.schrittleiste li.erledigt .sl-name::before { content: ""; display: inline-block; width: 4px; height: 8px; margin: 0 8px 2px 1px; border: solid var(--gruen-dunkel); border-width: 0 2px 2px 0;
  transform: rotate(45deg); }
@keyframes sl-fuellen { from { transform: scaleX(0); } }

/* ---------- Kennzahlen mit sanftem Hochzählen (gemeinsam/src/Figure.php) ----------
   Der Wert steht als Text da (lesbar, kopierbar); darüber rollen beim ersten Anzeigen Ziffernwalzen von 0 auf den Wert und machen danach dem Text
   Platz – dieselbe Schrift, dieselben Stellen, darum ohne Sprung. Live-Tafel und Verkaufsverlauf lassen die Walzen bei einem neuen Wert mit ihrem
   Skript von der alten Ziffer aus weiterrollen (--von). Nur transform und opacity; bei „Bewegung reduzieren“ nur der Text. */
.kennzahl, .leiste4 .wert, .kurs-gross { position: relative; }
.kz-text { animation: kz-zeigen 1ms linear 1.3s backwards; }
.kz-walzen { position: absolute; inset: 0; pointer-events: none; -webkit-user-select: none; user-select: none; animation: kz-weg 1ms linear 1.3s forwards; }
.kz-f { white-space: pre-wrap; } /* Trennzeichen und Einheit stehen fest, Leerzeichen bleiben wie im Text */
.kz-w { display: inline-block; height: 1.15em; height: 1lh; overflow: hidden; vertical-align: top; }
.kz-w::before { content: "0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9"; display: block; white-space: pre; transform: translateY(var(--z, 0%));
  animation: kz-rollen .95s cubic-bezier(.2, .7, .15, 1) var(--kz-verz, 0ms) backwards; }
.kz-w.z0 { --z: 0%; }
.kz-w.z1 { --z: -10%; }
.kz-w.z2 { --z: -20%; }
.kz-w.z3 { --z: -30%; }
.kz-w.z4 { --z: -40%; }
.kz-w.z5 { --z: -50%; }
.kz-w.z6 { --z: -60%; }
.kz-w.z7 { --z: -70%; }
.kz-w.z8 { --z: -80%; }
.kz-w.z9 { --z: -90%; }
.kz-walzen > :nth-child(2) { --kz-verz: 30ms; }
.kz-walzen > :nth-child(3) { --kz-verz: 60ms; }
.kz-walzen > :nth-child(4) { --kz-verz: 90ms; }
.kz-walzen > :nth-child(5) { --kz-verz: 120ms; }
.kz-walzen > :nth-child(6) { --kz-verz: 150ms; }
.kz-walzen > :nth-child(7) { --kz-verz: 180ms; }
.kz-walzen > :nth-child(8) { --kz-verz: 210ms; }
.kz-walzen > :nth-child(9) { --kz-verz: 240ms; }
.kz-walzen > :nth-child(10) { --kz-verz: 270ms; }
.kz-walzen > :nth-child(n+11) { --kz-verz: 300ms; }
@keyframes kz-rollen { from { transform: translateY(var(--von, 0%)); } }
@keyframes kz-zeigen { from { opacity: 0; } }
@keyframes kz-weg { to { opacity: 0; } }

/* ---------- Energiebalken (gemeinsam/src/Meter.php): zehn Kästchen, links nach rechts gefüllt, jedes von unten nach oben ----------
   73 % = sieben volle Kästchen, das achte zu 30 %. Beim Füllen läuft eine Welle mit kleinem Versatz je Kästchen, oben eine leuchtende Füllkante,
   ein volles Kästchen leuchtet kurz auf, danach läuft ein Glanz einmal über den Balken. Sinkt der Wert (Skript der Live-Tafel: Klasse „sinkt“), läuft
   die Welle von rechts nach links. Nur beim ersten Anzeigen und bei einem neuen Wert, nie dauernd; nur transform und opacity bewegen sich. */
.energie { --e-leer: rgba(255, 255, 255, .05); --e-rand: rgba(255, 255, 255, .08); --e-voll: var(--gruen); --e-oben: #5bdc93; --e-kante: rgba(214, 255, 230, .9);
  --e-schein: rgba(34, 197, 106, .55); --e-blitz: rgba(214, 255, 230, .5); --e-glanz: rgba(255, 255, 255, .18);
  position: relative; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; width: 100%; max-width: 22rem; height: 24px; margin: var(--a1) 0;
  overflow: hidden; border-radius: var(--radius-xs); }
html[data-theme="hell"] .energie { --e-leer: #eef2f0; --e-rand: #dde3e0; --e-voll: #009640; --e-oben: #22c56a; --e-kante: rgba(255, 255, 255, .95); --e-schein: rgba(0, 150, 64, .35);
  --e-blitz: rgba(255, 255, 255, .6); --e-glanz: rgba(255, 255, 255, .6); }
.energie.warn { --e-voll: var(--warnung); --e-oben: #f2cf73; --e-schein: rgba(232, 184, 74, .5); }
html[data-theme="hell"] .energie.warn { --e-voll: #c99a20; --e-oben: #e8b84a; --e-schein: rgba(201, 154, 32, .35); }
.energie.err { --e-voll: var(--fehler-zeichen); --e-oben: #f08480; --e-schein: rgba(229, 96, 92, .5); }
html[data-theme="hell"] .energie.err { --e-oben: #e5605c; --e-schein: rgba(198, 40, 40, .3); }
.energie.klein { height: 14px; gap: 3px; max-width: 9rem; margin: 2px 0; }
/* Anteil eines Kanals: in der Farbe des Kanals */
.energie.kanal.etsy { --e-voll: var(--kanal-etsy); --e-oben: #e9a46a; --e-schein: rgba(217, 137, 74, .45); }
html[data-theme="hell"] .energie.kanal.etsy { --e-voll: #b45309; --e-oben: #d9894a; --e-schein: rgba(180, 83, 9, .3); }
.energie.kanal { height: 14px; gap: 3px; margin: 6px 0 4px; }
.e-k { --k: 0; --w: var(--k); position: relative; overflow: hidden; border-radius: 3px; background: var(--e-leer); box-shadow: inset 0 0 0 1px var(--e-rand); }
.e-k:nth-child(2) { --k: 1; }
.e-k:nth-child(3) { --k: 2; }
.e-k:nth-child(4) { --k: 3; }
.e-k:nth-child(5) { --k: 4; }
.e-k:nth-child(6) { --k: 5; }
.e-k:nth-child(7) { --k: 6; }
.e-k:nth-child(8) { --k: 7; }
.e-k:nth-child(9) { --k: 8; }
.e-k:nth-child(10) { --k: 9; }
.energie.sinkt .e-k { --w: calc(9 - var(--k)); }
/* Füllung: steigt von unten, oben die leuchtende Füllkante */
.e-k::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, var(--e-oben), var(--e-voll) 70%);
  box-shadow: inset 0 2px 0 var(--e-kante), 0 -3px 10px var(--e-schein); transform: translateY(100%);
  transition: transform .5s cubic-bezier(.25, .8, .25, 1) calc(var(--w) * 55ms);
  animation: e-fuellen .6s cubic-bezier(.25, .8, .25, 1) calc(var(--w) * 55ms + 120ms) backwards; }
.e-k.f0::before { transform: translateY(100%); box-shadow: none; }
.e-k.f1::before { transform: translateY(90%); }
.e-k.f2::before { transform: translateY(80%); }
.e-k.f3::before { transform: translateY(70%); }
.e-k.f4::before { transform: translateY(60%); }
.e-k.f5::before { transform: translateY(50%); }
.e-k.f6::before { transform: translateY(40%); }
.e-k.f7::before { transform: translateY(30%); }
.e-k.f8::before { transform: translateY(20%); }
.e-k.f9::before { transform: translateY(10%); }
.e-k.f10::before { transform: none; }
/* kurzes Aufleuchten, sobald ein Kästchen voll ist */
.e-k::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--e-blitz); opacity: 0; pointer-events: none; }
.e-k.f10::after { animation: e-blitz .5s ease-out calc(var(--w) * 55ms + 560ms) backwards; }
/* ein Glanz läuft einmal über den Balken (beim nächsten Wert noch einmal: das Skript wechselt die Klasse „wieder“) */
.energie::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, var(--e-glanz) 50%, transparent 70%); opacity: 0;
  transform: translateX(-100%); pointer-events: none; animation: e-glanz 1.1s ease-in-out 1.05s backwards; }
.energie.wieder::after { animation-name: e-glanz-wieder; animation-delay: .7s; }
/* Neuer Wert nach dem Nachladen (Verkaufsverlauf): von der alten Füllung (--e-von) zur neuen; unveränderter Wert („ruhig“) bewegt sich nicht */
.energie.wechsel .e-k::before { animation-name: e-wechsel; animation-delay: calc(var(--w) * 55ms); }
.energie.wechsel .e-k.war-voll::after, .energie.ruhig .e-k::before, .energie.ruhig .e-k::after, .energie.ruhig::after { animation: none; }
@keyframes e-fuellen { from { transform: translateY(100%); } }
@keyframes e-blitz { 0% { opacity: 0; } 35% { opacity: 1; } 100% { opacity: 0; } }
@keyframes e-glanz { from { opacity: 1; transform: translateX(-100%); } to { opacity: 1; transform: translateX(100%); } }
@keyframes e-glanz-wieder { from { opacity: 1; transform: translateX(-100%); } to { opacity: 1; transform: translateX(100%); } }
@keyframes e-wechsel { from { transform: translateY(var(--e-von, 100%)); } }
.energie-zeile { display: flex; align-items: baseline; justify-content: space-between; gap: var(--a1); font-size: .875rem; color: var(--text-leise); margin-top: var(--a1); }
.energie-zeile b { color: var(--text); font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Bewegung: Karten blenden beim Laden kurz gestaffelt ein (einmal); Übergänge bei Hover und Fokus ---------- */
@keyframes auftauchen { from { opacity: 0; transform: translateY(8px); } }
.seite > .karte, .seite > .raster > *, .seite > .meldung, .tafel > :not(.vollbild-zu), .leiste4 > *, .unten > *, .kurs-karten > *, .kurs-zeile2 > * {
  animation: auftauchen .42s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(var(--n, 0) * 45ms); }
:is(.seite, .raster, .tafel, .leiste4, .unten, .kurs-karten, .kurs-zeile2) > :nth-child(2) { --n: 1; }
:is(.seite, .raster, .tafel, .leiste4, .unten, .kurs-karten, .kurs-zeile2) > :nth-child(3) { --n: 2; }
:is(.seite, .raster, .tafel, .leiste4, .unten, .kurs-karten, .kurs-zeile2) > :nth-child(4) { --n: 3; }
:is(.seite, .raster, .tafel, .leiste4, .unten, .kurs-karten, .kurs-zeile2) > :nth-child(5) { --n: 4; }
:is(.seite, .raster, .tafel, .leiste4, .unten, .kurs-karten, .kurs-zeile2) > :nth-child(n+6) { --n: 5; }

/* Bewegung reduzieren: keine Animation, keine Übergänge – alle Werte stehen sofort da */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .kz-walzen { display: none !important; }
  .walze span { transition: none; }
  .ticker li.neu { animation: none; }
  .haupt::after { transition: none; }
}
