/* Druck und PDF-Export: dieselbe Folienbühne wie am Bildschirm — 1440 × 810
   logische Pixel (15in × 8.4375in bei 96 dpi), eine Folie pro Seite. Die
   Bildschirmbühne steht in editor.css unter @media screen; hier steht dieselbe
   Geometrie noch einmal für Druckmedien, damit Deck-CSS und Container-Queries
   im PDF exakt so greifen wie in der Präsentation.

   Bewusst KEINE eigene .slide__content-Breite: die Regel aus core.css gilt auch
   im Druck. Genau daran ist der frühere Druckblock gescheitert — er hat der
   Folie eine Zoll-Breite aufgezwungen und damit Deck-CSS ausgehebelt.

   Diese Datei wird beim Ausliefern als LETZTES Stylesheet eingehängt
   (asset-runtime.mjs), damit sie auch gegenüber deck.css das letzte Wort hat. */
@media print {
  @page { size: 15in 8.4375in; margin: 0; }

  html, body {
    width: 1440px;
    margin: 0;
    padding: 0;
    background: var(--paper);
  }

  .progress, .deck-chrome, .overlay, .speaker-notes,
  .presentation-editor-ui, .deck-viewport-accent-edge,
  .sr-only, #liveRegion { display: none !important; }

  .deck {
    display: block !important;
    width: 1440px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .deck > section.slide {
    width: 1440px !important;
    min-width: 1440px !important;
    max-width: 1440px !important;
    height: 810px !important;
    min-height: 810px !important;
    max-height: 810px !important;
    margin: 0 !important;
    overflow: hidden !important;
    container-type: size;
    font-size: clamp(17px, 1.25cqw, 21px);
    break-inside: avoid;
    break-after: page;
    page-break-after: always;
    zoom: 1 !important;
  }

  /* Ohne diese Ausnahme hängt eine leere Seite hinten an. :last-of-type deckt
     auch Decks ab, die nach der letzten Folie noch ein anderes Element führen. */
  .deck > section.slide:last-child,
  .deck > section.slide:last-of-type { break-after: auto; page-break-after: auto; }

  .deck > section.slide > .slide__content {
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
  }

  [data-frag] { opacity: 1 !important; transform: none !important; }
  /* AR-Folie: im PDF die statische Ansicht (Startaufstellung und Bildreihe, Regeln in core.css); die Bühne gibt es im Druck nie */
  .slide--ar [data-ar-item] { break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .deck-pdf-download { display: none !important; }
  .deck-qr { display: grid; visibility: visible !important; }
  /* Grosse Text-Schatten rastert Linux-Headless-Chromium im Druck als dunkle
     Kaesten hinter dem Text (macOS-Chromium nicht) — im PDF ganz abschalten. */
  .slide, .slide * { animation: none !important; transition: none !important; text-shadow: none !important; }
}
