/*
 * app-ergebnis.css – Stufe 2, Bereich 3: die Ergebniskarten der App (index.html, #results) im
 * Designsystem der Landingpage.
 *
 * Gemeint ist die Ergebnisansicht AM BILDSCHIRM. Druckstücke sind ausgenommen (Entscheidung
 * Aki 01.10.26: PDF-Gestaltung erst, wenn das Website-Design fertig ist) – darum steht alles in
 * `@media screen`: Der PDF-Export druckt #results (body.results-printing) und sieht damit
 * unverändert aus. Briefkopf, Bezugszeichen und Zahlschein frieren ihre Werte zusätzlich in
 * app-landing-bruecke.css ein.
 *
 * Vorbilder (Werte von dort):
 *  - Karten: Tiefen-Sprache der Landingpage, ruhende Stufe – Verlauf im Körper #FFF → #F5F9FF,
 *    Kante rgba(18,41,77,.09), Schatten --pg-hoehe-ruhend. Dieselben Werte wie die Upload-Karte.
 *  - Abschnittsbeschriftung: .bk-eyebrow (Großbuchstaben, gesperrt, Grau) – hier 12 statt 11 px,
 *    die Zielgruppe liest viel in einer Zweitsprache.
 *  - Überschrift Brieftyp: Stufe h3 der Landingpage (700, -0.01em).
 *  - Schrittnummern: Akzentfläche wie .bk-chip--accent / .bk-benefit__icon. Bewusst NICHT das
 *    gesättigte Aktionsblau: das ist nach der Farbhierarchie des Designsystems klickbaren
 *    Aktionen vorbehalten, und die Nummern sind keine.
 *  - Kacheln mit Angaben: Rahmen ohne Füllung („Füllung ODER Rahmen“, cards.css).
 *  - Hinweise (Frist, Datum prüfen): Linien-Icon + beschrifteter Zustand, nie Farbe allein
 *    (Grundregel „keine Emoji“). Die Icons sind Lucide-Pfade als CSS-Maske – so braucht es
 *    weder neues Markup noch Änderungen an der Render-Logik.
 *
 * ⚠️ `:not(#_)` wie in app-knoepfe.css/app-upload.css: hebt über die gewachsenen App-Regeln
 * (teils im Seiten-<style> nach dieser Datei), ohne !important.
 */
@media screen {

  /* Die Ergebnisansicht beginnt unter der Leiste (top: --app-nav-h). Die Leiste ist eine
     schwebende Pille mit durchsichtigem Rand – durch den Spalt schaute die Upload-Karte der
     Eingabeseite (Umschalter „Foto oder PDF“) hindurch. visibility statt display: das Layout
     der Eingabeseite bleibt stehen, nach dem Schließen ist alles an seinem Platz. */
  body.results-open #inputSection:not(#_) { visibility: hidden; }

  /* --- Kopfzeile ------------------------------------------------------------------------- */
  .results-topbar:not(#_) {
    border-bottom-color: rgba(18, 41, 77, 0.09);
  }
  .results-topbar:not(#_) .results-page-title {
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #14181F;
  }

  /* Rechtshinweis oben (Ebene 3 des RDG-Hinweises): bleibt Hinweis-Gelb – das ist Semantik,
     keine Markenfarbe –, bekommt aber Radius und Luft der Karten. */
  .results-disclaimer:not(#_) {
    margin: 0 0 16px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.45;
  }

  /* --- Karte: ruhende Höhe ------------------------------------------------------------- */
  .rs-card:not(#_) {
    background-color: #FFFFFF;
    background-image: linear-gradient(180deg, #FFFFFF 0%, #F5F9FF 100%);
    border: 1px solid rgba(18, 41, 77, 0.09);
    border-radius: 16px;
    box-shadow: 0 6px 16px -8px rgba(18, 41, 77, 0.22);
    padding: 20px 22px;
    margin-bottom: 16px;
  }
  @media (max-width: 520px) {
    .rs-card:not(#_) { padding: 16px; }
  }

  .rs-label:not(#_) {
    margin: 0 0 10px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.06em;
    color: #646D77;
  }

  .rs-brief-type:not(#_) {
    margin: 0 0 6px;
    font-size: clamp(20px, 3.2vw, 24px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #14181F;
  }
  .rs-sender:not(#_) {
    margin: 0 0 16px;
    font-size: 1rem;
    line-height: 1.5;
    color: #3A414B;
  }
  .rs-body:not(#_) {
    font-size: 1rem;
    line-height: 1.6;
    color: #3A414B;
  }

  /* --- Angaben-Kacheln ------------------------------------------------------------------ */
  .rs-info-grid:not(#_) { gap: 10px; }
  .rs-info-cell:not(#_) {
    min-height: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(18, 41, 77, 0.10);
    background: #FFFFFF;
  }
  .rs-info-key:not(#_) {
    margin-bottom: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #646D77;
  }
  .rs-info-val:not(#_) {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: #14181F;
  }
  .rs-info-val--fine:not(#_) { color: #A83434; }   /* danger-strong, 6,4:1 auf Weiß */

  /* --- Hinweis-Karten: Frist (Gefahr) und „bitte prüfen“ (neutral) ---------------------- */
  .rs-warn-box:not(#_) {
    background-color: #FBEBEB;
    background-image: linear-gradient(180deg, #FDF3F3 0%, #FBEBEB 100%);
    border-color: #F2C7C7;
  }
  /* Fristenampel wie im Aktenkoffer (Vorgabe Aki 12.10.26): Rot nur bei höchstens 5 Tagen oder
     vergangenem Datum, Gelb bei 6 bis 14 Tagen und bei Fristen ohne festes Datum, Grün darüber. */
  .rs-warn-box.rs-warn-gelb:not(#_) {
    background-color: #FDF4E2;
    background-image: none;
    border-color: #F5DDAE;
  }
  .rs-warn-box.rs-warn-gelb:not(#_) :is(.rs-warn-title, .rs-warn-highlight) { color: #855A12; }
  .rs-warn-box.rs-warn-gruen:not(#_) {
    background-color: #E9F6EF;
    background-image: none;
    border-color: #C4E6D3;
  }
  .rs-warn-box.rs-warn-gruen:not(#_) :is(.rs-warn-title, .rs-warn-highlight) { color: #1F7A4E; }
  .rs-warn-box-neutral:not(#_) {
    background-color: #F5F9FF;
    background-image: none;
    border-color: rgba(18, 41, 77, 0.12);
  }
  .rs-warn-title:not(#_) {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #A83434;
  }
  .rs-warn-box-neutral:not(#_) .rs-warn-title { color: #3A414B; }
  .rs-warn-title:not(#_)::before {
    content: "";
    flex: none;
    width: 20px;
    height: 20px;
    background: currentColor;
    /* Lucide „clock“, Strich 1.75 */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .rs-warn-box-neutral:not(#_) .rs-warn-title::before {
    /* Lucide „info“ */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
            mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
  }
  /* „Bitte im Original prüfen“ (Entscheidung Aki 05.11.26): Liste unsicher gelesener Angaben.
     Beschriftung fett, Grund vom Modell dahinter; markierte Zahlschein-Felder im Gelb der Ampel
     (Semantik „prüfen“, keine Markenfarbe) – Rand + Fläche, nie Farbe allein: der Kasten nennt sie. */
  .rs-pruef-box:not(#_) .rs-body { margin: 0 0 8px; }
  .rs-pruef-liste:not(#_) {
    margin: 0;
    padding: 0 0 0 1.15em;
    display: grid;
    gap: 6px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #14181F;
  }
  .rs-pruef-liste:not(#_) strong { font-weight: 700; margin-inline-end: 0.25em; }
  .rs-pruef-liste:not(#_) strong::after { content: ":"; }
  .sepa-field.ist-pruefen:not(#_) {
    background: #FDF4E2;
    box-shadow: inset 0 0 0 1.5px #E2B964;
    border-radius: 6px;
  }

  .rs-warn-highlight:not(#_) {
    margin: 0 0 6px;
    font-size: clamp(22px, 3.6vw, 28px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #A83434;            /* danger-strong: 5,67:1 auf danger-soft */
  }

  /* --- Mehr Details: Aufklapper mit Linien-Chevron statt Browser-Dreieck ---------------- */
  .rs-subcard:not(#_) {
    margin-top: 14px;
    padding-top: 4px;
    border-top: 1px solid rgba(18, 41, 77, 0.09);
  }
  .rs-zusatz:not(#_) > summary {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    margin: 0;
    list-style: none;
    color: #2B5ECB;            /* klickbar = Aktionsblau */
  }
  .rs-zusatz:not(#_) > summary::-webkit-details-marker { display: none; }
  .rs-zusatz:not(#_) > summary::after {
    content: "";
    width: 16px;
    height: 16px;
    background: currentColor;
    transition: transform 150ms cubic-bezier(0.22, 0.8, 0.28, 1);
    /* Lucide „chevron-down“ */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .rs-zusatz[open]:not(#_) > summary { margin-bottom: 6px; }
  .rs-zusatz[open]:not(#_) > summary::after { transform: rotate(180deg); }
  .rs-zusatz:not(#_) > summary:hover { color: #1E4FA8; }
  .rs-zusatz:not(#_) > summary:focus-visible {
    outline: 2px solid #2B5ECB;
    outline-offset: 2px;
    border-radius: 6px;
  }

  /* --- Schritte ------------------------------------------------------------------------- */
  .rs-steps:not(#_) > li { gap: 12px; margin-bottom: 16px; }
  /* Leere Schritte blendet der Code per hidden aus; display:flex aus styles.css überstimmte das
     (Befund Aki 12.10.26: leere Kreise 1 und 3 beim Bewilligungsbescheid). */
  .rs-steps:not(#_) > li[hidden] { display: none !important; }
  .rs-steps:not(#_) > li:last-child { margin-bottom: 0; }
  .rs-step-num:not(#_) {
    width: 28px;
    height: 28px;
    line-height: 28px;
    background: #EAF1FF;
    color: #1E4FA8;
    font-size: 0.875rem;
    font-weight: 700;
  }
  /* Erste Textzeile auf die Mitte der Nummer setzen (28 px Kreis, 25,6 px Zeile). */
  .rs-step-body:not(#_) {
    padding-top: 2px;
    font-size: 1rem;
    line-height: 1.6;
    color: #3A414B;
  }
  .rs-step-body:not(#_) > p:first-child,
  .rs-opt:not(#_) > p:first-child { margin-top: 0; }
  .rs-step-body:not(#_) > p:last-child,
  .rs-opt:not(#_) > p:last-child { margin-bottom: 0; }

  .rs-step2-row:not(#_) { gap: 10px; margin-top: 0; }
  .rs-opt:not(#_) {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(18, 41, 77, 0.10);
    background: #FFFFFF;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #3A414B;
  }
  .rs-opt-b:not(#_) {
    border-color: #F2C7C7;
    background: #FDF6F6;
    box-shadow: none;
  }

  /* --- Aktionen unter den Karten ------------------------------------------------------- */
  /* Die Knöpfe selbst kommen aus app-knoepfe.css (Rollen). Hier nur die Anordnung: Vorher
     standen sie unterschiedlich breit und ohne Abstand übereinander, weil app-knoepfe.css die
     Außenabstände der Knöpfe zurücksetzt. Jetzt eine Spalte, gleiche Breite, 10 px Luft. */
  .results-download-share-stack:not(#_) {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 8px 0 16px;
  }
  .results-download-share-stack:not(#_) > button {
    width: 100%;
    justify-content: center;
    margin: 0;
  }
}

/* =========================================================================================
   „Teilen“ + Teilen-Fenster (Vorgabe Aki 12.10.26, assets/js/teilen.js)
   Unter dem Ergebnis nur noch „Teilen“ (weiß, blauer Rand – Sekundärrolle) und „Fertig“ (blau).
   Geteilt wird nur noch die PDF; „Text kopieren“ im Teilen-Fenster nutzt den früheren
   WhatsApp-Text (buildWhatsAppShareBody). Der alte WhatsApp-Knopf ist seit 17.10.26 ganz
   entfernt, der alte Mail-Knopf samt Server-Versand seit 16.10.26.
   ========================================================================================= */
/* „PDF speichern“ war seit 30.09. per hidden ausgeblendet (Entscheidung Aki), die Knopf-Regel mit display überstimmte das aber. */
.btn-antwort-print[hidden]:not(#_) { display: none !important; }

.btn-teilen:not(#_) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px;
  font: inherit; font-weight: 700; cursor: pointer;
  color: #2B5ECB; background: #FFFFFF; border: 1.5px solid #2B5ECB;
  transition: background-color 200ms cubic-bezier(0.22, 0.8, 0.28, 1), color 200ms cubic-bezier(0.22, 0.8, 0.28, 1);
}
.btn-teilen:not(#_):hover { background: #EAF1FF; color: #1E4FA8; border-color: #1E4FA8; }
.btn-teilen:not(#_):focus-visible { outline: 2px solid #2B5ECB; outline-offset: 2px; }
.btn-teilen:not(#_):active { transform: translateY(1px); }
.btn-teilen[hidden]:not(#_) { display: none !important; }
.btn-teilen-icon { display: inline-flex; }

.bk-teilen { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(23, 45, 89, 0.55); }
.bk-teilen[hidden] { display: none !important; }
.bk-teilen-karte { width: 100%; max-width: 420px; background: #FFFFFF; border-radius: 16px; padding: 18px 18px 14px;
  box-shadow: 0 18px 40px -12px rgba(18, 41, 77, 0.35); }
.bk-teilen-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.bk-teilen-kopf h3 { margin: 0; font-size: 1.125rem; color: #14181F; }
.bk-teilen-liste { display: flex; flex-direction: column; gap: 8px; }
.bk-teilen-option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 14px;
  border-radius: 12px; border: 1px solid #E2E7EE; background: #FFFFFF; color: #14181F; font: inherit; font-size: 0.9375rem;
  font-weight: 600; text-align: start; cursor: pointer; }
.bk-teilen-option svg { color: #2B5ECB; flex: none; }
.bk-teilen-option:hover { background: #EAF1FF; border-color: #B8D0FA; }
.bk-teilen-option:focus-visible { outline: 2px solid #2B5ECB; outline-offset: 2px; }
.bk-teilen-msg { margin: 10px 0 0; font-size: 0.875rem; color: #3A414B; }
.bk-teilen-msg[hidden] { display: none !important; }
.bk-teilen-msg.is-error { color: #A83434; }
.bk-teilen-msg.is-ok { color: #1F7A4E; }

/* Daten und Euro-Beträge in den Erklärungen (13.10.26, assets/js/fakten-markieren.js):
   derselbe hellblaue Marker wie .bk-mark auf der Startseite. Fläche, keine Textfarbe –
   #3F7CF0-Familie nur als Fläche (Markenregel); die Schrift bleibt dunkel. */
#rsKurz .bk-mark,
#rsZusatz .bk-mark,
#rsTranslation .bk-mark {
  background: linear-gradient(180deg, transparent 62%, var(--bk-blue-200, #D7E6FF) 62%);
  padding-inline: 2px;
  color: inherit;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* „Auf diesen Brief antworten“ / „Antwortschreiben ausblenden“: volle Breite wie der Knopf
   des Überweisungsscheins, und Luft zum Umschlag-Muster darunter (Vorgabe Aki 13.10.26). */
#btnReplyOpen:not(#_) {
  display: block;
  width: 100%;
  margin: 12px 0 0;
}
/* Beide Aufklapp-Knöpfe gleich groß: der Schein-Knopf hatte nur die Browser-Standardschrift. */
#btnSepaToggle:not(#_),
#btnReplyOpen:not(#_) {
  font-size: 0.95rem;
  padding: 12px 16px;
}
#rsTemplateBody:not([hidden]) {
  margin-top: 16px;
}

/* QR-Code oben im Zahlschein (13.10.26): mittig, weißer Grund (Ruhezone, auch im Druck). */
.sepa-qr-section { text-align: center; }
.sepa-qr-bild img { display: inline-block; max-width: 100%; height: auto; background: #FFFFFF; image-rendering: pixelated; }
.sepa-qr-text { margin: 6px 0 0; font-size: 0.95rem; font-weight: 700; color: #2B5ECB; }
.sepa-qr-fehlt { margin: 0; font-size: 0.92rem; line-height: 1.45; color: #3A414B; text-align: left; }

/* --- Originalschreiben (14.10.26, original-ansicht.js) -------------------------------------
   Ab 1200 px links fest neben der Analyse, darunter Umschalter „Erklärung | Original“.
   Nur am Bildschirm: Druck und PDF-Export zeigen nur die Analyse (Druckregel in styles.css). */
@media screen {
  /* Umschalter im Look der Sprach-Pille (bk-langtoggle der Leiste): Mulde + gleitender Knopf. */
  .bk-ansicht { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; margin-inline-start: auto;
    padding: 3px; border-radius: 999px; border: 1px solid rgba(18, 41, 77, 0.13);
    background: linear-gradient(180deg, #DFE8F8 0%, #EEF3FD 100%); box-shadow: inset 0 2px 4px rgba(18, 41, 77, 0.16); }
  .bk-ansicht[hidden] { display: none; }
  .bk-ansicht::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; z-index: 0;
    background: linear-gradient(180deg, #FFFFFF 0%, #F1F5FC 100%);
    box-shadow: 0 2px 4px rgba(18, 41, 77, 0.20), 0 1px 1px rgba(18, 41, 77, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
  .bk-ansicht--rechts::before { transform: translateX(100%); }
  [dir="rtl"] .bk-ansicht::before { left: auto; right: 3px; }
  [dir="rtl"] .bk-ansicht--rechts::before { transform: translateX(-100%); }
  .bk-ansicht__seite { position: relative; z-index: 1; min-width: 0; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
    background: transparent; cursor: pointer; font: inherit; font-size: 0.9375rem; font-weight: 600; letter-spacing: .01em; color: #646D77;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s ease-out; }
  .bk-ansicht__seite:hover, .bk-ansicht__seite--aktiv, .bk-ansicht__seite[aria-selected="true"] { color: #2B5ECB; }
  .bk-ansicht__seite:focus-visible { outline: 2px solid #2B5ECB; outline-offset: 2px; }
  @media (prefers-reduced-motion: reduce) { .bk-ansicht::before { transition: none; } }
  /* Handy (Responsiv-Audit 24.10.26): Zurück und Umschalter in EINER Zeile. Vorher stand der
     Umschalter in einer eigenen Zeile – mit der Leiste waren 219 px oben fest, bei 320 × 700 blieb
     für das Ergebnis gut die Hälfte. Die Überschrift „Ergebnis“ bleibt für Screenreader stehen,
     sichtbar sagt sie neben „Zurück“ und dem Umschalter nichts Neues. */
  @media (max-width: 767px) {
    .results-topbar:not(#_) { flex-wrap: nowrap; gap: 8px; padding-block: 8px; }
    .results-topbar:not(#_):has(> .bk-ansicht:not([hidden])) .results-page-title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
      overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
    .results-topbar:not(#_) .btn-back { flex: none; }
    .bk-ansicht:not([hidden]) { flex: 1 1 auto; min-width: 0; margin-inline-start: 0; }
    .bk-ansicht__seite { padding: 0 8px; font-size: 0.875rem; }
  }
  /* Tippfläche der Reiter auf Touch-Geräten: 36 → 44 px (24.10.26). Die Reiter selbst werden höher –
     ein unsichtbares ::after ginge nicht, sie schneiden ihren Text (Auslassungspunkte) mit
     overflow:hidden ab und damit auch jede überstehende Fläche. Umschalter 42 → 50 px. */
  @media (pointer: coarse) {
    .bk-ansicht__seite { min-height: 44px; }
  }
  /* Unter 480 px passten längere Reiter-Namen nicht („Explanation“, „Объяснение“ bei 320 px):
     Zurück als runder Pfeil-Knopf (44 px). Der Text „← Zurück“ bleibt im Knopf (font-size 0) und
     damit sein Name für Screenreader; sichtbar ist nur der Pfeil. */
  @media (max-width: 479px) {
    /* Nur Website: Die App gestaltet ihren Zurück-Knopf selbst (app.css, stärkere Regel) – dort
       stünde sonst der Pfeil doppelt. */
    html:not(.bk-app) .results-topbar:not(#_) .btn-back { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; font-size: 0;
      display: inline-flex; align-items: center; justify-content: center; }
    html:not(.bk-app) .results-topbar:not(#_) .btn-back::before { content: "\2190"; font-size: 1.25rem; line-height: 1; }
    html:not(.bk-app)[dir="rtl"] .results-topbar:not(#_) .btn-back::before { content: "\2192"; }
    .bk-ansicht__seite { padding: 0 6px; }
  }

  /* Die Ansicht: Blätter wie Papier auf der Fläche. */
  .bk-orig[hidden] { display: none !important; }
  .bk-orig__titel { margin: 4px 0 12px; font-size: 0.75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #646D77; }
  .bk-orig__status { margin: 0 0 12px; font-size: 0.95rem; color: #3A414B; }
  .bk-orig__status[hidden] { display: none; }
  .bk-orig__seiten { display: flex; flex-direction: column; gap: 18px; }
  .bk-orig__blatt { margin: 0; }
  .bk-orig__seite { display: block; width: 100%; padding: 0; border: 1px solid rgba(18, 41, 77, 0.12); border-radius: 6px; background: #fff;
    box-shadow: 0 6px 16px -8px rgba(18, 41, 77, 0.28); cursor: zoom-in; overflow: hidden; }
  .bk-orig__seite:focus-visible { outline: 3px solid #2B5ECB; outline-offset: 3px; }
  .bk-orig__seite img { display: block; width: 100%; height: auto; }
  .bk-orig__nr { display: none; margin-top: 6px; text-align: center; font-size: 0.8125rem; color: #646D77; }
  .bk-orig--mehrseitig .bk-orig__nr { display: block; }
  .bk-orig__text { white-space: pre-wrap; overflow-wrap: anywhere; background: #fff; border: 1px solid rgba(18, 41, 77, 0.12); border-radius: 6px;
    box-shadow: 0 6px 16px -8px rgba(18, 41, 77, 0.28); padding: 32px 28px; font-family: "Times New Roman", Georgia, serif; font-size: 0.9375rem; line-height: 1.55; color: #14181F; }

  /* Unter 1200 px: Reiter. „Original“ blendet die Analyse aus (die Kopfzeile bleibt stehen). */
  @media (max-width: 1199px) {
    .bk-orig { display: none; padding-bottom: 24px; }
    body.bk-orig-tab .bk-orig:not([hidden]) { display: block; }
    body.bk-orig-tab .results-shell > :not(.results-topbar):not(.bk-orig) { display: none !important; }
  }

  /* Ab 1200 px: Original links fest (eigener Scrollbereich), Analyse rechts in voller Breite (680 px). */
  @media (min-width: 1200px) {
    .bk-ansicht { display: none !important; }
    body.bk-hat-original #results {
      --orig-b: min(560px, calc(100vw - 680px - 40px - 80px));
      --orig-links: max(16px, calc((100vw - var(--orig-b) - 40px - 680px) / 2));
    }
    body.bk-hat-original .results-view.results-shell { width: 680px; max-width: 680px; margin-left: calc(var(--orig-links) + var(--orig-b) + 40px - 16px); margin-right: 0; }
    body.bk-hat-original .bk-orig:not([hidden]) {
      position: fixed; top: var(--app-nav-h, 0px); bottom: 0; left: var(--orig-links); width: var(--orig-b); z-index: 6;
      overflow-y: auto; overscroll-behavior: contain; padding: 16px 12px 32px 4px; scrollbar-gutter: stable;
    }
  }

  /* Vollbild: eigene Ebene über allem, ein Klick irgendwo schließt. */
  body.bk-orig-vollbild-offen { overflow: hidden; }
  .bk-orig-vollbild { position: fixed; inset: 0; z-index: 2147483000; overflow: auto; overscroll-behavior: contain;
    background: rgba(10, 16, 30, 0.92); display: flex; justify-content: center; align-items: flex-start; padding: 56px 16px 24px; cursor: zoom-out; }
  .bk-orig-vollbild__bild { display: block; width: min(100%, 1100px); height: auto; background: #fff; border-radius: 4px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5); }
  .bk-orig-vollbild__zu { position: fixed; top: 12px; right: 16px; width: 44px; height: 44px; border: 0; border-radius: 999px;
    background: rgba(255, 255, 255, 0.95); color: #14181F; font-size: 1.75rem; line-height: 1; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
  .bk-orig-vollbild__zu:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; }
}

/* „Fertig“ fest am unteren Rand (Responsiv-Audit 24.10.26, Befund 4, Entscheidung Aki): Am Handy stand
   der Knopf nach rund 3 500 px ganz unten – wer nicht bis zum Ende scrollte, sah ihn nie und tippte
   stattdessen oben auf die Sprache. Unter 1024 px (einspaltige Ergebnisseite) klebt er deshalb unten,
   solange das Ergebnis offen ist; #results bekommt unten Platz, damit nichts darunter verschwindet.
   #results hat bewusst kein transform (styles.css) – „fixed“ bezieht sich so auf den Bildschirm.
   Nicht in der App (eigene Gestaltung mit Tab-Leiste, app/src/app.css). */
@media screen and (max-width: 1023px) {
  html:not(.bk-app) body.results-open #results { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  html:not(.bk-app) body.results-open #archiveSaveResultBtn.btn-fertig:not([hidden]):not(#_) {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    z-index: 20;
    width: auto;
    max-width: 560px;
    margin: 0 auto;
    box-shadow: 0 10px 24px -8px rgba(18, 41, 77, 0.45), 0 0 0 6px rgba(255, 255, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.30);
  }
}

/* --- Antwortschreiben: Eingabefelder (17.11.26, offener Punkt aus Stufe 2) -------------------
   Was der Nutzer schreibt (Betreff, Stichpunkte/Text, bearbeitbares Deutsch) = .bk-input wie in den
   Dialogen (app-dialoge.css): weiß, Rahmen #8B95A3 (3:1, WCAG 1.4.11), Radius 12, 16 px Schrift
   (kein iOS-Zoom), Fokusring im Aktionsblau. Die deutsche Live-Übersetzung ist NICHT eingebbar →
   Fläche statt Rahmen („Füllung ODER Rahmen“, cards.css), damit sie nicht wie ein Feld aussieht.
   Beschriftungen wie die Abschnitts-Eyebrows dieser Datei. Nur am Bildschirm – der Druck des
   Antwortschreibens bleibt Druckstück (styles.css, body.results-printing). */
@media screen {
  #rsTemplateSection .rs-letter-field-label:not(#_) {
    margin: 0 0 8px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; color: #646D77;
  }
  #rsTemplateSection .rs-letter-input:not(#_),
  #rsTemplateSection .rs-letter-textarea:not(#_) {
    margin: 0; min-height: 48px; padding: 12px 14px;
    border: 1px solid #8B95A3; border-radius: 12px; background: #FFFFFF;
    color: #14181F; font: inherit; font-size: 1rem; line-height: 1.5;
    transition: border-color 150ms, box-shadow 150ms;
  }
  #rsTemplateSection .rs-letter-textarea:not(#_) { min-height: 160px; }
  #rsTemplateSection .rs-letter-input:not(#_):hover,
  #rsTemplateSection .rs-letter-textarea:not(#_):hover { border-color: #5F6B7A; }
  #rsTemplateSection .rs-letter-input:not(#_):focus,
  #rsTemplateSection .rs-letter-textarea:not(#_):focus {
    outline: none; border-color: #2B5ECB; box-shadow: 0 0 0 3px rgba(43, 94, 203, 0.40);
  }
  #rsTemplateSection .antwort-de-readonly:not(#_) {
    min-height: 48px; padding: 12px 14px;
    border: 1px solid rgba(18, 41, 77, 0.09); border-radius: 12px; background: #F5F9FF;
    color: #14181F; font-size: 1rem;
  }
  #rsTemplateSection .antwort-de-readonly.rs-live-de-body:not(#_) { min-height: 160px; }
  #rsTemplateSection .antwort-de-readonly.is-translating:not(#_) { color: #646D77; }
}
