/* Velvet Circle — shared stylesheet. Mobile-first, tight and clean.
   Colors come from /theme.css variables; these :root values are only a
   fallback. Palette is a soft coffee brown — comfortable contrast, no
   harsh near-white on near-black. */
:root {
  --bg: #221913;
  --bg2: #2b2016;
  --card: #332820;
  --line: #4a3a2d;
  --text: #e2d4c0;
  --muted: #a89880;
  --accent: #c09a6b;
  --accent2: #d7a86e;
  --danger: #d2735a;
}
* { box-sizing: border-box; }
/* Mobile-first: base styles assume a ~360px phone viewport. */
html {
  overflow-x: hidden; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }
body {
  overflow-x: hidden;
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55; font-size: 16px; /* >=16px stops iOS auto-zoom on inputs */
  -webkit-tap-highlight-color: rgba(166, 123, 91, 0.25);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 960px; margin: 0 auto; padding: 1.2rem; }
.site-header { background: var(--bg2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.nav { max-width: 960px; margin: 0 auto; padding: 0.7rem 1.2rem; display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.nav a { padding: 0.6rem 0.5rem; } /* comfortable touch targets */
.brand { font-weight: 800; font-size: 1.25rem; color: var(--text); background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-img { height: 34px; width: auto; object-fit: cover; border-radius: 8px; display: block; }
.drawer-head .brand-img { height: 62px; width: auto; border-radius: 12px; }
.gate-logo { width: min(400px, 92%); height: auto; border-radius: 18px; margin-bottom: 0.75rem; }
.nav-right { margin-left: auto; display: flex; gap: 0.8rem; align-items: center; }
.nav-user { display: flex; gap: 0.4rem; align-items: center; }
.site-footer { text-align: center; color: var(--muted); padding: 2rem 1rem; font-size: 0.85rem; border-top: 1px solid var(--line); margin-top: 3rem; }

.hero { text-align: center; padding: 2.5rem 1rem; background: linear-gradient(135deg, #3e2c23, #241a14); border-radius: 12px; margin-bottom: 1.5rem; }
.hero h1 { margin: 0 0 0.5rem; font-size: 2rem; }
.stats { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1.2rem; text-align: center; flex: 1; min-width: 100px; }
.stats strong { display: block; font-size: 1.4rem; }
.stats span { color: var(--muted); font-size: 0.8rem; }

h1, h2, h3 { line-height: 1.25; }
.muted { color: var(--muted); font-size: 0.9em; }
.error { background: #3d1f16; border: 1px solid var(--danger); color: #ffd9c9; padding: 0.7rem; border-radius: 8px; }
.badge { background: var(--accent); color: #1a120e; font-size: 0.75rem; font-weight: 700; border-radius: 999px; padding: 0.1rem 0.6rem; margin-left: 0.5rem; }

.btn { display: inline-block; background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #1a120e; font-weight: 700; border: none; border-radius: 10px; padding: 0.8rem 1.3rem; cursor: pointer; min-height: 44px; font-size: 1rem; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.big { font-size: 1.1rem; padding: 0.8rem 1.6rem; }
.link-btn { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 1em; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.inline-form { display: inline; }

.form { display: flex; flex-direction: column; gap: 0.9rem; max-width: 560px; }
.form label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; }
.form input, .form textarea { background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 0.7rem; font-size: 1rem; min-height: 44px; }
.form input[type="file"] { padding: 0.9rem 0.7rem; } /* big tap target for camera/gallery picker */
.filter { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filter input { background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 0.7rem; min-height: 44px; font-size: 1rem; }

.cards { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; }
.thread-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.thread-list li { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 0.7rem 1rem; display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.member-list { list-style: none; padding: 0; display: flex; gap: 0.8rem; flex-wrap: wrap; }
.member-list li { display: flex; gap: 0.5rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.9rem 0.3rem 0.3rem; }
.member-card { display: flex; gap: 1rem; align-items: center; }

.post { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin-bottom: 1rem; }
.post header { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 0.6rem; flex-wrap: wrap; }
.post-body { white-space: pre-wrap; word-wrap: break-word; }

.profile-head { display: flex; gap: 1.2rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.avatar { border-radius: 50%; object-fit: cover; vertical-align: middle; }
.avatar-initial { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a120e; font-weight: 800; vertical-align: middle; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 1rem; }
.photo-card { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.photo-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.photo-card figcaption { padding: 0.5rem 0.8rem; font-size: 0.9em; }

.tag { display: inline-block; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.7rem; margin: 0.15rem; font-size: 0.85em; }

.gate { max-width: 480px; margin: 8vh auto; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 2.5rem 2rem; }
.gate h1 { font-size: 2.2rem; margin: 0; }
.tagline { color: var(--muted); }

/* ---- media save deterrence: right-click/long-press/drag-save ----
   (Deterrence only — see README "Media protection: what it does and doesn't do".) */
.media, .media img {
  -webkit-touch-callout: none; /* iOS: no long-press save menu */
  -webkit-user-select: none;
  user-select: none;
}
.media img { -webkit-user-drag: none; }
@media (max-width: 640px) {
  .nav { gap: 0.2rem; padding: 0.6rem 0.8rem; }
  .hero { padding: 1.8rem 1rem; }
  .hero h1 { font-size: 1.5rem; }
  .photo-card img { height: 160px; }
  .stats div { min-width: 70px; padding: 0.6rem; }
}
/* Larger screens: enhance the single-column mobile base into grids. */
@media (min-width: 900px) {
  .hero h1 { font-size: 2.4rem; }
}

/* ---- live video ---- */
.live-badge { background: #dc2626; color: #fff; }
.live-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .live-grid { grid-template-columns: 2fr 1fr; } }
.live-video { width: 100%; max-height: 60vh; background: #000; border-radius: 12px; border: 1px solid var(--line); }
.live-video-wrap.ended { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 3rem 1rem; text-align: center; color: var(--muted); }
.live-chat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; min-height: 300px; }
.live-chat h2 { margin-top: 0; font-size: 1.05rem; }
.chat-list { list-style: none; margin: 0 0 0.8rem; padding: 0; overflow-y: auto; max-height: 46vh; min-height: 180px; flex: 1; }
.chat-list li { padding: 0.3rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.chat-list strong { color: var(--accent); }
.chat-form { display: flex; gap: 0.5rem; }
.chat-form input { flex: 1; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 0.7rem; font-size: 1rem; min-height: 44px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--line); }

/* ---- videos ---- */
.video-card { padding: 0; overflow: hidden; }
.video-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16/9; background: #1a120e; color: #fff; font-size: 2.2rem; text-decoration: none; }
.video-thumb:hover { background: #241a14; }
.video-card .video-meta { padding: 0.8rem 1rem; }
.video-player { width: 100%; max-height: 70vh; background: #000; border-radius: 12px; border: 1px solid var(--line); }

/* ---- group section navigation ---- */
.tabs { display: flex; gap: 0.25rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 1rem 0 1.25rem; }
.tabs a { padding: 0.6rem 1rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.stat-list { list-style: none; padding: 0; display: grid; gap: 0.4rem; }

/* ================= FetLife-style mobile chrome =================
   Tight, clean, easy on the eyes: compact spacing, soft contrast,
   antialiased type, no harsh pure-black/white anywhere. */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-bottom: 64px; /* room for the fixed tab bar */
}
body.noscroll { overflow: hidden; }
.container { max-width: 640px; padding: 0.75rem 0.75rem 1.5rem; }
.page-title { font-size: 1.25rem; margin: 0.25rem 0 0.75rem; font-weight: 700; letter-spacing: 0.01em; }
.sec-title { font-size: 1rem; margin: 1.1rem 0 0.5rem; font-weight: 700; color: var(--text); }
.empty { padding: 1.5rem 0; text-align: center; }

/* Slim top bar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 0.35rem;
  height: 52px; padding: 0 0.5rem;
  background: var(--bg2); border-bottom: 1px solid var(--line);
}
.topbar .brand { font-size: 1.05rem; margin-right: auto; }
.topbar-actions { display: flex; align-items: center; gap: 0.15rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: none; background: none;
  color: var(--text); font-size: 1.25rem; cursor: pointer; border-radius: 50%;
  text-decoration: none;
}
.icon-btn:hover { background: var(--card); text-decoration: none; }
.top-avatar img, .top-avatar .avatar-initial { width: 30px !important; height: 30px !important; }
.top-login { font-size: 0.9rem; font-weight: 600; padding: 0.4rem 0.6rem; }

/* Slide-in drawer */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 48; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
  width: 272px; max-width: 82vw; overflow-y: auto;
  background: var(--bg2); border-right: 1px solid var(--line);
  transform: translateX(-102%); transition: transform 0.22s ease;
  padding: 0 0 2rem;
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); }
.drawer a, .drawer-link {
  display: block; padding: 0.6rem 1rem; color: var(--text);
  font-size: 0.95rem; text-decoration: none; background: none; border: none;
  width: 100%; text-align: left; cursor: pointer; font-weight: 500;
}
.drawer a:hover, .drawer-link:hover { background: var(--card); }
.drawer-sec {
  padding: 0.9rem 1rem 0.25rem; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; color: var(--muted);
}

/* Fixed bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; background: var(--bg2); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 0.45rem 0 0.35rem; color: var(--muted); text-decoration: none;
  min-height: 56px; justify-content: center;
}
.tab:hover { text-decoration: none; color: var(--text); }
.tab-ico { font-size: 1.3rem; line-height: 1; }
.tab-label { font-size: 0.68rem; margin-top: 0.15rem; font-weight: 600; letter-spacing: 0.02em; }
.tab.active { color: var(--accent2); }

/* Post composer */
.composer { padding: 0.7rem 0.75rem; margin-bottom: 0.75rem; }
.composer-row { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 0.55rem; }
.composer-row input {
  flex: 1; background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 0.55rem 1rem; font-size: 0.95rem; min-height: 40px;
}
.composer-row input::placeholder { color: var(--muted); }
.composer-actions { display: flex; gap: 1rem; align-items: center; padding-left: 3rem; }
.composer-actions a { color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.composer-actions a:hover { color: var(--text); text-decoration: none; }
.composer-actions .btn { margin-left: auto; }
.composer-login p { margin: 0.25rem 0; display: flex; gap: 0.6rem; align-items: center; }

/* Feed cards — compact */
.feed { display: flex; flex-direction: column; gap: 0.6rem; }
.feed-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.7rem 0.75rem; }
.feed-head { display: flex; gap: 0.55rem; align-items: center; margin-bottom: 0.45rem; }
.feed-who { line-height: 1.3; }
.feed-who .muted { font-size: 0.78rem; }
.feed-body { font-size: 0.95rem; line-height: 1.5; margin: 0 0 0.5rem; overflow-wrap: anywhere; }
.feed-media { margin: 0 -0.75rem 0.5rem; }
.feed-media img { width: 100%; display: block; max-height: 420px; object-fit: cover; }
.feed-media .video-player { border: none; border-radius: 0; max-height: 420px; }
.feed-actions { display: flex; align-items: center; gap: 0.9rem; padding-top: 0.35rem; border-top: 1px solid var(--line); }
.feed-act {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 0.9rem; font-weight: 600; padding: 0.35rem 0; display: inline-flex; gap: 0.3rem; align-items: center;
}
button.feed-act:hover { color: var(--text); }
.feed-act.on { color: var(--accent2); }
.feed-spacer { flex: 1; }
.feed-comments { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.45rem; }
.feed-comment { display: flex; gap: 0.5rem; font-size: 0.88rem; line-height: 1.4; }
.feed-comment .muted { font-size: 0.75rem; }
.feed-comment-form { display: flex; gap: 0.5rem; margin-top: 0.55rem; align-items: center; }
.feed-comment-form input {
  flex: 1; min-width: 0; background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 0.45rem 0.9rem; font-size: 0.88rem; min-height: 38px;
}

/* Explore recommendations */
.rec-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.rec-card {
  display: flex; gap: 0.7rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.65rem 0.75rem;
}
.rec-info { flex: 1; min-width: 0; line-height: 1.35; }
.rec-info .muted { font-size: 0.8rem; }

/* Events */
.event-card { display: flex; flex-direction: column; gap: 0.3rem; }
.event-card .btn { align-self: flex-start; margin-top: 0.3rem; }

/* Groups — compact rows */
.group-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.group-row { display: flex; gap: 0.7rem; align-items: flex-start; justify-content: space-between; padding: 0.7rem 0.75rem; }
.group-desc { margin: 0.3rem 0 0; font-size: 0.88rem; color: var(--muted); line-height: 1.45; }

/* Profile */
.profile-head { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.25rem; }
.avatar-edit { display: flex; align-items: center; gap: 0.6rem; }
.avatar-badge-wrap { position: relative; width: 72px; height: 72px; flex: none; }
.avatar-cam-badge {
  position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #1a120e; border: 2px solid #0a0603; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.avatar-cam-badge:active { transform: scale(0.92); }
.avatar-top-form { display: flex; align-items: center; }
.profile-id h1 { font-size: 1.15rem; margin: 0 0 0.15rem; }
.profile-id .muted { font-size: 0.82rem; }
.profile-btns { display: flex; gap: 0.5rem; margin-top: 0.45rem; }

/* Notifications */
.notif-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.notif {
  display: flex; gap: 0.6rem; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.7rem;
  font-size: 0.9rem; line-height: 1.4;
}

/* Small buttons and ghost variant */
.btn-sm { padding: 0.45rem 0.9rem; min-height: 36px; font-size: 0.88rem; border-radius: 999px; }
.btn-ghost { background: none; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { filter: none; background: var(--bg2); }

/* Soften previously harsh elements */
.error { background: #3a231b; }
.live-badge { background: #b34434; }
.badge { font-size: 0.7rem; padding: 0.12rem 0.55rem; }

/* Desktop: keep the phone-like column, cap width */
@media (min-width: 700px) {
  .container { max-width: 600px; }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes pulseGlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

/* Page entrance: cards rise in with stagger */
.card, .post-card {
  animation: fadeSlideIn 0.35s ease-out both;
}
.card:nth-child(2), .post-card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3), .post-card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4), .post-card:nth-child(4) { animation-delay: 0.15s; }
.card:nth-child(5), .post-card:nth-child(5) { animation-delay: 0.2s; }
.card:nth-child(n+6), .post-card:nth-child(n+6) { animation-delay: 0.25s; }

/* Main content fades in */
.container { animation: fadeIn 0.25s ease-out; }

/* Buttons: press feedback */
.btn, .link-btn, .icon-btn, .tab {
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease;
}
.btn:active, .link-btn:active, .icon-btn:active { transform: scale(0.96); }
.tab:active { transform: scale(0.92); }

/* Tab bar icons: subtle bounce on active */
.tab.active .tab-ico { animation: popIn 0.25s ease-out; }

/* Live/podcast badge pulses */
.live-badge { animation: pulseGlow 1.6s ease-in-out infinite; }

/* Drawer slides smoothly */
.drawer { transition: transform 0.25s ease-out; }

/* Images fade in as they load */
img { animation: fadeIn 0.4s ease-out; }

/* Like button pop */
.like-btn.liked { animation: popIn 0.2s ease-out; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============ VOICE COMMENTS ============ */
.mic-btn {
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  width: 40px; height: 40px;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.mic-btn:active { transform: scale(0.92); }
.voice-rec {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  margin-top: 0.4rem;
  font-size: 0.9rem;
}
.voice-rec[hidden] { display: none; }
.rec-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #c0392b;
  animation: pulseGlow 1s ease-in-out infinite;
  flex-shrink: 0;
}
.rec-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.voice-player {
  width: 100%;
  max-width: 280px;
  height: 36px;
  margin-top: 0.35rem;
  display: block;
  accent-color: var(--accent);
}

/* ============ IN-APP CAMERA ============ */
.cam-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}
.cam-modal[hidden] { display: none; }
.cam-box {
  width: 100%; max-width: 480px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 0.8rem;
  animation: popIn 0.25s ease-out;
}
.cam-video {
  width: 100%; border-radius: 10px; background: #000;
  aspect-ratio: 4/3; object-fit: cover; display: block;
}
.cam-video[hidden] { display: none; }
.cam-video.mirror { transform: scaleX(-1); }
.cam-err { text-align: center; margin: 0.5rem 0; }
.cam-err[hidden] { display: none; }
.cam-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.6rem; margin-top: 0.7rem;
}
.cam-controls[hidden] { display: none; }
.cam-shutter {
  width: 64px; height: 64px; border-radius: 50%;
  border: 4px solid var(--text); background: var(--accent);
  cursor: pointer; flex-shrink: 0;
  transition: transform 0.12s ease;
}
.cam-shutter:active { transform: scale(0.9); }
.cam-row { margin: 0.4rem 0; }

/* ============ REELS ============ */
.reels-feed {
  height: calc(100vh - 120px);
  min-height: 420px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  border-radius: 14px;
  background: #000;
  margin: 0 -0.5rem;
}
.reel {
  position: relative;
  height: calc(100vh - 120px);
  min-height: 420px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000;
  overflow: hidden;
}
.reel-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reel-mute {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.reel-overlay {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 1rem 0.9rem 1.4rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  pointer-events: none;
}
.reel-overlay a, .reel-overlay button { pointer-events: auto; }
.reel-info { flex: 1; min-width: 0; color: #fff; }
.reel-info a { color: #fff; }
.reel-caption {
  margin: 0.3rem 0 0;
  color: rgba(255,255,255,0.9);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reel-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  padding-bottom: 0.5rem;
}
.reel-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
.reel-ico { font-size: 1.7rem; line-height: 1; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.reel-action.liked .reel-ico { color: #e05575; }
.reel-count { font-size: 0.75rem; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }

/* ============ REEL CATEGORY CHIPS ============ */
.cat-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.75rem 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: 0 0 auto;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cat-chip:active { transform: scale(0.95); }
.cat-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0603;
  font-weight: 600;
}

/* ============ SECTION BACKGROUNDS ============ */
body[class^="sec-"], body[class*=" sec-"] {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
body.sec-home { background-image: linear-gradient(rgba(10,6,3,0.88), rgba(10,6,3,0.88)), url('/public/img/bg-home.webp'); }
body.sec-reels { background-image: linear-gradient(rgba(10,6,3,0.88), rgba(10,6,3,0.88)), url('/public/img/bg-reels.webp'); }
body.sec-explore { background-image: linear-gradient(rgba(10,6,3,0.88), rgba(10,6,3,0.88)), url('/public/img/bg-explore.webp'); }
body.sec-groups { background-image: linear-gradient(rgba(10,6,3,0.90), rgba(10,6,3,0.90)), url('/public/img/bg-home.webp'); }
body.sec-events { background-image: linear-gradient(rgba(10,6,3,0.90), rgba(10,6,3,0.90)), url('/public/img/bg-explore.webp'); }
body.sec-new { background-image: linear-gradient(rgba(10,6,3,0.90), rgba(10,6,3,0.90)), url('/public/img/bg-reels.webp'); }
body.sec-profile { background-image: linear-gradient(rgba(10,6,3,0.88), rgba(10,6,3,0.88)), url('/public/img/bg-profile.webp'); }

/* Kink picker (signup + edit profile) and profile kink tags */
.kink-picker { border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem; margin: 0 0 1rem; }
.kink-picker legend { padding: 0 0.5rem; font-weight: 600; }
.kink-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.kink-chip { cursor: pointer; }
.kink-chip input { position: absolute; opacity: 0; pointer-events: none; }
.kink-chip span { display: inline-block; padding: 0.35rem 0.8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 0.85rem; }
.kink-chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #1a120e; font-weight: 700; }
.kink-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.kink-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.kink-tag { display: inline-block; padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--accent); color: #1a120e; font-size: 0.85rem; font-weight: 600; }

/* ---- age gate: cup hero background + animated steam ---- */
body.gate-page { background: #000; }
body.gate-page .topbar, body.gate-page .tabbar { display: none; }
body.gate-page .container { max-width: none; margin: 0; padding: 0; }
.gate-hero { min-height: 100vh; min-height: 100svh; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; padding: 2rem 1rem; overflow: hidden; }
.cup-wrap { position: relative; width: min(78vmin, 480px); aspect-ratio: 1; }
.gate-cup { width: 100%; height: auto; display: block; border-radius: 18px; }
.steam-canvas { position: absolute; left: 12%; width: 76%; top: -48%; height: 80%; pointer-events: none; }
.gate-hero .gate { margin: 0; width: min(480px, 94%); background: rgba(24,16,11,.85); backdrop-filter: blur(6px); }
/* ---- home page: fixed cup background + animated steam behind the feed ---- */
.home-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; height: 100dvh; z-index: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; overflow: hidden; background: #000; }
.home-bg .cup-wrap { position: relative; width: 100vmin; max-width: none; aspect-ratio: 1; }
.home-bg .gate-cup { width: 100%; height: auto; display: block; border-radius: 0; opacity: 1; }
body.home-page main.container { position: relative; z-index: 1; }
body.home-page .feed-card, body.home-page .composer { background: color-mix(in srgb, var(--card) 55%, transparent); backdrop-filter: blur(2px); }

/* FetLife-style profile editing (2026-09-21) */
.form select { background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 0.7rem; font-size: 1rem; min-height: 44px; }
.form fieldset.kink-picker { margin: 0; }
.kink-levels { display: grid; gap: 0.5rem; margin-top: 0.75rem; }
.kink-level-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.kink-level-row select { background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 0.5rem 0.7rem; font-size: 0.9rem; }
.kink-chip input:disabled + span { opacity: 0.4; cursor: not-allowed; }
.kink-tag .kink-level { font-weight: 400; font-size: 0.85em; opacity: 0.85; }
.kink-tag-dim { background: var(--bg2); color: var(--muted); border: 1px solid var(--line); }
.demo-bit { font-size: 0.6em; color: var(--muted); font-weight: 400; }

/* FetLife-style Fetishes section: search + browse tabs + Your Fetishes (2026-09-21) */
.fet-search { width: 100%; box-sizing: border-box; background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 0.7rem; font-size: 1rem; margin-bottom: 0.6rem; }
.fet-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.6rem; }
.fet-tab { flex: 1; padding: 0.55rem; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 0.9rem; cursor: pointer; }
.fet-tab.active { background: var(--accent); border-color: var(--accent); color: #1a120e; font-weight: 700; }
.fet-browse { display: grid; gap: 0.35rem; max-height: 300px; overflow-y: auto; margin-bottom: 0.75rem; }
.fet-browse-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.fet-browse-name { font-weight: 600; flex: 1; }
.fet-browse-count { font-size: 0.8rem; }
.fet-add:disabled { opacity: 0.55; }
.fet-your-title { margin: 0.9rem 0 0.4rem; font-size: 1.05rem; }
.fet-group { margin-bottom: 0.6rem; }
.fet-group h4, .fet-group-title { margin: 0.5rem 0 0.35rem; font-size: 0.95rem; color: var(--muted); }
.fet-group-rows { display: grid; gap: 0.4rem; }
.your-fetish { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.your-fetish .kink-tag { flex-shrink: 0; }
.fet-mini { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); }
.fet-mini select { background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 0.4rem 0.5rem; font-size: 0.85rem; max-width: 11rem; }
.fet-remove { margin-left: auto; }

/* ---------- member mailbox ---------- */
.msg-btn { position: relative; }
.msg-badge { position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--accent); color: #1a120e; font-size: 0.68rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; line-height: 1; }
.convo-list { list-style: none; margin: 0; padding: 0; }
.convo-row { display: flex; gap: 0.7rem; align-items: center; padding: 0.75rem 0.2rem; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.convo-row:hover { text-decoration: none; }
.convo-main { flex: 1; min-width: 0; }
.convo-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.convo-snip { color: var(--muted); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-snip-unread { color: var(--text); font-weight: 600; }
.convo-badge { flex: none; background: var(--accent); color: #1a120e; font-weight: 700; border-radius: 999px; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; padding: 0 6px; }
.msg-thread { display: flex; flex-direction: column; gap: 0.55rem; margin: 1rem 0; }
.msg-row { display: flex; gap: 0.4rem; align-items: flex-end; }
.msg-row.mine { justify-content: flex-end; }
.msg-bubble { max-width: 78%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0.5rem 0.75rem; overflow-wrap: break-word; }
.msg-row.mine .msg-bubble { background: var(--accent); border-color: var(--accent); color: #1a120e; }
.msg-row.mine .msg-time { color: rgba(26, 18, 14, 0.65); }
.msg-time { font-size: 0.7rem; margin-top: 0.25rem; }
.msg-form { margin-top: 0.5rem; }

/* Voice note label + SVG mic button */
.voice-note { margin-top: 0.35rem; }
.voice-note-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.mic-btn svg { display: block; }

/* Custom voice-note play button (renders everywhere, no native controls) */
.voice-play-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.45rem 0.9rem 0.45rem 0.6rem;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.voice-play-btn svg { flex-shrink: 0; }
.voice-play-btn.playing { border-color: var(--accent); color: var(--accent); }
.voice-audio { display: none; }

.mic-btn-text { width: auto; padding: 0 0.85rem; gap: 0.35rem; font-size: 0.85rem; font-weight: 600; }
.mic-btn-text svg { flex-shrink: 0; }

.msg-form-row { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }
.msg-form-row .btn { flex-shrink: 0; }

/* ---- cup video player: the video is the coffee in the cup (aerial view) ---- */
.cup-player { position: relative; width: 100vw; max-width: 860px; aspect-ratio: 1; margin: 1rem auto; margin-left: 50%; transform: translateX(-50%); }
.cup-rim { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cup-brand-text { fill: #c9a227; font-size: 22px; font-family: Georgia, 'Times New Roman', serif; letter-spacing: 5px; }
.cup-video { position: absolute; left: 50%; top: 50%; width: 82%; height: 82%; transform: translate(-50%, -50%); border-radius: 50%; object-fit: cover; background: #000; cursor: pointer; z-index: 2; }
.cup-play-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 76px; height: 76px; border-radius: 50%; background: rgba(201,162,39,.94); border: none; color: #0a0a0a; font-size: 26px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3; box-shadow: 0 4px 18px rgba(0,0,0,.55); }
.cup-steam { position: absolute; left: 50%; top: -6%; width: 60%; height: 28%; transform: translateX(-50%); pointer-events: none; z-index: 4; }
.cup-steam i { position: absolute; bottom: 0; width: 9px; height: 100%; border-radius: 50%; background: linear-gradient(to top, rgba(255,255,255,0), rgba(255,255,255,.32), rgba(255,255,255,0)); filter: blur(7px); opacity: 0; animation: cupSteamRise 3.6s ease-in-out infinite; }
.cup-steam i:nth-child(1) { left: 22%; animation-delay: 0s; }
.cup-steam i:nth-child(2) { left: 48%; animation-delay: 1.2s; }
.cup-steam i:nth-child(3) { left: 70%; animation-delay: 2.3s; }
@keyframes cupSteamRise { 0% { transform: translateY(25%) scaleX(1); opacity: 0; } 35% { opacity: .65; } 100% { transform: translateY(-130%) translateX(12px) scaleX(1.7); opacity: 0; } }
.cup-controls { display: flex; gap: .75rem; justify-content: center; margin: .25rem 0 1.25rem; }
