/* NearNow Web v211 — CONVERSATION LOUNGE
   Real Chat layout/interactions based on the approved dark glass reference.
   Loaded after all legacy chat/mobile layers so this file is authoritative for Chats. */

#screen-chats{
  --chat-accent:#5c55ff;
  --chat-accent-2:#1677ff;
  --chat-pink:#ff1684;
  --chat-panel:#07101d;
  --chat-panel-2:#0b1324;
  --chat-panel-3:#10182a;
  --chat-line:rgba(117,132,255,.24);
  --chat-line-soft:rgba(121,146,205,.16);
  --chat-text:#f8f9ff;
  --chat-muted:#98a6c8;
  --chat-shadow:0 22px 70px rgba(0,0,0,.42);
  position:relative;
  min-width:0;
}
.sensual-mode #screen-chats{
  --chat-accent:#c33cff;
  --chat-accent-2:#ff2d87;
  --chat-pink:#ff2b89;
  --chat-line:rgba(221,92,207,.24);
  --chat-line-soft:rgba(207,93,156,.16);
}
#screen-chats::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:-26px -30px -40px;
  pointer-events:none;
  background:
    radial-gradient(circle at 83% 80%,rgba(117,22,190,.18),transparent 30%),
    radial-gradient(circle at 38% 5%,rgba(27,112,255,.10),transparent 31%);
  filter:blur(8px);
}
.sensual-mode #screen-chats::before{
  background:
    radial-gradient(circle at 83% 80%,rgba(239,31,118,.18),transparent 30%),
    radial-gradient(circle at 38% 5%,rgba(139,49,231,.12),transparent 31%);
}

#screen-chats .chat-shell{
  width:100%!important;
  max-width:none!important;
  height:calc(100dvh - 134px)!important;
  min-height:600px!important;
  margin:0!important;
  display:grid!important;
  grid-template-columns:clamp(340px,30vw,460px) minmax(0,1fr)!important;
  gap:0!important;
  border:1px solid rgba(93,111,198,.26)!important;
  border-radius:26px!important;
  overflow:hidden!important;
  background:linear-gradient(180deg,rgba(6,13,24,.96),rgba(4,9,18,.985))!important;
  box-shadow:var(--chat-shadow)!important;
}
.sensual-mode #screen-chats .chat-shell{border-color:rgba(182,68,142,.28)!important}

/* LEFT — conversation list */
#screen-chats .chat-sidebar{
  grid-column:1!important;
  grid-row:1!important;
  min-width:0!important;
  min-height:0!important;
  height:100%!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border:0!important;
  border-right:1px solid rgba(89,113,193,.30)!important;
  border-radius:0!important;
  background:
    radial-gradient(circle at 0 45%,rgba(86,34,211,.14),transparent 34%),
    linear-gradient(180deg,rgba(5,13,25,.99),rgba(4,9,18,.995))!important;
  box-shadow:none!important;
}
.sensual-mode #screen-chats .chat-sidebar{
  border-right-color:rgba(178,63,132,.28)!important;
  background:radial-gradient(circle at 0 45%,rgba(198,38,113,.12),transparent 34%),linear-gradient(180deg,rgba(20,7,17,.99),rgba(9,5,12,.995))!important;
}
#screen-chats .chat-sidebar-head{
  flex:none!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:20px 22px 10px!important;
  border:0!important;
  background:transparent!important;
}
#screen-chats .chat-sidebar-title h2{
  margin:0!important;
  color:#fff!important;
  font-size:31px!important;
  line-height:1!important;
  letter-spacing:-.045em!important;
  font-weight:950!important;
}
#screen-chats .chat-sidebar-tagline{
  margin-top:7px!important;
  color:#a8b1da!important;
  font-size:13px!important;
  line-height:1.2!important;
}
#screen-chats #chatModeLabel{display:none!important}
#screen-chats .chat-sidebar-actions{display:flex!important;align-items:center!important;gap:7px!important}
#screen-chats .chat-refresh-icon{
  width:38px!important;height:38px!important;min-width:38px!important;padding:0!important;
  display:grid!important;place-items:center!important;
  border:1px solid rgba(98,119,194,.27)!important;border-radius:13px!important;
  background:rgba(15,23,40,.72)!important;color:#9eb0dd!important;
}
#screen-chats .chat-refresh-icon:hover{color:#fff!important;border-color:rgba(112,132,255,.55)!important;background:rgba(23,32,57,.9)!important}
#screen-chats .chat-refresh-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#screen-chats .chat-activity-mobile-close{display:none!important}

#screen-chats .chat-search{
  flex:none!important;
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  height:50px!important;
  margin:8px 22px 14px!important;
  padding:0 14px!important;
  border:1px solid rgba(129,111,255,.44)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,rgba(19,26,48,.92),rgba(12,18,35,.93))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025),0 10px 24px rgba(0,0,0,.12)!important;
}
#screen-chats .chat-search:focus-within{border-color:rgba(134,118,255,.90)!important;box-shadow:0 0 0 3px rgba(102,79,255,.11)!important}
#screen-chats .chat-search svg{width:21px;height:21px;fill:none;stroke:#9e9df8;stroke-width:2;stroke-linecap:round}
#screen-chats .chat-search input{
  width:100%!important;min-width:0!important;height:100%!important;padding:0!important;border:0!important;outline:0!important;
  background:transparent!important;color:#eff2ff!important;font-size:14px!important;
}
#screen-chats .chat-search input::placeholder{color:#8f9abc!important}
#screen-chats .chat-search input::-webkit-search-cancel-button{filter:invert(1);opacity:.55}

#screen-chats .chat-filter-tabs{
  flex:none!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
  margin:0 22px 14px!important;
}
#screen-chats .chat-filter-tabs button{
  min-width:0!important;height:46px!important;padding:0 10px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
  border:1px solid rgba(78,93,151,.17)!important;border-radius:17px!important;
  background:rgba(15,23,42,.79)!important;color:#b5c0e2!important;
  font-size:12px!important;font-weight:820!important;white-space:nowrap!important;
}
#screen-chats .chat-filter-tabs button:hover{border-color:rgba(105,119,212,.39)!important;color:#fff!important}
#screen-chats .chat-filter-tabs button.active{
  color:#fff!important;border-color:rgba(116,88,255,.74)!important;
  background:linear-gradient(135deg,#6c37ff,#1d6cff)!important;
  box-shadow:0 8px 26px rgba(67,54,255,.28),inset 0 1px 0 rgba(255,255,255,.18)!important;
}
#screen-chats .chat-filter-tabs b{
  min-width:22px;height:22px;padding:0 6px;display:grid;place-items:center;border-radius:999px;
  background:#ff1477;color:#fff;font-size:10px;font-weight:950;
}
#screen-chats .chat-filter-tabs button.active b{background:rgba(255,255,255,.20)}
#screen-chats .chat-filter-tabs b[data-zero="true"]{display:none}

#screen-chats .chat-scroll{
  flex:1 1 auto!important;min-height:0!important;overflow:auto!important;
  padding:0 11px 18px!important;scrollbar-gutter:stable!important;overscroll-behavior:contain!important;
}
#screen-chats #chatConversations{display:grid!important;gap:4px!important}
#screen-chats .chat-contact-row{
  position:relative!important;display:block!important;min-width:0!important;border-radius:18px!important;
}
#screen-chats .chat-contact-row.hidden-by-chat-filter{display:none!important}
#screen-chats .chat-contact.chat-contact-compact{
  width:100%!important;min-height:82px!important;padding:10px 12px!important;
  display:grid!important;grid-template-columns:58px minmax(0,1fr) auto!important;align-items:center!important;gap:11px!important;
  border:1px solid transparent!important;border-radius:18px!important;
  background:transparent!important;color:#fff!important;box-shadow:none!important;
}
#screen-chats .chat-contact.chat-contact-compact:hover{
  border-color:rgba(87,106,184,.24)!important;background:rgba(14,23,42,.60)!important;
}
#screen-chats .chat-contact.chat-contact-compact.active{
  border-color:rgba(72,118,255,.78)!important;
  background:linear-gradient(135deg,rgba(98,45,255,.28),rgba(11,46,93,.54))!important;
  box-shadow:0 0 0 1px rgba(88,50,255,.17),inset 0 1px 0 rgba(255,255,255,.035)!important;
}
.sensual-mode #screen-chats .chat-contact.chat-contact-compact.active{
  border-color:rgba(226,59,145,.70)!important;
  background:linear-gradient(135deg,rgba(184,43,155,.24),rgba(74,13,45,.52))!important;
}
#screen-chats .chat-contact.chat-contact-compact .chat-avatar{
  width:58px!important;height:58px!important;min-width:58px!important;border-radius:50%!important;
  border:1px solid rgba(110,127,204,.36)!important;background:#11182a!important;
  box-shadow:0 6px 18px rgba(0,0,0,.26)!important;
}
#screen-chats .chat-avatar-thumb img{object-fit:cover!important;background:#0e1728!important}
#screen-chats .chat-avatar-presence{
  right:1px!important;bottom:2px!important;width:13px!important;height:13px!important;
  border:2px solid #07101d!important;background:#4ee568!important;
  box-shadow:0 0 0 2px rgba(44,220,102,.09),0 0 12px rgba(56,225,112,.35)!important;
}
#screen-chats .chat-contact-main{min-width:0!important;display:grid!important;gap:5px!important}
#screen-chats .chat-contact-top{min-width:0!important;display:flex!important;align-items:center!important;gap:8px!important}
#screen-chats .chat-profile-name-btn{
  min-width:0!important;max-width:100%!important;padding:0!important;border:0!important;background:transparent!important;
  color:#f7f8ff!important;font-size:15px!important;font-weight:900!important;line-height:1.1!important;text-align:left!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
}
#screen-chats .chat-contact-preview{
  display:block!important;min-width:0!important;color:#9eabd0!important;font-size:12.5px!important;line-height:1.25!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
}
#screen-chats .chat-contact-side{align-self:stretch!important;display:grid!important;align-content:center!important;justify-items:end!important;gap:8px!important;min-width:54px!important}
#screen-chats .chat-contact-time{color:#8799c4!important;font-size:11px!important;white-space:nowrap!important}
#screen-chats .chat-list-unread{
  min-width:24px!important;height:24px!important;padding:0 6px!important;border-radius:999px!important;display:grid!important;place-items:center!important;
  background:linear-gradient(180deg,#ff1a7e,#e80f6d)!important;color:#fff!important;font-size:10px!important;font-weight:950!important;
  box-shadow:0 0 16px rgba(255,18,119,.25)!important;
}
#screen-chats .chat-attention-dot{width:11px!important;height:11px!important;background:#ff1779!important;box-shadow:0 0 0 3px rgba(255,23,121,.09),0 0 13px rgba(255,23,121,.34)!important}
#screen-chats .chat-contact-request-badge{
  display:inline-flex!important;width:max-content!important;max-width:100%!important;margin:0!important;padding:2px 6px!important;
  border:1px solid rgba(114,105,255,.48)!important;border-radius:999px!important;background:rgba(89,64,255,.12)!important;color:#bcb9ff!important;
  font-size:8px!important;font-weight:900!important;letter-spacing:.05em!important;text-transform:uppercase!important;
}
#screen-chats .chat-contact-delete{
  position:absolute!important;right:6px!important;bottom:4px!important;z-index:3!important;
  width:29px!important;min-width:29px!important;height:29px!important;padding:0!important;
  border:1px solid rgba(103,118,166,.20)!important;border-radius:10px!important;background:rgba(8,14,26,.88)!important;color:#687896!important;
  opacity:0!important;transform:translateY(3px)!important;pointer-events:none!important;
}
#screen-chats .chat-contact-row:hover .chat-contact-delete,#screen-chats .chat-contact-delete:focus-visible{opacity:1!important;transform:none!important;pointer-events:auto!important}
#screen-chats .chat-contact-delete:hover{color:#fff!important;border-color:rgba(126,144,208,.5)!important}
#screen-chats .chat-contact-delete svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* RIGHT — lounge */
#screen-chats .chat-thread{
  grid-column:2!important;grid-row:1!important;min-width:0!important;min-height:0!important;height:100%!important;
  display:flex!important;flex-direction:column!important;overflow:hidden!important;
  border:0!important;border-radius:0!important;background:
    radial-gradient(circle at 88% 72%,rgba(94,28,182,.17),transparent 33%),
    linear-gradient(180deg,rgba(5,13,26,.995),rgba(3,8,16,.995))!important;
  box-shadow:none!important;
}
.sensual-mode #screen-chats .chat-thread{background:radial-gradient(circle at 88% 72%,rgba(212,34,114,.15),transparent 33%),linear-gradient(180deg,rgba(20,7,17,.995),rgba(8,4,10,.995))!important}
#screen-chats .chat-thread-head{
  flex:none!important;position:relative!important;display:grid!important;
  grid-template-columns:minmax(230px,1fr) auto!important;grid-template-areas:"identity actions"!important;
  align-items:center!important;gap:16px!important;min-height:136px!important;padding:16px 22px!important;
  border:0!important;border-bottom:1px solid rgba(84,103,179,.26)!important;
  background:linear-gradient(180deg,rgba(8,15,29,.94),rgba(6,12,24,.89))!important;
}
.sensual-mode #screen-chats .chat-thread-head{border-bottom-color:rgba(177,62,132,.25)!important;background:linear-gradient(180deg,rgba(24,8,19,.94),rgba(15,6,14,.90))!important}
#screen-chats .chat-mobile-activity-toggle{display:none!important}
#screen-chats .chat-thread-copy{
  grid-area:identity!important;display:grid!important;grid-template-columns:84px minmax(0,1fr)!important;align-items:center!important;gap:16px!important;
  min-width:0!important;padding:0!important;cursor:pointer!important;
}
#screen-chats .chat-thread-copy:focus-visible{outline:2px solid rgba(103,107,255,.75)!important;outline-offset:5px!important;border-radius:18px!important}
#screen-chats .chat-thread-avatar{
  width:84px;height:84px;border-radius:50%;overflow:hidden;display:grid;place-items:center;
  border:1px solid rgba(111,123,212,.44);background:#11182a;box-shadow:0 9px 28px rgba(0,0,0,.32),0 0 0 5px rgba(87,59,255,.05);
}
#screen-chats .chat-thread-avatar .chat-avatar{width:100%!important;height:100%!important;border-radius:50%!important;background:transparent!important}
#screen-chats .chat-thread-avatar .chat-avatar img,#screen-chats .chat-thread-avatar>img{width:100%;height:100%;object-fit:cover;background:#101827}
#screen-chats .chat-thread-avatar .chat-avatar-presence{width:16px!important;height:16px!important;right:4px!important;bottom:4px!important;border-width:3px!important}
#screen-chats .chat-thread-identity{min-width:0;display:grid;gap:7px}
#screen-chats .chat-thread-copy h3{
  margin:0!important;max-width:100%!important;color:#fff!important;font-size:24px!important;line-height:1.05!important;font-weight:950!important;letter-spacing:-.03em!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
#screen-chats .chat-thread-meta{margin:0!important;color:#9ca8d0!important;font-size:14px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#screen-chats .chat-shell.chat-no-active .chat-thread-avatar{opacity:.35;filter:saturate(.35)}
#screen-chats .chat-shell.chat-no-active .chat-thread-copy{cursor:default!important}

#screen-chats .chat-head-actions{
  grid-area:actions!important;display:grid!important;grid-template-columns:repeat(4,112px)!important;gap:12px!important;
  width:auto!important;max-width:none!important;overflow:visible!important;padding:0!important;margin:0!important;background:transparent!important;box-shadow:none!important;
}
#screen-chats .chat-action-lounge{
  --action-rgb:108,86,255;
  width:112px!important;height:98px!important;min-width:112px!important;padding:11px 8px!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:7px!important;
  border:1px solid rgba(var(--action-rgb),.30)!important;border-radius:22px!important;
  background:linear-gradient(180deg,rgba(var(--action-rgb),.10),rgba(14,19,35,.86))!important;
  color:#f5f4ff!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 10px 28px rgba(0,0,0,.22)!important;
  font-size:13px!important;font-weight:780!important;line-height:1.05!important;text-align:center!important;
}
#screen-chats .chat-action-lounge svg{width:31px!important;height:31px!important;fill:none!important;stroke:rgb(var(--action-rgb))!important;stroke-width:1.9!important;stroke-linecap:round!important;stroke-linejoin:round!important;filter:drop-shadow(0 0 7px rgba(var(--action-rgb),.45))}
#screen-chats .chat-action-lounge.action-match{--action-rgb:255,27,126}
#screen-chats .chat-action-lounge.action-reveal{--action-rgb:98,103,255}
#screen-chats .chat-action-lounge.action-meeting{--action-rgb:255,34,129}
#screen-chats .chat-action-lounge.action-more{--action-rgb:145,129,246}
#screen-chats .chat-action-lounge:hover:not(:disabled){transform:translateY(-2px)!important;border-color:rgba(var(--action-rgb),.68)!important;background:linear-gradient(180deg,rgba(var(--action-rgb),.18),rgba(17,22,43,.94))!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 14px 30px rgba(0,0,0,.28),0 0 24px rgba(var(--action-rgb),.12)!important}
#screen-chats .chat-action-lounge:disabled{opacity:.35!important;filter:saturate(.6)!important;cursor:default!important;transform:none!important}
#screen-chats .chat-more-wrap{position:relative;width:112px;height:98px}
#screen-chats .chat-more-menu{
  position:absolute;z-index:80;right:0;top:calc(100% + 10px);width:270px;padding:8px;
  border:1px solid rgba(116,119,211,.30);border-radius:18px;background:rgba(8,13,25,.98);box-shadow:0 24px 60px rgba(0,0,0,.52);backdrop-filter:blur(18px);
}
.sensual-mode #screen-chats .chat-more-menu{border-color:rgba(203,74,151,.29);background:rgba(22,7,17,.985)}
#screen-chats .chat-more-menu[hidden]{display:none!important}
#screen-chats .chat-more-action{
  width:100%;min-height:58px;padding:9px 10px;display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:10px;
  border:0;border-radius:13px;background:transparent;color:#eef1fb;text-align:left;
}
#screen-chats .chat-more-action:hover:not(:disabled){background:rgba(62,72,120,.22)}
#screen-chats .chat-more-action svg{width:23px;height:23px;fill:none;stroke:#8fa6ff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#screen-chats .chat-more-action.action-block svg{stroke:#ff5c93}#screen-chats .chat-more-action.action-delete svg{stroke:#ffb24e}
#screen-chats .chat-more-action span{display:grid;gap:3px}#screen-chats .chat-more-action b{font-size:12px}#screen-chats .chat-more-action small{font-size:10px;color:#8793b2;font-weight:500}
#screen-chats .chat-more-action:disabled{opacity:.38!important;cursor:default!important}

#screen-chats .meeting-chat-card{flex:none;margin:10px 16px 0!important;border-radius:17px!important}
#screen-chats .chat-messages{
  position:relative!important;flex:1 1 auto!important;min-height:0!important;overflow:auto!important;
  display:flex!important;flex-direction:column!important;gap:16px!important;padding:18px 24px 22px!important;
  background:
    radial-gradient(circle at 89% 75%,rgba(130,25,190,.17),transparent 32%),
    radial-gradient(circle at 20% 12%,rgba(36,93,213,.07),transparent 27%),
    linear-gradient(180deg,rgba(4,10,20,.98),rgba(4,9,18,.99))!important;
  overscroll-behavior:contain!important;scrollbar-gutter:stable!important;
}
.sensual-mode #screen-chats .chat-messages{background:radial-gradient(circle at 89% 75%,rgba(220,32,114,.17),transparent 32%),radial-gradient(circle at 20% 12%,rgba(123,38,176,.08),transparent 27%),linear-gradient(180deg,rgba(16,5,13,.98),rgba(8,4,9,.99))!important}
#screen-chats .chat-messages::after{
  content:"";position:absolute;inset:0;pointer-events:none;opacity:.25;
  background-image:linear-gradient(rgba(255,255,255,.012) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.008) 1px,transparent 1px);background-size:48px 48px;
}
#screen-chats .message-row{
  position:relative!important;z-index:1!important;display:flex!important;align-items:flex-end!important;gap:10px!important;max-width:100%!important;
}
#screen-chats .message-row.own{justify-content:flex-end!important}
#screen-chats .chat-message-avatar{flex:none;align-self:flex-end}
#screen-chats .chat-message-avatar .chat-avatar{width:48px!important;height:48px!important;border:1px solid rgba(102,116,193,.35)!important;background:#11182a!important}
#screen-chats .bubble{
  max-width:min(66%,760px)!important;padding:11px 15px!important;border-radius:18px 18px 18px 5px!important;
  border:1px solid rgba(90,104,163,.22)!important;background:linear-gradient(180deg,rgba(28,36,61,.96),rgba(20,27,47,.98))!important;
  color:#f4f6ff!important;font-size:15px!important;line-height:1.42!important;word-break:break-word!important;
  box-shadow:0 7px 22px rgba(0,0,0,.17)!important;
}
#screen-chats .message-row.own .bubble{
  border-color:rgba(74,117,255,.52)!important;border-radius:18px 18px 5px 18px!important;
  background:linear-gradient(135deg,#1685ff,#353cf4 80%)!important;color:#fff!important;
  box-shadow:0 8px 22px rgba(25,76,222,.24)!important;
}
.sensual-mode #screen-chats .message-row.own .bubble{border-color:rgba(240,69,150,.52)!important;background:linear-gradient(135deg,#d72d7c,#823ee5 90%)!important;box-shadow:0 8px 22px rgba(188,37,108,.23)!important}
#screen-chats .bubble.media-bubble{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;max-width:min(54%,520px)!important}
#screen-chats .bubble.voice-bubble{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;max-width:min(52%,450px)!important}
#screen-chats .bubble.deleted{color:#8e99b5!important;font-style:italic!important}
#screen-chats .bubble-meta{display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:6px!important;margin-top:5px!important;color:#8e9aba!important;font-size:10px!important}
#screen-chats .message-row.own .bubble-meta{color:rgba(229,236,255,.76)!important}
#screen-chats .message-delivery-rail{top:8px!important;bottom:8px!important;right:-3px!important;width:3px!important;border-radius:999px!important}
#screen-chats .message-image{
  display:block!important;width:100%!important;max-width:100%!important;max-height:430px!important;object-fit:cover!important;
  border:1px solid rgba(210,153,255,.56)!important;border-radius:24px!important;margin:0!important;background:#0c1322!important;box-shadow:0 10px 32px rgba(0,0,0,.28)!important;cursor:zoom-in!important;
}
#screen-chats .chat-media-item{position:relative!important}
#screen-chats .chat-media-item+.bubble-caption{margin-top:7px}
#screen-chats .chat-voice-player{
  min-width:340px;max-width:100%;height:64px;padding:8px 14px 8px 9px;display:grid;grid-template-columns:46px minmax(130px,1fr) auto;align-items:center;gap:11px;
  border:1px solid rgba(115,106,209,.28);border-radius:21px;background:linear-gradient(180deg,rgba(28,35,62,.96),rgba(20,26,48,.98));box-shadow:0 8px 24px rgba(0,0,0,.18);
}
#screen-chats .chat-voice-player button{width:44px;height:44px;border:0;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#8b65e8,#6253c8);color:#fff;box-shadow:0 6px 15px rgba(85,67,193,.25)}
#screen-chats .chat-voice-player button::before{content:"";width:0;height:0;border-top:8px solid transparent;border-bottom:8px solid transparent;border-left:12px solid currentColor;margin-left:3px}
#screen-chats .chat-voice-player.playing button::before{width:12px;height:14px;border:0;border-left:4px solid currentColor;border-right:4px solid currentColor;margin:0}
#screen-chats .chat-voice-wave{height:30px;display:flex;align-items:center;gap:3px;overflow:hidden}
#screen-chats .chat-voice-wave i{display:block;width:3px;height:var(--voice-h,10px);border-radius:99px;background:#9187e8;opacity:.9}
#screen-chats .chat-voice-duration{color:#a9b1d1;font-size:12px;white-space:nowrap}
#screen-chats .chat-voice-player audio{display:none}
#screen-chats .message-actions{opacity:0;transition:opacity .16s ease}#screen-chats .bubble:hover .message-actions,#screen-chats .message-actions:focus-within{opacity:1}
#screen-chats .message-actions button{color:#aab5d1!important}
#screen-chats .message-actions button:hover{color:#fff!important}

#screen-chats .chat-thread-actions{position:relative;z-index:1;display:grid!important;gap:10px!important;margin:0 0 4px!important}
#screen-chats .chat-thread-action{border-color:rgba(102,102,222,.30)!important;background:linear-gradient(180deg,rgba(27,31,58,.94),rgba(15,21,39,.96))!important;border-radius:16px!important}

/* Composer */
#screen-chats .chat-compose{
  flex:none!important;position:relative!important;display:grid!important;
  grid-template-columns:52px minmax(0,1fr) auto 58px!important;align-items:center!important;gap:8px!important;
  min-height:86px!important;padding:11px 14px!important;border:0!important;border-top:1px solid rgba(91,104,177,.25)!important;
  background:linear-gradient(180deg,rgba(7,13,25,.96),rgba(5,10,20,.99))!important;
}
.sensual-mode #screen-chats .chat-compose{border-top-color:rgba(181,63,133,.22)!important;background:linear-gradient(180deg,rgba(19,7,17,.96),rgba(9,4,10,.99))!important}
#screen-chats .chat-compose-plus-wrap{position:relative}
#screen-chats .chat-compose-icon,#screen-chats .chat-send-lounge{
  width:46px!important;height:46px!important;min-width:46px!important;padding:0!important;display:grid!important;place-items:center!important;
  border:1px solid rgba(105,118,192,.33)!important;border-radius:15px!important;background:rgba(15,23,42,.82)!important;color:#a9aaf8!important;box-shadow:none!important;
}
#screen-chats .chat-compose-plus{width:52px!important;height:52px!important;border-radius:50%!important}
#screen-chats .chat-compose-icon:hover:not(:disabled),#screen-chats .chat-compose-plus:hover:not(:disabled){color:#fff!important;border-color:rgba(128,116,255,.62)!important;background:rgba(28,34,62,.96)!important}
#screen-chats .chat-compose-icon:disabled{opacity:.38!important;cursor:default!important}
#screen-chats .chat-compose-icon svg,#screen-chats .chat-send-lounge svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#screen-chats .chat-compose textarea{
  width:100%!important;min-width:0!important;min-height:52px!important;max-height:128px!important;padding:15px 16px!important;resize:none!important;
  border:1px solid rgba(76,91,152,.25)!important;border-radius:19px!important;background:rgba(12,19,35,.72)!important;color:#fff!important;font-size:14px!important;line-height:1.35!important;outline:0!important;
}
#screen-chats .chat-compose textarea:focus{border-color:rgba(116,102,255,.55)!important;box-shadow:0 0 0 3px rgba(99,75,255,.07)!important}
#screen-chats .chat-compose textarea::placeholder{color:#7e8aae!important}
#screen-chats .chat-compose-tools{display:flex!important;align-items:center!important;gap:4px!important}
#screen-chats .chat-send-lounge{
  width:58px!important;height:58px!important;min-width:58px!important;border:1px solid rgba(120,88,255,.72)!important;border-radius:20px!important;
  background:linear-gradient(135deg,#8050ff,#2f66ff)!important;color:#fff!important;box-shadow:0 10px 28px rgba(70,60,255,.28),inset 0 1px 0 rgba(255,255,255,.16)!important;
}
.sensual-mode #screen-chats .chat-send-lounge{border-color:rgba(236,65,149,.70)!important;background:linear-gradient(135deg,#d83482,#7f42e8)!important;box-shadow:0 10px 28px rgba(185,43,123,.27),inset 0 1px 0 rgba(255,255,255,.14)!important}
#screen-chats .chat-send-lounge:hover:not(:disabled){transform:translateY(-1px)!important;filter:brightness(1.08)!important}
#screen-chats .chat-send-lounge:disabled{opacity:.38!important;filter:saturate(.6)!important;cursor:default!important}
#screen-chats .chat-attach-tray,#screen-chats .chat-emoji-tray{
  position:absolute;z-index:90;bottom:calc(100% + 10px);padding:8px;border:1px solid rgba(108,112,202,.31);border-radius:16px;background:rgba(8,14,27,.985);box-shadow:0 20px 52px rgba(0,0,0,.48);backdrop-filter:blur(16px)
}
#screen-chats .chat-attach-tray[hidden],#screen-chats .chat-emoji-tray[hidden]{display:none!important}
#screen-chats .chat-attach-tray{left:0;width:190px;display:grid;gap:4px}
#screen-chats .chat-attach-tray button{min-height:44px;padding:8px 10px;display:grid;grid-template-columns:28px 1fr;align-items:center;gap:8px;border:0;border-radius:11px;background:transparent;color:#e9edff;text-align:left}
#screen-chats .chat-attach-tray button:hover{background:rgba(79,83,158,.22)}
#screen-chats .chat-attach-tray svg{width:21px;height:21px;fill:none;stroke:#9d99ff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#screen-chats .chat-emoji-tray{right:64px;display:grid;grid-template-columns:repeat(4,42px);gap:4px}
#screen-chats .chat-emoji-tray button{width:42px;height:42px;padding:0;border:0;border-radius:10px;background:transparent;font-size:21px}
#screen-chats .chat-emoji-tray button:hover{background:rgba(79,83,158,.22)}
#screen-chats .chat-upload-retry{position:absolute;left:72px;bottom:76px;z-index:30}
#screen-chats .nn-empty-state{margin:auto!important;max-width:500px!important;border:0!important;background:transparent!important;color:#8795ba!important}
#screen-chats .nn-empty-state b{color:#eef2ff!important;font-size:18px!important}

/* Tablet / narrower desktop */
@media (min-width:861px) and (max-width:1260px){
  #screen-chats .chat-shell{grid-template-columns:320px minmax(0,1fr)!important}
  #screen-chats .chat-sidebar-head{padding-inline:16px!important}#screen-chats .chat-search,#screen-chats .chat-filter-tabs{margin-left:16px!important;margin-right:16px!important}
  #screen-chats .chat-thread-head{grid-template-columns:minmax(200px,1fr) auto!important;min-height:116px!important;padding:14px 16px!important}
  #screen-chats .chat-thread-copy{grid-template-columns:68px minmax(0,1fr)!important;gap:12px!important}#screen-chats .chat-thread-avatar{width:68px;height:68px}#screen-chats .chat-thread-copy h3{font-size:20px!important}#screen-chats .chat-thread-meta{font-size:12px!important}
  #screen-chats .chat-head-actions{grid-template-columns:repeat(4,84px)!important;gap:8px!important}#screen-chats .chat-action-lounge,#screen-chats .chat-more-wrap{width:84px!important;min-width:84px!important;height:80px!important}#screen-chats .chat-action-lounge{border-radius:17px!important;font-size:11px!important}#screen-chats .chat-action-lounge svg{width:25px!important;height:25px!important}
  #screen-chats .chat-messages{padding-inline:18px!important}#screen-chats .bubble{max-width:72%!important}
}

/* Mobile: conversation list first, open chat as full-screen lounge panel. */
@media (max-width:860px){
  #screen-chats{margin:0!important;min-height:0!important}
  #screen-chats::before{inset:-30px -14px -20px!important}
  #screen-chats .chat-shell{
    display:block!important;width:100%!important;height:calc(100dvh - var(--nn-mobile-topbar,64px) - var(--nn-mobile-nav,70px) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 8px)!important;min-height:520px!important;
    border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:hidden!important;
  }
  #screen-chats .chat-sidebar{
    display:flex!important;width:100%!important;height:100%!important;border:0!important;border-radius:0!important;background:transparent!important;
  }
  #screen-chats .chat-shell.chat-has-active:not(.chat-list-open) .chat-sidebar{display:none!important}
  #screen-chats .chat-shell.chat-list-open .chat-sidebar{display:flex!important}
  #screen-chats .chat-shell.chat-list-open .chat-thread{display:none!important}
  #screen-chats .chat-shell.chat-no-active .chat-thread{display:none!important}
  #screen-chats .chat-sidebar-head{padding:9px 8px 8px!important;align-items:center!important}
  #screen-chats .chat-sidebar-title h2{font-size:29px!important}#screen-chats .chat-sidebar-tagline{font-size:12px!important;margin-top:4px!important}
  #screen-chats .chat-activity-mobile-close{display:none!important}#screen-chats .chat-refresh-icon{width:42px!important;height:42px!important}
  #screen-chats .chat-search{height:48px!important;margin:8px 8px 10px!important;border-radius:16px!important}
  #screen-chats .chat-filter-tabs{margin:0 8px 10px!important;gap:6px!important}#screen-chats .chat-filter-tabs button{height:42px!important;border-radius:14px!important;padding:0 6px!important;font-size:11px!important}#screen-chats .chat-filter-tabs b{min-width:20px;height:20px;font-size:9px}
  #screen-chats .chat-scroll{padding:0 3px 16px!important}
  #screen-chats .chat-contact.chat-contact-compact{min-height:76px!important;grid-template-columns:54px minmax(0,1fr) auto!important;padding:8px!important;gap:10px!important;border-radius:16px!important}
  #screen-chats .chat-contact.chat-contact-compact .chat-avatar{width:54px!important;height:54px!important;min-width:54px!important}#screen-chats .chat-profile-name-btn{font-size:15px!important}#screen-chats .chat-contact-preview{font-size:12px!important}
  #screen-chats .chat-contact-delete{display:none!important}

  #screen-chats .chat-thread{
    display:flex!important;width:100%!important;height:100%!important;border:0!important;border-radius:0!important;background:transparent!important;
  }
  #screen-chats .chat-thread-head{
    display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;grid-template-areas:"back identity" "actions actions"!important;
    min-height:0!important;gap:9px 10px!important;padding:7px 6px 8px!important;border-bottom-color:rgba(93,108,188,.20)!important;background:rgba(6,13,24,.88)!important;backdrop-filter:blur(16px)!important;
  }
  .sensual-mode #screen-chats .chat-thread-head{background:rgba(18,6,15,.89)!important}
  #screen-chats .chat-mobile-activity-toggle{
    grid-area:back!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;
    width:auto!important;min-width:64px!important;height:42px!important;margin:0!important;padding:0 9px!important;border:1px solid rgba(104,108,220,.30)!important;border-radius:13px!important;background:rgba(18,24,48,.82)!important;color:#e2e5ff!important;font-size:11px!important;font-weight:850!important;
  }
  #screen-chats .chat-mobile-activity-count{min-width:20px!important;height:20px!important;padding:0 5px!important;background:#ff1578!important;color:#fff!important;font-size:9px!important;border-radius:999px!important;display:grid!important;place-items:center!important}
  #screen-chats .chat-thread-copy{grid-area:identity!important;grid-template-columns:48px minmax(0,1fr)!important;gap:9px!important}
  #screen-chats .chat-thread-avatar{width:48px;height:48px;box-shadow:none}#screen-chats .chat-thread-copy h3{font-size:17px!important}#screen-chats .chat-thread-meta{font-size:10px!important;margin-top:1px!important}
  #screen-chats .chat-head-actions{
    grid-area:actions!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;width:100%!important;
  }
  #screen-chats .chat-action-lounge,#screen-chats .chat-more-wrap{width:100%!important;min-width:0!important;height:54px!important}
  #screen-chats .chat-action-lounge{height:54px!important;min-width:0!important;padding:4px 5px!important;border-radius:14px!important;gap:3px!important;font-size:9.5px!important;line-height:1!important}
  #screen-chats .chat-action-lounge svg{width:20px!important;height:20px!important}#screen-chats .chat-action-lounge span:not(.sr-only){display:block!important}
  #screen-chats .chat-more-menu{position:fixed!important;left:8px!important;right:8px!important;top:auto!important;bottom:calc(var(--nn-mobile-nav,70px) + env(safe-area-inset-bottom) + 8px)!important;width:auto!important;max-width:none!important}
  #screen-chats .chat-more-action{min-height:60px!important}
  #screen-chats .chat-messages{gap:11px!important;padding:13px 8px 16px!important}
  #screen-chats .chat-message-avatar .chat-avatar{width:36px!important;height:36px!important}
  #screen-chats .bubble{max-width:79%!important;padding:9px 11px!important;border-radius:16px 16px 16px 5px!important;font-size:13.5px!important}
  #screen-chats .message-row.own .bubble{border-radius:16px 16px 5px 16px!important}
  #screen-chats .bubble.media-bubble{max-width:74%!important}#screen-chats .bubble.voice-bubble{max-width:82%!important}
  #screen-chats .message-image{max-height:320px!important;border-radius:18px!important}
  #screen-chats .chat-voice-player{min-width:250px;height:58px;grid-template-columns:40px minmax(110px,1fr) auto;gap:8px;padding:7px 10px 7px 7px;border-radius:18px}#screen-chats .chat-voice-player button{width:40px;height:40px}
  #screen-chats .chat-compose{
    grid-template-columns:44px minmax(0,1fr) auto 48px!important;gap:5px!important;min-height:70px!important;padding:7px 5px calc(7px + env(safe-area-inset-bottom))!important;
  }
  #screen-chats .chat-compose-plus{width:44px!important;height:44px!important}#screen-chats .chat-compose-icon{width:38px!important;min-width:38px!important;height:38px!important;border-radius:12px!important}#screen-chats .chat-compose-tools{gap:2px!important}
  #screen-chats .chat-compose textarea{min-height:44px!important;max-height:94px!important;padding:12px 12px!important;border-radius:16px!important;font-size:13px!important}
  #screen-chats .chat-send-lounge{width:48px!important;min-width:48px!important;height:48px!important;border-radius:16px!important}#screen-chats .chat-send-lounge svg{width:21px;height:21px}
  #screen-chats .chat-attach-tray{left:0;bottom:calc(100% + 7px)}#screen-chats .chat-emoji-tray{right:0;bottom:calc(100% + 7px);grid-template-columns:repeat(4,38px)}#screen-chats .chat-emoji-tray button{width:38px;height:38px;font-size:19px}
  #screen-chats .message-actions{opacity:1}
}

@media (max-width:390px){
  #screen-chats .chat-filter-tabs button span{font-size:10px}#screen-chats .chat-filter-tabs button{gap:4px!important}
  #screen-chats .chat-contact.chat-contact-compact{grid-template-columns:50px minmax(0,1fr) auto!important}#screen-chats .chat-contact.chat-contact-compact .chat-avatar{width:50px!important;height:50px!important;min-width:50px!important}
  #screen-chats .chat-thread-head{gap:7px!important;padding-inline:4px!important}
  #screen-chats .chat-mobile-activity-toggle{min-width:58px!important;padding:0 7px!important;font-size:10px!important}
  #screen-chats .chat-thread-copy{grid-template-columns:44px minmax(0,1fr)!important;gap:7px!important}#screen-chats .chat-thread-avatar{width:44px;height:44px}#screen-chats .chat-thread-copy h3{font-size:15px!important}
  #screen-chats .chat-action-lounge{font-size:9px!important}
  #screen-chats .chat-compose{grid-template-columns:40px minmax(0,1fr) auto 44px!important}#screen-chats .chat-compose-plus{width:40px!important;height:40px!important}#screen-chats .chat-compose-icon{width:34px!important;min-width:34px!important;height:34px!important}#screen-chats .chat-compose-icon svg{width:19px;height:19px}#screen-chats .chat-send-lounge{width:44px!important;min-width:44px!important;height:44px!important}
  #screen-chats .chat-voice-player{min-width:220px}
}

@media (prefers-reduced-motion:reduce){
  #screen-chats *{scroll-behavior:auto!important}
  #screen-chats .chat-action-lounge,#screen-chats .chat-contact,#screen-chats .chat-compose-icon,#screen-chats .chat-send-lounge{transition:none!important}
}
