body[data-tool^="pdf-to-"] [hidden] { display: none !important; }
body.has-reverse-file #merge-btn:not(:disabled) { background: #87187a; color: white; }
#reverse-preview .image-canvas { padding: 18px; }
#reverse-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(51vh, 620px);
  margin: auto;
  object-fit: contain;
  box-shadow: 0 3px 16px #25173120;
}
.reverse-page-nav { flex-wrap: wrap; gap: 8px; }
.reverse-page-nav strong { margin-right: auto; font-size: 13px; }
.reverse-page-nav button { border: 0; border-radius: 8px; background: #f3eaf4; color: #87187a; padding: 6px 12px; }
.reverse-page-nav button:disabled { opacity: .45; }
#reverse-page { width: 66px; padding: 5px 8px; border: 1px solid #e2d8df; border-radius: 8px; font-size: 13px; }
#reverse-total, .reverse-page-nav label { font-size: 12px; }
#reverse-preview-info { margin: 10px 0; }
#reverse-ocr-fields .tool-hint { margin-top: 7px; }
.reverse-checkbox { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; }
.reverse-checkbox input, #reverse-progress { accent-color: #87187a; }
#reverse-progress { width: 100%; height: 8px; flex-shrink: 0; }
#reverse-sample { margin: 14px 0 0; }
#reverse-sample h3 { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.reverse-table-scroll { overflow: auto; border: 1px solid #e4dde4; border-radius: 10px; }
#reverse-table { width: 100%; border-collapse: collapse; background: white; font-size: 12px; }
#reverse-table td { padding: 7px 10px; white-space: pre-wrap; border-bottom: 1px solid #ece5eb; }
#reverse-table tr:last-child td { border-bottom: 0; }
@media (max-width: 1023px) {
  #reverse-image { max-height: 52vh; }
}
@media (min-width: 768px) and (min-height: 621px) {
  /* Reserve space beneath the image for the filename in the scrollable pane. */
  #reverse-image { max-height: min(51vh, 620px, calc(100dvh - 390px)); }
}
