.direct-shell{width:min(1180px,100%);margin:auto}.direct-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:15px;padding:22px 24px;border:1px solid rgba(37,244,238,.38);border-radius:22px;background:radial-gradient(circle at 90% 0,rgba(254,44,85,.22),transparent 36%),linear-gradient(135deg,#111b29,#25143d);box-shadow:0 18px 55px rgba(0,0,0,.28)}.direct-hero h2{margin:5px 0;font-size:25px}.direct-hero p{margin:0;color:var(--txt2)}.direct-total{display:grid;place-items:center;min-width:68px;height:68px;border:1px solid rgba(37,244,238,.45);border-radius:20px;background:rgba(37,244,238,.08);color:var(--cyan);font-size:22px;font-weight:900}.direct-layout{display:grid;grid-template-columns:minmax(270px,.42fr) minmax(0,1fr);min-height:620px;overflow:hidden;border:1px solid var(--borde);border-radius:22px;background:#11131c}.direct-sidebar{border-right:1px solid var(--borde);background:linear-gradient(180deg,#191c29,#11131c)}.direct-sidebar-head{padding:17px;border-bottom:1px solid var(--borde)}.direct-sidebar-head b,.direct-sidebar-head small{display:block}.direct-sidebar-head small{margin-top:4px;color:var(--txt2)}.direct-list{display:grid;gap:5px;padding:9px}.direct-conversation{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;padding:11px;border:1px solid transparent;border-radius:14px;background:transparent;color:#fff;text-align:left;cursor:pointer}.direct-conversation:hover,.direct-conversation.active{border-color:rgba(37,244,238,.38);background:linear-gradient(135deg,rgba(37,244,238,.1),rgba(122,43,255,.12))}.direct-avatar{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:linear-gradient(135deg,#25f4ee,#7a2bff);color:#091015;font-weight:900;object-fit:cover}.direct-conversation b,.direct-conversation small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.direct-conversation small{margin-top:3px;color:var(--txt2)}.direct-unread{display:grid;place-items:center;min-width:24px;height:24px;padding:0 6px;border-radius:999px;background:linear-gradient(135deg,#fe2c55,#a72bff);font-size:9px;font-weight:900}.direct-chat{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-width:0}.direct-chat-head{display:flex;align-items:center;gap:11px;padding:13px 16px;border-bottom:1px solid var(--borde);background:rgba(255,255,255,.025)}.direct-chat-head b,.direct-chat-head small{display:block}.direct-chat-head small{color:var(--txt2)}.direct-back{display:none}.direct-messages{display:flex;flex-direction:column;gap:9px;overflow:auto;padding:18px}.direct-message{align-self:flex-start;max-width:min(78%,620px);padding:10px 12px;border:1px solid rgba(255,255,255,.1);border-radius:5px 15px 15px;background:#202331}.direct-message.mine{align-self:flex-end;border-color:rgba(37,244,238,.3);border-radius:15px 5px 15px 15px;background:linear-gradient(135deg,rgba(37,244,238,.15),rgba(122,43,255,.22))}.direct-message p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.direct-message small{display:block;margin-top:5px;color:#8790a5;font-size:8px;text-align:right}.direct-message img{display:block;max-width:280px;max-height:340px;margin-bottom:7px;border-radius:10px;object-fit:cover}.direct-compose{position:relative;display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;gap:8px;padding:12px;border-top:1px solid var(--borde);background:#171a25}.direct-compose textarea{min-height:48px;max-height:120px;resize:none}.direct-compose .btn{min-width:48px}.emoji-picker{position:absolute;z-index:30;bottom:70px;left:12px;display:none;grid-template-columns:repeat(6,1fr);gap:5px;width:250px;padding:10px;border:1px solid rgba(37,244,238,.4);border-radius:15px;background:#171a25;box-shadow:0 18px 45px rgba(0,0,0,.45)}.emoji-picker.open{display:grid}.emoji-picker button{padding:7px;border:0;border-radius:8px;background:transparent;font-size:20px;cursor:pointer}.emoji-picker button:hover{background:rgba(37,244,238,.12);transform:scale(1.08)}.community-direct-btn{color:#bffefd!important;border-color:rgba(37,244,238,.28)!important}.community-emoji-btn{font-size:17px!important}.direct-empty{display:grid;place-items:center;padding:40px;color:var(--txt2);text-align:center}.direct-empty span{display:block;font-size:52px;margin-bottom:10px}
@media(max-width:700px){.direct-shell{width:100%}.direct-hero{padding:14px 15px;margin-bottom:10px;border-radius:16px}.direct-hero h2{font-size:20px}.direct-hero p{font-size:11px}.direct-total{min-width:56px;height:56px;border-radius:16px;font-size:19px}.direct-shell.chat-active .direct-hero{display:none}.direct-layout{min-height:0;grid-template-columns:1fr;border-radius:16px}.direct-sidebar{min-height:360px;border-right:0}.direct-sidebar-head{padding:14px}.direct-list{padding:7px}.direct-conversation{grid-template-columns:42px minmax(0,1fr) auto;padding:10px}.direct-avatar{width:42px;height:42px}.direct-chat{display:none;min-height:0}.direct-layout.chat-open{height:calc(100dvh - 18px);min-height:520px;max-height:760px;border-radius:0;border-left:0;border-right:0}.direct-layout.chat-open .direct-sidebar{display:none}.direct-layout.chat-open .direct-chat{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:0}.direct-chat-head{position:relative;z-index:2;min-width:0;padding:10px 9px;background:#171a25}.direct-chat-head>div{min-width:0}.direct-chat-head b,.direct-chat-head small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.direct-back{display:inline-grid;place-items:center;width:42px;min-width:42px;height:42px;padding:0}.direct-messages{min-height:0;padding:12px 10px;overscroll-behavior:contain}.direct-message{max-width:88%}.direct-compose{grid-template-columns:42px 42px minmax(0,1fr) 68px;align-items:center;gap:6px;padding:9px 7px;padding-bottom:max(9px,env(safe-area-inset-bottom));background:#171a25}.direct-compose .direct-compose-icon{display:grid;place-items:center;width:42px;min-width:42px;height:50px;min-height:50px;padding:0}.direct-compose textarea{width:100%;min-width:0;height:50px;min-height:50px;max-height:92px;padding:12px 10px;font-size:16px!important;resize:none}.direct-send{grid-column:auto;width:68px;min-width:68px;height:50px;min-height:50px;padding:0 6px;font-size:11px}.direct-compose .emoji-picker{bottom:68px;left:7px;width:min(250px,calc(100vw - 28px));max-height:150px;overflow-y:auto}.community-message-actions{flex-wrap:wrap}}
@media(max-width:390px){.direct-compose{grid-template-columns:40px 40px minmax(0,1fr) 60px;gap:5px;padding-inline:6px}.direct-compose .direct-compose-icon{width:40px;min-width:40px}.direct-send{width:60px;min-width:60px;padding:0 4px;font-size:10px}.direct-chat-head{gap:8px}.direct-chat-head .direct-avatar{width:38px;height:38px}.direct-chat-head b{font-size:12px}.direct-chat-head small{font-size:9px}}

/* Acceso rápido a mensajes privados: solo se monta en el menú principal. */
.direct-floating-button{position:fixed;right:max(18px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));z-index:69;display:flex;align-items:center;gap:10px;min-height:50px;padding:10px 17px;border:1px solid rgba(37,244,238,.6);border-radius:18px;background:linear-gradient(135deg,rgba(15,35,43,.98),rgba(42,22,67,.98));color:#fff;font:800 12px 'Sora','Inter',sans-serif;box-shadow:0 14px 38px rgba(0,0,0,.48),0 0 24px rgba(37,244,238,.17);cursor:pointer;transition:transform .18s ease,border-color .18s ease}.direct-floating-button:hover{transform:translateY(-2px);border-color:#25f4ee}.direct-floating-icon{font-size:22px}.direct-floating-count{display:none;place-items:center;min-width:23px;height:23px;padding:0 6px;border:2px solid #10121b;border-radius:999px;background:linear-gradient(135deg,#fe2c55,#a72bff);color:#fff;font:900 10px 'Inter',sans-serif;box-shadow:0 5px 14px rgba(254,44,85,.38)}.direct-floating-count.show{display:grid}.app-guide-launcher{right:auto!important;left:max(18px,env(safe-area-inset-left))!important}
.community-admin-name{color:#25f4ee!important;background:none!important;-webkit-background-clip:border-box!important;background-clip:border-box!important;text-shadow:0 1px 9px rgba(37,244,238,.16)}.community-agent-name{color:#53e6a8!important;background:none!important;-webkit-background-clip:border-box!important;background-clip:border-box!important;text-shadow:0 1px 9px rgba(83,230,168,.14)}.community-vip-name{color:#ffd166!important;background:none!important;-webkit-background-clip:border-box!important;background-clip:border-box!important;text-shadow:0 1px 9px rgba(255,209,102,.16)}.community-premium-name{color:#f5f7ff!important;background:none!important;-webkit-background-clip:border-box!important;background-clip:border-box!important;text-shadow:0 1px 8px rgba(245,247,255,.12)}
@media(max-width:700px){.direct-floating-button{right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));min-width:52px;min-height:52px;padding:9px 13px;border-radius:17px}.direct-floating-label{display:none}.direct-floating-icon{font-size:24px}.app-guide-launcher{left:max(12px,env(safe-area-inset-left))!important;bottom:max(12px,env(safe-area-inset-bottom))!important}}
.home-chat-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%;margin:14px 0 74px}.home-chat-button{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:13px;min-width:0;min-height:76px;padding:14px 17px;border:1px solid rgba(255,255,255,.12);border-radius:18px;background:linear-gradient(135deg,#171a26,#1e1730);color:#fff;text-align:left;box-shadow:0 12px 32px rgba(0,0,0,.26);cursor:pointer;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.home-chat-button.private{border-color:rgba(122,86,255,.42)}.home-chat-button.live{border-color:rgba(37,244,238,.42);background:linear-gradient(135deg,#10232a,#1d1834)}.home-chat-button:hover{transform:translateY(-2px);border-color:#25f4ee;box-shadow:0 15px 38px rgba(0,0,0,.34),0 0 20px rgba(37,244,238,.1)}.home-chat-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:rgba(255,255,255,.07);font-size:23px}.home-chat-button b,.home-chat-button small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-chat-button b{font:900 14px 'Sora','Inter',sans-serif}.home-chat-button small{margin-top:4px;color:#aeb4c7;font-size:10px}.home-chat-count{display:none;place-items:center;min-width:25px;height:25px;padding:0 6px;border-radius:999px;background:linear-gradient(135deg,#fe2c55,#a72bff);color:#fff;font:900 10px 'Inter',sans-serif;box-shadow:0 5px 15px rgba(254,44,85,.35)}.home-chat-count.show{display:grid}
@media(max-width:700px){.home-chat-actions{gap:8px;margin:11px 0 68px}.home-chat-button{gap:8px;min-height:68px;padding:10px;border-radius:15px}.home-chat-icon{width:37px;height:37px;border-radius:11px;font-size:19px}.home-chat-button b{font-size:11px}.home-chat-button small{font-size:8px}.home-chat-count{position:absolute;right:7px;top:7px;min-width:20px;height:20px;font-size:8px}}
@media(max-width:360px){.home-chat-actions{grid-template-columns:1fr;margin-bottom:68px}.home-chat-button{min-height:64px}}

/* v501 · Integración compacta de acciones y emojis en todos los chats */
.community-page .chat-compose{
  grid-template-columns:44px 44px minmax(0,1fr) auto;
  align-items:center;
}
.community-page .chat-compose>#communityPick,
.community-page .chat-compose>.community-emoji-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  width:44px;
  min-width:44px;
  height:48px;
  min-height:48px;
  padding:0!important;
  border-radius:13px;
}
.community-page .chat-compose>#communityText{width:100%;min-width:0;margin:0}
.community-page .chat-compose>#communitySend{min-width:86px;margin:0}
.community-page .chat-compose>.emoji-picker{
  right:auto;
  bottom:72px;
  left:58px;
  grid-template-columns:repeat(8,34px);
  width:auto;
  max-width:calc(100% - 20px);
  max-height:170px;
  overflow-y:auto;
  gap:4px;
  padding:9px;
  border-radius:16px;
}
.community-page .emoji-picker button{display:grid;place-items:center;width:34px;height:34px;padding:0;font-size:20px}
.community-message-actions{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:9px}
.community-message-actions .btn{min-height:34px;margin:0!important;padding:7px 10px!important;white-space:nowrap}

@media(max-width:700px){
  .community-page .chat-shell:not(.keyboard-open){grid-template-rows:auto minmax(0,1fr) auto}
  .community-page .chat-compose{grid-template-columns:42px 42px minmax(0,1fr) 68px!important;gap:6px!important;padding:9px!important;padding-bottom:max(9px,env(safe-area-inset-bottom))!important}
  .community-page .chat-compose>#communityPick,
  .community-page .chat-compose>.community-emoji-btn{width:42px!important;min-width:42px!important;height:50px!important;min-height:50px!important}
  .community-page .chat-compose>#communityText{height:50px!important;min-height:50px!important;max-height:92px!important;padding:12px 11px!important;font-size:16px}
  .community-page .chat-compose>#communitySend{display:flex!important;grid-column:auto!important;width:68px!important;min-width:68px!important;height:50px!important;min-height:50px!important;padding:0 7px!important;font-size:12px!important}
  .community-page .chat-compose>.emoji-picker{left:8px;bottom:68px;grid-template-columns:repeat(7,34px);width:auto;max-width:calc(100vw - 42px);max-height:150px}
  .community-message-line{width:100%;gap:7px;align-items:flex-end}
  .community-message-line .chat-msg{min-width:0;padding:10px 11px}
  .community-message-actions{gap:6px}
  .community-message-actions .btn{min-height:32px;padding:6px 8px!important;font-size:10px!important}
}

@media(max-width:390px){
  .community-page .chat-compose{grid-template-columns:40px 40px minmax(0,1fr) 62px!important;gap:5px!important;padding-inline:7px!important}
  .community-page .chat-compose>#communityPick,
  .community-page .chat-compose>.community-emoji-btn{width:40px!important;min-width:40px!important}
  .community-page .chat-compose>#communitySend{width:62px!important;min-width:62px!important;font-size:11px!important}
  .community-page .chat-compose>.emoji-picker{grid-template-columns:repeat(6,34px)}
}

/* v502 · Conversación privada ajustada al viewport completo en móvil. */
@media(min-width:701px){
  .direct-shell{width:min(1080px,100%)}
  .direct-hero{margin-bottom:12px;padding:17px 20px;border-radius:19px;box-shadow:0 14px 42px rgba(0,0,0,.25)}
  .direct-layout{height:clamp(420px,calc(100dvh - 360px),680px);min-height:0;grid-template-columns:minmax(270px,.4fr) minmax(0,1fr);border-radius:20px}
  .direct-sidebar{display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0}
  .direct-list{display:block;min-height:0;overflow-y:auto}
  .direct-list>.direct-conversation+.direct-conversation{margin-top:5px}
}
@media(max-width:700px){
  body.direct-chat-active{overflow:hidden}
  body.direct-chat-active .app-top{display:none!important}
  body.direct-chat-active #main{width:100%;max-width:none;padding:0!important}
  body.direct-chat-active .direct-shell{position:fixed;inset:0;z-index:10050;width:100%;height:100dvh;margin:0;background:#0b0b10}
  .direct-shell.chat-active .direct-hero{display:none!important}
  .direct-layout.chat-open{width:100%;height:100dvh;min-height:0;max-height:none;border:0;border-radius:0}
  .direct-layout.chat-open .direct-chat{width:100%;height:100%;min-height:0}
  .direct-chat-head{padding:calc(9px + env(safe-area-inset-top)) 9px 9px;box-shadow:0 5px 18px rgba(0,0,0,.3)}
  .direct-messages{min-height:0}
  .direct-compose{padding-bottom:max(9px,env(safe-area-inset-bottom));box-shadow:0 -5px 18px rgba(0,0,0,.28)}
}

