/* -
   GratisChat App Model - Discord/TeamSpeak-style UI v3
   Clean stylesheet. No legacy overrides. No !important spam.
   - */

/* - Iframe panes (profile, moedekort, usersearch, mediasearch, geografisk) - */
body.v3-ui .app-iframe-pane {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  height: 100%;
  overflow: auto; /* allow pane itself to scroll if needed */
  -webkit-overflow-scrolling: touch; /* iOS momentum scrolling */
  background: #07111e;
}
body.v3-ui .app-inner-iframe {
  flex: 1 1 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: none;
  display: block;
  background: transparent;
}

/* - All modals: fully opaque, no transparency - */
body.v3-ui .modal-content {
  background-color: #0f1e35 !important;
  background-image: none !important;
  opacity: 1 !important;
}
/* Per-modal custom backgrounds still work via their own classes */
body.v3-ui .cdm-content {
  background-color: var(--cdm-bg, #0d1b2e) !important;
}
body.v3-ui .ptsm-content {
  background-color: #0b1628 !important;
}
body.v3-ui #chat-settings-modal .modal-content {
  background-color: #0f1e35 !important;
}

/* - CSS Variables - Navy Blue / True Blue Modern Theme - */
:root {
  --app-bg: #0b1120;
  --app-base: #070e1a;
  --app-sidebar: #0a1628;
  --app-elevated: #0f1e32;
  --app-hover: rgba(59, 130, 246, 0.12);
  --app-hover-bg: rgba(59, 130, 246, 0.09);
  --app-active: #1a3a5c;
  --app-border: rgba(59, 130, 246, 0.18);
  --app-text: #e2e8f0;
  --app-text-primary: #f0f6ff;
  --app-text-muted: #7a92ad;
  --app-accent: #3b82f6;
  --app-accent-hover: #2563eb;
  --app-online: #4ade80;
  --app-away: #fbbf24;
  --app-busy: #f87171;
  --app-offline: #4a6080;
  --app-font:
    "Inter", -apple-system, BlinkMacSystemFont, San Francisco, "Segoe UI",
    Roboto, "Helvetica Neue", sans-serif;
  --app-mono: "SF Mono", Monaco, Inconsolata, "Fira Code", monospace;
  --iconbar-width: 72px;
  --sidebar-width: 280px;
  --rightbar-width: 288px;
  --titlebar-height: 34px;
  --topbar-height: 46px;
  --statusbar-height: 0px;
}

/* - Reset - */
html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--app-font);
  background: var(--app-bg);
  color: var(--app-text);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* - App Top Bar - */
.app-topbar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  height: var(--topbar-height);
  min-height: var(--topbar-height);
  max-height: var(--topbar-height);
  flex: 0 0 var(--topbar-height);
  padding: 0 10px;
  gap: 6px;
  background: var(--app-base);
  border-bottom: 1px solid var(--app-border);
  color: var(--app-text);
  font-size: 12px;
  user-select: none;
  z-index: 100;
  overflow: hidden;
}

/* Left section: logo + channel pill */
.app-topbar-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.app-topbar-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.app-topbar-logo img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: contain;
  display: block;
}
.app-topbar-channel-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: 20px;
  cursor: default;
  max-width: 200px;
}
.app-topbar-channel-icon {
  font-size: 13px;
  color: var(--app-text-muted);
  flex-shrink: 0;
}
.app-topbar-channel-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--app-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.app-topbar-online-count {
  font-size: 10px;
  font-weight: 700;
  color: var(--app-online);
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 10px;
  padding: 1px 6px;
  flex-shrink: 0;
  line-height: 1.4;
}

/* Centre: donation XP widget */
.app-topbar-center {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* - Premium VIP CTA pill in topbar center - */
.app-topbar-donate-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px 6px 12px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316 0%, #ef4444 45%, #db2777 100%);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    0 2px 10px rgba(239, 68, 68, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.16) inset;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  animation: vip-cta-pulse 2.4s ease-in-out infinite;
}
.app-topbar-donate-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 65%
  );
  transform: translateX(-100%);
  transition: transform 0.55s ease;
  pointer-events: none;
}
.app-topbar-donate-cta:hover::before,
.app-topbar-donate-cta:focus::before {
  transform: translateX(100%);
}
.app-topbar-donate-cta:hover,
.app-topbar-donate-cta:focus {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 6px 22px rgba(239, 68, 68, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.25) inset;
  filter: brightness(1.08);
  color: #fff;
}
.app-topbar-donate-cta i {
  font-size: 15px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}
.app-topbar-donate-cta img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Active-VIP state: gold pill, no pulse (calm "you're in" signal) */
.app-topbar-donate-cta--vip {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 45%, #b45309 100%);
  box-shadow:
    0 2px 10px rgba(245, 158, 11, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  animation: none;
}
.app-topbar-donate-cta--vip:hover,
.app-topbar-donate-cta--vip:focus {
  box-shadow:
    0 6px 22px rgba(245, 158, 11, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.28) inset;
}
.app-topbar-donate-cta-days {
  font-style: normal;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  letter-spacing: 0.02em;
}

/* xChat cross-promo ghost pill — secondary, non-VIP only */
.app-topbar-xpromo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(236, 72, 153, 0.5);
  background: rgba(236, 72, 153, 0.08);
  color: #f9a8d4;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}
.app-topbar-xpromo .ti {
  color: #ec4899;
  font-size: 15px;
}
.app-topbar-xpromo:hover,
.app-topbar-xpromo:focus {
  background: rgba(236, 72, 153, 0.2);
  border-color: rgba(236, 72, 153, 0.85);
  color: #fff;
  transform: translateY(-1px);
}
#mobile-xpromo-link {
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
#mobile-xpromo-link .ti {
  color: #fd5068;
}
/* ── VIP strip: clean single-line button in the topbar center ── */
.app-topbar-vip-strip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: linear-gradient(135deg, #291d0a 0%, #1c1206 100%);
  color: #fde68a;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  transition:
    border-color 0.15s ease,
    filter 0.15s ease;
}
.app-topbar-vip-strip:hover,
.app-topbar-vip-strip:focus {
  border-color: rgba(251, 191, 36, 0.75);
  filter: brightness(1.08);
}
.app-topbar-vip-strip__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.app-topbar-vip-strip__badge img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.app-topbar-vip-strip__text {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.app-topbar-vip-strip__text strong {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fbbf24;
}
.app-topbar-vip-strip__text small {
  display: none;
}
.app-topbar-vip-strip__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #fde68a;
  padding-left: 8px;
  border-left: 1px solid rgba(251, 191, 36, 0.28);
  flex: 0 0 auto;
}
.app-topbar-vip-strip__cta .ti {
  font-size: 12px;
}

/* ── Banner ads — topbar center, right of the VIP pill ── */
.app-topbar-mkad,
.app-topbar-enad {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  border-radius: 7px;
  overflow: hidden;
  text-decoration: none;
  flex: 0 1 auto;
  min-width: 0;
  height: 34px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}
.app-topbar-mkad img,
.app-topbar-enad img {
  display: block;
  height: 34px;
  width: auto;
}
.app-topbar-mkad:hover,
.app-topbar-mkad:focus,
.app-topbar-enad:hover,
.app-topbar-enad:focus {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.4);
}
@media (max-width: 1350px) {
  .app-topbar-mkad img,
  .app-topbar-enad img {
    height: 30px;
  }
  .app-topbar-mkad,
  .app-topbar-enad {
    height: 30px;
  }
}
@media (max-width: 1100px) {
  .app-topbar-mkad,
  .app-topbar-enad {
    display: none;
  }
}

/* ── MødeKort.dk banner ad — bottom of the mobile nav drawer ── */
.mobile-nav-mkad {
  display: block;
  margin: 12px 10px 6px;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 2px 10px rgba(0, 0, 0, 0.35);
  transition:
    filter 0.18s ease,
    transform 0.18s ease;
}
.mobile-nav-mkad img {
  display: block;
  width: 100%;
  height: auto;
}
.mobile-nav-mkad:hover,
.mobile-nav-mkad:focus {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

@keyframes vip-cta-pulse {
  0%,
  100% {
    box-shadow:
      0 2px 10px rgba(239, 68, 68, 0.45),
      0 0 0 1px rgba(255, 255, 255, 0.16) inset;
  }
  50% {
    box-shadow:
      0 5px 18px rgba(219, 39, 119, 0.6),
      0 0 0 1px rgba(255, 255, 255, 0.22) inset;
  }
}

/* - Donation progress bar - modern card style - */
.app-topbar-donation {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-decoration: none;
  color: inherit;
  padding: 7px 12px 8px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  background: rgba(251, 191, 36, 0.04);
  transition:
    background 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
  width: clamp(320px, 42vw, 460px);
  min-width: 320px;
  max-width: 460px;
  position: relative;
  overflow: hidden;
}
.app-topbar-donation:hover {
  background: rgba(251, 191, 36, 0.09);
  border-color: rgba(251, 191, 36, 0.38);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.12);
  color: inherit;
}

/* Header row: icon + label + spacer + live + percent */
.don-bar-header {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}
.don-bar-icon {
  font-size: 13px;
  color: #fbbf24;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.app-topbar-donation:hover .don-bar-icon {
  transform: scale(1.2);
}
.don-bar-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #d1d5db;
  flex-shrink: 0;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.don-bar-live {
  font-size: 10px;
  font-weight: 700;
  color: #fb923c;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 2px;
}
.don-bar-pct {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

@media (max-width: 1400px) {
  .app-topbar-donation {
    width: clamp(280px, 36vw, 380px);
    min-width: 280px;
    max-width: 380px;
  }
}

/* Progress track */
.don-bar-track {
  position: relative;
  height: 7px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  overflow: visible;
}

/* Animated fill */
.don-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #d97706 0%, #fbbf24 60%, #fde68a 100%);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 6px;
  max-width: 100%;
  overflow: hidden;
}

/* Shimmer sweep on the fill */
.don-bar-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: donShimmer 2.2s ease-in-out infinite;
  border-radius: inherit;
}
@keyframes donShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Milestone dots on the track */
.don-bar-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  z-index: 2;
  cursor: default;
  transition:
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}
/* Tooltip via ::after */
.don-bar-dot::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #f1f5f9;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  padding: 3px 7px;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}
.don-bar-dot:hover::after {
  opacity: 1;
}
/* Dot reached state (set by JS) */
.don-bar-dot.reached {
  background: #fbbf24;
  border-color: #fde68a;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.7);
}

/* Legacy compat selectors - keep pointing to new elements */
.app-topbar-don-row1 {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Right: points pill + buttons */
.app-topbar-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-left: auto;
}
.app-topbar-divider {
  width: 1px;
  height: 20px;
  background: var(--app-border);
  margin: 0 4px;
  flex-shrink: 0;
}

/* Points pill */
.app-topbar-points-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px 3px 7px;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.15),
    rgba(245, 158, 11, 0.08)
  );
  border: 1.5px solid rgba(251, 191, 36, 0.35);
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.app-topbar-points-pill:hover {
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.25),
    rgba(245, 158, 11, 0.15)
  );
  border-color: rgba(251, 191, 36, 0.6);
}
.app-topbar-points-coin {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.app-topbar-points-value {
  font-size: 11px;
  font-weight: 800;
  color: #fbbf24;
}
.app-topbar-points-label {
  font-size: 9px;
  font-weight: 600;
  color: rgba(251, 191, 36, 0.65);
  text-transform: uppercase;
}

/* Nav buttons */
.app-topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--app-text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.12s,
    color 0.12s;
  position: relative;
  flex-shrink: 0;
}
.app-topbar-btn:hover,
.app-topbar-btn:focus {
  background: var(--app-hover);
  color: var(--app-text-primary);
}
.app-topbar-btn.is-active {
  background: rgba(99, 102, 241, 0.14);
  color: var(--app-accent);
}
.app-topbar-btn i {
  font-size: 16px;
  line-height: 1;
}
.app-topbar-leaf-toggle i {
  color: #22c55e !important;
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.35));
}
.app-topbar-leaf-toggle:hover i,
.app-topbar-leaf-toggle.is-active i {
  color: #4ade80 !important;
}

/* - Topbar: per-button static icon colors - */
/* Profil - amber */
.app-topbar-btn[data-pane="#main-profile"] i,
.app-topbar-btn.v3-switch-pane[title*="rofil"] i {
  color: #f59e0b;
}
.app-topbar-btn[data-pane="#main-profile"]:hover i,
.app-topbar-btn.v3-switch-pane[title*="rofil"]:hover i {
  color: #fbbf24;
}

/* Tema / Lys / Mork - yellow */
.app-topbar-btn.topbar-shortcut--theme i {
  color: #eab308;
}
.app-topbar-btn.topbar-shortcut--theme:hover i {
  color: #facc15;
}

/* Notifikationer - red (legacy icon fallback) */
.app-topbar-btn.topbar-shortcut--notifications i {
  color: #ef4444;
}
.app-topbar-btn.topbar-shortcut--notifications:hover i {
  color: #f87171;
}

/* ── Modern SVG Bell ─────────────────────────────────────────── */
.topbar-bell-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.topbar-bell-icon {
  width: 20px;
  height: 20px;
  color: #7cc4ff;
  transition:
    color 0.15s,
    transform 0.15s;
  transform-origin: 50% 4px; /* swing from the top (hanger) */
}

/* Gentle swing when button is hovered */
.app-topbar-icon-btn.topbar-shortcut--notifications:hover .topbar-bell-icon,
.app-topbar-btn.topbar-shortcut--notifications:hover .topbar-bell-icon {
  color: #a5d8ff;
  animation: bell-swing 0.4s ease;
}

/* Continuous sway when there are unread notifications */
.app-topbar-icon-btn.topbar-shortcut--notifications.has-unread
  .topbar-bell-icon,
.app-topbar-btn.topbar-shortcut--notifications.has-unread .topbar-bell-icon {
  animation: bell-sway 2.4s ease-in-out infinite;
}

@keyframes bell-swing {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(18deg);
  }
  50% {
    transform: rotate(-14deg);
  }
  75% {
    transform: rotate(8deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes bell-sway {
  0%,
  100% {
    transform: rotate(0deg);
  }
  15% {
    transform: rotate(14deg);
  }
  30% {
    transform: rotate(-10deg);
  }
  45% {
    transform: rotate(6deg);
  }
  60% {
    transform: rotate(0deg);
  }
}

/* Pulse ring — shown when has-unread, hidden otherwise */
.topbar-bell-ring {
  display: none;
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(56, 189, 248, 0.6);
  animation: bell-ring-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

.app-topbar-icon-btn.topbar-shortcut--notifications.has-unread
  .topbar-bell-ring,
.app-topbar-btn.topbar-shortcut--notifications.has-unread .topbar-bell-ring {
  display: block;
}

@keyframes bell-ring-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* Opkald / Voice - green */
.app-topbar-btn.join-voice i {
  color: #22c55e;
}
.app-topbar-btn.join-voice:hover i {
  color: #4ade80;
}

/* Points game btn - violet */
.app-topbar-icon-btn#topbarPointsGameBtn i {
  color: #8b5cf6;
}
.app-topbar-icon-btn#topbarPointsGameBtn:hover i {
  color: #a78bfa;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DM PROFILE PANEL — Modern redesign, chest-palette (deep indigo + violet)
   ═══════════════════════════════════════════════════════════════════════════ */
.dm-profile-panel {
  display: flex;
  flex-direction: column;
  /* NB: NOT align-items:center — on a scrollable flex column it clips
     content that overflows at the top (hero/avatar got cut off). Children
     center themselves via width/margins instead. */
  align-items: stretch;
  padding: 0 0 16px;
  gap: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ── Hero banner area ───────────────────────────────────────────────────── */
.dm-profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  padding: 24px 16px 16px;
  background: linear-gradient(160deg, #1e1345 0%, #0f172a 100%);
  border-bottom: 1px solid rgba(139, 92, 246, 0.25);
  position: relative;
  overflow: hidden;
}
/* Subtle top glow */
.dm-profile-hero::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 90px;
  background: radial-gradient(
    ellipse,
    rgba(139, 92, 246, 0.28),
    transparent 70%
  );
  pointer-events: none;
}

/* ── Avatar ─────────────────────────────────────────────────────────────── */
.dm-profile-avatar-link {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
}
.dm-profile-avatar {
  width: 84px !important;
  height: 84px !important;
  min-width: 84px !important;
  min-height: 84px !important;
  max-width: 84px !important;
  max-height: 84px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  border: 2.5px solid rgba(139, 92, 246, 0.55) !important;
  box-shadow:
    0 0 0 4px rgba(124, 58, 237, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.45) !important;
  transition: box-shadow 0.2s ease;
}
.dm-profile-avatar-link:hover .dm-profile-avatar {
  box-shadow:
    0 0 0 4px rgba(124, 58, 237, 0.3),
    0 8px 28px rgba(0, 0, 0, 0.55) !important;
}

/* ── Status dot ─────────────────────────────────────────────────────────── */
.dm-profile-status-dot {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2.5px solid #0f172a;
  background: #475569;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
}
.dm-profile-status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

/* ── Name ───────────────────────────────────────────────────────────────── */
.dm-profile-hero .user-title {
  position: static !important;
  top: auto !important;
  left: auto !important;
}
.dm-profile-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ede9fe;
  margin: 0 0 2px;
  text-align: center;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.dm-profile-name.username-gender-male {
  color: #7dd3fc !important;
}
.dm-profile-name.username-gender-female {
  color: #f9a8d4 !important;
}
.dm-profile-name.username-gender-trans {
  color: #e879f9 !important;
}
.dm-profile-name.username-gender-couple {
  color: #6ee7b7 !important;
}
.dm-profile-name.username-gender-other {
  color: #a78bfa !important;
}
.dm-profile-name.username-gender-admin {
  color: #fbbf24 !important;
}

/* ── Stat pills ─────────────────────────────────────────────────────────── */
.dm-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  width: 100%;
  padding: 12px 14px 0;
}
.dm-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.71rem;
  font-weight: 600;
  color: #c4b5fd;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.dm-stat-pill:hover {
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(139, 92, 246, 0.5);
}
.dm-stat-pill i {
  font-size: 0.78rem;
  flex-shrink: 0;
  color: #fbbf24; /* age */
}
.dm-stat-pill .ti-map-pin {
  color: #60a5fa;
}
.dm-stat-pill .ti-route {
  color: #34d399;
}
.dm-stat-pill .ti-heart {
  color: #f472b6;
}

/* ── About snippet ──────────────────────────────────────────────────────── */
.dm-profile-about {
  font-size: 0.74rem;
  color: rgba(196, 181, 253, 0.65);
  line-height: 1.5;
  text-align: center;
  margin: 0;
  padding: 10px 16px 0;
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}
.dm-profile-about:empty {
  display: none;
}

/* Empty-state fallbacks while no conversation is selected / data loading */
.dm-profile-name:empty::after {
  content: "\2026";
  color: rgba(196, 181, 253, 0.5);
}

/* Mobile: extra bottom padding so the last action row / promos clear the
   sheet's rounded edge and stay comfortably scrollable */
@media (max-width: 991.98px) {
  .dm-profile-panel {
    padding-bottom: 28px;
  }
}

/* ── Divider between hero and actions ───────────────────────────────────── */
.dm-profile-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
  padding: 14px 12px 0;
}

/* ── Action buttons ─────────────────────────────────────────────────────── */
.dm-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 11px 6px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(124, 58, 237, 0.08);
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(196, 181, 253, 0.75);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.12s ease,
    box-shadow 0.15s ease;
  text-align: center;
  letter-spacing: 0.01em;
}
.dm-action-btn:hover {
  background: rgba(124, 58, 237, 0.16);
  border-color: rgba(139, 92, 246, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  color: #ede9fe;
}
.dm-action-btn:active {
  transform: scale(0.96);
}
.dm-action-btn i {
  font-size: 1.15rem;
}

/* Per-button accent colors */
.dm-action-btn--webcam {
  border-color: rgba(34, 197, 94, 0.28);
  background: rgba(34, 197, 94, 0.07);
}
.dm-action-btn--webcam i {
  color: #4ade80;
}
.dm-action-btn--webcam:hover {
  background: rgba(34, 197, 94, 0.15) !important;
  border-color: rgba(34, 197, 94, 0.5) !important;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.18) !important;
}

.dm-action-btn--profile {
  border-color: rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.07);
}
.dm-action-btn--profile i {
  color: #38bdf8;
}
.dm-action-btn--profile:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.18) !important;
}

.dm-action-btn--mute {
  border-color: rgba(167, 139, 250, 0.28);
  background: rgba(109, 40, 217, 0.08);
}
.dm-action-btn--mute i {
  color: #a78bfa;
}
.dm-action-btn--mute:hover {
  background: rgba(109, 40, 217, 0.18) !important;
  border-color: rgba(167, 139, 250, 0.55) !important;
}

.dm-action-btn--block {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.07);
}
.dm-action-btn--block i {
  color: #f87171;
}
.dm-action-btn--block:hover {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.16) !important;
}

.dm-action-btn--report {
  border-color: rgba(251, 146, 60, 0.25);
  background: rgba(234, 88, 12, 0.07);
}
.dm-action-btn--report i {
  color: #fb923c;
}
.dm-action-btn--report:hover {
  background: rgba(234, 88, 12, 0.16) !important;
  border-color: rgba(251, 146, 60, 0.5) !important;
}

.dm-action-btn--delete {
  grid-column: 1 / -1;
  border-color: rgba(244, 63, 94, 0.22);
  background: rgba(225, 29, 72, 0.06);
}
.dm-action-btn--delete i {
  color: #fb7185;
}
.dm-action-btn--delete:hover {
  background: rgba(225, 29, 72, 0.15) !important;
  border-color: rgba(244, 63, 94, 0.48) !important;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.14) !important;
}

/* Foreslå møde — pink/rose */
.dm-action-btn--meet {
  border-color: rgba(236, 72, 153, 0.25);
  background: rgba(236, 72, 153, 0.07);
}
.dm-action-btn--meet i {
  color: #f472b6;
}
.dm-action-btn--meet:hover {
  background: rgba(236, 72, 153, 0.16) !important;
  border-color: rgba(236, 72, 153, 0.5) !important;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.16) !important;
}

/* Delete as a single row — horizontal layout */
.dm-action-btn--delete {
  flex-direction: row;
  gap: 7px;
  padding: 9px 14px;
}
.dm-action-btn--delete i {
  font-size: 1rem;
}

/* - DM profile panel: per-button icon colors (legacy selectors kept) - */
.action-btn.private-quick-webcam i {
  color: #4ade80;
}
.action-btn.private-quick-mute i {
  color: #a78bfa;
}
.action-btn.private-action-block i {
  color: #f87171;
}
.action-btn.private-quick-report i {
  color: #fb923c;
}
.action-btn.private-action-delete i {
  color: #fb7185;
}

/* ── Offline warning ────────────────────────────────────────────────────── */
.offline-user-notice {
  margin: 12px 12px 0 !important;
  background: rgba(251, 146, 60, 0.1) !important;
  border: 1px solid rgba(251, 146, 60, 0.28) !important;
  color: #fed7aa !important;
  border-radius: 10px !important;
}

/* ── "No user" empty state card ─────────────────────────────────────────── */
.no-user-card {
  margin: 16px 12px 0 !important;
  background: rgba(124, 58, 237, 0.06) !important;
  border: 1px solid rgba(139, 92, 246, 0.2) !important;
  border-radius: 12px !important;
  color: rgba(196, 181, 253, 0.55) !important;
  text-align: center;
}
.no-user-card .card-body {
  padding: 16px !important;
}
.app-topbar-btn-img {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.app-topbar-btn-label {
  font-size: 11px;
}
.app-topbar-btn .noti-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 7px;
  padding: 0 3px;
}
body.v3-ui .app-topbar-btn.topbar-shortcut--notifications {
  min-width: auto;
  justify-content: center;
  padding: 0 11px;
}
body.v3-ui
  .app-topbar-btn.topbar-shortcut--notifications
  .app-topbar-btn-label {
  letter-spacing: 0.01em;
}
body.v3-ui .app-topbar-btn.topbar-shortcut--notifications .noti-count {
  top: -3px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 5px;
  line-height: 18px;
  font-size: 10px;
}

/* Chattere btn active state */
.app-topbar-btn.topbar-shortcut--people.panel-open {
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
}

/* Icon-only square button (sidebar toggle, leave, mobile actions) */
.app-topbar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--app-text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition:
    background 0.12s,
    color 0.12s;
  text-decoration: none;
  position: relative;
}
.app-topbar-icon-btn:hover,
.app-topbar-icon-btn:focus {
  background: var(--app-hover);
  color: var(--app-text-primary);
}

.app-topbar-icon-btn.is-active {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

/* Leave room - subtle danger tint on hover */
.app-topbar-icon-btn.leave-room:hover,
.app-topbar-btn.leave-room:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* Donate CTA btn — amber-to-rose gradient pill */
.app-topbar-icon-btn.topbar-donate-btn {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.5);
}
.app-topbar-icon-btn.topbar-donate-btn:hover,
.app-topbar-icon-btn.topbar-donate-btn:focus {
  background: linear-gradient(135deg, #fbbf24, #f43f5e);
  color: #fff;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.65);
  transform: scale(1.05);
}
.app-topbar-icon-btn.topbar-donate-btn i {
  position: relative;
  z-index: 1;
}
/* Pill variant — compact "Køb Badge" CTA */
.app-topbar-icon-btn.topbar-donate-btn.topbar-donate-btn--pill {
  width: auto;
  height: 30px;
  border-radius: 999px;
  padding: 0 10px 0 9px;
  gap: 5px;
}
.topbar-donate-btn__label {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.topbar-donate-btn__badge-carousel {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.topbar-donate-btn__badge-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
  pointer-events: none;
  transform: scale(0.92);
}
.topbar-donate-btn__badge-img.is-active {
  opacity: 1;
  transform: scale(1);
}

/* DM bubble unread badge */
.mobile-dm-bubble-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 7px;
  padding: 0 3px;
  background: #ef4444;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Donation row1 flex layout */
.app-topbar-don-row1 {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Activity dots (animated pulse) */
.app-topbar-activity {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.app-topbar-activity span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--app-online);
  opacity: 0.4;
  animation: topbarDotPulse 1.4s infinite ease-in-out;
}
.app-topbar-activity span:nth-child(1) {
  animation-delay: 0s;
}
.app-topbar-activity span:nth-child(2) {
  animation-delay: 0.2s;
}
.app-topbar-activity span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes topbarDotPulse {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: scale(0.9);
  }
  40% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Mobile-only items hidden on desktop */
.app-topbar-mobile-only {
  display: none !important;
}
/* Desktop-only items (hidden on mobile) */
.app-topbar-desktop-only {
  display: flex !important;
  align-items: center;
}
/* Medium screens — icon-only for media buttons to prevent overflow */
@media (max-width: 1400px) {
  .voice-topbar-label,
  .watch-topbar-label,
  .radio-topbar-label {
    display: none;
  }
  .voice-topbar-btn,
  .watch-topbar-btn,
  .radio-topbar-btn {
    padding: 0 8px;
    gap: 0;
  }
}

@media (max-width: 992px) {
  .app-topbar-center {
    display: none !important;
  }
  .app-topbar-btn-label {
    display: none;
  }
  .app-topbar-channel-pill {
    max-width: 120px;
  }
  .app-topbar-mobile-only {
    display: flex !important;
  }
  .app-topbar-desktop-only {
    display: none !important;
  }
  .app-topbar-points-label {
    display: none;
  }

  /* Hide Voice/Watch/Radio from games dropdown on mobile */
  .games-dropdown-item:has(.games-dropdown-item-icon--voice),
  .games-dropdown-item:has(.games-dropdown-item-icon--watch),
  .games-dropdown-item:has(.games-dropdown-item-icon--radio) {
    display: none !important;
  }

  .app-topbar-left {
    display: flex !important;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
  }

  .app-topbar-left .app-topbar-logo {
    display: none !important;
  }

  .app-topbar-right {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: auto;
    gap: 6px;
    justify-content: flex-end;
  }

  .app-topbar-right .app-topbar-mobile-only {
    display: none !important;
  }

  /* Exception: Show mobile-only elements needed in the right topbar section */
  .app-topbar-right #mobile-top-right-panel-trigger,
  .app-topbar-right .mobile-topbar-avatar-dropdown,
  .app-topbar-right .topbar-donate-btn,
  .app-topbar-right #mobile-xpromo-link,
  .app-topbar-right #mobile-notification-dropdown-wrap {
    display: inline-flex !important;
  }

  .app-topbar {
    padding: 0 10px;
    gap: 8px;
  }

  /* Spread the mobile topbar buttons evenly over the full width. Left group
     = 4 buttons (Menu/Beskeder/Chatrum/VIP), right group = 3 (Notif./
     Chattere/Profil); flex-grow in that ratio + space-around gives every
     button an equal slot, so there's no big gap between the two groups. */
  .app-topbar-left {
    flex: 4 1 0 !important;
    min-width: 0;
    justify-content: space-around;
    gap: 0 !important;
  }
  .app-topbar-right {
    flex: 3 1 0;
    margin-left: 0;
    justify-content: space-around;
    gap: 0;
  }

  .mobile-top-nav-shell {
    flex: 0 0 auto;
    min-width: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border-radius: 11px;
    border: 1px solid rgba(59, 130, 246, 0.26);
    background: linear-gradient(
      180deg,
      rgba(15, 30, 50, 0.72),
      rgba(9, 20, 36, 0.72)
    );
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
    margin-right: auto;
  }

  .mobile-top-panel-toggle i {
    font-size: 15px;
    line-height: 1;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #mobile-top-list-trigger {
    margin-left: 0;
  }

  .app-topbar-mobile-tab {
    flex: 0 0 auto;
    width: 36px;
    min-width: 36px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    color: #c2cfdf;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-size: 0;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    position: relative;
    transition:
      background 0.14s ease,
      color 0.14s ease,
      border-color 0.14s ease;
  }

  .app-topbar-mobile-tab:hover,
  .app-topbar-mobile-tab:focus {
    color: #e2e8f0;
    background: rgba(59, 130, 246, 0.14);
  }

  .app-topbar-mobile-tab.is-active {
    color: #eff6ff;
    background: linear-gradient(
      135deg,
      rgba(37, 99, 235, 0.5),
      rgba(59, 130, 246, 0.34)
    );
    border-color: rgba(147, 197, 253, 0.56);
    box-shadow: 0 1px 7px rgba(30, 64, 175, 0.28);
  }

  .app-topbar-mobile-tab i {
    font-size: 15px;
    line-height: 1;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .app-topbar-mobile-tab span {
    display: none;
    align-items: center;
    white-space: nowrap;
  }

  .mobile-top-nav-shell .mobile-dm-bubble-count {
    display: inline-flex;
  }

  .mobile-top-panel-toggle {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(15, 30, 50, 0.62);
    border: 1px solid rgba(59, 130, 246, 0.28);
    color: #dbe7f8;
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
  }

  .mobile-top-panel-toggle:hover,
  .mobile-top-panel-toggle:focus {
    background: rgba(37, 99, 235, 0.22);
    color: #e2e8f0;
    border-color: rgba(147, 197, 253, 0.52);
  }

  .mobile-top-panel-toggle.rightbarToggle.panel-open,
  .mobile-top-panel-toggle.sidebarToggle:not(.is-left-collapsed) {
    background: rgba(37, 99, 235, 0.34);
    color: #eff6ff;
    border-color: rgba(147, 197, 253, 0.62);
    box-shadow: 0 1px 7px rgba(30, 64, 175, 0.24);
  }

  .mobile-top-nav-shell .mobile-dm-bubble-count {
    top: -5px;
    right: -5px;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1;
  }

  @media (max-width: 420px) {
    .app-topbar {
      padding: 0 8px;
      gap: 4px;
    }

    .app-topbar-mobile-tab {
      width: 34px;
      min-width: 34px;
      padding: 0;
    }

    .app-topbar-mobile-tab i {
      font-size: 14px;
      width: 15px;
      height: 15px;
    }

    .mobile-top-panel-toggle i {
      font-size: 14px;
      width: 15px;
      height: 15px;
    }
  }

  /* Mobile bottom nav - minimal icon-only toolbar under composer */
  html:has(body.v3-ui),
  body.v3-ui {
    height: var(--mobile-visual-vh, 100dvh) !important;
    max-height: var(--mobile-visual-vh, 100dvh) !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
    overscroll-behavior: none !important;
  }

  body.v3-ui {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
  }

  html.ios-device body.v3-ui {
    position: static !important;
    inset: auto !important;
    width: auto !important;
  }

  body.v3-ui #wrapper,
  body.v3-ui .app-shell,
  body.v3-ui .app-main {
    min-height: 0 !important;
    height: var(--mobile-visual-vh, 100dvh) !important;
    max-height: var(--mobile-visual-vh, 100dvh) !important;
    overflow: hidden !important;
  }

  body.v3-ui .mobile-bottom-nav,
  body.v3-ui.mobile-bottom-nav .mobile-bottom-nav.d-lg-none {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
  }

  /* Keep document/app scrolling locked; only .chat-scroll should scroll */
  body.v3-ui .app-main .main-panel {
    overflow: hidden !important;
  }

  body.v3-ui .room-editor,
  body.v3-ui .private-editor {
    overflow: visible !important;
  }

  /* Hide the collapse toggle on mobile toolbar */
  body.v3-ui .mobile-bottom-nav-toggle {
    display: none !important;
  }

  body.v3-ui .mobile-bottom-nav .nav-item {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
    justify-content: center;
  }

  /* Icon-only nav links - tiny and minimal */
  body.v3-ui .mobile-bottom-nav .nav-link {
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--app-text-muted, #94a3b8);
    text-decoration: none;
    border-radius: 50%;
    padding: 6px;
    border: 0;
    background: transparent;
    transition: all 0.15s ease;
  }

  body.v3-ui .mobile-bottom-nav .nav-link:active {
    color: var(--app-text, #e2e8f0);
    transform: scale(0.9);
  }

  body.v3-ui .mobile-bottom-nav .nav-link i {
    font-size: 1.4rem;
    line-height: 1;
  }

  /* Hide text labels in bottom nav */
  body.v3-ui .mobile-bottom-nav small,
  body.v3-ui .mobile-bottom-nav .nav-link small {
    display: none !important;
  }

  /* Dropdown menu - must appear ON TOP of composer (higher z-index) */
  body.v3-ui .mobile-bottom-nav .dropdown-menu {
    position: absolute !important;
    bottom: 100% !important;
    top: auto !important;
    z-index: 1000 !important;
    margin-bottom: 8px !important;
  }

  /* Ensure dropup shows above composer */
  body.v3-ui .mobile-bottom-nav .dropup {
    position: relative;
  }

  body.v3-ui .mobile-bottom-nav .dropup .dropdown-menu {
    transform: translateY(-100%) !important;
    bottom: auto !important;
    top: auto !important;
  }

  body.v3-ui .mobile-bottom-nav .nav-item:not(.mobile-bottom-nav-core-item),
  body.v3-ui .mobile-bottom-nav .dropup {
    display: none !important;
  }

  body.v3-ui .mobile-bottom-nav .nav-item.mobile-bottom-nav-core-item {
    display: flex !important;
    visibility: visible;
  }

  /* Remove body padding for fixed bottom nav since it's now under composer */
  body.v3-ui {
    padding-bottom: 0;
  }
}

/* ── Flat, Borderless Mobile Topbar with Text Labels (ONLY on mobile <= 991.98px) ── */
@media (max-width: 991.98px) {
  #mobile-left-nav-toggle,
  #mobile-conversations-toggle,
  #mobile-rooms-toggle,
  #mobile-vip-btn,
  #mobile-top-right-panel-trigger,
  #mobile-notification-dropdown-wrap .notifications-panel-trigger {
    width: auto !important;
    height: auto !important;
    min-width: 40px !important;
    padding: 2px 5px !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    color: #cbd5e1 !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    position: relative;
  }

  #mobile-left-nav-toggle:hover,
  #mobile-left-nav-toggle:active,
  #mobile-left-nav-toggle:focus,
  #mobile-conversations-toggle:hover,
  #mobile-conversations-toggle:active,
  #mobile-conversations-toggle:focus,
  #mobile-rooms-toggle:hover,
  #mobile-rooms-toggle:active,
  #mobile-rooms-toggle:focus,
  #mobile-vip-btn:hover,
  #mobile-vip-btn:active,
  #mobile-vip-btn:focus,
  #mobile-top-right-panel-trigger:hover,
  #mobile-top-right-panel-trigger:active,
  #mobile-top-right-panel-trigger:focus,
  #mobile-notification-dropdown-wrap .notifications-panel-trigger:hover,
  #mobile-notification-dropdown-wrap .notifications-panel-trigger:active,
  #mobile-notification-dropdown-wrap .notifications-panel-trigger:focus {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    color: #ffffff !important;
  }

  #mobile-left-nav-toggle[aria-expanded="true"],
  #mobile-conversations-toggle[aria-expanded="true"],
  #mobile-rooms-toggle[aria-expanded="true"],
  #mobile-top-right-panel-trigger.panel-open,
  #mobile-top-right-panel-trigger[aria-expanded="true"] {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #38bdf8 !important;
  }

  #mobile-left-nav-toggle i,
  #mobile-conversations-toggle i,
  #mobile-rooms-toggle i,
  #mobile-top-right-panel-trigger i {
    font-size: 1.15rem !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 1 !important;
  }

  /* Per-button icon colors on mobile topbar */
  #mobile-left-nav-toggle i {
    color: #cbd5e1 !important;
  }
  #mobile-conversations-toggle i {
    color: #f87171 !important;
  }
  #mobile-rooms-toggle i {
    color: #60a5fa !important;
  }
  #mobile-top-right-panel-trigger i {
    color: #fb923c !important;
  }

  #mobile-vip-btn img {
    width: 18px !important;
    height: 18px !important;
    object-fit: contain;
    flex-shrink: 0;
  }

  #mobile-notification-dropdown-wrap .topbar-bell-wrap {
    width: 18px;
    height: 18px;
  }

  #mobile-notification-dropdown-wrap .topbar-bell-icon {
    width: 18px;
    height: 18px;
    color: #7cc4ff;
  }

  /* Unread: brighter accent + subtle glow so it's obvious at a glance;
     the red .noti-count badge carries the count itself */
  #mobile-notification-dropdown-wrap
    .notifications-panel-trigger.has-unread
    .topbar-bell-icon {
    color: #38bdf8;
    filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.8));
  }

  /* Clear, color-coded text labels under each mobile topbar icon */
  #mobile-left-nav-toggle::after,
  #mobile-conversations-toggle::after,
  #mobile-rooms-toggle::after,
  #mobile-vip-btn::after,
  #mobile-notification-dropdown-wrap .notifications-panel-trigger::after,
  #mobile-top-right-panel-trigger::after,
  .mobile-topbar-avatar-dropdown::after {
    display: block !important;
    font-size: 9.5px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }

  #mobile-left-nav-toggle::after {
    content: "Menu" !important;
    color: #cbd5e1 !important;
  }
  #mobile-conversations-toggle::after {
    content: "Beskeder" !important;
    color: #f87171 !important;
  }
  #mobile-rooms-toggle::after {
    content: "Chatrum" !important;
    color: #60a5fa !important;
  }
  #mobile-vip-btn::after {
    content: "VIP" !important;
    color: #fbbf24 !important;
  }
  #mobile-notification-dropdown-wrap .notifications-panel-trigger::after {
    content: "Notif." !important;
    color: #7cc4ff !important;
  }
  #mobile-top-right-panel-trigger::after {
    content: "Chattere" !important;
    color: #fb923c !important;
  }
  .mobile-topbar-avatar-dropdown::after {
    content: "Profil" !important;
    color: #34d399 !important;
  }

  /* NOTE: expanded/open states must NOT recolor the ::after labels —
     aria-expanded/panel-open can linger after the panel closes, which left
     "Beskeder"/"Chatrum" stuck blue. Label colors stay fixed per button. */

  .mobile-topbar-avatar-dropdown {
    flex-direction: column !important;
    gap: 2px !important;
    padding: 2px 4px !important;
  }

  .mobile-topbar-avatar-btn {
    width: 22px !important;
    height: 22px !important;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    transform: none !important;
  }
}

/* Mobile topbar avatar dropdown — aligned vertically with the 38px circle buttons */
.mobile-topbar-avatar-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-topbar-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    transform 0.12s ease;
}

.mobile-topbar-avatar-btn:hover,
.mobile-topbar-avatar-btn:focus {
  border-color: rgba(255, 255, 255, 0.45);
  transform: scale(0.97);
}

.mobile-topbar-avatar-btn[aria-expanded="true"] {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

.mobile-topbar-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile topbar dropdown menu */
.mobile-topbar-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  max-height: min(70vh, calc(100dvh - 90px));
  background: var(--app-elevated, #1e293b);
  border: 1px solid var(--app-border, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  padding: 6px 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

/* Dropdown header with user info */
.mobile-topbar-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--app-border, rgba(255, 255, 255, 0.1));
  margin-bottom: 4px;
}

.mobile-topbar-dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.mobile-topbar-dropdown-userinfo {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-topbar-dropdown-username {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--app-text, #e2e8f0);
}

.mobile-topbar-dropdown-status {
  font-size: 0.8rem;
  color: var(--app-text-muted, #94a3b8);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-topbar-dropdown-status i {
  font-size: 10px;
}

/* Dropdown header with user info */
.mobile-topbar-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--app-border, rgba(255, 255, 255, 0.1));
  margin-bottom: 4px;
}

.mobile-topbar-dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.mobile-topbar-dropdown-userinfo {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-topbar-dropdown-username {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--app-text, #e2e8f0);
}

.mobile-topbar-dropdown-status {
  font-size: 0.8rem;
  color: var(--app-text-muted, #94a3b8);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Status option styling - clean like desktop */
.mobile-status-option {
  position: relative;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  margin: 0;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mobile-status-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.mobile-status-option.active {
  background: rgba(255, 255, 255, 0.12);
}

.mobile-status-option i {
  font-size: 10px;
  margin-right: 10px;
}

/* Gender color classes for status indicator - matches system */
.user-gender-color-0 {
  color: #2196f3 !important;
} /* Male - Blue */
.user-gender-color-1 {
  color: #f06595 !important;
} /* Female - Pink */
.user-gender-color-2 {
  color: #22c55e !important;
} /* Couple - Green */
.user-gender-color-3 {
  color: #c026d3 !important;
} /* Trans - Purple */
.user-gender-color-4 {
  color: #ff8c00 !important;
} /* Admin/Mod - Orange */

.mobile-topbar-dropdown-menu[aria-hidden="false"],
.mobile-topbar-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-topbar-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--app-text, #e2e8f0);
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.mobile-topbar-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.mobile-topbar-dropdown-item i {
  font-size: 1.15rem;
  color: var(--app-text-muted, #94a3b8);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-topbar-dropdown-divider {
  height: 1px;
  background: var(--app-border, rgba(255, 255, 255, 0.1));
  margin: 6px 0;
}

.mobile-topbar-dropdown-item-danger i,
.mobile-topbar-dropdown-item-danger {
  color: #ef4444;
}
/* Logout row inside mobile profile dropdown (scrolls with the menu) */
.mobile-topbar-dropdown-menu .topbar-logout-item {
  background: var(--app-surface, #1e293b);
  border-bottom: 1px solid var(--app-border, rgba(255, 255, 255, 0.12));
  font-weight: 700;
}

/* Hide mobile bottom navigation completely */
body.v3-ui .mobile-bottom-nav,
body.v3-ui .mobile-bottom-nav.d-lg-none,
.mobile-bottom-nav {
  display: none !important;
}

/* Remove body padding for bottom nav */
body.v3-ui {
  padding-bottom: 0 !important;
}

/* Desktop - hide mobile avatar dropdown */
@media (min-width: 993px) {
  .mobile-topbar-avatar-dropdown {
    display: none !important;
  }
}

/* Light theme topbar adjustments */
html.theme-trueblue-light .app-topbar {
  background: rgba(248, 250, 252, 0.98);
  border-bottom-color: rgba(99, 102, 241, 0.12);
}
html.theme-trueblue-light .app-topbar-channel-pill {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
html.theme-trueblue-light .app-topbar-channel-name {
  color: #1e293b;
}
html.theme-trueblue-light .app-topbar-points-value {
  color: #b45309;
}
html.theme-trueblue-light .app-topbar-points-label {
  color: #92400e;
}

/* body.v3-ui: topbar always visible, replaces titlebar */
body.v3-ui .app-topbar {
  flex: 0 0 var(--topbar-height) !important;
  min-height: var(--topbar-height) !important;
  max-height: var(--topbar-height) !important;
  display: flex !important;
  overflow: visible !important;
  position: relative;
  z-index: 200;
}
body.v3-ui .app-layout {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
}

/* - App Layout (4 columns) - */
.app-layout {
  display: flex;
  flex-direction: row;
  flex: 1 1 0%;
  min-height: 0;
  height: 0;
  overflow: hidden;
}

/* - Column 1: Icon Bar - */
.app-iconbar {
  width: var(--iconbar-width);
  min-width: var(--iconbar-width);
  max-width: var(--iconbar-width);
  background: linear-gradient(180deg, var(--app-base) 0%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden; /* prevent any child shadow/glow from widening the column */
  border-right: 1px solid var(--app-border);
}
.app-iconbar::-webkit-scrollbar {
  width: 0;
}
.app-iconbar-divider {
  display: none;
}
.app-iconbar-item {
  width: 56px;
  height: auto;
  min-height: 48px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 4px 5px;
  position: relative;
  cursor: pointer;
  transition:
    border-radius 0.2s,
    background 0.2s;
  background: var(--app-elevated);
  color: var(--app-text-primary);
  text-decoration: none;
  border: none;
}
.app-iconbar-item:hover {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}
.app-iconbar-item.active {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
}
.app-iconbar-item.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: var(--app-text-primary);
  border-radius: 0 4px 4px 0;
}
.app-iconbar-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
/* XP Shop iconbar button - amber accent */
.app-iconbar-item--xpshop:hover {
  background: rgba(245, 158, 11, 0.15);
}
.app-iconbar-item--xpshop .iconbar-label {
  color: #fbbf24;
}

/* ====
   VIP Badge iconbar button — simple gold chip, centred crown + label
   Same 56 px width as every other .app-iconbar-item, no overflow.
   ==== */

.app-iconbar-item--vip {
  /* Warm gold-tinted background — stands out without bleeding */
  background: rgba(251, 191, 36, 0.12) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  animation: none !important;
  /* Lock to exact same geometry */
  width: 56px !important;
  max-width: 56px !important;
  min-width: 56px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.app-iconbar-item--vip::after {
  display: none; /* no badge */
}
.app-iconbar-item--vip:hover {
  background: rgba(251, 191, 36, 0.22) !important;
  box-shadow: none !important;
}
.app-iconbar-item--vip.active::before {
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%) !important;
}

/* Crown icon — gold, centred, no wrapper needed */
.iconbar-vip-crown {
  font-size: 20px !important;
  color: #fbbf24 !important;
  /* plain colour — no background-clip gradient that can misalign */
  -webkit-text-fill-color: #fbbf24 !important;
  line-height: 1;
  display: block;
}

/* VIP label */
.iconbar-vip-label {
  color: #fbbf24 !important;
  font-weight: 700 !important;
  font-size: 9px !important;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Unused wrappers/ring/dot — hidden if they remain in DOM from cache */
.iconbar-vip-icon-wrap,
.iconbar-vip-ring,
.iconbar-vip-dot {
  display: none !important;
}

/* === End VIP iconbar ==== */

.app-iconbar-item .iconbar-letter {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.iconbar-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--app-text-muted);
  letter-spacing: 0.3px;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.2s;
}
.app-iconbar-item:hover .iconbar-label,
.app-iconbar-item.active .iconbar-label {
  color: rgba(255, 255, 255, 0.9);
}
.app-iconbar-item .iconbar-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.app-iconbar-item .iconbar-badge--new {
  background: #16a34a;
  min-width: 22px;
  height: 14px;
  font-size: 9px;
  letter-spacing: 0.02em;
  top: -3px;
  right: -4px;
  border-radius: 6px;
  animation: iconbar-badge-pulse 2.4s ease-in-out infinite;
}
.app-iconbar-item .iconbar-badge--ny {
  background: linear-gradient(135deg, #f43f5e 0%, #f59e0b 100%);
  color: #fff;
  min-width: 22px;
  height: 13px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.02em;
  top: -4px;
  right: -3px;
  padding: 0 3px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  animation: iconbar-badge-pulse 2.4s ease-in-out infinite;
  z-index: 2;
}
.app-iconbar-item .iconbar-badge--count {
  background: #ef4444;
  min-width: 18px;
  height: 18px;
  font-size: 10px;
  top: -5px;
  right: -5px;
  border-radius: 9px;
  z-index: 3;
}
.app-iconbar-item .iconbar-badge--meet-count {
  top: auto;
  right: -5px;
  bottom: 10px;
}
/* Donator-feature badge — small Legende badge image on the icon corner,
   always visible (both donor and non-donor versions) to indicate
   this feature is a donator perk. Same positioning as avatar badges. */
.app-iconbar-item .iconbar-donor-badge {
  position: absolute;
  top: -2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 0;
  overflow: visible;
  z-index: 2;
  pointer-events: none;
}
.app-iconbar-item .iconbar-donor-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}
@keyframes iconbar-badge-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.75;
    transform: scale(0.93);
  }
}
.app-iconbar-bottom {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Tooltip */
.app-iconbar-item[title]:hover::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--app-elevated);
  color: var(--app-text-primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  border: 1px solid var(--app-border);
}

/* - Iconbar: per-button static icon colors - */
/* Chatrum - blue */
.app-iconbar-item[data-target="#main-room"] i,
.app-iconbar-item[data-target="#main-room"] .ti,
.app-iconbar-item[data-target="#main-room"] .iconbar-letter {
  color: #3b82f6;
}
/* Beskeder - red */
.app-iconbar-item[data-target="#main-private"] i,
.app-iconbar-item[data-target="#main-private"] .ti {
  color: #ef4444;
}
/* Profil - amber */
.app-iconbar-item[data-target="#main-profile"] i,
.app-iconbar-item[data-target="#main-profile"] .ti {
  color: #f59e0b;
}
/* Mødekort - teal */
.app-iconbar-item--moedekort i,
.app-iconbar-item--moedekort .ti {
  color: #14b8a6;
}
/* Geografisk - emerald */
.app-iconbar-item[data-target="#main-geografisk"] i,
.app-iconbar-item[data-target="#main-geografisk"] .ti,
.app-iconbar-item[data-locked-target="#main-geografisk"] i,
.app-iconbar-item[data-locked-target="#main-geografisk"] .ti {
  color: #10b981;
}
/* Brugere - violet */
.app-iconbar-item[data-target="#main-usersearch"] i,
.app-iconbar-item[data-target="#main-usersearch"] .ti,
.app-iconbar-item[data-locked-target="#main-usersearch"] i,
.app-iconbar-item[data-locked-target="#main-usersearch"] .ti {
  color: #8b5cf6;
}
/* Medier - pink */
.app-iconbar-item[data-target="#main-mediasearch"] i,
.app-iconbar-item[data-target="#main-mediasearch"] .ti,
.app-iconbar-item[data-locked-target="#main-mediasearch"] i,
.app-iconbar-item[data-locked-target="#main-mediasearch"] .ti {
  color: #ec4899;
}
/* Online nu - green */
.app-iconbar-item--online i,
.app-iconbar-item--online .ti {
  color: #22c55e;
}
/* Nye medlemmer - fuchsia */
.app-iconbar-item--new-members i,
.app-iconbar-item--new-members .ti {
  color: #d946ef;
}
/* Opslagstavle - cyan */
.app-iconbar-item--wall i,
.app-iconbar-item--wall .ti {
  color: #06b6d4;
}
/* Spin Match - violet */
.app-iconbar-item--spin i,
.app-iconbar-item--spin .ti {
  color: #8b5cf6;
}
/* Meet requests - amber */
.app-iconbar-item--meet i,
.app-iconbar-item--meet .ti {
  color: #f59e0b;
}
/* Nyheder - orange */
.app-iconbar-item[data-target="#main-nyheder"] i,
.app-iconbar-item[data-target="#main-nyheder"] .ti {
  color: #f97316;
}
/* Forum - green */
.app-iconbar-item[data-target="#main-vboard"] i,
.app-iconbar-item[data-target="#main-vboard"] .ti,
.app-iconbar-item[data-locked-target="#main-vboard"] i,
.app-iconbar-item[data-locked-target="#main-vboard"] .ti {
  color: #22c55e;
}
/* Chat indstillinger (left iconbar) - slate */
.app-iconbar-item[data-bs-target="#chat-settings-modal"] i,
.app-iconbar-item[data-bs-target="#chat-settings-modal"] .ti {
  color: #94a3b8;
}

/* Profil indstillinger (topbar) - slate */
.app-topbar-btn[data-target="#main-profile-edit"] i,
.app-topbar-btn[data-target="#main-profile-edit"] .ti {
  color: #94a3b8;
}
/* Keep icon colors visible on hover/active too */
.app-iconbar-item[data-target="#main-room"]:hover i,
.app-iconbar-item[data-target="#main-room"]:hover .iconbar-letter,
.app-iconbar-item[data-target="#main-room"].active i,
.app-iconbar-item[data-target="#main-room"].active .iconbar-letter {
  color: #3b82f6;
}
.app-iconbar-item[data-target="#main-private"]:hover i,
.app-iconbar-item[data-target="#main-private"].active i {
  color: #ef4444;
}
.app-iconbar-item[data-target="#main-profile"]:hover i,
.app-iconbar-item[data-target="#main-profile"].active i {
  color: #f59e0b;
}
.app-iconbar-item--moedekort:hover i,
.app-iconbar-item--moedekort.active i {
  color: #14b8a6;
}
.app-iconbar-item[data-target="#main-geografisk"]:hover i,
.app-iconbar-item[data-target="#main-geografisk"].active i,
.app-iconbar-item[data-locked-target="#main-geografisk"]:hover i,
.app-iconbar-item[data-locked-target="#main-geografisk"].active i {
  color: #10b981;
}
.app-iconbar-item[data-target="#main-usersearch"]:hover i,
.app-iconbar-item[data-target="#main-usersearch"].active i,
.app-iconbar-item[data-locked-target="#main-usersearch"]:hover i,
.app-iconbar-item[data-locked-target="#main-usersearch"].active i {
  color: #8b5cf6;
}
.app-iconbar-item[data-target="#main-mediasearch"]:hover i,
.app-iconbar-item[data-target="#main-mediasearch"].active i,
.app-iconbar-item[data-locked-target="#main-mediasearch"]:hover i,
.app-iconbar-item[data-locked-target="#main-mediasearch"].active i {
  color: #ec4899;
}
.app-iconbar-item[data-target="#main-nyheder"]:hover i,
.app-iconbar-item[data-target="#main-nyheder"].active i {
  color: #f97316;
}
.app-iconbar-item--online:hover i,
.app-iconbar-item--online.active i {
  color: #22c55e;
}
.app-iconbar-item--new-members:hover i,
.app-iconbar-item--new-members.active i {
  color: #d946ef;
}
.app-iconbar-item--wall:hover i,
.app-iconbar-item--wall.active i {
  color: #06b6d4;
}
.app-iconbar-item--spin:hover i,
.app-iconbar-item--spin.active i {
  color: #8b5cf6;
}
.app-iconbar-item--meet:hover i,
.app-iconbar-item--meet.active i {
  color: #f59e0b;
}
.app-iconbar-item[data-target="#main-vboard"]:hover i,
.app-iconbar-item[data-target="#main-vboard"].active i,
.app-iconbar-item[data-locked-target="#main-vboard"]:hover i,
.app-iconbar-item[data-locked-target="#main-vboard"].active i {
  color: #22c55e;
}
/* Gruppe+ - green */
#iconbar-gruppe-btn i,
#iconbar-gruppe-btn .ti {
  color: #22c55e;
}
#iconbar-gruppe-btn:hover i,
#iconbar-gruppe-btn.active i {
  color: #22c55e;
}

.app-iconbar-item[data-target="#main-profile-edit"]:hover i,
.app-iconbar-item[data-target="#main-profile-edit"].active i {
  color: #94a3b8;
}

/* - Column 2: Sidebar - */
.app-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--app-sidebar) 0%, #0f172a 100%);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--app-border);
  overflow: hidden;
  min-height: 0;
  height: auto;
  flex: 0 0 var(--sidebar-width);
}

@media (min-width: 992.01px) {
  body.v3-ui.desktop-sidebar-collapsed .app-sidebar {
    width: 0;
    min-width: 0;
    max-width: 0;
    flex-basis: 0;
    border-right: 0;
    opacity: 0;
    pointer-events: none;
  }
}

/* Sidebar content fills remaining height and scrolls - prevents cutoff under statusbar */
.app-sidebar-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-sidebar-scroll {
  flex: 1 1 0%;
  min-height: 0;
  height: 0; /* flex scroll trick - forces it to shrink rather than overflow */
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}
.app-sidebar-header {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--app-text-primary);
  border-bottom: 1px solid var(--app-border);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.app-sidebar-header:hover {
  background: var(--app-hover);
}
.app-sidebar-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--app-border);
  background: rgba(15, 30, 50, 0.45);
}
.app-sidebar-mode-tab {
  border: 1px solid var(--app-border);
  background: transparent;
  color: var(--app-text-muted);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 8px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
.app-sidebar-mode-tab:hover {
  color: var(--app-text-primary);
  border-color: rgba(59, 130, 246, 0.35);
}
.app-sidebar-mode-tab.active {
  background: rgba(59, 130, 246, 0.2);
  color: #dbeafe;
  border-color: rgba(59, 130, 246, 0.5);
}
/* Sidebar mode colors */
.app-sidebar-mode-tab[data-sidebar-mode-tab="inbox"] {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.2);
}
.app-sidebar-mode-tab[data-sidebar-mode-tab="inbox"]:hover {
  color: #fee2e2;
  border-color: rgba(248, 113, 113, 0.62);
  background: rgba(185, 28, 28, 0.26);
}
.app-sidebar-mode-tab[data-sidebar-mode-tab="inbox"].active {
  color: #fff1f2;
  border-color: rgba(239, 68, 68, 0.85);
  background: linear-gradient(
    135deg,
    rgba(185, 28, 28, 0.62),
    rgba(239, 68, 68, 0.42)
  );
  box-shadow: inset 0 0 0 1px rgba(254, 202, 202, 0.22);
}

.app-sidebar-mode-tab[data-sidebar-mode-tab="rooms"] {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(30, 64, 175, 0.2);
}
.app-sidebar-mode-tab[data-sidebar-mode-tab="rooms"]:hover {
  color: #dbeafe;
  border-color: rgba(96, 165, 250, 0.66);
  background: rgba(37, 99, 235, 0.26);
}
.app-sidebar-mode-tab[data-sidebar-mode-tab="rooms"].active {
  color: #eff6ff;
  border-color: rgba(59, 130, 246, 0.9);
  background: linear-gradient(
    135deg,
    rgba(29, 78, 216, 0.62),
    rgba(96, 165, 250, 0.36)
  );
  box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.24);
}

/* Gruppe+ tab - green styling */
.app-sidebar-mode-tab[data-sidebar-mode-tab="gruppe"] {
  color: #bbf7d0;
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(22, 101, 52, 0.2);
}
.app-sidebar-mode-tab[data-sidebar-mode-tab="gruppe"]:hover {
  color: #dcfce7;
  border-color: rgba(74, 222, 128, 0.66);
  background: rgba(34, 197, 94, 0.26);
}
.app-sidebar-mode-tab[data-sidebar-mode-tab="gruppe"].active {
  color: #f0fdf4;
  border-color: rgba(34, 197, 94, 0.9);
  background: linear-gradient(
    135deg,
    rgba(22, 101, 52, 0.62),
    rgba(74, 222, 128, 0.42)
  );
  box-shadow: inset 0 0 0 1px rgba(187, 247, 208, 0.24);
}
.app-sidebar-search {
  padding: 8px 12px;
  border-bottom: 1px solid var(--app-border);
}
.app-sidebar-mode-pane {
  display: none;
}
.app-sidebar-mode-pane.is-active {
  display: block;
}
.sidebar-empty-note {
  color: var(--app-text-muted);
  font-size: 12px;
  padding: 10px 12px;
}

body.v3-ui .private-list .private-list-loading-skeleton {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

body.v3-ui .private-list .private-list-loading-skeleton .sk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  margin: 1px 4px;
}

/* Stagger shimmer so rows pulse sequentially */
body.v3-ui .private-list .private-list-loading-skeleton .sk-row:nth-child(1) {
  animation-delay: 0s;
}
body.v3-ui .private-list .private-list-loading-skeleton .sk-row:nth-child(2) {
  animation-delay: 0.1s;
}
body.v3-ui .private-list .private-list-loading-skeleton .sk-row:nth-child(3) {
  animation-delay: 0.2s;
}
body.v3-ui .private-list .private-list-loading-skeleton .sk-row:nth-child(4) {
  animation-delay: 0.3s;
}

/* Shimmer base */
body.v3-ui .private-list .private-list-loading-skeleton .sk-avatar,
body.v3-ui .private-list .private-list-loading-skeleton .sk-line {
  background: linear-gradient(
    90deg,
    var(--app-surface-2, rgba(148, 163, 184, 0.08)) 25%,
    var(--app-surface-3, rgba(148, 163, 184, 0.18)) 50%,
    var(--app-surface-2, rgba(148, 163, 184, 0.08)) 75%
  );
  background-size: 400% 100%;
  animation: skShimmer 1.4s ease-in-out infinite;
}

body.v3-ui .private-list .private-list-loading-skeleton .sk-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: 0 0 36px;
}

body.v3-ui .private-list .private-list-loading-skeleton .sk-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

body.v3-ui .private-list .private-list-loading-skeleton .sk-line {
  height: 10px;
  border-radius: 5px;
  width: 75%;
}

body.v3-ui .private-list .private-list-loading-skeleton .sk-line.short {
  width: 48%;
  height: 8px;
  opacity: 0.7;
}
.app-sidebar-search input {
  width: 100%;
  background: var(--app-base);
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  color: var(--app-text);
  font-size: 12px;
  outline: none;
}
.app-sidebar-search input::placeholder {
  color: var(--app-text-muted);
}
.sidebar-search-empty-state {
  margin: 8px 10px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--app-text-muted);
  font-size: 12px;
  line-height: 1.4;
}
.app-sidebar-section {
  display: flex;
  flex-direction: column;
}
.app-sidebar-section-header {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--app-text-muted);
  padding: 16px 12px 4px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
}
.app-sidebar-section-header:hover {
  color: var(--app-text);
}
.app-sidebar-section-header .collapse-arrow {
  font-size: 13px;
  transition: transform 0.2s;
  margin-left: auto;
  opacity: 0.55;
}
.app-sidebar-section-header:hover .collapse-arrow {
  opacity: 1;
}
.app-sidebar-section-header.collapsed .collapse-arrow {
  transform: rotate(-90deg);
}
.app-sidebar-section.collapsed .app-sidebar-section-items {
  display: none;
}
/* Collapsed state: make the header a clear, tappable CTA strip */
.app-sidebar-section.collapsed .app-sidebar-section-header {
  background: color-mix(in srgb, var(--app-accent, #3b82f6) 8%, transparent);
  border: 1px dashed
    color-mix(in srgb, var(--app-accent, #3b82f6) 30%, transparent);
  border-radius: 8px;
  margin: 4px 8px;
  padding: 8px 10px;
  color: var(--app-text, #e2e8f0);
  font-size: 10px;
}
.app-sidebar-section.collapsed .app-sidebar-section-header:hover {
  background: color-mix(in srgb, var(--app-accent, #3b82f6) 16%, transparent);
  border-color: color-mix(in srgb, var(--app-accent, #3b82f6) 55%, transparent);
  color: var(--app-text-primary, #fff);
}
.app-sidebar-section.collapsed .app-sidebar-section-header .collapse-arrow {
  opacity: 0.8;
}
/* Show a small "vis" hint after the label when collapsed */
.app-sidebar-section.collapsed .app-sidebar-section-header::after {
  content: "vis";
  margin-left: 6px;
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  opacity: 0.55;
  color: var(--app-accent, #3b82f6);
}

/* - Private bulk-select toolbar (inside sidebar DM section) - */
.private-bulk-toolbar {
  padding: 4px 8px 6px;
  border-bottom: 1px solid var(--app-border, rgba(255, 255, 255, 0.07));
  background: color-mix(in srgb, var(--app-sidebar, #0f172a) 92%, #ffffff 8%);
}
.private-bulk-toolbar .btn {
  font-size: 11px;
  padding: 3px 8px;
  height: 26px;
  line-height: 1;
}
.private-bulk-toolbar .btn-ghost-secondary {
  color: var(--app-text-muted);
  background: transparent;
  border: 1px solid transparent;
}
.private-bulk-toolbar .btn-ghost-secondary:hover,
.private-bulk-toolbar .btn-ghost-secondary.active {
  color: var(--app-text);
  border-color: var(--app-border, rgba(255, 255, 255, 0.15));
  background: var(--app-hover, rgba(255, 255, 255, 0.06));
}
.private-bulk-toolbar .btn-outline-danger {
  font-size: 11px;
}

/* - Sidebar DM badge (in section header) - */
.sidebar-dm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--app-busy);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  margin-left: auto;
}

/* ============================================================
   Sidebar conversation list (private messages) — modern refactor
   ============================================================ */

/* --- Pane spacing --- */
body.v3-ui .app-sidebar-section-items.private-list {
  padding: 6px 0 12px;
  display: flex;
  flex-direction: column;
}

/* --- Search input --- */
body.v3-ui .app-sidebar-search {
  padding: 10px 12px;
  background: transparent;
  border-bottom: 1px solid var(--app-border, rgba(255, 255, 255, 0.08));
}

body.v3-ui .app-sidebar-search input {
  width: 100%;
  background: var(--app-base, rgba(15, 23, 42, 0.45));
  border: 1px solid var(--app-border, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  padding: 7px 10px 7px 32px;
  color: var(--app-text, #e2e8f0);
  font-size: 12px;
  outline: none;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 14px;
}

body.v3-ui .app-sidebar-search input::placeholder {
  color: var(--app-text-muted, #94a3b8);
}

body.v3-ui .app-sidebar-search input:focus {
  background: var(--app-base, rgba(15, 23, 42, 0.65));
  border-color: var(--app-accent, rgba(59, 130, 246, 0.6));
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* --- Section header --- */
body.v3-ui .app-sidebar-section-header {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--app-text-muted, #94a3b8);
  padding: 12px 12px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

body.v3-ui .app-sidebar-section-header:hover {
  color: var(--app-text, #e2e8f0);
}

body.v3-ui .app-sidebar-section-header > i:first-child {
  color: var(--app-accent, #60a5fa);
  font-size: 13px;
}

body.v3-ui .app-sidebar-section-header .collapse-arrow {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.55;
  transition:
    transform 0.2s ease,
    opacity 0.15s ease;
}

body.v3-ui .app-sidebar-section-header:hover .collapse-arrow {
  opacity: 0.9;
}

body.v3-ui .app-sidebar-section-header.collapsed .collapse-arrow {
  transform: rotate(-90deg);
}

/* --- Bulk-select toggle: compact icon button inline in the section header
   (no permanent extra row) — only the action row below costs space, and
   only while bulk-select mode is actually active. --- */
body.v3-ui .app-sidebar-section-header .private-bulk-toggle-icon {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--app-text-muted, #94a3b8);
  font-size: 13px;
  line-height: 1;
  padding: 2px;
  margin-left: auto;
  border-radius: 5px;
  opacity: 0.55;
  cursor: pointer;
  transition:
    opacity 0.15s ease,
    color 0.15s ease,
    background 0.15s ease;
}
body.v3-ui .app-sidebar-section-header:hover .private-bulk-toggle-icon {
  opacity: 0.9;
}
body.v3-ui .app-sidebar-section-header .private-bulk-toggle-icon:hover {
  opacity: 1;
  color: var(--app-text, #e2e8f0);
  background: color-mix(in srgb, var(--app-accent, #3b82f6) 14%, transparent);
}
body.v3-ui .app-sidebar-section-header .private-bulk-toggle-icon.active {
  opacity: 1;
  color: var(--app-accent, #60a5fa);
  background: color-mix(in srgb, var(--app-accent, #3b82f6) 16%, transparent);
}
/* .collapse-arrow already has margin-left:auto — once the toggle sits
   before it, let the toggle claim that and keep the arrow snug beside it */
body.v3-ui
  .app-sidebar-section-header
  .private-bulk-toggle-icon
  ~ .collapse-arrow {
  margin-left: 4px;
}
body.v3-ui .private-bulk-toolbar {
  margin-top: -2px;
}

/* --- Conversation row --- */
body.v3-ui .private-list .user-row {
  display: block;
  position: relative;
  border-radius: 12px;
  border: 1px solid transparent;
  margin-bottom: 4px;
  background: rgba(15, 23, 42, 0.25);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
  cursor: pointer;
}

body.v3-ui .private-list .user-row:hover {
  background: rgba(30, 41, 59, 0.45);
  border-color: rgba(96, 165, 250, 0.25);
  transform: translateX(1px);
}

body.v3-ui .private-list .user-row.ulm-open,
body.v3-ui .private-list .user-row.active,
body.v3-ui .private-list .user-row.is-active,
body.v3-ui .private-list .user-row.conversation-menu-open {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(96, 165, 250, 0.4);
}

body.v3-ui .private-list .user-row:active {
  transform: translateX(1px) scale(0.992);
}

/* --- Card row — messenger style for sidebar ---
   Padding matches the xcp__conv-link promo rows so real conversations and
   sponsored rows line up pixel-for-pixel (avatar ~12px from the edge). */
body.v3-ui .private-list .ulm-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  min-height: 58px;
}

/* --- Avatar --- */
body.v3-ui .private-list .ulm-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  margin-top: 2px;
}

body.v3-ui .private-list .ulm-avatar-wrap .v3-avatar-wrap,
body.v3-ui .private-list .ulm-avatar-wrap .user-list-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* ── Hide unwanted actions in private conversations dropdown ───────────── */
/* In the private beskeder sidebar we don't need "Se Billede" (avatar
   lightbox) or "Send Besked" (already inside a DM conversation). Keep them
   available in the room userlist. */
body.v3-ui
  .private-list
  .conversation-actions-dropdown
  .dropdown-item.se-billede-info,
body.v3-ui
  .private-list
  .conversation-actions-dropdown
  .dropdown-item.start-private-chat-dm,
body.v3-ui
  .private-conversations-list
  .conversation-actions-dropdown
  .dropdown-item.se-billede-info,
body.v3-ui
  .private-conversations-list
  .conversation-actions-dropdown
  .dropdown-item.start-private-chat-dm,
body.v3-ui
  .private-favorites-list
  .conversation-actions-dropdown
  .dropdown-item.se-billede-info,
body.v3-ui
  .private-favorites-list
  .conversation-actions-dropdown
  .dropdown-item.start-private-chat-dm {
  display: none !important;
}

/* ── Status dot in private-list rows (Messenger-style) ─────────────────── */
body.v3-ui .private-list .ulm-avatar-wrap {
  position: relative;
}
body.v3-ui .private-list .ulm-avatar-wrap .avatar-online-status,
body.v3-ui .private-list .ulm-avatar-wrap .online-status {
  position: absolute !important;
  bottom: -1px !important;
  right: -1px !important;
  left: auto !important;
  top: auto !important;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--app-sidebar, #0f1120);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
  background: #475569; /* default offline */
  font-size: 0;
  line-height: 0;
  z-index: 4;
  display: block;
  pointer-events: none;
}
body.v3-ui .private-list .ulm-avatar-wrap .avatar-online-status i,
body.v3-ui .private-list .ulm-avatar-wrap .online-status i {
  display: none;
}
body.v3-ui .private-list .ulm-avatar-wrap .avatar-online-status.online,
body.v3-ui .private-list .ulm-avatar-wrap .online-status.online {
  background: #22c55e;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.2),
    0 0 5px rgba(34, 197, 94, 0.55);
}
body.v3-ui .private-list .ulm-avatar-wrap .avatar-online-status.away,
body.v3-ui .private-list .ulm-avatar-wrap .online-status.away {
  background: #fbbf24;
}
body.v3-ui .private-list .ulm-avatar-wrap .avatar-online-status.busy,
body.v3-ui .private-list .ulm-avatar-wrap .avatar-online-status.dnd,
body.v3-ui .private-list .ulm-avatar-wrap .online-status.busy,
body.v3-ui .private-list .ulm-avatar-wrap .online-status.dnd {
  background: #ef4444;
}
body.v3-ui .private-list .ulm-avatar-wrap .avatar-online-status.offline,
body.v3-ui .private-list .ulm-avatar-wrap .online-status.offline {
  background: #475569;
}

/* --- Info --- */
body.v3-ui .private-list .ulm-info {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 4px;
}

body.v3-ui .private-list .ulm-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  line-height: 1.3;
}

body.v3-ui .private-list .ulm-name-row .channel-user-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--app-text, #e2e8f0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

body.v3-ui .private-list .ulm-verified {
  font-size: 12px;
  color: #22c55e;
}

body.v3-ui .private-list .ulm-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--app-text-muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

body.v3-ui .private-list .ulm-sub-city i {
  font-size: 10px;
  vertical-align: middle;
  margin-right: 2px;
}

body.v3-ui .private-list .conversation-preview {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Hide city/profile preview in sidebar; show last message preview instead */
body.v3-ui .private-list .ulm-sub .user-profile-preview,
body.v3-ui .private-list .ulm-sub .ulm-sub-city {
  display: none;
}

/* --- Chevron hidden in sidebar conversation list --- */
body.v3-ui .private-list .ulm-chevron {
  display: none;
}

/* --- Inline action panel hidden in sidebar (right panel keeps it) --- */
body.v3-ui .private-list .ulm-action-panel {
  display: none !important;
}

/* --- Conversation meta (time, favorite, actions) --- */
body.v3-ui .private-list .conversation-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  padding-top: 2px;
}

body.v3-ui .private-list .conversation-time {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--app-text-muted, #94a3b8);
  white-space: nowrap;
  line-height: 1;
}

body.v3-ui .private-list .conversation-meta-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

body.v3-ui .private-list .conversation-fav-toggle,
body.v3-ui .private-list .conversation-actions-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--app-text-muted, #94a3b8);
  cursor: pointer;
  transition:
    background 0.13s ease,
    color 0.13s ease,
    transform 0.1s ease;
  padding: 0;
}

body.v3-ui .private-list .conversation-fav-toggle:hover,
body.v3-ui .private-list .conversation-actions-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--app-text, #e2e8f0);
  transform: scale(1.05);
}

body.v3-ui .private-list .conversation-fav-toggle i,
body.v3-ui .private-list .conversation-actions-toggle i {
  font-size: 14px;
}

body.v3-ui .private-list .conversation-fav-toggle.active,
body.v3-ui .private-list .conversation-fav-toggle[data-is-fav="1"] {
  color: #f59e0b;
}

body.v3-ui .private-list .conversation-fav-toggle.active:hover,
body.v3-ui .private-list .conversation-fav-toggle[data-is-fav="1"]:hover {
  color: #fbbf24;
}

/* --- Actions dropdown menu --- */
body.v3-ui .private-list .conversation-actions-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 9999;
  display: none;
  min-width: 180px;
  padding: 6px 0;
  margin: 0;
  background: var(--app-surface, #1e293b);
  border: 1px solid var(--app-border, rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

body.v3-ui .private-list .conversation-actions-dropdown.show {
  display: block;
}

/* Hardening: ensure private conversation action menus are truly clickable.
   We observed cases where the menu becomes visible but click hit-testing
   still lands on the row/container beneath. */
body.v3-ui .private-list .conversation-meta,
body.v3-ui .private-list .conversation-meta-actions,
body.v3-ui .private-list .conversation-actions-dropdown,
body.v3-ui .private-conversations-list .conversation-meta,
body.v3-ui .private-conversations-list .conversation-meta-actions,
body.v3-ui .private-conversations-list .conversation-actions-dropdown {
  pointer-events: auto !important;
}

body.v3-ui .private-list .conversation-actions-dropdown.show,
body.v3-ui .private-conversations-list .conversation-actions-dropdown.show {
  position: absolute !important;
  z-index: 2147483000 !important;
  pointer-events: auto !important;
}

body.v3-ui .private-list .conversation-actions-dropdown.show .dropdown-item,
body.v3-ui
  .private-conversations-list
  .conversation-actions-dropdown.show
  .dropdown-item {
  position: relative;
  z-index: 2147483001;
  pointer-events: auto !important;
}

/* When menu is open, escape overflow clipping and raise the stacking of
   the whole row + meta so the dropdown draws above sibling rows / rings. */
body.v3-ui .private-list .user-row.conversation-menu-open {
  position: relative;
  z-index: 9998;
  overflow: visible !important;
}
body.v3-ui .private-list .user-row.conversation-menu-open .conversation-meta,
body.v3-ui
  .private-list
  .user-row.conversation-menu-open
  .conversation-meta-actions {
  overflow: visible !important;
}
/* Ensure ancestor scroll containers still clip content, but the row on top
   of them takes stacking priority so its dropdown draws above them. */
body.v3-ui .private-list .ulm-card {
  overflow: visible !important;
}

body.v3-ui .private-list .conversation-actions-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 12px;
  border: none;
  background: transparent;
  color: var(--app-text, #e2e8f0);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
  white-space: nowrap;
}

body.v3-ui .private-list .conversation-actions-dropdown .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

body.v3-ui .private-list .conversation-actions-dropdown .dropdown-item i {
  font-size: 14px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

body.v3-ui .private-list .conversation-actions-dropdown .dropdown-divider {
  height: 1px;
  margin: 5px 10px;
  background: var(--app-border, rgba(255, 255, 255, 0.1));
  border: none;
}

body.v3-ui
  .private-list
  .conversation-actions-dropdown
  .dropdown-item.text-danger {
  color: #fca5a5;
}

body.v3-ui
  .private-list
  .conversation-actions-dropdown
  .dropdown-item.text-danger:hover {
  background: rgba(239, 68, 68, 0.12);
}

/* Hide "Skjul Bruger" for admin/guest target users to match the inline panel */
body.v3-ui .user-row[data-user-user_type="1"] .dropdown-item.hide-group-user,
body.v3-ui .user-row[data-user-user_type="4"] .dropdown-item.hide-group-user,
body.v3-ui .user-row[data-user-user_type="1"] .ulm-btn.hide-group-user,
body.v3-ui .user-row[data-user-user_type="4"] .ulm-btn.hide-group-user {
  display: none !important;
}

/* Deleting animation */
body.v3-ui .private-list .user-row.conversation-row-deleting {
  opacity: 0;
  transform: translateX(-10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

/* --- Empty states --- */
body.v3-ui .private-list .sidebar-empty-note,
body.v3-ui .private-list .sidebar-search-empty-state {
  margin: 8px 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--app-text-muted, #94a3b8);
  font-size: 12px;
  line-height: 1.4;
}

/* --- Hide messenger elements in right-panel user list --- */
body.v3-ui .user-list-content .conversation-meta,
body.v3-ui .user-list-content .conversation-preview {
  display: none !important;
}

/* --- Light theme overrides --- */
body.v3-ui.theme-trueblue-light .private-list .user-row {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(15, 23, 42, 0.08);
}

body.v3-ui.theme-trueblue-light .private-list .user-row:hover {
  background: #eef6ff;
  border-color: rgba(59, 130, 246, 0.3);
}

body.v3-ui.theme-trueblue-light .private-list .user-row.ulm-open,
body.v3-ui.theme-trueblue-light .private-list .user-row.active,
body.v3-ui.theme-trueblue-light .private-list .user-row.is-active,
body.v3-ui.theme-trueblue-light .private-list .user-row.conversation-menu-open {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(37, 99, 235, 0.35);
}

body.v3-ui.theme-trueblue-light .private-list .ulm-name-row .channel-user-name {
  color: #0f172a;
}

body.v3-ui.theme-trueblue-light .private-list .ulm-sub {
  color: #64748b;
}

body.v3-ui.theme-trueblue-light .private-list .conversation-time {
  color: #94a3b8;
}

body.v3-ui.theme-trueblue-light .private-list .conversation-fav-toggle,
body.v3-ui.theme-trueblue-light .private-list .conversation-actions-toggle {
  color: #94a3b8;
}

body.v3-ui.theme-trueblue-light .private-list .conversation-fav-toggle:hover,
body.v3-ui.theme-trueblue-light
  .private-list
  .conversation-actions-toggle:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}

body.v3-ui.theme-trueblue-light .private-list .conversation-actions-dropdown {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
}

body.v3-ui.theme-trueblue-light
  .private-list
  .conversation-actions-dropdown
  .dropdown-item {
  color: #0f172a;
}

body.v3-ui.theme-trueblue-light
  .private-list
  .conversation-actions-dropdown
  .dropdown-item:hover {
  background: #f1f5f9;
}

body.v3-ui.theme-trueblue-light
  .private-list
  .conversation-actions-dropdown
  .dropdown-divider {
  background: rgba(15, 23, 42, 0.1);
}

body.v3-ui.theme-trueblue-light
  .private-list
  .conversation-actions-dropdown
  .dropdown-item.text-danger {
  color: #ef4444;
}

body.v3-ui.theme-trueblue-light
  .private-list
  .conversation-actions-dropdown
  .dropdown-item.text-danger:hover {
  background: rgba(239, 68, 68, 0.08);
}

body.v3-ui.theme-trueblue-light .app-sidebar-search input {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
}

body.v3-ui.theme-trueblue-light .app-sidebar-search input:focus {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

body.v3-ui.theme-trueblue-light .app-sidebar-section-header {
  color: #64748b;
}

body.v3-ui.theme-trueblue-light .app-sidebar-section-header:hover {
  color: #0f172a;
}

/* Mobile right-sheet handle should never render on desktop */
body.v3-ui .mobile-right-sheet-handle,
body.v3-ui .mobile-right-sheet-handle-bar {
  display: none;
}

.app-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  margin: 1px 4px;
  border-radius: 4px;
  color: var(--app-text-muted);
  font-size: 12px;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
  text-decoration: none;
}
.app-sidebar-item:hover {
  background: var(--app-hover);
  color: var(--app-text);
}
.app-sidebar-item.active {
  background: var(--app-active);
  color: var(--app-text-primary);
}
.app-sidebar-item .sidebar-item-icon {
  display: none;
}

/* Channel list items (populated by chatnet.js groupListTemplate) - plain text
   Scoped with body.v3-ui to override chatnet.css / chat_room.inline.css */
body.v3-ui .app-sidebar .channel-list .channel-cat,
body.v3-ui .app-sidebar .channel-list .channel-cat-actions {
  display: none !important;
}
body.v3-ui .app-sidebar .channel-list .collapse {
  display: block !important;
  height: auto !important;
}
body.v3-ui .app-sidebar .channel-list .btn-toggle-nav {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.v3-ui .app-sidebar .channel-list .mb-1 {
  margin-bottom: 0 !important;
}
body.v3-ui .app-sidebar .channel-list .channel-main {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  padding: 6px 12px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  color: var(--app-text-muted) !important;
  font-size: 12px !important;
  transition:
    background 0.12s,
    color 0.12s !important;
  position: relative !important;
  background: transparent !important;
  border: none !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
}
body.v3-ui .app-sidebar .channel-list .channel-main:hover {
  background: var(--app-hover) !important;
  color: var(--app-text) !important;
}
body.v3-ui .app-sidebar .channel-list .channel-main.active,
body.v3-ui .app-sidebar .channel-list .channel-main .channel-item.active {
  background: var(--app-active) !important;
  color: var(--app-text-primary) !important;
}
body.v3-ui .app-sidebar .channel-list .channel-icon,
body.v3-ui .app-sidebar .channel-list .mute-icon,
body.v3-ui .app-sidebar .channel-list .pvt-cnl,
body.v3-ui .app-sidebar .channel-list .channel-actions,
body.v3-ui .app-sidebar .channel-list .voice-member-list {
  display: none !important;
}
body.v3-ui .app-sidebar .channel-list .channel-name,
body.v3-ui .app-sidebar .channel-list .channel-item:hover .channel-name,
body.v3-ui .app-sidebar .channel-list .channel-item.active .channel-name,
body.v3-ui.dark .app-sidebar .channel-list .channel-name,
body.v3-ui.dark .app-sidebar .channel-list .channel-item:hover .channel-name,
body.v3-ui.dark .app-sidebar .channel-list .channel-item.active .channel-name,
html.trueblue body.v3-ui .app-sidebar .channel-list .channel-name,
html.trueblue
  body.v3-ui
  .app-sidebar
  .channel-list
  .channel-item:hover
  .channel-name,
html.trueblue
  body.v3-ui
  .app-sidebar
  .channel-list
  .channel-item.active
  .channel-name {
  flex: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  color: inherit !important;
  max-width: none !important;
}
/* Override ALL chatnet.css .channel-item selectors (base, .dark, html.trueblue, mobile) */
body.v3-ui .app-sidebar .channel-list .channel-item,
body.v3-ui .app-sidebar .channel-list .channel-item:hover,
body.v3-ui .app-sidebar .channel-list .channel-item.active,
body.v3-ui.dark .app-sidebar .channel-list .channel-item,
body.v3-ui.dark .app-sidebar .channel-list .channel-item:hover,
body.v3-ui.dark .app-sidebar .channel-list .channel-item.active,
html.trueblue body.v3-ui .app-sidebar .channel-list .channel-item,
html.trueblue body.v3-ui .app-sidebar .channel-list .channel-item:hover,
html.trueblue body.v3-ui .app-sidebar .channel-list .channel-item.active {
  display: flex !important;
  align-items: center !important;
  flex: 1 !important;
  min-width: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-color: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
}
body.v3-ui .app-sidebar .channel-list .unread-indicator {
  display: none !important;
}
body.v3-ui .app-sidebar .channel-list .unread-indicator.active {
  display: block !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
  background: #ef4444 !important;
  position: absolute !important;
  left: 2px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}
body.v3-ui .app-sidebar .channel-list {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
}
body.v3-ui .app-sidebar .channel-list .channel-options {
  display: none !important;
}

/* Rooms tab: modern tree list */
body.v3-ui .room-tree-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px;
}
body.v3-ui .room-tree-list .room-list-item {
  display: flex !important;
  justify-content: stretch !important;
  align-items: center !important;
  width: 100% !important;
  margin-bottom: 6px !important;
}
body.v3-ui .room-tree-list .room-card-modern {
  width: 100% !important;
  max-width: none !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
  padding: 10px !important;
}
body.v3-ui .room-tree-list .room-card-content {
  display: flex !important;
  flex-direction: column !important;
}
body.v3-ui .room-tree-list .room-card-name {
  display: flex !important;
}
body.v3-ui .room-tree-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body.v3-ui .room-tree-group-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--app-text-muted);
  padding: 0 4px;
}
body.v3-ui .room-tree-list .room-list-item {
  position: relative;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 10px;
  background: rgba(9, 20, 36, 0.72);
  padding: 0;
  margin: 0;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}
body.v3-ui .room-tree-list .room-list-item:hover {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(15, 30, 50, 0.92);
  transform: translateY(-1px);
}
body.v3-ui .room-tree-list .room-list-item.active {
  border-color: rgba(59, 130, 246, 0.52);
  background: rgba(16, 37, 56, 0.95);
}
body.v3-ui .room-tree-list .room-list-item.active .room-card-modern {
  border-color: transparent !important;
  box-shadow: none !important;
}
body.v3-ui .room-tree-list .room-tree-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
}
body.v3-ui .room-tree-list .room-card-content {
  min-width: 0;
  flex: 1;
}
body.v3-ui .room-tree-list .room-card-name {
  font-size: 13px;
  font-weight: 800;
  color: #e8f1ff;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(2, 6, 23, 0.35);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
body.v3-ui .room-tree-description {
  margin-top: 4px;
  font-size: 11px;
  color: #b4c6dc;
  line-height: 1.35;
  max-height: 2.7em;
  overflow: hidden;
}
body.v3-ui .room-tree-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
body.v3-ui .room-tree-label {
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 6px;
  line-height: 1.45;
}
body.v3-ui .room-tree-label-room {
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(37, 99, 235, 0.18);
}
body.v3-ui .room-tree-label-joined {
  color: #bbf7d0;
  border: 1px solid rgba(74, 222, 128, 0.45);
  background: rgba(34, 197, 94, 0.16);
}
body.v3-ui .room-tree-label-explore {
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(217, 119, 6, 0.16);
}
body.v3-ui .room-tree-label-members {
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(29, 78, 216, 0.14);
}
body.v3-ui .room-tree-label-unread {
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.42);
  background: rgba(220, 38, 38, 0.18);
}
body.v3-ui button.room-tree-label {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}
body.v3-ui .room-tree-label-leave {
  color: #ffe3e3;
  border: 1px solid rgba(239, 68, 68, 0.72);
  background: rgba(220, 38, 38, 0.82);
}
body.v3-ui .room-tree-label-leave:hover,
body.v3-ui .room-tree-label-leave:focus {
  color: #ffe3e3;
  border-color: rgba(239, 68, 68, 0.72);
  background: rgba(220, 38, 38, 0.82);
}

/* -- Donator-only "Kun med Badge" sidebar label ---- */
body.v3-ui .room-tree-label-badge-only {
  color: #fef3c7;
  border: 1px solid rgba(251, 191, 36, 0.55);
  background: linear-gradient(
    135deg,
    rgba(180, 83, 9, 0.72) 0%,
    rgba(217, 119, 6, 0.72) 100%
  );
  animation: badgeLabelPulse 3s ease-in-out infinite;
}
@keyframes badgeLabelPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
  }
  50% {
    box-shadow: 0 0 6px 2px rgba(251, 191, 36, 0.35);
  }
}

/* ====
   Homepage Donator-Only Featured Rooms Hero
   ==== */

.hp-donator-hero {
  margin-bottom: 24px;
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid rgba(251, 191, 36, 0.35);
  background: linear-gradient(
    145deg,
    rgba(92, 40, 4, 0.55) 0%,
    rgba(30, 15, 2, 0.72) 50%,
    rgba(15, 23, 42, 0.85) 100%
  );
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.1),
    0 8px 40px rgba(180, 83, 9, 0.22),
    0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
}

/* Shimmer sweep across the hero */
.hp-donator-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(251, 191, 36, 0) 0%,
    rgba(251, 191, 36, 0.06) 40%,
    rgba(251, 191, 36, 0.12) 50%,
    rgba(251, 191, 36, 0.06) 60%,
    rgba(251, 191, 36, 0) 100%
  );
  background-size: 200% 100%;
  animation: heroShimmer 4s ease-in-out infinite;
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}
@keyframes heroShimmer {
  0% {
    background-position: -100% 0;
  }
  60% {
    background-position: 200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Header row: crown icon + text + CTA */
.hp-donator-hero-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
  position: relative;
  z-index: 1;
}
.hp-donator-hero-crown {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #92400e 0%, #d97706 55%, #fbbf24 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.45);
  animation: crownPulse 3s ease-in-out infinite;
}
@keyframes crownPulse {
  0%,
  100% {
    box-shadow: 0 4px 14px rgba(180, 83, 9, 0.45);
  }
  50% {
    box-shadow: 0 4px 22px rgba(251, 191, 36, 0.65);
  }
}
.hp-donator-hero-title {
  font-size: 15px;
  font-weight: 800;
  color: #fef3c7;
  letter-spacing: 0.02em;
  line-height: 1.25;
}
.hp-donator-hero-sub {
  font-size: 12.5px;
  color: #fde68a;
  opacity: 0.82;
  margin-top: 2px;
  line-height: 1.4;
}
.hp-donator-hero-cta {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #1c1a10;
  background: linear-gradient(135deg, #d97706 0%, #fbbf24 60%, #fde68a 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.7);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.45);
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
  white-space: nowrap;
}
.hp-donator-hero-cta:hover,
.hp-donator-hero-cta:focus {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.6);
  color: #1c1a10;
  text-decoration: none;
}

/* Horizontal scroll strip of room cards */
.hp-donator-hero-rooms {
  display: flex;
  gap: 14px;
  padding: 16px 22px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(251, 191, 36, 0.35) transparent;
  position: relative;
  z-index: 1;
}
.hp-donator-hero-rooms::-webkit-scrollbar {
  height: 4px;
}
.hp-donator-hero-rooms::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.35);
  border-radius: 4px;
}

/* Individual donator room cards inside the hero */
.hp-donator-room-card {
  flex: 0 0 220px;
  min-width: 200px;
  max-width: 240px;
  scroll-snap-align: start;
  border-radius: 14px;
  border: 1.5px solid rgba(251, 191, 36, 0.38);
  background: linear-gradient(
    145deg,
    rgba(92, 40, 4, 0.48) 0%,
    rgba(30, 15, 2, 0.55) 100%
  );
  padding: 14px 14px 12px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  animation: roomCardGlow 4s ease-in-out infinite;
}
.hp-donator-room-card:nth-child(2) {
  animation-delay: 0.7s;
}
.hp-donator-room-card:nth-child(3) {
  animation-delay: 1.4s;
}
.hp-donator-room-card:nth-child(4) {
  animation-delay: 2.1s;
}
@keyframes roomCardGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 0 rgba(251, 191, 36, 0),
      0 2px 10px rgba(0, 0, 0, 0.25);
  }
  50% {
    box-shadow:
      0 0 12px 3px rgba(251, 191, 36, 0.22),
      0 2px 10px rgba(0, 0, 0, 0.25);
  }
}
.hp-donator-room-card:hover,
.hp-donator-room-card:focus {
  transform: translateY(-3px) scale(1.015);
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow:
    0 8px 28px rgba(180, 83, 9, 0.45),
    0 0 16px rgba(251, 191, 36, 0.3);
  text-decoration: none;
  color: inherit;
}

/* Ambient glow blob inside card */
.hp-donator-room-glow {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(251, 191, 36, 0.18) 0%,
    rgba(251, 191, 36, 0) 70%
  );
  pointer-events: none;
}

.hp-donator-room-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.hp-donator-room-icon {
  font-size: 20px;
  color: #fbbf24;
  line-height: 1;
}
.hp-donator-room-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  color: #1c1a10;
  background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
  border: 1px solid rgba(251, 191, 36, 0.5);
  white-space: nowrap;
}
.hp-donator-room-name {
  font-size: 14px;
  font-weight: 800;
  color: #fef3c7;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hp-donator-room-desc {
  font-size: 11.5px;
  color: #fde68a;
  opacity: 0.78;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hp-donator-room-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: #fcd34d;
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px solid rgba(251, 191, 36, 0.15);
}
.hp-donator-room-meta span {
  display: inline-flex;
  align-items: center;
}

/* Responsive: stack CTA below on small screens */
@media (max-width: 640px) {
  .hp-donator-hero-head {
    flex-wrap: wrap;
    gap: 10px;
  }
  .hp-donator-hero-cta {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
  .hp-donator-hero-rooms {
    padding: 12px 14px 14px;
    gap: 10px;
  }
  .hp-donator-room-card {
    flex: 0 0 180px;
    min-width: 170px;
  }
}

/* ====
   End Homepage Donator Hero
   ==== */

/* ====
   Premium Donator Strip  (horizontal bar below "Nyeste opslag")
   ==== */
/* -- Strip container -- */
.hp-premium-strip {
  position: relative;
  margin: 0 0 26px;
  border-radius: 16px;
  background: linear-gradient(
    110deg,
    rgba(22, 10, 1, 0.99) 0%,
    rgba(52, 24, 3, 0.99) 45%,
    rgba(22, 10, 1, 0.99) 100%
  );
  border: 1.5px solid rgba(251, 191, 36, 0.38);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.12),
    0 4px 32px rgba(180, 83, 9, 0.22),
    0 0 60px rgba(251, 191, 36, 0.08);
  overflow: hidden;
  animation: stripOuterGlow 5s ease-in-out infinite;
}
@keyframes stripOuterGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(251, 191, 36, 0.12),
      0 4px 32px rgba(180, 83, 9, 0.22),
      0 0 60px rgba(251, 191, 36, 0.08);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(251, 191, 36, 0.28),
      0 4px 42px rgba(180, 83, 9, 0.38),
      0 0 90px rgba(251, 191, 36, 0.18);
  }
}

/* Sweeping shimmer */
.hp-premium-strip::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100%;
  width: 60%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(251, 191, 36, 0.04) 30%,
    rgba(251, 191, 36, 0.12) 50%,
    rgba(251, 191, 36, 0.04) 70%,
    transparent 100%
  );
  animation: stripShimmer 5s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes stripShimmer {
  0% {
    left: -60%;
  }
  100% {
    left: 110%;
  }
}

/* Top gold accent line */
.hp-premium-strip::after {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(251, 191, 36, 0.7) 40%,
    rgba(251, 191, 36, 0.7) 60%,
    transparent
  );
  pointer-events: none;
  z-index: 2;
}

/* -- Header row -- */
.hp-premium-strip-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 10px;
  position: relative;
  z-index: 1;
  border-bottom: 1px solid rgba(251, 191, 36, 0.15);
  background: linear-gradient(
    90deg,
    rgba(92, 40, 4, 0.18) 0%,
    transparent 100%
  );
}

.hp-premium-strip-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d97706, #fbbf24);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #1c1a10;
  box-shadow: 0 2px 12px rgba(251, 191, 36, 0.55);
  animation: crownPulse 3s ease-in-out infinite;
}
@keyframes crownPulse {
  0%,
  100% {
    box-shadow: 0 2px 12px rgba(251, 191, 36, 0.55);
  }
  50% {
    box-shadow: 0 2px 22px rgba(251, 191, 36, 0.85);
    transform: scale(1.08);
  }
}

.hp-premium-strip-label {
  font-size: 13.5px;
  font-weight: 900;
  color: #fef3c7;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(251, 191, 36, 0.3);
}

.hp-premium-strip-sub {
  font-size: 11px;
  color: #fde68a;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.hp-premium-strip-cta {
  flex-shrink: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d97706 0%, #fbbf24 60%, #fde68a 100%);
  color: #1c1a10;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.03em;
  border: 1.5px solid rgba(251, 191, 36, 0.6);
  box-shadow: 0 2px 12px rgba(217, 119, 6, 0.45);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.hp-premium-strip-cta:hover,
.hp-premium-strip-cta:focus {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.65);
  color: #1c1a10;
  text-decoration: none;
}

/* -- Scroll row -- */
.hp-premium-strip-scroll {
  display: flex;
  gap: 12px;
  padding: 14px 18px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  position: relative;
  z-index: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(251, 191, 36, 0.35) transparent;
}
.hp-premium-strip-scroll::-webkit-scrollbar {
  height: 3px;
}
.hp-premium-strip-scroll::-webkit-scrollbar-thumb {
  background: rgba(251, 191, 36, 0.4);
  border-radius: 3px;
}

/* -- Individual room card -- */
.hp-premium-card {
  position: relative;
  flex: 0 0 210px;
  min-width: 190px;
  max-width: 230px;
  border-radius: 12px;
  background: linear-gradient(
    145deg,
    rgba(60, 28, 4, 0.9) 0%,
    rgba(25, 12, 1, 0.95) 100%
  );
  border: 1.5px solid rgba(251, 191, 36, 0.3);
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  animation: premiumCardPulse 4s ease-in-out infinite;
}
.hp-premium-card:nth-child(2) {
  animation-delay: 0.8s;
}
.hp-premium-card:nth-child(3) {
  animation-delay: 1.6s;
}
.hp-premium-card:nth-child(4) {
  animation-delay: 2.4s;
}
@keyframes premiumCardPulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(251, 191, 36, 0.08),
      0 3px 14px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(251, 191, 36, 0.28),
      0 3px 22px rgba(180, 83, 9, 0.35);
  }
}
.hp-premium-card:hover,
.hp-premium-card:focus {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow:
    0 10px 32px rgba(180, 83, 9, 0.5),
    0 0 24px rgba(251, 191, 36, 0.25) !important;
  text-decoration: none;
  color: inherit;
}

/* Radial top glow inside card */
.hp-premium-card-glow {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgba(251, 191, 36, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Badge + live row */
.hp-premium-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.hp-premium-card-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(180, 83, 9, 0.8),
    rgba(251, 191, 36, 0.8)
  );
  color: #1c1a10;
  border: 1px solid rgba(251, 191, 36, 0.5);
  white-space: nowrap;
  letter-spacing: 0.05em;
  box-shadow: 0 1px 6px rgba(180, 83, 9, 0.35);
}

.hp-premium-card-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
}
.hp-premium-card-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #334155;
  flex-shrink: 0;
}
.hp-premium-card-live.is-live {
  color: #4ade80;
}
.hp-premium-card-live.is-live .hp-premium-card-dot {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
  animation: premiumDotPulse 1.4s ease-in-out infinite;
}
@keyframes premiumDotPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.7);
  }
}

/* Room name - gold gradient text */
.hp-premium-card-name {
  font-size: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 1;
}

.hp-premium-card-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  flex: 1;
  position: relative;
  z-index: 1;
}

/* Footer: members + CTA */
.hp-premium-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  color: #64748b;
  padding-top: 6px;
  border-top: 1px solid rgba(251, 191, 36, 0.12);
  position: relative;
  z-index: 1;
}

.hp-premium-card-enter {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #fbbf24;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* Responsive */
@media (max-width: 640px) {
  .hp-premium-strip-sub {
    display: none;
  }
  .hp-premium-card {
    flex: 0 0 175px;
    min-width: 165px;
  }
}
/* ====
   End Premium Donator Strip
   ==== */

/* ====
   Donator-only forum card - premium overhaul
   ==== */

/* Card-level: deep amber/black gradient + stronger glow animation */
.smart-room-card--donator-only,
.room-card--donator-only {
  position: relative;
  overflow: hidden;
  border: 1.5px solid rgba(251, 191, 36, 0.6) !important;
  background: linear-gradient(
    160deg,
    rgba(30, 14, 2, 0.97) 0%,
    rgba(55, 24, 4, 0.97) 45%,
    rgba(25, 10, 0, 0.97) 100%
  ) !important;
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.22),
    0 4px 28px rgba(180, 83, 9, 0.35),
    0 0 50px rgba(251, 191, 36, 0.12) !important;
  animation: donatorCardGlow 3.5s ease-in-out infinite;
}

/* Sweeping shimmer overlay across the whole card */
.smart-room-card--donator-only::before,
.room-card--donator-only::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(251, 191, 36, 0.07) 40%,
    rgba(251, 191, 36, 0.13) 50%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  animation: donatorShimmerSweep 4s linear infinite;
}
@keyframes donatorShimmerSweep {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }
  30% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes donatorCardGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(251, 191, 36, 0.22),
      0 4px 28px rgba(180, 83, 9, 0.35),
      0 0 50px rgba(251, 191, 36, 0.12);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(251, 191, 36, 0.42),
      0 4px 38px rgba(180, 83, 9, 0.55),
      0 0 72px rgba(251, 191, 36, 0.25);
  }
}

/* Hover: lift + intensify */
.smart-room-card--donator-only:hover,
.room-card--donator-only:hover {
  transform: translateY(-3px) scale(1.012) !important;
  border-color: rgba(251, 191, 36, 0.85) !important;
  box-shadow:
    0 0 0 2px rgba(251, 191, 36, 0.45),
    0 8px 40px rgba(180, 83, 9, 0.55),
    0 0 80px rgba(251, 191, 36, 0.3) !important;
}

/* -- PREMIUM ribbon in top-right corner ---- */
.smart-room-donator-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(135deg, #92400e 0%, #d97706 50%, #fbbf24 100%);
  color: #1c1a10;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 3px 12px 3px 8px;
  border-bottom-left-radius: 10px;
  border-top-right-radius: 10px;
  z-index: 10;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

/* -- Donator card header area ---- */
.smart-room-header--donator {
  background: linear-gradient(
    110deg,
    rgba(55, 24, 4, 0.6) 0%,
    rgba(92, 38, 5, 0.4) 100%
  );
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
  position: relative;
  z-index: 1;
}

/* Crown icon replacing the color dot */
.smart-room-color-icon--donator {
  background: linear-gradient(135deg, #d97706, #fbbf24) !important;
  color: #1c1a10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.5);
}

/* Gold gradient room title */
.smart-room-title--donator {
  background: linear-gradient(
    135deg,
    #fde68a 0%,
    #fbbf24 50%,
    #d97706 100%
  ) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
}

/* -- Badge pill - premium variant ---- */
.room-donator-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  color: #1c1a10;
  background: linear-gradient(135deg, #d97706 0%, #fbbf24 60%, #fef3c7 100%);
  border: 1px solid rgba(251, 191, 36, 0.7);
  white-space: nowrap;
  line-height: 1.4;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  box-shadow: 0 1px 6px rgba(251, 191, 36, 0.35);
}
.room-donator-badge--premium {
  animation: badgePulse 2.5s ease-in-out infinite;
}
@keyframes badgePulse {
  0%,
  100% {
    box-shadow: 0 1px 6px rgba(251, 191, 36, 0.35);
  }
  50% {
    box-shadow: 0 2px 14px rgba(251, 191, 36, 0.65);
  }
}
.room-donator-badge i {
  font-size: 12px;
}

/* -- Lock panel - premium variant ---- */
.chat-empty--donator {
  background: linear-gradient(
    145deg,
    rgba(55, 24, 4, 0.6) 0%,
    rgba(92, 38, 5, 0.45) 100%
  );
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.chat-empty--donator::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(251, 191, 36, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.chat-empty--donator--premium {
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.donator-lock-crown {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d97706, #fbbf24);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #1c1a10;
  box-shadow: 0 3px 16px rgba(251, 191, 36, 0.55);
  margin-bottom: 2px;
  animation: crownFloat 3s ease-in-out infinite;
}
@keyframes crownFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
.donator-lock-title {
  font-size: 13px;
  font-weight: 800;
  color: #fef3c7;
  letter-spacing: 0.02em;
  margin: 0;
}
.donator-lock-desc {
  font-size: 11px;
  color: #fde68a;
  opacity: 0.85;
  margin: 0;
  line-height: 1.4;
}
.donator-lock-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 5px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #d97706, #fbbf24);
  color: #1c1a10;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.45);
}

/* ====
   Forum room card - donator CTA footer
   ==== */

/* Gold gradient CTA for donator rooms (replaces per-room colour) */
.smart-room-cta--donator {
  background: linear-gradient(
    135deg,
    #92400e 0%,
    #d97706 45%,
    #fbbf24 100%
  ) !important;
  color: #1c1a10 !important;
  text-shadow: none !important;
  border: 1.5px solid rgba(251, 191, 36, 0.65) !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 14px rgba(217, 119, 6, 0.45);
  animation: ctaDonatorGlow 3s ease-in-out infinite;
}
@keyframes ctaDonatorGlow {
  0%,
  100% {
    box-shadow: 0 3px 14px rgba(217, 119, 6, 0.45);
  }
  50% {
    box-shadow: 0 3px 24px rgba(251, 191, 36, 0.75);
  }
}
.smart-room-cta--donator:hover {
  transform: translateX(3px);
  box-shadow: 0 5px 22px rgba(251, 191, 36, 0.7) !important;
}

/* Upsell variant (non-donator viewer) - slightly different gradient */
.smart-room-cta--upsell {
  background: linear-gradient(
    135deg,
    #1c1a10 0%,
    #78350f 40%,
    #d97706 100%
  ) !important;
  color: #fde68a !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
}

/* -- Donator-only room section header (forum home) ---- */
.rooms-section--donator-only {
  margin-bottom: 24px;
}

/* Upgraded header layout */
.rooms-section-header--donator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 4px 10px;
  border-bottom: 1px solid rgba(251, 191, 36, 0.35);
  flex-wrap: wrap;
  /* required so the shimmer child is clipped to the header bounds */
  position: relative;
  overflow: hidden;
}
.rooms-section-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rooms-section--donator-only .rooms-section-header {
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
}
.rooms-section--donator-only .rooms-section-title {
  color: #fbbf24;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
}

/* Scarcity/access line below section title */
.rooms-section-scarcity {
  font-size: 11px;
  color: #fde68a;
  opacity: 0.8;
  display: flex;
  align-items: center;
}

.rooms-section-badge--gold {
  background: linear-gradient(135deg, #92400e 0%, #d97706 60%, #fbbf24 100%);
  color: #1c1a10;
  font-weight: 800;
  border: 1px solid rgba(251, 191, 36, 0.4);
  white-space: nowrap;
}

/* CTA variant of badge - clickable */
a.rooms-section-badge--cta {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.4);
  flex-shrink: 0;
}
a.rooms-section-badge--cta:hover,
a.rooms-section-badge--cta:focus {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 5px 18px rgba(217, 119, 6, 0.65);
  color: #1c1a10;
  text-decoration: none;
}

/* -- Homepage premium strip - new elements ---- */

/* Title group (label + sub on two lines) */
.hp-premium-strip-title-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

/* Live bar across top of a strip card */
.hp-premium-card-live-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #4ade80;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
  margin-bottom: 2px;
}
.hp-premium-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
  animation: premiumLiveDotBlink 1.4s ease-in-out infinite;
}
@keyframes premiumLiveDotBlink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.65);
  }
}

/* Members count in strip card top row */
.hp-premium-card-members {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
}

/* ====
   Sticky donator section header  (.rooms-section-header--sticky)
   Pins at the top of the room list scroll container while user scrolls down.
   ==== */

.rooms-section-header--sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  /* Slight backdrop blur so cards slide behind it cleanly */
  background: linear-gradient(
    90deg,
    rgba(20, 9, 1, 0.97) 0%,
    rgba(36, 16, 2, 0.97) 50%,
    rgba(20, 9, 1, 0.97) 100%
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
  margin-left: -4px;
  margin-right: -4px;
  padding: 8px 12px 10px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

/* Sweep shimmer layer behind the sticky header */
.rooms-section-header-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(251, 191, 36, 0.06) 50%,
    transparent 80%
  );
  background-size: 200% 100%;
  animation: stickyHeaderShimmer 5s linear infinite;
  pointer-events: none;
  border-radius: inherit;
}
@keyframes stickyHeaderShimmer {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: -200% center;
  }
}

/* Room count pill next to the title */
.rooms-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  font-size: 10px;
  font-weight: 800;
  margin-left: 6px;
  vertical-align: middle;
}

/* ====
   Aside sticky premium panel  (.fsp-premium-panel)
   Vertical card in the right sidebar, sticky-positioned, showing premium
   features + live donator room list + CTA.
   ==== */

.fsp-premium-panel {
  border-radius: 16px;
  background: linear-gradient(
    160deg,
    rgba(40, 17, 2, 0.85) 0%,
    rgba(22, 9, 0, 0.92) 60%,
    rgba(40, 17, 2, 0.85) 100%
  );
  border: 1px solid rgba(251, 191, 36, 0.28);
  padding: 0 0 14px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(251, 191, 36, 0.08),
    0 0 40px rgba(180, 83, 9, 0.12);
  animation: fspPanelGlow 4s ease-in-out infinite;
}
@keyframes fspPanelGlow {
  0%,
  100% {
    box-shadow:
      0 4px 28px rgba(0, 0, 0, 0.35),
      0 0 0 1px rgba(251, 191, 36, 0.08),
      0 0 40px rgba(180, 83, 9, 0.12);
  }
  50% {
    box-shadow:
      0 4px 28px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(251, 191, 36, 0.18),
      0 0 60px rgba(180, 83, 9, 0.22);
  }
}

/* Full-width shimmer sweep */
.fsp-premium-panel-shimmer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -70%;
  width: 50%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(251, 191, 36, 0.06) 50%,
    transparent 100%
  );
  animation: fspPanelShimmer 6s linear infinite;
  pointer-events: none;
}
@keyframes fspPanelShimmer {
  0% {
    left: -70%;
  }
  100% {
    left: 120%;
  }
}

/* Gold top accent bar */
.fsp-premium-panel::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(251, 191, 36, 0.9) 25%,
    #fbbf24 50%,
    rgba(251, 191, 36, 0.9) 75%,
    transparent 100%
  );
  box-shadow: 0 2px 16px rgba(251, 191, 36, 0.5);
}

/* -- Panel header -- */
.fsp-pp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px;
  position: relative;
  z-index: 1;
}

.fsp-pp-crown {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(92, 40, 4, 0.7),
    rgba(217, 119, 6, 0.5)
  );
  border: 1px solid rgba(251, 191, 36, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  color: #fbbf24;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5));
  animation: fspCrownFloat 3s ease-in-out infinite;
}
@keyframes fspCrownFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

.fsp-pp-head-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.fsp-pp-title {
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 60%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.03em;
  line-height: 1.2;
}
.fsp-pp-sub {
  font-size: 11px;
  color: #d1a85a;
  line-height: 1.3;
}
.fsp-pp-sub strong {
  color: #fde68a;
}

.fsp-pp-count {
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #92400e, #fbbf24);
  color: #1c1a10;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 6px;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.4);
}

/* -- Features list -- */
.fsp-pp-features {
  list-style: none;
  margin: 0 10px 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  z-index: 1;
}
.fsp-pp-feature {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.05);
  border: 1px solid rgba(251, 191, 36, 0.1);
  font-size: 12px;
  color: #fde68a;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}
.fsp-pp-feature:hover {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.25);
}
.fsp-pp-feature strong {
  color: #fff;
}

.fsp-pp-fi {
  font-size: 14px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px currentColor);
}
.fsp-pp-fi--pink {
  color: #f9a8d4;
}
.fsp-pp-fi--gold {
  color: #fbbf24;
}
.fsp-pp-fi--green {
  color: #4ade80;
}
.fsp-pp-fi--blue {
  color: #60a5fa;
}

/* -- Rooms label -- */
.fsp-pp-rooms-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a38257;
  padding: 0 14px 6px;
  position: relative;
  z-index: 1;
}

/* -- Room list -- */
.fsp-pp-rooms {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 10px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.fsp-pp-room {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    rgba(60, 24, 3, 0.6) 0%,
    rgba(40, 16, 2, 0.7) 100%
  );
  border: 1px solid rgba(251, 191, 36, 0.15);
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.12s ease;
  cursor: pointer;
}
.fsp-pp-room:hover {
  background: linear-gradient(
    90deg,
    rgba(120, 50, 8, 0.65) 0%,
    rgba(80, 32, 4, 0.7) 100%
  );
  border-color: rgba(251, 191, 36, 0.45);
  transform: translateX(2px);
  text-decoration: none;
}
.fsp-pp-room-name {
  font-size: 12.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fsp-pp-room-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #4ade80;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.fsp-pp-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.8);
  animation: fspLiveDot 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes fspLiveDot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.65);
  }
}
.fsp-pp-room-lock {
  color: #6b5a3e;
  font-size: 11px;
  flex-shrink: 0;
}

/* -- CTA button -- */
.fsp-pp-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px;
  padding: 11px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #92400e 0%, #d97706 45%, #fbbf24 100%);
  color: #1c1a10;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(217, 119, 6, 0.5);
  animation: fspCtaGlow 2.8s ease-in-out infinite;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  position: relative;
  z-index: 1;
}
@keyframes fspCtaGlow {
  0%,
  100% {
    box-shadow: 0 4px 18px rgba(217, 119, 6, 0.5);
  }
  50% {
    box-shadow: 0 6px 28px rgba(251, 191, 36, 0.75);
  }
}
.fsp-pp-cta:hover,
.fsp-pp-cta:focus {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 8px 28px rgba(251, 191, 36, 0.65);
  color: #1c1a10;
  text-decoration: none;
}
.fsp-pp-cta--enter {
  background: linear-gradient(135deg, #166534 0%, #16a34a 50%, #4ade80 100%);
  box-shadow: 0 4px 18px rgba(22, 163, 74, 0.45);
}
.fsp-pp-cta--enter:hover {
  box-shadow: 0 8px 28px rgba(74, 222, 128, 0.55);
  color: #fff;
}

/* -- Responsive: below 1200px the aside drops below the directory -- */
@media (max-width: 1199.98px) {
  .fsp-premium-panel {
    position: static;
  }
  .fsp-pp-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
  }
  .fsp-pp-rooms {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 6px;
  }
  #home-live-dashboard {
    position: static;
  }
}

@media (max-width: 576px) {
  .fsp-pp-features {
    grid-template-columns: 1fr;
  }
  .fsp-pp-rooms {
    grid-template-columns: 1fr;
  }
  .fsp-pp-cta {
    font-size: 12.5px;
    padding: 10px 12px;
  }
}

/* -- Explorer view donator pip icon ---- */
.explorer-room-card--donator-only {
  outline: 2px solid rgba(251, 191, 36, 0.5);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.25);
}
.explorer-room-donator-pip {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, #92400e, #fbbf24);
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.explorer-room-card-cover {
  position: relative;
}

/* -- Donator-only link glow wrapper (card & loop views) ---- */
a.room-loop-link--donator-only .room-card {
  border-color: rgba(251, 191, 36, 0.5) !important;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.18) !important;
}

/* DM conversation list loading state */
body.v3-ui .private-list {
  position: relative;
}

body.v3-ui .private-list .private-list-loading {
  display: none; /* hidden - skeleton is the visual indicator */
}

@keyframes skShimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.app-sidebar-item .sidebar-item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-sidebar-item .sidebar-item-badge {
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}

/* DM row */
.dm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  margin: 1px 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: var(--app-text);
}
.dm-row:hover {
  background: var(--app-hover);
}
.dm-row.active {
  background: var(--app-active);
}
.dm-row-avatar {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.dm-row-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.dm-row-status {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--app-sidebar);
}
.dm-row-status.online {
  background: var(--app-online);
}
.dm-row-status.away {
  background: var(--app-away);
}
.dm-row-status.busy {
  background: var(--app-busy);
}
.dm-row-status.offline {
  background: var(--app-offline);
}
.dm-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dm-row-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--app-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-row-preview {
  font-size: 10px;
  color: var(--app-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.dm-row-time {
  font-size: 9px;
  color: var(--app-text-muted);
}
.dm-row-unread {
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* - Column 3: Main Chat - */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  background: var(--app-bg);
}

/* Tab pane base: all hidden by default (see v3 pane overrides at bottom of file) */

/* Force page-content-wrapper to fill tab pane.
   Override chatnet.css: #main-room .page-content-wrapper { height: var(--app-vh) !important }
   which makes it full viewport height, ignoring titlebar/statusbar. */
#main-room > .page-content-wrapper,
#main-private > .page-content-wrapper {
  height: 100% !important;
  max-height: 100% !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* Override chatnet.css fixed height: calc(var(--app-vh) - 3rem) on .main-panel.
   In v3 layout, .main-panel must simply fill its flex parent (page-content-wrapper).
   Use ID selectors to match chatnet.css specificity (1,1,0). */
#main-room .main-panel,
#main-private .main-panel {
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* Chat scroll fills available space */
#main-room .main-panel > .chat-scroll,
#main-private .main-panel > .chat-scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}

/* Room editor pinned at bottom */
#main-room .main-panel > .room-editor,
#main-private .main-panel > .room-editor,
#main-private .main-panel > .private-editor {
  flex: 0 0 auto !important;
}
.app-chat-header {
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  background: var(--app-bg);
  border-bottom: 1px solid var(--app-border);
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}
.app-chat-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.app-chat-header-channel {
  font-size: 14px;
  font-weight: 600;
  color: var(--app-text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.app-chat-header-channel .channel-hash {
  color: var(--app-text-muted);
  font-size: 18px;
}
.app-chat-header-topic {
  font-size: 11px;
  color: var(--app-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.app-chat-header-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--app-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  transition:
    background 0.15s,
    color 0.15s;
}
.app-chat-header-btn:hover {
  background: var(--app-hover);
  color: var(--app-text-primary);
}

/* Messages area */
.app-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-message-divider {
  text-align: center;
  padding: 16px 0 8px;
  position: relative;
}
.app-message-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--app-border);
}
.app-message-divider span {
  position: relative;
  background: var(--app-bg);
  padding: 0 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--app-text-muted);
  letter-spacing: 0.5px;
}
.app-message {
  display: flex;
  gap: 12px;
  padding: 2px 0;
  border-radius: 4px;
  transition: background 0.1s;
}
.app-message:hover {
  background: var(--app-hover);
}
.app-message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  margin-top: 2px;
}
.app-message-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.app-message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.app-message-author {
  color: var(--app-text-primary);
  font-weight: 500;
}
.app-message-time {
  color: var(--app-text-muted);
  font-size: 9px;
}
.app-message-text {
  color: var(--app-text);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

/* Composer */
.app-composer {
  padding: 12px 16px;
  background: var(--app-bg);
  border-top: 1px solid var(--app-border);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  position: relative;
  z-index: 50;
}
.app-composer-input {
  flex: 1;
  background: var(--app-elevated);
  border: none;
  border-radius: 8px;
  color: var(--app-text);
  padding: 10px 14px;
  font-size: 12px;
  font-family: var(--app-font);
  resize: none;
  min-height: 44px;
  max-height: 200px;
  outline: none;
  line-height: 1.5;
}
.app-composer-input::placeholder {
  color: var(--app-text-muted);
}
.app-composer-input:focus {
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.3);
}
.app-composer-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--app-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  flex-shrink: 0;
  transition:
    background 0.15s,
    color 0.15s;
}
.app-composer-btn:hover {
  background: var(--app-hover);
  color: var(--app-text-primary);
}
.app-composer-btn.send {
  background: var(--app-accent);
  color: #fff;
}
.app-composer-btn.send:hover {
  background: var(--app-accent-hover);
}

/* Inline v3 composer: flat send button, no bg circle */
.app-main .editor-container .app-composer-btn {
  background: transparent;
  color: var(--app-accent);
}
.app-main .editor-container .app-composer-btn:hover {
  background: transparent;
  color: var(--app-accent-hover);
}
.app-main .editor-container .app-composer-btn.send {
  background: var(--app-accent);
  color: #fff;
}
.app-main .editor-container .app-composer-btn.send:hover {
  background: var(--app-accent-hover);
}

/* - Column 4: Right Panel - */
.app-rightbar {
  width: var(--rightbar-width);
  min-width: var(--rightbar-width);
  max-width: var(--rightbar-width);
  background: linear-gradient(180deg, var(--app-sidebar) 0%, #0f172a 100%);
  border-left: 1px solid var(--app-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  height: 100%;
}
.app-rightbar-header {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--app-text-primary);
  border-bottom: 1px solid var(--app-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-rightbar-section {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--app-text-muted);
  padding: 16px 12px 4px;
  letter-spacing: 0.5px;
}
.app-rightbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.app-rightbar-user:hover {
  background: var(--app-hover);
}
.app-rightbar-user img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.app-rightbar-user-name {
  font-size: 12px;
  color: var(--app-text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-rightbar-user-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* - Status Bar - hidden in v3 - */
body.v3-ui .app-statusbar {
  display: none !important;
}

.app-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--statusbar-height);
  min-height: var(--statusbar-height);
  padding: 0 12px;
  background: var(--app-base);
  border-top: 1px solid var(--app-border);
  color: var(--app-text-muted);
  font-size: 11px;
}
.statusbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.statusbar-avatar {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: transparent;
}
.statusbar-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.statusbar-avatar-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--app-online);
  border: 2px solid var(--app-base);
}
.statusbar-user {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.statusbar-username {
  color: var(--app-text-primary);
  font-weight: 500;
  font-size: 11px;
}
.statusbar-status {
  color: var(--app-text-muted);
  font-size: 9px;
}
.statusbar-center {
  display: flex;
  align-items: center;
  gap: 4px;
}
.statusbar-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--app-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  transition:
    background 0.15s,
    color 0.15s;
}
.statusbar-btn:hover {
  background: var(--app-hover);
  color: var(--app-text-primary);
}
.statusbar-btn.muted {
  color: #ef4444;
}
.statusbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.statusbar-donation {
  color: var(--app-text-primary);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--app-accent);
  transition: background 0.15s;
}
.statusbar-donation:hover {
  background: var(--app-accent-hover);
  color: #fff;
}
.statusbar-xp {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--app-text-primary);
  font-weight: 500;
  font-size: 10px;
}

/* - Inline Banners - */
.app-banner {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}
.app-banner.notice {
  background: rgba(88, 101, 242, 0.1);
  border-bottom: 1px solid var(--app-border);
  color: var(--app-text);
}
.app-banner.ban {
  background: rgba(237, 66, 69, 0.1);
  border-bottom: 1px solid var(--app-border);
  color: var(--app-text);
}
.app-banner .banner-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--app-text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* - Scrollbars - */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--app-elevated);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #4e5058;
}

/* -
   V3 Compatibility Overrides - make old elements fit new layout
   - */

/* Override old body layout classes */
body.theme-dark.dark {
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Hide old topbar/navbar inside v3 */
.app-layout .navbar.topbar,
.app-layout .topbar,
.app-layout .tb-btn.topbar-menu-btn,
.app-layout .topbar-channels {
  display: none !important;
}

/* Make old page-content-wrapper fit new flex layout */
.app-main .page-content-wrapper.v3-compat {
  min-width: 0 !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  background: var(--app-bg) !important;
}

/* Old chat scroll area inside v3 */
.app-main .chat-scroll {
  height: auto !important;
  max-height: none !important;
  flex: 1 !important;
  overflow-y: auto !important;
  background: var(--app-bg) !important;
}

.app-main .messages.chats {
  background: transparent !important;
  padding: 12px 16px !important;
}

/* Let chatnet's native .group-chat / .private-chat .cht bubble styles apply unchanged.
   Do NOT override border-radius, padding, hover or font on .cht - old version consistency. */

/* Old room editor inside v3 */
.app-main .room-editor {
  flex-shrink: 0 !important;
  border-top: 1px solid var(--app-border) !important;
  background: var(--app-bg) !important;
}

/* Old right panel inside v3 */
.app-layout .rightbar-wrapper {
  position: static !important;
  width: var(--rightbar-width) !important;
  min-width: var(--rightbar-width) !important;
  max-width: var(--rightbar-width) !important;
  margin: 0 !important;
  border-left: 1px solid var(--app-border) !important;
  border-right: none !important;
  background: var(--app-sidebar) !important;
  display: flex !important;
  flex-direction: column !important;
}

.app-layout .rightbar-wrapper .user-list-panel {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  overflow: hidden !important;
}

.app-layout .rightbar-wrapper .height-scroll-rpanelx {
  flex: 1 !important;
  overflow-y: auto !important;
  min-height: 0 !important;
  height: 0 !important; /* forces flex child to scroll instead of expand */
  max-height: 100% !important;
}

/* Hide old left sidebar elements that are replaced by v3 */
.app-layout #sidebar-wrapper,
.app-layout .sidebar-wrapper,
.app-layout .room-bar {
  display: none !important;
}

/* Bootstrap tab pane base - !important overrides inline styles from template */
.app-main .app-tab-pane {
  display: none !important;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* Bootstrap fade transition support */
.app-main .app-tab-pane.fade {
  opacity: 0;
  transition: opacity 0.15s linear;
}

.app-main .app-tab-pane.fade.active,
.app-main .app-tab-pane.fade.show {
  opacity: 1;
}

/* v3 active tab fills container */
.app-main .app-tab-pane.active.show {
  display: flex !important;
}

/* Old empty state inside v3 */
.app-main .empty-state-message {
  color: var(--app-text-muted) !important;
}

/* Fix old editor summernote inside v3 */
.app-main .note-editor {
  background: var(--app-elevated) !important;
  border: none !important;
  border-radius: 8px !important;
}

.app-main .note-editable {
  background: var(--app-elevated) !important;
  color: var(--app-text) !important;
}

/* - Responsive - */
@media (max-width: 992px) {
  .app-rightbar {
    display: none;
  }
  /* Iconbar is replaced by the mobile top-nav at -992px - remove it from flow */
  .app-iconbar {
    width: 0;
    min-width: 0;
    max-width: 0;
    padding: 0;
    overflow: hidden;
    flex: 0 0 0;
  }
  /* Sidebar overlays full-width as a drawer */
  .app-sidebar {
    position: fixed;
    left: 0;
    top: var(--topbar-height, 46px);
    bottom: 0;
    width: min(320px, 88vw);
    min-width: 0;
    max-width: 88vw;
    flex: 0 0 auto;
    z-index: 2000;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    height: auto;
    background: linear-gradient(
      180deg,
      var(--app-sidebar, #0a1628) 0%,
      var(--app-base, #070e1a) 100%
    );
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  /* Dim overlay when sidebar drawer is open */
  .app-sidebar.open::before {
    content: "";
    position: fixed;
    inset: 0;
    left: min(320px, 88vw);
    background: rgba(0, 0, 0, 0.45);
    z-index: -1;
  }
  /* Main content fills all available width */
  .app-main {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
  }
}
@media (max-width: 576px) {
  .app-sidebar {
    width: 100vw;
    max-width: 100vw;
  }
  .app-titlebar {
    padding: 0 8px;
  }
}

/* - Mobile Left Navigation Drawer (Responsive Iconbar) - */
.mobile-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
  visibility: hidden;
}

.mobile-nav-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.mobile-nav-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-nav-drawer.open .mobile-nav-drawer-overlay {
  opacity: 1;
}

/* Floating panel with margins */
.mobile-nav-drawer-panel {
  position: absolute;
  left: 12px;
  top: 12px;
  bottom: 12px;
  width: min(280px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  background: linear-gradient(
    180deg,
    var(--app-sidebar, #0a1628) 0%,
    var(--app-base, #070e1a) 100%
  );
  border: 1px solid var(--app-border, rgba(255, 255, 255, 0.08));
  border-radius: 20px;
  transform: translateX(calc(-100% - 24px));
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.mobile-nav-drawer.open .mobile-nav-drawer-panel {
  transform: translateX(0);
}

.mobile-nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--app-border, rgba(255, 255, 255, 0.08));
  background: rgba(0, 0, 0, 0.2);
  border-radius: 20px 20px 0 0;
}

/* Game info panel under the drawer title */
.mobile-nav-drawer-content .mobile-nav-drawer-game-panel {
  margin: 8px 10px 8px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}
.mobile-nav-drawer-game-panel {
  padding: 10px 12px;
  border-bottom: 1px solid var(--app-border, rgba(255, 255, 255, 0.08));
  background: linear-gradient(
    180deg,
    rgba(59, 130, 246, 0.08),
    rgba(15, 23, 42, 0.4)
  );
}
.mngp-avatar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.mngp-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}
.mngp-user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mngp-username {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--app-text, #e2e8f0);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mngp-rank {
  font-size: 0.68rem;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.mngp-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.mngp-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mngp-xp-stat,
.mngp-donation-stat {
  cursor: pointer;
  padding: 4px;
  margin: -4px;
  border-radius: 8px;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}
.mngp-xp-stat:hover,
.mngp-xp-stat:focus-visible,
.mngp-donation-stat:hover,
.mngp-donation-stat:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.mngp-xp-stat:focus-visible,
.mngp-donation-stat:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.5);
  outline-offset: 2px;
}
.mngp-stat-header {
  display: flex;
  align-items: center;
  gap: 5px;
}
.mngp-stat-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
  font-size: 0.85rem;
  line-height: 1;
}
.mngp-stat-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--app-text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.mngp-stat-value {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--app-text, #e2e8f0);
  margin-left: auto;
  flex-shrink: 0;
}
.mngp-xp-stat .mngp-stat-value {
  color: #fbbf24;
}
.mngp-donation-stat .mngp-stat-value {
  color: #34d399;
}
/* Mobile nav drawer donation preview for non-donors */
.mngp-donation-preview {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mngp-donation-preview__title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fbbf24;
  line-height: 1.2;
}
.mngp-donation-preview__subtitle {
  font-size: 0.65rem;
  color: var(--app-text-muted, #94a3b8);
  line-height: 1.2;
}
.mngp-donation-preview__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.mngp-donation-preview__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mngp-donation-preview__badge-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mngp-donation-preview__badge-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.5);
  padding: 2px;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2);
}
/* Active VIP badge highlight */
.mngp-donation-preview__badge-item.is-active .mngp-donation-preview__badge-img {
  transform: scale(1.12);
  box-shadow:
    0 0 0 2px rgba(251, 191, 36, 0.7),
    0 0 8px rgba(245, 158, 11, 0.4);
}
.mngp-progress-wrap {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.mngp-progress-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  transition: width 0.4s ease;
  min-width: 0;
}
.mngp-donation-bar {
  background: linear-gradient(90deg, #34d399, #10b981);
}
.mngp-progress-label {
  font-size: 0.65rem;
  color: var(--app-text-muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mngp-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mngp-action-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--app-text, #e2e8f0);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease;
}
.mngp-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1;
}
.mngp-action-label {
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
}
.mngp-action-btn:hover,
.mngp-action-btn:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}
.mngp-action-btn:active {
  transform: scale(0.98);
}
.mngp-points-btn {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
}
.mngp-points-btn:hover,
.mngp-points-btn:focus {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.45);
}
.mngp-donate-btn {
  border: none;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow:
    0 2px 8px rgba(236, 72, 153, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}
.mngp-donate-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.18),
    transparent 40%
  );
  pointer-events: none;
}
.mngp-donate-btn:hover,
.mngp-donate-btn:focus {
  background: linear-gradient(135deg, #fbbf24, #f43f5e);
  transform: translateY(-1px);
  box-shadow:
    0 6px 16px rgba(236, 72, 153, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.mngp-donate-btn:active {
  transform: translateY(0);
}
.mngp-spil-btn {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}
.mngp-spil-btn:hover,
.mngp-spil-btn:focus {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.45);
}

/* Close/minimize button on left with 70% opacity */
.mobile-nav-drawer-close {
  order: -1;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--app-border, rgba(255, 255, 255, 0.15));
  background: rgba(255, 255, 255, 0.08);
  color: var(--app-text-muted, #94a3b8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.mobile-nav-drawer-close:hover,
.mobile-nav-drawer-close:focus {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
  color: var(--app-text, #e2e8f0);
}

.mobile-nav-drawer-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--app-text, #e2e8f0);
  flex: 1;
}

.mobile-nav-drawer-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px 0;
  border-radius: 0 0 20px 20px;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  margin: 2px 10px;
  border-radius: 10px;
  color: var(--app-text, #e2e8f0);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  width: calc(100% - 20px);
  text-align: left;
  font-size: 0.95rem;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
  background: rgba(255, 255, 255, 0.06);
  color: var(--app-text, #e2e8f0);
}

.mobile-nav-item:active {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(0.98);
}

.mobile-nav-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--app-text, #e2e8f0);
  flex-shrink: 0;
}

.mobile-nav-icon i {
  font-size: 1.15rem;
}

.mobile-nav-label {
  font-weight: 500;
}

.mobile-nav-divider {
  height: 1px;
  background: var(--app-border, rgba(255, 255, 255, 0.08));
  margin: 8px 16px;
}

/* Body scroll lock when drawer open */
body.mobile-nav-drawer-open {
  overflow: hidden !important;
}

@media (min-width: 993px) {
  .mobile-nav-drawer {
    display: none !important;
  }
}

/* - Main panel layout: chat-scroll fills, editor pins bottom - */
.app-main .main-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.app-main .chat-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.app-main .room-editor {
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid var(--app-border);
}

/* - Telegram/Discord-style Composer - */
.app-main .room-editor,
.app-main #chat-editor .editor-wrap {
  flex-shrink: 0;
  padding: 0 !important;
  background: var(--app-bg);
  margin-bottom: 0 !important;
}

/* Composer container: padded bar holding the pill input */
.app-main .editor-container.editor-controller {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 8px 12px;
  box-shadow: none;
}

/* Attachment and emoji buttons */
.app-main .editor-container .attachment-col,
.app-main .editor-container .emoji-col {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  cursor: pointer;
  color: var(--app-text-muted);
  border-radius: 50%;
  background: transparent;
  transition:
    color 0.15s,
    background 0.15s;
}

.app-main .editor-container .attachment-col:hover,
.app-main .editor-container .emoji-col:hover {
  color: var(--app-accent);
  background: var(--app-elevated);
}

.app-main .editor-container .editor-icon {
  font-size: 18px;
  line-height: 1;
}

/* Pill input bubble - the main input wrapper */
.app-main .editor-container .editor-col {
  flex: 1;
  min-width: 0;
  background: var(--app-elevated);
  border: 1px solid var(--app-border);
  border-radius: 22px;
  padding: 2px 4px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.app-main .editor-container .editor-col:focus-within {
  border-color: var(--app-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--app-accent) 18%, transparent);
}

/* Summernote inside pill */
.app-main .editor-col .note-editor {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.app-main .editor-col .note-toolbar {
  display: none !important;
}

.app-main .editor-col .note-statusbar {
  display: none !important;
}

.app-main .editor-col .note-editing-area {
  min-height: 28px;
}

/* Textarea inside pill */
.app-main .v3-composer-input {
  background: transparent !important;
  color: var(--app-text) !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 7px 10px !important;
  font-size: 14px;
  line-height: 1.45;
  min-height: 36px;
  max-height: 140px;
  resize: none;
  outline: none;
  width: 100%;
}

.app-main .v3-composer-input::placeholder {
  color: var(--app-text-muted);
  opacity: 0.75;
}

/* Summernote editable inside pill */
.app-main .editor-col .note-editable {
  background: transparent !important;
  color: var(--app-text) !important;
  padding: 7px 10px !important;
  font-size: 14px;
  line-height: 1.45;
  min-height: 36px;
  max-height: 140px;
  overflow-y: auto;
  outline: none;
}

.app-main .editor-col .note-editable:empty::before {
  content: attr(data-placeholder);
  color: var(--app-text-muted);
  opacity: 0.75;
}

.app-main .editor-col .note-placeholder {
  color: var(--app-text-muted) !important;
  opacity: 0.75;
}

/* Reply row: attached above the composer bar */
.app-main .reply-msg-row {
  background: var(--app-elevated);
  border-left: 3px solid var(--app-accent);
  border-radius: 0 8px 8px 0;
  margin-bottom: 4px;
  padding: 6px 10px;
  font-size: 11px;
}

/* Non-login / non-join messages */
.app-main .non-login-message,
.app-main .non-join-message,
.app-main .non-chat-select {
  text-align: center;
  padding: 10px;
  font-size: 11px;
  color: var(--app-text-muted);
}

.app-main .non-login-message img,
.app-main .non-join-message img,
.app-main .non-chat-select img {
  width: 36px;
  opacity: 0.4;
  margin-bottom: 4px;
}

/* Attachment panel (emoji/gif picker): flat */
.app-main .attachments-container {
  background: var(--app-elevated);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  margin-bottom: 6px;
  padding: 10px;
  box-shadow: none;
}

/* -
   NUCLEAR OVERRIDE: body.v3-ui - kill ALL legacy height rules
   This section exists SOLELY to neutralize chatnet.css and
   chat_room.inline.css fixed viewport heights that break the
   flexbox chain. Specificity: body.v3-ui #id .class = (1,2,1+)
   - */

/* Body: full viewport, flex column, no scroll */
body.v3-ui {
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Layout wrapper fills remaining space below titlebar, above statusbar */
body.v3-ui .app-layout {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: row !important;
}

/* Main content column fills its flex share */
body.v3-ui .app-main {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  min-width: 0 !important;
  max-height: 100% !important;
  height: auto !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Tab pane: when active, fill .app-main */
body.v3-ui .app-main .app-tab-pane.active.show {
  flex: 1 1 0% !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  max-height: 100% !important;
  height: auto !important;
  overflow: hidden !important;
}

/* page-content-wrapper: fill tab pane - KILL all --app-vh heights */
body.v3-ui #main-room > .page-content-wrapper,
body.v3-ui #main-private .private-chat > .page-content-wrapper,
body.v3-ui .app-tab-pane .page-content-wrapper {
  height: auto !important;
  max-height: 100% !important;
  min-height: 0 !important;
  flex: 1 1 0% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* .private-chat wrapper inside #main-private */
body.v3-ui #main-private > .private-chat {
  flex: 1 1 0% !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* main-panel: fill page-content-wrapper - KILL calc(--app-vh - 3rem) */
body.v3-ui #main-room .main-panel,
body.v3-ui #main-private .main-panel,
body.v3-ui .app-tab-pane .main-panel {
  height: auto !important;
  max-height: 100% !important;
  min-height: 0 !important;
  flex: 1 1 0% !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* chat-scroll: fills remaining space in main-panel */
body.v3-ui #main-room .main-panel > .chat-scroll,
body.v3-ui #main-private .main-panel > .chat-scroll,
body.v3-ui .app-tab-pane .main-panel > .chat-scroll {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* room-editor / private-editor: pinned at bottom, no grow */
body.v3-ui #main-room .main-panel > .room-editor,
body.v3-ui #main-private .main-panel > .room-editor,
body.v3-ui #main-private .main-panel > .private-editor,
body.v3-ui .app-tab-pane .main-panel > .room-editor {
  flex: 0 0 auto !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
}

/* Kill rightbar fixed heights in v3 */
body.v3-ui #main-room .page-content-wrapper .rightbar-wrapper,
body.v3-ui #main-private .page-content-wrapper .rightbar-wrapper {
  height: auto !important;
  max-height: 100% !important;
  min-height: 0 !important;
  flex: 0 0 var(--rightbar-width) !important;
}

/* Kill mobile-bottom-nav-keyboard-active overrides in v3 */
body.v3-ui.mobile-bottom-nav-keyboard-active #main-room .main-panel,
body.v3-ui.mobile-bottom-nav-keyboard-active #main-private .main-panel {
  height: auto !important;
  max-height: 100% !important;
}

/* Android: disable hard viewport lock that can crop topbar/composer on real devices. */
html.platform-android body.v3-ui.mobile-bottom-nav-keyboard-active,
html.platform-android body.v3-ui.mobile-bottom-nav-keyboard-active #wrapper,
html.platform-android
  body.v3-ui.mobile-bottom-nav-keyboard-active
  #wrapper
  .main-container,
html.platform-android
  body.v3-ui.mobile-bottom-nav-keyboard-active
  #wrapper
  .main-tab-content,
html.platform-android
  body.v3-ui.mobile-bottom-nav-keyboard-active
  #wrapper
  .main-tab-pane.active.show,
html.platform-android
  body.v3-ui.mobile-bottom-nav-keyboard-active
  #main-room
  > .page-content-wrapper,
html.platform-android
  body.v3-ui.mobile-bottom-nav-keyboard-active
  #main-private
  > .page-content-wrapper {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

html.platform-android
  body.v3-ui.mobile-bottom-nav-keyboard-active
  #main-room
  .main-panel,
html.platform-android
  body.v3-ui.mobile-bottom-nav-keyboard-active
  #main-private
  .main-panel {
  height: auto !important;
  max-height: 100% !important;
  min-height: 0 !important;
}

/* Kill dynamicChatBottomInset padding - v3 flexbox doesn't need it.
   chatnet.js sets inline padding-bottom on .messages.chats; override it. */
body.v3-ui .chat-scroll .messages.chats {
  padding-bottom: 12px !important;
}
body.v3-ui .private-chat .chat-scroll .messages.chats {
  padding-bottom: 12px !important;
}

/* Explore tab removed in v3 - force hidden even if chatnet.js sets inline display */
body.v3-ui #main-explore {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  flex: 0 0 0px !important;
}

/* -
   V3 COMPOSER STABILITY - prevent layout jumps
   - */

/* The .room-editor / .private-editor containers must be flex-shrink:0
   and stable at the bottom of the main-panel flex column */
body.v3-ui .room-editor,
body.v3-ui .private-editor {
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 10;
  border-top: 1px solid var(--app-border);
  background: var(--app-bg);
  padding: 0;
}

/* #chat-editor wrapper: no extra spacing */
body.v3-ui #chat-editor,
body.v3-ui #chat-editor .editor-wrap {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  margin: 0 !important;
}

/* Final guard: keep composer flush with host and avoid phantom bottom strip. */
body.v3-ui #main-room.main-tab-pane.active.show #chat-editor .editor-wrap,
body.v3-ui #main-private.main-tab-pane.active.show #chat-editor .editor-wrap {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
body.v3-ui #main-room.main-tab-pane.active.show .room-editor,
body.v3-ui #main-private.main-tab-pane.active.show .private-editor {
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  margin-bottom: 0 !important;
}
body.v3-ui #main-room.main-tab-pane.active.show #chat-editor .editor-container,
body.v3-ui
  #main-private.main-tab-pane.active.show
  #chat-editor
  .editor-container {
  margin-bottom: 0 !important;
}

/* Summernote .note-editor: strip ALL chrome */
body.v3-ui #chat-editor .note-editor {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: auto !important;
}

/* Hide Summernote toolbar and statusbar completely */
body.v3-ui #chat-editor .note-toolbar,
body.v3-ui #chat-editor .note-statusbar,
body.v3-ui #chat-editor .note-resizebar {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* Summernote editable inside pill - the actual typed text area */
body.v3-ui #chat-editor .note-editable,
body.v3-ui
  #chat-editor
  .editor-container
  .note-editor
  .note-editing-area
  .note-editable,
body.v3-ui
  #chat-editor
  .editor-container
  .note-editor.note-frame
  .note-editing-area
  .note-editable,
body.v3-ui
  #chat-editor
  .editor-container
  .note-editor.note-airframe
  .note-editing-area
  .note-editable {
  background: transparent !important;
  color: var(--app-text) !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 7px 4px !important;
  margin: 0 !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  min-height: 36px !important;
  max-height: 140px !important;
  height: auto !important;
  overflow-y: auto !important;
  outline: none !important;
  resize: none !important;
}

/* note-editing-area wrapper: no background/border */
body.v3-ui #chat-editor .editor-container .note-editor .note-editing-area,
body.v3-ui
  #chat-editor
  .editor-container
  .note-editor.note-frame
  .note-editing-area,
body.v3-ui
  #chat-editor
  .editor-container
  .note-editor.note-airframe
  .note-editing-area {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
}

/* note-editor frame wrapper */
body.v3-ui #chat-editor .editor-container .note-editor.note-frame,
body.v3-ui #chat-editor .editor-container .note-editor.note-airframe,
body.v3-ui #chat-editor .editor-col > .note-editor {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: auto !important;
}

/* Placeholder inside Summernote editable */
body.v3-ui #chat-editor .note-editable:empty::before {
  content: attr(data-placeholder);
  color: var(--app-text-muted);
  opacity: 0.75;
  pointer-events: none;
}
body.v3-ui #chat-editor .note-placeholder {
  color: var(--app-text-muted) !important;
  opacity: 0.75;
  padding: 7px 4px !important;
}

/* Editor container row: flex row with icon-buttons + pill-input + send */
body.v3-ui #chat-editor .editor-container,
body.v3-ui #chat-editor .editor-container.editor-controller {
  display: flex !important;
  align-items: flex-end !important;
  gap: 8px !important;
  padding: 8px 12px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  min-height: 52px !important;
  height: auto !important;
  max-height: none !important;
  outline: none !important;
  backdrop-filter: none !important;
}
body.v3-ui #chat-editor .editor-container:focus-within {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Beat trueblue theme overrides */
body.v3-ui #main-room #chat-editor .editor-container,
body.v3-ui #main-private #chat-editor .editor-container,
html.trueblue body.v3-ui #chat-editor .editor-container,
html.theme-trueblue body.v3-ui #chat-editor .editor-container {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  backdrop-filter: none !important;
  outline: none !important;
}

/* Pill input bubble - the actual visible input area */
body.v3-ui #chat-editor .editor-container .editor-col {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  background: var(--app-elevated) !important;
  border: 1.5px solid var(--app-border) !important;
  border-radius: 22px !important;
  padding: 2px 10px !important;
  transition:
    border-color 0.15s,
    box-shadow 0.15s !important;
}
body.v3-ui #chat-editor .editor-container .editor-col:focus-within {
  border-color: var(--app-accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-accent) 15%, transparent) !important;
}

/* Icon cols: fixed size, centered */
body.v3-ui #chat-editor .editor-container .attachment-col,
body.v3-ui #chat-editor .editor-container .emoji-col {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  color: var(--app-text-muted);
  font-size: 18px;
  border-radius: 50% !important;
  background: transparent !important;
  transition:
    color 0.15s,
    background 0.15s !important;
}
body.v3-ui #chat-editor .editor-container .attachment-col:hover,
body.v3-ui #chat-editor .editor-container .emoji-col:hover {
  color: var(--app-accent) !important;
  background: var(--app-elevated) !important;
}

/* Send button: filled circle */
body.v3-ui #chat-send-btn {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important;
  border-radius: 50% !important;
  border: none !important;
  background: var(--app-accent) !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  font-size: 17px;
  padding: 0 !important;
  transition:
    background 0.15s,
    transform 0.1s !important;
  flex-shrink: 0 !important;
}
body.v3-ui #chat-send-btn:hover {
  background: var(--app-accent-hover) !important;
  transform: scale(1.07);
}
body.v3-ui #chat-send-btn:active {
  transform: scale(0.95);
}

/* Reply row: visible accent strip above composer */
body.v3-ui .reply-msg-row {
  background: var(--app-elevated) !important;
  border-left: 3px solid var(--app-accent) !important;
  border-radius: 0 6px 6px 0 !important;
  margin: 4px 12px 0 !important;
  padding: 6px 10px !important;
  font-size: 11px;
}
body.v3-ui .reply-msg-row.reply-msg-row-hide {
  display: none !important;
}

/* Attachments/emoji picker panel - floats above the editor bar,
   escaping any overflow:hidden on the parent flex chain */
body.v3-ui .attachments-container.gse-container {
  position: absolute !important;
  bottom: calc(100% + 4px) !important;
  left: 8px !important;
  right: 8px !important;
  width: auto !important;
  margin: 0 !important;
  z-index: 1200 !important;
  background: var(--app-elevated) !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 12px !important;
  padding: 10px !important;
  box-shadow:
    0 -8px 32px rgba(0, 0, 0, 0.22),
    0 2px 8px rgba(0, 0, 0, 0.1) !important;
  height: 368px;
  max-height: calc(100vh - 170px);
  overflow: hidden;
}

/* jQuery toggles the panel via inline display:none - only switch to a
   flex column while shown, so the tab bar stays pinned and a single inner
   region (.gif-content / .emoji-content) handles all scrolling */
body.v3-ui
  .attachments-container.gse-container:not([style*="display: none"]):not(
    [style*="display:none"]
  ) {
  display: flex !important;
  flex-direction: column !important;
}

body.v3-ui .attachments-container.gse-container .nav-pills {
  flex-shrink: 0;
}

body.v3-ui .attachments-container.gse-container .tab-content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.v3-ui .attachments-container.gse-container .tab-pane.active {
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
}

body.v3-ui .attachments-container.gse-container .emoji-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

body.v3-ui .attachments-container.gse-container .gif-content {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* The host .room-editor / .private-editor must be position:relative
   so the absolute gse-container anchors to it */
body.v3-ui .room-editor,
body.v3-ui .private-editor {
  position: relative !important;
  overflow: visible !important;
}

/* Non-chat-select, non-join states inside editor */
body.v3-ui #chat-editor .non-chat-select,
body.v3-ui #chat-editor .non-join-message,
body.v3-ui #chat-editor .permission-denied-editor,
body.v3-ui #chat-editor .user-restricted {
  padding: 12px !important;
  text-align: center;
  color: var(--app-text-muted);
  font-size: 11px;
}

/* Hide editor-controller only when restriction blocks are explicitly shown.
   Avoid matching hidden placeholders that exist in DOM (Android timing issue). */
body.v3-ui
  #chat-editor
  .non-chat-select[style*="display:block"]
  ~ .editor-container,
body.v3-ui
  #chat-editor
  .non-chat-select[style*="display: block"]
  ~ .editor-container,
body.v3-ui
  #chat-editor
  .non-chat-select[style*="display:flex"]
  ~ .editor-container,
body.v3-ui
  #chat-editor
  .non-chat-select[style*="display: flex"]
  ~ .editor-container,
body.v3-ui
  #chat-editor
  .non-join-message[style*="display:block"]
  ~ .editor-container,
body.v3-ui
  #chat-editor
  .non-join-message[style*="display: block"]
  ~ .editor-container,
body.v3-ui
  #chat-editor
  .non-join-message[style*="display:flex"]
  ~ .editor-container,
body.v3-ui
  #chat-editor
  .non-join-message[style*="display: flex"]
  ~ .editor-container,
body.v3-ui
  #chat-editor
  .permission-denied-editor[style*="display:block"]
  ~ .editor-container,
body.v3-ui
  #chat-editor
  .permission-denied-editor[style*="display: block"]
  ~ .editor-container,
body.v3-ui
  #chat-editor
  .permission-denied-editor[style*="display:flex"]
  ~ .editor-container,
body.v3-ui
  #chat-editor
  .permission-denied-editor[style*="display: flex"]
  ~ .editor-container,
body.v3-ui
  #chat-editor
  .user-restricted[style*="display:block"]
  ~ .editor-container,
body.v3-ui
  #chat-editor
  .user-restricted[style*="display: block"]
  ~ .editor-container,
body.v3-ui
  #chat-editor
  .user-restricted[style*="display:flex"]
  ~ .editor-container,
body.v3-ui
  #chat-editor
  .user-restricted[style*="display: flex"]
  ~ .editor-container {
  display: none !important;
}

/* Donation badge on chat message avatars */
body.v3-ui .cht .msg-avatar-wrap .msg-donation-badge {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.75);
}

/* - V3 Pane Visibility Overrides -
   Bootstrap .fade sets opacity:0 which makes panes invisible even when active.
   In v3 we own pane switching in JS, so we override Bootstrap's tab animation. */
body.v3-ui .app-main .app-tab-pane {
  display: none !important;
  opacity: 1 !important;
  transition: none !important;
}

body.v3-ui .app-main .app-tab-pane.active,
body.v3-ui .app-main .app-tab-pane.show {
  display: flex !important;
  flex: 1 !important;
  flex-direction: column !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

/* .fade class must not suppress active panes in v3 */
body.v3-ui .app-main .app-tab-pane.fade.active,
body.v3-ui .app-main .app-tab-pane.fade.show {
  display: flex !important;
  opacity: 1 !important;
}

/* Private editor must be a proper flex container so the moved #chat-editor
   fills it correctly when editorSwitch('private') moves it there */
body.v3-ui .private-editor {
  display: flex !important;
  flex-direction: column !important;
  flex: 0 0 auto !important;
}

/* Room editor same */
body.v3-ui .room-editor {
  display: flex !important;
  flex-direction: column !important;
  flex: 0 0 auto !important;
}

/* #chat-editor fills its host (room-editor or private-editor) */
body.v3-ui #chat-editor {
  width: 100% !important;
  flex: 0 0 auto !important;
}

/* Ensure .private-chat wrapper fills the private pane */
body.v3-ui #main-private .private-chat {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: var(--app-bg) !important;
}

body.v3-ui #main-private .private-chat .page-content-wrapper {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* -
   SIDEBAR + RIGHTBAR HEIGHT CHAIN - nuclear overrides
   Ensures lists never overflow under the statusbar in v3 layout.
   - */

body.v3-ui .app-sidebar {
  flex: 0 0 var(--sidebar-width) !important;
  min-height: 0 !important;
  max-height: 100% !important;
  height: auto !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

body.v3-ui .app-sidebar-content {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

body.v3-ui .app-sidebar-scroll {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: 0 !important; /* standard flex scroll trick */
  max-height: 100% !important;
}

body.v3-ui .app-layout .rightbar-wrapper {
  flex: 0 0 var(--rightbar-width) !important;
  min-height: 0 !important;
  max-height: 100% !important;
  height: auto !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

body.v3-ui .app-layout .rightbar-wrapper .user-list-panel {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

body.v3-ui .app-layout .rightbar-wrapper .height-scroll-rpanelx {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: 0 !important; /* flex scroll trick: child scrolls, not expands */
  max-height: 100% !important;
  position: static !important;
}

/* - Right Panel (user list) flex chain - */

/* Rightbar is already flex column from nuclear override - just ensure inner pieces fill it */
body.v3-ui .app-rightbar.rightbar-wrapper {
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
/* Only force visible when the tab matching that panel is active */
body.v3-ui:not([data-active-tab="private"]) #rightbar-wrapper-room,
body.v3-ui[data-active-tab="private"] #rightbar-wrapper-private {
  display: flex !important;
}
body.v3-ui[data-active-tab="private"] #rightbar-wrapper-room,
body.v3-ui:not([data-active-tab="private"]) #rightbar-wrapper-private {
  display: none !important;
}
/* Hide both rightbars only on legacy non-chat tabs */
body.v3-ui[data-active-tab="manage"] #rightbar-wrapper-room,
body.v3-ui[data-active-tab="manage"] #rightbar-wrapper-private,
body.v3-ui[data-active-tab="explore"] #rightbar-wrapper-room,
body.v3-ui[data-active-tab="explore"] #rightbar-wrapper-private {
  display: none !important;
}

@media (max-width: 992px) {
  body.v3-ui[data-active-tab="private"] #rightbar-wrapper-private,
  body.v3-ui:not([data-active-tab="private"]) #rightbar-wrapper-room,
  body.v3-ui #rightbar-wrapper-room,
  body.v3-ui #rightbar-wrapper-private {
    display: none !important;
    position: absolute !important;
    top: var(--topbar-height, 46px) !important;
    right: 0 !important;
    left: auto !important;
    bottom: var(
      --mobile-bottom-nav-visible-height,
      calc(61px + (env(safe-area-inset-bottom, 0px) * 2))
    ) !important;
    width: clamp(300px, 88vw, 380px) !important;
    min-width: clamp(300px, 88vw, 380px) !important;
    max-width: clamp(300px, 88vw, 380px) !important;
    max-height: calc(
      100dvh - var(--topbar-height, 46px) -
        var(
          --mobile-bottom-nav-visible-height,
          calc(61px + (env(safe-area-inset-bottom, 0px) * 2))
        )
    ) !important;
    z-index: 150 !important;
    border-left: 1px solid var(--app-border) !important;
    box-shadow: -10px 0 28px rgba(2, 6, 23, 0.5) !important;
    border-radius: 0 0 0 12px;
  }

  body.v3-ui .mobile-right-sheet-handle {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 20px;
    border: 0;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    background: rgba(10, 22, 40, 0.94);
    padding: 0;
    margin: 0;
    cursor: pointer;
  }

  body.v3-ui .mobile-right-sheet-handle-bar {
    display: block;
    width: 34px;
    height: 4px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.7);
  }

  body.v3-ui .mobile-right-sheet-handle:active .mobile-right-sheet-handle-bar,
  body.v3-ui
    .mobile-right-sheet-handle:focus-visible
    .mobile-right-sheet-handle-bar {
    background: rgba(191, 219, 254, 0.95);
  }

  body.v3-ui.sb-rightnav-toggled[data-mobile-right-context="room"]
    #rightbar-wrapper-room,
  body.v3-ui.sb-rightnav-toggled[data-mobile-right-context="private"]
    #rightbar-wrapper-private,
  body.v3-ui.sb-rightnav-toggled:not([data-mobile-right-context])
    #rightbar-wrapper-room {
    display: flex !important;
  }

  body.v3-ui #rightbar-wrapper-private .user-info-panel {
    padding: 12px 10px !important;
    gap: 10px !important;
    overscroll-behavior: contain;
  }

  body.v3-ui #rightbar-wrapper-private .meta-item {
    padding: 7px 10px;
  }

  body.v3-ui #rightbar-wrapper-private .user-profile-actions {
    gap: 5px;
    padding: 8px 10px;
  }

  body.v3-ui #rightbar-wrapper-private .action-btn {
    min-width: calc(50% - 3px);
    flex: 1 1 calc(50% - 3px);
    padding: 7px 6px;
    font-size: 10px;
    min-height: 44px;
  }

  body.v3-ui #rightbar-wrapper-private .action-btn-primary,
  body.v3-ui #rightbar-wrapper-private .action-btn-danger {
    flex: 1 1 100%;
    min-width: 100%;
  }

  body.v3-ui #rightbar-wrapper-private .action-btn-secondary,
  body.v3-ui #rightbar-wrapper-private .report-user.action-btn {
    flex: 1 1 calc(50% - 3px);
    min-width: calc(50% - 3px);
  }

  /* Mobile drawer layout: handle, header and gender filter are fixed
     (non-scrolling) rows; ONLY the member list scrolls — same model as
     desktop. Previously the whole drawer scrolled with sticky header/filter
     layered on top, and the rows kept sliding visibly under/between them
     (sticky offsets never matched the real heights). With the list as the
     sole scroll area nothing can scroll under the header anymore. */
  body.v3-ui #rightbar-wrapper-room {
    overflow: hidden !important;
  }

  body.v3-ui #rightbar-wrapper-room .mobile-right-sheet-handle {
    position: relative;
    flex: 0 0 auto;
  }

  body.v3-ui #rightbar-wrapper-room .v3-rpanel {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.v3-ui #rightbar-wrapper-room .v3-rpanel-head,
  body.v3-ui #rightbar-wrapper-room .v3-gender-filter {
    position: relative;
    flex: 0 0 auto;
    z-index: 2;
    background: rgba(10, 22, 40, 0.96);
  }

  body.v3-ui #rightbar-wrapper-room .v3-gender-filter {
    border-bottom: 1px solid var(--app-border);
  }

  body.v3-ui #rightbar-wrapper-room .v3-userlist-wrap {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.v3-ui
    #rightbar-wrapper-room
    .v3-userlist-wrap
    .user-list-content.height-scroll-rpanelx {
    flex: 1 1 0% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
}

@media (max-width: 576px) {
  body.v3-ui #rightbar-wrapper-room,
  body.v3-ui #rightbar-wrapper-private {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 0;
  }

  body.v3-ui #rightbar-wrapper-private .private-user-name {
    font-size: 13px;
  }

  body.v3-ui #rightbar-wrapper-private .meta-label {
    font-size: 9px;
  }

  body.v3-ui #rightbar-wrapper-private .meta-value {
    font-size: 12px;
  }
}

/* - Compact right panel (v3-rpanel) - */
body.v3-ui .v3-rpanel {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* Header row: title + count + search */
body.v3-ui .v3-rpanel-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 5px;
  border-bottom: 1px solid var(--app-border);
}

body.v3-ui .v3-rpanel-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--app-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Search input - grows to fill remaining space */
body.v3-ui .v3-rpanel-search {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--app-elevated);
  border: 1px solid var(--app-border);
  border-radius: 6px;
  padding: 3px 8px;
  min-width: 0;
}
body.v3-ui .v3-rpanel-search i {
  font-size: 12px;
  color: var(--app-text-muted);
  flex-shrink: 0;
}
body.v3-ui .v3-rpanel-search .room-user-search {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 12px;
  color: var(--app-text);
  min-width: 0;
  padding: 0;
}
body.v3-ui .v3-rpanel-search .room-user-search::placeholder {
  color: var(--app-text-muted);
}

/* Filter chips row - hidden, removed from template */
body.v3-ui .v3-rpanel-filters {
  display: none !important;
}
body.v3-ui .v3-rpanel-filters .user-filter-chip {
  flex: 1;
  background: transparent;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  color: var(--app-text-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 6px;
  cursor: pointer;
  text-align: center;
  transition:
    background 0.12s,
    color 0.12s,
    border-color 0.12s;
  white-space: nowrap;
}
body.v3-ui .v3-rpanel-filters .user-filter-chip:hover {
  background: var(--app-hover);
  color: var(--app-text);
  border-color: var(--app-text-muted);
}
body.v3-ui .v3-rpanel-filters .user-filter-chip.active {
  background: var(--app-accent);
  color: #fff;
  border-color: var(--app-accent);
}

body.v3-ui .user-list-panel {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

body.v3-ui .right-panel-section {
  display: none;
  flex: 1 1 0%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 100;
}
body.v3-ui .right-panel-section.active {
  display: flex;
  z-index: 200;
}

body.v3-ui .height-scroll-rpanelx {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  height: 0 !important; /* flex scroll trick */
  max-height: 100% !important;
  position: static !important;
}

body.v3-ui .user-list-card {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

body.v3-ui .user-list-content {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* sidebar-explore must never take flex space */
body.v3-ui #sidebar-explore {
  flex: 0 0 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  display: none !important;
}

body.v3-ui .user-list-compact-header {
  flex: 0 0 auto;
  padding: 10px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--app-text-muted);
}

body.v3-ui .user-list-content {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 4px 8px;
}

body.v3-ui .user-list-empty {
  flex: 0 0 auto;
  padding: 16px;
  text-align: center;
  color: var(--app-text-muted);
  font-size: 12px;
}

/* - Topbar dropdowns always on top - */
body.v3-ui .app-topbar .dropdown-menu {
  z-index: 9999 !important;
  position: absolute !important;
}

/* - v3 profile trigger button - */
body.v3-ui .app-topbar-profile-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--app-text);
  transition: background 0.15s;
  height: 100%;
  max-height: 40px;
}
body.v3-ui .app-topbar-profile-trigger:hover {
  background: var(--app-elevated);
}

/* Avatar wrapper */
body.v3-ui .app-topbar-profile-avatar {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
body.v3-ui .app-topbar-profile-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
body.v3-ui .app-topbar-profile-fallback {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--app-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--app-text-muted);
}
body.v3-ui .app-topbar-profile-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--app-topbar, var(--app-base));
  font-size: 0;
  line-height: 0;
}
body.v3-ui .app-topbar-profile-dot i {
  display: none;
}

/* Name + caret */
body.v3-ui .app-topbar-profile-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--app-text);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Gender-colored usernames in the topbar profile button */
body.v3-ui .app-topbar-profile-name.username-gender-male {
  color: #2196f3 !important;
}
body.v3-ui .app-topbar-profile-name.username-gender-female {
  color: #f06595 !important;
}
body.v3-ui .app-topbar-profile-name.username-gender-trans {
  color: #c026d3 !important;
}
body.v3-ui .app-topbar-profile-name.username-gender-couple {
  color: #22c55e !important;
}
body.v3-ui .app-topbar-profile-name.username-gender-other {
  color: #14b8a6 !important;
}
body.v3-ui .app-topbar-profile-name.username-gender-admin {
  color: #ff8c00 !important;
}
body.v3-ui .app-topbar-profile-name.username-gender-unknown {
  color: var(--app-text) !important;
}

body.v3-ui .app-topbar-profile-caret {
  font-size: 11px;
  color: var(--app-text-muted);
  flex-shrink: 0;
}

/* - Profile dropdown menu - */
body.v3-ui .app-topbar-profile-menu {
  min-width: 220px;
  padding: 4px 0;
  border-radius: 10px;
  border: 1px solid var(--app-border);
  background: var(--app-sidebar);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu {
  /* Let Bootstrap/Popper position this as a normal dropdown (absolute, below trigger) */
  position: absolute !important;
  width: min(420px, calc(100vw - 28px));
  min-width: 360px;
  max-width: 420px;
  margin-top: 6px !important;
  background: var(--app-sidebar) !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42) !important;
  padding: 0 !important;
  overflow: hidden;
  /* Remove any transform override so Popper can position correctly */
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .card,
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .card-header,
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .card-body.notifications {
  background: transparent !important;
  color: var(--app-text) !important;
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .card-header {
  border-bottom: 1px solid var(--app-border);
  padding: 10px 12px;
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .card-body.notifications {
  max-height: min(420px, calc(100vh - 88px));
  overflow-y: auto;
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .notification-list {
  padding: 8px;
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .noti-item {
  margin: 0 0 8px 0 !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(96, 165, 250, 0.34) !important;
  background: rgba(37, 99, 235, 0.14) !important;
  transition:
    background 0.14s ease,
    border-color 0.14s ease;
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .noti-item:last-child {
  margin-bottom: 0 !important;
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .noti-item.noti-item-modern {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .noti-icon
  .avatar,
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .noti-icon
  img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .noti-item-media {
  flex: 0 0 auto;
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .noti-item-body {
  flex: 1 1 auto;
  min-width: 0;
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .noti-item.noti-read {
  background: rgba(15, 23, 42, 0.46) !important;
  border-color: rgba(148, 163, 184, 0.26) !important;
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .noti-item:hover {
  background: rgba(59, 130, 246, 0.2) !important;
  border-color: rgba(96, 165, 250, 0.46) !important;
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .noti-content {
  color: #e5edff !important;
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .noti-time {
  color: #93c5fd !important;
}
body.v3-ui
  .app-topbar
  .desktop-notification-dropdown
  > .dropdown-menu.notifications-panel-card.notifications-panel-menu
  .notification-list
  .alert {
  margin: 8px !important;
}

body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu {
  position: fixed;
  width: min(360px, calc(100vw - 24px));
  min-width: 300px;
  max-width: 360px;
  background: var(--app-sidebar) !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42) !important;
  padding: 0 !important;
  overflow: hidden;
  transform: none !important;
  z-index: 12050;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu[hidden] {
  display: none !important;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .card,
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .card-header,
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .card-body.notifications {
  background: transparent !important;
  color: var(--app-text) !important;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .card-header {
  border-bottom: 1px solid var(--app-border);
  padding: 10px 12px;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .notifications-panel-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .notifications-panel-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0 !important;
  border-radius: 7px;
  color: #93c5fd !important;
  text-decoration: none !important;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .notifications-panel-tool:hover,
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .notifications-panel-tool:focus {
  background: rgba(59, 130, 246, 0.22) !important;
  color: #dbeafe !important;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .notifications-panel-tool
  i {
  font-size: 16px;
  line-height: 1;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .card-body.notifications {
  max-height: min(420px, calc(100vh - 88px));
  overflow-y: auto;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .notification-list {
  padding: 8px;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .noti-item {
  margin: 0 0 8px 0 !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(96, 165, 250, 0.34) !important;
  background: rgba(37, 99, 235, 0.14) !important;
  transition:
    background 0.14s ease,
    border-color 0.14s ease;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .noti-item:last-child {
  margin-bottom: 0 !important;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .noti-item.noti-item-modern {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .noti-icon
  .avatar,
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .noti-icon
  img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .noti-item-media {
  flex: 0 0 auto;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .noti-item-body {
  flex: 1 1 auto;
  min-width: 0;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .noti-item.noti-read {
  background: rgba(15, 23, 42, 0.46) !important;
  border-color: rgba(148, 163, 184, 0.26) !important;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .noti-item:hover {
  background: rgba(59, 130, 246, 0.2) !important;
  border-color: rgba(96, 165, 250, 0.46) !important;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .noti-content {
  color: #e5edff !important;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .noti-time {
  color: #93c5fd !important;
}
body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu
  .notification-list
  .alert {
  margin: 8px !important;
}
@media (max-width: 1240px) {
  body.v3-ui .app-topbar-btn.topbar-shortcut--notifications {
    min-width: auto;
  }
}

/* Header block */
body.v3-ui .v3-profile-menu-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px;
}
body.v3-ui .v3-profile-menu-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
body.v3-ui .v3-profile-menu-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
body.v3-ui .v3-profile-menu-status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--app-sidebar);
  font-size: 0;
  line-height: 0;
}
body.v3-ui .v3-profile-menu-status-dot i {
  display: none;
}
body.v3-ui .v3-profile-menu-meta {
  min-width: 0;
}
body.v3-ui .v3-profile-menu-meta strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--app-text-primary, #fff);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.v3-ui .v3-profile-menu-meta small {
  display: block;
  font-size: 11px;
  color: var(--app-text-muted);
}

/* Status dot colours - dots use background, menu items use color */
body.v3-ui .v3-profile-menu-status-dot.online,
body.v3-ui .app-topbar-profile-dot.online {
  background-color: #3ba55d;
}
body.v3-ui .v3-profile-menu-status-dot.offline,
body.v3-ui .app-topbar-profile-dot.offline {
  background-color: #747f8d;
}
body.v3-ui .v3-profile-menu-status-dot.busy,
body.v3-ui .app-topbar-profile-dot.busy {
  background-color: #ed4245;
}
body.v3-ui .v3-profile-menu-status-dot.away,
body.v3-ui .app-topbar-profile-dot.away {
  background-color: #faa61a;
}
/* Status icon colours inside menu items */
body.v3-ui .app-topbar-profile-menu .dropdown-item .online {
  color: #3ba55d;
}
body.v3-ui .app-topbar-profile-menu .dropdown-item .offline {
  color: #747f8d;
}
body.v3-ui .app-topbar-profile-menu .dropdown-item .busy {
  color: #ed4245;
}
body.v3-ui .app-topbar-profile-menu .dropdown-item .away {
  color: #faa61a;
}

/* Dropdown items */
body.v3-ui .app-topbar-profile-menu .dropdown-item {
  font-size: 13px;
  padding: 7px 14px;
  color: var(--app-text);
  border-radius: 0;
  transition: background 0.1s;
}
body.v3-ui .app-topbar-profile-menu .dropdown-item:hover,
body.v3-ui .app-topbar-profile-menu .dropdown-item:focus {
  background: var(--app-elevated);
  color: var(--app-text-primary, #fff);
}
body.v3-ui .app-topbar-profile-menu .dropdown-item.text-danger {
  color: #ed4245 !important;
}
body.v3-ui .app-topbar-profile-menu .dropdown-item.text-danger:hover {
  background: rgba(237, 66, 69, 0.1);
  color: #ed4245 !important;
}
/* Keep logout visible at top inside desktop profile dropdown */
body.v3-ui .app-topbar-profile-menu .topbar-logout-item {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--app-surface, #1e293b);
  border-bottom: 1px solid var(--app-border, rgba(255, 255, 255, 0.12));
  font-weight: 700;
}
body.v3-ui .app-topbar-profile-menu .topbar-logout-item:hover,
body.v3-ui .app-topbar-profile-menu .topbar-logout-item:focus {
  background: rgba(237, 66, 69, 0.16);
}
body.v3-ui .app-topbar-profile-menu .dropdown-divider {
  border-color: var(--app-border);
  margin: 4px 0;
}

/* - v3 topbar UI switch button - */
body.v3-ui .app-topbar-ui-switch-btn {
  background: linear-gradient(
    135deg,
    rgba(88, 101, 242, 0.22),
    rgba(88, 101, 242, 0.1)
  ) !important;
  border: 1px solid rgba(88, 101, 242, 0.4) !important;
  color: #c9cdfb !important;
  border-radius: 6px !important;
}
body.v3-ui .app-topbar-ui-switch-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(88, 101, 242, 0.38),
    rgba(88, 101, 242, 0.2)
  ) !important;
  color: #e0e2ff !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   V3 USER LIST — Modern redesign, chest-palette (deep indigo + violet)
   ═══════════════════════════════════════════════════════════════════════════ */

body.v3-ui .v3-userlist-wrap {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  overflow: hidden;
}

/* v3-userlist-header removed - replaced by v3-rpanel-head */

body.v3-ui .v3-userlist-count {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  color: rgba(167, 139, 250, 0.8);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}

/* The scroll container is now .height-scroll-rpanelx on .user-list-content */
body.v3-ui .v3-userlist-wrap .user-list-content.height-scroll-rpanelx {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: 0 !important;
  max-height: 100% !important;
  position: static !important;
  display: block !important; /* user rows are block, not flex children */
  padding: 0 4px 12px;
  /* Render stability: isolate repaints so DOM re-renders don't flicker the panel */
  contain: layout style;
  will-change: contents;
  /* Smooth scrollbar so list jumps are less jarring */
  scroll-behavior: auto;
  overscroll-behavior: contain;
}

/* Stabilise the right panel column itself - prevent width jitter during re-render */
body.v3-ui .app-layout .rightbar-wrapper {
  contain: layout style size;
  /* GPU layer: compositing isolation so list repaints don't affect other columns */
  transform: translateZ(0);
}

/* Prevent the title bar count badge from bouncing layout on number change */
body.v3-ui .user-list-title-label,
body.v3-ui .user-list-count-badge,
body.v3-ui .v3-userlist-count {
  display: inline-block;
  min-width: 20px;
  text-align: center;
}

/* ── Role group header (Discord-style) ──────────────────────────────────── */
body.v3-ui .v3-role-header {
  padding: 8px 8px 2px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(167, 139, 250, 0.55);
  user-select: none;
}

/* ════════════════════════════════════════════════════════════════════════════
   User list — card + collapsible action panel
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Row wrapper: block so panel sits underneath ── */
body.v3-ui .user-list-content .user-row {
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.08) !important;
  background: rgba(15, 23, 42, 0.35) !important;
  padding: 0 !important;
  margin-bottom: 4px;
  cursor: pointer;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  transition:
    background-color 0.15s,
    border-color 0.15s;
  overflow: hidden; /* keeps panel inside rounded corners */
}
body.v3-ui .user-list-content .user-row:hover,
body.v3-ui .user-list-content .user-row:focus {
  background: rgba(30, 41, 59, 0.55) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  box-shadow: none !important;
  transform: none !important;
}

/* ── Visible card (avatar + info + chevron) ── */
body.v3-ui .user-list-content .ulm-card {
  position: relative; /* anchors the absolute status dot */
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  min-height: 46px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
body.v3-ui .user-list-content .user-row:hover .ulm-card {
  background: transparent !important;
}
body.v3-ui .user-list-content .user-row.ulm-open {
  border-color: rgba(139, 92, 246, 0.3) !important;
}
body.v3-ui .user-list-content .user-row.ulm-open .ulm-card {
  background: transparent !important;
}

/* ── Avatar wrap (UserListManager right-panel rows) ── */
body.v3-ui .user-list-content .ulm-avatar-wrap {
  position: relative; /* establishes stacking context for the dot */
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  /* isolate stacking so z-index on the dot beats the avatar img */
  isolation: isolate;
}
/* v3-avatar-wrap fills the slot; overflow:hidden clips the avatar photo to a circle */
body.v3-ui .user-list-content .ulm-row .ulm-avatar-wrap .v3-avatar-wrap {
  width: 36px;
  height: 36px;
}
body.v3-ui .user-list-content .ulm-row .ulm-avatar-wrap .user-list-avatar {
  width: 36px;
  height: 36px;
}
/* Status dot — anchored to the top-left corner of .ulm-card.
   The card is position:relative; the dot floats over it, not inside the avatar. */
body.v3-ui .user-list-content .ulm-card > .avatar-online-status {
  position: absolute;
  top: 5px;
  left: 5px;
  bottom: auto;
  right: auto;
  z-index: 10;
  pointer-events: none;
}
/* Also remove any lingering dot that may still be inside the avatar wrap */
body.v3-ui .user-list-content .ulm-avatar-wrap > .avatar-online-status {
  display: none;
}

/* Donation tier icon — tiny emoji pinned top-right of the avatar wrap */
body.v3-ui .user-list-content .ulm-avatar-wrap .ulm-tier-icon {
  position: absolute;
  top: -2px;
  right: -3px;
  font-size: 11px;
  line-height: 1;
  z-index: 11;
  pointer-events: none;
  /* Slight drop-shadow so the emoji reads on all backgrounds */
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.55));
}
/* Hide when empty so no space is reserved */
body.v3-ui .user-list-content .ulm-avatar-wrap .ulm-tier-icon:empty {
  display: none;
}
/* The actual badge PNG inside the tier icon span or template avatar badge */
body.v3-ui
  .user-list-content
  .ulm-avatar-wrap
  .ulm-tier-icon
  .ulm-tier-badge-img,
body.v3-ui .user-list-content .ulm-avatar-wrap .ulm-donor-avatar-badge {
  display: block;
  width: 17px !important;
  height: 17px !important;
  object-fit: contain;
}
body.v3-ui .user-list-content .ulm-avatar-wrap .ulm-donor-avatar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 12;
  pointer-events: none;
}

/* Flat clean VIP rows in user lists (no inner dark box / shadow) */
body.v3-ui
  .user-list-content
  .user-row[data-user-is-donor]:not([data-user-is-donor=""])
  .ulm-card {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Sleek inline VIP pill next to usernames in user lists & chat messages */
.ulm-vip-pill,
.msg-vip-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 5px 1px 4px;
  margin-left: 4px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.22),
    rgba(217, 119, 6, 0.14)
  );
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a !important;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  vertical-align: middle;
  flex-shrink: 0;
}
.ulm-vip-pill img,
.msg-vip-pill img {
  width: 11px !important;
  height: 11px !important;
  object-fit: contain;
  display: inline-block;
}

/* ── UserListManager sections ── */
body.v3-ui .user-list-content .ulm-section {
  margin-bottom: 6px;
}
body.v3-ui .user-list-content .ulm-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-text-muted, #94a3b8);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}
body.v3-ui .user-list-content .ulm-section-header:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--app-text, #e2e8f0);
}
body.v3-ui .user-list-content .ulm-section-label {
  flex: 1 1 auto;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 5px;
}
/* Badge PNG inside the section header label */
body.v3-ui .user-list-content .ulm-section-label .ulm-section-badge-img {
  display: inline-block;
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
}
body.v3-ui .user-list-content .ulm-section-chevron {
  font-size: 11px;
  opacity: 0.7;
}
body.v3-ui .user-list-content .ulm-section-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 0;
}
body.v3-ui .user-list-content .ulm-section-collapsed .ulm-section-body {
  display: none;
}

/* ── UserListManager row ── */
body.v3-ui .user-list-content .ulm-row {
  position: relative; /* status dot is absolute-positioned inside the card */
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
}
body.v3-ui .user-list-content .ulm-load-more-wrap {
  padding: 10px 10px 28px;
}
body.v3-ui .user-list-content .ulm-load-more-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.65);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}
body.v3-ui .user-list-content .ulm-load-more-btn:hover {
  background: rgba(51, 65, 85, 0.85);
  border-color: rgba(148, 163, 184, 0.4);
}
body.v3-ui .user-list-content .ulm-row:hover {
  background: rgba(124, 58, 237, 0.09);
}
body.v3-ui .user-list-content .ulm-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--app-text, #e2e8f0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}
body.v3-ui .user-list-content .ulm-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
}
body.v3-ui .user-list-content .ulm-badge-admin {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}
body.v3-ui .user-list-content .ulm-badge-mod {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}
body.v3-ui .user-list-content .ulm-badge-vip {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

/* ── Info block ── */
/* ── ULM info column: stacks 3 rows vertically ── */
body.v3-ui .user-list-content .ulm-info {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Row 1 — name + inline badges */
body.v3-ui .user-list-content .ulm-name-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  line-height: 1.2;
  min-width: 0;
}
body.v3-ui .user-list-content .ulm-name-row .channel-user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
}
body.v3-ui .user-list-content .ulm-verified {
  font-size: 11px;
  color: #22c55e;
  flex-shrink: 0;
}
body.v3-ui .user-list-content .ulm-muted {
  font-size: 11px;
  color: rgba(167, 139, 250, 0.45);
  flex-shrink: 0;
}
body.v3-ui .user-list-content .ulm-blocked {
  font-size: 11px;
  flex-shrink: 0;
}

/* Row 2 — meta chips (city, age) */
body.v3-ui .user-list-content .ulm-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
body.v3-ui .user-list-content .ulm-sub-meta {
  flex-wrap: nowrap;
  overflow: hidden;
}

/* Row 3 — about/preview text */
body.v3-ui .user-list-content .ulm-sub-preview {
  min-width: 0;
}
body.v3-ui .user-list-content .ulm-preview-text {
  display: block;
  font-size: 10.5px;
  font-style: italic;
  color: var(--app-text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
}

/* ── Info chips (city, age) ── */
body.v3-ui .user-list-content .ulm-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  border-radius: 20px;
  padding: 1px 6px 1px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  line-height: 1.6;
  max-width: 110px;
}
body.v3-ui .user-list-content .ulm-chip i {
  font-size: 9px;
  flex-shrink: 0;
}

/* City chip — purple tint */
body.v3-ui .user-list-content .ulm-chip-city {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.22);
  color: #c4b5fd;
}
body.v3-ui .user-list-content .ulm-chip-city i {
  color: #a78bfa;
}

/* Age chip — teal/cyan tint */
body.v3-ui .user-list-content .ulm-chip-age {
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.2);
  color: #5eead4;
}
body.v3-ui .user-list-content .ulm-chip-age i {
  color: #2dd4bf;
}

/* ── Chevron ── */
body.v3-ui .user-list-content .ulm-chevron {
  flex-shrink: 0;
  font-size: 13px;
  color: rgba(167, 139, 250, 0.35);
  margin-left: auto;
  transition:
    transform 0.2s ease,
    color 0.15s;
}
body.v3-ui .user-list-content .user-row:hover .ulm-chevron {
  color: rgba(167, 139, 250, 0.65);
}
body.v3-ui .user-list-content .user-row.ulm-open .ulm-chevron {
  transform: rotate(180deg);
  color: #a78bfa;
}

/* ── Avatar container ───────────────────────────────────────────────────── */
body.v3-ui .user-list-content .channel-user-image {
  position: relative;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
}
body.v3-ui .user-list-content .user-list-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* ── Letter Avatar System ───────────────────────────────────────────────── */
body.v3-ui .v3-avatar-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(124, 58, 237, 0.18);
  border: 1.5px solid rgba(139, 92, 246, 0.25);
  transition: border-color 0.13s ease;
}
body.v3-ui .user-list-content .user-row:hover .v3-avatar-wrap {
  border-color: rgba(139, 92, 246, 0.5);
}
/* Letter via ::before */
body.v3-ui .v3-avatar-wrap::before {
  content: attr(data-initial);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #c4b5fd;
  text-transform: uppercase;
  z-index: 0;
  pointer-events: none;
}
/* Real photo sits on top */
body.v3-ui .v3-avatar-wrap .user-list-avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  z-index: 1;
  background: transparent;
}
/* Letter-only mode */
body.v3-ui .v3-avatar-wrap[data-letter-avatar="1"] .user-list-avatar {
  display: none !important;
}
body.v3-ui .v3-avatar-wrap[data-letter-avatar="1"]::before {
  color: #fff;
}
/* Male */
body.v3-ui .v3-avatar-wrap[data-letter-avatar="1"][data-sex="m"] {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-color: rgba(96, 165, 250, 0.35);
}
/* Female */
body.v3-ui .v3-avatar-wrap[data-letter-avatar="1"][data-sex="f"] {
  background: linear-gradient(135deg, #9d174d, #be185d);
  border-color: rgba(244, 114, 182, 0.35);
}
/* Fallback */
body.v3-ui .v3-avatar-wrap[data-letter-avatar="1"] {
  background: linear-gradient(135deg, #4c1d95, #6d28d9);
}

/* ── Online status dot ──────────────────────────────────────────────────── */
body.v3-ui .user-list-content .avatar-online-status {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--app-sidebar, #0f1120);
  background: #475569;
  font-size: 0;
  line-height: 0;
}
body.v3-ui .user-list-content .avatar-online-status i {
  display: none;
}
body.v3-ui .user-list-content .avatar-online-status.online {
  background: #22c55e;
  box-shadow: 0 0 5px rgba(34, 197, 94, 0.55);
}
body.v3-ui .user-list-content .avatar-online-status.away {
  background: #fbbf24;
}
body.v3-ui .user-list-content .avatar-online-status.dnd {
  background: #ef4444;
}
body.v3-ui .user-list-content .avatar-online-status.offline {
  background: #475569;
}

/* ── User details ───────────────────────────────────────────────────────── */
body.v3-ui .user-list-content .channel-user-details {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  justify-content: center;
}
body.v3-ui .user-list-content .channel-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #c4b5fd;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
  transition: color 0.12s ease;
}
body.v3-ui .user-list-content .user-row:hover .channel-user-name {
  color: #ede9fe;
}
body.v3-ui .user-list-content .user-status {
  font-size: 11px;
  color: rgba(167, 139, 250, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}
body.v3-ui .user-list-content .user-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Inline badges ──────────────────────────────────────────────────────── */
body.v3-ui .user-list-content .guest-user-badge--inline,
body.v3-ui .user-list-content .user-role-badge,
body.v3-ui .user-list-content .verified-user-icon-inline {
  font-size: 9px;
  flex-shrink: 0;
}

/* ── Donation badge on avatar ───────────────────────────────────────────── */
/* Applies everywhere the userItemTemplate renders (room userlist AND
   the private beskeder sidebar), since both use `.ulm-avatar-wrap`. */
body.v3-ui .ulm-avatar-wrap {
  position: relative;
}

/* - Profile Frame - Message & User-list Glow - */
/* Soft glow on chat message bubbles and user-list rows.                      */
/* The old avatar ring (.pf-ring) is kept for profile panels.                 */

/* - Profile Frame Glow -
   BOTH chat bubble and user-row use filter:drop-shadow animated on the element.
   Why filter and not box-shadow/outline:
     - box-shadow is clipped by parent overflow:hidden (the scroll container has it)
     - outline is clipped by overflow in scroll containers per CSS spec
     - filter:drop-shadow is composited separately - never clipped by overflow  */

/* - Fix scroll container so filter glow isn't clipped on X axis - */
body.v3-ui .height-scroll-rpanelx {
  overflow-x: visible !important;
}
body.v3-ui .app-layout .rightbar-wrapper .height-scroll-rpanelx {
  overflow-x: visible !important;
}
body.v3-ui .v3-userlist-wrap .user-list-content.height-scroll-rpanelx {
  overflow-x: visible !important;
}
body.v3-ui .user-list-content {
  overflow-x: visible !important;
}
body.v3-ui .user-presence-group-body {
  overflow: visible !important;
}

/* - Chat bubble glow - */
body.v3-ui .message-data.pf-msg-glow--frame_gold,
.message-data.pf-msg-glow--frame_gold {
  animation: none !important;
  filter: drop-shadow(0 0 5px rgba(245, 197, 24, 0.32))
    drop-shadow(0 0 1px rgba(245, 197, 24, 0.36)) !important;
}
body.v3-ui .message-data.pf-msg-glow--frame_neon,
.message-data.pf-msg-glow--frame_neon {
  animation: none !important;
  filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.3))
    drop-shadow(0 0 1px rgba(123, 47, 255, 0.34)) !important;
}
body.v3-ui .message-data.pf-msg-glow--frame_cosmic,
.message-data.pf-msg-glow--frame_cosmic {
  animation: none !important;
  filter: drop-shadow(0 0 5px rgba(192, 46, 255, 0.3))
    drop-shadow(0 0 1px rgba(79, 70, 229, 0.34)) !important;
}

/* - User-row glow - same keyframes, same technique */
body.v3-ui .user-list-content .user-row.pf-msg-glow--frame_gold {
  animation: none !important;
  filter: drop-shadow(0 0 5px rgba(245, 197, 24, 0.32))
    drop-shadow(0 0 1px rgba(245, 197, 24, 0.36)) !important;
}
body.v3-ui .user-list-content .user-row.pf-msg-glow--frame_neon {
  animation: none !important;
  filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.3))
    drop-shadow(0 0 1px rgba(123, 47, 255, 0.34)) !important;
}
body.v3-ui .user-list-content .user-row.pf-msg-glow--frame_cosmic {
  animation: none !important;
  filter: drop-shadow(0 0 5px rgba(192, 46, 255, 0.3))
    drop-shadow(0 0 1px rgba(79, 70, 229, 0.34)) !important;
}
/* Cancel the box-shadow:none override on dropdown.show rows for glow rows */
body.v3-ui .user-list-content .user-row.dropdown.show.pf-msg-glow--frame_gold,
body.v3-ui .user-list-content .user-row.dropdown.show.pf-msg-glow--frame_neon,
body.v3-ui
  .user-list-content
  .user-row.dropdown.show.pf-msg-glow--frame_cosmic {
  animation: none !important;
}
body.v3-ui .user-list-content .user-row.dropdown.show.pf-msg-glow--frame_neon {
  animation: none !important;
}
body.v3-ui
  .user-list-content
  .user-row.dropdown.show.pf-msg-glow--frame_cosmic {
  animation: none !important;
}

/* - Shared keyframes - */
@keyframes pf-glow-gold {
  0%,
  100% {
    filter: drop-shadow(0 0 3px rgba(245, 197, 24, 0.18))
      drop-shadow(0 0 1px rgba(245, 197, 24, 0.22));
  }
  50% {
    filter: drop-shadow(0 0 6px rgba(245, 197, 24, 0.38))
      drop-shadow(0 0 2px rgba(245, 197, 24, 0.44));
  }
}
@keyframes pf-glow-neon {
  from {
    filter: drop-shadow(0 0 3px rgba(0, 240, 255, 0.18))
      drop-shadow(0 0 1px rgba(0, 240, 255, 0.24));
  }
  to {
    filter: drop-shadow(0 0 6px rgba(123, 47, 255, 0.38))
      drop-shadow(0 0 2px rgba(123, 47, 255, 0.44));
  }
}
@keyframes pf-glow-cosmic {
  0%,
  100% {
    filter: drop-shadow(0 0 3px rgba(192, 46, 255, 0.18))
      drop-shadow(0 0 1px rgba(192, 46, 255, 0.24));
  }
  50% {
    filter: drop-shadow(0 0 6px rgba(79, 70, 229, 0.38))
      drop-shadow(0 0 2px rgba(79, 70, 229, 0.44));
  }
}

/* - Profile Frame System - */
/* Base layer: the frame pseudo-element sits inside .v3-avatar-wrap          */

/* Frame host: the avatar wrapper must be positioned so the ring can overlay */
.pf-avatar-host {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* The ring element (.pf-ring) is injected by JS inside .v3-avatar-wrap      */
.pf-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}

/* Gold frame */
.pf-ring--gold {
  background: conic-gradient(#f5c518, #ffd700, #e6a817, #ffd700, #f5c518);
  box-shadow: 0 0 8px 2px rgba(245, 197, 24, 0.55);
  animation: pf-gold-pulse 3s ease-in-out infinite;
}
@keyframes pf-gold-pulse {
  0%,
  100% {
    box-shadow: 0 0 8px 2px rgba(245, 197, 24, 0.55);
  }
  50% {
    box-shadow: 0 0 14px 4px rgba(245, 197, 24, 0.85);
  }
}

/* Neon frame */
.pf-ring--neon {
  background: conic-gradient(#00f0ff, #00bfff, #7b2fff, #00f0ff);
  box-shadow: 0 0 10px 3px rgba(0, 240, 255, 0.6);
  animation:
    pf-neon-spin 4s linear infinite,
    pf-neon-glow 2s ease-in-out infinite alternate;
}
@keyframes pf-neon-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes pf-neon-glow {
  from {
    box-shadow: 0 0 8px 2px rgba(0, 240, 255, 0.5);
  }
  to {
    box-shadow: 0 0 18px 6px rgba(123, 47, 255, 0.8);
  }
}

/* Cosmic frame */
.pf-ring--cosmic {
  background: conic-gradient(#c02eff, #7c3aed, #4f46e5, #0ea5e9, #c02eff);
  box-shadow: 0 0 12px 4px rgba(192, 46, 255, 0.6);
  animation:
    pf-cosmic-spin 6s linear infinite,
    pf-cosmic-shimmer 3s ease-in-out infinite;
}
@keyframes pf-cosmic-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes pf-cosmic-shimmer {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* The avatar image sits on top of the ring */
.pf-avatar-host .user-list-avatar,
.pf-avatar-host img {
  position: relative;
  z-index: 3;
}

/* Chip badges in user list / chat messages */
.pf-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 99px;
  line-height: 1.4;
  vertical-align: middle;
  pointer-events: none;
}
.pf-chip--gold {
  background: linear-gradient(135deg, #f5c518, #ffd700);
  color: #3a2800;
}
.pf-chip--neon {
  background: linear-gradient(135deg, #00bfff, #7b2fff);
  color: #fff;
}
.pf-chip--cosmic {
  background: linear-gradient(135deg, #c02eff, #4f46e5);
  color: #fff;
}

/* Hide private-actions column (not needed in group user list) */
body.v3-ui .user-list-content.room-users .private-actions,
body.v3-ui .user-list-content.group-users .private-actions {
  display: none;
}

/* Hide private message time in group list */
body.v3-ui .user-list-content.room-users .private-message-time,
body.v3-ui .user-list-content.group-users .private-message-time {
  display: none;
}

/* Mute icon */
body.v3-ui .user-list-content .user-mute-icon {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--app-text-muted);
}

/* Unread indicator dot (left edge) */
body.v3-ui .user-list-content .user-row .unread-indicator.active {
  position: absolute;
  left: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 16px;
  border-radius: 0 3px 3px 0;
  background: var(--app-accent);
}

/* - v3 avatar: always show, Discord 32px circle - */
body.v3-ui .user-list-content .channel-user-image {
  display: flex !important;
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
}
body.v3-ui .user-list-content .user-list-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: none !important;
  box-shadow: none !important;
  display: block !important;
}

/* - v3 gender-colored names (always on in v3) - */
/* Male - blue */
body.v3-ui .user-list-content .user-row[data-user-sex="1"] .channel-user-name,
body.v3-ui
  .user-list-content
  .user-row[data-user-sex="male" i]
  .channel-user-name {
  color: #5b8def;
}
/* Female - pink */
body.v3-ui .user-list-content .user-row[data-user-sex="2"] .channel-user-name,
body.v3-ui
  .user-list-content
  .user-row[data-user-sex="female" i]
  .channel-user-name {
  color: #f06595;
}
/* Trans - purple */
body.v3-ui .user-list-content .user-row[data-user-sex="3"] .channel-user-name,
body.v3-ui
  .user-list-content
  .user-row[data-user-sex="trans" i]
  .channel-user-name {
  color: #c084fc;
}
/* Couple - green */
body.v3-ui .user-list-content .user-row[data-user-sex="4"] .channel-user-name,
body.v3-ui
  .user-list-content
  .user-row[data-user-sex="par" i]
  .channel-user-name,
body.v3-ui
  .user-list-content
  .user-row[data-user-sex="couple" i]
  .channel-user-name {
  color: #4ade80;
}
/* Other - teal */
body.v3-ui .user-list-content .user-row[data-user-sex="5"] .channel-user-name,
body.v3-ui
  .user-list-content
  .user-row[data-user-sex="other" i]
  .channel-user-name,
body.v3-ui
  .user-list-content
  .user-row[data-user-sex="andet" i]
  .channel-user-name {
  color: #2dd4bf;
}
/* Admin - orange */
body.v3-ui
  .user-list-content
  .user-row[data-user-user_type="1"]
  .channel-user-name {
  color: #fb923c;
}

/* - v3 gender-colored names, keyed off the class the JS gender helper
   (resolveDmUsernameGenderClass) actually applies to .channel-user-name.
   This is the single reliable source of truth — the raw `data-user-sex`
   attribute above can be "1"/"m"/"male"/"mand"/"man"/etc. depending on how
   the row was rendered, and the attribute-selector rules above don't cover
   every one of those raw formats, which was causing gender colors to go
   missing for some users. The JS helper already normalizes all of them into
   one of the classes below, so keying color off the class fixes that for
   every render path. */
/* NOTE: .user-list-content only wraps the ROOM members panel
   (#user-list-content-room) — the private/DM conversation list uses a
   completely different container, .private-list (#dm-list). Both must be
   listed explicitly or the private list never matches these rules at all,
   which was the actual reason default (non-active) DM rows showed no
   gender color. */
body.v3-ui .user-list-content .channel-user-name.username-gender-male,
body.v3-ui .private-list .channel-user-name.username-gender-male {
  color: #5b8def !important;
}
body.v3-ui .user-list-content .channel-user-name.username-gender-female,
body.v3-ui .private-list .channel-user-name.username-gender-female {
  color: #f06595 !important;
}
body.v3-ui .user-list-content .channel-user-name.username-gender-trans,
body.v3-ui .private-list .channel-user-name.username-gender-trans {
  color: #c084fc !important;
}
body.v3-ui .user-list-content .channel-user-name.username-gender-couple,
body.v3-ui .private-list .channel-user-name.username-gender-couple {
  color: #4ade80 !important;
}
body.v3-ui .user-list-content .channel-user-name.username-gender-other,
body.v3-ui .private-list .channel-user-name.username-gender-other {
  color: #2dd4bf !important;
}
body.v3-ui .user-list-content .channel-user-name.username-gender-admin,
body.v3-ui .private-list .channel-user-name.username-gender-admin {
  color: #fb923c !important;
}

/* ── Role badges ────────────────────────────────────────────────────────── */
body.v3-ui .user-list-content .user-role-badge-admin {
  font-size: 8.5px !important;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
  margin-left: 3px;
  text-transform: uppercase;
}
body.v3-ui .user-list-content .guest-user-badge--inline {
  font-size: 8.5px !important;
  color: rgba(167, 139, 250, 0.55);
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 4px;
  padding: 1px 4px;
  flex-shrink: 0;
  margin-left: 3px;
}
body.v3-ui .user-list-content .verified-user-icon-inline {
  font-size: 10px !important;
  color: #a78bfa;
  flex-shrink: 0;
  margin-left: 2px;
}

/* - v3 user-status subline - */
body.v3-ui .user-list-content .user-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--app-text-muted);
  min-width: 0;
  overflow: hidden;
}
body.v3-ui .user-list-content .live-user-extra-item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
body.v3-ui .user-list-content .live-user-extra-item i {
  font-size: 10px;
  flex-shrink: 0;
}
body.v3-ui .user-list-content .user-profile-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Retry link in private-list error state */
body.v3-ui .private-list-error {
  padding: 10px 12px;
  font-size: 11px;
  color: var(--app-text-muted);
  text-align: center;
}
body.v3-ui .private-list-retry-link {
  color: var(--app-accent);
  text-decoration: underline;
  cursor: pointer;
}

/* - V3: Keep real sidebar-room always visible (chatnet.js .hide()/.show() guard) - */
body.v3-ui #sidebar-room.sidebar-room {
  display: flex !important;
  flex-direction: column;
}

/* - V3: private-channel group user list visibility is controlled by chatnet.js - */
body.v3-ui .group-users-row {
  display: none;
}

/* - Rightbar userlist mode: enforce one list at a time - */
body.v3-ui #rightbar-wrapper-room.userlist-mode-room .room-users-row,
body.v3-ui #rightbar-wrapper.userlist-mode-room .room-users-row {
  display: flex;
}
body.v3-ui #rightbar-wrapper-room.userlist-mode-room .group-users-row,
body.v3-ui #rightbar-wrapper.userlist-mode-room .group-users-row {
  display: none;
}
body.v3-ui #rightbar-wrapper-room.userlist-mode-private .room-users-row,
body.v3-ui #rightbar-wrapper.userlist-mode-private .room-users-row {
  display: none;
}
body.v3-ui #rightbar-wrapper-room.userlist-mode-private .group-users-row,
body.v3-ui #rightbar-wrapper.userlist-mode-private .group-users-row {
  display: flex;
}

/* - V3: Right panel visibility - controlled by consolidated rules above - */

/* - V3: DM profile right panel styling - */
body.v3-ui #rightbar-wrapper-private {
  width: var(--app-rightbar-width, 240px);
  min-width: 200px;
  border-left: 1px solid var(--app-border);
  background: var(--app-surface);
  overflow: hidden;
}
body.v3-ui #rightbar-wrapper-private .user-info-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  height: 100%;
  padding: 16px 12px !important;
}
body.v3-ui .private-user-compact {
  display: flex;
  align-items: center;
}
body.v3-ui .private-user-compact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  width: 100%;
}
body.v3-ui .private-user-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
body.v3-ui .private-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--app-elevated);
}
body.v3-ui .private-user-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--app-surface);
  background: var(--app-text-muted);
}
body.v3-ui .private-user-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: var(--app-text);
}
body.v3-ui #rightbar-wrapper-private .user-card-modern,
body.v3-ui #rightbar-wrapper-private .no-user-card {
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-elevated);
}
body.v3-ui #rightbar-wrapper-private .user-profile-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
}
body.v3-ui #rightbar-wrapper-private .meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--app-border);
}
body.v3-ui #rightbar-wrapper-private .meta-item:last-child {
  border-bottom: none;
}
body.v3-ui #rightbar-wrapper-private .meta-icon {
  color: var(--app-text-muted);
  font-size: 14px;
  width: 18px;
  flex-shrink: 0;
}
body.v3-ui #rightbar-wrapper-private .meta-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
body.v3-ui #rightbar-wrapper-private .meta-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--app-text-muted);
  font-weight: 600;
}
body.v3-ui #rightbar-wrapper-private .meta-value {
  font-size: 13px;
  color: var(--app-text);
  font-weight: 500;
}
body.v3-ui #rightbar-wrapper-private .user-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
}
body.v3-ui #rightbar-wrapper-private .action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  flex: 1 1 auto;
  min-width: 52px;
  transition: background 0.15s;
}
body.v3-ui #rightbar-wrapper-private .action-btn i {
  font-size: 16px;
}
body.v3-ui #rightbar-wrapper-private .action-btn-primary {
  background: var(--app-accent);
  color: #fff;
}
body.v3-ui #rightbar-wrapper-private .action-btn-secondary {
  background: var(--app-elevated);
  color: var(--app-text);
  border: 1px solid var(--app-border);
}
body.v3-ui #rightbar-wrapper-private .action-btn-danger {
  background: var(--app-elevated);
  color: #e04040;
  border: 1px solid var(--app-border);
}

/* -
   V3 TAB SWITCHING - Sidebar, Active States, Composer
   - */

/* - Sidebar sections visibility by active tab -
   Room tab: show channels section, dim DM section
   DM tab:   show DM section, dim channel section         */
body.v3-ui #sidebar-room {
  display: flex !important;
  flex-direction: column;
}

/* - Channel list active item highlight - */
body.v3-ui .channel-list .channel-item.active {
  background: var(--app-accent) !important;
  color: #fff !important;
  border-radius: 4px;
}
body.v3-ui .channel-list .channel-item.active .channel-name {
  color: #fff !important;
}
/* In DM tab, don't show channel-item as active */
body.v3-ui[data-active-tab="private"] .channel-list .channel-item.active {
  background: transparent !important;
  color: inherit !important;
}
body.v3-ui[data-active-tab="private"]
  .channel-list
  .channel-item.active
  .channel-name {
  color: inherit !important;
}

/* - DM list active conversation highlight - */
body.v3-ui .private-list .user-row.active,
body.v3-ui .private-list .user-row.is-active {
  background: rgba(37, 99, 235, 0.34) !important;
  border: 1px solid rgba(147, 197, 253, 0.42);
  border-radius: 4px;
}
body.v3-ui .private-list .user-row.active .channel-user-name,
body.v3-ui .private-list .user-row.is-active .channel-user-name {
  color: var(--app-text-primary) !important;
}
/* In room tab, don't show DM row as active */
body.v3-ui:not([data-active-tab="private"]) .private-list .user-row.active,
body.v3-ui:not([data-active-tab="private"]) .private-list .user-row.is-active {
  background: transparent !important;
}
body.v3-ui:not([data-active-tab="private"])
  .private-list
  .user-row.active
  .channel-user-name,
body.v3-ui:not([data-active-tab="private"])
  .private-list
  .user-row.is-active
  .channel-user-name {
  color: var(--app-text) !important;
}
/* Keep gender/admin username colors on active DM rows in all tabs */
body.v3-ui .private-list .user-row.active[data-user-sex="1"] .channel-user-name,
body.v3-ui
  .private-list
  .user-row.active[data-user-sex="male" i]
  .channel-user-name,
body.v3-ui
  .private-list
  .user-row.is-active[data-user-sex="1"]
  .channel-user-name,
body.v3-ui
  .private-list
  .user-row.is-active[data-user-sex="male" i]
  .channel-user-name {
  color: #5b8def !important;
}
body.v3-ui .private-list .user-row.active[data-user-sex="2"] .channel-user-name,
body.v3-ui
  .private-list
  .user-row.active[data-user-sex="female" i]
  .channel-user-name,
body.v3-ui
  .private-list
  .user-row.is-active[data-user-sex="2"]
  .channel-user-name,
body.v3-ui
  .private-list
  .user-row.is-active[data-user-sex="female" i]
  .channel-user-name {
  color: #f06595 !important;
}
body.v3-ui .private-list .user-row.active[data-user-sex="3"] .channel-user-name,
body.v3-ui
  .private-list
  .user-row.active[data-user-sex="trans" i]
  .channel-user-name,
body.v3-ui
  .private-list
  .user-row.is-active[data-user-sex="3"]
  .channel-user-name,
body.v3-ui
  .private-list
  .user-row.is-active[data-user-sex="trans" i]
  .channel-user-name {
  color: #c084fc !important;
}
body.v3-ui .private-list .user-row.active[data-user-sex="4"] .channel-user-name,
body.v3-ui
  .private-list
  .user-row.active[data-user-sex="par" i]
  .channel-user-name,
body.v3-ui
  .private-list
  .user-row.active[data-user-sex="couple" i]
  .channel-user-name,
body.v3-ui
  .private-list
  .user-row.is-active[data-user-sex="4"]
  .channel-user-name,
body.v3-ui
  .private-list
  .user-row.is-active[data-user-sex="par" i]
  .channel-user-name,
body.v3-ui
  .private-list
  .user-row.is-active[data-user-sex="couple" i]
  .channel-user-name {
  color: #4ade80 !important;
}
body.v3-ui .private-list .user-row.active[data-user-sex="5"] .channel-user-name,
body.v3-ui
  .private-list
  .user-row.active[data-user-sex="other" i]
  .channel-user-name,
body.v3-ui
  .private-list
  .user-row.active[data-user-sex="andet" i]
  .channel-user-name,
body.v3-ui
  .private-list
  .user-row.is-active[data-user-sex="5"]
  .channel-user-name,
body.v3-ui
  .private-list
  .user-row.is-active[data-user-sex="other" i]
  .channel-user-name,
body.v3-ui
  .private-list
  .user-row.is-active[data-user-sex="andet" i]
  .channel-user-name {
  color: #2dd4bf !important;
}
body.v3-ui
  .private-list
  .user-row.active[data-user-user_type="1"]
  .channel-user-name,
body.v3-ui
  .private-list
  .user-row.is-active[data-user-user_type="1"]
  .channel-user-name {
  color: #fb923c !important;
}
/* Same class-based fallback as the non-active rule above — covers every raw
   data-user-sex format via the JS-computed username-gender-* class. */
body.v3-ui
  .private-list
  .user-row.active
  .channel-user-name.username-gender-male,
body.v3-ui
  .private-list
  .user-row.is-active
  .channel-user-name.username-gender-male {
  color: #5b8def !important;
}
body.v3-ui
  .private-list
  .user-row.active
  .channel-user-name.username-gender-female,
body.v3-ui
  .private-list
  .user-row.is-active
  .channel-user-name.username-gender-female {
  color: #f06595 !important;
}
body.v3-ui
  .private-list
  .user-row.active
  .channel-user-name.username-gender-trans,
body.v3-ui
  .private-list
  .user-row.is-active
  .channel-user-name.username-gender-trans {
  color: #c084fc !important;
}
body.v3-ui
  .private-list
  .user-row.active
  .channel-user-name.username-gender-couple,
body.v3-ui
  .private-list
  .user-row.is-active
  .channel-user-name.username-gender-couple {
  color: #4ade80 !important;
}
body.v3-ui
  .private-list
  .user-row.active
  .channel-user-name.username-gender-other,
body.v3-ui
  .private-list
  .user-row.is-active
  .channel-user-name.username-gender-other {
  color: #2dd4bf !important;
}
body.v3-ui
  .private-list
  .user-row.active
  .channel-user-name.username-gender-admin,
body.v3-ui
  .private-list
  .user-row.is-active
  .channel-user-name.username-gender-admin {
  color: #fb923c !important;
}

/* - Composer always visible in v3 -
   chatnet may hide #chat-editor or .editor-controller in some states.
   Override so neither is hidden purely because of tab switching.
   Restriction states still work via .non-chat-select, .non-join-message etc. */
body.v3-ui #main-room.active #chat-editor,
body.v3-ui #main-private.active #chat-editor {
  display: block !important;
}
body.v3-ui #main-room.active .room-editor,
body.v3-ui #main-private.active .private-editor {
  display: block !important;
  flex-shrink: 0;
}
/* Force .editor-controller visible - chatnet's loadChats hides it then
   conditionally shows it; if timing is off this keeps it visible. */
body.v3-ui #main-room.active #chat-editor .editor-container.editor-controller,
body.v3-ui
  #main-private.active
  #chat-editor
  .editor-container.editor-controller {
  display: flex !important;
}
/* But hide it when a hard restriction element IS shown (ban, non-join, denied) */
body.v3-ui
  #main-room.active
  #chat-editor
  .non-chat-select[style*="display: block"]
  ~ .editor-container,
body.v3-ui
  #main-room.active
  #chat-editor
  .non-join-message[style*="display: block"]
  ~ .editor-container,
body.v3-ui
  #main-room.active
  #chat-editor
  .permission-denied-editor[style*="display: block"]
  ~ .editor-container,
body.v3-ui
  #main-room.active
  #chat-editor
  .user-restricted[style*="display: block"]
  ~ .editor-container,
body.v3-ui
  #main-private.active
  #chat-editor
  .non-chat-select[style*="display: block"]
  ~ .editor-container,
body.v3-ui
  #main-private.active
  #chat-editor
  .non-join-message[style*="display: block"]
  ~ .editor-container,
body.v3-ui
  #main-private.active
  #chat-editor
  .permission-denied-editor[style*="display: block"]
  ~ .editor-container,
body.v3-ui
  #main-private.active
  #chat-editor
  .user-restricted[style*="display: block"]
  ~ .editor-container {
  display: none !important;
}

/* - V3 User list container - */
body.v3-ui #user-list-content-room {
  padding: 0 2px 4px;
}

/* - V3 Reaction pill - dark theme, chatnet.css base (#607d8b) overrides theme CSS - */
body.v3-ui .current-reacts {
  background: #1e2d40 !important;
}
body.v3-ui .current-reacts:hover {
  background: #253650 !important;
}

/* ── Group section headers (ADMINS, BIDRAGYDER, etc.) ──────────────────── */
body.v3-ui .user-presence-group,
body.v3-ui .user-room-group {
  margin-bottom: 4px !important;
}
body.v3-ui .user-presence-group-toggle,
body.v3-ui .user-room-group-toggle {
  background: rgba(124, 58, 237, 0.09) !important;
  border: 1px solid rgba(139, 92, 246, 0.22) !important;
  border-radius: 8px !important;
  color: rgba(167, 139, 250, 0.6) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  padding: 5px 10px !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease !important;
}
body.v3-ui .user-presence-group-toggle:hover,
body.v3-ui .user-room-group-toggle:hover {
  background: rgba(124, 58, 237, 0.16) !important;
  border-color: rgba(139, 92, 246, 0.4) !important;
  color: #c4b5fd !important;
}
body.v3-ui .user-presence-group-body,
body.v3-ui .user-room-group-body {
  padding-top: 2px !important;
}

/* ── Collapsible action panel (grid height trick) ────────────────────────── */
body.v3-ui .user-list-content .ulm-action-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.22s ease;
  background: rgba(124, 58, 237, 0.06);
  border-top: 1px solid transparent;
}
body.v3-ui .user-list-content .ulm-action-panel .ulm-actions-inner {
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 10px;
}
/* Expanded state */
body.v3-ui .user-list-content .user-row.ulm-open .ulm-action-panel {
  grid-template-rows: 1fr;
  border-top-color: rgba(139, 92, 246, 0.15);
}
body.v3-ui .user-list-content .user-row.ulm-open .ulm-actions-inner {
  padding: 7px 10px 8px;
}

/* ── Action buttons — shared base ── */
body.v3-ui .user-list-content .ulm-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition:
    filter 0.13s,
    opacity 0.13s;
}
body.v3-ui .user-list-content .ulm-btn i {
  font-size: 13px;
  flex-shrink: 0;
}
body.v3-ui .user-list-content .ulm-btn:hover {
  filter: brightness(1.18);
  text-decoration: none;
  opacity: 1;
}

/* Profil — blue */
body.v3-ui .user-list-content .ulm-btn.se-profil-info {
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(59, 130, 246, 0.35);
}

/* Billede — cyan */
body.v3-ui .user-list-content .ulm-btn.se-billede-info {
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.18);
  border-color: rgba(6, 182, 212, 0.35);
}

/* Besked — green */
body.v3-ui .user-list-content .ulm-btn.start-private-chat-dm {
  color: #86efac;
  background: rgba(22, 163, 74, 0.18);
  border-color: rgba(34, 197, 94, 0.35);
}

/* Skjul — orange/amber */
body.v3-ui .user-list-content .ulm-btn.hide-group-user {
  color: #fcd34d;
  background: rgba(180, 83, 9, 0.18);
  border-color: rgba(245, 158, 11, 0.35);
}

/* Rapportér — red */
body.v3-ui .user-list-content .ulm-btn.report-user {
  color: #fca5a5;
  background: rgba(185, 28, 28, 0.18);
  border-color: rgba(239, 68, 68, 0.35);
}

/* Foreslå møde — pink/rose */
body.v3-ui .user-list-content .ulm-btn.ulm-btn-meet {
  color: #f9a8d4;
  background: rgba(236, 72, 153, 0.18);
  border-color: rgba(236, 72, 153, 0.35);
}

/* Dropdown item meet icon color */
.dropdown-item-meet i {
  color: #f472b6;
}

/* - V3 Right panel background - consistent navy - */
body.v3-ui .app-rightbar,
body.v3-ui .rightbar-wrapper {
  background: var(--app-sidebar) !important;
}

/* - V3 Iconbar Android link - */
body.v3-ui .app-iconbar-android {
  text-decoration: none;
}
body.v3-ui .app-iconbar-android-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  opacity: 0.7;
  transition:
    opacity 0.15s,
    transform 0.15s;
}
body.v3-ui .app-iconbar-android:hover .app-iconbar-android-icon {
  opacity: 1;
  transform: scale(1.1);
}

/* - V3 Group chat bubbles - solid colors, no transparent gradient bleed - */
body.v3-ui .group-chat .cht .message-data {
  border-color: rgba(116, 147, 201, 0.15) !important;
}
body.v3-ui .group-chat .cht.replies .message-data {
  background: #132033 !important;
  color: #edf4ff !important;
  border-color: rgba(116, 147, 201, 0.18) !important;
}
body.v3-ui .group-chat .cht.sent .message-data {
  background: #172438 !important;
  border-color: rgba(116, 147, 201, 0.18) !important;
  color: #eff5ff !important;
}

/* -
   V3 DM - force old private-chat bubble style (1:1-like)
   Neutral dark bubbles, no bright blue outlines/rings.
   - */
body.v3-ui #main-private .private-chat {
  --dm-bg-a: #0b1220;
  --dm-bg-b: #08101d;
  --dm-sent-a: #172438;
  --dm-sent-b: #172438;
  --dm-received-bg: #132033;
  --dm-received-text: #edf4ff;
  --dm-muted: #8fa4bf;
}

body.v3-ui #main-private .private-chat .chat-scroll {
  background: var(--dm-bg-b) !important;
}

body.v3-ui #main-private .private-chat .messages.chats {
  padding: 10px 10px 6px !important;
}

body.v3-ui #main-private .private-chat .cht {
  margin-bottom: 9px !important;
}

body.v3-ui #main-private .private-chat .cht.sent + .cht.sent,
body.v3-ui #main-private .private-chat .cht.replies + .cht.replies {
  margin-top: 2px !important;
}

body.v3-ui #main-private .private-chat .cht .message-data {
  width: fit-content !important;
  max-width: min(62%, 500px) !important;
  padding: 6px 9px !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

body.v3-ui #main-private .private-chat .cht.sent .message-data {
  background: var(--dm-sent-a) !important;
  color: #eff5ff !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

body.v3-ui #main-private .private-chat .cht.replies .message-data {
  background: var(--dm-received-bg) !important;
  color: var(--dm-received-text) !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

body.v3-ui #main-private .private-chat .cht .message-data:focus,
body.v3-ui #main-private .private-chat .cht .message-data:focus-visible,
body.v3-ui #main-private .private-chat .cht .message-data *:focus,
body.v3-ui #main-private .private-chat .cht .message-data *:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Avatars should be visible on every DM line */
body.v3-ui #main-private .private-chat .cht .msg-avatar-wrap {
  visibility: visible !important;
}

body.v3-ui #main-private .private-chat .cht.sent.pm-run-first .message-status,
body.v3-ui #main-private .private-chat .cht.sent.pm-run-middle .message-status,
body.v3-ui
  #main-private
  .private-chat
  .cht.replies.pm-run-first
  .message-status,
body.v3-ui
  #main-private
  .private-chat
  .cht.replies.pm-run-middle
  .message-status {
  display: none !important;
}

body.v3-ui #main-private .private-chat .cht .message-status {
  opacity: 0.7;
  font-size: 10px !important;
}

/* -
   CDM - Chat Donation Modal  (cdm-* namespace)
   Navy/blue design system, dark-first, no inline styles
   - */

/* ═══════════════════════════════════════════════════════════════
   DONATION MODAL — CDM  (fully refactored)
   ═══════════════════════════════════════════════════════════════ */

/* ── Keyframes ─────────────────────────────────────────────────── */
@keyframes cdm-heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.18);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.12);
  }
  56% {
    transform: scale(1);
  }
}
@keyframes cdm-glow-pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.08);
  }
}
@keyframes cdm-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
@keyframes cdm-ring-pulse {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.88);
  }
  50% {
    opacity: 0.55;
    transform: scale(1.04);
  }
}
@keyframes cdm-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
@keyframes cdm-card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Design tokens ──────────────────────────────────────────────── */
:root {
  --cdm-bg: #080f1a;
  --cdm-surface: #0d1829;
  --cdm-surface-2: #111f35;
  --cdm-border: rgba(59, 130, 246, 0.14);
  --cdm-border-med: rgba(59, 130, 246, 0.28);
  --cdm-accent: #3b82f6;
  --cdm-accent-dark: #1d4ed8;
  --cdm-text: #e2e8f0;
  --cdm-muted: #6b82a0;
  --cdm-radius: 18px;
  --cdm-radius-sm: 10px;
  /* tier colours */
  --cdm-stoetter: #fbbf24;
  --cdm-bidragyder: #94a3b8;
  --cdm-superfan: #f59e0b;
  --cdm-superfan-2: #ef4444;
  --cdm-legende: #a78bfa;
  --cdm-legende-2: #7c3aed;
}

/* ── Modal shell ────────────────────────────────────────────────── */
.cdm-dialog {
  max-width: 460px;
}

/*
 * iOS Safari fix: Bootstrap's .modal-dialog-scrollable forces
 * overflow:hidden on .modal-content which clips the Stripe iframe's
 * touch hit-test area. Override it hard with !important so the Stripe
 * buy-button is always tappable on iPhones.
 */
.cdm-content,
.modal-dialog-scrollable .cdm-content {
  background: var(--cdm-bg);
  border: 1px solid var(--cdm-border);
  border-radius: var(--cdm-radius) !important;
  color: var(--cdm-text);
  overflow: visible !important; /* must beat Bootstrap's .modal-dialog-scrollable rule */
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(59, 130, 246, 0.08);
  /* iOS: lift out of the scrollable stacking context */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* The scrollable body must not clip children either */
.cdm-dialog.modal-dialog-scrollable .modal-body,
.cdm-body {
  overflow-y: auto !important;
  overflow-x: visible !important;
  -webkit-overflow-scrolling: touch;
  /* iOS: promote to own compositing layer so Stripe iframe receives taps */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* ── Header ─────────────────────────────────────────────────────── */
.cdm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 13px;
  border-bottom: 1px solid var(--cdm-border);
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.12) 0%,
    transparent 70%
  );
  position: relative;
  overflow: hidden;
}
.cdm-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(59, 130, 246, 0.04) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: cdm-shimmer 4s ease infinite;
  pointer-events: none;
}
.cdm-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}
.cdm-header-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #f87171;
  flex-shrink: 0;
}
.cdm-header-icon--pulse i {
  animation: cdm-heartbeat 2.4s ease-in-out infinite;
  display: inline-block;
}
.cdm-title {
  margin: 0;
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--cdm-text);
  line-height: 1.25;
}
.cdm-subtitle {
  margin: 3px 0 0;
  font-size: 0.75rem;
  color: var(--cdm-muted);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 4px;
}
.cdm-close {
  background: none;
  border: none;
  color: var(--cdm-muted);
  font-size: 1.05rem;
  cursor: pointer;
  padding: 5px 7px;
  border-radius: 7px;
  line-height: 1;
  transition:
    color 0.15s,
    background 0.15s;
  position: relative;
}
.cdm-close:hover {
  color: var(--cdm-text);
  background: rgba(255, 255, 255, 0.06);
}

/* ── Body ───────────────────────────────────────────────────────── */
.cdm-body {
  padding: 16px 16px 20px;
}

/* ── Status bar ─────────────────────────────────────────────────── */
.cdm-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border-radius: var(--cdm-radius-sm);
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.18);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.cdm-stats-spinner {
  color: #34d399;
}
.cdm-status-badge {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.cdm-status-noicon {
  font-size: 1rem;
  color: var(--cdm-muted);
}
.cdm-status-body {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.cdm-status-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cdm-text);
  white-space: nowrap;
}
.cdm-status-dot {
  color: var(--cdm-muted);
}
.cdm-status-amount {
  font-size: 0.76rem;
  color: var(--cdm-muted);
}
.cdm-status-amount strong {
  color: #34d399;
}
.cdm-status-next {
  font-size: 0.76rem;
  color: var(--cdm-muted);
}
.cdm-status-expiry {
  font-size: 0.76rem;
  color: #fbbf24;
}

/* Progress bar */
.cdm-tier-progress {
  margin-top: 8px;
  width: 100%;
}
.cdm-tier-progress-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 99px;
  overflow: hidden;
}
.cdm-tier-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #a78bfa);
  border-radius: 99px;
  transition: width 0.5s ease;
}
.cdm-tier-progress-label {
  display: block;
  font-size: 0.66rem;
  color: var(--cdm-muted);
  margin-top: 3px;
}

/* ── Tier cards — horizontal scroll on mobile ───────────────────── */
.cdm-tiers-scroll {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-bottom: 16px;
  /* stagger entry animation */
}
.cdm-tiers-scroll .cdm-tc:nth-child(1) {
  animation: cdm-card-in 0.35s ease both;
}
.cdm-tiers-scroll .cdm-tc:nth-child(2) {
  animation: cdm-card-in 0.35s 0.06s ease both;
}
.cdm-tiers-scroll .cdm-tc:nth-child(3) {
  animation: cdm-card-in 0.35s 0.12s ease both;
}
.cdm-tiers-scroll .cdm-tc:nth-child(4) {
  animation: cdm-card-in 0.35s 0.18s ease both;
}

/* Base card */
.cdm-tc {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 13px 7px 11px;
  border-radius: 13px;
  border: 1px solid var(--cdm-border);
  background: var(--cdm-surface);
  text-align: center;
  overflow: hidden;
  transition:
    transform 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
}
.cdm-tc:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Badge image */
.cdm-tc-badge {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  animation: cdm-float 3.4s ease-in-out infinite;
}
.cdm-tc-badge--lg {
  width: 52px;
  height: 52px;
}
.cdm-tc-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Name & price wrapper — transparent on desktop, becomes the middle column on mobile */
.cdm-tc-meta {
  display: contents; /* no visual box on desktop — children flow normally */
}

/* Name & price */
.cdm-tc-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cdm-text);
  line-height: 1.2;
}
.cdm-tc-price {
  font-size: 0.65rem;
  color: var(--cdm-muted);
  margin-bottom: 4px;
}

/* Perks list */
.cdm-tc-perks {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cdm-tc-perks li {
  font-size: 0.62rem;
  color: var(--cdm-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-start;
  text-align: left;
  line-height: 1.3;
}
.cdm-tc-perks li i {
  font-size: 0.72rem;
  flex-shrink: 0;
}
.cdm-tc-perks li strong {
  color: var(--cdm-text);
}

/* Animated glow layer (featured/elite cards) */
.cdm-tc-glow {
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  pointer-events: none;
  animation: cdm-glow-pulse 2.6s ease-in-out infinite;
  z-index: 0;
}
.cdm-tc > *:not(.cdm-tc-glow) {
  position: relative;
  z-index: 1;
}

/* Spotlight label (top badge on featured cards) */
.cdm-tc-spotlight-label {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 0 2px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  z-index: 2;
}

/* ── Tier accent: Støtter ──────────── */
.cdm-tc--stoetter {
  border-color: rgba(251, 191, 36, 0.22);
}
.cdm-tc--stoetter .cdm-tc-name {
  color: var(--cdm-stoetter);
}
.cdm-tc--stoetter .cdm-tc-price {
  color: rgba(251, 191, 36, 0.55);
}
.cdm-tc--stoetter .cdm-tc-perks li i {
  color: var(--cdm-stoetter);
}

/* ── Tier accent: Bidragyder ──────── */
.cdm-tc--bidragyder {
  border-color: rgba(148, 163, 184, 0.22);
}
.cdm-tc--bidragyder .cdm-tc-name {
  color: var(--cdm-bidragyder);
}
.cdm-tc--bidragyder .cdm-tc-perks li i {
  color: var(--cdm-bidragyder);
}

/* ── Tier accent: Superfan (featured) */
.cdm-tc--superfan.cdm-tc--featured {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(160deg, #1a1200 0%, #0d1829 60%);
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.22),
    0 8px 28px rgba(245, 158, 11, 0.15);
}
.cdm-tc--superfan .cdm-tc-glow {
  background: radial-gradient(
    circle,
    rgba(245, 158, 11, 0.22) 0%,
    transparent 70%
  );
}
.cdm-tc--superfan .cdm-tc-spotlight-label {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.cdm-tc--superfan .cdm-tc-name {
  color: var(--cdm-superfan);
}
.cdm-tc--superfan .cdm-tc-price {
  color: rgba(245, 158, 11, 0.65);
}
.cdm-tc--superfan .cdm-tc-badge {
  animation-duration: 2.6s;
}
.cdm-tc--superfan .cdm-tc-perks li i {
  color: var(--cdm-superfan);
}
.cdm-tc--superfan .cdm-tc-perks li strong {
  color: var(--cdm-superfan);
}

/* ── Tier accent: Legende (elite) ─── */
.cdm-tc--legende.cdm-tc--elite {
  border-color: rgba(167, 139, 250, 0.5);
  background: linear-gradient(160deg, #0e0820 0%, #0d1829 60%);
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.22),
    0 8px 32px rgba(167, 139, 250, 0.18);
}
.cdm-tc--legende .cdm-tc-glow {
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.28) 0%,
    transparent 70%
  );
}
.cdm-tc--legende .cdm-tc-spotlight-label {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.cdm-tc--legende .cdm-tc-name {
  color: var(--cdm-legende);
}
.cdm-tc--legende .cdm-tc-price {
  color: rgba(167, 139, 250, 0.6);
}
.cdm-tc--legende .cdm-tc-badge img {
  filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.55));
  animation-duration: 2.2s;
}
.cdm-tc--legende .cdm-tc-perks li i {
  color: var(--cdm-legende);
}
.cdm-tc--legende .cdm-tc-perks li strong {
  color: var(--cdm-legende);
}

/* ── CTA / Stripe section ───────────────────────────────────────── */
.cdm-cta-section {
  position: relative;
  background: var(--cdm-surface-2);
  border: 1px solid var(--cdm-border);
  border-radius: var(--cdm-radius-sm);
  padding: 14px 14px 10px;
  margin-bottom: 12px;
  overflow: visible !important; /* must not clip stripe iframe touch area */
  text-align: center;
  /* iOS compositing layer — prevents glow ring from eating touches */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Ambient glow ring — decorative only, must never intercept touches */
.cdm-cta-glow-ring {
  position: absolute;
  width: 280px;
  height: 80px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse,
    rgba(34, 197, 94, 0.18) 0%,
    transparent 70%
  );
  pointer-events: none !important;
  animation: cdm-ring-pulse 2.8s ease-in-out infinite;
  z-index: 0;
  /* below the Stripe button in every stacking context */
  isolation: auto;
}

.cdm-stripe-wrap {
  position: relative;
  z-index: 10; /* high enough to clear any stacking context created by glow/animation */
  display: flex;
  justify-content: center;
  padding: 2px 0 6px;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Stripe buy-button web component */
stripe-buy-button {
  --sb-button-border-radius: 10px;
  width: 100%;
  max-width: 360px;
  display: block;
  position: relative;
  z-index: 10;
  pointer-events: auto !important;
  touch-action: manipulation;
  /* iOS: force own compositing layer so the iframe inside receives taps */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  /* remove tap delay on iOS */
  -webkit-tap-highlight-color: transparent;
}

/* Stripe's internal iframe must be fully interactive */
stripe-buy-button iframe {
  pointer-events: auto !important;
  touch-action: manipulation;
  position: relative;
  z-index: 10;
}

/* ── Misc ───────────────────────────────────────────────────────── */
.cdm-note {
  position: relative;
  z-index: 1;
  font-size: 0.73rem;
  color: var(--cdm-muted);
  margin: 0;
  line-height: 1.5;
  text-align: center;
}
.cdm-note i {
  color: var(--cdm-accent);
  margin-right: 3px;
}
.cdm-link {
  color: var(--cdm-accent);
  text-decoration: none;
}
.cdm-link:hover {
  text-decoration: underline;
}
.cdm-link-status {
  font-size: 0.76rem;
  color: #34d399;
  min-height: 18px;
  margin-bottom: 6px;
}

/* ── Footer row ─────────────────────────────────────────────────── */
.cdm-footer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.cdm-footer-row .cdm-alert {
  flex: 1;
  margin-top: 0;
}
.cdm-help-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--cdm-accent);
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid var(--cdm-border);
  transition:
    background 0.15s,
    border-color 0.15s;
  flex-shrink: 0;
}
.cdm-help-link:hover {
  background: rgba(59, 130, 246, 0.09);
  border-color: var(--cdm-accent);
  color: var(--cdm-accent);
}

/* ── Buttons ────────────────────────────────────────────────────── */
.cdm-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--cdm-accent);
  color: #fff;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.1s;
}
.cdm-btn-primary:hover {
  background: var(--cdm-accent-dark);
  color: #fff;
  transform: translateY(-1px);
}
.cdm-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  background: transparent;
  color: var(--cdm-accent);
  border: 1px solid var(--cdm-border-med);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.cdm-btn-outline:hover {
  background: rgba(59, 130, 246, 0.09);
  border-color: var(--cdm-accent);
  color: var(--cdm-accent);
}

/* ── "Hvorfor donere?" info modal ───────────────────────────────── */
.cdm-why-body {
  padding: 0 2px;
}
.cdm-why-lead {
  font-size: 0.84rem;
  color: var(--cdm-text);
  line-height: 1.55;
  margin: 0 0 14px;
}
.cdm-why-lead strong {
  color: #fbbf24;
}
.cdm-why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.cdm-why-card {
  padding: 12px 10px;
  border-radius: var(--cdm-radius-sm);
  background: var(--cdm-surface);
  border: 1px solid var(--cdm-border);
  text-align: left;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.cdm-why-card:hover {
  transform: translateY(-2px);
  border-color: var(--cdm-border-med);
}
.cdm-why-card-icon {
  font-size: 1.2rem;
  color: #fbbf24;
  display: block;
  margin-bottom: 6px;
}
.cdm-why-card-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--cdm-text);
  margin-bottom: 3px;
}
.cdm-why-card-text {
  font-size: 0.68rem;
  color: var(--cdm-muted);
  line-height: 1.4;
}
.cdm-why-hiw {
  background: var(--cdm-surface);
  border: 1px solid var(--cdm-border);
  border-radius: var(--cdm-radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
}
.cdm-why-hiw strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #fbbf24;
  margin-bottom: 8px;
}
.cdm-why-hiw ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cdm-why-hiw li {
  font-size: 0.74rem;
  color: var(--cdm-text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cdm-why-hiw li i {
  color: #34d399;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.cdm-why-cta {
  border-radius: 12px;
  padding: 13px;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  border: none;
  box-shadow: 0 4px 18px rgba(217, 119, 6, 0.5);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  text-decoration: none;
}
.cdm-why-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(217, 119, 6, 0.65);
  color: #fff;
}
@media (max-width: 479px) {
  .cdm-why-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Username alert ─────────────────────────────────────────────── */
.cdm-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--cdm-radius-sm);
  background: rgba(249, 115, 22, 0.06);
  border: 1px solid rgba(249, 115, 22, 0.3);
  margin-top: 10px;
}
.cdm-alert-icon {
  color: #f97316;
  font-size: 0.95rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.cdm-alert-title {
  font-size: 0.73rem;
  font-weight: 700;
  color: #f97316;
  display: block;
  margin-bottom: 1px;
}
.cdm-alert-body {
  font-size: 0.72rem;
  color: var(--cdm-muted);
  line-height: 1.45;
}
.cdm-alert-link {
  color: #f97316;
  font-weight: 700;
  text-decoration: none;
}
.cdm-alert-link:hover {
  text-decoration: underline;
}

/* ── Responsive — mobile purchase-menu style ────────────────────── */
@media (max-width: 479px) {
  /* ── Modal dialog: full-width bottom sheet on mobile ── */
  .cdm-dialog {
    max-width: 100%;
    margin: 0;
    align-items: flex-end;
  }
  .cdm-content {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-top-left-radius: 18px !important;
    border-top-right-radius: 18px !important;
  }

  /* ── Tier list: vertical stack of horizontal rows ── */
  .cdm-tiers-scroll {
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  /* ── Each card becomes a horizontal purchase row ── */
  .cdm-tc {
    flex-direction: row;
    align-items: center;
    gap: 0;
    padding: 10px 12px 10px 10px;
    border-radius: 12px;
    text-align: left;
  }

  /* Badge: smaller, left-anchored, no float animation on mobile */
  .cdm-tc .cdm-tc-badge {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    margin-bottom: 0;
    margin-right: 10px;
    animation: none;
  }
  .cdm-tc .cdm-tc-badge--lg {
    width: 40px;
    height: 40px;
  }

  /* Spotlight label repositioned as a small inline pill top-right of the card */
  .cdm-tc .cdm-tc-spotlight-label {
    position: absolute;
    top: 6px;
    right: 8px;
    left: auto;
    width: auto;
    font-size: 0.55rem;
    padding: 2px 6px;
    border-radius: 20px;
    white-space: nowrap;
  }

  /* Middle column: name + price — layout defined below in the meta block */
  .cdm-tc .cdm-tc-name {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
  }
  .cdm-tc .cdm-tc-price {
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 0;
    margin-top: 1px;
  }

  /* Perks: horizontal chip row, right-aligned, wraps if needed */
  .cdm-tc .cdm-tc-perks {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 6px;
    width: auto;
    flex: 1;
    justify-content: flex-end;
  }
  .cdm-tc .cdm-tc-perks li {
    font-size: 0.62rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    padding: 2px 7px 2px 5px;
    white-space: nowrap;
    justify-content: center;
    gap: 3px;
    line-height: 1.4;
  }

  /* Featured / elite cards: keep left accent strip instead of full spotlight */
  .cdm-tc--superfan.cdm-tc--featured,
  .cdm-tc--legende.cdm-tc--elite {
    padding-top: 10px;
  }

  .cdm-footer-row {
    flex-direction: column;
    align-items: stretch;
  }
  .cdm-body {
    padding: 12px 12px 16px;
  }
  .cdm-header {
    padding: 13px 13px 11px;
  }

  /* ── Meta wrapper: switch from display:contents to a real flex column ── */
  .cdm-tc-meta {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-width: 72px;
    margin-right: 8px;
  }
}

@media (max-width: 340px) {
  .cdm-tc .cdm-tc-perks li {
    font-size: 0.58rem;
    padding: 2px 5px 2px 4px;
  }
  .cdm-tc-meta {
    min-width: 60px;
  }
}
/* Prefers-reduced-motion: disable all animations */
@media (prefers-reduced-motion: reduce) {
  .cdm-header-icon--pulse i,
  .cdm-tc-glow,
  .cdm-tc-badge,
  .cdm-cta-glow-ring,
  .cdm-header::before {
    animation: none !important;
  }
  .cdm-tc {
    transition: none !important;
  }
}

/* V3 modern light theme layer */
html.theme-trueblue-light,
body.theme-trueblue-light {
  --app-bg: #f0f4fa;
  --app-base: #ffffff;
  --app-sidebar: #f8fafc;
  --app-elevated: #ffffff;
  --app-hover: rgba(37, 99, 235, 0.09);
  --app-hover-bg: rgba(37, 99, 235, 0.08);
  --app-active: #dbeafe;
  --app-border: rgba(15, 23, 42, 0.1);
  --app-text: #0f172a;
  --app-text-primary: #0f172a;
  --app-text-muted: #4b5563;
  --app-accent: #2563eb;
  --app-accent-hover: #1d4ed8;
  --app-online: #16a34a;
  --app-away: #d97706;
  --app-busy: #dc2626;
  --app-offline: #94a3b8;
  color-scheme: light;
}

html.theme-trueblue-light body.v3-ui,
body.theme-trueblue-light.v3-ui {
  background: #eef3fb !important;
  color: var(--app-text) !important;
}

body.v3-ui.theme-trueblue-light .app-topbar,
html.theme-trueblue-light body.v3-ui .app-topbar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow:
    0 1px 0 rgba(15, 23, 42, 0.03),
    0 10px 30px rgba(15, 23, 42, 0.06) !important;
  color: #0f172a !important;
}

body.v3-ui.theme-trueblue-light .app-layout,
body.v3-ui.theme-trueblue-light .app-main,
body.v3-ui.theme-trueblue-light .app-main .app-tab-pane,
body.v3-ui.theme-trueblue-light .app-main .page-content-wrapper.v3-compat,
body.v3-ui.theme-trueblue-light .app-main .chat-scroll,
body.v3-ui.theme-trueblue-light .app-iframe-pane {
  background: #f6f8fc !important;
  color: #334155 !important;
}

body.v3-ui.theme-trueblue-light .app-iconbar,
body.v3-ui.theme-trueblue-light .app-sidebar,
body.v3-ui.theme-trueblue-light .app-layout .rightbar-wrapper {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  color: #334155 !important;
}

body.v3-ui.theme-trueblue-light .app-iconbar-item,
body.v3-ui.theme-trueblue-light .app-sidebar-mode-tab,
body.v3-ui.theme-trueblue-light .app-topbar-channel-pill,
body.v3-ui.theme-trueblue-light .app-topbar-points-pill,
body.v3-ui.theme-trueblue-light .app-topbar-profile-trigger,
body.v3-ui.theme-trueblue-light .app-topbar-btn,
body.v3-ui.theme-trueblue-light .app-topbar-icon-btn {
  background: rgba(248, 250, 252, 0.86) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  color: #334155 !important;
}

body.v3-ui.theme-trueblue-light .app-iconbar-item:hover,
body.v3-ui.theme-trueblue-light .app-iconbar-item.active,
body.v3-ui.theme-trueblue-light .app-sidebar-mode-tab:hover,
body.v3-ui.theme-trueblue-light .app-sidebar-mode-tab.active,
body.v3-ui.theme-trueblue-light .app-topbar-btn:hover,
body.v3-ui.theme-trueblue-light .app-topbar-btn.panel-open,
body.v3-ui.theme-trueblue-light .app-topbar-icon-btn:hover {
  background: #eaf2ff !important;
  color: #1d4ed8 !important;
  border-color: rgba(37, 99, 235, 0.22) !important;
}

body.v3-ui.theme-trueblue-light .app-sidebar-header,
body.v3-ui.theme-trueblue-light .app-sidebar-section-header,
body.v3-ui.theme-trueblue-light .v3-rpanel-head,
body.v3-ui.theme-trueblue-light .private-user-compact,
body.v3-ui.theme-trueblue-light .card-header {
  background: rgba(255, 255, 255, 0.78) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  color: #0f172a !important;
}

body.v3-ui.theme-trueblue-light .app-sidebar-search input,
body.v3-ui.theme-trueblue-light .v3-rpanel-search input,
body.v3-ui.theme-trueblue-light .room-user-search {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  color: #0f172a !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

body.v3-ui.theme-trueblue-light .channel-item,
body.v3-ui.theme-trueblue-light .private-list .user-row,
body.v3-ui.theme-trueblue-light .user-list-content .user-row,
body.v3-ui.theme-trueblue-light .v3-userlist-wrap,
body.v3-ui.theme-trueblue-light .user-card-modern,
body.v3-ui.theme-trueblue-light .meta-item,
body.v3-ui.theme-trueblue-light .notification-list .noti-item {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  color: #334155 !important;
}

body.v3-ui.theme-trueblue-light .channel-item:hover,
body.v3-ui.theme-trueblue-light .channel-item.active,
body.v3-ui.theme-trueblue-light .private-list .user-row:hover,
body.v3-ui.theme-trueblue-light .private-list .user-row.active,
body.v3-ui.theme-trueblue-light .user-list-content .user-row:hover {
  background: #eef6ff !important;
  color: #0f172a !important;
}

body.v3-ui.theme-trueblue-light .channel-user-name,
body.v3-ui.theme-trueblue-light .private-user-name,
body.v3-ui.theme-trueblue-light .v3-rpanel-title,
body.v3-ui.theme-trueblue-light .app-topbar-channel-name,
body.v3-ui.theme-trueblue-light .noti-content,
body.v3-ui.theme-trueblue-light .meta-value {
  color: #0f172a !important;
}

body.v3-ui.theme-trueblue-light .user-status,
body.v3-ui.theme-trueblue-light .private-top-user-meta,
body.v3-ui.theme-trueblue-light .noti-time,
body.v3-ui.theme-trueblue-light .meta-label,
body.v3-ui.theme-trueblue-light .app-topbar-btn-label,
body.v3-ui.theme-trueblue-light .app-topbar-profile-name {
  color: #64748b !important;
}

body.v3-ui.theme-trueblue-light .app-main .room-editor,
body.v3-ui.theme-trueblue-light .app-main .private-editor,
body.v3-ui.theme-trueblue-light #chat-editor,
body.v3-ui.theme-trueblue-light #chat-editor .editor-container {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.05) !important;
}

body.v3-ui.theme-trueblue-light .app-main .note-editor,
body.v3-ui.theme-trueblue-light #chat-editor .note-editor,
body.v3-ui.theme-trueblue-light #chat-editor .note-editing-area,
body.v3-ui.theme-trueblue-light #chat-editor .note-editable,
body.v3-ui.theme-trueblue-light #chatnet-editor {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}

body.v3-ui.theme-trueblue-light .cht .message-data,
body.v3-ui.theme-trueblue-light .message-data {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06) !important;
}

body.v3-ui.theme-trueblue-light .cht.right .message-data,
body.v3-ui.theme-trueblue-light .sent .message-data {
  background: #dbeafe !important;
  border-color: rgba(37, 99, 235, 0.18) !important;
}

body.v3-ui.theme-trueblue-light
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu,
html.theme-trueblue-light
  body.v3-ui
  #topbar-notifications-floating-panel.notifications-floating-panel.notifications-panel-card.notifications-panel-menu {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18) !important;
  color: #334155 !important;
}

body.v3-ui.theme-trueblue-light #topbar-notifications-floating-panel .card,
body.v3-ui.theme-trueblue-light
  #topbar-notifications-floating-panel
  .card-header,
body.v3-ui.theme-trueblue-light
  #topbar-notifications-floating-panel
  .card-body.notifications {
  background: transparent !important;
  color: #334155 !important;
}

body.v3-ui.theme-trueblue-light .dropdown-menu,
body.v3-ui.theme-trueblue-light .app-topbar-profile-menu {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  color: #334155 !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14) !important;
}

body.v3-ui.theme-trueblue-light .dropdown-item {
  color: #334155 !important;
}

body.v3-ui.theme-trueblue-light .dropdown-item:hover,
body.v3-ui.theme-trueblue-light .dropdown-item:focus {
  background: #eef6ff !important;
  color: #1d4ed8 !important;
}

/* - v3 gender filter chips - */
body.v3-ui .v3-gender-filter {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--app-border, rgba(255, 255, 255, 0.07));
  background: var(--app-sidebar, transparent);
  align-items: center;
}

body.v3-ui .v3-gf-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  width: 32px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  border: 1.5px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    width 0.15s,
    padding 0.15s;
  color: var(--app-text-muted, #94a3b8);
  user-select: none;
}

/* Icon-only by default; the active chip expands and reveals its label */
body.v3-ui .v3-gf-chip > span:last-child {
  display: none;
}
body.v3-ui .v3-gf-chip.is-active {
  width: auto;
  padding: 0 10px;
}
body.v3-ui .v3-gf-chip.is-active > span:last-child {
  display: inline;
}

body.v3-ui .v3-gf-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

body.v3-ui .v3-gf-chip .v3-gf-icon,
body.v3-ui .v3-gf-chip .ti {
  font-size: 12px;
  line-height: 1;
}

/* All - neutral */
body.v3-ui .v3-gf-chip.v3-gf-all {
  border-color: rgba(148, 163, 184, 0.3);
  color: #94a3b8;
}
body.v3-ui .v3-gf-chip.v3-gf-all.is-active {
  background: rgba(148, 163, 184, 0.18);
  border-color: #94a3b8;
  color: #cbd5e1;
}

/* Male - blue */
body.v3-ui .v3-gf-chip.v3-gf-male {
  border-color: rgba(91, 141, 239, 0.28);
  color: #5b8def;
}
body.v3-ui .v3-gf-chip.v3-gf-male:hover {
  background: rgba(91, 141, 239, 0.12);
}
body.v3-ui .v3-gf-chip.v3-gf-male.is-active {
  background: rgba(91, 141, 239, 0.2);
  border-color: #5b8def;
  color: #93bbf5;
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.18);
}
body.v3-ui .v3-gf-icon--male {
  color: #5b8def;
}

/* Female - pink */
body.v3-ui .v3-gf-chip.v3-gf-female {
  border-color: rgba(240, 101, 149, 0.28);
  color: #f06595;
}
body.v3-ui .v3-gf-chip.v3-gf-female:hover {
  background: rgba(240, 101, 149, 0.12);
}
body.v3-ui .v3-gf-chip.v3-gf-female.is-active {
  background: rgba(240, 101, 149, 0.2);
  border-color: #f06595;
  color: #f7a4bf;
  box-shadow: 0 0 0 3px rgba(240, 101, 149, 0.18);
}
body.v3-ui .v3-gf-icon--female {
  color: #f06595;
}

/* Couple - green */
body.v3-ui .v3-gf-chip.v3-gf-couple {
  border-color: rgba(74, 222, 128, 0.28);
  color: #4ade80;
}
body.v3-ui .v3-gf-chip.v3-gf-couple:hover {
  background: rgba(74, 222, 128, 0.12);
}
body.v3-ui .v3-gf-chip.v3-gf-couple.is-active {
  background: rgba(74, 222, 128, 0.2);
  border-color: #4ade80;
  color: #86efac;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18);
}
body.v3-ui .v3-gf-icon--couple {
  color: #4ade80;
}

/* Trans - purple */
body.v3-ui .v3-gf-chip.v3-gf-trans {
  border-color: rgba(192, 132, 252, 0.28);
  color: #c084fc;
}
body.v3-ui .v3-gf-chip.v3-gf-trans:hover {
  background: rgba(192, 132, 252, 0.12);
}
body.v3-ui .v3-gf-chip.v3-gf-trans.is-active {
  background: rgba(192, 132, 252, 0.2);
  border-color: #c084fc;
  color: #ddb4fe;
  box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.18);
}
body.v3-ui .v3-gf-icon--trans {
  color: #c084fc;
}

/* Other - teal */
body.v3-ui .v3-gf-chip.v3-gf-other {
  border-color: rgba(45, 212, 191, 0.28);
  color: #2dd4bf;
}
body.v3-ui .v3-gf-chip.v3-gf-other:hover {
  background: rgba(45, 212, 191, 0.12);
}
body.v3-ui .v3-gf-chip.v3-gf-other.is-active {
  background: rgba(45, 212, 191, 0.2);
  border-color: #2dd4bf;
  color: #5eead4;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}
body.v3-ui .v3-gf-icon--other {
  color: #2dd4bf;
  font-size: 10px;
}

/* Light theme overrides */
body.v3-ui.theme-trueblue-light .v3-gender-filter {
  background: #f8fafc;
  border-bottom-color: rgba(15, 23, 42, 0.08);
}
body.v3-ui.theme-trueblue-light .v3-gf-chip {
  background: rgba(15, 23, 42, 0.04);
  color: #64748b;
}
body.v3-ui.theme-trueblue-light .v3-gf-chip:hover {
  background: rgba(15, 23, 42, 0.08);
}
body.v3-ui.theme-trueblue-light .v3-gf-chip.v3-gf-all {
  border-color: rgba(100, 116, 139, 0.3);
}
body.v3-ui.theme-trueblue-light .v3-gf-chip.v3-gf-all.is-active {
  background: rgba(100, 116, 139, 0.14);
  border-color: #64748b;
  color: #334155;
}
body.v3-ui.theme-trueblue-light .v3-gf-chip.v3-gf-male.is-active {
  background: rgba(37, 99, 235, 0.1);
  border-color: #2563eb;
  color: #1d4ed8;
}
body.v3-ui.theme-trueblue-light .v3-gf-chip.v3-gf-female.is-active {
  background: rgba(219, 39, 119, 0.1);
  border-color: #db2777;
  color: #be185d;
}
body.v3-ui.theme-trueblue-light .v3-gf-chip.v3-gf-couple.is-active {
  background: rgba(22, 163, 74, 0.1);
  border-color: #16a34a;
  color: #15803d;
}
body.v3-ui.theme-trueblue-light .v3-gf-chip.v3-gf-trans.is-active {
  background: rgba(147, 51, 234, 0.1);
  border-color: #9333ea;
  color: #7e22ce;
}
body.v3-ui.theme-trueblue-light .v3-gf-chip.v3-gf-other.is-active {
  background: rgba(13, 148, 136, 0.1);
  border-color: #0d9488;
  color: #0f766e;
}

/* Hidden user rows when gender filtered out */
body.v3-ui
  #user-list-content-room[data-sex-filter]:not([data-sex-filter=""])
  .user-row {
  display: none !important;
}
body.v3-ui
  #user-list-content-room[data-sex-filter="1"]
  .user-row[data-user-sex="1"],
body.v3-ui
  #user-list-content-room[data-sex-filter="1"]
  .user-row[data-user-sex="male" i] {
  display: block !important;
}
body.v3-ui
  #user-list-content-room[data-sex-filter="2"]
  .user-row[data-user-sex="2"],
body.v3-ui
  #user-list-content-room[data-sex-filter="2"]
  .user-row[data-user-sex="female" i] {
  display: block !important;
}
body.v3-ui
  #user-list-content-room[data-sex-filter="3"]
  .user-row[data-user-sex="3"],
body.v3-ui
  #user-list-content-room[data-sex-filter="3"]
  .user-row[data-user-sex="trans" i] {
  display: block !important;
}
body.v3-ui
  #user-list-content-room[data-sex-filter="4"]
  .user-row[data-user-sex="4"],
body.v3-ui
  #user-list-content-room[data-sex-filter="4"]
  .user-row[data-user-sex="par" i],
body.v3-ui
  #user-list-content-room[data-sex-filter="4"]
  .user-row[data-user-sex="couple" i] {
  display: block !important;
}
body.v3-ui
  #user-list-content-room[data-sex-filter="5"]
  .user-row[data-user-sex="5"],
body.v3-ui
  #user-list-content-room[data-sex-filter="5"]
  .user-row[data-user-sex="other" i],
body.v3-ui
  #user-list-content-room[data-sex-filter="5"]
  .user-row[data-user-sex="andet" i] {
  display: block !important;
}

/* - V3 LIGHT THEME - emoji/GIF picker + DM background - */

/* Floating picker: light-themed surface */
body.v3-ui.theme-trueblue-light .attachments-container.gse-container {
  background: #ffffff !important;
  border-color: rgba(37, 99, 235, 0.18) !important;
  box-shadow:
    0 -8px 32px rgba(15, 23, 42, 0.12),
    0 2px 8px rgba(15, 23, 42, 0.06) !important;
  color: #0f172a !important;
}

body.v3-ui.theme-trueblue-light .attachments-container .nav-pills .nav-link {
  color: #334155 !important;
  background: #f1f5f9 !important;
}
body.v3-ui.theme-trueblue-light
  .attachments-container
  .nav-pills
  .nav-link.active,
body.v3-ui.theme-trueblue-light
  .attachments-container
  .nav-pills
  .show
  > .nav-link {
  color: #ffffff !important;
  background-color: #2563eb !important;
}

body.v3-ui.theme-trueblue-light .attachments-container .gif-search-input,
body.v3-ui.theme-trueblue-light .attachments-container .form-control {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}
body.v3-ui.theme-trueblue-light
  .attachments-container
  .form-control::placeholder {
  color: #94a3b8 !important;
}

/* DM private chat scroll background */
body.v3-ui.theme-trueblue-light #main-private .private-chat .chat-scroll {
  background: #f0f4fa !important;
}

body.v3-ui.theme-trueblue-light #main-private .private-chat {
  background: #f0f4fa !important;
}

body.v3-ui.theme-trueblue-light
  #main-private
  .private-chat
  .page-content-wrapper,
body.v3-ui.theme-trueblue-light #main-private .private-chat .main-panel {
  background: #f0f4fa !important;
}

/* - V3 LIGHT THEME - message bubbles + sender gender colors - */

/* - Group chat bubbles: light theme overrides (beat dark !important) - */
body.v3-ui.theme-trueblue-light .group-chat .cht .message-data {
  border-color: rgba(37, 99, 235, 0.12) !important;
}

/* RECEIVED bubble - clean white card, subtle blue border */
body.v3-ui.theme-trueblue-light .group-chat .cht.replies .message-data {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(37, 99, 235, 0.14) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07) !important;
}

/* SENT bubble - Facebook Messenger blue */
body.v3-ui.theme-trueblue-light .group-chat .cht.sent .message-data {
  background: #0a7cff !important;
  color: #ffffff !important;
  border: 1px solid rgba(10, 124, 255, 0.6) !important;
  box-shadow: 0 3px 12px rgba(10, 124, 255, 0.3) !important;
}

body.v3-ui.theme-trueblue-light .group-chat .cht.sent .chat-txt,
body.v3-ui.theme-trueblue-light .group-chat .cht.sent .message-html,
body.v3-ui.theme-trueblue-light .group-chat .cht.sent .message-html > div,
body.v3-ui.theme-trueblue-light .group-chat .cht.sent .message-data small {
  color: #ffffff !important;
}

body.v3-ui.theme-trueblue-light .group-chat .cht.replies .chat-txt,
body.v3-ui.theme-trueblue-light .group-chat .cht.replies .message-html,
body.v3-ui.theme-trueblue-light .group-chat .cht.replies .message-html > div {
  color: #0f172a !important;
}

/* Timestamp under bubbles */
body.v3-ui.theme-trueblue-light .group-chat .cht .message-status,
body.v3-ui.theme-trueblue-light .group-chat .message-time {
  color: #64748b !important;
}

/* Chat scroll area */
body.v3-ui.theme-trueblue-light #main-room .group-chat .chat-scroll,
body.v3-ui.theme-trueblue-light #main-room .page-content-wrapper {
  background: #f0f4fa !important;
}

/* - DM (private-chat) bubbles: light theme - */
body.v3-ui.theme-trueblue-light #main-private .private-chat {
  --dm-bg-a: #f0f4fa;
  --dm-bg-b: #f0f4fa;
  --dm-sent-a: #0a7cff;
  --dm-sent-b: #0a7cff;
  --dm-received-bg: #ffffff;
  --dm-received-text: #0f172a;
  --dm-muted: #64748b;
}

body.v3-ui.theme-trueblue-light
  #main-private
  .private-chat
  .cht.sent
  .message-data {
  background: #0a7cff !important;
  color: #ffffff !important;
  border: 0 !important;
  box-shadow: 0 3px 12px rgba(10, 124, 255, 0.28) !important;
}

body.v3-ui.theme-trueblue-light
  #main-private
  .private-chat
  .cht.replies
  .message-data {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(37, 99, 235, 0.12) !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
}

body.v3-ui.theme-trueblue-light #main-private .private-chat .cht.sent .chat-txt,
body.v3-ui.theme-trueblue-light
  #main-private
  .private-chat
  .cht.sent
  .message-html,
body.v3-ui.theme-trueblue-light
  #main-private
  .private-chat
  .cht.sent
  .message-html
  > div {
  color: #ffffff !important;
}

body.v3-ui.theme-trueblue-light
  #main-private
  .private-chat
  .cht.replies
  .chat-txt,
body.v3-ui.theme-trueblue-light
  #main-private
  .private-chat
  .cht.replies
  .message-html,
body.v3-ui.theme-trueblue-light
  #main-private
  .private-chat
  .cht.replies
  .message-html
  > div {
  color: #0f172a !important;
}

/* - Sender-name gender colors in message bubbles (light theme) - */
/* These match the dark theme colors but adjusted for light backgrounds */

/* Male - blue */
body.v3-ui.theme-trueblue-light .cht.replies .sender-name[data-sender-sex="1"],
body.v3-ui.theme-trueblue-light
  .cht.replies
  .sender-name[data-sender-sex="male" i] {
  color: #1d4ed8 !important;
}

/* Female - pink/rose */
body.v3-ui.theme-trueblue-light .cht.replies .sender-name[data-sender-sex="2"],
body.v3-ui.theme-trueblue-light
  .cht.replies
  .sender-name[data-sender-sex="female" i] {
  color: #db2777 !important;
}

/* Trans - purple */
body.v3-ui.theme-trueblue-light .cht.replies .sender-name[data-sender-sex="3"],
body.v3-ui.theme-trueblue-light
  .cht.replies
  .sender-name[data-sender-sex="trans" i] {
  color: #7c3aed !important;
}

/* Couple - green */
body.v3-ui.theme-trueblue-light .cht.replies .sender-name[data-sender-sex="4"],
body.v3-ui.theme-trueblue-light
  .cht.replies
  .sender-name[data-sender-sex="par" i],
body.v3-ui.theme-trueblue-light
  .cht.replies
  .sender-name[data-sender-sex="couple" i] {
  color: #15803d !important;
}

/* Other - teal */
body.v3-ui.theme-trueblue-light .cht.replies .sender-name[data-sender-sex="5"],
body.v3-ui.theme-trueblue-light
  .cht.replies
  .sender-name[data-sender-sex="other" i],
body.v3-ui.theme-trueblue-light
  .cht.replies
  .sender-name[data-sender-sex="andet" i] {
  color: #0f766e !important;
}

/* VIP/admin - amber */
body.v3-ui.theme-trueblue-light
  .cht.replies[data-sender-user-type="1"]
  .sender-name {
  color: #d97706 !important;
}

/* No gender set - default blue-grey */
body.v3-ui.theme-trueblue-light .cht.replies .sender-name {
  color: #334155;
}

/* Sent bubble sender name (own messages) - keep white */
body.v3-ui.theme-trueblue-light .cht.sent .sender-name {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Username mention highlight in received bubbles */
body.v3-ui.theme-trueblue-light .cht.replies .username-mention {
  color: #15803d !important;
}

/* Timestamp inside bubble */
body.v3-ui.theme-trueblue-light .cht.replies .message-data small {
  color: #64748b !important;
}

body.v3-ui.theme-trueblue-light .cht.sent .message-data small {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* System event announcements (join/leave pills) */
body.v3-ui.theme-trueblue-light .cht-system-event-card {
  background: #eef5ff !important;
  border-color: #bfdbfe !important;
  color: #1e40af !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
}
body.v3-ui.theme-trueblue-light
  .cht-system-event-row.is-join
  .cht-system-event-card {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
  color: #15803d !important;
}
body.v3-ui.theme-trueblue-light
  .cht-system-event-row.is-leave
  .cht-system-event-card {
  background: #fff7ed !important;
  border-color: #fdba74 !important;
  color: #c2410c !important;
}
body.v3-ui.theme-trueblue-light .cht-system-event-icon,
body.v3-ui.theme-trueblue-light .cht-system-event-text,
body.v3-ui.theme-trueblue-light .cht-system-event-name,
body.v3-ui.theme-trueblue-light .cht-system-event-meta {
  color: inherit !important;
}

/* Replied-to quote block in light */
body.v3-ui.theme-trueblue-light .chat-replied-bubble,
body.v3-ui.theme-trueblue-light .replied-content,
body.v3-ui.theme-trueblue-light .replies .replied-to {
  background: rgba(37, 99, 235, 0.08) !important;
  border-left: 3px solid rgba(37, 99, 235, 0.4) !important;
  color: #1e40af !important;
}

/* Chat actions hover icons on light bg */
body.v3-ui.theme-trueblue-light .chat-actions i {
  color: #64748b;
}
body.v3-ui.theme-trueblue-light .chat-actions i:hover {
  color: #1d4ed8;
}

/* Reactions */
body.v3-ui.theme-trueblue-light .current-reacts {
  background: #ffffff;
  border-color: #e2e8f0;
}
body.v3-ui.theme-trueblue-light .reactions-container .reaction-btn {
  background: #f0f4ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}
body.v3-ui.theme-trueblue-light .reactions-container .reaction-btn:hover,
body.v3-ui.theme-trueblue-light .reactions-container .reaction-btn.is-active {
  background: #dbeafe;
  border-color: #3b82f6;
}

/* - Room bulk-leave (reuses chatnet's private-bulk-toolbar styles) - */
.room-bulk-toolbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* - Sidebar Mode Transitions - */
/* Smooth transitions when switching between inbox and rooms modes */
.app-sidebar {
  transition:
    background-color 200ms ease,
    border-color 200ms ease;
}

/* Mode tab transitions */
.app-sidebar-mode-tab {
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}

/* Navigation transition overlay */
.nav-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 17, 32, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  z-index: 9998;
}

.nav-transition-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Editor host transitions */
.private-editor,
.room-editor {
  transition:
    opacity 100ms ease,
    transform 100ms ease;
}

/* Fade effect during editor switch */
.editor-switching .private-editor,
.editor-switching .room-editor {
  opacity: 0.7;
}

/* Active mode badges */
.app-sidebar-mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  transition: all 150ms ease;
}

.app-sidebar-mode-tab.active .app-sidebar-mode-badge {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.app-sidebar-mode-tab.active[data-sidebar-mode-tab="inbox"]
  .app-sidebar-mode-badge {
  background: rgba(22, 163, 74, 0.2);
  color: #4ade80;
}

.app-sidebar-mode-tab.active[data-sidebar-mode-tab="rooms"]
  .app-sidebar-mode-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

/* -
   MOBILE: Conversations & Chat Rooms Panels (WhatsApp/Facebook style)
   - */

/* Base panel structure */
.mobile-conversations-panel,
.mobile-rooms-panel,
.mobile-gruppe-panel {
  position: fixed;
  inset: 0;
  z-index: 2500;
  pointer-events: none;
  visibility: hidden;
}

.mobile-conversations-panel.open,
.mobile-rooms-panel.open,
.mobile-gruppe-panel.open {
  pointer-events: auto;
  visibility: visible;
}

/* Overlay */
.mobile-panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-conversations-panel.open .mobile-panel-overlay,
.mobile-rooms-panel.open .mobile-panel-overlay,
.mobile-gruppe-panel.open .mobile-panel-overlay {
  opacity: 1;
}

/* Drawer - slides from right */
.mobile-panel-drawer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(380px, 92vw);
  max-width: 92vw;
  background: var(--app-base, #0a0f1a);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
}

.mobile-conversations-panel.open .mobile-panel-drawer,
.mobile-rooms-panel.open .mobile-panel-drawer,
.mobile-gruppe-panel.open .mobile-panel-drawer {
  transform: translateX(0);
}

/* Header */
.mobile-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--app-border, rgba(255, 255, 255, 0.08));
  background: var(--app-elevated, rgba(255, 255, 255, 0.02));
  flex-shrink: 0;
}

.mobile-panel-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--app-text-muted, #94a3b8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.4rem;
  transition: all 0.15s ease;
}

.mobile-panel-close:hover,
.mobile-panel-close:focus {
  background: rgba(255, 255, 255, 0.08);
  color: var(--app-text, #e2e8f0);
}

.mobile-panel-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--app-text, #e2e8f0);
  flex: 1;
  text-align: center;
  margin: 0 12px;
}

.mobile-panel-new,
.mobile-panel-explore {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.15s ease;
}

.mobile-panel-new:hover,
.mobile-panel-new:focus,
.mobile-panel-explore:hover,
.mobile-panel-explore:focus {
  background: rgba(59, 130, 246, 0.25);
}

/* Header action group (donation CTA + new/explore button) */
.mobile-panel-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Donation CTA badge in mobile panel headers - vibrant gradient to drive clicks */
.mobile-panel-donate {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #fb7185, #ec4899);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.5);
  transition: all 0.15s ease;
  animation: topbar-donate-heartbeat 2.4s ease-in-out infinite;
}

.mobile-panel-donate:hover,
.mobile-panel-donate:focus {
  background: linear-gradient(135deg, #f43f5e, #db2777);
  color: #fff;
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.65);
  transform: scale(1.06);
  animation-play-state: paused;
}

.mobile-panel-donate i {
  position: relative;
  z-index: 1;
}

/* Search bar */
.mobile-panel-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--app-border, rgba(255, 255, 255, 0.06));
  background: var(--app-elevated, rgba(255, 255, 255, 0.02));
  flex-shrink: 0;
}

.mobile-panel-search i {
  color: var(--app-text-muted, #94a3b8);
  font-size: 1.1rem;
}

.mobile-panel-search input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--app-text, #e2e8f0);
  font-size: 0.95rem;
  outline: none;
}

.mobile-panel-search input::placeholder {
  color: var(--app-text-muted, #94a3b8);
}

/* Lists container */
.mobile-conversations-list,
.mobile-rooms-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 0;
}

/* WhatsApp/Facebook style conversation item */
.mobile-conversation-item,
.mobile-room-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.mobile-conversation-item:hover,
.mobile-conversation-item:focus,
.mobile-room-item:hover,
.mobile-room-item:focus {
  background: rgba(255, 255, 255, 0.04);
}

.mobile-conversation-item:active,
.mobile-room-item:active {
  background: rgba(255, 255, 255, 0.08);
}

/* Avatar */
.mobile-conversation-avatar,
.mobile-room-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

#mobile-conversations-panel
  .mobile-conversation-avatar
  > .mobile-conversation-avatar-img,
#mobile-rooms-panel .mobile-room-avatar > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#mobile-conversations-panel
  .mobile-conversation-avatar
  .mobile-conversation-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.mobile-conversation-avatar-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  user-select: none;
}

.mobile-conversation-avatar.is-letter.sex-m {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.mobile-conversation-avatar.is-letter.sex-f {
  background: linear-gradient(135deg, #9d174d, #be185d);
}

.mobile-conversation-avatar.is-letter.sex-u {
  background: linear-gradient(135deg, #4c1d95, #6d28d9);
}

/* Online status indicator on avatar */
.mobile-conversation-status,
.mobile-room-status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--app-base, #0a0f1a);
}

.mobile-conversation-status.online,
.mobile-room-status.online {
  background: #22c55e;
}

#mobile-conversations-panel .mobile-conversation-status.offline,
#mobile-rooms-panel .mobile-room-status.offline {
  background: #6b7280;
  box-shadow: 0 0 0 1px rgba(107, 114, 128, 0.25);
}

#mobile-conversations-panel .mobile-conversation-status.away,
#mobile-rooms-panel .mobile-room-status.away {
  background: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.28);
}

#mobile-conversations-panel .mobile-conversation-status.busy,
#mobile-rooms-panel .mobile-room-status.busy {
  background: #ef4444;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.28);
}

#mobile-conversations-panel .mobile-conversation-status.online,
#mobile-rooms-panel .mobile-room-status.online {
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
}

/* Donation badge overlay on mobile conversation avatar — plain icon only,
   pinned TOP-RIGHT (bottom-right is the online-status dot). No ring,
   background, or shadow — matches the clean .ulm-donor-avatar-badge look. */
#mobile-conversations-panel .mobile-conversation-avatar {
  overflow: visible;
}
#mobile-conversations-panel .mobile-conversation-donation-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  bottom: auto;
  left: auto;
  width: 16px;
  height: 16px;
  border-radius: 0;
  object-fit: contain;
  z-index: 12;
  border: none;
  box-shadow: none;
  background: none;
  pointer-events: none;
}

/* Prevent generic avatar image rules from stretching the small donation badge */
#mobile-conversations-panel
  .mobile-conversation-avatar
  .mobile-conversation-donation-badge {
  width: 16px !important;
  height: 16px !important;
}

/* Content area */
.mobile-conversation-content,
.mobile-room-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-conversation-header,
.mobile-room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mobile-conversation-name,
.mobile-room-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--app-text, #e2e8f0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-conversation-time,
.mobile-room-users {
  font-size: 0.75rem;
  color: var(--app-text-muted, #94a3b8);
  flex-shrink: 0;
}

.mobile-conversation-preview,
.mobile-room-topic {
  font-size: 0.85rem;
  color: var(--app-text-muted, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

/* Preview text styling (last message) */
.mobile-conversation-preview {
  font-size: 0.8rem;
  opacity: 0.9;
}

.mobile-conversation-preview .message-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Messenger-like unread emphasis */
#mobile-conversations-panel
  .mobile-conversation-item.is-unread
  .mobile-conversation-name {
  font-weight: 700;
  color: var(--app-text, #f8fafc);
}

#mobile-conversations-panel
  .mobile-conversation-item.is-unread
  .mobile-conversation-preview {
  color: var(--app-text, #dbeafe);
  font-weight: 600;
}

#mobile-conversations-panel
  .mobile-conversation-item.is-unread
  .mobile-conversation-time {
  color: #60a5fa;
  font-weight: 600;
}

#mobile-conversations-panel .mobile-conversation-item.is-unread {
  background: rgba(37, 99, 235, 0.08);
}

#mobile-conversations-panel .mobile-conversation-item.is-unread:hover,
#mobile-conversations-panel .mobile-conversation-item.is-unread:active {
  background: rgba(59, 130, 246, 0.14);
}

#mobile-conversations-panel .mobile-conversation-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

/* Online users count badge */
.mobile-room-online-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 6px;
}

/* Three dots menu button */
.mobile-conversation-menu,
.mobile-room-menu {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--app-text-muted, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1;
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin-left: 4px;
}

.mobile-conversation-item:hover .mobile-conversation-menu,
.mobile-conversation-item:active .mobile-conversation-menu,
.mobile-room-item:hover .mobile-room-menu,
.mobile-room-item:active .mobile-room-menu {
  opacity: 1;
}

.mobile-conversation-menu:hover,
.mobile-room-menu:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--app-text, #e2e8f0);
}

/* Mobile rooms: quick favourite star (shown on right side) */
#mobile-rooms-panel .mobile-room-fav-toggle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  margin-left: 6px;
  margin-right: 2px;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

#mobile-rooms-panel .mobile-room-fav-toggle.is-active {
  color: #f59e0b;
}

#mobile-rooms-panel .mobile-room-fav-toggle:hover,
#mobile-rooms-panel .mobile-room-fav-toggle:focus-visible {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  transform: scale(1.12);
  outline: none;
}

/* ── Drawer favorites section headers ──────────────────────────────── */
.mcd-section-header {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-text-muted, #8a94a6);
  user-select: none;
  pointer-events: none;
}

.mcd-section-header--fav .ti-star-filled {
  color: #f59e0b;
  font-size: 11px;
}

.mcd-section-header--others {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* Favourite row — subtle tinted background */
.mobile-conversations-list .mobile-conversation-item.is-favourite {
  background: rgba(245, 158, 11, 0.05);
}

/* ── Quick star button on each drawer conversation row ──────────────── */
#mobile-conversations-panel .mcd-star-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: rgba(255, 255, 255, 0.28);
  transition:
    color 0.15s,
    transform 0.15s,
    background 0.15s;
  margin-left: 6px;
  margin-right: 2px;
  order: 3; /* keep at right side, before kebab menu */
}

/* Always show star button; highlight when active */
#mobile-conversations-panel
  .mobile-conversation-item.is-favourite
  .mcd-star-btn,
#mobile-conversations-panel .mcd-star-btn.is-active {
  display: flex;
  color: #f59e0b;
}

#mobile-conversations-panel .mcd-star-btn:hover,
#mobile-conversations-panel .mcd-star-btn:focus-visible {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  transform: scale(1.18);
  outline: none;
}

#mobile-conversations-panel .mcd-star-btn.is-active .ti-star-filled {
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.45));
}

/* Favourite item in the 3-dot dropdown menu */
.mcd-menu-fav-toggle .ti-star-filled {
  color: #f59e0b;
}

/* Slightly widen the row's padding-right to fit star + 3-dot comfortably */
.mobile-conversation-item {
  padding-right: 8px;
}

/* Dropdown menu styling for mobile panels */
.mobile-panel-dropdown-menu {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: var(--app-elevated, #1e293b);
  border: 1px solid var(--app-border, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  min-width: 160px;
  padding: 4px 0;
}

.mobile-panel-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--app-text, #e2e8f0);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  appearance: none;
  font-family: inherit;
}

.mobile-panel-dropdown-divider {
  height: 1px;
  background: var(--app-border, rgba(255, 255, 255, 0.1));
  margin: 6px 0;
}

.mobile-panel-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.mobile-panel-dropdown-item i {
  font-size: 1rem;
  color: var(--app-text-muted, #94a3b8);
}

.mobile-panel-dropdown-divider {
  height: 1px;
  background: var(--app-border, rgba(255, 255, 255, 0.1));
  margin: 4px 0;
}

/* Unread badge */
.mobile-conversation-badge,
.mobile-room-badge {
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #22c55e;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}

/* Unread message badge style */
.mobile-conversation-badge.unread {
  background: #3b82f6;
}

.mobile-conversation-badge.unread,
.mobile-room-badge.unread {
  background: #3b82f6;
}

/* Room type icon - like sidebar room icons */
.mobile-room-type {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-room-type.public {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.mobile-room-type.private {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.mobile-room-type.voice {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

/* Room users count badge */
.mobile-room-users {
  font-size: 0.75rem;
  color: var(--app-text-muted, #94a3b8);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 12px;
}

/* Section headers in lists - like sidebar CHATRUM header */
.mobile-panel-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--app-text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.mobile-panel-section-header i {
  font-size: 0.9rem;
}

#mobile-rooms-panel .mobile-panel-section-header--favourites .ti-star-filled {
  color: #f59e0b;
  opacity: 1;
}

/* Room card styling matching sidebar */
.mobile-room-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 2px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  background: transparent;
}

.mobile-room-item:hover,
.mobile-room-item:focus {
  background: rgba(255, 255, 255, 0.04);
}

.mobile-room-item:active {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(0.98);
}

/* Active room (currently in) styling */
.mobile-room-item.active-room,
.mobile-room-item.current-room {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Room name styling like sidebar */
.mobile-room-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--app-text, #e2e8f0);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Room topic/description under name */
.mobile-room-topic {
  font-size: 0.8rem;
  color: var(--app-text-muted, #94a3b8);
  margin-top: 2px;
  line-height: 1.3;
}

/* Premium (donator-only) section header */
.mobile-panel-section-header--premium {
  color: #f59e0b;
  background: linear-gradient(
    90deg,
    rgba(245, 158, 11, 0.08) 0%,
    transparent 100%
  );
  border-radius: 8px;
  margin: 4px 8px 0;
  padding: 10px 12px 8px;
}

.mobile-panel-section-header--premium i {
  color: #f59e0b;
}

/* Premium room card */
.mobile-room-item--premium {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.08) 0%,
    rgba(251, 191, 36, 0.04) 100%
  );
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.mobile-room-item--premium:hover,
.mobile-room-item--premium:focus {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.14) 0%,
    rgba(251, 191, 36, 0.08) 100%
  );
  border-color: rgba(245, 158, 11, 0.35);
}

.mobile-room-item--premium .mobile-room-type {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

/* Premium badge chip */
.mobile-room-premium-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: #1a1a1a;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
  text-transform: uppercase;
}

/* Empty state */
.mobile-panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--app-text-muted, #94a3b8);
}

.mobile-panel-empty i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.mobile-panel-empty p {
  font-size: 0.95rem;
  margin: 0;
}

/* Badge on topbar toggle buttons */
.mobile-toggle-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #22c55e;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--app-base);
  box-sizing: border-box;
}

/* Body scroll lock */
body.mobile-panel-open {
  overflow: hidden !important;
}

/* Desktop - hide mobile panels */
@media (min-width: 993px) {
  .mobile-conversations-panel,
  .mobile-rooms-panel {
    display: none !important;
  }
}

.mobile-room-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  align-self: center;
}

/* -
   iOS SPECIFIC FIXES for iPad/iPhone
   - */

/* iOS safe area insets for notch and home indicator */
@supports (padding-top: env(safe-area-inset-top)) {
  .ios-device .mobile-panel-drawer {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .ios-device .mobile-panel-header {
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .ios-device .mobile-conversations-list,
  .ios-device .mobile-rooms-list {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* iOS touch highlight removal */
.ios-device .mobile-conversation-item,
.ios-device .mobile-room-item,
.ios-device .mobile-panel-close,
.ios-device .mobile-panel-new,
.ios-device .mobile-panel-explore,
.ios-device .mobile-topbar-dropdown-item,
.ios-device .mobile-status-option {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/* iOS momentum scrolling for lists */
.ios-device .mobile-conversations-list,
.ios-device .mobile-rooms-list {
  -webkit-overflow-scrolling: touch;
}

/* iPad specific - wider drawer */
@supports (-webkit-touch-callout: default) {
  @media (min-width: 768px) and (max-width: 1024px) {
    .ios-ipad .mobile-panel-drawer {
      width: min(420px, 85vw);
      max-width: 85vw;
    }
  }
}

/* - Gruppe+ mobile toggle button (green) - */
#mobile-gruppe-toggle {
  color: #22c55e !important;
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.15) 0%,
    rgba(21, 128, 61, 0.1) 100%
  );
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 10px;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 8px;
  min-width: 44px;
}
#mobile-gruppe-toggle:hover,
#mobile-gruppe-toggle:active {
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.25) 0%,
    rgba(21, 128, 61, 0.2) 100%
  );
  border-color: rgba(34, 197, 94, 0.5);
  transform: scale(1.05);
}
#mobile-gruppe-toggle i {
  font-size: 1.2rem;
  color: #22c55e !important;
}
#mobile-gruppe-toggle::after {
  content: "Gruppe+";
  font-size: 9px;
  color: #22c55e;
  font-weight: 500;
  line-height: 1;
}

/* - Mobile Gruppe+ list items - */
.mobile-gruppe-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
}

.mgp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}
.mgp-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
.mgp-item-info {
  flex: 1;
  min-width: 0;
}
.mgp-item-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--app-text, #e2e8f0);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.mgp-item-meta {
  font-size: 0.78rem;
  color: var(--app-text-muted, #94a3b8);
  display: flex;
  gap: 10px;
  margin-top: 3px;
}
.mgp-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.mgp-badge-owner {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.mgp-badge-member {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.mgp-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.mgp-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 8px;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.mgp-action-enter {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.mgp-action-enter:hover {
  background: rgba(34, 197, 94, 0.28);
}
.mgp-action-join {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.mgp-action-join:hover {
  background: rgba(59, 130, 246, 0.28);
}
.mgp-manage-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--app-text-muted, #94a3b8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.15s ease;
}
.mgp-manage-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--app-text, #e2e8f0);
}

/* - Mobile Gruppe+ inline join popup - */
.mgp-join-popup {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3100;
  background: var(--app-elevated, #1e293b);
  border-top: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 18px 18px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.6);
  animation: mgp-popup-up 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes mgp-popup-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.mgp-join-popup-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--app-text, #e2e8f0);
  margin-bottom: 4px;
}
.mgp-join-popup-sub {
  font-size: 0.82rem;
  color: var(--app-text-muted, #94a3b8);
  margin-bottom: 14px;
}
.mgp-join-input-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.mgp-join-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  background: rgba(255, 255, 255, 0.06);
  color: var(--app-text, #e2e8f0);
  font-size: 1rem;
  outline: none;
}
.mgp-join-input:focus {
  border-color: rgba(59, 130, 246, 0.7);
  background: rgba(59, 130, 246, 0.08);
}
.mgp-join-submit {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: #3b82f6;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.mgp-join-submit:hover {
  background: #2563eb;
}
.mgp-join-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.mgp-join-error {
  font-size: 0.82rem;
  color: #f87171;
  margin-bottom: 8px;
  padding: 6px 10px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.mgp-join-cancel {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--app-text-muted, #94a3b8);
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s ease;
}
.mgp-join-cancel:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* - iOS iPad keyboard gap fix (all orientations incl. landscape) - */
/* iPad landscape is ~1024px wide - outside max-width:991.98px breakpoint. */
/* Apply unconditional height lock to iPads only; phones only when active.  */
html.ios-ipad body.v3-ui {
  height: var(--mobile-visual-vh, 100svh) !important;
  max-height: var(--mobile-visual-vh, 100svh) !important;
  overflow: hidden !important;
}
html.ios-device.mobile-composer-keyboard-active body.v3-ui,
html.ios-ipad.mobile-composer-keyboard-active body.v3-ui,
body.v3-ui.mobile-composer-keyboard-active {
  height: var(--mobile-visual-vh, 100svh) !important;
  max-height: var(--mobile-visual-vh, 100svh) !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
  position: static !important;
  inset: auto !important;
  width: auto !important;
}
html.ios-ipad body.v3-ui #wrapper,
html.ios-ipad body.v3-ui .app-shell,
html.ios-ipad body.v3-ui .app-main {
  height: var(--mobile-visual-vh, 100svh) !important;
  max-height: var(--mobile-visual-vh, 100svh) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
html.ios-device.mobile-composer-keyboard-active body.v3-ui #wrapper,
html.ios-device.mobile-composer-keyboard-active body.v3-ui .app-shell,
html.ios-device.mobile-composer-keyboard-active body.v3-ui .app-main {
  height: var(--mobile-visual-vh, 100svh) !important;
  max-height: var(--mobile-visual-vh, 100svh) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
/* Ensure no padding/margin creates phantom space below composer */
html.ios-device .room-editor,
html.ios-device .private-editor,
html.ios-device #chat-editor {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* iOS input zoom prevention */
.ios-device .mobile-panel-search input {
  font-size: 16px; /* Prevents zoom on focus */
}

/* iOS status bar fix for PWA */
.ios-device .mobile-panel-drawer {
  /* Add space for status bar in standalone/PWA mode */
  padding-top: max(12px, env(safe-area-inset-top, 20px));
}

/* Fix for iOS overscroll bounce - only prevent scroll, don't break layout */
.ios-device body.mobile-panel-open {
  overflow: hidden !important;
  touch-action: none;
}

/* Ensure composer is never hidden by panel states on mobile */
body.mobile-panel-open .app-main .room-editor,
body.mobile-panel-open .app-main .private-editor {
  display: flex !important;
}

body.mobile-panel-open.v3-ui #main-private .private-editor,
body.mobile-panel-open.v3-ui #main-private #chat-editor {
  visibility: visible !important;
  display: block !important;
}

/* ==========================================================================
   BINGO DOCK WIDGET  v3  -  2026 edition
   Desktop only (hidden on mobile via @media)

   Design: glassmorphism  animated gradient mesh  SVG bingo balls
           elastic CSS animations  Web Audio via JS  canvas confetti
   ========================================================================== */

/* - Custom properties - */
#bingo-dock {
  --bd-purple: #a855f7;
  --bd-indigo: #7c3aed;
  --bd-blue: #3b82f6;
  --bd-red: #ef4444;
  --bd-green: #22c55e;
  --bd-amber: #f59e0b;
  --bd-pink: #e879f9;
  --bd-surface: rgba(15, 10, 30, 0.82);
  --bd-border: rgba(168, 85, 247, 0.22);
  --bd-radius: 16px;
  --bd-shadow:
    0 -6px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(168, 85, 247, 0.14);

  /* HES-style green theme */
  --hes-primary: #10b981;
  --hes-primary-light: #34d399;
  --hes-primary-dark: #059669;
  --hes-secondary: #06b6d4;
  --hes-accent: #f59e0b;
  --hes-surface: rgba(16, 185, 129, 0.1);
  --hes-border: rgba(16, 185, 129, 0.3);
}

/* - Games dropdown trigger button - */
.games-topbar-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  height: 34px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c026d3 100%);
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(168, 85, 247, 0.45);
  transition:
    box-shadow 0.2s,
    transform 0.15s;
  animation: games-btn-idle 3s ease-in-out infinite;
}
.games-topbar-btn:hover,
.games-topbar-btn[aria-expanded="true"] {
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.7);
  transform: translateY(-1px) scale(1.03);
  animation: none;
}
.games-topbar-btn:active {
  transform: translateY(0) scale(0.98);
}
.games-topbar-btn[aria-expanded="true"] {
  border-radius: 20px 20px 14px 14px;
}
@keyframes games-btn-idle {
  0%,
  100% {
    box-shadow: 0 2px 12px rgba(168, 85, 247, 0.45);
  }
  50% {
    box-shadow: 0 4px 24px rgba(168, 85, 247, 0.8);
  }
}

.games-topbar-btn-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.games-topbar-icon {
  font-size: 17px;
  color: #a78bfa;
  flex-shrink: 0;
}
.games-topbar-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  gap: 2px;
}
.games-topbar-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.games-topbar-sub {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
}
.games-topbar-caret {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.games-topbar-btn[aria-expanded="true"] .games-topbar-caret {
  transform: rotate(180deg);
}
/* Shimmer sweep */
.games-topbar-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: games-btn-shine 2.2s linear infinite;
  pointer-events: none;
}
@keyframes games-btn-shine {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* -- World Cup 2026 topbar button -- */
.wc26-topbar-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 34px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, #14532d 0%, #166534 50%, #15803d 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(34, 197, 94, 0.45);
  transition:
    box-shadow 0.2s,
    transform 0.15s;
  animation: wc26-topbar-pulse 2.4s ease-in-out infinite;
  margin-left: 6px;
  z-index: 1;
}
.wc26-topbar-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 26px rgba(34, 197, 94, 0.6);
  animation: none;
}
.wc26-topbar-btn:active {
  transform: translateY(0) scale(0.98);
}
.wc26-topbar-btn.is-active {
  background: linear-gradient(135deg, #166534 0%, #16a34a 100%);
  box-shadow:
    0 0 0 2px rgba(74, 222, 128, 0.4),
    0 4px 18px rgba(34, 197, 94, 0.5);
  animation: none;
}
.wc26-topbar-icon {
  font-size: 18px;
  line-height: 1;
  animation: wc26-ball-bounce 0.9s ease-in-out infinite alternate;
  z-index: 1;
}
.wc26-topbar-pulse {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: games-btn-shine 2.2s linear infinite;
  pointer-events: none;
  z-index: 0;
}
.wc26-topbar-live-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  border: 2px solid #0f172a;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.35);
  animation: wc26-pulse-badge 1.4s ease-in-out infinite;
  z-index: 10;
  pointer-events: none;
}
@keyframes wc26-topbar-pulse {
  0%,
  100% {
    box-shadow: 0 4px 18px rgba(34, 197, 94, 0.45);
  }
  50% {
    box-shadow: 0 6px 28px rgba(74, 222, 128, 0.75);
  }
}
@keyframes wc26-ball-bounce {
  from {
    transform: translateY(0) rotate(0deg);
  }
  to {
    transform: translateY(-2px) rotate(10deg);
  }
}

/* Hide World Cup button on mobile — prevents overlap with Chat Match button */
@media (max-width: 767px) {
  .wc26-topbar-btn {
    display: none !important;
  }
}

/* Activity dot badge */
#bingo-topbar-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #1a1333;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.4);
  animation: bd-badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}
@keyframes bd-badge-pop {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* - Games dropdown menu - */
.games-dropdown-menu {
  min-width: 260px;
  padding: 6px;
  background: #1e1533;
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 14px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(168, 85, 247, 0.1);
  margin-top: 6px !important;
}
.games-dropdown-header {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  padding: 4px 10px 6px;
}

/* Individual game row */
.games-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}
.games-dropdown-item:hover {
  background: rgba(168, 85, 247, 0.14);
}
.games-dropdown-item:active {
  background: rgba(168, 85, 247, 0.22);
}
/* Dock is currently open for this game - show a persistent active state */
.games-dropdown-item.is-active {
  background: rgba(168, 85, 247, 0.18);
  outline: 1.5px solid rgba(168, 85, 247, 0.5);
  outline-offset: -1.5px;
}
.games-dropdown-item.is-active .games-dropdown-item-name {
  color: #e9d5ff;
}
/* Small "live" indicator dot when dock is open */
.games-dropdown-item.is-active::after {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 6px #a855f7;
  flex-shrink: 0;
  animation: games-item-live-pulse 1.6s ease-in-out infinite;
}
@keyframes games-item-live-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* Game icon circle */
.games-dropdown-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.games-dropdown-item-icon--bingo {
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  color: #fff;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.4);
}

/* Game name + description */
.games-dropdown-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.games-dropdown-item-name {
  font-size: 13px;
  font-weight: 700;
  color: #f3e8ff;
  white-space: nowrap;
}
.games-dropdown-item-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.42);
  white-space: nowrap;
}

/* "Prv Nu!" badge on the game row */
.games-dropdown-item-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Quest Log sticky row */
.games-dropdown-item--quest-log {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.18),
    rgba(139, 92, 246, 0.12)
  );
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 1;
}
.games-dropdown-item--quest-log:hover {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.3),
    rgba(139, 92, 246, 0.22)
  );
}
.games-dropdown-item-icon--quest {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.45);
}

/* XP Shop dropdown item */
.games-dropdown-item--xpshop {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.14),
    rgba(251, 191, 36, 0.08)
  );
}
.games-dropdown-item--xpshop:hover {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.26),
    rgba(251, 191, 36, 0.16)
  );
}
.games-dropdown-item-icon--xpshop {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.45);
}
.games-dropdown-item-badge--xpshop {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
}

/* XP Guide entry */
.games-dropdown-item--xpguide {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.12),
    rgba(99, 102, 241, 0.07)
  );
}
.games-dropdown-item--xpguide:hover {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.22),
    rgba(99, 102, 241, 0.14)
  );
}
.games-dropdown-item-icon--xpguide {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.4);
}

/* Chess game row */
.games-dropdown-item--chess,
.games-dropdown-item:has(.games-dropdown-item-icon--chess) {
  background: linear-gradient(
    135deg,
    rgba(148, 163, 184, 0.1),
    rgba(100, 116, 139, 0.06)
  );
}
.games-dropdown-item--chess:hover,
.games-dropdown-item:has(.games-dropdown-item-icon--chess):hover {
  background: linear-gradient(
    135deg,
    rgba(148, 163, 184, 0.18),
    rgba(100, 116, 139, 0.12)
  );
}
.games-dropdown-item-icon--chess {
  background: linear-gradient(135deg, #475569, #94a3b8);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(71, 85, 105, 0.5);
}

/* Bingo game row — tinted background to match xpshop/xpguide style */
.games-dropdown-item:has(.games-dropdown-item-icon--bingo) {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.12),
    rgba(192, 38, 211, 0.07)
  );
}
.games-dropdown-item:has(.games-dropdown-item-icon--bingo):hover {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.22),
    rgba(192, 38, 211, 0.14)
  );
}

/* Match Spillet (Hon) row */
.games-dropdown-item--hon {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.12),
    rgba(249, 115, 22, 0.07)
  );
}
.games-dropdown-item--hon:hover {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.22),
    rgba(249, 115, 22, 0.14)
  );
}
.games-dropdown-item-icon--hon {
  background: linear-gradient(135deg, #dc2626, #f97316);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.45);
}

/* Voice Channels row */
.games-dropdown-item:has(.games-dropdown-item-icon--voice) {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.1),
    rgba(99, 102, 241, 0.06)
  );
}
.games-dropdown-item:has(.games-dropdown-item-icon--voice):hover {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.2),
    rgba(99, 102, 241, 0.12)
  );
}
.games-dropdown-item-icon--voice {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.45);
}

/* Watch Together row */
.games-dropdown-item:has(.games-dropdown-item-icon--watch) {
  background: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.1),
    rgba(239, 68, 68, 0.06)
  );
}
.games-dropdown-item:has(.games-dropdown-item-icon--watch):hover {
  background: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.2),
    rgba(239, 68, 68, 0.12)
  );
}
.games-dropdown-item-icon--watch {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.45);
}

/* Light-theme overrides for new game rows */
html.theme-trueblue-light .games-dropdown-item--chess,
html.theme-trueblue-light
  .games-dropdown-item:has(.games-dropdown-item-icon--chess) {
  background: linear-gradient(
    135deg,
    rgba(148, 163, 184, 0.1),
    rgba(100, 116, 139, 0.06)
  );
}
html.theme-trueblue-light
  .games-dropdown-item:has(.games-dropdown-item-icon--bingo) {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.08),
    rgba(192, 38, 211, 0.05)
  );
}
html.theme-trueblue-light .games-dropdown-item--hon {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.09),
    rgba(249, 115, 22, 0.05)
  );
}

/* Thin separator between Quest Log and the game rows */
.games-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 2px 0;
}

/* -
   Dropdown XP Level Panel (gdxp) - gamified, animated
   - */

/* - keyframes - */
@keyframes gdxp-pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  70% {
    transform: scale(1.55);
    opacity: 0;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}
@keyframes gdxp-shimmer {
  0% {
    left: -60%;
  }
  100% {
    left: 120%;
  }
}
@keyframes gdxp-lvlup-in {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(6px);
  }
  60% {
    opacity: 1;
    transform: scale(1.08) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes gdxp-lvlup-out {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.85) translateY(-10px);
  }
}
@keyframes gdxp-float {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.9;
  }
  100% {
    transform: translateY(-38px) rotate(360deg);
    opacity: 0;
  }
}
@keyframes gdxp-badge-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.18);
  }
  70% {
    transform: scale(0.93);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes gdxp-bar-glow {
  0%,
  100% {
    box-shadow: 0 0 6px rgba(167, 139, 250, 0.5);
  }
  50% {
    box-shadow:
      0 0 14px rgba(167, 139, 250, 0.9),
      0 0 24px rgba(139, 92, 246, 0.4);
  }
}

/* - panel wrapper - */
.gdxp-panel {
  position: relative;
  overflow: hidden;
  padding: 14px 14px 11px;
  background: linear-gradient(
    155deg,
    rgba(79, 70, 229, 0.28) 0%,
    rgba(124, 58, 237, 0.18) 60%,
    rgba(192, 38, 211, 0.12) 100%
  );
  border-radius: 0;
}
/* subtle top border glow */
.gdxp-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    #818cf8,
    #a855f7,
    transparent
  );
  opacity: 0.6;
}

/* - floating sparkle particles - */
.gdxp-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.gdxp-particle {
  position: absolute;
  bottom: 0;
  font-size: 12px;
  animation: gdxp-float linear forwards;
  opacity: 0;
}

/* - level-up flash overlay - */
.gdxp-lvlup-flash {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    ellipse at center,
    rgba(167, 139, 250, 0.35) 0%,
    transparent 70%
  );
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}
.gdxp-lvlup-flash.is-active {
  animation:
    gdxp-lvlup-in 0.45s ease forwards,
    gdxp-lvlup-out 0.5s ease 1.4s forwards;
}
.gdxp-lvlup-text {
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  text-shadow:
    0 0 18px #a855f7,
    0 0 35px #818cf8;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* - top row - */
.gdxp-top {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

/* - level badge - */
.gdxp-badge {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow:
    0 0 0 2px rgba(139, 92, 246, 0.5),
    0 4px 16px rgba(79, 70, 229, 0.5);
  transition: background 0.5s ease;
}
.gdxp-badge.gdxp-badge--pop {
  animation: gdxp-badge-pop 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* tier colour variants */
.gdxp-badge--novice {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow:
    0 0 0 2px rgba(139, 92, 246, 0.5),
    0 4px 14px rgba(79, 70, 229, 0.5);
}
.gdxp-badge--adept {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  box-shadow:
    0 0 0 2px rgba(99, 102, 241, 0.6),
    0 4px 14px rgba(14, 165, 233, 0.45);
}
.gdxp-badge--master {
  background: linear-gradient(135deg, #059669, #0ea5e9);
  box-shadow:
    0 0 0 2px rgba(5, 150, 105, 0.6),
    0 4px 14px rgba(5, 150, 105, 0.45);
}
.gdxp-badge--titan {
  background: linear-gradient(135deg, #d97706, #ef4444);
  box-shadow:
    0 0 0 2px rgba(239, 68, 68, 0.6),
    0 4px 14px rgba(217, 119, 6, 0.5);
}
.gdxp-badge--cosmic {
  background: linear-gradient(135deg, #9333ea, #ec4899);
  box-shadow:
    0 0 0 2px rgba(236, 72, 153, 0.6),
    0 4px 14px rgba(147, 51, 234, 0.5);
}
.gdxp-badge--max {
  background: linear-gradient(135deg, #f59e0b, #ef4444, #9333ea);
  box-shadow:
    0 0 0 3px rgba(245, 158, 11, 0.7),
    0 0 22px rgba(245, 158, 11, 0.5);
  animation: gdxp-bar-glow 2s ease-in-out infinite;
}

/* pulsing ring behind badge */
.gdxp-badge-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(167, 139, 250, 0.55);
  animation: gdxp-pulse-ring 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}

.gdxp-badge-emoji {
  font-size: 17px;
  line-height: 1;
  margin-bottom: 0;
}
.gdxp-badge-lvl {
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  margin-top: 1px;
}
.gdxp-badge-label {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1;
}

/* - info column - */
.gdxp-info {
  flex: 1;
  min-width: 0;
}
.gdxp-rank-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.gdxp-rank {
  font-size: 13px;
  font-weight: 800;
  color: #e0d7ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gdxp-stars {
  font-size: 9px;
  letter-spacing: 0.5px;
  color: #f59e0b;
  white-space: nowrap;
  flex-shrink: 0;
}
.gdxp-pts {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.48);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* - quest log button - */
.gdxp-log-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 16px;
  transition:
    background 0.15s,
    color 0.15s,
    transform 0.15s;
}
.gdxp-log-btn:hover {
  background: rgba(139, 92, 246, 0.38);
  color: #fff;
  transform: scale(1.1);
}

/* - XP bar - */
.gdxp-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.gdxp-bar-track {
  flex: 1;
  height: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.gdxp-bar-fill {
  position: relative;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #818cf8, #a855f7, #ec4899);
  background-size: 200% 100%;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  animation: gdxp-bar-glow 2.5s ease-in-out infinite;
  overflow: hidden;
}
.gdxp-bar-shimmer {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%
  );
  animation: gdxp-shimmer 2s ease-in-out infinite;
  border-radius: 99px;
}
.gdxp-bar-pct {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  min-width: 30px;
  text-align: right;
}

/* - footer row (next level + streak) - */
.gdxp-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  position: relative;
  z-index: 1;
}
.gdxp-next {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.38);
}
.gdxp-next strong {
  color: rgba(255, 255, 255, 0.65);
  font-weight: 700;
}
.gdxp-streak {
  font-size: 10px;
  font-weight: 700;
  color: #fb923c;
  background: rgba(251, 146, 60, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.25);
  border-radius: 20px;
  padding: 1px 7px;
  white-space: nowrap;
}

/* Donation rank chip in XP dropdown */
.gdxp-donor-rank {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  margin: 4px 6px 0;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.gdxp-donor-rank-icon {
  font-size: 13px;
  color: #34d399;
  flex-shrink: 0;
}
.gdxp-donor-rank-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  flex: 1;
}
.gdxp-donor-rank-badge {
  font-size: 12px;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  padding: 1px 7px;
  white-space: nowrap;
}
.gdxp-donor-rank-cta {
  background: none;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s;
}
.gdxp-donor-rank-cta:hover {
  color: #34d399;
}

/* "Flere spil kommer snart" placeholder */
.games-dropdown-soon {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.22);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4px;
}

/* ── Light theme (trueblue-light) overrides for XP & Spil dropdown ──────────
   All base colours are rgba-white on dark bg; swap to dark-on-light.
──────────────────────────────────────────────────────────────────────────── */
html.theme-trueblue-light .games-dropdown-menu {
  background: #ffffff;
  border-color: rgba(124, 58, 237, 0.18);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(124, 58, 237, 0.08);
}
html.theme-trueblue-light .games-dropdown-header {
  color: rgba(0, 0, 0, 0.4);
}
html.theme-trueblue-light .games-dropdown-item-name {
  color: #1e1b4b;
}
html.theme-trueblue-light .games-dropdown-item-desc {
  color: rgba(0, 0, 0, 0.45);
}
html.theme-trueblue-light .games-dropdown-item:hover {
  background: rgba(124, 58, 237, 0.08);
}
html.theme-trueblue-light .games-dropdown-item:active {
  background: rgba(124, 58, 237, 0.14);
}
html.theme-trueblue-light .games-dropdown-item.is-active {
  background: rgba(124, 58, 237, 0.1);
}
html.theme-trueblue-light
  .games-dropdown-item.is-active
  .games-dropdown-item-name {
  color: #6d28d9;
}
html.theme-trueblue-light .games-dropdown-divider {
  background: rgba(0, 0, 0, 0.08);
}
html.theme-trueblue-light .games-dropdown-soon {
  color: rgba(0, 0, 0, 0.3);
  border-top-color: rgba(0, 0, 0, 0.07);
}

/* XP Level panel (gdxp) */
html.theme-trueblue-light .gdxp-panel {
  background: linear-gradient(
    155deg,
    rgba(79, 70, 229, 0.1) 0%,
    rgba(124, 58, 237, 0.07) 60%,
    rgba(192, 38, 211, 0.05) 100%
  );
}
html.theme-trueblue-light .gdxp-rank {
  color: #1e1b4b;
}
html.theme-trueblue-light .gdxp-pts {
  color: rgba(0, 0, 0, 0.5);
}
html.theme-trueblue-light .gdxp-bar-pct {
  color: rgba(0, 0, 0, 0.5);
}
html.theme-trueblue-light .gdxp-bar-track {
  background: rgba(0, 0, 0, 0.1);
}
html.theme-trueblue-light .gdxp-next {
  color: rgba(0, 0, 0, 0.4);
}
html.theme-trueblue-light .gdxp-next strong {
  color: rgba(0, 0, 0, 0.65);
}
html.theme-trueblue-light .gdxp-badge-label {
  color: rgba(255, 255, 255, 0.8);
}
html.theme-trueblue-light .gdxp-log-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.55);
}
html.theme-trueblue-light .gdxp-log-btn:hover {
  background: rgba(124, 58, 237, 0.18);
  color: #6d28d9;
}

/* Quest log item */
html.theme-trueblue-light .games-dropdown-item--quest-log {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.1),
    rgba(139, 92, 246, 0.06)
  );
}
html.theme-trueblue-light .games-dropdown-item--quest-log:hover {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.18),
    rgba(139, 92, 246, 0.12)
  );
}

/* XP Shop item */
html.theme-trueblue-light .games-dropdown-item--xpshop {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.1),
    rgba(251, 191, 36, 0.06)
  );
}
html.theme-trueblue-light .games-dropdown-item--xpshop:hover {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.18),
    rgba(251, 191, 36, 0.12)
  );
}

/* XP Guide item */
html.theme-trueblue-light .games-dropdown-item--xpguide {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.08),
    rgba(99, 102, 241, 0.05)
  );
}
html.theme-trueblue-light .games-dropdown-item--xpguide:hover {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.16),
    rgba(99, 102, 241, 0.1)
  );
}

/* Donor rank row */
html.theme-trueblue-light .gdxp-donor-rank {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.18);
}
html.theme-trueblue-light .gdxp-donor-rank-label {
  color: rgba(0, 0, 0, 0.55);
}
html.theme-trueblue-light .gdxp-donor-rank-cta {
  color: rgba(0, 0, 0, 0.3);
}
/* ── End light-theme XP & Spil overrides ─────────────────────────────────── */

/* - Dock container - Enhanced Android game colors */
#bingo-dock {
  position: fixed;
  bottom: 12px;
  right: 16px;
  z-index: 1085;
  width: 340px;
  max-height: calc(100dvh - 72px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: linear-gradient(135deg, #1a2e1a 0%, #0d1f0d 100%);
  border: 1px solid #2d5a2d;
  box-shadow:
    0 -8px 32px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(76, 175, 80, 0.3),
    inset 0 1px 0 rgba(76, 175, 80, 0.2);
  overflow: hidden;
  animation: bd-rise 0.3s ease-out;
  font-size: 14px;
  color: #fff;
  /* prevent text blurriness */
  transform: translateZ(0);
}
#bingo-dock[hidden] {
  display: none !important;
}

@keyframes bd-rise {
  from {
    transform: translateY(100%) translateZ(0);
    opacity: 0;
  }
  to {
    transform: translateY(0) translateZ(0);
    opacity: 1;
  }
}

/* - Simple background - */
.bingo-dock-mesh {
  display: none;
}
@keyframes bd-mesh {
  0% {
    background-position:
      0% 0%,
      100% 0%,
      100% 100%,
      0% 100%;
  }
  33% {
    background-position:
      60% 40%,
      40% 60%,
      50% 50%,
      50% 50%;
  }
  66% {
    background-position:
      100% 0%,
      0% 100%,
      0% 0%,
      100% 0%;
  }
  100% {
    background-position:
      0% 0%,
      100% 0%,
      100% 100%,
      0% 100%;
  }
}

/* Noise texture overlay for glass depth */
.bingo-dock-mesh::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.032;
  pointer-events: none;
}

/* All direct children of dock sit above mesh */
#bingo-dock > *:not(.bingo-dock-mesh) {
  position: relative;
  z-index: 1;
}

/* - Header - Enhanced Android game colors */
.bingo-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #2d5a2d;
  background: linear-gradient(135deg, #2d5a2d 0%, #1a3d1a 100%);
  flex-shrink: 0;
  user-select: none;
  box-shadow: inset 0 1px 0 rgba(76, 175, 80, 0.3);
}

.bingo-dock-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 900;
  letter-spacing: 0.1em;
}
.bingo-dock-icon {
  font-size: 18px;
  line-height: 1;
}
.bingo-dock-name {
  font-size: 14px;
  background: linear-gradient(90deg, #81c784, #66bb6a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.bingo-dock-pill {
  font-size: 10px;
  font-weight: 800;
  border-radius: 20px;
  padding: 2px 8px;
  letter-spacing: 0.02em;
  transition: background 0.25s;
}
.bingo-dock-pill--lobby {
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
}
.bingo-dock-pill--playing {
  background: rgba(168, 85, 247, 0.28);
  color: #d8b4fe;
}

.bingo-dock-header-actions {
  display: flex;
  align-items: center;
  gap: 1px;
}

/* - Game notification bar - */
.bingo-notif-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition:
    height 0.22s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.2s,
    color 0.2s;
  border-bottom: 1px solid transparent;
  position: relative;
}
.bingo-notif-bar:not([hidden]) {
  height: 34px;
}
.bingo-notif-bar[hidden] {
  display: flex !important; /* override Bootstrap hidden so transition works */
  height: 0;
  pointer-events: none;
  opacity: 0;
}
.bingo-notif-bar-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.bingo-notif-bar-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Type variants */
.bingo-notif-bar--info {
  background: rgba(168, 85, 247, 0.12);
  color: #d8b4fe;
  border-bottom-color: rgba(168, 85, 247, 0.2);
}
.bingo-notif-bar--success {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border-bottom-color: rgba(34, 197, 94, 0.2);
}
.bingo-notif-bar--warn {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border-bottom-color: rgba(245, 158, 11, 0.2);
}
.bingo-notif-bar--danger {
  background: rgba(239, 68, 68, 0.13);
  color: #fca5a5;
  border-bottom-color: rgba(239, 68, 68, 0.22);
}
.bingo-notif-bar--miss {
  background: rgba(239, 68, 68, 0.1);
  color: rgba(255, 255, 255, 0.55);
  border-bottom-color: rgba(239, 68, 68, 0.15);
}

/* Slide-in animation */
@keyframes bingo-notif-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.bingo-notif-bar:not([hidden]) {
  animation: bingo-notif-in 0.18s ease;
}

.bingo-dock-hbtn {
  background: rgba(102, 187, 106, 0.1);
  border: 1px solid rgba(102, 187, 106, 0.2);
  color: #a5d6a7;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition:
    color 0.12s,
    background 0.12s,
    transform 0.1s;
  line-height: 1;
}
.bingo-dock-hbtn:hover {
  color: #fff;
  background: rgba(102, 187, 106, 0.2);
  border-color: rgba(102, 187, 106, 0.4);
  transform: scale(1.05);
}

/* - Body - */
.bingo-dock-body {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.3) transparent;
}
.bingo-dock-body::-webkit-scrollbar {
  width: 4px;
}
.bingo-dock-body::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.35);
  border-radius: 4px;
}

/* - View switching - */
.bingo-view {
  display: block;
}
.bingo-view[hidden] {
  display: none !important;
}

/* - Idle view - */
.bingo-idle-hero {
  padding: 20px 16px 10px;
  text-align: center;
}

.bingo-idle-balls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 12px;
}

/* Each SVG ball bounces in sequence */
.bingo-idle-balls-row .bingo-deco-svg {
  animation: bd-ball-float 2.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
  transition: transform 0.15s;
}
.bingo-idle-balls-row .bingo-deco-svg:nth-child(1) {
  animation-delay: 0s;
}
.bingo-idle-balls-row .bingo-deco-svg:nth-child(2) {
  animation-delay: 0.18s;
}
.bingo-idle-balls-row .bingo-deco-svg:nth-child(3) {
  animation-delay: 0.36s;
}
.bingo-idle-balls-row .bingo-deco-svg:nth-child(4) {
  animation-delay: 0.54s;
}
.bingo-idle-balls-row .bingo-deco-svg:nth-child(5) {
  animation-delay: 0.72s;
}
.bingo-idle-balls-row .bingo-deco-svg:hover {
  transform: scale(1.22) rotate(-8deg);
}

@keyframes bd-ball-float {
  0%,
  100% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-7px);
  }
}

.bingo-idle-tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 12px;
}

.bingo-xp-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.bingo-xp-chip {
  font-size: 11px;
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 20px;
  padding: 4px 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.bingo-xp-chip--lose {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.22);
}
.bingo-xp-chip--win {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.22);
}

.bingo-idle-actions {
  padding: 0 14px 16px;
}

/* ── Enhanced Bingo idle: lobbies section ────────────────────────────────
   The scrollable list target is #bingo-idle-lobbies-list                   */
#bingo-idle-lobbies {
  margin: 0 16px 16px;
  background: linear-gradient(135deg, #1e3e1e 0%, #162d16 100%);
  border-radius: 10px;
  border: 1px solid rgba(102, 187, 106, 0.3);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(102, 187, 106, 0.2);
}
#bingo-idle-lobbies-list {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  max-height: 300px;
  scrollbar-width: thin;
  scrollbar-color: #66bb6a transparent;
}
#bingo-idle-lobbies-list::-webkit-scrollbar {
  width: 6px;
}
#bingo-idle-lobbies-list::-webkit-scrollbar-thumb {
  background: #66bb6a;
  border-radius: 3px;
}
#bingo-idle-lobbies-list::-webkit-scrollbar-track {
  background: transparent;
}

/* Enhanced lobby cards */
.ci-lobby-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 8px;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}
.ci-lobby-card:hover {
  background: rgba(102, 187, 106, 0.1);
  border-color: rgba(102, 187, 106, 0.4);
  transform: translateX(4px);
}
.ci-lobby-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #66bb6a;
  border-radius: 8px 0 0 8px;
  opacity: 0;
  transition: opacity 0.2s;
}
.ci-lobby-card:hover::before {
  opacity: 1;
}

/* ── Enhanced "Start nyt spil" toggle ────────────────────────────────── */
.bi-newgame-toggle {
  width: calc(100% - 32px);
  margin: 0 16px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 10px;
  border: 1px solid rgba(102, 187, 106, 0.3);
  background: linear-gradient(
    135deg,
    rgba(102, 187, 106, 0.1) 0%,
    rgba(76, 175, 80, 0.05) 100%
  );
  color: #81c784;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.bi-newgame-toggle:hover {
  background: linear-gradient(
    135deg,
    rgba(102, 187, 106, 0.15) 0%,
    rgba(76, 175, 80, 0.1) 100%
  );
  border-color: rgba(102, 187, 106, 0.5);
  transform: translateY(-1px);
}
.bi-newgame-toggle span {
  flex: 1;
}
.bi-newgame-toggle i:first-child {
  color: #66bb6a;
  font-size: 20px;
}
.bi-newgame-caret {
  font-size: 14px;
  transition: transform 0.2s;
  flex-shrink: 0;
  color: #66bb6a;
}
.bi-newgame-toggle[aria-expanded="true"] .bi-newgame-caret {
  transform: rotate(180deg);
}
.bi-newgame-body {
  display: none;
  padding: 0 16px;
}
.bi-newgame-body.is-open {
  display: block;
}

/* Enhanced call type selector */
.bingo-calltype-selector {
  margin: 16px 0;
}
.bingo-calltype-label-row {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bingo-calltype-btns {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.bingo-calltype-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s;
}
.bingo-calltype-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}
.bingo-calltype-btn.is-active {
  background: var(--hes-surface);
  border-color: var(--hes-primary);
  color: var(--hes-primary-light);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}
.bingo-calltype-icon {
  font-size: 24px;
}
.bingo-calltype-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bingo-calltype-desc {
  font-size: 11px;
  opacity: 0.7;
  text-align: center;
  line-height: 1.3;
}

/* - How-to guide - */
.bingo-guide {
  margin: 0 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(168, 85, 247, 0.18);
  overflow: hidden;
}
.bingo-guide-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(168, 85, 247, 0.08);
  border: none;
  cursor: pointer;
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  transition: background 0.15s;
}
.bingo-guide-toggle:hover {
  background: rgba(168, 85, 247, 0.14);
}
.bingo-guide-toggle i:first-child {
  font-size: 15px;
  flex-shrink: 0;
}
.bingo-guide-toggle span {
  flex: 1;
}
.bingo-guide-caret {
  font-size: 13px;
  transition: transform 0.22s;
  flex-shrink: 0;
}
.bingo-guide-toggle[aria-expanded="true"] .bingo-guide-caret {
  transform: rotate(180deg);
}

.bingo-guide-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(0, 0, 0, 0.15);
}
.bingo-guide-body[hidden] {
  display: none;
}

/* Section header */
.bingo-guide-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bingo-guide-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 2px;
}
.bingo-guide-section p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.65);
}

/* Numbered steps */
.bingo-guide-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bingo-guide-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.bingo-guide-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.bingo-guide-step-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bingo-guide-step-body strong {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}
.bingo-guide-step-body span {
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.52);
}
.bingo-guide-step-body em {
  color: #c4b5fd;
  font-style: normal;
  font-weight: 600;
}

/* Bullet list */
.bingo-guide-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bingo-guide-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
}

/* XP badge inside list */
.bingo-guide-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.bingo-guide-badge--win {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.bingo-guide-badge--lose {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.22);
}

/* - Lobby view - Enhanced Android game colors */
.bingo-lobby-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  background: linear-gradient(135deg, #1e3e1e 0%, #162d16 100%);
  border-bottom: 1px solid #2d5a2d;
  box-shadow: inset 0 1px 0 rgba(76, 175, 80, 0.2);
}
.bingo-lobby-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #81c784;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.bingo-lobby-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #66bb6a;
  box-shadow: 0 0 8px rgba(102, 187, 106, 0.6);
}

.bingo-lobby-subtitle {
  font-size: 12px;
  color: #a5d6a7;
  margin-top: 4px;
  font-weight: 500;
}

/* Enhanced player count badge */
.bingo-slot-open-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: #81c784;
  background: rgba(102, 187, 106, 0.15);
  border: 1px solid rgba(102, 187, 106, 0.3);
  border-radius: 16px;
  padding: 4px 12px;
  white-space: nowrap;
}

/* Enhanced player slots */
.bingo-lobby-players-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 18px 18px;
}
.bingo-player-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.2s;
}
.bingo-player-slot:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(102, 187, 106, 0.4);
  transform: translateX(2px);
}
.bingo-player-slot.is-filled {
  background: rgba(102, 187, 106, 0.15);
  border-color: rgba(102, 187, 106, 0.4);
}

/* Enhanced lobby actions */
.bingo-lobby-actions {
  padding: 18px;
  background: linear-gradient(135deg, #1a3d1a 0%, #0d260d 100%);
  border-top: 1px solid #2d5a2d;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bingo-lobby-actions .bingo-btn {
  font-size: 15px;
  padding: 14px 20px;
  border-radius: 8px;
}

/* Call type chip styling */
.bingo-calltype-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--hes-surface);
  border: 1px solid var(--hes-border);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--hes-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.bingo-calltype-chip::before {
  content: "🎯";
  font-size: 12px;
}

/* Loading and empty states */
.bingo-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: var(--bd-radius);
}
.bingo-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top: 3px solid var(--hes-primary);
  border-radius: 50%;
  animation: bingo-spin 1s linear infinite;
}
@keyframes bingo-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Success animations */
.bingo-success-pulse {
  animation: bingo-success 0.6s ease-out;
}
@keyframes bingo-success {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Enhanced tooltips */
.bingo-tooltip {
  position: relative;
}
.bingo-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 1000;
}
.bingo-tooltip:hover::after {
  opacity: 1;
}

/* Enhanced visual feedback for interactions */
.bingo-interactive {
  transition: all 0.2s;
}
.bingo-interactive:active {
  transform: scale(0.98);
}

/* Better status indicators */
.bingo-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bingo-status-indicator--online {
  background: var(--hes-surface);
  color: var(--hes-primary-light);
  border: 1px solid var(--hes-border);
}
.bingo-status-indicator--waiting {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.bingo-status-indicator--playing {
  background: rgba(168, 85, 247, 0.1);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.bingo-player-slot {
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition:
    background 0.18s,
    border-color 0.18s;
}
.bingo-player-slot.is-filled {
  background: rgba(124, 58, 237, 0.14);
  border-color: rgba(168, 85, 247, 0.3);
  animation: bd-slot-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bd-slot-in {
  from {
    transform: scale(0.88);
    opacity: 0.4;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.bingo-slot-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
  overflow: hidden;
}
.bingo-slot-av--img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.bingo-slot-av--empty {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}
.bingo-slot-name {
  font-size: 13px;
  font-weight: 600;
  color: #e9d5ff;
  flex: 1;
}
/* Sex / gender username colours - 1=male, 2=female, 3=trans, 4=couple, 5=other */
.bingo-name-sex-1 {
  color: #60a5fa;
} /* blue   */
.bingo-name-sex-2 {
  color: #f472b6;
} /* pink   */
.bingo-name-sex-3 {
  color: #a78bfa;
} /* violet */
.bingo-name-sex-4 {
  color: #fbbf24;
} /* amber  */
.bingo-name-sex-5 {
  color: #34d399;
} /* green  */
.bingo-name-sex-0 {
  color: #e9d5ff;
} /* default purple-tint */
.bingo-slot-name--empty {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 400;
}
.bingo-slot-badge {
  font-size: 11px;
  color: #86efac;
}

.bingo-lobby-actions {
  padding: 2px 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* - Playing view: spotlight - */
.bingo-spotlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 4px;
  position: relative;
  min-height: 108px; /* stable height - no layout jump between states */
}

/* - Active state (ball just drawn) - */
.bingo-spotlight-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.bingo-spotlight-active[hidden] {
  display: none !important;
}

/* Burst ring - one-shot expand on draw */
.bingo-spotlight-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: -45px 0 0 -45px;
  border: 3px solid rgba(168, 85, 247, 0.7);
  animation: bd-burst 0.55s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
  pointer-events: none;
}
@keyframes bd-burst {
  0% {
    transform: scale(0.3);
    opacity: 1;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

/* Soft glow ring behind the ball - loops gently */
.bingo-spotlight-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 82px;
  height: 82px;
  margin: -41px 0 0 -41px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(168, 85, 247, 0.3) 0%,
    transparent 70%
  );
  animation: bd-ring-breathe 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes bd-ring-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.2;
  }
}

/* Ball: bouncy drop-in, then gentle float */
.bingo-spotlight-ball {
  position: relative;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.55));
  animation:
    bd-ball-enter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
    bd-ball-float 2.8s ease-in-out 0.5s infinite;
}
@keyframes bd-ball-enter {
  0% {
    transform: translateY(-28px) scale(0.45) rotate(-30deg);
    opacity: 0;
  }
  60% {
    transform: translateY(4px) scale(1.08) rotate(4deg);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1) rotate(0deg);
    opacity: 1;
  }
}
@keyframes bd-ball-float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

.bingo-spotlight-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  margin-top: 7px;
  animation: bd-meta-in 0.35s ease 0.3s both;
}
@keyframes bd-meta-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.bingo-spotlight-col {
  font-size: 13px;
  font-weight: 800;
  color: #d8b4fe;
  letter-spacing: 0.04em;
}
.bingo-spotlight-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* - Waiting state (between draws) - */
.bingo-spotlight-waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}
.bingo-spotlight-waiting[hidden] {
  display: none !important;
}

/* Ghost ball: last drawn, small and faded */
.bingo-spotlight-ghost {
  opacity: 0.22;
  filter: grayscale(0.6) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
  transition: opacity 0.4s;
}

/* "Trkker nste nummer" text with animated dots */
.bingo-spotlight-next {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.03em;
}
.bingo-spotlight-dots::before {
  content: "";
  animation: bd-dots 1.4s steps(4, end) infinite;
}
@keyframes bd-dots {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75% {
    content: "...";
  }
}

/* - Playing view: card - */
.bingo-card {
  padding: 8px 12px 4px;
}
.bingo-card-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  margin-bottom: 3px;
}
.bingo-card-cols span {
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.bingo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
}

/* Card cells */
.bingo-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.55);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  cursor: default;
  user-select: none;
  transition:
    background 0.14s,
    border-color 0.14s,
    box-shadow 0.14s,
    transform 0.1s;
  position: relative;
  overflow: hidden;
}
.bingo-cell-num {
  line-height: 1;
}

/* FREE centre */
.bingo-cell--free {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  border-color: transparent;
  color: #fff;
}
.bingo-cell-free-star {
  font-size: 14px;
  line-height: 1;
}
.bingo-cell-free-txt {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
}

/* Drawn but not yet marked - passive state (older numbers, window closed) */
.bingo-cell--drawn {
  border-color: rgba(168, 85, 247, 0.5);
  color: #e9d5ff;
  background: rgba(168, 85, 247, 0.07);
}

/* Missed: window expired, player didn't click in time */
.bingo-cell--missed {
  cursor: default !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: rgba(255, 255, 255, 0.3) !important;
  background: rgba(239, 68, 68, 0.07) !important;
  animation: none !important;
  box-shadow: none !important;
  text-decoration: line-through;
}

/* Countdown ring SVG overlay on tappable cell */
.bingo-cell-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  transform: rotate(-90deg); /* start at top */
}
.bingo-cell-ring-arc {
  fill: none;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke 0.2s;
}
/* Arc turns red when < 30% time remains - driven by JS dashoffset */

/* Drawn + tappable: player needs to click this cell */
.bingo-cell--tappable {
  cursor: pointer;
  border-color: rgba(168, 85, 247, 0.85) !important;
  color: #fff !important;
  background: rgba(168, 85, 247, 0.18) !important;
  box-shadow:
    0 0 0 2px rgba(168, 85, 247, 0.45),
    inset 0 0 12px rgba(168, 85, 247, 0.12);
  animation: bd-tappable-pulse 1.1s ease-in-out infinite;
}
@keyframes bd-tappable-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 2px rgba(168, 85, 247, 0.45),
      inset 0 0 10px rgba(168, 85, 247, 0.1);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(168, 85, 247, 0.7),
      inset 0 0 18px rgba(168, 85, 247, 0.22);
  }
}
.bingo-cell--tappable:hover {
  transform: scale(1.12);
  background: rgba(168, 85, 247, 0.32) !important;
  box-shadow:
    0 0 0 3px rgba(168, 85, 247, 0.9),
    0 4px 16px rgba(168, 85, 247, 0.5) !important;
  animation: none;
}
.bingo-cell--tappable:active {
  transform: scale(0.96);
}

/* Column-colour overrides for tappable cells */
.bingo-cell--tappable.bingo-col-b {
  border-color: rgba(59, 130, 246, 0.9) !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}
.bingo-cell--tappable.bingo-col-i {
  border-color: rgba(239, 68, 68, 0.9) !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.5);
}
.bingo-cell--tappable.bingo-col-n {
  border-color: rgba(34, 197, 94, 0.9) !important;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.5);
}
.bingo-cell--tappable.bingo-col-g {
  border-color: rgba(245, 158, 11, 0.9) !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.5);
}
.bingo-cell--tappable.bingo-col-o {
  border-color: rgba(168, 85, 247, 0.9) !important;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.5);
}

/* Marked */
.bingo-cell--marked {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow:
    0 0 12px rgba(168, 85, 247, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: bd-cell-mark 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bd-cell-mark {
  from {
    transform: scale(0.65);
    opacity: 0.5;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Hide number text when cell is marked - checkmark replaces it */
.bingo-cell--marked .bingo-cell-num {
  visibility: hidden;
}

/* Checkmark overlay */
.bingo-cell-check {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  animation: bd-check-in 0.22s ease;
  z-index: 1;
}
@keyframes bd-check-in {
  from {
    transform: scale(0) rotate(-30deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* Spectator cell placeholder */
.bingo-cell--spectator {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.04);
}

/* Win line highlight - golden glow */
.bingo-cell--win {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%) !important;
  border-color: transparent !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.7) !important;
  animation: bd-win-glow 1.2s ease-in-out infinite alternate;
}
@keyframes bd-win-glow {
  from {
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.45);
  }
  to {
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.95);
  }
}

/* - Playing view: drawn balls - */
.bingo-drawn-section {
  padding: 6px 12px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.bingo-drawn-title {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.32);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.bingo-drawn-counter {
  color: rgba(255, 255, 255, 0.22);
}

.bingo-balls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 88px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.3) transparent;
}

/* Mini SVG ball wrapper */
.bingo-mini-ball-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  animation: bd-mini-in 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: transform 0.12s;
}
.bingo-mini-ball-wrap:hover {
  transform: scale(1.2);
}
@keyframes bd-mini-in {
  from {
    transform: scale(0) rotate(-30deg);
    opacity: 0;
  }
  to {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}
.bingo-mini-ball-wrap.bingo-ball--latest {
  transform: scale(1.28);
  filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.75));
}

/* - In-game player chips - */
.bingo-ingame-players {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 12px 8px;
}
.bingo-ingame-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 3px 9px 3px 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.bingo-ingame-av {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.bingo-ingame-av--img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.bingo-spectator-note {
  padding: 8px 14px 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.32);
  display: flex;
  align-items: center;
  gap: 6px;
}
.bingo-spectator-note[hidden] {
  display: none !important;
}

/* - Ended / result - */
.bingo-result-box {
  padding: 24px 16px 10px;
  text-align: center;
}
.bingo-result-emoji {
  font-size: 52px;
  line-height: 1;
  display: block;
  animation: bd-emoji-bounce 1s cubic-bezier(0.34, 1.56, 0.64, 1) infinite
    alternate;
}
@keyframes bd-emoji-bounce {
  from {
    transform: translateY(0) rotate(-6deg) scale(1);
  }
  to {
    transform: translateY(-8px) rotate(6deg) scale(1.06);
  }
}
.bingo-result-title {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.18em;
  background: linear-gradient(90deg, #fbbf24, #f87171, #a78bfa, #34d399);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: bd-title-shimmer 2.4s linear infinite;
  margin: 6px 0 4px;
}
@keyframes bd-title-shimmer {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 200% 50%;
  }
}
.bingo-result-winners {
  font-size: 14px;
  color: #e9d5ff;
  font-weight: 600;
  margin-bottom: 8px;
}
.bingo-result-xp {
  font-size: 16px;
}
.bingo-xp-won {
  font-weight: 900;
  font-size: 20px;
  color: #fbbf24;
}
.bingo-xp-part {
  font-weight: 700;
  color: #86efac;
}
.bingo-xp-lost {
  font-weight: 700;
  color: #f87171;
}
.bingo-ended-actions {
  padding: 0 14px 16px;
}

/* - Leaderboard - */
.bingo-leader-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.bingo-leader-back-btn {
  flex-shrink: 0;
}
.bingo-leader-title {
  font-size: 13px;
  font-weight: 800;
  color: #e9d5ff;
  letter-spacing: 0.04em;
}
.bingo-leader-body {
  padding: 6px 0 14px;
}
.bingo-leader-loading,
.bingo-leader-empty {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}
.bingo-leader-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.bingo-leader-table th {
  padding: 4px 12px;
  text-align: left;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
}
.bingo-leader-table td {
  padding: 7px 12px;
  color: #e9d5ff;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.bingo-leader-table tbody tr:hover td {
  background: rgba(168, 85, 247, 0.08);
}

/* - Buttons - Enhanced Android Material Design colors */
.bingo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}
.bingo-btn:active {
  transform: scale(0.96);
}

/* Enhanced primary button - Material Green */
.bingo-btn--primary {
  background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}
.bingo-btn--primary:hover {
  background: linear-gradient(135deg, #81c784 0%, #66bb6a 100%);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
  transform: translateY(-1px);
}

/* Enhanced accent button - Material Orange */
.bingo-btn--accent {
  background: linear-gradient(135deg, #ffb74d 0%, #ff9800 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}
.bingo-btn--accent:hover {
  background: linear-gradient(135deg, #ffcc80 0%, #ffb74d 100%);
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
  transform: translateY(-1px);
}

/* Enhanced ghost button */
.bingo-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #b0b0b0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}
.bingo-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* Enhanced danger button */
.bingo-btn--danger {
  background: linear-gradient(135deg, #ef5350 0%, #f44336 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}
.bingo-btn--danger:hover {
  background: linear-gradient(135deg, #e57373 0%, #ef5350 100%);
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
  transform: translateY(-1px);
}

.bingo-btn--full {
  width: 100%;
}

/* - Error message - */
.bingo-error-msg {
  margin: 4px 14px 8px;
  padding: 8px 12px;
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 12px;
}
.bingo-error-msg[hidden] {
  display: none !important;
}

/* - Light theme overrides - */
body.theme-trueblue-light #bingo-dock {
  --bd-surface: rgba(255, 255, 255, 0.88);
  --bd-border: rgba(124, 58, 237, 0.18);
  --bd-shadow: 0 -4px 32px rgba(0, 0, 0, 0.12);
  color: #1e293b;
}
body.theme-trueblue-light .bingo-dock-name {
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
}
body.theme-trueblue-light .bingo-player-slot {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}
body.theme-trueblue-light .bingo-player-slot.is-filled {
  background: rgba(124, 58, 237, 0.07);
}
body.theme-trueblue-light .bingo-cell {
  background: rgba(0, 0, 0, 0.04);
  color: #334155;
  border-color: rgba(0, 0, 0, 0.09);
}
body.theme-trueblue-light .bingo-cell--drawn {
  border-color: rgba(124, 58, 237, 0.45);
  color: #4c1d95;
  background: rgba(124, 58, 237, 0.05);
}
body.theme-trueblue-light .bingo-dock-header {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.1),
    rgba(168, 85, 247, 0.06)
  );
}
body.theme-trueblue-light .bingo-drawn-section {
  border-color: rgba(0, 0, 0, 0.07);
}
body.theme-trueblue-light .bingo-ingame-chip {
  background: rgba(0, 0, 0, 0.05);
  color: #475569;
  border-color: rgba(0, 0, 0, 0.07);
}
body.theme-trueblue-light .bingo-dock-hbtn {
  color: rgba(0, 0, 0, 0.4);
}
body.theme-trueblue-light .bingo-dock-hbtn:hover {
  color: #1e293b;
  background: rgba(0, 0, 0, 0.07);
}
body.theme-trueblue-light .bingo-xp-chip {
  background: rgba(124, 58, 237, 0.09);
  border-color: rgba(124, 58, 237, 0.18);
  color: #4c1d95;
}
body.theme-trueblue-light .bingo-idle-tagline {
  color: rgba(0, 0, 0, 0.45);
}
body.theme-trueblue-light .bingo-spectator-note {
  color: rgba(0, 0, 0, 0.35);
}
body.theme-trueblue-light .bingo-leader-title {
  color: #1e293b;
}
body.theme-trueblue-light .bingo-leader-table td {
  color: #334155;
}
body.theme-trueblue-light .bingo-dock-mesh {
  opacity: 0.35;
}

/* - Reduced motion - */
@media (prefers-reduced-motion: reduce) {
  .bingo-dock-mesh,
  .bingo-idle-balls-row .bingo-deco-svg,
  .bingo-spotlight-ring,
  .bingo-spotlight-burst,
  .bingo-spotlight-ball,
  .bingo-spotlight-meta,
  .bingo-spotlight-dots,
  .bingo-result-emoji,
  .bingo-result-title,
  .bingo-cell--win,
  .bingo-cell--marked,
  .bingo-cell-check,
  .bingo-mini-ball-wrap,
  .bingo-player-slot.is-filled {
    animation: none !important;
  }
}

/* - Enhanced responsive design - */
@media (max-width: 991px) {
  #topbarGamesDropdown {
    display: none !important;
  }
  /* Bingo dock: full-width, fixed above the composer on mobile */
  #bingo-dock {
    left: 0 !important;
    right: 0 !important;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    z-index: 1055;
    max-height: 70vh;
  }

  /* Enhanced mobile buttons */
  .bingo-btn {
    padding: 16px 24px;
    font-size: 16px;
    border-radius: 14px;
    min-height: 52px;
  }

  /* Mobile lobby enhancements */
  .bingo-lobby-header {
    padding: 20px 24px 16px;
  }
  .bingo-lobby-players-grid {
    padding: 16px 20px 20px;
  }
  .bingo-player-slot {
    padding: 16px 20px;
  }
  .bingo-lobby-actions {
    padding: 20px;
    gap: 12px;
  }

  /* Mobile call type selector */
  .bingo-calltype-btns {
    flex-direction: column;
    gap: 12px;
  }
  .bingo-calltype-btn {
    padding: 20px 16px;
  }

  /* Mobile lobby cards */
  .ci-lobby-card {
    padding: 16px 20px;
    margin: 12px;
  }
  #bingo-idle-lobbies-list {
    max-height: 300px;
  }

  /* Mobile filters */
  .ci-lobby-filters {
    padding: 16px 20px;
    flex-wrap: wrap;
  }
  .ci-filter-chip {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .bingo-btn {
    padding: 14px 20px;
    font-size: 15px;
    min-height: 48px;
  }

  .bingo-lobby-header {
    padding: 16px 20px 12px;
  }

  .bingo-calltype-btn {
    padding: 16px 12px;
  }
  .bingo-calltype-icon {
    font-size: 20px;
  }
  .bingo-calltype-name {
    font-size: 13px;
  }
}

/* Accessibility improvements */
.bingo-btn:focus-visible {
  outline: 2px solid var(--hes-primary);
  outline-offset: 2px;
}

.ci-filter-chip:focus-visible {
  outline: 2px solid var(--hes-primary);
  outline-offset: 2px;
}

.bingo-calltype-btn:focus-visible {
  outline: 2px solid var(--hes-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  #bingo-dock {
    border: 2px solid #fff;
  }

  .bingo-btn {
    border: 2px solid #fff;
  }

  .bingo-btn--primary {
    background: #000;
    color: #fff;
  }

  .bingo-btn--accent {
    background: #000;
    color: #fff;
  }
}

/* Reduced motion improvements */
@media (prefers-reduced-motion: reduce) {
  .bingo-dock-mesh,
  .bingo-idle-balls-row .bingo-deco-svg,
  .bingo-spotlight-ring,
  .bingo-spotlight-burst,
  .bingo-spotlight-ball,
  .bingo-spotlight-meta,
  .bingo-spotlight-dots,
  .bingo-result-emoji,
  .bingo-result-title,
  .bingo-cell--win,
  .bingo-cell--marked,
  .bingo-cell-check,
  .bingo-mini-ball-wrap,
  .bingo-player-slot.is-filled,
  .bingo-lobby-dot,
  .ci-lobby-card.highlight,
  .bingo-btn::before,
  .bi-newgame-toggle::before {
    animation: none !important;
  }

  .bingo-btn,
  .bingo-calltype-btn,
  .ci-lobby-card,
  .bingo-player-slot,
  .bi-newgame-toggle {
    transition: none !important;
  }
}

/* ==========================================================================
   BINGO  v4 additions - call-type selector  progress bar  toasts
                         column colour tinting  force-start btn  near-miss
   ========================================================================== */

/* - Call-type selector (idle screen) - */
.bingo-calltype-selector {
  padding: 0 14px 12px;
}
.bingo-calltype-label-row {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 7px;
}
.bingo-calltype-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.bingo-calltype-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  transition:
    background 0.14s,
    border-color 0.14s,
    color 0.14s,
    transform 0.1s;
}
.bingo-calltype-btn:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.35);
  color: #e9d5ff;
}
.bingo-calltype-btn.is-active {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.28),
    rgba(168, 85, 247, 0.16)
  );
  border-color: rgba(168, 85, 247, 0.6);
  color: #d8b4fe;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.25);
}
.bingo-calltype-btn:active {
  transform: scale(0.96);
}
.bingo-calltype-icon {
  font-size: 20px;
  line-height: 1;
}
.bingo-calltype-name {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.bingo-calltype-desc {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.32);
  text-align: center;
  line-height: 1.2;
}
.bingo-calltype-btn.is-active .bingo-calltype-desc {
  color: rgba(216, 180, 254, 0.5);
}

/* - Call-type chip (lobby / playing header) - */
.bingo-calltype-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px;
  padding: 2px 9px;
}

/* - Accent button (force-start) - */
.bingo-btn--accent {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
}
.bingo-btn--accent:hover {
  opacity: 0.9;
  box-shadow: 0 6px 22px rgba(34, 197, 94, 0.5);
}

/* - Playing meta bar (call type + progress) - */
.bingo-playing-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 0;
}
.bingo-progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bingo-progress-track {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.bingo-progress-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #e879f9);
  background-size: 200% 100%;
  transition: width 0.4s cubic-bezier(0.34, 1.28, 0.64, 1);
  animation: bd-progress-shimmer 2s linear infinite;
}
@keyframes bd-progress-shimmer {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 200% 50%;
  }
}
/* Hot (1 cell left) */
.bingo-progress-bar--hot {
  background: linear-gradient(90deg, #ef4444, #f59e0b, #ef4444);
  background-size: 200% 100%;
  animation: bd-progress-hot 0.7s linear infinite;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}
@keyframes bd-progress-hot {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 200% 50%;
  }
}
.bingo-progress-text {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.42);
}

/* - Card column colour tinting - */
.bingo-cell.bingo-col-b {
  --bd-cell-col: #3b82f6;
}
.bingo-cell.bingo-col-i {
  --bd-cell-col: #ef4444;
}
.bingo-cell.bingo-col-n {
  --bd-cell-col: #22c55e;
}
.bingo-cell.bingo-col-g {
  --bd-cell-col: #f59e0b;
}
.bingo-cell.bingo-col-o {
  --bd-cell-col: #a855f7;
}

/* Subtle tint on unmarked cells */
.bingo-cell.bingo-col-b:not(.bingo-cell--marked):not(.bingo-cell--free) {
  border-color: rgba(59, 130, 246, 0.22);
}
.bingo-cell.bingo-col-i:not(.bingo-cell--marked):not(.bingo-cell--free) {
  border-color: rgba(239, 68, 68, 0.22);
}
.bingo-cell.bingo-col-n:not(.bingo-cell--marked):not(.bingo-cell--free) {
  border-color: rgba(34, 197, 94, 0.22);
}
.bingo-cell.bingo-col-g:not(.bingo-cell--marked):not(.bingo-cell--free) {
  border-color: rgba(245, 158, 11, 0.22);
}
.bingo-cell.bingo-col-o:not(.bingo-cell--marked):not(.bingo-cell--free) {
  border-color: rgba(168, 85, 247, 0.22);
}

/* Drawn-but-not-marked: column colour border */
.bingo-cell.bingo-cell--drawn.bingo-col-b {
  border-color: rgba(59, 130, 246, 0.65);
  color: #93c5fd;
}
.bingo-cell.bingo-cell--drawn.bingo-col-i {
  border-color: rgba(239, 68, 68, 0.65);
  color: #fca5a5;
}
.bingo-cell.bingo-cell--drawn.bingo-col-n {
  border-color: rgba(34, 197, 94, 0.65);
  color: #86efac;
}
.bingo-cell.bingo-cell--drawn.bingo-col-g {
  border-color: rgba(245, 158, 11, 0.65);
  color: #fcd34d;
}
.bingo-cell.bingo-cell--drawn.bingo-col-o {
  border-color: rgba(168, 85, 247, 0.65);
  color: #d8b4fe;
}

/* - Fast-draw pill badge - */
.bingo-dock-pill--fast {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  animation: bd-pill-fast-pulse 0.9s ease-in-out infinite;
}
@keyframes bd-pill-fast-pulse {
  0%,
  100% {
    box-shadow: none;
  }
  50% {
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.55);
  }
}

/* - Near-miss result row - */
.bingo-result-nearmiss {
  margin-top: 8px;
  font-size: 13px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 9px;
  padding: 7px 12px;
  display: inline-block;
}

/* - Floating toasts - */
.bingo-toast {
  position: fixed;
  bottom: 90px;
  right: 30px;
  z-index: 2000;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 800;
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px) scale(0.85);
  transition:
    opacity 0.22s,
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.bingo-toast--in {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.bingo-toast--out {
  opacity: 0;
  transform: translateY(-16px) scale(0.92);
  transition:
    opacity 0.28s ease-in,
    transform 0.28s ease-in;
}

/* near-miss */
.bingo-toast--nearmiss {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  box-shadow: 0 6px 28px rgba(239, 68, 68, 0.45);
}
/* XP win */
.bingo-toast--xp {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  box-shadow: 0 6px 28px rgba(124, 58, 237, 0.45);
}
/* XP loss */
.bingo-toast--xp-loss {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  color: #fff;
  box-shadow: 0 6px 28px rgba(185, 28, 28, 0.45);
}
/* Missed mark window */
.bingo-toast--missed {
  background: linear-gradient(135deg, #374151, #1f2937);
  color: #f9fafb;
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}
/* Error */
.bingo-toast--error {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 4px 18px rgba(239, 68, 68, 0.3);
}

/* - Light theme additions - */
body.theme-trueblue-light .bingo-calltype-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: #475569;
}
body.theme-trueblue-light .bingo-calltype-btn.is-active {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.5);
  color: #4c1d95;
}
body.theme-trueblue-light .bingo-calltype-chip {
  background: rgba(124, 58, 237, 0.09);
  color: #4c1d95;
  border-color: rgba(124, 58, 237, 0.2);
}
body.theme-trueblue-light .bingo-calltype-label-row {
  color: rgba(0, 0, 0, 0.4);
}
body.theme-trueblue-light .bingo-progress-track {
  background: rgba(0, 0, 0, 0.09);
}
body.theme-trueblue-light .bingo-progress-text {
  color: rgba(0, 0, 0, 0.4);
}
body.theme-trueblue-light .bingo-result-nearmiss {
  color: #92400e;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.4);
}

/* - Reduced motion additions - */
@media (prefers-reduced-motion: reduce) {
  .bingo-progress-bar,
  .bingo-progress-bar--hot,
  .bingo-dock-pill--fast,
  .bingo-calltype-btn,
  .bingo-cell--tappable {
    animation: none !important;
    transition: none !important;
  }
  .bingo-toast {
    transition: none !important;
  }
}

/* - Host in-game controls (stop button) - */
.bingo-host-controls {
  padding: 4px 13px 12px;
}

.bingo-btn--danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}
.bingo-btn--danger:hover {
  opacity: 0.9;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.45);
}

/* - Ended screen: non-host waiting text - */
.bingo-ended-waiting {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
  padding: 6px 0 2px;
  margin: 0;
}
body.theme-trueblue-light .bingo-ended-waiting {
  color: rgba(0, 0, 0, 0.38);
}

/* ==========================================================================
   CHESS GAME DOCK — Android game style, kid-friendly
   ========================================================================== */

/* ── Dock container ─────────────────────────────────────────────────── */
#chess-dock {
  position: fixed;
  bottom: 12px;
  right: 16px;
  width: 360px;
  z-index: 1085;
  border-radius: 24px;
  background: linear-gradient(160deg, #1a0a2e 0%, #0f1b3d 60%, #0a1628 100%);
  border: 2px solid rgba(139, 92, 246, 0.35);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(139, 92, 246, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  font-family: inherit;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.chess-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(10, 8, 25, 0.55);
  border-bottom: 1px solid rgba(139, 92, 246, 0.18);
  flex-shrink: 0;
}
.chess-dock-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chess-dock-icon {
  font-size: 22px;
}
.chess-dock-name {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 0 12px rgba(167, 139, 250, 0.6);
}
.chess-dock-pill {
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  padding: 2px 9px;
  background: rgba(139, 92, 246, 0.28);
  color: #c4b5fd;
}
.chess-dock-header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
.chess-dock-hbtn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition:
    background 0.15s,
    color 0.15s,
    transform 0.12s;
}
.chess-dock-hbtn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.chess-dock-hbtn--close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}
.chess-dock-hbtn:active {
  transform: scale(0.86);
}

/* ── Notification toast ─────────────────────────────────────────────── */
.chess-notif-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  transition:
    height 0.2s,
    background 0.2s;
  border-bottom: 1px solid transparent;
  flex-shrink: 0;
}
.chess-notif-bar:not([hidden]) {
  height: 36px;
}
.chess-notif-bar[hidden] {
  display: flex !important;
  height: 0;
  pointer-events: none;
  opacity: 0;
}
.chess-notif-bar--info {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border-bottom-color: rgba(99, 102, 241, 0.25);
}
.chess-notif-bar--success {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  border-bottom-color: rgba(34, 197, 94, 0.25);
}
.chess-notif-bar--warn {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  border-bottom-color: rgba(245, 158, 11, 0.25);
}
.chess-notif-bar--danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border-bottom-color: rgba(239, 68, 68, 0.28);
}
.chess-notif-bar-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.chess-notif-bar-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Dock body ──────────────────────────────────────────────────────── */
.chess-dock-body {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 120px);
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.3) transparent;
}
.chess-dock-body::-webkit-scrollbar {
  width: 4px;
}
.chess-dock-body::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 2px;
}

/* ── Views ──────────────────────────────────────────────────────────── */
.chess-view {
  display: flex;
  flex-direction: column;
}
.chess-view[hidden] {
  display: none;
}
.chess-view:not([hidden]) {
  animation: cg-fadein 0.25s ease;
}
@keyframes cg-fadein {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .chess-view:not([hidden]) {
    animation: none;
  }
}

/* ════════════════════════════════════════════════════════════════════
   IDLE VIEW
   ════════════════════════════════════════════════════════════════════ */

/* Hero splash */
.cg-hero {
  position: relative;
  text-align: center;
  padding: 22px 16px 8px;
  overflow: hidden;
}
.cg-hero-pieces {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cg-floating-piece {
  position: absolute;
  font-size: 22px;
  opacity: 0.12;
  animation: cg-float 4s ease-in-out infinite;
}
.cg-fp1 {
  top: 10%;
  left: 8%;
  animation-delay: 0s;
  font-size: 26px;
}
.cg-fp2 {
  top: 20%;
  right: 10%;
  animation-delay: 0.8s;
  font-size: 20px;
}
.cg-fp3 {
  top: 55%;
  left: 5%;
  animation-delay: 1.4s;
  font-size: 18px;
}
.cg-fp4 {
  top: 15%;
  left: 45%;
  animation-delay: 2.1s;
  font-size: 24px;
}
.cg-fp5 {
  top: 60%;
  right: 8%;
  animation-delay: 0.4s;
  font-size: 22px;
}
@keyframes cg-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(8deg);
  }
}
.cg-hero-title {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.7);
  letter-spacing: 0.02em;
}
.cg-hero-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 4px;
}

/* Mode buttons */
.cg-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 14px 6px;
}
.cg-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 16px 10px 14px;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition:
    transform 0.15s,
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
  color: rgba(255, 255, 255, 0.7);
}
.cg-mode-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.09);
}
.cg-mode-btn:active {
  transform: scale(0.95);
}
.cg-mode-btn.is-active {
  border-color: #a78bfa;
  background: rgba(139, 92, 246, 0.22);
  box-shadow:
    0 0 0 3px rgba(139, 92, 246, 0.2),
    0 8px 24px rgba(139, 92, 246, 0.25);
  color: #fff;
}
.cg-mode-btn--friend.is-active {
  border-color: #34d399;
  background: rgba(52, 211, 153, 0.18);
  box-shadow:
    0 0 0 3px rgba(52, 211, 153, 0.2),
    0 8px 24px rgba(52, 211, 153, 0.2);
}
.cg-mode-btn--ai.is-active {
  border-color: #f472b6;
  background: rgba(244, 114, 182, 0.18);
  box-shadow:
    0 0 0 3px rgba(244, 114, 182, 0.2),
    0 8px 24px rgba(244, 114, 182, 0.2);
}
.cg-mode-icon {
  font-size: 28px;
  line-height: 1;
}
.cg-mode-label {
  font-size: 12px;
  font-weight: 800;
  color: #e2e8f0;
}
.cg-mode-xp {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 99px;
  padding: 2px 8px;
}
.cg-mode-btn.is-active .cg-mode-xp {
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.12);
}

/* Big green start button */
.cg-start-wrap {
  padding: 8px 14px 10px;
}
.cg-start-btn {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 0.03em;
  box-shadow:
    0 6px 20px rgba(34, 197, 94, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition:
    filter 0.15s,
    transform 0.12s,
    box-shadow 0.15s;
}
.cg-start-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 8px 28px rgba(34, 197, 94, 0.55);
}
.cg-start-btn:active {
  transform: scale(0.97);
}
.cg-start-btn[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

/* Lobby list */
.cg-lobbies {
  margin: 2px 14px 14px;
  border-radius: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.cg-lobbies-hdr {
  display: flex;
  align-items: center;
  padding: 8px 12px 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cg-lobbies-hdr-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.35);
}
.cg-lobbies-count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 99px;
  padding: 2px 8px;
}
.cg-lobbies-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}
.cg-lobbies-empty {
  padding: 20px 14px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.25);
  line-height: 1.8;
}
.cg-lobbies-empty small {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.18);
}
.cg-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2.5px solid rgba(255, 255, 255, 0.1);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: cg-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes cg-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Lobby cards */
.glc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
}
.glc:last-child {
  border-bottom: none;
}
.glc:hover {
  background: rgba(255, 255, 255, 0.04);
}
.glc--open {
  border-left: 3px solid #34d399;
}
.glc--playing {
  border-left: 3px solid #818cf8;
}
.glc-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.2);
  border: 2px solid rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.glc-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.glc-av-letter {
  font-size: 12px;
  font-weight: 800;
  color: #c4b5fd;
}
.glc-info {
  flex: 1;
  min-width: 0;
}
.glc-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e2e8f0;
}
.glc-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}
.glc-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  white-space: nowrap;
}
.glc-badge--open {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.25);
}
.glc-badge--playing {
  background: rgba(129, 140, 248, 0.15);
  color: #818cf8;
  border: 1px solid rgba(129, 140, 248, 0.25);
}
.glc-age {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.2);
}
.glc-actions {
  flex-shrink: 0;
}
.glc-join-btn {
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.14);
  color: #34d399;
  transition:
    background 0.15s,
    transform 0.12s;
  white-space: nowrap;
}
.glc-join-btn:hover:not([disabled]) {
  background: rgba(52, 211, 153, 0.25);
  transform: scale(1.05);
}
.glc-join-btn:active {
  transform: scale(0.95);
}
.glc-join-btn[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
}
.glc-join-btn--watch {
  border-color: rgba(129, 140, 248, 0.3);
  background: rgba(129, 140, 248, 0.1);
  color: #818cf8;
}
.glc-join-btn--watch:hover:not([disabled]) {
  background: rgba(129, 140, 248, 0.22);
}

/* ════════════════════════════════════════════════════════════════════
   LOBBY VIEW
   ════════════════════════════════════════════════════════════════════ */

.cg-lobby-hero {
  padding: 20px 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.cg-lobby-vs {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  justify-content: center;
}
.cg-lobby-player-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.cg-lobby-piece {
  font-size: 42px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.5));
  animation: cg-piece-bob 2s ease-in-out infinite;
}
.cg-lobby-piece--waiting {
  opacity: 0.3;
  animation: cg-piece-bob 2s ease-in-out infinite 0.5s;
}
@keyframes cg-piece-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
.cg-lobby-slot-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
}
.cg-lobby-vs-badge {
  font-size: 20px;
  font-weight: 900;
  color: #a78bfa;
  text-shadow: 0 0 16px rgba(167, 139, 250, 0.6);
  flex-shrink: 0;
}
.cg-lobby-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.cg-lobby-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.45);
  animation: cg-dot-bounce 1.2s ease infinite;
}
.cg-lobby-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.cg-lobby-dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes cg-dot-bounce {
  0%,
  80%,
  100% {
    transform: scale(0.7);
    opacity: 0.4;
  }
  40% {
    transform: scale(1.3);
    opacity: 1;
  }
}

.cg-lobby-players {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 14px 8px;
}
.cl-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
}
.cl-player--empty {
  border-style: dashed;
  opacity: 0.45;
}
.cl-player-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.2);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cl-player-name {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}
.cl-player-empty {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
}
.cl-color-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  white-space: nowrap;
}
.cl-color-chip--white {
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.cl-color-chip--black {
  background: rgba(30, 41, 59, 0.6);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.cg-lobby-count-row {
  display: flex;
  justify-content: center;
  padding: 0 14px 6px;
}
.cg-lobby-count-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 99px;
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1.5px solid rgba(139, 92, 246, 0.3);
}

.cg-invite-box {
  margin: 4px 14px 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
}
.cg-invite-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 7px;
}
.cg-invite-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cg-invite-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-family: monospace;
  outline: none;
  min-width: 0;
}
.cg-invite-copy-btn {
  flex-shrink: 0;
  background: rgba(139, 92, 246, 0.3);
  border: 1.5px solid rgba(139, 92, 246, 0.5);
  border-radius: 10px;
  color: #c4b5fd;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.12s;
}
.cg-invite-copy-btn:hover {
  background: rgba(139, 92, 246, 0.5);
}
.cg-invite-copy-btn:active {
  transform: scale(0.93);
}

.cg-lobby-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 14px 16px;
}

/* ════════════════════════════════════════════════════════════════════
   SHARED BUTTON SYSTEM
   ════════════════════════════════════════════════════════════════════ */
.cg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: none;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition:
    filter 0.15s,
    transform 0.12s,
    box-shadow 0.15s;
}
.cg-btn:active {
  transform: scale(0.96);
}
.cg-btn[hidden] {
  display: none;
}

.cg-btn--join {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 5px 18px rgba(34, 197, 94, 0.38);
}
.cg-btn--cancel {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1.5px solid rgba(239, 68, 68, 0.3);
}
.cg-btn--draw {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1.5px solid rgba(251, 191, 36, 0.3);
  width: auto;
  padding: 9px 16px;
  font-size: 13px;
  border-radius: 12px;
}
.cg-btn--resign {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  width: auto;
  padding: 9px 16px;
  font-size: 13px;
  border-radius: 12px;
}
.cg-btn--accept {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  font-size: 13px;
}
.cg-btn--decline {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  font-size: 13px;
}
.cg-btn--rematch {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  box-shadow: 0 5px 18px rgba(139, 92, 246, 0.38);
}
.cg-btn--newgame {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  box-shadow: 0 5px 18px rgba(59, 130, 246, 0.38);
}
.cg-btn--join:hover,
.cg-btn--rematch:hover,
.cg-btn--newgame:hover {
  filter: brightness(1.1);
}

/* ════════════════════════════════════════════════════════════════════
   PLAYING VIEW
   ════════════════════════════════════════════════════════════════════ */

/* Spectator banner */
.chess-spectator-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(251, 191, 36, 0.13);
  border-bottom: 1px solid rgba(251, 191, 36, 0.25);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 700;
}
.chess-spectator-label {
  display: flex;
  align-items: center;
  gap: 5px;
}
.chess-spectator-leave {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fbbf24;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.15s;
}
.chess-spectator-leave:hover {
  background: rgba(251, 191, 36, 0.3);
}

/* Player bars */
.cg-player-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  transition: background 0.2s;
}
.cg-player-bar--top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cg-player-bar--bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.cg-player-bar.is-my-turn {
  background: rgba(139, 92, 246, 0.12);
  border-left: 3px solid #a78bfa;
  padding-left: 11px;
}
.cg-player-bar.is-opponent-turn {
  border-left: 3px solid transparent;
  padding-left: 11px;
}
.cg-player-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cg-player-bar.is-my-turn .cg-player-avatar {
  box-shadow:
    0 0 0 2px #a78bfa,
    0 0 0 5px rgba(167, 139, 250, 0.25);
  animation: cg-avatar-glow 1.4s ease infinite;
}
@keyframes cg-avatar-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 2px #a78bfa,
      0 0 0 5px rgba(167, 139, 250, 0.25);
  }
  50% {
    box-shadow:
      0 0 0 2px #c4b5fd,
      0 0 0 8px rgba(167, 139, 250, 0.1);
  }
}
.cg-player-name {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.cg-color-pip {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}
.cg-color-pip--white {
  background: #f1f5f9;
}
.cg-color-pip--black {
  background: #1e293b;
}
.cg-turn-arrow {
  font-size: 11px;
  color: #a78bfa;
  flex-shrink: 0;
  animation: cg-dot-bounce 0.9s ease infinite;
}
.cg-turn-arrow--left {
  animation-direction: alternate;
}

/* Avatar images / letters */
.chess-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(139, 92, 246, 0.35);
}
.chess-avatar-letter {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* sex colors */
.chess-name-sex-0 {
  color: #e2e8f0;
}
.chess-name-sex-1 {
  color: #93c5fd;
}
.chess-name-sex-2 {
  color: #f9a8d4;
}
.chess-name-sex-3 {
  color: #86efac;
}
.chess-name-sex-4 {
  color: #fde68a;
}
.chess-name-sex-5 {
  color: #d8b4fe;
}

/* Captured pieces */
.chess-captured-row {
  display: flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 14px;
}
.chess-captured-pieces {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
}
.chess-cap-piece {
  width: 18px;
  height: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chess-cap-piece .chess-piece {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}
.chess-cap-empty {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.14);
}
.chess-mat-adv {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
}
.chess-mat-adv--white {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}
.chess-mat-adv--black {
  background: rgba(30, 41, 59, 0.5);
  color: #94a3b8;
}

/* Board */
.chess-board-wrap {
  position: relative;
  padding: 0 14px;
  line-height: 0;
}
.chess-board-wrap--sm {
  padding: 8px 14px;
}
.chess-board {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5);
  user-select: none;
}
.chess-board.is-my-turn {
  box-shadow:
    0 0 0 3px rgba(167, 139, 250, 0.6),
    0 6px 28px rgba(0, 0, 0, 0.5);
  animation: cg-board-glow 2s ease infinite;
}
.chess-board.is-opponent-turn {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5);
  animation: none;
}
@keyframes cg-board-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(167, 139, 250, 0.55),
      0 6px 28px rgba(0, 0, 0, 0.5);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(167, 139, 250, 0.2),
      0 6px 28px rgba(0, 0, 0, 0.5);
  }
}
.chess-board.is-in-check {
  animation: cg-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards;
}
@keyframes cg-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  15% {
    transform: translateX(-5px);
  }
  30% {
    transform: translateX(5px);
  }
  45% {
    transform: translateX(-4px);
  }
  60% {
    transform: translateX(4px);
  }
  75% {
    transform: translateX(-2px);
  }
  90% {
    transform: translateX(2px);
  }
}
.chess-sq {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.1s;
}
.chess-sq--light {
  background: #f0d9b5;
}
.chess-sq--dark {
  background: #b58863;
}
.chess-sq--selected {
  background: rgba(167, 139, 250, 0.6) !important;
}
.chess-sq--lastmove {
  background: rgba(250, 204, 21, 0.25) !important;
}
.chess-sq--check {
  background: rgba(239, 68, 68, 0.4) !important;
}
.chess-sq--legal::after {
  content: "";
  position: absolute;
  width: 30%;
  height: 30%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  pointer-events: none;
}
.chess-sq--legal-capture::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0;
  background: transparent;
  border: 3px solid rgba(0, 0, 0, 0.2);
  pointer-events: none;
}
.chess-board--readonly .chess-sq {
  cursor: default;
}

/* ── Chess pieces (CBurnett SVG) ─────────────────────────────────────── */
.chess-piece {
  display: block;
  width: 88%;
  height: 88%;
  user-select: none;
  pointer-events: none;
  transition: transform 0.08s ease;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}
.chess-piece svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chess-piece-fallback {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: clamp(22px, 4.2vw, 36px);
  line-height: 1;
  color: #0f172a;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55),
    0 2px 4px rgba(15, 23, 42, 0.35);
}
.chess-sq--dark .chess-piece-fallback {
  color: #111827;
}

.chess-sq:hover .chess-piece {
  transform: scale(1.08);
}
.chess-sq--selected .chess-piece {
  transform: scale(1.12);
}

/* Your-turn banner */
.chess-yourturn-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-radius: 18px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.55);
  transition:
    opacity 0.18s,
    transform 0.18s;
  white-space: nowrap;
  z-index: 10;
}
.chess-yourturn-banner.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: cg-banner-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes cg-banner-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  70% {
    transform: translate(-50%, -50%) scale(1.06);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
.chess-yourturn-icon {
  font-size: 20px;
  animation: cg-piece-bob 1.2s ease infinite;
}
.chess-yourturn-text {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
}
.chess-yourturn-banner.is-check {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 8px 32px rgba(220, 38, 38, 0.55);
}

/* Promotion overlay */
.chess-promo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 25, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 20;
  border-radius: 10px;
}
.chess-promo-title {
  font-size: 14px;
  font-weight: 800;
  color: #e2e8f0;
}
.chess-promo-pieces {
  display: flex;
  gap: 12px;
}
.chess-promo-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(139, 92, 246, 0.2);
  border: 2px solid rgba(139, 92, 246, 0.4);
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.12s;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
}
.chess-promo-btn:hover {
  background: rgba(139, 92, 246, 0.38);
  transform: scale(1.08);
}
.chess-promo-piece {
  width: 36px;
  height: 36px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chess-promo-piece .chess-piece {
  width: 100%;
  height: 100%;
}

/* Status bar */
.cg-status-bar {
  text-align: center;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
}

/* Move list */
.cg-moves-section {
  margin: 2px 14px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
  max-height: 90px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.2) transparent;
}
.cg-moves-title {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.2);
  padding: 5px 10px 3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  background: rgba(10, 8, 25, 0.85);
}
.cg-moves-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 8px;
}
.chess-move-num {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.2);
  padding: 1px 4px;
}
.chess-move-san {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  padding: 2px 5px;
  border-radius: 5px;
  cursor: default;
}
.chess-move-san--latest {
  background: rgba(167, 139, 250, 0.2);
  color: #c4b5fd;
}
.chess-move-san--w {
  color: rgba(255, 255, 255, 0.75);
}
.chess-move-san--b {
  color: rgba(200, 200, 255, 0.65);
}

/* Reactions */
.cg-reactions {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 4px 14px 8px;
}
.cg-reaction-btn {
  font-size: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.12s;
}
.cg-reaction-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.15);
}
.cg-reaction-btn:active {
  transform: scale(0.9);
}

/* In-game buttons */
.cg-ingame-btns {
  display: flex;
  gap: 8px;
  padding: 2px 14px 10px;
  justify-content: center;
}

/* Draw offer */
.cg-draw-offer {
  margin: 4px 14px 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.1);
  border: 1.5px solid rgba(251, 191, 36, 0.3);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.cg-draw-offer-text {
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
  text-align: center;
}
.cg-draw-offer-btns {
  display: flex;
  gap: 8px;
  width: 100%;
}

/* Result hero */
.cg-result-hero {
  text-align: center;
  padding: 24px 14px 14px;
}
.cg-result-emoji {
  font-size: 52px;
  line-height: 1;
  animation: cg-result-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes cg-result-pop {
  0% {
    transform: scale(0.2) rotate(-20deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}
.cg-result-title {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin-top: 10px;
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.5);
}
.cg-result-reason {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 5px;
}
.cg-result-xp {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 800;
  color: #fbbf24;
}
.cg-end-btns {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 6px 14px 20px;
}
.cg-btn--lobby {
  background: linear-gradient(145deg, #1f2937, #111827);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}
.cg-btn--lobby:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.45);
}

/* Avatar helpers */
.chess-lobby-av .chess-avatar-img,
.chess-lobby-av .chess-avatar-letter,
.cl-player-av .chess-avatar-img,
.cl-player-av .chess-avatar-letter {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* Reaction float animation */
.chess-reaction-float {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  pointer-events: none;
  animation: cg-reaction-fly 1.6s ease forwards;
  z-index: 30;
}
@keyframes cg-reaction-fly {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -120%) scale(1.4);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -180%) scale(1);
  }
}

/* Lobby avatars */
.chess-lobby-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.2);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile */
@media (max-width: 991px) {
  #chess-dock {
    left: 0 !important;
    right: 0 !important;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    z-index: 1055;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cg-lobby-dots span,
  .cg-lobby-piece,
  .cg-floating-piece,
  .chess-board.is-my-turn,
  .cg-player-bar.is-my-turn .cg-player-avatar,
  .chess-yourturn-banner.is-visible,
  .chess-yourturn-icon {
    animation: none !important;
  }
  .chess-yourturn-banner.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* - No backdrop-filter on any modal element - */
.modal,
.modal .modal-content {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* ==========================================================================
   MOBILE XP & SPIL - topbar button + bottom sheet
   ========================================================================== */

/* - Topbar button - */
.mobile-xp-spil-btn {
  display: none; /* hidden on desktop */
  position: relative;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: none;
  background: rgba(168, 85, 247, 0.18);
  color: #a855f7;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background 0.12s,
    transform 0.1s;
}
.mobile-xp-spil-btn:active {
  transform: scale(0.91);
  background: rgba(168, 85, 247, 0.28);
}
.mobile-xp-spil-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f43f5e;
  border: 1.5px solid #7c3aed;
}

/* XP count chip inside the button */

@media (max-width: 991px) {
  .mobile-xp-spil-btn {
    display: inline-flex;
  }
}

/* - Drawer nav: game icon colours - */
.mobile-nav-icon--bingo {
  color: #34d399;
}
.mobile-nav-icon--chess {
  color: #93c5fd;
}

.mobile-nav-game-badge {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f43f5e;
  flex-shrink: 0;
}

/* - Bottom sheet backdrop - */
.mxs-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1059;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mxs-backdrop.is-open {
  opacity: 1;
}

/* - Bottom sheet - */
.mxs-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1060;
  background: #1e1a2e;
  border-radius: 20px 20px 0 0;
  padding: 0 0 env(safe-area-inset-bottom, 0);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 1, 0.24, 1);
  will-change: transform;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* sheet itself doesn't scroll */
}

/* On mobile, sit above the composer bar so content isn't hidden behind it */
@media (max-width: 991px) {
  .mxs-sheet {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    max-height: calc(85vh - 68px - env(safe-area-inset-bottom, 0px));
    border-radius: 20px 20px 0 0;
  }
}
.mxs-sheet.is-open {
  transform: translateY(0);
}

/* scrollable content area inside the sheet */
.mxs-sheet-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  flex: 1 1 auto;
  min-height: 0;
  touch-action: pan-y;
}

/* drag handle */
.mxs-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin: 10px auto 4px;
  cursor: grab;
  touch-action: none;
  /* bigger tap target without affecting layout */
  padding: 10px 20px;
  box-sizing: content-box;
  margin-left: auto;
  margin-right: auto;
}

/* header */
.mxs-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mxs-header-icon {
  font-size: 18px;
  color: #a855f7;
  line-height: 1;
}
.mxs-header-title {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.mxs-close {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}
.mxs-close:active {
  background: rgba(255, 255, 255, 0.15);
}

/* XP balance row */
.mxs-xp-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.2),
    rgba(168, 85, 247, 0.08)
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mxs-xp-coin {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.mxs-xp-val {
  font-size: 20px;
  font-weight: 900;
  color: #e9d5ff;
  line-height: 1;
}
.mxs-xp-unit {
  font-size: 11px;
  font-weight: 700;
  color: rgba(233, 213, 255, 0.6);
  align-self: flex-end;
  margin-bottom: 2px;
}
.mxs-xp-level {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}

/* action buttons */
.mxs-actions {
  padding: 8px 0 12px;
}

.mxs-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  border: none;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
}
.mxs-action-btn:active {
  background: rgba(255, 255, 255, 0.06);
}
.mxs-action-btn + .mxs-action-btn {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mxs-action-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.mxs-action--xp .mxs-action-icon {
  background: rgba(124, 58, 237, 0.25);
  color: #c084fc;
}
.mxs-action--shop .mxs-action-icon {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}
.mxs-action--bingo .mxs-action-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.mxs-action--chess .mxs-action-icon {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}
.mxs-action--chest .mxs-action-icon {
  background: rgba(251, 191, 36, 0.18);
  color: #fcd34d;
}
/* Tiny CSS chest for mxs sheet button */
.mxs-tc-mini {
  display: inline-block;
  position: relative;
  width: 22px;
  height: 18px;
}
.mxs-tc-mini::before {
  /* lid */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 9px;
  background: linear-gradient(160deg, #b45309, #92400e);
  border-radius: 3px 3px 1px 1px;
  border: 1.5px solid #451a03;
  border-bottom: none;
}
.mxs-tc-mini::after {
  /* body */
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 11px;
  background: linear-gradient(160deg, #92400e, #78350f);
  border-radius: 1px 1px 3px 3px;
  border: 1.5px solid #451a03;
  box-shadow: inset 0 2px 0 rgba(251, 191, 36, 0.25);
}

.mxs-action-body {
  flex: 1;
  min-width: 0;
}
.mxs-action-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
.mxs-action-desc {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

.mxs-action-arr {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.mxs-bingo-badge {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f43f5e;
  position: absolute;
  top: 12px;
  right: 38px;
}

/* Light theme overrides */
body.theme-trueblue-light .mxs-sheet {
  background: #f5f3ff;
  color: #1e1b4b;
}
body.theme-trueblue-light .mxs-header-title {
  color: #1e1b4b;
}
body.theme-trueblue-light .mxs-action-btn {
  color: #1e1b4b;
}
body.theme-trueblue-light .mxs-action-desc {
  color: rgba(30, 27, 75, 0.5);
}
body.theme-trueblue-light .mxs-action-btn + .mxs-action-btn {
  border-top-color: rgba(0, 0, 0, 0.06);
}
body.theme-trueblue-light .mxs-xp-val {
  color: #4c1d95;
}
body.theme-trueblue-light .mxs-xp-unit {
  color: rgba(76, 29, 149, 0.6);
}
body.theme-trueblue-light .mxs-close {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.5);
}
body.theme-trueblue-light .mxs-handle {
  background: rgba(0, 0, 0, 0.15);
}

/* ====
   WORLD CUP 2026 DOCK  v3 - Premium Live Experience
   - Hero live card with animated score flash
   - Confetti burst on goal
   - Goal toast notification
   - Real flag images (flagcdn.com WebP)
   - Draggable on desktop
   ==== */

/* -- Design tokens -- */
:root {
  --wc26-bg: #0a1a0f;
  --wc26-surface: #0d1f12;
  --wc26-surface2: #122318;
  --wc26-surface3: #1a2f1f;
  --wc26-border: rgba(34, 197, 94, 0.2);
  --wc26-border2: rgba(34, 197, 94, 0.1);
  --wc26-accent: #22c55e;
  --wc26-accent2: #4ade80;
  --wc26-live: #ef4444;
  --wc26-live2: #fca5a5;
  --wc26-gold: #fbbf24;
  --wc26-text: #e2f5e8;
  --wc26-text2: #a3c4aa;
  --wc26-muted: rgba(163, 196, 170, 0.55);
  --wc26-radius: 14px;
  --wc26-shadow:
    0 -6px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(34, 197, 94, 0.15);
  --wc26-width: 360px;
}

/* -- Games dropdown entry -- */
.games-dropdown-divider {
  height: 1px;
  background: rgba(168, 85, 247, 0.18);
  margin: 4px 6px;
}
.games-dropdown-item-icon--wc26 {
  background: linear-gradient(135deg, #16a34a, #15803d);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(34, 197, 94, 0.4);
}

/* -- Dock shell -- */
#wc26-dock {
  position: fixed;
  bottom: 12px;
  right: 16px;
  z-index: 1085;
  width: var(--wc26-width);
  /* Explicit height required so flex children can fill remaining space.
     max-height caps it on short screens. */
  height: 560px;
  max-height: calc(100dvh - 68px);
  display: flex;
  flex-direction: column;
  border-radius: var(--wc26-radius);
  background: var(--wc26-surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--wc26-border);
  box-shadow: var(--wc26-shadow);
  overflow: hidden;
  animation: wc26-rise 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) both;
  font-size: 13px;
  color: var(--wc26-text);
  transform: translateZ(0);
  will-change: transform;
}
#wc26-dock[hidden] {
  display: none !important;
}

@keyframes wc26-rise {
  from {
    transform: translateY(110%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.wc26-dock--closing {
  animation: wc26-drop 0.22s cubic-bezier(0.4, 0, 1, 1) both !important;
}
@keyframes wc26-drop {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(110%);
    opacity: 0;
  }
}

/* -- Pitch mesh -- */
.wc26-dock-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 90% 50% at 50% -10%,
      rgba(34, 197, 94, 0.16) 0%,
      transparent 60%
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 28px,
      rgba(34, 197, 94, 0.03) 28px,
      rgba(34, 197, 94, 0.03) 29px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 28px,
      rgba(34, 197, 94, 0.03) 28px,
      rgba(34, 197, 94, 0.03) 29px
    );
  border-radius: inherit;
  z-index: 0;
}

/* -- Goal toast -- */
.wc26-goal-toast {
  position: absolute;
  top: -56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: linear-gradient(135deg, #15803d, #166534);
  border: 1px solid rgba(74, 222, 128, 0.5);
  border-radius: 12px;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition:
    top 0.35s cubic-bezier(0.34, 1.28, 0.64, 1),
    opacity 0.35s;
  pointer-events: none;
  min-width: 200px;
  max-width: 340px;
}
.wc26-toast--hidden {
  top: -56px;
  opacity: 0;
}
.wc26-toast--show {
  top: 8px;
  opacity: 1;
}
.wc26-toast-ball {
  font-size: 22px;
  animation: wc26-ball-bounce 0.5s ease infinite alternate;
}
@keyframes wc26-ball-bounce {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-4px);
  }
}
.wc26-toast-body small {
  opacity: 0.8;
  font-weight: 400;
}

/* -- Header -- */
.wc26-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 12px;
  height: 46px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--wc26-border);
  position: relative;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(16, 36, 20, 0.9) 0%,
    rgba(13, 31, 18, 0.75) 100%
  );
  user-select: none;
}
.wc26-dock-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}
.wc26-dock-icon {
  font-size: 19px;
  line-height: 1;
}
.wc26-dock-name {
  background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.3px;
}
.wc26-dock-subtitle {
  font-size: 10px;
  font-weight: 400;
  color: var(--wc26-muted);
  letter-spacing: 0.2px;
  margin-left: 2px;
  margin-top: 2px;
  align-self: flex-end;
  padding-bottom: 2px;
}
.wc26-live-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--wc26-live);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  animation: wc26-pulse-badge 1.4s ease-in-out infinite;
}
@keyframes wc26-pulse-badge {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
}
.wc26-dock-header-actions {
  display: flex;
  gap: 2px;
}
.wc26-hbtn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--wc26-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition:
    background 0.15s,
    color 0.15s;
}
.wc26-hbtn:hover {
  background: rgba(34, 197, 94, 0.16);
  color: #fff;
}

/* -- Tabs -- */
.wc26-tabs {
  display: flex;
  height: 36px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--wc26-border);
  background: rgba(10, 26, 15, 0.7);
  position: relative;
  z-index: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.wc26-tabs::-webkit-scrollbar {
  display: none;
}
.wc26-tab {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--wc26-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 6px;
  transition:
    color 0.15s,
    background 0.15s;
  white-space: nowrap;
}
.wc26-tab:hover {
  color: var(--wc26-text);
  background: rgba(34, 197, 94, 0.07);
}
.wc26-tab--active {
  color: var(--wc26-accent);
  box-shadow: inset 0 -2px 0 var(--wc26-accent);
  background: rgba(34, 197, 94, 0.05);
}

/* -- Body -- */
.wc26-dock-body {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 197, 94, 0.25) transparent;
  transition: max-height 0.25s ease;
}
.wc26-dock-body::-webkit-scrollbar {
  width: 4px;
}
.wc26-dock-body::-webkit-scrollbar-thumb {
  background: rgba(34, 197, 94, 0.25);
  border-radius: 2px;
}
.wc26-body--collapsed {
  max-height: 0 !important;
  overflow: hidden;
}
.wc26-view {
  padding: 6px 0 8px;
}

/* -- Footer -- */
.wc26-dock-footer {
  flex-shrink: 0;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--wc26-muted);
  border-top: 1px solid var(--wc26-border);
  background: rgba(10, 26, 15, 0.8);
  position: relative;
  z-index: 1;
  gap: 3px;
}

/* -- Section labels -- */
.wc26-section-label {
  padding: 6px 12px 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--wc26-accent);
  display: flex;
  align-items: center;
  gap: 6px;
}
.wc26-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wc26-live);
  flex-shrink: 0;
  animation: wc26-blink 0.9s ease-in-out infinite;
}
.wc26-live-dot--sm {
  width: 6px;
  height: 6px;
}
.wc26-live-dot--xs {
  width: 5px;
  height: 5px;
  margin-right: 2px;
}
@keyframes wc26-blink {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
  }
  50% {
    opacity: 0.4;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
  }
}

/* -- Spinner -- */
.wc26-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(34, 197, 94, 0.25);
  border-top-color: var(--wc26-accent);
  border-radius: 50%;
  animation: wc26-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes wc26-spin {
  to {
    transform: rotate(360deg);
  }
}

/* -- Flag images -- */
.wc26-flag {
  width: 28px;
  height: 21px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  display: block;
}
.wc26-flag--lg {
  width: 40px;
  height: 30px;
  border-radius: 4px;
}
.wc26-flag--xs {
  width: 20px;
  height: 15px;
  border-radius: 2px;
}
.wc26-flag-ph {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}
picture {
  display: contents;
}

/* -- HERO CARD (live match) -- */
.wc26-hero {
  margin: 6px 8px 4px;
  padding: 14px 12px 12px;
  border-radius: 14px;
  background: linear-gradient(160deg, #0a2a14 0%, #061408 100%);
  border: 1px solid rgba(34, 197, 94, 0.35);
  box-shadow:
    0 0 0 1px rgba(34, 197, 94, 0.08),
    0 4px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(34, 197, 94, 0.15);
  position: relative;
  overflow: hidden;
  animation: wc26-hero-in 0.4s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
@keyframes wc26-hero-in {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.wc26-hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 40% at 50% 0%,
    rgba(34, 197, 94, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
  animation: wc26-hero-pulse 2.5s ease-in-out infinite alternate;
}
@keyframes wc26-hero-pulse {
  from {
    opacity: 0.6;
  }
  to {
    opacity: 1;
  }
}
.wc26-hero-round {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--wc26-muted);
  margin-bottom: 10px;
}
.wc26-live-badge-inline {
  background: var(--wc26-live);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 2px 6px;
  border-radius: 4px;
  animation: wc26-pulse-badge 1.2s ease-in-out infinite;
}
.wc26-hero-body {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.wc26-hero-team {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}
.wc26-hero-team--right {
  align-items: center;
}
.wc26-hero-flag picture {
  display: flex;
  justify-content: center;
}
.wc26-hero-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.wc26-hero-scorers {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}
.wc26-scorer-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--wc26-text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.wc26-scorer-badge .ti {
  color: var(--wc26-accent);
  font-size: 10px;
}
.wc26-scorer-min {
  color: var(--wc26-muted);
  font-size: 9px;
}
.wc26-hero-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.wc26-hero-score {
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(74, 222, 128, 0.4);
  line-height: 1;
  transition: color 0.2s;
}
.wc26-hero-dash {
  font-size: 28px;
  opacity: 0.6;
  margin: 0 4px;
}
/* Goal flash animation */
.wc26-score--flash {
  animation: wc26-goal-flash 0.6s ease-out !important;
}
@keyframes wc26-goal-flash {
  0% {
    color: #fff;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.4);
  }
  20% {
    color: #fbbf24;
    text-shadow:
      0 0 40px rgba(251, 191, 36, 0.9),
      0 0 80px rgba(251, 191, 36, 0.5);
    transform: scale(1.18);
  }
  60% {
    color: #4ade80;
    text-shadow: 0 0 30px rgba(74, 222, 128, 0.8);
    transform: scale(1.06);
  }
  100% {
    color: #fff;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.4);
    transform: scale(1);
  }
}
.wc26-hero-min {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--wc26-live);
  letter-spacing: 0.4px;
}
.wc26-hero-venue {
  font-size: 10px;
  color: var(--wc26-muted);
  text-align: center;
  line-height: 1.3;
}
.wc26-hero-pen {
  font-size: 10px;
  color: var(--wc26-gold);
  background: rgba(251, 191, 36, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

/* -- Compact match card -- */
.wc26-card {
  margin: 3px 8px;
  padding: 8px 10px;
  background: var(--wc26-surface2);
  border: 1px solid var(--wc26-border2);
  border-radius: 10px;
  transition:
    background 0.15s,
    border-color 0.15s;
  cursor: default;
}
.wc26-card:hover {
  background: rgba(34, 197, 94, 0.07);
  border-color: var(--wc26-border);
}
.wc26-card--live {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.06);
}
.wc26-card--finished {
  opacity: 0.82;
}
.wc26-card-top {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 5px;
  font-size: 10px;
  color: var(--wc26-muted);
}
.wc26-round {
  background: rgba(34, 197, 94, 0.13);
  color: var(--wc26-accent);
  padding: 1px 7px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.wc26-venue {
  opacity: 0.7;
}
.wc26-card-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wc26-team {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.wc26-team--away {
  flex-direction: row-reverse;
  text-align: right;
}
.wc26-tname {
  font-size: 12px;
  font-weight: 600;
  color: var(--wc26-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wc26-scorebox {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  min-width: 72px;
}
.wc26-score {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1.5px;
}
.wc26-ms {
  font-size: 10px;
  font-weight: 700;
  color: var(--wc26-muted);
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3px;
}
.wc26-ms--live {
  color: var(--wc26-live);
  background: rgba(239, 68, 68, 0.12);
  animation: wc26-blink 1.4s ease-in-out infinite;
}
.wc26-ms--ft {
  color: var(--wc26-muted);
}
.wc26-ms-date {
  font-size: 9px;
  color: var(--wc26-muted);
  opacity: 0.75;
}
.wc26-pen-tag {
  font-size: 9px;
  background: rgba(251, 191, 36, 0.15);
  color: var(--wc26-gold);
  padding: 0 4px;
  border-radius: 3px;
  margin-left: 3px;
}
.wc26-card-scorers {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid var(--wc26-border2);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.wc26-scorer-line {
  font-size: 10px;
  color: var(--wc26-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wc26-scorer-line--home {
  text-align: left;
}
.wc26-scorer-line--away {
  text-align: right;
}

/* -- Groups table -- */
.wc26-group-card {
  margin: 4px 8px 10px;
  background: var(--wc26-surface2);
  border: 1px solid var(--wc26-border2);
  border-radius: 12px;
  overflow: hidden;
}
.wc26-group-title {
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--wc26-accent);
  background: rgba(34, 197, 94, 0.07);
  border-bottom: 1px solid var(--wc26-border2);
}
.wc26-gtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.wc26-gtable th {
  padding: 4px 5px;
  text-align: center;
  color: var(--wc26-muted);
  font-weight: 600;
  font-size: 10px;
  border-bottom: 1px solid var(--wc26-border2);
}
.wc26-gth--name {
  text-align: left !important;
  padding-left: 10px !important;
}
.wc26-gtable td {
  padding: 5px 5px;
  text-align: center;
  color: var(--wc26-text);
  border-bottom: 1px solid rgba(34, 197, 94, 0.05);
}
.wc26-gtd--name {
  text-align: left !important;
  padding-left: 10px !important;
  display: flex !important;
  align-items: center;
  gap: 6px;
}
.wc26-gtable tr:last-child td {
  border-bottom: none;
}
.wc26-gtable tr:hover td {
  background: rgba(34, 197, 94, 0.04);
}
.wc26-row--qualify td {
  border-left: none;
}
.wc26-row--qualify .wc26-gtd--name {
  border-left: 3px solid var(--wc26-accent);
  padding-left: 7px !important;
}
.wc26-pts {
  font-weight: 800 !important;
  color: var(--wc26-accent) !important;
  font-size: 12px !important;
}
.wc26-goals {
  font-size: 10px;
  color: var(--wc26-text2);
}
.wc26-gd--pos {
  color: #4ade80 !important;
  font-weight: 700;
}
.wc26-gd--neg {
  color: #f87171 !important;
  font-weight: 700;
}
.wc26-pts-col {
  color: var(--wc26-accent) !important;
}
.wc26-qualify-legend {
  padding: 5px 10px;
  font-size: 9px;
  color: var(--wc26-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  border-top: 1px solid var(--wc26-border2);
}
.wc26-qualify-dot {
  width: 10px;
  height: 10px;
  border-left: 3px solid var(--wc26-accent);
  display: inline-block;
}

/* -- Top Scorers -- */
.wc26-scorers-list {
  padding: 4px 0;
}
.wc26-scorer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--wc26-border2);
  transition: background 0.12s;
}
.wc26-scorer-row:last-child {
  border-bottom: none;
}
.wc26-scorer-row:hover {
  background: rgba(34, 197, 94, 0.05);
}
.wc26-scorer-rank {
  font-size: 13px;
  font-weight: 800;
  min-width: 22px;
  color: var(--wc26-muted);
  text-align: center;
}
.wc26-scorer-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.wc26-scorer-info > div {
  min-width: 0;
}
.wc26-scorer-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--wc26-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wc26-scorer-team {
  font-size: 10px;
  color: var(--wc26-muted);
}
.wc26-scorer-goals {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.wc26-scorer-num {
  font-size: 18px;
  font-weight: 900;
  color: var(--wc26-accent);
  line-height: 1;
}
.wc26-scorer-label {
  font-size: 14px;
}

/* -- Teams grid -- */
.wc26-teams-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px 8px 8px;
}
.wc26-team-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  background: var(--wc26-surface2);
  border: 1px solid var(--wc26-border2);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--wc26-text);
  overflow: hidden;
  transition: background 0.12s;
}
.wc26-team-chip:hover {
  background: rgba(34, 197, 94, 0.08);
}
.wc26-team-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -- Stadiums -- */
.wc26-stadium-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 3px 8px;
  padding: 9px 10px;
  background: var(--wc26-surface2);
  border: 1px solid var(--wc26-border2);
  border-radius: 10px;
}
.wc26-stad-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}
.wc26-stad-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--wc26-text);
  margin-bottom: 2px;
}
.wc26-stad-meta {
  font-size: 10px;
  color: var(--wc26-muted);
}
.wc26-stad-fifa {
  font-size: 9px;
  color: var(--wc26-muted);
  margin-top: 2px;
  opacity: 0.65;
}

/* -- Loading / empty / error -- */
.wc26-loading {
  padding: 32px 16px;
  text-align: center;
  color: var(--wc26-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.wc26-empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--wc26-muted);
  font-size: 13px;
  line-height: 1.8;
}
.wc26-error {
  padding: 18px 12px;
  text-align: center;
  color: #fca5a5;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

/* -- Confetti pieces -- */
.wc26-confetti-piece {
  position: absolute;
  top: 0;
  z-index: 20;
  border-radius: 2px;
  pointer-events: none;
  animation: wc26-confetti-fall linear both;
}
@keyframes wc26-confetti-fall {
  0% {
    transform: translateY(-10px) rotate(0deg);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(320px) rotate(720deg);
    opacity: 0;
  }
}

/* -- Player links & avatars -- */
.wc26-player-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--wc26-text);
  text-decoration: none;
  border-radius: 4px;
  transition:
    color 0.12s,
    background 0.12s;
  cursor: pointer;
  vertical-align: middle;
}
.wc26-player-link:hover {
  color: #fff;
  background: rgba(34, 197, 94, 0.14);
}
.wc26-player-link--avatar {
  gap: 6px;
}
.wc26-player-name {
  display: inline;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.wc26-player-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--wc26-surface3);
  border: 1px solid var(--wc26-border);
}
.wc26-player-avatar--sm {
  width: 18px;
  height: 18px;
}
.wc26-player-avatar--lg {
  width: 34px;
  height: 34px;
}
.wc26-player-avatar--ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--wc26-accent2);
  text-transform: uppercase;
  background: var(--wc26-surface3);
}

/* -- Scorer row with avatar -- */
.wc26-scorer-text {
  min-width: 0;
  flex: 1;
}
.wc26-scorer-name .wc26-player-link {
  font-size: 12px;
  font-weight: 700;
}

/* -- Goal / card rows with player links -- */
.wc26-goal-home .wc26-player-link,
.wc26-goal-away .wc26-player-link,
.wc26-card-row .wc26-player-link {
  font-weight: 600;
}
.wc26-goal-assist {
  display: block;
  font-size: 10px;
  color: var(--wc26-muted);
  margin-top: 1px;
  font-style: italic;
}
.wc26-goal-assist .wc26-player-link {
  font-weight: 500;
  font-style: normal;
}

/* -- Player detail card -- */
.wc26-player-card {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 30;
  background: var(--wc26-surface2);
  border: 1px solid var(--wc26-border);
  border-radius: var(--wc26-radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  padding: 12px;
  transform: translateY(120%);
  opacity: 0;
  transition:
    transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1),
    opacity 0.2s;
  pointer-events: auto;
}
.wc26-player-card--show {
  transform: translateY(0);
  opacity: 1;
}
.wc26-player-card__close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--wc26-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 14px;
  transition:
    color 0.12s,
    background 0.12s;
}
.wc26-player-card__close:hover {
  color: #fff;
  background: rgba(34, 197, 94, 0.14);
}
.wc26-player-card__loading {
  padding: 14px 0;
  text-align: center;
  color: var(--wc26-muted);
  font-size: 12px;
}
.wc26-player-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.wc26-player-card__img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--wc26-border);
  background: var(--wc26-surface3);
}
.wc26-player-card__info {
  flex: 1;
  min-width: 0;
}
.wc26-player-card__name {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wc26-player-card__team {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--wc26-text2);
}
.wc26-player-card__goals {
  font-size: 12px;
  font-weight: 700;
  color: var(--wc26-gold);
  margin-top: 4px;
}
.wc26-ext-btn--wiki {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

/* -- External links & expand button -- */
.wc26-detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--wc26-border2);
  margin-top: 6px;
}
.wc26-ext-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--wc26-text2);
  background: var(--wc26-surface3);
  border: 1px solid var(--wc26-border);
  text-decoration: none;
  transition:
    background 0.12s,
    color 0.12s,
    border-color 0.12s,
    transform 0.1s;
  cursor: pointer;
}
.wc26-ext-btn:hover {
  background: rgba(34, 197, 94, 0.14);
  color: #fff;
  border-color: rgba(34, 197, 94, 0.35);
  transform: translateY(-1px);
}
.wc26-ext-btn--center {
  margin: 0 auto;
}
.wc26-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 5px 12px;
  border: none;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 3px 12px rgba(34, 197, 94, 0.35);
  cursor: pointer;
  transition:
    transform 0.12s,
    box-shadow 0.12s,
    filter 0.12s;
}
.wc26-expand-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(34, 197, 94, 0.45);
  filter: brightness(1.08);
}
.wc26-expand-btn:active {
  transform: translateY(0);
}

/* -- Live stats bars -- */
.wc26-detail-stats {
  padding: 8px 12px 10px;
  border-top: 1px solid var(--wc26-border2);
}
.wc26-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
  font-size: 11px;
  color: var(--wc26-text2);
}
.wc26-stat-val {
  font-weight: 700;
  color: var(--wc26-text);
  min-width: 22px;
  text-align: center;
}
.wc26-stat-val--home {
  color: #60a5fa;
}
.wc26-stat-val--away {
  color: #f87171;
}
.wc26-stat-label {
  flex: 1;
  text-align: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--wc26-muted);
}
.wc26-stat-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--wc26-surface3);
  margin-bottom: 10px;
}
.wc26-stat-bar:last-child {
  margin-bottom: 0;
}
.wc26-stat-bar-fill {
  height: 100%;
  transition: width 0.4s ease;
}
.wc26-stat-bar-fill--home {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
.wc26-stat-bar-fill--away {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

/* -- Mobile narrow -- */
@media (max-width: 400px) {
  #wc26-dock {
    width: calc(100vw - 16px);
    right: 8px;
  }
  .wc26-hero-score {
    font-size: 28px;
  }
}

/* -- Light theme -- */
body.theme-trueblue-light #wc26-dock {
  --wc26-bg: #f0faf3;
  --wc26-surface: #f0faf3;
  --wc26-surface2: #e6f7ec;
  --wc26-surface3: #daf3e3;
  --wc26-border: rgba(22, 163, 74, 0.28);
  --wc26-border2: rgba(22, 163, 74, 0.14);
  --wc26-text: #14532d;
  --wc26-text2: #166534;
  --wc26-muted: rgba(20, 83, 45, 0.55);
}
body.theme-trueblue-light .wc26-dock-header {
  background: rgba(240, 250, 243, 0.95);
}
body.theme-trueblue-light .wc26-tabs {
  background: rgba(230, 247, 236, 0.9);
}
body.theme-trueblue-light .wc26-dock-footer {
  background: rgba(240, 250, 243, 0.9);
}
body.theme-trueblue-light .wc26-hero {
  background: linear-gradient(160deg, #e6f7ec, #d1f0dc);
}
body.theme-trueblue-light .wc26-hero-score {
  color: #14532d;
  text-shadow: none;
}
body.theme-trueblue-light .wc26-score {
  color: #14532d;
}
body.theme-trueblue-light .wc26-tname {
  color: #166534;
}

/* ==========================================================================
   GAME DOCK ENHANCEMENTS  v1  - animations, UX, polish
   Bingo + Chess shared improvements
   ========================================================================== */

/* -- keyframes ---- */
@keyframes gde-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-10px) scale(1.05);
  }
  70% {
    transform: translateY(-4px) scale(1.02);
  }
}
@keyframes gde-pop-in {
  0% {
    transform: scale(0) rotate(-20deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.15) rotate(4deg);
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}
@keyframes gde-shake {
  0%,
  100% {
    transform: rotate(0);
  }
  20% {
    transform: rotate(-12deg);
  }
  40% {
    transform: rotate(12deg);
  }
  60% {
    transform: rotate(-8deg);
  }
  80% {
    transform: rotate(8deg);
  }
}
@keyframes gde-xp-float {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-36px) scale(1.1);
  }
}
@keyframes gde-glow-ring {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.55);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(99, 102, 241, 0);
  }
}
@keyframes gde-slot-in {
  0% {
    opacity: 0;
    transform: translateX(-12px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}
@keyframes gde-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes gde-spin-once {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes gde-pulse-bg {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
}

@keyframes gde-check-pop {
  0% {
    transform: scale(0);
  }
  60% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes gde-emoji-pop {
  0% {
    transform: scale(0) rotate(-30deg);
    opacity: 0;
  }
  55% {
    transform: scale(1.25) rotate(5deg);
  }
  75% {
    transform: scale(0.95) rotate(-2deg);
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}
@keyframes gde-ripple {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}
@keyframes gde-host-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.5);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(251, 191, 36, 0);
  }
}
@keyframes gde-notif-slide {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes gde-piece-hover {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-5px) rotate(4deg);
  }
}

/* -- View entrance animation ---- */
.bingo-view:not([hidden]),
.chess-view:not([hidden]) {
  animation: gde-fade-up 0.22s ease;
}
@media (prefers-reduced-motion: reduce) {
  .bingo-view:not([hidden]),
  .chess-view:not([hidden]) {
    animation: none;
  }
}

/* -- Header icon spin on dock open ---- */
#bingo-dock:not([hidden]) .bingo-dock-icon,
#chess-dock:not([hidden]) .chess-dock-icon {
  display: inline-block;
  animation: gde-spin-once 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@media (prefers-reduced-motion: reduce) {
  #bingo-dock:not([hidden]) .bingo-dock-icon,
  #chess-dock:not([hidden]) .chess-dock-icon {
    animation: none;
  }
}

/* -- Bingo hero - bigger balls, staggered hover pop ---- */
.bingo-idle-balls-row .bingo-deco-svg {
  cursor: pointer;
  transition:
    transform 0.15s,
    filter 0.15s;
}
.bingo-idle-balls-row .bingo-deco-svg:hover {
  transform: scale(1.3) rotate(-10deg);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5)) brightness(1.15);
}
/* Stagger bob offset tuning */
.bingo-idle-balls-row .bingo-deco-svg:nth-child(1) {
  animation-delay: 0s;
}
.bingo-idle-balls-row .bingo-deco-svg:nth-child(2) {
  animation-delay: 0.15s;
}
.bingo-idle-balls-row .bingo-deco-svg:nth-child(3) {
  animation-delay: 0.3s;
}
.bingo-idle-balls-row .bingo-deco-svg:nth-child(4) {
  animation-delay: 0.45s;
}
.bingo-idle-balls-row .bingo-deco-svg:nth-child(5) {
  animation-delay: 0.6s;
}

/* -- Bingo lobby: host avatar glows amber, slots animate in ---- */
.bingo-player-slot.is-filled .bingo-slot-badge {
  animation: gde-check-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* Host slot gets a special gold ring */
.bingo-player-slot.is-host .bingo-slot-av {
  animation: gde-host-pulse 2s ease infinite;
  border: 2px solid rgba(251, 191, 36, 0.55);
}
/* "Host" chip */
.bingo-slot-host-chip {
  font-size: 9px;
  font-weight: 800;
  background: rgba(251, 191, 36, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 99px;
  padding: 1px 6px;
  margin-left: auto;
  white-space: nowrap;
}
/* Empty waiting slot pulse */
.bingo-player-slot:not(.is-filled) {
  animation: gde-pulse-bg 2.2s ease infinite;
}

/* -- Bingo spotlight: countdown ring throbbing when < 4 s left ---- */
.bingo-spotlight-ring.is-urgent {
  animation:
    bingo-ring-spin 1s linear infinite,
    gde-ripple-border 0.6s ease-in-out infinite;
}
@keyframes gde-ripple-border {
  0%,
  100% {
    filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.9));
  }
}

/* -- Result screen: emoji pops in, XP chip bounces ---- */
.bingo-result-emoji,
.chess-result-emoji {
  display: inline-block;
  animation: gde-emoji-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.08s both;
}
@media (prefers-reduced-motion: reduce) {
  .bingo-result-emoji,
  .chess-result-emoji {
    animation: none;
  }
}

/* XP won/lost chips - pop on appearance */
.bingo-xp-won,
.chess-xp-won {
  animation: gde-pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
  display: inline-block;
}
.bingo-xp-lost,
.chess-xp-lost {
  animation: gde-shake 0.4s ease 0.35s both;
  display: inline-block;
}

/* -- Notif bar slide-in (override old bingo-notif-in) ---- */
.bingo-notif-bar:not([hidden]),
.chess-notif-bar:not([hidden]) {
  animation: gde-notif-slide 0.18s ease;
}

/* -- "Your turn" banner: bigger, more dramatic on check ---- */
.chess-yourturn-banner.is-check {
  animation:
    chess-yourturn-pop 1.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
    gde-shake 0.3s ease 0.5s;
}

/* -- Dock header button active press ---- */
.bingo-dock-hbtn:active,
.chess-dock-hbtn:active {
  transform: scale(0.88);
  transition: transform 0.07s;
}

/* (old gidl block removed — see new ci-/gidl- CSS above) */

/* -- Bingo cell: "clickable" shimmer hint when a number is newly drawn ---- */
.bingo-cell--active {
  position: relative;
  overflow: hidden;
}
.bingo-cell--active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 70%
  );
  animation: gde-shimmer 1.1s ease-in-out infinite;
}
@keyframes gde-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* -- Chess board: current square highlight pulse on selected piece ---- */
.chess-sq.is-selected {
  animation: gde-glow-ring 0.8s ease infinite;
}

/* -- XP floating toast (used by both games) ---- */
.gde-xp-float-toast {
  position: fixed;
  font-size: 18px;
  font-weight: 900;
  pointer-events: none;
  z-index: 1999;
  animation: gde-xp-float 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
.gde-xp-float-toast--win {
  color: #86efac;
}
.gde-xp-float-toast--lose {
  color: #fca5a5;
}

/* -- Idle calltype / mode buttons: hover shimmer ---- */
.bingo-calltype-btn.is-active {
  position: relative;
  overflow: hidden;
}
.bingo-calltype-btn.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: gde-shimmer 2.5s ease-in-out infinite;
}

/* -- Lobby waiting count animation ---- */
.bingo-slot-open-count,
.chess-lobby-count {
  transition: color 0.25s;
}
/* Full = amber warning */
.chess-lobby-count.is-full {
  color: #fcd34d;
}

/* -- ci-lobbies-count badge: re-animate on update ---- */
.ci-lobbies-count.is-updated {
  animation: gde-pop-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* -- Chess ended screen: show a replay icon that spins on hover ---- */
.chess-ended-actions .chess-btn .ti-refresh:hover,
.chess-ended-actions .chess-btn:hover .ti-refresh {
  display: inline-block;
  animation: gde-spin-once 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* -- Bingo result: winner names fly-in ---- */
.bingo-result-winners {
  animation: gde-fade-up 0.35s ease 0.25s both;
}

/* -- Reduced motion: kill everything extra ---- */
@media (prefers-reduced-motion: reduce) {
  .bingo-player-slot:not(.is-filled),
  .chess-lobby-dot::after,
  .bingo-player-slot.is-host .bingo-slot-av,
  #chess-join-btn:not([hidden]),
  .bingo-result-emoji,
  .chess-result-emoji,
  .bingo-xp-won,
  .chess-xp-won,
  .bingo-xp-lost,
  .chess-xp-lost,
  .bingo-result-winners,
  .gde-xp-float-toast,
  .bingo-cell--active::after,
  .bingo-calltype-btn.is-active::before,
  .ci-qs-card.is-active::before {
    animation: none !important;
  }
}

/* --------------------------------------------------------------------------
   Chat Roulette topbar quick-launch button
   -------------------------------------------------------------------------- */
.chatroulette-topbar-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  height: 38px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(255, 77, 28, 0.18) 0%,
    rgba(255, 140, 66, 0.14) 100%
  );
  border: 1px solid rgba(255, 77, 28, 0.35);
  color: #fff;
  cursor: pointer;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    border-color 0.15s;
  animation: crBtnIdle 3.5s ease-in-out infinite;
}
@keyframes crBtnIdle {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(255, 77, 28, 0.15),
      0 2px 10px rgba(255, 77, 28, 0.2);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(255, 77, 28, 0.35),
      0 4px 20px rgba(255, 77, 28, 0.45);
  }
}
.chatroulette-topbar-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 24px rgba(255, 77, 28, 0.65) !important;
  border-color: rgba(255, 77, 28, 0.7);
  animation: none;
}
.chatroulette-topbar-btn:active {
  transform: translateY(0) scale(0.97);
}

/* Pulsing ring */
.chatroulette-topbar-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1.5px solid rgba(255, 77, 28, 0.6);
  animation: crRingPulse 2s ease-out infinite;
  pointer-events: none;
}
@keyframes crRingPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

/* Fire icon  dances */
.chatroulette-topbar-icon {
  font-size: 1.15rem;
  line-height: 1;
  position: relative;
  z-index: 1;
  animation: crIconDance 1.8s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 6px rgba(255, 77, 28, 0.7));
}
@keyframes crIconDance {
  0% {
    transform: rotate(-8deg) scale(1);
  }
  100% {
    transform: rotate(8deg) scale(1.18);
  }
}

/* Text stack */
.chatroulette-topbar-label-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  position: relative;
  z-index: 1;
}
.chatroulette-topbar-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
}

/* "Ny!" badge  bouncing amber pill */
.chatroulette-topbar-new {
  font-size: 0.58rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 999px;
  padding: 1px 5px;
  letter-spacing: 0.3px;
  animation: crNewBounce 1.1s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite
    alternate;
}
@keyframes crNewBounce {
  0% {
    transform: scale(1) translateY(0);
  }
  100% {
    transform: scale(1.12) translateY(-1px);
  }
}

/* Shimmer sweep */
.chatroulette-topbar-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  transform: skewX(-15deg);
  animation: crShimmer 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes crShimmer {
  0% {
    left: -80%;
  }
  100% {
    left: 130%;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TOPBAR REDESIGN — Clean, modern, professional override
   Kills all flashy animations, unifies button styles
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Kill all topbar animations ──────────────────────────────────────────── */
.app-topbar .chatroulette-topbar-btn,
.app-topbar .games-topbar-btn,
.app-topbar .wc26-topbar-btn {
  animation: none !important;
}
.app-topbar .chatroulette-topbar-ring,
.app-topbar .games-topbar-shine,
.app-topbar .chatroulette-topbar-btn::after,
.app-topbar .wc26-topbar-pulse,
.app-topbar .chatroulette-topbar-new {
  display: none !important;
}
.app-topbar .chatroulette-topbar-icon {
  animation: none !important;
  filter: none !important;
}

/* ── Base topbar refinement ──────────────────────────────────────────────── */
.app-topbar {
  padding: 0 12px;
  gap: 8px;
  background: var(--app-base);
  border-bottom: 1px solid var(--app-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ── Unified pill-button style for all topbar action buttons ─────────────── */
.app-topbar .chatroulette-topbar-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 77, 28, 0.1);
  border: 1px solid rgba(255, 77, 28, 0.25);
  box-shadow: none;
  transition: all 0.15s ease;
}
.app-topbar .chatroulette-topbar-btn:hover {
  background: rgba(255, 77, 28, 0.18);
  border-color: rgba(255, 77, 28, 0.5);
  transform: none;
  box-shadow: 0 2px 8px rgba(255, 77, 28, 0.2) !important;
}
.app-topbar .chatroulette-topbar-btn:active {
  transform: scale(0.97);
}
.app-topbar .chatroulette-topbar-icon {
  font-size: 15px;
  line-height: 1;
}
.app-topbar .chatroulette-topbar-title {
  font-size: 12px;
  font-weight: 700;
}

.app-topbar .games-topbar-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  box-shadow: none;
  transition: all 0.15s ease;
}
.app-topbar .games-topbar-btn:hover,
.app-topbar .games-topbar-btn[aria-expanded="true"] {
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(124, 58, 237, 0.5);
  transform: none;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}
.app-topbar .games-topbar-btn:active {
  transform: scale(0.97);
}
.app-topbar .games-topbar-btn[aria-expanded="true"] {
  border-radius: 8px 8px 4px 4px;
}
.app-topbar .games-topbar-icon {
  font-size: 14px;
  color: #a78bfa;
}
.app-topbar .games-topbar-title {
  font-size: 12px;
}
.app-topbar .games-topbar-sub {
  font-size: 9px;
  opacity: 0.7;
}
.app-topbar .games-topbar-caret {
  font-size: 11px;
  opacity: 0.6;
}

/* World Cup button — subtle */
.app-topbar .wc26-topbar-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(22, 101, 52, 0.1);
  border: 1px solid rgba(22, 101, 52, 0.25);
  box-shadow: none;
  transition: all 0.15s ease;
}
.app-topbar .wc26-topbar-btn:hover {
  background: rgba(22, 101, 52, 0.2);
  border-color: rgba(22, 101, 52, 0.5);
}
.app-topbar .wc26-topbar-icon {
  font-size: 14px;
}

/* Points pill — cleaner */
.app-topbar .app-topbar-points-pill {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  transition: all 0.15s ease;
}
.app-topbar .app-topbar-points-pill:hover {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.45);
}

/* ── Gamified XP panel in chat topbar ──────────────────────────────────────── */
.chat-xp-panel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: 12px;
  color: #f1f5f9;
  font-size: 0.78rem;
  line-height: 1.25;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 520px;
  contain: layout paint;
  transform: translateZ(0);
}
.chat-xp-panel__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-width: 0;
}
.chat-xp-panel__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.chat-xp-panel__icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #fff;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
  flex-shrink: 0;
}
.chat-xp-panel__title {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}
.chat-xp-panel__rank {
  font-size: 0.74rem;
  font-weight: 800;
  color: #fbbf24;
  white-space: nowrap;
}
.chat-xp-panel__level {
  font-size: 0.64rem;
  color: #94a3b8;
  white-space: nowrap;
}
.chat-xp-panel__body {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1 1 auto;
  min-width: 0;
}
.chat-xp-panel__emoji {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}
.chat-xp-panel__progress {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.chat-xp-panel__bar-wrap {
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}
.chat-xp-panel__bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #a78bfa, #22d3ee);
  min-width: 3px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.chat-xp-panel__bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
}
.chat-xp-panel__next-label {
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.chat-xp-panel__pct-label {
  color: #a78bfa;
  font-weight: 700;
  flex-shrink: 0;
}
.chat-xp-panel__points {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 700;
  color: #fbbf24;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.74rem;
  padding: 0.2rem 0.45rem;
  border-radius: 99px;
  background: rgba(245, 158, 11, 0.12);
}
.chat-xp-panel__points[role="button"] {
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}
.chat-xp-panel__points[role="button"]:hover,
.chat-xp-panel__points[role="button"]:focus {
  background: rgba(245, 158, 11, 0.22);
  transform: translateY(-1px);
  outline: none;
}
.chat-xp-panel__actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}
.chat-xp-panel__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  border: none;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.chat-xp-panel__btn--shop {
  /* Same vibrant pink/rose "donate" identity used across the topbar (mobile)
     and mobile panel headers, for a consistent donate CTA everywhere. */
  background: linear-gradient(135deg, #fb7185, #ec4899);
  color: #fff;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.5);
  animation: topbar-donate-heartbeat 2.4s ease-in-out infinite;
}
.chat-xp-panel__btn--shop:hover {
  background: linear-gradient(135deg, #f43f5e, #db2777);
  box-shadow: 0 4px 14px rgba(236, 72, 153, 0.65);
  animation-play-state: paused;
}
.chat-xp-panel__btn--guide {
  background: rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.chat-xp-panel__btn--guide:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}
.chat-xp-panel__btn--log {
  background: rgba(124, 58, 237, 0.14);
  color: #c4b5fd;
  border: 1px solid rgba(124, 58, 237, 0.35);
}
.chat-xp-panel__btn--log:hover {
  background: rgba(124, 58, 237, 0.28);
  color: #fff;
}
@media (max-width: 1599.98px) {
  .chat-don-panel {
    display: none;
  }
  .chat-xp-panel {
    gap: 0.55rem;
    padding: 0.25rem 0.45rem;
    max-width: 360px;
  }
  .chat-xp-panel__emoji,
  .chat-xp-panel__btn--guide {
    display: none;
  }
  .chat-xp-panel__next-label {
    max-width: 100px;
  }
}
@media (max-width: 1199.98px) {
  .chat-xp-panel {
    display: none;
  }
}

/* ── Engaging donation tier pill in chat topbar ───────────────────────────── */
.chat-don-panel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.85rem 0.4rem 0.7rem;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(236, 72, 153, 0.12)),
    rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(251, 191, 36, 0.22);
  color: #f1f5f9;
  font-size: 0.78rem;
  line-height: 1.25;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 420px;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
  box-shadow:
    0 2px 6px rgba(245, 158, 11, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.chat-don-panel:hover {
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(236, 72, 153, 0.18)),
    rgba(30, 41, 59, 0.8);
  border-color: rgba(251, 191, 36, 0.35);
  transform: translateY(-1px);
  box-shadow:
    0 6px 16px rgba(245, 158, 11, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.chat-don-panel:focus-visible {
  outline: 2px solid rgba(251, 191, 36, 0.6);
  outline-offset: 2px;
}
/* Tier badge row — always visible for stable layout */
.chat-don-panel__badges-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}
.chat-don-panel__badge-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08rem;
  min-width: 0;
  transition: transform 0.15s ease;
}
.chat-don-panel__badge-item-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.5);
  padding: 2px;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.2);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.chat-don-panel:hover .chat-don-panel__badge-item-img {
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.35);
}
.chat-don-panel__badge-item:hover .chat-don-panel__badge-item-img {
  transform: scale(1.18) translateY(-2px);
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.35);
}
.chat-don-panel__badge-item-amount {
  font-size: 0.5rem;
  font-weight: 800;
  color: #fbbf24;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
/* Active tier highlight — glow ring + slight scale-up */
.chat-don-panel__badge-item.is-active .chat-don-panel__badge-item-img {
  transform: scale(1.15);
  box-shadow:
    0 0 0 2px rgba(251, 191, 36, 0.7),
    0 0 10px rgba(245, 158, 11, 0.45);
}
.chat-don-panel__badge-item.is-active .chat-don-panel__badge-item-amount {
  color: #fff;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.6);
}
/* Dim non-active badges when a tier is active (sibling dimming via parent) */
.chat-don-panel__badges-row:has(.is-active)
  .chat-don-panel__badge-item:not(.is-active) {
  opacity: 0.5;
}
.chat-don-panel__main {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  flex: 1 1 auto;
  min-width: 0;
}
.chat-don-panel__tier-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.chat-don-panel__tier {
  font-size: 0.8rem;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(245, 158, 11, 0.25);
}
.chat-don-panel__sub {
  font-size: 0.65rem;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-don-panel__sub.is-zero {
  color: #f87171;
  font-weight: 700;
}
.chat-don-panel__cta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.35);
  transition:
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.chat-don-panel:hover .chat-don-panel__cta {
  background: linear-gradient(135deg, #fbbf24, #f43f5e);
  transform: translateX(1px);
  box-shadow: 0 4px 10px rgba(236, 72, 153, 0.45);
}
.chat-don-panel__cta i {
  font-size: 0.75rem;
  transition: transform 0.18s ease;
}
.chat-don-panel:hover .chat-don-panel__cta i {
  transform: translateX(2px);
}

.chat-don-panel__amount {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  font-weight: 700;
  color: #fbbf24;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.74rem;
  padding: 0.2rem 0.45rem;
  border-radius: 99px;
  background: rgba(245, 158, 11, 0.12);
}
/* ── Voice Lobby Topbar Button (NEW) ─────────────────────────────────────── */
.voice-topbar-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.15);
  color: #c4b5fd;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.voice-topbar-btn:hover {
  background: rgba(124, 58, 237, 0.16);
  border-color: rgba(124, 58, 237, 0.5);
  color: #c4b5fd;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.15);
}
.voice-topbar-btn:active {
  transform: scale(0.97);
}
.voice-topbar-btn.is-active {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.35);
  color: #4ade80;
}
.voice-topbar-btn.is-active:hover {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.5);
}
.voice-topbar-icon {
  font-size: 15px;
  flex-shrink: 0;
}
.voice-topbar-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.voice-topbar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #22c55e;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--app-base);
}
.voice-topbar-badge[hidden] {
  display: none;
}

/* ── Watch Together Topbar Button ──────────────────────────────────────── */
.watch-topbar-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.15);
  color: #fca5a5;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.watch-topbar-btn:hover {
  background: rgba(220, 38, 38, 0.22);
  border-color: rgba(220, 38, 38, 0.55);
  color: #fca5a5;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}
.watch-topbar-btn:active {
  transform: scale(0.97);
}
.watch-topbar-btn.is-active {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.35);
  color: #4ade80;
}
.watch-topbar-btn.is-active:hover {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.5);
}
.watch-topbar-icon {
  font-size: 15px;
  flex-shrink: 0;
}
.watch-topbar-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.watch-topbar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #22c55e;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--app-base);
}
.watch-topbar-badge[hidden] {
  display: none;
}

/* ── Netradio Topbar Button ────────────────────────────────────────────── */
.radio-topbar-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(13, 148, 136, 0.4);
  border-radius: 8px;
  background: rgba(13, 148, 136, 0.15);
  color: #99f6e4;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.radio-topbar-btn:hover {
  background: rgba(13, 148, 136, 0.22);
  border-color: rgba(13, 148, 136, 0.55);
  color: #99f6e4;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.15);
}
.radio-topbar-btn:active {
  transform: scale(0.97);
}
.radio-topbar-btn.is-active {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.35);
  color: #4ade80;
}
.radio-topbar-btn.is-active:hover {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.5);
}
.radio-topbar-icon {
  font-size: 15px;
  flex-shrink: 0;
}
.radio-topbar-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Netradio topbar badge */
.radio-topbar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #0d9488;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 0 6px rgba(13, 148, 136, 0.5);
}
.radio-topbar-badge[hidden] {
  display: none;
}

/* Netradio dropdown row */
.games-dropdown-item:has(.games-dropdown-item-icon--radio) {
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.1),
    rgba(20, 184, 166, 0.06)
  );
}
.games-dropdown-item:has(.games-dropdown-item-icon--radio):hover {
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.2),
    rgba(20, 184, 166, 0.12)
  );
}
.games-dropdown-item-icon--radio {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.45);
}

/* ── Channel pill — cleaner ──────────────────────────────────────────────── */
.app-topbar .app-topbar-channel-pill {
  border-radius: 8px;
  padding: 4px 10px 4px 8px;
}
.app-topbar .app-topbar-activity {
  display: none; /* remove the animated dots */
}

/* ── Donation bar — subtler ──────────────────────────────────────────────── */
.app-topbar .app-topbar-donation {
  border-radius: 8px;
  border-color: rgba(251, 191, 36, 0.12);
  background: rgba(251, 191, 36, 0.03);
  padding: 5px 12px 6px;
}
.app-topbar .app-topbar-donation:hover {
  background: rgba(251, 191, 36, 0.06);
  border-color: rgba(251, 191, 36, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ADMIN MESSAGES — Soft orange text for admin chat messages
   ═══════════════════════════════════════════════════════════════════════════════ */
.cht.admin-message .chat-txt,
.cht.admin-message .chat-txt p,
.cht.admin-message .chat-txt span,
.cht.admin-message .chat-txt a {
  color: #f0c674 !important;
}
.cht.admin-message .sender-name {
  color: #e2b45a !important;
  font-weight: 700;
}

/* ----------------------------------------------------------------------------
   Report Modal � modern, user-friendly redesign
   ---------------------------------------------------------------------------- */

/* Dialog sizing */
.modal-report-dialog {
  max-width: 560px;
}

/* Card */
.modal-report-content {
  background: var(--app-sidebar, #1a1f2e);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

/* -- Header -- */
.modal-report-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.12);
  background: rgba(239, 68, 68, 0.06);
}
.modal-report-header-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f87171;
  font-size: 20px;
}
.modal-report-header-text {
  flex: 1;
  min-width: 0;
}
.modal-report-header-text .modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--app-text, #e2e8f0);
  margin: 0;
  line-height: 1.3;
}
.modal-report-subtitle {
  font-size: 12px;
  color: var(--app-text-muted, #64748b);
  margin: 2px 0 0;
}
.modal-report-close {
  flex-shrink: 0;
  opacity: 0.5;
  filter: invert(1);
  margin-left: auto;
}
.modal-report-close:hover {
  opacity: 0.85;
}

/* -- Body -- */
.modal-report-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Field group */
.report-field-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.report-field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--app-text, #e2e8f0);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.report-field-label i {
  font-size: 14px;
  color: #a78bfa;
}
.report-optional {
  font-weight: 400;
  font-size: 11px;
  text-transform: none;
  color: var(--app-text-muted, #64748b);
  letter-spacing: 0;
}

/* Select */
.report-select-wrap {
  position: relative;
}
.report-select {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(139, 92, 246, 0.22) !important;
  border-radius: 8px !important;
  color: var(--app-text, #e2e8f0) !important;
  font-size: 13.5px !important;
  padding: 9px 12px !important;
  transition: border-color 0.15s;
}
.report-select:focus {
  border-color: rgba(139, 92, 246, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12) !important;
  outline: none;
}
.report-select option {
  background: #1e2435;
  color: #e2e8f0;
}

/* Tips box */
.report-tips-box {
  display: flex;
  gap: 11px;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 10px;
  padding: 12px 14px;
}
.report-tips-icon {
  flex-shrink: 0;
  font-size: 18px;
  color: #fbbf24;
  margin-top: 1px;
}
.report-tips-content strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #fde68a;
  margin-bottom: 5px;
}
.report-tips-list {
  margin: 0;
  padding-left: 16px;
  list-style: disc;
}
.report-tips-list li {
  font-size: 12px;
  color: var(--app-text-muted, #94a3b8);
  line-height: 1.6;
}

/* Textarea */
.report-textarea {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(139, 92, 246, 0.22) !important;
  border-radius: 8px !important;
  color: var(--app-text, #e2e8f0) !important;
  font-size: 14px !important;
  line-height: 1.5;
  padding: 10px 12px !important;
  resize: vertical;
  min-height: 110px;
  transition: border-color 0.15s;
}
.report-textarea::placeholder {
  color: rgba(148, 163, 184, 0.45) !important;
  font-style: italic;
}
.report-textarea:focus {
  border-color: rgba(139, 92, 246, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
  outline: none;
}

/* Screenshot upload */
.report-upload-area {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.report-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  cursor: pointer;
  transition:
    background 0.13s,
    border-color 0.13s;
  white-space: nowrap;
}
.report-upload-btn:hover {
  background: rgba(124, 58, 237, 0.28);
  border-color: rgba(139, 92, 246, 0.55);
}
.report-upload-hint {
  font-size: 11.5px;
  color: var(--app-text-muted, #64748b);
}
.report-upload-filename {
  font-size: 12px;
  color: #86efac;
  font-weight: 500;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* -- Footer -- */
.modal-report-footer {
  padding: 14px 22px 18px;
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.report-footer-note {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--app-text-muted, #64748b);
  margin: 0;
  flex: 1;
}
.report-footer-note i {
  color: #4ade80;
  font-size: 13px;
  flex-shrink: 0;
}
.report-footer-actions {
  display: flex;
  gap: 8px;
}
.report-btn-cancel {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--app-text-muted, #94a3b8);
  transition: background 0.13s;
}
.report-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--app-text, #e2e8f0);
}
.report-btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
  transition:
    opacity 0.13s,
    box-shadow 0.13s;
}
.report-btn-submit:hover {
  opacity: 0.88;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.48);
  color: #fff;
}

/* Mobile */
@media (max-width: 540px) {
  .modal-report-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .report-footer-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ── Notification panel items — unified theme-driven card look ─────────────
   Replaces the washed-out light-grey fallbacks (#d1e8ff/#dbeafe/#ebedef)
   that made notification cards hard to read, especially on mobile.
   Everything derives from --tblr-* theme vars so it stays coherent across
   dark, trueblue and light themes without extra colors.
------------------------------------------------------------------------- */
.notifications-panel-card .noti-item {
  margin: 6px 8px !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  border: 1px solid
    color-mix(in srgb, var(--tblr-primary, #5ea8ff) 28%, transparent) !important;
  background: color-mix(
    in srgb,
    var(--tblr-card-bg, var(--tblr-bg-surface, #ffffff)) 90%,
    var(--tblr-primary, #5ea8ff) 10%
  ) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.notifications-panel-card .noti-item:hover {
  background: color-mix(
    in srgb,
    var(--tblr-card-bg, var(--tblr-bg-surface, #ffffff)) 82%,
    var(--tblr-primary, #5ea8ff) 18%
  ) !important;
  border-color: color-mix(
    in srgb,
    var(--tblr-primary, #5ea8ff) 45%,
    transparent
  ) !important;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.14);
}

/* Read items recede — plain surface, quieter border, no accent tint */
.notifications-panel-card .noti-item.noti-read,
.notifications-panel-card .noti-item.noti-read:hover {
  background: var(--tblr-card-bg, var(--tblr-bg-surface, #ffffff)) !important;
  border-color: var(--tblr-border-color, rgba(148, 163, 184, 0.28)) !important;
  box-shadow: none;
  opacity: 0.78;
}

/* Unread items keep the accent tint + a primary accent edge so new
   notifications stand out at a glance */
.notifications-panel-card .noti-item:not(.noti-read) {
  border-left: 3px solid var(--tblr-primary, #5ea8ff) !important;
}

.notifications-panel-card .noti-time {
  color: var(--tblr-primary, #5ea8ff) !important;
  font-weight: 600;
}

.notifications-panel-card .noti-content {
  color: var(--tblr-body-color, #1f2937) !important;
}

/* Dark / trueblue: unread gets a deeper accent surface, text stays light */
html.dark .notifications-panel-card .noti-item,
html.theme-dark .notifications-panel-card .noti-item,
html.trueblue .notifications-panel-card .noti-item,
body.theme-dark .notifications-panel-card .noti-item,
body.theme-trueblue .notifications-panel-card .noti-item {
  background: color-mix(
    in srgb,
    var(--tblr-card-bg, #1f2430) 86%,
    var(--tblr-primary, #5ea8ff) 14%
  ) !important;
  border-color: color-mix(
    in srgb,
    var(--tblr-primary, #5ea8ff) 34%,
    transparent
  ) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

html.dark .notifications-panel-card .noti-item:hover,
html.theme-dark .notifications-panel-card .noti-item:hover,
html.trueblue .notifications-panel-card .noti-item:hover,
body.theme-dark .notifications-panel-card .noti-item:hover,
body.theme-trueblue .notifications-panel-card .noti-item:hover {
  background: color-mix(
    in srgb,
    var(--tblr-card-bg, #1f2430) 76%,
    var(--tblr-primary, #5ea8ff) 24%
  ) !important;
}

html.dark .notifications-panel-card .noti-item.noti-read,
html.theme-dark .notifications-panel-card .noti-item.noti-read,
html.trueblue .notifications-panel-card .noti-item.noti-read,
body.theme-dark .notifications-panel-card .noti-item.noti-read,
body.theme-trueblue .notifications-panel-card .noti-item.noti-read,
html.dark .notifications-panel-card .noti-item.noti-read:hover,
html.theme-dark .notifications-panel-card .noti-item.noti-read:hover,
html.trueblue .notifications-panel-card .noti-item.noti-read:hover,
body.theme-dark .notifications-panel-card .noti-item.noti-read:hover,
body.theme-trueblue .notifications-panel-card .noti-item.noti-read:hover {
  background: var(--tblr-card-bg, #1f2430) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  opacity: 0.72;
}

html.dark .notifications-panel-card .noti-content,
html.theme-dark .notifications-panel-card .noti-content,
html.trueblue .notifications-panel-card .noti-content,
body.theme-dark .notifications-panel-card .noti-content,
body.theme-trueblue .notifications-panel-card .noti-content {
  color: var(--tblr-body-color, #e6edf7) !important;
}

html.dark .notifications-panel-card .noti-time,
html.theme-dark .notifications-panel-card .noti-time,
html.trueblue .notifications-panel-card .noti-time,
body.theme-dark .notifications-panel-card .noti-time,
body.theme-trueblue .notifications-panel-card .noti-time {
  color: #8fc3ff !important;
}

/* ── Mobile notification panel — forced contrast + flatter cards ─────────
   The generic var-driven card colors can come out grey/low-contrast on the
   mobile dark sheet; pin the mobile panel to a clean dark look. */
#mobile-notif-panel.notifications-panel-card {
  background: #101a2e;
  border-color: rgba(124, 196, 255, 0.18) !important;
}

#mobile-notif-panel .card-header,
#mobile-notif-panel .card-body.notifications,
#mobile-notif-panel .notification-list {
  background: #101a2e !important;
  color: #f1f5f9;
}

#mobile-notif-panel .noti-item {
  margin: 6px 8px !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(124, 196, 255, 0.22) !important;
  background: rgba(56, 130, 246, 0.12) !important;
  box-shadow: none !important;
}

#mobile-notif-panel .noti-item:not(.noti-read) {
  border-left: 3px solid #38bdf8 !important;
  background: rgba(56, 130, 246, 0.18) !important;
}

#mobile-notif-panel .noti-item.noti-read,
#mobile-notif-panel .noti-item.noti-read:hover {
  background: rgba(148, 163, 184, 0.08) !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
  opacity: 0.75;
}

#mobile-notif-panel .noti-item:active {
  background: rgba(56, 130, 246, 0.26) !important;
}

#mobile-notif-panel .noti-content {
  color: #ffffff !important;
}

#mobile-notif-panel .noti-time {
  color: #7cc4ff !important;
}

#mobile-notif-panel .noti-profile-visit-cta {
  color: #8fc3ff !important;
}

/* ── Mobile notification panel header — touch-friendly tool row ────────── */
#mobile-notif-panel .card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px !important;
  border-bottom: 1px solid rgba(124, 196, 255, 0.14);
}

#mobile-notif-panel .card-header > strong {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.01em;
}

#mobile-notif-panel .card-header .notifications-panel-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* 36px icon chips — real touch targets instead of tiny btn-links */
#mobile-notif-panel .card-header .btn,
#mobile-notif-panel .card-header .notifications-panel-tool,
#mobile-notif-panel .card-header .chat-global-sound-toggle {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 9px;
  border: 1px solid rgba(124, 196, 255, 0.2);
  background: rgba(124, 196, 255, 0.1);
  color: #7cc4ff;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

#mobile-notif-panel .card-header .btn i,
#mobile-notif-panel .card-header .notifications-panel-tool i,
#mobile-notif-panel .card-header .chat-global-sound-toggle i {
  font-size: 15px;
  line-height: 1;
}

#mobile-notif-panel .card-header .btn:active,
#mobile-notif-panel .card-header .notifications-panel-tool:active,
#mobile-notif-panel .card-header .chat-global-sound-toggle:active {
  background: rgba(124, 196, 255, 0.24);
  border-color: rgba(124, 196, 255, 0.4);
}

/* Muted sound toggle — dimmed icon, red state dot stays */
#mobile-notif-panel .card-header .chat-global-sound-toggle.is-muted {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(148, 163, 184, 0.08);
}

/* Destructive action gets a quiet red tint */
#mobile-notif-panel .card-header .notification-delete-all {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.1);
}

#mobile-notif-panel .card-header .notification-delete-all:active {
  background: rgba(248, 113, 113, 0.22);
  border-color: rgba(248, 113, 113, 0.45);
}

/* ── DM profile panel: profile-text card + compact action grid ─────────── */
.dm-profile-about-card {
  width: calc(100% - 20px);
  margin: 12px 10px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  background: rgba(124, 58, 237, 0.07);
}
.dm-profile-about-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #9d8df0;
}
.dm-profile-about-card .dm-profile-about {
  padding: 0;
  text-align: left;
  font-size: 0.76rem;
  line-height: 1.5;
  color: rgba(237, 233, 254, 0.85);
  -webkit-line-clamp: 4;
  line-clamp: 4;
}
.dm-profile-about-card:has(.dm-profile-about:empty) {
  display: none;
}

/* Smaller action buttons — 3-column compact chips */
.dm-profile-actions {
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 12px 10px 0;
}
.dm-action-btn {
  padding: 8px 4px;
  gap: 3px;
  border-radius: 10px;
  font-size: 0.58rem;
  letter-spacing: 0;
}
.dm-action-btn i {
  font-size: 0.95rem;
}

/* Pin the promo block to the bottom of the DM profile panel: when content
   is short the ads hug the visible bottom; when it overflows they sit at
   the end of the scroll. */
.dm-profile-panel > .xcp--mini {
  margin-top: auto;
  flex: 0 0 auto;
}
.dm-profile-panel > .xcp,
.dm-profile-panel > .mkp,
.dm-profile-panel > .enp {
  flex: 0 0 auto;
}

