.hre-success-card {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  box-sizing: border-box;
  text-align: center;
  background: #fff;
  border: 1px solid #e8e8ea;
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 12px 40px rgba(16, 24, 40, 0.08);
}

.hre-success-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  color: #e91e63;
  background: linear-gradient(145deg, #fff0f6 0%, #fce4ec 100%);
  box-shadow: inset 0 0 0 1px rgba(233, 30, 99, 0.12);
}

.hre-success-card__title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}

.hre-success-card__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #52525b;
}

.hre-success-card--compact {
  padding: 1.75rem 1.5rem;
  border-radius: 12px;
}

.hre-success-card--compact .hre-success-card__icon {
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1rem;
}

.hre-success-card--compact .hre-success-card__icon svg {
  width: 26px;
  height: 26px;
}

.hre-success-card--compact .hre-success-card__title {
  font-size: 1.25rem;
}

@media (max-width: 767px) {
  .hre-success-card {
    padding: 2rem 1.25rem;
    border-radius: 14px;
  }

  .hre-success-card__title {
    font-size: 1.3125rem;
  }
}

#hr-ebook-preview-section,
.hre-section {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.hre-board {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
  margin: 0 auto;
}

.hre-preview-frame {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  background: #f4f4f5;
  overflow: hidden;
}

.hre-preview-scroll {
  width: 100%;
  max-height: min(70vh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
  box-sizing: border-box;
}

.hre-page {
  width: 100%;
  background: #fff;
  margin: 0 auto 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border-radius: 4px;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.hre-page.is-skeleton {
  position: relative;
}

.hre-page:has(.hre-page-canvas) .hre-page-skeleton {
  display: none;
}

.hre-page-skeleton {
  aspect-ratio: 210 / 297;
  width: 100%;
  min-height: 280px;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
  background: linear-gradient(
    110deg,
    #ebebeb 8%,
    #f6f6f6 18%,
    #ebebeb 33%
  );
  background-size: 200% 100%;
  animation: hre-skeleton-shimmer 1.4s ease-in-out infinite;
}

.hre-page-skeleton-lines {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  opacity: 0.55;
}

.hre-page-skeleton-lines span {
  display: block;
  height: 0.65rem;
  border-radius: 4px;
  background: #d4d4d4;
}

.hre-page-skeleton-lines-short {
  width: 62%;
}

@keyframes hre-skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.hre-preview-frame.is-loading .hre-gate {
  pointer-events: none;
}

.hre-loading-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hre-page:last-child {
  margin-bottom: 0;
}

.hre-page-canvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
}

.hre-gate {
  position: relative;
  min-height: 420px;
  padding: 1.5rem;
}

.hre-gate-blur {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
  opacity: 0.85;
}

.hre-gate-fake p {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #444;
}

.hre-gate-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.72);
}

.hre-gate-card {
  width: 100%;
  max-width: 22rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  text-align: center;
}

.hre-gate-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.hre-gate-desc {
  font-size: 0.875rem;
  color: #555;
  margin: 0 0 1rem;
  line-height: 1.45;
}

.hre-field {
  text-align: left;
  margin-bottom: 0.75rem;
}

.hre-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.hre-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

.hre-field-error {
  font-size: 0.8125rem;
  color: #c41e3a;
  margin-top: 0.35rem;
}

.hre-btn {
  color: rgb(255, 255, 255);
  background-color: rgb(240, 52, 87);
  font-size: 1rem;
  font-weight: 500;
  border-width: 1px;
  border-style: solid;
  border-color: rgb(240, 52, 87);
  border-image: none;
  text-align: center;
  text-transform: capitalize;
  font-family: Manrope, sans-serif;
  line-height: 1.688rem;
  border-radius: 1111px;
  padding: 0.5rem 1.5rem;
  transition: 0.4s;
  cursor: pointer;
}
.hre-btn:hover {
  color: rgb(240, 52, 87);
  background-color: rgba(0, 0, 0, 0);
}
.hre-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hre-error-banner {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  text-align: center;
}

.hre-error-banner {
  color: #9b1c1c;
  background: #fde8e8;
}

.hre-success {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  justify-content: center;
  align-items: center;
}

#hr-ebook-preview-section.is-unlocked [data-hre-preview] {
  display: none;
}

#hr-ebook-preview-section [data-hre-success],
#hr-ebook-board [data-hre-success] {
  display: none;
}

#hr-ebook-preview-section.is-unlocked [data-hre-success],
#hr-ebook-board.is-unlocked [data-hre-success] {
  display: flex;
}

#hr-ebook-board.is-unlocked .hre-preview-frame {
  display: none;
}

.hre-field-error[hidden] {
  display: none;
}

[data-hre-error][hidden] {
  display: none;
}

.hre-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(17, 24, 39, 0.45);
}

.hre-gate-modal[hidden] {
  display: none;
}

.hre-gate-modal__panel {
  position: relative;
  width: 100%;
  max-width: 26rem;
}

.hre-gate-modal__close {
  position: absolute;
  top: -2.25rem;
  right: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
}

@media (max-width: 991px) {
  #hr-ebook-preview-section,
  .hre-section,
  .hre-board,
  #hr-ebook-board,
  .hre-preview-frame,
  .hre-preview-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hre-preview-scroll {
    max-height: min(65vh, 640px);
    padding: 0.875rem;
  }

  .hre-gate {
    min-height: 360px;
  }

  .hre-gate-card {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .hre-preview-scroll {
    max-height: min(58vh, 520px);
    padding: 0.75rem;
  }

  .hre-page {
    margin-bottom: 0.75rem;
  }

  .hre-gate {
    min-height: 300px;
    padding: 1rem;
  }

  .hre-gate-overlay {
    padding: 1rem;
  }

  .hre-gate-card {
    max-width: 100%;
    padding: 1.25rem;
  }

  .hre-gate-title {
    font-size: 1.0625rem;
  }

  .hre-gate-desc {
    font-size: 0.8125rem;
  }

  .hre-gate-modal {
    padding: 0.75rem;
    align-items: flex-end;
  }

  .hre-gate-modal__panel {
    max-width: 100%;
  }

  .hre-gate-modal__close {
    top: -2rem;
  }

  .hre-success {
    padding: 1.5rem 1rem;
  }
}

