/* Read Book: visually isolate the Automatoon referral panel. */
div:has(> .readbook-entry-button) + div {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 3.25rem) clamp(1.25rem, 5vw, 4.5rem);
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% -20%, rgba(245, 158, 11, 0.18), transparent 42%),
    linear-gradient(145deg, #100b05 0%, #060504 50%, #020202 100%) !important;
  box-shadow:
    0 28px 58px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(245, 158, 11, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

div:has(> .readbook-entry-button) + div::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    #d97706 18%,
    #fcd34d 50%,
    #f97316 82%,
    transparent
  );
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.42);
}

div:has(> .readbook-entry-button) + div::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 220px;
  height: 220px;
  right: -120px;
  bottom: -150px;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.1);
  filter: blur(8px);
}

div:has(> .readbook-entry-button) + div > h6 {
  position: relative;
  z-index: 1;
  margin-bottom: 1.15rem !important;
  color: #fbbf24 !important;
  font-size: clamp(1.05rem, 2.1vw, 1.35rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.055em;
  line-height: 1.3;
  text-shadow:
    0 3px 14px rgba(0, 0, 0, 0.64),
    0 0 18px rgba(245, 158, 11, 0.22);
}

div:has(> .readbook-entry-button) + div > p {
  position: relative;
  z-index: 1;
  color: #e5e7eb !important;
  font-size: clamp(0.82rem, 1.3vw, 0.92rem) !important;
  line-height: 1.85 !important;
}

div:has(> .readbook-entry-button) + div > p:first-of-type {
  color: #f8fafc !important;
  font-weight: 700;
}

div:has(> .readbook-entry-button) + div > label {
  position: relative;
  z-index: 1;
  color: #d7dce3 !important;
}

div:has(> .readbook-entry-button) + div > label input[type="checkbox"] {
  accent-color: #f59e0b !important;
}

div:has(> .readbook-entry-button) + div > div:last-child {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(252, 211, 77, 0.68);
  border-radius: 14px !important;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 48%, #f97316 100%) !important;
  color: #120a02 !important;
  font-weight: 900 !important;
  letter-spacing: 0.045em;
  box-shadow:
    0 13px 28px rgba(0, 0, 0, 0.38),
    0 0 22px rgba(245, 158, 11, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

div:has(> .readbook-entry-button) + div > div:last-child:hover {
  background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 50%, #ea580c 100%) !important;
  box-shadow:
    0 17px 34px rgba(0, 0, 0, 0.46),
    0 0 28px rgba(245, 158, 11, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

@media (max-width: 600px) {
  div:has(> .readbook-entry-button) + div {
    padding: 1.8rem 1rem 2rem;
    border-radius: 20px;
  }

  div:has(> .readbook-entry-button) + div > h6 {
    font-size: 1rem !important;
    letter-spacing: 0.035em;
  }

  div:has(> .readbook-entry-button) + div > p {
    font-size: 0.81rem !important;
    line-height: 1.72 !important;
  }

  div:has(> .readbook-entry-button) + div > div:last-child {
    width: 100%;
    max-width: 320px;
  }
}
