/* Lager-Erfassung: nur hell, Systemschrift, Farben nur über die Tokens unten
   (Leitplanken: recherche-ui-leitplanken.md, Abschnitt 3). */

:root {
  color-scheme: light;
  --grund: #ffffff;
  --seite: #f4f5f6;
  --text: #101112;
  --text-2: #4d5157;
  --hilfe: #6b6b6b;
  --rand: #767c82;
  --trenner: rgba(0, 0, 0, 0.10);
  --primaer: #101112;
  --auf-primaer: #ffffff;
  --akzent: #ff6600;
  --auf-akzent: #101112;
  --fokus: #16181c;
  --fehler: #a5251d;
  --aufnahme: #d92d20;          /* roter Punkt während der Aufnahme */
  --erfolg-flaeche: #1e9e4a;
  --erfolg-text: #14753a;
  --druck-hell: rgba(255, 255, 255, 0.18);
  --druck-dunkel: rgba(0, 0, 0, 0.06);
  --abdunkeln: rgba(0, 0, 0, 0.72);
  /* Kamera in der Seite: dunkel wie ein Sucher (Werte aus der Dunkel-Tabelle der Leitplanken) */
  --kamera-grund: #08090a;
  --kamera-text: #ffffff;
  --kamera-text-2: #b9bcc0;
  --kamera-linie: rgba(255, 255, 255, 0.55);
  --kamera-flaeche: rgba(255, 255, 255, 0.14);
  --kamera-fokus: #ffffff;
  --kamera-fehler: #ff8a80;
  --kamera-erfolg: #3ecf6a;
  --blitz: #ffffff;

  --radius: 10px;
  --radius-klein: 8px;
  --dauer: 200ms;
  --leiste-hoehe: calc(56px + 24px + env(safe-area-inset-bottom, 0px));
  --z-kopf: 10;
  --z-leiste: 20;
  --z-sprung: 100;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--seite);
  color: var(--text);
  font: 400 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
[hidden] { display: none !important; }

.symbole { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.unsichtbar {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
h1:focus:not(:focus-visible), .inhalt:focus:not(:focus-visible) { outline: none; }

.sprunglink {
  position: absolute;
  left: 16px;
  top: -200px;
  z-index: var(--z-sprung);
  padding: 12px 16px;
  background: var(--grund);
  color: var(--text);
  font-weight: 600;
  border-radius: var(--radius-klein);
}
.sprunglink:focus { top: 8px; }

/* --- Kopf ------------------------------------------------------------------------------ */

.kopf {
  position: relative;
  z-index: var(--z-kopf);
  background: var(--grund);
  border-bottom: 1px solid var(--trenner);
  padding-top: env(safe-area-inset-top, 0px);
}
.kopf-innen {
  max-width: 40rem;
  margin: 0 auto;
  padding: 8px 16px;
  min-height: 64px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 8px;
}
.kopf-marke {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.0625rem;
}
.kopf-marke img { display: block; width: auto; height: 40px; }
.kopf-abmelden { display: flex; align-items: center; gap: 4px; min-width: 0; margin-left: auto; }
.kopf-nutzer {
  color: var(--text-2);
  font-size: 0.875rem;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.offline, .neue-fassung {
  margin: 0;
  padding: 10px 16px;
  background: var(--primaer);
  color: var(--auf-primaer);
  font-weight: 600;
  text-align: center;
}
.neue-fassung { position: sticky; top: 0; z-index: var(--z-leiste); }

/* --- Inhalt ---------------------------------------------------------------------------- */

.inhalt {
  max-width: 40rem;
  margin: 0 auto;
  padding: 16px 16px 40px;
}
body.mit-leiste .inhalt { padding-bottom: calc(var(--leiste-hoehe) + 32px); }

h1 { margin: 4px 0 8px; font-size: 1.5rem; line-height: 1.25; font-weight: 700; }
h2 { margin: 0 0 8px; font-size: 1.125rem; line-height: 1.3; font-weight: 700; }
p { margin: 0 0 12px; }
.abschnitt { margin-top: 28px; }
.abstand-oben { margin-top: 24px; }
.hilfe { color: var(--hilfe); font-size: 0.9375rem; }
.leer { color: var(--text-2); }

.kopfzeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
}
.fortschritt {
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ansicht:not([hidden]) { animation: einblenden var(--dauer) ease-out; }
@keyframes einblenden {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* --- Knöpfe ---------------------------------------------------------------------------- */

.knopf {
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 16px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color var(--dauer) ease-out, box-shadow var(--dauer) ease-out;
}
.knopf-primaer {
  width: 100%;
  min-height: 56px;
  background: var(--primaer);
  color: var(--auf-primaer);
  font-size: 1.0625rem;
}
.knopf-primaer:active:not(:disabled) { box-shadow: inset 0 0 0 999px var(--druck-hell); }
.knopf-zweit { background: var(--grund); color: var(--text); border-color: var(--rand); }
.knopf-zweit:active:not(:disabled) { background: var(--seite); }
.knopf-gefahr { background: var(--grund); color: var(--fehler); border-color: var(--fehler); }
.knopf-gefahr:active:not(:disabled) { background: var(--seite); }
.knopf-breit { width: 100%; }
.knopf:disabled { opacity: 0.45; cursor: not-allowed; }
/* Sieht gesperrt aus, nimmt aber den Tipp an und zeigt, was fehlt (z. B. offene Prüfpunkte). */
.knopf.ist-weich-gesperrt { opacity: 0.45; }
.knopf:focus-within { outline: 2px solid var(--fokus); outline-offset: 2px; }
.knopf:focus-within:not(:has(:focus-visible)):not(:focus-visible) { outline: none; }

@media (hover: hover) {
  .knopf-primaer:hover:not(:disabled) { box-shadow: inset 0 0 0 999px var(--druck-hell); }
  .knopf-zweit:hover:not(:disabled), .knopf-gefahr:hover:not(:disabled) { background: var(--seite); }
  .textknopf:hover { text-decoration-thickness: 2px; }
}

.textknopf {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.textknopf .icon { width: 20px; height: 20px; }
.textknopf:focus-within { outline: 2px solid var(--fokus); outline-offset: 2px; }
.textknopf:focus-within:not(:has(:focus-visible)):not(:focus-visible) { outline: none; }

.knopf-icon {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid var(--rand);
  border-radius: var(--radius);
  background: var(--grund);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
}
.knopf-icon:active:not(:disabled) { background: var(--seite); }
.knopf-icon:disabled { opacity: 0.45; cursor: not-allowed; }

.kreisel {
  display: inline-block;
  flex: none;
  width: 20px;
  height: 20px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: drehen 0.8s linear infinite;
}
.kreisel.gross { width: 44px; height: 44px; border-width: 4px; }
@keyframes drehen { to { transform: rotate(360deg); } }

/* --- Leiste unten ---------------------------------------------------------------------- */

.leiste {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-leiste);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--grund);
  box-shadow: 0 -1px 0 var(--trenner);
}
.leiste-innen { max-width: 40rem; margin: 0 auto; }
/* Offene Bildschirmtastatur: Leiste nicht über das aktive Feld legen. */
body.tastatur .leiste { position: static; }
body.tastatur.mit-leiste .inhalt { padding-bottom: 24px; }

/* --- Formulare ------------------------------------------------------------------------- */

.formular { margin-top: 8px; }
.feld { margin: 16px 0; }
.feld > label, .feldtitel, legend {
  display: block;
  margin: 0 0 4px;
  padding: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}
.feld > .hilfe { margin-bottom: 6px; }
.marke { color: var(--text-2); font-size: 0.9375rem; font-weight: 400; }

input[type="text"], input[type="password"], textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 12px;
  border: 2px solid var(--rand);
  border-radius: var(--radius-klein);
  background: var(--grund);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
textarea { min-height: 96px; line-height: 1.5; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--hilfe); opacity: 1; }
input[readonly] { background: var(--seite); }
input[type="checkbox"], input[type="radio"] {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--primaer);
}
.ist-fehlerhaft input[type="text"], .ist-fehlerhaft textarea { border-color: var(--fehler); }

.passwort { display: flex; gap: 8px; }
.passwort input { flex: 1; min-width: 0; }

.haken-feld {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 48px;
  margin: 12px 0;
  padding: 10px 0;
  font-weight: 600;
  cursor: pointer;
}

.feldfehler {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 6px 0 0;
  color: var(--fehler);
  font-weight: 600;
}
.feldfehler .icon { width: 20px; height: 20px; margin-top: 2px; }

/* --- Meldungen ------------------------------------------------------------------------- */

.meldung, .fehlerbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 2px solid var(--rand);
  border-radius: var(--radius);
  background: var(--grund);
}
.meldung > .icon, .fehlerbox-kopf .icon { margin-top: 1px; }
.meldung-fehler, .fehlerbox { border-color: var(--fehler); }
.meldung-fehler > .icon { color: var(--fehler); }
.meldung-warnung { border-color: var(--text); }
.meldung-ok { border-color: var(--erfolg-text); }
.meldung-ok > .icon { color: var(--erfolg-text); }
.meldung ul { margin: 6px 0 0; padding-left: 20px; }
.fehlerbox { display: block; }
.fehlerbox-kopf { display: flex; gap: 10px; margin: 0 0 6px; color: var(--fehler); font-weight: 700; }
.fehlerbox ul { margin: 0; padding: 0; list-style: none; }
.fehlerbox li { margin: 0 0 6px; }
.fehlerbox .textknopf { min-height: 44px; padding-top: 4px; padding-bottom: 4px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 10px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  vertical-align: middle;
}
.chip .icon { width: 16px; height: 16px; }
.chip-pruefen { background: var(--akzent); color: var(--auf-akzent); }
.chip-sicher { background: var(--grund); color: var(--erfolg-text); border-color: var(--erfolg-text); }

/* --- Start ----------------------------------------------------------------------------- */

.vorgaenge, .zugaenge { display: grid; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.vorgang {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--trenner);
  border-radius: var(--radius);
  background: var(--grund);
  color: var(--text);
  text-decoration: none;
  touch-action: manipulation;
}
.vorgang:active { background: var(--seite); }
.vorgang img, .vorgang-platzhalter {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background: var(--seite);
  color: var(--text-2);
  object-fit: cover;
}
.vorgang-text, .zugang-text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.vorgang-titel, .zugang-name { font-weight: 600; }
.vorgang-meta { color: var(--hilfe); font-size: 0.875rem; }
.vorgang-pfeil { color: var(--text-2); }
.stand { display: inline-flex; align-items: center; gap: 4px; font-size: 0.875rem; font-weight: 600; color: var(--text-2); }
.stand .icon { width: 16px; height: 16px; }
.stand-fehler { color: var(--fehler); }
.stand-fertig { color: var(--erfolg-text); }
.stand-pruefen { color: var(--text); }

.zugang {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px solid var(--trenner);
  border-radius: var(--radius);
  background: var(--grund);
}

/* --- Erfassung ------------------------------------------------------------------------- */

.fotobereich { margin: 16px 0; }
/* minmax(0, 1fr): die einzeilige Hinweis-Vorschau darf die Karte nicht verbreitern */
.fotoliste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 8px 0 12px; padding: 0; list-style: none; }
.fotoliste:empty { display: none; }
.foto {
  padding: 12px;
  border: 1px solid var(--trenner);
  border-radius: var(--radius);
  background: var(--grund);
}
.foto-kopf { display: flex; align-items: flex-start; gap: 12px; }
.foto-vergroessern {
  flex: none;
  padding: 0;
  border: 0;
  border-radius: var(--radius-klein);
  background: none;
  cursor: zoom-in;
}
.foto-bild {
  display: block;
  width: 88px;
  height: 88px;
  aspect-ratio: 1;
  border-radius: var(--radius-klein);
  background: var(--seite);
  object-fit: cover;
}
.foto-info { flex: 1; min-width: 0; }
.foto-titel { margin: 0 0 2px; font-weight: 600; }
.foto-status { display: flex; align-items: flex-start; gap: 6px; margin: 0; color: var(--text-2); font-size: 0.9375rem; }
.foto-status .icon { width: 18px; height: 18px; margin-top: 2px; }
.foto-status.ist-fertig { color: var(--erfolg-text); }
.foto-status.ist-fehler { color: var(--fehler); font-weight: 600; }
.foto-fortschritt { display: block; width: 100%; height: 8px; margin-top: 6px; accent-color: var(--primaer); }
.foto-erneut { margin-top: 12px; }
.foto-hinweis { margin: 12px 0 0; }
.foto-hinweis label { font-size: 0.9375rem; }

/* Schritt 2: „Hinweis zum Foto“ klappt Textfeld und Einsprechen auf; zugeklappt eine Zeile Vorschau. */
.hinweis-auf {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin: 8px 0 0;
  padding: 8px 4px;
  border: 0;
  border-top: 1px solid var(--trenner);
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.hinweis-auf .icon { width: 20px; height: 20px; }
.hinweis-auf-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hinweis-auf.hat-hinweis .hinweis-auf-text { font-weight: 400; text-decoration: none; }
.hinweis-auf.hat-hinweis strong { font-weight: 600; }
.hinweis-pfeil { color: var(--text-2); transition: transform var(--dauer) ease-out; }
.hinweis-auf[aria-expanded="true"] .hinweis-pfeil { transform: rotate(90deg); }
.hinweis-auf:active { background: var(--druck-dunkel); }
.hinweis-auf + .foto-hinweis { margin-top: 4px; }

.aufnahme { display: grid; gap: 4px; justify-items: center; }
.kamera { min-height: 56px; font-size: 1.0625rem; }
.galerie { color: var(--text); }
.kamera-hinweis { margin: 4px 0 0; text-align: center; }
.bereich-meldung { margin: 0 0 12px; }

/* Schritt 1: „Was ist das?“ ist das Hauptfeld unter dem Foto. */
.foto-hinweis.feld-gross label { font-size: 1.0625rem; }
.feld-gross textarea { min-height: 112px; font-size: 1.125rem; }

/* Zweitweg „tippen statt Foto“ und aufklappbare Auswahl */
.zweitweg, .aufklapp { margin: 8px 0; }
.zweitweg > summary, .aufklapp > summary { list-style: none; }
.zweitweg > summary::-webkit-details-marker, .aufklapp > summary::-webkit-details-marker { display: none; }
.zweitweg-pfeil { transition: transform var(--dauer) ease-out; }
details[open] > summary .zweitweg-pfeil { transform: rotate(90deg); }
.zweitweg .feld { margin-top: 4px; }

/* --- Einsprechen ----------------------------------------------------------------------- */

.sprache { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.sprache-knopf { padding: 8px 16px; }
/* Während der Aufnahme: großer Knopf „Fertig“ über die ganze Breite, Zähler und Pegel darüber. */
.sprache-knopf.ist-aktiv:not(:disabled) {
  width: 100%;
  min-height: 56px;
  background: var(--primaer);
  color: var(--auf-primaer);
  border-color: var(--primaer);
  font-size: 1.0625rem;
}
.sprache[data-zustand="aufnahme"] .sprache-status { order: -1; flex-basis: 100%; }
.sprache-knopf .kreisel { display: none; }
.sprache-knopf.ist-schreiben .kreisel { display: inline-block; }
.sprache-knopf.ist-schreiben .sprache-icon { display: none; }
.sprache-knopf.ist-schreiben:disabled { opacity: 1; cursor: progress; }
.sprache-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}
.sprache-status.ist-fehler { color: var(--fehler); }
.sprache-status > .icon { width: 18px; height: 18px; }
.sprache-zeit { font-variant-numeric: tabular-nums; }
.sprache-punkt {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--aufnahme);
  animation: pulsieren 0.9s ease-in-out infinite alternate;
}
@keyframes pulsieren { to { opacity: 0.25; } }
/* Pegel: zeigt, dass das Mikrofon etwas hört (Breite setzt erfassung.js). */
.pegel { flex: none; width: 56px; height: 8px; border-radius: 4px; background: var(--trenner); overflow: hidden; }
.pegel-wert {
  display: block;
  height: 100%;
  background: var(--text-2);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 80ms linear;
}
.sprache-tipp { margin: 0; }
/* Der Tipp genügt einmal je Fotoliste; bei zugeklappten Hinweisen (Schritt 2) steht er in jedem geöffneten. */
.fotobereich:not([data-hinweis="zugeklappt"]) .fotoliste > li:not(:first-child) .sprache-tipp { display: none; }

.stufen { min-width: 0; margin: 16px 0 8px; padding: 0; border: 0; }
.stufen legend { margin-bottom: 8px; }
.kachel { display: block; margin: 0 0 8px; cursor: pointer; touch-action: manipulation; }
.kachel-inhalt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 14px;
  border: 2px solid var(--rand);
  border-radius: var(--radius);
  background: var(--grund);
  transition: background-color var(--dauer) ease-out, color var(--dauer) ease-out;
}
.kachel-buchstabe { flex: none; width: 2rem; font-size: 1.5rem; font-weight: 800; text-align: center; }
.kachel-text { flex: 1; }
.kachel-haken { visibility: hidden; }
.kachel input:checked + .kachel-inhalt {
  border-color: var(--primaer);
  background: var(--primaer);
  color: var(--auf-primaer);
  box-shadow: 0 0 0 1px var(--primaer);
}
.kachel input:checked + .kachel-inhalt .kachel-haken { visibility: visible; }
.kachel input:focus-visible + .kachel-inhalt { outline: 2px solid var(--fokus); outline-offset: 2px; }

.warten { display: flex; align-items: center; gap: 16px; margin: 24px 0 16px; }
.warten-zeit { margin: 0; font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* --- Vorschlag ------------------------------------------------------------------------- */

.karte {
  margin: 12px 0;
  padding: 16px;
  border: 1px solid var(--trenner);
  border-radius: var(--radius);
  background: var(--grund);
}
.karte-hervor { border: 2px solid var(--text); }
.karte > .feld:first-of-type { margin-top: 8px; }

.artikel { display: flex; align-items: flex-start; gap: 12px; }
.artikel-bild {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: var(--radius-klein);
  background: var(--seite);
  color: var(--text-2);
  object-fit: contain;
}
.artikel-text { flex: 1; min-width: 0; }
.artikel-name { margin: 0 0 2px; font-weight: 700; }
.artikel-nummer { margin: 0 0 2px; font-variant-numeric: tabular-nums; font-weight: 600; overflow-wrap: anywhere; }

.gross { margin: 0; font-size: 1.375rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.preis-gross { margin: 0 0 4px; font-size: 2rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }

.wahlfeld { min-width: 0; margin: 16px 0 0; padding: 0; border: 0; }
.wahlliste { display: grid; gap: 8px; margin: 4px 0 12px; }
.wahl {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px;
  border: 2px solid var(--rand);
  border-radius: var(--radius);
  background: var(--grund);
  cursor: pointer;
  touch-action: manipulation;
}
.wahl:has(input:checked) { border-color: var(--primaer); box-shadow: 0 0 0 1px var(--primaer); }
.wahl img, .wahl .wahl-ohne {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background: var(--seite);
  color: var(--text-2);
  object-fit: contain;
}
.wahl-text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.wahl-nummer { font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wahl-zusatz { color: var(--hilfe); font-size: 0.875rem; }
.wahl { position: relative; }
.artikel { position: relative; }
/* Markenlogo oben rechts auf Höhe der Artikelnummer (Kili, 12.10.2026) */
.wahl-marke, .artikel-logo { position: absolute; top: 10px; right: 12px; display: flex; gap: 6px; align-items: center; pointer-events: none; }
.wahl-zeile { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 8px; min-width: 0; }
.wahl-zeile .wahl-nummer { white-space: nowrap; }
.wahl-zeile .wahl-marke { position: static; margin-left: auto; }
.wahl.wahl-kachel .wahl-text { padding-right: 0; }          /* muss .wahl .wahl-text (Liste) schlagen */
.wahl-logo { height: 32px; width: auto; max-width: 84px; object-fit: contain; }
.wahl-marke-text { font-size: 0.75rem; font-weight: 700; color: var(--text-2); border: 1px solid var(--rand); border-radius: 4px; padding: 1px 6px; background: var(--grund); }
.wahl .wahl-text { padding-right: 92px; }
/* Liste und Hauptartikel: mehrere Marken untereinander, damit sie im 92-px-Rand bleiben. */
.artikel-logo .wahl-marke { position: static; }            /* Platzhalter positioniert schon */
.wahl > .wahl-marke, .artikel-logo .wahl-marke { flex-direction: column; align-items: flex-end; gap: 4px; }
.artikel .artikel-text { padding-right: 92px; }
.wahl-svg { background: #fff; object-fit: contain; padding: 4px; }
.wahl-herkunft, .artikel-herkunft { color: var(--text-2); font-size: 0.9375rem; font-weight: 600; overflow-wrap: anywhere; }
.wahl.ist-gesperrt { border-style: dashed; opacity: 0.5; cursor: not-allowed; }

/* Kacheln bei Shopsuche und Zubehör: großes Bild, Antippen wählt. */
.kachelwahl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(8rem, 100%), 1fr));
  gap: 8px;
  margin: 4px 0 12px;
}
.wahl-kachel { position: relative; flex-direction: column; align-items: stretch; gap: 8px; min-width: 0; padding: 8px; }
.wahl-kachel img, .wahl-kachel .wahl-ohne { width: 100%; height: auto; aspect-ratio: 1 / 1; background: var(--grund); }
/* Markenlogo ist kein Produktbild: Listen- und Kachelregeln für img hier zurücksetzen. */
.wahl img.wahl-logo { flex: none; width: auto; height: 32px; max-width: 84px; aspect-ratio: auto;
  background: none; border: 0; border-radius: 0; padding: 0; object-fit: contain; }
.wahl-kachel .wahl-ohne { background: var(--seite); }
.wahl-kachel .wahl-text { align-content: start; }
.wahl-name { font-weight: 700; line-height: 1.3; }
.wahl-kachel .wahl-nummer { color: var(--text-2); font-size: 0.9375rem; font-weight: 600; }
.wahl-preis { font-weight: 700; font-variant-numeric: tabular-nums; }
.wahl-passt { justify-self: start; margin: 2px 0 0; }
.wahl-haken {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  padding: 5px;
  border-radius: 50%;
  background: var(--primaer);
  color: var(--auf-primaer);
  stroke-width: 3;
  visibility: hidden;
}
.wahl-kachel:has(input:checked) .wahl-haken { visibility: visible; }
.wahl-kachel:has(input:focus-visible) { outline: 2px solid var(--fokus); outline-offset: 2px; }

.quelle-hinweis {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-left: 4px solid var(--akzent);
  background: var(--seite);
  font-size: 0.9375rem;
}
h1 + .quelle-hinweis { margin: 0 0 12px; }

/* Prüfpunkte: große Kästchen, jeder Punkt einzeln */
.karte-hervor.ist-fehlerhaft { border-color: var(--fehler); }
.pruefliste { display: grid; gap: 8px; margin-top: 8px; }
.pruefpunkt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 56px;
  padding: 12px;
  border: 2px solid var(--rand);
  border-radius: var(--radius);
  background: var(--grund);
  cursor: pointer;
  touch-action: manipulation;
}
.pruefpunkt input[type="checkbox"] { width: 32px; height: 32px; }
.pruefpunkt-text { min-width: 0; padding-top: 4px; }
.pruefpunkt:has(input:checked) { border-color: var(--erfolg-text); }
.pruefpunkt:has(input:focus-visible) { outline: 2px solid var(--fokus); outline-offset: 2px; }
.pruefhinweis { margin: 0; }

.vorschau-titel { margin: 12px 0 4px; color: var(--text-2); font-size: 0.875rem; font-weight: 600; }
.vorschau {
  padding: 12px;
  border: 1px dashed var(--rand);
  border-radius: var(--radius-klein);
  background: var(--seite);
}
.vorschau p:last-child, .vorschau ul:last-child { margin-bottom: 0; }
.vorschau ul { margin: 0 0 12px; padding-left: 20px; }

.fotoraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(8rem, 100%), 1fr)); gap: 8px; }
.rasterfoto {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 6px;
  padding: 6px;
  border: 2px solid var(--rand);
  border-radius: var(--radius);
  background: var(--grund);
  cursor: pointer;
  touch-action: manipulation;
}
.rasterfoto:has(input:checked) { border-color: var(--primaer); box-shadow: 0 0 0 1px var(--primaer); }
.rasterfoto img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 6px; background: var(--seite); object-fit: cover; }
.rasterfoto-zeile { display: flex; align-items: center; gap: 6px; min-height: 32px; font-size: 0.875rem; font-weight: 600; }
.rasterfoto-zeile span { min-width: 0; overflow-wrap: anywhere; }

.nebenaktionen { display: grid; gap: 12px; margin: 24px 0 0; }

.erfolg { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.erfolg-icon {
  width: 48px;
  height: 48px;
  padding: 10px;
  border-radius: 50%;
  background: var(--erfolg-flaeche);
  color: var(--auf-primaer);
  stroke-width: 3;
}
.erfolg h1 { margin: 0; }
.bnummer { display: block; font-variant-numeric: tabular-nums; overflow-wrap: normal; word-break: keep-all; }

.grossbild {
  width: 100%;
  max-width: 40rem;
  max-height: 100dvh;
  padding: 12px;
  border: 0;
  border-radius: var(--radius);
  background: var(--grund);
}
.grossbild::backdrop { background: var(--abdunkeln); }
.grossbild img {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 120px);
  margin: 0 auto 12px;
  object-fit: contain;
}

/* --- Kamera in der Seite --------------------------------------------------------------- */

html.kamera-offen, html.kamera-offen body { overflow: hidden; }

.kamera-ansicht {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--kamera-grund);
  color: var(--kamera-text);
  overflow: hidden;
}
.kamera-ansicht[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  grid-template-areas: "kopf" "bild" "status" "streifen" "unten";
}
.kamera-ansicht::backdrop { background: var(--kamera-grund); }
.kamera-ansicht :focus-visible { outline-color: var(--kamera-fokus); }

.kamera-kopf {
  grid-area: kopf;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 56px;
  padding: calc(4px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) 4px
           calc(16px + env(safe-area-inset-left, 0px));
}
.kamera-titel { margin: 0; min-width: 0; font-weight: 700; }
.kamera-zaehler { margin-left: 6px; color: var(--kamera-text-2); font-weight: 600; font-variant-numeric: tabular-nums; }

.kamera-knopf {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 48px;
  min-height: 48px;
  padding: 8px 16px;
  border: 2px solid var(--kamera-linie);
  border-radius: 999px;
  background: var(--kamera-flaeche);
  color: var(--kamera-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.kamera-knopf .icon { width: 20px; height: 20px; }
.kamera-knopf:active { background: var(--kamera-linie); }
.kamera-licht[aria-pressed="true"] { background: var(--kamera-text); color: var(--kamera-grund); border-color: var(--kamera-text); }
.kamera-fertig { justify-self: end; min-width: 6.5rem; font-size: 1.0625rem; }

.kamera-bild { grid-area: bild; position: relative; min-height: 0; overflow: hidden; }
/* contain: Zu sehen ist genau, was aufgenommen wird. */
.kamera-bild video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--kamera-grund); }
.kamera-blitz { position: absolute; inset: 0; background: var(--blitz); opacity: 0; pointer-events: none; transition: opacity 180ms ease-out; }
.kamera-blitz.ist-an { opacity: 0.7; transition: none; }
.kamera-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  color: var(--kamera-text-2);
  font-weight: 600;
}

.kamera-status {
  grid-area: status;
  margin: 0;
  padding: 8px 16px 0;
  color: var(--kamera-text);
  font-weight: 600;
  text-align: center;
}
.kamera-status.ist-fehler { color: var(--kamera-fehler); }

.kamera-streifen {
  grid-area: streifen;
  display: flex;
  gap: 8px;
  min-height: 72px;
  margin: 0;
  padding: 8px calc(16px + env(safe-area-inset-right, 0px)) 8px calc(16px + env(safe-area-inset-left, 0px));
  overflow-x: auto;
  overscroll-behavior: contain;
  list-style: none;
  scrollbar-width: none;
}
.kamera-streifen::-webkit-scrollbar { display: none; }
.kamera-mini { position: relative; flex: none; width: 56px; height: 56px; }
.kamera-mini img {
  display: block;
  width: 56px;
  height: 56px;
  border: 2px solid var(--kamera-linie);
  border-radius: 6px;
  background: var(--kamera-flaeche);
  object-fit: cover;
}
.kamera-mini .icon {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: 50%;
  background: var(--kamera-grund);
  stroke-width: 3;
  visibility: hidden;
}
.kamera-mini-fertig { color: var(--kamera-erfolg); }
.kamera-mini-fehler { color: var(--kamera-fehler); }
.kamera-mini[data-status="fertig"] .kamera-mini-fertig,
.kamera-mini[data-status="fehler"] .kamera-mini-fehler { visibility: visible; }
.kamera-mini[data-status="fehler"] img { border-color: var(--kamera-fehler); }

.kamera-unten {
  grid-area: unten;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px calc(16px + env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px))
           calc(16px + env(safe-area-inset-left, 0px));
}
.kamera-ausloeser {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  padding: 0;
  border: 4px solid var(--kamera-text);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.kamera-ausloeser-innen {
  display: block;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--kamera-text);
  transition: transform 120ms ease-out;
}
.kamera-ausloeser:active:not(:disabled) .kamera-ausloeser-innen { transform: scale(0.86); }
.kamera-ausloeser:disabled { opacity: 0.4; cursor: not-allowed; }
.kamera-ausloeser:focus-visible { outline: 3px solid var(--kamera-fokus); outline-offset: 4px; }

/* Quer gehalten: Bild links, Bedienung rechts in einer Spalte. */
@media (orientation: landscape) and (max-height: 540px) {
  .kamera-ansicht[open] {
    grid-template-columns: minmax(0, 1fr) 9rem;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "kopf kopf" "bild status" "bild streifen" "bild unten";
  }
  .kamera-kopf { min-height: 48px; }
  .kamera-status { padding: 4px 8px 0; font-size: 0.875rem; }
  .kamera-streifen { flex-direction: column; align-items: center; overflow-x: hidden; overflow-y: auto; min-height: 0; padding: 8px; }
  .kamera-unten {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
    padding: 8px calc(8px + env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) 8px;
  }
  .kamera-platz { display: none; }
  .kamera-fertig { justify-self: center; }
  .kamera-ausloeser { width: 72px; height: 72px; }
  .kamera-ausloeser-innen { width: 54px; height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .kreisel { border-right-color: currentColor; opacity: 0.5; }
}
