#paywallModal {
  --paywall-gold: #e6bd68;
  --paywall-gold-light: #ffe0a0;
  --paywall-ink: #03150e;
  padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom));
}

.paywall-backdrop {
  background:
    radial-gradient(circle at 50% 18%, rgba(31, 76, 52, 0.32), transparent 42%),
    rgba(0, 8, 5, 0.88);
  backdrop-filter: blur(15px) saturate(0.72);
  -webkit-backdrop-filter: blur(15px) saturate(0.72);
}

.paywall-dialog {
  isolation: isolate;
  width: min(calc(100vw - 24px), 446px);
  max-height: calc(100dvh - 20px);
  padding: 30px 22px 18px;
  border: 1px solid rgba(230, 189, 104, 0.72);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% -8%, rgba(52, 116, 78, 0.28), transparent 36%),
    radial-gradient(circle at 100% 30%, rgba(211, 170, 88, 0.06), transparent 30%),
    linear-gradient(152deg, #073120 0%, #032117 54%, #02150e 100%);
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.88),
    inset 0 1px 0 rgba(255, 238, 185, 0.13),
    inset 0 0 60px rgba(0, 0, 0, 0.24),
    0 0 42px rgba(185, 142, 61, 0.13);
  scrollbar-color: rgba(230, 189, 104, 0.5) transparent;
}

.paywall-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.18;
  background:
    repeating-radial-gradient(
      ellipse at 108% 14%,
      transparent 0 20px,
      rgba(230, 189, 104, 0.18) 21px 22px,
      transparent 23px 38px
    );
  -webkit-mask-image: linear-gradient(125deg, transparent 20%, #000 85%);
  mask-image: linear-gradient(125deg, transparent 20%, #000 85%);
}

.paywall-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(210px, 64%);
  margin: 0 auto 10px;
  color: var(--paywall-gold);
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1;
}

.paywall-ornament::before,
.paywall-ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
}

.paywall-ornament::after {
  background: linear-gradient(90deg, currentColor, transparent);
}

.paywall-dialog h2 {
  max-width: 360px;
  margin: 0 auto 9px;
  color: #f5d996;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(34px, 9vw, 45px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 0.93;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.56);
}

.paywall-dialog > p {
  max-width: 350px;
  margin: 0 auto 17px;
  color: rgba(255, 244, 219, 0.82);
  font-size: 14px;
  line-height: 1.45;
}

#paywallClose {
  top: 13px;
  right: 13px;
  width: 43px;
  height: 43px;
  border: 1px solid rgba(230, 189, 104, 0.82);
  background: rgba(3, 26, 17, 0.86);
  color: #f4cc7b;
  font-family: Arial, sans-serif;
  font-size: 29px;
  font-weight: 300;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.32);
}

.paywall-button {
  grid-template-columns: 28px minmax(0, 1fr) 22px;
  gap: 8px;
  min-height: 62px;
  padding: 13px 18px;
  border: 2px solid #f5d58e;
  background:
    linear-gradient(180deg, rgba(255, 234, 176, 0.45), transparent 45%),
    linear-gradient(135deg, #dca954, #f2ca7b 52%, #d79d44);
  color: #14241a;
  font-size: 16px;
  font-weight: 900;
  text-shadow: 0 1px rgba(255, 245, 214, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -3px 0 rgba(117, 73, 21, 0.24),
    0 12px 25px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(230, 189, 104, 0.12);
}

.paywall-button::before {
  content: "▣";
  font-size: 19px;
}

.paywall-button::after {
  content: "›";
  justify-self: end;
  font-family: Georgia, serif;
  font-size: 31px;
  font-weight: 400;
  line-height: 1;
}

.paywall-button:hover {
  filter: brightness(1.04);
}

.paywall-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 10px auto 16px !important;
  color: rgba(255, 244, 219, 0.7) !important;
  font-size: 11.5px !important;
}

.paywall-security::before {
  content: "♢";
  color: var(--paywall-gold);
  font-size: 18px;
}

.paywall-promo-wrap {
  position: relative;
  margin: 0 0 15px;
}

.paywall-promo-image {
  margin: 0;
  border: 1px solid rgba(230, 189, 104, 0.5);
  border-radius: 16px;
  box-shadow:
    0 13px 28px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(217, 183, 98, 0.1);
}

.paywall-promo-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid rgba(230, 189, 104, 0.58);
  border-radius: 999px;
  background: rgba(3, 34, 22, 0.9);
  color: #f1d286;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.34);
}

.paywall-promo-tag::before {
  content: "◖";
  font-size: 18px;
}

.paywall-benefits {
  gap: 9px;
  margin: 0 0 15px;
}

.paywall-benefit {
  min-height: 90px;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 10px;
  border: 1px solid rgba(230, 189, 104, 0.28);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(13, 59, 40, 0.78), rgba(3, 27, 18, 0.86));
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 185, 0.05),
    0 8px 18px rgba(0, 0, 0, 0.16);
}

.paywall-benefit-icon {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f0c970;
  overflow: visible;
}

.paywall-benefit-icon svg {
  width: 23px;
  height: 23px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.paywall-benefit-icon img {
  width: 46px;
  height: 46px;
  border-radius: 0;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.48));
}

.paywall-benefit strong {
  margin-bottom: 5px;
  color: #f4d48b;
  font-size: 12.5px;
  line-height: 1.16;
}

.paywall-benefit small {
  color: rgba(248, 239, 218, 0.72);
  font-size: 10.5px;
  line-height: 1.35;
}

.paywall-restore-wrap {
  margin: 2px 0 0;
  padding: 13px 6px;
  border-top: 1px solid rgba(230, 189, 104, 0.3);
  border-bottom: 1px solid rgba(230, 189, 104, 0.2);
}

.paywall-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  color: #efcb79;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.paywall-link::after {
  content: "›";
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 400;
}

.paywall-legal-footer {
  margin-top: 12px;
  padding-top: 0;
  border-top: 0;
  color: rgba(239, 238, 228, 0.56);
  font-size: 9.5px;
}

.paywall-legal-footer p::before {
  content: "△  ";
  color: var(--paywall-gold);
}

.paywall-legal-links {
  gap: 5px 12px;
}

@media (max-width: 370px) {
  .paywall-dialog {
    padding: 27px 14px 15px;
  }

  .paywall-dialog h2 {
    font-size: 34px;
  }

  .paywall-benefit {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 7px;
    padding: 9px 7px;
  }

  .paywall-benefit-icon {
    width: 40px;
    height: 40px;
  }

  .paywall-benefit-icon img {
    width: 38px;
    height: 38px;
  }
}

@media (max-height: 720px) {
  .paywall-dialog {
    padding-top: 24px;
  }

  .paywall-ornament {
    margin-bottom: 6px;
  }

  .paywall-dialog h2 {
    font-size: 34px;
  }

  .paywall-dialog > p {
    margin-bottom: 12px;
    font-size: 12px;
  }

  .paywall-button {
    min-height: 54px;
  }

  .paywall-security {
    margin: 8px auto 11px !important;
  }

  .paywall-benefit {
    min-height: 74px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}
