main:has(.page-content--manual) {
  align-items: stretch;
}

main .page-content.page-content--manual {
  max-width: none !important;
  width: calc(100vw - 8cm) !important;
  margin: 10mm 4cm 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}

.page-content--manual .page-header-row {
  margin-bottom: 5mm;
}

.manual-pdf-viewer {
  width: 100%;
  display: flex;
  flex-direction: column;
  border: 0.4mm solid var(--text-color);
  background: #fff;
}

.pdf-toolbar {
  display: flex;
  align-items: center;
  gap: 4mm;
  flex-wrap: wrap;
  padding: 3mm 4mm;
  border-bottom: 0.4mm solid var(--text-color);
  background: var(--bg-color);
  font-size: 3.2mm;
}

.pdf-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 4.5mm;
  line-height: 1;
  min-width: 8mm;
  min-height: 8mm;
  padding: 1mm 2.5mm;
  border: 0.35mm solid var(--text-color);
  background: var(--bg-color);
  color: var(--text-color);
  cursor: pointer;
}

.pdf-btn:hover:not(:disabled) {
  font-weight: bold;
}

.pdf-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pdf-page-indicator,
.pdf-zoom-indicator {
  min-width: 14mm;
  text-align: center;
  letter-spacing: 0.02em;
}

.pdf-toolbar-spacer {
  flex: 1;
}

.pdf-stage {
  width: 100%;
  height: calc(100dvh - 13rem);
  min-height: 560px;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 4mm;
  background: #fff;
}

.pdf-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  box-shadow: 0 1mm 3mm rgba(6, 6, 242, 0.12);
}

.pdf-loading {
  padding: 8mm;
  font-size: 3.5mm;
  color: var(--text-color);
}

@media (max-width: 768px) {
  main .page-content.page-content--manual {
    width: calc(100vw - 2cm) !important;
    margin: 8mm 1cm 0 !important;
    padding: 0 !important;
  }

  .pdf-stage {
    height: calc(100dvh - 15rem);
    min-height: 420px;
  }
}
