/* XCuties — OnlyFans-inspired lux theme (aligned with operator dashboard) */
:root {
  --bg: #0f0d12;
  --bg-2: #141119;
  --surface: #1a161f;
  --surface-2: #201b28;
  --border: #2c2636;
  --text: #ece9f1;
  --text-dim: #b7b0c4;
  --muted: #8d859c;
  --accent: #ec4899;
  --accent-600: #db2777;
  --accent-soft: rgba(236, 72, 153, 0.14);
  --purple: #a855f7;
  --green: #34d399;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --topbar-h: 60px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- Content protection (deterrence; OS screenshots cannot be fully blocked) ---- */
.xc-protect img,
.xc-protect video,
.protect-img,
.protect-media {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}
.protect-media {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  -webkit-touch-callout: none;
}
.protect-media > .protect-img,
.protect-media > img,
.protect-media > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none; /* clicks hit shield; videos re-enable below */
  -webkit-user-drag: none;
}
/* Videos need pointer events for native controls */
.protect-media.is-video > video,
.protect-media.is-video > .protect-img.xc-video {
  pointer-events: auto;
  height: auto;
  object-fit: contain;
}
.protect-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  /* transparent hit target — blocks right-click/save on the image underneath */
  background: transparent;
  cursor: inherit;
}
/* Don't cover video controls; only a thin top band for context-menu block is useless — leave shield off videos */
.protect-media.is-video > .protect-shield { display: none; }
/* Avatar uses circle crop */
.avatar-wrap.protect-media {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  margin-top: 0;
  border-radius: 50%;
  border: 3px solid var(--surface);
  overflow: hidden;
  align-self: flex-start;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  position: relative;
  z-index: 5;
}
.avatar-wrap .protect-img.avatar-lg,
.avatar-wrap .avatar-lg {
  width: 100%;
  height: 100%;
  margin-top: 0;
  border: none;
  border-radius: 0;
  object-fit: cover;
}
.avatar-wrap.zoomable { cursor: zoom-in; }
.avatar-wrap.zoomable:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  z-index: 6;
}
/* Profile avatar: animated multi-color stories ring (tap to play) */
button.avatar-wrap.avatar-stories-ring {
  appearance: none;
  border: none;
  padding: 3px;
  margin-top: -52px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  cursor: pointer;
  overflow: visible;
  background: transparent;
  flex-shrink: 0;
  align-self: flex-start;
  position: relative;
  z-index: 5;
  box-shadow: none;
}
button.avatar-wrap.avatar-stories-ring::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #ec4899,
    #a855f7,
    #f59e0b,
    #34d399,
    #38bdf8,
    #ec4899
  );
  animation: profile-stories-spin 2.8s linear infinite;
  z-index: 0;
}
button.avatar-wrap.avatar-stories-ring::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: var(--surface, #1a161f);
  z-index: 1;
}
button.avatar-wrap.avatar-stories-ring .avatar-lg,
button.avatar-wrap.avatar-stories-ring .protect-img,
button.avatar-wrap.avatar-stories-ring .avatar-stories-letter {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin-top: 0;
  border: none;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
button.avatar-wrap.avatar-stories-ring .avatar-stories-letter {
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--purple));
}
button.avatar-wrap.avatar-stories-ring:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 12px rgba(236, 72, 153, 0.55));
}
/* Hover: darken image + white “View Stories” */
.avatar-stories-hover {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
  overflow: hidden;
}
.avatar-stories-hover-dim {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 12, 0.58);
  border-radius: 50%;
}
.avatar-stories-hover-label {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.75);
  padding: 0 6px;
  line-height: 1.2;
}
button.avatar-wrap.avatar-stories-ring:hover .avatar-stories-hover,
.ex-avatar-stories:hover .avatar-stories-hover {
  opacity: 1;
}
.ex-avatar-stories .avatar-stories-hover {
  inset: 3px; /* match button padding — dim the photo, not the spin ring */
  border-radius: 50%;
  z-index: 4;
  overflow: hidden;
}
/* Compact two-line label so it stays inside the circle */
.ex-avatar-stories .avatar-stories-hover-label {
  font-size: 8.5px;
  letter-spacing: 0.02em;
  padding: 0 3px;
  line-height: 1.15;
  max-width: 100%;
  white-space: normal;
}
@keyframes profile-stories-spin {
  to { transform: rotate(360deg); }
}
.profile-banner.protect-media { position: relative; z-index: 0; }
.profile-banner .protect-shield { z-index: 1; cursor: zoom-in; }
/* Lightbox image fills canvas */
.lb-protect.protect-media {
  width: auto;
  height: auto;
  max-width: min(96vw, 1100px);
  max-height: calc(100vh - 110px);
}
.lb-protect .protect-img {
  width: auto;
  height: auto;
  max-width: min(96vw, 1100px);
  max-height: calc(100vh - 110px);
  object-fit: contain;
  border-radius: 8px;
}
.lb-protect .protect-shield { cursor: grab; }
/* Chat thumbs: block stack (caption goes under image, not beside it) */
.protect-media.chat-thumb-wrap {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  vertical-align: top;
}
.protect-media.chat-thumb-wrap .protect-img.chat-thumb,
.protect-media.chat-thumb-wrap .chat-thumb {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  margin: 0;
}
/* Inside a media bubble body — force column stack */
.bubble-media .protect-media,
.bubble-media .chat-thumb-wrap,
.bubble-media .chat-video-wrap {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}
/* Single post image fill */
.post-media > .protect-media {
  position: absolute;
  inset: 0;
}
.post-media {
  position: relative;
}
.post-media-video > .protect-media,
.post-media.post-media-video {
  position: relative;
}
.post-media-video.protect-media {
  position: relative;
  inset: auto;
}
/* Subtle watermark lattice (harder casual screenshots, low visual impact) */
.protect-media:not(.is-video):not(.is-locked-media)::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  background-image:
    repeating-linear-gradient(
      -28deg,
      transparent,
      transparent 46px,
      rgba(255, 255, 255, 0.55) 46px,
      rgba(255, 255, 255, 0.55) 47px
    );
  mix-blend-mode: soft-light;
}
/* Obscure media when tab hidden / printscreen flash */
body.protect-obscured img,
body.protect-obscured video,
body.protect-obscured .protect-media,
body.protect-obscured .profile-banner,
body.protect-obscured .lb-canvas {
  filter: blur(42px) brightness(0.55) !important;
  transition: filter 0.05s linear;
}
@media print {
  img, video, .protect-media, .post-media, .media-gallery, .lb-canvas, .profile-banner, .sc-stage {
    display: none !important;
    visibility: hidden !important;
  }
  body::before {
    content: 'XCuties content cannot be printed.';
    display: block;
    padding: 40px;
    font-size: 18px;
  }
}
/* Ambient pink/purple glows — fixed so they stay at the top while scrolling */
body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
}
body::before {
  top: -10%;
  right: -5%;
  width: min(1000px, 90vw);
  height: min(500px, 55vh);
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.14), transparent 65%);
}
body::after {
  top: -5%;
  left: -8%;
  width: min(800px, 85vw);
  height: min(450px, 50vh);
  background: radial-gradient(ellipse at center, rgba(236, 72, 153, 0.12), transparent 65%);
}
/* Keep content above the fixed glows */
.age-gate, .app, .modal-root { position: relative; z-index: 1; }
.lightbox, .showcase { z-index: 100; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.err { color: #f87171; font-size: 13px; margin-top: 8px; }

/* Age gate */
.age-gate {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.age-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 36px 28px; max-width: 400px; width: 100%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.age-card .logo { font-weight: 800; letter-spacing: .04em; color: var(--accent); font-size: 22px; }
.age-card h1 { margin: 16px 0 8px; font-size: 24px; }
.age-card p { color: var(--text-dim); margin: 0 0 20px; }
.age-card .btn { width: 100%; margin-top: 8px; }

/* Shell */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: rgba(15,13,18,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  /* Keep sticky nav above page chrome but never steal avatar under profile hero */
  isolation: isolate;
}
/* Soft pink glow on the right edge of the nav — smaller cousin of the body ambience.
   Kept fully inside the bar height so dropdown menus below aren't clipped. */
.topbar::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(280px, 42vw);
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
    ellipse 90% 140% at 88% 50%,
    rgba(236, 72, 153, 0.22) 0%,
    rgba(236, 72, 153, 0.1) 38%,
    transparent 72%
  );
}
.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand-logo {
  display: block;
  height: 40px;
  width: auto;
  /* logo_2 mark+wordmark is wider than the old script logo */
  max-width: min(200px, 52vw);
  object-fit: contain;
  object-position: left center;
  /* Clean mark at rest; pink glow + grow only on hover */
  filter: none;
  transform: scale(1);
  transition: filter .18s ease, transform .18s ease, opacity .15s ease;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform, filter;
}
.brand:hover .brand-logo {
  filter: drop-shadow(0 2px 12px rgba(236, 72, 153, 0.65))
          drop-shadow(0 0 18px rgba(236, 72, 153, 0.35));
  transform: translateY(-1px) scale(1.07);
}
.brand:active .brand-logo {
  opacity: 0.92;
  transform: scale(1.02);
}
/* Same idea as dashboard .brand-new-version — lime pill, test users only */
.brand-new-version {
  display: inline-block;
  margin: 0;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #84cc16;
  background: #000;
  color: #a3e635;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.brand-new-version:hover {
  filter: brightness(1.08);
  border-color: #a3e635;
}
/* Brief highlight after in-place PPV unlock (scroll target) */
article.post.post-just-unlocked {
  outline: 2px solid rgba(236, 72, 153, 0.55);
  outline-offset: 3px;
  border-radius: 14px;
  transition: outline-color 1.2s ease;
}
.brand-new-version.hidden,
.brand-new-version[hidden] {
  display: none !important;
}
.nav {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
  position: relative;
  z-index: 1;
}
.nav a:hover { color: var(--text); }

/* Account chip + hover/click/right-click dropdown */
.nav-account-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  max-width: min(280px, 58vw);
  white-space: nowrap;
  transition: color .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.nav-account.is-signed-in {
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(26, 22, 31, 0.85);
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
.nav-account-wrap.is-signed-in:hover .nav-account.is-signed-in,
.nav-account-wrap.is-open .nav-account.is-signed-in,
.nav-account.is-signed-in:hover {
  color: var(--text);
  border-color: rgba(236, 72, 153, 0.45);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(168, 85, 247, 0.1));
  box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.18);
}
.nav-account-avatar {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(236, 72, 153, 0.28), rgba(168, 85, 247, 0.22));
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f9a8d4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.nav-account-icon {
  display: block;
  width: 15px;
  height: 15px;
}
.nav-account-name {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  letter-spacing: 0.01em;
  min-width: 0;
}
/* Premium pill lives inside the account chip, right of the display name */
.nav-account .nav-premium {
  flex: 0 0 auto;
  margin-left: 2px;
}
.nav-account:not(.is-signed-in):hover {
  color: var(--text);
}

/* Dropdown panel — hover bridge via padding-top so pointer doesn't drop the menu */
.nav-account-menu {
  position: absolute;
  right: 0;
  top: 100%;
  padding-top: 8px;
  min-width: 196px;
  z-index: 50;
  display: none;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.55));
}
.nav-account-wrap.is-signed-in:hover .nav-account-menu,
.nav-account-wrap.is-open .nav-account-menu,
.nav-account-wrap.is-signed-in:focus-within .nav-account-menu {
  display: block;
}
.nav-account-wrap.is-guest .nav-account-menu,
.nav-account-menu[hidden] {
  display: none !important;
}
/* When JS forces open (right-click / click pin), ignore hidden attribute */
.nav-account-wrap.is-open .nav-account-menu {
  display: block !important;
}
.nav-account-menu::before {
  /* invisible hit area in the 8px gap */
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 8px;
}
.nav-account-menu > .nav-account-item:first-child {
  border-radius: 12px 12px 0 0;
}
.nav-account-menu > .nav-account-item:last-child {
  border-radius: 0 0 12px 12px;
}
.nav-account-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-bottom: none;
  background: var(--surface, #1a161f);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.nav-account-menu > .nav-account-item:first-child {
  border-top: 1px solid var(--border);
}
.nav-account-menu > .nav-account-item:last-child {
  border-bottom: 1px solid var(--border);
}
.nav-account-item:hover,
.nav-account-item:focus-visible {
  background: rgba(236, 72, 153, 0.12);
  color: #f9a8d4;
  outline: none;
}
.nav-account-item-ico {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(236, 72, 153, 0.12);
  color: #f9a8d4;
  flex: 0 0 auto;
}
.nav-account-item-ico svg {
  display: block;
}
.nav-account-logout {
  color: var(--text-dim);
  font-weight: 600;
}
.nav-account-logout .nav-account-item-ico {
  background: rgba(244, 63, 94, 0.1);
  color: #fb7185;
}
.nav-account-logout:hover,
.nav-account-logout:focus-visible {
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
}
.nav-msg-wrap { position: relative; }
.nav-msg-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.nav-msg-link.has-unread #nav-msg-label {
  color: var(--accent-300, #f9a8d4);
  font-weight: 700;
}
.nav-msg-badge {
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--accent, #ec4899);
  color: #fff;
  font-size: 10.5px; font-weight: 800;
  line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px rgba(15,13,18,.9);
}
.nav-msg-badge.hidden { display: none; }
.nav-msg-panel {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: min(320px, 92vw);
  background: var(--surface, #1a1620);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  z-index: 40;
  overflow: hidden;
}
.nav-msg-panel.hidden { display: none; }
.nav-msg-panel-head {
  padding: 10px 12px; font-weight: 700; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.nav-msg-panel-list { max-height: 280px; overflow-y: auto; }
.nav-msg-item {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px; text-decoration: none; color: inherit;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.nav-msg-item:hover { background: rgba(236, 72, 153, .08); }
.nav-msg-item img, .nav-msg-item .ph {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: grid; place-items: center; font-weight: 700; flex-shrink: 0;
  font-size: 14px;
}
.nav-msg-item .meta { min-width: 0; flex: 1; }
.nav-msg-item .name { font-weight: 650; font-size: 13px; }
.nav-msg-item .prev {
  font-size: 12px; color: var(--muted); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.nav-msg-item .n {
  flex-shrink: 0; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
}
.nav-msg-panel-all {
  display: block; text-align: center; padding: 10px;
  font-size: 12.5px; font-weight: 600; color: var(--accent);
  border-top: 1px solid var(--border);
}
.nav-msg-panel-all:hover { background: rgba(236, 72, 153, .06); }
/* Reply strip above compose — classic messenger style */
.chat-reply-bar {
  display: flex; align-items: stretch; gap: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  background: rgba(236, 72, 153, 0.06);
  font-size: 12.5px; color: var(--muted);
  min-height: 44px;
}
.chat-reply-bar.hidden { display: none; }
.chat-reply-bar::before {
  content: '';
  width: 3px; flex-shrink: 0;
  background: var(--accent, #ec4899);
  border-radius: 0 2px 2px 0;
}
.chat-reply-bar .reply-body {
  flex: 1; min-width: 0;
  padding: 8px 10px;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text-dim);
}
.chat-reply-bar .reply-who {
  font-size: 11.5px; font-weight: 700; color: var(--accent-300, #f9a8d4);
}
.chat-reply-bar .reply-snip {
  font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis;
}
.chat-reply-bar button {
  border: 0; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 18px; line-height: 1; padding: 0 14px;
  align-self: center;
}
.chat-reply-bar button:hover { color: var(--text); }

/* Bubble row: bubble + side actions (hover on desktop) */
.bubble-row {
  display: flex; align-items: center; gap: 6px;
  margin: 2px 0;
  max-width: 100%;
}
.bubble-row.is-out { flex-direction: row; justify-content: flex-start; }
.bubble-row.is-in { flex-direction: row-reverse; justify-content: flex-start; }
.bubble-row .bubble { margin: 0; max-width: 100%; }
.bubble-stack {
  display: flex; flex-direction: column;
  max-width: min(78%, 420px); min-width: 0;
}
.bubble-row.is-in .bubble-stack { align-items: flex-end; }
.bubble-row.is-out .bubble-stack { align-items: flex-start; }
.bubble-side-actions {
  display: flex; flex-direction: column; gap: 4px;
  opacity: 0; pointer-events: none;
  transition: opacity .12s;
  flex-shrink: 0;
}
.bubble-row:hover .bubble-side-actions,
.bubble-row:focus-within .bubble-side-actions,
.bubble-row.actions-open .bubble-side-actions {
  opacity: 1; pointer-events: auto;
}
@media (hover: none) {
  /* Touch: hide always-on side icons; long-press opens menu instead */
  .bubble-side-actions { display: none; }
}
.bubble-side-actions button {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface, #1a1620);
  color: var(--text-dim);
  cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.bubble-side-actions button:hover {
  color: var(--accent-300, #f9a8d4);
  border-color: rgba(236, 72, 153, .4);
  background: rgba(236, 72, 153, .1);
}
.bubble-side-actions svg { width: 15px; height: 15px; display: block; }

/* Quoted reply inside a bubble */
.bubble-quote {
  display: flex; gap: 0; margin: 0 0 6px;
  border-radius: 8px; overflow: hidden;
  background: rgba(0,0,0,.18);
  font-size: 12px; line-height: 1.3;
  cursor: default;
}
.bubble-quote::before {
  content: ''; width: 3px; flex-shrink: 0;
  background: var(--accent, #ec4899);
}
.bubble-quote .bq-inner { padding: 5px 8px; min-width: 0; }
.bubble-quote .bq-who {
  font-weight: 700; font-size: 11px;
  color: var(--accent-300, #f9a8d4);
  margin-bottom: 1px;
}
.bubble-quote .bq-text {
  color: var(--text-dim); opacity: .9;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.bubble.in .bubble-quote { background: rgba(255,255,255,.06); }

/* Floating emoji bar (iMessage-style) */
.msg-emoji-bar {
  position: fixed; z-index: 90;
  display: flex; align-items: center; gap: 2px;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--surface, #1e1a24);
  border: 1px solid var(--border);
  box-shadow: 0 10px 36px rgba(0,0,0,.55);
  animation: msgPop .14s ease-out;
}
@keyframes msgPop {
  from { opacity: 0; transform: scale(.92) translateY(4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.msg-emoji-bar button {
  border: 0; background: transparent;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 22px; cursor: pointer; line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
  transition: transform .1s, background .1s;
}
.msg-emoji-bar button:hover {
  background: rgba(255,255,255,.08);
  transform: scale(1.18);
}
.msg-emoji-bar button.is-on {
  background: rgba(236, 72, 153, .2);
}

/* Long-press / right-click action sheet */
.msg-action-sheet {
  position: fixed; z-index: 91;
  min-width: 180px;
  padding: 6px;
  border-radius: 14px;
  background: var(--surface, #1e1a24);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0,0,0,.55);
  animation: msgPop .14s ease-out;
}
.msg-action-sheet button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  border: 0; background: transparent; color: inherit;
  font: inherit; font-size: 14px; padding: 10px 12px;
  border-radius: 10px; cursor: pointer;
}
.msg-action-sheet button:hover {
  background: rgba(236, 72, 153, .12);
}
.msg-action-sheet .ico { font-size: 16px; width: 22px; text-align: center; }
.msg-sheet-backdrop {
  position: fixed; inset: 0; z-index: 89;
  background: transparent;
}

.bubble { position: relative; user-select: none; -webkit-user-select: none; }
.bubble .bubble-body { user-select: text; -webkit-user-select: text; }
.nav-premium {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  color: #f9a8d4;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.22), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(236, 72, 153, 0.45);
  white-space: nowrap;
}
.main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 20px 16px 40px; }
/* Messages: fill viewport under topbar; no page scrollbar (scroll only inbox + chat) */
body.xc-messages-page {
  height: 100vh;
  overflow: hidden;
}
body.xc-messages-page .app {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}
.main.main-messages {
  max-width: min(1480px, 100%);
  width: 100%;
  margin: 0 auto;
  padding: 10px 16px 12px;
  flex: 1 1 auto;
  min-height: 0;
  height: calc(100vh - var(--topbar-h));
  max-height: calc(100vh - var(--topbar-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
.footer {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
  padding: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: 14px;
  cursor: pointer; transition: .15s ease;
}
.btn:hover { border-color: #3d3548; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-600));
  border-color: transparent; color: #fff;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* Forms */
.form-card {
  max-width: 400px; margin: 24px auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
}
.form-card h1 { margin: 0 0 6px; font-size: 22px; }
.form-card .sub { color: var(--muted); margin-bottom: 20px; }
label { display: block; font-size: 12px; color: var(--text-dim); margin: 12px 0 6px; }
input, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 12px; color: var(--text); outline: none;
}
input:focus, textarea:focus { border-color: var(--accent); }
/* Text-field rules must not inflate checkboxes / radios (broke Premium Plus upsell). */
input[type="checkbox"],
input[type="radio"] {
  width: auto !important;
  min-width: 16px;
  max-width: 18px;
  height: 16px;
  padding: 0 !important;
  margin: 0;
  border-radius: 4px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: none;
}
.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: 13px; color: var(--text-dim); }
.check input { width: auto; margin-top: 3px; }

/* Subscribe → Premium Plus upsell row
   Prefer class "hidden" (display:none !important) to remove the row entirely
   for accounts that already have Premium Plus — do not leave it visible unchecked. */
.sub-upsell-plus-row {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(244, 114, 182, 0.45);
  border-radius: 12px;
  cursor: pointer;
  background: rgba(244, 114, 182, 0.06);
  font-size: 14px;
  color: var(--text);
}
.sub-upsell-plus-row.hidden {
  display: none !important;
}
.sub-upsell-plus-row input[type="checkbox"] {
  margin-top: 3px;
}
.sub-upsell-plus-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sub-upsell-plus-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.sub-upsell-plus-head strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.sub-upsell-plus-price {
  font-weight: 700;
  white-space: nowrap;
  color: var(--text);
}
.sub-upsell-plus-note {
  display: block;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  white-space: normal;
}

/* Creator grid (legacy / inbox) */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px;
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-2px); border-color: #3d3548; }
.card .cover {
  aspect-ratio: 3/4; background: linear-gradient(145deg, #2a2035, #1a1220);
  background-size: cover; background-position: center;
}
.card .meta { padding: 10px 12px 12px; }
.card .name { font-weight: 700; }
.card .stat { font-size: 12px; color: var(--muted); }

/* ---- Explore page ---- */
.explore { max-width: 1100px; margin: 0 auto; }
.explore-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 18px;
}
.ex-search {
  flex: 1 1 200px; min-width: 160px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 14px; color: var(--text); outline: none;
}
.ex-search:focus { border-color: var(--accent); }
.ex-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  flex: 1 1 auto;
}
/* Themed filter pills — match lux pink/purple surface language */
.ex-filter {
  appearance: none; cursor: pointer; font: inherit;
  font-size: 12px; font-weight: 700; letter-spacing: .01em;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(236, 72, 153, 0.18);
  background:
    linear-gradient(145deg, rgba(236,72,153,.08), rgba(168,85,247,.06)),
    var(--surface);
  color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color .14s ease, background .14s ease, color .14s ease, box-shadow .14s ease, transform .12s ease;
}
.ex-filter:hover {
  color: var(--text);
  border-color: rgba(236, 72, 153, 0.4);
  background:
    linear-gradient(145deg, rgba(236,72,153,.14), rgba(168,85,247,.1)),
    var(--surface-2);
  transform: translateY(-1px);
}
.ex-filter.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.28);
}
.ex-filter .online-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  animation: online-blink 1.35s ease-in-out infinite;
}
.ex-filter-online:not(.active) { color: var(--green); border-color: rgba(52,211,153,.28); }
.ex-filter-online.active {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.28);
}
.ex-filter-nsfw:not(.active) {
  color: var(--accent);
  border-color: rgba(236,72,153,.35);
  background: rgba(236,72,153,.1);
}
.ex-sort {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px; color: var(--text);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.ex-spotlight {
  margin-bottom: 20px;
}
.ex-spot-label {
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 8px;
}
.ex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.ex-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden;
  color: inherit; text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.ex-card:hover {
  transform: translateY(-3px);
  border-color: rgba(236, 72, 153, 0.35);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
}
.ex-card:hover .ex-photo-img {
  transform: scale(1.04);
}
/* Tall single cover photo (object-fit: cover via background-size) */
.ex-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 280px;
  background: #120f16;
  overflow: hidden;
}
.ex-photo-img {
  position: absolute; inset: 0;
  background:
    linear-gradient(145deg, #2a2035, #1a1220);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transition: transform .35s ease;
}
.ex-photo-empty {
  display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(236,72,153,.25), rgba(168,85,247,.2)),
    linear-gradient(145deg, #2a2035, #1a1220);
  font-size: 48px; font-weight: 900; color: rgba(255,255,255,.45);
}
.ex-card-lg {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 360px;
  border-color: rgba(236, 72, 153, 0.35);
  background:
    radial-gradient(500px 200px at 10% 0%, rgba(236,72,153,.14), transparent 55%),
    var(--surface);
}
.ex-card-lg .ex-photo {
  aspect-ratio: auto;
  min-height: 360px;
  height: 100%;
}
@media (max-width: 720px) {
  .ex-card-lg { grid-template-columns: 1fr; }
  .ex-card-lg .ex-photo {
    aspect-ratio: 3 / 4;
    min-height: 300px;
    height: auto;
  }
}
.ex-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.ex-card-lg .ex-body {
  padding: 20px 18px;
  justify-content: center;
}
.ex-head { display: flex; gap: 10px; align-items: center; }
.ex-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  background-size: cover; background-position: center;
  border: 2px solid var(--surface);
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
}
.ex-card-lg .ex-avatar { width: 56px; height: 56px; font-size: 20px; }
.ex-name { font-weight: 800; font-size: 16px; line-height: 1.2; }
.ex-card-lg .ex-name { font-size: 22px; }
.ex-slug { font-size: 12px; color: var(--muted); }
.ex-bio {
  margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ex-card-lg .ex-bio { -webkit-line-clamp: 3; font-size: 14px; }
.ex-flair {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ex-chip {
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,.06); color: var(--text-dim);
  border: 1px solid rgba(255,255,255,.08);
}
.ex-chip-online { color: var(--green); border-color: rgba(52,211,153,.25); }
.ex-chip-nsfw { color: var(--accent); border-color: rgba(236,72,153,.3); background: rgba(236,72,153,.1); }
.ex-chip-spot {
  color: #fbbf24; border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.1);
}
.ex-metrics {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  font-size: 12px; color: var(--muted);
}
.ex-metrics b { color: var(--text); font-weight: 700; }
.ex-price { color: var(--accent); font-weight: 700; }
.ex-free-tag {
  color: var(--green); font-weight: 700;
}

/* ---- Landing page (/) ---- */
.landing { max-width: 1100px; margin: 0 auto; }
.land-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.85fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 36px;
}
@media (max-width: 800px) {
  .land-hero { grid-template-columns: 1fr; }
}
.land-kicker {
  margin: 0 0 8px;
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
}
.land-hero-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 900; line-height: 1.12;
  letter-spacing: -0.02em;
}
.land-lead {
  margin: 0 0 18px;
  font-size: 16px; line-height: 1.55; color: var(--text-dim);
  max-width: 36em;
}
.land-cta-row {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px;
}
.land-bullets {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.land-bullets li {
  font-size: 13px; color: var(--text-dim); line-height: 1.4;
  padding-left: 0;
}
.land-bullets strong { color: var(--text); font-weight: 700; }
.land-hero-card {
  background:
    radial-gradient(320px 160px at 100% 0%, rgba(236,72,153,.16), transparent 55%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 20px 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.land-hero-card label {
  margin-top: 10px;
}
.land-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}
@media (max-width: 900px) {
  .land-features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .land-features { grid-template-columns: 1fr; }
}
.land-feat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 14px;
}
.land-feat-icon { font-size: 22px; margin-bottom: 8px; }
.land-feat h3 {
  margin: 0 0 6px; font-size: 14px; font-weight: 800;
}
.land-feat p {
  margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45;
}
.land-section { margin-bottom: 40px; }
.land-section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.land-section-head h2 {
  margin: 0; font-size: 22px; font-weight: 800;
}
.land-scatter {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 72px;
  gap: 8px;
}
@media (max-width: 800px) {
  .land-scatter { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 480px) {
  .land-scatter { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 64px; }
}
.land-scatter-tile {
  display: block;
  border-radius: 12px;
  background: #1a1220 center/cover no-repeat;
  border: 1px solid rgba(255,255,255,.06);
  transition: transform .15s ease, box-shadow .15s ease;
  min-height: 64px;
}
.land-scatter-tile:hover {
  transform: scale(1.04);
  box-shadow: 0 10px 28px rgba(0,0,0,.4);
  z-index: 1;
}
.land-scatter-tile.size-sm { grid-row: span 1; grid-column: span 1; }
.land-scatter-tile.size-md { grid-row: span 2; grid-column: span 1; }
.land-scatter-tile.size-lg { grid-row: span 2; grid-column: span 2; }
@media (max-width: 480px) {
  .land-scatter-tile.size-lg { grid-column: span 1; }
}
.land-bottom-cta {
  text-align: center;
  padding: 32px 16px 8px;
  border-top: 1px solid var(--border);
  margin-bottom: 12px;
}
.land-bottom-cta h2 {
  margin: 0 0 8px; font-size: 24px; font-weight: 800;
}

/* Profile — compact header + optional subscribe sidebar */
.profile-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}
.profile-layout-compact { max-width: 1100px; }
@media (max-width: 900px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { order: -1; }
}
.profile-sidebar .card {
  position: sticky;
  top: calc(var(--topbar-h) + 12px);
}
.profile-hero {
  position: relative;
  border-radius: 20px;
  /* visible so share float can sit half outside the card */
  overflow: visible;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 14px;
}
.profile-hero-compact {
  padding: 0 0 16px;
  background:
    radial-gradient(600px 200px at 100% 40%, rgba(236, 72, 153, 0.08), transparent 55%),
    var(--surface);
}
/* Clip banner to rounded top corners; body can still overflow for share float */
.profile-hero-compact .profile-banner {
  border-radius: 20px 20px 0 0;
  overflow: hidden;
}
/* Banner header above name */
.profile-banner {
  height: 220px;
  background: linear-gradient(120deg, rgba(236,72,153,.35), rgba(168,85,247,.3));
  background-size: cover;
  background-position: center;
  position: relative;
  z-index: 0;
}
.profile-banner.zoomable {
  cursor: zoom-in;
  transition: filter .15s ease;
}
.profile-banner.zoomable:hover { filter: brightness(1.06); }
.profile-banner.zoomable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
@media (max-width: 560px) {
  .profile-banner { height: 160px; }
}
/* Share: half outside the top-right corner of the profile card */
.profile-share-float {
  position: absolute;
  top: -16px;
  right: -16px;
  z-index: 8;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(15,13,18,.72);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(10px);
  font-size: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: transform .15s ease, background .15s ease;
}
.profile-share-float:hover {
  background: rgba(15,13,18,.9);
  transform: scale(1.06);
}
@media (max-width: 560px) {
  .profile-share-float { top: -12px; right: -8px; }
}
/* Content fully below banner — same row as Subscribe / Message / Tip (mock) */
.profile-header-body {
  position: relative;
  z-index: 4;
  padding: 16px 20px 0;
  margin-top: 0;
}
.profile-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center; /* avatar, name block, and actions on one baseline */
  justify-content: space-between;
  gap: 16px 20px;
  margin-bottom: 4px;
}
.profile-header-left {
  display: flex;
  align-items: center; /* avatar vertically centered with name/stats */
  gap: 16px;
  min-width: 0;
  flex: 1 1 280px;
}
.profile-header-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 0;
}
.profile-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.profile-name-row h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
.profile-header-meta .profile-meta {
  font-size: 13px;
  margin: 0;
  color: var(--muted);
}
.profile-header-meta .profile-counts {
  margin: 2px 0 0;
}
.profile-bio-compact {
  margin: 4px 0 0 !important;
  font-size: 13px !important;
  max-width: 420px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.profile-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  flex: 0 0 auto;
  padding-top: 0;
  padding-right: 0;
  align-self: center;
}
.profile-sub-btn {
  border-radius: 999px !important;
  padding: 10px 22px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.35);
}
.profile-header-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.profile-msg-btn,
.profile-tip-btn {
  border-radius: 999px !important;
  padding: 8px 18px !important;
  font-weight: 600 !important;
  min-width: 88px;
  background: transparent !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
.profile-msg-btn:hover,
.profile-tip-btn:hover {
  border-color: rgba(236, 72, 153, 0.45) !important;
  background: rgba(236, 72, 153, 0.08) !important;
}
/* Compact avatar: fully below banner, same row as actions */
.profile-hero-compact .avatar-wrap,
.profile-hero-compact .avatar-lg,
.profile-hero-compact button.avatar-wrap.avatar-stories-ring {
  margin-top: 0;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}
.profile-hero-compact .avatar-lg {
  border: 3px solid var(--border);
  object-fit: cover;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  box-shadow: none;
}
.profile-hero-compact button.avatar-wrap.avatar-stories-ring {
  width: 94px;
  height: 94px;
  padding: 3px;
}
.profile-hero-compact .profile-header-actions {
  padding-top: 0;
  padding-right: 0;
}
@media (max-width: 640px) {
  .profile-header-body { margin-top: 0; padding: 14px 14px 0; }
  .profile-header-row { align-items: flex-start; }
  .profile-header-left { align-items: flex-start; }
  .profile-hero-compact .profile-header-actions {
    width: 100%;
    align-items: stretch;
    padding-top: 4px;
  }
}
.avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  position: relative;
  z-index: 5;
}
.profile-info {
  flex: 1;
  min-width: min(100%, 220px);
  display: flex;
  flex-direction: column;
  width: 100%;
}
.profile-info h1 {
  margin: 0;
  font-size: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
@media (max-width: 640px) {
  .profile-header-actions {
    width: 100%;
    align-items: stretch;
    padding-right: 0;
  }
  .profile-sub-btn { width: 100%; }
  .profile-header-actions-row { justify-content: stretch; }
  .profile-msg-btn, .profile-tip-btn { flex: 1; }
  .profile-hero-compact { padding: 16px 14px 12px; }
}
/* Bio sits directly under the name — full width of the info column */
.profile-info .bio {
  color: var(--text-dim); margin: 6px 0 0; font-size: 14px; line-height: 1.55;
  white-space: pre-wrap;
  width: 100%;
  max-width: none;
}
/* Flair: hug text width only (not stretched) */
.profile-flair {
  display: flex; flex-wrap: wrap; gap: 6px;
  width: auto;
  margin-top: 0;
  box-sizing: border-box;
}
.profile-name-row .profile-flair { margin: 0; }
.profile-flair:empty { display: none; }
.flair {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  flex: 0 0 auto;
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim);
  white-space: nowrap;
  line-height: 1.2;
}
.flair-chat {
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
}
.flair-call {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.12);
  color: var(--blue);
}
.flair-online {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
}
/* Single blinking green dot (no second circle) */
.flair-online .online-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #34d399;
  flex-shrink: 0;
  animation: online-blink 1.35s ease-in-out infinite;
}
@keyframes online-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}
.flair-custom {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.14);
  color: #c4b5fd;
}
.flair-nsfw {
  border-color: rgba(236, 72, 153, 0.45);
  background: rgba(236, 72, 153, 0.16);
  color: #f9a8d4;
}
/* Fan count / price */
.profile-meta {
  margin-top: 0;
  font-size: 13px;
}
.profile-header-meta .profile-meta { margin-top: 0; }
.profile-counts {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: 13px; color: var(--muted);
}
.profile-counts b { color: var(--text); font-weight: 700; }
.profile-counts .pc-free b { color: #6ee7b7; }
.profile-counts .pc-paid b { color: #f9a8d4; }
.profile-counts .pc-nsfw b { color: #f472b6; }
/* Subscribe / Message / Tip under counts (not beside the avatar) */
.profile-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding-top: 0;
}
.profile-filters {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center;
}
.profile-filters .chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim);
  border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.profile-filters .chip.active {
  background: var(--accent-soft); color: var(--accent); border-color: transparent;
}
.profile-filters .chip-toggle {
  margin-left: auto;
}
.profile-sidebar .card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 16px; position: sticky; top: calc(var(--topbar-h) + 12px);
}
.profile-sidebar .price { font-size: 22px; font-weight: 800; margin: 4px 0 12px; }
.profile-sidebar .sub-note { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.post-footer {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 8px 14px 12px; border-top: 1px solid var(--border);
}
.post-footer .like-btn, .post-footer .cmt-toggle {
  background: transparent; border: none; color: var(--text-dim); cursor: pointer;
  font-size: 13px; font-weight: 600; padding: 4px 0;
}
.post-footer .like-btn.liked { color: var(--accent); }
.post-comments { padding: 0 14px 12px; }
.post-comments .cmt {
  font-size: 13px; padding: 6px 0; border-top: 1px solid var(--border-soft, var(--border));
}
.post-comments .cmt b { margin-right: 6px; }
.post-comments form { display: flex; gap: 8px; margin-top: 8px; }
.post-comments input { flex: 1; }

/* Posts */
.posts { display: flex; flex-direction: column; gap: 14px; }
.post {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
}
.post .post-head { padding: 12px 14px; font-size: 13px; color: var(--text-dim); }
.post .post-media {
  position: relative; aspect-ratio: 1; background: #120f16;
  display: grid; place-items: center; overflow: hidden;
}
.post .post-media img, .post .post-media video {
  width: 100%; height: 100%; object-fit: cover;
}
/* Unlocked single videos: full frame; native controls overlay on the video */
.post .post-media-video {
  aspect-ratio: auto;
  height: auto;
  max-height: none;
  overflow: hidden; /* round corners — controls still draw on the video surface */
  background: #0a0810;
  display: block;
  place-items: unset;
  position: relative;
}
.post .post-media-video .xc-video {
  width: 100%;
  height: auto;
  max-height: min(80vh, 820px);
  object-fit: contain;
  background: #000;
  display: block;
  /* keep pointer events so browser control chrome is clickable */
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
/* Locked video preview still uses square crop (blurred teaser) */
.video-expand {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(15,13,18,.65); color: #fff;
  font-size: 14px; cursor: pointer; backdrop-filter: blur(6px);
  display: grid; place-items: center;
}
.video-expand:hover { background: rgba(15,13,18,.85); }
/* Native controls live on the <video>; expand is same-element fullscreen only */
.chat-video-wrap {
  position: relative; max-width: min(280px, 78vw); border-radius: 12px; overflow: hidden;
  background: #000; margin-bottom: 4px;
}
.chat-video-wrap .chat-video,
.chat-video-wrap .xc-video {
  display: block; width: 100%; height: auto;
  max-height: min(360px, 55vh);
  object-fit: contain; background: #000; border-radius: 12px;
}
.chat-video-wrap .video-expand {
  top: 6px; right: 6px; width: 28px; height: 28px; font-size: 12px;
}
/* PPV / sub lock: one compact unit, centered both axes.
   Media underneath is already a server-side blurred teaser (GCS blurred_url) —
   do NOT backdrop-filter blur the whole frame (that double-blurs the teaser).
   A dark scrim + frosted CTA card is enough. */
.post .locked-overlay,
.media-gallery .locked-overlay.multi-lock {
  position: absolute; inset: 0; z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 8, 14, 0.48);
  text-align: center;
  padding: 16px;
  box-sizing: border-box;
}
.post .locked-overlay.is-static {
  position: relative; inset: auto;
  min-height: 160px;
}
.locked-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto;
  padding: 18px 22px;
  max-width: min(280px, 100%);
  width: max-content;
  border-radius: 16px;
  background: rgba(15, 13, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.locked-cta .lock {
  font-size: 28px;
  line-height: 1;
  margin: 0;
}
.locked-cta .locked-msg {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  max-width: 220px;
}
.locked-cta .locked-sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
}
.locked-cta .btn {
  margin: 4px 0 0 !important;
  flex-shrink: 0;
}
.post .post-body { padding: 12px 14px; white-space: pre-wrap; word-break: break-word; }
.post .post-body a.mention {
  color: var(--accent, #ec4899);
  font-weight: 600;
  text-decoration: none;
}
.post .post-body a.mention:hover { text-decoration: underline; }

/* XCuties Support inbox row */
.chat-inbox-row.support .chat-inbox-name { color: var(--accent, #ec4899); }
.ph.support-ph {
  display: grid; place-items: center;
  background: linear-gradient(135deg, #ec4899, #a855f7);
  font-size: 16px;
}
.support-pill {
  display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  background: rgba(236, 72, 153, .18); color: var(--accent, #ec4899); vertical-align: 1px;
}

/* ---- Multi-image layouts ---- */
.media-gallery { position: relative; background: #120f16; }
.media-gallery .mg-cell {
  position: relative; overflow: hidden; background: #0a0810;
  min-height: 120px;
}
.media-gallery .mg-cell img,
.media-gallery .mg-cell video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* Legacy .mg-blur kept as no-op: locked media is a pre-blurred teaser URL.
   CSS blur here used to double-blur those assets. */
.media-gallery .mg-cell .mg-blur {
  filter: none;
  transform: none;
}
/* Unlocked videos in multi layouts: show full frame, never crop */
.media-gallery .mg-video {
  aspect-ratio: auto !important;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.media-gallery .mg-video .xc-video {
  width: 100%;
  height: auto;
  max-height: min(70vh, 720px);
  object-fit: contain;
  background: #000;
  display: block;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.media-gallery .mg-audio {
  display: grid; place-items: center; padding: 16px; min-height: 80px;
}
/* “+X more” tile — fills last design slot, opens album view */
.mg-cell.mg-more {
  position: relative;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: #0a0810;
  color: #fff;
  font: inherit;
  aspect-ratio: 1;
  overflow: hidden;
}
.mg-more-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.45) blur(1px);
  transform: scale(1.04);
  pointer-events: none;
}
.mg-more-veil {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(15,13,18,.35), rgba(236,72,153,.28));
  pointer-events: none;
}
.mg-more-label {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-shadow: 0 2px 12px rgba(0,0,0,.65);
  pointer-events: none;
}
.mg-more-plus {
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.mg-more-word {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
}
.mg-cell.mg-more:hover .mg-more-veil {
  background: linear-gradient(160deg, rgba(15,13,18,.25), rgba(236,72,153,.4));
}
.mg-cell.mg-more:hover .mg-more-plus { color: var(--accent); }
.carousel-see-all {
  margin-left: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.carousel-see-all:hover { border-color: var(--accent); }

/* Full album view (all media in a post) */
.media-album {
  position: fixed; inset: 0; z-index: 98;
  background: rgba(6, 4, 10, 0.97);
  display: flex; flex-direction: column;
  backdrop-filter: blur(12px);
}
.media-album.hidden { display: none !important; }
.ma-top {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.ma-close {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(26,22,31,.8); color: #fff;
  font-size: 24px; cursor: pointer; line-height: 1;
}
.ma-title {
  font-size: 16px; font-weight: 800; flex: 1;
}
.ma-count {
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.ma-grid {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  align-content: start;
}
@media (min-width: 720px) {
  .ma-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    padding: 18px 20px 28px;
    gap: 10px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
  }
}
.ma-cell {
  position: relative;
  aspect-ratio: 1;
  border: none;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #1a161f;
  cursor: zoom-in;
  display: block;
}
.ma-cell img,
.ma-cell video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  pointer-events: none;
}
.ma-cell.ma-audio {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; cursor: default; padding: 10px;
  font-size: 28px;
}
.ma-cell.ma-audio audio { width: 100%; max-width: 100%; }
.ma-badge {
  position: absolute; left: 8px; bottom: 8px;
  background: rgba(15,13,18,.75); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 4px 8px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
}
/* multi-lock shares .locked-overlay + .locked-cta rules above */

/* Grid: 2-column equal tiles */
.layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}
.layout-grid .mg-cell { aspect-ratio: 1; }
.layout-grid.count-3 .mg-cell:first-child {
  grid-column: 1 / -1; aspect-ratio: 16/10;
}
.layout-grid.count-1 { grid-template-columns: 1fr; }

/* Mosaic: large square + smaller mixed-size tiles around it */
.layout-mosaic {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(72px, 1fr);
}
.layout-mosaic .mg-cell {
  min-height: 72px;
  aspect-ratio: auto;
}
/* Hero tile — large square */
.layout-mosaic .mg-cell:first-child {
  grid-column: 1 / span 2;
  grid-row: 1 / span 2;
  aspect-ratio: 1;
  min-height: 0;
}
/* 2 images: hero left, tall tile right */
.layout-mosaic.count-2 {
  grid-template-columns: 2fr 1fr;
  grid-auto-rows: minmax(140px, auto);
}
.layout-mosaic.count-2 .mg-cell:first-child {
  grid-column: 1;
  grid-row: 1 / span 2;
}
.layout-mosaic.count-2 .mg-cell:nth-child(2) {
  grid-column: 2;
  grid-row: 1 / span 2;
  aspect-ratio: auto;
  min-height: 100%;
}
/* 3 images: hero + two stacked on the right */
.layout-mosaic.count-3 {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.layout-mosaic.count-3 .mg-cell:first-child {
  grid-column: 1;
  grid-row: 1 / span 2;
}
.layout-mosaic.count-3 .mg-cell:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
  aspect-ratio: 1;
}
.layout-mosaic.count-3 .mg-cell:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
  aspect-ratio: 1;
}
/* 4 images: hero 2×2 + two small top-right + one wide bottom */
.layout-mosaic.count-4 .mg-cell:nth-child(2) {
  grid-column: 3;
  grid-row: 1;
  aspect-ratio: 1;
}
.layout-mosaic.count-4 .mg-cell:nth-child(3) {
  grid-column: 4;
  grid-row: 1;
  aspect-ratio: 1;
}
.layout-mosaic.count-4 .mg-cell:nth-child(4) {
  grid-column: 3 / span 2;
  grid-row: 2;
  aspect-ratio: 2 / 1;
}
/* 5+: hero + mixed spans for smaller tiles */
.layout-mosaic.count-5 .mg-cell:nth-child(2),
.layout-mosaic.count-6 .mg-cell:nth-child(2) {
  grid-column: 3;
  grid-row: 1;
  aspect-ratio: 1;
}
.layout-mosaic.count-5 .mg-cell:nth-child(3),
.layout-mosaic.count-6 .mg-cell:nth-child(3) {
  grid-column: 4;
  grid-row: 1;
  aspect-ratio: 1;
}
.layout-mosaic.count-5 .mg-cell:nth-child(4),
.layout-mosaic.count-6 .mg-cell:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
  aspect-ratio: 1;
}
.layout-mosaic.count-5 .mg-cell:nth-child(5) {
  grid-column: 4;
  grid-row: 2;
  aspect-ratio: 1;
}
.layout-mosaic.count-6 .mg-cell:nth-child(5) {
  grid-column: 3;
  grid-row: 3;
  aspect-ratio: 4 / 3;
}
.layout-mosaic.count-6 .mg-cell:nth-child(6) {
  grid-column: 4;
  grid-row: 2 / span 2;
  aspect-ratio: auto;
  min-height: 100%;
}
@media (max-width: 520px) {
  .layout-mosaic {
    grid-template-columns: 1fr 1fr;
  }
  .layout-mosaic .mg-cell:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 1;
  }
  .layout-mosaic.count-2,
  .layout-mosaic.count-3 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .layout-mosaic.count-2 .mg-cell:first-child,
  .layout-mosaic.count-3 .mg-cell:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .layout-mosaic.count-2 .mg-cell:nth-child(2),
  .layout-mosaic.count-3 .mg-cell:nth-child(2),
  .layout-mosaic.count-3 .mg-cell:nth-child(3) {
    grid-column: auto;
    grid-row: auto;
  }
}

/* Stack: full-width vertical (capped — last tile may be +more) */
.layout-stack {
  display: flex; flex-direction: column; gap: 3px;
}
.layout-stack .mg-cell { aspect-ratio: 4/5; max-height: 520px; }
.layout-stack .mg-cell img { object-fit: cover; }
.layout-stack .mg-cell.mg-more {
  aspect-ratio: 4/5;
  max-height: 520px;
  min-height: 180px;
}
.layout-stack .mg-cell.mg-video {
  aspect-ratio: auto !important;
  max-height: none;
  min-height: 220px;
}
.layout-stack .mg-cell.mg-video .xc-video {
  max-height: min(75vh, 780px);
  object-fit: contain;
}

/* Carousel */
.layout-carousel {
  overflow: hidden;
}
.layout-carousel .carousel-track {
  display: flex; transition: transform .28s ease;
  width: 100%;
  align-items: stretch;
}
.layout-carousel .carousel-track .mg-cell {
  flex: 0 0 100%;
  aspect-ratio: 1;
  min-width: 100%;
}
.layout-carousel .carousel-track .mg-cell.mg-video {
  aspect-ratio: auto !important;
  min-height: 240px;
  background: #000;
}
.layout-carousel .carousel-track .mg-cell.mg-video .xc-video {
  width: 100%;
  height: auto;
  max-height: min(75vh, 780px);
  object-fit: contain;
}
.layout-carousel .carousel-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 8px 12px; background: var(--surface-2, #201b28);
  border-top: 1px solid var(--border);
}
.carousel-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-size: 18px; cursor: pointer; line-height: 1;
}
.carousel-btn:hover { border-color: var(--accent); color: var(--accent); }
.carousel-dots { display: flex; gap: 6px; flex: 1; justify-content: center; }
.carousel-dots .dot {
  width: 7px; height: 7px; border-radius: 50%; border: none;
  background: var(--border); padding: 0; cursor: pointer;
}
.carousel-dots .dot.on { background: var(--accent); }

/* Chat — layout with left inbox */
.chat-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 0;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.chat-layout.chat-layout-inbox-only {
  grid-template-columns: 1fr;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}
@media (max-width: 720px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-inbox { display: none; }
  .chat-layout.chat-layout-inbox-only .chat-inbox { display: flex; }
  .chat-layout.show-inbox-mobile .chat-inbox { display: flex; }
  .chat-layout.show-inbox-mobile .chat-shell { display: none; }
  .main.main-messages { padding: 0; }
  .chat-layout { border-radius: 0; border-left: 0; border-right: 0; }
}
.chat-inbox {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface-2);
  min-height: 0;
  overflow: hidden;
}
.chat-layout-inbox-only .chat-inbox { border-right: none; }
.chat-inbox-head {
  padding: 12px 14px; font-weight: 700; font-size: 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  flex-shrink: 0;
}
.chat-inbox-list {
  flex: 1; overflow-y: auto; min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.chat-inbox-row {
  display: flex; align-items: stretch; gap: 0;
  border-bottom: 1px solid var(--border-soft, var(--border));
  position: relative;
}
.chat-inbox-row:hover { background: rgba(255,255,255,.04); }
.chat-inbox-row.active {
  background: var(--accent-soft, rgba(236,72,153,.12));
  box-shadow: inset 3px 0 0 var(--accent);
}
.chat-inbox-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px 10px 12px; cursor: pointer; border: 0; background: transparent;
  flex: 1; min-width: 0; text-align: left; color: inherit; font: inherit;
  text-decoration: none;
}
.chat-inbox-item img, .chat-inbox-item .ph {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.chat-inbox-meta { min-width: 0; flex: 1; }
.chat-inbox-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-inbox-preview { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.chat-inbox-count {
  flex-shrink: 0; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1;
  background: rgba(255,255,255,.06); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
}
/* Pink = unread only (not total message count) */
.chat-inbox-count.unread {
  background: rgba(236,72,153,.28); color: #fff;
  box-shadow: 0 0 0 1px rgba(236,72,153,.35);
}
.chat-inbox-count.zero { background: rgba(255,255,255,.06); color: var(--muted); font-weight: 600; }
.chat-inbox-row.has-unread .chat-inbox-name { font-weight: 750; }
.chat-inbox-row.active .chat-inbox-count.unread { display: none; }
.chat-inbox-trash,
.chat-head-trash,
.chat-head-mute {
  flex-shrink: 0;
  align-self: center;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; margin-right: 8px;
  border: 0; border-radius: 10px;
  background: transparent; color: var(--muted);
  cursor: pointer; padding: 0;
  transition: color .12s, background .12s;
}
.chat-inbox-trash:hover,
.chat-head-trash:hover {
  color: #f87171;
  background: rgba(248,113,113,.12);
}
.chat-head-mute { margin-right: 0; margin-left: 4px; }
.chat-head-mute:hover {
  color: var(--accent-300, #f9a8d4);
  background: rgba(236, 72, 153, .12);
}
.chat-head-mute.is-muted {
  color: #f87171;
}
.chat-head-mute.is-muted:hover {
  color: #fca5a5;
  background: rgba(248,113,113,.12);
}
.chat-head-trash { margin-right: 0; margin-left: 4px; }
.chat-trash-svg,
.chat-mute-svg { display: block; pointer-events: none; }
.chat-inbox-ctx {
  position: fixed; z-index: 80; min-width: 160px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.45); padding: 4px; display: none;
}
.chat-inbox-ctx.open { display: block; }
.chat-inbox-ctx button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  color: inherit; font: inherit; font-size: 13px; padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.chat-inbox-ctx button:hover { background: rgba(248,113,113,.12); color: #f87171; }

.chat-shell {
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
  background: var(--surface);
  overflow: hidden;
}
.chat-back-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px 0;
  flex-shrink: 0;
}
.chat-back {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted, #8d859c);
  text-decoration: none;
  text-align: left;
}
.chat-back:hover { color: var(--text-dim, #b7b0c4); text-decoration: underline; }
.chat-mobile-chats {
  display: none;
  appearance: none; border: 0; background: transparent;
  font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--accent, #ec4899); cursor: pointer; padding: 0;
}
.chat-mobile-chats:hover { text-decoration: underline; }
@media (max-width: 720px) {
  .chat-mobile-chats { display: inline-block; }
}
.chat-shell-empty {
  display: grid; place-items: center; padding: 24px;
  min-height: 0;
}
.chat-empty-pane {
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.chat-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px 12px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
  flex-shrink: 0;
}
.chat-head a.chat-head-link {
  display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1;
  color: inherit; text-decoration: none;
}
.chat-head a.chat-head-link:hover .n { color: var(--accent-300, #f9a8d4); }
.chat-head img, .chat-head .ph {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: grid; place-items: center; font-weight: 700; flex-shrink: 0;
}
.chat-head .n { font-weight: 700; font-size: 15px; }
.chat-premium {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; color: #f9a8d4;
}
.chat-search-bar {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  background: var(--bg-2, var(--surface-2));
  flex-shrink: 0;
}
.chat-search-bar input {
  flex: 1; min-width: 120px; border-radius: 10px; font-size: 13px;
  padding: 7px 10px; border: 1px solid var(--border); background: var(--surface); color: inherit;
}
.chat-search-nav { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.chat-search-nav button {
  appearance: none; border: 1px solid var(--border); background: var(--surface);
  color: inherit; border-radius: 8px; padding: 4px 8px; cursor: pointer; font-size: 12px;
}
.chat-search-nav button:disabled { opacity: .4; cursor: default; }
.chat-msgs {
  flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.chat-msgs .bubble.search-hit {
  outline: 2px solid rgba(236,72,153,.55);
  box-shadow: 0 0 0 3px rgba(236,72,153,.15);
}
.chat-load-more {
  align-self: center; font-size: 11px; color: var(--muted); padding: 4px 8px;
}
.bubble {
  max-width: 78%; padding: 9px 12px; border-radius: 15px;
  overflow-wrap: anywhere;
}
.bubble.in {
  align-self: flex-end; background: var(--bg-2); border: 1px solid var(--border);
  border-bottom-right-radius: 4px;
}
.bubble.out {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(236,72,153,.92), rgba(219,39,119,.92));
  color: #fff; border-bottom-left-radius: 4px;
}
/* Photo/video + caption: always stack (image on top, text below) like SMS/iMessage */
.bubble .bubble-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}
.bubble-media {
  display: block;
  width: 100%;
  line-height: 0;
  margin: 0;
  flex-shrink: 0;
}
.bubble-caption {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
/* Media bubbles: tighter padding around the image, caption padded below */
.bubble.has-media {
  padding: 4px;
  max-width: min(280px, 78%);
  overflow: hidden;
}
.bubble.has-media.has-caption .bubble-caption {
  padding: 8px 8px 4px;
}
.bubble.has-media .bubble-quote {
  margin: 4px 4px 6px;
}
.bubble.has-media .t {
  padding: 0 6px 4px;
}
.bubble img, .bubble video {
  max-width: 100%;
  width: 100%;
  border-radius: 12px;
  display: block;
  margin: 0;
}
/* Chat media thumbs — fill bubble width; caption always underneath */
.bubble .chat-thumb {
  max-width: 100%; max-height: 320px; width: 100%; height: auto;
  border-radius: 12px; display: block; cursor: zoom-in;
  object-fit: cover; margin: 0;
}
.bubble .chat-thumb-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
}
.bubble .chat-video-wrap {
  display: block;
  width: 100%;
  margin: 0;
}
.bubble .chat-video-wrap video,
.bubble .chat-video {
  width: 100%;
  max-height: 320px;
  border-radius: 12px;
  display: block;
}
.bubble-media audio {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 4px 0;
}
/* Custom-request multi-media: one package, one unlock */
.bubble.bubble-album { max-width: min(320px, 88%); }
.chat-album { position: relative; }
.chat-album-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  border-radius: 12px;
  overflow: hidden;
  max-width: 280px;
}
.chat-album-grid .chat-album-tile {
  position: relative;
  aspect-ratio: 1;
  background: #120f16;
  overflow: hidden;
}
.chat-album-grid .chat-album-tile .chat-thumb,
.chat-album-grid .chat-album-tile .protect-media,
.chat-album-grid .chat-album-tile img,
.chat-album-grid .chat-album-tile video {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover;
  border-radius: 0;
  margin: 0;
  display: block;
}
/* Locked chat albums already use blurred_url teasers — no extra CSS blur. */
.chat-album.locked .chat-album-grid {
  filter: none;
  transform: none;
  pointer-events: none;
  opacity: 0.92;
}
.chat-album-cta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.chat-album-cta button {
  font-size: 13px; font-weight: 700; padding: 10px 12px; border-radius: 999px;
  border: none; cursor: pointer;
  background: #fff; color: var(--accent-600);
}
.chat-album-cta button:hover { filter: brightness(1.04); }
.chat-album-count {
  font-size: 11px; color: rgba(255,255,255,.75); text-align: center;
}
/* Locked DM thumbs are already blurred teasers from the API (no CSS blur). */
.bubble .chat-thumb-wrap.locked .chat-thumb {
  filter: none;
  transform: none;
  cursor: pointer;
}
.bubble .chat-lock-cta {
  position: absolute; inset: 0; z-index: 4; display: grid; place-items: center;
  background: rgba(10,8,14,.45); border-radius: 12px; padding: 8px; text-align: center;
}
.bubble .chat-lock-cta button {
  font-size: 12px; padding: 6px 10px; border-radius: 999px;
  border: none; background: #fff; color: var(--accent-600); font-weight: 700; cursor: pointer;
}
.bubble .t { font-size: 10px; opacity: .65; margin-top: 3px; }
/* Reaction chips under bubble — tappable like iMessage/Telegram */
.bubble-reacts {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: -4px;
  margin-bottom: 2px;
  position: relative; z-index: 2;
  padding: 0 4px;
}
.bubble-row.is-in .bubble-reacts { justify-content: flex-end; }
.bubble-row.is-out .bubble-reacts { justify-content: flex-start; }
.bubble-react {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 24px; padding: 0 7px;
  border-radius: 999px;
  background: var(--surface, #1a1620);
  border: 1px solid var(--border, rgba(255,255,255,.12));
  font-size: 14px; line-height: 1;
  /* Color emoji fonts — avoid monochrome text glyphs (black ❤) */
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  cursor: pointer;
  transition: transform .1s, border-color .1s, background .1s;
  color: inherit;
}
.bubble-react:hover { transform: scale(1.08); border-color: rgba(236,72,153,.45); }
.bubble-react.is-mine {
  background: rgba(236, 72, 153, .18);
  border-color: rgba(236, 72, 153, .45);
}
.bubble-react-add {
  opacity: 0; pointer-events: none;
  color: var(--muted); font-size: 14px; font-weight: 600;
}
.bubble-row:hover .bubble-react-add {
  opacity: 1; pointer-events: auto;
}
@media (hover: none) {
  .bubble-react-add { display: none; }
}
.sys-bubble.crisis-card .crisis-call {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
  color: #93c5fd;
  background: rgba(59, 130, 246, .14);
  border: 1px solid rgba(59, 130, 246, .35);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px; font-weight: 600;
}
.sys-bubble.crisis-card .crisis-call:hover {
  background: rgba(59, 130, 246, .22);
  color: #bfdbfe;
}
.bubble .paybtn {
  display: block; margin-top: 8px; background: #fff; color: var(--accent-600);
  font-weight: 700; text-align: center; padding: 9px; border-radius: 10px;
  text-decoration: none; border: none; width: 100%; cursor: pointer; font-size: 13px;
}
/* System bubbles (custom request accept / counter) — padded, 2px radius */
.sys-bubble {
  align-self: center;
  max-width: 88%;
  text-align: center;
  margin: 4px 0;
}
.sys-bubble-inner {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 2px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
}
.sys-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
  flex-wrap: wrap;
}
.sys-action {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.sys-action:hover { border-color: var(--accent); color: var(--accent); }
.sys-bubble .t { font-size: 10px; opacity: .55; margin-top: 4px; }
.custom-req-card {
  padding: 18px 20px !important;
  box-sizing: border-box;
}
.custom-req-card h3 { margin: 0 0 10px; font-size: 16px; }
.custom-req-card .cr-lead {
  font-size: 13px; line-height: 1.5; color: var(--text-dim, #b7b0c4);
  margin: 0 0 14px;
}
.custom-req-card .input {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: inherit;
  padding: 8px 10px;
}
.cr-type-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px;
}
.cr-type-btn {
  appearance: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text-dim);
  transition: border-color .12s, background .12s, color .12s;
}
.cr-type-btn:hover { border-color: rgba(236,72,153,.4); color: var(--text); }
.cr-type-btn.on {
  border-color: rgba(236,72,153,.55);
  background: var(--accent-soft, rgba(236,72,153,.14));
  color: var(--accent-300, #f9a8d4);
}
.cr-offer-pills {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 6px 0 8px;
}
.cr-offer-pill {
  appearance: none; cursor: pointer; font: inherit;
  font-size: 13px; font-weight: 700;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(236, 72, 153, 0.22);
  background:
    linear-gradient(145deg, rgba(236,72,153,.1), rgba(168,85,247,.08)),
    var(--bg-2);
  color: var(--text-dim);
  transition: border-color .12s, background .12s, color .12s, box-shadow .12s;
}
.cr-offer-pill:hover {
  color: var(--text);
  border-color: rgba(236,72,153,.45);
}
.cr-offer-pill.on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.28);
}
.chat-status {
  flex-shrink: 0;
  align-self: flex-start; font-size: 12px; color: var(--muted);
  padding: 4px 10px; font-style: italic;
}
.chat-status .dots::after {
  content: '';
  animation: xcdots 1.2s steps(4, end) infinite;
}
@keyframes xcdots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}
.chat-compose {
  display: flex; gap: 8px; padding: 10px 12px;
  border-top: 1px solid var(--border); background: var(--surface-2);
  flex-shrink: 0;
}
.chat-compose input { flex: 1; border-radius: 12px; }

/* Fullscreen image lightbox + zoom / finder */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.9);
  display: flex; flex-direction: column;
  padding: 0;
  cursor: default;
  /* override relative z-index from earlier rule */
  position: fixed;
  z-index: 100;
}
.lightbox.hidden { display: none !important; }
.lightbox .lb-close {
  position: absolute; top: 12px; right: 14px; z-index: 6;
  background: rgba(15,13,18,.55); border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: 24px; cursor: pointer; line-height: 1;
  width: 40px; height: 40px; border-radius: 12px;
  backdrop-filter: blur(8px);
}
.lightbox .lb-close:hover { background: rgba(15,13,18,.8); }

.lb-stage {
  flex: 1; min-height: 0; position: relative;
  overflow: hidden;
  cursor: default;
  touch-action: none;
  display: flex; align-items: center; justify-content: center;
}
.lightbox.is-zoomed .lb-stage { cursor: grab; }
.lb-stage.is-panning { cursor: grabbing; }
.lb-canvas {
  transform-origin: center center;
  will-change: transform;
  position: relative;
  user-select: none;
  max-width: 100%;
  max-height: 100%;
}
.lb-canvas img,
.lb-canvas video,
.lb-canvas .protect-img {
  display: block;
  max-width: min(96vw, 1100px);
  max-height: calc(100vh - 110px);
  width: auto; height: auto;
  border-radius: 8px;
  object-fit: contain;
  pointer-events: none; /* pan/zoom handled on stage */
}
.lb-canvas .protect-media {
  width: auto;
  height: auto;
  max-width: min(96vw, 1100px);
  max-height: calc(100vh - 110px);
}
.lb-canvas video {
  pointer-events: auto; /* keep native video controls clickable */
  max-height: calc(100vh - 110px);
}

.lb-toolbar {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.55));
  z-index: 5;
}
.lb-tool {
  min-width: 36px; height: 34px; padding: 0 10px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(26,22,31,.85); color: #fff;
  font-weight: 700; font-size: 16px; cursor: pointer;
}
.lb-tool:hover { border-color: var(--accent); color: var(--accent-300, #f9a8d4); }
.lb-zoom-slider {
  width: min(220px, 40vw);
  accent-color: var(--accent);
  cursor: pointer;
}
.lb-zoom-label {
  min-width: 48px; text-align: center;
  font-size: 12px; font-weight: 700; color: #e7e7ee;
  font-variant-numeric: tabular-nums;
}
.lb-hint {
  position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%);
  margin: 0; font-size: 11px; color: rgba(255,255,255,.45);
  pointer-events: none; z-index: 4;
  white-space: nowrap;
}
.lightbox.is-video .lb-toolbar,
.lightbox.is-video .lb-finder,
.lightbox.is-video .lb-hint { display: none; }
.lightbox.is-video .lb-stage { cursor: default; }
.lightbox.is-video .lb-canvas video {
  max-width: min(96vw, 1100px);
  max-height: 90vh;
  pointer-events: auto;
}

/* Mini-map finder */
.lb-finder {
  position: absolute; left: 16px; bottom: 64px; z-index: 5;
  width: 140px; height: 100px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px; overflow: hidden;
  background: rgba(15,13,18,.75);
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  cursor: crosshair;
  display: none; /* shown when zoomed */
}
.lightbox.is-zoomed .lb-finder { display: block; }
.lb-finder img {
  width: 100%; height: 100%; object-fit: contain;
  display: block; opacity: .85; pointer-events: none;
  max-width: none; max-height: none; border-radius: 0;
}
.lb-finder-viewport {
  position: absolute;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 1px rgba(0,0,0,.5);
  background: rgba(236, 72, 153, 0.18);
  pointer-events: none;
  box-sizing: border-box;
  min-width: 8px; min-height: 8px;
}
@media (max-width: 560px) {
  .lb-finder { width: 110px; height: 80px; left: 10px; bottom: 58px; }
  .lb-hint { display: none; }
  .lb-zoom-slider { width: min(140px, 36vw); }
}

/* ---- Post Showcase (full-screen feed) ---- */
.showcase {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(6, 4, 10, 0.96);
  display: flex; flex-direction: column;
  backdrop-filter: blur(12px);
}
.showcase.hidden { display: none !important; }
.sc-close {
  position: absolute; top: 12px; right: 14px; z-index: 6;
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(26,22,31,.8); color: #fff;
  font-size: 24px; cursor: pointer; line-height: 1;
}
.sc-nav {
  position: absolute; top: 50%; transform: translateY(-60%);
  z-index: 5; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(26,22,31,.75); color: #fff;
  font-size: 28px; cursor: pointer; line-height: 1;
  display: grid; place-items: center;
  backdrop-filter: blur(8px);
}
.sc-nav:hover { border-color: var(--accent); color: var(--accent); }
.sc-prev { left: 14px; }
.sc-next { right: 14px; }
.sc-stage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 64px 12px;
  overflow: auto;
}
.sc-stage .post {
  max-width: min(720px, 100%);
  width: 100%;
  margin: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.sc-stage .post { cursor: default; }
/* Showcase: give videos room — don't force square crop */
.sc-stage .post-media-video .xc-video {
  max-height: min(62vh, 680px);
}
.sc-stage .media-gallery .mg-video .xc-video {
  max-height: min(58vh, 640px);
}
.sc-meta {
  flex-shrink: 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 8px 20px 6px;
  max-width: 900px; width: 100%; margin: 0 auto;
}
.sc-caption {
  color: var(--text-dim); font-size: 13px; line-height: 1.45;
  flex: 1; white-space: pre-wrap;
}
.sc-counter {
  color: var(--muted); font-size: 12px; font-weight: 700;
  white-space: nowrap; padding-top: 2px;
}
.sc-film-wrap {
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(10,8,14,.92);
  padding: 10px 12px 14px;
  overflow: hidden;
}
.sc-film {
  display: flex; gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding-bottom: 4px;
  /* hide scrollbar but keep scroll */
  scrollbar-width: thin;
  scrollbar-color: #3d3548 transparent;
}
.sc-film::-webkit-scrollbar { height: 6px; }
.sc-film::-webkit-scrollbar-thumb { background: #3d3548; border-radius: 4px; }
.sc-thumb {
  flex: 0 0 auto;
  width: 72px; height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #1a161f;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.sc-thumb img, .sc-thumb video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  pointer-events: none;
}
.sc-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(236,72,153,.4);
}
.sc-thumb .sc-lock {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(0,0,0,.45);
  font-size: 16px;
}
.sc-thumb.audio-thumb {
  display: grid; place-items: center;
  color: var(--text-dim); font-size: 22px;
}
.sc-thumb .sc-empty {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  color: var(--text-dim); font-size: 18px;
}
.sc-nav.hidden { display: none !important; }
.sc-hint {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  margin: 0; font-size: 11px; color: rgba(255,255,255,.4);
  pointer-events: none; z-index: 4; white-space: nowrap;
}
@media (max-width: 640px) {
  .sc-stage { padding: 48px 12px 8px; }
  .sc-nav { width: 40px; height: 40px; font-size: 24px; }
  .sc-prev { left: 6px; }
  .sc-next { right: 6px; }
  .sc-thumb { width: 60px; height: 60px; }
  .sc-hint { display: none; }
}

/* ---- Themed modal (tips, etc.) ---- */
.modal-root {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; padding: 20px;
  background: rgba(8, 6, 12, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.modal-root.hidden { display: none !important; }
.modal-card {
  width: 100%; max-width: 400px;
  background:
    radial-gradient(400px 180px at 90% -20%, rgba(236, 72, 153, 0.18), transparent 55%),
    radial-gradient(320px 160px at -10% 0%, rgba(168, 85, 247, 0.14), transparent 50%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  padding: 22px 22px 20px;
  position: relative;
}
.modal-card .modal-x {
  position: absolute; top: 12px; right: 14px;
  background: transparent; border: none; color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.modal-card .modal-x:hover { color: var(--text); }
.modal-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 6px;
}
.modal-card h2 {
  margin: 0 0 6px; font-size: 20px; font-weight: 800;
}
.modal-card .modal-sub {
  margin: 0 0 16px; color: var(--text-dim); font-size: 13px;
}
.saved-card-amount {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin: 0 0 14px; padding: 12px 14px;
  border-radius: 12px; background: rgba(236, 72, 153, 0.1);
  border: 1px solid rgba(236, 72, 153, 0.28);
}
.saved-card-amount-label {
  font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.saved-card-amount-value {
  font-size: 22px; font-weight: 800; color: var(--text);
}
.saved-card-picker {
  position: relative;
  margin: 0 0 16px;
}
.saved-card-row,
.saved-card-trigger {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  margin: 0; padding: 12px 14px;
  border-radius: 12px; background: var(--bg);
  border: 1px solid var(--border);
  font-size: 14px; font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.saved-card-trigger:hover {
  border-color: rgba(236, 72, 153, 0.45);
}
.saved-card-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.35);
}
.saved-card-icon { font-size: 18px; line-height: 1; flex-shrink: 0; }
.saved-card-label { color: var(--text); flex: 1; min-width: 0; }
.saved-card-chevron {
  color: var(--muted); font-size: 12px; margin-left: auto;
  transition: transform .15s ease;
}
.saved-card-trigger[aria-expanded="true"] .saved-card-chevron {
  transform: rotate(180deg);
}
.saved-card-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  z-index: 5;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  padding: 4px;
}
.saved-card-menu.hidden { display: none !important; }
.saved-card-option {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  border: none; background: transparent;
  color: var(--text);
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.saved-card-option:hover {
  background: rgba(236, 72, 153, 0.1);
}
.saved-card-option.is-selected {
  background: rgba(236, 72, 153, 0.14);
}
.saved-card-option-text { flex: 1; min-width: 0; }
.saved-card-check {
  color: var(--accent); font-size: 13px;
}
#saved-card-yes:disabled { opacity: .65; cursor: wait; }
.tip-presets {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px;
}
.tip-preset {
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); border-radius: 12px; padding: 12px 6px;
  font-weight: 700; font-size: 14px; cursor: pointer;
}
.tip-preset:hover { border-color: #4a4158; }
.tip-preset.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-600));
  color: #fff;
}
.tip-custom-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.tip-custom-row .currency {
  color: var(--muted); font-weight: 700; font-size: 16px;
}
.tip-custom-row input {
  flex: 1; background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; color: var(--text); font-size: 16px;
  outline: none;
}
.tip-custom-row input:focus { border-color: var(--accent); }
.modal-actions {
  display: flex; flex-direction: column; gap: 8px; margin-top: 4px;
}
.modal-actions .btn { width: 100%; }
.modal-actions-row {
  flex-direction: row;
  flex-wrap: wrap;
}
.modal-actions-row .btn { width: auto; flex: 1 1 120px; }
.modal-card-sm { max-width: 380px; }
.btn-danger {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  border-color: transparent;
  color: #fff;
}
.btn-danger:hover { filter: brightness(1.06); }
.modal-note {
  text-align: center; font-size: 11px; color: var(--muted); margin-top: 10px;
}

/* ---- Stripe checkout: layout that never scrunches or overlays footer ----
 * Card scrolls as a whole; form mount never flex-shrinks; footer is solid
 * and always below the Stripe mount (Embedded iframe cannot paint over it).
 */
.stripe-checkout-root {
  /* Override grid place-items so tall forms scroll inside the overlay */
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.stripe-checkout-card {
  width: min(560px, calc(100vw - 32px));
  max-width: min(560px, calc(100vw - 32px));
  /* No max-height squeeze — the overlay scrolls; form keeps natural height */
  max-height: none;
  margin: 0 auto 32px;
  padding: 24px 24px 18px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background:
    radial-gradient(480px 200px at 90% -20%, rgba(236, 72, 153, 0.16), transparent 55%),
    radial-gradient(360px 180px at -10% 0%, rgba(168, 85, 247, 0.12), transparent 50%),
    var(--surface);
  border-color: var(--border);
}
.stripe-checkout-head {
  flex: 0 0 auto;
  padding-right: 28px; /* room for × */
}
.stripe-checkout-card .modal-sub {
  margin-bottom: 12px;
}
/* Explicit total — Stripe Payment Element only shows card fields, not amount */
.stripe-checkout-amount {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(236, 72, 153, 0.08);
}
.stripe-checkout-amount.hidden {
  display: none;
}
.stripe-amount-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #b7b0c4);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.stripe-amount-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text, #ece9f1);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
/* Mount: grow with Stripe content — never flex-shrink (was scrunching PE) */
.stripe-checkout-mount {
  width: 100%;
  flex: 0 0 auto;
  flex-shrink: 0 !important;
  min-height: 0;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
  overflow: visible;
  background: transparent;
  border-radius: 14px;
  /* Contain paint of iframes so they don't bleed over footer */
  isolation: isolate;
}
.stripe-pe-form {
  width: 100%;
  min-height: 280px;
  padding: 4px 0 8px;
  /* Stripe PE needs a stable width; prevent mid-load collapse */
  min-width: 100%;
  box-sizing: border-box;
}
/* Solid footer — never transparent, always above any iframe overflow */
.stripe-checkout-footer {
  flex: 0 0 auto;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  /* Match card edge so gradient doesn't show through as "holes" */
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}
.stripe-checkout-actions:empty {
  display: none;
}
.stripe-checkout-actions:not(:empty) {
  margin-bottom: 10px;
}
.stripe-pay-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-600)) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 18px;
  border-radius: 12px;
  letter-spacing: 0.01em;
  cursor: pointer;
}
.stripe-pay-btn:hover:not(:disabled) {
  filter: brightness(1.06);
}
.stripe-pay-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}
/* Not btn-ghost — transparent ghost was invisible over the form */
.stripe-checkout-cancel {
  width: 100%;
  margin-top: 0;
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-dim) !important;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 12px;
  opacity: 1 !important;
  position: relative;
  z-index: 6;
  cursor: pointer;
}
.stripe-checkout-cancel:hover {
  border-color: #4a4158 !important;
  color: var(--text) !important;
  background: var(--bg-2) !important;
}
.stripe-checkout-footer .modal-note {
  margin-top: 12px;
  margin-bottom: 0;
}
.stripe-checkout-footer .err {
  margin-bottom: 10px;
}

/* Embedded Checkout iframe mode needs a wider card + tall mount */
.stripe-mode-embedded .stripe-checkout-card {
  width: min(900px, calc(100vw - 32px));
  max-width: min(900px, calc(100vw - 32px));
}
.stripe-mode-embedded .stripe-checkout-mount {
  min-height: 520px;
  /* Clip iframe so it cannot cover the footer */
  overflow: hidden;
  border-radius: 12px;
  background: #1a161f;
}
.stripe-mode-embedded .stripe-checkout-mount iframe {
  width: 100% !important;
  min-height: 520px !important;
  max-width: 100%;
  border: 0;
  border-radius: 12px;
  background: #1a161f;
  display: block;
  position: relative;
  z-index: 1;
}

/* Payment Element: natural height, stable width — no post-load scrunch */
.stripe-mode-pe .stripe-checkout-card {
  width: min(520px, calc(100vw - 32px));
  max-width: min(520px, calc(100vw - 32px));
}
.stripe-mode-pe .stripe-checkout-mount {
  min-height: 300px;
  overflow: visible;
  background: transparent;
}

@media (min-width: 900px) {
  .stripe-mode-pe .stripe-checkout-card {
    width: min(540px, calc(100vw - 48px));
    max-width: min(540px, calc(100vw - 48px));
    padding: 28px 32px 22px;
  }
  .stripe-mode-embedded .stripe-checkout-card {
    width: min(920px, calc(100vw - 48px));
    max-width: min(920px, calc(100vw - 48px));
    padding: 28px 32px 22px;
  }
  .stripe-mode-embedded .stripe-checkout-mount,
  .stripe-mode-embedded .stripe-checkout-mount iframe {
    min-height: 560px !important;
  }
}
@media (max-width: 640px) {
  .stripe-checkout-root { padding: 12px 8px; }
  .stripe-checkout-card {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    margin-bottom: 16px;
    padding: 18px 14px 14px;
    border-radius: 16px;
  }
  .stripe-mode-embedded .stripe-checkout-mount,
  .stripe-mode-embedded .stripe-checkout-mount iframe {
    min-height: 420px !important;
  }
  .stripe-pe-form { min-height: 260px; }
}

/* Didit age verification modal (themed to match /app) */
.age-verify-root {
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 6, 12, 0.72);
  backdrop-filter: blur(8px);
}
.age-verify-root.hidden { display: none !important; }
.age-verify-card {
  width: min(480px, calc(100vw - 24px));
  max-height: min(92vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(165deg, #1a1520 0%, #120e18 55%, #0f0d12 100%);
  border: 1px solid rgba(236, 72, 153, 0.28);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
.age-verify-head { margin-bottom: 8px; }
.age-verify-frame-wrap {
  flex: 1 1 auto;
  min-height: 420px;
  height: min(62vh, 560px);
  border-radius: 12px;
  overflow: hidden;
  background: #0a0810;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin: 8px 0 10px;
}
.age-verify-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0a0810;
}
@media (max-width: 560px) {
  .age-verify-card {
    width: calc(100vw - 12px);
    max-height: 96vh;
    border-radius: 14px;
  }
  .age-verify-frame-wrap {
    min-height: 50vh;
    height: min(70vh, 640px);
  }
}

.page-title { margin: 0 0 16px; font-size: 22px; }
.badge {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.badge.ok { background: rgba(52,211,153,.15); color: var(--green); }

/* ---- Account page (/account) ---- */
.account-page { max-width: 640px; }
.account-section-title {
  font-size: 16px;
  margin: 0 0 6px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.account-identity-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.account-avatar-lg {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(236, 72, 153, 0.28), rgba(168, 85, 247, 0.22));
  border: 1px solid rgba(236, 72, 153, 0.4);
  color: #f9a8d4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 16px rgba(0, 0, 0, 0.25);
}
.account-avatar-lg .nav-account-icon {
  width: 26px;
  height: 26px;
}
.account-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px;
  margin: 0 0 20px;
}
/* Stripe portal entry — framed panel (hosted page opens on click; cannot iframe) */
.billing-portal-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(236, 72, 153, 0.08), rgba(168, 85, 247, 0.06)),
    var(--surface);
  border-color: rgba(236, 72, 153, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.billing-portal-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.08);
}
.billing-portal-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.billing-portal-copy { flex: 1 1 220px; min-width: 0; }

.purchases-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.purchase-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.purchase-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.purchase-amount {
  font-size: 15px;
  letter-spacing: 0.01em;
}
.purchase-when {
  font-size: 12px;
}
.purchase-meta {
  margin-top: 4px;
  font-size: 13px;
}
.purchase-creator {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.purchase-creator:hover {
  color: var(--accent);
}
.purchase-badges {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.purchase-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.purchase-thumb {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.purchase-thumb:hover,
.purchase-thumb:focus-visible {
  transform: scale(1.06);
  border-color: rgba(236, 72, 153, 0.55);
  box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.25);
  outline: none;
}
.purchase-thumb img,
.purchase-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.purchase-thumb-ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--muted);
  background: linear-gradient(145deg, rgba(236, 72, 153, 0.12), rgba(168, 85, 247, 0.1));
}
.purchase-thumb-video-badge {
  position: absolute;
  right: 3px;
  bottom: 3px;
  font-size: 10px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  pointer-events: none;
}
.purchase-thumb-more {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

/* Full-screen purchased media viewer */
.purchase-viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(6, 4, 10, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 56px 72px;
  box-sizing: border-box;
}
.purchase-viewer.hidden { display: none; }
.pv-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.pv-close:hover { background: rgba(255, 255, 255, 0.18); }
.pv-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
}
.pv-nav:hover { background: rgba(236, 72, 153, 0.35); }
.pv-nav:disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}
.pv-prev { left: 10px; }
.pv-next { right: 10px; }
.pv-stage {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 960px;
  display: grid;
  place-items: center;
}
.pv-stage .protect-media,
.pv-stage img,
.pv-stage video {
  max-width: 100%;
  max-height: min(72vh, 820px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}
.pv-stage video {
  background: #000;
  width: min(100%, 900px);
}
.pv-meta {
  flex: 0 0 auto;
  text-align: center;
  margin-top: 14px;
  max-width: 640px;
  padding: 0 8px;
}
.pv-caption {
  font-size: 14px;
  font-weight: 600;
  color: #f5f0f7;
}
.pv-counter {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}
.pv-hint {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin: 0;
  pointer-events: none;
}
@media (max-width: 640px) {
  .purchase-viewer { padding: 52px 12px 64px; }
  .pv-nav { width: 40px; height: 40px; font-size: 28px; }
  .pv-prev { left: 4px; }
  .pv-next { right: 4px; }
  .purchase-thumb { width: 48px; height: 48px; }
}

@media (max-width: 560px) {
  /* Keep Messages visible so unread "Messages (N)" works on every page */
  .nav-msg-badge { display: none !important; } /* label already has (N) */
  .profile-banner { height: 100px; }
  .brand-logo {
    height: 36px;
    max-width: min(150px, 42vw);
  }
  .nav-account.is-signed-in {
    max-width: min(220px, 56vw);
    padding: 3px 8px 3px 3px;
    gap: 6px;
  }
  .nav-account .nav-premium {
    padding: 2px 7px;
    font-size: 10.5px;
  }
  .nav-account-avatar {
    width: 26px;
    height: 26px;
  }
  .nav-account-name {
    font-size: 12.5px;
  }
  .nav-account-menu {
    min-width: 180px;
    right: -4px;
  }
  .billing-portal-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .billing-portal-inner .btn {
    width: 100%;
  }
}

/* ---- Stories row (profile bubbles) — true circles ---- */
.profile-hero-compact .stories-row {
  padding: 14px 0 4px;
  margin: 10px 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.stories-row {
  padding: 4px 0 14px;
  margin: 0 0 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.stories-row-track {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 6px 2px 4px;
  min-width: min-content;
}
.story-bubble {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  flex: 0 0 72px;
  color: inherit;
  font: inherit;
}
/* Gradient ring: fixed square so it never becomes an oval */
.story-bubble-ring {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  max-width: 64px;
  max-height: 64px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, #ec4899, #a855f7 40%, #f472b6 70%, #f59e0b);
  display: block;
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
}
.story-bubble-ring.locked {
  background: linear-gradient(135deg, #a78bfa, #ec4899 50%, #fbbf24);
}
.story-bubble.is-open .story-bubble-ring {
  background: linear-gradient(135deg, #ec4899, #c084fc, #f9a8d4);
}
.story-bubble.is-premium.is-locked .story-bubble-ring {
  background: linear-gradient(135deg, #c4b5fd, #e9d5ff, #fde68a);
}
/* Inner disc holds media — fills ring inset */
.story-bubble-inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #120f16;
  position: relative;
  box-sizing: border-box;
  border: 2px solid var(--surface, #1a161f);
}
.story-bubble-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border: none;
  border-radius: 0;
}
.story-bubble-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: #120f16;
}
.story-bubble-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
  background: rgba(15, 13, 18, 0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
/* Locked premium: solid dark disc + gold padlock (mock) */
.story-bubble-locked-prem {
  background: #1a1520 !important;
  border-color: transparent !important;
  display: grid !important;
  place-items: center;
}
.story-bubble-lock-icon {
  font-size: 22px;
  line-height: 1;
  filter: grayscale(0) drop-shadow(0 1px 2px rgba(0,0,0,0.5));
  /* gold lock look */
  color: #fbbf24;
}
.story-price-under {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  max-width: 76px;
  color: var(--text-secondary, #b7b0c4);
  letter-spacing: 0.01em;
}
.story-bubble-all .story-unlock-all-ring {
  background: linear-gradient(135deg, #f472b6, #a855f7 45%, #fb923c);
  padding: 2.5px;
}
.story-unlock-all-face {
  display: grid !important;
  place-items: center;
  background: #141018 !important;
  border: 2px solid transparent !important;
}
.story-unlock-all-face-text {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-align: center;
  color: #fff;
  text-transform: uppercase;
}
.story-unlock-all-price {
  color: #e7e5ea;
  font-weight: 700;
  font-size: 12px;
}

/* Explore / Top Creators: animated story ring — larger circle than plain avatars so
   the photo + “View Stories” hover label fit. Layering matches profile
   (::before ring → ::after surface → img clipped to circle on top). */
.ex-avatar.ex-avatar-stories {
  appearance: none;
  border: none;
  /* Tuned so the photo sits cleanly inside the spin ring */
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  padding: 3px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  isolation: isolate;
  /* Ring draws outside via negative inset; photo is clipped on the img itself */
  overflow: visible;
  box-shadow: none;
  background: transparent;
  display: block;
  box-sizing: border-box;
  transition: transform .15s ease;
  flex-shrink: 0;
}
.ex-card-lg .ex-avatar.ex-avatar-stories {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
}
.ex-avatar-stories::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #ec4899,
    #a855f7,
    #f59e0b,
    #34d399,
    #38bdf8,
    #ec4899
  );
  animation: profile-stories-spin 2.8s linear infinite;
  z-index: 0;
  pointer-events: none;
}
.ex-avatar-stories::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--surface, #1a161f);
  z-index: 1;
  pointer-events: none;
}
.ex-avatar-stories .ex-avatar-img {
  /* DOM-tuned crop: fills the ring without spilling past the circle */
  position: absolute;
  top: 0;
  left: 1px;
  z-index: 2;
  width: 57px;
  height: 57px;
  margin-left: -2px;
  margin-top: -1px;
  border: none;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  object-position: center;
  clip-path: circle(50% at 50% 50%);
  -webkit-clip-path: circle(50% at 50% 50%);
  overflow: hidden;
}
.ex-avatar-stories .ex-avatar-letter {
  position: absolute;
  inset: 3px;
  z-index: 2;
  margin: 0;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  overflow: hidden;
}
.ex-card-lg .ex-avatar-stories .ex-avatar-img {
  width: 70px;
  height: 71px;
}
.ex-card-lg .ex-avatar-stories .ex-avatar-letter { font-size: 22px; }
.ex-avatar-stories:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.5));
}
/* Cover photo "Stories" chip (Explore page — homepage Top Creators omits this) */
.ex-photo {
  position: relative;
}
.ex-photo-stories-btn {
  appearance: none;
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 3;
  border: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.95), rgba(168, 85, 247, 0.95));
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
  pointer-events: auto;
}
.ex-photo-stories-btn:hover {
  filter: brightness(1.08);
}
/* Homepage bottom CTA — purple View Stories */
.btn-stories {
  background: var(--purple);
  border-color: transparent;
  color: #fff;
}
.btn-stories:hover {
  filter: brightness(1.08);
  border-color: transparent;
  color: #fff;
}

/* Stories fullscreen viewer */
.stories-viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: #0a0810;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}
.stories-viewer.hidden { display: none !important; }
body.stories-open { overflow: hidden; }
.stories-viewer-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  z-index: 6;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.stories-progress {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: 12px;
  right: 56px;
  display: flex;
  gap: 4px;
  z-index: 5;
}
.stories-prog-seg {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.25);
  overflow: hidden;
  position: relative;
}
.stories-prog-seg.done { background: #fff; }
.stories-prog-seg.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: left center;
  animation: stories-prog-fill linear forwards;
  animation-duration: 5s;
}
@keyframes stories-prog-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
/* Top-left: avatar + "{Name}'s Story" — tap to open profile */
.stories-viewer-user {
  position: absolute;
  top: calc(max(10px, env(safe-area-inset-top)) + 16px);
  left: 12px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  appearance: none;
  border: none;
  background: transparent;
  padding: 4px 8px 4px 4px;
  cursor: pointer;
  color: #fff;
  max-width: min(70vw, 320px);
  text-align: left;
}
.stories-viewer-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #a855f7);
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255,255,255,0.85);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.45);
}
.stories-viewer-user-text {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stories-viewer-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  cursor: pointer;
  padding: 72px 0 48px;
  position: relative;
  overflow: hidden;
  gap: 0;
}
/* Prev/next peek: rounded like main story card, real media + CSS blur */
.stories-side {
  flex: 0 0 22vw;
  max-width: 140px;
  min-width: 72px;
  height: min(70vh, 640px);
  align-self: center;
  overflow: hidden;
  pointer-events: auto;
  opacity: 0.85;
  z-index: 1;
  border-radius: 12px;
}
.stories-side-prev {
  margin-right: -8px;
  border-radius: 12px;
}
.stories-side-next {
  margin-left: -8px;
  border-radius: 12px;
}
.stories-side.is-empty {
  opacity: 0.15;
  background: rgba(255,255,255,0.04);
}
.stories-side-inner {
  width: 200%;
  height: 100%;
  filter: blur(14px) saturate(0.9) brightness(0.55);
  transform: scale(1.08);
  transform-origin: center center;
  border-radius: 12px;
  overflow: hidden;
}
.stories-side-prev .stories-side-inner {
  /* Show right half of previous (trailing edge toward center) */
  margin-left: -100%;
}
.stories-side-next .stories-side-inner {
  /* Show left half of next */
  margin-left: 0;
}
.stories-side-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.stories-main {
  position: relative;
  z-index: 2;
  flex: 0 1 auto;
  display: grid;
  place-items: center;
  max-width: min(100%, 480px);
  min-width: 0;
}
.stories-media {
  max-width: min(100vw - 48px, 480px);
  max-height: min(78vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  user-select: none;
  -webkit-user-drag: none;
  background: #120f16;
}
/* Title overlaid on media — small caption at bottom (IG / Snap style) */
.stories-title-overlay {
  position: absolute;
  top: auto;
  bottom: max(10%, 28px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: min(92%, 440px);
  padding: 0 14px;
  text-align: center;
  font-size: clamp(12px, 3.1vw, 15px);
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0,0,0,0.9),
    0 2px 10px rgba(0,0,0,0.55);
  pointer-events: none;
  letter-spacing: 0.01em;
}
@media (max-width: 640px) {
  .stories-side {
    flex-basis: 18vw;
    min-width: 56px;
    max-width: 96px;
    height: min(62vh, 520px);
  }
  .stories-side-inner { filter: blur(12px) brightness(0.5); }
}
.stories-viewer-cta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(16px, env(safe-area-inset-bottom));
  padding: 0 16px;
  z-index: 4;
}
.stories-caption {
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
}
.stories-empty {
  max-width: 360px;
  text-align: center;
  color: #ece9f1;
  padding: 24px;
}
.stories-empty-icon { font-size: 40px; margin-bottom: 8px; }
.stories-empty h3 { margin: 0 0 10px; font-size: 20px; }
.stories-empty p { margin: 0; color: #b7b0c4; font-size: 14px; line-height: 1.45; }
.stories-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 64px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  border-radius: 10px;
}
.stories-nav-prev { left: 8px; }
.stories-nav-next { right: 8px; }
.story-unlock-actions { margin-top: 8px; }

@media (max-width: 520px) {
  .story-bubble { width: 70px; flex-basis: 70px; }
  .story-bubble-ring {
    width: 62px;
    height: 62px;
    min-width: 62px;
    min-height: 62px;
    max-width: 62px;
    max-height: 62px;
  }
  .stories-nav { display: none; }
}

/* ---- About (/about) — left help-nav + article ---- */
.about-page {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
}
.about-nav {
  position: sticky;
  top: calc(var(--topbar-h) + 12px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.about-nav-head {
  padding: 0 8px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.about-nav-kicker {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.about-nav-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.about-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.about-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.12s ease, color 0.12s ease;
}
.about-nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}
.about-nav-item.is-active {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.18), rgba(168, 85, 247, 0.12));
  color: #f9a8d4;
  border: 1px solid rgba(236, 72, 153, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.about-nav-ico {
  width: 22px;
  text-align: center;
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.9;
}
.about-nav-item.is-active .about-nav-ico { opacity: 1; }
.about-nav-label { min-width: 0; line-height: 1.25; }
.about-nav-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.about-content {
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(236, 72, 153, 0.04), transparent 120px),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 32px;
}
.about-title {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.about-lead {
  margin: 0 0 22px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 62ch;
}
.about-block {
  margin: 0 0 22px;
  padding-top: 4px;
}
.about-block:last-child { margin-bottom: 0; }
.about-block h2 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.01em;
}
.about-block h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #f9a8d4;
}
.about-block p {
  margin: 0 0 10px;
  color: var(--text-dim);
  line-height: 1.55;
  max-width: 68ch;
}
.about-block p:last-child { margin-bottom: 0; }
.about-block a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.about-block a:hover { text-decoration: underline; }
.about-list,
.about-steps {
  margin: 0 0 4px;
  padding-left: 1.25em;
  color: var(--text-dim);
  line-height: 1.55;
  max-width: 68ch;
}
.about-list li,
.about-steps li {
  margin: 0 0 8px;
}
.about-list li:last-child,
.about-steps li:last-child { margin-bottom: 0; }
.about-list strong,
.about-steps strong,
.about-block strong {
  color: var(--text);
  font-weight: 700;
}
.about-note {
  margin-top: 12px !important;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.22);
  font-size: 13.5px;
}
.about-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}
.about-compare-3 { grid-template-columns: repeat(3, 1fr); }
.about-compare-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px 16px;
}
.about-compare-card p {
  margin: 0;
  font-size: 13px;
  max-width: none;
}

@media (max-width: 860px) {
  .about-page {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .about-nav {
    position: static;
    padding: 12px 10px 12px;
  }
  .about-nav-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding-bottom: 10px;
  }
  .about-nav-title { font-size: 16px; }
  .about-nav-list {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .about-nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
  }
  .about-nav-item.is-active {
    border-color: rgba(236, 72, 153, 0.45);
  }
  .about-nav-foot {
    display: none;
  }
  .about-content { padding: 20px 16px 24px; }
  .about-title { font-size: 22px; }
  .about-compare,
  .about-compare-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .about-nav-ico { display: none; }
}

/* ============================================================================
   Legal center (/legal/*) + Billing & refunds (Account)
   ========================================================================== */
.legal-meta { font-size: 12.5px; margin: 0 0 18px; }
.legal-content h2 { scroll-margin-top: 80px; }
.legal-content code {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 12.5px;
}
.legal-content table { width: 100%; border-collapse: collapse; font-size: 13px; }
.legal-content .ok {
  color: #4ade80;
  font-size: 13px;
  margin: 0 0 12px;
  line-height: 1.45;
}

.legal-form { max-width: 640px; }
.legal-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.legal-form .field { display: block; }
.legal-form .field span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
  font-weight: 600;
}
.legal-form input,
.legal-form select,
.legal-form textarea { width: 100%; }
.legal-form .check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
}

/* Billing & refunds rows */
.billing-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.billing-actions { display: flex; gap: 8px; align-items: center; }
.billing-amount-refunded { text-decoration: line-through; opacity: 0.55; }

.refund-badge { font-weight: 600; }
.refund-badge.refund-pending {
  background: rgba(236, 72, 153, 0.16);
  border-color: rgba(236, 72, 153, 0.5);
  color: #f9a8d4;
}
.refund-badge.refund-refunded {
  background: rgba(74, 222, 128, 0.14);
  border-color: rgba(74, 222, 128, 0.45);
  color: #4ade80;
}
.refund-badge.refund-denied {
  background: rgba(248, 113, 113, 0.13);
  border-color: rgba(248, 113, 113, 0.45);
  color: #f87171;
}
