/**
 * Clip paywall sheet — shared by categories.html and videos.html.
 * Loaded after the page <style> blocks so these rules win on equal specificity.
 */

#clipPaywall .clip-paywall-backdrop {
  background:
    radial-gradient(ellipse 120% 80% at 50% 120%, rgba(200, 30, 58, .34), transparent 58%),
    rgba(6, 3, 5, .62);
  -webkit-backdrop-filter: blur(10px) saturate(1.25);
  backdrop-filter: blur(10px) saturate(1.25);
}

#clipPaywall .clip-paywall-inner {
  gap: 0;
  padding: 0;
  max-height: min(82vh, 820px);
  overflow: hidden;
  border-radius: 26px 26px 0 0;
  border: 1px solid rgba(255, 150, 175, .26);
  border-bottom: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(255, 90, 125, .22), transparent 62%),
    linear-gradient(168deg, #2a1d1f 0%, #150e10 46%, #0a0708 100%);
  box-shadow:
    0 -18px 70px rgba(0, 0, 0, .72),
    0 0 0 1px rgba(255, 255, 255, .05) inset,
    0 1px 0 rgba(255, 205, 218, .3) inset,
    0 -2px 60px rgba(200, 30, 58, .22);
}

#clipPaywall .clip-paywall-inner::before {
  height: 3px;
  background: linear-gradient(90deg, transparent, #ff6b8a 35%, #ffd0da 50%, #ff6b8a 65%, transparent);
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(255, 90, 120, .8));
}

/* Aurora sheen drifting behind the copy. */
#clipPaywall .clip-paywall-inner::after {
  content: '';
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 64%;
  pointer-events: none;
  background: linear-gradient(118deg, transparent 24%, rgba(255, 255, 255, .12) 46%, rgba(255, 120, 155, .16) 55%, transparent 76%);
  transform: rotate(-7deg);
  opacity: .7;
}

.ph-pw-scroll {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px 18px max(20px, env(safe-area-inset-bottom, 20px));
}

/* The sheet scrolls; nothing inside it is allowed to squash instead. */
.ph-pw-scroll > * { flex-shrink: 0; }

/* Soft fade so content slides under the pinned close button cleanly. */
.ph-pw-scroll {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22px, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 22px, #000 calc(100% - 18px), transparent 100%);
}

#clipPaywall .paywall-sheet-handle {
  position: relative;
  z-index: 2;
  margin: 10px auto 0;
  width: 44px;
  height: 4px;
  background: rgba(255, 220, 228, .28);
}

#clipPaywall .paywall-sheet-close {
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 212, .2);
  background: rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

#clipPaywall .clip-paywall-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: .18em;
  color: #ff9db0;
  text-shadow: 0 0 16px rgba(255, 90, 120, .5);
}

#clipPaywall .clip-paywall-title {
  font-size: clamp(24px, 6.4vw, 30px);
  line-height: 1.06;
  background: linear-gradient(180deg, #fff 0%, #ffd9e1 58%, #ff93a8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#clipPaywall .clip-paywall-sub {
  font-size: 13.5px;
  color: rgba(255, 236, 240, .74);
  margin: -2px 0 2px;
}

/* ── Price slab ──────────────────────────────────────────────────────────── */
.ph-pw-price {
  position: relative;
  overflow: hidden;
  padding: 14px 16px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 150, 175, .3);
  background:
    linear-gradient(150deg, rgba(255, 90, 125, .2) 0%, rgba(40, 12, 20, .9) 52%, rgba(14, 8, 10, .95) 100%);
  box-shadow: 0 0 30px rgba(200, 30, 58, .18), 0 1px 0 rgba(255, 210, 220, .2) inset;
}

.ph-pw-price-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.ph-pw-plan {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 235, 240, .6);
}

.ph-pw-save {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  padding: 4px 8px;
  border-radius: 999px;
  color: #1a0409;
  background: linear-gradient(135deg, #ffd0da, #ff6b8a);
  box-shadow: 0 0 16px rgba(255, 107, 138, .5);
}

.ph-pw-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.ph-pw-was {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 220, 228, .4);
  text-decoration: line-through;
}

.ph-pw-now {
  font-family: var(--font-display, 'Syne', system-ui, sans-serif);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: #fff;
  text-shadow: 0 0 26px rgba(255, 120, 150, .45);
}

.ph-pw-once {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 220, 228, .55);
}

.ph-pw-timer {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(255, 200, 212, .82);
}

.ph-pw-timer-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ff5d7e;
  box-shadow: 0 0 10px rgba(255, 93, 126, .9);
  animation: phPwPulse 1.6s ease-in-out infinite;
}

.ph-pw-timer-digits {
  font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .04em;
}

@keyframes phPwPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.8); }
}

/* ── Perk chips ──────────────────────────────────────────────────────────── */
#clipPaywall .paywall-perks,
#clipPaywall .ph-pw-perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#clipPaywall .ph-pw-perks li {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .045);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(255, 240, 244, .86);
}

#clipPaywall .ph-pw-perks li::before {
  content: '✓';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  color: #1a0409;
  background: linear-gradient(135deg, #ffd0da, #ff6b8a);
  margin: 0;
  position: static;
}

/* ── CTA ─────────────────────────────────────────────────────────────────── */
#clipPaywall .benefit-unlock-btn {
  padding: 17px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 180, 200, .45);
  background: linear-gradient(180deg, #ff7593 0%, #d62348 46%, #8e0f2c 100%);
  box-shadow:
    0 14px 40px rgba(200, 30, 58, .5),
    0 0 0 1px rgba(255, 255, 255, .12) inset,
    0 1px 0 rgba(255, 225, 232, .45) inset;
  animation: phPwBreathe 3.4s ease-in-out infinite;
}

@keyframes phPwBreathe {
  0%, 100% { box-shadow: 0 14px 40px rgba(200, 30, 58, .5), 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 1px 0 rgba(255, 225, 232, .45) inset; }
  50% { box-shadow: 0 16px 52px rgba(200, 30, 58, .7), 0 0 0 1px rgba(255, 255, 255, .2) inset, 0 1px 0 rgba(255, 225, 232, .55) inset; }
}

#clipPaywall .unlock-btn-main {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .01em;
}

#clipPaywall .unlock-btn-sub {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 235, 240, .78);
}

.ph-pw-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: -2px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: rgba(255, 226, 232, .5);
}

.ph-pw-trust span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ph-pw-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .035);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 236, 240, .62);
}

.ph-pw-proof b {
  color: #ffc2cf;
  font-weight: 800;
}
.ph-pw-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, .9);
  animation: phPwPulse 2s ease-in-out infinite;
}

/* Secondary route to the plan list — amber so it reads clearly against the red
   unlock CTA and the magenta AI block. */
#clipPaywall .paywall-ultra-link {
  margin: 2px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 196, 110, .38);
  background: rgba(255, 184, 92, .1);
  color: #ffcd8a;
  font: 800 13.5px/1.2 var(--font-body, 'Instrument Sans', system-ui, sans-serif);
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
}

#clipPaywall .paywall-ultra-link:active {
  transform: scale(.98);
  background: rgba(255, 184, 92, .16);
}

/* Free preview is a fallback, not the offer — keep it visually quiet. */
#clipPaywall .benefit-full-preview-btn {
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(160, 210, 255, .22);
  background: rgba(120, 180, 240, .08);
  box-shadow: none;
}

#clipPaywall .benefit-full-preview-btn .unlock-fp-main {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(200, 230, 255, .85);
}

#clipPaywall .benefit-full-preview-btn .unlock-fp-sub {
  font-size: 10px;
  color: rgba(200, 230, 255, .55);
}

/* The AI drop is a different product, so it gets its own magenta lane instead
   of competing with the red unlock CTA. */
#clipPaywall .benefit-bot-hero {
  border-radius: 14px;
  border: 1px solid rgba(235, 69, 159, .45);
  background:
    linear-gradient(140deg, rgba(255, 90, 168, .24) 0%, rgba(78, 14, 60, .92) 52%, rgba(18, 6, 16, .96) 100%);
  box-shadow: 0 0 28px rgba(235, 69, 159, .22), 0 1px 0 rgba(255, 190, 225, .22) inset;
}

#clipPaywall .benefit-bot-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: .16em;
  color: #2a0420;
  background: linear-gradient(135deg, #ffc2e4, #ff5aa8);
  box-shadow: 0 0 16px rgba(255, 90, 168, .5);
  margin-bottom: 10px;
}

#clipPaywall .benefit-bot-btn {
  border-radius: 12px;
  border: 1px solid rgba(255, 170, 215, .4);
  background: linear-gradient(180deg, #ff7cc0 0%, #eb459f 48%, #a92873 100%);
  box-shadow: 0 10px 28px rgba(235, 69, 159, .42), 0 1px 0 rgba(255, 210, 235, .4) inset;
  font-size: 13px;
  min-height: 46px;
}

#clipPaywall .benefit-next-btn {
  color: rgba(255, 226, 232, .42);
}

@media (min-width: 700px) {
  #clipPaywall .clip-paywall-inner {
    max-width: 440px;
    border-radius: 24px;
    border: 1px solid rgba(255, 150, 175, .26);
    max-height: min(88vh, 860px);
  }

  .ph-pw-scroll { padding: 20px 20px 20px; }
}

/* ── Free-preview HUD inside the viewer ──────────────────────────────────── */
#phFreeHud {
  position: absolute;
  /* Clears the viewer's absolute top bar (close button + category meta). */
  top: calc(env(safe-area-inset-top, 0px) + 62px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(10, 7, 8, .66);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
  pointer-events: none;
  font-family: var(--font-body, 'Instrument Sans', system-ui, sans-serif);
}

#phFreeHud.visible { display: flex; }

.ph-hud-lock {
  font-size: 12px;
  line-height: 1;
  filter: saturate(1.2);
}

.ph-hud-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 240, 244, .68);
  white-space: nowrap;
}

.ph-hud-track {
  position: relative;
  width: 58px;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, .14);
}

.ph-hud-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd0da, #ff6b8a);
  transition: width .2s linear;
}

.ph-hud-time {
  font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  min-width: 26px;
  text-align: right;
}

#phFreeHud.hot {
  border-color: rgba(255, 110, 140, .45);
  box-shadow: 0 6px 26px rgba(200, 30, 58, .45);
  animation: phHudPulse 1s ease-in-out infinite;
}

#phFreeHud.hot .ph-hud-fill { background: linear-gradient(90deg, #ff6b8a, #ff2d55); }

@keyframes phHudPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.035); }
}

/* ── Sticky unlock bar ───────────────────────────────────────────────────── */
#phUnlockBar {
  position: fixed;
  left: 12px;
  right: 12px;
  /* Clear of the phone browser toolbar / dock so the CTA is not under a thumb. */
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 150, 175, .3);
  background:
    radial-gradient(ellipse 80% 140% at 0% 50%, rgba(255, 90, 125, .28), transparent 60%),
    rgba(16, 10, 12, .9);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .05) inset;
  font-family: var(--font-body, 'Instrument Sans', system-ui, sans-serif);
  animation: phBarIn .34s cubic-bezier(.22, 1, .36, 1) both;
}

#phUnlockBar[hidden] { display: none !important; }

#phUnlockBar.ph-bar-pulse {
  animation: phBarPulse .9s ease;
}

@keyframes phBarPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-3px) scale(1.015); box-shadow: 0 18px 48px rgba(200, 30, 58, .55), 0 0 0 1px rgba(255, 255, 255, .08) inset; }
}

/* Both views: #catGrid is the category overview, .vid-grid is the clip grid. */
html.ph-has-unlock-bar #catGrid,
html.ph-has-unlock-bar .vid-grid {
  padding-bottom: 180px;
}
html.ph-has-unlock-bar .benefit-overview-footer {
  padding-bottom: 28px;
}

.ph-bar-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ph-bar-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.ph-bar-was {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 220, 228, .42);
  text-decoration: line-through;
}

.ph-bar-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 205, 216, .68);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ph-bar-sub .ph-pw-timer-digits { font-size: 11px; }

#phUnlockBarBtn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 14px;
  white-space: nowrap;
  border: 1px solid rgba(255, 180, 200, .45);
  border-radius: 13px;
  background: linear-gradient(180deg, #ff7593 0%, #d62348 48%, #8e0f2c 100%);
  color: #fff;
  font: 900 13.5px/1 var(--font-body, 'Instrument Sans', system-ui, sans-serif);
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(200, 30, 58, .45), 0 1px 0 rgba(255, 225, 232, .4) inset;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 380px) {
  #phUnlockBarBtn { padding: 0 11px; font-size: 12.5px; }
  .ph-bar-top { font-size: 12px; }
}

#phUnlockBarBtn:active { transform: scale(.97); }

#phUnlockBarX {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: rgba(255, 220, 228, .38);
  font-size: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#phUnlockBar.ph-bar-close-arm #phUnlockBarX {
  color: #fff;
  background: rgba(255, 90, 125, .4);
  border-radius: 999px;
}

@media (min-width: 768px) {
  #phUnlockBar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(640px, calc(100vw - 48px));
    bottom: 22px;
    padding: 12px 12px 12px 16px;
  }

  #phUnlockBar.ph-bar-pulse {
    animation: phBarPulseDesk .9s ease;
  }

  @keyframes phBarPulseDesk {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    35% {
      transform: translateX(-50%) translateY(-3px) scale(1.015);
      box-shadow: 0 18px 48px rgba(200, 30, 58, .55), 0 0 0 1px rgba(255, 255, 255, .08) inset;
    }
  }

  html.ph-has-unlock-bar #catGrid,
  html.ph-has-unlock-bar .vid-grid {
    padding-bottom: 120px;
  }
}

@media (max-width: 767px) {
  #clipPaywall .clip-paywall-backdrop {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(6, 3, 5, .88);
  }

  #clipPaywall .paywall-sheet-close {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(0, 0, 0, .72);
  }

  #phUnlockBar {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(16, 10, 12, .96);
  }

  body #phHopRecover {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(16, 10, 12, .96);
  }

  #midClipTease {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(12, 8, 9, .94);
  }

  html.ph-has-unlock-bar .site-foot,
  html.ph-has-unlock-bar footer {
    padding-bottom: 88px;
  }
}

/* Recover bar lives in ph-buy.js and injects its own <style> later, so these
   need the extra specificity to land. */
body #phHopRecover {
  padding: 10px 10px 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 150, 175, .3);
  background:
    radial-gradient(ellipse 80% 140% at 0% 50%, rgba(255, 90, 125, .28), transparent 60%),
    rgba(16, 10, 12, .9);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .05) inset;
}

body #phHopRecoverBtn {
  min-height: 44px;
  border: 1px solid rgba(255, 180, 200, .45);
  border-radius: 13px;
  background: linear-gradient(180deg, #ff7593 0%, #d62348 48%, #8e0f2c 100%);
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(200, 30, 58, .45), 0 1px 0 rgba(255, 225, 232, .4) inset;
}

body #phHopRecoverX { color: rgba(255, 220, 228, .38); }

/* ── Mid-clip tease ──────────────────────────────────────────────────────── */
#midClipTease {
  padding: 10px 10px 10px 13px;
  border-radius: 16px;
  border: 1px solid rgba(255, 150, 175, .3);
  background:
    radial-gradient(ellipse 70% 140% at 0% 50%, rgba(255, 90, 125, .3), transparent 62%),
    rgba(12, 8, 9, .88);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  backdrop-filter: blur(18px) saturate(1.35);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .5);
}

#midClipTease .midclip-text {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 244, 246, .92);
}

#midClipTease .midclip-sub {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 205, 216, .6);
}

#midClipTease .midclip-cta {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 11px;
  background: linear-gradient(180deg, #ff7593 0%, #d62348 48%, #8e0f2c 100%);
  box-shadow: 0 8px 22px rgba(200, 30, 58, .4), 0 1px 0 rgba(255, 225, 232, .4) inset;
}

@media (prefers-reduced-motion: reduce) {
  #clipPaywall .benefit-unlock-btn,
  #phFreeHud.hot,
  .ph-pw-timer-dot,
  .ph-pw-live-dot { animation: none; }
}
