/* wws-order – Struktur und Funktion der Oberfläche (Layout, Abstände, Bedienflächen) mit neutralem Standardaussehen.
   KUNDENDESIGN steckt NICHT hier: es liegt im Designordner (design_dir) als theme.css + logo.* und wird nach dieser Datei geladen.
   Farben und Schriften nur über die Variablen im Block :root ändern (im Kundendesign überschreiben).
   Bedienflächen sind mindestens 44 px hoch (Tablet, Touch). Die Schrift Manrope ist nicht mitgeliefert;
   ohne sie greift die Systemschrift. */
:root {
  --grund: #ffffff;
  --flaeche: #ffffff;
  --feld: #ffffff;
  --text: #1d232b;
  --leise: #5d6672;
  --rahmen: #cfd6de;
  --rahmen-hell: #e6ebf0;
  --kopf-a: #f5f7fa;
  --kopf-b: #edf1f5;
  --leiste: #ffffff;
  --akzent: #2f5d8a;
  --akzent-dunkel: #234667;
  --akzent-text: #ffffff;
  --akzent-hell: #e6eef6;
  --rot: #b3261e;  --rot-hell: #fdecea;
  --gelb: #7a5200; --gelb-hell: #fff3cd;
  --gruen: #1f6b3d; --gruen-hell: #e3f3e8;
  --radius: 6px;
  --abstand: 16px;
  --kachel: 220px;    /* Mindestbreite einer Katalogkachel */
  --touch: 44px;      /* Mindesthöhe bedienbarer Flächen */
  --kopfhoehe: 64px;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  font-family: Raleway, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--text);
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #14181d; --flaeche: #1c2229; --feld: #12161a; --text: #e8edf2; --leise: #9aa5b1;
    --rahmen: #3d4752; --rahmen-hell: #2b333b; --kopf-a: #1f262d; --kopf-b: #252d35; --leiste: #181d22;
    --akzent: #7fb0e0; --akzent-dunkel: #a3c7ea; --akzent-text: #10161c; --akzent-hell: #1f2f3f;
    --rot: #ff8a80; --rot-hell: #3b1f1d; --gelb: #f5c869; --gelb-hell: #3a2f14; --gruen: #6fd39a; --gruen-hell: #173323;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--grund); }
body { min-height: 100vh; display: flex; flex-direction: column; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--akzent); }
.sprite { display: none; }
svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* Kopf: Marke links, Benutzer rechts; darunter die Hauptnavigation */
.titel { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; height: var(--kopfhoehe); padding: 0 24px;
  background: var(--leiste); border-bottom: 1px solid var(--rahmen-hell); }
.marke { color: var(--text); font-weight: 800; font-size: 22px; letter-spacing: -.03em; text-decoration: none; }
.marke::after { content: "."; color: var(--akzent); }
.nutzer { margin-left: auto; color: var(--leise); white-space: nowrap; display: flex; align-items: center; gap: 12px; font-size: 13px; }
.nutzer form { margin: 0; }
.nutzer button { min-height: 36px; background: none; border: 1px solid var(--rahmen); color: var(--text); border-radius: var(--radius); padding: 0 14px; cursor: pointer; font: inherit; }
.nutzer button:hover { background: var(--akzent-hell); border-color: var(--akzent); }
.module { display: flex; flex-wrap: wrap; align-items: stretch; gap: 4px; padding: 0 20px; background: var(--leiste); border-bottom: 1px solid var(--rahmen-hell); }
.modul { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; color: var(--leise); font-weight: 600;
  text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
a.modul:hover { color: var(--akzent); }
.modul.aktiv { color: var(--akzent); border-bottom-color: var(--akzent); }
.modul svg { width: 19px; height: 19px; }

/* Aktionsleiste (Speichern, Absenden …) bleibt beim Blättern sichtbar */
.werkzeuge { position: sticky; top: var(--kopfhoehe); z-index: 20; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 24px;
  background: var(--grund); border-bottom: 1px solid var(--rahmen-hell); }
.werkzeuge .gruppe { display: flex; flex-direction: column; padding: 0; border: 0; }
.werkzeuge .knoepfe { display: flex; align-items: center; gap: 8px; }
.werkzeuge .gruppe-titel { display: none; }
.wk { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; min-height: var(--touch); padding: 0 16px; font: inherit; font-weight: 600; color: var(--text);
  text-decoration: none; background: var(--flaeche); border: 1px solid var(--rahmen); border-radius: var(--radius); cursor: pointer; }
.wk svg { width: 20px; height: 20px; }
.wk:hover { border-color: var(--akzent); background: var(--akzent-hell); }
.wk[value="absenden"] { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.wk[value="absenden"]:hover { background: var(--akzent-dunkel); }
.wk.aus { opacity: .4; cursor: default; }

main { flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: 24px; }
.status { display: flex; gap: 1rem; padding: 10px 24px; font-size: 12px; color: var(--leise); background: var(--leiste); border-top: 1px solid var(--rahmen-hell); }
h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 var(--abstand); }
h2 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.leise { color: var(--leise); }
.klein { font-size: 12px; }
.duenn { font-weight: 400; }
.abstand-u { margin-bottom: var(--abstand); }
.abstand-o { margin-top: var(--abstand); }
.panel, .karte { background: var(--flaeche); border: 1px solid var(--rahmen-hell); border-radius: 8px; padding: 20px; }
.panel + .panel { margin-top: var(--abstand); }
.hinweis { padding: 10px 14px; border: 1px solid var(--rahmen); border-radius: var(--radius); margin-bottom: var(--abstand); background: var(--feld); }
.hinweis.fehler { background: var(--rot-hell); color: var(--rot); border-color: var(--rot); }
.hinweis.warn { background: var(--gelb-hell); color: var(--gelb); border-color: var(--gelb); }
.hinweis.erfolg { background: var(--gruen-hell); color: var(--gruen); border-color: var(--gruen); }

input, select, textarea, button { font: inherit; color: var(--text); }
input[type=text], input[type=search], input[type=password], input[type=number], input[type=date], select, textarea {
  min-height: var(--touch); padding: 6px 12px; border: 1px solid var(--rahmen); border-radius: var(--radius); background: var(--feld); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: 1px; border-color: var(--akzent); }
textarea { width: 100%; min-height: 72px; resize: vertical; }
button.primaer, .knopf { min-height: var(--touch); background: var(--akzent); color: var(--akzent-text); border: 1px solid var(--akzent); border-radius: var(--radius);
  padding: 0 20px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; transition: background .18s; }
button.primaer:hover, .knopf:hover { background: var(--akzent-dunkel); }
button.sekundaer { min-height: var(--touch); background: var(--feld); border: 1px solid var(--rahmen); border-radius: var(--radius); padding: 0 16px; font-weight: 600; cursor: pointer; }
button.sekundaer:hover { border-color: var(--akzent); background: var(--akzent-hell); }
.suche { display: flex; gap: 8px; margin-bottom: var(--abstand); }
.suche input { flex: 1; max-width: 520px; background: var(--kopf-a); }

/* Katalog */
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--kachel), 1fr)); gap: 20px; }
.kachel { background: var(--flaeche); border: 1px solid var(--rahmen-hell); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: box-shadow .18s, border-color .18s, transform .18s; }
.kachel:hover { border-color: var(--akzent); box-shadow: 0 6px 18px color-mix(in srgb, var(--akzent) 12%, transparent); transform: translateY(-2px); }
.kachel .bild { aspect-ratio: 3 / 4; background: var(--kopf-a); display: flex; align-items: center; justify-content: center; color: var(--leise); }
.kachel .bild img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.kachel .text { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.kachel .nr { font-size: 11px; color: var(--leise); letter-spacing: .04em; }
.kachel .text strong { font-weight: 700; }
.kachel .preis { font-weight: 800; font-size: 15px; margin-top: 4px; }
.marke-verf { font-size: 11px; font-weight: 700; }
.verf-ja { color: var(--gruen); } .verf-nein { color: var(--rot); }

table { border-collapse: collapse; width: 100%; background: var(--feld); }
th, td { text-align: left; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--rahmen-hell); }
th { font-size: 12px; color: var(--leise); font-weight: 700; letter-spacing: .03em; background: var(--kopf-b); }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.seiten { display: flex; gap: 16px; align-items: center; margin-top: 24px; }
.detail { display: grid; grid-template-columns: minmax(260px, 480px) 1fr; gap: 32px; align-items: start; }
@media (max-width: 800px) { .detail { grid-template-columns: 1fr; } main { padding: 16px; } .titel { padding: 0 16px; } .module { padding: 0 8px; } .werkzeuge { padding: 8px 16px; } }
.galerie .gross { aspect-ratio: 3 / 4; background: var(--kopf-a); border: 1px solid var(--rahmen-hell); border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.galerie .gross img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.galerie .klein-bilder { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.galerie .klein-bilder img { width: 72px; height: 72px; object-fit: cover; background: var(--kopf-a); border: 1px solid var(--rahmen-hell); border-radius: var(--radius); }
.detail h1 { margin-bottom: 4px; }
.detail .preis { font-size: 22px; font-weight: 800; }
.formular { max-width: 420px; margin: 56px auto; }
.formular label { display: block; margin-bottom: 14px; color: var(--leise); font-weight: 600; }
.formular input { width: 100%; margin-top: 4px; }
.kopfzeile { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Bestellung: Kopf, Matrix, Summen */
.feldreihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--abstand); align-items: end; }
.feld label { display: block; font-size: 12px; font-weight: 600; color: var(--leise); margin-bottom: 4px; }
.feld select, .feld input[type=text] { width: 100%; }
.matrix-rahmen { overflow-x: auto; }
table.matrix td.zelle { padding: 4px; text-align: center; min-width: 80px; }
table.matrix td.zelle input { width: 72px; text-align: right; font-variant-numeric: tabular-nums; }
table.matrix td.zelle .verf { display: block; font-size: 11px; color: var(--leise); }
table.matrix td.zelle .verf.knapp { color: var(--gelb); font-weight: 700; }
table.matrix td.leer { color: var(--rahmen); text-align: center; background: var(--kopf-a); }
table.matrix td.weg { background: var(--rot-hell); color: var(--rot); text-align: center; font-size: 11px; }
table.matrix tfoot td { font-weight: 800; background: var(--kopf-b); }
table.matrix .zeilenkopf { min-width: 220px; }
table.matrix .zeilenkopf .nr { font-size: 11px; color: var(--leise); }
.zeile-weg { background: none; border: 0; color: var(--rot); cursor: pointer; min-height: var(--touch); min-width: var(--touch); font-size: 16px; border-radius: var(--radius); }
.zeile-weg:hover { background: var(--rot-hell); }
.treffer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rahmen-hell); }
.treffer form { margin: 0; }
.summen { margin-top: var(--abstand); display: flex; justify-content: flex-end; gap: 24px; flex-wrap: wrap; font-size: 14px; }
.summen b { font-size: 18px; }
.inline-form { display: inline; margin: 0; }

/* Budget */
.budget { border: 1px solid var(--rahmen-hell); border-radius: 8px; padding: 12px 16px; margin-bottom: var(--abstand); background: var(--flaeche); display: grid; gap: 8px; }
.budget progress { width: 100%; height: 12px; accent-color: var(--gruen); }
.budget.warnung { background: var(--gelb-hell); border-color: var(--gelb); color: var(--gelb); }
.budget.warnung progress { accent-color: var(--gelb); }
.budget.erreicht { background: var(--rot-hell); border-color: var(--rot); color: var(--rot); }
.budget.erreicht progress { accent-color: var(--rot); }
.budget .leise { color: var(--leise); }
.einladungslink { width: 100%; font-family: ui-monospace, Consolas, monospace; }
details.bestellung { border-bottom: 1px solid var(--rahmen-hell); padding: 6px 0; }
details.bestellung summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; min-height: var(--touch); }
.status-wort { font-weight: 700; }

/* Katalog: Filter, Merkliste */
.filterform { margin-bottom: var(--abstand); }
.filterform .suche { margin-bottom: 8px; align-items: center; }
.sekundaer-link { display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 8px; }
.filterleiste { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin-bottom: 8px; }
.feld-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--leise); font-weight: 600; }
.haken { display: inline-flex; align-items: center; gap: 6px; min-height: var(--touch); cursor: pointer; }
.haken input { width: 18px; height: 18px; accent-color: var(--akzent); }
.filtergruppen { background: var(--flaeche); border: 1px solid var(--rahmen-hell); border-radius: 8px; padding: 0 16px; }
.filtergruppen summary { cursor: pointer; min-height: var(--touch); display: flex; align-items: center; gap: 8px; font-weight: 700; }
.zaehler { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--akzent); color: var(--akzent-text); font-size: 12px; }
.filtergruppen .gruppen { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 20px; padding: 4px 0 8px; }
.filtergruppen fieldset { border: 0; border-top: 2px solid var(--rahmen-hell); margin: 0; padding: 6px 0 0; min-width: 0; }
.filtergruppen fieldset.aktiv { border-top-color: var(--akzent); }
.filtergruppen legend { font-size: 12px; font-weight: 700; letter-spacing: .03em; color: var(--leise); padding: 0 6px 0 0; }
.filtergruppen fieldset .haken { display: flex; min-height: 32px; }
.kachel { position: relative; }
.kachel-link { display: flex; flex-direction: column; color: inherit; text-decoration: none; flex: 1; }
.merk { position: absolute; top: 8px; right: 8px; margin: 0; }
.merk button { width: var(--touch); height: var(--touch); border-radius: 50%; border: 1px solid var(--rahmen-hell); background: rgb(255 255 255 / .92); color: var(--akzent);
  font-size: 20px; line-height: 1; cursor: pointer; }
.merk button:hover { border-color: var(--akzent); background: var(--akzent-hell); }
.merk button.an { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
.merk-detail { margin: 6px 0; }
@media (prefers-color-scheme: dark) { .merk button { background: rgb(29 33 30 / .92); } .merk button.an { background: var(--akzent); } }

/* ---- übernommen aus 0.7.x: Startseite/Begrüßung mit Kundenmarke (eigene Farben, unabhängig vom Shop-Design) ---- */
/* Startseite (Anmeldung) und Begrüßung im Katalog: eigene Farben, unabhängig vom WWS-Design (auch im Dunkelmodus hell) */
body:has(.willkommen) { background: #ffffff; }
body:has(.willkommen) .titel { background: #ffffff; border-bottom-color: #efe4ea; }
body:has(.willkommen) .titel .marke, body:has(.willkommen) .titel .marke::after { color: #b33a7c; }
body:has(.willkommen) .status { background: #f8e8f1; color: #6e5a66; border-color: #e8c9da; }
.willkommen, .begruessung {
  --lo: #b33a7c; --lo-dunkel: #220b17; --leder: #8f2d62; --gold: #b33a7c; --gold-hell: #f7dbea;
  --papier: #ffffff; --tinte: #220b17; --rose: #b4566a; --blau: #3d5a80;
}
.willkommen { max-width: 1100px; margin: 0 auto; padding: 8px 0 28px; color: var(--tinte); font-family: Georgia, "Times New Roman", serif; }
.w-kopf { text-align: center; padding: 22px 12px 18px; border-bottom: 1px solid var(--gold); position: relative; }
.w-kopf::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; border-bottom: 1px solid var(--gold); }
.w-ueber { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .34em; font: 12px/1.2 Tahoma, "Segoe UI", sans-serif; color: var(--leder); }
.w-name { margin: 0; font: 400 clamp(34px, 6vw, 62px)/1.05 Georgia, "Times New Roman", serif; letter-spacing: .14em; text-transform: uppercase; color: var(--lo-dunkel); }
.w-name span { color: var(--gold); font-style: italic; text-transform: none; letter-spacing: 0; padding: 0 .12em; }
.w-unter { margin: 10px 0 0; font-style: italic; font-size: 16px; color: #6b5a43; }
.w-mitte { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, 1fr); gap: 32px; align-items: center; padding: 34px 6px 26px; }
.w-lead h2 { margin: 0 0 10px; font: 400 28px/1.2 Georgia, serif; color: var(--lo-dunkel); }
.w-lead p { margin: 0 0 18px; font: 15px/1.65 Tahoma, "Segoe UI", sans-serif; color: #4a4a43; max-width: 52ch; }
.w-schritte { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; font: 14px Tahoma, "Segoe UI", sans-serif; }
.w-schritte li { counter-increment: s; display: flex; align-items: center; gap: 12px; }
.w-schritte li::before { content: counter(s); flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--gold);
  display: grid; place-items: center; font: italic 16px Georgia, serif; color: var(--leder); background: var(--papier); }
.w-login { margin: 0; max-width: none; background: var(--papier); color: var(--tinte); border: 1px solid #e8c9da; border-top: 4px solid var(--gold);
  border-radius: 2px; padding: 26px 26px 22px; box-shadow: 0 10px 30px rgb(90 20 60 / .12); font-family: Tahoma, "Segoe UI", sans-serif; }
.w-login h2 { font: 400 24px Georgia, serif; margin: 0 0 4px; color: var(--lo-dunkel); }
.w-login .leise { color: #706a5b; margin: 0 0 16px; }
.w-login label { color: #4a4a43; }
.w-login input { background: #fff; color: var(--tinte); border: 1px solid #dcccd5; min-height: var(--touch); }
.w-login input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.w-login .primaer { width: 100%; min-height: var(--touch); background: var(--lo); border-color: var(--lo-dunkel); color: #fff; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.w-login .primaer:hover { background: var(--lo-dunkel); }
.w-sortiment { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.w-sortiment li { position: relative; aspect-ratio: 4 / 3; border-radius: 2px; overflow: hidden; display: flex; align-items: flex-end; color: #fff;
  box-shadow: 0 4px 14px rgb(60 10 40 / .22); }
.w-sortiment li::before { content: ""; position: absolute; inset: 0; }
.w-sortiment li::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgb(255 255 255 / .75); pointer-events: none; }
.w-sortiment .herren::before { background:
  linear-gradient(135deg, rgb(255 255 255 / .06) 25%, transparent 25% 50%, rgb(255 255 255 / .06) 50% 75%, transparent 75%) 0 0 / 22px 22px, linear-gradient(160deg, #3c9aa1, #1f6068); }
.w-sortiment .damen::before { background:
  repeating-linear-gradient(0deg, rgb(255 255 255 / .09) 0 10px, transparent 10px 20px), repeating-linear-gradient(90deg, rgb(255 255 255 / .09) 0 10px, transparent 10px 20px), linear-gradient(160deg, #cc4f93, #8f2d62); }
.w-sortiment .kinder::before { background:
  radial-gradient(rgb(255 255 255 / .22) 2px, transparent 3px) 0 0 / 18px 18px, linear-gradient(160deg, #c3b83e, #8a7f1c); }
.w-sortiment div { position: relative; z-index: 1; padding: 0 20px 18px; text-shadow: 0 1px 6px rgb(0 0 0 / .45); }
.w-sortiment strong { display: block; font: 400 26px Georgia, serif; letter-spacing: .06em; }
.w-sortiment small { font: 12px Tahoma, "Segoe UI", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-hell); }
@media (max-width: 860px) { .w-mitte { grid-template-columns: 1fr; gap: 22px; } .w-sortiment { grid-template-columns: 1fr; } .w-sortiment li { aspect-ratio: 5 / 2; } }

.begruessung { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 0 0 14px; padding: 12px 18px;
  color: var(--tinte); background: var(--papier); border: 1px solid #e8c9da; border-left: 4px solid var(--gold); border-radius: 2px; font-family: Georgia, serif; }
.begruessung strong { font: 400 20px Georgia, serif; color: var(--lo-dunkel); }
.begruessung span { display: block; font: 11px Tahoma, "Segoe UI", sans-serif; color: var(--leder); letter-spacing: .2em; text-transform: uppercase; }
.begruessung a { display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 18px; border-radius: 2px;
  background: var(--lo); color: #fff; font: 13px Tahoma, "Segoe UI", sans-serif; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.begruessung a:hover { background: var(--lo-dunkel); }
.w-logo { margin: 0; line-height: 0; }
.w-logo img { width: min(560px, 92%); height: auto; }
.w-unter { margin-top: 12px; }

/* ---- übernommen aus 0.7.x: Matrixblöcke je Artikel in der Bestellerfassung ---- */
/* Matrixblöcke wie im WWS: Kasten mit Kopfleiste je Artikel */
.kasten { background: var(--flaeche); border: 1px solid var(--rahmen); border-radius: var(--radius); margin: 0 0 10px; }
.kasten-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 5px 8px;
  background: linear-gradient(var(--kopf-a), var(--kopf-b)); border-bottom: 1px solid var(--rahmen); }
.kasten-kopf .nr { color: var(--leise); }
.kasten-kopf .kopf-summen { margin-left: auto; }
.kasten-kopf .kopf-filter { display: inline-flex; align-items: center; gap: 4px; }
.kasten-inhalt { padding: 8px; }
.artikel-matrix .matrix-rahmen { padding: 0; }
.artikel-matrix table.matrix { margin: 0; }
table.matrix td.zelle.lesen { text-align: center; font-variant-numeric: tabular-nums; }
table.matrix tr[hidden] { display: none; }
.summenleiste { margin: 6px 0; padding: 6px 8px; text-align: right; background: var(--kopf-a); border: 1px solid var(--rahmen); border-radius: var(--radius); }
dl.kopfdaten { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
dl.kopfdaten dt { color: var(--leise); }
dl.kopfdaten dd { margin: 0; }
[hidden] { display: none !important; }

/* Filterwerte, die mit der jetzigen Auswahl nicht wählbar sind (Zahl 0) */
.filtergruppen .haken.leer { color: var(--leise); opacity: .55; cursor: default; }

/* ======== 0.9.0: Seitenleiste, Kopfzeile, Banner und Kacheln nach dem Entwurf „nordform“ ======== */
body.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; align-items: start; }
body.app > .sprite { display: none; }
.seitenleiste { grid-column: 1; grid-row: 1 / span 4; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  padding: 26px 16px 18px; background: var(--leiste); border-right: 1px solid var(--rahmen-hell); }
.seitenleiste .marke { font-size: 26px; padding: 0 8px 22px; }
.leiste-titel { display: flex; align-items: center; gap: 8px; margin: 6px 8px 22px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--leise); }
.leiste-titel .punkt { width: 6px; height: 6px; border-radius: 50%; background: var(--gruen); }
.leiste-gruppe { margin: 14px 8px 8px; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--leise); }
.leiste-nav { display: flex; flex-direction: column; gap: 4px; }
.leiste-nav .modul { min-height: 46px; padding: 0 12px; border: 0; border-radius: 10px; font-weight: 600; color: var(--text); gap: 12px; }
.leiste-nav .modul svg { width: 20px; height: 20px; color: var(--leise); }
.leiste-nav .modul:hover { background: var(--akzent-hell); color: var(--akzent); }
.leiste-nav .modul.aktiv { background: var(--akzent-hell); color: var(--akzent-dunkel); }
.leiste-nav .modul.aktiv svg { color: var(--akzent); }
.leiste-fuss { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--rahmen-hell); display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--leise); }
.leiste-fuss form { margin: 0; }
.leiste-fuss button { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; width: 100%; padding: 0 4px; background: none; border: 0; color: var(--text); font-weight: 600; cursor: pointer; border-radius: 8px; }
.leiste-fuss button:hover { color: var(--akzent); }

body.app .titel { grid-column: 2; grid-row: 1; position: sticky; top: 0; z-index: 30; gap: 20px; height: 84px; padding: 0 40px; }
.kopfsuche { position: relative; flex: 0 1 560px; margin: 0; }
.kopfsuche svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--leise); }
.kopfsuche input { width: 100%; min-height: 48px; padding: 0 16px 0 44px; background: var(--grund); border-radius: 10px; }
body.app .nutzer { margin-left: auto; gap: 12px; }
.avatar { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--akzent-hell); color: var(--akzent-dunkel); font-weight: 700; font-size: 13px; }
.nutzer-text { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.nutzer-text strong { color: var(--text); font-size: 14px; }
.nutzer-text small { font-size: 12px; }
.warenkorb { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; border-radius: 10px; background: var(--akzent); color: var(--akzent-text);
  font-weight: 700; text-decoration: none; white-space: nowrap; }
.warenkorb:hover { background: var(--akzent-dunkel); }
.warenkorb svg { width: 20px; height: 20px; }
body.app .werkzeuge { grid-column: 2; grid-row: 3; top: 84px; padding: 10px 40px; }
body.app main { grid-column: 2; grid-row: 4; max-width: none; padding: 28px 40px 48px; }
body.app .raster, body.app .seitenkopf, body.app .hero { max-width: 1400px; }

.krume { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 13px; color: var(--leise); }
.krume a { color: var(--leise); text-decoration: none; }
.krume a:hover { color: var(--akzent); }
.krume strong { color: var(--text); font-weight: 600; }

.hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: 260px; margin-bottom: 30px; padding: 40px 48px; border-radius: 16px;
  background: linear-gradient(115deg, #eef0e6 0%, #dfe5d8 55%, #cfd9cb 100%); }
.hero-text { position: relative; z-index: 1; max-width: 560px; }
.hero-ueber { display: flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--leise); }
.hero-ueber::before { content: ""; width: 26px; border-top: 1px solid var(--leise); }
.hero h2 { margin: 14px 0 12px; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; font-weight: 600; letter-spacing: -.03em; color: var(--akzent-dunkel); }
.hero p { margin: 0 0 22px; color: var(--leise); max-width: 46ch; }
.hero-knopf { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 22px; border-radius: 8px; background: var(--akzent); color: var(--akzent-text);
  font-weight: 600; text-decoration: none; }
.hero-knopf:hover { background: var(--akzent-dunkel); }
.hero-deko { position: absolute; right: 0; top: 0; bottom: 0; width: 46%; pointer-events: none; }
.hero-deko span { position: absolute; border-radius: 50%; background: color-mix(in srgb, var(--akzent) 7%, transparent); }
.hero-deko span:nth-child(1) { width: 340px; height: 340px; right: -60px; top: -90px; }
.hero-deko span:nth-child(2) { width: 220px; height: 220px; right: 150px; bottom: -90px; background: rgb(255 255 255 / .35); }
.hero-deko span:nth-child(3) { width: 90px; height: 90px; right: 70px; top: 70px; background: color-mix(in srgb, var(--akzent) 10%, transparent); }

.seitenkopf h1 { display: flex; align-items: center; gap: 12px; font-size: 32px; font-weight: 600; letter-spacing: -.03em; margin-bottom: 16px; }
.zahl-marke { display: inline-grid; place-items: center; min-width: 30px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--rahmen-hell); color: var(--leise); font-size: 13px; font-weight: 600; letter-spacing: 0; }
.suchchip { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 6px 12px; border-radius: 20px; background: var(--akzent-hell); }
.suchchip a { text-decoration: none; }
.filterleiste { gap: 10px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--rahmen-hell); }
.haken.pille { min-height: 42px; padding: 0 16px; border: 1px solid var(--rahmen); border-radius: 8px; background: var(--flaeche); font-weight: 500; }
.haken.pille:has(input:checked) { border-color: var(--akzent); background: var(--akzent-hell); }
.feld-inline.sortieren { margin-left: auto; }
.filtergruppen { border-radius: 12px; }

.raster { gap: 28px 24px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.kachel { background: transparent; border: 0; border-radius: 14px; overflow: visible; }
.kachel:hover { box-shadow: none; transform: none; }
.kachel .bild { aspect-ratio: 4 / 5; border-radius: 12px; background: #eeece6; overflow: hidden; transition: box-shadow .2s; }
.kachel:hover .bild { box-shadow: 0 10px 26px color-mix(in srgb, var(--akzent) 16%, transparent); }
.kachel .bild img { object-fit: contain; object-position: center; padding: 6px; transition: transform .3s; }
.kachel:hover .bild img { transform: scale(1.03); }
.kachel .text { padding: 14px 2px 4px; gap: 4px; }
.kachel .nr { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.kachel .text strong { font-size: 16px; font-weight: 600; }
.kachel .preis { font-size: 18px; font-weight: 700; margin-top: 6px; }
.merk button { background: rgb(255 255 255 / .95); border: 0; box-shadow: 0 2px 8px rgb(0 0 0 / .08); }

@media (max-width: 960px) {
  body.app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto 1fr; }
  body.app .band { display: none; }
  .seitenleiste { grid-column: 1; grid-row: 1; position: static; height: auto; overflow: visible; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--rahmen-hell); }
  .seitenleiste .marke { padding: 0 8px 0 0; }
  .leiste-titel, .leiste-gruppe, .leiste-fuss span { display: none; }
  .leiste-nav { flex-direction: row; flex-wrap: wrap; }
  .leiste-fuss { margin: 0 0 0 auto; padding: 0; border: 0; flex-direction: row; }
  .leiste-fuss button { width: auto; }
  body.app .titel { grid-column: 1; grid-row: 2; position: static; padding: 0 16px; height: 68px; }
  body.app .werkzeuge { grid-column: 1; grid-row: 4; top: 0; padding: 8px 16px; }
  body.app main { grid-column: 1; grid-row: 5; padding: 18px 16px 32px; }
  .nutzer-text, .warenkorb { display: none; }
  .hero { padding: 28px 24px; }
}

/* ---- 0.9.1: Schnellbestellung (rechtes Feld im Katalog) ---- */
.pille.schalter { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid var(--rahmen); border-radius: 8px; background: var(--flaeche); font-weight: 600; cursor: pointer; }
.pille.schalter:hover { border-color: var(--akzent); }
.pille.schalter .schalter-an { display: none; }
.pille.schalter[aria-pressed="true"] { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.pille.schalter[aria-pressed="true"] .schalter-an { display: inline; }
.pille.schalter[aria-pressed="true"] .schalter-aus { display: none; }
body.schnell-an .kachel-link { cursor: copy; }
.kachel.gewaehlt .bild { box-shadow: 0 0 0 3px var(--akzent); }
.schnellpanel { position: fixed; z-index: 40; top: 84px; right: 0; bottom: 0; width: min(560px, 96vw); overflow-y: auto; padding: 0 22px 22px;
  background: var(--flaeche); border-left: 1px solid var(--rahmen-hell); box-shadow: -10px 0 30px color-mix(in srgb, var(--akzent) 12%, transparent); }
.schnellpanel[hidden] { display: none; }
body.app.schnell-offen main { margin-right: min(560px, 96vw); }
.sp-kopf { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 12px; background: var(--flaeche); border-bottom: 1px solid var(--rahmen-hell); }
.sp-kopf .nr { display: block; font-size: 11px; letter-spacing: .1em; color: var(--leise); }
.sp-kopf strong { font-size: 18px; }
.sp-zu { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--kopf-b); cursor: pointer; font-size: 16px; }
.sp-zu:hover { background: var(--rot-hell); color: var(--rot); }
.sp-bild { margin: 14px 0; border-radius: 10px; background: #eeece6; text-align: center; }
.sp-bild img { max-height: 200px; max-width: 100%; object-fit: contain; }
.sp-haendler { margin: 10px 0; }
.sp-matrix td.zelle { min-width: 64px; }
.sp-matrix td.zelle input { width: 62px; }
.sp-aktiv { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; min-height: var(--touch); }
.sp-aktiv input { width: 18px; height: 18px; accent-color: var(--akzent); }
.sp-matrix tr.aus td { opacity: .45; background: var(--kopf-a); }
.sp-matrix tr.aus .zeilenkopf { text-decoration: line-through; }
.sp-fuss { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 0 4px; background: var(--flaeche); border-top: 1px solid var(--rahmen-hell); margin-top: 12px; }
.sp-status { min-height: 22px; margin-top: 8px; font-weight: 600; }
.sp-status.erfolg { color: var(--gruen); } .sp-status.fehler { color: var(--rot); }
@media (max-width: 960px) { .schnellpanel { top: 0; width: 100vw; } body.app.schnell-offen main { margin-right: 0; } }

/* 0.9.1 Hilfemenü */
.hilfe { position: relative; }
.hilfe > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--linie, #d9d9d9); cursor: pointer; background: #fff; }
.hilfe > summary::-webkit-details-marker { display: none; }
.hilfe > summary:hover { background: #f4f4f4; }
.hilfe-knopf { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--akzent); color: var(--akzent-text); font-weight: 700; }
.hilfe-menue { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 320px; max-width: 90vw; padding: 14px 16px; background: #fff; border: 1px solid var(--linie, #d9d9d9); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.hilfe-menue a { display: block; padding: 8px 6px; border-radius: 6px; color: inherit; text-decoration: none; }
.hilfe-menue a:hover, .hilfe-menue a:focus { background: #f1f1f1; }
.hilfe-menue hr { border: 0; border-top: 1px solid var(--linie, #e3e3e3); margin: 8px 0; }
.hilfe-kopf { margin: 0 0 6px; font-weight: 700; }
.hilfe-block { margin: 6px 0; font-size: .92em; line-height: 1.4; }
.hilfe-fuss { margin: 0; font-size: .8em; opacity: .65; }
@media (max-width: 960px) { .hilfe-text { display: none; } }

/* 0.9.2 Matrix im Schnellbestell-Panel kompakt, passt in die Breite */
table.matrix.sp-matrix { width: 100%; font-size: 12px; }
table.matrix.sp-matrix th, table.matrix.sp-matrix td { padding: 3px 1px; }
table.matrix.sp-matrix th.zahl { text-align: center; min-width: 0; }
table.matrix.sp-matrix .zeilenkopf { min-width: 0; width: 96px; max-width: 110px; white-space: normal; padding-right: 6px; overflow-wrap: anywhere; line-height: 1.2; }
table.matrix.sp-matrix td.zelle { min-width: 0; padding: 3px 1px; }
table.matrix.sp-matrix td.zelle input { width: 100%; min-width: 0; max-width: 46px; min-height: 30px; height: 30px; padding: 2px; text-align: center; box-sizing: border-box; -moz-appearance: textfield; }
table.matrix.sp-matrix td.zelle input::-webkit-outer-spin-button, table.matrix.sp-matrix td.zelle input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
table.matrix.sp-matrix td.zelle .verf { font-size: 10px; line-height: 1.2; }
table.matrix.sp-matrix td.zelle .verf + .verf { display: none; }
table.matrix.sp-matrix th:last-child, table.matrix.sp-matrix td:last-child { white-space: nowrap; padding-left: 4px; text-align: right; }
.sp-matrix .sp-aktiv { min-height: 0; gap: 4px; font-size: 12px; }
.sp-matrix .sp-aktiv input { width: 16px; height: 16px; flex: none; }
.schnellpanel { width: min(760px, 96vw); padding: 0 16px 22px; }
body.app.schnell-offen main { margin-right: min(760px, 96vw); }
.schnellpanel .matrix-rahmen { overflow-x: auto; }

/* 0.9.2 Gesamtsumme links, Budget in der Kopfzeile */
.leiste-summe { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.08); }
.leiste-summe .leiste-gruppe { margin: 0 0 6px; }
.leiste-summe .ls-zeile { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.leiste-summe .ls-zeile strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.leiste-summe small { display: block; opacity: .75; font-size: 11px; margin-top: 2px; }
.ls-balken { width: 100%; height: 8px; margin-top: 8px; }
.budgetkopf { position: relative; }
.budgetkopf > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--linie, #d9d9d9); cursor: pointer; background: #fff; }
.budgetkopf > summary::-webkit-details-marker { display: none; }
.bk-label { font-size: 12px; opacity: .7; }
.bk-menue { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 300px; max-width: 90vw; padding: 14px 16px; background: #fff; border: 1px solid var(--linie, #d9d9d9); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.bk-menue label { display: block; font-weight: 600; font-size: 13px; }
.bk-menue input[type=text] { width: 100%; margin-top: 6px; box-sizing: border-box; }
.bk-zeit { font-size: 11px; opacity: .7; margin: 8px 0; }
.bk-knoepfe { display: flex; gap: 8px; }

/* 0.9.2 Ansicht: Kacheln pro Reihe wählbar (2-10) */
.raster.raster { grid-template-columns: repeat(var(--spalten, auto-fill), minmax(0, 1fr)); }
:root:not([style*="--spalten"]) .raster.raster { grid-template-columns: repeat(auto-fill, minmax(var(--kachel), 1fr)); }
body.dicht .raster { gap: 8px; }
body.dicht .kachel .text { padding: 6px 7px 8px; }
body.dicht .kachel .text strong { font-size: 12px; }
body.dicht .kachel .nr, body.dicht .kachel .preis, body.dicht .kachel .text small, body.dicht .kachel .verf { font-size: 10px; }
.ansicht input[type=range] { width: 110px; vertical-align: middle; margin: 0 6px; }
.ansicht output { min-width: 2ch; display: inline-block; text-align: right; font-weight: 700; }

/* 0.9.2 Schnellbestell-Matrix im WWS-Look: gelbe Zellen, B/F-Anzeige, grün bei Menge */
.sp-legende { font-size: 11px; opacity: .8; margin: 6px 0 10px; }
.sp-legende .b, .bf .b { color: #c0392b; font-style: normal; font-weight: 700; }
.sp-legende .f, .bf .f { color: #6b7280; font-style: normal; font-weight: 700; }
.sp-schluessel { margin: 14px 0 4px; font-size: 14px; }
table.matrix.sp-matrix { border-collapse: collapse; width: auto; max-width: 100%; }
table.matrix.sp-matrix th { background: #dde1e7; color: #111; border: 1px solid #a9afb8; text-align: center; font-size: 12px; letter-spacing: 0; }
table.matrix.sp-matrix td { border: 1px solid #a9afb8; background: #fff; }
table.matrix.sp-matrix td.zelle { position: relative; background: #fff4b3; padding: 0; height: 40px; min-width: 38px; }
table.matrix.sp-matrix td.zelle.gefuellt { background: #9ccf6b; }
table.matrix.sp-matrix td.leer { background: #f0f0f0; }
.bf { position: absolute; left: 3px; top: 2px; bottom: 2px; display: flex; flex-direction: column; justify-content: space-between; font-size: 9px; line-height: 1; pointer-events: none; }
table.matrix.sp-matrix td.zelle input { position: relative; width: 100%; max-width: none; height: 100%; min-height: 0; border: 0; background: transparent; text-align: right; font-size: 15px; font-weight: 700; padding: 0 4px 0 20px; box-sizing: border-box; outline-offset: -2px; }
table.matrix.sp-matrix td.zelle input:focus { background: rgba(255,255,255,.55); }
.sp-matrix tr.aus td.zelle { background: #e5e5e5; }
.sp-gruppe { margin-bottom: 10px; }
.sp-gesamt { margin: 8px 0; font-size: 14px; }
table.matrix.sp-matrix .zeilenkopf { width: auto; min-width: 84px; max-width: 120px; }
table.matrix.sp-matrix td.zelle { min-width: 30px; }
.schnellpanel { width: min(760px, 96vw); }
body.app.schnell-offen main { margin-right: min(760px, 96vw); }

/* 0.9.2 Bestellkorb links (ein-/ausblendbar) und kleinere Matrixfelder */
.korb { margin: 14px 0 0; border-radius: 10px; background: rgba(255,255,255,.08); overflow: hidden; }
.korb-kopf { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: inherit; cursor: pointer; font-weight: 700; text-align: left; }
.korb-kopf svg { width: 18px; height: 18px; }
.korb-kopf span { flex: 1; }
.korb-pfeil { font-style: normal; transition: transform .15s; }
.korb.zu .korb-pfeil { transform: rotate(-90deg); }
.korb.zu .korb-inhalt { display: none; }
.korb-inhalt { padding: 2px 12px 12px; }
.korb-haendler { margin: 0 0 6px; font-size: 12px; opacity: .8; }
.korb-zahlen { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; margin: 0; }
.korb-zahlen dt { font-size: 12px; opacity: .8; }
.korb-zahlen dd { margin: 0; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.korb small { display: block; opacity: .75; font-size: 11px; margin-top: 4px; }
.korb-budget { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.18); }
.korb-budget label { display: block; font-size: 12px; font-weight: 600; }
.korb-budget input[type=text] { width: 100%; margin-top: 4px; box-sizing: border-box; min-height: 34px; }
.korb-knoepfe { display: flex; gap: 6px; margin-top: 6px; }
.korb-knoepfe button { min-height: 32px; padding: 0 10px; }
.korb-link { display: inline-block; margin-top: 8px; color: inherit; font-size: 13px; }

table.matrix.sp-matrix td.zelle { height: 30px; min-width: 34px; }
table.matrix.sp-matrix td.zelle input { font-size: 13px; padding: 0 3px 0 15px; }
.bf { font-size: 8px; left: 2px; }

/* 0.9.4 Menüband: Reiter und Werkzeugleiste wie im WWS */
.leiste-willkommen { margin: 0 8px 4px; font-size: 13px; line-height: 1.3; color: var(--leise); }
.leiste-willkommen strong { display: block; color: var(--text); font-size: 15px; }
body.app .band { grid-column: 2; grid-row: 2; background: #f8eef3; border-bottom: 1px solid #e8d3de; }
.band-reiter { display: flex; align-items: center; gap: 2px; padding: 0 20px; min-height: 44px; background: #fdf6f9; border-bottom: 1px solid #e8d3de; }
.band .reiter { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; color: var(--text); text-decoration: none; font-size: 14px; }
.band .reiter svg { width: 18px; height: 18px; color: var(--akzent); }
.band .reiter:hover { background: #f8eef3; }
.band .reiter.aktiv { background: #f8eef3; border-color: #e8d3de; font-weight: 700; position: relative; top: 1px; }
.band-fix { margin-left: auto; min-height: 30px; padding: 0 14px; border: 1px solid #e8d3de; border-radius: 15px; background: #fff; cursor: pointer; font-size: 13px; }
.band-fix[aria-pressed="true"] { background: var(--akzent-hell); border-color: var(--akzent); }
.band-leiste { display: flex; align-items: stretch; gap: 0; padding: 6px 20px 0; min-height: 84px; }
.band.zu .band-leiste { display: none; }
.band .gruppe { display: flex; flex-direction: column; justify-content: space-between; padding: 0 14px; border-right: 1px solid #e8d3de; }
.band .gruppe:first-child { padding-left: 0; }
.band .gruppe-knoepfe { display: flex; gap: 4px; }
.band .werkzeug { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 76px; min-height: 56px; padding: 4px 8px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; text-align: center; }
.band .werkzeug svg { width: 26px; height: 26px; color: var(--akzent); }
.band .werkzeug:hover { background: #d9dde3; }
.band .gruppe-name { text-align: center; font-size: 12px; color: var(--leise); padding: 3px 0 4px; }

/* 0.9.5 Persönliches Menü, Navigation ausblendbar, bis 15 Artikel pro Reihe */
.nutzer-menue { position: relative; margin-left: auto; }
.nutzer-menue > summary { list-style: none; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; padding: 4px 8px; border-radius: 10px; margin-left: 0; }
.nutzer-menue > summary::-webkit-details-marker { display: none; }
.nutzer-menue > summary:hover, .nutzer-menue[open] > summary { background: var(--akzent-hell); }
.nutzer-pfeil { font-style: normal; opacity: .6; }
.nutzer-liste { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 260px; padding: 10px; background: #fff; border: 1px solid var(--rahmen-hell); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.nutzer-liste a, .nutzer-liste button { display: block; width: 100%; box-sizing: border-box; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.nutzer-liste a:hover, .nutzer-liste button:hover { background: var(--akzent-hell); }
.nutzer-liste hr { border: 0; border-top: 1px solid var(--rahmen-hell); margin: 6px 0; }
.nutzer-liste form { margin: 0; }
.nutzer-kopf { margin: 0 0 6px; padding: 6px 10px 8px; border-bottom: 1px solid var(--rahmen-hell); }
.nutzer-kopf strong { display: block; }
.nutzer-kopf small { color: var(--leise); }
.nutzer-fuss { margin: 6px 10px 2px; font-size: 11px; color: var(--leise); }
body.app .nutzer-menue { margin-left: auto; }
.leiste-schalter { min-width: 44px; min-height: 44px; border: 1px solid var(--rahmen-hell); border-radius: 10px; background: #fff; font-size: 20px; cursor: pointer; margin-right: -4px; }
.leiste-schalter:hover { background: var(--akzent-hell); }
body.app.leiste-zu { grid-template-columns: 0 minmax(0, 1fr); }
body.app.leiste-zu .seitenleiste { display: none; }
body.sehrdicht .raster { gap: 4px; }
body.sehrdicht .kachel .text { padding: 3px 4px 4px; }
body.sehrdicht .kachel .nr, body.sehrdicht .kachel .preis, body.sehrdicht .kachel .text small, body.sehrdicht .kachel .verf, body.sehrdicht .kachel .merk { display: none; }
body.sehrdicht .kachel .text strong { font-size: 9px; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 960px) { .nutzer-menue > summary .nutzer-text, .nutzer-pfeil { display: none; } .leiste-schalter { display: none; } }

/* 0.10.0 Reiter wie im WWS, eingebettete Seiten */
.band-satz { display: flex; align-items: stretch; }
.band-satz[hidden] { display: none; }
.tabs { display: flex; align-items: flex-end; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; max-width: 240px; padding: 0 10px 0 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; cursor: pointer; font-size: 14px; white-space: nowrap; }
.tab:hover { background: #f8eef3; }
.tab.aktiv { background: #f8eef3; border-color: #e8d3de; font-weight: 700; position: relative; top: 1px; }
.tab-titel { overflow: hidden; text-overflow: ellipsis; }
.tab-zu { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; font-size: 16px; line-height: 1; color: var(--leise); }
.tab-zu:hover { background: #cfd4db; color: var(--text); }
body.app.rahmen { height: 100vh; overflow: hidden; }
body.app.rahmen main.tabhost { padding: 0; max-width: none; overflow: hidden; }
.tabpanes, .tabframe { width: 100%; height: 100%; }
.tabframe { border: 0; display: block; background: var(--grund); }
.tabframe[hidden] { display: none; }
body.eingebettet { background: var(--grund); }
body.eingebettet main { padding: 20px 28px 40px; max-width: none; }
body.eingebettet .raster, body.eingebettet .seitenkopf, body.eingebettet .hero { max-width: 1400px; }
body.eingebettet .werkzeuge { top: 0; }
body.eingebettet .schnellpanel { top: 0; }
body.eingebettet.schnell-offen main { margin-right: min(760px, 96vw); }
.veraltet { position: sticky; top: 0; z-index: 60; display: flex; gap: 12px; align-items: center; padding: 8px 28px; background: #fff4b3; border-bottom: 1px solid #d8c96a; font-size: 14px; }

/* 0.10.1 – schmales Banner statt grossem Hero */
.hero.hero-schmal { min-height: 0; margin-bottom: 14px; padding: 8px 16px; gap: 16px; border-radius: 10px; flex-wrap: wrap; }
.hero-schmal .hero-ueber { font-size: 11px; }
.hero-schmal .hero-titel { flex: 1; font-size: 15px; font-weight: 600; color: var(--akzent-dunkel); letter-spacing: -.01em; }
.hero-schmal .hero-knopf { min-height: 32px; padding: 0 14px; font-size: 13px; gap: 8px; }
.hero-schmal .hero-knopf svg { width: 14px; height: 14px; }

/* 0.10.1 Preise in der Schnellbestellung */
.sp-summen { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: flex-end; margin: 8px 0 6px; padding: 8px 10px; border: 1px solid var(--rahmen-hell, #ddd); border-radius: 8px; background: #fafaf6; }
.sp-summen .sps { display: flex; flex-direction: column; gap: 1px; font-size: 11px; color: var(--leise); }
.sp-summen .sps strong { font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.sp-summen .sps-kalk input { width: 92px; height: 30px; padding: 2px 6px; text-align: right; font-size: 14px; font-weight: 700; box-sizing: border-box; }
.sp-summen .sps-kalk i { font-style: normal; }
.sp-summen .sps-kalk { flex-direction: row; flex-wrap: wrap; align-items: center; }
.sp-summen .sps-kalk > span { flex-basis: 100%; }
.sp-preis { margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--akzent-dunkel); }
table.matrix.sp-matrix td.zelle .pr { position: absolute; right: 2px; bottom: 1px; font-style: normal; font-size: 8px; line-height: 1; font-weight: 700; color: #7a2e00; pointer-events: none; }

/* 0.10.2 Kurzliste der bestellten Artikel im Bestellkorb */
.korb-artikel { list-style: none; margin: 10px 0 4px; padding: 0; max-height: 38vh; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.korb-artikel a { display: flex; align-items: center; gap: 6px; padding: 2px 4px; border-radius: 6px; color: inherit; text-decoration: none; }
.korb-artikel a:hover { background: rgba(255,255,255,.12); }
.korb-artikel img, .korb-artikel .kb-leer { width: 28px; height: 28px; flex: none; object-fit: cover; border-radius: 4px; background: rgba(255,255,255,.18); }
.korb-artikel .kb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.korb-artikel .kb-text b { font-size: 11px; }
.korb-artikel .kb-text small { font-size: 10px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.korb-artikel .kb-menge { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* 0.10.4 Sonderpreis */
.sp-preis .so { color: #7a2e00; }
table.matrix.sp-matrix td.zelle .pr.so { color: #b3261e; }

/* 0.10.5 UVP und Sonderpreis */
.kachel .preis .sonder, .preiszeile .sonder { color: #b3261e; font-weight: 700; }
.preiszeile { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0; font-size: 16px; }

/* 0.10.6 Navigation: Einklappen-Knopf in der Leiste, Knopf in der Kopfzeile auf jeder Breite */
.marke-zeile { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.leiste-einklappen { min-width: 32px; min-height: 32px; border: 1px solid var(--rahmen-hell, #ddd); border-radius: 8px; background: #fff; font-size: 16px; line-height: 1; cursor: pointer; color: var(--text); }
.leiste-einklappen:hover { background: var(--akzent-hell); }
@media (max-width: 960px) { .leiste-schalter { display: inline-block !important; } }
.korb-hinweis { display: block; margin-top: 6px; opacity: .75; font-size: 11px; }

/* 0.10.7 Bestellkorb weiter unten, mit Trennung nach oben; engere Zeilen in der Navigation */
.seitenleiste .korb { margin-top: auto; padding-top: 18px; position: relative; }
.seitenleiste .korb::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--akzent) 0%, rgba(179,58,124,.15) 100%); }
.seitenleiste .korb { margin-bottom: 12px; }
.leiste-nav { gap: 1px; }
.leiste-nav .modul { min-height: 36px; }
.leiste-gruppe { margin-top: 12px; margin-bottom: 4px; }
.korb-artikel { gap: 6px; max-height: 44vh; }
.korb-artikel li { padding: 4px 4px 6px; border-radius: 8px; background: rgba(179,58,124,.05); }
.korb-artikel a.kb-kopf { padding: 0; }
.kb-preise { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 4px 0 0 34px; font-size: 11px; color: var(--leise); }
.kb-preise b { color: var(--text); font-variant-numeric: tabular-nums; }
.kb-kalk { display: inline-flex; align-items: center; gap: 4px; }
.kb-kalk input { width: 64px; height: 24px; padding: 1px 5px; border: 1px solid var(--rahmen-hell, #ccc); border-radius: 6px; font-size: 12px; text-align: right; box-sizing: border-box; background: #fff; }
.kb-kalk input.ok { border-color: #2e7d32; box-shadow: 0 0 0 2px rgba(46,125,50,.2); }
.kb-kalk input.fehler { border-color: #b3261e; box-shadow: 0 0 0 2px rgba(179,38,30,.2); }

/* 0.10.8 Kundensuche */
.kundensuche { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 14px; }
.kundensuche input[type=search] { flex: 1; min-width: 220px; max-width: 460px; min-height: 40px; padding: 0 12px; border: 1px solid var(--rahmen-hell, #ccc); border-radius: 10px; }
.kundenliste { display: flex; flex-direction: column; gap: 12px; }
.kunde { padding: 14px 16px; }
.kunde-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: flex-start; }
.kunde-kopf h2 { margin: 0 0 2px; font-size: 18px; }
.kunde-links { display: flex; gap: 14px; }
.kunde-zahlen { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 10px 0 8px; }
.kunde-zahlen div { display: flex; flex-direction: column; gap: 1px; }
.kunde-zahlen dt { font-size: 11px; color: var(--leise); text-transform: uppercase; letter-spacing: .06em; }
.kunde-zahlen dd { margin: 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kunde-gekauft summary { cursor: pointer; font-weight: 600; color: var(--akzent-dunkel); padding: 6px 0; }
.kunde-gekauft .matrix { width: 100%; }

/* 0.10.9 Lot-Inhalt per Doppelklick */
th.lot-kopf, td.lot-zelle { cursor: zoom-in; }
th.lot-kopf::after { content: " ⧉"; font-size: 10px; opacity: .6; }
.lot-inhalt { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--akzent); border-radius: 10px; background: #fdf4f8; }
.lot-kopf-zeile { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.lot-block h4 { margin: 8px 0 4px; font-size: 13px; }
table.matrix.sp-matrix.lot-matrix td.lot-menge { background: #dbe9c9; text-align: center; font-weight: 700; padding: 3px 6px; height: auto; }
table.matrix.sp-matrix.lot-matrix td.zeilenkopf { min-width: 160px; max-width: 260px; }

/* Artikelseite: Eingabematrix wie in der Schnellbestellung, aber mit voller Breite */
.artikel-matrix-seite .sp-fuss { position: static; }
.artikel-matrix-seite table.matrix.sp-matrix { font-size: 13px; }
.artikel-matrix-seite table.matrix.sp-matrix .zeilenkopf { width: 140px; max-width: 220px; }
.artikel-matrix-seite table.matrix.sp-matrix td.zelle input { max-width: 60px; }

/* Bestellkorb: Artikel entfernen, markierter Artikel im Katalog */
.korb-artikel li { position: relative; }
.korb-artikel a.kb-kopf { padding-right: 26px; }
.korb-artikel .kb-weg { position: absolute; top: 4px; right: 3px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; font-size: 12px; line-height: 22px; opacity: .6; }
.korb-artikel .kb-weg:hover, .korb-artikel .kb-weg:focus-visible { opacity: 1; background: rgba(160,32,32,.18); color: #a02020; }
.kachel.gewaehlt { outline: 3px solid var(--akzent); outline-offset: 2px; border-radius: 10px; }

/* ======== 0.14.0 Handy und Tablet ======== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, svg, video { max-width: 100%; }
.matrix-rahmen { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
@media (hover: none) and (pointer: coarse) {
  button, .werkzeug, .reiter, .tab, summary, .haken, select { touch-action: manipulation; }
  .tab-zu, .kb-weg, .zeile-weg { min-width: 36px; min-height: 36px; }
  .korb-artikel .kb-weg { width: 34px; height: 34px; line-height: 34px; top: 2px; right: 2px; }
}

/* Tablet und Handy: Navigation als Schublade, Reiter oben, Inhalt in voller Breite */
@media (max-width: 960px) {
  body.app, body.app.leiste-zu { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; }
  body.app .titel { grid-column: 1; grid-row: 1; position: sticky; top: 0; z-index: 30; height: 60px; padding: 0 10px; gap: 8px; }
  body.app:not(.rahmen) .band { display: none; }
  body.app.rahmen .band { display: block; grid-column: 1; grid-row: 2; }
  body.app .band-leiste, body.app .band-fix { display: none; }
  body.app .band-reiter { padding: 0 6px; min-height: 44px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  body.app .tab { min-height: 40px; max-width: 170px; }
  body.app .werkzeuge { grid-column: 1; grid-row: 3; top: 60px; padding: 8px 12px; }
  body.app main { grid-column: 1; grid-row: 4; padding: 14px 12px 28px; min-width: 0; }
  body.app.rahmen { height: 100vh; height: 100dvh; }
  body.app.rahmen main.tabhost { padding: 0; align-self: stretch; min-height: 0; }

  .seitenleiste { position: fixed; z-index: 60; top: 0; left: 0; bottom: 0; width: min(86vw, 320px); height: 100vh; height: 100dvh; max-height: none;
    flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 16px; border-right: 1px solid var(--rahmen-hell); border-bottom: 0; transform: translateX(-105%); visibility: hidden;
    transition: transform .22s ease, visibility 0s linear .22s; box-shadow: none; }
  body.app.leiste-zu .seitenleiste { display: flex; }
  body.nav-offen .seitenleiste { transform: none; visibility: visible; transition: transform .22s ease; box-shadow: 8px 0 30px rgb(0 0 0 / .25); }
  .nav-hintergrund { position: fixed; inset: 0; z-index: 55; background: rgb(0 0 0 / .45); }
  body:not(.nav-offen) .nav-hintergrund { display: none; }
  .seitenleiste .marke { padding: 0; }
  .leiste-titel, .leiste-gruppe { display: block; }
  .leiste-fuss span { display: inline; }
  .leiste-nav { flex-direction: column; flex-wrap: nowrap; }
  .leiste-nav .modul { min-height: 46px; }
  .leiste-fuss { margin: 12px 0 0; padding: 14px 8px 0; border-top: 1px solid var(--rahmen-hell); flex-direction: column; }
  .leiste-fuss button { width: 100%; min-height: 46px; }
  .leiste-einklappen { min-width: 44px; min-height: 44px; }
  .leiste-schalter { min-width: 44px; min-height: 44px; font-size: 20px; }
  .korb-artikel { max-height: 36vh; }

  /* Kopfzeile */
  .kopfsuche { flex: 1 1 auto; min-width: 0; }
  .kopfsuche input { min-height: 44px; font-size: 16px; }
  .hilfe > summary { min-height: 44px; padding: 0 10px; }
  body.app .warenkorb { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-size: 0; gap: 0; }
  body.app .warenkorb svg { width: 24px; height: 24px; }
  body.app .nutzer-menue { margin-left: 0; }
  .hilfe-menue, .nutzer-liste, .bk-menue { position: fixed; top: 64px; right: 8px; left: 8px; width: auto; max-width: none; max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto; }

  /* Katalog: Kacheln mit fester Spaltenzahl, Schieberegler „Pro Reihe“ entfällt */
  .raster.raster, :root:not([style*="--spalten"]) .raster.raster { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
  .ansicht { display: none; }
  .filterleiste { gap: 8px; }
  .filtergruppen .gruppen { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
  .filtergruppen summary, .haken { min-height: 40px; }
  .feldreihe { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
  .detail { grid-template-columns: 1fr; gap: 20px; }
  .kachel .text strong { font-size: 15px; }
  .kachel .preis { font-size: 16px; }
  .hero { padding: 22px 18px; }

  /* Eingaben: mindestens 16 px, damit iOS nicht hineinzoomt; große Tippflächen */
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px; min-height: 44px; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; }
  button, .knopf, .sekundaer, .pille { min-height: 44px; }

  /* Matrizen: seitlich wischen, Variante (erste Spalte) bleibt stehen, Mengenfelder zum Antippen groß */
  table.matrix .zeilenkopf { position: sticky; left: 0; z-index: 1; background: var(--flaeche); min-width: 104px; }
  table.matrix td.zelle input { min-width: 56px; height: 44px; text-align: center; }
  table.matrix th, table.matrix td { padding: 4px 6px; }
  table.matrix.sp-matrix { font-size: 13px; }
  table.matrix.sp-matrix th, table.matrix.sp-matrix td { padding: 4px 3px; }
  table.matrix.sp-matrix .zeilenkopf { width: 96px; min-width: 96px; max-width: 110px; }
  table.matrix.sp-matrix td.zelle { min-width: 58px; }
  table.matrix.sp-matrix td.zelle input { width: 56px; min-width: 56px; }
  .artikel-matrix-seite table.matrix.sp-matrix .zeilenkopf { width: 110px; min-width: 110px; }
  .kasten-kopf { flex-wrap: wrap; gap: 6px 12px; }

  /* Schnellbestellung: Vollbild-Blatt */
  .schnellpanel { top: 0; width: 100vw; height: 100vh; height: 100dvh; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); z-index: 70; }
  .sp-zu { width: 48px; height: 48px; }
  .sp-fuss { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}

/* Handy */
@media (max-width: 600px) {
  body.app main { padding: 12px 10px 24px; }
  .raster.raster, :root:not([style*="--spalten"]) .raster.raster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
  .kachel .text { padding: 8px 2px 2px; }
  .kachel .nr { font-size: 10px; }
  .kachel .text strong { font-size: 14px; line-height: 1.25; }
  .kachel .preis { font-size: 14px; }
  .seitenkopf h1, h1 { font-size: 22px; }
  .hilfe-text, .nutzer-text, .nutzer-pfeil { display: none; }
  dl.kopfdaten { grid-template-columns: 1fr; }
  .korb-zahlen { grid-template-columns: 1fr auto; }
  .kundensuche input[type=search] { min-width: 0; flex: 1 1 100%; max-width: none; }
  .kunde-zahlen { gap: 8px 18px; }
  .panel, .karte { padding: 14px; }
  .seiten { flex-wrap: wrap; gap: 8px; justify-content: center; }
  .budget { padding: 10px 12px; }
  /* breite Listen (Bestellungen, Händler, Kunden) wischbar statt abgeschnitten */
  main table:not(.matrix) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .w-mitte { padding: 18px 0; }
  .band .reiter { padding: 0 10px; }
}

/* Querformat am Handy: Kopfzeile flacher */
@media (max-width: 960px) and (max-height: 480px) and (orientation: landscape) {
  body.app .titel { height: 52px; }
  body.app .werkzeuge { top: 52px; }
  .raster.raster, :root:not([style*="--spalten"]) .raster.raster { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 960px) { body.eingebettet main { padding: 12px 10px 28px; } body.eingebettet .werkzeuge { padding: 8px 10px; } }

/* 0.14.1 Handy: Mengenmatrix als Karten je Variante (statt winziger Tabelle) */
.mx-schritt { display: contents; }
.mx-knopf { display: none; }
@media (max-width: 600px) {
  .matrix-rahmen { overflow: visible; }
  table.matrix:not(.lot-matrix), table.matrix:not(.lot-matrix) tbody, table.matrix:not(.lot-matrix) tr, table.matrix:not(.lot-matrix) td { display: block; }
  table.matrix:not(.lot-matrix) { width: 100%; border: 0; }
  table.matrix:not(.lot-matrix) thead, table.matrix:not(.lot-matrix) tfoot { display: none; }
  table.matrix:not(.lot-matrix) tr { margin: 0 0 14px; padding: 6px 12px 8px; border: 1px solid var(--rahmen); border-radius: 14px; background: var(--flaeche); }
  table.matrix:not(.lot-matrix) tr.aus { background: var(--kopf-a); }
  table.matrix:not(.lot-matrix) td { border: 0; padding: 0; }
  table.matrix:not(.lot-matrix) td.leer, table.matrix:not(.lot-matrix) td.leer ~ td.leer { display: none; }
  table.matrix:not(.lot-matrix) td.zeilenkopf { position: static; width: auto; min-width: 0; max-width: none; padding: 8px 0 8px; font-size: 17px; font-weight: 700; border-bottom: 2px solid var(--rahmen-hell); background: transparent; }
  table.matrix:not(.lot-matrix) td.zeilenkopf .sp-aktiv span { font-size: 17px; }
  table.matrix:not(.lot-matrix) td.zelle { display: grid; grid-template-columns: minmax(52px, auto) 1fr auto; align-items: center; column-gap: 12px; min-width: 0; padding: 8px 0; border-bottom: 1px solid var(--rahmen-hell); }
  table.matrix:not(.lot-matrix) td.zelle::before { content: attr(data-label); grid-column: 1; grid-row: 1 / span 3; font-size: 20px; font-weight: 700; }
  table.matrix:not(.lot-matrix) td.zelle > :not(.mx-schritt) { grid-column: 2; font-size: 12px; text-align: left; line-height: 1.3; }
  table.matrix:not(.lot-matrix) td.zelle .bf { display: flex; gap: 10px; }
  table.matrix:not(.lot-matrix) td.zelle.gefuellt { background: var(--akzent-hell); border-radius: 8px; padding-left: 8px; padding-right: 8px; margin: 0 -8px; }
  table.matrix:not(.lot-matrix) .mx-schritt { display: inline-flex; grid-column: 3; grid-row: 1 / span 3; align-items: center; gap: 6px; }
  table.matrix:not(.lot-matrix) .mx-knopf { display: inline-grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 1px solid var(--rahmen); border-radius: 14px; background: var(--feld); color: var(--text); font-size: 28px; line-height: 1; cursor: pointer; }
  table.matrix:not(.lot-matrix) .mx-knopf:active { background: var(--akzent); color: var(--akzent-text); }
  table.matrix:not(.lot-matrix) td.zelle input[type=number], table.matrix.sp-matrix td.zelle input { width: 72px; min-width: 72px; height: 52px; font-size: 22px; font-weight: 700; text-align: center; -moz-appearance: textfield; }
  table.matrix:not(.lot-matrix) td.zelle input::-webkit-outer-spin-button, table.matrix:not(.lot-matrix) td.zelle input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  table.matrix:not(.lot-matrix) td.weg { padding: 8px 0; color: var(--leise); font-size: 13px; }
  table.matrix:not(.lot-matrix) td.zahl { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0 0; font-size: 14px; color: var(--leise); text-align: right; }
  table.matrix:not(.lot-matrix) td.zahl::before { content: attr(data-label); }
  table.matrix:not(.lot-matrix) td.zahl:last-child { color: var(--text); }
  table.matrix:not(.lot-matrix) .zeile-weg { width: 100%; margin-top: 6px; }
  /* Summen sichtbar halten, weil die Fußzeile der Tabelle entfällt */
  .sp-gesamt { position: sticky; bottom: 0; z-index: 2; margin: 0; padding: 10px 0; background: var(--flaeche); border-top: 1px solid var(--rahmen-hell); font-size: 16px; }
}

/* 0.14.2 Artikelseite am Tablet/Handy: Bild begrenzen, damit Preis und Mengenmatrix ohne langes Scrollen sichtbar sind */
@media (max-width: 960px) {
  .detail { gap: 14px; }
  .galerie .gross { aspect-ratio: auto; height: min(42vh, 360px); }
  .galerie .gross img { object-fit: contain; object-position: center; }
  .galerie .klein-bilder { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .galerie .klein-bilder img { flex: 0 0 auto; width: 60px; height: 60px; }
}
@media (max-width: 600px) { .galerie .gross { height: min(34vh, 280px); } }

/* 0.14.3 Handy: Basisregeln der Tabellenzellen (feste Höhe, absolute Position) für die Kartenansicht aufheben */
@media (max-width: 600px) {
  body table.matrix.sp-matrix:not(.lot-matrix) td, body table.matrix:not(.lot-matrix) td { height: auto !important; border: 0 !important; background: transparent !important; }
  body table.matrix:not(.lot-matrix) td.zelle { display: grid !important; position: static !important; padding: 8px 0 !important; min-height: 64px; border-bottom: 1px solid var(--rahmen-hell) !important; }
  body table.matrix:not(.lot-matrix) td.zelle.gefuellt { background: #e6f2d8 !important; margin: 0 -8px; padding: 8px !important; border-radius: 8px; }
  body table.matrix:not(.lot-matrix) .bf, body table.matrix:not(.lot-matrix) td.zelle .pr, body table.matrix:not(.lot-matrix) td.zelle .verf { position: static !important; display: flex !important; flex-direction: row !important; gap: 10px; font-size: 13px !important; line-height: 1.3 !important; pointer-events: none; grid-column: 2; }
  body table.matrix:not(.lot-matrix) td.zelle .verf + .verf { display: flex !important; }
  body table.matrix:not(.lot-matrix) td.zelle input { position: static !important; width: 72px !important; min-width: 72px !important; max-width: none !important; height: 52px !important; padding: 0 4px !important; border: 1px solid var(--rahmen) !important; border-radius: 10px; background: var(--feld) !important; text-align: center !important; font-size: 22px !important; font-weight: 700; }
  body table.matrix:not(.lot-matrix) td.zeilenkopf { display: block !important; padding: 8px 0 !important; border-bottom: 2px solid var(--rahmen-hell) !important; }
  body table.matrix:not(.lot-matrix) td.zeilenkopf .sp-aktiv { min-height: 40px; }
  body table.matrix:not(.lot-matrix) td.zahl { display: flex !important; padding: 6px 0 0 !important; text-align: right; white-space: normal; }
  body table.matrix:not(.lot-matrix) tr { display: block; }
}

/* 0.14.3 Handy: Reihenfolge der Artikelseite – erst die Mengen (Varianten), dann Summe, Kalkulation und Bestellknopf */
@media (max-width: 600px) {
  form.sp-form { display: flex; flex-direction: column; }
  .artikel-matrix-seite form.sp-form > .sp-bild { display: none; } /* auf der Artikelseite steht das Bild schon oben; in der Schnellbestellung bleibt es */
  form.sp-form > .sp-bild { margin: 8px 0; } form.sp-form > .sp-bild img { max-height: 28vh; }
  form.sp-form > .sp-legende { order: 1; margin: 0 0 8px; }
  form.sp-form > .sp-gruppe { order: 2; }
  form.sp-form > .sp-gesamt { order: 3; }
  form.sp-form > .sp-summen { order: 4; margin-top: 10px; }
  form.sp-form > .leise.klein { order: 5; }
  form.sp-form > .sp-status { order: 6; }
  form.sp-form > .sp-fuss { order: 7; }
  form.sp-form > .sp-fuss .primaer { width: 100%; }
}

/* 0.14.4 Händler-Anzeige ganz oben (Handy/Tablet: der Bestellkorb mit dem Händlernamen liegt in der Schublade) */
.haendler-zeile { display: none; }
@media (max-width: 960px) {
  .haendler-zeile { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 14px; background: var(--akzent-hell, #e6f2d8); border-bottom: 1px solid var(--rahmen-hell); font-size: 14px; }
  .haendler-zeile svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .haendler-zeile span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .haendler-zeile a { flex: none; font-weight: 600; }
}

/* 0.14.5 Handy: Mengenfelder der Kartenansicht um mehr als die Hälfte kleiner (Knöpfe 30 px statt 52 px) */
@media (max-width: 600px) {
  table.matrix:not(.lot-matrix) tr { margin: 0 0 8px; padding: 2px 10px 4px; border-radius: 10px; }
  body table.matrix:not(.lot-matrix) td.zeilenkopf { padding: 4px 0 !important; font-size: 14px; }
  table.matrix:not(.lot-matrix) td.zeilenkopf .sp-aktiv span { font-size: 14px; }
  body table.matrix:not(.lot-matrix) td.zeilenkopf .sp-aktiv { min-height: 28px; }
  table.matrix:not(.lot-matrix) td.zelle { column-gap: 8px; grid-template-columns: minmax(28px, auto) 1fr auto; }
  body table.matrix:not(.lot-matrix) td.zelle { padding: 3px 0 !important; min-height: 36px; }
  body table.matrix:not(.lot-matrix) td.zelle.gefuellt { padding: 3px 6px !important; margin: 0 -6px; }
  table.matrix:not(.lot-matrix) td.zelle::before { font-size: 15px; }
  body table.matrix:not(.lot-matrix) .bf, body table.matrix:not(.lot-matrix) td.zelle .pr, body table.matrix:not(.lot-matrix) td.zelle .verf { font-size: 11px !important; gap: 6px; }
  table.matrix:not(.lot-matrix) .mx-schritt { gap: 4px; }
  table.matrix:not(.lot-matrix) .mx-knopf { width: 30px; height: 30px; border-radius: 8px; font-size: 18px; }
  body table.matrix:not(.lot-matrix) td.zelle input { width: 40px !important; min-width: 40px !important; height: 30px !important; font-size: 15px !important; border-radius: 8px; padding: 0 2px !important; }
  table.matrix:not(.lot-matrix) td.zahl { padding: 3px 0 0; font-size: 12px; }
  body table.matrix:not(.lot-matrix) td.zahl { padding: 3px 0 0 !important; }
}
@media (max-width: 600px) { body table.matrix:not(.lot-matrix) td.zelle .bf { justify-content: flex-start !important; } }

/* 0.14.6 Handy: Mengenfelder noch einmal deutlich kleiner (Knöpfe 24 px, Eingabe 34 x 24) */
@media (max-width: 600px) {
  table.matrix:not(.lot-matrix) tr { margin: 0 0 6px; padding: 0 8px 2px; border-radius: 8px; }
  body table.matrix:not(.lot-matrix) td.zeilenkopf { padding: 2px 0 !important; font-size: 13px; }
  table.matrix:not(.lot-matrix) td.zeilenkopf .sp-aktiv span { font-size: 13px; }
  body table.matrix:not(.lot-matrix) td.zeilenkopf .sp-aktiv { min-height: 22px; }
  table.matrix:not(.lot-matrix) td.zeilenkopf .sp-aktiv input { width: 14px; height: 14px; }
  body table.matrix:not(.lot-matrix) td.zelle { padding: 1px 0 !important; min-height: 26px; column-gap: 6px; }
  body table.matrix:not(.lot-matrix) td.zelle.gefuellt { padding: 1px 4px !important; margin: 0 -4px; }
  table.matrix:not(.lot-matrix) td.zelle::before { font-size: 13px; }
  body table.matrix:not(.lot-matrix) .bf, body table.matrix:not(.lot-matrix) td.zelle .pr, body table.matrix:not(.lot-matrix) td.zelle .verf { font-size: 10px !important; line-height: 1.15 !important; gap: 4px; }
  table.matrix:not(.lot-matrix) .mx-schritt { gap: 3px; }
  table.matrix:not(.lot-matrix) .mx-knopf { width: 24px; height: 24px; border-radius: 6px; font-size: 15px; }
  body table.matrix:not(.lot-matrix) td.zelle input { width: 34px !important; min-width: 34px !important; height: 24px !important; font-size: 13px !important; border-radius: 6px; padding: 0 !important; }
  table.matrix:not(.lot-matrix) td.zahl { font-size: 11px; }
  body table.matrix:not(.lot-matrix) td.zahl { padding: 2px 0 0 !important; }
}
@media (max-width: 600px) { body table.matrix:not(.lot-matrix) .mx-knopf { min-height: 0 !important; min-width: 0 !important; width: 24px !important; height: 24px !important; padding: 0 !important; } body table.matrix:not(.lot-matrix) td.zelle input { min-height: 0 !important; } }

/* 0.14.7 Summen und Beschriftungen kräftiger (grau auf weiß war schlecht lesbar) */
.sp-gesamt, .sp-gesamt strong { color: var(--text); }
.sp-gesamt { font-weight: 600; }
.sp-summen .sps { color: var(--text); font-size: 12px; font-weight: 600; }
.sp-summen .sps strong { font-size: 17px; font-weight: 800; }
.sp-legende, form.sp-form .leise.klein { color: var(--text); opacity: 1; }
.sp-legende { font-size: 12px; }
@media (max-width: 600px) {
  body table.matrix:not(.lot-matrix) td.zahl, table.matrix:not(.lot-matrix) td.zahl::before, table.matrix:not(.lot-matrix) td.zahl:last-child { color: var(--text) !important; font-weight: 700; font-size: 13px !important; }
  body table.matrix:not(.lot-matrix) td.zelle .verf, body table.matrix:not(.lot-matrix) td.zelle .pr { color: var(--text) !important; opacity: 1 !important; font-size: 11px !important; font-weight: 600; }
  body table.matrix:not(.lot-matrix) td.zelle .bf .f { color: #3f4650 !important; }
  .sp-gesamt { font-size: 16px; }
}

/* 0.14.8 Handy: Katalog-Kopf als eine schmale, seitlich wischbare Chip-Leiste statt vier Zeilen */
.kurz { display: none; }
@media (max-width: 600px) {
  .krume { margin-bottom: 4px; font-size: 12px; }
  .seitenkopf h1 { margin-bottom: 6px; font-size: 20px; }
  .filterleiste { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 6px; padding: 2px 0 8px; margin: 0 -10px 6px; padding-left: 10px; padding-right: 10px; scrollbar-width: none; }
  .filterleiste::-webkit-scrollbar { display: none; }
  .filterleiste .lang { display: none; }
  .filterleiste .kurz { display: inline; }
  .filterleiste > * { flex: none; }
  body .filterleiste .haken.pille, body .filterleiste .pille.schalter { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 17px; gap: 5px; white-space: nowrap; }
  .filterleiste .pille.schalter svg { width: 14px; height: 14px; }
  .filterleiste .haken.pille input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
  .filterleiste .haken.pille:has(input:checked) { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
  .filterleiste .feld-inline.sortieren { margin-left: 0; display: inline-flex; font-size: 0; }
  .filterleiste .feld-inline.sortieren select { min-height: 34px; height: 34px; padding: 0 26px 0 12px; font-size: 13px; border-radius: 17px; width: auto; max-width: 150px; }
  .filterleiste .sekundaer-link { font-size: 13px; white-space: nowrap; align-self: center; }
  .filtergruppen > summary { min-height: 34px; padding: 0; font-size: 14px; }
  .filtergruppen { margin-bottom: 8px; }
}

/* 0.14.9 Bestellkorb-Knopf im Kopf mit Stückzahl (am Handy war der Korb nur in der Navigations-Schublade) */
.warenkorb { position: relative; }
.korb-zahl { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 8px; border-radius: 10px; background: #fff; color: var(--akzent); font-size: 12px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.korb-zahl[hidden] { display: none; }
@media (max-width: 960px) {
  body.app .warenkorb { overflow: visible; }
  body.app .warenkorb .korb-zahl { position: absolute; top: -6px; right: -6px; margin: 0; border: 2px solid var(--flaeche, #fff); background: #c0392b; color: #fff; font-size: 11px; min-width: 22px; height: 22px; box-sizing: border-box; }
}

/* 0.14.11 Bestellung: Anzahl und Nettobetrag als eigene Zeile oben (Handy/Tablet) */
.korb-zeile { display: none; }
@media (max-width: 960px) {
  .korb-zeile { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--akzent); color: var(--akzent-text, #fff); text-decoration: none; font-size: 14px; }
  .korb-zeile svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .korb-zeile .kz-text { flex: 1; min-width: 0; font-weight: 600; }
  .korb-zeile b { font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
  .korb-zeile .kz-anzahl + .kz-betrag::before { content: "·"; margin-right: 10px; font-weight: 400; opacity: .7; }
}

/* 0.14.12 Warenkorb (Seite /warenkorb) */
.wk-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 14px; }
.wk-kopf h1 { margin: 0; }
.wk-haendler { margin: 0; color: var(--leise); }
.wk-raster { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.wk-liste { display: flex; flex-direction: column; gap: 12px; }
.wk-karte { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px; background: var(--flaeche); border: 1px solid var(--rahmen-hell); border-radius: 14px; }
.wk-karte:hover { box-shadow: 0 6px 20px color-mix(in srgb, var(--akzent) 10%, transparent); }
.wk-bild { display: block; width: 92px; height: 112px; border-radius: 10px; background: #eeece6; overflow: hidden; }
.wk-bild img { width: 100%; height: 100%; object-fit: contain; padding: 4px; box-sizing: border-box; }
.wk-leer { display: block; width: 100%; height: 100%; }
.wk-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wk-nr { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--leise); }
.wk-name { font-size: 17px; font-weight: 600; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.wk-name:hover { text-decoration: underline; }
.wk-menge { color: var(--leise); font-variant-numeric: tabular-nums; }
.wk-menge b { color: var(--text, #1d2b27); font-size: 16px; }
.wk-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.wk-betrag { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wk-netto { font-size: 12px; color: var(--leise); }
.wk-weg { margin-top: 8px; min-height: 0; padding: 4px 10px; border: 1px solid var(--rahmen); border-radius: 16px; background: transparent; color: var(--leise); font-size: 13px; cursor: pointer; }
.wk-weg:hover, .wk-weg:focus-visible { border-color: #a02020; color: #a02020; background: rgba(160,32,32,.06); }
.wk-summe { position: sticky; top: 16px; padding: 20px; background: var(--flaeche); border: 1px solid var(--rahmen-hell); border-radius: 14px; box-shadow: 0 8px 24px color-mix(in srgb, var(--akzent) 8%, transparent); }
.wk-summe h2 { margin: 0 0 12px; font-size: 18px; }
.wk-summe dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0 0 12px; }
.wk-summe dt { color: var(--leise); }
.wk-summe dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.wk-summe .wk-gesamt { padding-top: 10px; border-top: 1px solid var(--rahmen-hell); font-size: 18px; color: inherit; font-weight: 800; }
.wk-knopf { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; margin-top: 10px; padding: 8px 16px; border: 1px solid var(--rahmen); border-radius: 10px; background: var(--flaeche); color: inherit; font-weight: 600; text-decoration: none; text-align: center; }
.wk-knopf:hover { background: var(--akzent-hell); }
.wk-knopf small { font-weight: 400; font-size: 12px; opacity: .85; }
.wk-haupt { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text, #fff); }
.wk-haupt:hover { background: var(--akzent-dunkel); }
.wk-leer-box { max-width: 460px; margin: 40px auto; padding: 36px 24px; text-align: center; background: var(--flaeche); border: 1px solid var(--rahmen-hell); border-radius: 16px; }
.wk-leer-box svg { width: 44px; height: 44px; fill: none; stroke: var(--akzent); stroke-width: 1.5; }
.wk-leer-box h2 { margin: 12px 0 6px; }
.wk-leer-box p { margin: 0 0 18px; color: var(--leise); }
@media (max-width: 960px) {
  .wk-raster { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .wk-summe { position: static; order: -1; padding: 14px 16px; }
  .wk-summe .leise { display: none; }
  .wk-karte { grid-template-columns: 64px minmax(0, 1fr); gap: 10px 12px; padding: 10px; }
  .wk-bild { width: 64px; height: 80px; }
  .wk-name { font-size: 15px; }
  .wk-rechts { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
  .wk-rechts .wk-betrag { font-size: 17px; margin-right: auto; }
  .wk-rechts .wk-netto { margin-right: 4px; }
  .wk-weg { margin-top: 0; min-height: 34px; }
}
@media (max-width: 960px) { .wk-haendler { display: none; } }

/* 0.14.13 Warenkorb: Kosten, Erlös und Ertrag zur UVP im Kopf */
.wk-kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0 0 8px; }
.wk-kz { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--flaeche); border: 1px solid var(--rahmen-hell); border-radius: 14px; }
.wk-kz span { font-size: 13px; color: var(--leise); }
.wk-kz b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.wk-kz small { font-size: 12px; color: var(--leise); }
.wk-ertrag { background: var(--akzent-hell, #e6f2d8); border-color: var(--akzent); }
.wk-ertrag b { color: var(--akzent-dunkel, #1d4a3d); }
.wk-ertrag.minus { background: #fbeaea; border-color: #a02020; }
.wk-ertrag.minus b, .wk-uvp b.minus { color: #a02020; }
.wk-uvp b.plus { color: var(--akzent-dunkel, #1d4a3d); }
.wk-uvp { font-size: 13px; color: var(--leise); font-variant-numeric: tabular-nums; }
.wk-hinweis { margin: 0 0 16px; font-size: 12px; color: var(--leise); }
@media (max-width: 960px) {
  .wk-kennzahlen { grid-template-columns: 1fr 1fr; gap: 8px; }
  .wk-kz { padding: 10px 12px; border-radius: 12px; }
  .wk-kz b { font-size: 19px; }
  .wk-ertrag { grid-column: 1 / -1; }
}

/* 0.15.0 Mitarbeiter der Agentur */
.ma-liste { display: flex; flex-direction: column; gap: 10px; }
.ma-karte { background: var(--flaeche); border: 1px solid var(--rahmen-hell); border-radius: 12px; }
.ma-karte[open] { box-shadow: 0 6px 20px color-mix(in srgb, var(--akzent) 10%, transparent); }
.ma-karte.gesperrt { background: #f5f3ee; }
.ma-karte.gesperrt .ma-name { opacity: .65; }
.ma-karte > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px 14px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; min-height: 48px; }
.ma-karte > summary::-webkit-details-marker { display: none; }
.ma-name { display: flex; flex-direction: column; min-width: 0; }
.ma-name small { color: var(--leise); overflow-wrap: anywhere; }
.ma-rolle { padding: 3px 10px; border-radius: 12px; background: var(--rahmen-hell); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ma-rolle.ma-leitung { background: var(--akzent); color: var(--akzent-text, #fff); }
.ma-status { font-size: 13px; font-weight: 600; color: var(--akzent-dunkel, #1d4a3d); }
.gesperrt .ma-status { color: #a02020; }
.ma-letzte { font-size: 12px; color: var(--leise); white-space: nowrap; }
.ma-form, .ma-loeschen, .ma-wws { margin: 0; padding: 4px 14px 14px; border-top: 1px solid var(--rahmen-hell); }
.ma-form { padding-top: 14px; }
.ma-loeschen { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 0; padding-top: 0; }
.ma-wws { padding-top: 12px; }
.sekundaer.gefahr { color: #a02020; border-color: #a02020; }
@media (max-width: 960px) {
  .ma-karte > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .ma-status, .ma-letzte { grid-column: 1 / -1; }
  .ma-status::after { content: " · "; color: var(--leise); }
  .ma-status, .ma-letzte { display: inline; }
}

/* Kamera (Live-Bild, Einstellungen) */
.kamera-buehne { background: #111; border-radius: 8px; overflow: hidden; display: flex; justify-content: center; }
.kamera-buehne video, .kamera-buehne img { display: block; max-width: 100%; max-height: 70vh; width: auto; height: auto; }
.kamera-status { margin: 8px 0 0; }
fieldset.optionen { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
fieldset.optionen .haken input { width: 18px; height: 18px; }
.mod-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #111; border-radius: 8px; overflow: hidden; }
.mod-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kamera-buehne video { width: 100%; }
.kamera-buehne:fullscreen { background: #000; align-items: center; }
.kamera-buehne:fullscreen img { max-height: 100vh; }
.kopf-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.kopf-knopf { margin: 0; }
.sender-video { position: fixed; left: 0; top: 0; width: 4px; height: 4px; opacity: 0.01; pointer-events: none; z-index: -1; }

/* Modenschau: so viel Platz wie möglich für das Bild */
.mod-kopf { margin-bottom: 6px; }
.mod-kopf h1 { font-size: 1.25rem; margin: 0; }
.mod-panel { padding: 8px; }
.mod-panel .kamera-buehne { height: calc(100vh - 175px); min-height: 320px; align-items: stretch; }
.mod-panel .kamera-buehne img, .mod-panel .kamera-buehne video { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; }
.mod-panel .kamera-buehne:fullscreen { height: 100vh; }
.mod-panel .mod-embed { aspect-ratio: auto; height: calc(100vh - 150px); min-height: 320px; }
.mod-panel .kamera-status { margin: 4px 0 0; }

/* Modenschau: Bild links, gezeigte Produkte rechts (bestellbar) */
.mod-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); gap: 12px; align-items: start; }
.mod-layout.ohne-prod { grid-template-columns: minmax(0, 1fr); }
.mod-layout.ohne-prod .mod-prod { display: none; }
.mod-prod-auf { justify-self: start; }
.mod-prod { max-height: calc(100vh - 80px); overflow: auto; position: sticky; top: 0; background: var(--flaeche, #fff); border: 1px solid #dfe3df; border-radius: 8px; padding: 10px; }
.mod-prod-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.mod-prod-kopf h2 { margin: 0; font-size: 1.05rem; }
.mod-steuer { border: 1px dashed #b9c3bd; border-radius: 6px; padding: 8px; margin-bottom: 10px; }
.mod-steuer label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 4px; }
.mod-steuer input { width: 100%; box-sizing: border-box; }
.mod-steuer-fuss { margin-top: 6px; }
.mod-treffer { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid #dfe3df; border-radius: 6px; background: #fff; }
.mod-treffer li { padding: 0; }
.mod-treffer li.leise { padding: 6px 8px; }
.mod-treffer-knopf { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 7px 8px; cursor: pointer; font: inherit; }
.mod-treffer-knopf:hover, .mod-treffer-knopf:focus { background: #eef3ef; }
.mod-karte { border: 1px solid #dfe3df; border-radius: 8px; padding: 8px; margin-bottom: 10px; background: #fff; }
.mod-karte.live { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent) inset; }
.mod-karte.neu { animation: mod-neu 1.2s ease-in-out 4; }
@keyframes mod-neu { 50% { background: #fff6cc; } }
.mod-karte-kopf { display: flex; gap: 8px; align-items: flex-start; }
.mod-karte-kopf img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; flex: none; }
.mod-karte-titel { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mod-karte-titel .nr { font-size: .8rem; color: #555; }
.mod-karte-steuer { display: grid; gap: 4px; }
.mod-karte-inhalt { margin-top: 8px; }
.mod-karte-inhalt .sp-bild { display: none; }
.mod-karte-inhalt .matrix-rahmen { overflow-x: auto; }
.mod-frueher summary { cursor: pointer; font-weight: 600; margin: 6px 0; }
@media (max-width: 1000px) { .mod-layout { grid-template-columns: minmax(0, 1fr); } .mod-prod { position: static; max-height: none; } }

/* Modenschau: Vorschau, Interessen, hinterlegtes Bild */
.mod-abschnitt { font-size: .9rem; margin: 12px 0 6px; color: var(--akzent); }
.mod-platzhalter img { width: 100%; max-height: calc(100vh - 150px); object-fit: contain; background: #111; border-radius: 6px; }
.mod-platz-vorschau img { max-width: 360px; width: 100%; border-radius: 6px; border: 1px solid #dfe3df; }
.mod-text { font-size: .82rem; color: #555; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mod-preis { font-weight: 600; font-size: .9rem; }
.mod-preis.sonder { color: #8a1c00; }
.mod-karte[data-zustand="vorschau"] { background: #fafbfa; }
.mod-karte-steuer .herz { white-space: nowrap; }
.mod-treffer-zeile { display: flex; gap: 4px; align-items: center; padding: 4px 6px; }
.mod-treffer-text { flex: 1; min-width: 0; font-size: .85rem; }
.mod-treffer-zeile .nr { font-size: .8rem; color: #555; }
.interessen { display: grid; gap: 10px; max-width: 980px; }
.interesse .mod-karte-kopf img { width: 72px; height: 72px; }

.sender-meldung { position: fixed; left: 50%; top: 8px; transform: translateX(-50%); z-index: 50; max-width: min(720px, 94vw); padding: 8px 14px; border-radius: 6px; font-size: 0.95rem; background: #fde8e8; color: #7a1010; border: 1px solid #e0a0a0; }
.sender-meldung.ok { background: #e6f4ea; color: #14501f; border-color: #a5d2b0; }

/* Statistik */
.stat-reiter { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; border-bottom: 1px solid var(--rahmen); }
.stat-reiter a { padding: 7px 14px; text-decoration: none; color: var(--leise); border: 1px solid transparent; border-bottom: none; border-radius: 8px 8px 0 0; }
.stat-reiter a:hover { color: inherit; }
.stat-reiter a.aktiv { color: inherit; font-weight: 600; background: var(--weiss, #fff); border-color: var(--rahmen); margin-bottom: -1px; }
table.matrix tfoot th { text-align: left; border-top: 2px solid var(--rahmen); }
table.matrix tfoot th.zahl { text-align: right; }
