/* Ergänzungen für die Zusatz-Apps (Werkzeug, Baustellen).
   Setzt auf app.css auf — hier stehen nur Bausteine, die es dort nicht gibt. */

.werkzeug-kopf,
.bau-kopf { padding: 0 16px; }

.suchzeile { margin-bottom: 12px; }

/* --- Filterleiste --------------------------------------------------------- */

.filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 12px;
  scrollbar-width: none;
}

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

.filter button {
  width: auto;
  min-height: 40px;
  padding: 0 14px;
  font-size: 15px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.filter button[aria-current='true'] {
  background: var(--brand, #0b5d8a);
  border-color: var(--brand, #0b5d8a);
  color: #fff;
  font-weight: 600;
}

/* --- Listeneinträge ------------------------------------------------------- */

.eintrag {
  width: 100%;
  min-height: 60px;
  padding: 11px 14px;
  margin-bottom: 7px;
  justify-content: space-between;
  text-align: left;
  gap: 12px;
}

.eintrag-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.eintrag-text b { font-size: 15.5px; font-weight: 620; }

.klein {
  font-size: 13px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Statusstempel --------------------------------------------------------- */

/* Eckig, versal, gesperrt — ein Stempel auf dem Papierbericht, keine Web-Pille.
   Gefüllt bleibt er: im Sonnenlicht besser lesbar als eine dünne Umrandung. */
.pille {
  flex: 0 0 auto;
  font-family: var(--titel-schrift, var(--schrift-schild));
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--surface-hoch);
  color: var(--ink-soft);
}

.pille.gut { color: var(--gruen); background: var(--gruen-flaeche); }
.pille.warn { color: var(--gelb); background: var(--gelb-flaeche); }
.pille.schlecht { color: var(--rot); background: var(--rot-flaeche); }

/* --- Detailblatt ---------------------------------------------------------- */

.blatt {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  z-index: 20;
}

.blatt[hidden] { display: none; }

.blatt-inhalt {
  background: var(--ground);
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  padding: 10px 16px calc(24px + env(safe-area-inset-bottom));
  /* Die eine orchestrierte Bewegung der App: Das Blatt gleitet herauf wie ein
     natives Bottom-Sheet. reduced-motion stellt es ab (app.css, global). */
  animation: blatt-auf 260ms cubic-bezier(0.32, 0.72, 0.24, 1);
}

@keyframes blatt-auf {
  from { transform: translateY(48px); opacity: 0.4; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Griffleiste wie am Gerät — signalisiert: ziehbar, schließbar. */
.blatt-inhalt::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  margin: 0 auto 12px;
  background: var(--rule);
}

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

.blatt-kopf h2 { margin: 0; font-size: 20px; }

.schliessen {
  width: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0;
  font-size: 18px;
}

.blatt-inhalt button:not(.schliessen) { margin-bottom: 10px; }

/* Auf großen Schirmen (Büro) mittig statt als Blatt von unten. */
@media (min-width: 720px) {
  .blatt { align-items: center; justify-content: center; }
  .blatt-inhalt { max-width: 560px; border-radius: var(--radius); }
  main { max-width: 860px; margin: 0 auto; }
}

/* --- Bautagebuch: Beweisfotos und Unterschrift ---------------------------- */

.tb-fotos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin: 8px 0;
}
.tb-foto { position: relative; margin: 0; }
.tb-foto img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  display: block;
}
.tb-foto-weg {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--rot-flaeche);
  color: var(--rot);
  font-size: 14px;
  line-height: 1;
}
.tb-foto-neu {
  display: block;
  text-align: center;
  padding: 12px;
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  color: var(--ink-soft);
  cursor: pointer;
}

/* Papierweiß in beiden Modi: Der Strich ist dunkel und muss sichtbar bleiben. */
.tb-unterschrift {
  width: 100%;
  height: 160px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  margin: 8px 0;
  touch-action: none;          /* sonst scrollt die Seite statt zu zeichnen */
  display: block;
}
.tb-unterschrift-bild {
  max-height: 70px;
  margin: 8px 0;
  background: #fff;
  border-radius: 6px;
  padding: 4px;
}

/* --- Übersicht (Baustellen-App) -------------------------------------------- */

/* Die Filterleiste liegt jetzt innerhalb von main — main polstert schon 16 px. */
#ansicht-baustellen .filter { padding: 0 0 12px; }

/* Der Tagesstand als ruhige Zeile direkt unter dem Kopf: erst der Balken
   (grün abgezeichnet, gelb geführt, grau fehlt), daneben die Zahl. Er
   beschreibt den Tag, nicht eine Karte — darum liegt er frei. */
/* Der Überblick ist der Blick von der Tür, keine Ansage: kleiner Gruß in
   gemischter Schreibweise, kurzer Tag, schmale Zeilen. Den Plankopf — versal,
   groß — behalten die übrigen Ansichten, dort trägt der Titel die Adresse der
   Baustelle. Angeschaltet über `body[data-ansicht]` aus `zeige()`. */
/* Der Tagesbalken des Überblicks ist eine Randnotiz, kein Diagramm. */
body[data-ansicht="uebersicht"] .tages-stand .segmente i { height: 4px; }

.tages-stand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 2px 12px;
}
.tages-stand .segmente { flex: 1; margin-top: 0; display: flex; gap: 3px; }
.tages-stand-text {
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.segmente i.halb { background: var(--gelb); }
/* Der Balken zeichnet sich von links — einmal je Neuzeichnung. */
.tages-stand .segmente i {
  transform-origin: left;
  animation: bs-fuellen 480ms cubic-bezier(0.22, 1, 0.36, 1) 180ms both;
}

/* Planbeschriftung außerhalb der Karten: gliedert die Übersicht, ohne eine
   Sammelkarte um alles zu legen — gleiche Stimme wie die Kartentitel.
   Eigener Name statt `.abschnitt`: Den trägt schon die Abhakliste des
   Tagesblatt-Formulars — dieselbe Klasse machte dort alle Titel versal. */
.uebersicht-label {
  font-family: var(--titel-schrift, var(--schrift-schild));
  font-size: 12px;
  font-weight: 600;
  margin: 0 2px 8px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
}

/* Der Stand einer Zeile ist ein Punkt, kein Stempel. */
.stand-punkt {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rule);
}
.stand-punkt.warn { background: var(--gelb); }

.tages-leer {
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* Witterung in Listen: dieselbe Zeile wie die Nebenangaben, aber leicht
   abgesetzt — sie ändert sich stündlich, die Adresse nicht. */
.klein.wetter { color: var(--brand, #4aa3d8); font-weight: 600; }

/* --- Baustellenliste -------------------------------------------------------
   Eine ruhige Liste in einer Fläche statt einzelner Kästen: Die Trennlinie
   gliedert, der Rahmen hält zusammen. Nur in der Baustellen-App — die
   Werkzeug-App behält ihre Kacheln. */
#ansicht-baustellen #liste {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
#ansicht-baustellen .eintrag {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: none;
  min-height: 76px;
}
#ansicht-baustellen .eintrag:last-child { border-bottom: 0; }

/* Mehrzeiliger Fließtext. `.klein` schneidet in einer Zeile ab (Listen) — für
   Auftragsbeschreibung, Leistungen und Hinweise braucht es den Umbruch. */
.merk {
  font-size: 13.5px;
  color: var(--ink-soft);
  white-space: pre-wrap;
}
.merk.laut { color: var(--ink); font-size: 15px; }

/* --- Zweite Ebene: Kopf mit Weg zurück ------------------------------------ */

.kopf.mit-zurueck { flex-wrap: wrap; }

/* Der Titelblock darf schrumpfen. Ohne das schöbe ein zweizeiliger
   Baustellenname den Aktualisieren-Knopf in eine eigene Zeile — er stünde
   dann frei über dem Inhalt statt neben dem Titel. */
.kopf.mit-zurueck > div { flex: 1 1 0; min-width: 0; }

.zurueck {
  flex: 0 0 100%;
  width: auto;
  min-height: 44px;
  padding: 0;
  justify-content: flex-start;
  border: 0;
  background: none;
  color: var(--brand-hell, #4aa3d8);
  font-weight: 600;
}
.zurueck[hidden] { display: none; }

/* --- Aktualisieren --------------------------------------------------------
   Holt den Stand des Büros aufs Handy. Rechts neben dem Titel, 44 px Ziel,
   damit ihn ein Arbeitshandschuh trifft. Während des Ladens dreht sich das
   Zeichen — mehr Rückmeldung braucht es nicht. */

.kopf-neu {
  margin-left: auto;
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--brand-hell, #4aa3d8);
}

.kopf-neu svg { width: 20px; height: 20px; }
.kopf-neu[hidden] { display: none; }
.kopf-neu:disabled { opacity: 0.65; }
.kopf-neu[aria-busy="true"] svg { animation: kopf-neu-dreht 0.9s linear infinite; }

@keyframes kopf-neu-dreht { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .kopf-neu[aria-busy="true"] svg { animation: none; }
}

/* `hidden` muss die Anzeigeart der Leisten schlagen — sonst bleiben sie
   sichtbar, weil die Klasse spezifischer ist als das Attribut. */
.tabs[hidden],
.fuss[hidden] { display: none; }

/* --- Fußleiste mit der Hauptaktion ---------------------------------------- */

.fuss {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--rule);
}
.fuss-hinweis {
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 6px;
}

/* Speichern und Senden nebeneinander: Senden ist die Hauptaktion und trägt
   die Markenfarbe, Speichern steht ruhig daneben. */
.fuss-knoepfe { display: flex; gap: 8px; }
.fuss-knoepfe button { flex: 1; min-width: 0; }

/* Der Versand am Knopf selbst: Er atmet, und drei Punkte laufen — der
   Bericht ist unterwegs zur Zentrale. */
#e-senden.sendet {
  animation: senden-atmen 900ms ease-in-out infinite;
  opacity: 1;                       /* disabled dimmt sonst zusätzlich */
}
#e-senden.sendet::after {
  content: '…';
  display: inline-block;
  width: 1.2em;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  animation: senden-punkte 1200ms steps(4, end) infinite;
}
@keyframes senden-atmen {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(0.985); filter: brightness(1.12); }
}
@keyframes senden-punkte {
  from { width: 0; }
  to { width: 1.2em; }
}

/* Die Fußleiste ist höher als die Tableiste, für die `main` polstert — das
   Formular legt den Unterschied drauf, sonst liegt der letzte Knopf darunter. */
#ansicht-erfassen { padding-bottom: 44px; }

/* --- Baustellenkarte (Übersicht heute) ------------------------------------
   Eine Karte je Baustelle: Name als Hauptsache, Kennung darunter, im Fuß der
   Grund und die Witterung. Die ganze Karte ist der eine Weg ins Detail. */

.bs-karte {
  display: block;
  width: 100%;
  text-align: left;
  min-height: 56px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--ink);
}
.bs-kopf { display: flex; align-items: center; gap: 10px; }
.bs-titel {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 620;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bs-karte .weiter {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1;
}
.bs-meta {
  display: block;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 2px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.bs-fuss {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.bs-stand { font-size: 13.5px; font-weight: 600; }
.bs-wetter {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  /* Wie .klein.wetter: die Markenfarbe, nicht der Dunkelmodus-Ton — die
     Apps bleiben laut marke.css in beiden Modi hell. */
  color: var(--brand, #4aa3d8);
  white-space: nowrap;
}

/* --- Auftritt: Ansichten bauen sich ruhig auf ------------------------------
   Jede Neuzeichnung erzeugt die Knoten neu — die Animation läuft darum genau
   einmal je Zeichnen. reduced-motion stellt app.css global still; das
   Formular (erfassen) bleibt bewusst ohne Auftritt, es misst sich selbst. */
@keyframes bs-auftauchen {
  from { opacity: 0; transform: translateY(10px); }
}
@keyframes bs-fuellen {
  from { transform: scaleX(0); }
}
#ansicht-uebersicht > *,
#ansicht-detail > *,
#ansicht-blatt > *,
#ansicht-baustellen .eintrag {
  animation: bs-auftauchen 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
#ansicht-uebersicht > :nth-child(2),
#ansicht-detail > :nth-child(2),
#ansicht-blatt > :nth-child(2),
#ansicht-baustellen .eintrag:nth-child(2) { animation-delay: 50ms; }
#ansicht-uebersicht > :nth-child(3),
#ansicht-detail > :nth-child(3),
#ansicht-blatt > :nth-child(3),
#ansicht-baustellen .eintrag:nth-child(3) { animation-delay: 100ms; }
#ansicht-uebersicht > :nth-child(4),
#ansicht-detail > :nth-child(4),
#ansicht-blatt > :nth-child(4),
#ansicht-baustellen .eintrag:nth-child(4) { animation-delay: 150ms; }
#ansicht-uebersicht > :nth-child(n+5),
#ansicht-detail > :nth-child(n+5),
#ansicht-blatt > :nth-child(n+5),
#ansicht-baustellen .eintrag:nth-child(n+5) { animation-delay: 200ms; }

/* --- Fortschritt des Blattes ---------------------------------------------- */

.fortschritt {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.fortschritt-kopf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
}
/* „3 von 7 erledigt" ist die Kennzahl des Blattes — sie steht in einer Zeile. */
.fortschritt-kopf b { white-space: nowrap; }
.fortschritt-kopf span {
  font-weight: 400;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: right;
}
.segmente { display: flex; gap: 3px; margin-top: 10px; }
.segmente i {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--rule);
}
.segmente i.voll { background: var(--gruen); }

/* --- Abhakliste: die Teile des Tagesblatts --------------------------------
   Sieben Abschnitte offen untereinander sind eine Scrollstrecke, die auf
   einem Handy niemand überblickt. Jeder Teil ist darum eine Zeile zum
   Abhaken: Haken, Titel und das Wesentliche in Kurzform — aufgeklappt das
   Formular dazu. Das `name` am <details> hält immer nur einen offen. */

/* Ein Block, nicht acht Karten: Untereinander gestapelte Kärtchen lesen sich
   als acht Dinge, eine Liste mit Trennstrichen als ein Blatt mit acht Zeilen —
   und genau das ist es. */
.abschnitte {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
.abschnitt {
  border-bottom: 1px solid var(--rule);
}
.abschnitt:last-child { border-bottom: 0; }
/* Der offene Abschnitt hebt sich am Kopf ab — man sieht auf einen Blick, wo
   man gerade arbeitet. */
.abschnitt[open] > .abschnitt-kopf { background: var(--surface-hoch); }

.abschnitt-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  min-height: 56px;                 /* Touchziel wie überall in der App */
  cursor: pointer;
  list-style: none;                 /* das Dreieck des Browsers bleibt draußen */
}
.abschnitt-kopf::-webkit-details-marker { display: none; }

/* Der Haken trägt vor dem Abhaken die Nummer des Abschnitts: dieselbe Stelle,
   dieselbe Größe — beim Durchgehen springt nichts. */
.abschnitt-haken {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-hoch);
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--mono);
}
.abschnitt-haken::before { content: attr(data-nr); }
.abschnitt.fertig .abschnitt-haken {
  background: var(--gruen-flaeche);
  color: var(--gruen);
}
.abschnitt.fertig .abschnitt-haken::before { content: '✓'; font-size: 16px; }

/* Eine Zeile bleibt eine Zeile: Bricht ein Titel um, werden die Zeilen
   ungleich hoch und die Liste verliert ihren Rhythmus. */
.abschnitt-titel {
  flex: 0 1 auto;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Erledigtes tritt zurück, Offenes bleibt vorne — das ist der Sinn der Liste. */
.abschnitt.fertig:not([open]) .abschnitt-titel { color: var(--ink-soft); font-weight: 500; }

.abschnitt-zusatz {
  font-size: 12px;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}

/* Die Kurzfassung sagt zugeklappt, was drinsteht. Offen ist sie überflüssig —
   dann steht es ja da. */
.abschnitt-kurz {
  flex: 1;
  min-width: 0;
  text-align: right;
  font-size: 13.5px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.abschnitt[open] .abschnitt-kurz { display: none; }

.abschnitt-kopf::after {
  content: '';
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg) translate(-2px, -2px);
}
.abschnitt[open] .abschnitt-kopf::after { transform: rotate(-135deg) translate(-2px, -2px); }

.abschnitt-rumpf { padding: 2px 16px 16px; }
.abschnitt[open] .abschnitt-rumpf {
  border-top: 1px solid var(--rule);
  padding-top: 14px;
}
.abschnitt-hinweis {
  padding: 0 16px 14px;
  margin-top: -8px;
  font-size: 13px;
  color: var(--ink-soft);
}

/* --- Chips: Auswahl ohne Tastatur ----------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips + .chips,
.chips + textarea,
.chips + input { margin-top: 10px; }

.chip {
  width: auto;
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
  border-radius: 8px;
  background: var(--surface-hoch);
  border: 1px solid var(--rule);
  color: var(--ink);
  flex: 0 0 auto;
}
.chip[aria-pressed="true"] {
  background: var(--brand, #0b5d8a);
  border-color: var(--brand, #0b5d8a);
  color: #fff;
  font-weight: 600;
}

/* --- Leistungen: Kacheln, Karten, Stempel ---------------------------------
   Eine Kachel je Leistungsart, mit Werkzeug-Zeichen — groß genug für den
   Daumen im Handschuh. Antippen federt, die Karte darunter klappt auf, und
   sobald die Beschreibung steht, schlägt der grüne ERFASST-Stempel auf die
   Karte: die eine Belohnung dieses Formulars, bewusst die einzige. */

.leistung-kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

/* Beim Aufklappen des Abschnitts treten die Kacheln gestaffelt an — wie eine
   Kolonne, die sich aufstellt. Nach einer Neuzeichnung mitten in der Arbeit
   (Kachel-Tipp, Foto) setzt bau.js `still` — dann steht alles sofort, nichts
   wippt unter dem Finger nach. */
.leistung-kacheln:not(.still) .leistung-kachel {
  animation: leistung-antreten 300ms cubic-bezier(0.3, 1.25, 0.5, 1) backwards;
}
.leistung-kacheln:not(.still) .leistung-kachel:nth-child(2) { animation-delay: 30ms; }
.leistung-kacheln:not(.still) .leistung-kachel:nth-child(3) { animation-delay: 60ms; }
.leistung-kacheln:not(.still) .leistung-kachel:nth-child(4) { animation-delay: 90ms; }
.leistung-kacheln:not(.still) .leistung-kachel:nth-child(5) { animation-delay: 120ms; }
.leistung-kacheln:not(.still) .leistung-kachel:nth-child(6) { animation-delay: 150ms; }
.leistung-kacheln:not(.still) .leistung-kachel:nth-child(7) { animation-delay: 180ms; }
.leistung-kacheln:not(.still) .leistung-kachel:nth-child(8) { animation-delay: 210ms; }
.leistung-kacheln:not(.still) .leistung-kachel:nth-child(9) { animation-delay: 240ms; }
.leistung-kacheln:not(.still) .leistung-kachel:nth-child(10) { animation-delay: 270ms; }
@keyframes leistung-antreten {
  from { transform: translateY(10px) scale(0.94); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.leistung-kachel {
  position: relative;
  width: auto;
  min-height: 82px;
  padding: 10px 6px 8px;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius);
  background: var(--surface-hoch);
  border: 1px solid var(--rule);
  transition: transform 90ms ease, background 150ms ease, border-color 150ms ease;
}
.leistung-kachel:active:not(:disabled) { transform: scale(0.93); }
.leistung-kachel svg {
  width: 26px;
  height: 26px;
  color: var(--ink-soft);
}
/* Namen wie „Stillstand Wetter" brechen in zwei Zeilen, statt abgeschnitten
   zu werden — abgeschnitten wäre auf der Baustelle ein Ratespiel. */
.leistung-kachel span {
  max-width: 100%;
  line-height: 1.15;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.leistung-kachel[aria-pressed="true"] {
  background: var(--brand, #0b5d8a);
  border-color: var(--brand, #0b5d8a);
  color: #fff;
}
.leistung-kachel[aria-pressed="true"] svg { color: #fff; }

/* Der kleine Haken der Kachel: Diese Leistung ist beschrieben. */
.leistung-kachel.beschrieben::after {
  content: '✓';
  position: absolute;
  top: -6px;
  left: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  background: var(--gruen);
  color: #fff;
  animation: leistung-haken 260ms cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes leistung-haken {
  from { transform: scale(0.2); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Zahl der Fotos, die schon an dieser Leistung hängen. */
.leistung-zahl {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--mono);
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--ink-soft);
}

.leistung-teile {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
}

.leistung-karte {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface-hoch);
  padding: 10px 12px 12px;
}
.leistung-karte.neu { animation: leistung-auf 320ms cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes leistung-auf {
  from { transform: translateY(-8px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.leistung-karte-kopf {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.leistung-karte-kopf svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--brand-hell);
}
.leistung-karte-kopf b {
  flex: 1;
  min-width: 0;
  font-size: 15.5px;
}
.leistung-karte .mit-diktat textarea { background: var(--surface); }

/* Das Kreuz nimmt die Leistung aus dem Blatt. Volle 44 px Trefferfläche
   (Handschuh!), der negative Rand hält den Kartenkopf optisch schlank. */
.leistung-weg {
  width: 44px;
  min-height: 44px;
  margin: -5px 0;
  padding: 0;
  flex: 0 0 auto;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 15px;
}

/* Der ERFASST-Stempel: Schildschrift, Grün, leicht verkantet — wie von Hand
   auf das Blatt geschlagen. Er erscheint beim dritten Zeichen und bleibt. */
.leistung-stempel {
  display: none;
  flex: 0 0 auto;
  font-family: var(--schrift-schild);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gruen);
  border: 2px solid var(--gruen);
  border-radius: 6px;
  padding: 0 7px;
  transform: rotate(-8deg);
}
.leistung-karte.beschrieben .leistung-stempel {
  display: inline-block;
  animation: leistung-stempeln 380ms cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes leistung-stempeln {
  from { transform: rotate(-16deg) scale(2.1); opacity: 0; }
  60% { transform: rotate(-7deg) scale(0.94); opacity: 1; }
  to { transform: rotate(-8deg) scale(1); }
}
.leistung-karte.beschrieben { border-color: var(--gruen); }

/* Die Karte klappt sichtbar weg, bevor die Liste aufräumt (bau.js wartet die
   Bewegung ab) — man sieht, WAS geht, statt dass die Liste nur kürzer wird. */
.leistung-karte.weg {
  animation: leistung-zuklappen 170ms ease-in forwards;
}
@keyframes leistung-zuklappen {
  to { opacity: 0; transform: translateY(-6px) scale(0.96); }
}

/* Das frische Foto entwickelt sich wie ein Sofortbild: erst hell und blass,
   dann Farbe. Nur das eben aufgenommene — die anderen hängen ja schon. */
.tb-foto.frisch { animation: foto-entwickeln 550ms cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes foto-entwickeln {
  from { opacity: 0; transform: scale(0.7) rotate(-4deg); filter: saturate(0.1) brightness(1.6); }
  55% { opacity: 1; filter: saturate(0.65) brightness(1.15); }
  to { transform: scale(1) rotate(0deg); filter: saturate(1) brightness(1); }
}

/* Die Kamera drückt sich wie ein Auslöser. */
.pruef-kamera { transition: transform 90ms ease, border-color 150ms ease, color 150ms ease; }
.pruef-kamera:active:not(:disabled) { transform: scale(0.94); }

/* Leseansicht: eine Zeile je Leistung, das Zeichen führt sie an. */
.leistung-lese { margin-bottom: 12px; }
.leistung-lese:last-child { margin-bottom: 0; }
.leistung-lese-kopf {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.leistung-lese-kopf svg {
  width: 20px;
  height: 20px;
  color: var(--ink-soft);
}

/* --- Schrittschalter: bedienbar mit Handschuh ----------------------------- */

.stufe {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  padding: 3px;
  border-radius: var(--radius);
  background: var(--surface-hoch);
}
.stufe button {
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--brand-hell, #4aa3d8);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}
.stufe button:disabled { color: var(--ink-soft); }
.stufe .wert {
  min-width: 32px;
  text-align: center;
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
}

/* Die festgeschriebene Ausfertigung des gesendeten Blattes — ein ruhiger
   Block-Link unter dem Siegel der Leseansicht. */
.tb-pdf {
  display: block;
  margin-top: 10px;
  font-weight: 600;
}

/* Wetter-Auswahl: eine Kachelreihe über dem Freitext (Tagesblatt, Abschnitt 1).
   Die gedrückte Kachel entspricht dem Wetterwort am Feldanfang. */
.wetter-kacheln {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.wetter-kachel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: none;
  font-size: 12px;
  color: inherit;
}
.wetter-kachel svg { width: 22px; height: 22px; }
.wetter-kachel[aria-pressed="true"] {
  border-color: var(--gruen);
  color: var(--gruen);
  background: var(--gruen-flaeche);
  font-weight: 600;
}

/* Arbeitszeit von–bis: zwei Uhrzeiten in einer Zeile (Tagesblatt, Abschnitt 1). */
.zeitspanne {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Die Arbeitszeit wird mit Handschuhen getippt, oft im Stehen. Sie steht
   darum groß und mittig in Versalziffern fester Breite — und das angetippte
   Feld wächst auf: Es zeigt, welches der beiden gerade offen ist, und gibt
   dem Daumen mehr Fläche, während die Uhr des Geräts darüber liegt. */
.zeitspanne input {
  flex: 1;
  min-width: 0;
  padding: 0 8px;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: min-height 180ms cubic-bezier(0.22, 1, 0.36, 1),
              font-size 180ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 180ms ease,
              box-shadow 180ms ease;
}

/* `.gross` setzt bau.js beim Antippen — die Uhr des Geräts nimmt den Fokus
   mitunter an ihr eigenes Rad, und dann fiele das Feld unter dem geöffneten
   Wähler wieder zusammen. `:focus` bleibt daneben stehen: für die Tastatur. */
.zeitspanne input:focus,
.zeitspanne input.gross {
  min-height: 78px;
  font-size: 28px;
  outline: none;
  border-color: var(--brand, #0b5d8a);
  box-shadow: 0 0 0 3px var(--surface-hoch);
}

/* Wer Bewegung abbestellt hat, bekommt dieselbe Größe ohne den Weg dorthin. */
@media (prefers-reduced-motion: reduce) {
  .zeitspanne input { transition: none; }
}

/* Eine Zeile je Berufsgruppe, wie im Bau-Tagesberichtsbuch: Bezeichnung,
   Anzahl, Stunden. Die Spaltenköpfe stehen einmal darüber. */
.mannkopf {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 0 6px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.mannkopf span:first-child { flex: 1; min-width: 0; }
.mannkopf span:nth-child(2) { flex: 0 0 126px; text-align: center; }
.mannkopf span:last-child { flex: 0 0 58px; text-align: center; }

.mannzeile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--rule);
}
.mannzeile:last-child { border-bottom: 0; }
.mannzeile-name { flex: 1; min-width: 0; font-size: 15px; }
.mannzeile-name span { display: block; font-size: 13px; color: var(--ink-soft); }

/* Die Stunden stehen bei ihrer Gruppe — ein gemeinsamer Wert für alle wäre
   eine Behauptung über den Polier, der länger bleibt als der Helfer. */
.mannzeile-std { flex: 0 0 58px; }
.mannzeile-std input {
  min-height: 44px;
  padding: 0 4px;
  text-align: center;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
/* Solange niemand dieser Gruppe da ist, tritt ihr Stundenfeld zurück. */
.mannzeile:not(.besetzt) .mannzeile-std input { opacity: 0.5; }

.summe {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-hoch);
  font-size: 15px;
  font-weight: 600;
}
.summe b { font-family: var(--mono); }

/* --- Fremdfirmen ---------------------------------------------------------- */

.fremdzeile {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.fremdzeile:first-child { padding-top: 0; }
.fremdzeile input { margin-bottom: 8px; }
.fremdzeile-unten { display: flex; align-items: center; gap: 12px; }
.fremdzeile-unten span { flex: 1; font-size: 13px; color: var(--ink-soft); }
.fremdzeile-weg {
  flex: 0 0 48px;
  width: 48px;
  min-height: 48px;
  padding: 0;
  color: var(--rot);
  font-size: 18px;
}

/* Eine Firma kann mehrere Gewerke haben. Dass ein Gewerk zur Firma darüber
   gehört, sagt der Strich an der linken Kante — am Handy ist er die einzige
   Zuordnung, die auch bei drei Zeilen noch trägt. */
.fremd-gewerk {
  border-left: 2px solid var(--rule);
  padding-left: 10px;
  margin-bottom: 10px;
}


/* Bei nur einem Gewerk steht dort kein ✕ (es gäbe die Firma ohne Zeile
   zurück). Der Platzhalter hält die Stufe trotzdem an ihrem Ort — sonst
   sprängen die Knöpfe, sobald ein zweites Gewerk dazukommt.
   Steht NACH `.fremdzeile-unten span`, sonst gewönne dessen flex: 1. */
.fremdzeile-unten .fremdzeile-luecke { flex: 0 0 48px; }

.fremdzeile-fuss {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Beide Knöpfe sind leise: Das Formular gehört den Feldern, nicht seiner
   Verwaltung. Die Fläche bleibt trotzdem fingergroß. */
.fremd-gewerk-neu,
.fremd-firma-weg {
  min-height: 44px;
  padding: 0 4px;
  background: none;
  border: 0;
  font-size: 14px;
}

.fremd-gewerk-neu { color: var(--gruen); }
.fremd-firma-weg { color: var(--rot); }

/* --- Sicherheits- und Sauberkeitskontrolle -------------------------------- */

.pruefgruppe { margin-bottom: 6px; }
.pruefgruppe + .pruefgruppe { margin-top: 18px; }
.pruefgruppe-kopf {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.pruefgruppe-kopf b { flex: 1; font-size: 15px; }
.pruefpunkt { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.pruefpunkt:last-child { border-bottom: 0; }
.pruefpunkt-titel { font-size: 15px; margin-bottom: 10px; }

/* Die Notiz zum Punkt steht unter der Kamera, nicht daneben: Auf 390 px
   Bildschirmbreite bliebe für beides nebeneinander weder für den Satz noch
   für das Mikrofon genug Platz. Etwas kleiner als der Titel — der Punkt führt,
   die Notiz antwortet. */
.pruefpunkt-notiz { margin: 8px 0 0; }
.pruefpunkt-notiz textarea { font-size: 15.5px; min-height: 62px; }

/* Leseansicht der Kontrolle: Status als Stempel rechts, Kommentar darunter. */
.pruefergebnis { padding: 11px 0; border-bottom: 1px solid var(--rule); }
.pruefergebnis:last-child { border-bottom: 0; }
.pruefergebnis-kopf { display: flex; align-items: flex-start; gap: 12px; }
.pruefergebnis-kopf span { flex: 1; font-size: 15px; }

/* --- Historie der Tagesblätter -------------------------------------------- */

.monat {
  font-family: var(--titel-schrift, var(--schrift-schild));
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
  padding: 14px 0 4px;
}
.monat:first-child { padding-top: 0; }

.blattzeile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px 0;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: none;
}
.blattzeile:last-child { border-bottom: 0; }
.blattzeile-tag { flex: 0 0 44px; text-align: center; }
.blattzeile-tag b {
  display: block;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}
.blattzeile-tag span {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.blattzeile-text { flex: 1; min-width: 0; font-size: 15px; }
.blattzeile-text span { display: block; font-size: 13px; color: var(--ink-soft); }
.blattzeile.luecke .blattzeile-tag b { color: var(--ink-soft); }
.blattzeile-pillen { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* --- Diktieren ------------------------------------------------------------
   Auf dem Gerüst tippt niemand einen Absatz. Jedes Freitextfeld trägt darum
   dasselbe Mikrofon rechts daneben — immer an derselben Stelle, immer gleich
   groß. Das Blatt darunter nimmt auf und zeigt den Wortlaut
   (pwa/static/js/diktat.js). */

.mit-diktat {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.mit-diktat > input,
.mit-diktat > textarea { flex: 1; min-width: 0; }

.diktat-knopf {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 12px;
  background: var(--surface-hoch);
  border: 1px solid var(--rule);
  /* Dieselbe Bedienfarbe wie jeder andere Knopf der App — das Mikrofon ist
     kein Sonderfall, sondern Bedienung. */
  color: var(--brand, #4aa3d8);
  display: grid;
  place-items: center;
}
.diktat-knopf svg { width: 24px; height: 24px; }

/* Das Blatt kommt von unten wie jedes Blatt am Handy: Der Daumen erreicht die
   Hauptaktion, ohne dass die Hand wandert. */
.diktat-blatt {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  background: rgba(8, 11, 14, 0.62);
}
.diktat-blatt[hidden] { display: none; }

.diktat-karte {
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-radius: 16px 16px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.diktat-kopf {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 17px;
}
.diktat-feld { font-size: 14px; color: var(--ink-soft); }

/* Der Aufnahmeknopf ist die eine Handlung dieses Blattes — entsprechend groß.
   Läuft die Aufnahme, wechselt er ins Rot der Statusfarben; das Blau bleibt
   dem Bedienbaren vorbehalten. */
.diktat-mikro {
  min-height: 84px;
  border-radius: 14px;
  background: var(--surface-hoch);
  border: 2px solid var(--brand, #4aa3d8);
  color: var(--brand, #4aa3d8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 700;
}
.diktat-mikro.hoert {
  background: var(--rot-flaeche);
  border-color: var(--rot);
  color: var(--rot);
}

/* Ruhezustand zeigt das Mikrofon, die laufende Aufnahme die Welle — ein Bild
   je Zustand, sonst rät man am Knopf herum. */
.diktat-mikro-zeichen { width: 28px; height: 28px; }
.diktat-mikro.hoert .diktat-mikro-zeichen { display: none; }
.diktat-mikro:not(.hoert) .diktat-welle { display: none; }

.diktat-welle {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
}
.diktat-welle i {
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
}
.diktat-mikro.hoert .diktat-welle i { animation: diktat-puls 900ms ease-in-out infinite; }
.diktat-welle i:nth-child(2) { animation-delay: 120ms; }
.diktat-welle i:nth-child(3) { animation-delay: 240ms; }
.diktat-welle i:nth-child(4) { animation-delay: 360ms; }
.diktat-welle i:nth-child(5) { animation-delay: 480ms; }

@keyframes diktat-puls {
  0%, 100% { height: 6px; }
  50% { height: 20px; }
}

.diktat-stand { font-size: 13px; color: var(--ink-soft); }
.diktat-stand.warn { color: var(--gelb); }
.diktat-stand.schlecht { color: var(--rot); }

.diktat-text {
  min-height: 62px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--ground);
  border: 1px solid var(--rule);
  font-size: 16px;
  line-height: 1.45;
}
.diktat-text.leer { color: var(--ink-soft); }

/* Der Wortlaut steht unter der Übersetzung — er geht mit ins Blatt, weil eine
   Maschine sich vergreifen kann und der Polier das Polnische nicht prüft. */
.diktat-original {
  border-left: 2px solid var(--rule);
  padding-left: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}
.diktat-original[hidden] { display: none; }

/* Die Rückfrage verlangt eine Entscheidung, sie zeigt nicht bloß etwas an —
   deshalb steht sie in einem eigenen Rahmen. Der Satz darin ist in der Sprache
   des Sprechers, groß genug, um ihn auf dem Gerüst zu lesen. */
.diktat-rueckfrage {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--ground);
}
.diktat-rueckfrage[hidden] { display: none; }
.diktat-rueck-satz { font-size: 16px; line-height: 1.45; }
.diktat-rueck-frage { font-size: 14px; color: var(--ink-soft); }
.diktat-rueck-knoepfe { display: flex; gap: 10px; }
.diktat-rueck-knoepfe button { flex: 1; }
.diktat-rueck-knoepfe button[aria-pressed="true"] {
  background: var(--brand, #0b5d8a);
  border-color: var(--brand, #0b5d8a);
  color: #fff;
  font-weight: 600;
}

/* Das gelbe Band sagt, warum gerade nicht diktiert werden kann — es steht nur
   dann da. Ein Knopf, der so tut, als hörte er zu, wäre schlimmer. */
.diktat-band {
  background: var(--gelb-flaeche);
  color: var(--gelb);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}
.diktat-band[hidden] { display: none; }

.diktat-fuss {
  display: flex;
  gap: 10px;
}
.diktat-fuss button { flex: 1; }

@media (prefers-reduced-motion: reduce) {
  .diktat-mikro.hoert .diktat-welle i { animation: none; height: 14px; }
  .leistung-karte.neu,
  .leistung-karte.weg,
  .leistung-karte.beschrieben .leistung-stempel,
  .leistung-kacheln:not(.still) .leistung-kachel,
  .tb-foto.frisch,
  .leistung-kachel.beschrieben::after { animation: none; }
  .leistung-kachel:active:not(:disabled),
  .pruef-kamera:active:not(:disabled) { transform: none; }
  #e-senden.sendet { animation: none; }
  #e-senden.sendet::after { animation: none; width: 1.2em; }
}

/* --- Blatt zum Tag: der Weg zur Arbeit -------------------------------------
   Die Baustellen-App macht mit dem Tag auf, nicht mit einer Bereichsleiste:
   wer man ist, welcher Tag, was offen ist. Die Aufgaben stehen als
   Baustellenkarten (.bs-karte) darüber; der Weg in die Baustellen ist eine
   Handlung — er steht unten rechts, wo der Daumen ohnehin liegt. */

.tages-fertig {
  color: var(--gruen);
  font-size: 15px;
  font-weight: 600;
}
.tages-fertig::before { content: '✓'; margin-right: 8px; }

.zur-arbeit {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 15;
  width: auto;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 23px;
  background: var(--brand, #0b5d8a);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
.zur-arbeit[hidden] { display: none; }
.zur-arbeit::after { content: '›'; font-size: 19px; line-height: 1; }

/* Die Zahl der laufenden Baustellen — sie sagt, was einen dort erwartet. */
.zur-arbeit-zahl {
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.zur-arbeit-zahl:empty { display: none; }

/* Schiebt sich von unten ein — `hidden` → sichtbar startet den Lauf neu. */
@keyframes bs-fab-auf {
  from { opacity: 0; transform: translateY(24px); }
}
.zur-arbeit { animation: bs-fab-auf 440ms cubic-bezier(0.34, 1.4, 0.64, 1) 220ms both; }

/* Abmelden: nur auf dem Blatt zum Tag, unten links — leiser als der Weg zur Arbeit. */
.abmelden {
  position: fixed;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 15;
  width: auto;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid currentColor;
  border-radius: 23px;
  background: var(--surface-hoch);
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  opacity: 0.85;
}
body:not([data-ansicht="uebersicht"]) .abmelden { display: none; }

/* --- Bild zum Prüfpunkt ---------------------------------------------------
   „Schutzausrüstung fehlt" ist eine Behauptung, mit Bild ein Nachweis. Die
   Kamera steht deshalb an jedem Punkt — kleiner als die Bewertung darüber,
   denn sie ist die Ausnahme, nicht die Regel. */

.pruef-fotos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.pruef-fotos .tb-foto { width: 64px; margin: 0; }
/* Das Löschkreuz ist ein Zeichen auf dem Bild, kein Knopf der App: Ohne diese
   Zeile zöge die Mindesthöhe für Touchziele es zu einer Ellipse auseinander. */
.pruef-fotos .tb-foto-weg { min-height: 0; height: 24px; width: 24px; }
.pruef-fotos .merk { flex: 1; min-width: 0; }

/* Der Weg zum Beweisfoto. Er war ein gestricheltes Feld in Grau — auf der
   Baustelle sah das nach „hier fehlt etwas" aus, nicht nach „hier drücken".
   Jetzt ein Knopf in der Marke: Zeichen im runden Feld, klare Ansage. */
.pruef-kamera {
  width: auto;
  min-height: 46px;
  padding: 0 14px 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--brand, #0b5d8a);
  background: var(--surface-hoch);
  border: 0;
  border-radius: 23px;
}
.pruef-kamera-zeichen {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand, #0b5d8a);
}
.pruef-kamera svg { width: 20px; height: 20px; }

/* In der Leseansicht steht das Bild als Beleg unter seinem Ergebnis. */
.pruefergebnis .tb-foto { width: 84px; margin: 8px 8px 0 0; display: inline-block; }

/* --- Foto markieren --------------------------------------------------------
   Vollbild über allem: oben die Ansage, in der Mitte das Bild, unten die drei
   Wege. Das Bild bekommt den ganzen freien Platz — markiert wird mit dem
   Finger, und der braucht Fläche. */

.foto-malen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #10161b;
  color: #f3f6f8;
}
.foto-malen[hidden] { display: none; }

.fm-kopf { padding: calc(14px + env(safe-area-inset-top)) 56px 10px 16px; }
.fm-kopf b { display: block; font-size: 17px; }
.fm-kopf span { font-size: 13.5px; color: #9db0bd; }

.fm-buehne {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0 12px;
}
#fm-flaeche {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  /* Ohne das schiebt der Finger die Seite, statt zu malen. */
  touch-action: none;
  cursor: crosshair;
}

.fm-fuss {
  display: flex;
  gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
}
.fm-fuss button {
  flex: 1;
  min-height: 52px;
  padding: 0 8px;
  /* Einzeilig: Ein Knopf, der umbricht, sieht nach Notlösung aus. */
  font-size: 14px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  color: #f3f6f8;
}
.fm-fuss button:disabled { opacity: 0.4; }
.fm-fuss .primaer { flex: 1.5; font-size: 15px; background: var(--brand, #0b5d8a); color: #fff; }

.fm-weg {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top));
  right: 10px;
  width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #f3f6f8;
  font-size: 18px;
}

/* --- Speichermoment --------------------------------------------------------
   Die Bestätigung nach „Blatt speichern": Schleier, Karte, gezeichneter
   Haken, heutiger Tag. bau.js füllt #speicher-moment und nimmt ihn nach
   knapp zwei Sekunden wieder weg; reduced-motion stellt app.css still. */

.speicher-moment {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 14, 17, 0.45);
  animation: moment-schleier 200ms ease both;
}
.speicher-moment[hidden] { display: none; }

.speicher-karte {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: min(320px, 86vw);
  padding: 28px 36px 26px;
  text-align: center;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  animation: moment-karte 380ms cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

.speicher-karte svg {
  width: 64px;
  height: 64px;
  margin-bottom: 10px;
  fill: none;
  stroke: var(--gruen);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Kreis und Haken zeichnen sich nacheinander — wie ein Stift, der abhakt. */
.speicher-karte circle {
  opacity: 0.35;
  stroke-dasharray: 158;
  stroke-dashoffset: 158;
  animation: moment-strich 600ms ease-out 120ms forwards;
}
.speicher-karte path {
  stroke-dasharray: 34;
  stroke-dashoffset: 34;
  animation: moment-strich 360ms cubic-bezier(0.22, 1, 0.36, 1) 520ms forwards;
}

.speicher-datum { font-size: 13.5px; color: var(--ink-soft); }
.speicher-karte b {
  font-family: var(--titel-schrift, var(--schrift-schild));
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.speicher-moment.geht { animation: moment-weg 220ms ease both; }

@keyframes moment-schleier { from { opacity: 0; } }
@keyframes moment-karte { from { opacity: 0; transform: translateY(14px) scale(0.96); } }
@keyframes moment-strich { to { stroke-dashoffset: 0; } }
@keyframes moment-weg { to { opacity: 0; } }
