.bb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height:58px;
  padding: 0.55rem max(1rem,calc((100vw - 1560px)/2));
  background: rgba(0,0,0,.72);
  border-bottom: 1px solid var(--border, #2a2e3d);
  box-shadow:0 12px 40px rgba(0,0,0,.24);
  backdrop-filter:blur(24px) saturate(1.5);
  -webkit-backdrop-filter:blur(24px) saturate(1.5);
  font-family: var(--font, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  position: sticky;
  top: 0;
  z-index: var(--z-nav, 200);
}

.bb-nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.nav-wordmark {
  display: block;
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #db2777 0%, #ec4899 52%, #f9a8d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bb-nav-logo:hover .nav-wordmark {
  filter: brightness(1.12);
}

.nav-logo-mark {
  display: block;
  width: 28px;
  height: 28px;
  filter:drop-shadow(0 0 14px rgba(236,72,153,.25));
  transition: transform 0.25s var(--ease, ease),filter .25s;
}
.nav-logo-mark:hover {
  transform: scale(1.08) rotate(-4deg);
  filter:drop-shadow(0 0 18px rgba(236,72,153,.5));
}

/* ── Group dropdowns (desktop) ── */
.bb-nav-groups {
  display: flex;
  gap: 0.15rem;
  /* Don't stretch: the group holds just two dropdowns (Discover / Tools). When
     it had flex:1 it ballooned on wide screens and shoved the count + media
     controls into a lonely cluster mid-bar, leaving a big empty gap after
     "Tools". Now it hugs its buttons; the account cluster is pushed right via
     .bb-notif-wrap's margin below, giving one clean gap like a normal top bar. */
  flex: 0 0 auto;
}

/* Desktop: right-align the account cluster (notifications + auth) so the left
   cluster — groups, count chip, media controls — packs together and the single
   gap lands before the account menu, like a conventional top bar. Mobile keeps
   its own wrapped layout (see the max-width:600 block). */
@media (min-width: 601px) {
  .bb-notif-wrap { margin-left: auto; }
}

.bb-nav-group {
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: -0.5rem;
}

.bb-nav-group-btn {
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border, #2a2e3d);
  padding: 6px 10px;
  min-height: 36px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim, #8b8d98);
  cursor: pointer;
  border-radius: 11px;
  transition: all 0.15s;
  white-space: nowrap;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bb-nav-group-btn:hover {
  color: var(--text, #e4e4e7);
  border-color: var(--border-bright);
  background: rgba(255,255,255,.075);
}

/* Top-nav group icons (browserboy nav set). Only the labels that carry a
   .bb-nav-ico become inline-flex; dropdown items are unaffected. */
.bb-nav-group-btn:has(.bb-nav-ico),
.bb-nav-link:has(.bb-nav-ico) {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}
.bb-nav-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
}
.bb-nav-ico .bb-nav-icon { width: 18px; height: 18px; }
.bb-nav-label { min-width: 0; }
/* Active group → on-brand icon fill, matching the icon-system active state. */
.bb-nav-group-btn.active .bb-nav-icon,
.bb-nav-link.active .bb-nav-icon {
  fill: rgba(99, 102, 241, 0.38);
}

.bb-nav-group-btn.active {
  color: var(--primary-hover, #818cf8);
  border-color: var(--primary-hover, #818cf8);
  background: rgba(99, 102, 241, 0.1);
}

.bb-nav-group-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;
  background: var(--glass-strong,#08080d);
  border: 1px solid var(--border, #2a2e3d);
  border-radius: var(--radius, 14px);
  padding: 0.45rem;
  min-width: 172px;
  box-shadow: var(--shadow-float,0 24px 70px rgba(0,0,0,.58));
  backdrop-filter:var(--glass-blur);
  z-index: 300;
  flex-direction: column;
  gap: 2px;
}

.bb-nav-group-dropdown.open {
  display: flex;
}

/* Folded Tools ("wrench") menu: holds every non-Discover destination as
   labelled sections, so it's taller and scrolls rather than overflowing. */
.bb-nav-group-mega .bb-nav-group-dropdown {
  min-width: 190px;
  max-height: 76vh;
  overflow-y: auto;
}
.bb-nav-dd-section + .bb-nav-dd-section {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border, #2a2e3d);
}
.bb-nav-dd-heading {
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim, #8b8d98);
  opacity: 0.7;
  padding: 0.3rem 0.72rem 0.15rem;
}

/* Hover-to-open on desktop */
@media (hover: hover) {
  .bb-nav-group:hover .bb-nav-group-dropdown {
    display: flex;
  }
}

/* ── Parasocial chip (points/streak/league, persistent header) ── */
.bb-nav-auth {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.bb-parasocial-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.25rem 0.55rem;
  margin-right: 0.45rem;
  background: rgba(10,10,18,0.55); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; color: var(--text, #e4e4e7);
  line-height: 1;
}
.bb-ps-tier {
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.05em;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(255,255,255,0.08); color: var(--text-dim);
}
.bb-ps-tier[data-tier="silver"]  { background: linear-gradient(135deg,#9ca3af,#d1d5db); color:#0a0a0f; }
.bb-ps-tier[data-tier="gold"]    { background: linear-gradient(135deg,#f59e0b,#fcd34d); color:#0a0a0f; }
.bb-ps-tier[data-tier="diamond"] { background: linear-gradient(135deg,#6366f1,#ec4899); color:#fff; }
.bb-ps-points { font-variant-numeric: tabular-nums; }
.bb-ps-streak { display: inline-flex; align-items: center; gap: 2px; font-size: 0.7rem; }
.bb-ps-streak b { font-weight: 800; font-variant-numeric: tabular-nums; }

/* ── Nav links ── */
.bb-nav-link {
  padding: 0.48rem 0.72rem;
  font-size: var(--text-sm, 0.7rem);
  font-weight: 500;
  color: var(--text-dim, #8b8d98);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.15s;
  white-space: nowrap;
  display: block;
}
/* Top-level nav links (single-item groups) match .bb-preview-btn sizing */
.bb-nav-groups > .bb-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 11px;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border, #2a2e3d);
}
.bb-nav-groups > .bb-nav-link:hover {
  color: var(--text, #e4e4e7);
  border-color: var(--border-bright);
  background: rgba(255,255,255,.075);
}
.bb-nav-groups > .bb-nav-link.active {
  color: var(--primary-hover, #818cf8);
  border-color: var(--primary-hover, #818cf8);
  background: rgba(99, 102, 241, 0.1);
}

.bb-nav-group-dropdown .bb-nav-link,
.bb-nav-mobile-menu .bb-nav-link,
.bb-nav-dropdown .bb-nav-link {
  align-items: center;
  gap: 0.45rem;
}

.bb-nav-group-dropdown .bb-nav-link:has(.bb-nav-ico),
.bb-nav-mobile-menu .bb-nav-link:has(.bb-nav-ico),
.bb-nav-dropdown .bb-nav-link:has(.bb-nav-ico) {
  display: flex;
}

.bb-nav-link:hover {
  color: var(--text, #e4e4e7);
  background: var(--surface-hover, #222633);
}

.bb-nav-link.active {
  color: var(--primary-hover, #818cf8);
  background: rgba(99, 102, 241, 0.1);
}

/* Filter active dot */
.bb-nav-group-btn.has-filters,
.bb-nav-link.has-filters {
  position: relative;
}
.bb-nav-group-btn.has-filters::after,
.bb-nav-link.has-filters::after {
  content: '';
  position: absolute;
  top: 3px; right: 3px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--primary-hover, #818cf8);
  pointer-events: none;
}

/* ── Media-controls tray ──────────────────────────────────────────────────
   Flat flex row — no outer border or background. The internal border-right
   dividers on each sub-group (.bb-nav-actions, .bb-filter-tray) provide all
   the visual separation needed. Buttons are larger without the outer shell. */
.bb-media-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-right: 0.5rem;
}
/* Auto-hide plumbing (bb-preview.js): these are inline-flex, so [hidden]'s
   UA display:none is overridden — force it. The tray collapses entirely when
   it has no page actions and no applicable preview controls. */
.bb-media-bar[hidden],
.bb-preview-controls[hidden],
.bb-stat-chips[hidden],
.bb-preview-btn[hidden] { display: none !important; }

/* Stat chips — display/info counters (icon + number), NOT controls. They get
   their OWN bordered tray, mirroring the media-control tray, so the two read as
   sibling clusters (info on the left, controls on the right). */
.bb-stat-chips {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.5rem;
  padding: 3px 5px;
  min-height: 36px;
  background: var(--surface, #171925);
  border: 1px solid var(--border, #2a2e3d);
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.bb-stat-chips:hover { border-color: var(--text-dim, #8b8d98); }
/* Sized to match the media-control buttons (.bb-preview-btn): same padding,
   radius, and 16px icon — so a chip and a control read as the same height. */
.bb-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius, 8px);
  background: none;
  border: 1px solid var(--border, #2a2e3d);
  color: var(--text-dim, #8b8d98);
  line-height: 1;
  white-space: nowrap;
}
[data-icon-system="browserboy"] .bb-stat-chip .app-icon { width: 18px; height: 18px; opacity: 0.9; flex: 0 0 auto; }
[data-icon-system="browserboy"] .bb-stat-chip .app-icon-count {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text, #e4e4e7);
  min-width: 0;
}

/* Universal preview toggles (right side of the tray). */
.bb-preview-controls {
  display: flex;
  gap: 0.25rem;
}

/* ── Filter tray (per-page "what to display" quick-access) ─────────────── */
/* Sits between the action tray and the preview controls. Mirrors the spacing
   and divider treatment of .bb-nav-actions so the three clusters read as
   one continuous control surface. Empty + invisible when no tagbar. */
.bb-filter-tray {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.bb-filter-tray:not(:empty) {
  margin-right: 0.35rem;
  padding-right: 0.4rem;
  border-right: 1px solid var(--border, #2a2e3d);
}
/* Open state — popover is visible, anchor the button to look "pressed". */
.bb-filter-btn.is-open {
  color: var(--primary-hover, #818cf8);
  border-color: var(--primary-hover, #818cf8);
  background: rgba(99, 102, 241, 0.12);
}

/* ── Filter popover ──────────────────────────────────────────────────── */
.bb-filter-pop {
  position: fixed;
  z-index: 220;
  min-width: 200px;
  max-width: 280px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--surface, #1a1d27);
  border: 1px solid var(--border, #2a2e3d);
  border-radius: var(--radius, 8px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  padding: 0.4rem;
  color: var(--text, #e4e4e7);
  font-size: 0.78rem;
  animation: bb-filter-pop-in 0.12s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes bb-filter-pop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* ── Popover header (title + X close) ── */
.bb-filter-pop-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.4rem 0.1rem 0.45rem;
  gap: 0.4rem;
}
.bb-filter-pop-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-dim, #8b8d98);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex: 1;
}
.bb-filter-pop-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-dim, #8b8d98);
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.1s, background 0.1s;
  flex-shrink: 0;
}
.bb-filter-pop-close:hover {
  color: var(--text, #e4e4e7);
  background: var(--surface-hover, #222633);
}
/* ── Pill grid inside popover ── */
.bb-filter-pop-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.35rem 0.45rem 0.5rem;
}
/* Reset footer button — appears only when a filter is active */
.bb-filter-pop-reset {
  display: block;
  width: calc(100% - 0.9rem);
  margin: 0 0.45rem 0.45rem;
  padding: 0.35rem;
  background: none;
  border: 1px solid var(--border, #2a2e3d);
  border-radius: var(--radius-sm, 6px);
  color: var(--text-dim, #8b8d98);
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: color 0.1s, border-color 0.1s, background 0.1s;
}
.bb-filter-pop-reset:hover {
  color: var(--text, #e4e4e7);
  border-color: var(--text-dim, #8b8d98);
  background: var(--surface-hover, #222633);
}

/* Size slider inside the size popover */
.bb-filter-pop-slider {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.45rem 0.5rem;
}
.bb-filter-pop-slider input[type="range"] {
  flex: 1;
  accent-color: var(--primary, #6366f1);
}
.bb-filter-pop-sliderval {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary-hover, #818cf8);
  min-width: 14px;
  text-align: center;
}

/* Indicator dot when filter is active — sits in the corner of the icon button */
.bb-filter-btn.active::after {
  content: "";
  position: absolute;
  top: 2px; right: 2px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--primary, #6366f1);
  box-shadow: 0 0 0 1.5px var(--bg, #0f1117);
}
.bb-filter-btn { position: relative; }
/* Per-page media-action toolbar — sits left of the global preview controls.
   Empty (and invisible) until a page registers actions via BBNavActions. A
   divider appears only when it actually holds buttons. */
.bb-nav-actions {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.bb-nav-actions:not(:empty) {
  margin-right: 0.35rem;
  padding-right: 0.4rem;
  border-right: 1px solid var(--border, #2a2e3d);
}
/* Action button states (page-driven). Mirror the .active fill of preview btns. */
.bb-nav-action[data-action-state="active"] {
  color: var(--primary-hover, #818cf8);
  border-color: var(--primary-hover, #818cf8);
  background: rgba(99, 102, 241, 0.1);
}
.bb-nav-action[data-action-state="active"] .bb-nav-icon { fill: rgba(99, 102, 241, 0.38); }
.bb-nav-action[data-action-state="pulse"] {
  color: var(--primary-hover, #818cf8);
  border-color: var(--primary-hover, #818cf8);
  animation: bb-nav-action-pulse 1.4s ease-in-out infinite;
}
/* Destructive action (e.g. delete creator) — red on hover. */
.bb-nav-action#act-delete:hover {
  color: var(--red, #ef4444);
  border-color: var(--red, #ef4444);
  background: rgba(239, 68, 68, 0.1);
}
@keyframes bb-nav-action-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
.bb-preview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width:36px;
  min-height:36px;
  background:rgba(255,255,255,.035);
  border: 1px solid var(--border, #2a2e3d);
  border-radius:11px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--text-dim, #8b8d98);
  transition: all 0.15s;
}
/* Playable-count chip on the autoplay toggle — matches the stat-bar count
   style (mono, bold). Button grows to a pill so the number sits cleanly
   beside the icon instead of crammed into the circle. */
.bb-preview-btn .bb-play-count {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}
.bb-preview-btn:hover {
  color: var(--text, #e4e4e7);
  border-color:var(--border-bright);
  background:rgba(255,255,255,.075);
  transform:translateY(-1px);
}
.bb-preview-btn.active {
  color: var(--primary-hover, #818cf8);
  border-color: var(--primary-hover, #818cf8);
  background: rgba(99, 102, 241, 0.1);
}
/* On-brand fill inside the glyph when active (matches the icon-system
   active-fill), so an active nav toggle reads as lit-up, not just bordered. */
.bb-preview-btn.active .bb-nav-icon { fill: rgba(99, 102, 241, 0.38); }
/* Inline icon glyphs in nav control buttons (hover/autoplay/mute/bell).
   display:block kills the baseline gap; currentColor inherits the button
   color so .active / hover restyle the stroke automatically. */
.bb-nav-icon { display: block; width: 18px; height: 18px; }

/* Universal preview video overlay.
   Intentionally NO background-color — the underlying card thumbnail stays
   visible through the (still empty) video element until its first frame
   decodes. Setting `background: #000` here made the card go black exactly
   where the user was looking during MP4 fetch. */
.bb-preview-hover-video,
.bb-preview-auto-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  pointer-events: none;
}
.card[data-gif-id] { position: relative; }

/* Auth dropdown (reused from old nav) */
.bb-nav-dropdown {
  display: none; position: absolute; top: 100%; right: 0; margin-top: 4px;
  background: var(--bg, #0f1117); border: 1px solid var(--border, #2a2e3d);
  border-radius: var(--radius, 8px); padding: 0.3rem; min-width: 120px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5); z-index: 300;
  flex-direction: column; gap: 2px;
}
.bb-nav-dropdown.open { display: flex; }
.bb-nav-dropdown .bb-nav-link { display: block; width: 100%; }

/* ── Hamburger (mobile only) ── */
.bb-nav-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border, #2a2e3d);
  border-radius: var(--radius, 8px);
  color: var(--text-dim, #8b8d98);
  font-size: 1.1rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  line-height: 1;
}

.bb-nav-mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background:rgba(0,0,0,.92);
  border-bottom: 1px solid var(--border, #2a2e3d);
  padding: 0.75rem 1rem;
  z-index: 299;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow:var(--shadow-float);
  backdrop-filter:blur(28px);
}

.bb-nav-mobile-menu.open {
  display: flex;
}

.bb-nav-mobile-heading {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim, #8b8d98);
  padding: 0.4rem 0.6rem 0.1rem;
}

.bb-nav-mobile-section {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bb-nav-mobile-section + .bb-nav-mobile-section {
  border-top: 1px solid var(--border, #2a2e3d);
  padding-top: 0.4rem;
}

/* Compact the desktop command bar before it can force horizontal page scroll.
   Icons retain tooltips/accessible names, so capability is never removed. */
@media (max-width: 1340px) and (min-width: 601px) {
  .bb-nav { gap:.25rem; padding-inline:.65rem; }
  .bb-nav-group-btn { padding:.45rem; }
  .bb-nav-group-btn .bb-nav-label { display:none; }
  .bb-nav-group-btn:has(.bb-nav-ico) { gap:0; }
  .bb-nav-logo { margin-right:.2rem; }
  .bb-media-bar,.bb-stat-chips { margin-right:.2rem; }
  .bb-preview-btn { padding:6px 8px; }
}
@media (max-width: 1040px) and (min-width: 601px) {
  .bb-stat-chips { display:none !important; }
  .bb-nav-groups { gap:0; }
}

/* ── Mobile breakpoint ── */
@media (max-width: 600px) {
  .bb-nav-groups { display: none; }
  .bb-nav-hamburger { display: block; }
  .bb-parasocial-chip { display: none !important; }

  .bb-nav {
    padding: 0.4rem 0.5rem;
    gap: 0.25rem;
    flex-wrap: wrap;
  }
  .bb-nav-logo {
    margin-right: auto;
    flex-shrink: 0;
  }
  .nav-logo-mark {
    width: 24px;
    height: 24px;
  }
  /* Media bar takes the full width on its own row, but as ONE horizontally
     scrolling strip — NOT a wrapping block. With flex-wrap:wrap the ~10 action
     buttons + filter tray + preview toggles stacked into 3–4 rows and ate the
     top half of the screen. nowrap + overflow-x keeps it a single 44px row the
     user swipes through, like the creator-pill strip below it. */
  .bb-media-bar {
    order: 10;
    width: 100%;
    margin: 0;
    gap: 0.2rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .bb-media-bar::-webkit-scrollbar { display: none; }
  /* Shrink-on-scroll: the control strip collapses to zero height when the nav
     gains .bb-nav--condensed (added by nav.js on scroll-down), leaving just the
     title row. It animates back open on scroll-up. */
  .bb-media-bar {
    max-height: 52px;
    transition: max-height .22s ease, opacity .18s ease, margin .22s ease;
  }
  .bb-nav--condensed .bb-media-bar {
    max-height: 0;
    opacity: 0;
    margin: 0;
    pointer-events: none;
  }
  /* Drop the quick-filter tray (Sort / Length / Format / Thumb size / Groups /
     Albums) on mobile. It duplicates the canonical Filters bottom-sheet that the
     tagbar-trigger opens (which has every one of those controls), and at ~291px
     it was the bulk of what overflowed the strip — pushing the Filters trigger
     itself off-screen and out of reach. With the tray gone the remaining
     controls fit without scrolling and the trigger is always tappable. */
  .bb-filter-tray { display: none !important; }
  /* Keep the inner clusters in-line too, and stop any button from squishing. */
  .bb-media-bar > *,
  .bb-nav-actions,
  .bb-preview-controls { flex-wrap: nowrap; }
  .bb-media-bar .bb-preview-btn,
  .bb-media-bar .bb-nav-action,
  .bb-media-bar .bb-filter-btn { flex-shrink: 0; }
  /* Hover-to-preview is meaningless on touch (no hover state) — drop it so the
     strip is shorter and only shows controls that actually do something. */
  #bb-toggle-hover { display: none; }
  /* Hide the clip/creator count chips on mobile. They were a whole third row
     under the title + media strip, and the counts are non-essential on a phone
     (the filtered library is right below). Dropping them cuts the sticky nav
     from ~3 rows to 2, so it stops eating the top of the viewport. */
  .bb-stat-chips { display: none !important; }
  /* Account (username/login) + notifications are relocated INTO the hamburger
     menu by nav.js on mobile (see foldAccountIntoMenu). Render them as flat,
     full-width menu rows with their dropdowns expanded inline — no floating
     popovers inside the sheet. */
  .bb-nav-mobile-menu.has-account #bb-nav-auth,
  .bb-nav-mobile-menu.has-account #bb-notif-wrap {
    display: block;
    width: 100%;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border, #2a2e3d);
  }
  .bb-nav-mobile-menu #bb-notif-btn,
  .bb-nav-mobile-menu #bb-nav-auth .bb-nav-link,
  .bb-nav-mobile-menu #bb-nav-auth button {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }
  .bb-nav-mobile-menu #bb-notif-btn { min-height: 40px; }
  /* Expand the relocated dropdowns inline (static, in-flow) instead of the
     absolute popovers they use in the top bar. */
  .bb-nav-mobile-menu .bb-notif-dropdown,
  .bb-nav-mobile-menu .bb-auth-dropdown,
  .bb-nav-mobile-menu #bb-nav-auth .bb-nav-dropdown {
    position: static;
    display: block;
    width: 100%;
    min-width: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0.15rem 0 0.15rem 0.9rem;
    max-height: 40vh;
    overflow-y: auto;
  }
  .bb-nav-mobile-menu .bb-notif-wrap { order: 0; }
  .bb-notif-wrap { order: 5; }
  .bb-nav-auth { flex-shrink: 0; }
  .bb-nav-auth .bb-nav-link { font-size: 0.7rem; padding: 0.2rem 0.4rem; }
  .bb-preview-btn { min-width:44px; min-height:44px; padding:8px; }
  .bb-nav-hamburger { min-width:44px; min-height:44px; padding:.45rem; }
  .bb-nav-auth .bb-nav-link { min-height:44px; display:inline-flex; align-items:center; }
  .bb-nav-icon { width: 16px; height: 16px; }
  .bb-nav-link {
    padding: 0.25rem 0.4rem;
    font-size: 0.65rem;
  }

  /* ── Global mobile compact stats ── */
  .stats, .stats-bar {
    gap: 0.3rem !important;
    margin-bottom: 0.5rem !important;
  }
  .stat {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 0.2rem !important;
  }
  .stat-value {
    font-size: 0.8rem !important;
    font-weight: 700 !important;
  }
  .stat-label {
    font-size: var(--text-xxs, 0.55rem) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    margin-top: 0 !important;
  }
  .stats > .stat + .stat::before,
  .stats-bar > .stat + .stat::before {
    content: '·';
    color: var(--text-dim, #8b8d98);
    margin-right: 0.2rem;
    font-weight: 400;
    font-size: 0.7rem;
  }
}
