/*
  Feinschliff des Konfigurators (08.10.2026).

  Liegt als letzte Stildatei und legt eine durchgehende Ordnung über alles,
  was auf der Seite wirklich zu sehen ist: Schriftgrößen nach der Skala der
  Website (nichts unter 12 Pixel, Fließtext 15 bis 16), dieselben Radien
  (Karten 26 bis 32, Felder und Knöpfe als Pillen), Abstände im Raster von
  4 Pixeln und drei gleich gebaute Schritt-Karten.

  Die alten Dateien bleiben unangetastet; hier wird nur überschrieben. Darum
  steht vor vielen Regeln .config-section: das hebt sie über die teils sehr
  spezifischen Regeln aus styles.css.
*/

:root {
  --kf-cobalt: #2348db;
  --kf-cobalt-hover: #1d3bb8;
  --kf-cobalt-weich: #eef2ff;
  --kf-text: #0b1120;
  --kf-leise: #4c566a;
  --kf-still: #7a8496;
  --kf-linie: #e1e6ef;
  --kf-linie-stark: #cfd6e3;
  --kf-flaeche: #f6f8fb;
  --kf-karte: #ffffff;
  --kf-display: 'Clash Display', 'Inter', sans-serif;
  --kf-ui: 'Inter', system-ui, sans-serif;
  --kf-pille: 999px;
}

/* ── Fläche und Karten ──────────────────────────────────────────────── */

.config-section.config-section--simple {
  padding: clamp(28px, 5vw, 56px) 0 clamp(64px, 8vw, 112px);
  background: var(--kf-flaeche);
}

.config-section .config-shell,
.config-section .config-shell--simple {
  display: grid;
  gap: 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.config-section .config-intro {
  padding: clamp(12px, 3vw, 28px) 0 clamp(8px, 2vw, 16px);
  border: 0;
  background: none;
  text-align: center;
}

.config-section .config-intro::after { content: none; display: none; }

.config-section .config-intro > span {
  display: block;
  max-width: 34em;
  margin: 18px auto 0;
  color: var(--kf-leise);
  font: 400 clamp(15px, 1.4vw, 17px) / 1.55 var(--kf-ui);
}

.config-section .machine-step,
.config-section .machine-stage,
.config-section .catalog {
  margin: 0;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--kf-linie);
  border-radius: 32px;
  background: var(--kf-karte);
  box-shadow: 0 1px 2px rgb(11 17 32 / 4%);
}

.config-section .workbench,
.config-section .workbench--simple {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

/* ── Schritt-Überschriften: Nummer, Vorzeile, Titel ─────────────────── */

.config-section .step-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
}

.config-section .stage-heading .step-heading,
.config-section .catalog-head .step-heading { margin: 0; }

.config-section .step-heading > span {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--kf-pille);
  background: var(--kf-cobalt);
  color: #fff;
  font: 600 15px / 1 var(--kf-ui);
}

.config-section .step-heading small,
.config-section .step-heading p,
.config-section .stage-heading .step-heading p,
.config-section .catalog-head .step-heading p {
  display: block;
  margin: 0 0 3px;
  color: var(--kf-cobalt);
  font: 600 13px / 1.3 var(--kf-ui);
  letter-spacing: 0;
  text-transform: none;
}

.config-section .step-heading small::before { content: none; }

.config-section .step-heading strong,
.config-section .step-heading h2,
.config-section .stage-heading .step-heading h2,
.config-section .catalog-head .step-heading h2 {
  display: block;
  margin: 0;
  color: var(--kf-text);
  font: 600 clamp(20px, 2.2vw, 26px) / 1.15 var(--kf-display);
  letter-spacing: -0.01em;
}

.config-section .stage-heading,
.config-section .catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 16px;
  margin: 0 0 20px;
}

/* ── Schritt 1: Automat wählen ──────────────────────────────────────── */

.config-section .machine-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

/* Automatensuche über der Wahl, Treffer mit Foto (stovari-automatsuche.js) */
.config-section .automat-suche {
  position: relative;
  z-index: 20;
  width: min(640px, 100%);
  margin: 0;
}
/* Nur die Suche ist sichtbar; die Karten dienen ihr als Quelle */
.config-section .machine-picker[hidden] { display: none; }
.config-section .automat-suche .search-field { width: 100%; }
.config-section .automat-suche input::-webkit-search-cancel-button { cursor: pointer; }
.config-section .automat-suche__liste {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(440px, 62vh);
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  border: 1px solid var(--kf-linie);
  border-radius: 24px;
  background: var(--kf-karte);
  box-shadow: 0 18px 48px rgb(11 17 32 / 14%), 0 2px 6px rgb(11 17 32 / 6%);
}
.config-section .automat-suche__liste[hidden] { display: none; }
.config-section .automat-suche__treffer {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 8px 14px 8px 8px;
  border-radius: 18px;
  cursor: pointer;
}
.config-section .automat-suche__treffer.is-aktiv { background: var(--kf-cobalt-weich); }
.config-section .automat-suche__bild {
  display: grid;
  place-items: center;
  width: 56px;
  height: 72px;
  border-radius: 14px;
  background: var(--kf-flaeche);
}
.config-section .automat-suche__bild img { width: auto; height: 62px; max-width: 48px; object-fit: contain; }
.config-section .automat-suche__text { display: grid; gap: 2px; min-width: 0; }
.config-section .automat-suche__text small { color: var(--kf-still); font: 500 12px / 1.2 var(--kf-ui); }
.config-section .automat-suche__text strong { color: var(--kf-text); font: 600 16px / 1.25 var(--kf-ui); }
.config-section .automat-suche__text em { color: var(--kf-leise); font: 400 13px / 1.3 var(--kf-ui); font-style: normal; }
.config-section .automat-suche__haken {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--kf-cobalt);
  color: #fff;
  font: 600 13px / 1 var(--kf-ui);
}
.config-section .automat-suche__leer { padding: 14px 16px; color: var(--kf-leise); font: 400 15px / 1.45 var(--kf-ui); }
.config-section .automat-suche__leer a { color: var(--kf-cobalt); font-weight: 500; }

/* Hersteller als Zwischenzeile über ihren Geräten (seit 7 Geräten, 08.10.2026) */
.config-section .machine-gruppe {
  grid-column: 1 / -1;
  margin: 8px 0 -2px 4px;
  color: var(--kf-leise);
  font: 600 13px / 1.2 var(--kf-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.config-section .machine-gruppe:first-child { margin-top: 0; }

/* Der Hersteller steht schon darüber; Namen brechen um statt abzuschneiden */
.config-section .machine-picker .machine-choice small { display: none; }
.config-section .machine-picker .machine-choice strong,
.config-section .machine-picker .machine-choice em { overflow: visible; text-overflow: clip; white-space: normal; }

.config-section .machine-choice {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 16px;
  min-height: 112px;
  padding: 12px 18px 12px 12px;
  border: 1.5px solid var(--kf-linie);
  border-radius: 24px;
  background: var(--kf-karte);
  box-shadow: none;
  color: var(--kf-text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, background-color 0.18s, box-shadow 0.18s;
}

.config-section .machine-choice:hover { border-color: var(--kf-linie-stark); background: #fbfcfe; transform: none; }

.config-section .machine-choice.is-selected {
  border-color: var(--kf-cobalt);
  background: #f5f7ff;
  box-shadow: 0 0 0 4px rgb(35 72 219 / 9%);
}

.config-section .machine-choice:focus-visible { outline: 2px solid var(--kf-cobalt); outline-offset: 3px; }

.config-section .machine-choice__icon,
.config-section .machine-choice__icon--official {
  display: grid;
  place-items: center;
  width: 64px;
  height: 88px;
  padding: 4px;
  overflow: visible;
  border: 0;
  border-radius: 14px;
  background: none;
  box-shadow: none;
}

.config-section .machine-choice__icon img,
.config-section .machine-choice__icon--official img {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgb(11 17 32 / 18%));
}

.config-section .machine-choice > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }

.config-section .machine-choice small {
  display: block;
  margin: 0;
  color: var(--kf-still);
  font: 600 12px / 1.2 var(--kf-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.config-section .machine-choice small::before { content: none; display: none; }

.config-section .machine-choice strong {
  display: block;
  margin: 0;
  color: var(--kf-text);
  font: 600 17px / 1.2 var(--kf-display);
  letter-spacing: -0.005em;
}

.config-section .machine-choice em {
  display: block;
  margin: 0;
  color: var(--kf-leise);
  font: 400 13px / 1.4 var(--kf-ui);
  font-style: normal;
}

.config-section .choice-check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--kf-linie-stark);
  border-radius: var(--kf-pille);
  background: #fff;
  color: transparent;
  font: 700 12px / 1 var(--kf-ui);
}

.config-section .machine-choice.is-selected .choice-check {
  border-color: var(--kf-cobalt);
  background: var(--kf-cobalt);
  color: #fff;
}

/* ── Schritt 2: Fächer belegen ──────────────────────────────────────── */

.config-section .stage-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.config-section .stage-actions .print-button,
.config-section .print-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--kf-linie);
  border-radius: var(--kf-pille);
  background: #fff;
  box-shadow: none;
  color: var(--kf-text);
  font: 500 14px / 1 var(--kf-ui);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.18s, background-color 0.18s;
}

.config-section .stage-actions .print-button:hover,
.config-section .print-button:hover { border-color: var(--kf-linie-stark); background: var(--kf-flaeche); }

.config-section .stage-actions .print-button svg,
.config-section .print-button svg { width: 16px; height: 16px; }

/* Die Bühne: helles Licht von oben, der Automat steht darin */
.config-section .workbench--simple .machine-area,
.config-section .machine-area {
  position: relative;
  min-height: 0;
  margin: 0;
  padding: clamp(24px, 4.5vw, 56px) clamp(28px, 4vw, 48px) clamp(32px, 5vw, 60px);
  overflow: visible;
  border: 0;
  border-radius: 26px;
  background:
    radial-gradient(90% 70% at 50% 0%, rgb(255 255 255 / 95%) 0%, rgb(255 255 255 / 0%) 70%),
    linear-gradient(180deg, #f3f6fb 0%, #e9eef6 100%);
}

/* Kennzahlen unter dem Automaten */
.config-section .machine-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 0;
}

.config-section .machine-area::after { content: none; display: none; }

.config-section .summary-stat {
  display: grid;
  text-align: left;
  gap: 4px;
  min-height: 0;
  padding: 16px 18px;
  border: 0;
  border-radius: 20px;
  background: var(--kf-flaeche);
  box-shadow: none;
}

.config-section .machine-summary .summary-stat { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; justify-items: start; align-content: center; align-items: start; text-align: left; }

.config-section .summary-stat small {
  display: block;
  margin: 0;
  color: var(--kf-leise);
  font: 500 13px / 1.3 var(--kf-ui);
  letter-spacing: 0;
  text-transform: none;
}

.config-section .summary-stat strong {
  display: block;
  margin: 0;
  color: var(--kf-text);
  font: 600 clamp(20px, 2vw, 24px) / 1.15 var(--kf-display);
  font-variant-numeric: tabular-nums;
}

/* Leiste für ein vorab gewähltes Produkt */
.config-section .selection-bar { margin: 0 0 16px; padding: 0; border: 0; background: none; box-shadow: none; }

.config-section .selection-dock {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto 40px;
  align-items: center;
  gap: 14px;
  padding: 10px 10px 10px 12px;
  border: 1.5px solid var(--kf-cobalt);
  border-radius: 22px;
  background: #f5f7ff;
  box-shadow: 0 0 0 4px rgb(35 72 219 / 8%);
}

.config-section .selection-dock .product-thumb { width: 56px; height: 56px; padding: 4px; border-radius: 14px; background: #fff; }
.config-section .selection-dock__copy small { color: var(--kf-cobalt); font: 600 12px / 1.2 var(--kf-ui); letter-spacing: 0; text-transform: none; }
.config-section .selection-dock__copy strong { display: block; margin-top: 2px; color: var(--kf-text); font: 600 15px / 1.3 var(--kf-ui); }
.config-section .selection-dock__copy span { display: block; margin-top: 2px; color: var(--kf-leise); font: 400 13px / 1.35 var(--kf-ui); }

.config-section .selection-dock__instruction {
  padding: 8px 14px;
  border-radius: var(--kf-pille);
  background: var(--kf-cobalt);
  color: #fff;
  font: 600 13px / 1.2 var(--kf-ui);
  white-space: nowrap;
}

.config-section .selection-dock__close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--kf-linie);
  border-radius: var(--kf-pille);
  background: #fff;
  color: var(--kf-leise);
  font: 400 22px / 1 var(--kf-ui);
}

/* ── Schritt 3: Katalog ─────────────────────────────────────────────── */

.config-section .catalog-head > span,
.config-section #result-count {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--kf-pille);
  background: var(--kf-flaeche);
  color: var(--kf-leise);
  font: 500 13px / 1 var(--kf-ui);
  letter-spacing: 0;
  text-transform: none;
}

.config-section .catalog-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.config-section .catalog-controls .search-field,
.config-section .search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(380px, 100%);
  height: 48px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid var(--kf-linie);
  border-radius: var(--kf-pille);
  background: #fff;
  box-shadow: none;
}

.config-section .search-field:focus-within { border-color: var(--kf-cobalt); box-shadow: 0 0 0 4px rgb(35 72 219 / 10%); }
.config-section .search-field svg { flex: none; width: 18px; height: 18px; color: var(--kf-still); }
.config-section .search-field input { width: 100%; min-width: 0; border: 0; background: none; color: var(--kf-text); font: 400 16px / 1 var(--kf-ui); outline: none; }
.config-section .search-field input::placeholder { color: var(--kf-still); }

.config-section .catalog-controls .category-filters,
.config-section .category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.config-section .category-filters button {
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--kf-linie);
  border-radius: var(--kf-pille);
  background: #fff;
  box-shadow: none;
  color: var(--kf-text);
  font: 500 14px / 1 var(--kf-ui);
  white-space: nowrap;
  cursor: pointer;
}

.config-section .category-filters button:hover { border-color: var(--kf-linie-stark); }

.config-section .category-filters button.is-active {
  border-color: var(--kf-cobalt);
  background: var(--kf-cobalt);
  color: #fff;
}

/* Eigene Produkte: dieselbe Größe wie der Rest */
.config-section .eigen { margin-top: 16px; border-color: var(--kf-linie); border-radius: 20px; background: var(--kf-flaeche); }
.config-section .eigen-oeffner { min-height: 52px; gap: 10px; padding: 0 18px; color: var(--kf-cobalt); font: 600 14px / 1.3 var(--kf-ui); }
.config-section .eigen-oeffner svg { width: 16px; height: 16px; }
.config-section .eigen-inhalt { padding: 6px 18px 18px; }
.config-section .eigen-ruhig,
.config-section .eigen-meldung,
.config-section .eigen-still,
.config-section .eigen-kopf { font-size: 13px; line-height: 1.45; }
.config-section .eigen-haupt { font-size: 14px; }
.config-section .eigen-reiter { font-size: 13px; }
.config-section .eigen-feld label,
.config-section .eigen-haken label,
.config-section .eigen-listentitel,
.config-section .eigen-stand { font-size: 12px; }
.config-section .eigen-feld input,
.config-section .eigen-feld select { font-size: 16px; }
.config-section .eigen-listenname { font-size: 14px; }

/* Platzhalter, bevor die Übersicht geladen ist */
.config-section .product-list { margin-top: 20px; }

.config-section .product-list__ready {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 24px 28px;
  border: 0;
  border-radius: 24px;
  background: var(--kf-flaeche);
  box-shadow: none;
}

.config-section .product-list__ready strong { display: block; color: var(--kf-text); font: 600 22px / 1.2 var(--kf-display); }
.config-section .product-list__ready small { display: block; margin-top: 4px; color: var(--kf-leise); font: 400 14px / 1.45 var(--kf-ui); }

.config-section .product-list__ready button,
.config-section .product-list__more {
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--kf-pille);
  background: var(--kf-cobalt);
  box-shadow: none;
  color: #fff;
  font: 600 15px / 1.2 var(--kf-ui);
  cursor: pointer;
}

.config-section .product-list__ready button:hover,
.config-section .product-list__more:hover { background: var(--kf-cobalt-hover); }

.config-section .product-list__more {
  display: grid;
  gap: 2px;
  justify-items: center;
  grid-column: 1 / -1;
  width: 100%;
  padding: 12px 22px;
  border: 1px solid var(--kf-linie);
  background: #fff;
  color: var(--kf-text);
}

.config-section .product-list__more:hover { background: var(--kf-flaeche); }
.config-section .product-list__more strong { font: 600 15px / 1.2 var(--kf-ui); }
.config-section .product-list__more span { color: var(--kf-leise); font: 400 13px / 1.3 var(--kf-ui); }

/* Produktkarten */
.config-section .catalog--wide .product-list,
.config-section .product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.config-section .catalog--wide .product-card,
.config-section .product-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 108px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--kf-linie);
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
  color: var(--kf-text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.config-section .product-card:hover { border-color: var(--kf-linie-stark); transform: none; }

.config-section .product-card.is-selected {
  border-color: var(--kf-cobalt);
  box-shadow: 0 0 0 4px rgb(35 72 219 / 9%);
}

.config-section .product-card .product-thumb {
  width: 84px;
  height: 84px;
  padding: 6px;
  border-radius: 14px;
  background: var(--kf-flaeche);
}

.config-section .product-copy { display: grid; gap: 4px; min-width: 0; }

.config-section .catalog--wide .product-copy > strong,
.config-section .product-copy > strong {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  text-overflow: clip;
  margin: 0;
  color: var(--kf-text);
  font: 600 15px / 1.3 var(--kf-ui);
  white-space: normal;
}

.config-section .catalog--wide .product-copy > span,
.config-section .product-copy > span:not(.product-rec) {
  color: var(--kf-leise);
  font: 400 13px / 1.35 var(--kf-ui);
}

.config-section .product-rec { display: block; margin: 2px 0 0; }

.config-section .catalog--wide .product-rec b,
.config-section .product-rec b {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 10px;
  background: var(--kf-cobalt-weich);
  color: var(--kf-cobalt);
  font: 600 12px / 1.25 var(--kf-ui);
}

.config-section .mechanism-badge {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 48px;
  padding-left: 10px;
  color: var(--kf-leise);
}

.config-section .mechanism-badge svg { width: 22px; height: 22px; }
.config-section .mechanism-badge small { color: var(--kf-leise); font: 500 12px / 1.2 var(--kf-ui); letter-spacing: 0; text-transform: none; }

.config-section .no-results {
  padding: 32px;
  border-radius: 24px;
  background: var(--kf-flaeche);
  color: var(--kf-leise);
  font: 400 15px / 1.5 var(--kf-ui);
  text-align: center;
}

/* ── Fach-Dialog ────────────────────────────────────────────────────── */

.lane-popover {
  width: min(420px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid var(--kf-linie);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 64px rgb(11 17 32 / 22%);
  color: var(--kf-text);
  font-family: var(--kf-ui);
}

.lane-popover .lane-popover__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--kf-linie);
}

.lane-popover .lane-popover__head strong { display: block; color: var(--kf-text); font: 600 24px / 1.15 var(--kf-display); }
.lane-popover .lane-popover__head > div > span { display: block; margin-top: 4px; color: var(--kf-leise); font: 400 14px / 1.3 var(--kf-ui); }

.lane-popover .lane-popover__head button {
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--kf-linie);
  border-radius: var(--kf-pille);
  background: #fff;
  color: var(--kf-leise);
  font: 400 22px / 1 var(--kf-ui);
  cursor: pointer;
}

.lane-popover .lane-popover__product {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 10px;
  border-radius: 18px;
  background: var(--kf-flaeche);
}

.lane-popover .lane-popover__product .product-thumb { width: 56px; height: 56px; padding: 4px; border-radius: 12px; background: #fff; }
.lane-popover .lane-popover__product strong { display: block; font: 600 15px / 1.3 var(--kf-ui); }
.lane-popover .lane-popover__product small { display: block; margin-top: 2px; color: var(--kf-leise); font: 400 13px / 1.35 var(--kf-ui); }

.lane-popover .lane-popover__remove {
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  border: 1px solid #f3c9c9;
  border-radius: var(--kf-pille);
  background: #fff;
  color: #c0262d;
  font: 600 14px / 1 var(--kf-ui);
  cursor: pointer;
}

.lane-popover .lane-product-picker { margin-top: 16px; }
.lane-popover .lane-product-picker__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.lane-popover .lane-product-picker__head strong { font: 600 15px / 1.3 var(--kf-ui); }
.lane-popover .lane-product-picker__head span { color: var(--kf-leise); font: 500 13px / 1 var(--kf-ui); letter-spacing: 0; text-transform: none; }

.lane-popover .lane-product-picker__search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--kf-linie);
  border-radius: var(--kf-pille);
  background: #fff;
}

.lane-popover .lane-product-picker__search:focus-within { border-color: var(--kf-cobalt); box-shadow: 0 0 0 4px rgb(35 72 219 / 10%); }
.lane-popover .lane-product-picker__search svg { width: 18px; height: 18px; flex: none; color: var(--kf-still); fill: none; stroke: currentColor; stroke-width: 2; }
.lane-popover .lane-product-picker__search input { width: 100%; border: 0; background: none; font: 400 16px / 1 var(--kf-ui); color: var(--kf-text); outline: none; }

.lane-popover .lane-product-picker__results { display: grid; gap: 8px; margin-top: 12px; }

.lane-popover .lane-product-option {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--kf-linie);
  border-radius: 18px;
  background: #fff;
  color: var(--kf-text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.lane-popover .lane-product-option:hover,
.lane-popover .lane-product-option:focus-visible { border-color: var(--kf-cobalt); background: #f7f9ff; outline: none; }

.lane-popover .lane-product-option__image { width: 52px; height: 52px; padding: 3px; border-radius: 12px; background: var(--kf-flaeche); }
.lane-popover .lane-product-option__copy strong { display: block; font: 600 14px / 1.3 var(--kf-ui); }
.lane-popover .lane-product-option__copy small { display: block; margin-top: 2px; color: var(--kf-leise); font: 400 12.5px / 1.35 var(--kf-ui); }

.lane-popover .lane-product-option > span:last-child {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--kf-pille);
  background: var(--kf-cobalt-weich);
  color: var(--kf-cobalt);
  font: 500 20px / 1 var(--kf-ui);
}

.lane-popover .lane-product-picker__empty,
.lane-popover .lane-popover__note { color: var(--kf-leise); font: 400 13px / 1.45 var(--kf-ui); }

.lane-popover .lane-width-details { margin-top: 12px; border: 1px solid var(--kf-linie); border-radius: 18px; background: #fff; }
.lane-popover .lane-width-details summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 16px; font: 600 14px / 1 var(--kf-ui); cursor: pointer; }
.lane-popover .lane-width-details summary small { color: var(--kf-still); font: 500 12px / 1 var(--kf-ui); letter-spacing: 0; text-transform: none; }
.lane-popover .lane-popover__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }

.lane-popover .lane-popover__actions button {
  display: grid;
  gap: 2px;
  justify-items: start;
  padding: 10px 12px;
  border: 1px solid var(--kf-linie);
  border-radius: 14px;
  background: var(--kf-flaeche);
  text-align: left;
  cursor: pointer;
}

.lane-popover .lane-popover__actions button:hover { border-color: var(--kf-cobalt); }
.lane-popover .lane-popover__actions strong { font: 600 15px / 1.2 var(--kf-ui); }
.lane-popover .lane-popover__actions span { color: var(--kf-leise); font: 400 12.5px / 1.3 var(--kf-ui); }

/* Nicht empfohlene Fachart: nur ein Hinweis, einsetzen geht trotzdem */
.lane-popover .lane-product-option__hinweis {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff4e5;
  color: #9a5b00;
  font: 600 11.5px / 1.3 var(--kf-ui);
  font-style: normal;
}

/* Der Dialog steht immer mittig im Bild, auch auf Tablet-Breite; der Inhalt
   rollt in sich, statt unten abgeschnitten zu werden (08.10.2026). */
@media (min-width: 641px) {
  .lane-popover {
    left: 50% !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    display: flex;
    flex-direction: column;
    width: min(440px, calc(100vw - 48px));
    max-height: min(780px, calc(100dvh - 48px));
    overflow: hidden;
    transform: translate(-50%, -50%);
    border-radius: 28px;
  }

  .lane-popover:not([hidden]) { animation: kf-dialog-in 0.18s ease-out; }
  .lane-popover > * { flex: none; }
  .lane-popover .lane-product-picker { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
  .lane-popover .lane-product-picker__results { flex: 1 1 auto; min-height: 140px; max-height: none; overflow-y: auto; padding-right: 4px; }
}

@keyframes kf-dialog-in {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.985); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ── Meldung unten ──────────────────────────────────────────────────── */

.toast {
  max-width: min(460px, calc(100% - 32px));
  padding: 13px 18px;
  border: 0;
  border-radius: 16px;
  background: #0b1120;
  color: #fff;
  font: 500 14px / 1.4 var(--kf-ui);
  box-shadow: 0 16px 40px rgb(11 17 32 / 28%);
}

/* ── Tablet und Handy ───────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .config-section .machine-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

@media (max-width: 640px) {
  .config-section .machine-picker { gap: 8px; }
  .config-section .machine-choice {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    min-height: 84px;
    padding: 10px 10px 10px 8px;
    border-radius: 18px;
  }
  .config-section .machine-choice__icon,
  .config-section .machine-choice__icon--official { width: 40px; height: 64px; padding: 0; }
  .config-section .machine-choice strong { font-size: 15px; }
  .config-section .machine-choice em { font-size: 12px; }
  .config-section .choice-check { display: none; }
}

@media (max-width: 640px) {
  /* Schmaler Rand statt von Kante zu Kante: die Karten brauchen Luft, der
     Automat verliert dabei nur wenige Pixel, weil die Innenabstände klein sind. */
  .config-section .page-wrap { width: calc(100% - 20px); }

  .config-section .config-shell,
  .config-section .config-shell--simple { gap: 12px; border-radius: 0; }

  .config-section .machine-step,
  .config-section .machine-stage,
  .config-section .catalog { padding: 18px 12px 20px; border-radius: 24px; }

  .config-section .step-heading { gap: 12px; margin-bottom: 16px; }
  .config-section .step-heading > span { width: 32px; height: 32px; font-size: 14px; }

  .config-section .stage-actions { width: 100%; }
  .config-section .stage-actions .print-button { flex: 1 1 auto; padding: 0 12px; }

  .config-section .workbench--simple .machine-area,
  .config-section .machine-area { padding: 18px 6px 24px; border-radius: 18px; }

  .config-section .machine-summary { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .config-section .machine-summary .summary-stat { display: flex; flex-direction: row; justify-content: space-between; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 0; padding: 14px 16px; border-radius: 16px; text-align: left; }
  .config-section .summary-stat strong { font-size: 18px; }

  .config-section .catalog-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .config-section .catalog-controls .search-field,
  .config-section .search-field { width: 100%; max-width: none; margin: 0; flex: none; }

  .config-section .catalog-controls .category-filters,
  .config-section .category-filters {
    flex-wrap: nowrap;
    width: auto;
    margin: 0 -12px;
    padding: 0 12px 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .config-section .category-filters::-webkit-scrollbar { display: none; }
  .config-section .category-filters button { flex: none; }

  .config-section .catalog--wide .product-list,
  .config-section .product-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }

  .config-section .product-list__ready { padding: 20px; }
  .config-section .catalog-head { align-items: flex-start; }
  .config-section .product-rec b { border-radius: 10px; }
  .config-section .step-heading { align-items: flex-start; }

  .config-section .selection-dock { grid-template-columns: 48px minmax(0, 1fr) 40px; }
  .config-section .selection-dock .product-thumb { width: 48px; height: 48px; }
  .config-section .selection-dock__instruction { grid-column: 1 / -1; order: 3; justify-self: start; }

  .toast { width: calc(100% - 32px); max-width: none; text-align: left; }

  .lane-popover { width: 100%; border-radius: 28px 28px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .config-section .machine-choice,
  .config-section .product-card,
  .config-section .print-button,
  .lane-popover .lane-product-option { transition: none; }
}

/* Der Sprunglink erscheint nur bei Tastaturbedienung, nicht wenn ein Skript
   den Fokus setzt oder jemand klickt. */
.skip-link:focus:not(:focus-visible) { transform: translateY(-160%); }
