/* test-rueckgabe.css -- [NEUE-VERSION] (Auftrag 262, Bau Auftrag 291, Fenster TB3): das Rückgabeblatt. Ein weisses A4-Blatt am Bildschirm und auf Papier, auch schwarz-weiss lesbar (Zeichen und Wort, nie nur Farbe). Keine Schrift unter 9 pt. */
.test-rueckgabe {
  position: fixed; inset: 0; z-index: 9000;
  overflow: auto; -webkit-overflow-scrolling: touch;
  background: #d9dde3; color: #111;
  font-family: Arial, Helvetica, sans-serif;
}
.tr-leiste {
  position: sticky; top: 0; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  padding: 0.5rem 1rem; background: #fff; border-bottom: 1px solid #aab;
}
.tr-knopf {
  min-height: 44px; min-width: 44px; padding: 0 1rem;
  font-size: 1rem; border: 1px solid #667; border-radius: 6px; background: #fff; color: #111; cursor: pointer;
}
.tr-knopf--haupt { background: #1f4e8c; border-color: #1f4e8c; color: #fff; }
.tr-knopf:disabled { opacity: 0.6; cursor: default; }
.tr-feld { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.95rem; }
.tr-feld select { min-height: 44px; max-width: 13rem; font-size: 1rem; color: #111; background: #fff; border: 1px solid #667; border-radius: 6px; padding: 0 0.4rem; }
.tr-feld--haken { min-height: 44px; }
.tr-feld--haken input { width: 22px; height: 22px; }
.tr-feld[hidden] { display: none; }
.tr-warnungen { flex-basis: 100%; display: flex; flex-direction: column; gap: 0.25rem; }
.tr-warnungen:empty { display: none; }
.tr-warnungen { max-height: 6.5rem; overflow-y: auto; }
.tr-warnung { margin: 0; padding: 0.3rem 0.6rem; background: #fff3c4; border: 1px solid #c9a300; border-radius: 4px; font-size: 0.9rem; }
.tr-warnung--fehler { background: #fde3e0; border-color: #b3261e; }
.tr-blaetter { padding: 1rem 0 3rem; }
.tr-leer { max-width: 40rem; margin: 2rem auto; padding: 1rem; background: #fff; border-radius: 6px; text-align: center; }
.tr-nur-lehrer { font-size: 9pt; color: #555; }

/* Das Blatt */
.tr-blatt {
  box-sizing: border-box; width: 210mm; max-width: 100%; margin: 0 auto 1rem; padding: 12mm;
  background: #fff; color: #111; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  font-size: 10.5pt; line-height: 1.35; overflow-wrap: anywhere;
}
.tr-kopf { margin-bottom: 3mm; }
.tr-schule { min-height: 10mm; }
.tr-logo { max-height: 11mm; max-width: 70mm; display: block; }
.tr-schulname { font-weight: bold; }
.tr-schulname--mit-logo { display: none; }
.tr-kopf h1 { margin: 2mm 0 1mm; font-size: 15pt; line-height: 1.2; color: #111; }
.tr-kopf__zeile { margin: 0; }
.tr-kasten { display: flex; flex-wrap: wrap; gap: 3mm; margin: 3mm 0; }
.tr-kasten__feld { flex: 1 1 30mm; padding: 2mm 3mm; border: 1px solid #667; border-radius: 3px; }
.tr-kasten__feld span:first-child { display: block; font-size: 9pt; color: #444; }
.tr-kasten__feld strong { font-size: 14pt; }
.tr-note-leer { display: inline-block; min-width: 18mm; border-bottom: 1px solid #111; }
.tr-vorlaeufig { font-size: 9pt; font-style: italic; }
.tr-hinweis { margin: 2mm 0; padding: 1.5mm 3mm; border-left: 3px solid #667; background: #f2f3f5; }
.tr-zaehlung { margin: 2mm 0 3mm; font-weight: bold; }
.tr-gut { margin: 4mm 0; font-weight: bold; }
.tr-lernziele { margin: 3mm 0; break-inside: avoid; page-break-inside: avoid; }
.tr-lernziele h2 { margin: 2mm 0 1mm; font-size: 11pt; color: #111; }
.tr-lernziele ul { margin: 0; padding-left: 5mm; }
.tr-lernziele__zahl { color: #333; }

/* Eine Aufgabe wird nie über den Seitenumbruch geteilt */
.tr-aufgaben { list-style: none; margin: 0; padding: 0; }
.tr-aufgabe {
  display: flow-root; margin: 0 0 2.5mm; padding: 2mm 3mm; border: 1px solid #99a; border-left-width: 4px; border-radius: 3px;
  break-inside: avoid; page-break-inside: avoid;
}
.tr-aufgabe--richtig { border-left-color: #1b7a3a; }
.tr-aufgabe--teilweise { border-left-color: #b07a00; }
.tr-aufgabe--falsch, .tr-aufgabe--leer { border-left-color: #b3261e; }
.tr-aufgabe--wartet { border-left-color: #667; }
.tr-aufgabe__kopf { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; align-items: baseline; margin-bottom: 1mm; }
.tr-nr { font-weight: bold; }
.tr-status { font-weight: bold; }
.tr-status--richtig { color: #1b7a3a; }
.tr-status--teilweise { color: #8a5f00; }
.tr-status--falsch, .tr-status--leer { color: #b3261e; }
.tr-status--wartet { color: #444; }
.tr-punkte { margin-left: auto; white-space: nowrap; }
.tr-frage { margin: 0.5mm 0; white-space: pre-line; }
.tr-frage__zusatz { margin: 0.5mm 0; color: #222; white-space: pre-line; }
.tr-optionen { margin: 0.5mm 0; padding-left: 5mm; }
/* Das Bild steht neben dem Text: eine Karte je Aufgabe braucht sonst doppelt so viel Papier (gemessen: 80 Aufgaben, 41 Seiten je Kind) */
.tr-bildrahmen { float: right; width: 62mm; margin: 0 0 1mm 3mm; }
.tr-bild { display: block; max-width: 100%; max-height: 52mm; height: auto; margin-left: auto; }
.tr-bild-fehlt { display: block; padding: 1mm 2mm; border: 1px dashed #667; font-size: 9pt; }
.tr-teil { margin: 0.5mm 0; }
.tr-teil__label { color: #333; }
.tr-teil__wort { color: #444; font-size: 9.5pt; }
.tr-teil__antwort { font-weight: bold; white-space: pre-line; }
.tr-teil__leer { font-style: italic; color: #444; }
.tr-marke--richtig { color: #1b7a3a; font-weight: bold; }
.tr-marke--falsch { color: #b3261e; font-weight: bold; }
.tr-richtig-waere { margin-top: 0.5mm; color: #1b4f8c; }
.tr-tipp, .tr-urteil { margin: 0.5mm 0; font-size: 9.5pt; color: #333; white-space: pre-line; }
.tr-bemerkung { margin: 4mm 0 0; break-inside: avoid; page-break-inside: avoid; }
.tr-unterschrift { margin: 8mm 0 0; break-inside: avoid; page-break-inside: avoid; }
.tr-unterschrift span { display: inline-block; width: 80mm; border-bottom: 1px solid #111; }
.tr-knopf-leiste[hidden] { display: none; }
/* [NEUE-VERSION] (Auftrag 312) Ein Blatt je Kind = eine Seite: engere Stufen, dann die Aufgaben in zwei Spalten (keine Zeile geht verloren); Aufgabe und Fuss nie getrennt */
.tr-eng .tr-aufgabe { margin-bottom: 1.2mm; padding: 1mm 2mm; }
.tr-eng .tr-kopf { margin-bottom: 1.5mm; }
.tr-eng .tr-kasten { margin: 1.5mm 0; }
.tr-eng .tr-kasten__feld { padding: 1mm 2mm; }
.tr-eng .tr-schule { min-height: 0; }
.tr-eng .tr-bemerkung { margin-top: 2mm; }
.tr-eng .tr-unterschrift { margin-top: 5mm; }
.tr-enger .bd-seite__inhalt { line-height: 1.15; font-size: 9pt; }
.tr-enger .tr-tipp, .tr-enger .tr-urteil, .tr-enger .tr-teil__wort { font-size: 9pt; }
.tr-enger .tr-kopf h1 { margin: 0.5mm 0; font-size: 13pt; }
.tr-enger .tr-kasten__feld strong { font-size: 11pt; }
.tr-enger .tr-lernziele { display: flex; gap: 3mm; }
.tr-enger .tr-lernziele__gruppe { flex: 1 1 0; min-width: 0; }
.tr-enger .tr-lernziele h2 { font-size: 9.5pt; }
.tr-enger .tr-aufgabe { margin-bottom: 0.6mm; padding: 0.5mm 1.5mm; }
.tr-enger .tr-hinweis { margin: 1mm 0; padding: 0.5mm 2mm; }
.tr-enger .tr-zaehlung { margin: 1mm 0; }
.tr-enger .tr-lernziele { margin: 1mm 0; }
.tr-enger .tr-lernziele h2 { margin: 0.5mm 0; }
.tr-enger .tr-optionen { padding: 0; }
.tr-enger .tr-optionen li { display: inline; margin-right: 3mm; }
.tr-enger .tr-bild { max-height: 32mm; }
.tr-enger .tr-bildrahmen { width: 42mm; }
.tr-zweispaltig .tr-aufgaben { column-count: 2; column-gap: 3mm; }
.tr-zweispaltig .tr-aufgabe { margin-bottom: 0.4mm; padding: 0.3mm 1mm; border-left-width: 3px; }
.tr-zweispaltig .tr-aufgabe__kopf { gap: 0 2mm; margin-bottom: 0; }
.tr-zweispaltig .tr-logo { max-height: 8mm; }
.tr-zweispaltig .tr-kasten { margin: 0.8mm 0; }
.tr-zweispaltig .tr-kasten__feld { padding: 0.4mm 2mm; }
.tr-zweispaltig .tr-frage, .tr-zweispaltig .tr-teil, .tr-zweispaltig .tr-tipp, .tr-zweispaltig .tr-urteil { margin: 0; }
.tr-zweispaltig .tr-bildrahmen { width: 30mm; }
.tr-zweispaltig .tr-bild { max-height: 24mm; }
.tr-kopf--folge { display: flex; justify-content: space-between; gap: 4mm; border-bottom: 1px solid #111; padding-bottom: 1.5mm; margin-bottom: 2mm; font-weight: bold; }
@media (max-width: 1099px) { .tr-knopf-leiste__wort { display: none; } }   /* unter 1100 px nur das Zeichen: die Reihe bleibt EINE Reihe (Höhenbudget), wie das Menü «📊» von P1 */

/* Schmale Geräte: das Blatt füllt die Breite. Nur am Bildschirm: A4 ist beim Drucken selbst schmaler als 820 px. */
@media screen and (max-width: 820px) {
  .tr-blatt { width: auto; margin: 0 0.5rem 0.75rem; padding: 4mm; }
  .tr-leiste { padding: 0.5rem; }
  .tr-bildrahmen { float: none; width: auto; margin: 1mm 0; }
  .tr-bild { margin-left: 0; }
}
@media screen { body.tr-druck-offen { overflow: hidden; } }

@media print {
  body.tr-druck-offen > *:not(#test-rueckgabe) { display: none !important; }
  .test-rueckgabe { position: static; overflow: visible; background: #fff; }
  /* [NEUE-VERSION] (Auftrag 312) nur die Blätter; der Grund der App druckt nicht mit (gemessen: grauer Streifen unter dem Fuss) */
  body.tr-druck-offen { background: #fff !important; }
  html:has(body.tr-druck-offen) { background: #fff !important; }
  .tr-leiste, .tr-nur-lehrer, .druck-hinweis, .test-rueckgabe .bd-messen, .test-rueckgabe .bd-pruefkasten { display: none !important; }
  .tr-blaetter { padding: 0; }
  .tr-blatt { width: auto; margin: 0; padding: 0; box-shadow: none; }
  .tr-blatt + .tr-blatt { break-before: page; page-break-before: always; }
  .tr-aufgabe { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
