.nhv-pdf-page {
  max-width: 1180px;
  margin: 28px auto;
  padding: 24px 18px 36px;
  border-radius: 16px;
  background: #0b0b0b;
  color: #f6f1e7;
}

.nhv-pdf-card {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  color: #f6f1e7;
}

.nhv-pdf-promo-modal {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  width: min(380px, calc(100vw - 28px));
  border: 1px solid #3a3428;
  border-radius: 14px;
  background: #151515;
  color: #f6f1e7;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .38);
  direction: rtl;
  text-align: right;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .18s ease, transform .18s ease;
}

.nhv-pdf-promo-modal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.nhv-pdf-promo-close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #242424;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.nhv-pdf-promo-body {
  padding: 22px;
}

.nhv-pdf-promo-body h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.45;
}

.nhv-pdf-promo-body p {
  margin: 0;
  color: #cfc5b4;
  line-height: 1.8;
}

.nhv-pdf-promo-button {
  width: 100%;
  margin-top: 16px;
}

.nhv-pdf-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 26px 0;
  margin-bottom: 24px;
}

.nhv-pdf-hero h1 {
  margin: 4px 0 8px;
  font-size: 2.05rem;
  line-height: 1.35;
  color: #fff;
}

.nhv-pdf-hero p {
  max-width: 720px;
  margin: 0;
  color: #c9c1b4;
  font-size: 1rem;
}

.nhv-pdf-kicker {
  display: inline-flex;
  color: #d6b66c;
  font-size: .9rem;
  font-weight: 700;
}

.nhv-pdf-steps {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nhv-pdf-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 132px;
  border: 1px solid #34312b;
  border-radius: 10px;
  background: #1d1b17;
  color: #f6f1e7;
  font-size: .9rem;
  font-weight: 700;
  padding: 9px 11px;
  white-space: nowrap;
}

.nhv-pdf-steps span,
.nhv-pdf-section-head > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  background: #c69b42;
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
}

.nhv-pdf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(280px, .85fr);
  gap: 20px;
}

.nhv-pdf-card {
  padding: 22px;
}

.nhv-pdf-card h2,
.nhv-pdf-card h3 {
  margin-top: 0;
  color: #fff;
}

.nhv-pdf-section-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.nhv-pdf-section-head h2 {
  margin: 0;
}

.nhv-pdf-section-head p {
  margin: 4px 0 0;
  color: #b9b0a3;
}

.nhv-pdf-search-box input,
.nhv-pdf-form-grid select,
.nhv-pdf-form-grid input,
.nhv-pdf-card textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid #343434;
  border-radius: 10px;
  background: #0f0f0f;
  color: inherit;
  padding: 12px 14px;
  box-sizing: border-box;
}

.nhv-pdf-search-box input:focus,
.nhv-pdf-form-grid select:focus {
  outline: 2px solid rgba(214, 182, 108, .24);
  border-color: #d6b66c;
}

.wrap .card textarea,
.wrap .card input,
.wrap .card select {
  color: #1d2327;
}

.nhv-pdf-search-results {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.nhv-pdf-result-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  text-align: right;
  width: 100%;
  border: 1px solid #2f2f2f;
  border-radius: 12px;
  padding: 10px;
  background: #181818;
  color: #f6f1e7;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.nhv-pdf-result-item:hover,
.nhv-pdf-result-item:focus {
  border-color: #d6b66c;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .26);
  transform: translateY(-1px);
  outline: none;
}

.nhv-pdf-result-cover {
  width: 64px;
  height: 86px;
  border-radius: 8px;
  overflow: hidden;
  background: #2a2419;
}

.nhv-pdf-result-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nhv-pdf-result-cover-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #d6b66c;
  font-weight: 800;
  font-size: .82rem;
}

.nhv-pdf-result-body {
  min-width: 0;
}

.nhv-pdf-result-item strong,
.nhv-pdf-result-item small,
.nhv-pdf-result-item span {
  display: block;
}

.nhv-pdf-result-item small {
  color: #b9b0a3;
  margin-top: 4px;
}

.nhv-pdf-result-count {
  min-width: 64px;
  border-radius: 10px;
  background: #221d14;
  padding: 8px;
  text-align: center;
}

.nhv-pdf-result-count strong {
  color: #d6b66c;
  font-size: 1.1rem;
}

.nhv-pdf-result-item.is-empty {
  display: block;
  cursor: default;
  color: #b9b0a3;
}

.nhv-pdf-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.nhv-pdf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  border: 0;
  border-radius: 10px;
  background: #d6b66c;
  color: #121212;
  font-weight: 700;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
}

.nhv-pdf-btn--ghost {
  background: #262626;
  color: #f6f1e7;
}

.nhv-pdf-btn--inline {
  margin-top: 12px;
}

.nhv-pdf-btn[disabled] {
  opacity: .65;
  cursor: not-allowed;
}

.nhv-pdf-submit-message,
.nhv-pdf-range-note {
  margin-top: 12px;
  color: #c9c1b4;
}

.nhv-pdf-submit-message.is-error,
.nhv-pdf-alert--warning {
  color: #ffb09f;
}

.nhv-pdf-submit-message.is-success {
  color: #9be3b5;
}

.nhv-pdf-alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  background: #221d14;
  color: #eadcc4;
}

.nhv-pdf-stats-list,
.nhv-pdf-bullets,
.nhv-pdf-book-meta {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.nhv-pdf-stats-list li,
.nhv-pdf-book-meta li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #2f2f2f;
  padding-bottom: 8px;
}

.nhv-pdf-vip-promo {
  margin-top: 18px;
  border: 1px solid #4b3d1f;
  border-radius: 12px;
  background: #211b10;
  padding: 14px;
}

.nhv-pdf-vip-promo strong {
  display: block;
  color: #f4d48a;
}

.nhv-pdf-vip-promo p {
  margin: 6px 0 0;
  color: #d9cdb8;
}

.nhv-pdf-selected-novel {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid #303030;
  border-radius: 12px;
  background: #1a1814;
  margin-top: 18px;
  padding: 12px;
}

.nhv-pdf-selected-novel img {
  width: 86px;
  height: 116px;
  border-radius: 8px;
  background: #2a2419;
  object-fit: cover;
}

.nhv-pdf-selected-novel img.is-empty {
  display: none;
}

.nhv-pdf-selected-novel.has-no-cover {
  grid-template-columns: 1fr;
}

.nhv-pdf-usage-agreement {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  border: 1px solid #34312b;
  border-radius: 10px;
  background: #1d1b17;
  color: #eadcc4;
  padding: 12px;
  line-height: 1.7;
}

.nhv-pdf-usage-agreement input {
  margin-top: 7px;
  flex: 0 0 auto;
}

.nhv-pdf-history-card {
  margin-top: 20px;
  border-top: 1px solid #303030;
  padding-top: 18px;
}

.nhv-pdf-history-card p {
  margin: 0 0 12px;
  color: #b9b0a3;
  font-size: .92rem;
}

.nhv-pdf-history-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nhv-pdf-history-list a {
  display: grid;
  gap: 3px;
  border: 1px solid #303030;
  border-radius: 10px;
  background: #191919;
  color: #f6f1e7;
  padding: 10px 12px;
  text-decoration: none;
}

.nhv-pdf-history-list span {
  color: #b9b0a3;
  font-size: .88rem;
}

.nhv-pdf-meta span {
  color: #d6b66c;
  font-size: .86rem;
  font-weight: 800;
}

.nhv-pdf-meta h3 {
  margin: 4px 0;
}

.nhv-pdf-meta p {
  margin: 0;
  color: #b9b0a3;
}

.nhv-pdf-novel-panel.is-hidden {
  display: none;
}

.nhv-admin-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.nhv-admin-card {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 16px;
  padding: 18px;
}

.nhv-admin-card span,
.nhv-admin-card strong {
  display: block;
}

.nhv-admin-card span {
  color: #646970;
  margin-bottom: 8px;
}

.nhv-admin-card strong {
  font-size: 1.35rem;
}

.nhv-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.nhv-inline-actions form {
  margin: 0;
}

.nhv-pdf-success-box p {
  margin: 0 0 6px;
}

.nhv-pdf-page--print {
  max-width: 980px;
}

.nhv-pdf-print-toolbar {
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: 20px;
  padding-bottom: 20px;
}

.nhv-pdf-print-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nhv-pdf-theme-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #f8f4ff;
}

.nhv-pdf-theme-btn {
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: #fff;
  padding: 8px 14px;
  cursor: pointer;
}

.nhv-pdf-theme-btn.is-active {
  background: #fff;
  color: #16101f;
}

.nhv-pdf-book {
  position: relative;
  background: #fff;
  color: #111 !important;
  font-family: Tahoma, Arial, "Segoe UI", sans-serif;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
  border-radius: 18px;
  overflow: hidden;
  direction: rtl;
  text-align: right;
}

.nhv-pdf-book h1,
.nhv-pdf-book h2,
.nhv-pdf-book h3,
.nhv-pdf-book p,
.nhv-pdf-book li,
.nhv-pdf-book span,
.nhv-pdf-book strong,
.nhv-pdf-book div {
  color: inherit !important;
}

.nhv-pdf-theme-light {
  background: #fff !important;
  color: #111 !important;
}

.nhv-pdf-theme-dark {
  background: #050505 !important;
  color: #f7f7f7 !important;
}

.nhv-pdf-book-cover::before,
.nhv-pdf-chapter::before,
.nhv-pdf-legal-block::before {
  content: attr(data-watermark);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: rgba(0, 0, 0, 0.035);
  transform: rotate(-28deg);
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}

.nhv-pdf-theme-dark .nhv-pdf-book-cover::before,
.nhv-pdf-theme-dark .nhv-pdf-chapter::before,
.nhv-pdf-theme-dark .nhv-pdf-legal-block::before {
  color: rgba(255, 255, 255, 0.045);
}

.nhv-pdf-book-cover,
.nhv-pdf-chapter,
.nhv-pdf-legal-block {
  position: relative;
  z-index: 1;
  padding: 28px;
}

.nhv-pdf-book-cover > *,
.nhv-pdf-chapter > *,
.nhv-pdf-legal-block > * {
  position: relative;
  z-index: 1;
}

.nhv-pdf-book-cover {
  background: linear-gradient(135deg, #fff6df, #f7f3ff);
}

.nhv-pdf-theme-dark .nhv-pdf-book-cover,
.nhv-pdf-theme-dark .nhv-pdf-legal-block {
  background: #0f0f12;
  border-color: #2d2d34;
}

.nhv-pdf-book-cover h1,
.nhv-pdf-chapter-header h2 {
  margin-top: 0;
}

.nhv-pdf-theme-light .nhv-pdf-chapter-header,
.nhv-pdf-theme-light .nhv-pdf-chapter-header h2,
.nhv-pdf-theme-light .nhv-pdf-chapter-header p {
  color: #111 !important;
  background: #fff !important;
}

.nhv-pdf-theme-dark .nhv-pdf-chapter-header,
.nhv-pdf-theme-dark .nhv-pdf-chapter-header h2,
.nhv-pdf-theme-dark .nhv-pdf-chapter-header p {
  color: #f7f7f7 !important;
  background: #050505 !important;
}

.nhv-pdf-legal-block {
  background: #faf7ff;
  border-top: 1px solid #eee5ff;
}

.nhv-pdf-chapter {
  border-top: 1px solid #efefef;
  page-break-after: always;
}

.nhv-pdf-theme-dark .nhv-pdf-chapter {
  border-color: #2d2d34;
}

.nhv-pdf-chapter-body p {
  line-height: 2;
  margin: 0 0 1em;
  white-space: pre-wrap;
  direction: rtl;
  text-align: right;
  unicode-bidi: isolate;
  word-break: normal;
  overflow-wrap: break-word;
}

.nhv-pdf-chapter-footer {
  border-top: 1px solid #e5e5e5;
  color: #777 !important;
  font-size: 12px;
  margin-top: 22px;
  padding-top: 10px;
  text-align: center;
}

.nhv-pdf-theme-dark .nhv-pdf-chapter-footer {
  border-color: #2d2d34;
  color: #b8b8b8 !important;
}

.no-print {
  display: block;
}

@media print {
  .no-print,
  .site-header,
  .site-footer,
  header,
  footer {
    display: none !important;
  }

  body {
    background: #fff !important;
  }

  .nhv-pdf-page,
  .nhv-pdf-card,
  .nhv-pdf-book {
    background: #fff !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  .nhv-pdf-card {
    background: #fff !important;
  }

  .nhv-pdf-theme-light {
    background: #fff !important;
    color: #111 !important;
  }

  .nhv-pdf-theme-dark {
    background: #050505 !important;
    color: #f7f7f7 !important;
  }

  .nhv-pdf-theme-dark .nhv-pdf-book-cover,
  .nhv-pdf-theme-dark .nhv-pdf-legal-block {
    background: #0f0f12 !important;
    border-color: #2d2d34 !important;
  }

  .nhv-pdf-book header,
  .nhv-pdf-book footer {
    display: block !important;
  }

  .nhv-pdf-book-cover::before,
  .nhv-pdf-chapter::before,
  .nhv-pdf-legal-block::before {
    color: rgba(0, 0, 0, 0.045) !important;
    font-size: 58px;
  }

  .nhv-pdf-theme-dark .nhv-pdf-book-cover::before,
  .nhv-pdf-theme-dark .nhv-pdf-chapter::before,
  .nhv-pdf-theme-dark .nhv-pdf-legal-block::before {
    color: rgba(255, 255, 255, 0.055) !important;
  }

  .nhv-pdf-chapter {
    page-break-after: always;
  }
}

@media (max-width: 900px) {
  .nhv-pdf-page {
    margin-top: 14px;
    padding-inline: 10px;
  }

  .nhv-pdf-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 10px;
  }

  .nhv-pdf-hero h1 {
    font-size: 1.55rem;
  }

  .nhv-pdf-steps {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nhv-pdf-steps li {
    min-width: 0;
    white-space: normal;
  }

  .nhv-pdf-grid,
  .nhv-pdf-form-grid,
  .nhv-admin-cards {
    grid-template-columns: 1fr;
  }

  .nhv-pdf-card {
    padding: 16px;
  }

  .nhv-pdf-result-item {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .nhv-pdf-result-cover {
    width: 54px;
    height: 74px;
  }

  .nhv-pdf-result-count {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 6px;
    align-items: baseline;
  }

  .nhv-pdf-selected-novel {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .nhv-pdf-selected-novel img {
    width: 68px;
    height: 92px;
  }
}
