/* Gestaltung des Familienportals.
 *
 * Ruhig und hell, warmes Papierweiß statt kaltem Grau, ein einziger
 * Akzent in Grün. Mobil zuerst, große Tap-Ziele, Systemschriften.
 * Freundlich, aber nicht verspielt — das hier ist kein Produkt.
 */

:root {
  color-scheme: light dark;

  --grund: #f7f5f1;
  --flaeche: #ffffff;
  --flaeche-ruhig: #f0ede7;
  --rand: #e3ded4;
  --rand-stark: #cfc8bb;
  --schrift: #211f1c;
  --schrift-leise: #6d675e;
  --betont: #2d6a54;
  --betont-schrift: #ffffff;
  --betont-weich: #e7f0ea;
  --warnung: #9a4527;
  --warnung-weich: #f8ebe5;

  --rundung: 14px;
  --rundung-klein: 10px;
  --tap: 46px;
  /* Überschriften in einer Serifenschrift. Das macht den Unterschied
     zwischen "Formular" und "Zuhause" — und kostet nichts, weil es nur
     Schriften sind, die auf den Geräten ohnehin liegen. */
  --titelschrift: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
                  "Times New Roman", serif;

  --spalte: 46rem;
  --spalte-weit: 64rem;
  --rand-links: max(1rem, env(safe-area-inset-left));
  --rand-rechts: max(1rem, env(safe-area-inset-right));

  --schatten: 0 1px 2px rgba(33, 31, 28, 0.04), 0 2px 8px rgba(33, 31, 28, 0.04);
  --schatten-hoch: 0 2px 4px rgba(33, 31, 28, 0.06), 0 8px 20px rgba(33, 31, 28, 0.08);
  --kreis: rgba(255, 255, 255, 0.86);
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #17181a;
    --flaeche: #1e2022;
    --flaeche-ruhig: #262a2c;
    --rand: #33383b;
    --rand-stark: #464c50;
    --schrift: #e9e6e0;
    --schrift-leise: #9a958c;
    --betont: #7cc3a5;
    --betont-schrift: #14251e;
    --betont-weich: #1d2f28;
    --warnung: #e09a7c;
    --warnung-weich: #2d211c;

    --schatten: none;
    --schatten-hoch: 0 8px 24px rgba(0, 0, 0, 0.35);

    /* Der Kreis unter dem Auswahlkästchen im Bestand. Hell wäre im
       Dunkelmodus ein Loch in der Karte. */
    --kreis: rgba(30, 32, 34, 0.86);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--grund);
  color: var(--schrift);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Reichlich: am iPhone schwebt die Safari-Leiste über dem Inhalt, und
     der Speichern-Knopf lag darunter. */
  padding-bottom: calc(5rem + env(safe-area-inset-bottom));
}

/* --- Kopfzeile ---------------------------------------------------------- */

.kopf {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 0.55rem;
  /* Auf breiten Schirmen soll der Name über dem Inhalt stehen und nicht
     allein in der linken Ecke. */
  padding: calc(env(safe-area-inset-top) + 0.85rem)
           max(var(--rand-rechts), calc((100% - var(--spalte-weit)) / 2)) 0.85rem
           max(var(--rand-links), calc((100% - var(--spalte-weit)) / 2));
  border-bottom: 1px solid var(--rand);
  background: color-mix(in srgb, var(--flaeche) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
}

.kopf-marke {
  /* Der Name gibt nicht nach, der Seitentitel schon. Ohne das rutschte
     bei einem langen Titel der Name in die zweite Zeile. */
  flex: 0 0 auto;
  font-family: var(--titelschrift);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--schrift);
  text-decoration: none;
}

.kopf-marke::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--betont);
}

.kopf-titel {
  color: var(--schrift-leise);
  font-size: 0.95rem;
  /* Lange Titel dürfen die Kopfzeile nicht sprengen. */
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Rahmen ------------------------------------------------------------- */

.inhalt {
  max-width: var(--spalte);
  margin: 0 auto;
  padding: 1.75rem var(--rand-rechts) 0 var(--rand-links);
}

/* Der Bestand ist eine Galerie und darf breiter sein als eine Textseite.
   Am Handy ändert das nichts, dort ist ohnehin der Bildschirm die Grenze. */
.inhalt-weit { max-width: var(--spalte-weit); }

h1 {
  font-family: var(--titelschrift);
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 0.4rem;
}

h2 {
  font-family: var(--titelschrift);
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: -0.008em;
  font-weight: 600;
  margin: 2.25rem 0 0.75rem;
}

p { margin: 0 0 1rem; }

a { color: var(--betont); text-underline-offset: 0.18em; }

.leise {
  color: var(--schrift-leise);
  font-size: 0.95rem;
}

p.leise { margin-top: 0; }

hr {
  border: none;
  border-top: 1px solid var(--rand);
  margin: 2rem 0;
}

:focus-visible {
  outline: 2px solid var(--betont);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Bedienelemente ----------------------------------------------------- */

button,
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--tap);
  padding: 0 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--rundung-klein);
  background: var(--betont);
  color: var(--betont-schrift);
  font: inherit;
  font-size: 1rem;
  font-weight: 540;
  text-decoration: none;
  cursor: pointer;
  transition: filter 120ms ease, transform 120ms ease;
}

button:hover,
.knopf:hover { filter: brightness(1.07); }

button:active,
.knopf:active { transform: translateY(1px); }

button:disabled {
  opacity: 0.5;
  cursor: default;
  filter: none;
  transform: none;
}

.knopf-ruhig,
button.knopf-ruhig {
  background: var(--flaeche);
  color: var(--schrift);
  border-color: var(--rand-stark);
}

.knopf-gefahr,
button.knopf-gefahr {
  background: var(--flaeche);
  color: var(--warnung);
  border-color: var(--warnung);
}

label {
  display: block;
  margin-bottom: 1.15rem;
}

label > span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--schrift-leise);
  font-size: 0.9rem;
  font-weight: 500;
}

input, select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--rand-stark);
  border-radius: var(--rundung-klein);
  background: var(--flaeche);
  color: var(--schrift);
  font: inherit;
  font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--betont);
  outline-offset: 0;
}

textarea {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.55;
}

input[type="file"] {
  padding: 0.7rem;
  background: var(--flaeche-ruhig);
  border-style: dashed;
}

.schalter {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung-klein);
  background: var(--flaeche);
}

.schalter input {
  width: auto;
  min-height: auto;
  margin-top: 0.3rem;
  flex: 0 0 auto;
  accent-color: var(--betont);
}

.schalter span {
  margin: 0;
  color: var(--schrift);
  font-size: 0.95rem;
  font-weight: 400;
}

.zwei {
  display: grid;
  gap: 0 1rem;
  grid-template-columns: 1fr 1fr;
  /* Oben ausrichten, sonst schiebt eine zweizeilige Beschriftung das
     Nachbarfeld nach unten. */
  align-items: start;
}

/* Ohne das sprengt ein Datumsfeld am iPhone seine Spalte: input[type=date]
   bringt eine eigene Mindestbreite mit, und das Raster lässt es überlaufen,
   statt es zu schrumpfen. Genau so haben sich zwei Felder überlappt. */
.zwei > * { min-width: 0; }
.zwei input,
.zwei select,
.zwei textarea { width: 100%; max-width: 100%; box-sizing: border-box; }

/* Am Handy untereinander: zwei Datumsfelder nebeneinander sind auf 390
   Punkten ohnehin zu eng. */
@media (max-width: 26rem) {
  .zwei { grid-template-columns: 1fr; }
}

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

.hinweis {
  margin: 1.1rem 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--warnung);
  border-left-width: 3px;
  border-radius: var(--rundung-klein);
  background: var(--warnung-weich);
  color: var(--warnung);
  font-size: 0.95rem;
}

.kasten {
  margin: 1.3rem 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  box-shadow: var(--schatten);
}

.kasten p:last-child { margin-bottom: 0; }

.link {
  display: block;
  padding: 0.7rem 0.8rem;
  border-radius: var(--rundung-klein);
  background: var(--flaeche-ruhig);
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  word-break: break-all;
  user-select: all;
}

.mitteilung {
  margin-top: 15vh;
  text-align: center;
}

.mitteilung-status {
  font-size: 3rem;
  font-weight: 620;
  letter-spacing: -0.03em;
  color: var(--rand-stark);
  margin: 0 0 0.3rem;
  line-height: 1;
}

/* --- Anmeldung ---------------------------------------------------------- */

.anmeldung {
  max-width: 23rem;
  margin: 11vh auto 0;
  padding: 1.75rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  box-shadow: var(--schatten-hoch);
}

.anmeldung h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.anmeldung form { margin-top: 1.5rem; }
.anmeldung button { width: 100%; }

/* --- Kacheln des Dashboards --------------------------------------------- */

.kacheln {
  display: grid;
  gap: 1rem;
  /* 13.5rem, damit in der normalen Spalte drei nebeneinander passen.
     Bei 15rem blieben es zwei und die dritte stand allein. */
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  margin: 2rem 0 2.5rem;
  padding: 0;
  list-style: none;
}

.kachel {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  /* Ohne das ist die Kachel nur so hoch wie ihr Text, und eine Zeile mehr
     macht eine Kachel größer als ihre Nachbarn. */
  height: 100%;
  padding: 1.35rem 1.4rem 1.25rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  color: var(--schrift);
  text-decoration: none;
  box-shadow: var(--schatten);
  transition: box-shadow 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.kachel-kopf {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.kachel-kopf strong {
  font-family: var(--titelschrift);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* Die Zahl ist das, was man aus drei Metern Entfernung sehen soll. */
.kachel-wert {
  font-size: 2.3rem;
  line-height: 1.05;
  font-weight: 620;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--betont);
}

.kachel-zeile {
  color: var(--schrift-leise);
  font-size: 0.92rem;
  line-height: 1.45;
  margin-top: auto;
  padding-top: 0.35rem;
}

.kachel:hover {
  box-shadow: var(--schatten-hoch);
  border-color: var(--rand-stark);
  transform: translateY(-1px);
}

.kachel-zeichen {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: var(--rundung-klein);
  background: var(--betont-weich);
  color: var(--betont);
}

.kachel-zeichen svg { width: 1.3rem; height: 1.3rem; }

/* Ein Vorspann unter der Begrüßung: groß genug, um dazuzugehören,
   leise genug, um nicht mit der Überschrift zu streiten. */
.vorspann {
  color: var(--schrift-leise);
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}
.kachel-text strong { font-weight: 600; letter-spacing: -0.008em; }

.fusszeile {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rand);
}

.fusszeile form { margin: 0; }

/* --- Reiter und Filter -------------------------------------------------- */

/* Verborgen heißt verborgen. Eigene display-Regeln schlagen sonst das
   hidden-Attribut, und eine Leiste, die sich nicht wegblenden lässt,
   steht dauernd im Weg. Genau das ist passiert. */
[hidden] { display: none !important; }

/* Die Reiter bleiben in einer Zeile und lassen sich schieben. Umbrechen
   sah nach Versehen aus, sobald ein fünfter dazukam. */
.reiter {
  display: flex;
  gap: 0.15rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 0 1.5rem;
  border-bottom: 1px solid var(--rand);
}

.reiter::-webkit-scrollbar { display: none; }

/* Am Handy passen nicht alle Reiter nebeneinander. Der weiche Rand rechts
   sagt, dass dort noch etwas kommt — ohne ihn sähe es aus, als wäre die
   Liste zu Ende. */
@media (max-width: 30rem) {
  .reiter {
    mask-image: linear-gradient(to right, #000 85%, transparent 100%);
  }
}

.reiter a { flex: 0 0 auto; white-space: nowrap; }

.reiter a {
  padding: 0.55rem 0.85rem;
  color: var(--schrift-leise);
  text-decoration: none;
  font-size: 0.97rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.reiter a:hover { color: var(--schrift); }

.reiter a[aria-current="page"] {
  color: var(--schrift);
  border-bottom-color: var(--betont);
  font-weight: 560;
}

.suchzeile {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.suchzeile input { flex: 1; min-width: 0; }
.suchzeile button { flex: 0 0 auto; }

.filterzeile {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--rand-stark);
  border-radius: 999px;
  background: var(--flaeche);
  color: var(--schrift-leise);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.4;
}

.filter:hover { color: var(--schrift); }

.filter-aktiv {
  background: var(--betont);
  border-color: var(--betont);
  color: var(--betont-schrift);
  font-weight: 540;
}

/* --- Karten der Bestandsliste ------------------------------------------- */

/* Der Bestand ist eine Kleidersammlung, keine Tabelle: das Foto trägt die
   Karte, der Text steht darunter. Zwei Spalten am Handy, mehr wenn Platz
   ist. */
.karten {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  /* Am Handy zwei Spalten, auf dem Schirm fünf. Schmaler sollen die
     Karten nicht werden, sonst passt kein Titel mehr hinein. */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
}

.karten a {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  color: var(--schrift);
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--schatten);
  transition: box-shadow 140ms ease, border-color 140ms ease;
}

.karten a:hover {
  box-shadow: var(--schatten-hoch);
  border-color: var(--rand-stark);
}

.karte-bild {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0;
  overflow: hidden;
  background: var(--flaeche-ruhig);
}

.karte-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }

.karte-leer {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--rand-stark);
}

.karte-leer svg { width: 1.5rem; height: 1.5rem; }

.karte-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
  padding: 0.6rem 0.7rem 0.7rem;
}

/* Höchstens zwei Zeilen Titel: sonst sind die Karten im Raster
   unterschiedlich hoch und das Auge findet keine Linie. */
.karte-text strong {
  font-weight: 560;
  overflow-wrap: anywhere;
  line-height: 1.35;
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.karte-text > .leise { font-size: 0.85rem; }

.karte-fuss {
  display: flex;
  gap: 0.35rem 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.5rem;
}

.preis {
  font-variant-numeric: tabular-nums;
  font-weight: 560;
  /* Der Preis darf nie umbrechen: "18,00" über "€" liest sich falsch. */
  white-space: nowrap;
}

/* In der schmalen Karte wird nichts abgeschnitten — "versch…" sagt
   niemandem etwas. Passt beides nicht nebeneinander, rückt der Preis in
   die nächste Zeile. */
.karte-fuss .marke {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 0.74rem;
  padding: 0.1rem 0.45rem;
}

/* --- Zustandsmarken ----------------------------------------------------- */

.marke {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 540;
  letter-spacing: 0.01em;
  background: var(--flaeche-ruhig);
  color: var(--schrift-leise);
  border: 1px solid var(--rand);
}

.marke-eingestellt {
  background: var(--betont-weich);
  border-color: transparent;
  color: var(--betont);
}

.marke-verkauft {
  background: var(--betont);
  border-color: var(--betont);
  color: var(--betont-schrift);
}

.marke-verschenkt {
  background: var(--flaeche-ruhig);
  border-color: var(--rand-stark);
  color: var(--schrift-leise);
}

/* --- Listen ------------------------------------------------------------- */

.liste {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  box-shadow: var(--schatten);
  overflow: hidden;
}

.liste li {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--rand);
}

.liste li:last-child { border-bottom: none; }
.liste strong { display: block; font-weight: 560; }
.liste .leise { font-size: 0.9rem; }

/* --- Bilder ------------------------------------------------------------- */

.bilder {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  margin: 1.25rem 0 1.75rem;
}

.bilder img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--rundung);
  border: 1px solid var(--rand);
  display: block;
}

.vorschau {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: -0.4rem 0 1.15rem;
}

.vorschau-teil {
  position: relative;
  width: 6rem;
  height: 6rem;
}

.vorschau img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--rundung-klein);
  border: 1px solid var(--rand);
  display: block;
}

/* Reihenfolge sichtbar machen: das erste Foto wird die Vorschau im Bestand. */
.vorschau-nummer {
  position: absolute;
  left: 0.3rem;
  bottom: 0.3rem;
  min-width: 1.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 560;
  line-height: 1.35rem;
  text-align: center;
}

.vorschau-weg {
  position: absolute;
  top: -0.45rem;
  right: -0.45rem;
  width: 1.8rem;
  height: 1.8rem;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--flaeche);
  color: var(--schrift);
  border: 1px solid var(--rand-stark);
  font-size: 1.1rem;
  line-height: 1;
  box-shadow: var(--schatten);
}

.kopierzeile {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0 0 1.75rem;
}

/* Bildauswahl: was in die Anzeige geht und was nur intern bleibt. */

.bild-wahl {
  position: relative;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  padding: 0.5rem;
  opacity: 0.62;
  transition: opacity 140ms ease, border-color 140ms ease;
}

.bild-wahl-an {
  opacity: 1;
  border-color: var(--betont);
}

.bild-wahl img {
  border: none;
  border-radius: var(--rundung-klein);
  margin-bottom: 0.45rem;
}

.bild-schalter {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin: 0 0 0.45rem;
}

.bild-schalter input {
  width: auto;
  min-height: auto;
  flex: 0 0 auto;
  accent-color: var(--betont);
}

.bild-schalter span {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--schrift);
}

.bild-vor {
  width: 100%;
  min-height: 2.2rem;
  font-size: 0.85rem;
  padding: 0 0.5rem;
}

.bild-marke {
  display: block;
  padding: 0.35rem 0;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 560;
  color: var(--betont);
}

.bilder-klein {
  grid-template-columns: repeat(auto-fit, minmax(5.5rem, 6.5rem));
  margin-bottom: 1.25rem;
}

/* --- Detailansicht ------------------------------------------------------ */

.anzeige { margin-bottom: 1.15rem; }

.anzeige > span {
  display: block;
  color: var(--schrift-leise);
  font-size: 0.9rem;
  font-weight: 500;
}

.anzeige p {
  margin: 0.15rem 0 0;
  white-space: pre-wrap;
}

.statuszeile {
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
}

.statuszeile label:last-of-type { margin-bottom: 1rem; }

.teilwahl {
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  padding: 0.6rem 0.8rem;
  margin: 0 0 1.15rem;
  background: var(--flaeche);
}

.teilwahl legend {
  color: var(--schrift-leise);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0 0.3rem;
}

.teilwahl .schalter {
  border: none;
  background: none;
  padding: 0.35rem 0.2rem;
  margin: 0;
}

/* --- Zahlen ------------------------------------------------------------- */

.zahlen {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  margin: 1.25rem 0 1.75rem;
}

.zahl {
  padding: 1.1rem 0.75rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  box-shadow: var(--schatten);
  text-align: center;
}

.zahl-wert {
  display: block;
  font-size: 1.7rem;
  font-weight: 620;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  margin-bottom: 0.15rem;
}

/* --- Sonstiges ---------------------------------------------------------- */

.gefahr {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rand);
}

.neben { display: inline-block; margin: 0 0.5rem 0.5rem 0; }

.leer {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--schrift-leise);
  border: 1px dashed var(--rand-stark);
  border-radius: var(--rundung);
  margin-bottom: 1.5rem;
}

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

/* Ausklappbare Anleitungen */

.anleitung {
  margin: 1.1rem 0;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
}

.anleitung summary {
  cursor: pointer;
  font-weight: 560;
  color: var(--betont);
}

.anleitung[open] summary { margin-bottom: 0.8rem; }

.anleitung ol {
  margin: 0 0 0.5rem;
  padding-left: 1.3rem;
}

.anleitung li { margin-bottom: 0.4rem; }
.anleitung p:last-child { margin-bottom: 0; }

/* Spur eines Vinted-Laufs */

.schritt {
  margin-bottom: 2rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  box-shadow: var(--schatten);
}

.schritt h3 {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.schritt .leise { margin-bottom: 0.7rem; }

.spur-text {
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--rundung-klein);
  background: var(--flaeche-ruhig);
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.spur-bild {
  display: block;
  width: 100%;
  border: 1px solid var(--rand);
  border-radius: var(--rundung-klein);
}

/* --- Erfassung: auf schnelles Abfotografieren ausgelegt ---------------- */

/* Der Auslöser ist die Hauptsache auf dieser Seite und darf am Handy nicht
   gesucht werden müssen. Das Dateifeld selbst bleibt im Baum, damit die
   Tastaturbedienung erhalten bleibt, ist aber nicht zu sehen. */
.kamera {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 9rem;
  padding: 1.5rem;
  border: 2px dashed var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  color: var(--schrift);
  cursor: pointer;
  text-align: center;
}

.kamera:hover { border-color: var(--betont); }
.kamera:active { transform: translateY(1px); }
.kamera:focus-within {
  outline: 2px solid var(--betont);
  outline-offset: 2px;
}

.kamera input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.kamera-zeichen {
  font-size: 2.4rem;
  line-height: 1;
  color: var(--betont);
}

.kamera-text { font-size: 1.05rem; font-weight: 600; }

/* Sind alle Plätze belegt, soll der Auslöser das auch zeigen. */
.kamera-voll {
  opacity: 0.45;
  cursor: not-allowed;
}

.knopf.gross,
button.knopf.gross {
  display: block;
  width: 100%;
  padding: 1rem;
  font-size: 1.05rem;
}

/* Alles, was nicht jedes Mal gebraucht wird, liegt zugeklappt darunter. */
.mehr {
  margin-top: 1rem;
  border-top: 1px solid var(--rand);
  padding-top: 0.75rem;
}

.mehr > summary {
  cursor: pointer;
  color: var(--schrift-leise);
  padding: 0.4rem 0;
}

.mehr[open] > summary { margin-bottom: 0.5rem; }

.erledigt {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.erledigt li { margin: 0; }

.erledigt a {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

/* --- Warteschlange ---------------------------------------------------- */

.auftragsliste {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.auftragszeile a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: baseline;
  min-height: var(--tap);
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.auftragszeile .nummer {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.auftragszeile .was {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--schrift-leise);
}

.auftragszeile .zustand {
  font-size: 0.85rem;
  color: var(--schrift-leise);
  text-align: right;
}

.auftragszeile.fertig .zustand { color: var(--betont); }
.auftragszeile.fehler .zustand,
.auftragszeile.abgebrochen .zustand { color: var(--warnung); }

/* --- Auswahl im Bestand ----------------------------------------------- */

.verborgen {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.karten li { position: relative; }

/* Das Kästchen liegt in der Ecke des Fotos. Der helle Kreis darunter ist
   nötig, damit es auf einem dunklen Foto nicht verschwindet. */
.karte-wahl {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--kreis);
  box-shadow: var(--schatten);
  cursor: pointer;
}

.karte-wahl input {
  width: 20px;
  height: 20px;
  margin: 0;
  min-height: 0;
  accent-color: var(--betont);
}

/* Angehaktes soll ins Auge fallen, ohne dass die Karte springt. */
.karten li:has(.karte-wahl input:checked) > a {
  border-color: var(--betont);
  box-shadow: 0 0 0 2px var(--betont);
}

.auswahlleiste {
  position: sticky;
  bottom: 0.75rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0;
  padding: 0.75rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  box-shadow: var(--schatten-hoch);
}

.auswahlzahl {
  font-weight: 600;
  margin-right: auto;
}

/* --- Abschnitte ------------------------------------------------------- */

/* Die Detailseite ist lang. Damit sie nicht als eine einzige Spalte
   herunterläuft, bekommt jeder Abschnitt Luft und eine feine Linie. */
.abschnitt {
  padding-top: 1.75rem;
  margin-bottom: 1.75rem;
  border-top: 1px solid var(--rand);
}

.abschnitt:first-of-type { border-top: none; padding-top: 0.5rem; }
.abschnitt > h2 { margin-top: 0; }
.abschnitt > p:last-child { margin-bottom: 0; }

/* Der zweite Weg zum Foto: unauffälliger als der Auslöser, aber für einen
   ganzen Stapel der schnellere. */
.galerie {
  position: relative;
  display: block;
  margin-top: 0.6rem;
  padding: 0.75rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  color: var(--schrift-leise);
  text-align: center;
  cursor: pointer;
  font-size: 0.95rem;
}

.galerie:hover { border-color: var(--rand-stark); color: var(--schrift); }

.galerie input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* --- Schlafprotokoll --------------------------------------------------- */

/* Der Nachtbalken: 17 bis 10 Uhr, gefüllt heißt geschlafen. */
.nachtbalken {
  display: block;
  width: 100%;
  height: 4rem;
  margin: 0.75rem 0 1rem;
}

.balken-grund { fill: var(--flaeche-ruhig); }
.balken-schlaf { fill: var(--betont); }
.balken-strich { stroke: var(--grund); stroke-width: 1.5; }

.balken-stunde {
  fill: var(--schrift-leise);
  font-size: 11px;
  text-anchor: middle;
}

.balken-leer { fill: var(--schrift-leise); font-size: 13px; }

.schlaftage {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.schlaftage li { margin-bottom: 0.6rem; }

.schlaftage a {
  display: block;
  padding: 0.85rem 1rem 0.5rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  box-shadow: var(--schatten);
  text-decoration: none;
  color: inherit;
}

.schlaftage a:hover { border-color: var(--rand-stark); box-shadow: var(--schatten-hoch); }

.schlaftag-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.schlaftag-summe {
  margin-left: auto;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

/* In der Liste ist der Balken nur ein Streifen, nicht das Hauptbild. */
.schlaftage .nachtbalken { height: 2.2rem; margin: 0.4rem 0 0; }
.schlaftage .balken-stunde { display: none; }
.schlaftage .balken-leer { font-size: 15px; }

/* Uhrzeiten stehen zu dritt nebeneinander: hingelegt, eingeschlafen,
   aufgewacht. Am Handy untereinander wäre jede Nacht dreimal Scrollen. */
.zeitzeile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0 0.75rem;
  align-items: end;
}

.zeitfeld input { font-variant-numeric: tabular-nums; }

.zeitgruppe {
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  padding: 0.75rem 0.9rem 0.25rem;
  margin: 0 0 0.85rem;
  background: var(--flaeche);
}

.zeitgruppe legend {
  padding: 0 0.4rem;
  font-size: 0.9rem;
  font-weight: 560;
  color: var(--schrift-leise);
}

.wachzeile {
  border-bottom: 1px solid var(--rand);
  padding-bottom: 0.35rem;
  margin-bottom: 0.35rem;
}

.wachzeile:last-of-type { border-bottom: none; }

.berichtzeile {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.berichtzeile label { margin: 0; }
.berichtzeile button { flex: 0 0 auto; }

/* Die Knöpfe zum Nachlegen stehen unter ihrer Gruppe, nicht mittendrin. */
[data-mehr] { margin: 0.25rem 0 0.5rem; }

/* Bei einem einzigen Kind steht der Name nur da und soll nicht wie ein
   Eingabefeld aussehen, in dem etwas zu tun wäre. */
input[readonly] { background: var(--flaeche-ruhig); color: var(--schrift-leise); }

/* --- Belege ------------------------------------------------------------ */

/* "Was ist dran" steht ganz oben und ist der Grund, warum jemand die Seite
   öffnet. Keine Tabelle, keine Ablage — drei Zeilen mit einer Zahl. */
.lage {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.lage a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  box-shadow: var(--schatten);
  text-decoration: none;
  color: inherit;
}

.lage a:hover { border-color: var(--rand-stark); box-shadow: var(--schatten-hoch); }

.lage-zahl {
  flex: 0 0 auto;
  min-width: 2.2rem;
  font-size: 1.9rem;
  font-weight: 620;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--betont);
  text-align: center;
}

.dringend { color: var(--warnung); }

.belegliste {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.belegliste li { position: relative; margin-bottom: 0.6rem; }

.belegliste a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
  box-shadow: var(--schatten);
  text-decoration: none;
  color: inherit;
}

.belegliste a:hover { border-color: var(--rand-stark); box-shadow: var(--schatten-hoch); }

.beleg-kopf { display: flex; justify-content: space-between; gap: 0.75rem; align-items: baseline; }
.beleg-fuss { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.35rem; }

/* Das Kästchen zum Einreichen liegt rechts, weg vom Text. */
.beleg-wahl {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--kreis);
  cursor: pointer;
}

.beleg-wahl input { width: 20px; height: 20px; margin: 0; min-height: 0; accent-color: var(--betont); }
.belegliste li:has(.beleg-wahl input:checked) > a { border-color: var(--betont); box-shadow: 0 0 0 2px var(--betont); }

.marke-offen { background: var(--warnung-weich); border-color: transparent; color: var(--warnung); }
.marke-bezahlt { background: var(--betont-weich); border-color: transparent; color: var(--betont); }
.marke-eingereicht { background: var(--flaeche-ruhig); border-color: var(--rand-stark); color: var(--schrift-leise); }
.marke-erstattet { background: var(--betont); border-color: var(--betont); color: var(--betont-schrift); }
.marke-abgelehnt { background: var(--warnung); border-color: var(--warnung); color: #fff; }

/* Der QR-Code zum Bezahlen. Groß genug, dass ihn das Handy aus zwanzig
   Zentimetern sicher liest. */
.girokasten {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.1rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche);
}

.girocode {
  flex: 0 0 auto;
  width: 11rem;
  height: 11rem;
  /* Immer auf Weiß: ein QR-Code auf dunklem Grund wird nicht erkannt. */
  background: #fff;
  border-radius: var(--rundung-klein);
  padding: 0.4rem;
}

.girokasten > div { flex: 1 1 14rem; }
.girokasten p { margin-bottom: 0.5rem; }

/* Was beim Auslesen unsicher war, soll ins Auge fallen. */
.feld-unsicher > span { color: var(--warnung); }
.feld-unsicher input { border-color: var(--warnung); }

/* "bitte prüfen" steht auf einer eigenen Zeile und bricht die Beschriftung
   nicht um. Umgebrochen hat es die Zeile höher gemacht als die daneben. */
.feld-unsicher em {
  display: block;
  font-style: normal;
  font-weight: 600;
  font-size: 0.85rem;
}

.vorschau-pdf {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 1px solid var(--rand);
  border-radius: var(--rundung-klein);
  background: var(--flaeche-ruhig);
  font-weight: 600;
  color: var(--schrift-leise);
}

/* Eine IBAN liest man Gruppe für Gruppe. Gleiche Ziffernbreite, damit sich
   die Stellen untereinander vergleichen lassen. */
.iban,
.feld-iban input {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.feld-iban input { font-size: 1.05rem; }

.artzeile { margin: -0.5rem 0 1.25rem; }

/* Der Anforderungstext wird gelesen und kopiert, nicht bearbeitet. */
.brief {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--rand);
  border-radius: var(--rundung);
  background: var(--flaeche-ruhig);
}

/* Eine Praxis kann sehr lang heißen. Die Überschrift bleibt trotzdem eine
   Überschrift und schiebt nicht alles vom Schirm. */
.inhalt h1 {
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Die Warteseite: wenig darauf, damit klar ist, dass gerade nichts zu tun
   ist. Der Punkt pulsiert, damit man sieht, dass es läuft. */
.warten { padding: 1rem 0 2rem; }

.warten h1::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-left: 0.4em;
  border-radius: 50%;
  background: var(--betont);
  animation: pulsen 1.4s ease-in-out infinite;
  vertical-align: middle;
}

@keyframes pulsen {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

/* Wer das nicht sehen will oder soll, bekommt einen ruhigen Punkt. */
@media (prefers-reduced-motion: reduce) {
  .warten h1::after { animation: none; opacity: 0.6; }
}

.warten .vorschau { margin: 1.5rem 0; }
.warten .vorschau-teil { width: 7rem; height: 9rem; }
.warten .vorschau img { object-fit: cover; }

/* --- Einkaufsliste ----------------------------------------------------- */

/* Diese Liste wird im Laden bedient, mit einer Hand, oft mit einem Kind auf
   dem Arm. Alles daran ist größer als nötig und nichts verlangt Zielen. */

.einkauf-eingabe {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.4rem;
}

.einkauf-eingabe textarea {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--tap);
  resize: none;
  overflow: hidden;
  line-height: 1.4;
  font-size: 1.05rem;
}

.einkauf-eingabe button { flex: 0 0 auto; }

.einkauf-tipp { margin: 0 0 1.5rem; }

/* Die ganze Zeile ist der Knopf. Das Kästchen links ist nur gezeichnet —
   ein echtes Ankreuzfeld wäre das kleinste Ziel auf der Seite. */
.einkaufliste li.einkaufzeile {
  display: flex;
  align-items: stretch;
  padding: 0;
  gap: 0;
}

.einkauf-haken { flex: 1 1 auto; min-width: 0; margin: 0; }

.einkauf-haken button {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  min-height: var(--tap);
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  color: var(--schrift);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.einkauf-haken button:hover { background: var(--flaeche-ruhig); }

.einkauf-kaestchen {
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  border: 2px solid var(--rand-stark);
  border-radius: 6px;
}

.einkauf-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.einkauf-menge {
  flex: 0 0 auto;
  color: var(--schrift-leise);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Das Löschkreuz liegt rechts und ist absichtlich blass: es wird selten
   gebraucht, und ein Fehlgriff darf nicht wehtun. */
.einkauf-weg { flex: 0 0 auto; margin: 0; display: flex; }

.einkauf-weg button {
  min-height: 100%;
  padding: 0 1rem;
  border: none;
  background: none;
  color: var(--schrift-leise);
  opacity: 0.5;
}

.einkauf-weg button:hover { opacity: 1; color: var(--warnung); }

/* Der kurze Moment zwischen Antippen und Verschwinden. Ohne ihn ist nicht
   zu sehen, was man getroffen hat. */
.einkaufzeile.einkauf-ab {
  opacity: 0.4;
  transition: opacity 0.35s ease;
}

.einkaufzeile.einkauf-ab .einkauf-name { text-decoration: line-through; }

.einkaufzeile.einkauf-ab .einkauf-kaestchen {
  border-color: var(--betont);
  background: var(--betont);
}

/* Vorschläge aus der Historie: ein Griff je Ding, keine Eingabe. */
.vorschlaege { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.vorschlag { margin: 0; }

.vorschlag button {
  min-height: 2.5rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--rand);
  border-radius: 999px;
  background: var(--flaeche);
  color: var(--schrift);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.vorschlag button:hover { border-color: var(--betont); background: var(--betont-weich); }

.liste li.erledigt form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
}

.liste li.erledigt span { color: var(--schrift-leise); text-decoration: line-through; }
.liste li.erledigt button { flex: 0 0 auto; padding: 0.2rem 0.6rem; }

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

/* Die Gerichtliste. Eine Kachel je Gericht, auf dem Handy untereinander. */
.gerichte { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid;
  gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.gerichte > li > a { display: block; padding: .8rem 1rem; border-radius: var(--rundung-klein);
  background: var(--flaeche); border: 1px solid var(--rand); text-decoration: none;
  color: inherit; }
.gerichte > li > a:hover { border-color: var(--betont); }
.gerichte strong { display: block; margin-bottom: .2rem; }
.gerichte .leise { display: block; font-size: .85rem; }

/* Marken sagen auf einen Blick, was ein Gericht kann: Thermomix, für Lotta,
   vorbereitbar. Am Herd entscheidet man danach, nicht nach dem Namen. */
.marken { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.marke { font-size: .75rem; padding: .1rem .45rem; border-radius: 1rem;
  background: var(--flaeche-ruhig); border: 1px solid var(--rand); white-space: nowrap; }
.marke.dringend { background: transparent; }

/* Die Anleitung. Große Schritte, viel Luft: das wird mit einer Hand gelesen,
   während die andere rührt. */
.schritte { padding-left: 1.4rem; margin: 0; }
.schritte > li { margin-bottom: .7rem; line-height: 1.5; }

.zutaten { list-style: none; margin: 0; padding: 0; }
.zutaten > li { display: flex; gap: .6rem; align-items: baseline;
  padding: .35rem 0; border-bottom: 1px solid var(--rand); }
.zutaten .menge { min-width: 5.5rem; font-variant-numeric: tabular-nums;
  text-align: right; color: var(--schrift-leise); }

.meinung { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
  margin-top: .8rem; }

/* Die Zutatenliste. Mit gewaehlter Person wird jede Zeile zur Abstimmung:
   eine Zeile, vier Knoepfe, der aktuelle Stand hervorgehoben. */
.zutatenliste { list-style: none; margin: 0; padding: 0; }
.zutatenliste > li { padding: .7rem 0; border-bottom: 1px solid var(--rand); }
.zutatkopf { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }
.zutatkopf .leise { font-size: .85rem; }
.zutatenliste .meinung { margin-top: .45rem; }
.zutatenliste .meinung button { font-size: .85rem; padding: .25rem .6rem; }

/* Eine abgeloeste Mahnung bleibt lesbar, tritt aber zurueck: sie belegt nur
   noch, dass einmal weniger gefordert wurde. */
.belegliste > li.abgeloest { opacity: .55; }

/* --- Ausfluege ---------------------------------------------------------- */

/* Das Datum steht vor dem Namen und in Tabellenziffern: man liest die Spalte
   links hinunter, bis ein Tag passt. Mit Proportionalziffern wackelt sie. */
.ausflug-datum {
  display: block;
  font-size: .85rem;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
  color: var(--schrift-leise);
}

.ausflugliste > li > a { display: block; text-decoration: none; color: inherit; }
.ausflugliste > li > a:hover strong { text-decoration: underline; }
.ausflugliste .marken { margin-top: .35rem; }
.ausflugliste .meinung { margin-top: .45rem; }
.ausflugliste .meinung button { font-size: .85rem; padding: .25rem .6rem; }

/* Ein unbestaetigter Termin bekommt eine Kante, nicht nur eine Marke: wer
   die Liste ueberfliegt, soll ihn sehen, ohne die Marken zu lesen. */
.ausflugliste > li.unsicher {
  border-left: 3px solid var(--warnung);
  padding-left: .7rem;
}

/* Der Highlight-Kasten. Die Begruendung steht kleiner darunter und nicht in
   Klammern dahinter: sie wird gelesen, wenn man zweifelt, und uebersprungen,
   wenn nicht. */
.highlights ol.liste { counter-reset: hervor; }
.highlights .liste li { padding-left: 1.9rem; position: relative; }

.highlights .liste li::before {
  counter-increment: hervor;
  content: counter(hervor);
  position: absolute;
  left: 0;
  top: .55rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  background: var(--betont);
  color: var(--betont-schrift);
  font-size: .78rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.highlights .warum { margin: .2rem 0 0; font-size: .85rem; }

/* Die Anzahl im Filterknopf. Sie steht hinter dem Namen und tritt zurueck:
   man liest den Namen und nimmt die Zahl nebenbei mit. */
.filter .anzahl {
  display: inline-block;
  margin-left: .3rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: var(--flaeche-ruhig);
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
}

.filter-aktiv .anzahl { background: rgba(255, 255, 255, .25); }

/* Die Rubrik ist die erste Marke und darf sich abheben -- sie sagt, ob man
   ueberhaupt weiterlesen muss. */
.marke-rubrik {
  background: var(--betont-weich);
  border-color: transparent;
  color: var(--betont);
}
