@media (max-width: 320px) {
  .messages {
    min-width: unset;
  }
}

/* Enhanced Hover Effects and Accessibility */
.channel-item,
.room-item,
.private-item {
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border-radius: 6px;
}

.channel-item:hover,
.room-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
  transform: translateX(2px);
}

.channel-item.active,
.room-item.active {
  background-color: rgba(59, 130, 246, 0.1);
  border-left: 3px solid #3b82f6;
  padding-left: calc(0.75rem - 3px);
}

/* Focus indicators for keyboard navigation */
.nav-link:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Loading skeleton animation */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

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

.dm-conversation-count-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.35);
  z-index: 3;
  pointer-events: none;
}

.navbar.topbar .open-inbox-middle {
  position: relative;
}

.dm-conversation-count-badge[hidden] {
  display: none !important;
}

@keyframes dmUnreadIconPulse {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes dmUnreadBadgePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.mobile-swipe-edge-hint {
  display: none;
}

/* Chat notices: stronger success tone and link color inheritance */
.group-chat .main-panel > .general-notice.alert.alert-important.alert-success,
.private-chat .main-panel > .general-notice.alert.alert-important.alert-success,
#main-room #room-notice-class.alert.alert-important.alert-success,
#main-private #room-notice-class.alert.alert-important.alert-success {
  background: linear-gradient(160deg, #14532d 0%, #166534 100%) !important;
  border-color: #0f3f23 !important;
  color: #ecfdf5 !important;
}

.group-chat .main-panel > .general-notice.alert.alert-important a,
.private-chat .main-panel > .general-notice.alert.alert-important a,
#main-room #room-notice-class.alert.alert-important a,
#main-private #room-notice-class.alert.alert-important a,
.group-chat .main-panel > .general-notice.alert.alert-important a:visited,
.private-chat .main-panel > .general-notice.alert.alert-important a:visited,
#main-room #room-notice-class.alert.alert-important a:visited,
#main-private #room-notice-class.alert.alert-important a:visited,
.group-chat .main-panel > .general-notice.alert.alert-important a:hover,
.private-chat .main-panel > .general-notice.alert.alert-important a:hover,
#main-room #room-notice-class.alert.alert-important a:hover,
#main-private #room-notice-class.alert.alert-important a:hover,
.group-chat .main-panel > .general-notice.alert.alert-important a:focus,
.private-chat .main-panel > .general-notice.alert.alert-important a:focus,
#main-room #room-notice-class.alert.alert-important a:focus,
#main-private #room-notice-class.alert.alert-important a:focus {
  color: inherit !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.group-chat .main-panel > .general-notice.alert.alert-important .btn-close,
.private-chat .main-panel > .general-notice.alert.alert-important .btn-close,
#main-room #room-notice-class.alert.alert-important .btn-close,
#main-private #room-notice-class.alert.alert-important .btn-close {
  position: absolute;
  top: 6px !important;
  right: 6px !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px;
  min-height: 20px;
  padding: 3px !important;
  border-radius: 999px;
  background-color: rgba(15, 23, 42, 0.56) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 2px 6px rgba(15, 23, 42, 0.32);
  opacity: 1 !important;
  transform: none !important;
  filter: invert(1) grayscale(100%) brightness(220%);
  cursor: pointer;
}

.group-chat .main-panel > .general-notice.alert.alert-important .btn-close:hover,
.private-chat .main-panel > .general-notice.alert.alert-important .btn-close:hover,
#main-room #room-notice-class.alert.alert-important .btn-close:hover,
#main-private #room-notice-class.alert.alert-important .btn-close:hover {
  background-color: rgba(15, 23, 42, 0.72) !important;
  opacity: 1 !important;
}

.group-chat .main-panel > .general-notice.alert.alert-important .btn-close:focus,
.private-chat .main-panel > .general-notice.alert.alert-important .btn-close:focus,
#main-room #room-notice-class.alert.alert-important .btn-close:focus,
#main-private #room-notice-class.alert.alert-important .btn-close:focus {
  opacity: 1 !important;
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.36),
    0 0 0 2px rgba(255, 255, 255, 0.24),
    0 0 0 4px rgba(15, 23, 42, 0.28);
}

.group-chat
    .main-panel
    > .general-notice.alert.alert-important.alert-success
    .btn-close,
.private-chat
    .main-panel
    > .general-notice.alert.alert-important.alert-success
    .btn-close,
#main-room #room-notice-class.alert.alert-important.alert-success .btn-close,
#main-private #room-notice-class.alert.alert-important.alert-success .btn-close {
  background-color: rgba(236, 253, 245, 0.22) !important;
  box-shadow:
    inset 0 0 0 1px rgba(236, 253, 245, 0.58),
    0 2px 6px rgba(6, 78, 59, 0.45);
}

@keyframes mobileSwipeHintNudgeLeft {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.72;
  }
  50% {
    transform: translateX(-3px);
    opacity: 1;
  }
}

@media (max-width: 991.98px) {
  html.mobile-native-swipe-guard,
  body.mobile-native-swipe-guard {
    overscroll-behavior-x: none;
  }

  html.mobile-native-swipe-guard,
  html.mobile-native-swipe-guard body {
    touch-action: pan-y pinch-zoom;
  }

  body.mobile-native-swipe-guard #wrapper {
    overscroll-behavior-x: contain;
    touch-action: pan-y;
  }

  .mobile-swipe-edge-hint {
    position: fixed;
    top: calc(50% - 10px);
    width: 24px;
    height: 88px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1085;
    opacity: 0;
    transform: translateY(-50%) scale(0.94);
    transition:
      opacity 0.24s ease,
      transform 0.24s ease;
    color: rgba(226, 232, 240, 0.94);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.26);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .mobile-swipe-edge-hint-right {
    right: 2px;
    background: linear-gradient(
      270deg,
      rgba(56, 189, 248, 0.36) 0%,
      rgba(56, 189, 248, 0.08) 100%
    );
  }

  body.mobile-android-swipe-safezone .mobile-swipe-edge-hint-right {
    right: 48px;
  }

  html.mobile-android-swipe-safezone
    body.mobile-android-swipe-safezone
    .mobile-swipe-edge-hint-right {
    right: 48px;
  }

  .mobile-swipe-edge-hint-right .ti {
    font-size: 14px;
    line-height: 1;
  }

  .mobile-swipe-edge-hint-right .ti {
    animation: mobileSwipeHintNudgeLeft 1.1s ease-in-out infinite;
    animation-delay: 0.18s;
  }

  body.show-mobile-swipe-hints .mobile-swipe-edge-hint {
    opacity: 0.9;
    transform: translateY(-50%) scale(1);
  }

  body.mobile-swipe-hint-no-right .mobile-swipe-edge-hint-right {
    opacity: 0;
    visibility: hidden;
  }

  .rtl .mobile-swipe-edge-hint-right {
    right: auto;
    left: calc(var(--chat-left-rail-width-mobile, 4.5rem) + 2px);
  }

  .rtl body.mobile-android-swipe-safezone .mobile-swipe-edge-hint-right {
    left: calc(var(--chat-left-rail-width-mobile, 4.5rem) + 48px);
  }

  .rtl
    html.mobile-android-swipe-safezone
    body.mobile-android-swipe-safezone
    .mobile-swipe-edge-hint-right {
    left: calc(var(--chat-left-rail-width-mobile, 4.5rem) + 48px);
  }
}

@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
  .mobile-swipe-edge-hint {
    transition: opacity 0.01s linear;
  }

  .mobile-swipe-edge-hint-right .ti {
    animation: none;
  }
}

#mobile-dm-bubble-trigger.dm-unread-pulse .ti,
.navbar.topbar .open-inbox-middle.dm-unread-pulse .ti {
  animation: dmUnreadIconPulse 0.92s ease-in-out 2;
}

#mobile-dm-bubble-trigger.dm-unread-pulse .dm-conversation-count-badge,
#mobile-dm-bubble-trigger.dm-unread-pulse .mobile-dm-bubble-count,
.navbar.topbar .open-inbox-middle.dm-unread-pulse .dm-conversation-count-badge {
  animation: dmUnreadBadgePulse 0.92s ease-in-out 2;
}

@media (prefers-reduced-motion: reduce) {
  #mobile-dm-bubble-trigger.dm-unread-pulse .ti,
  .navbar.topbar .open-inbox-middle.dm-unread-pulse .ti,
  #mobile-dm-bubble-trigger.dm-unread-pulse .dm-conversation-count-badge,
  #mobile-dm-bubble-trigger.dm-unread-pulse .mobile-dm-bubble-count,
  .navbar.topbar
    .open-inbox-middle.dm-unread-pulse
    .dm-conversation-count-badge {
    animation: none;
  }
}

@media (max-width: 768px) {
  .rightbar-wrapper {
    display: none;
    position: absolute;
    top: 0;
    bottom: var(
      --mobile-bottom-nav-visible-height,
      calc(61px + (env(safe-area-inset-bottom, 0px) * 2))
    );
    height: auto;
    max-height: calc(
      100vh -
        var(
          --mobile-bottom-nav-visible-height,
          calc(61px + (env(safe-area-inset-bottom, 0px) * 2))
        )
    );
    max-height: calc(
      100dvh -
        var(
          --mobile-bottom-nav-visible-height,
          calc(61px + (env(safe-area-inset-bottom, 0px) * 2))
        )
    );
    overflow: hidden;
    overscroll-behavior: contain;
    transition: all 0.5s ease-in;
  }

  body.sb-rightnav-toggled #wrapper .rightbar-wrapper {
    display: block;
    right: 0rem;
    margin-right: 0rem;
  }

  body.sb-rightnav-toggled #wrapper .private-right-panel {
    bottom: var(
      --mobile-bottom-nav-visible-height,
      calc(61px + (env(safe-area-inset-bottom, 0px) * 2))
    );
    height: auto !important;
    max-height: calc(
      100vh -
        var(
          --mobile-bottom-nav-visible-height,
          calc(61px + (env(safe-area-inset-bottom, 0px) * 2))
        )
    );
    max-height: calc(
      100dvh -
        var(
          --mobile-bottom-nav-visible-height,
          calc(61px + (env(safe-area-inset-bottom, 0px) * 2))
        )
    );
  }

  .rtl body.sb-rightnav-toggled #wrapper .rightbar-wrapper {
    left: 0rem;
    margin-left: 0rem;
    margin-right: auto;
    right: auto;
  }

  .main-block-padding {
    padding: 0.5rem;
  }
}

@media (max-width: 991.98px) {
  #wrapper .room-bar,
  #wrapper .sidebar-wrapper,
  #wrapper .main-container,
  #wrapper .page-content-wrapper {
    transition:
      width 0.24s ease,
      min-width 0.24s ease,
      max-width 0.24s ease,
      margin 0.24s ease,
      opacity 0.18s ease;
  }

  body.sb-sidenav-toggled #wrapper .room-bar {
    display: flex !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    border-right: 0 !important;
    overflow: hidden !important;
    opacity: 0;
    pointer-events: none;
  }

  body:not(.sb-sidenav-toggled) #wrapper .room-bar {
    opacity: 1;
    pointer-events: auto;
  }

  body.sb-sidenav-toggled #wrapper .sidebar-wrapper {
    margin-left: 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    border-right: 0 !important;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
  }

  body:not(.sb-sidenav-toggled) #wrapper .sidebar-wrapper {
    opacity: 1;
    pointer-events: auto;
  }

  .rtl body.sb-sidenav-toggled #wrapper .sidebar-wrapper {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  body.sb-sidenav-toggled #wrapper .main-container,
  body.sb-sidenav-toggled #wrapper .page-content-wrapper {
    width: 100%;
    max-width: 100%;
  }

  body.mobile-sidebar-transitioning #wrapper .room-bar,
  body.mobile-sidebar-transitioning #wrapper .sidebar-wrapper {
    pointer-events: none;
  }
}

.sb-sidenav-toggled .sidebar-wrapper {
  margin-left: calc(
    -1 *
      var(
        --chat-left-panel-effective-width,
        var(--chat-left-panel-width, 15rem)
      )
  );
}

.dating-cta .icon-wrap img {
  width: 22px;
  height: 22px;
  display: block;
}

.rtl .sb-sidenav-toggled .sidebar-wrapper {
  margin-right: calc(
    -1 *
      var(
        --chat-left-panel-effective-width,
        var(--chat-left-panel-width, 15rem)
      )
  );
  margin-left: 0rem;
}

@media (max-width: 425px) {
  #wrapper .sidebar-wrapper {
    width: calc(100vw - var(--chat-left-rail-width-mobile, 4.5rem));
    min-width: calc(100vw - var(--chat-left-rail-width-mobile, 4.5rem));
    max-width: calc(100vw - var(--chat-left-rail-width-mobile, 4.5rem));
  }

  .sb-sidenav-toggled .sidebar-wrapper {
    margin-left: calc(
      -1 * (100vw - var(--chat-left-rail-width-mobile, 4.5rem))
    );
  }

  .rtl .sb-sidenav-toggled .sidebar-wrapper {
    margin-right: calc(
      -1 * (100vw - var(--chat-left-rail-width-mobile, 4.5rem))
    );
    margin-left: 0rem;
  }

  body:not(.sb-sidenav-toggled) .channel-bar {
    width: calc(100vw - var(--chat-left-rail-width-mobile, 4.5rem));
  }
}

@media (max-width: 320px) {
  .notifications-panel-card {
    min-width: 250px;
  }
}

@media (max-width: 991.98px) {
  :root {
    --mobile-bottom-nav-space: 60px;
    --mobile-bottom-nav-peek: 10px;
    --mobile-bottom-nav-height: calc(52px + env(safe-area-inset-bottom, 0px));
    --mobile-bottom-nav-visible-height: calc(
      var(--mobile-bottom-nav-height) + 9px + env(safe-area-inset-bottom, 0px)
    );
    --mobile-dm-surface: var(--surface-bg, #ffffff);
    --mobile-dm-surface-2: rgba(248, 250, 252, 0.96);
    --mobile-dm-border: rgba(148, 163, 184, 0.35);
    --mobile-dm-text: var(--default-text-color, #0f172a);
    --mobile-dm-muted: var(--muted-text-color, #64748b);
    --mobile-dm-accent-rgb: var(--tblr-primary-rgb, 32, 107, 196);
    --mobile-dm-accent-soft: rgba(var(--mobile-dm-accent-rgb), 0.14);
    --mobile-dm-accent-strong: rgb(var(--mobile-dm-accent-rgb));
    --mobile-dm-row-height: 70px;
  }

  body.mobile-bottom-nav-collapsed {
    --mobile-bottom-nav-space: var(--mobile-bottom-nav-peek);
    --mobile-bottom-nav-visible-height: calc(
      var(--mobile-bottom-nav-peek) + 9px + env(safe-area-inset-bottom, 0px)
    );
  }

  html.theme-dark,
  html.dark,
  body.theme-dark,
  body.dark,
  html.theme-trueblue,
  html.trueblue,
  body.theme-trueblue,
  body.trueblue {
    --mobile-dm-surface: rgba(15, 23, 42, 0.96);
    --mobile-dm-surface-2: rgba(30, 41, 59, 0.94);
    --mobile-dm-border: rgba(125, 211, 252, 0.3);
    --mobile-dm-text: #e2e8f0;
    --mobile-dm-muted: #a5b4cc;
    --mobile-dm-accent-soft: rgba(var(--mobile-dm-accent-rgb), 0.22);
  }

  #main-private {
    --mobile-dm-accent-soft: rgba(var(--mobile-dm-accent-rgb), 0.22);
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--mobile-bottom-nav-height);
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px));
    background: var(--surface-bg, #ffffff);
    border-top: 1px solid var(--border-color, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 4px;
    z-index: 1030;
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.08);
    transition:
      transform 0.22s ease,
      box-shadow 0.2s ease;
    will-change: transform;
  }

  .mobile-bottom-nav-toggle {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 14px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.55);
    color: rgba(71, 85, 105, 0.72);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1031;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
    opacity: 0.7;
    touch-action: manipulation;
    transition:
      opacity 0.2s ease,
      color 0.2s ease,
      border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-nav-toggle::before {
    content: "";
    position: absolute;
    inset: -9px -12px;
  }

  .mobile-bottom-nav-toggle .ti {
    font-size: 10px;
    line-height: 1;
  }

  .mobile-bottom-nav-toggle:focus-visible,
  .mobile-bottom-nav-toggle:active {
    opacity: 1;
    color: rgba(51, 65, 85, 0.9);
    border-color: rgba(100, 116, 139, 0.7);
  }

  body.mobile-bottom-nav-collapsed .mobile-bottom-nav {
    transform: translateY(
      calc(var(--mobile-bottom-nav-height) - var(--mobile-bottom-nav-peek))
    );
    box-shadow: 0 -2px 6px rgba(15, 23, 42, 0.1);
  }

  body.mobile-bottom-nav-collapsed .mobile-bottom-nav > .nav-link,
  body.mobile-bottom-nav-collapsed .mobile-bottom-nav > .btn,
  body.mobile-bottom-nav-collapsed .mobile-bottom-nav > .nav-item {
    opacity: 0.08;
    pointer-events: none;
  }

  body.mobile-bottom-nav-collapsed
    .mobile-bottom-nav
    > .mobile-bottom-nav-toggle {
    opacity: 0.86;
    pointer-events: auto;
  }

  .mobile-bottom-nav > .nav-link,
  .mobile-bottom-nav > .btn,
  .mobile-bottom-nav > .nav-item {
    flex: 1 1 0;
    min-width: 0;
  }

  .mobile-bottom-nav .nav-item > .nav-link {
    width: 100%;
  }

  .mobile-bottom-nav .nav-link,
  .mobile-bottom-nav .btn {
    padding: 4px 4px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    touch-action: manipulation;
  }

  .btn-sm-round.sidebarToggle,
  .btn-sm-round.rightbarToggle,
  .mobile-rightbar-toggle {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }

  .mobile-bottom-nav .nav-link i,
  .mobile-bottom-nav .btn i {
    font-size: 20px;
  }

  .mobile-bottom-nav small {
    font-size: 9px;
    margin-top: 2px;
  }

  #main-room .topbar {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
  }

  #main-room .topbar .me-auto {
    min-width: 0;
    flex: 1 1 auto !important;
    overflow: hidden;
    gap: 0.35rem;
    padding-left: 0.35rem !important;
  }

  #main-room .topbar .top-channel-icon,
  #main-room .topbar .chat-mode-pill-room,
  #main-room .topbar .leave-room-topbar-desktop {
    display: none !important;
  }

  #main-room .topbar .top-channel-name {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
    line-height: 1.2;
  }

  #main-room .topbar .leave-room-topbar-mobile {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
    margin-right: 0;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 999px;
    border-color: rgba(220, 38, 38, 0.62);
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
    z-index: 2;
  }

  #main-room .topbar .leave-room-topbar-mobile .ti {
    font-size: 17px;
  }

  #main-room .topbar .leave-room-topbar-mobile:active {
    transform: translateX(-50%) translateY(1px);
  }

  #main-room .topbar .mobile-dm-topbar-trigger {
    position: relative;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    margin-left: auto;
    margin-right: 0.35rem;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.38);
    background: rgba(37, 99, 235, 0.11);
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }

  #main-room .topbar .mobile-dm-topbar-trigger.is-hidden {
    display: none !important;
  }

  #main-room .topbar .mobile-dm-topbar-trigger .ti {
    font-size: 17px;
    line-height: 1;
  }

  #main-room .topbar .mobile-dm-topbar-trigger:active,
  #main-room .topbar .mobile-dm-topbar-trigger.is-active {
    background: rgba(37, 99, 235, 0.2);
    color: #1e3a8a;
    transform: translateY(1px);
  }

  #main-room .topbar .mobile-rightbar-top-toggle,
  #main-private .topbar .mobile-rightbar-top-toggle {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(var(--mobile-dm-accent-rgb), 0.44);
    background: var(--mobile-dm-accent-soft);
    color: var(--mobile-dm-accent-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }

  #main-room .topbar .mobile-rightbar-top-toggle {
    margin-left: 0;
    margin-right: 0.35rem;
  }

  #main-private .topbar .mobile-rightbar-top-toggle {
    margin-left: auto;
    margin-right: 0.35rem;
  }

  #main-room .topbar .mobile-rightbar-top-toggle .ti,
  #main-private .topbar .mobile-rightbar-top-toggle .ti {
    font-size: 17px;
    line-height: 1;
  }

  #main-room .topbar .mobile-rightbar-top-toggle:active,
  #main-private .topbar .mobile-rightbar-top-toggle:active {
    background: rgba(var(--mobile-dm-accent-rgb), 0.24);
    transform: translateY(1px);
  }

  #main-room .topbar .mobile-rightbar-top-toggle.is-mobile-back-toggle,
  #main-private .topbar .mobile-rightbar-top-toggle.is-mobile-back-toggle {
    border-color: rgba(47, 179, 68, 0.34);
    background: linear-gradient(155deg, #f3fff5 0%, #dcfce7 100%);
    box-shadow:
      0 8px 18px rgba(22, 101, 52, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.55);
    color: #2f9e44;
  }

  #main-room .topbar .mobile-rightbar-top-toggle.is-mobile-back-toggle .ti,
  #main-private .topbar .mobile-rightbar-top-toggle.is-mobile-back-toggle .ti {
    font-size: 18px;
    color: #2f9e44;
    filter: drop-shadow(0 1px 2px rgba(34, 139, 56, 0.3));
  }

  #main-room .topbar .mobile-rightbar-top-toggle.is-mobile-back-toggle:active,
  #main-private
    .topbar
    .mobile-rightbar-top-toggle.is-mobile-back-toggle:active {
    background: linear-gradient(155deg, #ecfdf1 0%, #d1fae5 100%);
    transform: translateY(1px);
  }

  .group-chat .main-panel > .general-notice.alert.alert-important,
  .private-chat .main-panel > .general-notice.alert.alert-important {
    margin-bottom: 4px !important;
    padding: 6px 34px 6px 10px !important;
    border-left-width: 3px;
    border-radius: 8px;
    box-shadow: none;
    font-size: 12px;
    line-height: 1.25;
  }

  #main-room #room-notice-class.alert.alert-important,
  #main-private #room-notice-class.alert.alert-important {
    margin-bottom: 4px !important;
    padding: 6px 30px 6px 10px !important;
    border-left-width: 3px;
    border-radius: 8px;
    box-shadow: none;
    font-size: 12px;
    line-height: 1.25;
  }

  .group-chat .main-panel > .general-notice.alert.alert-important .d-flex,
  .private-chat .main-panel > .general-notice.alert.alert-important .d-flex,
  #room-notice-class.alert.alert-important .d-flex {
    align-items: flex-start;
    gap: 0.25rem;
  }

  .group-chat .main-panel > .general-notice.alert.alert-important p,
  .private-chat .main-panel > .general-notice.alert.alert-important p,
  #room-notice-class.alert.alert-important p {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
  }

  .group-chat
    .main-panel
    > .general-notice.alert.alert-important
    .general-notice-message
    > *,
  .private-chat
    .main-panel
    > .general-notice.alert.alert-important
    .general-notice-message
    > *,
  #room-notice-class.alert.alert-important #room-notice-message > * {
    margin-top: 0;
    margin-bottom: 0;
    line-height: inherit;
  }

  .group-chat .main-panel > .general-notice.alert.alert-important h1,
  .group-chat .main-panel > .general-notice.alert.alert-important h2,
  .group-chat .main-panel > .general-notice.alert.alert-important h3,
  .group-chat .main-panel > .general-notice.alert.alert-important h4,
  .group-chat .main-panel > .general-notice.alert.alert-important h5,
  .group-chat .main-panel > .general-notice.alert.alert-important h6,
  .private-chat .main-panel > .general-notice.alert.alert-important h1,
  .private-chat .main-panel > .general-notice.alert.alert-important h2,
  .private-chat .main-panel > .general-notice.alert.alert-important h3,
  .private-chat .main-panel > .general-notice.alert.alert-important h4,
  .private-chat .main-panel > .general-notice.alert.alert-important h5,
  .private-chat .main-panel > .general-notice.alert.alert-important h6,
  #room-notice-class.alert.alert-important h1,
  #room-notice-class.alert.alert-important h2,
  #room-notice-class.alert.alert-important h3,
  #room-notice-class.alert.alert-important h4,
  #room-notice-class.alert.alert-important h5,
  #room-notice-class.alert.alert-important h6 {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
  }

  .group-chat .main-panel > .general-notice.alert.alert-important ul,
  .group-chat .main-panel > .general-notice.alert.alert-important ol,
  .private-chat .main-panel > .general-notice.alert.alert-important ul,
  .private-chat .main-panel > .general-notice.alert.alert-important ol,
  #room-notice-class.alert.alert-important ul,
  #room-notice-class.alert.alert-important ol {
    margin: 0;
    padding-left: 1rem;
    line-height: inherit;
  }

  #room-notice-class.alert.alert-important .btn-close {
    top: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    padding: 4px;
    transform: scale(0.78);
    opacity: 0.86;
  }

  .group-chat .main-panel .room-notice,
  .private-chat .main-panel .room-notice {
    display: block;
    margin: 0;
    padding: 0;
  }

  .mobile-dm-bubble-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.35);
  }

  .mobile-dm-bubble-count[hidden] {
    display: none !important;
  }

  .mobile-dm-bubble-panel {
    position: fixed;
    top: 56px;
    right: 8px;
    width: min(340px, calc(100vw - 16px));
    z-index: 1041;
  }

  .mobile-dm-bubble-panel[hidden] {
    display: none !important;
  }

  .mobile-dm-bubble-panel-inner {
    border-radius: 18px;
    border: 1px solid var(--mobile-dm-border);
    background: linear-gradient(
      170deg,
      var(--mobile-dm-surface),
      var(--mobile-dm-surface-2)
    );
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.2);
    padding: 8px;
  }

  .mobile-dm-bubble-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 2px 8px;
  }

  .mobile-dm-bubble-title {
    font-size: 1.45rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--mobile-dm-text);
    letter-spacing: 0.01em;
  }

  .mobile-dm-bubble-head-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--mobile-dm-border);
    background: rgba(var(--mobile-dm-accent-rgb), 0.1);
    color: var(--mobile-dm-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .mobile-dm-bubble-head-btn .ti {
    font-size: 16px;
    line-height: 1;
  }

  .mobile-dm-bubble-head-btn:active {
    background: rgba(var(--mobile-dm-accent-rgb), 0.2);
    transform: translateY(1px);
  }

  .mobile-dm-bubble-search {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 2px 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--mobile-dm-border);
    background: rgba(148, 163, 184, 0.12);
  }

  .mobile-dm-bubble-search .ti {
    color: var(--mobile-dm-muted);
    font-size: 14px;
    line-height: 1;
  }

  #mobile-dm-bubble-search {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--mobile-dm-text);
    font-size: 13px;
    padding: 0;
  }

  .mobile-dm-bubble-search:focus-within {
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.5);
    background: rgba(var(--mobile-dm-accent-rgb), 0.12);
  }

  #mobile-dm-bubble-search::placeholder {
    color: var(--mobile-dm-muted);
  }

  .mobile-dm-bubble-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 2px 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mobile-dm-bubble-filters::-webkit-scrollbar {
    display: none;
  }

  .mobile-dm-bubble-filter {
    flex: 0 0 auto;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: var(--mobile-dm-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 7px 11px;
  }

  .mobile-dm-bubble-filter.is-active {
    color: #fff;
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.55);
    background: linear-gradient(
      180deg,
      rgba(var(--mobile-dm-accent-rgb), 1),
      rgba(var(--mobile-dm-accent-rgb), 0.84)
    );
  }

  .mobile-dm-bubble-filter:active {
    transform: translateY(1px);
  }

  .mobile-dm-bubble-recent-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc((var(--mobile-dm-row-height, 70px) * 3) + 16px);
    overflow-y: auto;
    scrollbar-width: thin;
    padding: 2px;
  }

  .mobile-dm-bubble-recent-list::-webkit-scrollbar {
    width: 6px;
  }

  .mobile-dm-bubble-recent-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.45);
  }

  .mobile-dm-conversation-row {
    position: relative;
  }

  .mobile-dm-conversation-row .mobile-dm-avatar-btn {
    padding-right: 44px;
  }

  .mobile-dm-conversation-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
  }

  .mobile-dm-conversation-menu-toggle {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid var(--mobile-dm-border);
    background: rgba(148, 163, 184, 0.14);
    color: var(--mobile-dm-muted);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-dm-conversation-menu-toggle .ti {
    font-size: 14px;
    line-height: 1;
  }

  .mobile-dm-conversation-actions.show .mobile-dm-conversation-menu-toggle,
  .mobile-dm-conversation-menu-toggle:active {
    color: var(--mobile-dm-accent-strong);
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.4);
    background: rgba(var(--mobile-dm-accent-rgb), 0.16);
  }

  .mobile-dm-avatar-btn {
    position: relative;
    width: 100%;
    min-height: var(--mobile-dm-row-height, 70px);
    border: 1px solid transparent;
    padding: 10px 8px;
    border-radius: 13px;
    background: transparent;
    color: var(--mobile-dm-text);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    transition:
      background-color 0.18s ease,
      border-color 0.18s ease,
      transform 0.12s ease;
  }

  .mobile-dm-avatar-wrap {
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
  }

  .mobile-dm-avatar-btn img {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
  }

  .mobile-dm-conversation-meta {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .mobile-dm-conversation-name-row,
  .mobile-dm-conversation-sub-row {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .mobile-dm-conversation-name {
    min-width: 0;
    color: var(--mobile-dm-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-dm-conversation-time {
    flex: 0 0 auto;
    color: var(--mobile-dm-muted);
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
    white-space: nowrap;
  }

  .mobile-dm-conversation-preview {
    min-width: 0;
    flex: 1 1 auto;
    color: var(--mobile-dm-muted);
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-dm-conversation-badge {
    flex: 0 0 auto;
    margin-left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
  }

  .mobile-dm-open-icon {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid var(--mobile-dm-border);
    background: rgba(148, 163, 184, 0.14);
    color: var(--mobile-dm-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
  }

  .mobile-dm-open-icon .ti {
    font-size: 12px;
    line-height: 1;
  }

  .mobile-dm-avatar-btn:hover,
  .mobile-dm-avatar-btn:active {
    background: var(--mobile-dm-accent-soft);
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.3);
    transform: translateY(1px);
  }

  .mobile-dm-avatar-btn:hover .mobile-dm-open-icon,
  .mobile-dm-avatar-btn:active .mobile-dm-open-icon,
  .mobile-dm-avatar-btn.is-active .mobile-dm-open-icon {
    color: var(--mobile-dm-accent-strong);
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.4);
    background: rgba(var(--mobile-dm-accent-rgb), 0.16);
  }

  .mobile-dm-avatar-btn.is-unread {
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.32);
    background: rgba(var(--mobile-dm-accent-rgb), 0.08);
  }

  .mobile-dm-avatar-btn.is-unread img {
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.76);
  }

  .mobile-dm-avatar-btn.is-active {
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.5);
    background: rgba(var(--mobile-dm-accent-rgb), 0.18);
  }

  .mobile-dm-avatar-btn.is-active .mobile-dm-conversation-name {
    color: var(--mobile-dm-accent-strong);
  }

  .mobile-dm-avatar-btn.is-active img {
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.82);
  }

  .mobile-dm-avatar-unread {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 2px solid var(--mobile-dm-surface);
    background: #ef4444;
  }

  .mobile-dm-avatar-status {
    position: absolute;
    left: 1px;
    bottom: 1px;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    border: 2px solid var(--mobile-dm-surface);
    background: #22c55e;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.45);
  }

  .mobile-dm-bubble-empty {
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: var(--mobile-dm-muted);
    padding: 8px 0;
  }

  .mobile-dm-mini-chat {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(
      var(--mobile-bottom-nav-space, 60px) + env(safe-area-inset-bottom, 0px) +
        8px
    );
    border-radius: 16px;
    border: 1px solid var(--mobile-dm-border);
    background: linear-gradient(
      180deg,
      var(--mobile-dm-surface),
      var(--mobile-dm-surface-2)
    );
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.22);
    z-index: 1040;
    overflow: hidden;
  }

  .mobile-dm-mini-chat[hidden] {
    display: none !important;
  }

  .mobile-dm-mini-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid var(--mobile-dm-border);
    background: linear-gradient(
      160deg,
      var(--mobile-dm-accent-soft),
      rgba(var(--mobile-dm-accent-rgb), 0.06)
    );
  }

  .mobile-dm-mini-chat-user {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  #mobile-dm-mini-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(var(--mobile-dm-accent-rgb), 0.42);
  }

  .mobile-dm-mini-chat-meta {
    min-width: 0;
  }

  .mobile-dm-mini-chat-name {
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--mobile-dm-text);
  }

  .mobile-dm-mini-chat-sub {
    font-size: 10px;
    color: var(--mobile-dm-muted);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-dm-mini-chat-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
  }

  .mobile-dm-mini-actions-menu {
    display: inline-flex;
    align-items: center;
  }

  .mobile-dm-mini-btn {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--mobile-dm-border);
    background: rgba(var(--mobile-dm-accent-rgb), 0.1);
    color: var(--mobile-dm-text);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-dm-mini-btn:active {
    background: rgba(var(--mobile-dm-accent-rgb), 0.2);
  }

  .mobile-dm-mini-btn .ti {
    font-size: 14px;
    line-height: 1;
  }

  .mobile-dm-mini-chat-body {
    max-height: 188px;
    min-height: 188px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(148, 163, 184, 0.08);
  }

  .mobile-dm-mini-msg {
    max-width: 88%;
    align-self: flex-start;
    padding: 7px 9px;
    border-radius: 11px;
    background: var(--mobile-dm-surface);
    border: 1px solid var(--mobile-dm-border);
    color: var(--mobile-dm-text);
    font-size: 12px;
    line-height: 1.34;
    word-break: break-word;
    display: inline-flex;
    align-items: flex-end;
    gap: 6px;
    flex-wrap: wrap;
  }

  .mobile-dm-mini-msg-text {
    min-width: 0;
  }

  .mobile-dm-mini-msg-time {
    flex: 0 0 auto;
    color: var(--mobile-dm-muted);
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
    opacity: 0.88;
  }

  .mobile-dm-mini-msg.is-own {
    align-self: flex-end;
    background: var(--mobile-dm-accent-soft);
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.42);
  }

  .mobile-dm-mini-msg.is-own .mobile-dm-mini-msg-time {
    color: rgba(var(--mobile-dm-accent-rgb), 0.92);
  }

  .mobile-dm-mini-chat-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-top: 1px solid var(--mobile-dm-border);
    background: var(--mobile-dm-surface-2);
  }

  #mobile-dm-mini-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.52);
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 13px;
    color: var(--mobile-dm-text);
    background: var(--mobile-dm-surface);
  }

  #mobile-dm-mini-input::placeholder {
    color: var(--mobile-dm-muted);
  }

  #mobile-dm-mini-input:focus {
    outline: 0;
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.64);
    box-shadow: 0 0 0 3px rgba(var(--mobile-dm-accent-rgb), 0.2);
  }

  .mobile-dm-mini-send {
    width: 33px;
    height: 33px;
    min-width: 33px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(
      180deg,
      rgba(var(--mobile-dm-accent-rgb), 1),
      rgba(var(--mobile-dm-accent-rgb), 0.84)
    );
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(var(--mobile-dm-accent-rgb), 0.38);
  }

  .mobile-dm-mini-send .ti {
    font-size: 14px;
    line-height: 1;
  }

  .mobile-dm-mini-empty {
    text-align: center;
    color: var(--mobile-dm-muted);
    font-size: 12px;
    padding: 8px;
  }

  .mobile-dm-bubble-backdrop {
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(2, 6, 23, 0.26);
    margin: 0;
    padding: 0;
    z-index: 1034;
  }

  .mobile-dm-bubble-backdrop[hidden] {
    display: none !important;
  }

  .rtl .mobile-dm-bubble-panel {
    right: auto;
    left: 8px;
  }

  .rtl .mobile-dm-conversation-actions {
    right: auto;
    left: 8px;
  }

  .rtl .mobile-dm-conversation-row .mobile-dm-avatar-btn {
    padding-right: 8px;
    padding-left: 44px;
  }

  .rtl .mobile-dm-mini-chat {
    direction: rtl;
  }

  #main-private .topbar {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  #main-private .topbar .me-auto {
    min-width: 0;
    flex: 1 1 auto !important;
    overflow: hidden;
  }

  #main-private .topbar .top-channel-name {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #main-private .topbar .dating-cta--top {
    flex: 0 0 auto;
    min-width: 40px;
    max-width: none;
    padding: 7px 8px;
  }

  #main-private .topbar .dating-cta--top small {
    display: none;
  }

  #main-private .topbar .dating-cta--top .icon-wrap,
  #main-private .topbar .dating-cta--top .icon-wrap img {
    display: inline-flex;
    visibility: visible;
    opacity: 1;
  }

  .mobile-bottom-nav .icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-bottom-nav .noti-count {
    position: absolute;
    top: -6px;
    right: -8px;
  }

  .dating-cta {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 56px;
    padding: 4px 6px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f43f5e, #e11d48);
    color: #fff;
    border: 1px solid #be123c;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.35);
    animation: dating-glow 2.6s ease-in-out infinite;
  }

  .dating-cta .icon-wrap {
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .dating-cta .icon-wrap img {
    display: block;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .dating-cta i {
    font-size: 21px;
    animation: dating-bob 1.8s ease-in-out infinite;
  }

  .dating-cta small {
    font-size: 11px;
    margin-top: 2px;
    font-weight: 700;
    color: #fff;
  }

  .topbar .dating-cta {
    min-width: 52px;
    padding: 7px 10px;
    background: linear-gradient(180deg, #f43f5e, #e11d48) !important;
    border: 1px solid #be123c !important;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.35) !important;
    color: #fff !important;
    gap: 6px;
    flex-direction: row;
    align-items: center;
    min-width: 0;
    white-space: nowrap;
    line-height: 1.2;
    min-height: 32px;
  }

  .topbar .dating-cta small {
    font-size: 11px;
    margin-top: 0;
    line-height: 1.2;
    display: block;
    padding: 1px 0;
  }

  .dark .dating-cta,
  .trueblue .dating-cta,
  .dark .topbar .dating-cta,
  .trueblue .topbar .dating-cta {
    color: #fff !important;
  }

  .dark .dating-cta small,
  .trueblue .dating-cta small {
    color: #fff !important;
  }

  .theme-light .dating-cta,
  .theme-light .topbar .dating-cta {
    color: #fff !important;
  }

  .theme-light .dating-cta small {
    color: #fff !important;
  }

  @keyframes dating-bob {
    0% {
      transform: translateY(0) scale(1);
    }
    50% {
      transform: translateY(-2px) scale(1.08);
    }
    100% {
      transform: translateY(0) scale(1);
    }
  }

  @keyframes dating-glow {
    0% {
      box-shadow: 0 2px 8px rgba(225, 29, 72, 0.28);
    }
    50% {
      box-shadow: 0 5px 14px rgba(225, 29, 72, 0.5);
    }
    100% {
      box-shadow: 0 2px 8px rgba(225, 29, 72, 0.28);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .dating-cta,
    .dating-cta i {
      animation: none;
    }
  }

  .mobile-hidden {
    display: none !important;
  }

  .page-content-wrapper {
    padding-bottom: calc(
      var(--mobile-bottom-nav-space, 60px) + env(safe-area-inset-bottom, 0px)
    );
  }

  .main-panel {
    height: calc(
      var(--app-vh, (var(--vh, 1vh) * 100)) - 50px -
        var(--mobile-bottom-nav-space, 60px) - env(safe-area-inset-bottom, 0px)
    );
  }

  .action-list {
    padding-bottom: calc(
      (var(--mobile-bottom-nav-space, 60px) + 10px) +
        env(safe-area-inset-bottom, 0px)
    );
  }

  .room-users-row,
  .group-users-row {
    padding-bottom: calc(
      (var(--mobile-bottom-nav-space, 60px) + 10px) +
        env(safe-area-inset-bottom, 0px)
    );
  }

  .user-list-load-more,
  .user-list-load-all {
    margin-bottom: 8px;
  }
}

@media (min-width: 992px) {
  :root {
    --mobile-dm-surface: var(--surface-bg, #ffffff);
    --mobile-dm-surface-2: rgba(248, 250, 252, 0.96);
    --mobile-dm-border: rgba(148, 163, 184, 0.35);
    --mobile-dm-text: var(--default-text-color, #0f172a);
    --mobile-dm-muted: var(--muted-text-color, #64748b);
    --mobile-dm-accent-rgb: var(--tblr-primary-rgb, 32, 107, 196);
    --mobile-dm-accent-soft: rgba(var(--mobile-dm-accent-rgb), 0.14);
    --mobile-dm-accent-strong: rgb(var(--mobile-dm-accent-rgb));
    --mobile-dm-row-height: 70px;
  }

  .group-chat .main-panel > .general-notice.alert.alert-important,
  .private-chat .main-panel > .general-notice.alert.alert-important {
    margin-bottom: 4px !important;
    padding: 6px 34px 6px 10px !important;
    border-left-width: 3px;
    border-radius: 8px;
    box-shadow: none;
    font-size: 12px;
    line-height: 1.25;
  }

  #main-room #room-notice-class.alert.alert-important,
  #main-private #room-notice-class.alert.alert-important {
    margin-bottom: 4px !important;
    padding: 6px 30px 6px 10px !important;
    border-left-width: 3px;
    border-radius: 8px;
    box-shadow: none;
    font-size: 12px;
    line-height: 1.25;
  }

  .group-chat .main-panel > .general-notice.alert.alert-important .d-flex,
  .private-chat .main-panel > .general-notice.alert.alert-important .d-flex,
  #room-notice-class.alert.alert-important .d-flex {
    align-items: flex-start;
    gap: 0.25rem;
  }

  .group-chat .main-panel > .general-notice.alert.alert-important p,
  .private-chat .main-panel > .general-notice.alert.alert-important p,
  #room-notice-class.alert.alert-important p {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
  }

  .group-chat
    .main-panel
    > .general-notice.alert.alert-important
    .general-notice-message
    > *,
  .private-chat
    .main-panel
    > .general-notice.alert.alert-important
    .general-notice-message
    > *,
  #room-notice-class.alert.alert-important #room-notice-message > * {
    margin-top: 0;
    margin-bottom: 0;
    line-height: inherit;
  }

  .group-chat .main-panel > .general-notice.alert.alert-important h1,
  .group-chat .main-panel > .general-notice.alert.alert-important h2,
  .group-chat .main-panel > .general-notice.alert.alert-important h3,
  .group-chat .main-panel > .general-notice.alert.alert-important h4,
  .group-chat .main-panel > .general-notice.alert.alert-important h5,
  .group-chat .main-panel > .general-notice.alert.alert-important h6,
  .private-chat .main-panel > .general-notice.alert.alert-important h1,
  .private-chat .main-panel > .general-notice.alert.alert-important h2,
  .private-chat .main-panel > .general-notice.alert.alert-important h3,
  .private-chat .main-panel > .general-notice.alert.alert-important h4,
  .private-chat .main-panel > .general-notice.alert.alert-important h5,
  .private-chat .main-panel > .general-notice.alert.alert-important h6,
  #room-notice-class.alert.alert-important h1,
  #room-notice-class.alert.alert-important h2,
  #room-notice-class.alert.alert-important h3,
  #room-notice-class.alert.alert-important h4,
  #room-notice-class.alert.alert-important h5,
  #room-notice-class.alert.alert-important h6 {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
  }

  .group-chat .main-panel > .general-notice.alert.alert-important ul,
  .group-chat .main-panel > .general-notice.alert.alert-important ol,
  .private-chat .main-panel > .general-notice.alert.alert-important ul,
  .private-chat .main-panel > .general-notice.alert.alert-important ol,
  #room-notice-class.alert.alert-important ul,
  #room-notice-class.alert.alert-important ol {
    margin: 0;
    padding-left: 1rem;
    line-height: inherit;
  }

  #room-notice-class.alert.alert-important .btn-close {
    top: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    padding: 4px;
    transform: scale(0.78);
    opacity: 0.86;
  }

  .group-chat .main-panel .room-notice,
  .private-chat .main-panel .room-notice {
    display: block;
    margin: 0;
    padding: 0;
  }

  html.theme-dark,
  html.dark,
  body.theme-dark,
  body.dark,
  html.theme-trueblue,
  html.trueblue,
  body.theme-trueblue,
  body.trueblue {
    --mobile-dm-surface: rgba(15, 23, 42, 0.96);
    --mobile-dm-surface-2: rgba(30, 41, 59, 0.94);
    --mobile-dm-border: rgba(125, 211, 252, 0.3);
    --mobile-dm-text: #e2e8f0;
    --mobile-dm-muted: #a5b4cc;
    --mobile-dm-accent-soft: rgba(var(--mobile-dm-accent-rgb), 0.22);
  }

  .navbar.topbar .topbar-beskeder-trigger.is-active {
    background: rgba(var(--mobile-dm-accent-rgb), 0.16);
    box-shadow: inset 0 0 0 1px rgba(var(--mobile-dm-accent-rgb), 0.28);
  }

  .mobile-dm-bubble-backdrop {
    position: fixed;
    inset: 0;
    border: 0;
    background: transparent;
    margin: 0;
    padding: 0;
    z-index: 1034;
  }

  body.mobile-dm-bubble-open .mobile-dm-bubble-backdrop {
    background: rgba(2, 6, 23, 0.18);
  }

  .mobile-dm-bubble-backdrop[hidden] {
    display: none !important;
  }

  .mobile-dm-bubble-panel {
    position: fixed;
    top: 56px;
    right: calc(var(--chat-right-panel-width, 20rem) + 12px);
    width: min(
      360px,
      calc(100vw - var(--chat-right-panel-width, 20rem) - 24px)
    );
    z-index: 1041;
  }

  body.sb-rightnav-toggled .mobile-dm-bubble-panel {
    right: 12px;
    width: min(360px, calc(100vw - 24px));
  }

  .mobile-dm-bubble-panel[hidden] {
    display: none !important;
  }

  .mobile-dm-bubble-panel-inner {
    border-radius: 18px;
    border: 1px solid var(--mobile-dm-border);
    background: linear-gradient(
      170deg,
      var(--mobile-dm-surface),
      var(--mobile-dm-surface-2)
    );
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.2);
    padding: 8px;
  }

  .mobile-dm-bubble-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 2px 8px;
  }

  .mobile-dm-bubble-title {
    font-size: 1.45rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--mobile-dm-text);
    letter-spacing: 0.01em;
  }

  .mobile-dm-bubble-head-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--mobile-dm-border);
    background: rgba(var(--mobile-dm-accent-rgb), 0.1);
    color: var(--mobile-dm-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .mobile-dm-bubble-head-btn .ti {
    font-size: 16px;
    line-height: 1;
  }

  .mobile-dm-bubble-search {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 2px 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--mobile-dm-border);
    background: rgba(148, 163, 184, 0.12);
  }

  .mobile-dm-bubble-search .ti {
    color: var(--mobile-dm-muted);
    font-size: 14px;
    line-height: 1;
  }

  #mobile-dm-bubble-search {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--mobile-dm-text);
    font-size: 13px;
    padding: 0;
  }

  #mobile-dm-bubble-search::placeholder {
    color: var(--mobile-dm-muted);
  }

  .mobile-dm-bubble-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 2px 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mobile-dm-bubble-filters::-webkit-scrollbar {
    display: none;
  }

  .mobile-dm-bubble-filter {
    flex: 0 0 auto;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: var(--mobile-dm-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 7px 11px;
  }

  .mobile-dm-bubble-filter.is-active {
    color: #fff;
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.55);
    background: linear-gradient(
      180deg,
      rgba(var(--mobile-dm-accent-rgb), 1),
      rgba(var(--mobile-dm-accent-rgb), 0.84)
    );
  }

  .mobile-dm-bubble-recent-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(320px, 52vh);
    overflow-y: auto;
    scrollbar-width: thin;
    padding: 2px;
  }

  .mobile-dm-conversation-row {
    position: relative;
  }

  .mobile-dm-conversation-row .mobile-dm-avatar-btn {
    padding-right: 44px;
  }

  .mobile-dm-conversation-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
  }

  .mobile-dm-conversation-menu-toggle {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid var(--mobile-dm-border);
    background: rgba(148, 163, 184, 0.14);
    color: var(--mobile-dm-muted);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-dm-conversation-menu-toggle .ti {
    font-size: 14px;
    line-height: 1;
  }

  .mobile-dm-conversation-actions.show .mobile-dm-conversation-menu-toggle,
  .mobile-dm-conversation-menu-toggle:active {
    color: var(--mobile-dm-accent-strong);
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.4);
    background: rgba(var(--mobile-dm-accent-rgb), 0.16);
  }

  .mobile-dm-avatar-btn {
    position: relative;
    width: 100%;
    min-height: var(--mobile-dm-row-height, 70px);
    border: 1px solid transparent;
    padding: 10px 8px;
    border-radius: 13px;
    background: transparent;
    color: var(--mobile-dm-text);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    cursor: pointer;
    transition:
      background-color 0.18s ease,
      border-color 0.18s ease,
      transform 0.12s ease;
  }

  .mobile-dm-avatar-wrap {
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
  }

  .mobile-dm-avatar-btn img {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
  }

  .mobile-dm-avatar-status {
    position: absolute;
    left: 1px;
    bottom: 1px;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    border: 2px solid var(--mobile-dm-surface);
    background: #22c55e;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.45);
  }

  .mobile-dm-avatar-unread {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 2px solid var(--mobile-dm-surface);
    background: #ef4444;
  }

  .mobile-dm-conversation-meta {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .mobile-dm-conversation-name-row,
  .mobile-dm-conversation-sub-row {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }

  .mobile-dm-conversation-name {
    min-width: 0;
    color: var(--mobile-dm-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-dm-conversation-time {
    flex: 0 0 auto;
    color: var(--mobile-dm-muted);
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
    white-space: nowrap;
  }

  .mobile-dm-conversation-preview {
    min-width: 0;
    flex: 1 1 auto;
    color: var(--mobile-dm-muted);
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-dm-conversation-badge {
    flex: 0 0 auto;
    margin-left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
  }

  .mobile-dm-open-icon {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid var(--mobile-dm-border);
    background: rgba(148, 163, 184, 0.14);
    color: var(--mobile-dm-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
  }

  .mobile-dm-open-icon .ti {
    font-size: 12px;
    line-height: 1;
  }

  .mobile-dm-avatar-btn:hover,
  .mobile-dm-avatar-btn:active {
    background: var(--mobile-dm-accent-soft);
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.3);
    transform: translateY(1px);
  }

  .mobile-dm-avatar-btn.is-active {
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.5);
    background: rgba(var(--mobile-dm-accent-rgb), 0.18);
  }

  .mobile-dm-bubble-empty {
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: var(--mobile-dm-muted);
    padding: 8px 0;
  }

  .mobile-dm-mini-chat {
    position: fixed;
    left: auto;
    right: calc(var(--chat-right-panel-width, 20rem) + 12px);
    width: min(
      360px,
      calc(100vw - var(--chat-right-panel-width, 20rem) - 24px)
    );
    bottom: 12px;
    border-radius: 16px;
    border: 1px solid var(--mobile-dm-border);
    background: linear-gradient(
      180deg,
      var(--mobile-dm-surface),
      var(--mobile-dm-surface-2)
    );
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.22);
    z-index: 1040;
    overflow: hidden;
  }

  body.sb-rightnav-toggled .mobile-dm-mini-chat {
    right: 12px;
    width: min(360px, calc(100vw - 24px));
  }

  .mobile-dm-mini-chat[hidden] {
    display: none !important;
  }

  .mobile-dm-mini-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid var(--mobile-dm-border);
    background: linear-gradient(
      160deg,
      var(--mobile-dm-accent-soft),
      rgba(var(--mobile-dm-accent-rgb), 0.06)
    );
  }

  .mobile-dm-mini-chat-user {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  #mobile-dm-mini-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(var(--mobile-dm-accent-rgb), 0.42);
  }

  .mobile-dm-mini-chat-meta {
    min-width: 0;
  }

  .mobile-dm-mini-chat-name {
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--mobile-dm-text);
  }

  .mobile-dm-mini-chat-sub {
    font-size: 10px;
    color: var(--mobile-dm-muted);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-dm-mini-chat-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
  }

  .mobile-dm-mini-actions-menu {
    display: inline-flex;
    align-items: center;
  }

  .mobile-dm-mini-btn {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--mobile-dm-border);
    background: rgba(var(--mobile-dm-accent-rgb), 0.1);
    color: var(--mobile-dm-text);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-dm-mini-chat-body {
    max-height: 188px;
    min-height: 188px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(148, 163, 184, 0.08);
  }

  .mobile-dm-mini-msg {
    max-width: 88%;
    align-self: flex-start;
    padding: 7px 9px;
    border-radius: 11px;
    background: var(--mobile-dm-surface);
    border: 1px solid var(--mobile-dm-border);
    color: var(--mobile-dm-text);
    font-size: 12px;
    line-height: 1.34;
    word-break: break-word;
    display: inline-flex;
    align-items: flex-end;
    gap: 6px;
    flex-wrap: wrap;
  }

  .mobile-dm-mini-msg-text {
    min-width: 0;
  }

  .mobile-dm-mini-msg-time {
    flex: 0 0 auto;
    color: var(--mobile-dm-muted);
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
    opacity: 0.88;
  }

  .mobile-dm-mini-msg.is-own {
    align-self: flex-end;
    background: var(--mobile-dm-accent-soft);
    border-color: rgba(var(--mobile-dm-accent-rgb), 0.42);
  }

  .mobile-dm-mini-msg.is-own .mobile-dm-mini-msg-time {
    color: rgba(var(--mobile-dm-accent-rgb), 0.92);
  }

  .mobile-dm-mini-chat-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-top: 1px solid var(--mobile-dm-border);
    background: var(--mobile-dm-surface-2);
  }

  #mobile-dm-mini-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.52);
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 13px;
    color: var(--mobile-dm-text);
    background: var(--mobile-dm-surface);
  }

  .mobile-dm-mini-send {
    width: 33px;
    height: 33px;
    min-width: 33px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(
      180deg,
      rgba(var(--mobile-dm-accent-rgb), 1),
      rgba(var(--mobile-dm-accent-rgb), 0.84)
    );
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(var(--mobile-dm-accent-rgb), 0.38);
  }

  .rtl .mobile-dm-bubble-panel {
    left: calc(var(--chat-right-panel-width, 20rem) + 12px);
    right: auto;
  }

  .rtl .mobile-dm-conversation-actions {
    right: auto;
    left: 8px;
  }

  .rtl .mobile-dm-conversation-row .mobile-dm-avatar-btn {
    padding-right: 8px;
    padding-left: 44px;
  }

  .rtl body.sb-rightnav-toggled .mobile-dm-bubble-panel {
    left: 12px;
  }

  .rtl .mobile-dm-mini-chat {
    direction: rtl;
    left: calc(var(--chat-right-panel-width, 20rem) + 12px);
    right: auto;
  }

  .rtl body.sb-rightnav-toggled .mobile-dm-mini-chat {
    left: 12px;
  }
}

