/* PDF block: fixed height + own scrollbar (mobile/tablet canvas) */
@media (max-width: 1024px) {
  .article-pdf-panel.article-pdf-panel {
    overflow: hidden !important;
    max-height: none !important;
  }

  .article-pdf-viewer.article-pdf-viewer {
    display: block;
    width: 100%;
    max-height: min(62vh, 480px);
    height: min(62vh, 480px);
    overflow-x: hidden;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    isolation: isolate;
  }
}

.article-pdf-canvas-host {
  width: 100%;
  overflow: visible;
  background: #f5f5f5;
  padding: 4px 0 8px;
  box-sizing: border-box;
}

.article-pdf-canvas-host--loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.article-pdf-canvas-host--loading::after {
  content: "Загрузка PDF…";
  color: #8e919b;
  font-size: 14px;
}

.article-pdf-page-canvas {
  display: block;
  max-width: 100%;
  margin: 0 auto 10px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
  background: #fff;
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.article-pdf-page-canvas:last-child {
  margin-bottom: 4px;
}

.article-pdf-error {
  padding: 16px;
  text-align: center;
  color: #8e919b;
  font-size: 14px;
  line-height: 1.4;
}

@media (min-width: 1025px) {
  .article-pdf-canvas-host {
    display: none;
  }
}
