/* PDF bleibt in der App; der Rueckweg steht ausserhalb der Dokumentflaeche. */
#bb-pdf-dialog {
  box-sizing: border-box; position: fixed; inset: 0; margin: 0; padding: 0;
  width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none;
  border: 0; color: #163e33; background: #eef2ed; font: inherit;
  overflow: hidden;
}
#bb-pdf-dialog[open] { display: flex; flex-direction: column; }
#bb-pdf-dialog::backdrop { background: #18382fee; }
#bb-pdf-dialog * { box-sizing: border-box; }
#bb-pdf-dialog [hidden] { display: none !important; }
.bbpdf-header { flex: none; padding: max(10px, env(safe-area-inset-top)) 12px 10px;
  background: #fff; border-bottom: 1px solid #cad7cd; }
.bbpdf-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.bbpdf-title { margin: 8px 0 0; font-size: 1rem; line-height: 1.35; font-weight: 800; }
#bb-pdf-dialog button, #bb-pdf-dialog a {
  min-height: 44px; padding: 9px 13px; border: 1px solid #bbcdc0; border-radius: 12px;
  font: inherit; font-size: .9rem; font-weight: 700; background: #fff; color: #163e33;
  cursor: pointer; touch-action: manipulation; text-decoration: none;
}
#bb-pdf-dialog button:focus-visible, #bb-pdf-dialog a:focus-visible { outline: 3px solid #287351; outline-offset: 2px; }
#bb-pdf-dialog button:disabled { opacity: .45; cursor: default; }
#bb-pdf-share { background: #1a4d3e !important; color: #fff !important; }
.bbpdf-tools { flex: none; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: #f9fcf8; }
.bbpdf-group { display: flex; align-items: center; gap: 6px; }
.bbpdf-count { min-width: 82px; font-size: .84rem; text-align: center; }
.bbpdf-status { margin: 0; min-height: 1.3em; padding: 3px 12px 7px; font-size: .82rem; background: #f9fcf8; }
.bbpdf-view { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain;
  padding: 14px 12px max(14px, env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.bbpdf-sheet { width: fit-content; min-width: 100%; display: flex; justify-content: center; }
.bbpdf-sheet canvas { flex: none; display: block; background: #fff; box-shadow: 0 2px 16px #18382f22; }
.bbpdf-a11y { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: pre-wrap; }
@media (max-width: 380px) { .bbpdf-tools { justify-content: center; } #bb-pdf-dialog button { padding: 8px 10px; } }
@media print { #bb-pdf-dialog { display: none !important; } }
