#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), 486px);
  max-height: calc(100dvh - 20px);
  padding: 30px 28px 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: 405px;
  margin: 0 auto 18px;
  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);
  filter: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.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;
}

@media (hover: hover) and (pointer: fine) {
  .paywall-button:hover {
    border-color: #fff0c5;
    color: #14241a;
    filter: none;
    text-decoration: none;
    transform: none;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.78),
      inset 0 -3px 0 rgba(117, 73, 21, 0.24),
      0 12px 25px rgba(0, 0, 0, 0.4),
      0 0 0 2px rgba(255, 224, 160, 0.12),
      0 0 24px rgba(230, 189, 104, 0.2);
  }

  .paywall-button-secondary:hover {
    border-color: #ffe0a0;
    color: #ffe0a0;
    box-shadow:
      inset 0 1px 0 rgba(255, 238, 185, 0.16),
      0 9px 20px rgba(0, 0, 0, 0.34),
      0 0 0 2px rgba(230, 189, 104, 0.1),
      0 0 20px rgba(230, 189, 104, 0.14);
  }
}

.paywall-button:focus-visible {
  outline: 3px solid rgba(255, 224, 160, 0.78);
  outline-offset: 3px;
  filter: none;
}

.paywall-button:active {
  filter: none;
  transform: translateY(1px);
}

.paywall-actions {
  display: grid;
  gap: 10px;
  width: 100%;
  margin: 0 auto 18px;
}

.paywall-actions .paywall-button {
  width: 100%;
  height: 68px;
  min-height: 68px;
  margin: 0;
}

.paywall-button-secondary {
  border-color: rgba(230, 189, 104, 0.88);
  background:
    linear-gradient(180deg, rgba(255, 234, 176, 0.08), transparent 52%),
    linear-gradient(145deg, #0d4a32, #052c1e);
  color: #f5d58e;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 185, 0.12),
    0 9px 20px rgba(0, 0, 0, 0.34);
}

.paywall-button-secondary::before {
  content: "↻";
}

.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 19px;
}

.paywall-tree-stage {
  position: relative;
  aspect-ratio: 6 / 5;
  overflow: hidden;
  border: 1px solid rgba(230, 189, 104, 0.5);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 48%, rgba(62, 121, 78, 0.5), transparent 38%),
    linear-gradient(150deg, #0a3a27 0%, #031c13 58%, #020d09 100%);
  box-shadow:
    0 13px 28px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(217, 183, 98, 0.1);
}

.paywall-tree-stage::before,
.paywall-tree-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.paywall-tree-stage::before {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(1, 12, 8, 0.5), transparent 25%, transparent 75%, rgba(1, 12, 8, 0.5)),
    linear-gradient(180deg, transparent 38%, rgba(1, 10, 7, 0.22) 52%, rgba(1, 10, 7, 0.98) 100%);
}

.paywall-tree-stage::after {
  z-index: 4;
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.65);
}

.paywall-story-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  pointer-events: none;
  filter: saturate(0.82) brightness(0.76) contrast(1.08) sepia(0.05);
  transform: scale(1.015);
}

.paywall-story-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transform: scale(1.012);
}

.paywall-story-video[hidden] {
  display: none;
}

.paywall-tree-stage.is-video-tree .paywall-story-video {
  object-position: 63% 50%;
  filter: saturate(0.72) brightness(0.73) contrast(1.13) sepia(0.04);
}

.paywall-tree-stage.is-video-swirl .paywall-story-video {
  object-position: 50% 50%;
  filter: saturate(0.72) brightness(0.67) contrast(1.12) sepia(0.12);
}

.paywall-tree-stage.is-video-tree::before {
  background:
    linear-gradient(90deg, rgba(4, 12, 14, 0.42), transparent 31%, transparent 73%, rgba(3, 9, 10, 0.46)),
    linear-gradient(180deg, rgba(10, 20, 24, 0.03) 20%, rgba(5, 13, 14, 0.18) 52%, rgba(2, 9, 9, 0.96) 100%);
}

.paywall-tree-stage.is-video-swirl::before {
  background:
    radial-gradient(circle at 50% 43%, transparent 20%, rgba(18, 10, 7, 0.18) 58%, rgba(5, 5, 4, 0.55) 100%),
    linear-gradient(180deg, transparent 34%, rgba(30, 16, 10, 0.18) 55%, rgba(9, 7, 5, 0.97) 100%);
}

.paywall-tree-copy {
  position: absolute;
  right: 14px;
  bottom: 25px;
  left: 14px;
  z-index: 3;
  text-align: center;
}

.paywall-tree-title {
  margin: 0;
  color: #fff2cf;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(24px, 6.2vw, 33px);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.04;
  text-shadow: 0 2px 10px #000, 0 1px 2px #000;
}

.paywall-tree-title q {
  color: #ffe0a0;
  font-style: normal;
}

.paywall-tree-stage.is-video-tree .paywall-tree-copy {
  right: 16px;
  bottom: 21px;
  left: 16px;
}

.paywall-tree-stage.is-video-tree .paywall-tree-title {
  color: #edf1e7;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(20px, 5vw, 27px);
  font-weight: 600;
  letter-spacing: 0.012em;
  line-height: 1.12;
  text-shadow: 0 2px 11px rgba(0, 0, 0, 0.96), 0 1px 2px #000;
}

.paywall-tree-stage.is-video-tree .paywall-tree-title q {
  color: #d9e6e3;
}

.paywall-tree-stage.is-video-swirl .paywall-tree-copy {
  right: 16px;
  bottom: 20px;
  left: 16px;
}

.paywall-tree-stage.is-video-swirl .paywall-tree-title {
  color: #f4e0c1;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(24px, 6vw, 32px);
  font-weight: 700;
  letter-spacing: 0.004em;
  line-height: 1.04;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.98), 0 1px 2px #000;
}

.paywall-tree-stage.is-video-swirl .paywall-tree-title q {
  color: #e7b177;
}

.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 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px 9px;
  margin: 0 0 18px;
}

.paywall-benefit {
  min-height: 54px;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.paywall-benefit-icon {
  width: 42px;
  height: 42px;
  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: 42px;
  height: 42px;
  border-radius: 0;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.48));
}

.paywall-benefit strong {
  margin-bottom: 0;
  color: #f4d48b;
  font-size: 11.5px;
  line-height: 1.25;
}

.paywall-benefit small {
  display: none;
}

.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;
  text-align: center;
}

.paywall-legal-footer p {
  margin: 0;
}

.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: 34px minmax(0, 1fr);
    gap: 5px;
    padding: 0;
  }

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

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

  .paywall-benefit strong {
    font-size: 9.8px;
  }
}

@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: 48px;
    padding-top: 0;
    padding-bottom: 0;
  }
}
