.page {
  display: grid;
  gap: 1.5rem;
  padding: 2rem 0 4rem;
}

.hero {
  padding-top: 0.5rem;
}

.viewerShell {
  display: flex;
  flex-direction: column;
  min-height: 72vh;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  color: #111827;
  outline: none;
}

.viewerShell:focus-visible {
  box-shadow:
    0 0 0 3px rgba(48, 162, 255, 0.25),
    0 24px 70px rgba(15, 23, 42, 0.12);
}

.viewerArea {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(48, 162, 255, 0.08), transparent 34rem),
    linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
}

.document {
  width: 100%;
  display: flex;
  justify-content: center;
}

.documentSinglePage {
  min-height: 100%;
  align-items: center;
}

.pagesRow {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
}

.pageWrapper {
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.14);
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
  flex-shrink: 0;
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.85rem 1.5rem;
  background: #ffffff;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  flex-shrink: 0;
}

.paginationCenter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.pageBtn {
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: #111827;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.pageBtn:hover:not(:disabled) {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

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

.pageInfo {
  min-width: 84px;
  text-align: center;
  color: #475569;
  font-size: 0.84rem;
}

.loadingText {
  padding: 4rem 0;
  color: #475569;
  font-size: 0.95rem;
}

.fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  gap: 1rem;
  color: #475569;
  font-size: 0.95rem;
}

.fallback a {
  color: #111827;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.mobileStack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

@media (max-width: 768px) {
  .page {
    padding-top: 1rem;
  }

  .viewerShell {
    min-height: auto;
  }

  .viewerArea {
    flex: unset;
    overflow: visible;
    background: #ffffff;
    padding: 0;
    align-items: flex-start;
  }
}
