/* ==========================================================================
   PODBOOKS.AI  Modal + Toast + Upsell Layer
   Website-styled replacements for browser alert()/confirm()/prompt()
   Shares tokens with podbooks-library.css (--lib-*, --pb-*).
   ========================================================================== */

/* ============================================================
   Modal backdrop
   ============================================================ */

.pb-modal-root {
  position: fixed; inset: 0;
  z-index: 1000;
  display: none;
  pointer-events: none;
}
.pb-modal-root.is-open { display: block; pointer-events: auto; }

.pb-modal-veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 20% 0%, rgba(63,44,20,.22) 0%, transparent 60%),
    linear-gradient(180deg, rgba(30,22,12,.55) 0%, rgba(30,22,12,.70) 100%);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  opacity: 0;
  transition: opacity .26s cubic-bezier(.22,1,.36,1);
}
.pb-modal-root.is-open .pb-modal-veil { opacity: 1; }

.pb-modal-wrap {
  position: absolute; inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 40px);
  overflow-y: auto;
}

.pb-modal {
  background: var(--lib-ivory, #FDFBF6);
  border-radius: 22px;
  box-shadow:
    0 20px 60px rgba(63,44,20,.28),
    0 1px 0 rgba(255,255,255,.9) inset,
    0 0 0 1px rgba(107,78,46,.08);
  max-width: 520px;
  width: 100%;
  overflow: hidden;
  transform: translateY(18px) scale(.96);
  opacity: 0;
  transition:
    transform .34s cubic-bezier(.22,1,.36,1),
    opacity .24s cubic-bezier(.22,1,.36,1);
  will-change: transform, opacity;
  position: relative;
}
.pb-modal-root.is-open .pb-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.pb-modal.is-wide    { max-width: 720px; }
.pb-modal.is-narrow  { max-width: 420px; }

/* Decorative literary ribbon */
.pb-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px; height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--pb-p, #F26522) 20%,
    var(--lib-wine, #7A2E1E) 50%,
    var(--pb-p, #F26522) 80%,
    transparent 100%);
  opacity: .55;
}

.pb-modal-head {
  padding: 26px 28px 8px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.pb-modal-icon {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--pb-p-tint, rgba(242,101,34,.08));
  color: var(--pb-p, #F26522);
  font-size: 20px;
  font-family: var(--lib-serif, Georgia, serif);
  font-weight: 600;
}
.pb-modal-icon.is-danger  { background: rgba(122,46,30,.10); color: var(--lib-wine, #7A2E1E); }
.pb-modal-icon.is-success { background: rgba(79,107,74,.12); color: var(--lib-moss, #4F6B4A); }
.pb-modal-icon.is-info    { background: rgba(127,168,198,.16); color: var(--lib-sky, #7FA8C6); }

.pb-modal-title {
  font-family: var(--lib-serif, 'Iowan Old Style', Georgia, serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -.01em;
  color: var(--lib-ink, #1F1A15);
  margin: 0;
  flex: 1;
}

.pb-modal-close {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--lib-ink-3, #7A6B58);
  cursor: pointer;
  transition: all .18s ease;
}
.pb-modal-close:hover {
  background: var(--lib-paper-2, #F6EFE5);
  color: var(--lib-ink, #1F1A15);
  border-color: var(--lib-paper-3, #EFE6D6);
}

.pb-modal-body {
  padding: 6px 28px 20px;
  color: var(--lib-ink-2, #4A3F33);
  font-size: 14.5px;
  line-height: 1.55;
}
.pb-modal-body p { margin: 0 0 10px; }
.pb-modal-body p:last-child { margin-bottom: 0; }

.pb-modal-body em {
  font-family: var(--lib-serif);
  color: var(--lib-cocoa, #6B4E2E);
  font-style: italic;
  font-weight: 500;
}

.pb-modal-input-wrap { margin-top: 14px; }
.pb-modal-input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--lib-sans, inherit);
  font-size: 14px;
  color: var(--lib-ink, #1F1A15);
  background: var(--lib-paper, #FBF7F1);
  border: 1px solid var(--lib-paper-3, #EFE6D6);
  border-radius: 12px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.pb-modal-input:focus {
  border-color: var(--pb-p, #F26522);
  box-shadow: 0 0 0 3px rgba(242,101,34,.14);
}

.pb-modal-foot {
  padding: 14px 22px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.pb-modal-foot.is-start { justify-content: flex-start; }

.pb-mbtn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--lib-ink-2, #4A3F33);
  font-family: var(--lib-sans, inherit);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: .01em;
  padding: 10px 18px;
  border-radius: 11px;
  cursor: pointer;
  transition: all .18s cubic-bezier(.22,1,.36,1);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  line-height: 1;
}
.pb-mbtn:hover {
  background: var(--lib-paper-2, #F6EFE5);
  color: var(--lib-ink, #1F1A15);
}
.pb-mbtn.is-ghost {
  border-color: var(--lib-paper-3, #EFE6D6);
}
.pb-mbtn.is-primary {
  background: var(--pb-p-grad, linear-gradient(135deg, #F26522 0%, #E04500 100%));
  color: #fff;
  box-shadow: 0 4px 12px rgba(242,101,34,.28);
}
.pb-mbtn.is-primary:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(242,101,34,.36);
}
.pb-mbtn.is-danger {
  background: var(--lib-wine, #7A2E1E);
  color: #fff;
  box-shadow: 0 4px 12px rgba(122,46,30,.26);
}
.pb-mbtn.is-danger:hover { filter: brightness(1.06); }
.pb-mbtn.is-cocoa {
  background: var(--lib-cocoa, #6B4E2E);
  color: #fff;
}

/* ============================================================
   Sheet variant (slides up from bottom, good for upsell)
   ============================================================ */

.pb-modal.is-sheet {
  max-width: 640px;
  border-radius: 28px 28px 20px 20px;
  padding-top: 4px;
}
.pb-modal.is-sheet::after {
  content: '';
  position: absolute;
  top: 10px; left: 50%;
  width: 48px; height: 4px;
  border-radius: 3px;
  background: rgba(107,78,46,.18);
  transform: translateX(-50%);
}

/* ============================================================
   Toasts (non-blocking)
   ============================================================ */

.pb-toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1100;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
  max-width: 360px;
}

.pb-toast {
  pointer-events: auto;
  background: rgba(31,26,21,.94);
  color: var(--lib-ivory, #FDFBF6);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow:
    0 20px 40px rgba(0,0,0,.28),
    0 0 0 1px rgba(255,255,255,.06) inset;
  font-size: 14px;
  line-height: 1.45;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 360px;
  backdrop-filter: blur(8px);
  transform: translateX(30px);
  opacity: 0;
  transition:
    transform .32s cubic-bezier(.22,1,.36,1),
    opacity .22s ease;
}
.pb-toast.is-in { transform: translateX(0); opacity: 1; }
.pb-toast.is-out { transform: translateX(20px); opacity: 0; }

/* Circular inline icon that sits on the SAME line as the title.
   This is the key alignment fix — the icon is a sibling of .pb-toast-body,
   not a child of a header block above it. */
.pb-toast-icon {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--lib-serif, Georgia, serif);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  color: #fff;
  background: var(--pb-p, #F26522);
  box-shadow: 0 0 0 3px rgba(242,101,34,.22);
  align-self: flex-start;
  margin-top: 1px;
}
.pb-toast.is-success .pb-toast-icon { background: #4F9E62; box-shadow: 0 0 0 3px rgba(79,158,98,.22); }
.pb-toast.is-error   .pb-toast-icon { background: #C83F3F; box-shadow: 0 0 0 3px rgba(200,63,63,.24); }
.pb-toast.is-warning .pb-toast-icon { background: #D28A1F; box-shadow: 0 0 0 3px rgba(210,138,31,.22); }
.pb-toast.is-info    .pb-toast-icon { background: #4F7AB8; box-shadow: 0 0 0 3px rgba(79,122,184,.22); }

.pb-toast-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.pb-toast-title {
  font-family: var(--lib-serif, Georgia, serif);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -.005em;
  margin: 0;
  line-height: 1.25;
  color: #fff;
}
.pb-toast-msg {
  margin: 0;
  opacity: .78;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255,255,255,.88);
}
/* When a toast only has a title (no msg), vertically center the title with the icon */
.pb-toast:not(:has(.pb-toast-msg)) .pb-toast-icon { align-self: center; margin-top: 0; }

.pb-toast-close {
  flex: none;
  align-self: flex-start;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 16px;
  line-height: 1;
  border-radius: 6px;
  transition: color .15s ease, background .15s ease;
}
.pb-toast-close:hover { color: #fff; background: rgba(255,255,255,.08); }

/* ============================================================
   Upsell card (inside modal body or stage)
   ============================================================ */

.pb-upsell {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  background: linear-gradient(135deg, #FBF7F1 0%, #F6EFE5 100%);
  border: 1px solid var(--lib-paper-3, #EFE6D6);
  border-radius: 18px;
  margin: 14px 0;
  position: relative;
  overflow: hidden;
}
.pb-upsell::after {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242,101,34,.10) 0%, transparent 70%);
}

.pb-upsell-cover {
  width: 78px; height: 100px;
  border-radius: 10px;
  background: var(--pb-p-grad, linear-gradient(135deg, #F26522, #E04500));
  display: grid; place-items: center;
  color: #fff;
  font-family: var(--lib-serif);
  font-size: 26px;
  box-shadow:
    -4px 0 8px rgba(0,0,0,.18) inset,
    0 8px 20px rgba(242,101,34,.28);
  position: relative;
  transform: rotate(-4deg);
  transition: transform .4s cubic-bezier(.22,1,.36,1);
}
.pb-upsell:hover .pb-upsell-cover { transform: rotate(0deg) scale(1.04); }

.pb-upsell-body { min-width: 0; position: relative; z-index: 1; }
.pb-upsell-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--pb-p, #F26522);
  margin-bottom: 4px;
}
.pb-upsell-title {
  font-family: var(--lib-serif, Georgia, serif);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.22;
  margin: 0 0 4px;
  color: var(--lib-ink, #1F1A15);
}
.pb-upsell-msg {
  font-size: 13px;
  color: var(--lib-ink-2, #4A3F33);
  margin: 0 0 12px;
  line-height: 1.5;
}
.pb-upsell-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--pb-p, #F26522);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  border: 0;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
}
.pb-upsell-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(242,101,34,.32);
}
.pb-upsell-cta svg { width: 12px; height: 12px; }

/* ============================================================
   Cover upload prompt / empty cover CTA
   ============================================================ */

.pb-cover-prompt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
  color: #fff;
  font-size: 12px;
  opacity: 0;
  transition: opacity .24s ease;
  cursor: pointer;
  text-align: center;
  padding: 12px;
  border-radius: inherit;
}
.pb-cover-prompt svg { width: 24px; height: 24px; stroke-width: 1.6; }
.lib-cover:hover .pb-cover-prompt { opacity: 1; }

.pb-cover-nudge {
  position: absolute;
  top: 8px; left: 8px;
  padding: 4px 8px;
  background: rgba(255,255,255,.92);
  color: var(--lib-wine, #7A2E1E);
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  z-index: 2;
  animation: pb-pulse 2.4s ease-in-out infinite;
}
@keyframes pb-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.04); opacity: .85; }
}

/* ============================================================
   Murakami-style illustration panel
   ============================================================ */

.pb-muse {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at 30% 30%, rgba(242,101,34,.08) 0%, transparent 60%),
    linear-gradient(160deg, #F6EFE5 0%, #EFE6D6 100%);
}

.pb-muse svg { width: 82%; height: 82%; overflow: visible; }
.pb-muse .m-sky    { animation: m-float 12s ease-in-out infinite; transform-origin: 50% 50%; }
.pb-muse .m-bird   { animation: m-float 6s  ease-in-out infinite alternate; transform-origin: 50% 60%; }
.pb-muse .m-wing   { animation: m-wing 2.8s ease-in-out infinite; transform-origin: 70% 50%; }
.pb-muse .m-shape  { animation: m-spin 40s linear infinite; transform-origin: 50% 50%; }
.pb-muse .m-ring   { animation: m-spin 60s linear reverse infinite; transform-origin: 50% 50%; }
.pb-muse .m-dot    { animation: m-blink 4s  ease-in-out infinite; }

@keyframes m-float { 0%,100% { transform: translateY(-4px); } 50% { transform: translateY(6px); } }
@keyframes m-wing  { 0%,100% { transform: rotate(0deg) scaleY(1); } 50% { transform: rotate(-16deg) scaleY(.92); } }
@keyframes m-spin  { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes m-blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Morph transition when switching between "detail" and "excerpt" states */
.pb-muse.is-excerpt .m-book { transform: translate(6%, -2%) rotate(3deg); transition: transform .6s cubic-bezier(.22,1,.36,1); }
.pb-muse      .m-book { transition: transform .6s cubic-bezier(.22,1,.36,1); }

/* ============================================================
   Momentum streak / achievement pill (empty-state & footer)
   ============================================================ */

.pb-streak {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--lib-ivory, #FDFBF6);
  border: 1px solid var(--lib-paper-3, #EFE6D6);
  font-size: 12.5px;
  color: var(--lib-ink-2, #4A3F33);
  box-shadow: 0 2px 6px rgba(63,44,20,.05);
}
.pb-streak .k { color: var(--pb-p, #F26522); font-weight: 700; font-family: var(--lib-serif); font-size: 15px; }
.pb-streak svg { width: 14px; height: 14px; color: var(--pb-p, #F26522); }

/* Milestone banner above library hero */
.pb-milestone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #FFF4EA 0%, #FDE9D4 100%);
  border: 1px solid rgba(242,101,34,.18);
  border-radius: 14px;
  margin-bottom: 18px;
  animation: pb-slide-in .5s cubic-bezier(.22,1,.36,1) both;
}
.pb-milestone-k {
  font-family: var(--lib-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--pb-p, #F26522);
  line-height: 1;
}
.pb-milestone-body h4 { margin: 0; font-weight: 600; font-size: 14px; color: var(--lib-ink, #1F1A15); }
.pb-milestone-body p  { margin: 2px 0 0; font-size: 12.5px; color: var(--lib-ink-2, #4A3F33); }
.pb-milestone button {
  margin-left: auto;
  padding: 8px 14px;
  border-radius: 10px;
  border: 0;
  background: var(--pb-p, #F26522);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

@keyframes pb-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Reduced motion override
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .pb-modal,
  .pb-toast,
  .pb-upsell-cover,
  .pb-muse * {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   Tooltip system — attach with data-tip="..." to any element.
   Uses a pseudo-element so it works without JS. Placement defaults
   to bottom; override with data-tip-pos="top|left|right".
   ============================================================ */

[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 1200;
  pointer-events: none;
  white-space: nowrap;
  max-width: 280px;
  padding: 7px 11px;
  border-radius: 8px;
  background: rgba(31,26,21,.94);
  color: #FDFBF6;
  font-family: var(--lib-sans, 'Inter', system-ui, sans-serif);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: .01em;
  box-shadow: 0 8px 22px rgba(0,0,0,.24), 0 0 0 1px rgba(255,255,255,.04) inset;
  opacity: 0;
  transform: translateY(-4px) scale(.96);
  transition: opacity .15s ease .08s, transform .18s cubic-bezier(.22,1,.36,1) .08s;
}

/* Bottom (default) */
[data-tip]::after,
[data-tip][data-tip-pos="bottom"]::after {
  top: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, -4px) scale(.96);
}
[data-tip]:hover::after,
[data-tip]:focus-visible::after,
[data-tip][data-tip-pos="bottom"]:hover::after,
[data-tip][data-tip-pos="bottom"]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

/* Top */
[data-tip][data-tip-pos="top"]::after {
  top: auto;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 4px) scale(.96);
}
[data-tip][data-tip-pos="top"]:hover::after,
[data-tip][data-tip-pos="top"]:focus-visible::after {
  transform: translate(-50%, 0) scale(1);
}

/* Left */
[data-tip][data-tip-pos="left"]::after {
  top: 50%;
  right: calc(100% + 8px);
  left: auto;
  transform: translate(4px, -50%) scale(.96);
}
[data-tip][data-tip-pos="left"]:hover::after,
[data-tip][data-tip-pos="left"]:focus-visible::after {
  transform: translate(0, -50%) scale(1);
}

/* Right */
[data-tip][data-tip-pos="right"]::after {
  top: 50%;
  left: calc(100% + 8px);
  right: auto;
  transform: translate(-4px, -50%) scale(.96);
}
[data-tip][data-tip-pos="right"]:hover::after,
[data-tip][data-tip-pos="right"]:focus-visible::after {
  transform: translate(0, -50%) scale(1);
}

/* Wrapping long tooltips */
[data-tip][data-tip-wrap="1"]::after {
  white-space: normal;
  width: 260px;
}

@media (prefers-reduced-motion: reduce) {
  [data-tip]::after { transition: none; }
}

/* ============================================================
   Premium gating — teaser badges, lock overlay, upgrade card
   ============================================================ */

/* Small badge pinned on gated UI elements */
.pb-premium-badge {
  position: absolute;
  top: -8px; right: -8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #F4C430 0%, #E0A91E 100%);
  color: #3A2A0E;
  box-shadow: 0 4px 10px rgba(224,169,30,.30);
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
}

/* Inline "PRO" pill used next to feature titles. Small but high contrast
   so a glance anywhere near a paid addon instantly tells the user that
   it requires an upgrade. */
.pb-pro-pill {
  display: inline-block;
  padding: 2px 7px;
  margin-left: 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #F4C430 0%, #E0A91E 100%);
  color: #3A2A0E;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  vertical-align: middle;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(224,169,30,.28);
}

/* Suppress pinned badge on small CTA pills and card surfaces where the
   badge visibly covers copy. The dashed focus ring + orange tint from
   .pb-premium-lock::before is still enough signal on its own. */
.pbg-cta.pb-premium-lock .pb-premium-badge,
.pb-btn.pb-premium-lock .pb-premium-badge,
a.pb-premium-lock.pbg-cta .pb-premium-badge,
button.pb-premium-lock.pbg-cta .pb-premium-badge,
.pbg-miss .pb-premium-badge,
.pbg-distro .pb-premium-badge,
.pbg-heat .pb-premium-badge,
.pbg-clip .pb-premium-badge,
.pbg-ivp .pb-premium-badge,
.pro-detail.pb-premium-lock > .pb-premium-badge,
#adapt-apply-btn .pb-premium-badge,
#adapt-preview-btn .pb-premium-badge { display: none; }

/* Host must be position:relative so the badge anchors; most buttons/cards already are. */
.pb-premium-lock { position: relative; cursor: pointer; }
.pb-premium-lock::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(242,101,34,.04) 0%, rgba(244,196,48,.08) 100%);
  border: 1px dashed rgba(242,101,34,.35);
  pointer-events: none;
  z-index: 1;
  transition: background .24s ease, border-color .24s ease;
}
.pb-premium-lock:hover::before {
  background: linear-gradient(135deg, rgba(242,101,34,.08) 0%, rgba(244,196,48,.14) 100%);
  border-color: rgba(242,101,34,.55);
}

/* Premium upgrade card inside a PBModal */
.pb-premium-card {
  padding: 6px 2px 4px;
}
.pb-premium-eyebrow {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--pb-p, #F26522);
  margin-bottom: 8px;
}
.pb-premium-eyebrow strong { color: #B04C17; }
.pb-premium-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  color: #2B1E16;
  margin: 0 0 10px;
  letter-spacing: -.01em;
}
.pb-premium-msg {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: #5B4534;
  margin: 0 0 14px;
}
.pb-premium-benefit {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FBF7F1 0%, #F5EAD4 100%);
  border: 1px solid rgba(120,85,56,.15);
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 13.5px;
  color: #3A2A1E;
}

/* ============================================================
   Back button pill — persistent navigation
   ============================================================ */
.pb-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(62,40,32,.18);
  background: rgba(255,255,255,.72);
  color: #2B1E16;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s cubic-bezier(.22,1,.36,1);
  backdrop-filter: blur(6px);
}
.pb-back:hover {
  background: #FFF;
  transform: translateX(-2px);
  border-color: rgba(62,40,32,.35);
  box-shadow: 0 4px 14px rgba(62,40,32,.10);
}
.pb-back svg {
  width: 14px; height: 14px;
  transition: transform .2s ease;
}
.pb-back:hover svg { transform: translateX(-2px); }
