/* Einkaufszettel — dieselbe Gestaltungssprache wie Ehret's Dashboard:
   warmes Papier, Caveat für die Anrede, Karla für alles Übrige, und für jede
   Person eine eigene Farbe. */

:root {
  --papier: #f6f1e7;
  --kachel: #fffdf7;
  --kachel-still: #f9f5ec;
  --linie: #ece4d5;
  --linie-stark: #e3dbcb;
  --tinte: #3b332a;
  --tinte-weich: #7a6d5d;
  --tinte-blass: #9a8f80;
  --gruen: #4a7c59;
  --gruen-weich: #dfe8da;
  --terrakotta: #c06a42;
  --rot: #b04e3f;
  --rot-weich: #f4dcd9;
  --schatten: 0 1px 2px rgba(59, 51, 42, 0.04), 0 8px 24px -12px rgba(59, 51, 42, 0.14);
  --oben: env(safe-area-inset-top, 0px);
  --unten: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --papier: #211d18;
    --kachel: #2a251f;
    --kachel-still: #322c25;
    --linie: #3d372e;
    --linie-stark: #4a4238;
    --tinte: #f0ebe1;
    --tinte-weich: #c0b6a6;
    --tinte-blass: #8d8478;
    --gruen: #86b291;
    --gruen-weich: #2c3a2f;
    --terrakotta: #dd9268;
    --rot: #dd8b7c;
    --rot-weich: #3a2320;
    --schatten: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 26px -12px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }

/* Das hidden-Attribut setzt display:none nur über das Browser-Stylesheet — jede
   eigene display-Regel schlägt es. Ohne diese Zeile bleiben Elemente sichtbar,
   die das Skript versteckt: der Offline-Hinweis stand dauerhaft da und der
   Update-Kasten ließ sich nicht wegdrücken. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--papier);
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: Karla, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

button, input { font: inherit; color: inherit; }

.app {
  max-width: 620px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

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

.kopf {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--papier);
  padding: calc(18px + var(--oben)) 18px 12px;
  border-bottom: 1px solid var(--linie);
}

.kopf-zeile {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.marke {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tinte-blass);
  margin-bottom: 6px;
}

h1 {
  font-family: Caveat, 'Segoe Script', cursive;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  margin: 0;
  color: var(--gruen);
}

.ich {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--linie-stark);
  background: var(--kachel);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ich:active { transform: scale(0.95); }

.eingabe { display: flex; gap: 10px; margin-bottom: 16px; }

.eingabe input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1.5px solid var(--linie-stark);
  background: var(--kachel);
  font-size: 16px; /* darunter zoomt iOS beim Antippen hinein */
}
.eingabe input::placeholder { color: var(--tinte-blass); }
.eingabe input:focus { outline: 2px solid var(--gruen); outline-offset: 1px; }

.plus {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: none;
  background: var(--gruen);
  color: var(--auf-gruen, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.plus:active { transform: scale(0.94); }
.mikro { background: var(--kachel); color: var(--gruen); border: 1.5px solid var(--linie-stark); }
.mikro.hoert { background: #c0392b; color: #fff; border-color: #c0392b; animation: puls 1s ease-in-out infinite; }
@keyframes puls { 50% { opacity: 0.6; } }

.leiste {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--tinte-weich);
  min-height: 20px;
}

.netz {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--terrakotta);
}

/* ---- Liste ---- */

.liste { }

.zeile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 11px 14px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--kachel);
  border: 1.5px solid var(--linie);
  box-shadow: var(--schatten);
}

.haken {
  flex: none;
  width: 44px;
  height: 44px;
  margin: -6px 0 -6px -8px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.haken span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid var(--linie-stark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}
.zeile.fertig .haken span {
  background: var(--gruen);
  border-color: var(--gruen);
  color: var(--auf-gruen, #fff);
}
.haken:active span { transform: scale(0.9); }

.zeile-text { flex: 1; min-width: 0; cursor: text; }
.zeile-name { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.zeile.fertig .zeile-name { text-decoration: line-through; color: var(--tinte-blass); }
.zeile-von { font-size: 12px; color: var(--tinte-blass); margin-top: 1px; }

.zeile-bearbeiten {
  width: 100%;
  font: inherit;
  font-size: 16px; /* darunter zoomt iOS beim Antippen hinein */
  font-weight: 600;
  color: inherit;
  background: none;
  border: none;
  border-bottom: 1.5px solid var(--gruen);
  padding: 0 0 2px;
}
.zeile-bearbeiten:focus { outline: none; }

.menge {
  flex: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--tinte-weich);
  background: var(--kachel-still);
  border-radius: 8px;
  padding: 4px 10px;
}

.punkt { flex: none; width: 10px; height: 10px; border-radius: 50%; }

.weg {
  flex: none;
  min-width: 36px;
  min-height: 36px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid var(--linie-stark);
  background: none;
  color: var(--tinte-blass);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}
.weg.scharf { color: var(--rot); border-color: var(--rot); background: var(--rot-weich); }

.leer { padding: 40px 6px; text-align: center; }
.leer-gross {
  font-family: Caveat, cursive;
  font-size: 28px;
  color: var(--tinte-weich);
}
.leer-klein { font-size: 14px; color: var(--tinte-blass); margin-top: 2px; }

/* ---- Erledigtes ---- */

.erledigt-block { padding: 0; }

.erledigt-kopf {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1.5px dashed var(--linie-stark);
  background: none;
  color: var(--tinte-weich);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.erledigt-kopf span { flex: 1; text-align: left; }
.erledigt-kopf .pfeil { transition: transform 0.15s ease; }
.erledigt-kopf[aria-expanded="true"] .pfeil { transform: rotate(180deg); }

#erledigt-liste { margin-top: 10px; }

.aufraeumen {
  margin-top: 10px;
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid var(--linie-stark);
  background: none;
  color: var(--tinte-weich);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.aufraeumen:hover { color: var(--rot); border-color: var(--rot); }

/* ---- Hinweis auf eine neue Fassung ---- */

.hinweis {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(80px + var(--unten));
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 18px;
  border-radius: 14px;
  background: var(--tinte);
  color: var(--papier);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  font-size: 14px;
  max-width: calc(100vw - 32px);
}
.hinweis span { flex: 1; }
.hinweis button {
  white-space: nowrap;
  border: none;
  border-radius: 9px;
  background: var(--gruen);
  color: var(--auf-gruen, #fff);
  font-weight: 700;
  font-size: 14px;
  min-height: 38px;
  padding: 0 14px;
  cursor: pointer;
}

/* ---- Namensabfrage ---- */

.name-dialog {
  border: none;
  border-radius: 20px;
  padding: 24px;
  max-width: 340px;
  width: calc(100vw - 40px);
  background: var(--kachel);
  color: var(--tinte);
  box-shadow: var(--schatten);
}
.name-dialog::backdrop { background: rgba(30, 24, 18, 0.45); }
.name-dialog h2 {
  font-family: Caveat, cursive;
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--gruen);
}
.name-dialog p { font-size: 14px; color: var(--tinte-weich); margin: 0 0 16px; }
.name-dialog input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid var(--linie-stark);
  background: var(--papier);
  font-size: 16px;
}
.dialog-knoepfe { margin-top: 14px; }
.knopf-voll {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--gruen);
  color: var(--auf-gruen, #fff);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* ---- Anmeldeseite ---- */

.anmelden {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.anmelden-karte {
  width: 100%;
  max-width: 360px;
  background: var(--kachel);
  border: 1.5px solid var(--linie);
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: var(--schatten);
}
.anmelden-karte h1 { font-size: 38px; margin-bottom: 4px; }
.anmelden-karte p { font-size: 14px; color: var(--tinte-weich); margin: 0 0 20px; }
.anmelden-karte input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1.5px solid var(--linie-stark);
  background: var(--papier);
  font-size: 16px;
  margin-bottom: 12px;
}
.anmelden-karte input:focus { outline: 2px solid var(--gruen); outline-offset: 1px; }
.fehler { font-size: 14px; color: var(--rot); margin-top: 12px; min-height: 20px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}


/* ---- Ansichten und Navigation ---- */

.inhalt {
  flex: 1;
  padding: 16px 18px calc(96px + var(--unten));
}

.ansicht[hidden] { display: none; }

.navi {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  background: var(--kachel);
  border-top: 1px solid var(--linie);
  padding: 6px 6px calc(6px + var(--unten));
}

/* Trägt am Rechner die Seitenleiste; am Handy steht die Marke im Kopf. */
.navi-marke { display: none; }

.navi-knopf {
  position: relative;
  flex: 1;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: none;
  color: var(--tinte-blass);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 12px;
}
.navi-knopf.aktiv { color: var(--gruen); font-weight: 700; }
.navi-knopf:active { background: var(--gruen-weich); }

.navi-zahl {
  position: absolute;
  top: 4px;
  left: 50%;
  margin-left: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--terrakotta);
  color: var(--auf-gruen, #fff);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* "Mehr": Popover über der Leiste statt einer sechsten/siebten Kachel in
   der Reihe. Öffnet/schließt app.js über [hidden]. */
.navi-knopf-mehr.aktiv { color: var(--gruen); font-weight: 700; }

/* display:none/flex statt [hidden]: [hidden] traegt !important und liesse
   sich in der Media Query fuer den Rechner (display:contents, siehe unten)
   nicht mehr uebersteuern - die Gruppe bliebe dort dauerhaft unsichtbar,
   weil sie mobil geschlossen startet und am Rechner nie geoeffnet wird. */
.navi-mehr-liste {
  display: none;
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(64px + var(--unten));
  z-index: 21;
  flex-direction: column;
  gap: 2px;
  background: var(--kachel);
  border: 1px solid var(--linie);
  border-radius: 16px;
  padding: 6px;
  box-shadow: var(--schatten);
}
.navi-mehr-liste.offen { display: flex; }
.navi-mehr-liste .navi-knopf {
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  font-size: 14px;
}
.navi-mehr-liste .navi-zahl { position: static; margin-left: auto; }

/* ---- Karten ---- */

.karte {
  background: var(--kachel);
  border: 1px solid var(--linie);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--schatten);
}

.karte-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.karte h2 { font-size: 18px; font-weight: 800; margin: 0; }
.karte-meta { font-size: 12px; color: var(--tinte-blass); white-space: nowrap; }

.unter {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tinte-weich);
  margin: 20px 0 10px;
}

.gericht-name {
  font-family: Caveat, cursive;
  font-size: 30px;
  line-height: 1.1;
  color: var(--terrakotta);
  margin-bottom: 14px;
}

/*
 * Angaben zum Gericht und der Merken-Knopf stehen in einer Zeile.
 *
 * "align-items: center" ist hier tragend: Ohne das streckt der Knopf, der als
 * höchstes Element die Zeile bestimmt, auch die Angaben auf seine Höhe — und
 * dann sieht "4 Personen" aus wie etwas, das man drücken kann.
 */
.marken {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

/*
 * Dauer und Personenzahl sind Auskünfte, keine Aktionen. Deshalb tragen sie
 * keine Füllung und keine Knopfform, sondern stehen als Text da. Vorher waren
 * sie grün hinterlegt und wirkten damit anfassbarer als der einzige Knopf
 * daneben — genau verkehrt herum.
 */
.marke-chip {
  font-size: 13px;
  font-weight: 600;
  color: var(--tinte-weich);
  white-space: nowrap;
}

/* Ein Mittelpunkt trennt die Angaben, wie in einer Zeile Fließtext. */
.marke-chip + .marke-chip::before {
  content: '·';
  margin-right: 14px;
  color: var(--tinte-blass);
}

.knopf-voll {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--gruen);
  color: var(--auf-gruen, #fff);
  font-family: Karla, sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.knopf-voll:active { transform: scale(0.99); }
.knopf-voll.ghost {
  background: none;
  border: 1px solid var(--linie-stark);
  color: var(--tinte-weich);
}

.hinweis-text { font-size: 13px; color: var(--tinte-weich); margin-top: 10px; min-height: 18px; }
.hinweis-text.ok { color: var(--gruen); font-weight: 600; }

/* ---- Startseite ---- */


.auszug {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--linie);
  font-size: 15px;
}
.auszug:first-child { border-top: none; padding-top: 0; }
.auszug-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.auszug-menge { font-size: 13px; font-weight: 700; color: var(--tinte-weich); }
#start-zettel-liste { margin-bottom: 14px; }

/* ---- Zutaten und Schritte ---- */

.zutaten { list-style: none; margin: 0; padding: 0; }
.zutaten li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 15px;
}
.zutaten input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--gruen); flex: none; }
.zutaten label { flex: 1; }
.zutaten label.ab { text-decoration: line-through; color: var(--tinte-blass); }

.schritte { list-style: none; counter-reset: schritt; margin: 0; padding: 0; }
.schritte li {
  counter-increment: schritt;
  position: relative;
  padding-left: 34px;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tinte-weich);
}
.schritte li::before {
  content: counter(schritt);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gruen-weich);
  color: var(--gruen);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Wünsche ---- */

.wunsch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 0;
  border-top: 1px solid var(--linie);
}
.wunsch:first-child { border-top: none; }
.wunsch-name {
  flex: none;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
}
.wunsch-text { flex: 1; min-width: 0; font-size: 15px; overflow-wrap: anywhere; }

/* ---- Termine ---- */

.termin {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 13px;
  margin-bottom: 8px;
  border-radius: 13px;
  background: var(--kachel-still);
  border-left: 4px solid var(--gruen);
}

.termin-datum { flex: none; width: 44px; text-align: center; }
.termin-monat {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--tinte-weich);
}
.termin-tag { display: block; font-size: 20px; font-weight: 800; line-height: 1.1; }

.termin-text { flex: 1; min-width: 0; }
.termin-titel { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.termin-zeit { font-size: 12px; color: var(--tinte-weich); margin-top: 1px; }


/* ---- Formularfelder ---- */

.feld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; flex: 1; min-width: 0; }
.feld.schmal { flex: 0 0 96px; }
.feld label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tinte-blass);
}
.feld input, .feld select {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border-radius: 12px;
  border: 1.5px solid var(--linie-stark);
  background: var(--papier);
  color: var(--tinte);
  font-family: Karla, sans-serif;
  font-size: 16px; /* darunter zoomt iOS beim Antippen hinein */
}
.feld input:focus, .feld select:focus { outline: 2px solid var(--gruen); outline-offset: 1px; }

.feld-reihe { display: flex; gap: 10px; flex-wrap: wrap; }

.kleingedrucktes { font-size: 13px; color: var(--tinte-weich); margin: 0 0 14px; }
.hinweis-text.fehler { color: var(--rot); font-weight: 600; }

/* ================================================================
   Am Rechner: keine App im Fenster, sondern eine Webseite.
   Die Navigation wandert als Reiterzeile nach oben (über die
   Flex-Reihenfolge, ohne Umbau im Markup), der Inhalt wird breiter
   und stellt sich in Spalten.
   ================================================================ */


/* ============================================================
   AM RECHNER
   ============================================================

   Bis hierher ist alles fürs Handy gebaut: Navigation unter dem Daumen,
   Zeilen als Karten mit Schatten, überall 44 Pixel zum Tippen. Am Rechner
   ergibt das eine breitgezogene Handy-App — deshalb ändert sich hier nicht
   nur die Breite, sondern der Aufbau:

   - Die Navigation wandert als **Seitenleiste** nach links und bleibt stehen.
     Das ist das Muster, an dem man eine Anwendung von einer Webseite
     unterscheidet.
   - Listen werden **dicht**: Trennlinien statt Karten, halb so hohe Zeilen,
     kleinere Schrift. Auf einem 27-Zoll-Schirm zählt Übersicht, nicht
     Fingerfreundlichkeit.
   - Es gibt eine **Maus**: Anfassbares zeigt sich beim Überfahren, das
     Wegnehmen-Kreuz erscheint erst dann und drängt sich vorher nicht auf.
   ============================================================ */

@media (min-width: 900px) {

  body { background: var(--kachel-still); }

  /* Seitenleiste links, Inhalt rechts — beides bis zum Fensterrand. */
  .app {
    max-width: none;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "leiste kopf"
      "leiste inhalt"
      "leiste fassung";
  }

  /* ---- Seitenleiste ---- */

  .navi {
    grid-area: leiste;
    position: sticky;
    top: 0;
    align-self: start;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 24px 14px;
    background: var(--papier);
    border-top: none;
    border-right: 1px solid var(--linie);
    overflow-y: auto;
  }

  .navi-marke {
    display: block;
    padding: 0 12px 22px;
    font-family: Caveat, cursive;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--gruen);
  }

  .navi-knopf {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--tinte-weich);
    text-align: left;
  }
  .navi-knopf svg { width: 18px; height: 18px; flex: none; }
  .navi-knopf span { font-size: inherit; }

  .navi-knopf:hover { background: var(--kachel-still); color: var(--tinte); }
  .navi-knopf.aktiv {
    background: var(--gruen-weich);
    color: var(--gruen);
    font-weight: 700;
  }

  /* Die Zahl sitzt am rechten Rand der Leiste, nicht am Symbol. */
  .navi-zahl {
    position: static;
    margin-left: auto;
    transform: none;
    min-width: 20px;
    height: 20px;
    font-size: 11.5px;
  }

  /* "Mehr" gibt es hier nicht - die Seitenleiste hat Platz und scrollt bei
     Bedarf. display:contents loest die Gruppe in normale, direkte
     Leisten-Punkte auf, ohne sie im Markup verschieben zu muessen. */
  .navi-knopf-mehr { display: none; }
  .navi-mehr-liste,
  .navi-mehr-liste.offen {
    position: static;
    display: contents;
  }

  /* ---- Kopfbereich ---- */

  .kopf {
    grid-area: kopf;
    position: static;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 40px 16px;
    background: none;
    border-bottom: 1px solid var(--linie);
  }
  .kopf-zeile { margin: 0; align-items: baseline; gap: 14px; }

  /* Die Marke steht jetzt in der Seitenleiste. */
  .marke { display: none; }

  h1 { font-size: 27px; line-height: 1.15; }

  /* Untertitel und Netzanzeige rücken neben den Titel statt darunter. */
  .leiste {
    margin: 0;
    justify-content: flex-end;
    gap: 14px;
    font-size: 13.5px;
    padding-bottom: 3px;
  }
  .ich { width: 38px; height: 38px; font-size: 14px; }

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

  .inhalt {
    grid-area: inhalt;
    padding: 26px 40px 56px;
    background: var(--kachel-still);
  }
  .fassung { grid-area: fassung; padding: 0 40px 20px; text-align: left; }

  /* Karten tragen den Inhalt, nicht jede einzelne Zeile. */
  .karte {
    padding: 20px 22px;
    border-radius: 14px;
    box-shadow: none;
    border: 1px solid var(--linie);
  }
  .karte-kopf h2 { font-size: 17px; }

  /* ---- Listen: dicht statt fingerfreundlich ---- */

  .zeile {
    min-height: 40px;
    padding: 5px 10px;
    margin-bottom: 0;
    border: 0;
    border-bottom: 1px solid var(--linie);
    border-radius: 8px;
    background: none;
    box-shadow: none;
    gap: 10px;
  }
  .zeile:last-child { border-bottom: 0; }
  .zeile:hover { background: var(--kachel); }

  .haken { width: 30px; height: 30px; margin: 0 0 0 -2px; }
  .haken span { width: 19px; height: 19px; border-width: 2px; }
  .haken span svg { width: 12px; height: 12px; }

  .zeile-name { font-size: 14.5px; font-weight: 500; }
  .zeile-von { font-size: 11.5px; }
  .menge { font-size: 13px; }

  /* Das Kreuz tritt zurück, bis die Maus in der Zeile ist — sonst steht in
     jeder Zeile eine Aufforderung zum Löschen. Zurücktreten heißt hier: Rahmen
     weg, Farbe blass. Es ganz auszublenden (per Deckkraft oder visibility)
     wäre falsch — dann fände es niemand mehr, der mit der Tastatur arbeitet. */
  .weg {
    min-width: 28px;
    min-height: 28px;
    padding: 0 7px;
    font-size: 12px;
    color: var(--linie-stark);
    border-color: transparent;
    transition: color 0.12s ease, border-color 0.12s ease;
  }
  .zeile:hover .weg,
  .favorit:hover .weg,
  .wunsch:hover .weg,
  .weg:focus-visible {
    color: var(--tinte-blass);
    border-color: var(--linie-stark);
  }
  .weg.scharf { color: var(--rot); border-color: var(--rot); }



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

  .eingabe { max-width: 520px; }
  .eingabe input { min-height: 44px; font-size: 15px; }
  .plus { width: 44px; height: 44px; flex: none; }

  /* Ein Knopf ist am Rechner so breit, wie seine Aufschrift es verlangt,
     statt über die ganze Spalte zu laufen. Dabei muss die Ausrichtung mit:
     Ein <button> zentriert seinen Text von selbst, ein Flex-Kasten nicht —
     ohne justify-content klebte die Aufschrift links am Rand. */
  .knopf-voll {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 200px;
    min-height: 40px;
    padding: 0 20px;
    font-size: 14.5px;
  }
  .knopf-voll:hover { opacity: 0.92; }
  .knopf-voll.ghost:hover { background: var(--kachel-still); }
  .foto-knopf { max-width: 340px; }

  /* ---- Startseite ---- */

  #ansicht-start { columns: 2; column-gap: 22px; }
  #ansicht-start > .karte { break-inside: avoid; margin-bottom: 22px; }


  /* ---- Zettel ---- */

  /* Die Ladenauswahl lief ueber die ganze Tischbreite, obwohl in ihr ein
     Auswahlfeld und zwei Woerter stehen. */
  .laden-zeile { max-width: 520px; }

  #liste { columns: 2; column-gap: 26px; }
  /* Ohne Gruppen hält die Zeile selbst die Spalte zusammen. */
  .zeile { break-inside: avoid; }
  .erledigt-block { max-width: 640px; }

  /* ---- Essen ---- */

  #ansicht-essen {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: start;
    gap: 0 22px;
  }
  #ansicht-essen > .karte { margin-bottom: 22px; grid-column: 2; }
  #ansicht-essen > .karte:first-child { grid-column: 1; grid-row: 1 / span 20; }

  .zutaten { columns: 2; column-gap: 26px; }
  .zutaten li { break-inside: avoid; }
  .schritte { columns: 2; column-gap: 30px; }
  .schritte li { break-inside: avoid; }

  .favorit-name:hover { background: var(--kachel-still); }

  /* ---- Termine ----

     Die Spaltenzuweisung allein genügt NICHT. Ein Grid platziert automatisch
     Zeile für Zeile weiter: Die drei Karten links landeten in den Zeilen 1
     bis 3, und die Liste rechts begann deshalb erst auf Höhe der dritten
     Karte — 860 Pixel Leere über ihr, während unten gescrollt werden musste.
     Deshalb steht hier zu jedem Element auch die ZEILE. */

  #ansicht-termine {
    display: grid;
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
    align-items: start;
    gap: 0 26px;
  }
  #termin-neu       { grid-column: 1; grid-row: 1; margin-bottom: 22px; }
  #push-karte       { grid-column: 1; grid-row: 2; margin-bottom: 22px; }
  #termin-verbinden { grid-column: 1; grid-row: 3; margin-bottom: 22px; }
  /* Die Liste ist das Wichtigste dieser Ansicht. Als eigener Kasten hat sie
     ihre eigene Zeilenfolge und beginnt ganz oben — sonst schiebt die Höhe
     der Formularkarte sie nach unten. */
  .termine-spalte   { grid-column: 2; grid-row: 1 / span 99; }

  .feld-reihe { flex-wrap: nowrap; }
  .termin:hover { background: var(--kachel); }

  /* ---- Der Update-Hinweis sitzt am Rand, nicht überm Daumen ---- */

  .hinweis {
    left: auto;
    right: 26px;
    bottom: 26px;
    transform: none;
  }
}

/* Ab hier ist Platz für eine dritte Spalte — sonst wächst nur der leere Rand.
   Der Inhalt bekommt eine Höchstbreite, damit Zeilen auf sehr breiten Schirmen
   nicht quer über den ganzen Tisch laufen. */
@media (min-width: 1500px) {

  .inhalt, .kopf, .fassung {
    max-width: 1500px;
  }

  #ansicht-start { columns: 3; }
  #liste { columns: 3; }
  #ansicht-essen { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}


/* ---- Formular: Umschalter, Nebenknöpfe ---- */

.schalter {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 8px;
  font-size: 15px;
  cursor: pointer;
}
.schalter input { width: 22px; height: 22px; accent-color: var(--gruen); flex: none; }

.beilaeufig { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--tinte-blass); }

.textknopf {
  border: none;
  background: none;
  color: var(--tinte-weich);
  font-family: Karla, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 2px;
  min-height: 36px;
}
.textknopf:hover { color: var(--gruen); }

.knopf-voll.loeschen {
  margin-top: 10px;
  background: none;
  border: 1px solid var(--linie-stark);
  color: var(--tinte-weich);
}
.knopf-voll.loeschen:hover { color: var(--rot); border-color: var(--rot); }
.knopf-voll.loeschen.scharf { color: var(--rot); border-color: var(--rot); background: var(--rot-weich); }

/* Termine, die sich ändern lassen, zeigen das auch. */
.termin.aenderbar { cursor: pointer; }
.termin.aenderbar:hover { border-left-width: 6px; }
.termin.gewaehlt { background: var(--gruen-weich); }

/* ---- Foto-Erkennung ---- */

.foto-knopf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.fund {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 52px;
  padding: 9px 0;
  border-top: 1px solid var(--linie);
}
.fund:first-child { border-top: none; }
.fund input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--gruen); flex: none; }
.fund-text { flex: 1; min-width: 0; }
.fund-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.fund-menge { font-size: 13px; color: var(--tinte-weich); }
.fund-unsicher {
  font-size: 11px;
  font-weight: 700;
  color: var(--terrakotta);
  background: var(--rot-weich);
  border-radius: 999px;
  padding: 3px 9px;
  flex: none;
}

/* Fassungsangabe — damit man sieht, ob das Gerät die neueste App hat. */
.fassung {
  order: 3;
  margin-top: auto;
  padding: 4px 18px calc(10px + var(--unten));
  font-size: 11px;
  color: var(--tinte-blass);
  text-align: center;
}
@media (min-width: 900px) {
  /* Passt zum Inhaltsraster: gleiche Kante wie der Text darüber. */
  .fassung { text-align: left; padding: 4px 40px 20px; }
}


/* Zurückhaltender Textknopf — für Nebenwege, die den Hauptknopf nicht
   verdrängen sollen. */
.knopf-text {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--tinte-weich);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}
.knopf-text:hover { background: var(--kachel-still); color: var(--tinte); }
.knopf-text:active { background: var(--linie); }

/* Im Kopf der Essen-Karte steht er neben der Zeile — nicht darunter. */
.karte-kopf .knopf-text {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--gruen);
}

/* Die kleine Zeile über dem Gerichtsnamen. */
.karte-ueber {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tinte-blass);
}

/* Der Gerichtsname trägt die Rezeptansicht — dieselbe Handschrift wie auf der
   Startkachel, damit beide Stellen als dasselbe Gericht zu erkennen sind. */
#essen-name {
  font-family: Caveat, cursive;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--terrakotta);
  margin: 2px 0 14px;
}

/* Die Überzeile steht allein in ihrer Zeile, der Knopf rechts daneben. */
#ansicht-essen .karte-kopf { align-items: center; margin-bottom: 4px; }


/* Merken-Knopf — steht in der Markenzeile neben Zeit und Personenzahl und
   sieht im Ruhezustand aus wie eine weitere Marke. */
.herz {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 16px;
  /* Kräftiger Rand und dunkle Schrift: Der Knopf soll sich von den Angaben
     daneben abheben, nicht hinter ihnen verschwinden. */
  border: 1.5px solid var(--linie-stark);
  border-radius: 999px;
  background: var(--kachel);
  color: var(--tinte);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.herz svg { fill: none; transition: fill 0.15s ease; }
.herz:hover { border-color: var(--terrakotta); color: var(--terrakotta); }
.herz.an {
  border-color: var(--terrakotta);
  background: var(--rot-weich);
  color: var(--terrakotta);
}
.herz.an svg { fill: currentColor; }

/* Ein gemerktes Rezept in der Liste: Name und Zeit links, Wegnehmen rechts. */
.favorit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--linie);
}
.favorit:last-child { border-bottom: 0; }

.favorit-name {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 52px;
  padding: 8px 4px;
  border: 0;
  border-radius: 10px;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.favorit-name:hover { background: var(--kachel-still); }

.favorit-titel { font-size: 16px; font-weight: 600; color: var(--tinte); }
.favorit-meta { font-size: 13px; color: var(--tinte-blass); }




/* Kleines Herz an einer Vorschlagszeile — der große Merken-Knopf gehört in
   die Rezeptansicht, hier reicht das Zeichen. */
.herz.klein {
  flex: 0 0 auto;
  min-height: 44px;
  width: 44px;
  padding: 0;
  justify-content: center;
  border-radius: 12px;
}
.herz.klein svg { margin: 0; }

/* Die Trefferliste sitzt in derselben Karte wie das Suchfeld. */
#suche-treffer-kopf { margin-top: 16px; }
#suche-treffer .favorit:first-child { border-top: 1px solid var(--linie); }

/* Während die Rezepte entstehen: ein ruhiges Pulsieren, damit die App nicht
   tot wirkt. Reine Zier — wer Bewegung abgestellt hat, sieht den Text ruhig. */
.hinweis-text.laedt { color: var(--gruen); animation: pulsieren 1.6s ease-in-out infinite; }

@keyframes pulsieren {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .hinweis-text.laedt { animation: none; }
}


/* Ein Vorschlag führt weiter — anders als ein gemerktes Rezept, das man auch
   wieder wegnehmen kann. */
.favorit-pfeil {
  flex: 0 0 auto;
  padding: 0 10px;
  color: var(--tinte-blass);
  font-size: 18px;
}


/* Der Hauptknopf einer Karte braucht Abstand zur Liste darüber — sonst klebt
   "Alles auf den Zettel" an der letzten Zutat. */
#essen-uebernehmen { margin-top: 14px; }


/* ============================================================
   NACHTRAG FÜR DEN RECHNER

   Diese Regeln verfeinern Klassen, die weiter oben in der Datei erst NACH dem
   großen Rechner-Abschnitt definiert werden. Eine Medienabfrage erhöht die
   Spezifität nicht — stünden sie oben, gewänne die spätere Grundregel, und die
   Anpassung liefe ins Leere. Genau das war der Fall, bis es auffiel.
   ============================================================ */

/* ============================================================
   Training — nur für persönliche Nutzer sichtbar
   ============================================================ */

.training-text { white-space: pre-wrap; font-size: 15px; line-height: 1.5; }
.training-text.klein { font-size: 13px; color: var(--tinte-weich); margin-top: 10px; }

.plan-zeile { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--linie); align-items: baseline; }
.plan-zeile:last-child { border-bottom: 0; }
.plan-tag { flex: 0 0 30px; font-weight: 800; }
.plan-titel { font-weight: 600; }
.plan-dauer { color: var(--tinte-blass); font-size: 13px; margin-left: 6px; white-space: nowrap; }
.plan-hinweis { font-size: 13px; color: var(--tinte-weich); margin-top: 2px; }
.plan-zeile.kraft .plan-titel { color: var(--terrakotta); }

.werte { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wert { background: var(--kachel-still); border-radius: 12px; padding: 10px 6px; text-align: center; }
.wert b { display: block; font-size: 20px; line-height: 1.1; }
.wert span { font-size: 12px; color: var(--tinte-blass); }
.wert small { display: block; font-size: 11px; color: var(--tinte-weich); margin-top: 2px; }

.verlauf-zeile { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--linie); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.verlauf-zeile:last-child { border-bottom: 0; }

#training-rm-form textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 15px;
  padding: 10px 12px; border: 1px solid var(--linie); border-radius: 12px;
  background: var(--kachel); color: var(--tinte); resize: vertical;
}
#training-rm-form textarea:focus { outline: 2px solid var(--gruen); outline-offset: 1px; }
.name-dialog input + input { margin-top: 8px; }

@media (min-width: 900px) {

  /* Mit der Maus reicht ein kleineres Ziel als mit dem Daumen. */
  .herz { min-height: 38px; font-size: 13px; }

  /* Dichtere Zeilen in den Listen der Essen-Ansicht. */
  .favorit { padding: 0; }
  .favorit-name { min-height: 46px; padding: 6px 8px; }
  .favorit-titel { font-size: 14.5px; }
  .favorit-meta { font-size: 12.5px; }
}

/* ---------- Ladenauswahl über dem Zettel ----------
   Bestimmt, in welcher Reihenfolge die Zeilen stehen. Bewusst schmal und
   ruhig: Sie ist eine Einstellung, kein Bedienelement des Zettels — der
   Zettel selbst soll die Aufmerksamkeit behalten. */

.laden-zeile {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 2px 12px;
  color: var(--tinte-blass);
}

.laden-zeile select {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 0 30px 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--tinte-weich);
  font-family: Karla, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;

  /* Der eigene Pfeil, damit das Feld auf iOS und Android gleich aussieht. */
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239a8f80' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.laden-zeile select:hover { background-color: var(--kachel-still); }
.laden-zeile select:focus { outline: 2px solid var(--gruen); outline-offset: 1px; }

.laden-zeile .textknopf { flex: none; }

/* Der Warnknopf im Reihenfolge-Dialog: Das Vergessen ist nicht umkehrbar. */
.knopf-voll.gefahr { background: var(--rot); }

/* ---- Maschinen ---- */

.maschine-angaben {
  font-size: 14px;
  color: var(--tinte-weich);
  line-height: 1.6;
  margin-bottom: 8px;
}

.maschine-zustand {
  font-size: 14px;
  line-height: 1.5;
  background: var(--kachel-still);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.maschine-hinweise {
  margin: 0 0 14px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--tinte-weich);
  line-height: 1.55;
}
.maschine-hinweise li { margin-bottom: 6px; }
.maschine-hinweise li::marker { color: var(--terrakotta); }

.maschine-dokumente {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.maschine-zeichnungen {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 6px;
}

.maschine-zeichnung {
  margin: 0;
  flex: 1 1 220px;
  max-width: 320px;
}
.maschine-zeichnung img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--linie);
  background: #fff;
}
.maschine-zeichnung figcaption {
  font-size: 12px;
  color: var(--tinte-blass);
  margin-top: 4px;
  line-height: 1.4;
}

.ersatzteil {
  padding: 10px 0;
  border-top: 1px solid var(--linie);
}
.ersatzteil:first-child { border-top: none; padding-top: 0; }

.ersatzteil-kopf { font-weight: 700; font-size: 14px; }

.ersatzteil-kenndaten {
  font-size: 13px;
  color: var(--tinte-weich);
  margin-top: 2px;
  line-height: 1.5;
}

.ersatzteil-offen {
  font-size: 13px;
  color: var(--tinte-blass);
  font-style: italic;
  margin-top: 4px;
}

.ersatzteil-quellen {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.quelle-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gruen);
  background: var(--gruen-weich);
  border-radius: 999px;
  padding: 5px 11px;
  text-decoration: none;
  line-height: 1.3;
}
.quelle-chip:hover { filter: brightness(0.96); }

/* Zugeklappt, weil man die Original-Positionsnummern selten braucht — aber
   wenn, dann vollständig. */
.maschine-vollliste {
  margin-top: 16px;
  border-top: 1px solid var(--linie);
  padding-top: 10px;
  font-size: 13px;
}
.maschine-vollliste > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--tinte-weich);
  padding: 6px 0;
  list-style: none;
}
.maschine-vollliste > summary::-webkit-details-marker { display: none; }
.maschine-vollliste > summary::before {
  content: "▸ ";
  display: inline-block;
}
.maschine-vollliste[open] > summary::before { content: "▾ "; }

.vollliste-abschnitt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--tinte-blass);
  margin: 14px 0 6px;
}
.vollliste-abschnitt:first-of-type { margin-top: 8px; }

.vollliste-tabelle {
  width: 100%;
  border-collapse: collapse;
}
.vollliste-tabelle tr:nth-child(odd) { background: var(--kachel-still); }
.vollliste-tabelle td {
  padding: 4px 6px;
  line-height: 1.4;
  vertical-align: top;
}
.vollliste-pos {
  width: 28px;
  color: var(--tinte-blass);
  font-variant-numeric: tabular-nums;
}
.vollliste-nr {
  white-space: nowrap;
  text-align: right;
  color: var(--tinte-weich);
  font-variant-numeric: tabular-nums;
}

/* ---- Kamera ---- */

.kamera-tag {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tinte-weich);
  margin: 20px 4px 8px;
}
.kamera-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.kamera-karte {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--linie);
  border-radius: 14px;
  background: var(--kachel);
  box-shadow: var(--schatten);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
}
.kamera-karte:active { transform: scale(0.99); }
.kamera-vorschau {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--kachel-still);
  display: block;
}
.kamera-zeit { padding: 8px 10px 0; font-weight: 700; font-size: 15px; }
.kamera-meta { padding: 0 10px 9px; font-size: 12px; color: var(--tinte-weich); }

.kamera-dialog {
  border: none;
  border-radius: 20px;
  padding: 16px;
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  background: var(--kachel);
  color: var(--tinte);
  box-shadow: var(--schatten);
}
.kamera-dialog::backdrop { background: rgba(30, 24, 18, 0.55); }
.kamera-dialog-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.kamera-dialog video,
.kamera-dialog img {
  display: block;
  width: 100%;
  max-height: 62dvh;
  border-radius: 12px;
  background: #000;
  object-fit: contain;
}
.kamera-dialog-kopf .knopf-text { width: auto; flex: none; }
.kamera-dialog video[hidden],
.kamera-dialog img[hidden] { display: none; }

.kamera-leiste { display: flex; gap: 8px; margin: 4px 0 0; }
.kamera-leiste .knopf-text { width: auto; flex: none; }
.kamera-karte.gewaehlt { outline: 3px solid var(--gruen); outline-offset: -3px; }
.kamera-karte.gewaehlt::after {
  content: "✓";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gruen);
  color: #fff;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
}
.kamera-auswahlleiste {
  position: sticky;
  bottom: calc(var(--unten) + 76px);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--kachel);
  border: 1px solid var(--linie-stark);
  box-shadow: var(--schatten);
}
.kamera-auswahlleiste[hidden] { display: none; }
.kamera-auswahlleiste { flex-wrap: wrap; row-gap: 8px; }
.kamera-auswahlleiste span { flex: 1 1 100%; font-weight: 700; font-size: 14px; }
.kamera-auswahlleiste .knopf-text,
.kamera-auswahlleiste .knopf-voll { flex: 1 1 0; width: auto; min-width: 0; padding: 0 10px; white-space: nowrap; }
.kamera-auswahlleiste .knopf-voll:disabled { opacity: 0.45; }
.kamera-live-wahl { display: flex; gap: 4px; }
.kamera-live-wahl .knopf-text { width: auto; flex: none; }
.kamera-live-wahl .knopf-text.aktiv { background: var(--gruen-weich); color: var(--gruen); font-weight: 700; }
#kamera-live-video { display: block; width: 100%; max-height: 62dvh; border-radius: 12px; background: #000; }

.kamera-protokoll { display: flex; flex-direction: column; gap: 10px; max-height: 62dvh; overflow-y: auto; margin-top: 8px; }
.protokoll-zeile { display: flex; gap: 12px; align-items: flex-start; padding: 8px; border: 1px solid var(--linie); border-radius: 12px; background: var(--kachel-still); }
.protokoll-bild { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: var(--linie); flex: none; cursor: zoom-in; }
.protokoll-text { min-width: 0; font-size: 14px; }
.protokoll-urteil { margin-left: 8px; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--linie); }
.protokoll-urteil.ja { background: var(--gruen-weich); color: var(--gruen); }
.protokoll-urteil.nein { background: var(--rot-weich); color: var(--rot); }
.protokoll-meta { margin-top: 3px; font-size: 12.5px; color: var(--tinte-weich); line-height: 1.4; }
#kamera-gross-bild { cursor: zoom-out; }
.kamera-dialog .protokoll-bild { width: 112px; max-height: none; border-radius: 8px; background: var(--linie); }
.protokoll-tage { margin-bottom: 4px; }
.protokoll-tage .knopf-text { flex: 1 1 0; width: auto; }
.kamera-dialog #kamera-gross-bild { max-height: 70dvh; }
