/* Übungsinventur (19.11.2026) - nur bei APP_INVENTUR_UEBUNG. Dieselbe Formensprache wie die Inventur (inventur.css ist dann
   immer geladen): Farben und Maße aus app.css, eigene Klassen (ueb-). Mit dem Handy auf Armlänge, mit Handschuhen, einhändig:
   große Tippflächen (>= 56 px), eine Spalte, bei 360 px kein Querrollen - jeder Text bricht um und wird nie abgeschnitten.
   Bewegt wird nur transform und opacity. */

/* ---------------------------------------------------------------- Knopf im Inventur-Start, Abstände in der Ansicht */
#inv-uebung-knopf { margin: 0.6rem 0; }
#ansicht-uebung .inv-schirm > .knopf { margin: 0 0 0.6rem; }
#ansicht-uebung[aria-busy="true"] .knopf,
#ansicht-uebung[aria-busy="true"] .ueb-karte { opacity: 0.55; }

/* Der eine Knopf, um den es auf dem Schirm geht: höher und lauter als alles daneben */
.ueb-haupt {
  min-height: 80px;
  font-size: 1.3rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
}

/* Kamera-Knopf: EIN Tipp öffnet die Kamera-App - so groß, dass der Daumen ihn ohne Hinsehen trifft */
.ueb-foto-knopf {
  min-height: 112px;
  font-size: 1.35rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
  border: 3px solid var(--color-accent-bright);
  text-align: center;
  overflow-wrap: anywhere;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ueb-foto-da { border-color: var(--gruen); box-shadow: 0 0 0 4px var(--gruen-hauch); }

/* ---------------------------------------------------------------- Übersicht */
.ueb-bestand {
  margin: 0 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ueb-lauf { margin: 0 0 0.6rem; overflow-wrap: anywhere; }
.ueb-lauf:empty, .ueb-lese-hinweis:empty, .ueb-platz-hinweis:empty, .ueb-bilder-zeile:empty { display: none; }

/* ---------------------------------------------------------------- Karten: erfasste Sätze und Vorschläge */
.ueb-liste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; margin: 0 0 0.8rem; }
.ueb-karte {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  margin: 0;
  padding: 0.7rem 0.85rem 0.7rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-surface-line);
  background: var(--color-bg-deep);
  box-shadow: inset 4px 0 0 var(--color-accent);
  color: var(--color-text);
  font: inherit;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--duration-fast) var(--ease-out-expo);
}
.ueb-karte:active { transform: scale(0.985); }
.ueb-karte:focus-visible { outline: 3px solid var(--color-accent-bright); outline-offset: 2px; }
.ueb-karte-fremd { box-shadow: inset 4px 0 0 var(--warn); }
.ueb-karte-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; }
.ueb-zeit { font-family: var(--font-mono); font-size: 0.85rem; color: var(--color-text-muted); }
.ueb-karte-titel {
  display: block;
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.ueb-karte-zeile { display: block; margin: 0.2rem 0 0; font-size: 0.95rem; color: var(--color-text-muted); overflow-wrap: anywhere; }

/* Vorschlag: der Mensch MUSS einen antippen - jede Karte ist ein großer Knopf, keine ist hervorgehoben oder vorgewählt */
.ueb-vorschlag {
  min-height: 88px;
  padding: 0.85rem 0.9rem 0.85rem 1.1rem;
  border-width: 2px;
  border-color: var(--accent-line);
  background: var(--color-surface);
}
.ueb-vorschlag .ueb-karte-titel { margin: 0; font-size: 1.35rem; }
.ueb-vorschlag .ueb-karte-zeile { font-family: var(--font-mono); font-size: 1rem; color: var(--color-text); }

/* "Ähnlich gelesen": beide Schreibweisen untereinander in fester Zeichenbreite und in der Vergleichsform (gleich lang) -
   so steht das abweichende Zeichen genau übereinander. Hervorgehoben wird nur dieses eine Zeichen (Farbe UND Rahmen:
   nicht allein über die Farbe). */
.ueb-vergleich {
  display: grid;
  gap: 0.15rem;
  margin: 0.5rem 0 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--warn-linie);
  border-radius: var(--radius-sm);
  background: var(--warn-hauch);
}
.ueb-vergleich-zeile { display: grid; grid-template-columns: 4.6rem 1fr; align-items: baseline; gap: 0.5rem; }
.ueb-vergleich-name { font-size: 0.8rem; font-weight: 700; color: var(--color-text-muted); }
.ueb-vergleich-wert { font-family: var(--font-mono); font-size: 1.15rem; letter-spacing: 0.04em; overflow-wrap: anywhere; white-space: pre-wrap; }
.ueb-anders {
  padding: 0 0.12em;
  border: 2px solid var(--warn);
  border-radius: 3px;
  background: var(--color-surface);
  color: var(--warn);
  font-weight: 800;
}

.ueb-marken { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.45rem 0 0; }
.ueb-marke {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-sm);     /* eckiger als eine Pille: eine lange Marke bricht um und bleibt lesbar */
  border: 1px solid var(--color-surface-line);
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.ueb-marke-gut { border-color: var(--gruen-linie); background: var(--gruen-hauch); color: var(--gruen); }
.ueb-marke-warn { border-color: var(--warn-linie); background: var(--warn-hauch); color: var(--warn); }
.ueb-marke-fremd { border-color: var(--warn-linie); background: var(--warn-hauch); color: var(--warn); }

/* ---------------------------------------------------------------- Vorschlag-Schirm */
.ueb-gelesen {
  margin: 0 0 0.3rem;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.ueb-lese-hinweis { margin: 0 0 0.6rem; overflow-wrap: anywhere; }
/* "Nicht im Bestand": groß und deutlich - und zugleich die Zusage, dass die Palette trotzdem aufgenommen wird */
.ueb-nib {
  margin: 0 0 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 2px solid var(--warn-linie);
  background: var(--warn-hauch);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- Meldungen: Störung (rot), Erfolg (grün), gewählte Palette */
.ueb-stoerung {
  margin: 0 0 0.8rem;
  padding: 0.8rem;
  border-radius: var(--radius);
  border: 2px solid var(--rot-linie);
  background: var(--rot-hauch);
  overflow-wrap: anywhere;
}
.ueb-erfolg {
  margin: 0 0 0.8rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 2px solid var(--gruen-linie);
  background: var(--gruen-hauch);
  color: var(--gruen);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.ueb-gewaehlt {
  margin: 0 0 0.6rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent-line);
  background: var(--accent-faint);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ueb-fotos {
  margin: 0 0 0.6rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-surface-line);
  background: var(--color-bg-deep);
  font-size: 0.95rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ueb-platz-hinweis { margin: -0.3rem 0 0.6rem; overflow-wrap: anywhere; }
/* Solange ein Speichern ohne Antwort ist, bleibt der Stellplatz, wie er hinausging: das Feld ist sichtbar gesperrt */
#ueb-platz-feld:disabled { opacity: 0.6; }

/* ---------------------------------------------------------------- Die drei Fotos eines Satzes */
.ueb-bilder { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.8rem; margin: 0 0 0.8rem; }
.ueb-bilder-zeile { margin: 0 0 0.6rem; overflow-wrap: anywhere; }
.ueb-bild { margin: 0; }
.ueb-bild img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 120px;                 /* Platz reserviert: die Seite springt nicht, wenn das Bild kommt */
  border-radius: var(--radius);
  border: 1px solid var(--color-surface-line);
  background: #000;
}
.ueb-bild figcaption { margin: 0.3rem 0 0; font-size: 0.9rem; font-weight: 600; color: var(--color-text-muted); }

@media (prefers-reduced-motion: reduce) {
  .ueb-karte { transition: none; }
  .ueb-karte:active { transform: none; }
}

/* ---------------------------------------------------------------- Nachkontrolle des Büros (APP_INVENTUR_RANGLISTE)
   Die Rangliste selbst steht in rang.css (dieselben Klassen wie im Inventur-Start). */
.ueb-rang { margin: 1rem 0 0.6rem; }
.ueb-nk { margin: 0.6rem 0 0; }
.ueb-nk-karte { display: grid; gap: 0.3rem; cursor: default; }
.ueb-nk-knoepfe { display: grid; gap: 0.5rem; margin: 0.3rem 0 0; }
.ueb-nk .inv-meldung:empty { display: none; }
.ueb-nk-hinweis { margin: 0; }
/* Die drei Fotos klein nebeneinander (sonst wird jede Karte drei Bildschirme hoch); ein Tipp zeigt eines groß. */
.ueb-nk-fotos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; margin: 0.3rem 0; }
.ueb-nk-foto { margin: 0; }
.ueb-nk-foto-knopf {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  cursor: zoom-in;
}
.ueb-nk-foto-knopf:focus-visible { outline: 2px solid var(--color-accent-bright); outline-offset: 2px; }
.ueb-nk-foto img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); }
.ueb-nk-foto figcaption { margin: 0.2rem 0 0; font-size: 0.75rem; color: var(--color-text-muted); overflow-wrap: anywhere; }
.ueb-nk-foto-gross { grid-column: 1 / -1; }
.ueb-nk-foto-gross img { aspect-ratio: auto; object-fit: contain; }
.ueb-nk-foto-gross .ueb-nk-foto-knopf { cursor: zoom-out; }
.ueb-nk-urteil { font-weight: 700; overflow-wrap: anywhere; }
.ueb-nk-urteil-fehler { color: var(--warn); }
.ueb-nk-urteil-in_ordnung { color: var(--gruen); }
.ueb-nk-fehler { border-color: var(--warn-linie); }
.ueb-nk-in_ordnung { border-color: var(--gruen-linie); }
