/* Erfassung im Objekt. Ein Daumen, eine Hand, schlechtes Licht im Keller:
   grosse Flaechen, kraeftiger Kontrast, nichts Kleines zum Zielen. */

:root {
  --rot: #821535;
  --dunkel: #5A0E24;
  --hell: #FBF5F0;
  --text: #2A1A1A;
  --linie: #C9BDB4;
  --gruen: #2E7D32;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: #fff;
  padding-bottom: env(safe-area-inset-bottom);
}

header {
  position: sticky; top: 0; z-index: 10;
  background: #fff; border-bottom: 1px solid var(--linie);
  padding-top: env(safe-area-inset-top);
}

.kopf {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px 6px; font-weight: 600; color: var(--dunkel);
}

.puffer {
  font-size: 13px; font-weight: 400; color: #fff; background: var(--rot);
  border-radius: 10px; padding: 2px 9px;
}

/* Der Fortschritt ist oben sichtbar, und jeder Schritt bleibt erreichbar —
   auch ein abgeschlossener. Es gibt keinen Punkt, hinter den man nicht
   zurueckkann. */
nav { display: flex; overflow-x: auto; gap: 6px; padding: 0 10px 10px; }
/* `display: flex` schlaegt sonst das hidden-Attribut — die Schrittleiste stand
   noch da, wo es gar keinen Durchgang gibt. */
nav[hidden] { display: none; }
nav button {
  flex: 0 0 auto; border: 1px solid var(--linie); background: #fff;
  color: var(--dunkel); border-radius: 18px; padding: 8px 14px;
  font-size: 14px; font-family: inherit;
}
nav button[aria-current="true"] { background: var(--rot); color: #fff; border-color: var(--rot); }
nav button.fertig { border-color: var(--gruen); color: var(--gruen); }

main { padding: 14px 14px 90px; }
h2 { color: var(--rot); font-size: 21px; margin: 4px 0 10px; }
h3 { color: var(--dunkel); font-size: 16px; margin: 22px 0 8px; }
.leise { color: #7A6A62; font-size: 14px; margin: 0 0 12px; }

input, textarea, select, button {
  font-family: inherit; font-size: 17px;
}
input, textarea, select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--linie);
  border-radius: 10px; background: #fff; margin-bottom: 10px;
}
textarea { resize: vertical; }

button.haupt {
  width: 100%; background: var(--rot); color: #fff; border: 0;
  border-radius: 12px; padding: 15px; font-weight: 600; margin-bottom: 14px;
}
#freigeben {
  width: 100%; background: #fff; color: var(--rot); border: 2px solid var(--rot);
  border-radius: 12px; padding: 15px; font-weight: 600;
}

/* Ein Feld im Gespraech: Beschriftung darueber, Wert direkt daneben aenderbar.
   Geaenderte Werte bleiben sichtbar markiert. */
.feld { border-bottom: 1px solid var(--linie); padding: 10px 0; }
.feld label { display: block; font-size: 13px; color: #7A6A62; margin-bottom: 3px; }
.feld input { margin: 0; border: 0; border-radius: 0; padding: 4px 0; }
.feld.geaendert { border-left: 3px solid var(--rot); padding-left: 9px; }
.feld.geaendert label::after { content: " · geändert"; color: var(--rot); }

.zeile {
  border: 1px solid var(--linie); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px; background: #fff;
}
.zeile .name { font-weight: 600; }
.zeile .wert { color: var(--dunkel); font-size: 15px; margin-top: 4px; }
.zeile .wert.leer { color: #A08F86; }
.zeile.vorjahr { border-left: 3px solid var(--linie); }
.zeile.erledigt { border-left: 3px solid var(--gruen); }
.zeile.offen { border-left: 3px solid var(--rot); }

.wahl { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.wahl button {
  flex: 1 1 auto; border: 1px solid var(--linie); background: var(--hell);
  border-radius: 10px; padding: 10px; font-size: 14px; color: var(--dunkel);
}
.wahl button[aria-pressed="true"] { background: var(--rot); color: #fff; border-color: var(--rot); }

.marke {
  display: inline-block; background: var(--rot); color: #fff; font-weight: 700;
  border-radius: 5px; padding: 1px 7px; font-size: 13px; margin-right: 6px;
}
.marke.gering { background: #EFE2D8; color: var(--dunkel); }

.baustein {
  border: 1px solid var(--linie); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px;
}
.baustein .zahl { float: right; color: #7A6A62; font-size: 13px; }

.fotos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fotos img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; }
.fotoknopf {
  border: 1px dashed var(--linie); border-radius: 8px; width: 76px; height: 76px;
  background: var(--hell); color: var(--dunkel); font-size: 26px;
}

.ortleiste { display: flex; gap: 8px; }
.sprechen { display: block; font-size: 14px; color: var(--dunkel); margin-bottom: 6px; }
.sprechen .leise { display: block; }

.meldung {
  position: fixed; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom));
  background: var(--dunkel); color: #fff; padding: 13px 16px; border-radius: 12px;
  font-size: 15px; z-index: 20;
}
.meldung.fehler { background: var(--rot); }

.summe { display: flex; justify-content: space-between; padding: 9px 0;
         border-bottom: 1px solid var(--linie); }
.summe b { color: var(--dunkel); }
.rating { font-size: 30px; font-weight: 700; color: var(--rot); margin: 12px 0 2px; }
