body:has(.pdf-viewer[open]) {
  overflow: hidden;
}
.pdf-viewer {
  position: fixed;
  inset: 0;
  width: min(1200px, calc(100% - 32px));
  height: min(920px, calc(100dvh - 32px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid #ffffff32;
  border-radius: 12px;
  background: #fff;
  color: #181818;
  overflow: hidden;
}
.pdf-viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.pdf-viewer::backdrop {
  background: #000c;
}
.pdf-viewer-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 22px;
  background: #101010;
  color: #fff;
  font-family: Arial, sans-serif;
}
.pdf-viewer-label {
  font-size: 10px;
  letter-spacing: .14em;
  color: #ccc;
}
.pdf-viewer-bar h2 {
  margin: 6px 0 0;
  font: 500 clamp(15px, 2vw, 22px)/1.25 Arial, sans-serif;
  overflow-wrap: anywhere;
}
.pdf-viewer-bar a,
.pdf-viewer-bar button {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid #ffffff55;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  padding: 0 12px;
  font: 500 12px Arial, sans-serif;
  cursor: pointer;
}
.pdf-viewer-bar button {
  min-width: 44px;
  font-size: 24px;
}
.pdf-viewer iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #f3f3f3;
}
@media (max-width: 600px) {
  .pdf-viewer { width: 100%; height: 100dvh; border-radius: 0; }
  .pdf-viewer-bar { gap: 8px; padding: 12px; }
  .pdf-viewer-bar a { padding-inline: 7px; }
}
