/* Signup — library welcome + calm form stage */

.signup-stage {
  background:
    radial-gradient(ellipse 80% 55% at 0% 0%, rgba(150, 115, 72, 0.06), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(38, 61, 53, 0.04), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, var(--color-background) 45%, #fafafa 100%);
  color: var(--color-text);
}

.signup-stage-row {
  min-height: calc(100vh - var(--site-header-offset, 72px));
}

.signup-aside {
  position: relative;
  background:
    linear-gradient(145deg, #1f332c 0%, var(--color-primary) 48%, #314f44 100%);
  color: var(--color-on-primary);
  overflow: hidden;
}

.signup-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 47px,
      rgba(255, 255, 255, 0.035) 47px,
      rgba(255, 255, 255, 0.035) 48px
    );
  pointer-events: none;
  opacity: 0.7;
}

.signup-aside::after {
  content: "";
  position: absolute;
  right: 0;
  top: 8%;
  bottom: 8%;
  width: 3px;
  background: linear-gradient(
    180deg,
    transparent,
    var(--color-accent) 20%,
    #c4a06a 50%,
    var(--color-accent) 80%,
    transparent
  );
  opacity: 0.85;
}

.signup-aside-inner {
  position: relative;
  z-index: 1;
  max-width: 26rem;
  animation: signup-rise 0.55s ease both;
}

.signup-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 250, 240, 0.72);
  margin: 0;
}

.signup-heading {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 4.2vw, 3.15rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #fffdfa;
  margin: 0;
}

.signup-heading em {
  font-style: italic;
  color: #e8c992;
}

.signup-lede {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 250, 240, 0.82);
  max-width: 28ch;
}

.signup-points {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 250, 240, 0.78);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 1.35rem;
}

.signup-points li {
  position: relative;
  padding-left: 1.15rem;
}

.signup-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--color-accent);
}

.signup-main {
  animation: signup-rise 0.55s ease 0.08s both;
}

.signup-panel {
  max-width: 26.5rem;
}

.signup-panel-kicker {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0;
}

.signup-panel-title {
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-primary);
}

.signup-panel-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.signup-alert {
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  border-radius: var(--radius);
  border: 1px solid #e2b4b0;
  background: #fbf0ee;
  color: #7a2e28;
  font-size: 0.95rem;
}

.signup-alert-ok {
  border-color: #b7d4c4;
  background: #eef7f1;
  color: #2f6b4f;
}

.profile-verify-banner {
  background:
    linear-gradient(135deg, rgba(154, 59, 52, 0.12) 0%, #fbf0ee 55%),
    #fff8f7;
  border: 1px solid #e2b4b0;
  border-radius: 14px;
  padding: 1rem 1.15rem;
  box-shadow: 0 8px 22px rgba(122, 46, 40, 0.06);
}

.profile-verify-banner-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(154, 59, 52, 0.12);
  color: #9a3b34;
  font-size: 1.15rem;
}

.profile-verify-banner-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 400;
  color: #7a2e28;
  margin: 0;
}

.profile-verify-banner-text {
  font-size: 0.92rem;
  line-height: 1.45;
  color: #8a4a45;
  margin: 0;
}

.profile-verify-banner-btn {
  min-height: 2.4rem;
  padding: 0.4rem 0.95rem;
  font-size: 0.9rem;
  border-radius: 9px;
}

.profile-verify-banner-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.signup-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.35rem;
}

.signup-hint {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.signup-match.is-ok {
  color: #2f6b4f;
  font-weight: 600;
}

.signup-match.is-bad {
  color: #9a3b34;
  font-weight: 600;
}

.signup-input-wrap {
  position: relative;
}

.signup-input.form-control {
  height: 3.15rem;
  padding: 0.65rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1rem;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.signup-input-wrap .signup-input {
  padding-right: 4.25rem;
}

.signup-input.form-control::placeholder {
  color: #9a968a;
}

.signup-input.form-control:hover {
  border-color: #d2cbbd;
}

.signup-input.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(38, 61, 53, 0.14);
  background: #fff;
}

.signup-reveal {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  min-height: 2.2rem;
  padding: 0 0.7rem;
  border-radius: 7px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-primary);
  background: transparent;
  border: 0;
}

.signup-reveal:hover,
.signup-reveal:focus-visible {
  background: rgba(38, 61, 53, 0.08);
  outline: none;
}

.signup-submit {
  min-height: 3.25rem;
  border-radius: 10px;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.signup-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.signup-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signup-divider::before,
.signup-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #ddd6c8;
}

.signup-divider span {
  flex-shrink: 0;
}

.signup-footer {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.signup-footer-link {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.signup-footer-link:hover {
  color: var(--color-accent);
}

@keyframes signup-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 991.98px) {
  .signup-aside {
    min-height: auto;
    padding-top: 1.75rem !important;
    padding-bottom: 1.5rem !important;
  }

  .signup-aside::after {
    display: none;
  }

  .signup-heading {
    font-size: clamp(1.85rem, 7vw, 2.35rem);
  }

  .signup-lede {
    max-width: none;
    margin-bottom: 0 !important;
  }

  .signup-main {
    padding-top: 1.5rem !important;
  }

  .signup-stage-row {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .signup-aside-inner,
  .signup-main {
    animation: none;
  }
}

/* Hide reCAPTCHA v3 badge; disclosure text is shown on the signup form (Google requirement). */
.grecaptcha-badge {
  visibility: hidden !important;
}

.signup-recaptcha-note {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-text-muted);
}

.signup-recaptcha-note a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.verify-ok-msg {
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  border-radius: var(--radius);
  border: 1px solid #c5ddcf;
  background: #f1f7f3;
  color: #2f6b4f;
  font-size: 0.95rem;
}

.checkemail-tips {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: #f5f5f5;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.checkemail-tips li {
  position: relative;
  padding-left: 0.95rem;
}

.checkemail-tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--color-accent);
}

#btn_resend_verify:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Verify email — quiet centered box */
.verify-simple {
  min-height: calc(100vh - var(--site-header-offset, 72px));
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(150, 115, 72, 0.08), transparent 55%),
    var(--color-background);
}

.verify-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 1.75rem 1.5rem 1.6rem;
  box-shadow: 0 10px 30px rgba(36, 37, 34, 0.04);
}

.verify-box-title {
  font-family: var(--font-heading);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-primary);
  margin: 0;
}

.verify-box-title em {
  font-style: italic;
  color: var(--color-accent);
}

.verify-status {
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin: 0;
}

.verify-mark {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(38, 61, 53, 0.08);
  color: var(--color-primary);
}

.verify-mark-ok {
  background: rgba(47, 107, 79, 0.12);
  color: #2f6b4f;
}

.verify-mark-bad {
  background: rgba(154, 59, 52, 0.1);
  color: #9a3b34;
}

.verify-mark-spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 2.5px solid rgba(38, 61, 53, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: verify-spin 0.7s linear infinite;
}

.verify-mark-icon {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 700;
}

.verify-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.75rem 1.2rem;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.verify-secondary-btn:hover {
  border-color: var(--color-primary);
  background: #fff;
  color: var(--color-primary);
}

@keyframes verify-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .verify-mark-spinner {
    animation: none;
  }
}

/* Cart — abandoned items + empty shelf */
.cart-empty {
  max-width: 34rem;
}

.cart-empty-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 2rem 1.5rem 1.75rem;
  box-shadow: 0 10px 30px rgba(36, 37, 34, 0.04);
}

.cart-empty-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  background: rgba(38, 61, 53, 0.08);
  color: var(--color-primary);
  font-size: 1.35rem;
}

.cart-empty-title {
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--color-primary);
  margin: 0 0 0.65rem;
}

.cart-empty-text {
  color: var(--color-text-muted);
  line-height: 1.55;
  max-width: 28rem;
}

.cart-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 24px rgba(36, 37, 34, 0.035);
}

.cart-item-cover-wrap {
  width: 4.5rem;
}

.cart-item-cover {
  display: block;
  width: 4.5rem;
  height: 6.25rem;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: #eeeeee;
}

.cart-item-cover-empty {
  background:
    linear-gradient(145deg, rgba(38, 61, 53, 0.12), rgba(150, 115, 72, 0.18));
}

.cart-item-title {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--color-primary);
}

.cart-item-title-link {
  color: inherit;
  text-decoration: none;
}

.cart-item-title-link:hover {
  text-decoration: underline;
}

.cart-item-oneliner {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0;
  white-space: pre-line;
}

.cart-item-price .offer-price {
  font-weight: 700;
  color: var(--color-primary);
}

.cart-item-price .discount {
  font-size: 0.85rem;
  color: #2f6b4f;
  font-weight: 600;
}

.cart-finish-btn {
  white-space: nowrap;
}

/* Full-book reader — self-contained HTML in iframe */
body.reader-mode site-footer,
body.reader-mode footer.site-footer {
  display: none !important;
}

.reader-stage {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--site-header-offset, 72px));
  min-height: 24rem;
  background: #eeeeee;
}

.reader-toolbar {
  flex-shrink: 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.reader-nav-bar {
  background: rgba(255, 255, 255, 0.92);
  line-height: 1;
}

.reader-nav-row {
  --reader-ctrl-h: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.reader-nav-bar .reader-nav-control {
  height: var(--reader-ctrl-h) !important;
  min-height: var(--reader-ctrl-h) !important;
  max-height: var(--reader-ctrl-h) !important;
  padding: 0 0.5rem !important;
  margin: 0;
  font-size: 0.78rem !important;
  font-weight: 600;
  line-height: 1 !important;
  box-sizing: border-box;
  vertical-align: middle;
}

.reader-nav-bar .btn.reader-nav-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Bootstrap form-select uses a taller min-height; force same box as buttons. */
.reader-nav-bar select.reader-nav-control {
  display: block;
  width: auto;
  max-width: 14rem;
  min-width: 10rem;
  padding: 0 1.75rem 0 0.5rem !important;
  line-height: calc(var(--reader-ctrl-h) - 2px) !important;
  background-position: right 0.45rem center;
  background-size: 12px 10px;
  appearance: none;
  -webkit-appearance: none;
}

.reader-nav-bar .form-control.reader-nav-control {
  display: block;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: calc(var(--reader-ctrl-h) - 2px) !important;
}

.reader-nav-page {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: var(--reader-ctrl-h);
}

.reader-nav-page #reader-page-input {
  width: 3.4rem;
  padding-left: 0.2rem !important;
  padding-right: 0.2rem !important;
  text-align: center;
}

.reader-nav-label {
  font-size: 0.75rem;
  color: var(--color-text-muted, #6c757d);
  line-height: var(--reader-ctrl-h);
  white-space: nowrap;
}

.reader-nav-btns {
  display: inline-flex;
  align-items: stretch;
  height: var(--reader-ctrl-h);
}

.reader-nav-btns .reader-nav-control {
  min-width: var(--reader-ctrl-h);
}

.reader-nav-zoom-label {
  pointer-events: none;
  min-width: 3rem;
}

.reader-nav-sep {
  width: 1px;
  height: 18px;
  background: var(--color-border);
  flex-shrink: 0;
  align-self: center;
}

.reader-back {
  color: var(--color-primary);
  font-weight: 600;
  white-space: nowrap;
}

.reader-back:hover {
  color: var(--color-primary);
  text-decoration: underline !important;
}

.reader-title-block {
  flex: 1 1 auto;
  max-width: min(52vw, 28rem);
}

.reader-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
}

.reader-overall-rating {
  margin: 0.15rem 0 0;
  white-space: nowrap;
}

.reader-overall-rating .book-social,
.reader-overall-rating .book-card-rating {
  margin: 0;
}

.reader-overall-rating .book-rating .bi {
  color: #ffb03a;
  font-size: 0.85rem;
}

.reader-overall-rating .book-rating-value {
  font-size: 0.8rem;
}

.reader-review-link {
  color: var(--color-primary);
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.92rem;
}

.reader-review-link:hover {
  color: var(--color-primary);
  text-decoration: underline !important;
}

.reader-my-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: #ffb03a;
  font-size: 0.85rem;
  line-height: 1;
}

.review-star-picker .review-star-btn {
  border: 0;
  background: transparent;
  padding: 0.15rem;
  color: rgba(255, 176, 58, 0.35);
  font-size: 1.45rem;
  line-height: 1;
}

.review-star-picker .review-star-btn.is-on,
.review-star-picker .review-star-btn.is-on .bi {
  color: #ffb03a;
}

.review-star-picker .review-star-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.review-textarea {
  height: 140px;
  min-height: 140px;
  resize: vertical;
}

#bookReviewModal .buy-modal-submit.button.buy-primary {
  background: var(--color-primary);
  color: #fff;
  border: 0;
  font-weight: 700;
}

.review-thanks-icon-care {
  background: rgba(150, 115, 72, 0.14);
  color: #967348;
}

.reader-content-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.reader-status {
  padding: 2rem 1rem;
  text-align: center;
}

.reader-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  background: rgba(235, 230, 220, 0.88);
}

.reader-loading-overlay.d-none {
  display: none !important;
}

.reader-frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  display: block;
  background: #fff;
}
