/* WOGENT Chat — mobile-first, WhatsApp-style, dark purple premium theme.
   Layout: app is max 480px wide, centered on desktop, full-bleed on phones. */

:root {
  --bg: #1a0d18;
  --bg2: #241019;
  --card: #2a1420;
  --card2: #331826;
  --purple: #8b5cf6;
  --purple-dark: #6d28d9;
  --pink: #ff5c9e;
  --rose: #ff7eb3;
  --peach: #ffb3c7;
  --amber-glow: #ff9e7d;
  --text: #fff5f7;
  --muted: #c9a8b8;
  --bubble-in: #33202a;
  --bubble-out: #c2437f;
  --green: #34d399;
  --red: #f87171;
  --radius: 18px;
  --tabbar-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: #0d060a;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  height: 100%;
  overscroll-behavior: none;
}

/* Centered "phone" column */
#phone {
  max-width: 480px;
  margin: 0 auto;
  height: 100dvh;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 30% at 50% -5%, rgba(255,92,158,.08), transparent),
    radial-gradient(ellipse 60% 25% at 50% 110%, rgba(255,158,125,.05), transparent);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(255, 92, 158, .12);
}

#app {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

.hidden { display: none !important; }

/* ---------- Header — Kalshi sticky clean ---------- */
.header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(26, 13, 24, .88);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.header h1 .logo {
  background: linear-gradient(135deg, #ff5c9e, #ff9e7d);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.header .sub { color: var(--muted); font-size: 13px; margin-top: 2px; font-weight: 500; }

.balance-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(52, 211, 153, .12);
  border: 1px solid rgba(52, 211, 153, .3);
  color: #6ee7b7;
  font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums;
  padding: 8px 16px; border-radius: 999px; margin-top: 8px;
  transition: transform .12s ease;
}
.balance-pill:active { transform: scale(.95); }

/* ---------- Admin fan-preview banner (in-flow strip above #app) ---------- */
.preview-banner {
  flex: 0 0 auto;
  background: linear-gradient(135deg, #ff5c9e, #ff8fab);
  color: #fff; font-weight: 800; font-size: 14.5px; text-align: center;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  cursor: pointer; position: relative; z-index: 40;
  box-shadow: 0 4px 18px rgba(255, 92, 158, .35);
  -webkit-tap-highlight-color: transparent;
}
.preview-banner:active { filter: brightness(1.1); }

/* ---------- Bottom tab bar — Kalshi pill active ---------- */
#tabbar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(26, 13, 24, .92);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; z-index: 30;
}
#tabbar button {
  flex: 1; background: none; border: none; color: var(--muted);
  font-size: 11px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  cursor: pointer; font-family: inherit; position: relative;
}
#tabbar button .ico { font-size: 22px; transition: transform .15s ease; }
#tabbar button.active { color: #ff7eb3; }
#tabbar button.active .ico { transform: scale(1.1); }
#tabbar button.active::after {
  content: ''; position: absolute; bottom: 6px;
  width: 20px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, #ff5c9e, #ff9e7d);
}
#tabbar button .badge {
  background: #ff5c9e; color: #fff; font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
  position: absolute; top: 6px; right: calc(50% - 20px);
}

/* ---------- Cards / lists — Kalshi flat + hairline ---------- */
.screen { padding: 16px; }
.card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  padding: 16px; margin-bottom: 12px;
}
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.big-number { font-size: 30px; font-weight: 800; }

.avatar {
  width: 52px; height: 52px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, var(--purple), var(--pink));
}
.avatar.xl { width: 88px; height: 88px; font-size: 38px; }
.avatar.sm { width: 40px; height: 40px; font-size: 17px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

.online-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--green); border: 2px solid var(--bg);
  position: absolute; bottom: 2px; right: 2px;
}
.avatar-wrap { position: relative; flex-shrink: 0; }

.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 14px; cursor: pointer;
  background: transparent; border: none; width: 100%; text-align: left;
  color: var(--text); font-family: inherit;
}
.list-item:active { background: rgba(139,92,246,.12); }
.list-item + .list-item { border-top: 1px solid rgba(139,92,246,.1); }
.list-item .title { font-weight: 700; font-size: 16px; }
.list-item .preview {
  display: block;
  color: var(--muted); font-size: 13px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.unread-badge {
  background: var(--pink); color: #fff; font-size: 12px; font-weight: 800;
  min-width: 22px; height: 22px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 6px;
}

/* ---------- Buttons / inputs — Kalshi-grade polish, SlutCamp sexy ---------- */
.btn {
  display: block; width: 100%;
  background: linear-gradient(135deg, #ff5c9e, #e0447c);
  color: #fff; border: none; border-radius: 100px;
  font-size: 16px; font-weight: 700; padding: 15px 28px;
  cursor: pointer; font-family: inherit; margin-top: 10px;
  transition: transform .12s ease, box-shadow .2s ease, opacity .2s ease;
  box-shadow: 0 4px 20px rgba(255,92,158,.3), inset 0 1px 0 rgba(255,255,255,.2);
  -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}
.btn:hover { box-shadow: 0 6px 28px rgba(255,92,158,.45), inset 0 1px 0 rgba(255,255,255,.2); }
.btn:active { transform: scale(.96); opacity: .92; box-shadow: 0 2px 10px rgba(255,92,158,.2); }
.btn.ghost { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #f0e6ff; box-shadow: none; }
.btn.ghost:hover { background: rgba(255,255,255,.1); box-shadow: none; }
.btn.danger { background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 4px 20px rgba(239,68,68,.25); }
.btn.success { background: linear-gradient(135deg, #10b981, #047857); box-shadow: 0 4px 20px rgba(16,185,129,.25); }
.btn.small { width: auto; display: inline-block; padding: 10px 22px; font-size: 14px; margin-top: 0; }
.btn:disabled { opacity: .5; transform: none; box-shadow: none; }

.input, select.input, textarea.input {
  width: 100%; background: rgba(255,255,255,.05); color: var(--text);
  border: 1px solid rgba(255,255,255,.12); border-radius: 16px;
  padding: 14px 16px; font-size: 16px; font-family: inherit; margin-top: 6px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  -webkit-appearance: none; appearance: none;
}
.input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,45,120,.15); background: rgba(255,255,255,.07); }
.input::placeholder { color: rgba(255,255,255,.35); }

/* Cards: hairline borders, subtle depth — no heavy shadows */
.card {
  transition: transform .15s ease, border-color .2s ease;
}
/* List items: press feedback */
.list-item { transition: transform .12s ease, background .2s ease; -webkit-tap-highlight-color: transparent; }
.list-item:active { transform: scale(.98); }
/* Tab bar: smooth active states */
#tabbar button { transition: color .2s ease, transform .12s ease; -webkit-tap-highlight-color: transparent; }
#tabbar button:active { transform: scale(.92); }
/* Global smooth scrolling + momentum */
.screen { -webkit-overflow-scrolling: touch; scroll-behavior: smooth; }
/* Fade-in for view transitions */
@keyframes viewFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.screen > * { animation: viewFadeIn .25s ease both; }
.screen > *:nth-child(2) { animation-delay: .03s; }
.screen > *:nth-child(3) { animation-delay: .06s; }
@media (prefers-reduced-motion: reduce) {
  .screen > *, .btn, .list-item { animation: none; transition: none; }
}
.input:focus { outline: none; border-color: var(--purple); }
label.field { display: block; margin-top: 14px; font-size: 14px; font-weight: 600; color: #d9c8ff; }

/* Big dumb-simple toggle */
.toggle {
  width: 51px; height: 31px; border-radius: 16px; border: none; cursor: pointer;
  background: rgba(120,120,128,.32); position: relative; transition: background .25s; flex-shrink: 0;
  -webkit-appearance: none; appearance: none; padding: 0; margin: 0;
}
.toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 27px; height: 27px; border-radius: 50%; background: #fff;
  transition: transform .25s; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.toggle.on { background: #34c759; }
.toggle.on::after { transform: translateX(20px); }

/* iPhone-style Go Live button — compact pill, not a big block */
.btn-live {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 8px 18px;
  border: none; border-radius: 999px; cursor: pointer;
  background: #ff3b30; color: #fff;
  font-size: 15px; font-weight: 600; font-family: inherit;
  box-shadow: 0 2px 8px rgba(255,59,48,.35);
  transition: transform .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.btn-live:active { transform: scale(.96); box-shadow: 0 1px 4px rgba(255,59,48,.3); }

/* Big "Lives" pill on home — jumps to the Live Now grid (promo-style) */
.btn-lives {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 13px 20px; margin-bottom: 12px;
  border: none; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, #ff2d55, var(--pink)); color: #fff;
  font-size: 17px; font-weight: 800; font-family: inherit; letter-spacing: .2px;
  box-shadow: 0 4px 18px rgba(255,45,85,.35);
  transition: transform .15s ease, box-shadow .15s ease;
  -webkit-appearance: none; appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-lives:active { transform: scale(.97); box-shadow: 0 2px 8px rgba(255,45,85,.3); }
.btn-lives .lives-count {
  background: rgba(255,255,255,.24); border-radius: 999px;
  padding: 2px 11px; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.btn-lives.has-live { animation: livesBtnPulse 2s ease-out infinite; }
@keyframes livesBtnPulse {
  0% { box-shadow: 0 4px 18px rgba(255,45,85,.35), 0 0 0 0 rgba(255,45,85,.45); }
  70% { box-shadow: 0 4px 18px rgba(255,45,85,.35), 0 0 0 10px rgba(255,45,85,0); }
  100% { box-shadow: 0 4px 18px rgba(255,45,85,.35), 0 0 0 0 rgba(255,45,85,0); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-lives { animation: none; transition: none; }
}

/* Blue book 1-on-1 button in chat header — prominent and tappable */
.btn-book {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px; border: none; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
  font-size: 14px; font-weight: 700; font-family: inherit; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(59,130,246,.4); flex-shrink: 0;
  -webkit-appearance: none; appearance: none;
}
.btn-book:active { transform: scale(.95); }

/* ---------- Chat screen (WhatsApp style) ---------- */
.chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  background: linear-gradient(135deg, #2a1350, #1a0f2e);
  border-bottom: 1px solid rgba(139,92,246,.25);
  position: sticky; top: 0; z-index: 20;
}
.chat-header .name { font-weight: 800; font-size: 17px; }
.chat-header .status { font-size: 12px; color: var(--muted); }
.icon-btn {
  background: rgba(139,92,246,.15); border: 1px solid rgba(139,92,246,.4);
  color: #fff; width: 44px; height: 44px; border-radius: 50%;
  font-size: 20px; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; flex-shrink: 0;
}
#messages {
  padding: 14px 12px 12px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 40vh;
}
.msg { max-width: 78%; padding: 10px 13px; border-radius: 16px; font-size: 16px; line-height: 1.35; word-wrap: break-word; }
.msg.in { background: var(--bubble-in); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.out { background: var(--bubble-out); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg .meta { font-size: 11px; color: rgba(255,255,255,.65); text-align: right; margin-top: 4px; }
.msg.in .meta { color: var(--muted); }
.msg .cost { font-size: 11px; opacity: .8; }

/* Anti-copy protection (fans): no text selection, no copy/cut/paste */
.no-copy, .no-copy * {
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
}

/* Fan watermark: username burned across live video (screenshot deterrent) */

/* Blur app when backgrounded (screen-record deterrent) */
body.bg-blur #app { filter: blur(24px); }

.chat-input-bar {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; gap: 8px; align-items: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(18, 8, 31, .98);
  border-top: 1px solid rgba(139,92,246,.2);
}
.chat-input-bar input {
  flex: 1; background: var(--card); border: 1px solid rgba(139,92,246,.3);
  border-radius: 999px; padding: 13px 16px; color: var(--text);
  font-size: 16px; font-family: inherit;
}
.chat-input-bar input:focus { outline: none; border-color: var(--purple); }
.send-btn {
  width: 50px; height: 50px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff; font-size: 22px; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center; min-width: 50px;
}
.chat-input-bar { display: flex; align-items: center; gap: 8px; }
.rate-hint { text-align: center; color: var(--muted); font-size: 12px; padding: 6px; }

/* ---------- Call UI ---------- */
#call-overlay, #active-call {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 5, 20, .97);
  display: flex; align-items: center; justify-content: center;
}
.call-card { text-align: center; padding: 24px; }
.call-card h2 { margin: 16px 0 4px; }
.call-actions { display: flex; gap: 28px; justify-content: center; margin-top: 28px; }
.btn-call {
  width: 72px; height: 72px; border-radius: 50%; border: none;
  font-size: 30px; cursor: pointer; color: #fff;
}
.btn-call.accept { background: var(--green); }
.btn-call.decline { background: #ef4444; }
#active-call { flex-direction: column; }
#remote-video { width: 100%; height: 100%; object-fit: cover; background: #000; }
#local-video {
  position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 16px;
  width: 110px; height: 150px; object-fit: cover; border-radius: 12px;
  border: 2px solid var(--purple); background: #000;
}
.call-hud {
  position: absolute; bottom: calc(40px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
#call-timer { font-size: 26px; font-weight: 800; text-shadow: 0 2px 8px #000; }

/* ---------- Misc ---------- */
#toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + 24px); z-index: 200;
  background: #2e1d52; border: 1px solid var(--purple);
  color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 15px; font-weight: 600;
  max-width: 90%; text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
}
#install-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px); z-index: 90;
  background: var(--card2); border: 1px solid var(--purple); border-radius: 14px;
  padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-size: 14px;
  max-width: 456px; margin: 0 auto;
}
#install-banner span { flex: 1; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--card); border-radius: 14px; padding: 14px; border: 1px solid rgba(139,92,246,.18); }
.stat .n { font-size: 24px; font-weight: 800; }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 2px; }

.role-card {
  border: 2px solid rgba(139,92,246,.25); border-radius: 16px; padding: 16px;
  margin-top: 10px; cursor: pointer; text-align: center;
}
.role-card.selected { border-color: var(--pink); background: rgba(236,72,153,.08); }
.role-card .emoji { font-size: 34px; }
.role-card .t { font-weight: 800; font-size: 17px; margin-top: 6px; }
.role-card .d { color: var(--muted); font-size: 13px; margin-top: 2px; }

.tabs { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; }
.tabs button {
  background: var(--card); color: var(--muted); border: 1px solid rgba(139,92,246,.25);
  border-radius: 999px; padding: 9px 16px; font-size: 14px; font-weight: 700;
  white-space: nowrap; cursor: pointer; font-family: inherit;
}
.tabs button.active { background: var(--purple); color: #fff; border-color: var(--purple); }

.pkg {
  display: flex; flex-wrap: wrap; align-items: center; gap: 13px;
  background: linear-gradient(160deg, rgba(255,126,179,.10), rgba(255,92,158,.04) 55%, rgba(255,255,255,.02));
  border: 1px solid rgba(255,179,199,.20);
  border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
  width: 100%; color: var(--text); font-family: inherit; text-align: left;
  transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease;
}
.pkg:hover { border-color: rgba(255,179,199,.45); box-shadow: 0 4px 18px rgba(255,92,158,.12); }
.pkg:active { transform: scale(.985); }
.pkg .pkg-coin {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 21px;
  background: radial-gradient(circle at 32% 30%, rgba(255,214,232,.35), rgba(255,92,158,.14) 62%, rgba(0,0,0,.18));
  border: 1px solid rgba(255,179,199,.30);
}
.pkg .amt { font-size: 19px; font-weight: 800; letter-spacing: .1px; white-space: nowrap; }
.pkg .price { margin-left: auto; font-size: 17px; font-weight: 800; color: var(--green); white-space: nowrap; }

/* ---------- Load-amount slider ---------- */
.load-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; margin: 14px 0 6px;
  background: linear-gradient(90deg, #ff5c9e, #ff7eb3); outline: none; cursor: pointer; }
.load-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 3px solid #ff5c9e; box-shadow: 0 2px 10px rgba(255,92,158,.45); cursor: pointer; }
.load-slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid #ff5c9e;
  box-shadow: 0 2px 10px rgba(255,92,158,.45); cursor: pointer; }

/* ---------- Crypto coin picker ---------- */
.coin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.coin-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 11px 2px 9px; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  color: var(--text); font-family: inherit;
  transition: transform .12s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.coin-chip:active { transform: scale(.96); }
.coin-chip .cs { font-size: 21px; line-height: 1; font-weight: 800; }
.coin-chip .cl { font-size: 11px; font-weight: 700; letter-spacing: .4px; opacity: .85; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.coin-chip.on {
  background: linear-gradient(145deg, #ff5c9e, #ff7eb3);
  border-color: rgba(255,255,255,.35); color: #fff;
  box-shadow: 0 6px 20px rgba(255,92,158,.35);
}
.coin-chip.on .cl { opacity: 1; }
.coin-chip.on .cs { color: #fff !important; }

/* Named wallet buttons on the crypto pay screen */
.wallet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wallet-grid .wbtn { width: 100%; margin-top: 0; }

/* Narrow phones: 4-across tiles cannot hold full coin names — go 2x2 instead
   of letting words crowd or spill out of their tiles. */
@media (max-width: 400px) {
  .coin-grid { grid-template-columns: repeat(2, 1fr); }
}
/* QR + invoice block always fit the card, never wider than it */
#crypto-invoice svg { max-width: 100%; height: auto; }
.pkg > span { min-width: 0; }

.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty .big { font-size: 44px; margin-bottom: 10px; }

.age-box {
  background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.4);
  border-radius: 12px; padding: 12px; margin-top: 14px; font-size: 13px;
}
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 14px; }
.checkbox-row input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--purple); flex-shrink: 0; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid rgba(139,92,246,.25); }
table.data td { padding: 10px 6px; border-bottom: 1px solid rgba(139,92,246,.1); }

/* ---------- PPV media (locked / unlocked) ---------- */
.ppv-lock {
  display: block; width: 220px; max-width: 100%;
  border: 1px solid rgba(139,92,246,.5); border-radius: 14px;
  background: linear-gradient(135deg, #2a1c46, #1a0f2e);
  color: var(--text); font-family: inherit; cursor: pointer;
  padding: 0; margin-top: 6px; overflow: hidden; text-align: center;
}
.ppv-lock:disabled { cursor: default; }
.ppv-lock-bg {
  display: flex; align-items: center; justify-content: center;
  height: 110px; font-size: 44px;
  background: repeating-linear-gradient(45deg, #241743, #241743 12px, #2c1d52 12px, #2c1d52 24px);
  filter: blur(2px);
}
.ppv-lock-label { display: block; font-weight: 700; font-size: 14px; padding: 8px 8px 2px; }
.ppv-unlock-btn {
  display: inline-block; margin: 8px 8px 12px; padding: 9px 18px;
  background: linear-gradient(135deg, var(--pink), var(--purple-dark));
  border-radius: 999px; font-weight: 800; font-size: 14px; color: #fff;
}
.ppv-unlock-price { display: block; color: var(--muted); font-size: 13px; padding: 4px 8px 12px; }
.ppv-img { width: 220px; max-width: 100%; border-radius: 12px; margin-top: 6px; display: block; }
.ppv-vid { width: 220px; max-width: 100%; border-radius: 12px; margin-top: 6px; display: block; background: #000; }
.ppv-audio { width: 220px; max-width: 100%; margin-top: 6px; }

/* ---------- Action sheet (iPhone style) ---------- */
#action-sheet { position: fixed; inset: 0; z-index: 140; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(5,2,12,.6); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto;
  background: var(--card2); border-radius: 20px 20px 0 0;
  padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(139,92,246,.4);
  animation: sheetup .22s ease-out;
}
@keyframes sheetup { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-title { text-align: center; font-weight: 800; font-size: 16px; margin: 6px 0 10px; }
.sheet-btn {
  display: block; width: 100%; text-align: left;
  background: var(--card); border: 1px solid rgba(139,92,246,.25);
  color: var(--text); font-family: inherit; font-size: 17px; font-weight: 600;
  border-radius: 14px; padding: 15px 16px; margin-bottom: 8px; cursor: pointer;
}
.sheet-btn.cancel { text-align: center; color: var(--muted); margin-top: 4px; }
/* Real file inputs the action sheet opens via <label for> — offscreen, never display:none */
.file-offscreen { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- Tips ---------- */
.tip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.tip-grid .btn { margin-top: 0; }

/* ---------- Live cam ---------- */
.live-badge {
  display: inline-block; background: #ef4444; color: #fff;
  font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px;
  animation: blink 1.6s infinite;
}
@keyframes blink { 50% { opacity: .55; } }
.live-wrap { position: relative; height: 100dvh; background: #000; overflow: hidden; }
#live-local, #live-remote { width: 100%; height: 100%; object-fit: cover; background: #000; }
#live-remote.blurred { filter: blur(28px) brightness(.7); }
.live-top {
  position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px;
  display: flex; align-items: center; gap: 10px; z-index: 5;
}
.live-viewers {
  background: rgba(0,0,0,.55); padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: #fff;
}
.live-controls {
  position: absolute; left: 16px; right: 16px;
  bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 5;
}
#live-blur-overlay {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
  background: rgba(10,5,20,.55);
}
#live-blur-overlay .btn { max-width: 320px; }
#live-pay-hud {
  position: absolute; top: calc(60px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(0,0,0,.6); border: 1px solid var(--pink);
  padding: 10px 14px; border-radius: 14px; font-weight: 800; font-size: 15px;
}
#live-gift-hud {
  position: absolute; top: calc(60px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 5;
  background: rgba(0,0,0,.6); border: 1px solid var(--green);
  padding: 10px 14px; border-radius: 14px; font-weight: 800; font-size: 15px;
  text-align: center; color: #fff;
}
#live-gift-hud .gift-warn {
  color: #ffd166;
  animation: gift-warn-pulse 1s ease-in-out infinite;
}
@keyframes gift-warn-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

/* ---------- Group live: stream chat ---------- */
.live-title {
  position: absolute; top: calc(56px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 5;
  background: rgba(0,0,0,.55); padding: 7px 14px; border-radius: 12px;
  font-weight: 800; font-size: 15px; color: #fff; text-align: center;
  border: 1px solid rgba(139,92,246,.3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stream-chat {
  position: absolute; left: 12px; right: 12px; z-index: 5;
  bottom: calc(196px + env(safe-area-inset-bottom));
  max-height: 26dvh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 5px;
  pointer-events: none;
}
.stream-chat.fan { bottom: calc(150px + env(safe-area-inset-bottom)); }
.stream-msg {
  background: rgba(0,0,0,.55); color: #fff; font-size: 13px;
  padding: 6px 10px; border-radius: 12px; max-width: 88%;
  word-wrap: break-word; animation: msgIn .25s ease;
}
.stream-msg b { color: var(--pink); }
.stream-msg.from-model { border: 1px solid rgba(236,72,153,.5); }
.stream-msg.from-model b { color: #f0abfc; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.stream-chat-input {
  position: absolute; left: 12px; right: 12px; z-index: 6;
  bottom: calc(148px + env(safe-area-inset-bottom));
  display: flex; gap: 8px; align-items: center;
}
.stream-chat-input.fan { bottom: calc(96px + env(safe-area-inset-bottom)); }
.stream-chat-input .input { flex: 1; margin: 0; background: rgba(20,10,35,.85); }

/* ---------- Group live: leaderboard (the crown race) ---------- */
.live-leaderboard {
  position: absolute; top: calc(104px + env(safe-area-inset-top)); left: 50%;
  transform: translateX(-50%); z-index: 5; max-width: 92%;
  background: rgba(0,0,0,.62); border: 1px solid rgba(250,204,21,.55);
  border-radius: 999px; padding: 7px 16px 8px; text-align: center;
  box-shadow: 0 4px 24px rgba(250,204,21,.18); backdrop-filter: blur(4px);
}
.lb-king { font-size: 15px; color: #fde68a; white-space: nowrap; }
.lb-king b { color: #fff; font-size: 16px; }
.lb-king.lb-empty { font-size: 13px; color: rgba(253,230,138,.75); font-weight: 600; }
.lb-chasers { font-size: 11.5px; color: rgba(255,255,255,.8); margin-top: 2px; white-space: nowrap; }
.lb-dot { margin: 0 7px; opacity: .5; }
.lb-amt { color: #4ade80; font-weight: 800; }
.live-leaderboard.king-pop .lb-king { animation: kingPop .55s ease; }
@keyframes kingPop { 0% { transform: scale(1); } 40% { transform: scale(1.22) rotate(-2deg); } 100% { transform: scale(1); } }

/* ---------- FaceTime: waiting panel + model request card ---------- */
.ft-panel {
  position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 60; max-width: 480px; margin: 0 auto;
  background: linear-gradient(135deg, rgba(60,20,45,.97), rgba(35,12,30,.97));
  border: 1px solid rgba(255,92,158,.55); border-radius: 16px;
  padding: 12px 14px; box-shadow: 0 10px 34px rgba(0,0,0,.5);
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
}
.ft-line { font-size: 14.5px; color: #fff; }
.ft-sub { font-size: 12.5px; color: rgba(255,255,255,.72); }
.ft-panel .btn { margin-top: 4px; }
.ft-req-modal {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: rgba(10,4,12,.55); padding: 20px;
}
.ft-req-card {
  background: #241126; border: 1px solid rgba(255,92,158,.5); border-radius: 20px;
  padding: 22px 20px; text-align: center; max-width: 340px; width: 100%;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  box-shadow: 0 18px 50px rgba(0,0,0,.55); animation: sheetUp .25s ease;
}
.ft-req-title { font-size: 18px; font-weight: 800; color: #fff; }
.ft-req-actions { display: flex; gap: 10px; margin-top: 8px; }
.peek-rows { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.peek-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; padding: 9px 12px; font-size: 13.5px;
}
.peek-row span { color: rgba(255,255,255,.65); }
.peek-row b { color: #fff; text-align: right; }

/* ---------- Virtual gifts ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.65);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 480px; background: #1c1030;
  border-radius: 20px 20px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(139,92,246,.3);
  animation: sheetUp .25s ease; max-height: 70dvh; overflow-y: auto;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.sheet-title { font-weight: 800; font-size: 17px; margin-bottom: 4px; }
.gift-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.gift-item {
  background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.3);
  border-radius: 14px; padding: 12px 6px; display: flex; flex-direction: column;
  align-items: center; gap: 3px; cursor: pointer; color: #fff;
}
.gift-item:active { transform: scale(.94); background: rgba(139,92,246,.25); }
.gift-emoji { font-size: 34px; }
.gift-name { font-size: 12px; font-weight: 700; }
.gift-price { font-size: 12px; color: #4ade80; font-weight: 800; }
#gift-anim {
  position: absolute; inset: 0; z-index: 8; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#gift-anim .gift-burst { font-size: 110px; animation: giftPop 2.2s ease forwards; }
#gift-anim .gift-from {
  margin-top: 10px; font-weight: 800; font-size: 17px; color: #fff;
  background: rgba(0,0,0,.6); padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--pink);
}
@keyframes giftPop {
  0% { transform: scale(.3); opacity: 0; }
  15% { transform: scale(1.25); opacity: 1; }
  30% { transform: scale(1); }
  75% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(.9); opacity: 0; }
}

/* ---------- TikTok-style chat gifts ---------- */
.chat-gift { text-align: center; padding: 6px 4px; }
.chat-gift-emoji { font-size: 64px; line-height: 1; animation: giftBounce .7s ease; filter: drop-shadow(0 4px 12px rgba(236,72,153,.5)); }
.chat-gift-name { font-weight: 800; font-size: 15px; margin-top: 4px; }
.chat-gift-price { color: #4ade80; font-weight: 800; font-size: 14px; }
.msg.gift-msg { background: linear-gradient(135deg, rgba(236,72,153,.18), rgba(139,92,246,.18));
  border: 1px solid rgba(236,72,153,.45); border-radius: 16px; }
@keyframes giftBounce {
  0% { transform: scale(.2) rotate(-14deg); opacity: 0; }
  40% { transform: scale(1.25) rotate(6deg); opacity: 1; }
  60% { transform: scale(.92) rotate(-3deg); }
  80% { transform: scale(1.06) rotate(2deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* Full-screen fly-across gift animation */
.gift-fly { position: fixed; inset: 0; z-index: 9999; pointer-events: none; overflow: hidden; }
.gift-fly-emoji { position: absolute; top: 30%; left: -90px; font-size: 84px;
  animation: giftFly 2.8s ease-in-out forwards; filter: drop-shadow(0 6px 18px rgba(236,72,153,.6)); }
.gift-fly-from { position: absolute; top: calc(30% + 100px); left: 0; right: 0; text-align: center;
  font-weight: 800; font-size: 18px; color: #fff; text-shadow: 0 2px 12px #000;
  animation: giftFlyText 2.8s ease-in-out forwards; }
@keyframes giftFly {
  0% { left: -90px; top: 34%; transform: scale(.5) rotate(-18deg); opacity: 0; }
  12% { opacity: 1; }
  30% { top: 22%; transform: scale(1.35) rotate(8deg); }
  55% { top: 30%; transform: scale(1.15) rotate(-6deg); }
  80% { top: 24%; transform: scale(1.3) rotate(5deg); opacity: 1; }
  100% { left: calc(100% + 40px); top: 30%; transform: scale(.7) rotate(14deg); opacity: 0; }
}
@keyframes giftFlyText {
  0%, 8% { opacity: 0; transform: translateY(10px); }
  22% { opacity: 1; transform: none; }
  78% { opacity: 1; }
  100% { opacity: 0; }
}

/* Live gift stack ticker (right side, TikTok-style) */
#gift-stack { position: absolute; right: 10px; bottom: 120px; z-index: 7;
  display: flex; flex-direction: column; gap: 6px; pointer-events: none; align-items: flex-end; }
.gift-stack-item { display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.62); border: 1px solid rgba(236,72,153,.5);
  border-radius: 999px; padding: 5px 12px 5px 6px;
  animation: giftStackIn .35s ease; transition: opacity .9s, transform .9s; }
.gift-stack-item.fade { opacity: 0; transform: translateY(-14px); }
.gift-stack-emoji { font-size: 26px; animation: giftBounce .5s ease; }
.gift-stack-from { font-size: 12px; font-weight: 700; color: #fff; max-width: 110px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes giftStackIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Password visibility toggle */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 44px; width: 100%; box-sizing: border-box; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 20px; cursor: pointer; padding: 6px; opacity: .75; }
.pw-eye:active { opacity: 1; }

/* ---------- Priority messages (paid banner + TTS) ---------- */
#priority-banner {
  position: absolute; top: calc(100px + env(safe-area-inset-top)); left: 12px; right: 12px; z-index: 6;
}
.pm-banner {
  background: linear-gradient(135deg, #f59e0b, #ec4899 60%, #8b5cf6);
  border-radius: 14px; padding: 10px 14px; color: #fff;
  box-shadow: 0 4px 28px rgba(236,72,153,.55);
  animation: pmSlide .35s ease;
}
.pm-head { display: flex; justify-content: space-between; align-items: center;
  font-weight: 800; font-size: 13px; letter-spacing: .5px; }
#priority-countdown { font-variant-numeric: tabular-nums; font-size: 15px; }
.pm-from { font-weight: 800; font-size: 15px; margin-top: 2px; }
.pm-body { font-weight: 700; font-size: 19px; margin-top: 2px; overflow-wrap: break-word; }
@keyframes pmSlide { from { transform: translateY(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
.pm-tier.selected { outline: 2px solid var(--pink); background: rgba(236,72,153,.18); }
#tts-mute-btn { background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px; font-size: 17px; padding: 4px 8px; }

/* --- Fan join-live stage --- */
.stage-notice { background: linear-gradient(135deg, #8b5cf6, #3b82f6); border-radius: 12px;
  padding: 10px 14px; color: #fff; font-weight: 700; font-size: 14px; text-align: center;
  margin-bottom: 8px; box-shadow: 0 4px 20px rgba(139,92,246,.5); }
.stage-notice.stage-live { background: linear-gradient(135deg, #ec4899, #8b5cf6); font-size: 16px;
  animation: stagePulse 1.6s ease-in-out infinite; }
@keyframes stagePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.02); } }
.stage-req-card { display: flex; align-items: center; gap: 8px; background: linear-gradient(135deg, rgba(139,92,246,.25), rgba(236,72,153,.15));
  border: 2px solid rgba(139,92,246,.6); border-radius: 12px; padding: 12px; margin-bottom: 8px;
  box-shadow: 0 0 20px rgba(139,92,246,.3); animation: pulse-border 1.5s ease-in-out infinite; }
@keyframes pulse-border { 0%,100% { border-color: rgba(139,92,246,.6); } 50% { border-color: rgba(236,72,153,.9); } }
.stage-req-card .btn { min-width: 48px; min-height: 48px; font-size: 20px; }
#stage-pip { position: relative; margin-bottom: 8px; }
#stage-video { width: 100%; max-height: 220px; border-radius: 14px; background: #000; object-fit: cover; }
#stage-mic { display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, #3b1d6e, #1a0f2e); border: 1px solid rgba(139,92,246,.4);
  border-radius: 14px; padding: 26px 12px; margin-bottom: 4px; position: relative; overflow: hidden; }
#stage-mic.hidden { display: none; }
.stage-mic-emoji { font-size: 44px; position: relative; z-index: 1; animation: micBob 1.2s ease-in-out infinite; }
.stage-mic-pulse { position: absolute; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(236,72,153,.45), transparent 70%);
  animation: micPulse 1.6s ease-out infinite; }
@keyframes micBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes micPulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
.stage-info { font-weight: 800; font-size: 14px; color: #fff; background: rgba(0,0,0,.55);
  border-radius: 10px; padding: 6px 10px; margin: 6px 0; text-align: center; font-variant-numeric: tabular-nums; }
/* Model preview video loops + likes on home screen */
.model-media-wrap { position: relative; flex-shrink: 0; width: 64px; height: 64px; }
.model-preview-video {
  width: 64px; height: 64px; border-radius: 14px; object-fit: cover;
  border: 2px solid rgba(139,92,246,.4);
}
.model-likes { display: inline-flex; align-items: center; gap: 3px; }
.model-likes .like-heart { font-size: 16px; }
.model-likes:active .like-heart { transform: scale(1.3); }

/* ---------- Home tiles — promo-style "who's live" video grid ---------- */
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.model-tile {
  position: relative; display: block; width: 100%; aspect-ratio: 3/4;
  padding: 0; margin: 0; overflow: hidden; cursor: pointer;
  border-radius: 18px; border: 1px solid rgba(255,255,255,.1);
  background: var(--card); color: var(--text); font-family: inherit; text-align: left;
  -webkit-appearance: none; appearance: none;
  transition: transform .12s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.model-tile:active { transform: scale(.97); }
.model-tile.hero {
  aspect-ratio: 16/11; margin-bottom: 12px;
  border-color: rgba(255,92,158,.35); box-shadow: 0 8px 32px rgba(255,92,158,.18);
}
.model-tile .tile-media {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.model-tile .tile-letter {
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; font-weight: 800; color: rgba(255,255,255,.92);
}
.model-tile.hero .tile-letter { font-size: 96px; }
.tile-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(16,5,14,.28) 0%, transparent 32%, transparent 52%, rgba(16,5,14,.86) 100%);
}
.tile-live-pill {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 800;
  letter-spacing: .4px; padding: 5px 10px; border-radius: 999px;
  animation: livePulse 1.8s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(239,68,68,.55); }
  70% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.tile-viewers {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 5px 10px; border-radius: 999px;
}
.tile-featured-pill {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,209,102,.5); color: #ffd166;
  font-size: 11px; font-weight: 800; letter-spacing: .4px;
  padding: 5px 10px; border-radius: 999px;
}
.tile-top-pill {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  background: linear-gradient(135deg, #ffd166, #f59e0b); color: #231303;
  box-shadow: 0 2px 10px rgba(245,158,11,.45);
  font-size: 11px; font-weight: 800; letter-spacing: .4px;
  padding: 5px 10px; border-radius: 999px;
}
.tile-top-pill.below-live { top: 42px; }
.tile-info { position: absolute; left: 12px; right: 64px; bottom: 10px; z-index: 2; pointer-events: none; }
.tile-name {
  display: block; font-size: 17px; font-weight: 800; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
.model-tile.hero .tile-name { font-size: 21px; }
.tile-sub {
  display: block; font-size: 12.5px; margin-top: 2px; color: rgba(255,245,247,.88);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile-heart {
  position: absolute; right: 10px; bottom: 10px; z-index: 4;
  display: inline-flex; align-items: center; gap: 4px;
  height: 34px; padding: 0 11px; border-radius: 999px;
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.16);
  font-size: 15px; font-weight: 700; color: #fff; cursor: pointer;
  transition: transform .12s ease;
}
.tile-heart .like-count { font-size: 13px; font-variant-numeric: tabular-nums; }
.tile-heart:active { transform: scale(1.12); }
@media (prefers-reduced-motion: reduce) {
  .tile-live-pill { animation: none; }
  .model-tile, .tile-heart { transition: none; }
}

#stage-drop-btn { width: 100%; }

/* TikTok-style split screen: model on top, fan below (portrait) */
.live-split { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.split-pane { position: relative; border-radius: 14px; overflow: hidden; background: #000; min-height: 200px; }
.split-pane video { width: 100%; height: 100%; max-height: 300px; object-fit: cover; display: block; }
.split-pane .hidden { display: none; }
.split-name {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  background: rgba(0,0,0,.6); color: #fff; font-size: 13px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
}
#split-fan.hidden { display: none; }
/* When fan joins, both panes share the space equally */
.live-split.has-fan .split-pane { flex: 1; min-height: 180px; }
.live-split.has-fan .split-pane video { max-height: 240px; }

/* Range sliders (model explicit stage rates) */
input[type="range"] { -webkit-appearance: none; appearance: none; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, #ec4899, #8b5cf6); outline: none; margin: 10px 0; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%; background: #fff;
  border: 3px solid #ec4899; box-shadow: 0 2px 8px rgba(236,72,153,.5); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid #ec4899; box-shadow: 0 2px 8px rgba(236,72,153,.5); cursor: pointer; }

/* ---------------- 18+ age gate ---------------- */
#age-gate {
  position: fixed; inset: 0; z-index: 9999;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
}
#age-gate.hidden { display: none !important; }
.age-gate-card { max-width: 420px; width: 100%; }
.age-gate-logo {
  font-size: 44px; font-weight: 900; letter-spacing: 2px; margin: 0 0 6px;
  color: #fff; text-transform: uppercase;
}
.age-gate-logo span { background: linear-gradient(135deg, var(--purple), var(--pink)); color: #fff; padding: 2px 10px; border-radius: 6px; }
.age-gate-q {
  font-size: 30px; font-weight: 800; color: #fff; margin: 22px 0 8px;
}
.age-gate-sub { color: #aaa; font-size: 15px; margin-bottom: 26px; }
.age-gate-btns { display: flex; flex-direction: column; gap: 12px; }
.btn.age-yes {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff; font-weight: 800; font-size: 18px; padding: 16px;
  border: none; border-radius: 12px; cursor: pointer;
}
.btn.age-no {
  background: #1a1a1a; color: #bbb; font-weight: 700; font-size: 16px;
  padding: 14px; border: 1px solid #333; border-radius: 12px; cursor: pointer;
}
.age-gate-denied { color: #fff; font-size: 22px; font-weight: 800; margin: 20px 0 12px; }
.age-gate-denied a { color: var(--pink); font-size: 16px; font-weight: 700; }
.age-input {
  width: 100%; box-sizing: border-box;
  background: #1a1a1a; color: #fff; border: 1px solid #444; border-radius: 12px;
  font-size: 18px; padding: 14px; margin-top: 6px;
  color-scheme: dark; /* dark native date picker on iOS/Android */
}
.age-error { color: #ff5a5a; font-size: 15px; font-weight: 700; margin: 10px 0 0; }

/* ---------------- Notifications bell + follows + tip menu ---------------- */
.notif-bell {
  position: fixed; top: 12px; right: 12px; z-index: 900;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--card); border: 1px solid rgba(139,92,246,.35);
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; border-radius: 10px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.list-item.unread { border-color: rgba(239,68,68,.5) !important; background: rgba(239,68,68,.07); }
.unread-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #ef4444; flex-shrink: 0;
}
.follow-btn {
  font-size: 22px; cursor: pointer; padding: 6px; flex-shrink: 0;
  filter: grayscale(0); transition: transform .15s;
}
.follow-btn:active { transform: scale(1.3); }
.tip-list { display: flex; flex-direction: column; gap: 8px; }
.tip-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--card); border: 1px solid rgba(139,92,246,.25);
  border-radius: 12px; padding: 10px 12px; cursor: pointer; text-align: left;
}
.tip-item:active { transform: scale(.98); }
.tip-emoji { font-size: 28px; }
.tip-price { font-weight: 800; color: var(--green); font-size: 16px; }

/* ---- Admin desktop layout: wide on laptops, phone column on mobile ---- */
@media (min-width: 900px) {
  body.admin-wide #phone {
    max-width: 1200px;
    box-shadow: 0 0 80px rgba(139, 92, 246, .2);
  }
  body.admin-wide .screen {
    padding: 24px 32px;
    max-width: 1200px;
    margin: 0 auto;
  }
  body.admin-wide .stat-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
  body.admin-wide .stat { padding: 18px; }
  body.admin-wide .stat .n { font-size: 26px; }
  body.admin-wide .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  body.admin-wide .tabs button {
    flex: 0 0 auto;
  }
  body.admin-wide #admin-body {
    max-width: 1100px;
  }
  body.admin-wide .card {
    max-width: 100%;
  }
}

/* ---- Article-style model cards: photo fills the left edge ---- */
.model-article {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  overflow: hidden;
  min-height: 132px;
}
.model-article-photo {
  width: 120px;
  min-width: 120px;
  align-self: stretch;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 800;
  color: #fff;
}
.model-article-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.model-article-body {
  flex: 1;
  padding: 12px 14px;
  min-width: 0;
}

/* ---- Photo cropper modal ---- */
#crop-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(5, 2, 12, .92);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.crop-box { width: 100%; max-width: 420px; text-align: center; }
.crop-title { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.crop-viewport {
  position: relative; width: 100%; aspect-ratio: 1;
  overflow: hidden; border-radius: 16px;
  background: #1a0f2e; border: 2px solid rgba(139,92,246,.5);
  touch-action: none; cursor: grab;
}
.crop-viewport:active { cursor: grabbing; }
.crop-viewport img {
  position: absolute; top: 50%; left: 50%;
  transform-origin: center;
  margin: 0; max-width: none;
  user-select: none; -webkit-user-drag: none;
  /* center via translate(-50%,-50%) combined in JS transform */
}
.crop-grid {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.15) 1px, transparent 1px);
  background-size: 33.33% 33.33%;
}
.crop-hint { color: var(--muted); font-size: 13px; margin: 10px 0 14px; }
.crop-actions { display: flex; gap: 10px; }
.crop-actions .btn { flex: 1; }

/* ---- Moderator watch view ---- */
.mod-watch-note {
  text-align: center; color: var(--muted); font-size: 12px;
  padding: 6px; background: rgba(139,92,246,.12);
  border-bottom: 1px solid rgba(139,92,246,.2);
}
.stream-chat.mod { opacity: .95; }

/* ---- PPV price picker ---- */
#ppv-price-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(5, 2, 12, .92);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
#ppv-price-overlay .ppv-price.active {
  border-color: var(--pink);
  background: rgba(236, 72, 153, .2);
}

/* ---- Full-screen model broadcast ---- */
.live-wrap.broadcast .live-split.full {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; gap: 0; margin: 0;
}
.live-wrap.broadcast .live-split.full .split-pane {
  position: relative; flex: 1; min-height: 0;
  border-radius: 0; overflow: hidden; background: #000;
}
.live-wrap.broadcast .live-split.full .split-pane video {
  width: 100%; height: 100%; max-height: none;
  object-fit: cover; display: block;
}
.live-wrap.broadcast .live-split.full:not(.has-fan) #split-fan { display: none; }
/* Split-screen when fan joins: side-by-side on landscape, stacked on portrait */
.live-wrap.broadcast .live-split.full.has-fan { flex-direction: row; }
.live-wrap.broadcast .live-split.full.has-fan .split-pane { flex: 1; min-width: 0; }
.live-wrap.broadcast .live-split.full.has-fan .split-pane video { max-height: none; }
@media (orientation: portrait) {
  .live-wrap.broadcast .live-split.full.has-fan { flex-direction: column; }
}
.live-wrap.broadcast .live-top,
.live-wrap.broadcast .live-title {
  position: absolute; z-index: 5;
}
.live-wrap.broadcast .live-top { top: 0; left: 0; right: 0; }
.live-wrap.broadcast .live-title { top: 44px; left: 12px; right: 12px; }
.live-wrap.broadcast .broadcast-bottom {
  position: absolute; z-index: 5; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.75) 30%);
  padding: 40px 12px 12px;
}
.live-wrap.broadcast .broadcast-bottom .stream-chat {
  max-height: 18vh; background: transparent; border: none;
}
.live-wrap.broadcast .broadcast-bottom .live-controls { margin-top: 8px; }

/* ---- Mic level meter ---- */
#mic-meter {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.6); border-radius: 999px;
  padding: 4px 10px 4px 4px; margin-left: auto;
  width: 80px; height: 24px; position: relative; overflow: hidden;
}
#mic-meter span { position: relative; z-index: 1; font-size: 14px; }
#mic-meter-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  background: #ef4444; border-radius: 999px;
  transition: width .1s;
}

/* ---- Fan self-view PiP on stage ---- */
#fan-selfview {
  position: absolute; bottom: 120px; right: 12px; z-index: 8;
  width: 110px; height: 150px; object-fit: cover;
  border-radius: 12px; border: 2px solid var(--pink);
  background: #000; box-shadow: 0 4px 16px rgba(0,0,0,.5);
}

/* Language picker — one compact link opening a scroll/search sheet */
.lang-link {
  background: rgba(139,92,246,.08); color: var(--text, #fff);
  border: 1px solid rgba(255,92,158,.45); border-radius: 999px;
  padding: 9px 18px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: transform .12s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.lang-link:active { transform: scale(.96); }
.lang-caret { color: var(--pink); font-size: 12px; }
.lang-sheet {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,4,12,.62); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.lang-sheet[hidden] { display: none; }
.lang-sheet-card {
  width: 100%; max-width: 340px; background: var(--card);
  border: 1px solid rgba(255,92,158,.35); border-radius: 20px;
  padding: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.lang-sheet-title { font-weight: 800; font-size: 17px; margin-bottom: 12px; text-align: center; }
.lang-search { width: 100%; margin-bottom: 10px; }
.lang-list {
  max-height: 248px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px;
}
.lang-opt {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(139,92,246,.08); color: var(--text, #fff);
  border: 1px solid rgba(139,92,246,.25); border-radius: 12px;
  padding: 12px 14px; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit; text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.lang-opt:active { transform: scale(.98); }
.lang-opt.on { border-color: var(--pink); background: rgba(255,92,158,.14); }
.lang-check { color: var(--pink); }
.lang-row { display: flex; justify-content: center; margin-top: 12px; }

/* New-model welcome celebration — one-time overlay after signup */
.model-welcome {
  position: fixed; inset: 0; z-index: 210;
  background: rgba(10,4,12,.68); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  overflow-y: auto;
}
.model-welcome[hidden] { display: none; }
.mw-card {
  width: 100%; max-width: 360px; text-align: center;
  background: linear-gradient(180deg, #33182a, var(--card));
  border: 1px solid rgba(255,92,158,.45); border-radius: 24px;
  padding: 26px 22px 22px; box-shadow: 0 22px 60px rgba(0,0,0,.6);
  animation: mwPop .38s cubic-bezier(.2,1.4,.4,1);
}
@keyframes mwPop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.mw-lips {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--pink); box-shadow: 0 0 26px rgba(255,92,158,.55);
}
.mw-confetti { font-size: 22px; margin-top: 10px; letter-spacing: 6px; }
.mw-title { font-size: 24px; font-weight: 800; margin-top: 8px; }
.mw-welcome {
  font-size: 19px; font-weight: 800; margin-top: 2px;
  background: linear-gradient(90deg, #ff5c9e, #b829dd);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mw-body { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin: 12px 0 0; }
.mw-money { font-size: 14.5px; line-height: 1.5; margin: 10px 0 0; }
.mw-steps-h { font-weight: 800; margin-top: 16px; text-align: left; }
.mw-steps { text-align: left; margin-top: 6px; display: flex; flex-direction: column; gap: 5px; font-size: 14.5px; color: var(--muted); }
.mw-btn { width: 100%; margin-top: 18px; }
