/* ===================================================================
   GrooVVee — Components
   Reusable UI component styles
   =================================================================== */

/* ── Ambient Background Orbs ────────────────────────────────────── */
/* Was the branded illustration (assets/bg.jpg, with its own colorful
   icons + wordmark) — plain neutral base for now, per product direction
   (no color beyond dark grey). Drifting orbs kept for subtle texture/
   motion, recolored to grey instead of blue/green/yellow. */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: var(--z-below);
  overflow: hidden;
  pointer-events: none;
  background: var(--bg-base);
}

.orb {
  position: absolute;
  border-radius: 50%;
  /* No filter: blur() here. Its radial gradient is already soft, and an 80px blur on a 600px shape that moves forever
     made Safari (every iPhone) repaint it on every frame: the app froze for many seconds on start and drained battery.
     Moving it with transform alone is done by the graphics chip and costs almost nothing. */
  will-change: transform;
  animation: orb-drift linear infinite;
}
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } }

.orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(28, 28, 30, 0.07) 0%, transparent 70%);
  top: -200px;
  left: -150px;
  animation-duration: 25s;
}

.orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(28, 28, 30, 0.05) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  animation-duration: 32s;
  animation-direction: reverse;
}

.orb--3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(28, 28, 30, 0.05) 0%, transparent 70%);
  top: 40%;
  left: 60%;
  animation-duration: 20s;
  animation-delay: -10s;
}

@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25%       { transform: translate(40px, -30px) scale(1.05); }
  50%       { transform: translate(-20px, 50px) scale(0.95); }
  75%       { transform: translate(-50px, -20px) scale(1.03); }
}

/* ── Splash Screen ──────────────────────────────────────────────────
   Shown immediately on load (plain HTML, no JS needed for first paint),
   removed by main.js once bootstrap finishes — see initSplashScreen(). */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  background: var(--bg-base);
  transition: opacity 300ms var(--ease-out), visibility 300ms;
}

.splash-screen__icon {
  border-radius: var(--radius-lg);
}

.splash-screen__wordmark {
  font-size: 1.75rem;
}

.splash-screen--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── Loading Spinner ────────────────────────────────────────────── */
.page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60vh;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-default);
  border-top-color: var(--primary-500);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem var(--space-5);
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--transition-fast);
}

.btn:hover::before {
  background: rgba(255, 255, 255, 0.06);
}

.btn:active { transform: scale(0.94); transition: transform 100ms var(--ease-spring); }

/* Primary — the vivid blue→green→yellow→red brand gradient, not solid blue,
   so every primary action reads as the most colorful, "tap me" element. */
.btn--primary {
  background: var(--gradient-mixed);
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow-sm);
  transition: background-position var(--transition-slow), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.btn--primary:hover {
  background-position: 100% 50%;
  box-shadow: var(--shadow-glow-primary), var(--shadow-glow-accent);
  transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0) scale(0.98); }

/* Accent */
.btn--accent {
  background: var(--gradient-accent);
  color: var(--text-inverse);
  border-color: transparent;
}
.btn--accent:hover {
  box-shadow: var(--shadow-glow-accent);
  transform: translateY(-1px);
}

/* Secondary / Ghost */
.btn--secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border-color: var(--glass-border);
  backdrop-filter: var(--glass-blur);
}
.btn--secondary:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

/* Ghost */
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn--ghost:hover {
  background: var(--glass-bg);
  color: var(--text-primary);
}

/* Danger */
.btn--danger {
  background: transparent;
  color: var(--error-500);
  border-color: rgba(239, 68, 68, 0.3);
}
.btn--danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--error-500);
}

/* Sizes */
.btn--sm {
  padding: 0.4375rem var(--space-4);
  font-size: 0.8125rem;
  border-radius: var(--radius-full);
}
.btn--lg {
  padding: 0.875rem var(--space-7);
  font-size: 1.0625rem;
  border-radius: var(--radius-full);
}
.btn--xl {
  padding: 1rem var(--space-8);
  font-size: 1.125rem;
  border-radius: var(--radius-full);
}
.btn--full { width: 100%; }

/* Disabled */
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

/* Icon-only button */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.btn-icon svg {
  width: 20px;
  height: 20px;
}
/* Compact icon row for the default chat input bar (emoji/mic/photo/sticker/send all in one row alongside the
   text field) — five full-size 38px .btn-icon buttons left too little width for the field itself to be usable
   (measured as low as 94px on a real mobile chat panel). Smaller here, in this one context, rather than shrinking
   .btn-icon everywhere else it's used. */
.rci-icon-compact { width: 30px; height: 30px; }
.rci-icon-compact svg { width: 17px; height: 17px; }
.btn-icon:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}
.btn-icon:active { transform: scale(0.93); }

/* ── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  backdrop-filter: var(--glass-blur);
  padding: var(--space-6);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15,23,42,0.08), transparent);
  pointer-events: none;
}

.card:hover {
  border-color: var(--glass-border-hover);
  background: var(--glass-bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Snappy tap feedback on touch — subtle enough that it reads fine even on
   cards whose press event bubbled up from an inner button. */
.card:active {
  transform: scale(0.97);
  transition: transform 100ms var(--ease-spring);
}

.card--glow {
  border-color: var(--border-primary);
  box-shadow: var(--shadow-glow-sm);
}

.card--flat {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  backdrop-filter: none;
}
.card--flat:hover {
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

/* ── Form Inputs ────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.form-input {
  width: 100%;
  padding: 0.8125rem var(--space-4);
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--primary-500);
  background: rgba(28, 28, 30, 0.06);
  box-shadow: 0 0 0 3px rgba(28, 28, 30, 0.15);
}

/* :placeholder-shown never matches a <select> (it has no placeholder attribute
   to show), so :not(:placeholder-shown) is always true there — excluding
   select keeps a required-but-unselected dropdown from showing an error
   border before the user has touched it. */
.form-input:not(select):invalid:not(:placeholder-shown) {
  border-color: var(--error-500);
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.form-error {
  font-size: 0.8125rem;
  color: var(--error-500);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.form-input--password {
  padding-right: 3rem;
}

.input-wrapper {
  position: relative;
}

.input-wrapper .input-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 18px;
  height: 18px;
}

.input-wrapper .form-input {
  padding-left: 2.75rem;
}

.input-wrapper .input-action {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
  background: none;
  border: none;
}
.input-wrapper .input-action:hover { color: var(--text-secondary); }
.input-wrapper .input-action svg { width: 18px; height: 18px; display: block; }

/* ── Badges ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.2rem var(--space-2);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.badge svg { width: 10px; height: 10px; }

/* Text colors here are deliberately the DARK end of each scale (600/700),
   not the light 300/400 shades the original dark theme used — those were
   pastel tones meant to pop against near-black backgrounds and read as
   washed-out, low-contrast text on this app's light background. */
/* Decorative-only badges ("New", role tags) — dark grey, no color right
   now. badge--success/error/warning/live below stay color-coded since
   those convey real status, not brand decoration. */
.badge--primary   { background: rgba(28, 28, 30, 0.08); color: var(--text-primary); border: 1px solid rgba(28, 28, 30, 0.2); }
.badge--accent    { background: rgba(28, 28, 30, 0.08); color: var(--text-primary); border: 1px solid rgba(28, 28, 30, 0.2); }
.badge--success   { background: rgba(34, 197, 94, 0.14); color: var(--success-500); border: 1px solid rgba(34, 197, 94, 0.3); }
.badge--error     { background: rgba(239, 68, 68, 0.14); color: var(--error-500); border: 1px solid rgba(239, 68, 68, 0.3); }
.badge--warning   { background: rgba(234, 179, 8, 0.14); color: var(--warning-500); border: 1px solid rgba(234, 179, 8, 0.3); }
.badge--neutral   { background: var(--glass-bg); color: var(--text-secondary); border: 1px solid var(--glass-border); }
.badge--live      { background: rgba(239, 68, 68, 0.16); color: var(--error-500); border: 1px solid rgba(239, 68, 68, 0.4); animation: pulse-badge 2s ease-in-out infinite; }

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ── Avatar ─────────────────────────────────────────────────────── */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  font-weight: 700;
  font-size: 0.875rem;
  color: #fff;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  letter-spacing: 0.02em;
  border: 2px solid rgba(255,255,255,0.1);
}

.avatar--sm  { width: 28px; height: 28px; font-size: 0.6875rem; }
.avatar--lg  { width: 48px; height: 48px; font-size: 1rem; }
.avatar--xl  { width: 64px; height: 64px; font-size: 1.25rem; }
.avatar--2xl { width: 96px; height: 96px; font-size: 1.75rem; }

/* The profile page's own hero avatar — bigger than every other .avatar--2xl
   use (incoming-call overlays, etc.) since this page is dedicated to one
   person and the avatar is the first thing on it. Declared after
   .avatar--2xl so it wins on elements carrying both classes, without
   touching the shared size everywhere else. */
.avatar--profile-hero { width: 140px; height: 140px; font-size: 2.5rem; }

/* Profile QR code — capped to a fixed size regardless of how many modules
   the encoded profile URL needs (a longer URL means more modules, and
   without this the raw SVG's own pixel dimensions would grow and blow out
   the layout on a phone-width screen). The SVG's viewBox scales the
   pattern proportionally, so this cap never distorts or clips it. */
.profile-qr-box svg { width: 128px; height: 128px; display: block; }

/* Profile QR card + Scan/Share/Save row — matches TikTok's own "My QR
   code" screen: avatar overlapping the card's top edge, name, QR,
   caption, three square icon buttons below. */
.qr-card {
  position: relative;
  text-align: center;
  background: var(--bg-surface-alt, var(--glass-bg));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: calc(var(--space-6) + 20px) var(--space-5) var(--space-6);
}

.qr-card__avatar {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid var(--bg-page, var(--bg-surface));
  line-height: 0;
}

.qr-action-row {
  display: flex;
  gap: var(--space-3);
  margin: var(--space-4) auto 0;
}

.qr-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-2);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-base);
}

.qr-action-btn svg { width: 20px; height: 20px; }
.qr-action-btn:hover { background: var(--glass-bg); }

/* Gemstone avatar frames (modules/_shared/gemstoneFrame.js) — the wrapped
   img/video/initials keeps its own .avatar(--size) class for font-size
   (initials fallback) but must stretch to fill the frame's clip-path
   shape rather than sit at its class's own fixed width/height. */
.gem-frame-media > * { width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important; border: none !important; background: transparent !important; }

/* Live chat panel card (DM chat, and the live chat used by Streaming,
   Concerts, Contests, Battlesphere, Watch Party — see roomWidgets.js's
   mountChatPanel). Used to be a flat inline `height:480px` (etc.) per
   caller — fine on desktop, but on a phone with the on-screen keyboard
   open that fixed height doesn't shrink, so the message input and Send
   button (at the bottom of the box) end up pushed below the visible
   viewport, invisible until you dismiss the keyboard. `--chat-height`
   (set inline per caller) keeps each screen's original desktop height;
   the mobile rule below caps it to whatever's actually left of the
   dynamic viewport, which shrinks live as the keyboard opens on browsers
   that support `dvh` (current Safari/Chrome on iOS and Android). */
.chat-panel {
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
  height: var(--chat-height, 480px);
}
@media (max-width: 640px) {
  .chat-panel {
    height: min(var(--chat-height, 480px), calc(100vh - 260px));
    height: min(var(--chat-height, 480px), calc(100vh - 260px)); height: min(var(--chat-height, 480px), calc(100dvh - 260px));
  }
}

/* ── Chat bubbles (WhatsApp-style shape) ──────────────────────────────
   One shared shape for every chat surface in the app — DM chat
   (modules/social/dmChatPanel.js) and every group/room chat (Battlesphere,
   Contests, Concerts, Watch Party, Streaming, Podcast — all via
   modules/_shared/roomWidgets.js's mountChatPanel). A real WhatsApp bubble
   is a rounded rectangle with ONE corner squared off and a small triangular
   tail growing out of that same corner — built here with a ::after
   pseudo-element clipped into a triangle, not a plain rectangle. Colors
   stay GrooVVee's own (blue for mine / neutral gray for theirs) rather
   than WhatsApp's literal green — this app already avoids recreating
   other platforms' exact branded visuals everywhere else, only ever
   matching the real UX shape/behavior. */
/* ── DM Chat — LinkedIn Messaging style ──────────────────────────────
   LinkedIn's messaging UI:
   - Left panel: conversation list (avatar, name, preview, timestamp)
   - Right panel: chat window — clean white on desktop, dark on our theme
   - Sent bubbles: GrooVVee lemon yellow (#FCF600) right-aligned, no tail
   - Received bubbles: light gray (#e8e8e8 → translated to surface) left, no tail
   - Clean rounded rectangles (18px radius) — no WhatsApp chat tails
   - Sender avatar appears only on received messages (left side)
   - Timestamp appears below the last bubble in a cluster
   - Read receipt "Seen" appears below the last sent message
   ─────────────────────────────────────────────────────────────────── */

/* LinkedIn DM: two-panel layout container */
.dm-layout {
  display: flex;
  height: calc(100vh - var(--topbar-height) - var(--bottom-nav-height) - var(--space-8));
  max-height: 720px;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-default);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* LEFT: Conversation list panel */
.dm-sidebar {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-default);
  background: var(--bg-surface);
}
.dm-sidebar__header {
  padding: var(--space-4) var(--space-4) var(--space-3);
  border-bottom: 1px solid var(--border-default);
}
.dm-sidebar__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-3) 0;
  letter-spacing: -0.01em;
}
.dm-sidebar__search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-3);
}
.dm-sidebar__search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  width: 100%;
}
.dm-sidebar__search input::placeholder { color: var(--text-muted); }
.dm-sidebar__search-icon { color: var(--text-muted); flex-shrink: 0; }
.dm-sidebar__list { overflow-y: auto; flex: 1; }

/* Conversation row in the list */
.dm-conv-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: background var(--transition-fast);
  position: relative;
  text-decoration: none;
  color: inherit;
}
.dm-conv-item:hover { background: var(--bg-elevated); }
.dm-conv-item--active { background: #FFFBCC; box-shadow: inset 3px 0 0 #FCF600; } /* selected conversation: lemon yellow */
.dm-conv-item__avatar { flex-shrink: 0; position: relative; }
.dm-conv-item__presence {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  background: #44b700;
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
}
.dm-conv-item__body { flex: 1; min-width: 0; }
.dm-conv-item__name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dm-conv-item__preview {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.dm-conv-item__preview--unread { color: var(--text-primary); font-weight: 600; }
.dm-conv-item__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
  flex-shrink: 0;
}
.dm-conv-item__time { font-size: 0.6875rem; color: var(--text-muted); }
.dm-conv-item__badge {
  width: 18px;
  height: 18px;
  background: #FCF600;
  color: #111;
  border-radius: 50%;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* RIGHT: Active chat panel */
.dm-chat-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-base);
}
.dm-chat-pane__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-default);
  background: var(--bg-surface);
  flex-shrink: 0;
}
.dm-chat-pane__who {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.dm-chat-pane__name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.2;
}
.dm-chat-pane__status {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.dm-chat-pane__status--online { color: #44b700; }
.dm-chat-pane__actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.dm-chat-pane__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.dm-chat-pane__btn:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* Mobile-only back button (list ↔ chat toggle below) — hidden on desktop
   where both panes show side by side and there's nothing to go "back" to. */
.dm-chat-pane__back {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: var(--space-1);
}
.dm-chat-pane__back:hover { background: var(--bg-elevated); }

/* ── DM layout on phone screens ────────────────────────────────────
   The 320px fixed sidebar plus the chat pane can't fit side by side on
   a phone — the chat pane would be squeezed to a sliver a few pixels
   wide, so tapping a contact looked like nothing happened. Below 768px
   this becomes a single-panel view that toggles between the
   conversation list and the open chat (`.dm-layout--chat-open`, set by
   modules/social/index.js when a conversation is opened), with the
   back button above returning to the list — the same pattern LinkedIn's
   own mobile app uses. */
@media (max-width: 767px) {
  .dm-layout {
    height: calc(100vh - var(--topbar-height) - var(--bottom-nav-height));
    max-height: none;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
  .dm-sidebar { width: 100%; border-right: none; }
  .dm-chat-pane { display: none; }
  .dm-layout--chat-open .dm-sidebar { display: none; }
  .dm-layout--chat-open .dm-chat-pane { display: flex; }
  .dm-chat-pane__back { display: flex; }
}

/* Chat bubble area */
.chat-row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  margin-bottom: 3px;
}
.chat-row--mine { justify-content: flex-end; }

/* LinkedIn-style bubbles — clean rounded rectangles, no tails */
.chat-bubble {
  position: relative;
  max-width: 68%;
  padding: 9px 14px;
  border-radius: 18px;
  font-size: 0.875rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  letter-spacing: 0.005em;
}

/* Sent — GrooVVee lemon yellow, black text */
.chat-bubble--mine {
  background: #FCF600;
  color: #ffffff;
  color: #111;
}

/* Received — subtle surface, like LinkedIn's light gray on dark */
.chat-bubble--theirs {
  background: #F4F2EE; /* LinkedIn's warm grey for received messages */
  color: rgba(0, 0, 0, 0.9);
  border-bottom-left-radius: 4px;
  border: none;
}

/* No ::after tail — LinkedIn doesn't use chat tails */
.chat-bubble--mine::after,
.chat-bubble--theirs::after { display: none; }

/* Group/room sender name (DMs don't show this, only group chats) */
.chat-bubble__sender {
  display: block;
  font-weight: 600;
  font-size: 0.75rem;
  color: #6B6200;
  margin-bottom: 2px;
}

/* Timestamp — LinkedIn shows it below clusters, not inside bubbles */
.chat-bubble__time {
  display: inline-block;
  font-size: 0.6875rem;
  opacity: 0.65;
  margin-left: var(--space-2);
  float: right;
  margin-top: 3px;
  line-height: 1;
}



/* ── Fullscreen Live View (YouTube/IG-Live-style) ─────────────────────
   Shared by Streaming and Concerts' live detail view: the camera/video
   fills the whole screen (not a 16:9 card in the page flow) with overlay
   controls, and chat lives behind a comment-icon toggle instead of an
   always-open docked panel. Deliberately NOT nested inside a `.page-enter`
   wrapper (that class's animation leaves a non-"none" `transform` on its
   element via its `forwards` fill-mode, which — per the CSS spec — turns
   it into a containing block for any `position:fixed` descendant, so the
   fixed overlay would end up confined to that box instead of the real
   viewport). z-index sits at --z-modal so toasts (--z-toast, higher)
   still show above it, but it still covers the app's own sidebar/bottom
   nav (--z-sidebar, lower) the same way a real fullscreen player would. */
.live-fullscreen {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: #000;
  overflow: hidden;
}
/* router.js's _renderRoute unconditionally re-adds 'page-enter' to
   #main-content right after every route swap (to retrigger the fade-in
   animation), even if a module removes it — so neutralizing the class
   from inside a module (as this one briefly tried) never sticks. This
   :has() rule reacts to the CONTENT instead of fighting that class
   toggle: whenever #main-content contains a .live-fullscreen child, force
   its transform to the literal `none` (not just an identity matrix),
   which is what actually stops it from being a containing block for
   .live-fullscreen's `position:fixed`. */
#main-content:has(> .live-fullscreen) {
  transform: none !important;
  animation: none !important;
}
.live-fullscreen__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.live-fullscreen__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.live-fullscreen__top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: var(--space-4);
  padding-top: max(var(--space-4), env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  z-index: 2;
  background: linear-gradient(rgba(0,0,0,0.55), transparent);
}
.live-fullscreen__top-bar .btn-icon,
.live-fullscreen__action-rail button,
.live-fullscreen__controls-bar .btn-icon {
  background: rgba(0,0,0,0.4);
  color: #fff;
  border-color: transparent;
}
/* One flex-column stack instead of several independently bottom:0-anchored
   blocks — .info/.controls-bar/the reaction mount used to all occupy the
   same rectangle and visually collide (title text under the End Stream
   button, reactions floating over both). Order here is visual order:
   reactions float just above the info text, which sits just above the
   owner's control bar (or the viewer's screen-frame/filter controls). */
.live-fullscreen__bottom-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: var(--space-3) 76px var(--space-3) var(--space-4); /* right padding clears the action rail */
  padding-bottom: max(var(--space-3), env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: 2;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
}
.live-fullscreen__info h1 { color: #fff; margin: 0; }
.live-fullscreen__info .text-secondary { color: rgba(255,255,255,0.85); }
.live-fullscreen__reactions-row {
  position: relative;
  height: 0;
  align-self: flex-start;
}
.live-fullscreen__action-rail {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  z-index: 3;
}
.live-fullscreen__action-rail button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.6875rem;
  padding: var(--space-2);
  border-radius: var(--radius-full);
  min-width: 44px;
  min-height: 44px;
}
.live-fullscreen__controls-bar {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.live-fullscreen__chat-drawer {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 65%;
  min-height: 40%;
  background: var(--bg-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-xl);
  z-index: 4;
  display: flex;
  flex-direction: column;
  padding: var(--space-3) 0 0;
}
.live-fullscreen__chat-drawer[hidden] { display: none; }
.live-fullscreen__chat-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4) var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

/* Rich chat input (modules/_shared/richChatInput.js) — emoji/sticker
   picker trays, and the mic button's recording state. */
.rich-chat-picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  padding: var(--space-2);
  border-top: 1px solid var(--border-subtle);
  margin-bottom: var(--space-2);
}
.rci-mic-btn--recording {
  background: var(--error-500);
  color: #fff;
  animation: pulse-dot 1.2s ease-in-out infinite;
}

/* Buddy's hands-free voice mode (modules/buddy/index.js) — distinct from the red "listening" pulse above:
   blue means Buddy itself is talking right now, not that the mic is capturing you. */
.rci-mic-btn--speaking {
  background: var(--info-500);
  color: #fff;
  animation: pulse-dot 1.2s ease-in-out infinite;
}

/* Global call overlay (modules/_shared/globalCall.js) — WhatsApp-style
   round controls. Lives on a near-black call background regardless of
   light/dark theme, so colors are hardcoded here rather than themed. */
.gc-round-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.16);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.gc-round-btn svg { width: 24px; height: 24px; }
.gc-round-btn:hover { background: rgba(255,255,255,0.26); }
.gc-round-btn--sm { width: 38px; height: 38px; }
.gc-round-btn--sm svg { width: 18px; height: 18px; }
.gc-round-btn--active { background: #fff; color: #111; }
.gc-round-btn--danger { background: var(--error-500, #ef4444); }
.gc-round-btn--danger:hover { background: var(--error-600, #dc2626); }
.gc-round-btn--accept { background: var(--success-500, #22c55e); }
.gc-round-btn--accept:hover { background: var(--success-600, #16a34a); }

/* Real presence (services/presenceService.js) — online is the one place
   this app still uses a functional color (green), same as live/error
   status elsewhere; not part of the "no color" decorative palette. */
.presence-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success-500);
  border: 2px solid var(--bg-surface);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Avatar button (clickable) */
.avatar-btn {
  cursor: pointer;
  border: none;
  background: none;
  padding: 2px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}
.avatar-btn:hover .avatar {
  box-shadow: 0 0 0 3px var(--primary-500);
}

/* ── Search Bar ─────────────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 0 var(--space-4);
  transition: all var(--transition-fast);
  max-width: 400px;
  width: 100%;
}

.search-bar:focus-within {
  border-color: var(--primary-500);
  background: rgba(28, 28, 30, 0.06);
  box-shadow: 0 0 0 3px rgba(28, 28, 30, 0.12);
}

.search-bar__icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-bar__input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  width: 100%;
  height: 38px;
  padding: 0;
}
.search-bar__input::placeholder { color: var(--text-muted); }

.search-bar__mic {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  margin: 0 -6px 0 0;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.search-bar__mic:hover { color: var(--text-primary); background: var(--glass-bg-hover); }
.search-bar__mic svg { width: 16px; height: 16px; }
.search-bar__mic:disabled { opacity: 0.4; cursor: not-allowed; }
.search-bar__mic--listening {
  color: var(--text-inverse);
  background: var(--text-primary);
  animation: voice-pulse 1.2s ease-in-out infinite;
}

/* ── Toasts ─────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: calc(var(--topbar-height) + var(--space-4));
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  min-width: 280px;
  max-width: 400px;
  pointer-events: all;
  animation: toast-slide-in var(--duration-slow) var(--ease-out) forwards;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

.toast--success::before { background: var(--success-500); }
.toast--error::before   { background: var(--error-500); }
.toast--warning::before { background: var(--warning-500); }
.toast--info::before    { background: var(--info-500); }

.toast__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast--success .toast__icon { color: var(--success-500); }
.toast--error .toast__icon   { color: var(--error-500); }
.toast--warning .toast__icon { color: var(--warning-500); }
.toast--info .toast__icon    { color: var(--info-500); }

.toast__body { flex: 1; min-width: 0; }

.toast__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.toast__message {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.5;
}

.toast__close {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
}
.toast__close svg { width: 14px; height: 14px; }
.toast__close:hover { color: var(--text-primary); background: var(--glass-bg); }

.toast--removing {
  animation: toast-slide-out var(--duration-base) var(--ease-in-out) forwards;
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateX(120%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toast-slide-out {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
    max-height: 200px;
    margin-bottom: 0;
  }
  to {
    opacity: 0;
    transform: translateX(120%) scale(0.9);
    max-height: 0;
    margin-bottom: calc(var(--space-3) * -1);
  }
}

/* ── Notification Dot ───────────────────────────────────────────── */
.notification-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  background: var(--error-500);
  border-radius: 50%;
  border: 2px solid var(--bg-base);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50%       { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0); }
}

/* Btn-icon relative positioning for dot */
.btn-icon { position: relative; }

/* Notifications bell badge — same red "count" pill as most apps put on a
   bell icon (e.g. "9+" once it's more than one digit's worth of room). */
.topbar__notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--error-500);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* ── Dropdown Menu ──────────────────────────────────────────────── */
.dropdown {
  position: fixed;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-2);
  min-width: 220px;
  z-index: var(--z-dropdown);
  animation: dropdown-pop var(--duration-base) var(--ease-spring) forwards;
  backdrop-filter: var(--glass-blur);
  /* Grows to fit its content by default (fine for a couple of items), but
     the language list alone now has 10 entries — without a cap it can
     render past the bottom of the screen with no way to reach the rest.
     Capped + scrollable here so every .dropdown (notifications, account,
     language) stays fully reachable regardless of how many items it holds. */
  max-height: min(420px, 70vh);
  overflow-y: auto;
}

/* The account dropdown's trigger lives inside the sidebar now (bottom-left
   footer) — the sidebar's own z-index (200) sits above the base .dropdown
   z-index (100), so without this it opens invisibly behind the sidebar
   panel itself. */
#user-dropdown {
  z-index: var(--z-modal);
}

@keyframes dropdown-pop {
  from { opacity: 0; transform: scale(0.95) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.dropdown__header {
  padding: var(--space-3) var(--space-3) var(--space-2);
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
  z-index: 1;
}

.dropdown__header .user-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.dropdown__header .user-role-badge {
  margin-top: var(--space-2);
}

.dropdown__divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-2) 0;
}

.dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: none;
  border: none;
}
.dropdown__item svg { width: 18px; height: 18px; flex-shrink: 0; }
.dropdown__item:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}
.dropdown__item--danger { color: var(--error-500); }
.dropdown__item--danger:hover { background: rgba(239, 68, 68, 0.1); }

/* ── Tabs ───────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  padding: 3px;
  border: 1px solid var(--glass-border);
  width: fit-content;
}

.tab-btn {
  padding: 0.5rem var(--space-5);
  border-radius: calc(var(--radius-lg) - 3px);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition-base);
  cursor: pointer;
  background: none;
  border: none;
  white-space: nowrap;
}

.tab-btn.active {
  background: var(--glass-bg-active);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.tab-btn:hover:not(.active) {
  color: var(--text-secondary);
}

/* ── Progress Bar ───────────────────────────────────────────────── */
.progress {
  width: 100%;
  height: 4px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  border-radius: inherit;
  background: var(--gradient-primary);
  transition: width var(--duration-slow) var(--ease-out);
}

/* ── Divider ────────────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ── Stat Tile ──────────────────────────────────────────────────── */
.stat-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-5) var(--space-6);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  backdrop-filter: var(--glass-blur);
  transition: all var(--transition-base);
}

.stat-tile:hover {
  border-color: var(--border-primary);
  box-shadow: var(--shadow-glow-sm);
  transform: translateY(-2px);
}

.stat-tile__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-tile__value {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-tile__sub {
  font-size: 0.8125rem;
  color: var(--success-500);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* ── Module Placeholder (Coming Soon) ───────────────────────────── */
.module-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--topbar-height) - var(--space-16));
  padding: var(--space-12) var(--space-6);
  text-align: center;
  gap: var(--space-6);
}

.module-placeholder__icon {
  width: 80px;
  height: 80px;
  /* Tinted to whatever `color` each module sets inline, not a fixed glass
     tone — on the light theme a flat translucent-white box with a generic
     blue glow behind it (the old dark-theme design) washed out badly for
     non-blue icons (e.g. Shop's yellow). currentColor keeps every module's
     icon readable regardless of its accent color. */
  background: var(--bg-surface); /* iOS before 16.2 has no color-mix(): plain colours first */
  border: 1.5px solid currentColor;
  background: color-mix(in srgb, currentColor 14%, var(--bg-surface));
  border: 1.5px solid color-mix(in srgb, currentColor 45%, transparent);
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-500);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.module-placeholder__icon svg {
  width: 40px;
  height: 40px;
}

.module-placeholder__icon::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-2xl) + 2px);
  background: currentColor;
  z-index: -1;
  opacity: 0.18;
  filter: blur(10px);
}

.module-placeholder__badge-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
}

.module-placeholder__title {
  font-family: 'Times New Roman', Times, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.module-placeholder__desc {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.7;
}

.module-placeholder__features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  max-width: 560px;
}

.feature-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--text-secondary);
  backdrop-filter: var(--glass-blur);
  transition: all var(--transition-base);
}

.feature-chip:hover {
  border-color: var(--border-primary);
  color: var(--text-primary);
}

.feature-chip svg {
  width: 14px;
  height: 14px;
  color: var(--primary-400);
}

/* ── Page Section ───────────────────────────────────────────────── */
.section {
  padding: var(--space-8) var(--space-8);
}

.section-header {
  display: flex;
  flex-wrap: wrap; /* action buttons drop under the title on a phone instead of running off-screen */
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.section-title {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* ── Role Badge ─────────────────────────────────────────────────── */
.role-badge--fan     { background: rgba(28, 28, 30, 0.14); color: var(--text-primary); border: 1px solid rgba(28, 28, 30, 0.3); }
.role-badge--creator { background: rgba(28, 28, 30, 0.14); color: var(--text-primary); border: 1px solid rgba(28, 28, 30, 0.3); }
.role-badge--admin   { background: rgba(28, 28, 30, 0.14); color: var(--text-primary); border: 1px solid rgba(28, 28, 30, 0.3); }

/* ── Grid Layouts ───────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-min-width), 1fr)); gap: var(--space-5); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Two-column detail layouts (streaming/contests/battlesphere/concerts/
   watch-party detail views: media+info beside chat) — stack on phones and
   tablets so the sidebar column never gets squeezed unreadably narrow. */
@media (max-width: 900px) {
  .detail-split-grid { grid-template-columns: 1fr !important; }
}

/* ── Utility flex ───────────────────────────────────────────────── */
.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.items-center { align-items: center; }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }

/* ── Page Transition ────────────────────────────────────────────── */
.page-enter {
  animation: page-fade-in 260ms var(--ease-spring) forwards;
}

@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Dashboard Widget Grid ──────────────────────────────────────── */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  align-items: start;
}
.widget-wrapper { min-width: 0; }
.widget-wrapper--full   { grid-column: span 4; }
.widget-wrapper--half   { grid-column: span 2; }
.widget-wrapper--third  { grid-column: span 1; }
.widget-wrapper--quarter { grid-column: span 1; }

@media (max-width: 1024px) {
  .widget-grid { grid-template-columns: repeat(2, 1fr); }
  .widget-wrapper--full  { grid-column: span 2; }
  .widget-wrapper--half  { grid-column: span 1; }
  .widget-wrapper--third,
  .widget-wrapper--quarter { grid-column: span 1; }
}
@media (max-width: 640px) {
  .widget-grid { grid-template-columns: minmax(0, 1fr); } /* minmax(0,…) — plain 1fr lets one wide child stretch the column past a 320px screen */
  .widget-wrapper--full,
  .widget-wrapper--half,
  .widget-wrapper--third,
  .widget-wrapper--quarter { grid-column: span 1; }
}

/* ── Widget Cards ───────────────────────────────────────────────── */
.widget-card {
  min-height: 160px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-base);
}
.widget-card:hover { transform: translateY(-2px); }
.widget-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.widget-card__label {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}
.widget-card__coming-soon {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}
.widget-card--placeholder {
  background: var(--glass-bg);
}
.widget-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

/* Widget shimmer effect */
.widget-shimmer {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(28, 28, 30,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Dashboard Banner ───────────────────────────────────────────── */
.dashboard-tier-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid;
  font-size: 0.8125rem;
}
.dashboard-tier-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}


/* ── Enterprise Banner ──────────────────────────────────────────── */
.enterprise-banner {
  border-left: 3px solid var(--accent-300);
}

/* ── Role badges — enterprise ───────────────────────────────────── */
.role-badge--enterprise {
  background: rgba(28, 28, 30, 0.14);
  color: var(--accent-700);
  border: 1px solid rgba(28, 28, 30, 0.3);
}

/* ── Room Reaction Float (Contests, Battlesphere, Concerts, Watch Party) ── */
@keyframes reaction-float {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(0, -60px) scale(1.4); }
}

/* ── AI Studio tool cards ───────────────────────────────────────── */
.tool-card--active {
  border-color: var(--primary-500) !important;
  background: rgba(28, 28, 30, 0.06) !important;
  box-shadow: 0 0 0 1px var(--primary-500), var(--shadow-glow-sm);
}

/* ── Netflix-style horizontal carousel row ─────────────────────────── */
.carousel-row {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: var(--space-3);
  scrollbar-width: thin;
}
.carousel-row > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ── Hero banner ────────────────────────────────────────────────── */
.hero-banner {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  padding: var(--space-8);
  background: var(--gradient-mixed);
  box-shadow: var(--shadow-xl);
}
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15,23,42,0.55) 0%, rgba(15,23,42,0.05) 60%);
}
.hero-banner__content { position: relative; z-index: 1; color: #fff; max-width: 560px; }

/* ── Voice Assistant (floating mic) ────────────────────────────────── */
/* Inline in the topbar's icon row now (next to the notification bell),
   not a separate floating button — .btn-icon.topbar__quick-icon (already
   on this element) supplies the sizing/layout, this just supplies the
   explicit orange: the rest of the app stays grey/no-color, this one
   button is a deliberate, requested exception. */
.voice-btn {
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #FFB86B, #FF922B);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 146, 43, 0.35);
  transition: transform var(--transition-fast);
}
.voice-btn:hover { transform: scale(1.08); background: linear-gradient(135deg, #FFB86B, #FF922B); }
.voice-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.voice-btn--listening {
  background: var(--gradient-accent);
  animation: voice-pulse 1.2s ease-in-out infinite;
}
@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(28, 28, 30,0.5); }
  50%      { box-shadow: 0 0 0 10px rgba(28, 28, 30,0); }
}

/* ── Netflix-style browse row (VOD library) ─────────────────────────
   Horizontal-scrolling poster cards that scale up on hover, like Netflix's
   own browse rows — distinct from the TikTok-style vertical feed used for
   Home; a video library suits "browse and pick," not "swipe one at a time." */
.netflix-row {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scrollbar-width: thin;
}

.netflix-card {
  flex: 0 0 220px;
  cursor: pointer;
  transition: transform 200ms var(--ease-out), z-index 0s;
  transform-origin: center;
}

.netflix-card:hover {
  transform: scale(1.08);
  z-index: 2;
}

.netflix-card:active {
  transform: scale(1.03);
}

.netflix-card__poster {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #18181b, #000);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.netflix-card:hover .netflix-card__poster {
  box-shadow: var(--shadow-xl);
}

.netflix-card__duration {
  position: absolute;
  bottom: var(--space-2);
  right: var(--space-2);
}

.netflix-card__hover-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  color: #fff;
  opacity: 0;
  transition: opacity 150ms var(--ease-out);
}

.netflix-card:hover .netflix-card__hover-play,
.netflix-card:focus-visible .netflix-card__hover-play {
  opacity: 1;
}

.netflix-card__meta {
  padding: var(--space-2) 2px 0;
}

/* TikTok-Live-style floating heart burst — see _burstHeart() in modules/streaming/index.js */
@keyframes live-heart-float {
  0%   { transform: translate(0, 0) scale(0.6); opacity: 0; }
  15%  { transform: translate(-6px, -20px) scale(1.1); opacity: 1; }
  100% { transform: translate(-24px, -160px) scale(0.9); opacity: 0; }
}

/* ── TikTok-style Vertical Feed (Home) ──────────────────────────────
   One item fills the available viewport height; scroll/swipe snaps to
   the next, exactly like TikTok/Reels/Shorts. Colors stay this app's
   own — only the layout is copied. .home-page is a flex column so the
   live status bar (when present) takes only the room it needs and the
   feed fills the rest — no live streams, no bar, feed still fills 100%. */

.home-page {
  display: flex;
  flex-direction: column;
  /* vh first as a fallback for browsers/WebViews that don't support dvh at
     all (an unknown unit makes the whole declaration invalid, not just
     imprecise — without this, .home-page gets no height, its flex:1
     children never get a size to fill, and the grid/scroller falls back to
     normal document scroll instead of its own internal one, a real source
     of janky-feeling mobile scrolling on older Android WebViews). dvh
     second so it wins on anything that does support it (more accurate —
     accounts for the address bar showing/hiding). */
  height: calc(100vh - var(--topbar-height) - var(--bottom-nav-height));
  height: calc(100vh - var(--topbar-height) - var(--bottom-nav-height)); height: calc(100dvh - var(--topbar-height) - var(--bottom-nav-height));
}

.feed-scroller {
  flex: 1;
  min-height: 0;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.feed-item {
  position: relative;
  height: 100%;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  cursor: default;
}

.feed-item--live { cursor: pointer; }

.feed-item__bg {
  position: absolute;
  inset: 0;
  background: transparent;
}

.feed-item__bg video,
.feed-item__bg img {
  background: linear-gradient(135deg, #e5e7eb 0%, #dbeafe 48%, #cbd5e1 100%);
}

.feed-item__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-6);
  padding-right: 88px; /* keep clear of the right-side icon rail */
  padding-bottom: var(--space-10);
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.15) 40%, transparent 70%);
  pointer-events: none;
}

.feed-item__overlay > * { pointer-events: auto; }

.feed-item__author {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  cursor: pointer;
  width: fit-content;
}

.feed-item__caption {
  color: #fff;
  font-size: 0.9375rem;
  line-height: 1.4;
  max-width: 480px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.feed-item__mute-btn {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.feed-item__mute-btn svg { width: 18px; height: 18px; }

.feed-item__rail {
  position: absolute;
  right: var(--space-4);
  bottom: var(--space-10);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  z-index: 2;
}

.feed-item__rail-avatar {
  position: relative;
  margin-bottom: var(--space-2);
  cursor: pointer;
}

.feed-item__rail-avatar .avatar {
  border: 2px solid #fff;
}

.feed-item__follow-btn {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.feed-item__follow-btn[data-following="true"] { background: var(--success-500); }

.feed-item__rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
}

.feed-item__rail-icon {
  display: flex;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
  transition: transform 100ms var(--ease-spring);
}

.feed-item__rail-icon svg {
  width: 30px;
  height: 30px;
}

.post-icon {
  display: inline-flex;
  vertical-align: -5px;
}

.post-icon svg {
  width: 16px;
  height: 16px;
}

.feed-item__rail-btn:active .feed-item__rail-icon { transform: scale(1.3); }

/* Social feed — LinkedIn-style home page (condensed profile card, collapsed post composer, and the
   Like/Comment/Repost/Send action row). See modules/social/index.js. */
.li-profile-card,
.li-composer-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.li-composer-trigger__pill {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-4);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.li-repost-embed:hover { background: var(--bg-elevated); }

.li-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  padding: var(--space-2) 0;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.li-action-btn:hover { background: var(--bg-overlay); }
.li-action-btn .post-icon svg { width: 18px; height: 18px; }

.feed-item__rail-count {
  font-size: 0.75rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.feed-item__comments {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 60%;
  background: var(--bg-surface);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  box-shadow: var(--shadow-xl);
  z-index: 3;
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
  animation: page-fade-in 200ms var(--ease-spring) forwards;
}

.feed-item__comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.feed-item__comments-list {
  flex: 1;
  overflow-y: auto;
  margin-bottom: var(--space-3);
}

.feed-item__comment-form {
  display: flex;
  gap: var(--space-2);
}

@media (min-width: 768px) {
  /* width:100% is required here, not just max-width — .feed-scroller is a
     flex item (see .home-page) whose children are all position:absolute,
     so it has no normal-flow content to derive a shrink-to-fit width from;
     without an explicit width, the auto side-margins below collapse it to
     0 instead of centering it. Only Shorts uses .feed-scroller now (Home
     is .video-grid, full width) — .live-status-bar only ever appears
     above the Home grid, so it stays full width too, not capped to match
     a narrow column that isn't there anymore. */
  .feed-scroller { width: 100%; max-width: 480px; margin: 0 auto; }
}

/* ── YouTube-style category chips ────────────────────────────────────
   Sits above the live status bar / feed, same flex-shrink:0 pattern as
   .live-status-bar below so the feed still fills the rest of the column. */

.home-category-bar {
  display: flex;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-3);
  overflow-x: auto;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  scrollbar-width: none;
}

.home-category-bar::-webkit-scrollbar { display: none; }

.home-category-chip {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.5rem var(--space-4);
  border-radius: var(--radius-full);
  border: none;
  background: var(--bg-overlay);
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.home-category-chip:hover { background: var(--glass-bg-active); }

.home-category-chip.active {
  background: var(--text-primary);
  color: var(--text-inverse);
}

/* A thin rule between the groups in the chip row (Content | Community | genres) */
.home-category-divider {
  flex-shrink: 0;
  align-self: center;
  width: 1px;
  height: 20px;
  background: var(--border-subtle);
}

/* ── "Your custom feed" builder ──────────────────────────────────────
   Takes over the #feed area (see .feed-scroller--plain below) with a
   plain scrollable panel instead of the vertical snap feed. */

.feed-scroller--plain {
  scroll-snap-type: none;
  background: var(--bg-base);
  display: flex;
  justify-content: center;
}

.custom-feed-builder {
  width: 100%;
  max-width: 480px;
  padding: var(--space-6) var(--space-4) var(--space-10);
}

.custom-feed-builder__title {
  font-family: 'Times New Roman', Times, serif;
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1.2;
  margin: var(--space-6) 0 var(--space-5);
  color: var(--text-primary);
}

.custom-feed-builder__form {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--bg-overlay);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-4);
}

.custom-feed-builder__form input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9375rem;
  color: var(--text-primary);
  padding: 0.625rem 0;
}

.custom-feed-builder__form input::placeholder { color: var(--text-muted); }

.custom-feed-builder__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--text-primary);
  color: var(--text-inverse);
  cursor: pointer;
}

.custom-feed-builder__submit svg { width: 18px; height: 18px; }

.custom-feed-builder__disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: var(--space-3) 0 var(--space-6);
}

.custom-feed-builder__examples {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.custom-feed-builder__example {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.9375rem;
  color: var(--text-primary);
  cursor: pointer;
}

.custom-feed-builder__example:hover { color: var(--text-brand); }

.custom-feed-builder__example-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--text-muted);
}

/* ── Live status bar (Instagram/Snapchat-Stories-style) ─────────────
   Persistent, above the scrolling feed — every current live stream as a
   clickable bubble, not something you have to scroll into the feed to
   discover. */

.live-status-bar {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  overflow-x: auto;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.live-status-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  width: 68px;
}

.live-status-bar__ring {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, var(--error-500), var(--warning-400));
  position: relative;
}

/* Your own "Go Live" bubble — always leads, same as your own Story bubble on IG */
.live-status-bar__ring--add {
  background: var(--border-default);
}

.live-status-bar__plus {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-mixed);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
}

.live-status-bar__ring .avatar {
  width: 100%;
  height: 100%;
  border: 2px solid var(--bg-surface);
}

.live-status-bar__label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ── YouTube-style Home grid ──────────────────────────────────────────
   Home used to be the same full-bleed one-at-a-time vertical scroller as
   Shorts (TikTok's model). YouTube's actual home page is a browsable grid
   of thumbnail cards instead — this is that grid; Shorts (below/.feed-*)
   keeps the vertical scroller, since that part of YouTube Shorts really
   is a swipe-through player. */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6) var(--space-4);
  padding: var(--space-4);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.video-card {
  cursor: pointer;
}

/* a video grid inside an ordinary page (Music, Streaming) instead of Home's full-height scroller */
.video-grid--inline {
  padding: 0;
  overflow: visible;
  flex: none;
}

.video-card__thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, #e5e7eb 0%, #dbeafe 48%, #cbd5e1 100%);
}

.video-card__thumb-wrap img,
.video-card__thumb-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card__poster-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e5e7eb 0%, #dbeafe 48%, #cbd5e1 100%);
  color: rgba(15,23,42,0.9);
}

.video-card__poster-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  opacity: 0.9;
}
/* .video-card__play-icon is normally absolutely centered OVER a real thumbnail image (see below) — inside
   this fallback poster there's no image to overlay, just the icon stacked above the "Video" label in an
   ordinary flex column. Without this override, the absolute positioning pulled it out of that flex flow and
   dropped it dead-center on top of the label text, producing a garbled icon-over-text overlap. */
.video-card__poster-content .video-card__play-icon {
  position: static;
  transform: none;
}

.video-card__poster-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(15,23,42,0.82);
}

.video-card__frame-capture {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
  pointer-events: none;
}

.video-card__duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: var(--radius-xs);
}

/* Centered over a real captured video thumbnail — see _buildPostGridCard in modules/home/index.js. */
.video-card__play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  pointer-events: none;
}

/* The ONE live badge used everywhere in the app (thumbnail cards, the avatar "who's live" strip, a channel's
   row list, a live player overlay, a dashboard widget) — same red, same white dot, same size, same weight,
   no matter what it's pinned to. Only its POSITION varies by context (set via a modifier class/inline style
   at each call site), never its look. Used to be reinvented per module (.badge--live, .ch-live-badge, ad hoc
   inline styles) with different sizes/colors/dot-or-not — this is what YouTube's own LIVE badge looks like
   everywhere it appears, and this one now does too. */
.video-card__live-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--error-500);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
}
.video-card__live-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
}

/* On a circular avatar (the "who's live now" strip, a channel-row thumb) there's no thumbnail corner to pin
   to — centered under/over the circle is the only placement that makes sense. Same badge, different anchor. */
.video-card__live-badge--on-avatar {
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
}

/* A live PLAYER (not a static thumbnail) sometimes has its own on-screen controls sitting bottom-left (e.g.
   a contest's "Tap to unmute" button) — top-left keeps the same badge clear of them instead of overlapping. */
.video-card__live-badge--top-left {
  left: 8px;
  bottom: auto;
  top: 8px;
}

/* Same badge, same corner, same size — once a stream ends, it just isn't red/live anymore. */
.video-card__live-badge--ended {
  background: rgba(0, 0, 0, 0.7);
}
.video-card__live-badge--ended::before {
  display: none;
}

/* A plain-text list row (Battlesphere's battle list/header, a concert list) has no thumbnail corner to pin
   to at all — this sits inline next to the title like any other status badge, same red/white/dot, no absolute
   positioning. */
.video-card__live-badge--inline {
  position: static;
  display: inline-flex;
}

.video-card__meta {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.video-card__avatar { flex-shrink: 0; }

.video-card__text { flex: 1; min-width: 0; }

.video-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 2px;
}

.video-card__channel,
.video-card__stats {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Subscribe pill (YouTube's real button, not a "+" bubble) ────────── */
.subscribe-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--text-primary);
  color: var(--bg-surface);
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  white-space: nowrap;
}
.subscribe-pill[data-following="true"] {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
/* On a dark video background (the Shorts rail) the pill needs to stay
   legible regardless of the light/dark app theme underneath it. */
.subscribe-pill--on-dark {
  background: #fff;
  color: #0f0f0f;
}
.subscribe-pill--on-dark[data-following="true"] {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}

/* ── Watch overlay — clicking a Home grid card opens this, YouTube's own
   watch-page layout (player, then title/channel/actions/comments below)
   simplified to fit this app (no related-videos sidebar). ────────────── */
.watch-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: var(--bg-base);
  overflow-y: auto;
  animation: page-fade-in 150ms var(--ease-out) forwards;
}

.watch-overlay__header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.watch-overlay__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.watch-overlay__close:hover { background: var(--bg-elevated); }

.watch-overlay__player-wrap {
  width: 100%;
  background: #000;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.watch-overlay__player-wrap video,
.watch-overlay__player-wrap img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.watch-overlay__body {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  padding: var(--space-5) var(--space-4) var(--space-10);
}

.watch-overlay__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.watch-overlay__channel-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.watch-overlay__channel-name {
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.watch-overlay__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.watch-overlay__action-group {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.watch-overlay__action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  background: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
}
.watch-overlay__action-group .watch-overlay__action-btn:first-child { border-right: 1px solid var(--border-default); }
.watch-overlay__action-btn svg { width: 20px; height: 20px; }

.watch-overlay__caption {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: var(--space-5);
  white-space: pre-wrap;
}

.watch-overlay__comments-title {
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.watch-overlay__comment-form {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.watch-overlay__comments-list > div { margin-bottom: var(--space-3); }

/* ── Watch page (modules/_shared/watchPage.js) — the YouTube layout, used by videos, movies AND songs ── */

.watch-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  max-width: 1500px;
  margin: 0 auto;
  padding: var(--space-4);
}
@media (min-width: 1000px) {
  .watch-page { grid-template-columns: minmax(0, 1fr) 400px; }
}

.watch-page__main { min-width: 0; }

.watch-page__player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.watch-page__player > video { width: 100%; height: 100%; object-fit: contain; background: #000; }

.watch-page__below-player { margin-top: var(--space-3); }

.watch-page__title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin: var(--space-3) 0 var(--space-3);
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.watch-page__channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.watch-page__channel { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.watch-page__avatar { flex-shrink: 0; }
.watch-page__channel-text { min-width: 0; }
.watch-page__channel-name { font-weight: 600; color: var(--text-primary); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.watch-page__subs { font-size: 0.75rem; color: var(--text-muted); }

.watch-page__pills { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }

.watch-pill-group { display: inline-flex; align-items: center; background: var(--bg-elevated); border-radius: var(--radius-full); overflow: hidden; }
.watch-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border: none; background: none; color: var(--text-primary);
  font-size: 0.8125rem; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.watch-pill:hover { background: var(--bg-overlay); }
.watch-pill svg { width: 20px; height: 20px; flex-shrink: 0; }
.watch-pill-group .watch-pill:first-child { border-right: 1px solid var(--border-default); }
.watch-pill--solo { background: var(--bg-elevated); border-radius: var(--radius-full); }
.watch-pill--icon { padding: 8px 10px; }
.watch-pill[data-on="true"] { color: var(--primary-400, var(--text-primary)); }

.watch-menu { position: relative; }
.watch-menu__list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: var(--z-dropdown, 50);
  min-width: 220px; padding: var(--space-2) 0;
  background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.watch-menu__list[hidden] { display: none; }
.watch-menu__item {
  display: block; width: 100%; text-align: left;
  padding: 10px var(--space-4); border: none; background: none;
  color: var(--text-primary); font-size: 0.875rem; cursor: pointer;
}
.watch-menu__item:hover { background: var(--bg-elevated); }

.watch-page__description {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
  font-size: 0.875rem;
  color: var(--text-primary);
}
.watch-page__description-meta { font-weight: 600; margin-bottom: 4px; }
.watch-page__description-details { color: var(--text-secondary); margin-bottom: 4px; }
.watch-page__description-text {
  white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.watch-page__description[data-open="true"] .watch-page__description-text { display: block; -webkit-line-clamp: unset; overflow: visible; }
.watch-page__more { border: none; background: none; color: var(--text-muted); font-weight: 600; font-size: 0.8125rem; cursor: pointer; padding: 4px 0 0; }
.watch-page__more[hidden] { display: none; }

.watch-comments__head { display: flex; align-items: center; gap: var(--space-5); margin-bottom: var(--space-4); flex-wrap: wrap; }
.watch-comments__count { font-size: 1.125rem; font-weight: 700; margin: 0; }
.watch-comments__sort { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); }
.watch-comments__sort select { width: auto; padding: 4px 8px; font-size: 0.8125rem; }
.watch-comments__form { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.watch-comments__form .form-input { flex: 1; min-width: 0; }
.watch-comments__me { flex-shrink: 0; }
.watch-comments__list { display: flex; flex-direction: column; gap: var(--space-4); }
.watch-comment { display: flex; gap: var(--space-3); }
.watch-comment__avatar { flex-shrink: 0; }
.watch-comment__body { min-width: 0; }
.watch-comment__author { font-weight: 600; font-size: 0.8125rem; }
.watch-comment__time { font-size: 0.75rem; color: var(--text-muted); margin-left: 4px; }
.watch-comment__text { font-size: 0.875rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* right rail — "Next", filter chips, related list */
.watch-page__rail { min-width: 0; }
.watch-rail__label { font-weight: 700; font-size: 0.875rem; margin-bottom: var(--space-2); }
.watch-rail__next { margin-bottom: var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px solid var(--border-subtle); }
.watch-rail__chips { display: flex; gap: var(--space-2); overflow-x: auto; margin-bottom: var(--space-3); scrollbar-width: none; }
.watch-rail__chips::-webkit-scrollbar { display: none; }
.watch-rail__list { display: flex; flex-direction: column; gap: var(--space-3); }
.watch-rail__empty { padding: var(--space-4) 0; }

.watch-rail-card { display: flex; gap: var(--space-3); color: inherit; text-decoration: none; cursor: pointer; }
.watch-rail-card__thumb {
  position: relative; flex: 0 0 168px; aspect-ratio: 16 / 9;
  border-radius: var(--radius-md); overflow: hidden; background: #000;
  display: flex; align-items: center; justify-content: center;
}
.watch-rail-card__icon { display: inline-flex; width: 28px; height: 28px; color: rgba(255,255,255,0.7); }
.watch-rail-card__icon svg { width: 100%; height: 100%; }
.watch-rail-card__text { min-width: 0; flex: 1; }
.watch-rail-card__title {
  font-size: 0.875rem; font-weight: 600; line-height: 1.3; color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 2px;
}
.watch-rail-card__meta { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* a song's player stage — same 16:9 box as a video */
.watch-audio { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1f1147, #0b0b16); }
.watch-audio__art { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(28px) brightness(0.55); transform: scale(1.15); }
.watch-audio__cover { position: relative; height: 62%; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,0.5); margin-bottom: 44px; background: linear-gradient(135deg, #EC4899, #7C3AED); display: flex; align-items: center; justify-content: center; }
.watch-audio__cover img { width: 100%; height: 100%; object-fit: cover; }
.watch-audio__note { width: 42%; color: rgba(255,255,255,0.8); }
.watch-audio__controls { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 44px; }
.watch-audio__missing { position: absolute; bottom: var(--space-4); color: rgba(255,255,255,0.7); font-size: 0.875rem; }

@media (max-width: 999px) {
  .watch-page { padding: 0 0 var(--space-6); gap: var(--space-4); }
  .watch-page__player { border-radius: 0; }
  .watch-page__main > *:not(.watch-page__player) { margin-left: var(--space-4); margin-right: var(--space-4); }
  .watch-page__rail { padding: 0 var(--space-4); }
}

/* ── Shorts branding badge — top-left, immersive player only ─────────── */
.shorts-badge {
  position: fixed;
  top: calc(var(--topbar-height) + var(--space-3));
  left: var(--space-4);
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 1.0625rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.shorts-badge svg { width: 24px; height: 24px; }

/* ── Calendar icon on every scheduling input, app-wide ────────────────
   A single global rule instead of editing every module's own "schedule
   for" form (Concerts, Movies, Podcast, Battlesphere, Sports, Streaming,
   AI Studio, ...) — a consistent calendar glyph on the left makes every
   date+time picker in the app read the same way. Left side only: the
   browser's own native picker control already sits on the right of a
   datetime-local input and still works exactly as before. */
input[type="datetime-local"].form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23909090' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 18px 18px;
  padding-left: 40px;
}

/* ── Owner controls (hide / delete dialogs, My content) ─────────────────── */
.cc-dialog {
  position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center;
  padding: var(--space-4); background: rgba(0, 0, 0, 0.55);
}
.cc-dialog__card {
  width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto;
  background: var(--bg-surface); color: var(--text-primary); border-radius: var(--radius-lg);
  padding: var(--space-5); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}
.cc-dialog__title { font-size: 1.125rem; font-weight: 700; margin: 0 0 var(--space-3); }
.cc-dialog__option { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) 0; cursor: pointer; }
.cc-dialog__option input { margin-top: 4px; }
.cc-dialog__actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-4); }
.cc-dialog__error { margin-top: var(--space-3); }

.mc-row { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) 0; border-top: 1px solid var(--border-subtle); }
.mc-row:first-child { border-top: none; }
.mc-thumb { flex: 0 0 96px; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.75rem; }
.mc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mc-main { flex: 1; min-width: 0; }
.mc-title { font-weight: 600; font-size: 0.9375rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.mc-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-2); align-items: center; }
.mc-notice { padding: var(--space-3); border-radius: var(--radius-md); background: var(--bg-elevated); margin-bottom: var(--space-2); font-size: 0.875rem; }
.mc-notice--unread { border-left: 3px solid var(--primary-500, #2563EB); }
@media (max-width: 480px) { .mc-thumb { flex-basis: 72px; } }

/* ── Channel page (YouTube-style) ───────────────────────────────────────── */
.ch-page { max-width: 1000px; margin: 0 auto; padding: 0 var(--space-4) var(--space-8); position: relative; }
.ch-back { position: absolute; top: var(--space-2); left: var(--space-6); z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(0,0,0,0.45); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ch-banner { margin: 0 calc(-1 * var(--space-4)) 0; aspect-ratio: 16 / 5; max-height: 220px; border-radius: 0; background: var(--gradient-mixed, linear-gradient(135deg,#2563EB,#22C55E)) center / cover no-repeat; }
.ch-header { display: flex; gap: var(--space-4); align-items: flex-end; margin-top: 0; position: relative; }
.ch-avatar { flex: 0 0 auto; margin-top: -56px; position: relative; z-index: 1; }
.ch-avatar .avatar { width: 112px; height: 112px; font-size: 2.25rem; border: 3px solid var(--bg-base); }
.ch-info { min-width: 0; }
.ch-name { font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin: 0 0 4px; word-break: break-word; }
.ch-meta { font-size: 0.875rem; color: var(--text-muted); margin-top: 2px; }
.ch-handle { color: var(--text-primary); font-weight: 500; }
.ch-bio { margin-top: var(--space-4); font-size: 0.9375rem; color: var(--text-secondary, var(--text-muted)); }
.ch-bio__text { white-space: pre-wrap; word-break: break-word; }
.ch-bio__text--clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch-bio__more { background: none; border: none; padding: 0; margin-top: 2px; color: var(--text-primary); font-weight: 600; cursor: pointer; font-size: 0.875rem; }
.ch-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-4); }
.ch-pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 var(--space-4); border-radius: 18px; border: none; background: var(--bg-elevated); color: var(--text-primary); font-size: 0.875rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ch-pill--primary { background: var(--text-primary); color: var(--bg-surface, #fff); }
.ch-pill:disabled { opacity: 0.6; }
.ch-tabs { display: flex; gap: var(--space-5); margin-top: var(--space-5); border-bottom: 1px solid var(--border-subtle); overflow-x: auto; scrollbar-width: none; }
.ch-tabs::-webkit-scrollbar { display: none; }
.ch-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: var(--space-3) 0; font-size: 0.9375rem; font-weight: 600; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.ch-tab--active { color: var(--text-primary); border-bottom-color: var(--text-primary); }
.ch-content { padding-top: var(--space-4); }
.ch-empty { color: var(--text-muted); padding: var(--space-6) 0; }
.ch-section { margin-bottom: var(--space-6); }
.ch-section__title { background: none; border: none; padding: 0; margin-bottom: var(--space-3); font-size: 1.25rem; font-weight: 700; color: var(--text-primary); cursor: pointer; }
.ch-videos { display: flex; flex-direction: column; gap: var(--space-4); }
.ch-video { display: flex; gap: var(--space-3); align-items: flex-start; cursor: pointer; margin-bottom: var(--space-4); }
.ch-videos .ch-video { margin-bottom: 0; }
.ch-video__thumb { position: relative; flex: 0 0 42%; max-width: 190px; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; background: linear-gradient(135deg,#e5e7eb,#dbeafe); }
.ch-video__thumb img, .ch-video__thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-video__thumb--music { background: linear-gradient(135deg,#fce7f3,#e9d5ff); display: flex; align-items: center; justify-content: center; color: rgba(15,23,42,0.6); font-size: 1.75rem; }
.ch-video__thumb--live { background: linear-gradient(135deg,#fecaca,#fca5a5); }
.ch-duration { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,0.8); color: #fff; font-size: 0.75rem; font-weight: 600; padding: 1px 5px; border-radius: 4px; }
.ch-video__text { flex: 1; min-width: 0; }
.ch-video__title { font-size: 1rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.ch-video__meta { font-size: 0.8125rem; color: var(--text-muted); margin-top: 4px; }
.ch-video__more { background: none; border: none; color: var(--text-primary); cursor: pointer; padding: 4px; border-radius: 50%; flex: 0 0 auto; }
.ch-shorts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--space-3); }
.ch-shorts--scroll { display: flex; overflow-x: auto; gap: var(--space-3); padding-bottom: var(--space-2); scrollbar-width: none; }
.ch-shorts--scroll .ch-short { flex: 0 0 140px; }
.ch-short { position: relative; aspect-ratio: 9 / 16; border-radius: var(--radius-md); overflow: hidden; background: linear-gradient(135deg,#e5e7eb,#dbeafe); cursor: pointer; }
.ch-short video, .ch-short img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-short__title { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 8px 8px; color: #fff; font-size: 0.8125rem; font-weight: 600; background: linear-gradient(transparent, rgba(0,0,0,0.75)); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch-post { margin-bottom: var(--space-3); }
.ch-post__img { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius-md); margin-bottom: var(--space-2); }
.ch-about { display: flex; flex-direction: column; gap: var(--space-3); max-width: 640px; }
.ch-about__row { font-size: 0.9375rem; }
.video-card__avatar[data-channel-id] .avatar, .video-card__avatar .avatar { flex-shrink: 0; }
@media (min-width: 720px) {
  .ch-avatar { margin-top: -75px; }
  .ch-avatar .avatar { width: 160px; height: 160px; font-size: 3.125rem; }
  .ch-name { font-size: 2rem; }
  .ch-videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5) var(--space-4); }
  .ch-videos .ch-video { flex-direction: column; }
  .ch-videos .ch-video__thumb { flex: none; max-width: none; width: 100%; }
  .ch-back { left: var(--space-6); }
}

/* ── WhatsApp-style chat (DM) ───────────────────────────────────────────
   GrooVVee colours: deep-blue header, pale-blue wallpaper, white incoming / blue outgoing bubbles, with the logo's yellow and orange for accents (online dot, read ticks, call icons, mic/send, unread badge) with a tail on the
   first bubble of each run, times + ticks inside the bubble, "TODAY" date chips, a white pill input and a round
   orange mic/send button. Scoped to .wa-chat so the group/room chats keep their own look. */
.dm-chat-pane.wa-chat {
  background-color: #F4F2EE;
  background-image: none; /* LinkedIn's plain warm-grey message area (no wallpaper) */
  background-size: 220px 220px;
}
.wa-chat .dm-chat-pane__header { display: none; }

.wa-header {
  display: flex; align-items: center; gap: 2px;
  height: 56px; padding: 0 4px; flex-shrink: 0;
  background: #fff; color: rgba(0, 0, 0, 0.9); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08); position: relative; z-index: 2;
}
.wa-back {
  display: none; width: 40px; height: 40px; border: none; background: transparent; color: rgba(0, 0, 0, 0.75);
  border-radius: 50%; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; color: rgba(0, 0, 0, 0.75);
}
.wa-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 0 4px; }
.wa-avatar { position: relative; flex-shrink: 0; display: inline-flex; }
.wa-avatar .avatar { width: 40px; height: 40px; font-size: 0.9rem; }
.wa-avatar-dot { position: absolute; bottom: 0; right: 0; width: 11px; height: 11px; background: #01754F; border-radius: 50%; border: 2px solid #fff; }
.wa-name { font-size: 18px; font-weight: 500; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-status { font-size: 13px; line-height: 1.2; color: rgba(0, 0, 0, 0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-actions { display: flex; align-items: center; flex-shrink: 0; position: relative; }
.wa-icon-btn {
  width: 42px; height: 42px; border: none; background: transparent; color: #111; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.wa-icon-btn:active { background: #FFFBCC; }
.wa-menu {
  position: absolute; right: 4px; top: 48px; z-index: 5; min-width: 190px; padding: 8px 0;
  background: #fff; color: rgba(0, 0, 0, 0.9); border-radius: 6px; box-shadow: 0 2px 12px rgba(11, 20, 26, 0.3);
}
.wa-menu[hidden] { display: none; }
.wa-menu button { display: block; width: 100%; text-align: left; padding: 12px 18px; border: none; background: none; font-size: 16px; color: rgba(0, 0, 0, 0.9); cursor: pointer; }
.wa-menu button:hover { background: #FFFBCC; }

.wa-list {
  flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column;
  justify-content: safe flex-end; padding: 8px 10px; gap: 2px; overscroll-behavior: contain;
}
.wa-date { align-self: center; margin: 10px 0 6px; padding: 5px 14px; background: #fff; color: rgba(0, 0, 0, 0.6); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 999px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); flex-shrink: 0; }
.wa-empty { align-self: center; margin: 24px 0; padding: 6px 14px; background: #fff; color: rgba(0, 0, 0, 0.6); font-size: 13px; border-radius: 999px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.wa-row { display: flex; flex-shrink: 0; }
.wa-row--out { justify-content: flex-end; }
.wa-row--first { margin-top: 6px; }

.wa-bubble {
  position: relative; max-width: 80%; padding: 7px 10px 8px 11px; border-radius: 16px;
  font-size: 15px; line-height: 1.35; color: rgba(0, 0, 0, 0.9); overflow-wrap: anywhere; white-space: pre-wrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.wa-bubble--in { background: #fff; }
.wa-bubble--out { background: #FCF600; color: #111; } /* lemon yellow, black text */
.wa-bubble--in.wa-bubble--tail { border-top-left-radius: 4px; }
.wa-bubble--out.wa-bubble--tail { border-top-right-radius: 4px; }
.wa-bubble--tail::before { content: ''; position: absolute; top: 0; width: 8px; height: 13px; }
.wa-bubble--in.wa-bubble--tail::before { left: -8px; background: #fff; clip-path: polygon(100% 0, 0 0, 100% 100%); }
.wa-bubble--out.wa-bubble--tail::before { right: -8px; background: #FCF600; clip-path: polygon(0 0, 100% 0, 0 100%); }
.wa-time { float: right; margin: 7px 0 -3px 10px; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; line-height: 1; color: rgba(0, 0, 0, 0.6); white-space: nowrap; user-select: none; }
.wa-tick { display: inline-flex; width: 16px; height: 11px; }
.wa-bubble--out .wa-time { color: rgba(0, 0, 0, 0.55); }
.wa-bubble--out .wa-tick--read { color: #111; }
.wa-tick--read { color: #111; }
.wa-media { margin: -3px -5px 4px; border-radius: 6px; overflow: hidden; max-width: 260px; }
.wa-media img, .wa-media video { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.wa-bubble--voice { display: flex; align-items: center; gap: 8px; min-width: 210px; padding-right: 10px; }
.wa-sticker { font-size: 3.25rem; line-height: 1.1; padding: 0 4px; }
.wa-sticker-time { font-size: 11px; color: rgba(0, 0, 0, 0.6); text-align: right; padding: 0 6px; }

.wa-call {
  align-self: center; display: flex; align-items: center; gap: 12px; margin: 6px 0; padding: 8px 14px 8px 10px;
  background: #fff; border-radius: 14px; border-left: 4px solid #FCF600; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); max-width: 86%; flex-shrink: 0;
}
.wa-call__icon { width: 38px; height: 38px; border-radius: 50%; background: #FFFBCC; color: #111; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wa-call--missed { border-left-color: #CB112D; }
.wa-call--missed .wa-call__icon { background: #FCE8EA; color: #CB112D; }
.wa-call__title { font-size: 15px; color: rgba(0, 0, 0, 0.9); line-height: 1.3; }
.wa-call--missed .wa-call__title { color: #CB112D; }
.wa-call__sub { font-size: 13px; color: rgba(0, 0, 0, 0.6); line-height: 1.3; }
.wa-call__time { font-size: 11px; color: rgba(0, 0, 0, 0.6); align-self: flex-end; }

/* input bar */
.wa-input { flex-shrink: 0; padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px)); position: relative; }
.wa-input__row { display: flex; align-items: flex-end; gap: 6px; }
.wa-pill { flex: 1; min-width: 0; min-height: 48px; display: flex; align-items: flex-end; gap: 0; padding: 0 4px; background: #fff; border-radius: 24px; border: 1.5px solid rgba(0, 0, 0, 0.15); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }
.wa-pill:focus-within { border-color: #E0D600; }
.wa-pill__btn { width: 40px; height: 44px; border: none; background: transparent; color: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; border-radius: 50%; }
.wa-pill__input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 16px; color: rgba(0, 0, 0, 0.9); padding: 10px 2px; }
.wa-pill__input::placeholder { color: rgba(0, 0, 0, 0.6); }
.wa-fab { width: 48px; height: 48px; border: none; border-radius: 50%; background: #FCF600; color: #111; display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.wa-fab[hidden] { display: none; }
.wa-fab.rci-mic-btn--recording { background: #CB112D; }
.wa-panel { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 6px; padding: 8px; background: #fff; border-radius: 12px; box-shadow: 0 1px 2px rgba(11, 20, 26, 0.2); max-height: 220px; overflow-y: auto; }
.wa-panel[hidden] { display: none; }
.wa-panel__label { width: 100%; font-size: 12px; color: rgba(0, 0, 0, 0.6); text-transform: uppercase; padding: 2px 4px; }

/* phone: the open chat is a full screen, like WhatsApp — no top bar, no bottom tabs */
@media (max-width: 767px) {
  .dm-layout--chat-open { position: fixed; inset: 0; z-index: var(--z-modal, 300); height: 100vh; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; }
  .dm-layout--chat-open .dm-chat-pane { width: 100%; }
  .wa-back { display: flex; }
  .wa-bubble { font-size: 16px; }
}
/* .page-enter leaves a transform on #main-content, which would trap position:fixed inside it */
#main-content:has(.dm-layout--chat-open),
.page-enter:has(.dm-layout--chat-open) { transform: none !important; animation: none !important; }
@media (min-width: 768px) {
  .wa-bubble { font-size: 14.5px; }
  .wa-pill__input { font-size: 15px; }
}

/* conversation list, WhatsApp-style */
.dm-conv-item { gap: 14px; padding: 10px 16px; }
.dm-conv-item .avatar { width: 49px; height: 49px; font-size: 1rem; }
.dm-conv-item__name { font-size: 1.0625rem; font-weight: 500; }
.dm-conv-item__preview { font-size: 0.875rem; margin-top: 2px; }
.dm-conv-item__time { font-size: 0.75rem; }
.dm-conv-item__meta { gap: 5px; }
.dm-conv-item__badge { min-width: 20px; height: 20px; padding: 0 5px; background: #FCF600; color: #111; font-weight: 700; font-size: 0.75rem; }
.dm-conv-item__preview--unread { color: var(--text-primary); font-weight: 600; }
.dm-conv-item .avatar { border: none; }
.dm-conv-item:hover { background: #eef4ff; }
.dm-conv-item__time { color: var(--text-muted); }

/* ── Live, the YouTube way ───────────────────────────────────────────────
   Watch page: 16:9 player, title, channel row with Subscribe, Like / Share, "N watching now" box, and the live chat
   in its own column on the right (under the video on a phone, where the whole page is full screen). Live home: the
   same video cards as the rest of the app with a red LIVE badge. */
.avatar--xs { width: 24px; height: 24px; font-size: 0.625rem; border-width: 0; }

.yt-live-home__heading { font-size: 1.25rem; font-weight: 700; margin: var(--space-6) 0 var(--space-4); }
.yt-live-thumb { background: linear-gradient(135deg, #e5e7eb, #dbeafe); display: flex; align-items: center; justify-content: center; color: rgba(15, 23, 42, 0.7); }
.yt-live-thumb__art { display: flex; align-items: center; justify-content: center; }
.yt-live-thumb__art .avatar { width: 72px; height: 72px; font-size: 1.5rem; border: 2px solid rgba(15, 23, 42, 0.15); }

.yt-live { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; max-width: 1500px; margin: 0 auto; padding: 16px 24px 32px; }
.yt-live__main { min-width: 0; }
.yt-live__player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.yt-live__media { position: absolute; inset: 0; }
.yt-live__media video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.yt-live__placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); color: rgba(255, 255, 255, 0.6); }
.yt-live__overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); background: rgba(0, 0, 0, 0.75); color: #fff; z-index: 3; }
.yt-live__overlay[hidden] { display: none; }
.yt-live__unmute { position: absolute; bottom: 44px; left: 12px; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-full); border: none; background: rgba(0, 0, 0, 0.65); color: #fff; cursor: pointer; font-size: 0.8125rem; }
.yt-live__unmute[hidden] { display: none; }
.yt-live__back { position: absolute; top: 8px; left: 8px; z-index: 4; width: 36px; height: 36px; border: none; border-radius: 50%; background: rgba(0, 0, 0, 0.5); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.yt-live__back svg { width: 20px; height: 20px; }
[data-live-badge] { z-index: 2; }

.yt-live__title { font-size: 1.25rem; font-weight: 600; line-height: 1.3; margin: 12px 0 8px; flex: 1; word-break: break-word; }
.yt-live__meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 12px; }
.yt-live__channel { display: flex; align-items: center; gap: 12px; min-width: 0; }
.yt-live__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.yt-live__desc { margin-bottom: 12px; }
.yt-live__reactions { margin-bottom: 8px; }
.yt-live__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; background: var(--bg-elevated); border-radius: 12px; margin-top: 12px; }

.yt-live__chat { display: flex; flex-direction: column; height: min(calc(100vh - 110px), 720px); min-height: 360px; position: sticky; top: 16px; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 12px; overflow: hidden; }
.yt-live__chat-head { padding: 12px 16px; font-weight: 600; font-size: 0.9375rem; border-bottom: 1px solid var(--border-default); flex-shrink: 0; }
.yt-live__chat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; justify-content: safe flex-end; gap: 2px; overscroll-behavior: contain; }
.yt-live__chat-empty { color: var(--text-muted); font-size: 0.8125rem; text-align: center; padding: var(--space-4); }
.yt-live__chat-foot { flex-shrink: 0; border-top: 1px solid var(--border-default); padding: 8px 12px 12px; }

.yt-chat-msg { display: flex; gap: 12px; align-items: flex-start; padding: 4px 0; font-size: 0.8125rem; line-height: 1.45; flex-shrink: 0; }
.yt-chat-msg__avatar { flex-shrink: 0; margin-top: 1px; }
.yt-chat-msg__body { min-width: 0; overflow-wrap: anywhere; }
.yt-chat-msg__name { color: var(--text-muted); font-weight: 500; margin-right: 8px; }
.yt-chat-msg--host .yt-chat-msg__name { background: #FCF600; color: #111; padding: 1px 8px; border-radius: 10px; }
.yt-chat-msg__text { color: var(--text-primary); }
.yt-chat-msg__sticker { font-size: 1.75rem; line-height: 1.2; }
.yt-chat-msg__media { margin-top: 4px; max-width: 200px; border-radius: 8px; overflow: hidden; }

.yt-chat-input__who { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; font-weight: 500; margin-bottom: 8px; color: var(--text-secondary, var(--text-muted)); }
.yt-chat-input__row { display: flex; align-items: center; gap: 6px; }
/* A light gray pill, not an underlined field — matches the mobile chat bar this was modeled on: a rounded
   bar with a single dark circular button sitting on its end, not a bare line under the text. */
.yt-chat-input__field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; background: #f1f3f4; border-radius: 9999px; padding: 2px 2px 2px 14px; }
.yt-chat-input__field input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 0.875rem; color: var(--text-primary); padding: 10px 2px; }
.yt-chat-input__icon, .yt-chat-input__send {
  width: 36px; height: 36px; border: none; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative;
  background: #111; color: #f1f3f4;
}
/* The small green dot on the button itself — the same "you're online" presence dot used elsewhere in the
   app, just anchored to the chat bar's own button instead of an avatar. */
.yt-chat-input__icon::after {
  content: ''; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--success-500, #22c55e); border: 2px solid var(--bg-surface, #fff);
}
.yt-chat-input__send { display: none; }
.yt-chat-input__send--on { display: flex; }

@media (max-width: 1000px) and (min-width: 768px) {
  .yt-live { grid-template-columns: 1fr; }
  .yt-live__chat { position: static; height: 480px; }
}

/* phone: the whole page is a full screen — player on top, a compact info area, the chat filling the rest */
@media (max-width: 767px) {
  .yt-live { position: fixed; inset: 0; z-index: var(--z-modal, 300); height: 100vh; height: 100vh; height: 100dvh; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; background: var(--bg-base, #fff); overflow: hidden; }
  .yt-live__main { display: contents; }
  .yt-live__player { flex: 0 0 auto; width: 100%; border-radius: 0; }
  .yt-live__info { flex: 0 1 auto; max-height: 34vh; max-height: 34vh; max-height: 34dvh; overflow-y: auto; padding: 0 12px; }
  .yt-live__title { font-size: 1.0625rem; margin: 10px 0 6px; }
  .yt-live__desc { padding: 8px 12px; margin-bottom: 8px; }
  .yt-live__desc #stream-desc-display:empty { display: none; }
  .yt-live__chat { flex: 1 1 0; min-height: 0; height: auto; position: static; border: none; border-top: 1px solid var(--border-default); border-radius: 0; }
  .yt-live__chat-head { padding: 8px 12px; }
  .yt-live__chat-foot { padding: 6px 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
}
#main-content:has(.yt-live), .page-enter:has(.yt-live) { transform: none !important; animation: none !important; }

.yt-live__chat-head { position: relative; display: flex; align-items: center; }
.yt-live__chat-mode { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; padding: 0; font: inherit; font-weight: 600; color: var(--text-primary); cursor: pointer; }
.yt-live__chat-menu { position: absolute; left: 12px; top: 100%; z-index: 6; min-width: 260px; padding: 6px 0; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
.yt-live__chat-menu[hidden] { display: none; }
.yt-live__chat-menu button { display: block; width: 100%; text-align: left; padding: 10px 16px; border: none; background: none; color: var(--text-primary); cursor: pointer; }
.yt-live__chat-menu button:hover { background: var(--bg-elevated); }
.yt-live__chat-menu b { display: block; font-weight: 600; font-size: 0.875rem; }
.yt-live__chat-menu small { display: block; color: var(--text-muted); font-size: 0.75rem; margin-top: 1px; }
.yt-live-thumb > img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Live rewind bar and Super Chat ─────────────────────────────────────── */
.yt-live__media video { position: absolute; inset: 0; }
.yt-dvr { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 22px 12px 8px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.72)); }
.yt-dvr[hidden] { display: none; }
.yt-dvr button { background: none; border: none; color: #fff; cursor: pointer; display: inline-flex; align-items: center; padding: 4px; }
.yt-dvr input[type="range"] { flex: 1; min-width: 0; accent-color: #ff0000; height: 4px; cursor: pointer; }
.yt-dvr__behind { font-size: 0.75rem; min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.yt-dvr__live { font-size: 0.75rem !important; font-weight: 700; letter-spacing: 0.03em; gap: 6px; }
.yt-dvr__live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #9e9e9e; }
.yt-dvr__live--on::before { background: #ff0000; }
.yt-live__player--dvr [data-live-badge] { display: none; }
.yt-live__player--dvr .yt-live__unmute { bottom: 58px; }

.yt-superchat-btn { color: #f9a825; }
.yt-superchat-btn svg { width: 18px; height: 18px; }
.yt-chat-input__star { color: #f9a825; }
.yt-superchat { margin: 6px 0; border-radius: 8px; overflow: hidden; background: var(--sc-body); color: #fff; flex-shrink: 0; }
.yt-superchat__head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--sc-head); }
.yt-superchat__name { font-size: 0.75rem; opacity: 0.85; }
.yt-superchat__amount { font-size: 0.9375rem; font-weight: 700; }
.yt-superchat__body { padding: 8px 12px 10px; font-size: 0.875rem; word-break: break-word; }
.yt-live__pins { display: flex; gap: 8px; overflow-x: auto; padding: 8px 12px; border-bottom: 1px solid var(--border-default); flex-shrink: 0; }
.yt-live__pins[hidden] { display: none; }
.yt-pin { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 4px 10px 4px 4px; border-radius: 16px; background: var(--sc-body); color: #fff; font-size: 0.75rem; }
.yt-pin__name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt-sc-tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: var(--space-3); }
.yt-sc-tier { border: 2px solid transparent; border-radius: 10px; padding: 10px 4px; background: var(--sc-head); color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.yt-sc-tier b { font-size: 1rem; }
.yt-sc-tier small { font-size: 0.6875rem; opacity: 0.85; }
.yt-sc-tier:disabled { opacity: 0.35; cursor: not-allowed; }
.yt-sc-tier--on { border-color: var(--text-primary); box-shadow: 0 0 0 2px var(--bg-surface) inset; }

/* ── Podcasts, the YouTube way ──────────────────────────────────────────── */
.pod-cover { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, #6d28d9, #db2777); display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.92); }
.pod-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pod-cover__mark { font-size: 2.75rem; font-weight: 800; line-height: 1; }
.pod-shows { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px 16px; margin-bottom: var(--space-8); }
.pod-show-card { cursor: pointer; min-width: 0; }
.pod-show-card__title { font-weight: 600; font-size: 0.9375rem; margin-top: 8px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pod-show-card__meta { font-size: 0.8125rem; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pod-thumb { position: relative; width: 100%; height: 100%; overflow: hidden; background: linear-gradient(135deg,#ede9fe,#c7d2fe); display: flex; align-items: center; justify-content: center; }
.pod-thumb__bg { position: absolute; inset: -20px; background-size: cover; background-position: center; filter: blur(18px) brightness(0.65); }
.pod-thumb .pod-thumb__cover { position: relative; height: 80%; width: auto; aspect-ratio: 1; border-radius: 8px; }
.pod-thumb .pod-cover__mark { font-size: 1.75rem; }
.pod-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pod-badge { display: inline-block; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.03em; padding: 2px 6px; border-radius: 4px; background: var(--bg-elevated); color: var(--text-primary); }
.pod-badge--soon { position: absolute; left: 8px; bottom: 8px; background: rgba(0, 0, 0, 0.75); color: #fff; }
.pod-badge--paid { background: #f9a825; color: #000; vertical-align: middle; }

.pod-show { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; max-width: 1100px; margin: 0 auto; padding: var(--space-4); }
.pod-show__side { position: sticky; top: 16px; align-self: start; }
.pod-show__cover { width: 100%; }
.pod-show__title { font-size: 1.5rem; font-weight: 700; line-height: 1.2; margin: 14px 0 8px; word-break: break-word; }
.pod-show__host { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; margin-bottom: 6px; }
.pod-show__stats { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 14px; }
.pod-show__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.pod-show__buttons .ch-pill svg { flex-shrink: 0; }
.pod-show__desc { margin-top: 14px; font-size: 0.875rem; color: var(--text-secondary, var(--text-muted)); }
.pod-show__heading { font-size: 1.25rem; font-weight: 700; margin: 0 0 8px; }
.pod-manage { border: 1px solid var(--border-default); border-radius: 12px; margin-bottom: var(--space-5); background: var(--bg-surface); }
.pod-manage > summary { padding: 12px 16px; font-weight: 600; cursor: pointer; }
.pod-manage__body { padding: 0 16px 16px; }

.pod-ep { display: flex; gap: 16px; padding: 12px 0; cursor: pointer; border-bottom: 1px solid var(--border-subtle); }
.pod-ep:last-child { border-bottom: none; }
.pod-ep__thumb { flex: 0 0 200px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; position: relative; }
.pod-ep__body { flex: 1; min-width: 0; }
.pod-ep__title { font-weight: 600; font-size: 1rem; line-height: 1.3; word-break: break-word; }
.pod-ep__desc { color: var(--text-muted); font-size: 0.8125rem; margin-top: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pod-ep__meta { color: var(--text-muted); font-size: 0.75rem; margin-top: 6px; }
.pod-ep__actions { margin-top: 8px; display: flex; gap: 8px; }
.pod-upcoming { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.pod-upcoming__cover { width: 180px; flex-shrink: 0; }

@media (max-width: 860px) {
  .pod-show { grid-template-columns: 1fr; gap: 16px; padding: var(--space-3); }
  .pod-show__side { position: static; }
  .pod-show__cover { width: 60%; max-width: 240px; }
  .pod-ep__thumb { flex-basis: 140px; }
  .pod-ep__desc { display: none; }
}

/* ── Movies, the Netflix way ────────────────────────────────────────────
   Netflix's layout in the app's own colours: banner, scrolling rows, hover actions, More Info sheet. Only text drawn
   on top of a picture (the banner, card captions) is white, over a dark fade, so it stays readable. */
.nf-page { color: var(--text-primary); }
.nf-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 4px 0 16px; }
.nf-bar__title { font-size: 1.5rem; font-weight: 800; letter-spacing: 0.01em; }
.nf-bar__tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nf-select { height: 36px; background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border-default); border-radius: var(--radius-full, 18px); padding: 0 14px; font-size: 0.875rem; }
.nf-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; background: var(--bg-elevated); border: 1px solid var(--border-default); border-radius: var(--radius-full, 18px); color: var(--text-muted); }
.nf-search input { background: transparent; border: none; outline: none; color: var(--text-primary); width: 170px; font-size: 0.875rem; }
.nf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 18px; border: none; border-radius: var(--radius-full, 18px); background: var(--text-primary); color: var(--bg-surface); font-weight: 700; font-size: 0.875rem; cursor: pointer; white-space: nowrap; }
.nf-btn--ghost { background: var(--bg-elevated); color: var(--text-primary); }
.nf-btn:hover { filter: brightness(1.12); }
.nf-panel { padding: 0 0 16px; }
.nf-empty { padding: 56px 24px; color: var(--text-muted); text-align: center; }

/* banner: white text over a dark fade on the picture */
.nf-hero { position: relative; min-height: clamp(340px, 42vw, 520px); display: flex; align-items: flex-end; border-radius: 14px; overflow: hidden; color: #fff; }
.nf-hero__media { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(135deg, #27272a, #09090b); }
.nf-hero__media img, .nf-hero__media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.nf-hero__media .nf-art { font-size: 8rem; opacity: 0.85; }
.nf-hero__shade { position: absolute; inset: 0; background: linear-gradient(77deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.1) 65%), linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 45%); }
.nf-hero__text { position: relative; padding: 0 clamp(16px, 4vw, 40px) clamp(24px, 4vw, 44px); max-width: 640px; }
.nf-hero__kicker { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #e5e5e5; }
.nf-hero__title { font-size: clamp(1.9rem, 5vw, 3.25rem); font-weight: 800; line-height: 1.04; margin: 6px 0 10px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); word-break: break-word; color: #fff; }
.nf-hero__meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.875rem; color: #e0e0e0; }
.nf-hero__desc { font-size: clamp(0.875rem, 1.4vw, 1.0625rem); line-height: 1.4; max-width: 540px; margin: 10px 0 0; color: #f0f0f0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.nf-hero__buttons { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.nf-btn--play { background: #fff; color: #000; height: 42px; padding: 0 24px; font-size: 1rem; }
.nf-btn--info { background: rgba(255, 255, 255, 0.28); color: #fff; height: 42px; padding: 0 22px; font-size: 1rem; }
.nf-price { color: #16a34a; font-weight: 700; }
.nf-hero .nf-price, .nf-modal__hero .nf-price { color: #4ade80; }
.nf-hd { border: 1px solid var(--border-default); border-radius: 3px; padding: 0 4px; font-size: 0.6875rem; }
.nf-hero .nf-hd { border-color: rgba(255, 255, 255, 0.55); }

.nf-ads { margin: 12px 0; display: grid; gap: 8px; }
.nf-rows { margin-top: 20px; padding-bottom: 40px; }
.nf-row { margin: 0 0 6px; position: relative; }
.nf-row:hover { z-index: 8; }
.nf-row__title { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin: 0 0 4px; }
.nf-row__viewport { position: relative; }
.nf-row__track { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 50px 0 130px; margin: -46px 0 -120px; }
.nf-row__track::-webkit-scrollbar { display: none; }
.nf-arrow { display: none; position: absolute; top: 46px; bottom: 130px; width: clamp(30px, 4vw, 48px); z-index: 9; border: none; background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 2.25rem; cursor: pointer; opacity: 0; transition: opacity 0.2s; }
.nf-arrow--left { left: 0; }
.nf-arrow--right { right: 0; }
@media (hover: hover) and (pointer: fine) {
  .nf-arrow { display: block; }
  .nf-row__viewport:hover .nf-arrow { opacity: 1; }
}

.nf-card { position: relative; flex: 0 0 clamp(150px, 19vw, 260px); scroll-snap-align: start; cursor: pointer; outline: none; }
.nf-card__frame { position: relative; border-radius: 8px; overflow: hidden; background: var(--bg-surface); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.nf-card__thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #27272a; }
.nf-card__thumb img, .nf-card__thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.nf-art { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; color: rgba(255, 255, 255, 0.9); background: linear-gradient(135deg, #7c3aed, #e11d48); }
.nf-card__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 8px 6px; font-size: 0.75rem; font-weight: 700; line-height: 1.2; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nf-new { position: absolute; left: 0; top: 8px; background: var(--error-500, #e11d48); color: #fff; font-size: 0.625rem; font-weight: 700; padding: 2px 6px; border-radius: 0 3px 3px 0; }
.nf-lock { position: absolute; right: 6px; top: 6px; background: rgba(0, 0, 0, 0.72); color: #fff; font-size: 0.625rem; font-weight: 600; padding: 2px 6px; border-radius: 3px; }
.nf-card__hover { display: none; padding: 10px 10px 12px; background: var(--bg-surface); color: var(--text-primary); }
.nf-card__actions { display: flex; gap: 6px; margin-bottom: 8px; }
.nf-card__meta { display: flex; gap: 8px; align-items: center; font-size: 0.75rem; color: var(--text-secondary, var(--text-muted)); }
.nf-card__tags { font-size: 0.75rem; color: var(--text-primary); margin-top: 4px; }
.nf-circle { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border-default); background: var(--bg-elevated); color: var(--text-primary); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.nf-circle:hover { border-color: var(--text-primary); }
.nf-circle--play, .nf-circle--on { background: var(--text-primary); color: var(--bg-surface); border-color: var(--text-primary); }
.nf-circle--right { margin-left: auto; }
.nf-circle:disabled { opacity: 0.4; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .nf-row .nf-card:hover { z-index: 9; }
  .nf-row .nf-card:hover .nf-card__frame { transform: scale(1.2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28); }
  .nf-card:hover .nf-card__hover { display: block; }
  .nf-card:hover .nf-card__cap { display: none; }
  .nf-grid .nf-card:hover .nf-card__frame { transform: scale(1.05); }
}
.nf-row__track > .nf-card:first-child .nf-card__frame { transform-origin: left center; }
.nf-card:focus-visible .nf-card__frame { outline: 2px solid var(--text-primary); }

.nf-card--num { flex-basis: clamp(190px, 25vw, 340px); padding-left: clamp(56px, 8vw, 104px); }
.nf-num { position: absolute; left: 0; bottom: -6px; font-size: clamp(6rem, 12vw, 10rem); font-weight: 900; line-height: 0.8; letter-spacing: -0.08em; color: var(--bg-surface); -webkit-text-stroke: 3px var(--text-muted); pointer-events: none; }

.nf-results { padding: 8px 0 32px; }
.nf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 20vw, 250px), 1fr)); gap: 28px 8px; padding: 8px 0; }
.nf-grid .nf-card { flex: none; }

.nf-modal { position: fixed; inset: 0; z-index: 10000; background: rgba(0, 0, 0, 0.55); overflow-y: auto; display: flex; justify-content: center; align-items: flex-start; padding: 32px 12px; }
.nf-modal__card { position: relative; width: 100%; max-width: 860px; background: var(--bg-surface); color: var(--text-primary); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 50px rgba(0, 0, 0, 0.4); }
.nf-modal__hero { position: relative; aspect-ratio: 16 / 9; background: #000; color: #fff; }
.nf-modal__fade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%); }
.nf-modal__heroText { position: absolute; left: clamp(16px, 4vw, 36px); right: 16px; bottom: clamp(16px, 4vw, 32px); }
.nf-modal__title { font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 800; margin: 0 0 12px; line-height: 1.05; color: #fff; }
.nf-modal__hero .nf-circle { background: rgba(255, 255, 255, 0.25); border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.nf-modal__hero .nf-circle--on { background: #fff; color: #000; }
.nf-modal__close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.nf-modal__body { padding: 16px clamp(16px, 4vw, 36px) 32px; }
.nf-modal__cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; }
.nf-modal__desc { margin: 12px 0 0; line-height: 1.5; color: var(--text-primary); white-space: pre-wrap; }
.nf-modal__side { font-size: 0.875rem; display: flex; flex-direction: column; gap: 8px; }
.nf-lbl { color: var(--text-muted); }
.nf-modal__h3 { font-size: 1.3rem; margin: 28px 0 12px; }
.nf-grid--modal { padding: 0; grid-template-columns: repeat(3, 1fr); gap: 16px 12px; }
.nf-modal .nf-card__hover { display: block; }
.nf-modal .nf-card__cap { display: none; }
.nf-modal .nf-card:hover .nf-card__frame { transform: none; box-shadow: none; }
@media (max-width: 640px) {
  .nf-bar__tools { width: 100%; }
  .nf-search { flex: 1; }
  .nf-search input { width: 100%; }
  .nf-hero { min-height: 380px; }
  .nf-modal__cols { grid-template-columns: 1fr; }
  .nf-grid--modal { grid-template-columns: repeat(2, 1fr); }
  .nf-modal { padding: 0; }
  .nf-modal__card { border-radius: 0; min-height: 100vh; }
}

/* ── Channel Intro Card ("swipe right to enter") ──────────────────────
   Full-screen cover shown before a channel page — see modules/_shared/channelIntro.js. */
/* Scales with the viewport's actual HEIGHT, not just width — a fixed 220px badly overflowed a real, common
   case: a phone held in landscape (short viewport height), where the avatar's top and the arrow's bottom both
   clipped off-screen since the column was simply taller than the screen. 30% of height, capped at 220px, keeps
   the old size on any normal portrait phone while shrinking gracefully whenever height is the tight dimension. */
/* The channel intro picture fills the screen (it was a 165px square): nearly the full width, up to 58% of the height. */
.avatar--intro { width: min(88vw, 440px); height: min(58vh, 58vh, 560px); height: min(58vh, 58dvh, 560px); min-height: 220px; font-size: clamp(2rem, 10vh, 4.5rem); }

.ch-intro {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  overflow: hidden;
  color: #fff;
  transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out);
}
.ch-intro--leaving { opacity: 0; transform: translateX(18%); pointer-events: none; }

.ch-intro__bg {
  position: absolute;
  inset: -20%;
  background: linear-gradient(120deg, var(--ci-c1), var(--ci-c2), var(--ci-c3), var(--ci-c1));
  background-size: 300% 300%;
  animation: ch-intro-bg-drift 12s ease-in-out infinite;
}

.ch-intro__media { position: relative; z-index: 1; }
.ch-intro-frame { display: inline-flex; border-radius: 20px; overflow: hidden; }
.ch-intro-frame .avatar--intro { border-radius: 16px; }

.ch-intro__name {
  position: relative;
  z-index: 1;
  font-size: 1.75rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
  text-align: center;
  padding: 0 var(--space-6);
}

.ch-intro__arrow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-full);
  color: #fff;
  padding: 10px 18px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: var(--space-6);
  animation: ch-intro-arrow-nudge 1.6s ease-in-out infinite;
}

@keyframes ch-intro-bg-drift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes ch-intro-arrow-nudge {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .ch-intro__bg, .ch-intro__arrow { animation: none; }
  .ch-intro { transition: none; }
}
/* Extra headroom for very short viewports (landscape on a small phone, or a keyboard eating vertical space) —
   the avatar clamp above already does most of the work; this trims the remaining gaps too. */
@media (max-height: 420px) {
  .ch-intro { gap: var(--space-2); }
  .ch-intro__arrow { margin-top: var(--space-2); }
}

/* Customize-channel dialog: intro scheme/frame swatches. */
.ch-scheme-swatch {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0;
}
.ch-scheme-swatch--active { border-color: var(--text-primary); box-shadow: 0 0 0 2px var(--bg-surface); }
.ch-frame-swatch {
  width: 36px; height: 36px; border-radius: 8px; border: 2px solid var(--border-default); background: var(--bg-elevated); cursor: pointer; padding: 0;
}
.ch-frame-swatch--active { border-color: var(--text-primary); }

/* ── Settings page (YouTube-style list) ──────────────────────────────── */
.settings-section-title { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); padding: var(--space-4) 0 var(--space-2); }
.settings-section-title:first-child { padding-top: 0; }
.settings-row {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) 0; border-bottom: 1px solid var(--border-subtle);
  cursor: pointer; background: none; border-left: none; border-right: none; border-top: none;
  width: 100%; text-align: left; color: var(--text-primary); font-family: inherit;
}
.settings-row:last-child { border-bottom: none; }
.settings-row--static { cursor: default; }
.settings-row--danger { color: var(--error-500, #dc2626); }
.settings-icon { flex-shrink: 0; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.settings-row--danger .settings-icon { color: var(--error-500, #dc2626); }
.settings-row__body { flex: 1; min-width: 0; }
.settings-row__label { font-size: 0.9375rem; font-weight: 500; }
.settings-row__desc { font-size: 0.8125rem; color: var(--text-muted); margin-top: 2px; }
.settings-row__value { font-size: 0.8125rem; color: var(--text-muted); flex-shrink: 0; }
.settings-row__chevron { flex-shrink: 0; color: var(--text-muted); }

/* A real switch, not a plain checkbox — matches the sliding pill toggle every native settings screen (including
   YouTube's own) uses for on/off preferences. */
.settings-toggle { position: relative; flex-shrink: 0; width: 44px; height: 26px; display: inline-block; }
.settings-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.settings-toggle__track {
  position: absolute; inset: 0; border-radius: var(--radius-full); background: var(--border-default);
  transition: background var(--transition-fast, 150ms);
}
.settings-toggle__track::before {
  content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: transform var(--transition-fast, 150ms);
}
.settings-toggle input:checked + .settings-toggle__track { background: var(--info-500, #2563eb); }
.settings-toggle input:checked + .settings-toggle__track::before { transform: translateX(18px); }
.settings-toggle input:disabled + .settings-toggle__track { opacity: 0.5; cursor: not-allowed; }

/* Native-app-only "a new version exists" banner — see js/appUpdateCheck.js. Fixed at the very top, above
   everything else (the app has no Play Store auto-update, so this is the only way anyone finds out). */
.app-update-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-top);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--text-primary);
  color: var(--text-inverse);
  font-size: 0.8125rem;
  font-weight: 600;
}
.app-update-banner__actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.app-update-banner__update { background: #fff; color: var(--text-primary); }
.app-update-banner__dismiss { color: var(--text-inverse); width: 28px; height: 28px; }

/* ===================================================================
   Figma "Dashboard Home"
   Live/podcast bubbles with an olive ring, underline text tabs (Feed /
   Video / Battle Hub / Music / Podcast / Games …), and the "Shorts" /
   "Trending Movie" rails with "View all".
   =================================================================== */
.live-status-bar,
.home-category-bar {
  background: transparent;
  border-bottom: none;
}

.live-status-bar { gap: var(--space-3); padding: var(--space-2) var(--space-4) var(--space-3); scrollbar-width: none; }
.live-status-bar::-webkit-scrollbar { display: none; }
.live-status-bar__item { width: 72px; }
.live-status-bar__ring { width: 60px; height: 60px; padding: 3px; }
.live-status-bar__label { color: var(--text-primary); font-weight: 400; font-size: 0.6875rem; }

.home-category-bar {
  gap: var(--space-5);
  padding: var(--space-1) var(--space-4) 0;
  align-items: flex-end;
}
.home-category-chip {
  padding: 0.375rem 0 0.5rem;
  border-radius: 0;
  background: none;
  color: var(--text-primary);
  font-size: 1.0625rem;
  font-weight: 400;
  border-bottom: 2px solid transparent;
}
.home-category-chip:hover { background: none; color: var(--primary-600); }
.home-category-chip.active {
  background: none;
  color: var(--primary-600);
  border-bottom-color: var(--primary-600);
  font-weight: 500;
}
.home-category-divider { height: 18px; margin-bottom: 0.625rem; background: var(--border-default); }

/* Rails live inside the grid as its first, full-width item */
.home-rails { grid-column: 1 / -1; display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.home-rail { min-width: 0; }
.home-rail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.home-rail__title { font-size: 1.125rem; font-weight: 500; color: var(--text-primary); margin: 0; letter-spacing: 0; }
.home-rail__all {
  background: none;
  border: none;
  color: var(--primary-600);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}
.home-rail__row {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  margin-inline: calc(-1 * var(--space-4));
  padding-inline: var(--space-4);
  scroll-snap-type: x proximity;
}
.home-rail__row::-webkit-scrollbar { display: none; }

.home-short {
  position: relative;
  flex: 0 0 140px;
  aspect-ratio: 140 / 192;
  border: none;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--primary-900);
  cursor: pointer;
  scroll-snap-align: start;
}
.home-short__media { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-short__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
}
.home-short__play svg { width: 36px; height: 36px; }
.home-short__author {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 0.75rem;
  text-align: left;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.home-short__author span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-short__author .avatar { border: 1.5px solid var(--primary-400); flex-shrink: 0; }

.home-poster {
  flex: 0 0 110px;
  aspect-ratio: 110 / 150;
  border: none;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--primary-800);
  cursor: pointer;
  scroll-snap-align: start;
  display: flex;
  align-items: flex-end;
}
.home-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-poster__title {
  padding: var(--space-2);
  color: var(--primary-100);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: left;
  line-height: 1.25;
}

.video-card__thumb-wrap { border-radius: 12px; }

/* ===================================================================
   Concert tickets (modules/tickets) — Figma "Ticket Purchasing" /
   "View Ticket": numbered Trending Events, poster rails with a price
   pill, event facts, and the pass with its QR code.
   =================================================================== */
.tk-page { max-width: 720px; margin: 0 auto; padding: var(--space-4) var(--space-4) var(--space-10); }

.tk-header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.tk-header__back, .tk-header__mine {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  background: none; border: none; color: var(--text-primary); cursor: pointer;
}
.tk-header__back svg, .tk-header__mine svg { width: 24px; height: 24px; }
.tk-header__mine { margin-left: auto; }
.tk-header__text { min-width: 0; display: flex; flex-direction: column; }
.tk-header__text h1 { font-size: 1.5rem; font-weight: 600; margin: 0; line-height: 1.2; overflow-wrap: anywhere; }
.tk-header__text span { font-size: 0.8125rem; color: var(--text-secondary); }

.tk-section { margin-bottom: var(--space-6); }
.tk-section__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-3); }
.tk-section__head h2 { font-size: 1.125rem; font-weight: 500; margin: 0; }

.tk-trending { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
@media (min-width: 560px) { .tk-trending { grid-template-columns: 1fr 1fr; } }
.tk-trending__item {
  display: flex; align-items: center; gap: var(--space-3); width: 100%;
  background: none; border: none; padding: 0; text-align: left; cursor: pointer; color: var(--text-primary); font-family: inherit;
}
.tk-trending__rank {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-600); color: #fff; font-weight: 500;
}
.tk-trending__text { min-width: 0; display: flex; flex-direction: column; }
.tk-trending__title { font-size: 1.0625rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-trending__meta { font-size: 0.8125rem; color: var(--text-secondary); }

.tk-rail {
  display: flex; gap: var(--space-3); overflow-x: auto; scrollbar-width: none;
  margin-inline: calc(-1 * var(--space-4)); padding-inline: var(--space-4);
}
.tk-rail::-webkit-scrollbar { display: none; }
.tk-card {
  flex: 0 0 168px; display: flex; flex-direction: column; gap: 2px;
  background: none; border: none; padding: 0; text-align: left; cursor: pointer; color: var(--text-primary); font-family: inherit;
}
.tk-card__media {
  position: relative; display: block; aspect-ratio: 168 / 126; border-radius: 12px; overflow: hidden;
  background: var(--bg-elevated); margin-bottom: var(--space-2);
}
.tk-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-card__placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-100), var(--bg-elevated)); color: var(--primary-600);
}
.tk-card__placeholder svg { width: 40px; height: 40px; }
.tk-card__price {
  position: absolute; left: 8px; bottom: 8px; padding: 3px 10px; border-radius: var(--radius-full);
  background: rgba(37, 37, 37, 0.8); color: #fff; font-size: 0.75rem; font-weight: 500;
}
.tk-card__live {
  position: absolute; right: 8px; top: 8px; padding: 2px 8px; border-radius: var(--radius-full);
  background: var(--error-500); color: #fff; font-size: 0.6875rem; font-weight: 600;
}
.tk-card__title { font-size: 0.9375rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-card__meta { font-size: 0.75rem; color: var(--text-secondary); }

.tk-hero { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--bg-elevated); margin-bottom: var(--space-4); }
.tk-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-desc { color: var(--text-secondary); margin: 0 0 var(--space-4); }
.tk-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3);
  padding: var(--space-4); border-radius: 12px; background: var(--bg-elevated); margin-bottom: var(--space-5);
}
.tk-facts div { display: flex; flex-direction: column; min-width: 0; }
.tk-facts span { font-size: 0.75rem; color: var(--text-muted); }
.tk-facts strong { font-weight: 500; overflow-wrap: anywhere; }
.tk-note { text-align: center; color: var(--text-secondary); margin: 0 0 var(--space-3); }

.tk-pass { border-radius: 16px; background: var(--bg-surface); box-shadow: var(--shadow-md); overflow: hidden; }
.tk-pass__top { display: flex; flex-direction: column; gap: 2px; padding: var(--space-5); background: var(--primary-800); color: #fff; }
.tk-pass__label { font-size: 0.75rem; color: var(--primary-200); text-transform: uppercase; letter-spacing: 0.08em; }
.tk-pass__title { font-size: 1.25rem; font-weight: 600; }
.tk-pass__meta { font-size: 0.875rem; color: var(--primary-100); }
.tk-pass__tear { height: 0; border-top: 2px dashed var(--border-strong); margin: 0 var(--space-4); }
.tk-pass__bottom { display: flex; gap: var(--space-4); align-items: center; padding: var(--space-5); flex-wrap: wrap; }
.tk-pass__qr svg { width: 132px; height: 132px; display: block; }
.tk-pass__id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tk-pass__id span { font-size: 0.75rem; color: var(--text-muted); margin-top: var(--space-2); }
.tk-pass__code { font-family: ui-monospace, monospace; font-size: 0.75rem; overflow-wrap: anywhere; }

.tk-list { display: flex; flex-direction: column; gap: var(--space-3); }
.tk-list__item {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: 12px;
  background: var(--bg-elevated); border: none; cursor: pointer; text-align: left; color: var(--text-primary); font-family: inherit;
}
.tk-list__media {
  width: 64px; height: 64px; flex-shrink: 0; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: var(--primary-100); color: var(--primary-600);
}
.tk-list__media img { width: 100%; height: 100%; object-fit: cover; }
.tk-list__media svg { width: 28px; height: 28px; }
.tk-list__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tk-list__text strong { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-list__text span { font-size: 0.8125rem; color: var(--text-secondary); }
.tk-list__badge { padding: 2px 10px; border-radius: var(--radius-full); background: var(--primary-100); color: var(--primary-800); font-size: 0.75rem; }

.tk-empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-12) var(--space-4); text-align: center; color: var(--text-secondary); }
.tk-empty__icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--primary-100); color: var(--primary-600); }
.tk-empty__icon svg { width: 30px; height: 30px; }

/* ===================================================================
   Account hub (modules/account) — Figma "Account": avatar + name,
   pill chips, History rail, Playlists covers, icon rows.
   =================================================================== */
.acct-page { max-width: 720px; margin: 0 auto; padding: var(--space-4) var(--space-4) var(--space-10); }

.acct-head { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-4); }
.acct-head__avatar {
  padding: 3px; border-radius: 50%; border: 2px solid var(--primary-500); background: none; cursor: pointer; flex-shrink: 0;
}
.acct-head__avatar .avatar { width: 64px; height: 64px; }
.acct-head__text { min-width: 0; }
.acct-head__text h1 { font-size: 1.5rem; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.acct-head__link { background: none; border: none; padding: 0; color: var(--text-secondary); font-family: inherit; font-size: 0.875rem; cursor: pointer; }

.acct-chips { display: flex; gap: var(--space-2); overflow-x: auto; scrollbar-width: none; margin-bottom: var(--space-6); }
.acct-chips::-webkit-scrollbar { display: none; }
.acct-chip {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 0.5rem 0.875rem; border-radius: var(--radius-full); border: none;
  background: var(--bg-overlay); color: var(--text-primary); font-family: inherit; font-size: 0.8125rem; cursor: pointer;
}
.acct-chip svg { width: 18px; height: 18px; }

.acct-section { margin-bottom: var(--space-6); }
.acct-section__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-3); }
.acct-section__head h2 { font-size: 1.125rem; font-weight: 500; margin: 0; }

.acct-rail { display: flex; gap: var(--space-3); overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--space-4)); padding-inline: var(--space-4); }
.acct-rail::-webkit-scrollbar { display: none; }

.acct-history, .acct-grid__item {
  display: flex; flex-direction: column; gap: 2px; background: none; border: none; padding: 0;
  text-align: left; color: var(--text-primary); font-family: inherit; cursor: pointer; min-width: 0;
}
.acct-history { flex: 0 0 158px; }
.acct-history__thumb {
  position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  /* Never a black box: a soft colour of the tile's own (set per video) until its picture shows. */
  background: linear-gradient(135deg, hsl(var(--tile-hue, 210) 80% 62%), hsl(calc(var(--tile-hue, 210) + 40) 85% 52%));
  color: #fff; margin-bottom: 6px; box-shadow: 0 2px 10px rgba(15, 23, 42, .12);
}
.acct-history__thumb img, .acct-history__thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.acct-history__play { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #111; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.acct-history__thumb svg { width: 20px; height: 20px; }
.acct-history__title { font-size: 0.8125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-history__meta { font-size: 0.75rem; color: var(--text-secondary); }

.acct-playlist {
  flex: 0 0 128px; display: flex; flex-direction: column; gap: 2px; background: none; border: none; padding: 0;
  text-align: left; color: var(--text-primary); font-family: inherit; cursor: pointer;
}
/* A small stack of cards in the list's own colour (Saved: GrooVVee yellow, Liked: coral), not a black square. */
.acct-playlist__cover {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  aspect-ratio: 1; border-radius: 14px; margin: 10px 0 8px; color: #fff;
  background: linear-gradient(145deg, #7c5cff, #4f8bff);
  box-shadow: 0 -6px 0 -3px rgba(124, 92, 255, .45), 0 -11px 0 -6px rgba(124, 92, 255, .22), 0 4px 14px rgba(15, 23, 42, .14);
}
.acct-playlist--saved .acct-playlist__cover { background: linear-gradient(145deg, #FCF600, #ffb800); color: #1a1a1a; box-shadow: 0 -6px 0 -3px rgba(255, 196, 0, .55), 0 -11px 0 -6px rgba(255, 196, 0, .28), 0 4px 14px rgba(15, 23, 42, .14); }
.acct-playlist--liked .acct-playlist__cover { background: linear-gradient(145deg, #ff5f6d, #ff9a62); box-shadow: 0 -6px 0 -3px rgba(255, 95, 109, .5), 0 -11px 0 -6px rgba(255, 95, 109, .25), 0 4px 14px rgba(15, 23, 42, .14); }
.acct-playlist__cover svg { width: 30px; height: 30px; }
.acct-playlist__cover strong { font-size: 0.8125rem; font-weight: 700; background: rgba(255, 255, 255, .28); padding: 2px 10px; border-radius: 999px; }
.acct-playlist__title { font-size: 0.875rem; font-weight: 600; }
.acct-playlist__meta { font-size: 0.75rem; color: var(--text-secondary); }

.acct-rows { display: flex; flex-direction: column; margin-inline: calc(-1 * var(--space-2)); }
.acct-row {
  display: flex; align-items: center; gap: var(--space-4); padding: 0.75rem var(--space-2); border-radius: 12px;
  background: none; border: none; color: var(--text-primary); font-family: inherit; font-size: 1rem; text-align: left; cursor: pointer;
}
.acct-row:hover { background: var(--bg-elevated); }
.acct-row svg { width: 24px; height: 24px; flex-shrink: 0; }
.acct-rows__divider { height: 1px; background: rgba(37, 37, 37, 0.15); margin: var(--space-2) calc(-1 * var(--space-2)); }

.acct-qr { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; }
.acct-qr svg { width: 200px; height: 200px; }

.acct-listhead { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.acct-listhead__back { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--text-primary); cursor: pointer; }
.acct-listhead__back svg { width: 24px; height: 24px; }
.acct-listhead h1 { font-size: 1.5rem; font-weight: 600; margin: 0; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-4) var(--space-3); }
.acct-empty { color: var(--text-secondary); text-align: center; padding: var(--space-10) 0; }

/* ===================================================================
   Figma "Movie<All main" — margins, centred title, olive pills, a
   shorter rounded hero on phones, lighter row titles.
   =================================================================== */
.nf-page { padding: var(--space-3) var(--space-4) var(--space-10); }
.nf-bar__title { font-weight: 600; }
.nf-btn { background: var(--primary-800); color: #fff; font-weight: 500; }
.nf-btn--ghost { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid rgba(37, 37, 37, 0.25); }
.nf-btn--play { background: #fff; color: var(--text-primary); }
.nf-select, .nf-search { background: var(--bg-elevated); border-color: rgba(37, 37, 37, 0.25); }
.nf-hero { border-radius: 12px; }
.nf-hero__media { background: linear-gradient(135deg, var(--primary-700), var(--primary-950)); }
.nf-row__title { font-size: 1.125rem; font-weight: 500; }
.nf-card__frame { border-radius: 8px; }
@media (max-width: 767px) {
  .nf-bar__title { width: 100%; text-align: center; font-size: 1.375rem; }
  .nf-bar__tools { width: 100%; }
  .nf-search { flex: 1; min-width: 0; }
  .nf-search input { width: 100%; }
  .nf-hero { min-height: 220px; }
  .nf-hero__title { font-size: 1.625rem; }
  .nf-hero__desc { display: none; }
  .nf-card:not(.nf-card--num) { flex-basis: 108px; }
  .nf-card--num { flex-basis: 150px; padding-left: 48px; }
  .nf-num { font-size: 5rem; -webkit-text-stroke-width: 2px; }
}

/* ===================================================================
   Figma "Message/All" — flat on the cream page, centred "Messages",
   All / Unread / Read underline tabs, Online avatar strip, Recent list.
   =================================================================== */
.dm-layout { background: transparent; border-color: transparent; }
.dm-sidebar { background: transparent; }
.dm-sidebar__header { border-bottom: none; padding-bottom: 0; }
.dm-sidebar__title { font-weight: 600; text-align: center; }
.dm-tabs { display: flex; margin-top: var(--space-3); border-bottom: 1px solid rgba(37, 37, 37, 0.15); }
.dm-tab {
  flex: 1; padding: 0.5rem 0; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--text-muted); font-family: inherit; font-size: 1rem; cursor: pointer;
}
.dm-tab.active { color: #111; border-bottom-color: #FCF600; border-bottom-width: 3px; font-weight: 600; } /* lemon-yellow underline */
.dm-list-label { padding: var(--space-4) var(--space-4) var(--space-2); font-size: 1rem; font-weight: 500; color: var(--text-primary); }
.dm-online { display: flex; gap: var(--space-3); overflow-x: auto; scrollbar-width: none; padding: 0 var(--space-4) var(--space-1); flex-shrink: 0; }
.dm-online::-webkit-scrollbar { display: none; }
.dm-online__item { position: relative; flex-shrink: 0; padding: 0; background: none; border: none; cursor: pointer; }
.dm-online__item .avatar { width: 56px; height: 56px; }
.dm-online__dot {
  position: absolute; left: 2px; bottom: 2px; width: 13px; height: 13px; border-radius: 50%;
  background: #44b700; border: 2px solid var(--bg-base);
}
.dm-conv-item:hover, .dm-conv-item--active { background: var(--bg-elevated); }
.dm-conv-item__preview--unread { color: rgba(0, 0, 0, 0.9); font-weight: 600; }
.dm-conv-item__badge { background: #FCF600; color: #111; }
.dm-conv-item__presence { left: 1px; right: auto; }
@media (min-width: 768px) {
  .dm-layout { background: var(--bg-surface); border-color: var(--border-default); }
}

/* ===================================================================
   Figma "Now Playing" controls (watchPage.js audioControlsHtml) —
   thin olive progress bar with times, then repeat / prev / big olive
   play-pause / next / shuffle.
   =================================================================== */
.watch-audio--custom .watch-audio__cover { margin-bottom: 0; height: 78%; }
.watch-audio--custom .watch-audio__controls { display: none; }
.audio-ctl { margin: var(--space-2) 0 var(--space-4); }
.audio-ctl__seek {
  --audio-pct: 0%;
  width: 100%; height: 4px; margin: var(--space-3) 0 var(--space-1); appearance: none; -webkit-appearance: none;
  border-radius: 2px; cursor: pointer;
  background: linear-gradient(to right, var(--primary-800) var(--audio-pct), rgba(37, 37, 37, 0.18) var(--audio-pct));
}
.audio-ctl__seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--primary-800); }
.audio-ctl__seek::-moz-range-thumb { width: 14px; height: 14px; border: none; border-radius: 50%; background: var(--primary-800); }
.audio-ctl__times { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-secondary); }
.audio-ctl__buttons { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-3); padding: 0 var(--space-2); }
.audio-ctl__btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--text-primary); cursor: pointer; border-radius: 50%;
}
.audio-ctl__btn svg { width: 22px; height: 22px; }
.audio-ctl__btn:disabled { opacity: 0.3; cursor: default; }
.audio-ctl__btn[aria-pressed="true"] { color: var(--primary-500); background: var(--primary-100); }
.audio-ctl__play {
  width: 60px; height: 60px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: none; background: var(--primary-800); color: #fff; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.audio-ctl__play svg { width: 26px; height: 26px; }

/* ===================================================================
   Battle Sphere (modules/battlesphere) — laid out after the Figma
   "Battle Sphere" flow. Colours come only from the existing tokens.
   =================================================================== */
.bs-page { max-width: 720px; margin: 0 auto; padding: var(--space-3) var(--space-4) var(--space-10); }
.bs-page--stage { padding-bottom: var(--space-6); }

.bs-header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); min-height: 40px; }
.bs-header__back {
  width: 32px; height: 32px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--text-primary); cursor: pointer; margin-left: -6px;
}
.bs-header__back svg { width: 24px; height: 24px; }
.bs-header h1 { flex: 1; min-width: 0; margin: 0; font-size: 1.125rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-header__extra { display: flex; align-items: center; gap: var(--space-1); }
.bs-header__icon {
  position: relative; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--text-primary); cursor: pointer;
}
.bs-header__icon svg { width: 22px; height: 22px; }
.bs-header__badge {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--error-500); color: #fff; font-size: 0.625rem; font-weight: 600; display: flex; align-items: center; justify-content: center;
}

.bs-search {
  display: flex; align-items: center; gap: var(--space-2); height: 44px; padding: 0 var(--space-3);
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-elevated); margin-bottom: var(--space-5);
}
.bs-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font: inherit; color: var(--text-primary); }
.bs-search input::placeholder { color: var(--text-muted); }
.bs-search svg { width: 24px; height: 24px; color: var(--text-primary); flex-shrink: 0; }

.bs-row { margin-bottom: var(--space-5); }
.bs-row__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.bs-row__head h2 { margin: 0; font-size: 1.125rem; font-weight: 500; }
.bs-row__all { background: none; border: none; font: inherit; font-size: 0.875rem; color: var(--text-primary); cursor: pointer; }
.bs-row__track {
  display: flex; gap: var(--space-3); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-inline: calc(-1 * var(--space-4)); padding-inline: var(--space-4);
}
.bs-row__track::-webkit-scrollbar { display: none; }
.bs-row__item { flex: 0 0 100%; scroll-snap-align: center; }
@media (min-width: 768px) { .bs-row__item { flex-basis: calc(50% - var(--space-2)); } }

/* Vs card: two portrait halves, a round "Vs" badge, name pills, a status chip */
.bs-vs {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 100%; aspect-ratio: 343 / 184;
  padding: 0; border: none; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--primary-900);
  box-shadow: var(--shadow-sm); font: inherit; text-align: left;
}
.bs-vs--tall { aspect-ratio: 343 / 214; }
.bs-vs__half { position: relative; display: block; overflow: hidden; background: var(--gradient-primary); }
.bs-vs__half--b { background: var(--gradient-accent); }
.bs-vs__half img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bs-vs__initials {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.85); font-size: 2.5rem; font-weight: 600; letter-spacing: 0.02em;
}
.bs-vs__name {
  position: absolute; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 20px);
  padding: 3px 10px; border-radius: var(--radius-full); background: var(--primary-700); color: #fff; font-size: 0.6875rem; font-weight: 500;
}
.bs-vs__half--a .bs-vs__name { left: 10px; padding-left: 3px; }
.bs-vs__half--b .bs-vs__name { right: 10px; padding-right: 3px; }
.bs-vs__name span:not(.bs-vs__fist) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-vs__fist {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: #fff; color: var(--text-primary);
  display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-xs);
}
.bs-vs__fist svg { width: 14px; height: 14px; }
.bs-vs__badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--primary-700); color: #fff;
  border: 3px solid #fff; font-weight: 600; font-size: 0.9375rem; box-shadow: var(--shadow-md);
}
.bs-vs__status {
  position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-full); background: var(--primary-700); color: #fff; font-size: 0.6875rem; font-weight: 500;
}
.bs-vs__status svg { width: 14px; height: 14px; }
.bs-vs__status--live { background: var(--error-500); }

.bs-go {
  position: sticky; bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px)); padding-top: var(--space-3); z-index: 2;
  margin-top: var(--space-2);
}
.bs-go .btn, .bs-cta { height: 52px; }
.bs-cta { margin-top: var(--space-6); }
.bs-empty { padding: var(--space-10) var(--space-4); text-align: center; color: var(--text-secondary); }
.bs-subtitle { margin: var(--space-2) 0 var(--space-3); font-size: 1.125rem; font-weight: 500; }
.bs-hint { margin: -8px 0 var(--space-4); color: var(--text-secondary); font-size: 0.875rem; }

/* Live strip ("Battle" bubbles) */
.bs-strip { display: flex; gap: var(--space-3); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--space-4)) var(--space-4); padding: 2px var(--space-4) 8px; }
.bs-strip::-webkit-scrollbar { display: none; }
.bs-strip__item { position: relative; flex-shrink: 0; padding: 3px; border: 2px solid var(--primary-500); border-radius: 50%; background: none; cursor: pointer; }
.bs-strip__item .avatar { width: 52px; height: 52px; }
.bs-strip__tag {
  position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); padding: 1px 8px; border-radius: var(--radius-full);
  background: var(--primary-700); color: #fff; font-size: 0.5625rem; font-weight: 600;
}

/* Category feed */
.bs-feed { display: flex; flex-direction: column; gap: var(--space-5); }
.bs-feed__meta { display: flex; align-items: center; justify-content: space-between; margin-top: var(--space-2); }
.bs-feed__votes { display: inline-flex; align-items: center; gap: var(--space-2); padding: 4px 12px 4px 6px; border-radius: var(--radius-full); background: var(--primary-700); color: #fff; font-weight: 600; font-size: 0.875rem; }
.bs-feed__emoji { letter-spacing: -2px; }
.bs-feed__watch { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; font: inherit; font-weight: 500; color: var(--text-primary); cursor: pointer; }
.bs-feed__watch svg { width: 18px; height: 18px; }

/* Send invitation */
.bs-chips { display: flex; align-items: center; gap: var(--space-2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--space-4)) var(--space-4); padding: 0 var(--space-4); }
.bs-chips::-webkit-scrollbar { display: none; }
.bs-chips__lead { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--text-primary); display: inline-flex; align-items: center; justify-content: center; }
.bs-chips__lead svg { width: 22px; height: 22px; }
.bs-chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--primary-500); background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: 0.8125rem; font-weight: 500; cursor: pointer;
}
.bs-chip.is-active { background: var(--primary-700); color: #fff; border-color: var(--primary-700); box-shadow: var(--shadow-sm); }

.bs-duel { position: relative; display: flex; justify-content: center; align-items: flex-start; margin: var(--space-6) 0 var(--space-5); }
.bs-duel__side { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); width: 150px; }
.bs-duel__side + .bs-duel__vs + .bs-duel__side { margin-left: -12px; }
.bs-duel__ring {
  width: 150px; height: 150px; border-radius: 50%; padding: 6px; background: var(--primary-600);
  display: flex; align-items: center; justify-content: center;
}
.bs-duel__ring .avatar { width: 100%; height: 100%; font-size: 2.5rem; }
.bs-duel__ring--b.is-empty { background: linear-gradient(90deg, var(--primary-400), var(--bg-overlay) 55%); }
.bs-duel__placeholder { width: 100%; height: 100%; border-radius: 50%; background: var(--bg-overlay); color: var(--primary-400); display: flex; align-items: center; justify-content: center; }
.bs-duel__placeholder svg { width: 56px; height: 56px; }
.bs-duel__name { font-size: 0.9375rem; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-duel__vs {
  position: absolute; left: 50%; top: 75px; transform: translate(-50%, -50%); z-index: 1;
  width: 46px; height: 46px; border-radius: 50%; border: 3px solid #fff; background: var(--primary-700); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600; box-shadow: var(--shadow-md);
}
@media (max-width: 360px) { .bs-duel__side, .bs-duel__ring { width: 128px; } .bs-duel__ring { height: 128px; } .bs-duel__vs { top: 64px; } }

.bs-label { display: block; margin: 0 0 var(--space-2); font-size: 1rem; }
.bs-combo { position: relative; }
.bs-combo .bs-search { margin-bottom: var(--space-2); }
.bs-combo__list {
  position: absolute; left: -6px; right: -6px; bottom: calc(100% + 4px); z-index: 5; max-height: 260px; overflow-y: auto;
  background: var(--bg-surface); border-radius: 10px; box-shadow: var(--shadow-lg);
}
.bs-combo__row {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: 10px 14px; border: none;
  border-bottom: 1px solid var(--border-subtle); background: none; font: inherit; color: var(--text-primary); text-align: left; cursor: pointer;
}
.bs-combo__row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-combo__tag { font-style: normal; font-size: 0.6875rem; padding: 2px 12px; border-radius: var(--radius-full); background: var(--primary-700); color: #fff; }
.bs-combo__none { padding: 12px 14px; color: var(--text-secondary); font-size: 0.875rem; }
.bs-textlink { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; padding: 0; font: inherit; font-size: 0.8125rem; color: var(--text-secondary); cursor: pointer; margin-bottom: var(--space-4); }
.bs-textlink svg { width: 16px; height: 16px; }

.bs-radios { display: flex; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.bs-radio { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; font-size: 0.9375rem; }
.bs-radio input { position: absolute; opacity: 0; pointer-events: none; }
.bs-radio span { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--text-primary); display: inline-flex; align-items: center; justify-content: center; }
.bs-radio input:checked + span { border-color: var(--primary-600); }
.bs-radio input:checked + span::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--primary-600); }
.bs-radio input:focus-visible + span { outline: 2px solid var(--primary-500); outline-offset: 2px; }

.bs-genres { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4); }
.bs-genre { height: 40px; padding: 0 22px; border-radius: var(--radius-full); border: 1px solid var(--text-primary); background: none; font: inherit; font-size: 0.875rem; font-weight: 500; color: var(--text-primary); cursor: pointer; }
.bs-genre.is-active { background: var(--primary-800); border-color: var(--primary-800); color: #fff; }

/* Location */
.bs-map { height: min(56vh, 480px); border-radius: 8px; overflow: hidden; border: 1px solid var(--primary-400); background: var(--bg-elevated); }
.bs-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.bs-map__empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3); padding: var(--space-6); text-align: center; color: var(--text-secondary); }
.bs-map__empty svg { width: 40px; height: 40px; color: var(--primary-500); }
.bs-hearing { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); width: 100%; margin: var(--space-3) 0 0; background: none; border: none; font: inherit; font-weight: 500; color: var(--text-primary); cursor: pointer; }
.bs-hearing svg { width: 24px; height: 24px; color: var(--primary-600); }

/* Calendar */
.bs-cal { margin-bottom: var(--space-4); }
.bs-cal h3 { margin: 0 0 var(--space-3); font-size: 1rem; font-weight: 500; }
.bs-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 6px; text-align: center; }
.bs-cal__wd { font-size: 0.8125rem; color: var(--text-secondary); padding-bottom: 6px; }
.bs-cal__day { justify-self: center; width: 32px; height: 32px; border-radius: 50%; border: none; background: none; font: inherit; color: var(--text-primary); cursor: pointer; }
.bs-cal__day:disabled { color: var(--text-disabled); cursor: default; }
.bs-cal__day.is-selected { background: var(--primary-700); color: #fff; }
.bs-time-row { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); width: 100%; background: none; border: none; font: inherit; font-size: 1rem; font-weight: 500; color: var(--text-primary); cursor: pointer; }
.bs-time-row svg { width: 24px; height: 24px; color: var(--primary-600); }

/* Dialogs (time, wheel, success, confirm) */
.bs-dialog { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; padding: var(--space-4); background: var(--bg-scrim); backdrop-filter: blur(3px); }
.bs-dialog__card { width: min(100%, 340px); padding: var(--space-5); border-radius: 12px; background: var(--bg-surface); box-shadow: var(--shadow-xl); }
.bs-dialog__card h3 { margin: 0 0 var(--space-2); font-size: 1.125rem; font-weight: 500; text-align: center; }
.bs-dialog__actions { display: flex; justify-content: center; gap: var(--space-4); margin-top: var(--space-5); }
.bs-dialog__actions .btn { min-width: 100px; height: 44px; }
.bs-dialog__x { width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--primary-500); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.bs-dialog__x svg { width: 20px; height: 20px; }

.bs-time__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); color: var(--text-secondary); }
.bs-time__display { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-5); }
.bs-time__box { width: 96px; height: 84px; border-radius: 8px; border: none; background: var(--bg-overlay); font: inherit; font-size: 3rem; font-weight: 500; color: var(--text-primary); cursor: pointer; }
.bs-time__box.is-active { background: var(--primary-200); outline: 2px solid var(--primary-500); }
.bs-time__colon { font-size: 2.5rem; font-weight: 600; }
.bs-time__ampm { display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; margin-left: auto; }
.bs-time__ampm button { width: 54px; height: 38px; border: none; background: var(--bg-overlay); font: inherit; color: var(--text-primary); cursor: pointer; }
.bs-time__ampm button.is-active { background: var(--primary-200); font-weight: 600; }
.bs-dial { position: relative; width: 100%; max-width: 260px; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; background: var(--bg-overlay); }
.bs-dial__num { position: absolute; transform: translate(-50%, -50%); width: 38px; height: 38px; border-radius: 50%; border: none; background: none; font: inherit; font-size: 1.0625rem; color: var(--text-primary); cursor: pointer; z-index: 1; }
.bs-dial__num.is-active { background: var(--primary-700); color: #fff; }
.bs-dial__hand { position: absolute; left: 50%; bottom: 50%; width: 2px; height: 40%; margin-left: -1px; background: var(--primary-700); transform-origin: bottom center; }
.bs-dial__pivot { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--primary-700); }

.bs-wheel { text-align: center; }
.bs-wheel__unit { display: block; color: var(--text-secondary); font-size: 0.8125rem; margin-bottom: var(--space-2); }
.bs-wheel__viewport { position: relative; height: 108px; width: 120px; margin: 0 auto; }
.bs-wheel__list { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; display: flex; flex-direction: column; }
.bs-wheel__list::-webkit-scrollbar { display: none; }
.bs-wheel__pad { flex: 0 0 36px; }
.bs-wheel__item { flex: 0 0 36px; scroll-snap-align: center; border: none; background: none; font: inherit; color: var(--text-muted); cursor: pointer; }
.bs-wheel__item.is-active { color: var(--text-primary); font-weight: 600; }
.bs-wheel__lines { position: absolute; left: 30px; right: 30px; top: 36px; height: 36px; border-top: 1px solid var(--text-primary); border-bottom: 1px solid var(--text-primary); pointer-events: none; }

.bs-success { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-4); padding-top: var(--space-8); }
.bs-success__x { position: absolute; top: var(--space-3); right: var(--space-3); }
.bs-success__check { width: 76px; height: 76px; border-radius: 50%; border: 3px solid var(--primary-800); color: var(--primary-800); display: flex; align-items: center; justify-content: center; }
.bs-success__check svg { width: 40px; height: 40px; }
.bs-success h3 { font-size: 1.375rem; line-height: 1.3; }

/* Battle Invite Info */
.bs-info { display: flex; flex-direction: column; gap: var(--space-5); }
.bs-info__title { display: flex; align-items: center; gap: var(--space-4); }
.bs-info__title h2 { margin: 0; font-size: 1.625rem; font-weight: 500; }
.bs-info__dot { width: 18px; height: 18px; border-radius: 4px; background: var(--primary-600); flex-shrink: 0; }
.bs-info__block { display: flex; flex-direction: column; gap: var(--space-2); }
.bs-info__label, .bs-info__pick span { color: var(--text-secondary); font-size: 0.875rem; }
.bs-info__line { display: inline-flex; align-items: center; gap: var(--space-3); }
.bs-info__line svg { width: 22px; height: 22px; color: var(--primary-600); flex-shrink: 0; }
.bs-info__line strong, .bs-info__person strong { font-weight: 500; }
.bs-info__dt { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-8); }
.bs-info__person { display: inline-flex; align-items: center; gap: var(--space-3); }
.bs-info__people { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.bs-info__vs { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); }
.bs-info__pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.bs-info__pick { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; padding: 0; border: none; background: none; font: inherit; color: var(--text-primary); text-align: left; }
button.bs-info__pick { cursor: pointer; }
button.bs-info__pick strong { text-decoration: underline dotted; text-underline-offset: 3px; }
.bs-info__pick strong { font-weight: 500; }
.bs-info__mode { margin: 0; font-size: 0.8125rem; color: var(--text-secondary); }
.bs-status { margin: var(--space-5) 0 var(--space-3); padding: var(--space-3) var(--space-4); border-radius: 10px; background: var(--bg-elevated); font-size: 0.875rem; }

.bs-mine { margin-top: var(--space-5); padding: var(--space-4); border-radius: 12px; background: var(--bg-elevated); display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.bs-mine h3 { width: 100%; margin: 0; font-size: 1rem; font-weight: 500; }
.bs-tracks { width: 100%; margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 4px; font-size: 0.875rem; }
.bs-tracks--edit { list-style: decimal; padding: var(--space-3) 0 0 1.25rem; }
.bs-tracks--edit li { padding: 6px 0; border-bottom: 1px solid var(--border-subtle); }
.bs-tracks--edit li > * { vertical-align: middle; }
.bs-tracks--edit li span { display: inline-block; max-width: calc(100% - 80px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-tracks--edit em { margin-left: 8px; font-size: 0.6875rem; color: var(--text-muted); }
.bs-tracks--edit button { float: right; background: none; border: none; color: var(--text-muted); cursor: pointer; }
.bs-tracks--edit button svg { width: 18px; height: 18px; }
.bs-tracks__empty { list-style: none; margin-left: -1.25rem; text-align: center; color: var(--text-secondary); border: none !important; }

/* Invitations */
.bs-invite { margin-bottom: var(--space-6); }
.bs-invite__from { display: inline-flex; align-items: center; gap: var(--space-2); padding: 2px 14px 2px 2px; border-radius: var(--radius-full); background: var(--primary-700); color: #fff; font-size: 0.8125rem; font-weight: 500; margin-bottom: var(--space-3); }
.bs-invite__meta { display: flex; flex-direction: column; margin: var(--space-3) 0; }
.bs-invite__meta span { color: var(--text-secondary); font-size: 0.8125rem; }
.bs-invite__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-top: var(--space-3); }
.bs-invite__actions .btn { height: 52px; }

.bs-claim { margin-bottom: var(--space-4); padding: var(--space-4); border-radius: 12px; background: var(--bg-elevated); text-align: center; display: flex; flex-direction: column; gap: var(--space-3); }
.bs-claim__text { font-weight: 500; }

/* Leaderboard */
.bs-board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.bs-board__row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: 10px; background: var(--bg-elevated); }
.bs-board__rank { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-700); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8125rem; font-weight: 600; flex-shrink: 0; }
.bs-board__name { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-board__stats { font-size: 0.75rem; color: var(--text-secondary); white-space: nowrap; }

/* Upload your Songs */
.bs-upload__kicker { display: flex; align-items: center; justify-content: center; gap: 6px; margin: var(--space-2) 0 0; color: var(--text-secondary); font-size: 0.875rem; }
.bs-upload__kicker svg { width: 20px; height: 20px; }
.bs-upload__title { text-align: center; margin: var(--space-1) 0 var(--space-8); font-size: 1.625rem; font-weight: 500; }
.bs-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4); min-height: 220px;
  border: 3px dashed var(--border-strong); border-radius: 12px; color: var(--text-muted); cursor: pointer; text-align: center; padding: var(--space-6);
}
.bs-drop svg { width: 64px; height: 64px; }

/* Battle stage */
.bs-stage__bar { display: flex; align-items: center; justify-content: space-between; margin: var(--space-2) 0; }
.bs-pill { display: inline-flex; align-items: center; gap: var(--space-2); padding: 2px 16px 2px 2px; border-radius: var(--radius-full); background: var(--primary-700); color: #fff; font-size: 0.8125rem; font-weight: 500; max-width: 70%; }
.bs-pill .avatar { border: 2px solid #fff; }
.bs-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-stage__state { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; color: var(--text-secondary); }
.bs-stage__state.is-live { color: var(--error-500); }
.bs-stage__state svg { width: 18px; height: 18px; }
.bs-stage { position: relative; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: #000; }
.bs-stage.is-swapped { flex-direction: column-reverse; }
.bs-stage__vs {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid #fff; background: var(--primary-700); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.bs-panel { position: relative; aspect-ratio: 343 / 268; background: var(--primary-900); overflow: hidden; }
.bs-panel:fullscreen { aspect-ratio: auto; }
.bs-panel__body { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.bs-panel__media { width: 100%; height: 100%; object-fit: cover; }
.bs-panel__art { color: rgba(255, 255, 255, 0.15); }
.bs-panel__art svg { width: 120px; height: 120px; }
.bs-panel__waiting { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); color: rgba(255, 255, 255, 0.7); font-size: 0.8125rem; padding: var(--space-4); text-align: center; }
.bs-panel__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 58px; height: 58px; border-radius: 50%;
  border: none; background: #fff; color: var(--text-primary); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-md);
}
.bs-panel__play svg { width: 26px; height: 26px; }
.bs-panel__track { position: absolute; left: 12px; right: 12px; bottom: 56px; color: #fff; font-size: 0.8125rem; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-panel__unmute { position: absolute; bottom: 56px; left: 12px; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-full); border: none; background: rgba(0, 0, 0, 0.6); color: #fff; cursor: pointer; font-size: 0.75rem; }
.bs-panel__score {
  position: absolute; top: 14px; left: 14px; z-index: 2; min-width: 44px; height: 44px; padding: 0 6px; border-radius: 22px; border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 0.9375rem; background: var(--error-500);
}
.bs-panel__score--b { background: var(--success-500); }
.bs-panel__tools { position: absolute; top: 14px; right: 12px; z-index: 2; display: flex; gap: 6px; }
.bs-panel__tools button { width: 36px; height: 28px; border-radius: var(--radius-full); border: none; background: var(--primary-700); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.bs-panel__tools button svg { width: 18px; height: 18px; }
.bs-panel__tools button[aria-pressed="true"] { background: #fff; color: var(--primary-800); }
.bs-panel__react { position: absolute; left: 8px; right: 8px; bottom: 10px; z-index: 2; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.bs-panel__react::-webkit-scrollbar { display: none; }
.bs-panel__react button { flex-shrink: 0; height: 28px; min-width: 34px; border-radius: var(--radius-full); border: none; background: rgba(255, 255, 255, 0.35); backdrop-filter: blur(4px); font-size: 1rem; cursor: pointer; }
.bs-panel__react .bs-panel__vote { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 0 12px; color: #fff; font-size: 0.8125rem; font-weight: 600; background: var(--error-400); }
.bs-panel__react .bs-panel__vote--b { background: var(--success-500); }
.bs-panel__vote svg { width: 16px; height: 16px; }
.bs-stage__float { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.bs-float { position: absolute; font-size: 1.375rem; animation: bs-float-up 1.6s ease-out forwards; }
@keyframes bs-float-up { from { transform: translateY(0) scale(0.8); opacity: 1; } to { transform: translateY(-110px) scale(1.2); opacity: 0; } }
.bs-stage__info { margin: var(--space-2) 0; padding: var(--space-3); border-radius: 10px; background: var(--bg-elevated); font-size: 0.8125rem; color: var(--text-secondary); }
.bs-winner { margin: var(--space-3) 0; padding: var(--space-3); border-radius: 10px; background: var(--bg-elevated); text-align: center; font-weight: 600; }

.bs-comments { margin-top: var(--space-4); border-top: 1px solid var(--border-default); padding-top: var(--space-3); }
.bs-comments__list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-3); }
.bs-comment { display: flex; gap: var(--space-2); align-items: flex-start; }
.bs-comment p { margin: 0; font-size: 0.875rem; overflow-wrap: anywhere; }
.bs-comment strong { font-weight: 600; margin-right: 4px; }
.bs-comment-bar { display: flex; align-items: center; gap: var(--space-3); }
.bs-comment-bar input { flex: 1; min-width: 0; height: 46px; padding: 0 var(--space-4); border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg-elevated); font: inherit; color: var(--text-primary); outline: none; }
.bs-comment-bar__send { width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--primary-800); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.bs-comment-bar__send svg { width: 20px; height: 20px; }
/* Keep the centre "Vs" badge clear of the top panel's reactions and the bottom panel's score/tools. */
.bs-stage:not(.is-swapped) [data-panel="a"] .bs-panel__react, .bs-stage.is-swapped [data-panel="b"] .bs-panel__react { bottom: 30px; }
.bs-stage:not(.is-swapped) [data-panel="b"] .bs-panel__score, .bs-stage:not(.is-swapped) [data-panel="b"] .bs-panel__tools,
.bs-stage.is-swapped [data-panel="a"] .bs-panel__score, .bs-stage.is-swapped [data-panel="a"] .bs-panel__tools { top: 30px; }

/* Battle Sphere — interactive location map, viewer stacks */
.bs-map { position: relative; isolation: isolate; z-index: 0; }
.bs-map__canvas { width: 100%; height: 100%; }
.bs-map__tip { margin: var(--space-2) 0 0; font-size: 0.8125rem; color: var(--text-secondary); }
.bs-map .leaflet-container { font: inherit; background: var(--bg-elevated); }
.bs-pin { color: var(--primary-800); background: none; border: none; }
.bs-pin svg { display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35)); }
.bs-combo--down .bs-combo__list { top: calc(100% - 4px); bottom: auto; }
.bs-combo--down { z-index: 6; }
.bs-combo__row svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-secondary); }
.bs-combo--down .bs-combo__row span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.bs-viewers { display: inline-flex; align-items: center; }
.bs-viewers .avatar { width: 26px; height: 26px; border: 2px solid var(--bg-surface); margin-left: -8px; font-size: 0.5625rem; }
.bs-viewers .avatar:first-child { margin-left: 0; }
.bs-viewers__more {
  margin-left: -8px; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 13px; border: 2px solid var(--bg-surface);
  background: var(--primary-900); color: #fff; font-size: 0.625rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
}
.bs-viewers__label { font-size: 0.75rem; color: var(--text-secondary); margin-left: 6px; }
.bs-feed__right { display: inline-flex; align-items: center; gap: var(--space-3); }
.bs-stage__right { display: inline-flex; align-items: center; gap: var(--space-3); }
.bs-stage__viewers { display: inline-flex; align-items: center; }
.bs-stage__viewers .bs-viewers__label { display: none; }
.bs-stage__viewers--block { margin: 0 0 var(--space-3); }
.bs-stage__viewers--block .bs-viewers__label { display: inline; }
.bs-stage__viewers--block:empty { display: none; }
.bs-vs__status--eye { background: var(--success-500); }
.bs-vs__status--live svg + svg { margin-left: 2px; }

/* ===================================================================
   Share sheet (modules/_shared/shareSheet.js) — one for every Share
   button: app icons in each platform's own brand colour, Copy link,
   and "More apps" (the phone's own chooser).
   =================================================================== */
.share-sheet {
  position: fixed; inset: 0; z-index: var(--z-toast); display: flex; align-items: flex-end; justify-content: center;
  background: var(--bg-scrim); animation: share-sheet-fade 160ms ease-out;
}
.share-sheet__panel {
  width: 100%; max-width: 520px; max-height: 88vh; max-height: 88dvh; overflow-y: auto;
  padding: var(--space-2) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  border-radius: 20px 20px 0 0; background: var(--bg-surface); box-shadow: var(--shadow-xl);
  animation: share-sheet-up 220ms var(--ease-out);
}
@media (min-width: 640px) { .share-sheet { align-items: center; } .share-sheet__panel { border-radius: 20px; } }
.share-sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 0 auto var(--space-3); }
.share-sheet__head { text-align: center; margin-bottom: var(--space-4); }
.share-sheet__head h2 { margin: 0; font-size: 1.125rem; font-weight: 600; }
.share-sheet__link { margin: 4px auto 0; max-width: 100%; font-size: 0.75rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-sheet__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4) var(--space-2); }
@media (max-width: 340px) { .share-sheet__grid { grid-template-columns: repeat(3, 1fr); } }
.share-sheet__app {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0; border: none; background: none;
  font: inherit; font-size: 0.75rem; color: var(--text-primary); cursor: pointer; text-align: center; border-radius: 12px;
}
.share-sheet__app:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 2px; }
.share-sheet__icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
.share-sheet__icon svg { width: 28px; height: 28px; }
.share-sheet__icon--plain { background: var(--bg-elevated); color: var(--text-primary); box-shadow: none; border: 1px solid var(--border-default); }
.share-sheet__icon--plain svg { width: 24px; height: 24px; }
.share-sheet__cancel {
  display: block; width: 100%; height: 48px; margin-top: var(--space-5); border: none; border-radius: var(--radius-full);
  background: var(--bg-elevated); font: inherit; font-weight: 500; color: var(--text-primary); cursor: pointer;
}
@keyframes share-sheet-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes share-sheet-up { from { transform: translateY(32px); } to { transform: translateY(0); } }

/* Upload progress cards (js/shell.js) — one per file, above the bottom nav. */
.upload-tray {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: var(--z-toast);
  bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 16px);
  width: min(92vw, 380px); display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.upload-card { padding: 10px 14px; border-radius: 12px; background: var(--bg-surface); box-shadow: var(--shadow-lg); border: 1px solid var(--border-default); }
.upload-card__row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.upload-card__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.upload-card__pct { flex-shrink: 0; font-weight: 700; color: var(--text-primary); }
.upload-card__bar { height: 6px; border-radius: 3px; background: var(--bg-overlay); overflow: hidden; }
.upload-card__bar span { display: block; height: 100%; width: 0; background: var(--primary-700); transition: width 150ms linear; }
.upload-card--done .upload-card__bar span { background: var(--success-500); }
.upload-card--error .upload-card__bar span { background: var(--error-500); }
.upload-card--error .upload-card__pct { color: var(--error-500); }

/* ===================================================================
   Notifications page (modules/notifications) — Figma "Notifications"
   =================================================================== */
.nt-page { max-width: 720px; margin: 0 auto; padding: var(--space-3) var(--space-4) var(--space-10); }
.nt-header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.nt-header h1 { margin: 0; flex: 1; text-align: center; padding-right: 32px; font-weight: 700; }
.nt-header__back { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--text-primary); cursor: pointer; }
.nt-header__back svg { width: 24px; height: 24px; }
.nt-chips { display: flex; gap: var(--space-2); margin-bottom: var(--space-4); }
.nt-chip { padding: 8px 18px; border-radius: var(--radius-full); border: none; background: var(--bg-overlay); color: var(--text-primary); font-weight: 600; cursor: pointer; }
.nt-chip.is-active { background: var(--primary-800); color: #fff; }
.nt-list { display: flex; flex-direction: column; gap: var(--space-2); }
.nt-item {
  display: flex; align-items: flex-start; gap: var(--space-3); width: 100%; padding: var(--space-2) 0;
  background: none; border: none; text-align: left; color: var(--text-primary); cursor: pointer;
}
.nt-item__avatar { flex-shrink: 0; }
.nt-item__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nt-item__title { overflow-wrap: anywhere; }
.nt-item__sub { color: var(--text-secondary); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nt-item__time { color: var(--text-muted); }
.nt-item__thumb { flex: 0 0 96px; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--bg-overlay); }
.nt-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.nt-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); padding: var(--space-12) var(--space-4); color: var(--text-secondary); }
.nt-empty__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--bg-overlay); color: var(--text-primary); display: flex; align-items: center; justify-content: center; }
.nt-empty__icon svg { width: 34px; height: 34px; }
.nt-empty h2 { margin: var(--space-2) 0 0; color: var(--text-primary); font-weight: 700; }
.nt-push { display: flex; justify-content: space-between; width: 100%; margin-top: var(--space-6); padding: var(--space-3) var(--space-4); border-radius: 12px; border: 1px solid var(--border-default); background: var(--bg-surface); color: var(--text-primary); cursor: pointer; }
.nt-push span { color: var(--text-muted); }

/* Figma "Settings": back arrow + title on one line, then a plain list of text rows (no icons, no cards). */
.settings-header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.settings-header h1 { margin: 0; font-weight: 700; }
.settings-header__back { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--text-primary); cursor: pointer; margin-left: -6px; }
.settings-header__back svg { width: 24px; height: 24px; }
.settings-icon { display: none; }
.settings-row { border-bottom: none; padding-block: 12px; gap: var(--space-3); }
.settings-row__label { font-weight: 400; color: var(--text-primary); }
.settings-section-title { text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--text-secondary); padding-top: var(--space-5); }

/* ===================================================================
   Discover x Hire (modules/discovery) — Figma "Discover"
   =================================================================== */
.dc-page { max-width: 760px; margin: 0 auto; padding: var(--space-3) var(--space-4) var(--space-10); }
.dc-header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.dc-header__back { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--text-primary); cursor: pointer; margin-left: -6px; }
.dc-header__back svg { width: 24px; height: 24px; }
.dc-header__text { display: flex; flex-direction: column; }
.dc-header__text h1 { margin: 0; font-weight: 700; }
.dc-header__text span { color: var(--text-secondary); }
.dc-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-elevated); margin-bottom: var(--space-3); }
.dc-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; color: var(--text-primary); }
.dc-search svg { width: 22px; height: 22px; color: var(--text-primary); }
.dc-tabs { display: flex; gap: var(--space-5); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--space-4)) var(--space-4); padding: 0 var(--space-4); border-bottom: 1px solid var(--border-default); }
.dc-tabs::-webkit-scrollbar { display: none; }
.dc-tab { flex-shrink: 0; padding: 8px 0; border: none; border-bottom: 2px solid transparent; background: none; color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.dc-tab.is-active { color: var(--text-primary); border-bottom-color: var(--text-primary); font-weight: 700; }
.dc-row { margin-bottom: var(--space-5); }
.dc-row__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-3); }
.dc-row__head h2 { margin: 0; font-weight: 700; }
.dc-row__all { border: none; background: none; color: var(--text-secondary); cursor: pointer; }
.dc-row__empty { margin: 0; color: var(--text-muted); }
.dc-row__track { display: flex; gap: var(--space-3); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--space-4)); padding: 0 var(--space-4); }
.dc-row__track::-webkit-scrollbar { display: none; }
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--space-4) var(--space-3); }
.dc-card { flex: 0 0 140px; display: flex; flex-direction: column; gap: 2px; padding: 0; border: none; background: none; text-align: left; color: var(--text-primary); cursor: pointer; min-width: 0; }
.dc-card__photo { position: relative; display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--gradient-primary); margin-bottom: 4px; }
.dc-card__photo img, .dc-card__photo video { width: 100%; height: 100%; object-fit: cover; display: block; }
.dc-card__initials { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.85); font-weight: 700; }
.dc-card__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-card__meta { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-card__rate { color: var(--text-secondary); }
.dc-card__rate strong { color: var(--text-primary); }
.dc-cta { margin-top: var(--space-6); padding: var(--space-5); border-radius: 12px; background: var(--bg-elevated); text-align: center; display: flex; flex-direction: column; gap: var(--space-3); align-items: center; }
.dc-cta p { margin: 0; }

/* ===================================================================
   Figma "Shorts": creator block bottom-left (photo, name, Subscribe
   pill), caption, "Original Sound"; rail ends with More; More sheet.
   =================================================================== */
.feed-item__creator { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.feed-item__creator-avatar { cursor: pointer; flex-shrink: 0; }
.feed-item__creator-avatar .avatar { width: 56px; height: 56px; border: 2px solid rgba(255, 255, 255, 0.85); }
.feed-item__creator-text { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.feed-item__creator-name { color: #fff; font-weight: 700; cursor: pointer; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.feed-item__subscribe { background: #fff !important; color: #111 !important; border: none !important; padding: 4px 14px !important; border-radius: var(--radius-full); }
.feed-item__subscribe[data-following="true"] { background: rgba(255, 255, 255, 0.25) !important; color: #fff !important; }
.feed-item__sound { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.feed-item__sound svg { width: 16px; height: 16px; }

.short-sheet { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: flex-end; justify-content: center; background: var(--bg-scrim); }
.short-sheet__panel { width: 100%; max-width: 520px; max-height: 80vh; max-height: 80dvh; overflow-y: auto; border-radius: 20px 20px 0 0; background: var(--bg-surface); padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)); animation: share-sheet-up 220ms var(--ease-out); }
.short-sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 0 auto 12px; }
.short-sheet__row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 4px; border: none; background: none; color: var(--text-primary); text-align: left; cursor: pointer; border-radius: 10px; }
.short-sheet__row:hover { background: var(--bg-elevated); }
.short-sheet__row svg { width: 22px; height: 22px; flex-shrink: 0; }
.short-sheet__desc { display: flex; flex-direction: column; gap: 8px; padding: 8px 4px 16px; }
.short-sheet__desc p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.short-sheet__desc span { color: var(--text-muted); }

/* Comments sheet (Figma "Comments"): rounded input + round send button */
.feed-item__comment-form { display: flex; gap: 10px; align-items: center; }
.feed-item__comment-form .form-input { flex: 1; border-radius: 8px; }
.feed-item__comment-form .btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 0 !important; flex-shrink: 0; }
.feed-item__comment-form .btn::after { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 21l21-9L2 3v7l15 2-15 2z'/%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'%3E%3Cpath d='M2 21l21-9L2 3v7l15 2-15 2z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ===================================================================
   Figma "Podcast": home rows, "Podcast you might like", show tabs,
   All episodes / Newest, About, Related, and the Record screen.
   =================================================================== */
.pod-home__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--space-4); }
.pod-home__head h1 { margin: 0; font-weight: 700; }
.pod-row { margin-bottom: var(--space-6); }
.pod-row__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.pod-row__head h2 { margin: 0; font-weight: 700; }
.pod-row__all { border: none; background: none; color: var(--text-secondary); cursor: pointer; }
.pod-row__track { display: flex; gap: var(--space-3); overflow-x: auto; scrollbar-width: none; }
.pod-row__track::-webkit-scrollbar { display: none; }
.pod-row__track > .video-card { flex: 0 0 min(240px, 70vw); }
.pod-row__track.is-expanded { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); overflow: visible; }
.pod-likes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-3); }
.pod-like { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3); border-radius: 14px; border: none; background: var(--bg-elevated); text-align: left; color: var(--text-primary); cursor: pointer; }
.pod-like__cover { flex: 0 0 84px; }
.pod-like__cover .pod-cover { width: 84px; }
.pod-like__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pod-like__title { font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pod-like__show { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-like__meta { color: var(--text-muted); }

.pod-tabs { display: flex; gap: var(--space-5); border-bottom: 1px solid var(--border-default); margin-bottom: var(--space-3); }
.pod-tab { padding: 8px 0; border: none; border-bottom: 2px solid transparent; background: none; color: var(--text-secondary); cursor: pointer; }
.pod-tab.is-active { color: var(--text-primary); border-bottom-color: var(--text-primary); font-weight: 700; }
.pod-sort { display: flex; gap: var(--space-2); margin-bottom: var(--space-2); }
.pod-sort__chip { padding: 6px 14px; border-radius: var(--radius-full); border: 1px solid var(--border-default); background: none; color: var(--text-primary); cursor: pointer; }
.pod-sort__chip.is-active { background: var(--primary-800); color: #fff; border-color: var(--primary-800); }
.pod-about__text { white-space: pre-wrap; overflow-wrap: anywhere; margin: var(--space-2) 0 var(--space-4); }
.pod-about__facts { display: flex; flex-wrap: wrap; gap: 8px; }
.pod-about__facts span { padding: 6px 12px; border-radius: var(--radius-full); background: var(--bg-elevated); }
.pod-related { display: flex; gap: var(--space-3); width: 100%; padding: var(--space-3) 0; border: none; border-bottom: 1px solid var(--border-subtle); background: none; text-align: left; color: var(--text-primary); cursor: pointer; }
.pod-related__cover { flex: 0 0 96px; }
.pod-related__cover .pod-cover { width: 96px; }
.pod-related__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pod-related__text > span { color: var(--text-secondary); }
.pod-related__desc { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.pod-rec { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: flex-end; justify-content: center; background: var(--bg-scrim); }
.pod-rec__panel { width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; background: var(--bg-surface); padding: var(--space-5) var(--space-5) calc(var(--space-6) + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
@media (min-width: 640px) { .pod-rec { align-items: center; } .pod-rec__panel { border-radius: 20px; } }
.pod-rec__head { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.pod-rec__head h2 { margin: 0; font-weight: 700; }
.pod-rec__x { width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--bg-elevated); color: var(--text-primary); cursor: pointer; }
.pod-rec__hint { margin: 0; color: var(--text-secondary); text-align: center; }
.pod-rec__time { font-weight: 700; letter-spacing: 0.05em; }
.pod-rec__meter { width: 70%; height: 6px; border-radius: 3px; background: var(--bg-overlay); overflow: hidden; }
.pod-rec__meter span { display: block; height: 100%; width: 0; background: var(--success-500); transition: width 60ms linear; }
.pod-rec audio { width: 100%; }
.pod-rec__main { width: 76px; height: 76px; border-radius: 50%; border: 4px solid var(--border-strong); background: var(--bg-surface); color: var(--error-500); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.pod-rec__main svg { width: 40px; height: 40px; }
.pod-rec__main.is-recording { border-color: var(--error-500); animation: pod-rec-pulse 1.2s ease-in-out infinite; }
@keyframes pod-rec-pulse { 50% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0.15); } }
.pod-rec__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); width: 100%; }

/* ===================================================================
   Figma "Search" / "Search<People": back + pill field + voice, tabs, recent rows with ×.
   =================================================================== */
.sr-page { max-width: 720px; margin: 0 auto; padding: var(--space-3) var(--space-4) var(--space-10); }
.sr-bar { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.sr-bar__back, .sr-bar__mic { flex: none; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background: none; color: var(--text-primary); cursor: pointer; }
.sr-bar__mic:disabled { opacity: 0.4; cursor: default; }
.sr-bar__mic.is-listening { color: var(--error-500); }
.sr-bar__field { flex: 1; min-width: 0; }
.sr-bar__field input { width: 100%; height: 36px; padding: 0 16px; border: none; border-radius: var(--radius-full); background: var(--bg-elevated); color: var(--text-primary); outline: none; }
.sr-bar__field input:focus-visible { box-shadow: 0 0 0 2px var(--border-strong); }
.sr-tabs { display: flex; gap: var(--space-5); overflow-x: auto; scrollbar-width: none; margin-bottom: var(--space-4); }
.sr-tabs::-webkit-scrollbar { display: none; }
.sr-tab { flex: none; padding: 2px 0 6px; border: none; border-bottom: 2px solid transparent; background: none; color: var(--text-secondary); cursor: pointer; }
.sr-tab.is-active { color: var(--text-primary); border-bottom-color: var(--text-primary); font-weight: 700; }
.sr-results__head { margin: 0 0 var(--space-2); font-weight: 700; }
.sr-row { display: flex; align-items: center; gap: var(--space-2); padding: 6px 0; }
.sr-row__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-3); border: none; background: none; padding: 0; text-align: left; color: var(--text-primary); cursor: pointer; }
.sr-row__thumb { flex: none; width: 41px; height: 41px; border-radius: 8px; overflow: hidden; background: var(--bg-elevated); }
.sr-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sr-row__text { display: flex; flex-direction: column; min-width: 0; }
.sr-row__title, .sr-row__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-row__sub { color: var(--text-secondary); }
.sr-row__x { flex: none; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background: none; color: var(--text-secondary); cursor: pointer; }
.sr-empty { color: var(--text-muted); padding: var(--space-6) 0; text-align: center; }

/* ===================================================================
   Figma "Invite/Reward" → "Share Invitation".
   =================================================================== */
.inv-page { max-width: 480px; margin: 0 auto; padding: var(--space-3) var(--space-4) var(--space-10); display: flex; flex-direction: column; gap: var(--space-6); }
.inv-head { display: flex; align-items: center; gap: var(--space-3); }
.inv-head h1 { flex: 1; margin: 0; font-weight: 700; }
.inv-head__btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background: none; color: var(--text-primary); cursor: pointer; }
.inv-card { display: flex; justify-content: center; padding: var(--space-5); border-radius: 20px; background: var(--bg-surface); box-shadow: var(--shadow-sm); color: var(--text-primary); }
.inv-art { width: 100%; max-width: 280px; height: auto; }
.inv-code { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; }
.inv-code h2 { margin: 0; font-weight: 700; }
.inv-code__copied { margin: 0; color: var(--success-500); }
.inv-code__pill, .inv-code__share { width: 178px; height: 56px; display: flex; align-items: center; justify-content: center; gap: var(--space-3); border-radius: 14px; cursor: pointer; }
.inv-code__pill { border: 1px solid var(--border-default); background: var(--bg-elevated); color: var(--text-primary); font-weight: 700; letter-spacing: 0.06em; }
.inv-code__share { border: none; background: var(--primary-800); color: #fff; }
.inv-total { display: flex; flex-direction: column; gap: var(--space-3); }
.inv-total p { margin: 0; text-align: center; }
.inv-total__btn { height: 52px; border: none; border-radius: 14px; background: var(--primary-800); color: #fff; cursor: pointer; }
.inv-joined { display: flex; flex-direction: column; gap: var(--space-2); }
.inv-joined h3 { margin: var(--space-2) 0; font-weight: 700; }
.inv-joined__row { display: flex; align-items: center; gap: var(--space-3); border: none; background: none; padding: 4px 0; text-align: left; color: var(--text-primary); cursor: pointer; }
.inv-joined__text { display: flex; flex-direction: column; }
.inv-joined__text span + span { color: var(--text-secondary); }

/* Blocking: Settings → Blocked accounts, and a blocked person's channel page. */
.settings-blocked { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; }
.settings-blocked__who { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.ch-blocked { max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding-top: var(--space-10); text-align: center; }
.ch-blocked h1 { margin: 0; font-weight: 700; }
.cmt-report { margin-left: 6px; padding: 2px; border: none; background: none; color: var(--text-muted); cursor: pointer; vertical-align: middle; opacity: 0.7; }
.cmt-report:hover, .cmt-report:focus-visible { opacity: 1; color: var(--text-primary); }

/* ===================================================================
   Group calls (modules/_shared/meetCall.js): a Google Meet-style call screen.
   Dark like the 1:1 call screen; app tokens for the panels.
   =================================================================== */
.meet { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; flex-direction: column; background: #111; color: #fff; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.meet[hidden] { display: none !important; }
.meet__top { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); }
.meet__title { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.meet__title strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meet__title span { color: rgba(255,255,255,0.65); }
.meet__icon { flex: none; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background: none; color: #fff; cursor: pointer; }
.meet__icon svg { width: 22px; height: 22px; }
.meet__icon[hidden] { visibility: hidden; }
.meet__stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--space-2); padding: 0 var(--space-2); }
.meet__grid { flex: 1; min-height: 0; display: grid; gap: var(--space-2); grid-template-columns: 1fr; grid-auto-rows: 1fr; }
.meet__grid[data-count="3"], .meet__grid[data-count="4"], .meet__grid[data-count="5"], .meet__grid[data-count="6"],
.meet__grid[data-count="7"], .meet__grid[data-count="8"], .meet__grid[data-count="9"] { grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) {
  .meet__grid[data-count="2"] { grid-template-columns: 1fr 1fr; }
  .meet__grid[data-count="5"], .meet__grid[data-count="6"], .meet__grid[data-count="7"], .meet__grid[data-count="8"], .meet__grid[data-count="9"] { grid-template-columns: repeat(3, 1fr); }
}
.meet-tile { position: relative; min-height: 0; overflow: hidden; border-radius: 14px; background: #2a2a2a; outline: 3px solid transparent; outline-offset: -3px; transition: outline-color 120ms; }
.meet-tile.is-speaking { outline-color: #8ab4f8; }
.meet-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.meet-tile--self video { transform: scaleX(-1); }
.meet-tile.is-camoff video { opacity: 0; }
.meet-tile__avatar { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
.meet-tile.is-camoff .meet-tile__avatar { display: flex; }
.meet-tile__name { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); display: flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 8px; background: rgba(0,0,0,0.5); overflow: hidden; white-space: nowrap; }
.meet-tile__mic { display: inline-flex; color: #f28b82; }
.meet-tile__mic svg { width: 14px; height: 14px; }
.meet-tile__mic[hidden], .meet-tile__hand[hidden] { display: none !important; }
.meet-tile__hand { position: absolute; top: 8px; left: 8px; padding: 2px 6px; border-radius: 8px; background: #fff; color: #111; }
.meet__present { position: relative; flex: 1 1 60%; min-height: 0; border-radius: 14px; overflow: hidden; background: #000; }
.meet__present[hidden] { display: none !important; }
.meet__present video { width: 100%; height: 100%; object-fit: contain; }
.meet__present-label { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 8px; background: rgba(0,0,0,0.6); }
.meet--presenting .meet__grid { flex: 0 0 110px; display: flex; overflow-x: auto; }
.meet--presenting .meet-tile { flex: 0 0 150px; }
.meet__reactions { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.meet__reaction { position: absolute; bottom: 0; display: flex; flex-direction: column; align-items: center; animation: meet-float 3.2s ease-out forwards; }
.meet__reaction span { font-size: 34px !important; line-height: 1.1; }
.meet__reaction small { padding: 1px 6px; border-radius: 6px; background: rgba(0,0,0,0.55); }
@keyframes meet-float { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(-70vh); opacity: 0; } }
.meet__bar { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding: var(--space-3) var(--space-2); }
.meet__btn { position: relative; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background: #3c4043; color: #fff; cursor: pointer; }
.meet__btn svg { width: 22px; height: 22px; }
.meet__btn.is-off { background: #ea4335; }
.meet__btn.is-on { background: #8ab4f8; color: #111; }
.meet__btn--leave { width: 58px; border-radius: 22px; background: #ea4335; }
.meet__badge, .meet__count { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: #8ab4f8; color: #111; font-weight: 700; }
.meet__badge { background: #ea4335; color: #fff; }
.meet__badge[hidden] { display: none !important; }
.meet__picker, .meet__menu { position: absolute; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 2; display: flex; gap: 4px; padding: 6px; border-radius: 28px; background: #2d2e30; box-shadow: var(--shadow-lg); }
.meet__picker button { width: 44px; height: 44px; border: none; border-radius: 50%; background: none; cursor: pointer; font-size: 24px !important; }
.meet__menu { flex-direction: column; border-radius: 14px; min-width: 220px; }
.meet__menu button { display: flex; align-items: center; gap: var(--space-3); padding: 10px 12px; border: none; border-radius: 8px; background: none; color: #fff; text-align: left; cursor: pointer; }
.meet__menu svg { width: 20px; height: 20px; }
.meet__picker[hidden], .meet__menu[hidden], .meet__panel[hidden] { display: none !important; }
.meet__panel { position: absolute; right: 0; top: 0; bottom: 0; z-index: 3; width: min(360px, 100%); display: flex; flex-direction: column; gap: var(--space-2); padding: calc(var(--space-3) + env(safe-area-inset-top, 0px)) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom, 0px)); background: var(--bg-surface); color: var(--text-primary); overflow-y: auto; }
.meet__panel .meet__icon { color: var(--text-primary); }
.meet__panel-head { display: flex; align-items: center; justify-content: space-between; }
.meet__panel-head h2 { margin: 0; font-weight: 700; }
.meet__panel-note { margin: 0; color: var(--text-secondary); }
.meet__panel-sub { margin: var(--space-3) 0 0; font-weight: 700; color: var(--text-secondary); }
.meet__chat { flex: 1; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-3); }
.meet__msg span { color: var(--text-muted); }
.meet__msg p { margin: 2px 0 0; overflow-wrap: anywhere; }
.meet__chat-form { display: flex; gap: var(--space-2); }
.meet__chat-form input, .meet__search { flex: 1; min-height: 40px; padding: 0 14px; border: 1px solid var(--border-default); border-radius: var(--radius-full); background: var(--bg-elevated); color: var(--text-primary); }
.meet__chat-form button, .meet__ring { padding: 0 16px; height: 36px; border: none; border-radius: var(--radius-full); background: var(--primary-800); color: #fff; cursor: pointer; }
.meet__ring:disabled { opacity: 0.6; }
.meet__person { display: flex; align-items: center; gap: var(--space-3); padding: 6px 0; }
.meet__person > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meet__person em { color: var(--text-muted); font-style: normal; }
.meet__person i { display: inline-flex; color: var(--error-500); }
.meet__person i svg { width: 16px; height: 16px; }
.meet__invite-actions { display: flex; gap: var(--space-2); }
.meet__invite-actions button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border: 1px solid var(--border-default); border-radius: var(--radius-full); background: none; color: var(--text-primary); cursor: pointer; }
.meet__invite-actions svg { width: 18px; height: 18px; }
.meet-pill { position: fixed; right: var(--space-4); bottom: calc(var(--space-6) + 64px + env(safe-area-inset-bottom, 0px)); z-index: var(--z-modal); display: flex; align-items: center; gap: var(--space-2); padding: 8px 16px; border: none; border-radius: var(--radius-full); background: #111; color: #fff; box-shadow: var(--shadow-lg); cursor: pointer; }
.meet-pill svg { width: 20px; height: 20px; }
.meet-pill[hidden] { display: none !important; }
.meet-invite { position: fixed; inset: 0; z-index: calc(var(--z-modal) + 1); display: flex; align-items: flex-start; justify-content: center; padding: calc(var(--space-6) + env(safe-area-inset-top, 0px)) var(--space-4); background: rgba(0,0,0,0.35); }
.meet-invite__card { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-5); border-radius: 20px; background: #111; color: #fff; text-align: center; box-shadow: var(--shadow-lg); }
.meet-invite__card p { margin: 0; }
.meet-invite__icon { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #3c4043; }
.meet-invite__icon svg { width: 28px; height: 28px; }
.meet-invite__title { color: rgba(255,255,255,0.7); }
.meet-invite__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); width: 100%; margin-top: var(--space-3); }
.meet-invite__actions button { height: 44px; border: none; border-radius: var(--radius-full); color: #fff; cursor: pointer; }
.meet-invite__decline { background: #ea4335; }
.meet-invite__join { background: #34a853; }

/* /meet page: start a meeting, join with a code, and the "ready to join?" preview. */
.mt-page { max-width: 560px; margin: 0 auto; padding: var(--space-4) var(--space-4) var(--space-10); display: flex; flex-direction: column; gap: var(--space-5); }
.mt-page h1 { margin: 0; font-weight: 700; }
.mt-page__lead { margin: 0; color: var(--text-secondary); }
.mt-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.mt-new { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border: none; border-radius: var(--radius-full); background: var(--primary-800); color: #fff; cursor: pointer; }
.mt-new svg { width: 20px; height: 20px; }
.mt-join { flex: 1; min-width: 220px; display: flex; gap: var(--space-2); }
.mt-join input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 1px solid var(--border-default); border-radius: var(--radius-full); background: var(--bg-surface); color: var(--text-primary); }
.mt-join button { height: 44px; padding: 0 18px; border: none; border-radius: var(--radius-full); background: var(--bg-elevated); color: var(--text-primary); cursor: pointer; }
.mt-join button:disabled { opacity: 0.5; }
.mt-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border-radius: 16px; background: var(--bg-surface); box-shadow: var(--shadow-sm); }
.mt-card h2 { margin: 0; font-weight: 700; }
.mt-link { display: flex; align-items: center; gap: var(--space-2); padding: 10px 14px; border-radius: 12px; background: var(--bg-elevated); overflow-wrap: anywhere; }
.mt-link span { flex: 1; min-width: 0; }
.mt-preview { position: relative; aspect-ratio: 4 / 3; width: 100%; overflow: hidden; border-radius: 16px; background: #2a2a2a; color: #fff; }
.mt-preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.mt-preview__off { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.mt-preview__off[hidden] { display: none !important; }
.mt-preview__controls { position: absolute; left: 0; right: 0; bottom: var(--space-3); display: flex; justify-content: center; gap: var(--space-3); }
.mt-here { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--text-secondary); margin: 0; }
.mt-joinnow { height: 48px; border: none; border-radius: var(--radius-full); background: var(--primary-800); color: #fff; font-weight: 700; cursor: pointer; }
.mt-joinnow:disabled { opacity: 0.6; }

/* Messages: "Group call" next to the title. */
.dm-sidebar__title-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.dm-groupcall { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background: var(--bg-elevated); color: var(--text-primary); cursor: pointer; }
@media (max-width: 520px) { .meet__panel { width: 100%; } }

/* Big group calls: tiles that are not on screen, and the "+N more" tile. */
.meet-tile.is-offscreen { display: none; }
.meet-tile--more { display: flex; align-items: center; justify-content: center; border: none; color: #fff; font-weight: 700; cursor: pointer; }

/* AI Studio: the AI wallet line under each tool. */
.ai-wallet__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: 12px; background: var(--bg-elevated); margin-bottom: 4px; }
.ai-wallet__row--low { outline: 2px solid var(--warning-500, #f59e0b); }
.ai-wallet__topups { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* iPhone/iPad Safari: how to add GrooVVee to the home screen (js/main.js _offerIosInstall). */
.ios-install { position: fixed; left: var(--space-3); right: var(--space-3); bottom: calc(var(--bottom-nav-height, 64px) + env(safe-area-inset-bottom, 0px) + 48px); z-index: var(--z-toast, 1000); display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: 16px; background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-lg); }
.ios-install img { flex: none; border-radius: 10px; }
.ios-install__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ios-install__text span { color: var(--text-secondary); }
.ios-install__text svg { display: inline; vertical-align: -3px; color: #0a84ff; }
.ios-install__close { flex: none; width: 32px; height: 32px; border: none; border-radius: 50%; background: var(--bg-elevated); color: var(--text-primary); cursor: pointer; }

/* "+" on your own profile photo: add or change a profile photo or video (You page and your profile). */
.acct-head__avatar-wrap { position: relative; flex-shrink: 0; }
.avatar-plus { position: absolute; right: 0; bottom: 0; width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 2px solid var(--bg-surface); background: var(--gradient-mixed); color: #fff; font-size: 1rem !important; font-weight: 800; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-sm); }
.avatar-plus--lg { width: 34px; height: 34px; right: 4px; bottom: 4px; font-size: 1.375rem !important; pointer-events: none; }

/* Comments everywhere: ♥ like with count + report (modules/_shared/commentReport.js), and the emoji button/picker. */
.cmt-actions { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; vertical-align: middle; }
.cmt-like { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border: none; border-radius: 999px; background: none; color: var(--text-muted); cursor: pointer; line-height: 1; }
.cmt-like:hover, .cmt-like:focus-visible { background: var(--bg-elevated); color: var(--text-primary); }
.cmt-like.is-liked { color: #e11d48; }
.cmt-like__count { font-size: 12px !important; min-width: 0; }
.cmt-like__count:empty { display: none; }
.cmt-emoji-btn { flex: none; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: none; border-radius: 50%; background: none; color: var(--text-secondary); cursor: pointer; align-self: center; }
.cmt-emoji-btn:hover, .cmt-emoji-btn:focus-visible { background: var(--bg-elevated); color: var(--text-primary); }
.cmt-emoji-picker { position: fixed; z-index: calc(var(--z-modal, 300) + 5); display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 8px; border-radius: 14px; background: var(--bg-surface); box-shadow: var(--shadow-lg); }
.cmt-emoji-picker button { height: 38px; border: none; border-radius: 8px; background: none; cursor: pointer; font-size: 22px !important; line-height: 1; }
.cmt-emoji-picker button:hover, .cmt-emoji-picker button:focus-visible { background: var(--bg-elevated); }

/* A minimised 1:1 call: the full-screen black call layer becomes see-through and lets taps reach the app; only the "On call with …" pill stays clickable. */
#global-call-overlay.gc-overlay--minimized { background: transparent !important; pointer-events: none; }
#global-call-overlay.gc-overlay--minimized #gc-minimized-pill { pointer-events: auto; }
#global-call-overlay.gc-overlay--minimized #gc-incoming { pointer-events: auto; }
@media (max-width: 767px) { #gc-minimized-pill { bottom: calc(var(--bottom-nav-height, 64px) + env(safe-area-inset-bottom, 0px) + 16px) !important; } }

/* Real file picker (modules/_shared/filePicker.js): a clear button, then a preview of what was picked. */
.file-picker__native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; opacity: 0; }
.file-picker { width: 100%; }
.file-picker__choose { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border: 1.5px dashed var(--border-strong); border-radius: 14px; background: var(--bg-elevated); color: var(--text-primary); font-weight: 600; cursor: pointer; }
.file-picker__choose:hover, .file-picker__choose:focus-visible { border-color: var(--primary-800); }
.file-picker__choose[hidden], .file-picker__preview[hidden] { display: none !important; }
.file-picker__items { display: grid; gap: 10px; }
.file-picker__item { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 14px; background: var(--bg-elevated); }
.file-picker__item--media img, .file-picker__item--media video { width: 100%; max-height: 260px; object-fit: contain; border-radius: 10px; background: #000; }
.file-picker__item audio { width: 100%; }
.file-picker__item--file { flex-direction: row; align-items: center; color: var(--text-secondary); }
.file-picker__meta { display: flex; justify-content: space-between; gap: 8px; min-width: 0; color: var(--text-secondary); }
.file-picker__meta strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); font-weight: 600; }
.file-picker__actions { display: flex; gap: 8px; margin-top: 8px; }
.file-picker__btn { flex: 1; height: 40px; border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-surface); color: var(--text-primary); cursor: pointer; }
.file-picker__btn--remove { color: var(--error-500); }

/* Voice typing button in chat boxes (speak to type) — pulses red while listening. */
.rci-dictate[hidden] { display: none !important; }
.rci-dictate.is-listening { color: #CB112D !important; animation: rci-dictate-pulse 1s ease-in-out infinite; }
@keyframes rci-dictate-pulse { 50% { transform: scale(1.15); } }
.rci-dictate { color: #111 !important; }

/* WhatsApp-style multi-line message box: grows with the text (up to ~6 lines), keeps paragraphs. */
.rci-multiline { resize: none; overflow-y: auto; line-height: 1.35; max-height: 140px; min-height: 24px; font-family: inherit; white-space: pre-wrap; overflow-wrap: anywhere; display: block; }
.wa-pill .rci-multiline { padding: 12px 4px; }
.wa-pill__btn { align-self: flex-end; }

/* Messages list: times are plain grey (was blue); the unread one is black. */
.dm-conv-item .dm-conv-item__time { color: var(--text-muted); }
.dm-conv-item:has(.dm-conv-item__badge) .dm-conv-item__time { color: #111; font-weight: 600; }

/* Group chats: sender names and centred notices. */
.wa-sender { display: block; font-weight: 700; font-size: 13px; line-height: 1.2; margin-bottom: 2px; }
.wa-system { align-self: center; max-width: 86%; margin: 6px 0; padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.07); color: rgba(0, 0, 0, 0.65); font-size: 12.5px; text-align: center; flex-shrink: 0; }

/* Group chats: New group / Group info sheets (modules/social/index.js). */
.dm-sidebar__actions { display: inline-flex; gap: 8px; }
.grp-sheet { position: fixed; inset: 0; z-index: calc(var(--z-modal, 300) + 2); display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0.45); }
@media (min-width: 640px) { .grp-sheet { align-items: center; } }
.grp-sheet__card { width: 100%; max-width: 460px; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-radius: 20px 20px 0 0; background: var(--bg-surface); overflow-y: auto; }
@media (min-width: 640px) { .grp-sheet__card { border-radius: 20px; } }
.grp-sheet__head { display: flex; align-items: center; justify-content: space-between; }
.grp-sheet__head h2 { margin: 0; font-weight: 700; }
.grp-sheet__x { width: 36px; height: 36px; border: none; border-radius: 50%; background: var(--bg-elevated); color: var(--text-primary); cursor: pointer; }
.grp-sheet__who { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 4px; text-align: center; }
.grp-sheet__name { font-weight: 700; font-size: 1.25rem !important; overflow-wrap: anywhere; }
.grp-sheet__sub, .grp-sheet__label { color: var(--text-secondary); }
.grp-btn { padding: 6px 16px; border: 1px solid var(--border-default); border-radius: 999px; background: none; color: var(--text-primary); cursor: pointer; }
.grp-add { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border: none; border-radius: 12px; background: none; color: var(--text-primary); font-weight: 600; cursor: pointer; text-align: left; }
.grp-add span { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #FCF600; color: #111; font-size: 1.25rem !important; }
.grp-members { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.grp-member { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 10px; flex-wrap: wrap; }
.grp-member__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-member__admin { padding: 2px 8px; border-radius: 999px; background: #FFFBCC; color: #6B6200; font-size: 12px !important; font-weight: 600; }
.grp-member__actions { flex-basis: 100%; display: flex; gap: 8px; padding-left: 52px; }
.grp-member__actions button { padding: 4px 12px; border: 1px solid var(--border-default); border-radius: 999px; background: none; color: var(--text-primary); cursor: pointer; }
.grp-member__actions .is-danger, .grp-leave { color: var(--error-500); }
.grp-leave { margin-top: 6px; padding: 12px; border: none; border-radius: 12px; background: var(--bg-elevated); font-weight: 600; cursor: pointer; }
.grp-members--pick { max-height: 46vh; max-height: 46dvh; overflow-y: auto; }
.grp-member--pick { cursor: pointer; flex-wrap: nowrap; }
.grp-member--pick:hover { background: var(--bg-elevated); }
.grp-check { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--border-strong); border-radius: 50%; font-weight: 700; }
.grp-check.is-on { background: #FCF600; border-color: #111; color: #111; }
.grp-picked { color: var(--text-secondary); }
.grp-empty { padding: 16px; text-align: center; color: var(--text-muted); }
.grp-create { padding: 14px; border: none; border-radius: 999px; background: #FCF600; color: #111; font-weight: 700; cursor: pointer; }
.grp-create:disabled { opacity: 0.45; cursor: default; }
.grp-name-input { font-weight: 600; }

/* ── "Get the app" gate for shared links (modules/_shared/appGate.js) ── */
.app-gate { position: fixed; inset: 0; z-index: 100000; background: #FCF600; color: #000; display: flex; align-items: center; justify-content: center; padding: 24px 16px; overflow-y: auto; }
.app-gate__card { width: 100%; max-width: 420px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.app-gate__logo { width: 132px; height: 132px; border-radius: 28px; object-fit: cover; box-shadow: 0 6px 22px rgba(0,0,0,.18); }
.app-gate__title { margin: 4px 0 0; font-size: 26px; font-weight: 700; color: #000; }
.app-gate__text { margin: 0; color: #000; line-height: 1.5; }
.app-gate__btn { display: block; width: 100%; padding: 15px 18px; border-radius: 14px; background: #000; color: #FCF600; font-weight: 700; text-decoration: none; }
.app-gate__link { color: #000; font-weight: 700; text-decoration: underline; }
.app-gate__hint { margin: 0; font-size: 13px; color: rgba(0,0,0,.72); }
html.has-app-gate, html.has-app-gate body { overflow: hidden; }

/* ── Comment boxes typed like the chat box, with YouTube-style replies ── */
.cmt-textarea { resize: none; min-height: 40px; max-height: 160px; line-height: 1.35; padding-top: 9px; padding-bottom: 9px; overflow-y: auto; field-sizing: content; }
[data-comments-list] > div, .comment-list > div, #concert-comment-list > div, .watch-comment__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.cmt-reply { background: none; border: 0; padding: 0 6px; margin-left: 4px; font-weight: 700; color: inherit; cursor: pointer; font-size: 13px; }
.cmt-reply:hover { text-decoration: underline; }
.cmt-reply-mark { display: inline-block; margin-left: 6px; font-size: 12px; opacity: .7; }
[data-comments-list] > div:has(.cmt-reply-mark), .comment-list > div:has(.cmt-reply-mark), #concert-comment-list > div:has(.cmt-reply-mark), .watch-comment:has(.cmt-reply-mark) { margin-left: 28px; }
.cmt-reply-form, .cmt-reply-posted { margin: 6px 0 10px 28px; display: flex; flex-direction: column; gap: 6px; }
.cmt-reply-form__row { display: flex; justify-content: flex-end; gap: 8px; }
.cmt-reply-form .cmt-emoji-btn, .cmt-reply-form .cmt-dictate-btn { align-self: flex-start; }
.cmt-reply-posted__head { font-size: 13px; }
.cmt-reply-posted__head span { opacity: .65; }
.cmt-reply-posted__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.cmt-dictate-btn.is-listening { color: #d00; }
.cmt-reply-form { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.cmt-reply-form .cmt-textarea { flex: 1 1 160px; min-width: 0; }
.cmt-reply-form__row { width: 100%; }

/* ── Group photo, group link and the join screen ── */
.grp-sheet__btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.grp-invite { margin: 14px 0 6px; }
.grp-invite__row { display: flex; flex-wrap: wrap; gap: 8px; }
.grp-invite__hint { margin: 8px 0 0; font-size: 12.5px; opacity: .75; }
.grp-btn.is-danger { color: #c00; }
.grp-newhead { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.grp-newhead .grp-name-input { flex: 1; min-width: 0; }
.grp-photo { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-size: 11px; }
.grp-photo__circle { width: 56px; height: 56px; border-radius: 50%; background: #FCF600 center/cover no-repeat; color: #000; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.grp-join { display: flex; justify-content: center; padding: 32px 16px; }
.grp-join__card { width: 100%; max-width: 380px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.grp-join__card h2 { margin: 6px 0 0; }
.grp-join__card p { margin: 0 0 8px; opacity: .75; }
.app-gate__steps { text-align: left; margin: 0; padding-left: 1.2rem; line-height: 1.6; color: #000; }
.app-gate__steps svg { vertical-align: -3px; }
.app-gate__qr { background: #fff; padding: 12px; border-radius: 12px; line-height: 0; }
.app-gate__qr svg { width: 200px; height: 200px; }
button.app-gate__btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; }

/* ── Reply to a chat message (WhatsApp-style quote) ── */
.wa-replybar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #FCF600; color: #000; border-top: 1px solid rgba(0,0,0,.15); }
.wa-replybar[hidden] { display: none; }
.wa-replybar__quote { flex: 1; min-width: 0; border-left: 4px solid #000; padding-left: 8px; display: flex; flex-direction: column; }
.wa-replybar__x { background: none; border: 0; font-size: 16px; cursor: pointer; color: #000; }
.wa-quote__name { font-weight: 700; font-size: 12.5px; }
.wa-quote__text { font-size: 13px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-quote { display: flex; flex-direction: column; border-left: 4px solid #000; background: rgba(0,0,0,.07); border-radius: 6px; padding: 4px 8px; margin: 0 0 4px; cursor: pointer; max-width: 100%; }
.wa-bubble { position: relative; }
.wa-reply-btn { position: absolute; top: 2px; right: 4px; background: rgba(0,0,0,.08); border: 0; border-radius: 50%; width: 22px; height: 22px; line-height: 22px; font-size: 13px; cursor: pointer; color: inherit; opacity: .55; padding: 0; }
.wa-reply-btn:hover, .wa-reply-btn:focus { opacity: 1; }
.wa-row--flash .wa-bubble { outline: 3px solid #FCF600; outline-offset: 2px; transition: outline-color .3s; }

/* ── Live ended / saving the recording ── */
.stream-saved { position: fixed; inset: 0; z-index: 90000; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.stream-saved__card { width: 100%; max-width: 420px; background: #fff; color: #000; border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.stream-saved__card h2 { margin: 0; font-size: 20px; }
.stream-saved__card p { margin: 0; }
.stream-saved__badge { align-self: flex-start; background: #FCF600; color: #000; font-weight: 700; padding: 3px 10px; border-radius: 999px; font-size: 12px; }
.stream-saved__bar { height: 8px; background: #eee; border-radius: 999px; overflow: hidden; }
.stream-saved__fill { height: 100%; background: #FCF600; box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); transition: width .25s; }
.stream-saved__pct { font-weight: 700; }
.stream-saved__hint { font-size: 12.5px; opacity: .7; }
.stream-saved__ok { font-weight: 700; }
.stream-saved__err { color: #c00; font-weight: 700; }
.stream-saved__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.stream-saved__btn { border: 1px solid #000; background: #fff; color: #000; border-radius: 10px; padding: 9px 14px; font-weight: 700; cursor: pointer; font: inherit; font-weight: 700; }
.stream-saved__btn--primary { background: #FCF600; }
.stream-pending { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #FCF600; color: #000; padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; }
.stream-pending span { flex: 1 1 220px; }

/* ── Battle Sphere home, closer to the Figma: peeking cards, bigger corners, pager dots, sponsored banner ── */
.bs-row { position: relative; }
.bs-row__head h2 { font-weight: 700; }
.bs-header h1 { font-weight: 700; }
.bs-row__item { flex-basis: 92%; }
.bs-vs { border-radius: 20px; }
.bs-vs__badge { width: 48px; height: 48px; border-width: 3px; font-weight: 700; }
.bs-vs__status--eye, .bs-vs__status { border-radius: 999px; }
.bs-row__dots { position: absolute; left: 0; right: 8%; bottom: 12px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.bs-row__dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); }
.bs-row__dots span.is-active { width: 20px; border-radius: 999px; background: #fff; }
.bs-ad-slot { margin: 0 0 var(--space-5); }
.bs-ad { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, #0b0b0f, #1d1d26); color: #fff; cursor: pointer; }
.bs-ad__logo { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.bs-ad__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bs-ad__text strong { font-size: 1rem; }
.bs-ad__text span { font-size: .8125rem; opacity: .85; }
.bs-ad__x { background: none; border: 0; color: #fff; cursor: pointer; font-size: 16px; align-self: flex-start; }
.bs-go .btn { border-radius: 999px; }

/* ── Admin: Referrals (clear on a phone) ── */
.ref-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ref-tile { border: 1px solid var(--border-subtle, #ddd); border-radius: 12px; padding: 12px; text-align: center; background: var(--bg-surface, #fff); }
.ref-tile__n { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.ref-tile__l { font-weight: 700; margin-top: 2px; }
.ref-tile__w { font-size: .8125rem; opacity: .7; margin-top: 2px; }
.ref-people { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.ref-person { border: 1px solid var(--border-subtle, #ddd); border-radius: 12px; padding: 12px; background: var(--bg-surface, #fff); }
.ref-person__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: baseline; margin-bottom: 10px; }
.ref-person__code code { background: #FCF600; color: #000; padding: 1px 6px; border-radius: 6px; font-weight: 700; }
.ref-person__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ref-person__stats div { background: rgba(0,0,0,.04); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.ref-person__stats b { font-size: 1.25rem; }
.ref-person__stats span { font-size: .8125rem; opacity: .75; }
.ref-person__label { font-weight: 700; margin: 12px 0 4px; }
.ref-person__list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ref-person__list li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid rgba(0,0,0,.07); padding: 4px 0; }
.ref-person__list time, .ref-person__last, .ref-recent__meta { font-size: .8125rem; opacity: .7; }
.ref-person__none { margin: 10px 0 0; opacity: .7; }
.ref-person__last { margin-top: 8px; }
.ref-recent { margin-top: 14px; }
.ref-recent summary { cursor: pointer; font-weight: 700; }
.ref-recent ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ref-recent li { border-bottom: 1px solid rgba(0,0,0,.07); padding-bottom: 6px; }
.ref-credit { margin-top: 14px; border: 1px dashed rgba(0,0,0,.3); border-radius: 12px; padding: 10px 12px; }
.ref-credit summary { cursor: pointer; font-weight: 700; }
.ref-credit ul { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ref-credit li label { display: flex; align-items: center; gap: 8px; }
.ref-credit li time { margin-left: auto; font-size: .8125rem; opacity: .7; }

/* ── Voice message recording bar (WhatsApp-style) ── */
.rci-is-recording > *:not(.rci-rec) { display: none !important; }
.rci-rec { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; background: #FCF600; color: #000; border-radius: 999px; font-weight: 700; }
.rci-rec__dot { width: 12px; height: 12px; border-radius: 50%; background: #d00; animation: rci-rec-pulse 1s ease-in-out infinite; }
.rci-rec__time { font-variant-numeric: tabular-nums; min-width: 40px; }
.rci-rec__hint { flex: 1; font-weight: 500; opacity: .75; }
.rci-rec__cancel { background: none; border: 0; color: #000; display: inline-flex; padding: 4px; cursor: pointer; }
.rci-rec__send { background: #000; color: #FCF600; border: 0; border-radius: 999px; padding: 8px 18px; font: inherit; font-weight: 700; cursor: pointer; }
@keyframes rci-rec-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

/* ── @-tags: the suggestion list and the highlighted names ── */
.mention-menu { position: fixed; z-index: 100001; background: #fff; color: #000; border: 1px solid rgba(0,0,0,.15); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); overflow: hidden; }
.mention-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.mention-menu__item.is-active, .mention-menu__item:hover { background: #FCF600; }
.mention-menu__item--all > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.mention-menu__item--all small { font-size: 12px; color: var(--text-secondary, #606060); }
.mention-menu__all { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; background: linear-gradient(135deg, #ff2d87, #7c3aed); }
.mention { font-weight: 700; background: rgba(252,246,0,.55); border-radius: 4px; padding: 0 2px; }

/* ── Invite page: what the link brought ── */
.inv-stats { margin: 16px 0; padding: 14px; border-radius: 16px; background: #FCF600; color: #000; }
.inv-stats h3 { margin: 0 0 10px; font-size: 1.05rem; }
.inv-stats__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.inv-stats__grid div { background: rgba(255,255,255,.7); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; }
.inv-stats__grid b { font-size: 1.4rem; line-height: 1.1; }
.inv-stats__grid span { font-size: .8125rem; }
.inv-stats__week { margin: 10px 0 0; font-size: .8125rem; }
.inv-stats__recent summary { cursor: pointer; font-weight: 700; margin-top: 8px; }
.inv-stats__recent ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .8125rem; }
.inv-privacy { margin: 8px 0 0; font-size: .8125rem; opacity: .75; }

/* ── Chat: photos and videos open large, documents can be saved, sender names open profiles ─────────────────── */
.wa-media--open { position: relative; cursor: pointer; }
.wa-media--open .wa-media__el { display: block; width: 100%; max-height: 300px; object-fit: cover; background: #000; }
.wa-media__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.wa-media__play svg { width: 48px; height: 48px; padding: 11px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; }
.wa-sender[data-profile-id] { cursor: pointer; }
.wa-sender[data-profile-id]:hover { text-decoration: underline; }
.grp-member[data-member] { cursor: pointer; }
.wa-file { display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 280px; padding: 8px; margin: -3px -5px 4px; border-radius: 8px; background: rgba(0,0,0,.06); }
.wa-file__icon { flex: none; min-width: 42px; height: 42px; padding: 0 4px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #111; color: #FCF600; font-weight: 700; font-size: 11px; letter-spacing: .02em; }
.wa-file__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wa-file__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-file__size { font-size: 12px; opacity: .65; }
.wa-file__save { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #111; color: #FCF600; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* Full-screen photo / video viewer (modules/_shared/mediaViewer.js) */
.mv { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.96); color: #fff; display: flex; flex-direction: column; }
.mv__bar { display: flex; align-items: center; justify-content: space-between; padding: max(10px, env(safe-area-inset-top)) 12px 10px; }
.mv__count { font-size: 14px; opacity: .8; }
.mv__btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mv__stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: auto; }
.mv__media { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .2s; }
img.mv__media { cursor: zoom-in; }
.mv__media--zoom { transform: scale(2.2); cursor: zoom-out; }
.mv__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }
.mv__nav--prev { left: 0; border-radius: 0 12px 12px 0; }
.mv__nav--next { right: 0; border-radius: 12px 0 0 12px; }
.mv__nav[hidden] { display: none; }

/* Incoming call: big Accept / Decline that fill the screen, easy to hit with a thumb */
.gc-incoming { padding: max(12vh, 56px) 24px max(40px, env(safe-area-inset-bottom)); box-sizing: border-box; }
.gc-incoming__name { font-size: 1.75rem; text-align: center; }
.gc-incoming__type { color: rgba(255,255,255,.7); font-size: 1rem; }
.gc-incoming__actions { margin-top: auto; width: 100%; max-width: 420px; display: flex; justify-content: space-between; padding: 0 12px; }
.gc-incoming__labels { width: 100%; max-width: 420px; display: flex; justify-content: space-between; padding: 0 12px; font-size: 1rem; font-weight: 700; }
.gc-incoming__labels span { width: 96px; text-align: center; }
.gc-round-btn--xl { width: 96px; height: 96px; }
.gc-round-btn--xl svg { width: 42px; height: 42px; }
.wa-fwd-btn { position: absolute; top: 2px; right: 30px; background: rgba(0,0,0,.08); border: 0; border-radius: 50%; width: 22px; height: 22px; font-size: 12px; line-height: 22px; cursor: pointer; color: inherit; opacity: .55; padding: 0; }
.wa-fwd-btn:hover, .wa-fwd-btn:focus { opacity: 1; }
.mv__right { display: flex; gap: 8px; }

/* Battle: countdown to the start + Add to Google Calendar */
.bs-countdown { margin: var(--space-5, 16px) 0 var(--space-3, 10px); padding: 14px 12px; border-radius: 14px; background: #111; color: #fff; text-align: center; }
.bs-countdown__label { display: block; font-size: 13px; opacity: .75; margin-bottom: 8px; }
.bs-countdown__cells { display: flex; justify-content: center; gap: 10px; }
.bs-countdown__cell { min-width: 62px; padding: 8px 6px; border-radius: 10px; background: rgba(255,255,255,.1); display: flex; flex-direction: column; align-items: center; }
.bs-countdown__cell b { font-size: 26px; line-height: 1.1; color: #FCF600; font-variant-numeric: tabular-nums; }
.bs-countdown__cell small { font-size: 11px; opacity: .7; }
.bs-countdown.is-soon .bs-countdown__cell b { animation: bs-cd-pulse 1s ease-in-out infinite; }
.bs-countdown__now { font-weight: 700; color: #FCF600; }
.bs-addcal { margin-top: 6px; }
.bs-addcal__hint { text-align: center; margin: 6px 0 0; }
@keyframes bs-cd-pulse { 50% { opacity: .55; } }

/* Links in messages and comments */
.msg-link { color: #0b57d0; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; word-break: break-word; cursor: pointer; }
.msg-link:hover { text-decoration-thickness: 2px; }
.wa-bubble, .yt-chat-msg__text, .wa-quote__text { overflow-wrap: anywhere; }

/* Chat message menu (the ⌄ on a bubble), reactions, pinned bar, starred / deleted messages */
.wa-menu-btn { position: absolute; top: 1px; right: 3px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .45; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.wa-menu-btn:hover, .wa-menu-btn:focus-visible { opacity: 1; background: rgba(0,0,0,.08); }
.wa-bubble:hover .wa-menu-btn { opacity: .8; }
.wa-bubble .wa-quote, .wa-bubble .wa-sender { padding-right: 20px; }
.wa-menu { position: fixed; z-index: 10001; width: 248px; max-width: calc(100vw - 16px); background: #fff; color: #111; border-radius: 16px; box-shadow: 0 6px 28px rgba(0,0,0,.28); padding: 8px 0; overflow: hidden; }
.wa-menu__react { display: flex; justify-content: space-between; gap: 2px; padding: 4px 10px 8px; border-bottom: 1px solid rgba(0,0,0,.08); }
.wa-menu__react button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; }
.wa-menu__react button:hover, .wa-menu__react button.is-on { background: #FCF600; }
.wa-menu__item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 16px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.wa-menu__item:hover { background: rgba(252,246,0,.35); }
.wa-menu__icon { width: 22px; text-align: center; font-size: 17px; }
.wa-menu__sep { height: 1px; margin: 4px 0; background: rgba(0,0,0,.1); }
.wa-menu__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; padding: 8px; max-height: 260px; overflow-y: auto; }
.wa-menu__grid button { height: 38px; border: 0; border-radius: 8px; background: transparent; font-size: 22px; cursor: pointer; }
.wa-menu__grid button:hover { background: #FCF600; }
.wa-reactions { position: absolute; right: 10px; bottom: -13px; display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px; border: 1px solid rgba(0,0,0,.12); border-radius: 999px; background: #fff; color: #111; font-size: 14px; line-height: 20px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.wa-reactions.is-mine { border-color: #111; }
.wa-reactions__n { font-size: 12px; margin-left: 2px; }
.wa-row:has(.wa-reactions) { margin-bottom: 16px; }
.wa-star, .wa-pin { margin-right: 4px; font-size: 11px; }
.wa-deleted { font-style: italic; opacity: .65; }
.wa-pinbar { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid rgba(0,0,0,.1); background: #fffde0; color: #111; font: inherit; text-align: left; cursor: pointer; }
.wa-pinbar[hidden] { display: none; }
.wa-pinbar__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-pinbar__n { font-size: 12px; opacity: .65; }

/* Battle countdown: the most visible thing on a scheduled battle. The one place text is bigger than 14px, on purpose
   (the digits are a clock, not a sentence) — the selector is more specific than the global 14px rule. */
.bs-countdown { margin: 12px 0 10px; padding: 18px 12px 14px; border-radius: 18px; border: 2px solid #FCF600; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.bs-countdown .bs-countdown__label { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #FCF600; margin-bottom: 10px; }
.bs-countdown .bs-countdown__cells { gap: 8px; }
.bs-countdown .bs-countdown__cell { flex: 1 1 0; max-width: 84px; min-width: 0; padding: 10px 4px 8px; background: rgba(255,255,255,.12); }
.bs-countdown .bs-countdown__cell b { font-size: 34px !important; line-height: 1.05; font-weight: 700; letter-spacing: .01em; }
.bs-countdown .bs-countdown__cell small { font-size: 12px !important; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.bs-countdown .bs-countdown__when { display: block; margin-top: 10px; opacity: .85; }
.bs-countdown.is-soon { background: #1a0000; border-color: #ff3b30; }
.bs-countdown.is-soon .bs-countdown__label { color: #ff6a5f; }
.bs-countdown.is-now { border-color: #ff3b30; padding: 14px 12px; }
.bs-addcal-row { display: flex; gap: 8px; }
.bs-addcal-row .bs-addcal { flex: 1 1 0; margin: 0; }
.bs-addcal-row #bs-add-cal { flex: 1.6 1 0; }
.bs-vs__status--soon { background: #FCF600 !important; color: #111 !important; font-weight: 700; }

/* In-chat camera (modules/_shared/chatCamera.js) */
.cc-cam { position: fixed; inset: 0; z-index: 10002; background: #000; color: #fff; display: flex; flex-direction: column; }
.cc-cam__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.cc-cam__video.is-mirrored { transform: scaleX(-1); }
.cc-cam__video[hidden], .cc-cam__review[hidden], .cc-cam__bottom[hidden], .cc-cam__sendbar[hidden], .cc-cam__timer[hidden] { display: none; }
.cc-cam__review { position: absolute; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; }
.cc-cam__review img, .cc-cam__review video { max-width: 100%; max-height: 100%; object-fit: contain; }
.cc-cam__top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: max(12px, env(safe-area-inset-top)) 14px 12px; }
.cc-cam__btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 20px; cursor: pointer; }
.cc-cam__timer { padding: 4px 10px; border-radius: 999px; background: #e0245e; font-weight: 700; }
.cc-cam__bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.cc-cam__modes { display: flex; gap: 6px; }
.cc-cam__modes button { padding: 6px 16px; border: 0; border-radius: 999px; background: rgba(255,255,255,.18); color: #fff; cursor: pointer; }
.cc-cam__modes button.is-on { background: #FCF600; color: #111; font-weight: 700; }
.cc-cam__shutter { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: rgba(255,255,255,.25); cursor: pointer; }
.cc-cam__shutter.is-video { background: #e0245e; }
.cc-cam__shutter.is-recording { background: #e0245e; border-radius: 22px; transform: scale(.8); }
.cc-cam__sendbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; justify-content: space-between; gap: 12px; padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.cc-cam__again, .cc-cam__send { flex: 1; padding: 14px; border: 0; border-radius: 999px; font-weight: 700; cursor: pointer; }
.cc-cam__again { background: rgba(255,255,255,.2); color: #fff; }
.cc-cam__send { background: #FCF600; color: #111; }

/* Live watch page on a phone: the chat gets the screen, like YouTube live — the details fold into one line
   (tap it to open them), and the action buttons sit in one swipeable row. */
@media (max-width: 767px) {
  .yt-live__info { max-height: 30vh; max-height: 30dvh; }
  .yt-live__actions { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .yt-live__actions::-webkit-scrollbar { display: none; }
  .yt-live__actions > * { flex: 0 0 auto; }
  .yt-live__desc { cursor: pointer; }
  .yt-live__desc:not(.is-open) > :not(.watch-page__description-meta) { display: none !important; }
  .yt-live__desc .watch-page__description-meta::after { content: ' ▾'; opacity: .6; }
  .yt-live__desc.is-open .watch-page__description-meta::after { content: ' ▴'; }
  .yt-live__chat-list { padding: 6px 10px; gap: 4px; }
}

/* Live concert page — the Figma "Concert" layout: header with back / title / people + share, the video, the artist's
   name big and centred, the audience count with "Live", then Comments as chat bubbles and the comment box. */
.cn-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.cn-head__back, .cn-head__icon { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.cn-head__back svg, .cn-head__icon svg { width: 24px; height: 24px; }
.cn-head__title { flex: 1; min-width: 0; margin: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-head__actions { display: flex; gap: 2px; }
.cn-artist__name { text-align: center; font-weight: 700; margin: 14px 0 8px !important; cursor: pointer; }
.cn-artist__live { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 10px; }
.cn-viewers { min-width: 40px; height: 40px; padding: 0 8px; border-radius: 999px; background: #111; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.cn-live-label { display: inline-flex; align-items: center; gap: 6px; color: #b3261e; font-weight: 700; }
.cn-live .yt-live__chat-head { justify-content: center; border-bottom: 0; }
.cn-comments-title { font-weight: 700; }
.cn-live .yt-live__chat { background: transparent; }
.cn-msg { display: flex; flex-direction: column; max-width: 82%; margin: 6px 0; }
.cn-msg--mine { margin-left: auto; align-items: flex-end; }
.cn-msg__meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; opacity: .75; padding: 0 4px 2px; }
.cn-msg--mine .cn-msg__meta { align-self: stretch; }
.cn-msg__bubble { padding: 9px 14px; border-radius: 16px 16px 16px 4px; background: rgba(0,0,0,.08); color: inherit; overflow-wrap: anywhere; }
.cn-msg--mine .cn-msg__bubble { border-radius: 16px 16px 4px 16px; background: #FCF600; color: #111; }
.cn-msg__sticker { font-size: 28px; line-height: 1.1; }
.cn-msg__media { margin-top: 4px; max-width: 220px; }
@media (max-width: 767px) {
  .cn-live .yt-live__main { display: contents; }
  .cn-live .cn-head { order: 0; flex: 0 0 auto; }
  .cn-live .yt-live__info { max-height: 22vh; max-height: 22dvh; }
  .cn-live .yt-live__meta .watch-page__channel-name, .cn-live .yt-live__meta .watch-page__subs { display: none; }
}

/* Battle invite summary: start / end time, rounds and minutes are tappable and look it */
.bs-info__block--edit { position: relative; width: 100%; padding: 10px 12px; border: 1px dashed var(--border-strong, rgba(0,0,0,.25)); border-radius: 12px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.bs-info__change { position: absolute; right: 12px; top: 10px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.bs-info__pair .bs-info__pick { padding: 10px 12px; border: 1px dashed var(--border-strong, rgba(0,0,0,.25)); border-radius: 12px; flex: 1; }
.bs-info__pair { gap: 10px; }
.bs-ad--house .bs-ad__logo { background: #FCF600; padding: 3px; }

/* Sponsor a Battle (/sponsor) and the "Presented by" line on a battle */
.sp-page { max-width: 640px; margin: 0 auto; padding: var(--space-4) var(--space-4) var(--space-10); }
.sp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sp-head h1 { margin: 0; flex: 1; }
.sp-back { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.sp-back svg { width: 24px; height: 24px; }
.sp-intro { margin: 4px 0 14px; opacity: .8; }
.sp-form { display: flex; flex-direction: column; gap: 12px; }
.sp-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.sp-form label .form-input { font-weight: 400; }
.sp-packages { display: flex; flex-direction: column; gap: 8px; }
.sp-package { position: relative; display: flex !important; flex-direction: column; gap: 2px !important; padding: 12px 14px 12px 40px; border: 2px solid var(--border-default); border-radius: 14px; cursor: pointer; font-weight: 400 !important; }
.sp-package input { position: absolute; left: 14px; top: 14px; accent-color: #111; }
.sp-package b { font-weight: 700; }
.sp-package.is-on { border-color: #FCF600; background: rgba(252,246,0,.18); }
.sp-logo { display: flex; align-items: center; gap: 12px; font-weight: 400; }
.sp-logo__box { width: 56px; height: 56px; border-radius: 12px; border: 1px dashed var(--border-strong, rgba(0,0,0,.3)); display: flex; align-items: center; justify-content: center; overflow: hidden; opacity: .8; }
.sp-logo__box img { width: 100%; height: 100%; object-fit: cover; }
.sp-fine { text-align: center; opacity: .65; margin: 0; }
.sp-mine { margin-top: 28px; }
.sp-mine ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sp-mine li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border-default); border-radius: 12px; }
.sp-status { padding: 2px 10px; border-radius: 999px; background: rgba(0,0,0,.08); }
.sp-status--approved { background: #FCF600; color: #111; font-weight: 700; }
.sp-mine a { text-decoration: underline; cursor: pointer; }
.sp-done { text-align: center; padding: 40px 8px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.sp-done__tick { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; background: #FCF600; color: #111; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 700; }
.bs-presented { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.bs-presented img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.bs-ad--sponsor { cursor: pointer; }

/* Sponsor event report */
.rp-title { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 14px; }
.rp-title span { opacity: .75; }
.rp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.rp-grid div { border: 1px solid var(--border-default); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; }
.rp-grid b { font-size: 28px !important; line-height: 1.1; }
.rp-grid span { opacity: .75; }
.rp-bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; margin: 6px 0; border-radius: 12px; overflow: hidden; background: rgba(0,0,0,.05); }
.rp-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(252,246,0,.55); z-index: 0; }
.rp-bar span, .rp-bar b { position: relative; z-index: 1; }
.rp-winner { margin-top: 8px; }
@media print { header, nav, .bottom-nav, #rp-print, .sp-back { display: none !important; } }

/* Chat: messages waiting for the internet, and ones that could not be sent */
.wa-bubble--pending { opacity: .92; }
.wa-pending-icon { display: inline-flex; vertical-align: -2px; opacity: .65; }
.wa-bubble--failed { outline: 1px solid #e0245e; }
.wa-failed { display: block; margin-top: 4px; color: #b3261e; font-size: 13px; }
.wa-failed button { border: 0; background: transparent; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0 4px; }

/* Video page (YouTube-style): meta line, comments card, "more videos" list, and the Ask sheet */
.yt-watch__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin: -6px 0 12px; opacity: .8; }
.yt-watch__more { border: 0; background: transparent; padding: 0; font-weight: 700; color: inherit; cursor: pointer; }
.watch-overlay__caption[hidden] { display: none; }
.yt-watch__ask { color: inherit; }
.yt-watch__comments { display: flex; flex-direction: column; gap: 6px; width: 100%; margin: 4px 0 14px; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--bg-elevated, rgba(0,0,0,.06)); color: inherit; text-align: left; cursor: pointer; font: inherit; }
.yt-watch__comments-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.yt-watch__comments-panel[hidden] { display: none; }
.yt-watch__comments-panel { margin-bottom: 18px; }
.yt-upnext { margin-top: 6px; }
.yt-upnext__list { display: flex; flex-direction: column; gap: 14px; }
.yt-upnext__loading { opacity: .65; padding: 8px 2px; }
.yt-upnext__item { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.yt-upnext__thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; display: block; }
.yt-upnext__thumb img, .yt-upnext__thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-upnext__text { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; }
.yt-upnext__text b { font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-upnext__text span { opacity: .7; }
@media (min-width: 900px) {
  .yt-upnext__item { flex-direction: row; align-items: flex-start; }
  .yt-upnext__thumb { width: 168px; flex: none; }
}

.ask-sheet { position: fixed; inset: 0; z-index: 10003; background: rgba(0,0,0,.4); display: flex; align-items: flex-end; justify-content: center; }
.ask-sheet__card { width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column; background: var(--bg-surface, #fff); color: var(--text-primary, #111); border-radius: 22px 22px 0 0; padding: 8px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
.ask-sheet__handle { width: 44px; height: 5px; border-radius: 3px; background: rgba(0,0,0,.2); margin: 4px auto 10px; }
.ask-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 10px; border-bottom: 1px solid var(--border-default, rgba(0,0,0,.1)); }
.ask-sheet__head h2 { margin: 0; font-weight: 700; }
.ask-sheet__x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.ask-sheet__body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 0; }
.ask-sheet__suggestions { display: flex; flex-direction: column; gap: 10px; }
.ask-sheet__suggestions[hidden] { display: none; }
.ask-sheet__chip { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border-default, rgba(0,0,0,.18)); border-radius: 18px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ask-sheet__chip:hover { background: rgba(252,246,0,.25); }
.ask-sheet__thread { display: flex; flex-direction: column; gap: 10px; }
.ask-sheet__q { align-self: flex-end; max-width: 85%; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: #FCF600; color: #111; }
.ask-sheet__a { align-self: flex-start; max-width: 92%; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: rgba(0,0,0,.07); overflow-wrap: anywhere; }
.ask-sheet__a p { margin: 0 0 8px; }
.ask-sheet__a p:last-child { margin-bottom: 0; }
.ask-sheet__a.is-pending { opacity: .6; }
.ask-sheet__items { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ask-sheet__items button { width: 100%; display: flex; flex-direction: column; text-align: left; padding: 8px 10px; border: 1px solid rgba(0,0,0,.15); border-radius: 12px; background: #fff; color: #111; font: inherit; cursor: pointer; }
.ask-sheet__items span { opacity: .7; }
.ask-sheet__fine { margin: 6px 2px 8px; text-align: center; opacity: .65; font-size: 13px; }
.ask-sheet__form { display: flex; align-items: center; gap: 8px; }
.ask-sheet__input { flex: 1; min-width: 0; padding: 14px 16px; border: 0; border-radius: 999px; background: rgba(0,0,0,.07); color: inherit; font: inherit; }
.ask-sheet__send { width: 46px; height: 46px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* Concert home — the Figma "Concert" page: header, Promoted rail, ad banner, Upcoming, Ongoing, and the round menu */
.cn-page { max-width: 720px; margin: 0 auto; padding: 8px 16px 120px; }
.cn-top { display: flex; align-items: center; gap: 6px; padding: 8px 0 12px; }
.cn-top h1 { flex: 1; margin: 0; font-weight: 700; }
.cn-top__back, .cn-top__icon { width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.cn-top__back svg { width: 26px; height: 26px; }
.cn-top__menu { position: relative; }
.cn-top__list { position: absolute; right: 0; top: 46px; z-index: 5; min-width: 180px; padding: 6px 0; background: var(--bg-surface, #fff); border: 1px solid var(--border-default, rgba(0,0,0,.12)); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.cn-top__list[hidden] { display: none; }
.cn-top__list button { display: block; width: 100%; padding: 10px 16px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cn-top__list button:hover { background: rgba(252,246,0,.3); }
.cn-section { margin-bottom: 22px; }
.cn-section h2 { margin: 6px 0 12px; font-weight: 700; }
.cn-rail { display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
.cn-rail::-webkit-scrollbar { display: none; }
.cn-empty { opacity: .65; margin: 0; }
.cn-card { flex: 0 0 82%; max-width: 360px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; }
.cn-card__media { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: #1a1a1a; }
.cn-card--framed .cn-card__media { padding: 14px; border-radius: 10px; background: linear-gradient(135deg, #cfcfd2, #8d8d92 55%, #d9d9dc); box-shadow: inset 0 0 0 3px rgba(255,255,255,.55), 0 4px 14px rgba(0,0,0,.25); }
.cn-card--framed .cn-card__media img, .cn-card--framed .cn-card__placeholder { border-radius: 4px; }
.cn-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cn-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.6); background: linear-gradient(135deg, #3a3a42, #111); }
.cn-card__badges { position: absolute; left: 14px; bottom: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.cn-card--framed .cn-card__badges { left: 28px; bottom: 26px; }
.cn-pill { padding: 6px 16px; border-radius: 999px; font-weight: 700; color: #fff; }
.cn-pill--live { background: #ff4d5e; }
.cn-pill--private { background: rgba(30,30,30,.82); font-weight: 600; }
.cn-card__meta { display: flex; gap: 12px; align-items: flex-start; }
.cn-card__avatar { flex: none; }
.cn-card__text { display: flex; flex-direction: column; min-width: 0; }
.cn-card__text b { font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cn-card__text span { opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-ad { position: relative; display: flex; align-items: center; gap: 12px; margin: 0 0 22px; padding: 14px 44px 14px 16px; border-radius: 12px; background: linear-gradient(135deg, #0b0b0f, #1d1d26); color: #fff; cursor: pointer; }
.cn-ad__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cn-ad__text small { opacity: .75; }
.cn-ad__btn { flex: none; padding: 7px 14px; border-radius: 999px; background: #fff; color: #111; font-weight: 700; }
.cn-ad__x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; cursor: pointer; }
.cn-thumb { position: relative; flex: 0 0 112px; aspect-ratio: 3 / 4; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, #3a3a42, #111); color: #fff; cursor: pointer; scroll-snap-align: start; }
.cn-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cn-thumb__name { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px; text-align: center; font-weight: 700; }
.cn-thumb__when { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 3px 6px; border-radius: 8px; background: rgba(0,0,0,.6); color: #fff; text-align: center; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-fab { position: fixed; right: 18px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.cn-fab__items { display: flex; flex-direction: column; gap: 12px; }
.cn-fab__items[hidden] { display: none; }
.cn-fab__row { display: flex; align-items: center; gap: 10px; }
.cn-fab__pill { padding: 12px 20px; border: 0; border-radius: 999px; background: #111; color: #FCF600; font-weight: 700; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.cn-fab__icon { width: 46px; height: 46px; border-radius: 50%; background: #111; color: #FCF600; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.cn-fab__main { width: 58px; height: 58px; border: 0; border-radius: 50%; background: #FCF600; color: #111; font-size: 26px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.3); display: flex; align-items: center; justify-content: center; }
@media (min-width: 900px) { .cn-card { flex-basis: 320px; } }
.cn-fab__main span { font-size: 30px !important; line-height: 1; }

/* Concert ticket screens (Figma "Purchasing Ticket" and "View Ticket") */
.tf-page { max-width: 480px; margin: 0 auto; padding: 8px 16px 40px; display: flex; flex-direction: column; gap: 14px; }
.tf-page--center { min-height: 70vh; justify-content: center; }
.tf-head { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.tf-head h1 { flex: 1; margin: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-head__back, .tf-head__spark { width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tf-lock { position: relative; display: flex; align-items: center; justify-content: center; min-height: 200px; border-radius: 6px; overflow: hidden; background: #2a2a30; color: #fff; text-align: center; padding: 20px; }
.tf-lock__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.tf-lock__text { position: relative; margin: 0; max-width: 300px; }
.tf-live { display: flex; align-items: center; justify-content: center; gap: 10px; }
.tf-live__dot { color: #b3261e; font-weight: 700; }
.tf-live__dot::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #b3261e; }
.tf-price { text-align: center; }
.tf-price b { font-size: 26px !important; }
.tf-card { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--bg-elevated, rgba(0,0,0,.06)); }
.tf-card__avatar { flex: none; width: 60px; height: 60px; border-radius: 12px; overflow: hidden; background: #FCF600; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.tf-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.tf-card__text { display: flex; flex-direction: column; gap: 10px; }
.tf-card__btn { align-self: flex-start; padding: 8px 18px; border: 0; border-radius: 999px; background: #111; color: #fff; font: inherit; cursor: pointer; }
.tf-note { text-align: center; opacity: .75; margin: 0; }
.tf-cta { width: 100%; padding: 17px; border: 0; border-radius: 999px; background: #111; color: #FCF600; font: inherit; font-weight: 700; cursor: pointer; }
.tf-cta:disabled { opacity: .5; cursor: default; }
.tf-link { border: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; padding: 10px; }
.tf-sub { margin: 0; opacity: .8; }
.tf-brands { display: flex; align-items: center; gap: 16px; }
.tf-brand--visa { color: #1a3a9c; font-weight: 800; font-style: italic; }
.tf-brand--mc { display: inline-flex; }
.tf-brand--mc i { width: 18px; height: 18px; border-radius: 50%; background: #eb001b; }
.tf-brand--mc i + i { background: #f79e1b; margin-left: -6px; opacity: .9; }
.tf-brand--disc { font-weight: 800; font-size: 12px !important; }
.tf-brand--disc b { color: #f79e1b; }
.tf-field span { display: block; margin-bottom: 4px; opacity: .8; }
.tf-field > div { padding: 14px 16px; border-radius: 12px; background: var(--bg-elevated, rgba(0,0,0,.06)); }
.tf-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tf-secure { margin: 0; text-align: center; opacity: .75; }
.tf-wait { padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.06); }
.tf-success { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.tf-success__tick { width: 100px; height: 100px; border-radius: 50%; background: #2ea84a; color: #fff; display: flex; align-items: center; justify-content: center; }
.vt-device { margin: 10px 0 18px; padding: 14px; border-radius: 28px; background: rgba(0,0,0,.08); }
.vt-photo { aspect-ratio: 16 / 9; border-radius: 16px 16px 0 0; overflow: hidden; background: #1a1a1a; display: flex; align-items: center; justify-content: center; color: #fff; }
.vt-photo img { width: 100%; height: 100%; object-fit: cover; }
.vt-paper { position: relative; padding: 20px 18px 18px; border-radius: 0 0 22px 22px; background: #fff; color: #111; }
.vt-title { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; margin-bottom: 12px; }
.vt-title b { font-weight: 700; }
.vt-dash { border-top: 2px dashed rgba(0,0,0,.25); margin: 10px 0; }
.vt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.vt-k { opacity: .6; }
.vt-r { text-align: right; }
.vt-link { color: #6b6500; text-decoration: underline; cursor: pointer; }
.vt-qr { display: flex; justify-content: center; padding: 10px 0 6px; }
.vt-qr svg { width: 210px; height: 210px; }
.vt-id { text-align: center; opacity: .6; }

/* Ticket page: chips and the listing row (Figma "Ticket Page") */
.tk-chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.tk-chip { padding: 10px 18px; border-radius: 999px; background: rgba(0,0,0,.08); }
.tk-chip--on { background: #111; color: #fff; font-weight: 700; }
.tk-listings-count { font-weight: 700; margin: 4px 0 10px; }
.tk-listing { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 0; border: 0; border-bottom: 1px solid rgba(0,0,0,.12); background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.tk-listing__icon { flex: none; width: 62px; height: 62px; border: 2px solid #111; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.tk-listing__icon svg { width: 34px; height: 34px; }
.tk-listing__text { display: flex; flex-direction: column; gap: 4px; }
.tk-listing__text b { font-size: 20px !important; font-weight: 700; }
.tk-listing__text span { opacity: .8; }

/* Settings → General (Figma "General"): two-line rows with a switch on the right */
.gn-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.gn-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gn-row__body small { opacity: .65; }
.gn-row--static { cursor: default; }
.gn-wheel { display: flex; gap: 24px; justify-content: center; margin: 12px 0; }
.gn-wheel label { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pref-zoom-fill video:fullscreen, .pref-zoom-fill :fullscreen video { object-fit: cover; }

/* Select Plan (Figma "Pricing Plan"): tabs, big plan card, feature checklist */
.sg-page { max-width: 520px; margin: 0 auto; padding: 8px 16px 40px; }
.sg-why { margin: 0 0 10px; opacity: .75; }
.sg-tabs { display: flex; gap: 8px; margin: 6px 0 14px; }
.sg-tab { padding: 8px 16px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: inherit; font: inherit; cursor: pointer; opacity: .7; }
.sg-tab.is-on { border-color: currentColor; opacity: 1; font-weight: 700; }
.sg-card { position: relative; padding: 20px; border-radius: 20px; background: #111; color: #FCF600; display: flex; flex-direction: column; gap: 4px; }
.sg-card h2 { margin: 0; font-weight: 700; }
.sg-card p { margin: 0; opacity: .8; color: #fff; }
.sg-card__active { position: absolute; right: 16px; top: 16px; padding: 4px 12px; border-radius: 999px; background: #fff; color: #111; font-weight: 700; }
.sg-card__price { margin-top: 18px; font-size: 2.2em; font-weight: 700; }
.sg-card__price span { font-size: .45em; }
.sg-h { margin: 22px 0 10px; font-weight: 700; }
.sg-list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sg-list li { display: flex; gap: 12px; font-weight: 600; }
.sg-list li::before { content: '✓'; font-weight: 700; }

/* Downloads library */
.dl-page { max-width: 640px; margin: 0 auto; padding: 8px 16px 100px; }
.dl-sub { opacity: .7; margin: 0 0 12px; }
.dl-empty { opacity: .7; margin-top: 40px; text-align: center; }
.dl-item { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.dl-item__open { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.dl-item__thumb { flex: 0 0 120px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #1a1a1a; color: #FCF600; display: flex; align-items: center; justify-content: center; }
.dl-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.dl-item__text { display: flex; flex-direction: column; min-width: 0; }
.dl-item__text b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dl-item__text small { opacity: .65; }
.dl-item__del { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 1px solid currentColor; border-radius: 999px; background: transparent; color: var(--error-500, #d32f2f); font-size: .85rem; font-weight: 600; cursor: pointer; flex: none; }
.dl-player__del { border: 0; border-radius: 999px; padding: 12px 20px; background: #d32f2f; color: #fff; font-weight: 700; cursor: pointer; }
.dl-player { position: fixed; inset: 0; z-index: 9999; background: #000; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.dl-player video, .dl-player audio { width: 100%; max-height: 80vh; }
.dl-player__x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; font-size: 20px; cursor: pointer; }

/* Live chat can be hidden and shown again (Hide chat / Show chat in its header). */
.yt-live__chat-hide { margin-left: auto; background: none; border: 0; color: var(--text-secondary); font: inherit; font-size: 0.8125rem; font-weight: 600; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.yt-live__chat.is-collapsed #chat-messages, .yt-live__chat.is-collapsed .yt-live__chat-foot, .yt-live__chat.is-collapsed #superchat-pins { display: none; }
.yt-live__chat.is-collapsed { height: auto; min-height: 0; flex: 0 0 auto; }

/* Live player full screen button and full-screen layout (like YouTube). */
.yt-live__fs { position: absolute; right: 8px; bottom: 8px; z-index: 5; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; }
.yt-live__player:fullscreen, .yt-live__player.is-fs { aspect-ratio: auto; width: 100vw; height: 100vh; border-radius: 0; background: #000; }
.yt-live__player.is-fs { position: fixed; inset: 0; z-index: 100000; }
.yt-live__player:fullscreen video, .yt-live__player.is-fs video { object-fit: contain; }

/* Switch camera (front/back) on the live picture. */
.yt-live__flip { position: absolute; top: 10px; right: 10px; z-index: 5; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; }


/* Battle Sphere: match the design more closely. */
/* The invite summary is plain text in the design (no dashed boxes, no "Change" links); tapping a row still edits it. */
.bs-info__block--edit { border: 0 !important; padding: 0 !important; border-radius: 0 !important; background: none !important; text-align: left; cursor: pointer; }
.bs-info__change { display: none !important; }
/* The Upload / Select / Send buttons must never end up behind the bottom bar on a phone. */
@media (max-width: 767px) { .bs-page:not(.bs-page--stage) { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); } }


/* Meet: pin a tile, live captions, host controls, waiting room. */
.meet-tile__pin { position: absolute; top: 8px; right: 8px; z-index: 2; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; }
.meet-tile__pin svg { width: 16px; height: 16px; }
.meet-tile.is-pinned .meet-tile__pin { background: #8ab4f8; color: #111; }
@media (hover: hover) { .meet-tile:not(.is-pinned) .meet-tile__pin { opacity: 0; transition: opacity 120ms; } .meet-tile:hover .meet-tile__pin { opacity: 1; } }
.meet--pinned .meet__grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); grid-template-rows: 1fr; grid-auto-rows: 96px; }
.meet--pinned .meet-tile.is-pinned { grid-column: 1 / -1; grid-row: 1; }
.meet__captions { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); width: min(720px, 94%); display: flex; flex-direction: column; gap: 4px; pointer-events: none; z-index: 1; }
.meet__captions p { margin: 0; padding: 6px 12px; border-radius: 8px; background: rgba(0,0,0,.72); color: #fff; font-size: .95rem; line-height: 1.35; }
.meet__captions strong { color: #8ab4f8; margin-right: 6px; }
.meet__waiting { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; text-align: center; background: rgba(17,17,17,.96); color: #fff; padding: var(--space-6); }
.meet__waiting[hidden] { display: none !important; }
.meet__waiting h2 { margin: 0 0 var(--space-2); font-size: 1.4rem; }
.meet__waiting p { margin: 0 0 var(--space-5); opacity: .8; }
.meet__waiting button { padding: 10px 22px; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; background: none; color: #fff; cursor: pointer; }
.meet__switch { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: .9rem; cursor: pointer; }
.meet__switch input { width: 18px; height: 18px; }
.meet__ring--danger { background: #5c2b2b; color: #ffb4ab; margin-left: 4px; }
.meet__knock { background: rgba(138,180,248,.12); border-radius: 10px; padding: 6px 8px; }

/* ═══ Live viewer, TikTok style ═══
   The picture fills the screen (on a computer: a phone-shaped column in the middle); the streamer, viewer count and
   title sit over the top, the chat floats over the bottom left, and the heart / gift / share buttons are a column on
   the right. The streamer's own screen (with the stream controls) keeps the normal layout. */
.yt-live--tt { position: fixed; inset: 0; z-index: var(--z-modal, 300); display: block; max-width: none; padding: 0; gap: 0; background: #000; color: #fff; overflow: hidden; height: 100vh; height: 100vh; height: 100dvh; }
@media (min-width: 768px) {
  .yt-live--tt { inset: 0 auto 0 50%; transform: translateX(-50%); width: min(100vw, calc(100vh * 9 / 16)); width: min(100vw, calc(100dvh * 9 / 16)); box-shadow: 0 0 0 100vmax #000; }
}
.yt-live--tt .yt-live__main, .yt-live--tt .yt-live__info, .yt-live--tt .yt-live__meta { display: contents; }
.yt-live--tt .yt-live__player { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; flex: none; }
.yt-live--tt .yt-live__media video { object-fit: cover; }
.yt-live--tt .yt-live__back { top: calc(12px + env(safe-area-inset-top, 0px)); left: 10px; }
/* top: the streamer and the viewer count */
.yt-live--tt .yt-live__channel { position: absolute; z-index: 6; top: calc(10px + env(safe-area-inset-top, 0px)); left: 56px; max-width: calc(100% - 150px); padding: 4px 6px 4px 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.4); gap: 8px; }
.yt-live--tt .watch-page__avatar .avatar { width: 34px; height: 34px; }
.yt-live--tt .watch-page__channel-name { color: #fff; font-size: 0.8125rem; font-weight: 600; }
.yt-live--tt .watch-page__subs { color: rgba(255, 255, 255, 0.75); font-size: 0.6875rem; }
.yt-live--tt .subscribe-pill { padding: 5px 12px; font-size: 0.75rem; border-radius: 999px; background: #fe2c55; color: #fff; border: none; }
.yt-live--tt .subscribe-pill[data-following="true"] { background: rgba(255, 255, 255, 0.25); }
.yt-live--tt .yt-live__title { position: absolute; z-index: 6; top: calc(58px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; margin: 0; font-size: 0.8125rem; font-weight: 500; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); flex: none; }
.yt-live--tt .yt-live__desc { position: absolute; z-index: 6; top: calc(16px + env(safe-area-inset-top, 0px)); right: 12px; margin: 0; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.4); color: #fff; font-size: 0.75rem; }
.yt-live--tt .yt-live__desc > *:not(.watch-page__description-meta) { display: none !important; }
.yt-live--tt .watch-page__description-meta { margin: 0; color: #fff; }
.yt-live--tt .yt-live__reactions, .yt-live--tt #invite-viewers-panel { display: none; }
/* right: heart, gift, share … */
.yt-live--tt .yt-live__actions { position: absolute; z-index: 6; right: 8px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: 10px; flex-wrap: nowrap !important; overflow: visible !important; padding: 0; }
.yt-live--tt .watch-pill-group { display: contents; }
.yt-live--tt .watch-pill { flex-direction: column; gap: 2px; width: 48px; min-height: 48px; padding: 6px 0; justify-content: center; border: none; border-radius: 24px; background: rgba(0, 0, 0, 0.38); color: #fff; font-size: 0.6875rem; line-height: 1.1; }
.yt-live--tt .watch-pill svg { width: 24px; height: 24px; }
.yt-live--tt #live-whatsapp-btn { display: none; }
.yt-live--tt .yt-superchat-btn { color: #ffd24a; }
.yt-live--tt .yt-gift-btn__emoji { font-size: 1.5rem; line-height: 1; }
/* bottom: the chat floats over the picture, the box to write sits underneath */
.yt-live--tt .yt-live__chat { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; height: 52%; min-height: 0; border: 0; border-radius: 0; background: transparent; display: flex; flex-direction: column; pointer-events: none; }
.yt-live--tt .yt-live__chat-head { position: absolute; z-index: 7; top: -30px; left: 12px; right: auto; padding: 0; border: 0; pointer-events: auto; }
.yt-live--tt .yt-live__chat-mode { display: none; }
.yt-live--tt .yt-live__chat-hide { padding: 4px 10px; border-radius: 999px; border: 0; background: rgba(0, 0, 0, 0.4); color: #fff; font-size: 0.6875rem; cursor: pointer; }
.yt-live--tt .yt-live__chat-list { padding: 0 64px 6px 12px; -webkit-mask-image: linear-gradient(transparent, #000 28%); mask-image: linear-gradient(transparent, #000 28%); }
.yt-live--tt .yt-live__pins { pointer-events: auto; border: 0; padding: 4px 12px; }
.yt-live--tt .yt-live__chat-foot { pointer-events: auto; border: 0; padding: 6px 64px calc(10px + env(safe-area-inset-bottom, 0px)) 12px; background: transparent; }
.yt-live--tt .yt-chat-msg { align-self: flex-start; max-width: 100%; padding: 3px 10px 3px 4px; margin-top: 3px; border-radius: 16px; background: rgba(0, 0, 0, 0.32); color: #fff; font-size: 0.8125rem; gap: 6px; align-items: center; }
.yt-live--tt .yt-chat-msg__name { color: #9fd7ff; font-weight: 600; margin-right: 6px; }
.yt-live--tt .yt-chat-msg--host .yt-chat-msg__name { background: #fe2c55; color: #fff; }
.yt-live--tt .yt-chat-msg__text { color: #fff; }
.yt-live--tt .yt-chat-msg--gift { background: rgba(254, 44, 85, 0.45); }
.yt-live--tt .yt-gift-emoji { font-size: 1.1rem; }
.yt-live--tt .yt-live__chat-empty { color: rgba(255, 255, 255, 0.75); text-align: left; padding: 0 0 6px; }
.yt-live--tt .yt-live__chat.is-collapsed { height: auto; }
.yt-live--tt .yt-live__chat.is-collapsed .yt-live__chat-head { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
.yt-live--tt .yt-dvr { bottom: calc(60px + env(safe-area-inset-bottom, 0px)); z-index: 6; }
.yt-live--tt .yt-live__unmute { bottom: auto; top: calc(96px + env(safe-area-inset-top, 0px)); left: 12px; }
/* hearts and gifts that float over the picture */
.tt-heart { position: absolute; z-index: 8; font-size: 1.6rem; pointer-events: none; animation: tt-heart-up 2.2s ease-out forwards; }
@keyframes tt-heart-up { 0% { opacity: 0; transform: translate(0, 0) scale(0.5); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--drift, 0px), -240px) scale(1.25); } }
.tt-gift { position: absolute; z-index: 8; left: 12px; bottom: 38%; display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 8px; border-radius: 999px; background: linear-gradient(90deg, rgba(254, 44, 85, 0.85), rgba(254, 44, 85, 0.25)); color: #fff; pointer-events: none; animation: tt-gift-in 3.6s ease-out forwards; }
.tt-gift__emoji { font-size: 2.4rem; line-height: 1; }
.tt-gift__text b { display: block; font-size: 0.8125rem; }
.tt-gift__text small { font-size: 0.6875rem; opacity: 0.9; }
@keyframes tt-gift-in { 0% { opacity: 0; transform: translateX(-60px); } 10% { opacity: 1; transform: translateX(0); } 80% { opacity: 1; transform: translateX(0) scale(1.06); } 100% { opacity: 0; transform: translateX(20px); } }
/* the gift picker */
.tt-gifts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: var(--space-3); }
.tt-gifts__item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 2px solid transparent; border-radius: 12px; background: var(--bg-elevated); color: var(--text-primary); cursor: pointer; font: inherit; }
.tt-gifts__item span { font-size: 1.9rem; line-height: 1.1; }
.tt-gifts__item b { font-size: 0.75rem; font-weight: 600; }
.tt-gifts__item small { font-size: 0.6875rem; color: var(--text-muted); }
.tt-gifts__item.is-on { border-color: #fe2c55; background: rgba(254, 44, 85, 0.08); }
.tt-gifts__item:disabled { opacity: 0.4; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .tt-heart, .tt-gift { animation-duration: 0.01s; } }
.yt-live--tt .yt-live__started { display: none; }
.yt-live--tt .yt-live__chat { top: auto; }
.yt-live--tt .watch-pill { white-space: normal; text-align: center; width: 52px; }
.yt-live--tt .watch-pill span { font-size: 0.625rem; font-weight: 600; }
.yt-live--tt .yt-live__channel { flex-wrap: nowrap; }
.yt-live--tt .yt-live__channel .subscribe-pill { white-space: nowrap; }
.yt-live--tt .yt-live__fs { display: none; }
.yt-live--tt [data-live-badge] { top: calc(18px + env(safe-area-inset-top, 0px)); right: 12px; left: auto; bottom: auto; z-index: 6; }
.yt-live--tt .yt-live__desc { top: calc(54px + env(safe-area-inset-top, 0px)); }
.yt-live--tt .yt-live__title { right: 120px; top: calc(62px + env(safe-area-inset-top, 0px)); }
.yt-live--tt .yt-live__channel { max-width: calc(100% - 140px); background: rgba(0, 0, 0, 0.45); }
/* Chat hidden = clean full-screen picture: only the way back to the chat, the heart and the back button stay. */
.yt-live--tt.yt-live--clean .yt-live__channel, .yt-live--tt.yt-live--clean .yt-live__title, .yt-live--tt.yt-live--clean .yt-live__desc,
.yt-live--tt.yt-live--clean .yt-live__pins, .yt-live--tt.yt-live--clean .yt-live__chat-foot, .yt-live--tt.yt-live--clean .yt-live__chat-list { display: none; }
.yt-live--tt.yt-live--clean .yt-live__actions .watch-pill:not(#live-like-btn) { display: none; }
.yt-live--tt.yt-live--clean .yt-live__chat { height: auto; }
.yt-live--tt .yt-live__chat.is-collapsed .yt-live__chat-head { pointer-events: auto; }
/* The "Chat as …" line is not needed over the picture; the rewind bar sits just above the box to write. */
.yt-live--tt .yt-chat-input__who { display: none; }
.yt-live--tt .yt-dvr { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); left: 12px; right: 72px; padding: 6px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); }
.yt-live--tt .yt-live__chat-list { padding-bottom: 40px; }
.yt-live--tt [data-live-badge] { z-index: 7; }
.yt-live--tt .yt-live__chat-hide { background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 255, 255, 0.35); font-weight: 600; z-index: 9; }
.yt-live--tt.yt-live--clean .yt-live__chat { position: absolute; left: 0; right: 0; bottom: 0; top: auto; height: 0; }
.yt-live--tt .yt-live__chat { overflow: visible; }

/* Meet: schedule a meeting, upcoming list. */
.mt-sched-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border: 1px solid var(--border-default); border-radius: var(--radius-full); background: var(--bg-surface); color: var(--text-primary); cursor: pointer; font: inherit; text-decoration: none; }
.mt-sched-btn svg { width: 18px; height: 18px; }
.mt-sched-btn--danger { color: var(--error-500, #d33); }
.mt-sched[hidden], [data-upcoming][hidden] { display: none; }
.mt-sched { display: flex; flex-direction: column; gap: var(--space-3); }
.mt-sched h2 { margin: 0; }
.mt-sched label { display: flex; flex-direction: column; gap: 4px; font-size: 0.8125rem; color: var(--text-secondary); }
.mt-sched input, .mt-sched select, .mt-sched textarea { padding: 10px 12px; border: 1px solid var(--border-default); border-radius: 10px; background: var(--bg-surface); color: var(--text-primary); font: inherit; }
.mt-sched__row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: var(--space-2); }
@media (max-width: 420px) { .mt-sched__row { grid-template-columns: 1fr 1fr; } .mt-sched__row label:first-child { grid-column: 1 / -1; } }
.mt-h2 { margin: 0 0 var(--space-3); font-size: 1.0625rem; }
.mt-upcoming { display: flex; flex-direction: column; gap: var(--space-2); }
.mt-up { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 12px; border: 1px solid var(--border-default); border-radius: 14px; background: var(--bg-surface); }
.mt-up__when { display: flex; flex-direction: column; min-width: 0; }
.mt-up__when span { font-size: 0.8125rem; color: var(--text-secondary); }
.mt-up__btns { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-up__btns .mt-sched-btn { height: 36px; padding: 0 12px; font-size: 0.8125rem; }

/* Meet tiles: a big, clear profile picture while the camera is off (it was a small 64px circle on a big dark tile). */
.meet-tile { container-type: size; background: radial-gradient(circle at 50% 35%, #3b3f48 0%, #1d1e22 75%); }
.meet-tile__avatar .avatar { width: 112px; height: 112px; font-size: 2.4rem; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); border: 3px solid rgba(255, 255, 255, 0.14); }
@supports (width: 1cqmin) {
  .meet-tile__avatar .avatar { width: clamp(72px, 52cqmin, 220px); height: clamp(72px, 52cqmin, 220px); font-size: clamp(1.6rem, 16cqmin, 4rem); }
}
.meet-tile.is-speaking .meet-tile__avatar .avatar { border-color: #8ab4f8; box-shadow: 0 0 0 4px rgba(138, 180, 248, 0.35), 0 6px 24px rgba(0, 0, 0, 0.45); }
.meet-tile__name { font-size: 0.875rem; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: rgba(0, 0, 0, 0.55); }
.meet-tile--self video { border-radius: inherit; }
/* Hide chat = a clean full screen like YouTube: no bars, only a few small round icons. The rewind bar and the heart
   come back for 3 seconds when you tap the picture. */
.yt-live--tt.yt-live--clean .yt-dvr { display: none; }
.yt-live--tt.yt-live--clean.yt-live--controls .yt-dvr { display: flex; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); right: 76px; }
.yt-live--tt.yt-live--clean .yt-live__actions { display: none; }
.yt-live--tt.yt-live--clean.yt-live--controls .yt-live__actions { display: flex; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.yt-live--tt.yt-live--clean .yt-live__chat-head { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: auto; right: 12px; }
.yt-live--tt.yt-live--clean .yt-live__chat-hide { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.5); border: 0; }
.yt-live--tt.yt-live--clean .yt-live__back, .yt-live--tt.yt-live--clean .yt-live__unmute { opacity: 0.85; }
.yt-live--tt.yt-live--clean [data-live-badge] { display: none; }

/* ═══ Buddy — a calm, accessible chat (WCAG-minded: 44px targets, visible focus, live region, reduced motion) ═══ */
.bd { display: flex; flex-direction: column; max-width: 720px; margin: 0 auto; height: calc(100vh - 150px); height: calc(100dvh - 150px); min-height: 460px; padding: 0 var(--space-3); }
.bd__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-3) 0; border-bottom: 1px solid var(--border-subtle, rgba(0,0,0,.08)); }
.bd__who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bd__avatar, .bd-row__av, .bd-welcome__orb { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #7c5cff, #ff5c93); flex: none; }
.bd__avatar { width: 42px; height: 42px; }
.bd__avatar svg { width: 22px; height: 22px; }
.bd__title h1 { margin: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.2; }
.bd__title p { margin: 2px 0 0; display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--text-secondary); }
.bd__dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; }
.bd__tools { display: flex; align-items: center; gap: 4px; }
.bd__help { height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid #e11d48; background: transparent; color: #e11d48; font: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer; }
.bd__icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--text-primary); cursor: pointer; }
.bd__icon svg { width: 22px; height: 22px; }
.bd__icon:hover { background: var(--bg-elevated); }
.bd button:focus-visible, .bd input:focus-visible { outline: 3px solid #7c5cff; outline-offset: 2px; }
.bd__about { margin: var(--space-3) 0 0; padding: 12px 14px; border-radius: 14px; background: var(--bg-elevated); font-size: .8125rem; line-height: 1.55; color: var(--text-secondary); }
.bd__about p { margin: 0 0 8px; } .bd__about p:last-child { margin: 0; }
.bd__about[hidden] { display: none; }
.bd__log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: var(--space-4) 0; overscroll-behavior: contain; }
.bd__status { min-height: 1.25em; font-size: .75rem; font-weight: 600; color: #7c5cff; }
.bd__form { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 16px; margin-bottom: var(--space-2); border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-surface); }
.bd__input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--text-primary); padding: 8px 0; }
.bd__input:focus-visible { outline: 0; }
.bd__form:focus-within { border-color: #7c5cff; box-shadow: 0 0 0 3px rgba(124, 92, 255, .18); }
.bd__send { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: linear-gradient(135deg, #7c5cff, #ff5c93); color: #fff; cursor: pointer; flex: none; }
.bd__send svg { width: 20px; height: 20px; }
.bd-row { display: flex; align-items: flex-end; gap: 8px; }
.bd-row--me { justify-content: flex-end; }
.bd-row__av { width: 30px; height: 30px; } .bd-row__av svg { width: 16px; height: 16px; }
.bd-bubble { max-width: min(82%, 520px); padding: 10px 14px; border-radius: 20px; font-size: .9375rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bd-bubble--me { background: linear-gradient(135deg, #7c5cff, #6a4be6); color: #fff; border-bottom-right-radius: 6px; }
.bd-bubble--buddy { background: var(--bg-elevated); color: var(--text-primary); border-bottom-left-radius: 6px; }
.bd-typing { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.bd-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); animation: bd-dot 1.1s infinite ease-in-out; }
.bd-typing i:nth-child(2) { animation-delay: .15s; } .bd-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bd-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .4; } 40% { transform: translateY(-5px); opacity: 1; } }
.bd-welcome { margin: auto; text-align: center; padding: var(--space-4) var(--space-2); max-width: 460px; }
.bd-welcome__orb { width: 72px; height: 72px; margin-bottom: var(--space-3); box-shadow: 0 10px 30px rgba(124, 92, 255, .35); }
.bd-welcome__orb svg { width: 34px; height: 34px; }
.bd-welcome h2 { margin: 0 0 6px; font-size: 1.375rem; }
.bd-welcome p { margin: 0 0 var(--space-4); color: var(--text-secondary); font-size: .9375rem; }
.bd-moods { display: flex; justify-content: center; gap: 8px; margin-bottom: var(--space-4); flex-wrap: wrap; }
.bd-mood { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 62px; padding: 10px 8px; border: 1px solid var(--border-default); border-radius: 16px; background: var(--bg-surface); cursor: pointer; font: inherit; }
.bd-mood span { font-size: 1.6rem; line-height: 1.1; } .bd-mood small { font-size: .6875rem; color: var(--text-secondary); }
.bd-mood:hover, .bd-chip:hover { border-color: #7c5cff; background: rgba(124, 92, 255, .08); }
.bd-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bd-chip { min-height: 40px; padding: 0 16px; border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: .875rem; cursor: pointer; }
.bd-chip--solid { background: #7c5cff; border-color: #7c5cff; color: #fff; }
.bd-breath { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; background: linear-gradient(135deg, rgba(124, 92, 255, .12), rgba(255, 92, 147, .12)); max-width: min(86%, 440px); }
.bd-breath__orb { width: 56px; height: 56px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #b6a4ff, #7c5cff); transition: transform 4s ease-in-out; }
.bd-breath__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.bd-breath__text span { font-size: .75rem; color: var(--text-secondary); }
.bd-breath[data-phase="running"] .bd-breath__orb { box-shadow: 0 0 0 8px rgba(124, 92, 255, .15); }
@media (prefers-reduced-motion: reduce) { .bd-typing i { animation: none; } .bd-breath__orb { transition: none; } }
@media (min-width: 768px) { .bd { height: calc(100vh - 120px); height: calc(100dvh - 120px); } }
.bd__help { white-space: nowrap; } .bd__title p { white-space: nowrap; }

/* ═══ My Network (LinkedIn-style) ═══ */
.nw { max-width: 760px; margin: 0 auto; padding: var(--space-3) var(--space-3) var(--space-10); display: flex; flex-direction: column; gap: var(--space-3); }
.nw__top h1 { margin: 0 0 var(--space-3); font-size: 1.375rem; font-weight: 700; }
.nw__search { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-surface); color: var(--text-secondary); }
.nw__search svg { width: 18px; height: 18px; flex: none; }
.nw__search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--text-primary); }
.nw__search:focus-within { border-color: var(--primary-600); box-shadow: 0 0 0 3px rgba(0, 0, 0, .06); }
.nw__search--small { height: 38px; margin-bottom: var(--space-3); }
.nw-card { background: var(--bg-surface); border: 1px solid var(--border-subtle, rgba(0,0,0,.08)); border-radius: 14px; padding: var(--space-4); }
.nw-card__title { margin: 0 0 var(--space-3); font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.nw-card__title span { font-size: .8125rem; font-weight: 600; color: var(--text-secondary); }
.nw-empty { margin: 0; color: var(--text-secondary); font-size: .9375rem; }
.nw-summary { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); padding: var(--space-2); }
.nw-summary__item { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border: 0; border-radius: 10px; background: transparent; color: var(--text-primary); font: inherit; cursor: pointer; }
.nw-summary__item:hover { background: var(--bg-elevated); }
.nw-summary__item svg { width: 22px; height: 22px; }
.nw-summary__badge { min-width: 26px; height: 26px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--primary-800, #222); color: #fff; font-size: .8125rem; font-weight: 700; }
.nw-list { display: flex; flex-direction: column; }
.nw-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border-subtle, rgba(0,0,0,.08)); }
.nw-row:first-child { border-top: 0; padding-top: 0; }
.nw-row[hidden] { display: none; }
.nw-row__av { flex: none; display: inline-flex; }
.nw-row__av .avatar { width: 52px; height: 52px; }
.nw-row__text { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.nw-row__name { font-weight: 700; font-size: .9375rem; color: var(--text-primary); text-decoration: none; }
.nw-row__name:hover { text-decoration: underline; }
.nw-row__meta { font-size: .8125rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-row__mutual { font-size: .75rem; color: var(--text-muted); }
.nw-row__actions { display: flex; align-items: center; gap: 8px; flex: none; }
.nw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 999px; font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; border: 1.5px solid transparent; white-space: nowrap; }
.nw-btn svg { width: 16px; height: 16px; }
.nw-btn--outline { background: transparent; color: var(--primary-800, #222); border-color: var(--primary-800, #222); }
.nw-btn--outline:hover { background: rgba(0, 0, 0, .05); }
.nw-btn--ghost { background: transparent; color: var(--text-secondary); border-color: var(--border-default); }
.nw-btn:disabled { opacity: .5; cursor: default; }
.nw-round { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: transparent; cursor: pointer; border: 1.5px solid var(--border-default); }
.nw-round svg { width: 18px; height: 18px; }
.nw-round--no { color: var(--text-secondary); } .nw-round--no:hover { background: var(--bg-elevated); }
.nw-round--yes { color: var(--primary-800, #222); border-color: var(--primary-800, #222); } .nw-round--yes:hover { background: rgba(0, 0, 0, .06); }
.nw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
@media (min-width: 640px) { .nw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.nw-tile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 12px 12px; border: 1px solid var(--border-default); border-radius: 12px; overflow: hidden; background: var(--bg-surface); }
.nw-tile__cover { align-self: stretch; height: 56px; margin: 0 -12px; background: linear-gradient(135deg, #cfd8dc, #90a4ae) center / cover; }
.nw-tile__x { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; cursor: pointer; }
.nw-tile__x svg { width: 14px; height: 14px; }
.nw-tile__av { margin-top: -34px; display: inline-flex; border-radius: 50%; border: 3px solid var(--bg-surface); background: var(--bg-surface); }
.nw-tile__av .avatar { width: 72px; height: 72px; font-size: 1.5rem; }
.nw-tile__name { margin-top: 8px; font-weight: 700; font-size: .9375rem; color: var(--text-primary); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-tile__headline { margin: 2px 0 0; min-height: 2.6em; font-size: .8125rem; color: var(--text-secondary); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nw-tile__reason { margin: 8px 0 10px; display: flex; align-items: center; gap: 6px; min-height: 1.2em; font-size: .75rem; color: var(--text-muted); }
.nw-tile__reason svg { width: 14px; height: 14px; }
.nw-tile .nw-btn { width: 100%; }
.nw-tile__reason { min-height: 2.6em; align-items: flex-start; text-align: left; } .nw-tile .nw-btn { margin-top: auto; } .nw-grid { align-items: stretch; }


/* ═══ Social, X style: For you / Following, a write box at the top, flat posts with a thin line between them, a round post button ═══ */
.x { max-width: 600px; margin: 0 auto; border-left: 1px solid var(--border-subtle, rgba(0,0,0,.1)); border-right: 1px solid var(--border-subtle, rgba(0,0,0,.1)); min-height: 100%; background: var(--bg-surface); }
@media (max-width: 640px) { .x { border-left: 0; border-right: 0; } }
.x-tabs { position: sticky; top: 0; z-index: 5; display: flex; background: var(--bg-surface); background: color-mix(in srgb, var(--bg-surface) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-subtle, rgba(0,0,0,.1)); }
.x-tab { position: relative; flex: 1; height: 53px; border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: .9375rem; font-weight: 500; cursor: pointer; }
.x-tab:hover { background: var(--bg-elevated); }
.x-tab span { position: relative; display: inline-block; padding: 16px 0; }
.x-tab.is-active { color: var(--text-primary); font-weight: 700; }
.x-tab.is-active span::after { content: ''; position: absolute; left: -2px; right: -2px; bottom: 0; height: 4px; border-radius: 999px; background: #FCF600; }
.x-live { display: flex; gap: 14px; overflow-x: auto; padding: 12px 16px; border-bottom: 1px solid var(--border-subtle, rgba(0,0,0,.1)); }
.x-compose { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-subtle, rgba(0,0,0,.1)); }
.x-compose__av { flex: none; }
.x-compose__form { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.x-compose__form textarea { width: 100%; resize: none; overflow: hidden; border: 0; outline: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: 1.25rem; line-height: 1.4; padding: 6px 0 12px; min-height: 44px; }
.x-compose__form textarea::placeholder { color: var(--text-muted); }
.x-compose__preview { position: relative; max-width: 100%; margin-bottom: 8px; }
.x-compose__preview img, .x-compose__preview video { width: 100%; max-height: 380px; object-fit: cover; border-radius: 16px; }
.x-compose__preview button { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.x-compose__preview button svg { width: 16px; height: 16px; }
/* Opens the post editor again (filter, frame, crop, text: modules/_shared/postEditor.js). */
.x-compose__preview .x-compose__edit { top: auto; right: auto; left: 8px; bottom: 12px; width: auto; height: 34px; padding: 0 14px; border-radius: 999px; font-weight: 600; }
.x-compose__bar { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border-subtle, rgba(0,0,0,.08)); padding-top: 10px; }
.x-ic { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--gv-link); cursor: pointer; }
.x-ic:hover { background: rgba(252, 246, 0, .18); }
.x-ic .post-icon { width: 20px; height: 20px; }
.x-compose__count { margin-left: auto; font-size: .8125rem; color: var(--text-secondary); min-width: 24px; text-align: right; }
.x-compose__count.is-over { color: #f4212e; font-weight: 700; }
.x-post-btn { height: 36px; padding: 0 18px; border: 0; border-radius: 999px; background: #0f1419; color: #fff; font: inherit; font-weight: 700; font-size: .9375rem; cursor: pointer; }
.x-post-btn:disabled { opacity: .5; cursor: default; }
.x-post-btn--sm { height: 32px; padding: 0 14px; font-size: .875rem; }
@media (prefers-color-scheme: dark) { .x-post-btn { background: #eff3f4; color: #0f1419; } }
.x-feed { display: flex; flex-direction: column; }
.xp { padding: 12px 16px 4px; border-bottom: 1px solid var(--border-subtle, rgba(0,0,0,.1)); }
.xp:hover { background: color-mix(in srgb, var(--bg-elevated) 45%, transparent); }
.xp__banner { display: flex; align-items: center; gap: 8px; margin: 0 0 2px 36px; font-size: .8125rem; font-weight: 700; color: var(--text-secondary); }
.xp__banner .post-icon { width: 14px; height: 14px; }
.xp__row { display: flex; gap: 12px; }
.xp__av { flex: none; cursor: pointer; align-self: flex-start; }
.xp__main { flex: 1; min-width: 0; }
.xp__head { display: flex; align-items: baseline; gap: 4px; min-width: 0; font-size: .9375rem; }
.xp__name { font-weight: 700; color: var(--text-primary); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.xp__name:hover { text-decoration: underline; }
.xp__handle, .xp__dot, .xp__time { color: var(--text-secondary); white-space: nowrap; }
.xp__handle { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.xp__more { margin-left: auto; align-self: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.xp__more:hover { background: rgba(252, 246, 0, .18); color: var(--gv-link); }
.xp__more svg { width: 18px; height: 18px; }
.xp__text { margin: 2px 0 8px; font-size: .9375rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-primary); }
.xp-tag, .xp-link, .xp__text .mention { color: var(--gv-link); font-weight: 600; text-decoration: none; }
.xp-tag:hover, .xp-link:hover { text-decoration: underline; }
.xp__media { margin: 4px 0 8px; border: 1px solid var(--border-subtle, rgba(0,0,0,.1)); border-radius: 16px; overflow: hidden; }
.xp__media img, .xp__media video { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.xp__quote { margin: 4px 0 8px; padding: 10px 12px; border: 1px solid var(--border-default); border-radius: 16px; cursor: pointer; }
.xp__quote-head { display: flex; align-items: center; gap: 6px; font-size: .875rem; }
.xp__quote-head span { color: var(--text-secondary); }
.xp__quote--gone { color: var(--text-secondary); cursor: default; }
.xp__actions { display: flex; justify-content: space-between; max-width: 420px; margin: 0 0 2px -8px; }
.xp__act { display: inline-flex; align-items: center; gap: 4px; min-width: 52px; height: 36px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--text-secondary); font: inherit; font-size: .8125rem; cursor: pointer; }
.xp__act .post-icon { width: 19px; height: 19px; display: inline-flex; }
.xp__act:hover { color: var(--gv-link); background: rgba(252, 246, 0, .18); }
.xp__act.repost-btn:hover { color: #00ba7c; background: rgba(0, 186, 124, .1); }
.xp__act.like-btn:hover, .xp__act.like-btn.is-liked { color: #f91880; background: rgba(249, 24, 128, .1); }
.xp__replies { margin: 6px 0 10px; padding-top: 8px; border-top: 1px solid var(--border-subtle, rgba(0,0,0,.08)); }
.xp__replies[hidden] { display: none; }
.xp__replies .comment-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.xp__replies .comment-form { display: flex; gap: 8px; align-items: flex-end; }
.xp__replies .comment-input { flex: 1; border: 1px solid var(--border-default); border-radius: 18px; padding: 8px 12px; font: inherit; background: var(--bg-surface); color: var(--text-primary); resize: none; }
.x-empty { padding: 48px 32px; text-align: center; }
.x-empty h2 { margin: 0 0 8px; font-size: 1.5rem; }
.x-empty p { margin: 0 0 20px; color: var(--text-secondary); }
.x-fab { position: fixed; right: 18px; bottom: calc(var(--bottom-nav-height, 67px) + 22px + env(safe-area-inset-bottom, 0px)); z-index: 20; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: #FCF600; color: #111; box-shadow: 0 6px 18px rgba(201, 168, 0, .45); cursor: pointer; }
.x-fab svg { width: 26px; height: 26px; }
.x-fab:active { transform: scale(.95); }
@media (min-width: 768px) { .x-fab { right: calc(50% - 300px + 16px); } }
#main-content:has(.x-fab), .page-enter:has(.x-fab) { transform: none !important; animation: none !important; }


/* ═══ Shorts, TikTok style: Following | For You on top, the heart / comments / save / share column on the right with the
   creator's round picture and a + to follow, @name and caption bottom left, a spinning disc, a thin progress line ═══ */
.tt-top { position: absolute; z-index: 12; top: 8px; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 22px; padding: 0 56px; pointer-events: none; }
.tt-top__tab { pointer-events: auto; position: relative; padding: 8px 2px; border: 0; background: transparent; color: rgba(255, 255, 255, .65); font: inherit; font-size: 1.0625rem; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); cursor: pointer; }
.tt-top__tab.is-active { color: #fff; }
.tt-top__tab.is-active::after { content: ''; position: absolute; left: 20%; right: 20%; bottom: 0; height: 3px; border-radius: 2px; background: #fff; }
.tt-top__search { pointer-events: auto; position: absolute; right: 14px; top: 6px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)); cursor: pointer; }
.tt-top__search svg { width: 26px; height: 26px; }
.feed-scroller .feed-item__rail { align-items: center; gap: 14px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.feed-scroller .feed-item__rail-btn { background: transparent !important; color: #fff; gap: 2px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); }
.feed-scroller .feed-item__rail-icon svg { width: 34px; height: 34px; }
.feed-scroller .feed-item__rail-count { font-size: .75rem; font-weight: 600; color: #fff; }
.feed-scroller .feed-item__rail-btn[data-liked="true"] .feed-item__rail-icon { color: #fe2c55; }
.feed-scroller .feed-item__rail-btn.is-saved .feed-item__rail-icon { color: #ffc107; }
.feed-item__rail-profile { position: relative; margin-bottom: 8px; }
.feed-item__rail-av { padding: 0; border: 2px solid #fff; border-radius: 50%; background: #000; cursor: pointer; display: block; }
.feed-item__rail-av .avatar { width: 48px; height: 48px; }
.feed-item__rail-plus { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fe2c55; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.feed-item__rail-plus[hidden] { display: none; }
.feed-item__rail-plus svg { width: 12px; height: 12px; }
.feed-item__disc { width: 44px; height: 44px; margin-top: 6px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: radial-gradient(circle, #333 0 30%, #111 31% 100%); border: 6px solid #222; animation: tt-spin 5s linear infinite; }
.feed-item__disc .avatar { width: 24px; height: 24px; }
@keyframes tt-spin { to { transform: rotate(360deg); } }
.feed-scroller .feed-item__creator-avatar, .feed-scroller .feed-item__subscribe { display: none; }
.feed-scroller .feed-item__creator-name { font-size: 1.0625rem; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.feed-scroller .feed-item__caption { font-size: .9375rem; line-height: 1.35; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.feed-item__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .28); z-index: 6; }
.feed-item__progress i { display: block; height: 100%; width: 0; background: #fff; }
.feed-item .tt-heart { position: absolute; z-index: 9; font-size: 2.6rem; pointer-events: none; animation: tt-heart-up 2s ease-out forwards; }
@media (prefers-reduced-motion: reduce) { .feed-item__disc { animation: none; } }
.tt-top { position: fixed; top: calc(var(--topbar-height, 56px) + var(--space-2)); left: 50%; right: auto; transform: translateX(-50%); width: min(100%, 480px); z-index: var(--z-sticky, 20); }
/* Shorts fill the whole screen, like TikTok: no top bar and no speaker button (Shorts play with sound; hold the video for its options). */
.shell:has(.feed-scroller:not(.home-top-shorts)) { --topbar-height: 0px; }
/* The top icons (menu, AI, chats, people, alerts, search, Buddy, TV) stay with you in the Shorts player: on a phone they float
   over the top of the video in white on a soft shade, so the Short still fills the screen; on a computer the bar keeps its
   place. (They used to disappear, and the owner wants them always at the top.) */
@media (max-width: 767px) {
  .shell:has(.feed-scroller:not(.home-top-shorts)) .topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 30; padding-top: env(safe-area-inset-top, 0px);
    background: linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)) !important; backdrop-filter: none; border-bottom: 0; box-shadow: none;
  }
  .shell:has(.feed-scroller:not(.home-top-shorts)) .topbar .btn-icon,
  .shell:has(.feed-scroller:not(.home-top-shorts)) .topbar #sidebar-toggle { color: #fff !important; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
  .shell:has(.feed-scroller:not(.home-top-shorts)) .tt-top__search { display: none; } /* the bar has its own search */
}
@media (min-width: 768px) {
  .shell:has(.feed-scroller:not(.home-top-shorts)) { --topbar-height: 60px; }
}
/* Shorts start muted (like Instagram Reels): a speaker button at the top right turns the sound on. On a phone it sits just
   under the floating top icons. */
.feed-scroller .feed-item__mute-btn { display: flex; top: 16px; right: 12px; width: 40px; height: 40px; z-index: 8; background: rgba(0, 0, 0, .45); }
.feed-scroller .feed-item__mute-btn svg { width: 20px; height: 20px; }
@media (max-width: 767px) { .feed-scroller .feed-item__mute-btn { top: calc(env(safe-area-inset-top, 0px) + 72px); } }
.tt-top { top: calc(env(safe-area-inset-top, 0px) + var(--space-2)); }
/* Smaller writing, like TikTok: a two-line caption with "more". The Following / For You tabs are gone; only the search icon stays on top. */
.tt-top { justify-content: flex-end; padding: 0 8px; pointer-events: none; }
.feed-scroller .feed-item__creator-name { font-size: .9375rem; }
.feed-scroller .feed-item__caption { font-size: .8125rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-scroller .feed-item__caption.is-open { -webkit-line-clamp: unset; max-height: 40vh; overflow-y: auto; }
.feed-item__more-link { align-self: flex-start; padding: 0; border: 0; background: transparent; color: rgba(255, 255, 255, .85); font: inherit; font-size: .8125rem; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); cursor: pointer; }
.feed-scroller .feed-item__sound { font-size: .75rem; }

/* ═══ Chat attachments: the attach menu, the tray of what is ready to send, and location / contact cards ═══ */
.rci-tray { margin: 0 8px 6px; padding: 8px 10px 10px; border-radius: 16px; background: var(--bg-elevated); border: 1px solid var(--border-subtle, rgba(0,0,0,.08)); }
.rci-tray[hidden] { display: none; }
.rci-tray__head { display: flex; align-items: center; justify-content: space-between; font-size: .75rem; color: var(--text-secondary); margin-bottom: 8px; }
.rci-tray__clear { border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: .75rem; text-decoration: underline; cursor: pointer; }
.rci-tray__row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.rci-chip { position: relative; flex: none; display: flex; align-items: center; gap: 8px; width: 88px; height: 88px; border-radius: 12px; overflow: hidden; background: var(--bg-surface); border: 1px solid var(--border-default); }
.rci-chip img, .rci-chip video { width: 100%; height: 100%; object-fit: cover; }
.rci-chip__play { position: absolute; inset: auto 6px 6px auto; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .6); color: #fff; font-size: .6rem; }
.rci-chip__x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.rci-chip--card { width: auto; min-width: 150px; max-width: 260px; height: 88px; padding: 8px 30px 8px 10px; }
.rci-chip__icon { font-size: 1.6rem; flex: none; margin: 0 4px; }
.rci-chip__label { font-size: .75rem; line-height: 1.3; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rci-chip__map { width: 120px; height: 70px; overflow: hidden; border-radius: 8px; flex: none; pointer-events: none; }
.rci-chip__map .wa-loc__map { transform: scale(.5); transform-origin: 0 0; }
.rci-chip--add { width: 88px; justify-content: center; font-size: 1.6rem; color: var(--text-secondary); border-style: dashed; background: transparent; cursor: pointer; }
.rci-sheet { position: fixed; inset: 0; z-index: calc(var(--z-modal, 300) + 20); display: flex; align-items: flex-end; justify-content: center; }
.rci-sheet__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); }
.rci-sheet__panel { position: relative; width: min(100%, 520px); padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 22px 22px 0 0; background: var(--bg-surface); animation: rci-sheet-in 180ms ease-out; }
@keyframes rci-sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.rci-sheet__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; }
.rci-sheet__opt { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--text-primary); font: inherit; font-size: .8125rem; cursor: pointer; padding: 6px 2px; }
.rci-sheet__opt span { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.6rem; color: #fff; }
.rci-cdlg { display: flex; flex-direction: column; gap: 8px; }
.rci-cdlg__list { max-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.rci-cdlg__person { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--text-primary); font: inherit; cursor: pointer; text-align: left; }
.rci-cdlg__person:hover, .rci-cdlg__person.is-on { background: var(--bg-elevated); }
.rci-cdlg__person.is-on { outline: 2px solid #1fa971; }
.rci-cdlg__or { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }
.rci-cdlg__empty { font-size: .8125rem; color: var(--text-muted); padding: 8px; }
.wa-bubble--card { padding: 6px 6px 4px; }
.wa-loc { display: flex; flex-direction: column; gap: 6px; }
.wa-loc__map { position: relative; display: block; border-radius: 10px; overflow: hidden; background: #e8e4dc; text-decoration: none; }
.wa-loc__tile { position: absolute; inset: 0; background-size: 256px 256px; background-repeat: no-repeat; }
.wa-loc__pin { position: absolute; font-size: 1.6rem; line-height: 1; transform: translate(-50%, -92%); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.wa-loc__attr { position: absolute; right: 3px; bottom: 2px; font-size: 9px; color: #333; background: rgba(255, 255, 255, .75); padding: 0 3px; border-radius: 3px; }
.wa-loc__text { display: flex; flex-direction: column; padding: 0 4px; font-size: .875rem; }
.wa-loc__text span { font-size: .75rem; opacity: .7; }
.wa-card-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 14px; margin: 2px 4px 2px 0; border: 1px solid rgba(0, 0, 0, .15); border-radius: 999px; background: rgba(255, 255, 255, .55); color: inherit; font: inherit; font-size: .8125rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.wa-contact { min-width: 220px; padding: 4px; }
.wa-contact__head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 8px; }
.wa-contact__av { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(135deg, #7c5cff, #ff5c93); color: #fff; font-weight: 700; font-size: 1.1rem; flex: none; }
.wa-contact__text { display: flex; flex-direction: column; min-width: 0; font-size: .9375rem; }
.wa-contact__text span { font-size: .8125rem; opacity: .7; }
.wa-contact__btns { display: flex; flex-wrap: wrap; border-top: 1px solid rgba(0, 0, 0, .08); padding-top: 6px; }

/* Meet: the profile picture is a frame (a gem shape) for some people — it must keep its own square size in the People list
   and grow with the tile, instead of being stretched by the list's "fill the row" rule for text. */
.meet__person > .gem-frame, .meet__person > .avatar, .meet__person > img.avatar { flex: none; }
.meet__person > span:not(.gem-frame) { flex: 1; }
.meet-tile__avatar .gem-frame { width: 112px; height: 112px; }
@supports (width: 1cqmin) { .meet-tile__avatar .gem-frame { width: clamp(72px, 52cqmin, 220px); height: clamp(72px, 52cqmin, 220px); } }
.meet__person .gem-frame { width: 36px; height: 36px; }
.ch-intro__arrow { min-height: 56px; padding-inline: 26px; font-size: 1.0625rem; }
@media (max-height: 560px) { .avatar--intro { height: 40vh; min-height: 140px; width: min(70vw, 300px); } .ch-intro__name { font-size: 1.25rem; } }
.meet__presenting-self { height: 100%; min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 16px; background: linear-gradient(135deg, #1b2a4a, #14161c); border-radius: 14px; }
.meet__presenting-self span { opacity: .75; font-size: .875rem; }
.meet__presenting-self button { margin-top: 8px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: #e11d48; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.meet__presenting-dot { width: 12px; height: 12px; border-radius: 50%; background: #e11d48; animation: bd-dot 1.1s infinite ease-in-out; }

/* ═══ Meet — the People panel: round, equal-size pictures (framed ones keep their shape), name with a small role line ═══ */
.meet__panel-sub { margin: var(--space-4) 0 var(--space-2); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted, #8a8f98); }
.meet__person { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-radius: 12px; }
.meet__person:hover { background: rgba(255, 255, 255, .05); }
.meet__pav { flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.meet__pav .avatar, .meet__pav img.avatar, .meet__pav video.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; font-size: 1rem; }
.meet__pav .gem-frame { width: 44px; height: 44px; }
.meet__pav .gem-frame .avatar { border-radius: 0; }
.meet__who { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.meet__who strong { font-size: .9375rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meet__who small { font-size: .75rem; color: var(--text-muted, #8a8f98); }
.meet__hand { font-weight: 400; font-size: 1.1rem; }
.meet__person > i { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(225, 29, 72, .15); color: #ff6b81; }
.meet__person .meet__ring { min-height: 34px; padding: 0 14px; border-radius: 999px; font-size: .8125rem; }
@media (max-width: 480px) { .meet__person { gap: 10px; } .meet__person .meet__ring--danger { margin-left: 0; } }
.meet__person > span.meet__pav { flex: none; overflow: visible; }

/* ═══ Messages on a computer: like WhatsApp Web — the whole window is used. The chat list is a tall column on the left
   (about a third of the width), and the open chat fills everything else, instead of a small 960 × 720 box. ═══ */
@media (min-width: 900px) {
  .dm-page { max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .dm-page .dm-layout { height: calc(100vh - 150px); height: calc(100vh - 150px); height: calc(100dvh - 150px); min-height: 480px; max-height: none; border-radius: 0; border-width: 0 0 1px; box-shadow: none; background: var(--bg-surface); }
  .dm-page .dm-sidebar { width: clamp(340px, 30vw, 460px); border-right: 1px solid var(--border-default); background: var(--bg-surface); }
  .dm-page .dm-sidebar__title { text-align: left; font-size: 1.375rem; font-weight: 700; }
  .dm-page .dm-sidebar__title-row { padding: 14px 16px 6px; }
  .dm-page .dm-conv-item { padding: 12px 18px; gap: 16px; }
  .dm-page .dm-conv-item .avatar { width: 52px; height: 52px; }
  .dm-page .dm-conv-item__name { font-size: 1.0625rem; }
  .dm-page .dm-chat-pane { flex: 1; min-width: 0; }
  .dm-page .wa-header { height: 64px; padding: 0 18px; }
  .dm-page .wa-header .avatar, .dm-page .wa-avatar .avatar { width: 42px; height: 42px; }
  .dm-page .wa-bubble { max-width: min(65%, 620px); font-size: 15px; line-height: 1.45; }
  .dm-page .wa-input__row { padding: 10px 22px 16px; gap: 10px; }
  .dm-page .wa-pill { min-height: 52px; border-radius: 26px; }
  .dm-page .wa-pill__input { font-size: 16px; }
}
@media (min-width: 1500px) {
  .dm-page .dm-sidebar { width: 460px; }
  .dm-page .wa-bubble { max-width: min(60%, 680px); }
}

/* ═══ Ask AI — a modern assistant chat (WCAG-minded: 44px targets, visible focus, live region, reduced motion) ═══ */
.ai { display: flex; flex-direction: column; max-width: 820px; margin: 0 auto; height: calc(100vh - 150px); height: calc(100dvh - 150px); min-height: 460px; padding: 0 var(--space-3); }
.ai__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-3) 0; border-bottom: 1px solid var(--border-subtle, rgba(0,0,0,.08)); }
.ai__who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ai__logo, .ai-welcome__logo, .ai-av { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 30%; color: #111; background: linear-gradient(135deg, #FFF95C, #FCF600 55%, #FFB800); box-shadow: inset 0 0 0 1px rgba(26, 26, 26, .14); }
.ai__logo { width: 42px; height: 42px; } .ai__logo svg { width: 22px; height: 22px; }
.ai__title h1 { margin: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.2; }
.ai__title p { margin: 2px 0 0; font-size: .75rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai__new { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; flex: none; }
.ai__new svg { width: 18px; height: 18px; }
.ai button:focus-visible, .ai textarea:focus-visible { outline: 3px solid #7c5cff; outline-offset: 2px; }
.ai__log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: var(--space-4) 0; overscroll-behavior: contain; }
.ai-row { display: flex; gap: 10px; align-items: flex-start; }
.ai-row--me { justify-content: flex-end; }
.ai-bubble { max-width: min(82%, 560px); padding: 10px 16px; border-radius: 22px; border-bottom-right-radius: 6px; background: var(--bg-elevated); color: var(--text-primary); font-size: .9375rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-av { width: 30px; height: 30px; margin-top: 2px; } .ai-av svg { width: 16px; height: 16px; }
.ai-botcol { min-width: 0; max-width: min(92%, 640px); }
.ai-answer { font-size: .9375rem; line-height: 1.6; color: var(--text-primary); overflow-wrap: anywhere; }
.ai-answer code { padding: 1px 6px; border-radius: 6px; background: var(--bg-elevated); font-size: .875em; }
.ai-li { display: block; padding-left: 16px; position: relative; } .ai-li::before { content: '•'; position: absolute; left: 3px; }
.ai-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ai-act, .ai-copy { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer; }
.ai-act svg, .ai-copy svg { width: 15px; height: 15px; }
.ai-act { border-color: #FCF600; color: var(--gv-link); }
.ai-copy { border-color: transparent; color: var(--text-secondary); padding: 0 10px; }
.ai-copy:hover, .ai-act:hover { background: var(--bg-elevated); }
.ai-copy.is-done { color: #1fa971; }
.ai-dots { display: inline-flex; gap: 5px; align-items: center; height: 22px; }
.ai-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); animation: bd-dot 1.1s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: .15s; } .ai-dots i:nth-child(3) { animation-delay: .3s; }
.ai-welcome { margin: auto; width: 100%; max-width: 640px; text-align: center; padding: var(--space-3) 0; }
.ai-welcome__logo { width: 64px; height: 64px; margin-bottom: 12px; box-shadow: 0 10px 30px rgba(252, 200, 0, .35), inset 0 0 0 1px rgba(26, 26, 26, .14); } .ai-welcome__logo svg { width: 30px; height: 30px; }
.ai-welcome h2 { margin: 0 0 4px; font-size: 1.5rem; } .ai-welcome p { margin: 0 0 var(--space-4); color: var(--text-secondary); }
.ai-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; text-align: left; }
@media (max-width: 420px) { .ai-cards { grid-template-columns: 1fr; } }
.ai-card { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border: 1px solid var(--border-default); border-radius: 16px; background: var(--bg-surface); color: var(--text-primary); font: inherit; cursor: pointer; text-align: left; }
.ai-card:hover { border-color: #7c5cff; background: rgba(124, 92, 255, .06); }
.ai-card__icon { font-size: 1.5rem; flex: none; }
.ai-card__text { display: flex; flex-direction: column; min-width: 0; }
.ai-card__text strong { font-size: .9375rem; } .ai-card__text small { font-size: .75rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai__form { display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 18px; border: 1px solid var(--border-default); border-radius: 28px; background: var(--bg-surface); }
.ai__form:focus-within { border-color: #7c5cff; box-shadow: 0 0 0 3px rgba(124, 92, 255, .18); }
.ai__input { flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: transparent; font: inherit; font-size: 1rem; line-height: 1.45; color: var(--text-primary); padding: 9px 0; max-height: 160px; }
.ai__input:focus-visible { outline: 0; }
.ai__send { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex: none; border: 0; border-radius: 50%; background: #FCF600; color: #111; cursor: pointer; }
.ai__send:disabled { background: var(--bg-elevated); color: var(--text-muted); cursor: default; }
.ai__send svg { width: 22px; height: 22px; }
.ai__note { margin: 8px 0 var(--space-2); text-align: center; font-size: .6875rem; color: var(--text-muted); }
@media (prefers-reduced-motion: reduce) { .ai-dots i { animation: none; } }
@media (min-width: 768px) { .ai { height: calc(100vh - 120px); height: calc(100dvh - 120px); } }
@media (max-width: 480px) { .ai__new span { display: none; } .ai__new { width: 44px; padding: 0; justify-content: center; } .ai__title p { max-width: 190px; } }
.xp__text--folded { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; } .xp__more-text { margin: -2px 0 8px; padding: 0; border: 0; background: transparent; color: var(--gv-link); font: inherit; font-weight: 600; cursor: pointer; } .xp__more-text:hover { text-decoration: underline; }

/* The viewer fits the picture or video to the whole screen (small ones are scaled up, large ones down), like a post's own page. */
.mv__media { width: 100%; height: 100%; object-fit: contain; }
.mv__caption { flex: none; max-height: 28vh; overflow-y: auto; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, rgba(0,0,0,.65)); font-size: .9375rem; line-height: 1.45; }
.mv__caption strong { margin-right: 6px; } .mv__caption span { color: rgba(255,255,255,.7); }
.mv__caption p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Photos and videos in the feed open full screen when tapped (no controls inside the feed, so a tap is never a mis-tap on them). */
.xp__media img, .xp__media video { cursor: pointer; }
.xp__media { position: relative; }
.xp__expand { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 1rem; pointer-events: none; }


/* ═══ Live, a wide picture (a match, a concert, a screen): the picture keeps its shape at the top and the chat is a sheet under it,
   like YouTube Live — "Live chat" with Top messages · viewers, a settings icon and a close ✕, a welcome note, the messages as
   a plain list, a heart button, and the box to write. Closing the chat shows the details (streamer, Subscribe, like, share). ═══ */
.yt-live__chat-title, .yt-live__chat-settings, .yt-chat-notice { display: none; }
.yt-live--tt.yt-live--wide { display: flex; flex-direction: column; background: var(--bg-surface); color: var(--text-primary); }
.yt-live--wide .yt-live__player { position: relative; inset: auto; flex: none; width: 100%; height: auto; aspect-ratio: 16 / 9; order: 0; background: #000; }
.yt-live--wide .yt-live__media video { object-fit: contain; }
.yt-live--wide .yt-live__fs, .yt-live--wide [data-live-badge] { display: none; }
.yt-live--wide .yt-live__back { top: calc(8px + env(safe-area-inset-top, 0px)); }
.yt-live--wide .yt-live__unmute { top: auto; bottom: 10px; left: 10px; }
.yt-live--wide .yt-dvr { bottom: 4px; left: 8px; right: 8px; background: rgba(0, 0, 0, .35); }
/* the chat sheet */
.yt-live--wide .yt-live__chat { position: relative; inset: auto; order: 2; flex: 1; min-height: 0; height: auto; display: flex; flex-direction: column; border-radius: 18px 18px 0 0; margin-top: -10px; background: var(--bg-surface); color: var(--text-primary); box-shadow: 0 -6px 18px rgba(0, 0, 0, .18); overflow: hidden; pointer-events: auto; z-index: 7; }
.yt-live--wide .yt-live__chat-head { position: relative; inset: auto; display: flex; align-items: flex-start; gap: 4px; padding: 14px 8px 8px 16px; pointer-events: auto; }
.yt-live--wide .yt-live__chat-head::before { content: ''; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--border-default); }
.yt-live--wide .yt-live__chat-title { display: flex; flex-direction: column; flex: 1; min-width: 0; margin-top: 6px; }
.yt-live--wide .yt-live__chat-title b { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.yt-live--wide .yt-live__chat-title small { font-size: .8125rem; color: var(--text-secondary); }
.yt-live--wide .yt-live__chat-settings { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--text-primary); cursor: pointer; }
.yt-live--wide .yt-live__chat-mode { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.yt-live--wide .yt-live__chat-menu { right: 8px; left: auto; top: 56px; }
.yt-live--wide .yt-live__chat-hide { position: relative; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-primary); font-size: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.yt-live--wide .yt-live__chat-hide:not(:has(svg))::before { content: '✕'; font-size: 1.25rem; }
.yt-live--wide .yt-live__chat-hide svg { width: 22px; height: 22px; }
.yt-chat-notice { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg-elevated); color: var(--text-primary, #0f0f0f); font-size: .875rem; line-height: 1.4; } /* own text colour: on the full-screen live view the text was white on this light card */
.yt-chat-notice__logo { flex: none; width: 36px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: #e11d48; color: #fff; }
.yt-chat-notice a { color: #065fd4; font-weight: 600; text-decoration: none; }
.yt-live--wide .yt-chat-notice { display: flex; }
.yt-live--wide .yt-live__chat-list { padding: 0 16px 8px; justify-content: flex-start; -webkit-mask-image: none; mask-image: none; }
.yt-live--wide .yt-chat-msg { background: transparent; padding: 6px 0; margin: 0; border-radius: 0; gap: 12px; color: var(--text-primary); font-size: .9375rem; align-items: flex-start; }
.yt-live--wide .yt-chat-msg .avatar--xs { width: 32px; height: 32px; }
.yt-live--wide .yt-chat-msg__name { color: var(--text-secondary); font-weight: 500; }
.yt-live--wide .yt-chat-msg__text { color: var(--text-primary); }
.yt-live--wide .yt-chat-msg--gift { background: rgba(254, 44, 85, .1); border-radius: 10px; padding: 6px 8px; }
.yt-live--wide .yt-live__chat-foot { padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border-subtle, rgba(0,0,0,.08)); background: var(--bg-surface); }
/* the heart floats over the chat; while the chat is open the other buttons are in the details (close the chat to see them) */
.yt-live--wide:not(.yt-live--clean) .yt-live__channel, .yt-live--wide:not(.yt-live--clean) .yt-live__title, .yt-live--wide:not(.yt-live--clean) .yt-live__desc { display: none; }
.yt-live--wide .yt-live__actions { display: contents; }
.yt-live--wide:not(.yt-live--clean) .yt-live__actions .watch-pill:not(#live-like-btn) { display: none; }
.yt-live--wide:not(.yt-live--clean) #live-like-btn { position: fixed; right: 14px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 9; width: 52px; min-height: 52px; border-radius: 50%; background: #fff; color: #e11d48; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
/* chat closed on a wide stream: the details are shown, the chat is one tap away */
.yt-live--wide.yt-live--clean .yt-live__channel { position: static; order: 1; margin: 10px 12px 0; max-width: none; background: transparent; padding: 0; }
.yt-live--wide.yt-live--clean .yt-live__channel .watch-page__channel-name, .yt-live--wide.yt-live--clean .yt-live__title { color: var(--text-primary); text-shadow: none; }
.yt-live--wide.yt-live--clean .watch-page__subs { color: var(--text-secondary); }
.yt-live--wide.yt-live--clean .yt-live__title { position: static; order: 1; margin: 8px 12px 0; font-size: 1rem; font-weight: 600; }
.yt-live--wide.yt-live--clean .yt-live__desc { position: static; order: 1; margin: 4px 12px 0; padding: 0; background: transparent; color: var(--text-secondary); }
.yt-live--wide.yt-live--clean .yt-live__actions { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; position: static; order: 1; margin: 12px 12px 0; }
.yt-live--wide.yt-live--clean .yt-live__actions .watch-pill { flex-direction: row; width: auto; min-height: 40px; padding: 0 16px; gap: 6px; background: var(--bg-elevated); color: var(--text-primary); border-radius: 999px; }
.yt-live--wide.yt-live--clean .yt-live__actions .yt-superchat-btn { color: #b8860b; }
.yt-live--wide.yt-live--clean .yt-live__chat { order: 3; flex: none; margin: 14px 12px 0; border-radius: 14px; background: var(--bg-elevated); box-shadow: none; }
.yt-live--wide.yt-live--clean .yt-live__chat-head { padding: 8px 4px 8px 14px; }
.yt-live--wide.yt-live--clean .yt-live__chat-head::before, .yt-live--wide.yt-live--clean .yt-live__chat-settings { display: none; }
.yt-live--wide.yt-live--clean .yt-live__chat-title { margin-top: 0; }
.yt-live--wide.yt-live--clean .yt-live__chat-title b { font-size: 1rem; }
.yt-live--wide.yt-live--clean .yt-live__chat-hide { display: inline-flex; background: transparent; border: 0; width: 44px; height: 44px; border-radius: 50%; position: relative; inset: auto; }
.yt-live--wide.yt-live--clean .yt-live__chat-list, .yt-live--wide.yt-live--clean .yt-live__chat-foot, .yt-live--wide.yt-live--clean .yt-live__pins { display: none; }
.yt-live--wide.yt-live--clean .yt-dvr { display: flex; }
.yt-live--wide.yt-live--clean [data-live-badge] { display: none; }
/* wide stream — higher-specificity fixes over the full-screen (TikTok) rules */
.yt-live--tt.yt-live--wide .yt-live__chat-hide { font-size: 0 !important; width: 44px; height: 44px; padding: 0; background: transparent !important; border: 0 !important; color: var(--text-primary); }
.yt-live--tt.yt-live--wide .yt-live__chat-hide:not(:has(svg))::before { content: '✕'; font-size: 1.25rem; line-height: 1; }
.yt-live--tt.yt-live--wide.yt-live--clean .yt-live__channel, .yt-live--tt.yt-live--wide.yt-live--clean .yt-live__desc { display: flex; }
.yt-live--tt.yt-live--wide.yt-live--clean .yt-live__title { display: block; }
.yt-live--tt.yt-live--wide.yt-live--clean .yt-live__actions { display: flex; }
.yt-live--tt.yt-live--wide.yt-live--clean .yt-live__actions .watch-pill:not(#live-like-btn) { display: inline-flex; }
.yt-live--tt.yt-live--wide.yt-live--clean .yt-live__chat { position: relative; inset: auto; height: auto; }
.yt-live--tt.yt-live--wide.yt-live--clean .yt-live__chat-head { position: relative; inset: auto; display: flex; }
.yt-live--tt.yt-live--wide.yt-live--clean .yt-live__chat-title { display: flex; }
.yt-live--tt.yt-live--wide.yt-live--clean #live-like-btn { position: static; width: auto; min-height: 40px; border-radius: 999px; box-shadow: none; background: var(--bg-elevated); }
.yt-live--tt.yt-live--wide.yt-live--clean .yt-live__chat-hide { color: var(--text-primary); }
.yt-live--tt.yt-live--wide.yt-live--clean .yt-live__chat-hide svg { width: 22px; height: 22px; }
.yt-live--tt.yt-live--wide.yt-live--clean .yt-dvr { display: flex; position: absolute; bottom: 4px; left: 8px; right: 8px; }
.yt-live--tt.yt-live--wide.yt-live--clean .yt-live__actions { flex-wrap: wrap !important; overflow: visible !important; }



/* ═══ Live radio (Music → Radio) ═══ */
.rd { margin-bottom: var(--space-6); }
.rd__title { margin: 0 0 2px; font-size: 1.25rem; font-weight: 700; }
.rd__lead { margin: 0 0 var(--space-3); color: var(--text-secondary); font-size: .9375rem; }
.rd__filters { display: flex; gap: 8px; margin-bottom: var(--space-3); flex-wrap: wrap; }
.rd__filters select, .rd__search input { height: 44px; padding: 0 14px; border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-surface); color: var(--text-primary); font: inherit; }
.rd__filters select { max-width: 52%; }
.rd__search { flex: 1; min-width: 160px; } .rd__search input { width: 100%; }
.rd__chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 var(--space-3); scrollbar-width: none; }
.rd__chips::-webkit-scrollbar { display: none; }
.rd-chip { flex: none; min-height: 36px; padding: 0 14px; border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: .875rem; cursor: pointer; }
.rd-chip.is-on { background: var(--primary-800, #222); border-color: var(--primary-800, #222); color: #fff; }
.rd__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.rd__empty { grid-column: 1 / -1; padding: var(--space-6) var(--space-3); text-align: center; color: var(--text-secondary); }
.rd-card { position: relative; display: flex; align-items: center; border: 1px solid var(--border-default); border-radius: 14px; background: var(--bg-surface); overflow: hidden; }
.rd-card.is-on { border-color: #1fa971; box-shadow: 0 0 0 2px rgba(31, 169, 113, .25); }
.rd-card__play { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 44px 10px 10px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rd-card__text { display: flex; flex-direction: column; min-width: 0; }
.rd-card__text strong { font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-card__text small { font-size: .75rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-logo { position: relative; flex: none; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, #7c5cff, #ff5c93); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.rd-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.rd-fav { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--text-secondary); font-size: 1.25rem; cursor: pointer; }
.rd-fav.is-on { color: #e11d48; }
.rd-player { position: fixed; z-index: calc(var(--z-modal, 300) - 10); left: 8px; right: 8px; bottom: calc(var(--bottom-nav-height, 67px) + 12px + env(safe-area-inset-bottom, 0px)); max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 18px; background: #14161c; color: #fff; box-shadow: 0 8px 28px rgba(0, 0, 0, .4); }
.rd-player .rd-logo { width: 44px; height: 44px; }
.rd-player__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rd-player__text strong { font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-player__text small { font-size: .75rem; color: #7ee2b0; }
.rd-player__btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: .9rem; cursor: pointer; }

.rd__sub { margin: var(--space-3) 0 2px; font-size: 1rem; font-weight: 700; }
.rd__hint { margin: 0 0 var(--space-2); font-size: .8125rem; color: var(--text-secondary); }
.rd__more { grid-column: 1 / -1; text-align: center; padding: var(--space-2) 0; }


/* ═══ TV — live channels ═══ */
.tv { max-width: 980px; margin: 0 auto; padding: 0 var(--space-3) var(--space-10); }
.tv__head { padding: var(--space-3) 0 var(--space-2); }
.tv__head h1 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.tv__head p { margin: 2px 0 0; color: var(--text-secondary); font-size: .9375rem; }
.tv__stage { position: sticky; top: 0; z-index: 6; margin: 0 calc(-1 * var(--space-3)) var(--space-3); background: #000; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.tv__stage[hidden] { display: none; }
.tv__screen { position: relative; aspect-ratio: 16 / 9; background: #000; max-height: 60vh; margin: 0 auto; }
.tv__screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.tv__msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; background: rgba(0, 0, 0, .6); font-size: .9375rem; }
.tv__msg[hidden] { display: none; }
.tv__now { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.tv__now-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tv__now-text strong { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv__now-text small { font-size: .75rem; color: rgba(255, 255, 255, .7); }
.tv__btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: .95rem; cursor: pointer; }
.tv__filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--space-3); }
.tv__filters select, .tv__search input { height: 44px; padding: 0 14px; border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-surface); color: var(--text-primary); font: inherit; }
.tv__filters select { max-width: 52%; }
.tv__search { flex: 1; min-width: 160px; } .tv__search input { width: 100%; }
.tv__chips { display: flex; gap: 8px; margin-bottom: var(--space-3); }
.tv__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .tv__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .tv__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tv__empty { grid-column: 1 / -1; padding: var(--space-8) var(--space-3); text-align: center; color: var(--text-secondary); }
.tv-card { border-radius: 14px; overflow: hidden; background: var(--bg-surface); border: 1px solid var(--border-default); }
.tv-card.is-on { border-color: #e11d48; box-shadow: 0 0 0 2px rgba(225, 29, 72, .25); }
.tv-card__screen { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; background: var(--tint, linear-gradient(135deg, #1a1a1a, #8a6d00)); color: #fff; cursor: pointer; }
.tv-card__initials { font-size: 1.75rem; font-weight: 800; letter-spacing: .04em; text-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.tv-card__live { position: absolute; top: 6px; left: 6px; padding: 2px 7px; border-radius: 6px; background: #e11d48; font-size: .625rem; font-weight: 800; letter-spacing: .06em; }
.tv-card__q { position: absolute; top: 6px; right: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .55); font-size: .625rem; font-weight: 700; }
.tv-card__meta { display: flex; align-items: center; gap: 4px; padding: 8px 4px 8px 10px; }
.tv-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tv-card__text strong { font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-card__text small { font-size: .6875rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1em; }
.tv-fav { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--text-secondary); font-size: 1.2rem; cursor: pointer; }
.tv-fav.is-on { color: #e11d48; }
.tv__note { margin: var(--space-4) 0 0; font-size: .75rem; color: var(--text-muted); text-align: center; }
@media (max-width: 420px) { .topbar__right .btn-icon { width: 26px; } .topbar__right .btn-icon svg { width: 20px; height: 20px; } }

/* ── Safety: message requests, warnings, hidden pictures from brand-new accounts ───────────────────────────── */
.wa-safety { flex: none; }
.safety-bar { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; font-size: 0.9rem; line-height: 1.35; border-bottom: 1px solid var(--border-default, rgba(0,0,0,.1)); }
.safety-bar strong { font-size: 0.95rem; }
.safety-bar__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.safety-bar--request { background: #fff7e0; color: #4a3a00; }
.safety-bar--careful { background: #fff1e6; color: #5a2d00; }
.safety-bar--threat { background: #fdecec; color: #6b0f0f; border-bottom-color: #f2b8b8; }
@media (prefers-color-scheme: dark) {
  .safety-bar--request { background: #3a3110; color: #f5e6a8; }
  .safety-bar--careful { background: #3b2412; color: #f7d3b3; }
  .safety-bar--threat { background: #3d1515; color: #f6c5c5; border-bottom-color: #6b2626; }
}
.safety-cats { display: flex; flex-direction: column; gap: 8px; }
.safety-cat { display: flex; align-items: flex-start; gap: 8px; font-size: 0.9rem; cursor: pointer; }
.dm-requests { border-bottom: 1px solid var(--border-default, rgba(0,0,0,.1)); }
.dm-requests__head { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; color: inherit; }
.dm-requests__head::after { content: '›'; margin-left: 8px; transition: transform .15s; }
.dm-requests--open .dm-requests__head::after { transform: rotate(90deg); }
.dm-requests__n { margin-left: auto; background: #d93025; color: #fff; border-radius: 999px; min-width: 22px; height: 22px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; }
.dm-requests__rows { display: none; }
.dm-requests--open .dm-requests__rows { display: block; }
.wa-media--hidden { position: relative; overflow: hidden; }
.wa-media--hidden .wa-media__el { filter: blur(26px) brightness(.8); transform: scale(1.1); }
.wa-media__veil { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #fff; font-weight: 600; background: rgba(0,0,0,.25); cursor: pointer; }
.wa-media__veil small { font-weight: 400; opacity: .85; font-size: .75rem; }

/* TV: how many channels are confirmed working */
.tv__status { padding: 2px 16px 8px; font-size: 0.85rem; color: var(--text-secondary, #666); min-height: 1.2em; }

/* TV: kinds of channel, and a bar while the server checks which channels work */
.tv__kinds { display: flex; gap: 8px; padding: 0 16px 8px; overflow-x: auto; scrollbar-width: none; }
.tv__kinds::-webkit-scrollbar { display: none; }
.tv__kinds .rd-chip { flex: none; }
.tv__kinds .rd-chip small { opacity: .7; margin-left: 2px; }
.tv__bar { height: 3px; margin: 0 16px 10px; border-radius: 3px; background: rgba(0,0,0,.08); overflow: hidden; }
.tv__bar > i { display: block; height: 100%; background: #e11d48; border-radius: 3px; transition: width .4s ease; }
@media (prefers-color-scheme: dark) { .tv__bar { background: rgba(255,255,255,.12); } }
.tv-card__text strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow: hidden; line-height: 1.25; }

/* ── TV mode (Samsung, LG, Fire TV, Android TV, Vizio…): seen from the sofa, steered with a remote ─────────────── */
html.tv-mode { cursor: none; }
html.tv-mode body { zoom: 1.35; overscroll-behavior: none; }
html.tv-mode ::-webkit-scrollbar { display: none; }
/* A focus ring nobody can miss, and the focused card grows a little */
html.tv-mode :focus { outline: 4px solid #ffd400 !important; outline-offset: 3px !important; border-radius: 12px; }
html.tv-mode :focus-visible { outline: 4px solid #ffd400 !important; outline-offset: 3px !important; }
html.tv-mode .tv-card:focus-within, html.tv-mode .x-post:focus-within, html.tv-mode [role="button"]:focus, html.tv-mode button:focus { transform: scale(1.04); transition: transform .12s ease; }
html.tv-mode input, html.tv-mode select, html.tv-mode textarea { font-size: 1.1rem; min-height: 48px; }
html.tv-mode .tv__grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
html.tv-mode #bottom-nav button { min-height: 64px; }

/* ── Top bar on a phone: bigger icons that share the whole row, one finger wide each ───────────────────────────
   Nine buttons (menu, Buddy, Live, Discover, Inbox, Network, Alerts, Search, TV) fill the row edge to edge, so each is as
   large as the screen allows (about 36–46px to touch, a 26px picture) and none runs off the side. */
@media (max-width: 600px) {
  /* The search box (when opened) wraps onto its own line below; the icon row itself never wraps. */
  .topbar { flex-wrap: wrap; padding-inline: 6px; column-gap: 0; }
  .topbar .topbar__left { flex: 0 0 auto; }
  .topbar .topbar__right { flex: 1 1 0; min-width: 0; justify-content: space-between; column-gap: 0; }
  .topbar #sidebar-toggle, .topbar .topbar__right .btn-icon { flex: 1 1 0; width: auto; min-width: 0; max-width: 48px; height: 46px; display: inline-flex; align-items: center; justify-content: center; }
  .topbar #sidebar-toggle { flex: 0 0 clamp(34px, 9.2vw, 46px); max-width: none; }
  .topbar #sidebar-toggle svg, .topbar .topbar__right .btn-icon svg, .topbar .topbar__live svg { width: clamp(22px, 6.6vw, 28px); height: clamp(22px, 6.6vw, 28px); }
  /* The voice assistant and language buttons stay desktop-only (they are in the drawer on a phone). */
  .topbar .topbar__right .btn-icon.topbar__quick-icon--desktop-only { display: none; }
  .topbar .topbar__live { flex: 1.5 1 0; min-width: 0; max-width: 78px; height: 46px; justify-content: center; padding: 0; gap: 2px; font-size: clamp(0.78rem, 3.4vw, 0.95rem); }
}

/* ── Live (the person streaming): a tall picture gets a tall player, like the YouTube app, not a small strip ────────── */
@media (max-width: 767px) {
  .yt-live:not(.yt-live--tt) .yt-live__player.is-portrait { aspect-ratio: auto; height: 52vh; height: 52dvh; max-height: calc(100dvh - 280px); }
  .yt-live:not(.yt-live--tt) .yt-live__player.is-portrait video { width: 100%; height: 100%; object-fit: contain; }
  .yt-live:not(.yt-live--tt):has(.yt-live__player.is-portrait) .yt-live__info { max-height: 24vh; max-height: 24dvh; }
}

/* Chat hidden (the person streaming, on a phone): the picture takes the room the chat had */
@media (max-width: 767px) {
  .yt-live.yt-live--clean:not(.yt-live--tt) .yt-live__player { aspect-ratio: auto; height: 62vh; height: 62dvh; }
  .yt-live.yt-live--clean:not(.yt-live--tt) .yt-live__info { max-height: none; }
  .yt-live.yt-live--clean:not(.yt-live--tt) .yt-live__player video { width: 100%; height: 100%; object-fit: contain; }
}

/* ── News channel ── */
.news { padding: var(--space-4); max-width: 820px; margin: 0 auto; }
.news__head { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 20px; background: linear-gradient(135deg, #fff8c2, #ffe3b3); margin-bottom: 14px; }
.news__avatar { width: 84px; height: 84px; flex: none; border-radius: 50%; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); }
.news__avatar-svg { width: 100%; height: 100%; display: block; }
.news__mouth { transform-origin: 60px 67px; }
.news__avatar.is-talking .news__mouth { animation: news-talk 0.32s ease-in-out infinite alternate; }
@keyframes news-talk { from { transform: scaleY(0.6); } to { transform: scaleY(2.8); } }
.news__head h1 { margin: 0; font-size: 1.35rem; color: #111; }
.news__head p { margin: 2px 0 10px; color: #4b4b4b; font-size: 0.875rem; }
.news__play { border: none; border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 700; background: #111; color: #fff200; cursor: pointer; }
.news__chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.news__chip { flex: none; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 999px; padding: 7px 14px; background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: 0.875rem; cursor: pointer; }
.news__chip.is-on { background: #111; color: #fff200; border-color: #111; }
.news__list { display: flex; flex-direction: column; gap: 12px; }
.news__note { color: var(--text-muted); text-align: center; padding: 24px 8px; }
.news__link { background: none; border: none; color: var(--primary-600); font: inherit; text-decoration: underline; cursor: pointer; }
.news__card { display: flex; gap: 12px; padding: 12px; border-radius: 16px; background: var(--bg-surface); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07); }
.news__img { width: 96px; height: 96px; flex: none; border-radius: 12px; object-fit: cover; background: #eee; }
.news__img--none { display: flex; align-items: center; justify-content: center; padding: 8px; text-align: center; font-weight: 800; font-size: .85rem; line-height: 1.15; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); overflow-wrap: anywhere; background: linear-gradient(135deg, #2563eb, #60a5fa); }
.news__body h2 { margin: 4px 0; font-size: 1rem; line-height: 1.3; }
.news__body p { margin: 0 0 6px; font-size: 0.8125rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news__body footer { font-size: 0.75rem; color: var(--text-muted); }
.news__tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.6875rem; font-weight: 700; background: #e8e5ff; color: #4f46e5; }
.news__tag--autonomous { background: #ffe8ec; color: #e11d48; }
.news__tag--electronics { background: #fff1d6; color: #d97706; }
.news__tag--phones { background: #dff1ff; color: #0b79c9; }
.news__tag--smart-home { background: #dcf7ea; color: #0f9d63; }
.news__tag--ai { background: #f6e3ff; color: #a21caf; }

/* ── Backgrounds (templates, or the person's own picture / video) ── */
.bg-layer { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; border-radius: inherit; }
.bg-layer video { width: 100%; height: 100%; object-fit: cover; display: block; }
.bg-layer::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.32)); }
.bg-edit { position: absolute; top: 8px; right: 8px; z-index: 5; border: none; border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 0.8125rem; font-weight: 700; background: rgba(0, 0, 0, 0.6); color: #fff200; cursor: pointer; backdrop-filter: blur(6px); }

/* A page with a background: it fills the page, and the cards on it turn into frosted glass so the background shows around them. */
.bs-page--bg { position: relative; isolation: isolate; max-width: none; border-radius: 0; color: #fff; }
.bs-page--bg > :not(.bg-layer):not(.bg-edit) { position: relative; max-width: 720px; margin-left: auto; margin-right: auto; }
.bs-page--bg .bs-stage__bar, .bs-page--bg .bs-stage__info, .bs-page--bg .bs-info, .bs-page--bg .bs-status, .bs-page--bg .bs-comments,
.bs-page--bg .bs-winner, .bs-page--bg .bs-presented, .bs-page--bg .bs-time-row, .bs-page--bg .bs-invite__actions {
  background: rgba(10, 10, 24, 0.55); color: #fff; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 16px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.bs-page--bg .bs-stage { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.28), 0 14px 40px rgba(0, 0, 0, 0.5); }
.bs-page--bg .bs-header, .bs-page--bg .bs-hint, .bs-page--bg h1, .bs-page--bg h2, .bs-page--bg .bs-header__back { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }

.bs-bg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bs-bg-row__chip { min-width: 64px; height: 30px; padding: 0 8px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; color: var(--text-muted); border: 1px solid rgba(0, 0, 0, 0.15); background-size: cover; }

/* The background picker (shared by battles, schedules and watch parties) */
.bgp { position: fixed; inset: 0; z-index: calc(var(--z-modal) + 100); display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0.55); }
.bgp__panel { width: 100%; max-width: 520px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; background: var(--bg-surface); color: var(--text-primary); border-radius: 22px 22px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 640px) { .bgp { align-items: center; } .bgp__panel { border-radius: 22px; } }
.bgp__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bgp__head h2 { margin: 0; font-size: 1.125rem; }
.bgp__x { border: none; background: none; font-size: 1.25rem; color: var(--text-muted); cursor: pointer; }
.bgp__preview { height: 110px; border-radius: 16px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); background-color: var(--bg-base); overflow: hidden; margin-bottom: 12px; border: 1px solid rgba(0, 0, 0, 0.1); }
.bgp__preview video { width: 100%; height: 100%; object-fit: cover; }
.bgp__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin: 8px 0; }
.bgp__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bgp__swatch { position: relative; height: 70px; border-radius: 14px; border: 3px solid transparent; cursor: pointer; overflow: hidden; }
.bgp__swatch span { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 4px; font-size: 0.6875rem; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.45); }
.bgp__swatch.is-on { border-color: #fff200; box-shadow: 0 0 0 2px #111; }
.bgp__row { display: flex; gap: 8px; flex-wrap: wrap; }
.bgp__upload { cursor: pointer; }
.bgp__note { font-size: 0.8125rem; color: var(--text-muted); margin: 8px 0; }
.bgp__note.is-bad { color: #e11d48; }
.bgp__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
/* Text on the frosted cards must stay readable over any background. */
.bs-page--bg .bs-info, .bs-page--bg .bs-info *, .bs-page--bg .bs-status, .bs-page--bg .bs-comments, .bs-page--bg .bs-comments *,
.bs-page--bg .bs-stage__bar, .bs-page--bg .bs-stage__bar *, .bs-page--bg .bs-stage__info, .bs-page--bg .bs-winner { color: #fff; }
.bs-page--bg .bs-info__line, .bs-page--bg .bs-info__mode, .bs-page--bg .bs-hint { color: rgba(255, 255, 255, 0.82); }
.bs-page--bg .btn--secondary, .bs-page--bg .btn--ghost { background: rgba(255, 255, 255, 0.92); color: #111; border-color: transparent; }
.bs-page--bg > p, .bs-page--bg > div > p { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
/* The organizer's "Change background" button floats at the bottom-left, clear of the title. */
.bg-edit { position: fixed; top: auto; right: auto; left: 12px; bottom: calc(var(--bottom-nav-height, 67px) + env(safe-area-inset-bottom, 0px) + 12px); }
@media (min-width: 768px) { .bg-edit { bottom: 16px; } }

/* No-internet notice (js/offlineBar.js) */
.offline-bar { position: fixed; left: 0; right: 0; top: 0; z-index: calc(var(--z-toast) + 50); padding: calc(6px + env(safe-area-inset-top, 0px)) 12px 6px; text-align: center; font-size: 0.8125rem; font-weight: 600; background: #111; color: #fff200; }

/* ── The host's own live screen on a phone: the same full-screen layout as the viewers', with their controls on top of the camera ── */
.yt-live--host .yt-live__actions, .yt-live--host .yt-live__channel .watch-page__subs { display: none; }
.yt-live--host .yt-live__controls {
  position: absolute; z-index: 8; right: 8px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); top: auto; left: auto; width: auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0; padding: 0; border: 0; background: none;
}
.yt-live--host .yt-live__controls > span { display: none; }
.yt-live--host .yt-live__controls .btn {
  width: 52px; min-height: 52px; padding: 6px 0; border: 0; border-radius: 26px; gap: 2px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 0.625rem; font-weight: 600; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.yt-live--host .yt-live__controls .btn svg { width: 22px; height: 22px; }
.yt-live--host .yt-live__controls .btn--danger { background: #e11d48; font-size: 0.6875rem; }
.yt-live--host #superchat-total { display: block !important; position: absolute; right: 0; bottom: 100%; margin: 0 0 6px; color: #ffd24a; font-size: 0.75rem; white-space: nowrap; }
.yt-live--host .yt-live__title + #edit-stream-details-btn, .yt-live--host #edit-stream-details-btn { position: absolute; z-index: 6; top: calc(52px + env(safe-area-inset-top, 0px)); right: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); color: #fff; }
.yt-live--host .yt-live__title { right: 48px; }
.yt-live--tt.yt-live--host .yt-live__desc > #edit-stream-details-panel:not([hidden]),
.yt-live--tt.yt-live--host #invite-viewers-panel:not([hidden]) {
  display: block !important; position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); max-width: none; margin: 0;
  max-height: 55vh; max-height: 55dvh; overflow-y: auto; padding: 14px; border-radius: 18px; background: rgba(12, 12, 24, 0.92); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.yt-live--host #camera-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; background: #0b0b14; }
.yt-live--host .yt-live__controls .btn--danger { white-space: normal; line-height: 1.05; text-align: center; padding: 4px; font-size: 0.625rem; }
.yt-live--host #edit-stream-details-btn { top: calc(70px + env(safe-area-inset-top, 0px)) !important; right: 12px !important; }
.yt-live--tt.yt-live--host #edit-stream-details-panel :is(label, p, span, div, .text-muted, .form-label) { color: #fff; }
.yt-live--tt.yt-live--host #edit-stream-details-panel :is(input, textarea, select) { background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.25); }
.yt-live--tt.yt-live--host #edit-stream-details-panel :is(input, textarea)::placeholder { color: rgba(255, 255, 255, 0.6); }
.yt-live--tt.yt-live--host #edit-stream-details-panel .btn--secondary, .yt-live--tt.yt-live--host #edit-stream-details-panel .btn--ghost { background: rgba(255, 255, 255, 0.9); color: #111; }

/* The volume button on every video post (videos start silent; this turns that one video's sound on or off). */
.feed-sound-btn { position: absolute; right: 10px; bottom: 10px; z-index: 6; width: 36px; height: 36px; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.6); color: #fff; cursor: pointer; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.feed-sound-btn:active { transform: scale(0.94); }

/* Your own Go Live bubble: a big red circle around your profile photo or video. */
.live-status-bar__item--go-live { width: 88px; }
.live-status-bar__ring--add { width: 76px; height: 76px; padding: 5px; background: linear-gradient(135deg, #ff1f3d, #d90429); box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.25); }
.live-status-bar__ring--add .avatar { border-width: 3px; }
.live-status-bar__item--go-live .live-status-bar__label { font-weight: 700; color: #d90429; }

/* "edited" marks on messages, posts and comments */
.wa-edited { font-style: italic; opacity: .75; margin-right: 3px; }
.edited-tag { margin-left: 6px; font-size: .75rem; font-style: italic; opacity: .7; }

/* Dialogs with many buttons (Manage your post: Edit, Visibility, Promote, Tag a product, Delete) show them one under another, full width,
   with Close last, instead of squeezing them into one row where the words were cut off. */
.cc-dialog__actions .btn { flex: 0 0 auto; white-space: nowrap; }
.cc-dialog__actions:has(> :nth-child(4)) { flex-direction: column; align-items: stretch; }
.cc-dialog__actions:has(> :nth-child(4)) .btn { width: 100%; justify-content: center; padding-block: 12px; font-size: .95rem; }
.cc-dialog__actions:has(> :nth-child(4)) > :first-child { order: 99; }

/* ── Like YouTube on a phone: the player stays pinned at the top while the title, description and comments scroll under it ── */
@media (max-width: 999px) {
  .watch-overlay__player-wrap { position: sticky; top: 61px; z-index: 1; max-height: 45vh; }
  .watch-overlay__player-wrap video,
  .watch-overlay__player-wrap img { max-height: 45vh; }
}
/* On a computer it is YouTube's own page: a rounded 16:9 player in a centred column, title and comments underneath. */
@media (min-width: 1000px) {
  .watch-overlay__player-wrap {
    width: calc(100% - 2 * var(--space-6)); max-width: 1180px; margin: var(--space-4) auto 0;
    aspect-ratio: 16 / 9; max-height: calc(100vh - 150px);
    border-radius: var(--radius-lg); overflow: hidden;
  }
  .watch-overlay__player-wrap video,
  .watch-overlay__player-wrap img { width: 100%; height: 100%; max-height: none; object-fit: contain; background: #000; }
  .watch-overlay__body { max-width: 1180px; padding-inline: var(--space-6); }
}
/* Wide screens: the other videos sit in a column to the right of the player, like YouTube. */
@media (min-width: 1100px) {
  .watch-overlay__player-wrap { width: calc(100% - 472px); max-width: none; margin: var(--space-4) 0 0 var(--space-6); }
  .watch-overlay__body { width: calc(100% - 472px); max-width: none; margin: 0 0 0 var(--space-6); padding-inline: 0; }
  .watch-overlay .yt-upnext { position: absolute; top: 77px; right: var(--space-6); width: 400px; margin: 0; }
}
/* An Up next entry with no picture of its own shows a plain tile: it no longer downloads part of the video just to draw a frame. */
.yt-upnext__noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1f2937, #0f172a); color: rgba(255,255,255,.75); font-size: 1.6rem; }

/* Home opens with the first Shorts full screen (modules/home/index.js _renderTopShorts): the Shorts player's own cards, one screen
   tall, in the page's normal scroll. Phones: edge to edge between the top bar and the bottom bar. Wider screens: a 9:16 column. */
.home-top-shorts.feed-scroller {
  grid-column: 1 / -1; flex: none; overflow: visible; scroll-snap-type: none; background: none;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-3);
  width: auto; max-width: none; margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) 0;
  min-height: auto; /* .feed-scroller's min-height:0 let the grid squeeze this block to nothing */
}
.home-top-shorts .feed-item {
  flex: none; /* never shrunk below a full screen */
  height: calc(100vh - 140px);
  height: calc(100dvh - 140px); min-height: 420px; width: 100%;
  background: #000; scroll-snap-align: start; scroll-snap-stop: normal;
}
.home-top-shorts__more {
  margin: var(--space-2) auto var(--space-1); padding: 10px 22px; border: 0; border-radius: 999px;
  background: var(--bg-elevated, #f1f1f1); color: var(--text-primary, #111); font: inherit; font-weight: 600; cursor: pointer;
}
/* Snap gently onto each full-screen Short while scrolling past them (the grid below scrolls freely). */
.video-grid:has(.home-top-shorts), html:has(.home-top-shorts) { scroll-snap-type: y proximity; }
@media (min-width: 768px) {
  .home-top-shorts.feed-scroller { margin: 0; }
  .home-top-shorts .feed-item { width: min(100%, calc((100vh - 160px) * 9 / 16)); width: min(100%, calc((100dvh - 160px) * 9 / 16)); height: calc(100dvh - 160px); max-height: 860px; border-radius: 16px; }
}

/* Update progress on the banner (js/appUpdateCheck.js setUpdateProgress): a thin bar along its bottom edge, in the app's yellow. */
.app-update-banner { position: fixed; }
.app-update-banner__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .18); }
.app-update-banner__bar i { display: block; height: 100%; width: 0; background: #FCF600; transition: width .25s ease; }

/* Shorts exactly like TikTok: no scrollbar strip beside the video, black behind it, and a black bottom bar while the Shorts
   player is open (.tt-top only exists there). */
.feed-scroller { scrollbar-width: none; }
.feed-scroller::-webkit-scrollbar { display: none; }
.feed-scroller .feed-item { background: #000; }
.feed-scroller .feed-item__bg video { background: #000 !important; }
body:has(.tt-top) .feed-scroller { background: #000; }
body:has(.tt-top) .bottom-nav { background: #000; border-top-color: #000; box-shadow: none; }
body:has(.tt-top) .bottom-nav .nav-item, body:has(.tt-top) .bottom-nav__item { color: rgba(255, 255, 255, .7); }
body:has(.tt-top) .bottom-nav .nav-item.active, body:has(.tt-top) .bottom-nav .nav-item.active svg { color: #fff; }
/* Phones: each Short on Home fills the whole screen above the bottom bar once scrolled to, like TikTok. */
@media (max-width: 767px) {
  .home-top-shorts .feed-item { height: calc(100vh - var(--bottom-nav-height, 67px) - env(safe-area-inset-bottom, 0px)); height: calc(100dvh - var(--bottom-nav-height, 67px) - env(safe-area-inset-bottom, 0px)); min-height: 0; }
  .home-top-shorts.feed-scroller { gap: 0; }
}

/* A Home chip for a section whose content has its own page (Contests, Shop …): one clear card to open it. */
.home-open-section { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-6); border-radius: 16px; background: var(--bg-elevated, #f3f4f6); }
.home-open-section b { display: block; font-size: 1.125rem; margin-bottom: 4px; }
.home-open-section span { color: var(--text-secondary); font-size: .875rem; }

/* Calls: the other person's picture large in the middle of the screen (it was a 96 px circle), like WhatsApp — while it
   rings and during a voice call. Frames (gemstone) and video pictures grow with it. */
#gc-incoming-avatar .avatar, #gc-avatar-overlay .avatar {
  width: min(52vw, 220px); height: min(52vw, 220px); font-size: clamp(2.5rem, 14vw, 4.5rem);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
}
#gc-incoming-avatar .gem-frame, #gc-avatar-overlay .gem-frame { width: min(52vw, 220px) !important; height: min(52vw, 220px) !important; }
#gc-incoming-avatar .gem-frame-media > .avatar, #gc-avatar-overlay .gem-frame-media > .avatar { width: 100%; height: 100%; box-shadow: none; }
#gc-avatar-overlay .font-semibold { font-size: 1.375rem; }

/* The video page's actions like YouTube's: labelled pills (Share, Download, Save …) in one row that slides sideways on a phone. */
.watch-overlay__action-btn span:not([data-like-count]) { white-space: nowrap; }
.watch-overlay__action-btn.is-saved { color: var(--text-primary); }
.watch-overlay__action-btn.is-saved svg { fill: currentColor; }
/* On a phone every action fits on the screen at once (no sliding sideways): equal columns, the picture above a small
   label, as in the YouTube and TikTok apps. Like / dislike keep their shared pill. */
@media (max-width: 767px) {
  .watch-overlay__channel-row { flex-wrap: wrap; }
  /* Equal tiles that wrap onto a second line when there are many (your own video adds Download and Manage), never cut off. */
  .watch-overlay__actions { flex: 1 0 100%; margin-left: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 6px; overflow: visible; padding-bottom: 2px; }
  .watch-overlay__actions > .watch-overlay__action-btn, .watch-overlay__actions > .watch-overlay__action-group { min-width: 0; }
  .watch-overlay__actions > .watch-overlay__action-group:first-child { grid-column: span 2; }
  .watch-overlay__action-btn { flex-direction: column; justify-content: center; gap: 3px; padding: 7px 2px; min-width: 0; width: 100%; border-radius: 12px; background: var(--bg-elevated); }
  .watch-overlay__action-group .watch-overlay__action-btn { background: none; border-radius: 0; }
  .watch-overlay__action-btn span { font-size: 11px !important; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .watch-overlay__action-btn svg { width: 20px !important; height: 20px !important; }
}

/* ── Watch Party room, as the Figma "Watch party" screens (modules/watchparty/index.js) ─────────────────────────
   The movie with its controls over the picture; chat or the people watching beside it on a cream panel. */
.wp { --wp-cream: #fffce6; --wp-olive: #334326; --wp-olive2: #4d4a20; --wp-menu: #e8e6d1; padding: 0 0 24px; }
.wp-stage { display: flex; gap: 0; background: #000; border-radius: 0; overflow: hidden; position: relative; isolation: isolate; }
.wp-player { position: relative; flex: 1; min-width: 0; aspect-ratio: 16 / 9; background: #000; }
.wp-player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.wp-novideo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; padding: 24px; text-align: center; }
.wp-ui { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,.45), transparent 28%, transparent 62%, rgba(0,0,0,.6)); }
.wp-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; }
.wp-top__end { display: flex; align-items: center; gap: 6px; }
.wp-round { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--wp-olive); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.wp-ic { width: 40px; height: 40px; border: 0; background: none; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 50%; }
.wp-ic:disabled { opacity: .45; cursor: default; }
.wp-ic:not(:disabled):active { background: rgba(255,255,255,.15); }
.wp-ic--play { width: 56px; height: 56px; }
.wp-bottom { padding: 0 16px 10px; }
.wp-time { display: flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }
.wp-seek { flex: 1; accent-color: #fff; height: 4px; }
.wp-ctrls { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.wp-ctrls__side, .wp-ctrls__mid { display: flex; align-items: center; gap: 10px; }
.wp-menu, .wp-tracks { position: absolute; top: 56px; right: 14px; z-index: 3; background: var(--wp-menu); color: #1f2310; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.wp-menu { display: flex; flex-direction: column; padding: 6px 0; min-width: 150px; }
.wp-menu button { background: none; border: 0; text-align: left; padding: 9px 16px; color: inherit; cursor: pointer; }
.wp-menu button:hover { background: rgba(0,0,0,.06); }
.wp-tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 14px 18px; min-width: 260px; }
.wp-tracks div { display: flex; flex-direction: column; gap: 8px; }
.wp-tracks label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.wp-tracks input { accent-color: var(--wp-olive); }
.wp-tracks small { opacity: .7; }
.wp-tapjoin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; padding: 12px 22px; border: 0; border-radius: 999px; background: var(--wp-olive); color: #fff; font-weight: 700; cursor: pointer; }
/* Lock: the controls go away so a tap on the screen does nothing; one small button brings them back. */
.wp--locked .wp-ui { display: none; }
.wp-unlock { position: absolute; left: 14px; bottom: 14px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.5); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.wp-player:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; }
/* Side panel: chat or the people watching, cream as in the design. */
.wp-side { width: 320px; flex: 0 0 320px; background: var(--wp-cream); color: #1f2310; display: flex; flex-direction: column; max-height: min(70vh, 560px); }
.wp-side[hidden] { display: none; }
.wp-chat, .wp-people { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 10px 12px; }
.wp-chat[hidden], .wp-people[hidden] { display: none; }
.wp-log { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #6b6a5a; font-size: 13px; padding: 4px 0 8px; }
.wp-chat__mount { flex: 1; min-height: 0; display: flex; flex-direction: column; }
/* Party chat, in the room's cream and olive: a title bar, each name in its own colour, the host marked, and a one-line
   message bar that keeps its full width (the old bar's five buttons squeezed the box down to "Messag"). */
.wp-chat { padding: 0; }
.wp-chat__mount .section-title { display: flex; align-items: center; gap: 8px; margin: 0 !important; padding: 12px 14px; font-weight: 700; color: var(--wp-olive); border-bottom: 1px solid rgba(51, 67, 38, .14); }
.wp-chat__mount .section-title::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #e0245e; box-shadow: 0 0 0 3px rgba(224, 36, 94, .18); }
.wp-chat__mount .room-messages { margin: 0 !important; padding: 8px 10px; gap: 2px; overscroll-behavior: contain; }
.wp .yt-chat-msg { padding: 5px 6px; border-radius: 10px; gap: 8px; color: #1f2310; }
.wp .yt-chat-msg:hover { background: rgba(51, 67, 38, .06); }
.wp .yt-chat-msg__name { color: hsl(var(--name-hue, 90) 55% 30%); font-weight: 700; margin-right: 6px; }
.wp .yt-chat-msg--host .yt-chat-msg__name { background: var(--wp-olive); color: var(--wp-cream); padding: 1px 8px; border-radius: 10px; }
.wp .yt-chat-msg--host .yt-chat-msg__name::after { content: ' · host'; font-weight: 500; opacity: .8; }
.wp .yt-chat-msg__text { color: #1f2310; }
.wp .yt-live__chat-empty { color: #6b6a5a; margin: auto 0 0; padding: 18px 10px; }
.wp-chat__mount .room-chat-input-mount { padding: 8px 10px 10px; border-top: 1px solid rgba(51, 67, 38, .14); background: rgba(255, 255, 255, .45); }
.wp .yt-chat-input__who { display: none; }
.wp .yt-chat-input__field { background: #fff; border: 1px solid rgba(51, 67, 38, .22); padding-left: 12px; }
.wp .yt-chat-input__field:focus-within { border-color: var(--wp-olive); box-shadow: 0 0 0 3px rgba(51, 67, 38, .12); }
.wp .yt-chat-input__field input { color: #1f2310; }
.wp .yt-chat-input__icon { background: transparent; color: var(--wp-olive); width: 34px; height: 34px; }
.wp .yt-chat-input__icon::after { display: none; }
.wp .yt-chat-input__send { background: var(--wp-olive); color: var(--wp-cream); width: 40px; height: 40px; }
.wp .rich-chat-picker { background: #fff; border-radius: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, .15); margin-bottom: 8px; }
.wp-log { padding: 6px 10px 0; gap: 4px; }
.wp-log > * { background: rgba(51, 67, 38, .08); color: #4d4a20; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.wp-people__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.wp-faces { display: inline-flex; }
.wp-faces .avatar { margin-left: -8px; border: 2px solid var(--wp-cream); }
.wp-faces .avatar:first-child { margin-left: 0; }
.wp-faces__more { margin-left: -8px; width: 32px; height: 32px; border-radius: 50%; background: #8c8b7f; color: #fff; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--wp-cream); }
.wp-people__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; overflow-y: auto; }
.wp-person { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 10px 6px; border-radius: 8px; background: rgba(0,0,0,.04); }
.wp-info { padding: 14px 16px 0; }
.wp-info h1 { margin: 0 0 4px; }
.wp-info p { margin: 0; color: var(--text-secondary); }
.wp-hint { margin-top: 6px !important; }
.wp-reactions { padding: 10px 16px 0; }
/* Phones: the movie on top, the panel below it. */
@media (max-width: 899px) {
  .wp-stage { flex-direction: column; }
  .wp-side { width: auto; flex: none; max-height: 50vh; }
  .wp-top__end { gap: 0; }
  .wp-ctrls__side, .wp-ctrls__mid { gap: 2px; }
}
/* A phone turned sideways in a Watch Party: the movie fills the screen as in the design (the app's own bars step aside). */
@media (orientation: landscape) and (max-height: 520px) {
  body:has([data-wp]) .topbar, body:has([data-wp]) .bottom-nav, body:has([data-wp]) .bottom-nav__create { display: none !important; }
  body:has([data-wp]) .main-content { padding: 0 !important; }
  /* The page's slide-in leaves a transform, which would pin the room to the page instead of the screen. */
  body:has([data-wp]) .main-content, .wp.page-enter { transform: none !important; animation: none !important; }
  .wp-stage { flex-direction: row; position: fixed; inset: 0; z-index: 60; height: auto; }
  .wp-player { aspect-ratio: auto; height: 100%; }
  .wp-side { width: 300px; flex: 0 0 300px; max-height: none; height: 100%; }
  .wp-info, .wp-reactions { display: none; }
}
.wp-ic svg text { font-size: 7px !important; font-weight: 700; } /* the "10" inside the ±10 buttons (the app-wide 14 px text rule would make it spill out) */

/* ── Podcast, as the Figma "Podcast" screens: the cream page, the ← Podcast ✦ ⊕ 📚 🔍 bar, square covers in rows,
   the olive + button, and on a phone the show's small cover beside its title. ──────────────────────────────── */
.pod-home, .pod-show { background: #fffce6; }
.pod-home { padding-top: 4px; }
.pod-head { padding: 4px 0 10px; }
.pod-head .fg-head__title { text-align: left; }
.pod-search { padding: 0 0 12px; }
.pod-row__head h2 { margin: 0; }
.pod-fab { position: fixed; right: 18px; bottom: calc(var(--bottom-nav-height, 67px) + 22px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  width: 56px; height: 56px; border-radius: 50%; border: 0; background: #5a5a12; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(60, 60, 0, .35); cursor: pointer; }
@media (max-width: 767px) {
  .pod-shows { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .pod-shows::-webkit-scrollbar { display: none; }
  .pod-show-card { flex: 0 0 112px; }
  .pod-show { display: block; padding: 0 16px 96px; }
  .pod-show__side { position: static; display: grid; grid-template-columns: 112px 1fr; column-gap: 14px; align-items: start; }
  .pod-show__side > #back-btn { grid-column: 1 / -1; justify-self: start; }
  .pod-show__side > .pod-show__cover { grid-row: span 3; width: 112px; }
  .pod-show__title { margin: 0 0 6px; }
  .pod-show__side > .pod-show__buttons, .pod-show__side > .pod-show__desc { grid-column: 1 / -1; margin-top: 12px; }
  .pod-show__buttons #pod-subscribe { background: transparent; color: var(--text-primary); border: 1px solid var(--text-primary); }
}
.pod-home, .pod-show { min-height: calc(100vh - 140px); min-height: calc(100dvh - 140px); }
/* The page slide-in leaves a transform, which would pin the + button to the page instead of the screen. */
.main-content:has(.pod-fab), .pod-home.page-enter { transform: none !important; animation: none !important; }

/* ── Calls in the Figma colours (MESSAGES/CHATS → Voice Call / Video Call): a light sand screen for voice calls and a light
   blue one for video calls instead of black, dark text and icons on them, and the other person's picture large. ───── */
#global-call-overlay { background: #F6D6A5 !important; color: #1f1a10 !important; }
#global-call-overlay.gc--video { background: #D4E6FF !important; }
#global-call-overlay.gc-overlay--minimized { background: transparent !important; }
#gc-active-status, #gc-e2ee, .gc-incoming__type, #global-call-overlay .text-xs { color: rgba(31, 26, 16, .65) !important; }
#gc-e2ee-number { background: rgba(0, 0, 0, .06) !important; color: #1f1a10 !important; }
#global-call-overlay .gc-round-btn { background: rgba(255, 255, 255, .7); color: #1f1a10; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
#global-call-overlay .gc-round-btn:hover { background: #fff; }
#global-call-overlay .gc-round-btn--active { background: #1f1a10; color: #fff; }
#global-call-overlay .gc-round-btn--danger { background: var(--error-500, #ef4444); color: #fff; }
#global-call-overlay .gc-round-btn--accept { background: var(--success-500, #22c55e); color: #fff; }
#global-call-overlay .spinner { border-color: rgba(0, 0, 0, .15) !important; border-top-color: #1f1a10 !important; }
#gc-remote-video:not([hidden]) { background: transparent; }
#gc-incoming-avatar .avatar, #gc-avatar-overlay .avatar { width: min(64vw, 260px); height: min(64vw, 260px); border: 4px solid rgba(255, 255, 255, .85); }
#gc-incoming-avatar .gem-frame, #gc-avatar-overlay .gem-frame { width: min(64vw, 260px) !important; height: min(64vw, 260px) !important; }

/* The chat under a movie while it plays (modules/streaming/index.js, movie page). */
.vod-chat { margin: 12px 0; border: 1px solid var(--border-subtle, #e5e5e5); border-radius: 12px; background: var(--bg-surface, #fff); }
.vod-chat > summary { padding: 12px 14px; font-weight: 700; cursor: pointer; }
.vod-chat__mount { display: flex; flex-direction: column; height: var(--chat-height, 360px); padding: 0 12px 12px; }
.vod-chat__mount .section-title { display: none; }

/* ── A finished live in the Home feed, as its replay (modules/home/index.js _replayFeedHtml / the "replay" card) ───────
   The recording's own picture (or a frame of it) over the app's colours, with a red LIVE REPLAY tag like YouTube's. */
.home-replay__thumb { position: relative; overflow: hidden; background: linear-gradient(135deg, #ff3b5c, #ff9a3c); }
.home-replay__thumb img, .home-replay__thumb video, .home-replay__bg img, .home-replay__bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-replay__badge { position: absolute; left: 8px; top: 8px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px; background: #e11d48; color: #fff; font-size: 11px !important; font-weight: 700; letter-spacing: .04em; }
.home-replay__badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.home-replay__bg { position: absolute; inset: 0; background: linear-gradient(135deg, #ff3b5c, #ff9a3c); }
.home-replay__overlay { align-items: flex-start; background: linear-gradient(to top, rgba(0, 0, 0, .78), transparent 60%); }
.home-replay__overlay .home-replay__badge { position: static; margin-bottom: 10px; }
.home-replay__overlay h2 { color: #fff; font-size: 1.375rem; margin: 0 0 6px; }
.home-replay__overlay p { color: rgba(255, 255, 255, .88); margin: 0 0 14px; }
.home-replay__play { background: #fff; color: #111; }

/* ── My content → Edit (modules/my-content/index.js _openEdit): the words, and the picture with its template button ── */
.mc-edit { display: grid; gap: 12px; min-width: min(420px, 82vw); }
.mc-edit__field { display: grid; gap: 4px; font-size: 0.8125rem; font-weight: 600; }
.mc-edit__field .form-input { width: 100%; box-sizing: border-box; font-weight: 400; }
.mc-edit__media { display: flex; gap: 12px; align-items: center; }
.mc-edit__media > div:last-child { display: grid; gap: 6px; justify-items: start; }
.mc-edit__preview, .mc-edit__cover { flex: 0 0 112px; width: 112px; aspect-ratio: 1; border-radius: 10px; object-fit: cover; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 12px; overflow: hidden; }
.mc-edit__cover img { width: 100%; height: 100%; object-fit: cover; }

/* Your own photo posts on your channel get the same ⋮ Manage button as your videos (top right of the card). */
.ch-post { position: relative; }
.ch-post__more { position: absolute; top: 8px; right: 8px; background: var(--bg-surface); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }

/* ── The watch page (movies, replays, songs: modules/_shared/watchPage.js) the Instagram way on a phone ─────────────────
   One tidy row of tools under the player, actions that fit on one line, and a comment box that is one rounded field
   (emoji and voice typing inside it) with "Post" on its end, never squeezed to a sliver. */
.vod-tools { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; margin: 0 0 12px; }
.vod-tool { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--bg-elevated); color: var(--text-primary); font-weight: 600; cursor: pointer; list-style: none; white-space: nowrap; }
.vod-tool:active { transform: scale(.97); }
.vod-tools__look { position: relative; }
.vod-tools__look > summary::-webkit-details-marker { display: none; }
.vod-tools__look[open] > summary { background: var(--text-primary); color: var(--bg-surface); }
.vod-tools__panel { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: min(calc(100vw - 32px), 360px); background: var(--bg-surface); border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: 12px; display: grid; gap: 10px; }
.vod-tools__panel > * { margin: 0 !important; max-width: 100%; }
.vod-tools__progress { margin: -4px 0 12px; }

.watch-comments__form { align-items: center; gap: 10px; }
.watch-comments__field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0; background: var(--bg-elevated); border: 1px solid var(--border-default); border-radius: 22px; padding: 2px 4px 2px 14px; }
.watch-comments__field:focus-within { border-color: var(--text-secondary); }
.watch-comments__field .cmt-textarea { order: -1; flex: 1; min-width: 0; width: auto; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none; padding-left: 0; padding-right: 4px; }
.watch-comments__field .cmt-emoji-btn { width: 32px; height: 32px; }
.watch-comments__post { flex: none; border: 0; background: none; color: var(--text-primary); font-weight: 700; padding: 8px 2px; cursor: pointer; }
.watch-comments__post:disabled { opacity: .35; cursor: default; }
.watch-comments__cancel { flex: none; border: 0; background: none; color: var(--text-secondary); padding: 8px 2px; cursor: pointer; }

@media (max-width: 767px) {
  .watch-comments__cancel { display: none !important; } /* Instagram has no Cancel: clear the text to stop */
  .watch-page { padding-bottom: calc(var(--bottom-nav-height, 67px) + env(safe-area-inset-bottom, 0px) + 24px); }
  .watch-page__channel-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .watch-page__pills { display: flex; flex-wrap: nowrap; gap: 6px; align-items: stretch; }
  .watch-page__pills > * { flex: 1 1 0; min-width: 0; }
  .watch-page__pills > .watch-pill-group { flex: 1.6 1 0; border-radius: 12px; }
  .watch-page__pills .watch-pill { flex: 1 1 0; flex-direction: column; justify-content: center; gap: 3px; padding: 7px 2px; min-width: 0; width: 100%; }
  .watch-page__pills .watch-pill--solo { border-radius: 12px; }
  .watch-page__pills .watch-pill span { font-size: 11px !important; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .watch-page__pills .watch-menu { display: flex; }
  .watch-page__pills .watch-menu > .watch-pill { height: 100%; }
}

/* Typing on a phone: the bottom bar steps aside, so it never floats over the keyboard and the box being typed in. */
@media (max-width: 767px) {
  body:has(textarea:focus, input[type="text"]:focus, input[type="search"]:focus, input:not([type]):focus, [contenteditable="true"]:focus) .bottom-nav,
  body:has(textarea:focus, input[type="text"]:focus, input[type="search"]:focus, input:not([type]):focus, [contenteditable="true"]:focus) .bottom-nav__create { display: none !important; }
}

/* Movies → "Live now": movies being streamed live from the Movies section (they are not shown in Live or on Home). */
.fg-live { flex: none; width: 168px; display: flex; flex-direction: column; gap: 4px; background: none; border: 0; padding: 0; text-align: left; color: inherit; cursor: pointer; }
.fg-live__thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #1f2937, #4b1d3f); }
.fg-live__thumb img { width: 100%; height: 100%; object-fit: cover; }
.fg-live__badge { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 5px; background: #e11d48; color: #fff; font-size: 11px !important; font-weight: 700; }
.fg-live__title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fg-live__meta { font-size: 12px !important; opacity: .7; }

/* ── Your videos (modules/my-content/index.js), like YouTube's: tabs, then rows of picture · title · who can see it · views ── */
.yv { max-width: 760px; margin: 0 auto; }
.yv-head { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.yv-back { width: 40px; height: 40px; border: 0; background: none; color: var(--text-primary); display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; }
.yv-title { margin: 0; font-size: 1.25rem; font-weight: 700; }
.yv-notices { margin-bottom: 12px; }
.yv-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 12px; position: sticky; top: 0; z-index: 2; background: var(--bg-page, var(--bg-surface)); }
.yv-tabs::-webkit-scrollbar { display: none; }
.yv-tab { flex: none; border: 0; border-radius: 8px; padding: 7px 14px; background: var(--bg-elevated); color: var(--text-primary); font-weight: 600; cursor: pointer; white-space: nowrap; }
.yv-tab span { opacity: .6; font-weight: 500; margin-left: 2px; }
.yv-tab.is-on { background: var(--text-primary); color: var(--bg-surface); }
.yv-list { display: grid; gap: 4px; }
.yv-row { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; cursor: pointer; border-radius: 10px; }
.yv-row:active { background: var(--bg-elevated); }
.yv-thumb { position: relative; flex: 0 0 160px; width: 160px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #e5e7eb, #dbeafe); display: flex; align-items: center; justify-content: center; }
.yv-thumb--short { flex-basis: 90px; width: 90px; aspect-ratio: 9 / 16; }
.yv-thumb img, .yv-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yv-thumb__len { position: absolute; right: 4px; bottom: 4px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, .8); color: #fff; font-size: 11px !important; font-weight: 600; }
.yv-thumb__icon { font-size: 28px !important; color: var(--text-secondary); }
.yv-thumb__text { padding: 8px; font-size: 12px !important; line-height: 1.3; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.yv-main { flex: 1; min-width: 0; }
.yv-name { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yv-meta { margin-top: 4px; font-size: 12px !important; color: var(--text-secondary); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.yv-meta > span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.yv-meta svg { display: inline-block !important; flex: none; }
.yv-badge { padding: 1px 6px; border-radius: 4px; background: var(--bg-elevated); font-weight: 600; }
.yv-badge--bad { color: var(--error-500, #dc2626); }
.yv-extra { margin-top: 6px; display: grid; gap: 6px; justify-items: start; }
.yv-more { flex: none; width: 36px; height: 36px; border: 0; background: none; color: var(--text-primary); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.yv-empty { color: var(--text-secondary); padding: 24px 0; }
@media (max-width: 420px) { .yv-thumb { flex-basis: 140px; width: 140px; } .yv-thumb--short { flex-basis: 80px; width: 80px; } }

/* ── The GrooVVee mark on content (modules/_shared/watermark.js), like TikTok's: logo + @creator, half-transparent, moving
   between two corners every few seconds so a screen recording cannot simply crop it off. Never takes a tap. ───────── */
.feed-item, .watch-overlay__player-wrap, .xp__media { position: relative; }
.gv-mark {
  position: absolute !important; z-index: 4; left: 10px; top: 10px; display: inline-flex !important; align-items: center; gap: 6px;
  width: auto !important; height: auto !important; max-width: none !important; padding: 0; margin: 0; background: none !important;
  color: #fff; opacity: .86; pointer-events: none; user-select: none; -webkit-user-select: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)) drop-shadow(0 0 6px rgba(0, 0, 0, .35));
  animation: gv-mark-move 14s infinite;
}
.gv-mark .gv-mark__badge { display: block !important; position: static !important; width: 26px !important; height: 26px !important; max-width: none !important; max-height: none !important; flex: none; margin: 0 !important; }
.gv-mark__text { display: flex !important; flex-direction: column; line-height: 1.05; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important; }
.gv-mark__text b { font-size: 13px !important; font-weight: 800; letter-spacing: .01em; font-family: inherit !important; }
.gv-mark__text span { font-size: 11px !important; font-weight: 600; opacity: .95; font-family: inherit !important; }
/* Top-left for half the time, then bottom-right (as TikTok's moves), with a short fade between. */
@keyframes gv-mark-move {
  0%, 44% { left: 10px; top: 10px; right: auto; bottom: auto; opacity: .78; }
  47%, 50% { opacity: 0; }
  50.01%, 94% { left: auto; top: auto; right: 10px; bottom: 10px; opacity: .78; }
  97%, 100% { opacity: 0; }
}
/* Shorts: clear of the floating top icons and the speaker button, and of the right-hand buttons and the caption. */
.feed-scroller .gv-mark { animation-name: gv-mark-move-shorts; }
@keyframes gv-mark-move-shorts {
  0%, 44% { left: 12px; top: 76px; right: auto; bottom: auto; opacity: .78; }
  47%, 50% { opacity: 0; }
  50.01%, 94% { left: 12px; top: 46%; right: auto; bottom: auto; opacity: .78; }
  97%, 100% { opacity: 0; }
}
@media (min-width: 768px) { .feed-scroller .gv-mark { animation-name: gv-mark-move; } }
@media (prefers-reduced-motion: reduce) { .gv-mark { animation: none; } }

/* The expand button on a video player (modules/_shared/expandPlayer.js): the video keeps its size, this fills the screen. */
.gv-expandable { position: relative; }
.gv-expand { position: absolute; right: 8px; top: 8px; z-index: 6; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gv-expand:hover { background: rgba(0,0,0,.75); }
.gv-expand:focus-visible { outline: 3px solid #FCF600; outline-offset: 2px; }
.gv-expandable:fullscreen, .gv-expandable.is-fs { width: 100vw !important; height: 100vh !important; max-width: none !important; max-height: none !important; margin: 0 !important; aspect-ratio: auto !important; border-radius: 0 !important; background: #000; display: flex; align-items: center; justify-content: center; }
.gv-expandable.is-fs { position: fixed !important; inset: 0; z-index: 100000; height: 100vh !important; height: 100dvh !important; }
.gv-expandable:fullscreen video, .gv-expandable.is-fs video { width: 100% !important; height: 100% !important; max-height: none !important; object-fit: contain !important; }

/* Videos in the feed and in chats keep their own shape (a tall or wide video is shown whole, never cropped). */
.xp__media video, .wa-media video { object-fit: contain; background: #000; }
/* "GVV" on the badge: a heavy modern face, not the app's book font (the app-wide font rule reaches SVG text too). */
.gv-mark .gv-mark__gvv { font-family: 'Arial Black', 'Segoe UI Black', 'Roboto', 'Helvetica Neue', Arial, sans-serif !important; font-weight: 900 !important; font-size: 11.5px !important; }

/* You page → "Your content": a "View all" link beside the title opens Your videos (every item, in YouTube's tabs). */
.acct-section__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.acct-section__all { border: 0; background: none; color: var(--text-primary); font-weight: 600; padding: 6px 2px; cursor: pointer; }
.acct-history__thumb .yv-thumb__text { position: relative; z-index: 1; padding: 8px; font-size: 12px !important; line-height: 1.3; color: #fff; text-align: left; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.acct-history__thumb .yv-thumb__icon { position: relative; z-index: 1; font-size: 28px !important; color: #fff; }

/* "Who reacted" sheet (modules/_shared/reactorsSheet.js): WhatsApp's reaction details, Instagram's likes list. */
.rx-sheet { position: fixed; inset: 0; z-index: 10040; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.rx-sheet__card { width: min(100%, 480px); max-height: 72vh; display: flex; flex-direction: column; background: var(--bg-surface, #fff); color: var(--text-primary, #111); border-radius: 20px 20px 0 0; padding: 6px 0 calc(8px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 30px rgba(0,0,0,.2); }
@media (min-width: 600px) { .rx-sheet { align-items: center; } .rx-sheet__card { border-radius: 20px; } }
.rx-sheet__grab { width: 40px; height: 4px; border-radius: 4px; background: var(--border-default, #ccc); margin: 4px auto 6px; }
.rx-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 16px 8px; }
.rx-sheet__head h2 { margin: 0; font-size: 1.0625rem !important; font-weight: 700; }
.rx-sheet__head h2 span { color: var(--text-secondary); font-weight: 600; }
.rx-sheet__x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg-elevated); color: var(--text-primary); cursor: pointer; font-size: 1rem; }
.rx-tabs { display: flex; gap: 6px; padding: 0 16px 8px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border-subtle, rgba(0,0,0,.08)); }
.rx-tab { flex: none; min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--bg-elevated); color: var(--text-primary); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; }
.rx-tab.is-on { background: #FCF600; color: #111; }
.rx-sheet__list { overflow-y: auto; overscroll-behavior: contain; padding: 4px 0; }
.rx-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 16px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.rx-row:hover, .rx-row:focus-visible { background: var(--bg-elevated); }
.rx-row__av .avatar { width: 40px !important; height: 40px !important; font-size: .875rem; }
.rx-row__name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rx-row__name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rx-row__name small { color: var(--text-secondary); font-size: .75rem !important; }
.rx-row__emoji { font-size: 1.375rem; }
.rx-sheet__empty { margin: 0; padding: 24px 16px; text-align: center; color: var(--text-secondary); }
/* The like numbers open that list: they look tappable on their own. */
.cmt-like__count, .like-btn .like-count, .feed-item__rail-btn [data-like-count] { cursor: pointer; padding: 2px 3px; border-radius: 6px; }

/* Advanced campaign: how long it runs (modules/advertising/index.js). */
.adv-days { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.adv-days__chip { min-height: 38px; padding: 0 14px; border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; }
.adv-days__chip.is-on { background: #FCF600; border-color: #FCF600; color: #111; }
.adv-days__chip:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
.adv-days__custom:not([hidden]) { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.adv-days__custom label { display: block; min-width: 0; margin: 0; }
.adv-days__custom .form-input { display: block; box-sizing: border-box; margin-top: 4px; width: 100%; max-width: 100%; min-width: 0; padding-inline: 10px; }
.adv-days__summary { margin: 8px 0 0; }

/* Live gift panel, like TikTok's (modules/streaming/index.js _openGiftDialog): the live stays visible above it. */
.gx-sheet { position: fixed; inset: 0; z-index: 10070; isolation: isolate; display: flex; align-items: flex-end; justify-content: center; background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,.35)); }
.gx-sheet__card { width: min(100%, 520px); max-height: 62vh; display: flex; flex-direction: column; background: #161618; color: #fff; border-radius: 18px 18px 0 0; position: relative; z-index: 1; padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -10px 30px rgba(0,0,0,.35); animation: gx-up .22s ease-out; }
@keyframes gx-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 600px) { .gx-sheet__card { border-radius: 18px; margin-bottom: 16px; } }
.gx-head { display: flex; align-items: baseline; gap: 8px; padding: 2px 4px 10px; }
.gx-head b { font-size: 1rem; font-weight: 700; }
.gx-head__to { flex: 1; min-width: 0; color: rgba(255,255,255,.6); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-x { width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; align-self: center; }
.gx-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.gx-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 104px; padding: 8px 2px 6px; border: 1.5px solid transparent; border-radius: 12px; cursor: pointer; outline: none; transition: background .15s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.gx-item:hover { background: rgba(255,255,255,.06); }
.gx-item:focus-visible { border-color: rgba(255,255,255,.5); }
.gx-item__emoji { font-size: 2.25rem !important; line-height: 1.15; transition: transform .15s; }
.gx-item__name { font-size: .75rem !important; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gx-item__price { display: inline-flex; align-items: center; gap: 3px; font-size: .6875rem !important; color: rgba(255,255,255,.7); }
.gx-token { width: 13px; height: 13px; flex: none; }
.gx-item__send { display: none; margin-top: 4px; width: calc(100% - 6px); min-height: 28px; border: 0; border-radius: 8px; background: #FCF600; color: #111; font: inherit; font-size: .8125rem; font-weight: 800; cursor: pointer; }
.gx-item.is-on { border-color: #FCF600; background: rgba(252,246,0,.08); }
.gx-item.is-on .gx-item__emoji { transform: scale(1.12); }
.gx-item.is-on .gx-item__price { display: none; }
.gx-item.is-on .gx-item__send { display: block; }
.gx-item.is-short .gx-item__emoji, .gx-item.is-short .gx-item__name { opacity: .45; }
.gx-item.is-short .gx-item__send { background: rgba(255,255,255,.18); color: rgba(255,255,255,.75); }
.gx-item__combo { position: absolute; top: 2px; right: 4px; font-size: .875rem; font-weight: 900; font-style: italic; color: #FCF600; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.gx-item__combo:empty { display: none; }
.gx-item.is-sent .gx-item__emoji { animation: gx-pop .45s ease-out; }
@keyframes gx-pop { 0% { transform: scale(1.12); } 40% { transform: scale(1.45) translateY(-6px); } 100% { transform: scale(1.12); } }
.gx-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 4px 0; margin-top: 6px; border-top: 1px solid rgba(255,255,255,.08); }
.gx-balance { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: .9375rem; }
.gx-balance .gx-token { width: 18px; height: 18px; }
.gx-get { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: #FCF600; color: #111; font: inherit; font-size: .8125rem; font-weight: 800; cursor: pointer; }
.gx-foot__hint { font-size: .75rem; color: rgba(255,255,255,.6); text-align: right; }
@media (prefers-reduced-motion: reduce) { .gx-sheet__card, .gx-item.is-sent .gx-item__emoji { animation: none; } }

/* Live status bar: each live is a pulsing, flashing DIAMOND (not Instagram's circle). modules/home/index.js _liveStatusBarHtml */
.live-status-bar__item--live { width: 76px; }
.lsb-dia { position: relative; width: 68px; height: 68px; display: grid; place-items: center; animation: lsb-glow 1.6s ease-in-out infinite; }
.lsb-dia__frame {
  display: grid; place-items: center; width: 64px; height: 64px;
  clip-path: var(--lsb-shape, polygon(50% 0, 100% 50%, 50% 100%, 0 50%));
  background: linear-gradient(135deg, #ff1f3d, #FCF600, #ff1f3d, #FCF600); background-size: 300% 300%;
  animation: lsb-flash 1.6s linear infinite, lsb-pulse 1.6s ease-in-out infinite;
}
.lsb-dia__pic { display: grid; place-items: center; width: 54px; height: 54px; overflow: hidden; clip-path: var(--lsb-shape, polygon(50% 0, 100% 50%, 50% 100%, 0 50%)); background: var(--bg-surface); }
.lsb-dia__pic > * { width: 50px !important; height: 50px !important; clip-path: var(--lsb-shape, polygon(50% 0, 100% 50%, 50% 100%, 0 50%)); }
.lsb-dia__pic .avatar, .lsb-dia__pic img, .lsb-dia__pic video {
  width: 50px !important; height: 50px !important; max-width: none !important; margin: 0 !important;
  border: 0 !important; border-radius: 0 !important; object-fit: cover; display: flex; align-items: center; justify-content: center;
}
.lsb-dia__live {
  position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%); z-index: 1;
  padding: 1px 6px; border-radius: 4px; border: 2px solid var(--bg-surface); background: #ff1f3d; color: #fff;
  font-size: 9px !important; font-weight: 800; letter-spacing: .06em; line-height: 1.3;
}
@keyframes lsb-flash { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
@keyframes lsb-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes lsb-glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 31, 61, 0)); } 50% { filter: drop-shadow(0 0 6px rgba(255, 31, 61, .75)); } }
@media (prefers-reduced-motion: reduce) { .lsb-dia { animation: none; } }
@media (prefers-reduced-motion: reduce) { .lsb-dia__frame { animation: none; } }

/* GrooVVee's link colour (hashtags, @mentions, links, "show more"): lemon yellow is unreadable as text on white, so a dark
   gold on light screens and the lemon yellow itself on dark ones. Buttons use the yellow fill with dark text. */
:root { --gv-link: #7a5c00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --gv-link: #FCF600; } }
:root[data-theme="dark"] { --gv-link: #FCF600; }

/* A gem-shaped profile frame fills a little more of the box than the plain diamond does. */
.lsb-dia--framed .lsb-dia__frame { width: 60px; height: 60px; }
.lsb-dia--framed .lsb-dia__pic { width: 52px; height: 52px; }
.lsb-dia--framed .lsb-dia__pic > * { width: 52px !important; height: 52px !important; }
/* Your own Go Live bubble shows your own profile frame (no red circle around it), with the + on it. */
.live-status-bar__ring--add.is-framed { background: none !important; box-shadow: none !important; padding: 0 !important; border-radius: 0; }
.live-status-bar__ring--add.is-framed .gem-frame { width: 100% !important; height: 100% !important; }

/* Admin → Withdrawals: is paying creators working? (modules/admin-settings/index.js _payoutHealthHtml) */
.po-health { display: grid; gap: 10px; padding: 12px; margin-bottom: var(--space-4); border: 1px solid var(--border-default); border-radius: 12px; background: var(--bg-surface); }
.po-health__row { display: flex; gap: 10px; align-items: flex-start; }
.po-health__ico { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px !important; font-weight: 800; color: #fff; }
.po-health__ico--ok { background: #1fa971; }
.po-health__ico--bad { background: #e11d48; }
.po-health__ico--warn { background: #f59e0b; color: #111; }
.po-health .btn { justify-self: start; }

/* Ask about this video: key lines and key moments, each with its time (tap to jump there). modules/_shared/askVideoSheet.js */
.ask-sheet__moments { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ask-sheet__moments button, .ask-sheet__moment { width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border: 1px solid rgba(0,0,0,.12); border-radius: 12px; background: #fff; color: #111; font: inherit; text-align: left; cursor: pointer; }
.ask-sheet__moment { cursor: default; }
.ask-sheet__moments button:hover { border-color: #C9A800; }
.ask-sheet__moments b { flex: none; min-width: 44px; padding: 2px 6px; border-radius: 6px; background: #FCF600; color: #111; font-size: .75rem !important; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.ask-sheet__moments span { line-height: 1.4; }
.ask-sheet__after { margin-top: 8px; font-size: .8125rem; opacity: .75; }

/* Chat replay beside a live's recording (modules/streaming/index.js _bindChatReplay), like YouTube's. */
.chat-replay { max-height: 360px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 6px; padding: 8px 4px; }
.chat-replay__note { margin: 6px 4px; }

/* A creator with a gem frame shows that shape on Shorts, not a circle around it (TikTok-style side buttons). */
.feed-item__rail-av:has(.gem-frame), .feed-item__creator-avatar:has(.gem-frame) { border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }
.feed-item__rail-av .gem-frame { width: 52px !important; height: 52px !important; filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 2px 6px rgba(0,0,0,.45)); }
.feed-item__creator-avatar .gem-frame { filter: drop-shadow(0 0 1px #fff); }

/* An upright video's player takes the video's own shape: no black bars beside it (modules/_shared/watchPage.js). */
.watch-page__player.is-tall:not(:fullscreen):not(.is-fs) { aspect-ratio: var(--video-ar, 9 / 16); width: auto; height: min(70vh, 640px); max-width: 100%; margin-inline: auto; }
.watch-page__player.is-tall > video { object-fit: cover; }
/* On a phone, like YouTube's app: the video stays pinned at the top while the title, chat and comments scroll under it,
   and it takes about a third of the screen. An upright video is at most ~45% of the screen tall, centred, with the
   page's own colour beside it (never dark bars). */
@media (max-width: 999px) {
  .watch-page__player:not(:fullscreen):not(.is-fs) { position: sticky; top: var(--pin-top, 0px); z-index: 20; }
  .watch-page__player.is-tall:not(:fullscreen):not(.is-fs) { aspect-ratio: auto; width: 100%; height: min(46vh, 420px); margin-inline: 0; border-radius: 0; background: #1b1b1d; isolation: isolate; }
  .watch-page__player.is-tall:not(:fullscreen):not(.is-fs) > video { position: relative; z-index: 1; width: auto; max-width: 100%; height: 100%; aspect-ratio: var(--video-ar, 9 / 16); object-fit: cover; border-radius: 0; background: #000; box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 8px 30px rgba(0,0,0,.35); }
  /* The sides are the video's own picture, softly blurred (as Instagram and TikTok show an upright video), never plain
     white or black bars; the GrooVVee mark and full-screen button sit on it. */
  .watch-page__player.is-tall:not(:fullscreen):not(.is-fs)::before { content: ''; position: absolute; inset: -24px; z-index: 0; background: var(--ambient, none) center / cover no-repeat; filter: blur(22px) brightness(.62) saturate(1.2); }
  .watch-page__player.is-tall:not(:fullscreen):not(.is-fs) > .gv-mark, .watch-page__player.is-tall:not(:fullscreen):not(.is-fs) > .gv-expand { z-index: 3; }
}

/* The chat under a video, YouTube-style: a soft card whose header opens it ("Live chat replay · 24 messages ▾"). */
.vod-chat { margin: 12px 0; border: 0 !important; border-radius: 14px; background: var(--bg-elevated, #f2f2f2) !important; overflow: hidden; }
.vod-chat > summary { list-style: none; display: flex; align-items: baseline; gap: 8px; padding: 12px 44px 12px 16px; position: relative; font-weight: 400; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.vod-chat > summary::-webkit-details-marker { display: none; }
.vod-chat > summary::after { content: ''; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-70%) rotate(45deg); transition: transform .15s; opacity: .7; }
.vod-chat[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.vod-chat__title { font-weight: 700; font-size: .9375rem; }
.vod-chat__sub { font-size: .8125rem; color: var(--text-secondary); }
.vod-chat__mount { background: var(--bg-surface, #fff); margin: 0 8px 8px; padding: 6px 10px 10px; border-radius: 12px; }
.chat-replay { background: var(--bg-surface, #fff); margin: 0 8px 8px; padding: 8px 12px; border-radius: 12px; max-height: 340px; gap: 2px; }
.chat-replay .yt-chat-msg { padding: 5px 0; font-size: .8125rem; }
.chat-replay .yt-chat-msg__name { color: var(--text-secondary); font-weight: 600; }
.chat-replay .yt-superchat { margin: 4px 0; }

/* Group chat bubbles (modules/_shared/roomWidgets.js): only the message text keeps its line breaks; each sender's name
   in their own colour, readable in light and dark. */
.chat-bubble { white-space: normal !important; }
.chat-bubble__text { white-space: pre-wrap; }
.chat-bubble__sender { color: hsl(var(--name-hue, 50) 70% 32%) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chat-bubble__sender { color: hsl(var(--name-hue, 50) 75% 68%) !important; } }
:root[data-theme="dark"] .chat-bubble__sender { color: hsl(var(--name-hue, 50) 75% 68%) !important; }
.chat-bubble__sticker { font-size: 2.5rem; line-height: 1; }
.chat-bubble__media { max-width: 220px; }
.chat-bubble__media.has-text { margin-bottom: 6px; }
.room-messages .chat-row + .chat-row { margin-top: 4px; }

/* Switch account / channels sheet (modules/account/index.js _openChannelSwitcher), like YouTube's. */
.chsw { position: fixed; inset: 0; z-index: 9990; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.chsw__card { width: min(100%, 460px); max-height: 80vh; overflow-y: auto; background: var(--bg-surface, #fff); color: var(--text-primary, #111); border-radius: 20px 20px 0 0; padding: 6px 0 calc(10px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 600px) { .chsw { align-items: center; } .chsw__card { border-radius: 20px; } }
.chsw__grab { width: 40px; height: 4px; border-radius: 4px; background: var(--border-default, #ccc); margin: 4px auto 6px; }
.chsw__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 16px 8px; }
.chsw__head h2 { margin: 0; font-size: 1.0625rem !important; font-weight: 700; }
.chsw__x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg-elevated); color: var(--text-primary); cursor: pointer; }
.chsw__row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 16px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.chsw__row:hover, .chsw__row:focus-visible { background: var(--bg-elevated); }
.chsw__row.is-on { background: rgba(252, 246, 0, .16); }
.chsw__av .avatar, .chsw__av .gem-frame { width: 44px !important; height: 44px !important; }
.chsw__name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chsw__name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chsw__name small { color: var(--text-secondary); font-size: .75rem !important; }
.chsw__tick { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #FCF600; color: #111; font-weight: 800; }
.chsw__add { display: flex; align-items: center; gap: 10px; width: calc(100% - 32px); margin: 8px 16px 4px; min-height: 48px; padding: 0 14px; border: 1.5px dashed var(--border-default); border-radius: 12px; background: none; color: var(--text-primary); font: inherit; font-weight: 700; cursor: pointer; }
.chsw__add span { font-size: 1.25rem; }
.chsw__note { margin: 6px 16px; font-size: .8125rem; color: var(--text-secondary); }
.chsw__other { display: block; width: calc(100% - 32px); margin: 10px 16px 4px; min-height: 44px; border: 0; border-top: 1px solid var(--border-subtle, rgba(0,0,0,.08)); background: none; color: var(--text-primary); font: inherit; font-weight: 600; cursor: pointer; }

/* Channel managers and settings (modules/account/index.js _openChannelManage). */
.chsw__line { display: flex; align-items: center; gap: 6px; padding-right: 12px; }
.chsw__line > .chsw__row { flex: 1; min-width: 0; }
.chsw__row.is-static { cursor: default; }
.chsw__row.is-static:hover { background: none; }
.chsw__more { flex: none; min-width: 40px; min-height: 36px; padding: 0 12px; border: 1px solid var(--border-default); border-radius: 999px; background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: .8125rem; font-weight: 700; cursor: pointer; }
.chsw__sub { margin: 12px 16px 4px; font-size: .8125rem !important; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; }
.chsw__sub span { font-weight: 600; opacity: .8; }
.chsw__danger { display: block; width: calc(100% - 32px); margin: 14px 16px 6px; min-height: 46px; border: 1.5px solid #e11d48; border-radius: 12px; background: none; color: #e11d48; font: inherit; font-weight: 700; cursor: pointer; }
.chsw__head h2 { flex: 1; text-align: center; }

/* The post watch screen's player stays pinned under the ← header on a phone (like YouTube). The expand button's
   .gv-expandable { position: relative } comes later in this file and had overridden the pin, so the video scrolled
   away; this wins over it. Scrolled down to the list: the player gets smaller (modules/home/index.js). */
@media (max-width: 999px) {
  .watch-overlay__player-wrap.gv-expandable:not(:fullscreen):not(.is-fs),
  .watch-overlay__player-wrap:not(:fullscreen):not(.is-fs) { position: sticky; top: var(--overlay-head, 61px); z-index: 2; }
}

/* Group info: the creator's "Delete group" (modules/social/index.js). */
.grp-delete { margin-top: 6px; color: #e11d48; border-color: #e11d48; font-weight: 700; }

/* AI Studio badge icon: GrooVVee colours (black "A" with a circuit core on yellow) wherever it appears. The colours live once
   in index.html (#gvas-*). It never dims like the line icons around it. */
.gv-aistudio-icon { display: block; flex-shrink: 0; opacity: 1 !important; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.nav-item svg.gv-aistudio-icon { width: 22px; height: 22px; }
.btn-icon svg.gv-aistudio-icon { width: 24px; height: 24px; }
.menus-sheet__icon svg.gv-aistudio-icon { width: 44px; height: 44px; border-radius: 50%; }
.ai-studio-head { display: flex; align-items: center; gap: var(--space-3); }
.ai-studio-head__badge .gv-aistudio-icon { width: 52px; height: 52px; filter: drop-shadow(0 4px 12px rgba(235,216,0,.45)); }

/* AI Studio start: every kind of creation listed at once — tap one to start. */
.ai-pick { display: flex; flex-direction: column; background: var(--bg-surface, #fff); border: 1px solid var(--border-subtle, rgba(0,0,0,.08)); border-radius: 16px; overflow: hidden; }
.ai-pick__row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; background: none; border: 0; border-bottom: 1px solid var(--border-subtle, rgba(0,0,0,.08)); text-align: left; color: var(--text-primary); cursor: pointer; font: inherit; transition: background 150ms; }
.ai-pick__row:last-child { border-bottom: 0; }
.ai-pick__row:hover, .ai-pick__row:focus-visible { background: rgba(252,246,0,.18); outline: none; }
.ai-pick__row:active { background: rgba(252,246,0,.32); }
.ai-pick__emoji { width: 42px; height: 42px; border-radius: 12px; background: #FCF600; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0; }
.ai-pick__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ai-pick__title { font-weight: 600; font-size: .98rem; }
.ai-pick__desc { font-size: .8rem; color: var(--text-secondary); }
.ai-pick__chev { width: 18px; height: 18px; color: var(--text-secondary); flex-shrink: 0; }
.ai-studio-head .section-title { font-size: 1.45rem !important; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
.ai-studio-head .section-subtitle { font-size: .92rem; margin-top: 2px; }
.ai-studio-head__badge .gv-aistudio-icon { width: 56px; height: 56px; }

/* The short fees line (modules/_shared/feeDisclaimer.js): the detail is in the Payment Terms & Fees document. */
.fee-link { margin: var(--space-3) 0 var(--space-4); font-size: .8rem; color: var(--text-secondary); line-height: 1.5; }
.fee-link__btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--text-primary); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* Music: AI Music Studio beside Categories; the inner pages (upload, playlists, radio) have a small back bar. */
.fg-toprow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fg-toprow > :first-child { flex: 0 1 auto; min-width: 0; }
.fg-ai-btn { border-radius: 999px; white-space: nowrap; }
.music-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 var(--space-4); padding: 6px 4px; background: none; border: 0; color: var(--text-primary); font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.music-back svg { width: 22px; height: 22px; }
.create-menu__icon--music { background: #FCF600; color: #111; }

/* Admin Settings → All content (modules/admin-settings/allContent.js) */
.ac-filters { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .ac-filters { grid-template-columns: 1fr 140px 140px; } }
.ac-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border-subtle); }
.ac-thumb { width: 64px; height: 44px; border-radius: 8px; background: #efeff1; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #888; }
.ac-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ac-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ac-title { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-meta { font-size: .76rem; color: var(--text-secondary); }
.ac-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ac-forever { color: #c0262d; }
.ac-state { font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #e9f7ee; color: #17803d; white-space: nowrap; }
.ac-state--unlisted { background: #eef2ff; color: #4338ca; }
.ac-state--private { background: #fff7d6; color: #8a6d00; }
.ac-state--deleted, .ac-state--removed { background: #fde8e8; color: #b91c1c; }

/* ═══ Live status bar diamonds: always lit, three layers of light, spinning (modules/home/index.js _lsbDiamondHtml) ═══
   1. halo   — a soft blurred glow behind, slowly turning through red, gold and white
   2. orbit  — a thin gem outline that keeps spinning around the picture
   3. frame  — the diamond itself, with a band of light sweeping round its edge, and a white glint across it
   Live now: red and gold, "LIVE". Went live in the last hours: gold and white, how long ago ("2h"). */
.lsb-dia { width: 74px; height: 74px; animation: none; isolation: isolate; }
.lsb-dia__halo, .lsb-dia__orbit, .lsb-dia__shine { position: absolute; pointer-events: none; }
.lsb-dia__halo {
  /* layer 1: a soft glow in the diamond's shape, breathing */
  left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; z-index: -2; border-radius: 10px;
  background: radial-gradient(circle, #fff 0%, #FCF600 35%, #ff1f3d 75%); transform: rotate(45deg);
  filter: blur(9px); animation: lsb-breathe 1.6s ease-in-out infinite;
}
.lsb-dia__orbit {
  /* layer 2: a gem outline that keeps spinning around the picture (it turns like a coin, so it stays a diamond) */
  left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; z-index: -1;
  border: 2.5px solid #FCF600; border-radius: 5px;
  box-shadow: 0 0 6px #FCF600, 0 0 12px rgba(255, 31, 61, .9), inset 0 0 6px rgba(255, 255, 255, .8);
  animation: lsb-orbit 2.8s linear infinite;
}
.lsb-dia__frame {
  position: relative; overflow: hidden; width: 64px; height: 64px; background: #ff1f3d !important; animation: lsb-pulse 1.6s ease-in-out infinite !important;
}
.lsb-dia__frame::before {
  content: ''; position: absolute; left: -25%; top: -25%; width: 150%; height: 150%; z-index: 0;
  background: conic-gradient(from 0deg, #ff1f3d 0deg, #FCF600 70deg, #ffffff 110deg, #FCF600 150deg, #ff1f3d 220deg, #ff6a00 300deg, #ff1f3d 360deg);
  animation: lsb-spin 1.8s linear infinite;
}
.lsb-dia__pic { position: relative; z-index: 1; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.lsb-dia__shine {
  inset: 5px; z-index: 2; clip-path: var(--lsb-shape, polygon(50% 0, 100% 50%, 50% 100%, 0 50%));
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%; animation: lsb-glint 2.6s ease-in-out infinite;
}
.lsb-dia__live { z-index: 3; white-space: nowrap; box-shadow: 0 0 8px rgba(255, 31, 61, .9); }
/* went live earlier: still lit and spinning, in gold */
.lsb-dia--recent .lsb-dia__halo { background: radial-gradient(circle, #fff 0%, #FCF600 45%, #FFB800 80%); }
.lsb-dia--recent .lsb-dia__frame { background: #FFB800 !important; }
.lsb-dia--recent .lsb-dia__frame::before { background: conic-gradient(from 0deg, #FFB800, #FCF600 90deg, #ffffff 140deg, #FCF600 200deg, #c98a00 290deg, #FFB800); animation-duration: 2.6s; }
.lsb-dia--recent .lsb-dia__orbit { border-color: rgba(255, 255, 255, .95); box-shadow: 0 0 8px rgba(252, 246, 0, .9); }
.lsb-dia--recent .lsb-dia__live { background: #111; color: #FCF600; box-shadow: 0 0 6px rgba(252, 246, 0, .7); }
.lsb-dia--framed .lsb-dia__orbit { border-radius: 2px; }
@keyframes lsb-spin { to { transform: rotate(360deg); } }
@keyframes lsb-orbit { from { transform: perspective(160px) rotateY(0deg) rotate(45deg); } to { transform: perspective(160px) rotateY(360deg) rotate(45deg); } }
@keyframes lsb-breathe { 0%, 100% { opacity: .65; transform: rotate(45deg) scale(1.05); } 50% { opacity: 1; transform: rotate(45deg) scale(1.3); } }
@keyframes lsb-glint { 0%, 55% { background-position: 150% 0; } 100% { background-position: -100% 0; } }
/* The owner wants the diamonds always lit and spinning: with reduced motion they still glow and turn, only slower. */
@media (prefers-reduced-motion: reduce) {
  .lsb-dia__halo { animation: none; opacity: .9; transform: rotate(45deg) scale(1.2); }
  .lsb-dia__orbit { animation: lsb-orbit 14s linear infinite; }
  .lsb-dia__frame { animation: none !important; }
  .lsb-dia__frame::before { animation: lsb-spin 10s linear infinite; }
  .lsb-dia__shine { animation: none; opacity: 0; }
}

/* The GrooVVee logo on every video keeps turning (a coin-like spin, then a pause so it can be read). watermark.js */
.gv-mark .gv-mark__badge { animation: gv-badge-spin 5s ease-in-out infinite; transform-style: preserve-3d; }
@keyframes gv-badge-spin { 0% { transform: perspective(120px) rotateY(0); } 30% { transform: perspective(120px) rotateY(360deg); } 100% { transform: perspective(120px) rotateY(360deg); } }

/* Shorts player: Create a Short (record or upload, up to 60s). On a phone the + in the bottom bar has "Create Short". */
.tt-top__create { pointer-events: auto; position: absolute; right: 62px; top: 10px; height: 34px; padding: 0 14px 0 10px; display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 999px; background: #FCF600; color: #111; font: inherit; font-size: .875rem; font-weight: 800; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.tt-top__create svg { width: 18px; height: 18px; }
@media (max-width: 767px) { .tt-top__create { display: none; } }

/* Concert live chat on a concert-stage picture (modules/concerts/index.js), veiled so the messages stay easy to read. */
.cn-live .yt-live__chat.cn-chat-bg { --cn-chat-veil: rgba(255, 255, 255, .84); background: linear-gradient(var(--cn-chat-veil), var(--cn-chat-veil)), var(--cn-chat-img) center / cover no-repeat; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cn-live .yt-live__chat.cn-chat-bg { --cn-chat-veil: rgba(10, 10, 14, .72); } }
:root[data-theme="dark"] .cn-live .yt-live__chat.cn-chat-bg { --cn-chat-veil: rgba(10, 10, 14, .72); }
.cn-card__media { position: relative; }
.cn-thumb { position: relative; }
.cn-thumb__name--over { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; background: linear-gradient(to top, rgba(0,0,0,.75), transparent); color: #fff; font-size: .75rem; font-weight: 700; }
/* Sample battle-stage picture behind a contestant's initials (modules/battlesphere/index.js), and contest card covers. */
.bs-vs__half { position: relative; }
.bs-vs__stage { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.7) saturate(1.2); }
.bs-vs__initials--over { position: relative; z-index: 1; background: rgba(0,0,0,.45); color: #fff; }
.ct-cover { position: relative; margin: calc(-1 * var(--space-4, 16px)) calc(-1 * var(--space-4, 16px)) var(--space-3); aspect-ratio: 16 / 9; overflow: hidden; border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.ct-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fg .gv-sample-row { padding: 0 16px; }
.bs-vs__initials--over { display: none; } /* the name is on the card already; the stage picture fills the half */

/* The follow + on a Short's profile picture: GrooVVee yellow, always there; a ✓ once you follow (modules/home/index.js). */
.feed-item__rail-plus { width: 24px !important; height: 24px !important; background: #FCF600 !important; color: #111 !important; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.feed-item__rail-plus[data-following="true"] { background: #fff !important; color: #16a34a !important; }
.feed-item__rail-plus svg { width: 13px !important; height: 13px !important; }

/* Podcast: "Find a topic" tiles (modules/podcast/index.js). */
.pod-topics__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
@media (max-width: 520px) { .pod-topics__grid { grid-template-columns: repeat(2, 1fr); } }
.pod-topic { height: 92px; border: 0; border-radius: 16px; background-size: cover; background-position: center; color: #fff; display: flex; align-items: flex-end; padding: 10px 12px; cursor: pointer; text-align: left; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.pod-topic b { font-size: 1.05rem; font-weight: 800; text-shadow: 0 1px 4px rgba(0,0,0,.5); }

/* Pinned message bar with its Unpin ✕ (modules/social/dmChatPanel.js). */
.wa-pinwrap { display: flex; align-items: stretch; background: #fffde0; border-bottom: 1px solid rgba(0,0,0,.1); }
.wa-pinwrap .wa-pinbar { flex: 1; min-width: 0; border-bottom: 0; }
.wa-pinbar__x { flex: none; width: 44px; border: 0; background: transparent; color: #444; font-size: 16px; cursor: pointer; }
.wa-pinbar__x[hidden] { display: none; }

/* Discovery: a role nobody is listed under yet (modules/discovery/index.js). */
.dc-invite { width: 100%; min-height: 96px; border: 0; border-radius: 16px; background-size: cover; background-position: center; color: #fff; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; padding: 14px 16px; text-align: left; cursor: pointer; font: inherit; }
.dc-invite b { font-size: 1rem; }
.dc-invite span { font-size: .8rem; opacity: .9; }

/* GrooVVee's ON AIR channels in the live bar: each its own gem shape and colours, lit and spinning like the lives. */
.lsb-dia--onair .lsb-dia__frame { background: var(--oa-a) !important; }
.lsb-dia--onair .lsb-dia__frame::before { background: conic-gradient(from 0deg, var(--oa-a), var(--oa-b) 90deg, #fff 140deg, var(--oa-b) 200deg, var(--oa-a) 300deg, var(--oa-a)) !important; }
.lsb-dia--onair .lsb-dia__halo { background: radial-gradient(circle, #fff 0%, var(--oa-b) 40%, var(--oa-a) 80%) !important; border-radius: 0; clip-path: var(--lsb-shape); }
.lsb-dia--onair .lsb-dia__orbit { border-color: var(--oa-b) !important; box-shadow: 0 0 8px var(--oa-b), inset 0 0 6px var(--oa-a) !important; border-radius: 0; clip-path: none; }
.lsb-dia--onair .lsb-dia__live { background: #111 !important; color: #FCF600 !important; box-shadow: 0 0 8px var(--oa-b) !important; }
.lsb-dia--onair .lsb-dia__pic img { width: 52px !important; height: 52px !important; object-fit: cover; clip-path: var(--lsb-shape); }

/* Movie upload progress (modules/movies/index.js). */
.mvup { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--bg-surface); border: 1px solid var(--border-default); }
.mvup__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.mvup__top b { font-size: 1.25rem; font-weight: 800; }
.mvup__top span { font-size: .85rem; color: var(--text-secondary); }
.mvup__bar { height: 10px; border-radius: 999px; background: rgba(0,0,0,.08); overflow: hidden; }
.mvup__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #FCF600, #FFB800); border-radius: 999px; transition: width .3s; }
.mvup__note { margin-top: 8px; font-size: .85rem; color: var(--text-secondary); }

/* Home: the Posts title under the Shorts row (modules/home/index.js). */
.home-posts-head { margin-top: 8px; }

/* A photo post opened on its own (modules/home/index.js _openWatchOverlay): like a YouTube post — the words first, then the
   photo at its own shape with rounded corners on the page background, never inside a black video box. */
.watch-overlay--photo .watch-photo__text { max-width: 900px; margin: var(--space-3) auto var(--space-3); padding: 0 var(--space-4); font-size: 1.05rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-primary); }
.watch-overlay.watch-overlay--photo .watch-overlay__player-wrap {
  position: relative; top: auto; background: transparent; max-height: none; aspect-ratio: auto;
  width: auto; max-width: 900px; margin: 0 auto; padding: 0 var(--space-4); border-radius: 0; overflow: visible; display: block;
}
.watch-overlay.watch-overlay--photo .watch-overlay__player-wrap img {
  display: block; width: 100%; height: auto; max-height: 80vh; object-fit: contain; background: transparent; border-radius: 16px;
}
.watch-overlay.watch-overlay--photo .watch-overlay__player-wrap .gv-mark { left: calc(var(--space-4) + 10px); }
.watch-overlay--photo .watch-overlay__title, .watch-overlay--photo [data-more], .watch-overlay--photo [data-caption] { display: none !important; }
@media (min-width: 1100px) {
  .watch-overlay.watch-overlay--photo .watch-overlay__player-wrap, .watch-overlay--photo .watch-photo__text { width: calc(100% - 472px); max-width: 760px; margin-left: var(--space-6); margin-right: 0; padding: 0; }
}

/* Every video on a page fits its own shape: no dark bars around it. What is left beside a tall video is the page's own
   colour. (Full screen and the Shorts player stay black, like every video app.) */
.watch-page__player:not(:fullscreen):not(.is-fs) { background: var(--bg-base); }
.watch-page__player.is-fit:not(:fullscreen):not(.is-fs) { aspect-ratio: var(--video-ar, 16 / 9); max-height: 75vh; }
.watch-page__player:not(:fullscreen):not(.is-fs) > video { background: transparent !important; object-fit: contain !important; }
@media (max-width: 999px) {
  .watch-page__player.is-fit:not(.is-tall):not(:fullscreen):not(.is-fs) { border-radius: 0; }
  .watch-page__player.is-tall:not(:fullscreen):not(.is-fs) { background: var(--bg-base) !important; }
  .watch-page__player.is-tall:not(:fullscreen):not(.is-fs)::before { display: none !important; }
  .watch-page__player.is-tall:not(:fullscreen):not(.is-fs) > video { box-shadow: none !important; border-radius: 12px !important; }
}
.watch-overlay .watch-overlay__player-wrap { background: var(--bg-base); }
.watch-overlay .watch-overlay__player-wrap video {
  width: 100%; height: auto; max-height: 75vh; object-fit: contain; background: transparent !important; display: block; margin: 0 auto;
}
@media (max-width: 999px) { .watch-overlay .watch-overlay__player-wrap video { max-height: 45vh; } }
@media (min-width: 1000px) {
  .watch-overlay:not(.watch-overlay--photo) .watch-overlay__player-wrap { aspect-ratio: auto; max-height: none; background: transparent; }
  .watch-overlay .watch-overlay__player-wrap video { height: auto; max-height: calc(100vh - 150px); border-radius: var(--radius-lg); }
}
.xp__media video { height: auto; object-fit: contain; background: transparent !important; }
.wa-media video { background: transparent !important; }

/* Plans bought through Google Play (services/subscriptionGate.js in the Play Store app): price terms, Restore, Manage. */
.sg-terms { margin: 10px 2px 0; font-size: .82rem; line-height: 1.45; color: var(--text-secondary); }
.sg-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 14px; }
.sg-link { background: none; border: 0; padding: 6px 2px; color: var(--text-primary); font: inherit; font-size: .88rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
.sg-link:disabled { opacity: .5; }

/* No black boxes: a video card or player without a picture yet shows a light background and the video's own first frame. */
.watch-rail-card__thumb { background-color: #e5e7eb; }
.watch-rail-card__frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: transparent; pointer-events: none; }
.yt-upnext__thumb { background: linear-gradient(135deg, #e5e7eb, #dbeafe 48%, #cbd5e1); }
.watch-overlay .watch-overlay__player-wrap video:not([poster]) { background: linear-gradient(135deg, #e5e7eb, #dbeafe 48%, #cbd5e1) !important; }

/* ── No black anywhere (owner's choice, Nov 2026) ─────────────────────────────────────────────────────────────────────
   Players and picture boxes inside a page: a light background. Full-screen screens that keep white buttons and text on
   top (video viewer, live, TV, camera, Shorts while loading): a soft blue-grey, never black. */
:root {
  --gv-media-light: linear-gradient(135deg, #eef0f3 0%, #dbeafe 50%, #cbd5e1 100%);
  --gv-media-deep: linear-gradient(160deg, #475569 0%, #64748b 55%, #7c8ba1 100%);
}
.watch-page__player, .watch-page__player > video, .watch-rail-card__thumb, .yt-upnext__thumb,
.yt-live__player, .yt-live__media video, .yt-live--wide .yt-live__player, .nf-modal__hero, .bs-stage,
.file-picker__item--media img, .file-picker__item--media video, .wa-media--open .wa-media__el,
.xp__media video, .wa-media video, .wp-stage, .wp-player, .wp-player video,
.tv__screen, .tv__screen video, .watch-overlay__player-wrap, .watch-overlay__player-wrap img, .feed-item__rail-av {
  background: var(--gv-media-light) !important;
}
.watch-page__player.is-tall:not(:fullscreen):not(.is-fs) > video { background: transparent !important; }
.live-fullscreen, .dl-player, .yt-live__player:fullscreen, .yt-live__player.is-fs, .yt-live--tt, .tv__stage,
.cc-cam, .cc-cam__video, .cc-cam__review, .meet__present, .gv-expandable:fullscreen, .gv-expandable.is-fs,
.watch-page__player:fullscreen, .watch-page__player.is-fs {
  background: var(--gv-media-deep) !important;
}
video:fullscreen, video::backdrop, :fullscreen::backdrop { background: var(--gv-media-deep) !important; }

/* Shorts: a blurred copy of the Short's own picture behind it (home/index.js), the light background while one has none. */
.feed-scroller .feed-item, .home-top-shorts .feed-item, body:has(.tt-top) .feed-scroller { background: var(--gv-media-light) !important; }
.feed-scroller .feed-item__bg { overflow: hidden; }
.feed-scroller .feed-item__bg video { background: transparent !important; }
.feed-scroller .feed-item__bg video:not([poster]) { background: var(--gv-media-light) !important; }
/* The bottom bar keeps the app's own colours while Shorts are open (it was black). */
body:has(.tt-top) .bottom-nav { background: var(--bg-surface, #fff) !important; border-top-color: var(--border-subtle, rgba(0,0,0,.08)) !important; }
body:has(.tt-top) .bottom-nav .nav-item, body:has(.tt-top) .bottom-nav__item { color: var(--text-secondary) !important; }
body:has(.tt-top) .bottom-nav .nav-item.active, body:has(.tt-top) .bottom-nav .nav-item.active svg { color: var(--text-primary) !important; }
/* The spinning music disc on a Short: brand colours instead of black. */
.feed-item__disc { background: radial-gradient(circle, #FCF600 0 30%, #64748b 31% 100%) !important; border-color: #94a3b8 !important; }
/* The photo / video viewer (opened from chats and posts) was almost black. */
.mv { background: var(--gv-media-deep) !important; }
/* Meet scheduling: which time the chosen zone means on this phone's clock. */
.mt-sched__hint { margin: -4px 0 0; font-size: .8125rem; color: var(--text-secondary); }
/* Chat time + ticks ("10:52 PM ✓✓"): never on top of each other. The space is a margin (older Android web views ignore
   `gap` here), the tick never shrinks, and its icon is a fixed-size block. */
.wa-time { gap: 0 !important; padding-left: 2px; }
.wa-time .wa-tick { flex: 0 0 auto; width: 16px; min-width: 16px; height: 11px; margin-left: 4px; position: relative; }
.wa-time .wa-tick svg { display: block; width: 16px !important; height: 11px !important; max-width: none; }

/* The headline ribbon under the Home Live status bar (modules/_shared/newsTape.js). */
:root { --news-tape-h: 32px; }
.news-tape { position: relative; height: var(--news-tape-h); margin: 6px 0 10px; display: flex; align-items: stretch; background: var(--bg-surface, #fff); border: 1px solid var(--border-subtle, rgba(0,0,0,.08)); border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); overflow: hidden; font-size: 13px; }
.news-tape[hidden] { display: none; }
.news-tape__label { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; background: #FCF600; color: #111; font-weight: 800; letter-spacing: .06em; font-size: 12px; }
.news-tape__label i { width: 7px; height: 7px; border-radius: 50%; background: #e11d48; animation: news-tape-pulse 1.6s ease-in-out infinite; }
.news-tape__viewport { position: relative; flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); }
.news-tape__run { display: flex; width: max-content; height: 100%; animation: news-tape-run 120s linear infinite; }
.news-tape__viewport:hover .news-tape__run, .news-tape__viewport:active .news-tape__run, .news-tape:focus-within .news-tape__run { animation-play-state: paused; }
.news-tape__set { display: flex; align-items: center; flex: none; }
.news-tape__item { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; height: 100%; white-space: nowrap; color: var(--text-primary, #0f0f0f); text-decoration: none; }
.news-tape__item b { font-weight: 800; color: #b45309; }
.news-tape__item:hover span, .news-tape__item:hover { text-decoration: underline; }
.news-tape__dot { padding: 0 10px; color: var(--text-muted, #888); }
.news-tape__close { flex: none; width: 32px; border: 0; background: transparent; color: var(--text-secondary, #606060); font-size: 18px; line-height: 1; cursor: pointer; }
@keyframes news-tape-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes news-tape-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .news-tape__run { animation: none; }
  .news-tape__viewport { overflow-x: auto; scrollbar-width: none; }
  .news-tape__set[aria-hidden="true"] { display: none; }
}
/* News: "Read ›" is a clear, tappable link in colour (opens the story on the outlet's site). */
.news__body footer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.news__read { display: inline-flex; align-items: center; margin-left: auto; padding: 5px 14px; border-radius: 999px; background: #2563eb; color: #fff !important; font-size: .8125rem; font-weight: 700; text-decoration: none; box-shadow: 0 1px 3px rgba(37,99,235,.35); }
.news__read:hover, .news__read:focus-visible { background: #1d4ed8; text-decoration: none; }
/* News: the outlet's name on the photo, in its own colours ("CNN" in red), so it is clear where each story is from. */
.news__pic { position: relative; flex: none; width: 96px; height: 96px; }
.news__pic .news__img { width: 100%; height: 100%; }
.news__src { position: absolute; left: 4px; bottom: 4px; max-width: calc(100% - 8px); padding: 2px 6px; border-radius: 6px; color: #fff; font-size: 10px; font-weight: 800; line-height: 1.3; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 3px rgba(0,0,0,.3); }

/* Advertising: the new-advertiser credit banner and the first-ad steps (modules/advertising/index.js) */
.adv-offer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); padding: var(--space-4); border-radius: var(--radius-lg, 14px); background: #0b0b0f; color: #fff; }
.adv-offer b { color: #FCF600; font-size: 1.0625rem; }
.adv-offer span { font-size: 0.875rem; color: #d9d9e0; }
.adv-start { margin-bottom: var(--space-4); }
.adv-start ol { margin: var(--space-2) 0 var(--space-2); padding-left: 1.25rem; font-size: 0.875rem; display: grid; gap: 4px; }

/* Live chat: your own line shows at once while it is being sent (modules/streaming/index.js) */
.yt-chat-msg--pending { opacity: .6; }
