/* Layout: one-screen app. Scrolling feed between a slim top bar and a tab bar (left rail on desktop);
   watching and broadcasting take over the whole screen as a portrait stage. */
:root {
  /* Peeks brand: one dark look, charcoal surfaces, white text, pink-red accent, Poppins throughout. */
  color-scheme: dark;
  --bg: #1c1c1c; --surface: #2c2c2c; --raised: #3a3a3a; --line: #474747;
  --fg: #ffffff; --muted: #b9b9b9;
  --accent: #e9345f; --accent-ink: #ffffff;
  --ok: #3ccf91;
  --coin: #f6bd41; --coin-deep: #b97d06; --coin-ink: #2e1e00;
  --live: #e9345f; --live-ink: #ffffff; --danger: #ff8597;
  --onair: #1fa855; --onair-ink: #ffffff;   /* LIVE badges: green and white */
  --heart: #ff2338;                          /* likes and hearts: red */
  --video: #0d0d0d; --ov: #ffffff; --ov-dim: rgba(255,255,255,.74); --ov-glass: rgba(20,20,20,.6); --ov-line: rgba(255,255,255,.24);
  --display: 'Poppins', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --body: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --r: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.45 var(--body); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); letter-spacing: -.01em; text-wrap: balance; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
svg.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- shell ---------- */
#app { height: 100%; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { font: 800 22px/1 var(--display); letter-spacing: -.03em; margin-right: auto; display: flex; align-items: baseline; gap: 8px; }
.brand i { width: 9px; height: 9px; border-radius: 50%; background: var(--live); display: inline-block; }
.demo-tag { font: 600 10px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 4px 6px; border-radius: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 8px; border-radius: 99px; background: var(--raised); font-weight: 700; }
.coin { width: 16px; height: 16px; border-radius: 50%; flex: none; display: inline-block; background: radial-gradient(circle at 35% 30%, #fff3c4 0 18%, var(--coin) 40%, var(--coin-deep) 100%); box-shadow: inset 0 0 0 1.5px var(--coin-deep); }
.coin.lg { width: 30px; height: 30px; }
.iconbtn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; position: relative; color: var(--fg); }
.iconbtn:hover { background: var(--raised); }
.dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
#view { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
.tabs { display: flex; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--muted); border-radius: 10px; }
.tabs a.on { color: var(--fg); }
.tabs a.golive span.plus { width: 44px; height: 30px; border-radius: 10px; background: var(--live); color: var(--live-ink); display: grid; place-items: center; }
#app.immersive .top, #app.immersive .tabs { display: none; }
#app.immersive #view { overflow: hidden; background: var(--video); }

@media (min-width: 900px) {
  #app { display: grid; grid-template-columns: 210px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .top { grid-column: 2; }
  .tabs { grid-column: 1; grid-row: 1 / 3; flex-direction: column; gap: 4px; border-top: 0; border-right: 1px solid var(--line); padding: 64px 12px 12px; }
  .tabs a { flex: none; flex-direction: row; gap: 12px; padding: 10px 12px; font-size: 14px; }
  .tabs a.on, .tabs a:hover { background: var(--raised); }
  #app.immersive { display: flex; }
}

/* ---------- pages ---------- */
.page { max-width: 1180px; margin-inline: auto; padding-inline: 16px; padding-block: 16px 32px; display: flex; flex-direction: column; gap: 16px; }
.page.narrow { max-width: 560px; }
.page h1 { font-size: 26px; }
.page h2 { font-size: 18px; }
.sub { color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.seg { display: flex; gap: 20px; border-bottom: 1px solid var(--line); }
.seg button { padding: 8px 0; font: 700 16px var(--display); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.seg button.on { color: var(--fg); border-color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 18px 12px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 24px 16px; } }
.card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.thumb { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; background-color: var(--raised); background-size: cover; background-position: center; }
.thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 45%); }
.thumb > * { position: absolute; z-index: 1; }
.badge { font: 700 11px/1 var(--body); letter-spacing: .06em; padding: 5px 7px; border-radius: 6px; color: var(--ov); background: var(--ov-glass); display: inline-flex; align-items: center; gap: 4px; }
.badge.live { background: var(--onair); color: var(--onair-ink); top: 8px; left: 8px; }
.badge.ended { top: 8px; left: 8px; }
.badge.eye { bottom: 8px; left: 8px; }
.badge.eye svg { width: 13px; height: 13px; }
.price { top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 5px; border-radius: 99px; background: var(--coin); color: var(--coin-ink); font-weight: 800; font-size: 13px; }
.price .coin { box-shadow: inset 0 0 0 1.5px var(--coin-ink); background: none; display: grid; place-items: center; }
.price .lock { width: 12px; height: 12px; stroke-width: 2.4; }
.meta { display: flex; gap: 8px; min-width: 0; }
.meta > div { min-width: 0; }
.meta h3 { font: 700 14px/1.3 var(--body); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.meta p { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--display); color: #fff; background-size: cover; background-position: center; text-transform: uppercase; }
.av.lg { width: 84px; height: 84px; font-size: 30px; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); grid-column: 1 / -1; }
.empty b { display: block; color: var(--fg); font: 700 17px var(--display); margin-bottom: 4px; }
.skel { aspect-ratio: 3 / 4; border-radius: var(--r); background: var(--raised); }
/* Skeleton stream cards (skelCards in app.js): card-shaped placeholders with a soft shimmer while a list loads. */
.sk { background: linear-gradient(90deg, var(--raised) 25%, var(--line) 50%, var(--raised) 75%); background-size: 200% 100%; animation: sk-shimmer 1.3s ease-in-out infinite; }
.loadnote { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 0 2px; color: var(--muted); font-size: 14px; }
/* SVG arc with round ends on a faint track, turned by transform only (runs on the compositor, so it stays smooth). */
.loadnote .spin-ring { width: 20px; height: 20px; flex: none; animation: spin 1.4s linear infinite; will-change: transform; }
.loadnote .spin-ring .track { stroke: var(--line); }
.loadnote .spin-ring .arc { stroke: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.skel-card { pointer-events: none; }
.skel-card .thumb::after { display: none; }
.sk-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; padding-top: 4px; }
.sk-lines i { display: block; height: 11px; border-radius: 6px; }
.sk-lines i.short { width: 55%; }
@keyframes sk-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* ---------- buttons & forms ---------- */
.btn { height: 46px; padding: 0 20px; border-radius: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--raised); color: var(--fg); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.gold { background: var(--coin); color: var(--coin-ink); }
.btn.live { background: var(--live); color: var(--live-ink); }
.btn.ghost { background: none; border: 1px solid var(--line); }
.btn.sm { height: 34px; padding: 0 14px; border-radius: 99px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
/* Working button (busy() in app.js): stays readable and shows a small spinner before its label. */
.btn.loading[disabled] { opacity: .85; cursor: progress; }
/* Same ring as the page loaders (an SVG arc with round ends on a faint track), used as a mask so it takes the
   button's text colour; it only rotates, so the browser animates it on the GPU and it stays smooth. */
.btn.loading::before { content: ''; display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; flex: none;
  background: currentColor; will-change: transform; animation: spin 1.4s linear infinite;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.25'/%3E%3Ccircle cx='12' cy='12' r='10' stroke-linecap='round' stroke-dasharray='18 45'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5'%3E%3Ccircle cx='12' cy='12' r='10' opacity='.25'/%3E%3Ccircle cx='12' cy='12' r='10' stroke-linecap='round' stroke-dasharray='18 45'/%3E%3C/svg%3E") center / contain no-repeat; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea { height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; width: 100%; }
.field textarea { height: 84px; padding: 10px 14px; resize: vertical; }
.field small { color: var(--muted); min-height: 1.2em; }
.field small.bad, .err { color: var(--danger); }
.field small.good { color: var(--accent); }
.err { min-height: 1.3em; font-weight: 600; }
form.stack, .stack { display: flex; flex-direction: column; gap: 14px; }
.link { color: var(--accent); font-weight: 700; }

/* ---------- wallet ---------- */
.balance { display: flex; align-items: center; gap: 14px; padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.balance strong { font: 800 40px/1 var(--display); letter-spacing: -.02em; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-align: left; }
.pack:hover { border-color: var(--coin); }
.pack b { font: 800 22px/1 var(--display); display: flex; align-items: center; gap: 6px; }
.pack .bonus { font-size: 12px; font-weight: 700; color: var(--coin-deep); min-height: 1.4em; }
.pack .cost { margin-top: 4px; font-weight: 700; padding: 6px 12px; border-radius: 99px; background: var(--coin); color: var(--coin-ink); }
.list { display: flex; flex-direction: column; }
.list > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > div > span:first-child { min-width: 0; }
.list small { display: block; color: var(--muted); }
.plus-amt { color: var(--accent); font-weight: 700; white-space: nowrap; }
.minus-amt { font-weight: 700; white-space: nowrap; }

/* ---------- profile ---------- */
.profile { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.profile > div { min-width: 0; flex: 1 1 200px; }
.stats { display: flex; gap: 22px; }
.stats b { font: 800 18px var(--display); display: block; }
.stats span { font-size: 12.5px; color: var(--muted); }

/* ---------- stage (watch / broadcast) ---------- */
.stage { position: relative; height: 100%; max-width: 480px; margin-inline: auto; background: var(--video); color: var(--ov); overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.video { position: absolute; inset: 0; background-size: cover; background-position: center; }
.video .vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video .vid video { object-fit: cover !important; }
.video .mirror { transform: scaleX(-1); }
.video.locked { filter: blur(22px) brightness(.6); transform: scale(1.15); }
.scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 22%, transparent 48%, rgba(0,0,0,.72)); }
.st-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 12px; z-index: 3; }
.who { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--ov-glass); min-width: 0; }
.who div { min-width: 0; line-height: 1.2; }
.who b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { font-size: 11.5px; color: var(--ov-dim); display: flex; align-items: center; gap: 4px; }
.who small svg { width: 12px; height: 12px; }
.st-top .sp { flex: 1; }
.glass { background: var(--ov-glass); color: var(--ov); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.st-top .iconbtn { color: var(--ov); background: var(--ov-glass); }
.chat { position: absolute; left: 12px; right: 76px; bottom: 132px; max-height: 36%; display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; overflow: hidden; pointer-events: none; z-index: 2; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%); mask-image: linear-gradient(to bottom, transparent, #000 35%); }
.chat p { font-size: 13.5px; line-height: 1.3; text-shadow: 0 1px 2px rgba(0,0,0,.8); overflow-wrap: anywhere; }
.chat p b { color: var(--ov-dim); font-weight: 700; margin-right: 5px; }
.chat p.tip { align-self: flex-start; background: var(--coin); color: var(--coin-ink); text-shadow: none; padding: 3px 10px 3px 5px; border-radius: 99px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.chat p.tip b { color: inherit; margin: 0; }
.chat p.tip .coin { box-shadow: inset 0 0 0 1.5px var(--coin-ink); background: none; }
.st-bot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; }
.tipbar { display: flex; align-items: center; gap: 8px; }
.tipbar .chips { flex: 1; min-width: 0; }
.tipbar .chip { background: var(--ov-glass); border-color: var(--ov-line); color: var(--ov); padding: 0 12px 0 8px; }
.tipbar .chip.on { background: var(--coin); border-color: var(--coin); color: var(--coin-ink); }
.tipbar .chip.on .coin { box-shadow: inset 0 0 0 1.5px var(--coin-ink); background: none; }
.mybal { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px 0 7px; border-radius: 99px; font-weight: 700; color: var(--ov); background: var(--ov-glass); }
.say { display: flex; gap: 8px; }
.say input { flex: 1; min-width: 0; height: 44px; border-radius: 99px; border: 1px solid var(--ov-line); background: var(--ov-glass); color: var(--ov); padding: 0 16px; }
.say input::placeholder { color: var(--ov-dim); }
.say button { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ov-glass); color: var(--ov); }
.hint { position: absolute; left: 0; right: 0; top: 42%; text-align: center; z-index: 2; pointer-events: none; font: 700 15px var(--display); text-shadow: 0 1px 6px rgba(0,0,0,.7); opacity: 0; transition: opacity .25s; padding-inline: 24px; }
.hint.on { opacity: 1; }
.fly { position: absolute; z-index: 4; pointer-events: none; display: flex; align-items: center; gap: 4px; font: 800 18px var(--display); color: var(--coin); text-shadow: 0 1px 4px rgba(0,0,0,.7); animation: fly 1s ease-out forwards; }
@keyframes fly { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } 15% { transform: translate(-50%, -70%) scale(1.25); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), -260px) scale(.9); opacity: 0; } }
.ring { position: absolute; z-index: 3; pointer-events: none; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%; border: 2px solid var(--coin); animation: ring .5s ease-out forwards; }
@keyframes ring { from { transform: scale(.3); opacity: .9; } to { transform: scale(1.3); opacity: 0; } }

/* paywall drops down from the top of the stage */
.paywall { position: absolute; top: 0; left: 0; right: 0; z-index: 5; background: var(--surface); color: var(--fg); border-radius: 0 0 24px 24px; padding: calc(64px + env(safe-area-inset-top, 0px)) 20px 24px; display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5); transform: translateY(-105%); transition: transform .45s cubic-bezier(.2,.9,.25,1); }
.paywall.on { transform: none; }
.paywall .cost { display: flex; align-items: center; gap: 10px; font: 800 44px/1 var(--display); }
.paywall h2 { font-size: 21px; }
.paywall .have { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
.paywall .x { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }

/* go-live setup panel */
.setup { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; background: var(--surface); color: var(--fg); border-radius: 24px 24px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px)); max-height: 78%; overflow-y: auto; user-select: text; -webkit-user-select: text; }
.setup .chips .chip { padding: 0 12px 0 8px; }
.setup .chips .chip.free { padding: 0 14px; }
.nocam { position: absolute; inset: 0 0 45% 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--ov-dim); z-index: 1; }
.livebar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stat { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 99px; background: var(--ov-glass); font-weight: 700; }
.stat.red { background: var(--onair); color: var(--onair-ink); }
.stat svg { width: 14px; height: 14px; }

/* ---------- sheets & toasts ---------- */
.veil { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 480px; max-height: 88%; overflow-y: auto; background: var(--surface); color: var(--fg); border-radius: 24px 24px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; animation: up .3s cubic-bezier(.2,.9,.25,1); }
@keyframes up { from { transform: translateY(100%); } }
@media (min-width: 700px) { .veil { align-items: center; } .sheet { border-radius: 24px; } }
.sheet header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet h2 { font-size: 20px; }
.note { font-size: 13px; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: var(--raised); }
#toasts { position: fixed; left: 0; right: 0; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding-inline: 16px; }
.toast { background: var(--fg); color: var(--bg); font-weight: 600; padding: 10px 16px; border-radius: 12px; max-width: 420px; text-align: center; animation: fade .2s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- wallet extras, creator tools ---------- */
.cards2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.balance.earn { justify-content: space-between; flex-wrap: wrap; }
.balance.earn strong { font-size: 30px; }
.inrow { display: flex; gap: 8px; }
.inrow input { flex: 1; min-width: 0; }
.list > div { align-items: center; }
.list a b:hover { text-decoration: underline; }
.menu { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.menu a { display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); }
.menu a:last-child { border-bottom: 0; }
.menu a:hover { background: var(--raised); }
.menu a div { flex: 1; min-width: 0; }
.menu b { display: block; }
.menu small { color: var(--muted); }
.menu svg { color: var(--muted); }
.plan { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.plan > div { flex: 1 1 170px; min-width: 0; }
.plan.on { border-color: var(--accent); }
.tag { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: var(--raised); white-space: nowrap; }
.tag.ok { color: var(--accent); }
.kpis { display: flex; gap: 32px; flex-wrap: wrap; }
.kpis b { font: 800 28px/1.1 var(--display); display: block; }
.kpis span { color: var(--muted); font-size: 13px; }
.backlink { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-weight: 600; align-self: flex-start; }
.backlink svg { width: 18px; height: 18px; }

/* ---------- ratings ---------- */
.rating { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.rating svg { width: 17px; height: 17px; fill: var(--coin); stroke: var(--coin); }
.rating .sub { font-weight: 400; }
.stars { display: flex; justify-content: center; gap: 4px; }
.stars button { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; color: var(--muted); }
.stars button svg { width: 38px; height: 38px; }
.stars button.on svg { fill: var(--coin); stroke: var(--coin); }

/* ---------- end of stream ---------- */
.endscreen { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 24px; background: rgba(6,9,14,.72); color: var(--ov); text-align: center; animation: fade .3s; user-select: text; -webkit-user-select: text; }
.endscreen > .stack { width: 100%; max-width: 340px; align-items: center; gap: 18px; }
.endscreen .stack .stack { width: 100%; }
.endscreen h2 { font-size: 26px; margin-bottom: 6px; }
.endscreen p { color: var(--ov-dim); }
.endscreen .err { color: #ff9aa8; }
.endscreen .stars button { color: var(--ov-dim); }
.endscreen .btn.ghost { border-color: var(--ov-line); color: var(--ov); }
.endscreen .btn.primary[disabled] { opacity: 1; background: var(--ov-glass); color: var(--ov-dim); border: 1px solid var(--ov-line); }

.unmute { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; height: 44px; padding: 0 18px; border-radius: 99px; font-weight: 700; color: var(--ov); background: var(--ov-glass); border: 1px solid var(--ov-line); }

.st-top .stat { flex: none; }
.st-top .stat svg { width: 17px; height: 17px; }
.st-top .btn.sm { flex: none; }
.who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* ---------- identity verification ---------- */
.banner { padding: 14px; border-radius: var(--r); background: var(--raised); border: 1px solid var(--line); }
.banner.ok { border-color: var(--accent); }
.banner.bad { border-color: var(--danger); }
.upload { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.upload > div:last-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.shot { flex: none; width: 84px; height: 84px; border-radius: 10px; background: var(--raised) center / cover no-repeat; display: grid; place-items: center; font: 800 26px var(--display); color: var(--muted); }
.filein { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.filein:focus-visible + *, label.btn:focus-within { outline: 2px solid var(--accent); }
label.btn { cursor: pointer; }

/* ---------- go live bubbles, upload, calls ---------- */
.bubbles { position: fixed; inset: 0; z-index: 40; background: rgba(4,6,10,.6); animation: fade .15s; }
.bub-set { position: absolute; display: flex; gap: 18px; align-items: flex-end; transform: translateX(-50%); }
.bub-set.side { transform: none; align-items: flex-start; }
.bub { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 72px; color: var(--ov); font-size: 12.5px; text-align: center; animation: pop .28s cubic-bezier(.2,1.2,.4,1) backwards; }
.bub span { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--fg); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.bub span svg { width: 26px; height: 26px; }
.bub:first-child span { background: var(--live); color: var(--live-ink); }
.bub:nth-child(2) { animation-delay: .05s; }
.bub:nth-child(3) { animation-delay: .1s; }
.bub-set:not(.side) .bub:nth-child(2) { margin-bottom: 24px; }
.bub:focus-visible span { outline: 2px solid var(--ov); outline-offset: 3px; }
.bub:focus-visible { outline: none; }
@keyframes pop { from { transform: translateY(24px) scale(.4); opacity: 0; } }
.shot.tall { height: 112px; overflow: hidden; }
.shot video { width: 100%; height: 100%; object-fit: cover; }
.bar { height: 8px; border-radius: 99px; background: var(--raised); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* ---------- go live setup, OBS, preview ---------- */
.seg2 { display: flex; padding: 3px; border-radius: 12px; background: var(--raised); }
.seg2 button { flex: 1; height: 38px; border-radius: 10px; font-weight: 700; color: var(--muted); }
.seg2 button.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
#pv-badge { position: absolute; left: 12px; bottom: 16px; z-index: 2; }
.link.ov { color: var(--ov); text-decoration: underline; font-weight: 600; }
#connecting h2 { font-size: 26px; }

.picklist { max-height: 228px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.picklist > p { padding: 12px 14px; }
.field label.pick { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 400; color: var(--fg); }
.pick:last-child { border-bottom: 0; }
.field .pick input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); padding: 0; }
.pick span { min-width: 0; }
.pick b { display: block; }
.pick small { color: var(--muted); }

.titlebar { position: absolute; top: calc(106px + env(safe-area-inset-top, 0px)); left: 12px; max-width: calc(100% - 24px); z-index: 3; display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 99px; background: var(--ov-glass); color: var(--ov); font-weight: 700; }
.titlebar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.titlebar svg, .btn.sm svg { width: 16px; height: 16px; }
.card > .btn.sm { align-self: flex-start; }

.badge.priv { bottom: 8px; right: 8px; }
.badge.priv svg { width: 11px; height: 11px; stroke-width: 2.4; }
.pickhost input[type="search"] { height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; width: 100%; }
.pickhost small { color: var(--muted); }
.setup > *, .sheet > * { flex-shrink: 0; }

/* ---------- posts ---------- */
.homesw { max-width: 360px; }
.post { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.post header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.post header small { display: block; color: var(--muted); }
.pm { width: 100%; max-height: 520px; border-radius: 10px; object-fit: cover; background: var(--raised); display: block; }
.pm.ph { aspect-ratio: 4 / 3; background-size: cover; }
.cap { overflow-wrap: anywhere; }
.post footer { display: flex; gap: 6px; }
.act { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 99px; color: var(--muted); font-weight: 700; }
.act:hover { background: var(--raised); }
.act svg { width: 20px; height: 20px; }
.act.on { color: var(--heart); }
.act.on svg { fill: var(--heart); stroke: var(--heart); }
.say.light input { border-color: var(--line); background: var(--surface); color: var(--fg); }
.say.light input::placeholder { color: var(--muted); }
.say.light button { background: var(--accent); color: var(--accent-ink); }
#cm-list { max-height: 45vh; overflow-y: auto; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.postcol { max-width: 560px; }

.field label.pick.opt, label.pick.opt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
label.pick.opt input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
label.pick.opt:has(input:checked) { border-color: var(--accent); }

.tkx { height: 46px; }
.tkx iframe { width: 100%; height: 46px; border: 0; display: block; }
.tkx input { width: 100%; height: 46px; border-radius: 12px; border: 1px dashed var(--line); background: var(--raised); color: var(--muted); padding: 0 14px; }

.steps.big { color: var(--fg); gap: 16px; padding-left: 22px; }
.steps.big > li > b { display: block; margin-bottom: 6px; }
.steps.big .list small { display: block; color: var(--muted); }
.steps.big .list > div { padding: 8px 0; }
.sel { user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }

/* ---------- top tippers, streamer paywall control ---------- */
.tippers { position: absolute; top: calc(64px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; z-index: 3; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tippers::-webkit-scrollbar { display: none; }
.tipper { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 8px; border-radius: 99px; background: var(--ov-glass); color: var(--ov); font-size: 13px; }
.tipper > span { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.tipper .coin { width: 13px; height: 13px; }
.tipper.first { border: 1.5px solid var(--coin); }
.tipper.first b { color: var(--coin); }
.rank { font-style: normal; font-weight: 800; width: 16px; text-align: center; color: var(--ov-dim); }
.crown { width: 18px; height: 18px; fill: var(--coin); flex: none; }
.paybtn { position: absolute; right: 12px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 3; display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 16px 0 12px; border-radius: 99px; font-weight: 800; background: var(--coin); color: var(--coin-ink); box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.paybtn svg { width: 18px; height: 18px; stroke-width: 2.2; }
.paybtn .coin { box-shadow: inset 0 0 0 1.5px var(--coin-ink); background: none; }
.paybtn.on { background: var(--ov-glass); color: var(--ov); border: 1.5px solid var(--coin); }
.paybtn.on .coin { box-shadow: inset 0 0 0 1.5px var(--coin); }

.post.featured { border-color: var(--coin); }
.feat { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding: 4px 9px 4px 7px; border-radius: 99px; background: var(--coin); color: var(--coin-ink); }
.feat svg { width: 12px; height: 12px; fill: currentColor; stroke: currentColor; }

/* ---------- featured (fire) ---------- */
:root { --fire: #ff8a1f; }
.flame { width: 14px; height: 14px; fill: var(--fire); flex: none; }
.tl { top: 8px; left: 8px; display: flex; gap: 5px; align-items: center; }
.tl .badge { position: static; }
.badge.fire { padding: 4px 5px; background: var(--ov-glass); }
.badge.fire .flame { width: 15px; height: 15px; }
.feat { background: transparent; border: 1.5px solid var(--fire); color: var(--fg); padding: 3px 9px 3px 6px; }
.feat .flame { width: 13px; height: 13px; fill: var(--fire); stroke: none; }
.post.featured { border-color: var(--fire); }

/* ---------- profile analytics ---------- */
.an-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.an-grid > div { padding: 18px 10px; text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.an-grid > div:nth-child(odd) { border-right: 1px solid var(--line); }
.an-grid > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.an-grid b { font: 800 26px/1.1 var(--display); color: var(--live); display: inline-flex; align-items: center; gap: 8px; }
.an-grid b svg { width: 24px; height: 24px; }
.an-grid b .coin { width: 22px; height: 22px; }
.an-grid span { color: var(--muted); font-size: 13.500px; }
.an-row, .an-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.an-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.an-row > span { color: var(--muted); }
.an-row > span b { color: var(--fg); font-size: 17px; margin-left: 4px; }
.an-card { display: flex; flex-direction: column; gap: 10px; }
.an-top { margin: 0; padding: 0; list-style: none; counter-reset: r; display: flex; flex-direction: column; }
.an-top li { counter-increment: r; display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.an-top li::before { content: counter(r); width: 20px; text-align: center; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.an-top li > span:not(.av) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-top li > b { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.an-top .av { width: 28px; height: 28px; font-size: 11px; }
.an-top li > b svg { width: 15px; height: 15px; }
.an-h { margin: 8px 0 0; font: 800 17px/1.2 var(--display); }
.an-grid.two > div { border-bottom: 0; }

/* ---------- search ---------- */
.searchbar { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.searchbar:focus-within { border-color: var(--accent); }
.searchbar input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--fg); outline: none; font-size: 16px; }
.seg button span { font-weight: 600; font-size: 13px; color: var(--muted); }
.urow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.urow > span:not(.av) { flex: 1; min-width: 0; }
.urow small { display: block; color: var(--muted); }
.urow svg { color: var(--muted); }
.urow .av { width: 42px; height: 42px; }

/* keep the top bar comfortable on small phones now that it has four actions */
.top { gap: 4px; }
.top .pill { margin-right: 4px; }
@media (max-width: 430px) { .demo-tag { display: none; } }

/* ---------- edit stream ---------- */
.switchrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.switchrow span { min-width: 0; }
.switchrow b { display: block; }
.switchrow small { color: var(--muted); }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 50px; height: 30px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }
.btn.danger { color: var(--danger); border-color: var(--danger); }

/* ---------- profile picture ---------- */
.avedit { position: relative; flex: none; cursor: pointer; border-radius: 50%; display: block; }
.avedit:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.avcam { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--bg); }
.avcam svg { width: 16px; height: 16px; }
.avedit.busy { opacity: .5; pointer-events: none; }

/* ---------- Peeks branding ---------- */
.brand { font: 700 21px/1 var(--display); letter-spacing: -.045em; gap: 6px; }
.brand sup { font-size: 8px; font-weight: 500; letter-spacing: 0; margin-left: 1px; align-self: flex-start; }
.top { background: var(--surface); border-bottom-color: transparent; }
.tabs { background: var(--surface); border-top-color: transparent; }
.chip.on, .seg2 button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: none; }
.setup .chips .chip.on, .sheet .chips .chip.on { background: var(--accent); color: var(--accent-ink); }
.chip.on .coin { box-shadow: inset 0 0 0 1.500px #fff; background: none; }
.seg button { font-weight: 600; }
.plus-amt, .tag.ok, .field small.good { color: var(--ok); }
.banner.ok { border-color: var(--ok); }
.av.lg { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.an-grid b { color: var(--accent); }
.toast { background: #ffffff; color: #1c1c1c; }
.tabs a.on { color: var(--accent); }
.tabs a.golive.on span:last-child { color: var(--accent); }
.empty { border-color: var(--line); }
h1, h2 { letter-spacing: -.02em; }
body { font-size: 14.500px; }

.brand { letter-spacing: -.03em; font-size: 23px; }

/* ---------- viewer: transparent header over the video ---------- */
.st-top.clear .who, .st-top.clear .stat, .st-top.clear .iconbtn { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.st-top.clear .who { padding-left: 0; }
.st-top.clear .who b, .st-top.clear .who small, .st-top.clear .stat { text-shadow: 0 1px 3px rgba(0,0,0,.85); }
.st-top.clear svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.8)); }
.st-top.clear .iconbtn:hover { background: var(--ov-glass); }
.scrim.soft { background: linear-gradient(to bottom, rgba(0,0,0,.22), transparent 14%, transparent 50%, rgba(0,0,0,.72)); }

/* ---------- collapsible profile sections ---------- */
details.sec { border-top: 1px solid var(--line); }
details.sec > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; cursor: pointer; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary svg { color: var(--muted); transition: transform .15s; transform: rotate(90deg); }
details.sec:not([open]) > summary svg { transform: none; }
details.sec > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.secbody { padding-bottom: 16px; }

/* ---------- get the streaming app ---------- */
.getapp { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; padding: 28px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.getapp > svg { width: 52px; height: 52px; color: var(--accent); }
.getapp h1 { font-size: 23px; }
.getapp .small { font-size: 12.500px; }

/* ---------- phone streaming ---------- */
.netbar { position: absolute; left: 12px; right: 12px; top: calc(110px + env(safe-area-inset-top, 0px)); z-index: 4; padding: 9px 12px; border-radius: 12px; background: var(--ov-glass); color: var(--ov); font-weight: 600; font-size: 13px; text-align: center; }
.link.small { font-size: 13px; }
.center { align-self: center; text-align: center; }
#ready { max-height: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted, #aaa); line-height: 1.45; }
.check input { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; accent-color: var(--accent); }
.check a { color: var(--fg, #fff); }

/* ---------- private messages ---------- */
.row.between { justify-content: space-between; }
.dmlist { display: flex; flex-direction: column; }
/* New message: a member row (button) in the pick list, avatar beside the name like the checkbox rows above */
button.pick { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; text-align: left; background: none; color: var(--fg); border: 0; border-bottom: 1px solid var(--line); font: inherit; font-size: 14px; cursor: pointer; }
button.pick:last-child { border-bottom: 0; }
button.pick:hover, button.pick:focus-visible { background: var(--raised); }
button.pick:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
button.pick span:not(.av) { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
button.pick b, button.pick small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dmrow { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); color: var(--fg); text-decoration: none; }
.dmrow:hover { background: var(--raised); }
.dmrow .av { width: 48px; height: 48px; font-size: 17px; }
.dmrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dmrow-top { display: flex; justify-content: space-between; gap: 8px; }
.dmrow-top small { color: var(--muted); flex: none; }
.dmrow-last { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.dmrow.unread .dmrow-last { color: var(--fg); font-weight: 600; }
.count { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font: 700 12px/22px var(--display, inherit); text-align: center; font-style: normal; }
.pick { width: 100%; text-align: left; background: none; color: inherit; border: 0; cursor: pointer; }
.dm { height: 100%; display: flex; flex-direction: column; max-width: 760px; margin-inline: auto; position: relative; }
.dm-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.dm-who { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; min-width: 0; }
.dm-who span:not(.av) { display: flex; flex-direction: column; line-height: 1.2; }
.dm-who small { color: var(--muted); }
.dm-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; -webkit-overflow-scrolling: touch; }
.dm-body .center { text-align: center; }
.dm-day { text-align: center; margin: 10px 0 4px; }
.dm-day span { font-size: 12px; color: var(--muted); background: var(--raised); padding: 3px 10px; border-radius: 99px; }
.msg { align-self: flex-start; max-width: min(78%, 420px); background: var(--raised); color: var(--fg); border-radius: 18px 18px 18px 6px; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-radius: 18px 18px 6px 18px; }
.msg p { margin: 0; white-space: normal; }
.msg p a { color: inherit; text-decoration: underline; }
.msg.failed { opacity: .75; outline: 1px solid var(--live); }
.dm-meta { font-size: 11px; opacity: .75; align-self: flex-end; display: flex; align-items: center; gap: 6px; }
.dm-meta .link { background: none; border: 0; color: inherit; text-decoration: underline; font: inherit; padding: 0; cursor: pointer; }
.dm-prog { width: 70px; height: 4px; border-radius: 4px; background: #ffffff40; overflow: hidden; display: inline-block; }
.dm-prog i { display: block; height: 100%; background: currentColor; transition: width .2s; }
.dm-media { display: grid; gap: 3px; margin: -4px -8px 0; border-radius: 14px; overflow: hidden; }
.dm-media.n2, .dm-media.n3, .dm-media.n4 { grid-template-columns: 1fr 1fr; }
.dm-media.n3 > :first-child { grid-column: 1 / -1; }
.dm-img { display: block; padding: 0; border: 0; background: #0003; cursor: zoom-in; }
.dm-img img { display: block; width: 100%; height: auto; max-height: 340px; object-fit: cover; }
.dm-media.n2 .dm-img img, .dm-media.n3 .dm-img img, .dm-media.n4 .dm-img img { aspect-ratio: 1; height: 100%; }
.dm-img.gone { min-height: 80px; cursor: default; }
.dm-img.gone img { display: none; }
.dm-img.gone::after { content: 'Photo not available'; display: grid; place-items: center; min-height: 80px; font-size: 13px; opacity: .8; }
.dm-vid { display: block; width: 100%; max-height: 360px; background: #000; }
.dm-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: #00000026; color: inherit; text-decoration: none; min-width: 200px; }
.dm-file span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dm-file b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.dm-file small { opacity: .8; font-size: 12px; }
.dm-tray { display: flex; gap: 8px; overflow-x: auto; padding: 8px 10px 0; border-top: 1px solid var(--line); background: var(--surface); }
.chipfile { position: relative; flex: none; width: 88px; display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.chipfile img, .chipfile video, .chipfile > .ic { width: 88px; height: 88px; object-fit: cover; border-radius: 12px; background: var(--raised); }
.chipfile.doc > .ic { padding: 26px; }
.chipfile span { display: flex; flex-direction: column; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chipfile .iconbtn { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; background: #000a; color: #fff; }
.chipfile .iconbtn .ic { width: 14px; height: 14px; }
.dm-older { display: flex; justify-content: center; padding: 4px 0 8px; }
.dm-block { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 12px 14px; background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; }
.dm-compose[hidden] { display: none; }
.dm-compose { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px; background: var(--surface); border-top: 1px solid var(--line); }
.dm-tray:not([hidden]) + .dm-compose { border-top: 0; }
.dm-compose textarea { flex: 1; width: 100%; resize: none; min-height: 40px; max-height: 140px; padding: 9px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--raised); color: var(--fg); font: inherit; line-height: 1.4; }
.dm-compose .send { background: var(--accent); color: var(--accent-ink); }
.dm-drop { position: absolute; inset: 0; display: grid; place-items: center; background: #000b; color: #fff; font: 700 20px var(--display, inherit); border: 3px dashed var(--accent); border-radius: 16px; pointer-events: none; }
.lightbox { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #000e; padding: 16px; }
.lightbox img { max-width: 100%; max-height: calc(100% - 64px); object-fit: contain; border-radius: 8px; }
.lb-bar { display: flex; gap: 10px; align-items: center; margin-top: 12px; color: #fff; }
.lb-bar .iconbtn { color: #fff; }

/* hearts: red */
.fly.heart { color: var(--heart); font-size: 26px; }
#like svg { stroke: var(--heart); fill: var(--heart); }

/* ---------- messages: press-and-hold menus, replies, emoji ---------- */
.msg { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; transition: transform .15s, box-shadow .3s; cursor: default; }
.msg:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.msg.held { transform: scale(.97); }
.msg.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 4px var(--coin); } 100% { box-shadow: 0 0 0 0 transparent; } }
.msg.deleted { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.msg.deleted p { font-style: italic; }
.msg.me.deleted { color: var(--muted); }
.quote { display: flex; flex-direction: column; text-align: left; gap: 1px; padding: 6px 10px; border-radius: 10px; border-left: 3px solid currentColor; background: #0000002e; color: inherit; font-size: 13px; max-width: 100%; }
.msg:not(.me) .quote { border-left-color: var(--accent); }
.quote b { font-size: 12.5px; }
.quote span { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-reply { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; background: var(--surface); border-top: 1px solid var(--line); color: var(--accent); }
.dm-reply > span { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--fg); border-left: 3px solid var(--accent); padding-left: 10px; }
.dm-reply small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-reply + .dm-tray, .dm-reply:not([hidden]) ~ .dm-compose { border-top: 0; }
.dm-input { flex: 1; min-width: 0; position: relative; display: flex; align-items: flex-end; }
.dm-input textarea { padding-right: 44px !important; }
.emo-btn { position: absolute; right: 2px; bottom: 1px; color: var(--muted); }
.emo-btn.on, .emo-btn:hover { color: var(--coin); background: none; }
.dm-emoji { background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px 4px; display: flex; flex-direction: column; gap: 4px; }
.emo-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.emo-tabs::-webkit-scrollbar { display: none; }
.emo-tabs button { flex: none; width: 38px; height: 34px; border-radius: 8px; font-size: 19px; opacity: .55; }
.emo-tabs button.on { opacity: 1; background: var(--raised); }
.emo-title { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 2px 4px; }
.emo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); max-height: 196px; overflow-y: auto; }
.emo-grid button { height: 42px; font-size: 26px; border-radius: 8px; line-height: 1; }
.emo-grid button:hover, .emo-grid button:focus-visible { background: var(--raised); }
.menu-preview { padding: 10px 12px; border-radius: 12px; background: var(--raised); color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.menu-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 16px; text-align: left; font-weight: 600; border-bottom: 1px solid var(--line); }
.menu-item:last-child { border-bottom: 0; }
.menu-item:hover, .menu-item:focus-visible { background: var(--raised); }
.menu-item.danger { color: var(--danger); }
.btn.danger-fill { background: #d92d3f; color: #fff; }
.dmrow { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.sub.small { font-size: 12.5px; }
.an-period { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.an-range { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; min-width: 0; }
.an-range .field, .an-range input { min-width: 0; }
.an-range .btn { height: 46px; }
@media (max-width: 560px) { .an-range { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .an-range .btn { grid-column: 1 / -1; } }
.an-period, .an-period .chips { min-width: 0; max-width: 100%; }

/* ---------- replay controls ---------- */
.replay { position: absolute; left: 12px; right: 12px; bottom: calc(132px + env(safe-area-inset-bottom, 0px)); z-index: 4; padding: 10px 12px 8px; border-radius: 16px; background: var(--ov-glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--ov); display: flex; flex-direction: column; gap: 6px; }
.stage:has(.replay:not([hidden])) .chat { bottom: 262px; }
.rp-row { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 700; }
.rp-tag { letter-spacing: .08em; font-size: 10.5px; padding: 3px 7px; border-radius: 5px; background: #ffffff26; }
.rp-time { color: var(--ov-dim); }
.rp-seek { --p: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; cursor: pointer; }
.rp-seek::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--p), #ffffff40 var(--p)); }
.rp-seek::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--p), #ffffff40 var(--p)); }
.rp-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; margin-top: -6px; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.rp-seek::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; }
.rp-btns { display: flex; justify-content: center; align-items: center; gap: 28px; }
.rp-btn { position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--ov); }
.rp-btn:hover, .rp-btn:focus-visible { background: #ffffff1f; }
.rp-btn svg { width: 34px; height: 34px; stroke-width: 1.6; }
.rp-btn i { position: absolute; font: 800 10.5px/1 var(--display); font-style: normal; top: 50%; left: 50%; transform: translate(-50%, -38%); }
.rp-btn.big { width: 58px; height: 58px; background: #fff; color: #111; }
.rp-btn.big svg { width: 26px; height: 26px; }
.rp-btn.big:hover { background: #fff; }
.rp-flash { position: absolute; top: 40%; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; padding: 14px 18px; border-radius: 99px; background: #0008; pointer-events: none; animation: rpf .6s ease-out forwards; font-weight: 800; }
.rp-flash.l { left: 14%; } .rp-flash.r { right: 14%; }
.rp-flash svg { width: 30px; height: 30px; }
@keyframes rpf { from { opacity: 0; transform: scale(.8); } 20% { opacity: 1; transform: scale(1); } to { opacity: 0; } }
/* viewer: chat hidden with the overlays button (#ov-tog) */
.stage.no-ov .chat { display: none !important; }
/* With overlays off, only the chat messages and the message bar go: the tip amounts drop to the bottom row, beside
   the balance and the like button. Like hearts, tip animations, coin bursts and top tippers keep showing. */
.stage.no-ov .st-bot { flex-direction: row; align-items: center; }
.stage.no-ov .tipbar { flex: 1; min-width: 0; }
.stage.no-ov .say input, .stage.no-ov .say button[type="submit"] { display: none; }
#ov-tog.off { color: var(--coin); }

/* Go live: front / back camera switch, floating at the top right of the camera picture, under the top bar. */

/* Lazy pictures (thumbnails, avatars) fade in over their placeholder once downloaded. */
.bg-in { animation: bg-in .25s ease-out; }
@keyframes bg-in { from { filter: brightness(.6); } }

/* Long lists: the browser skips layout and painting for posts far off screen (sizes are estimates for the scrollbar). */
.post { content-visibility: auto; contain-intrinsic-size: auto 560px; }

/* Skeleton screens (skRows, skPosts, skBlocks, skBubbles, skProfile in app.js). The shimmer stops after ~20 s,
   so a request that never answers leaves still grey shapes, not an endless animation. */
.sk { animation-iteration-count: 15; }
.skw { grid-column: 1 / -1; display: flex; flex-direction: column; pointer-events: none; }
.sk-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sk-row .av { width: 42px; height: 42px; }
.sk-row .sk-lines { padding-top: 0; }
.sk-row .sk-lines i:first-child { width: 60%; }
.sk-post { gap: 12px; }
.sk-post .sk-row { border: 0; padding: 0; }
.sk-media { aspect-ratio: 4 / 3; border-radius: 12px; }
.sk-blocks { display: grid; gap: 10px; }
.sk-blocks.cols { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.sk-blocks > .sk { border-radius: var(--r); }
.sk-bubbles { gap: 10px; padding: 12px; }
.sk-bubbles i { display: block; height: 38px; border-radius: 18px; }
.sk-bubbles i.me { align-self: flex-end; }
.sk-profile { align-items: center; gap: 10px; padding-top: 12px; }
.sk-profile > i { display: block; height: 12px; border-radius: 6px; }
.sk-profile .sk-btns { display: flex; gap: 8px; margin-block: 6px 14px; }
.sk-profile .sk-btns i { display: block; width: 92px; height: 34px; border-radius: 17px; }
.sk-profile .grid { width: 100%; }
.sk-inline { display: inline-block; width: 110px; height: 12px; border-radius: 6px; vertical-align: middle; }
.picklist .skw { padding: 0 14px; }

/* Post photo/video frame: skeleton shimmer while loading, the picture once loaded, a quiet notice if it fails. */
.pm-box { position: relative; min-height: 220px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
  background: linear-gradient(90deg, var(--raised) 25%, var(--line) 50%, var(--raised) 75%); background-size: 200% 100%; animation: sk-shimmer 1.3s ease-in-out 15; }
.pm-box > .pm { position: relative; z-index: 1; opacity: 0; transition: opacity .25s; }
.pm-box.ok { min-height: 0; aspect-ratio: auto; background: none; animation: none; }
.pm-box.ok > .pm { opacity: 1; }
/* A photo or video that can't load shows a placeholder picture (a soft brand-tinted card with a photo or play
   icon) instead of an error, so the feed still looks complete. */
.pm-box.bad { animation: none; display: block;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='none' stroke='%23ffffff' stroke-opacity='.55' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='14' y='20' width='68' height='56' rx='9'/%3E%3Ccircle cx='35' cy='39' r='6'/%3E%3Cpath d='M16 70l20-20 14 13 9-8 21 17'/%3E%3C/svg%3E") center / 96px no-repeat, radial-gradient(120% 90% at 20% 10%, rgba(233,52,95,.28), transparent 60%), radial-gradient(110% 90% at 90% 100%, rgba(255,140,60,.18), transparent 60%), var(--raised); }
.pm-box.bad[data-kind="Video"] {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='none' stroke='%23ffffff' stroke-opacity='.55' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='14' y='20' width='68' height='56' rx='9'/%3E%3Cpath d='M41 37v22l18-11z'/%3E%3C/svg%3E") center / 96px no-repeat, radial-gradient(120% 90% at 20% 10%, rgba(233,52,95,.28), transparent 60%), radial-gradient(110% 90% at 90% 100%, rgba(255,140,60,.18), transparent 60%), var(--raised); }
.pm-box.bad > .pm { display: none; }
/* "Hide chat" pointer for someone's first two live streams */
.coach { position: absolute; z-index: 30; display: flex; align-items: center; gap: 6px; padding: 8px 14px 8px 10px; border-radius: 12px; background: #fff; color: #111; font-weight: 700; font-size: 14px; box-shadow: 0 6px 24px #0006; pointer-events: auto; cursor: pointer; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; white-space: nowrap; }
.coach.on { opacity: 1; transform: none; animation: coach-bob 1.4s ease-in-out .3s infinite; }
.coach::before { content: ""; position: absolute; top: -7px; left: calc(var(--ax, 50%) - 8px); border: 8px solid transparent; border-top: 0; border-bottom-color: #fff; }
.coach-arrow { width: 18px; height: 18px; flex: none; color: var(--accent, #e9345f); }
@keyframes coach-bob { 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .coach.on { animation: none; } }
.su-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.field select optgroup { font-weight: 700; color: var(--muted); }

/* Wallet: cards that cannot pay (disabled, declined, pending, expired) */
#w-pm .pm-off span { opacity: .6; }
#w-pm .pm-off small { display: block; }
#buy-newcard, .note a { color: var(--accent); text-decoration: underline; }
.balance.cash { justify-content: space-between; flex-wrap: wrap; border-color: var(--coin-deep); }
.balance.cash strong { font-size: 30px; }
/* paid posts */
.pm.locked { position: relative; aspect-ratio: 4 / 3; filter: none; overflow: hidden; display: grid; place-items: center; }
.pm.locked::before { content: ''; position: absolute; inset: -20px; background: inherit; filter: blur(24px) brightness(.55); }
.lockbox { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; color: #fff; text-align: center; }
.lockbox > svg { width: 34px; height: 34px; }
.lockbox .btn .coin { box-shadow: inset 0 0 0 1.5px var(--coin-ink); background: none; }
/* paid photo/video in Messages (a paid private post for the other person) */
.dm-paid { display: flex; flex-direction: column; gap: 6px; margin: -4px -8px 0; border-radius: 14px; overflow: hidden; min-width: 200px; }
.dm-paid img, .dm-paid video { display: block; width: 100%; max-height: 340px; object-fit: cover; background: #000; }
.dm-paid .dm-img { padding: 0; border: 0; background: none; }
.dm-paid > p { margin: 0; padding: 0 8px 4px; }
.dm-paid-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 0 8px; opacity: .85; }
.dm-paid.locked { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.dm-paid.locked::before { content: ''; position: absolute; inset: -20px; background: inherit; filter: blur(24px) brightness(.55); }
.dm-paid.locked .lockbox small { opacity: .85; }
.dm-paid.gone { min-height: 0; padding: 10px; flex-direction: row; align-items: center; opacity: .75; }
.dm-paid.gone p { margin: 0; padding: 0; }
.dm-paid-pick { display: grid; gap: 8px; justify-items: start; }
.dm-paid-pick img, .dm-paid-pick video { width: 100%; max-height: 260px; object-fit: contain; border-radius: 12px; background: #000; }
.sheet .cost { display: flex; align-items: center; justify-content: center; gap: 10px; font: 800 40px/1 var(--display); }
.sheet .have { display: flex; justify-content: center; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; }
#up-pnote.bad { color: var(--danger); }
.paidf { gap: 10px; }
.paidf .switchrow { text-transform: none; letter-spacing: 0; }
.paidf .switchrow b { font-size: 15px; color: var(--fg); }
.paidf .switchrow small { font-size: 13px; font-weight: 400; }

/* ---------- tip celebrations (20+, 50+, 100+ coins) ---------- */
.tipfx { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; display: grid; place-items: center; color: #fff; }
.tipfx .tf-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 22px; border-radius: 20px; text-align: center; font-weight: 700; }
.tipfx .tf-line { font-size: 16px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.tipfx .tf-line b { font-weight: 800; }
.tipfx .tf-amt { display: inline-flex; align-items: center; gap: 6px; font: 800 26px/1 var(--display); }
/* 20+: sparkles */
.tipfx.spark { place-items: start center; padding-top: calc(170px + env(safe-area-inset-top, 0px)); }
.tipfx.spark .tf-card { background: linear-gradient(135deg, #e9345f, #8a2be2); box-shadow: 0 10px 30px rgba(233,52,95,.45); animation: tfSlide 2.3s cubic-bezier(.2,.9,.3,1) forwards; }
.tf-spark { position: absolute; left: var(--x); top: var(--y); font-style: normal; color: #fff6c2; font-size: 16px; animation: tfTwinkle 1s var(--d) ease-in-out 2; text-shadow: 0 0 8px #fff; opacity: 0; }
@keyframes tfSlide { 0% { transform: translateX(-120%) scale(.9); opacity: 0; } 14% { transform: translateX(6%) scale(1.04); opacity: 1; } 22%, 82% { transform: none; opacity: 1; } 100% { transform: translateX(120%); opacity: 0; } }
@keyframes tfTwinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1.3) rotate(90deg); } }
/* 50+: burst of red hearts */
.tf-burst { position: relative; display: grid; place-items: center; }
.tipfx.hearts .tf-card { background: rgba(20,0,6,.55); border: 2px solid var(--heart, #ff2338); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: tfPop 2.8s cubic-bezier(.2,1.3,.4,1) forwards; }
.tf-heart { position: absolute; left: 50%; top: 50%; margin: -14px 0 0 -10px; font-style: normal; font-size: 28px; color: var(--heart, #ff2338); text-shadow: 0 2px 6px rgba(0,0,0,.4); opacity: 0; animation: tfHeart 1.6s var(--d) cubic-bezier(.15,.8,.3,1) forwards; }
@keyframes tfPop { 0% { transform: scale(.2); opacity: 0; } 12% { transform: scale(1.12); opacity: 1; } 20%, 85% { transform: scale(1); opacity: 1; } 100% { transform: scale(.9); opacity: 0; } }
@keyframes tfHeart { 0% { transform: translate(0,0) scale(.2); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--tx), var(--ty)) scale(var(--s)); opacity: 0; } }
/* 100+: gold coin shower with a crown */
.tf-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(246,189,65,.55), rgba(246,189,65,.12) 45%, transparent 70%); animation: tfGlow 3.6s ease-out forwards; }
@keyframes tfGlow { 0% { opacity: 0; } 12%, 75% { opacity: 1; } 100% { opacity: 0; } }
.tf-coin { position: absolute; top: -40px; left: var(--x); width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c4 0 18%, var(--coin) 40%, var(--coin-deep) 100%); box-shadow: inset 0 0 0 2px var(--coin-deep); animation: tfFall var(--t) var(--d) cubic-bezier(.4,.1,.7,1) forwards; }
@keyframes tfFall { to { transform: translateY(calc(100vh + 80px)) rotate(var(--r)); } }
.tipfx.gold .tf-card { background: linear-gradient(160deg, #3a2a00ee, #1c1400ee); border: 2px solid var(--coin); box-shadow: 0 0 40px rgba(246,189,65,.6); padding: 18px 30px 16px; animation: tfPop 3.6s cubic-bezier(.2,1.3,.4,1) forwards; }
.tf-crown { width: 44px; height: 44px; fill: var(--coin); margin-top: -40px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); animation: tfCrown 1.2s ease-in-out infinite alternate; }
@keyframes tfCrown { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-4px) rotate(6deg); } }
.tf-big { display: inline-flex; align-items: center; gap: 8px; font: 800 44px/1 var(--display); color: var(--coin); text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.tf-sub { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #ffe9a8; }
@media (prefers-reduced-motion: reduce) { .tf-coin, .tf-heart, .tf-spark { display: none; } }
@media (prefers-reduced-motion: reduce) { .tipfx .tf-card, .tf-glow { animation: none !important; } }
/* front / back camera switch on the go-live and live screens */
.camflip { position: absolute; right: 12px; top: 38%; z-index: 5; width: 46px; height: 46px; color: var(--ov); background: var(--ov-glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.camflip svg { width: 26px; height: 26px; transition: transform .4s; }
.camflip.turning svg { transform: rotateY(180deg); }
.camflip:disabled { opacity: .7; }

/* replay controls toggle: a small button; the controls stay hidden until it is tapped */
.rp-toggle { position: absolute; right: 12px; bottom: calc(140px + env(safe-area-inset-bottom, 0px)); z-index: 5; width: 40px; height: 40px; color: var(--ov); background: var(--ov-glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.rp-toggle svg { width: 20px; height: 20px; }
.rp-toggle.on { background: #fff; color: #111; }
.stage:has(.replay:not([hidden])) .rp-toggle { bottom: calc(272px + env(safe-area-inset-bottom, 0px)); }
.demo-replays { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.demo-replays h2 { display: flex; align-items: center; gap: 10px; }
.demo-replays .demo-tag { display: inline-block; }
/* posts: double-tap to like, press and hold to enlarge */
.pmwrap { position: relative; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; cursor: zoom-in; }
.pmwrap img { -webkit-user-drag: none; }
.dbl-heart { position: absolute; left: 50%; top: 50%; width: min(26%, 110px); aspect-ratio: 1; z-index: 3; pointer-events: none; transform: translate(-50%, -50%); }
.dbl-heart svg { width: 100%; height: 100%; display: block; fill: var(--heart, #ff2338); filter: drop-shadow(0 6px 22px rgba(0,0,0,.45)); animation: dblHeart 1s cubic-bezier(.2,.9,.3,1.2) forwards; }
.dbl-heart i { position: absolute; left: 50%; top: 50%; width: 12%; aspect-ratio: 1; margin: -6% 0 0 -6%; border-radius: 50%; background: var(--heart, #ff2338); opacity: 0; animation: dblDot .7s ease-out .08s forwards; }
@keyframes dblHeart { 0% { transform: scale(0); opacity: 0; } 15% { transform: scale(1.2); opacity: 1; } 28% { transform: scale(.92); } 40% { transform: scale(1.04); } 50% { transform: scale(1); } 78% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.25) translateY(-8%); opacity: 0; } }
@keyframes dblDot { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-260%) scale(.4); } }
@media (prefers-reduced-motion: reduce) { .dbl-heart svg { animation-duration: .8s; animation-timing-function: linear; } .dbl-heart i { display: none; } }
.post.leaving { overflow: hidden; opacity: 0; height: 0 !important; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; border-width: 0; transition: opacity .2s, height .3s ease, margin .3s, padding .3s; }
.toast.has-act { display: flex; align-items: center; gap: 14px; text-align: left; }
.toast-act { pointer-events: auto; background: none; border: 0; color: inherit; font: inherit; font-weight: 800; text-decoration: underline; padding: 4px 2px; cursor: pointer; flex: none; }
.lightbox video { max-width: 100%; max-height: calc(100% - 64px); border-radius: 8px; background: #000; }
.lb-ph { width: min(92vw, 520px); aspect-ratio: 4 / 3; border-radius: 8px; background-size: cover; }
.lb-cap { max-width: 70vw; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post footer { align-items: center; }
.post footer .sp { flex: 1; }
.act.icon { width: 38px; padding: 0; justify-content: center; }
/* For you / Latest and recommendation reasons */
.postsort { flex-wrap: nowrap; gap: 10px; }
.postsort .seg { flex: 1; border-bottom: 0; }
.postsort .btn svg { width: 16px; height: 16px; }
.post .why { align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.post .why::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.reco-hint { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 16px; border-radius: var(--r); border: 1px dashed var(--accent); background: var(--surface); }
.reco-hint span { color: var(--muted); font-size: 14px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.link.small.center { background: none; border: 0; cursor: pointer; }

/* Pull to refresh */
.ptr { position: absolute; top: 8px; left: 50%; z-index: 5; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--raised); color: var(--muted); box-shadow: 0 4px 14px rgba(0,0,0,.35); opacity: 0; transform: translate(-50%, -44px); pointer-events: none; }
.ptr span { display: grid; place-items: center; }
.ptr svg { width: 20px; height: 20px; }
.ptr.ready, .ptr.spin { color: var(--accent); }
.ptr.spin span { animation: ptrSpin .8s linear infinite; }
@keyframes ptrSpin { to { transform: rotate(360deg); } }

/* ---------- Fit the phone screen (installed app) ----------
   The app is pinned to the whole screen, so the menu bar sits on the bottom edge (no black strip under it on
   iPhone, where height:100% stops short of the screen in an installed app). The top bar starts below the
   status bar / notch / Dynamic Island, and the menu bar keeps clear of the home indicator. */
html { height: 100%; height: -webkit-fill-available; background: var(--surface); }
body { min-height: 100%; min-height: -webkit-fill-available; }
#app { position: fixed; inset: 0; height: auto; }
.top { padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.tabs { padding-bottom: max(6px, env(safe-area-inset-bottom, 0px)); padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); }
#view { background: var(--bg); }
.lightbox { padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.sheet { max-height: min(88%, calc(100% - 12px - env(safe-area-inset-top, 0px))); }
@media (min-width: 900px) { .tabs { padding-top: calc(64px + env(safe-area-inset-top, 0px)); } }
/* Stream likes floating up the right side */
.lheart { position: absolute; right: 34px; bottom: 120px; z-index: 4; width: 30px; height: 30px; pointer-events: none; animation: lheart 2.8s ease-out forwards; }
.lheart svg { width: 100%; height: 100%; display: block; fill: currentColor; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
@keyframes lheart {
  0% { transform: translate(0, 0) scale(0); opacity: 0; }
  10% { transform: translate(0, -10px) scale(var(--s)); opacity: 1; }
  35% { transform: translate(calc(var(--x) * -1), -110px) scale(var(--s)); }
  65% { transform: translate(var(--x), -220px) scale(var(--s)); opacity: .9; }
  100% { transform: translate(calc(var(--x) * -.5), -330px) scale(calc(var(--s) * .8)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .lheart { animation-duration: 1.4s !important; } }
.badge.priv.sub { background: var(--coin-deep, #7a5a00); color: #fff; }
.paywall .avatar.lg { margin: 0 auto 4px; }

/* Customer service assistant */
.cs { display: flex; flex-direction: column; min-height: 100%; padding-bottom: 0; }
.cs-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cs-head h1 { margin: 0; }
.cs-head .sub { margin: 2px 0 0; }
.cs-av { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.cs-av svg { width: 24px; height: 24px; }
.cs-log { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 8px 0 12px; }
.cs-msg { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: 88%; }
.cs-msg.me { align-self: flex-end; align-items: flex-end; }
.cs-b { background: var(--raised); color: var(--fg); padding: 10px 14px; border-radius: 18px 18px 18px 6px; line-height: 1.45; overflow-wrap: anywhere; }
.cs-msg.me .cs-b { background: var(--accent); color: var(--accent-ink); border-radius: 18px 18px 6px 18px; }
.cs-b p { margin: 0 0 6px; } .cs-b p:last-child { margin-bottom: 0; }
.cs-b ul { margin: 4px 0 6px; padding-left: 18px; } .cs-b li { margin: 2px 0; }
.cs-b a { color: inherit; text-decoration: underline; font-weight: 600; }
.cs-src { font-size: 13px; color: var(--muted); margin-top: 8px !important; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-chips .chip { white-space: normal; text-align: left; font-size: 13px; padding: 7px 12px; height: auto; }
.cs-compose { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; padding: 10px 0; background: var(--bg); }
.cs-compose input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line); background: var(--raised); color: var(--fg); font: inherit; }
.cs-compose .send { background: var(--accent); color: var(--accent-ink); flex: none; }
.cs-foot { text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.cs-foot a { color: var(--fg); font-weight: 700; }
.cs-typing { display: flex; gap: 4px; padding: 14px 16px; }
.cs-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: csDot 1s infinite ease-in-out; }
.cs-typing i:nth-child(2) { animation-delay: .15s; } .cs-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes csDot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* Multi-photo posts: swipe sideways */
.pcar { position: relative; border-radius: 10px; overflow: hidden; background: #000; }
.pc-track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
.pc-track::-webkit-scrollbar { display: none; }
.pc-slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; aspect-ratio: 4 / 5; max-height: 560px; display: flex; align-items: center; justify-content: center; }
.pc-slide .pm { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; object-fit: contain; background-color: #000; }
.pc-slide .pm.ph { aspect-ratio: auto; background-size: cover; }
.pc-count { position: absolute; top: 10px; right: 10px; padding: 3px 9px; border-radius: 99px; background: #000a; color: #fff; font: 700 12px var(--display); pointer-events: none; }
.pc-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.pc-dots i { width: 6px; height: 6px; border-radius: 50%; background: #fff8; box-shadow: 0 0 3px #0008; transition: transform .2s, background .2s; }
.pc-dots i.on { background: #fff; transform: scale(1.25); }
.pc-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 0; display: none; place-items: center; background: #fffe; color: #111; box-shadow: 0 2px 8px #0006; cursor: pointer; }
.pc-nav svg { width: 18px; height: 18px; }
.pc-nav.prev { left: 10px; } .pc-nav.next { right: 10px; }
@media (hover: hover) and (pointer: fine) { .pc-nav:not([hidden]) { display: grid; } }
.lockdots { display: flex; gap: 4px; }
.lockdots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
/* Full-screen gallery */
.lb-gal { padding-left: 0; padding-right: 0; }
.lb-track { display: flex; width: 100%; flex: 1; min-height: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lb-track::-webkit-scrollbar { display: none; }
.lb-slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; padding: 0 16px; }
.lb-slide img, .lb-slide video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lb-slide .lb-ph { width: 100%; aspect-ratio: 4 / 5; max-height: 100%; border-radius: 8px; background-size: cover; }
.lb-gal .lb-bar { padding: 0 16px; }
/* Loading more posts at the bottom of the feed */
.feed-more { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 8px 0 24px; color: var(--muted); font-size: 14px; }
.feed-more .spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: ptrSpin .8s linear infinite; }
.pick-more { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 14px; margin: 0; font-size: 13px; }
.pick-more .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: ptrSpin .8s linear infinite; }
/* Go live: thumbnail */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.thumbpick { display: flex; gap: 12px; align-items: flex-start; }
.tp-prev { flex: none; width: 72px; aspect-ratio: 3 / 4; border-radius: 10px; border: 1.5px dashed var(--line); display: grid; place-items: center; color: var(--muted); overflow: hidden; background: var(--raised); }
.tp-prev.has { border-style: solid; }
.tp-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tp-prev svg { width: 24px; height: 24px; }
.tp-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tp-side small { color: var(--muted); line-height: 1.35; }
.tp-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-btns .btn { gap: 6px; }
.tp-btns .btn svg { width: 16px; height: 16px; }
.thumbpick input[type=file]:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.field .tp-btns label.btn { font-size: 13.5px; letter-spacing: 0; text-transform: none; color: var(--fg); cursor: pointer; }
/* Live alerts bell beside Follow */
.btn.icon { width: 38px; padding: 0; justify-content: center; }
.btn.icon svg.ic { width: 20px; height: 20px; }
/* First-open notifications card */
.notifcard { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 8px 4px 4px; }
.notifcard h2 { margin: 0; font-size: 20px; line-height: 1.3; max-width: 300px; }
.notifcard .nc-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.notifcard .nc-ic svg { width: 28px; height: 28px; }
.notifcard .err:empty { display: none; }
/* Stream cards: viewers and likes */
.badge.eye { gap: 8px; }
.badge.eye .st-v, .badge.eye .st-l { display: inline-flex; align-items: center; gap: 4px; }
.badge.eye .st-l svg { color: var(--heart); fill: var(--heart); stroke: var(--heart); }
/* The audience label sits above the viewers/likes counts, so they never overlap. */
.thumb .badge.priv { bottom: 40px; left: 8px; right: auto; }
.thumb:not(.has-stats) .badge.priv { bottom: 8px; }
/* Like count on the stream screen */
.stat.likes svg { color: var(--heart); fill: var(--heart); stroke: var(--heart); }
.stat.likes.bump { animation: likeBump .35s ease-out; }
@keyframes likeBump { 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .stat.likes.bump { animation: none; } }
/* Stream chat messages (tips included) fade out after 10 seconds */
.chat p { transition: opacity .5s ease, transform .5s ease; }
.chat p.gone { opacity: 0; transform: translateX(-12px); }
@media (prefers-reduced-motion: reduce) { .chat p { transition: opacity .5s ease; } .chat p.gone { transform: none; } }

/* ---------- add to home screen guide ---------- */
/* Above sheets (.veil 50), below #toasts (60) so "Link copied" shows over it. */
.a2hs { position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)); animation: fade .2s; }
.a2hs.out { opacity: 0; transition: opacity .2s; }
/* Keep the card away from the arrow. */
.a2hs.to-bottom, .a2hs.to-bottom-right { align-items: flex-start; padding-top: calc(48px + env(safe-area-inset-top, 0px)); }
.a2hs.to-top-right { align-items: flex-end; padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
.a2-card { position: relative; width: 100%; max-width: 380px; background: var(--surface); color: var(--fg); border-radius: 22px; padding: 22px 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; box-shadow: 0 18px 50px rgba(0,0,0,.5); animation: pop .3s cubic-bezier(.2,.9,.25,1); }
.a2-x { position: absolute; top: 8px; right: 8px; }
.a2-icon { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.a2-card h2 { margin: 2px 0 0; font-size: 20px; line-height: 1.25; }
.a2-lead { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.a2-steps { list-style: none; margin: 6px 0 4px; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.a2-steps li { display: flex; align-items: center; gap: 12px; background: var(--raised); border-radius: 14px; padding: 10px 12px; font-size: 15px; line-height: 1.35; }
.a2-steps .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink, #fff); font-size: 13px; }
.a2-steps .ii { width: 22px; height: 22px; vertical-align: -5px; margin: 0 2px; fill: none; stroke: #4aa3ff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.a2-card .btn.block { width: 100%; margin-top: 4px; }
.a2-arrow { position: fixed; z-index: 56; width: 40px; height: 56px; color: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); pointer-events: none; }
.a2-arrow svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.to-bottom .a2-arrow { left: calc(50% - 20px); bottom: calc(6px + env(safe-area-inset-bottom, 0px)); animation: a2-down 1.1s ease-in-out infinite; }
.to-bottom-right .a2-arrow { right: 14px; bottom: calc(6px + env(safe-area-inset-bottom, 0px)); animation: a2-down 1.1s ease-in-out infinite; }
.to-top-right .a2-arrow { right: 16px; top: calc(4px + env(safe-area-inset-top, 0px)); transform: rotate(180deg); animation: a2-up 1.1s ease-in-out infinite; }
@keyframes a2-down { 50% { transform: translateY(10px); } }
@keyframes a2-up { 0%, 100% { transform: rotate(180deg); } 50% { transform: rotate(180deg) translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .a2-arrow { animation: none !important; } }

.badge.priv.inv { background: var(--accent); color: #fff; }   /* a private stream you were invited to */

/* ---------- settings ---------- */
.settings h2 { margin: 22px 0 8px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.settings .menu-item { height: auto; min-height: 56px; padding: 10px 16px; width: 100%; }
.settings .menu-item svg { flex: none; width: 20px; height: 20px; }
.settings .menu-item .mi-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.settings .menu-item .mi-t small { font-weight: 400; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.settings .menu-item.static { cursor: default; }
.settings .menu-item.static:hover { background: none; }
.settings .menu-item.switchrow { justify-content: space-between; }
.settings .st-end { margin-top: 24px; }
.settings .pad { padding: 14px 16px; margin: 0; }
.vbadge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; margin-left: 4px; }
.vbadge.ok { background: rgba(46, 204, 113, .18); color: #2ecc71; }
.vbadge.warn { background: rgba(246, 189, 65, .18); color: var(--coin, #f6bd41); }
.choices { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.choice input { margin-top: 4px; }
.choice span { display: flex; flex-direction: column; gap: 2px; }
.choice small { color: var(--muted); }
.choice:has(input:checked) { border-color: var(--accent); }
.fhint { color: var(--muted); font-size: 12.5px; }
.blrow { gap: 12px; }
.blrow .avatar { flex: none; }
.blockednote { margin-top: 16px; }

/* Messages payment request (viewChatPass) */
.chatpass { text-align: left; }
.chatpass .cp-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--accent); margin: 8px 0 4px; }
.chatpass .cp-icon svg { width: 28px; height: 28px; }
.chatpass .cp-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chatpass .cp-card h2 { margin: 0; font-size: 1rem; }
.cp-meter { display: flex; flex-direction: column; gap: 6px; }
.cp-meter small { color: var(--muted); }
.cp-bar { height: 8px; border-radius: 4px; background: var(--raised); overflow: hidden; }
.cp-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.balance.earn .w-hold { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.4; max-width: 26ch; }

/* Saved streams on your profile: a card with a remove button on its corner */
.savedcard { position: relative; }
.savedcard .unsave { position: absolute; bottom: 4px; right: 0; z-index: 2; color: var(--accent); width: 40px; height: 40px; }
.savedcard .card .meta { padding-right: 40px; }
.savedcard .unsave svg { width: 18px; height: 18px; }
.empty svg { width: 16px; height: 16px; vertical-align: -3px; }

/* Narrow phones: keep the stream's close button on screen */
@media (max-width: 400px) { .st-top { gap: 4px; padding-left: 8px; padding-right: 8px; } .st-top #fol { padding-left: 10px; padding-right: 10px; } }

/* Sign-up agreements and the reCAPTCHA notice (Google allows hiding its badge when this text is shown) */
.agree { gap: 10px; }
.captcha-note { margin-top: 12px; color: var(--muted); }
.captcha-note a { color: inherit; text-decoration: underline; }
.grecaptcha-badge { visibility: hidden; }
.agree .check a { color: var(--text, inherit); text-decoration: underline; font-weight: 600; }

/* Password tools: show/hide, strength meter, Suggest a strong password */
.pwrow .pw-eye { flex: none; align-self: stretch; height: auto; aspect-ratio: 1; }
.pwtools { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.pwtools .row { gap: 8px; flex-wrap: wrap; }
.pwmeter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pwmeter i { height: 4px; border-radius: 2px; background: var(--raised); }
.pwtools[data-level="0"] .pwmeter i:nth-child(-n+1), .pwtools[data-level="1"] .pwmeter i:nth-child(-n+1) { background: #e5484d; }
.pwtools[data-level="2"] .pwmeter i:nth-child(-n+2) { background: #f5a524; }
.pwtools[data-level="3"] .pwmeter i:nth-child(-n+3) { background: #30a46c; }
.pwtools[data-level="4"] .pwmeter i { background: #30a46c; }
.pwtools[data-level=""] .pwmeter { visibility: hidden; }
.pwlabel { color: var(--muted); min-height: 1em; }

/* Stream chat for members without a coin package: the box opens the tip prompt */
.say.locked input { cursor: pointer; }
.say.locked button[type="submit"] { opacity: .55; }
.tipchat { flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.tipchat .chip { min-width: 72px; justify-content: center; }

/* Viewers: the eye is a button; the sheet lists everyone who watched, watching now in green */
.st-top .vbtn { border: 0; color: inherit; font-family: inherit; font-size: inherit; font-weight: 700; cursor: pointer; }
.st-top .vbtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vsum .vlive, .vrow.live .vname, .vrow.live .vstate { color: #3ddc84; }
.vlegend { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: -4px 0 4px; }
.vdot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; display: inline-block; flex: none; }
.vlist { list-style: none; margin: 0; padding: 0; max-height: 55vh; overflow-y: auto; }
.vrow a { display: flex; align-items: center; gap: 10px; padding: 8px 2px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.vrow .vname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.vrow.live .vname { font-weight: 700; }
.vrow .vstate { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex: none; }

/* Go live: Camera or OBS (computer) */
.srcsw { display: grid; grid-template-columns: 1fr 1fr; }
.srcsw button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.srcsw svg { width: 16px; height: 16px; }
.obs-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.obs-steps li { line-height: 1.45; }
.obs-steps a { color: inherit; text-decoration: underline; }
.obs-steps .field { margin-top: 8px; }
.obs-steps input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; min-width: 0; }

/* Comments: threads with one level of replies, a ⋯ menu per comment, emojis */
#cm-list > .cmthread { display: block; padding: 0; }
.cmthread .cm { display: flex; align-items: flex-start; gap: 6px; padding: 10px 0; }
.cmthread .cm > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cmthread .cm small { display: block; margin-top: 2px; }
.cmthread .cm.reply { margin-left: 28px; padding-left: 10px; border-left: 2px solid var(--line); }
.cmthread .cm-rep { font-size: inherit; color: var(--muted); font-weight: 700; padding: 0; }
.cmthread .cm-more { flex: none; color: var(--muted); }
.cm-replying { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); padding: 6px 10px; border-radius: 10px; background: var(--raised); margin-bottom: 6px; }
.emobtn { flex: none; color: var(--muted); }
.emobtn svg { width: 22px; height: 22px; }
.emojis { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 6px; margin-bottom: 6px; border-radius: 12px; background: var(--raised); max-height: 170px; overflow-y: auto; }
.emojis button { font-size: 22px; line-height: 1; height: 40px; border-radius: 8px; }
.emojis button:hover, .emojis button:focus-visible { background: var(--surface); }

/* Post audience label (Followers / Subscribers / Private) and the share list */
.post header small .aud svg { width: 12px; height: 12px; vertical-align: -1px; margin-right: 2px; }
.post header [data-paud] svg { width: 16px; height: 16px; }
.sp-list { max-height: 45vh; overflow-y: auto; }
.sp-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 2px; text-align: left; color: inherit; border-bottom: 1px solid var(--line); }
.sp-row > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp-row[disabled] .btn { opacity: .6; }
.say .emobtn, .say.light .emobtn { background: none; color: var(--muted); box-shadow: none; }

/* push up at the end of a feed to load 10 more */
.feedmore, .feed-more { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 18px 12px 28px; color: var(--muted); font-size: 14px; transition: transform .2s ease; }
.feedmore:empty { padding: 0; }
.feedmore .pu-arrow, .feed-more .pu-arrow { display: inline-flex; transition: transform .2s ease; }
.feedmore .pu-arrow svg, .feed-more .pu-arrow svg { width: 18px; height: 18px; }
.feedmore.ready, .feed-more.ready { color: var(--fg); }
.feedmore.ready .pu-arrow, .feed-more.ready .pu-arrow { transform: translateY(-4px) scale(1.15); }
.feedmore .spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: ptrSpin .8s linear infinite; }
/* DM: reply with an emoji from the press-and-hold menu */
.emo-quick { display: flex; justify-content: space-between; gap: 4px; padding: 6px 4px 10px; }
.emo-quick button { flex: 1; max-width: 52px; aspect-ratio: 1; border-radius: 50%; border: 0; background: var(--raised); font-size: 26px; line-height: 1; display: grid; place-items: center; cursor: pointer; transition: transform .12s ease; }
.emo-quick button:active { transform: scale(1.2); }
.emo-quick .more svg { width: 20px; height: 20px; color: var(--muted); }
.er-emo { border-top: 0; padding: 0; background: none; }
/* home tabs: scroll sideways if they don't fit on a narrow phone */
.page > .seg[role="tablist"] { gap: 18px; overflow-x: auto; scrollbar-width: none; }
.page > .seg[role="tablist"]::-webkit-scrollbar { display: none; }
.page > .seg[role="tablist"] button { flex: none; white-space: nowrap; }
/* Share to Peeks (from another app's share sheet) */
.share-in .si-media { display: grid; gap: 6px; grid-template-columns: 1fr; border-radius: 14px; overflow: hidden; }
.share-in .si-media.n2, .share-in .si-media.n3, .share-in .si-media.n4 { grid-template-columns: 1fr 1fr; }
.share-in .si-media img, .share-in .si-media video { width: 100%; max-height: 360px; aspect-ratio: 1; object-fit: cover; display: block; background: var(--raised); }
.share-in .si-media.n1 img, .share-in .si-media.n1 video { aspect-ratio: auto; object-fit: contain; }
.share-in .si-text { margin: 0; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--raised); border-radius: 0 10px 10px 0; white-space: pre-wrap; word-break: break-word; }
.pick-all { display: flex; justify-content: flex-end; }
/* Messages: select several conversations or messages to delete */
.selbar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); z-index: 3; }
.selbar > span { flex: 1; text-align: center; font-weight: 600; font-size: 14px; }
.page .selbar { margin: 12px -16px 0; }
.dmlist.selecting .dmrow { position: relative; padding-left: 46px; }
.dmlist.selecting .dmrow::before, .dm-body.selecting .msg::before { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); box-sizing: border-box; }
.dmlist.selecting .dmrow::before { left: 12px; top: 50%; transform: translateY(-50%); }
.dmlist.selecting .dmrow.picked::before, .dm-body.selecting .msg.picked::before { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat; border-color: var(--accent); }
.dmlist.selecting .dmrow.picked { background: var(--raised); }
.dm-body.selecting .msg { position: relative; cursor: pointer; user-select: none; }
.dm-body.selecting .msg:not(.me) { margin-left: 34px; }
.dm-body.selecting .msg:not(.me)::before { left: -32px; top: 50%; transform: translateY(-50%); }
.dm-body.selecting .msg.me::before { left: -32px; top: 50%; transform: translateY(-50%); }
.dm-body.selecting .msg.picked { outline: 2px solid var(--accent); outline-offset: 2px; }
.sp-pick .picklist { max-height: min(46vh, 340px); }

/* Bank logos on the Zelle/Interac sheet (Mark's build 30): the bank's icon, or its initials on a colour while it loads
   or when there's none. The bank list is a scrolling list instead of a drop-down. */
.blogo i { font-style: normal; }
.blogo { position: relative; flex: none; width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; overflow: hidden;
  background: hsl(var(--h, 210) 45% 32%); color: #fff; font: 700 12px/1 var(--display, inherit); letter-spacing: .02em; }
.blogo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 3px; opacity: 0; transition: opacity .2s; }
.blogo.has img { opacity: 1; }
.blogo.none { background: var(--raised); color: var(--fg); }
.blogo.none .ic { width: 16px; height: 16px; }
.zb-pick { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 4px; margin: 8px 0; }
.zb-pick button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 7px 10px; border: 0; border-radius: 9px; background: none; color: var(--fg); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.zb-pick button:hover, .zb-pick button.on { background: var(--raised); }
.zb-pick button.on { box-shadow: inset 0 0 0 2px var(--accent); }

/* Right-to-left languages (Arabic, Mark's build 29 / js/i18n.js): arrows point the other way; members' own words keep
   their own direction. */
html[dir="rtl"] .ic-back, html[dir="rtl"] .ic-chev, html[dir="rtl"] .ic-send, html[dir="rtl"] .ic-reply, html[dir="rtl"] .ic-fwd, html[dir="rtl"] .ic-leave { transform: scaleX(-1); }
[translate="no"], .msg p, .quote span, .cap, .cm span, small, .dmrow b { unicode-bidi: plaintext; }
html[dir="rtl"] .zb-pick button { text-align: right; }

/* Messages on the new chat service (js/chat2.js): receipts (Sent / D / R), groups, forwarded, edited, voice notes */
.rcpt { display: inline-grid; place-items: center; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 4px; font: 700 10px/1 var(--display, inherit); letter-spacing: .02em; }
.rcpt .ic { width: 11px; height: 11px; }
.rcpt.s { opacity: .8; }
.rcpt.d { border: 1px solid currentColor; }
.rcpt.r { background: currentColor; }
.rcpt.r::before { content: 'R'; color: var(--accent); }
.msg:not(.me) .rcpt.r::before, .dmrow .rcpt.r::before { color: var(--surface); }
.rcpt.r { font-size: 0; }
.rcpt.r::before { font-size: 10px; }
.dmrow-last .rcpt { margin-right: 5px; vertical-align: 1px; color: var(--muted); }
.gav { display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--raised)); color: var(--accent-ink); }
.gav .ic { width: 55%; height: 55%; }
.dm-sys { align-self: center; text-align: center; max-width: 86%; margin: 4px 0; }
.dm-sys span { font-size: 12px; color: var(--muted); background: var(--raised); padding: 4px 12px; border-radius: 99px; display: inline-block; }
.dm-from { display: block; font-size: 12px; color: var(--accent); margin-bottom: 2px; }
.msg.me .dm-from { color: inherit; }
.dm-fwd { display: flex; align-items: center; gap: 4px; font-size: 12px; font-style: italic; opacity: .8; }
.dm-fwd .ic { width: 13px; height: 13px; }
.dm-edited { font-style: italic; }
.msg.editing { outline: 2px dashed var(--fg); outline-offset: 2px; }
.dm-voice { display: flex; align-items: center; gap: 8px; min-width: 200px; padding: 2px 0; }
.dm-voice .vplay { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; background: #00000026; color: inherit; cursor: pointer; }
.dm-voice .vplay .ic { width: 18px; height: 18px; }
.dm-voice .vbar { flex: 1; height: 6px; border-radius: 6px; background: #ffffff40; overflow: hidden; cursor: pointer; position: relative; }
.msg:not(.me) .dm-voice .vbar { background: var(--line); }
.dm-voice .vbar i { display: block; height: 100%; width: 0; background: currentColor; }
.dm-voice small { font-size: 12px; opacity: .85; min-width: 34px; text-align: right; }
.dm-voice audio { display: none; }
.dm-voice.gone { opacity: .7; }
.dm-compose .mic { color: var(--fg); }
.dm-rec { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface); border-top: 1px solid var(--line); }
.dm-rec .rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--live); animation: recpulse 1s ease-in-out infinite; }
.dm-rec .rec-hint { flex: 1; color: var(--muted); font-size: 13px; }
.dm-rec .send { background: var(--accent); color: var(--accent-ink); }
@keyframes recpulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .dm-rec .rec-dot { animation: none; } }
.gi-name { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.gi-name .row { gap: 8px; }
.gi-name input { flex: 1; min-width: 0; }
.gi-head { margin: 6px 0; }
.gi-head h3 { margin: 0; font-size: 15px; }
.gi-list .pick[disabled] { cursor: default; opacity: 1; }
#gi-leave { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
#fw-go { display: flex; align-items: center; justify-content: center; gap: 8px; }
.gi-list .pick { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.gi-list .pick:last-child { border-bottom: 0; }
.gi-list { max-height: min(40vh, 320px); }
