.messenger{display:grid;grid-template-columns:222px minmax(0,1fr);height:min(680px,calc(100dvh - 140px));min-height:500px;overflow:hidden;border:1px solid #ffffff0b;border-radius:20px;background:#0d0d10}
.msg-sidebar{display:flex;flex-direction:column;min-height:0;min-width:0;background:#101013;border-right:1px solid #ffffff09}
.msg-add{padding:17px 14px 12px;border-bottom:1px solid #ffffff07}
.msg-add>label{display:block;font-size:12px;color:#b6b6c3;margin-bottom:8px}
.msg-add-row{display:flex;gap:6px;align-items:center}
.msg-add-row input{width:100%;min-width:0;padding:9px 10px;border:1px solid #ffffff0c;border-radius:8px;background:#19191f;color:#d8d8e3;font:inherit;font-size:12px;outline:none}
.msg-add-row input::placeholder{color:#6e6e7c}
.msg-add-row input:focus{border-color:#ffffff30}
.msg-icon-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 30px;width:30px;height:30px;padding:0;border:0;border-radius:8px;background:transparent;color:#898996;cursor:pointer;transition:background .2s,color .2s}
.msg-icon-button:hover{background:#ffffff08;color:#ececf4}
.msg-icon-button:focus-visible,.msg-room:focus-visible,.msg-request-action:focus-visible{outline:1px solid #bdbdc8;outline-offset:-2px}
.msg-icon-button>svg{display:block;flex:none}
.msg-add-row .msg-icon-button{background:#ffffff05}
.msg-roster{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#34343e transparent;padding:6px 8px 12px}
.msg-group-title{font-size:10px;font-weight:500;color:#696977;letter-spacing:.3px;margin:13px 7px 6px;line-height:1.5}
.msg-room{display:flex;align-items:center;gap:9px;width:100%;padding:10px 8px;border:0;border-radius:10px;background:transparent;color:#c7c7d4;text-align:left;cursor:pointer;font:inherit;transition:background-color .2s}
.msg-room:hover{background:#ffffff04}
.msg-room[aria-current="true"]{background:#ffffff08;color:#f1eff8}
.msg-person-avatar{position:relative;flex:0 0 32px}
.msg-person-avatar .cab-avatar{width:32px;height:32px;flex-basis:32px;font-size:12px}
.msg-online-dot{display:block;flex:0 0 6px;width:6px;height:6px;border-radius:50%;background:#84a895}
.msg-person-avatar .msg-online-dot{position:absolute;bottom:0;right:0;border:2px solid #101013;width:9px;height:9px}
.msg-person-info{flex:1;min-width:0}
.msg-person-name{display:flex;align-items:center;gap:5px;min-width:0;font-size:12px;font-weight:500;line-height:1.5}
.msg-person-name>span:first-child{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.msg-person-name .profile-badge{width:15px;height:15px}
.msg-person-preview{display:block;font-size:10px;line-height:1.5;color:#777785;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:1px}
.msg-unread,.msg-nav-count{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;border-radius:6px;background:#332c45;color:#d9d2ed;font-size:10px;line-height:1;padding:0 4px;flex:0 0 auto}
.msg-nav-count{margin-left:auto}
.msg-request{display:flex;align-items:center;gap:7px;padding:9px 7px;border-radius:9px}
.msg-request-actions{display:flex;gap:3px;flex:0 0 auto}
.msg-request-action{display:grid;place-items:center;width:25px;height:25px;border:0;border-radius:6px;background:#ffffff05;color:#b9b9c5;font-size:14px;padding:0;cursor:pointer}
.msg-request-action:hover{background:#ffffff0d;color:#f1f1f6}
.msg-list-empty{font-size:11px;line-height:1.6;color:#656573;margin:12px 8px}
.msg-search-results{margin-top:10px;max-height:210px;overflow:auto;scrollbar-width:thin;background:#151519;border:1px solid #ffffff0a;border-radius:9px;padding:4px}
.msg-search-results .msg-request{padding:8px 5px}
.msg-search-results .msg-person-avatar{display:none}
.msg-self{display:flex;align-items:center;gap:9px;padding:13px 14px;border-top:1px solid #ffffff08;min-width:0}
.msg-self .cab-avatar{width:32px;height:32px;flex-basis:32px;font-size:12px}
.msg-self-info{flex:1;min-width:0;line-height:1.5}
.msg-self-info strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:500;color:#c9c9d4}
.msg-self-info>span{font-size:10px;color:#777785}
.msg-main{display:flex;flex-direction:column;min-width:0;min-height:0;background:radial-gradient(ellipse at 100% 0,#73609e0c,transparent 65%),#0d0d10}
.msg-header{display:flex;align-items:center;gap:10px;padding:15px 17px;border-bottom:1px solid #ffffff08;min-height:70px;background:#101013cc}
.msg-room-avatar{width:34px;height:34px;flex-basis:34px;font-size:15px}
.msg-header-info{flex:1;min-width:0}
.msg-header-title{display:flex;align-items:center;gap:6px;min-width:0}
.msg-header-title h2{font-size:14px;font-weight:500;color:#dad8e5;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}
.msg-header-title .profile-badge{width:18px;height:18px}
.msg-header-info p{font-size:10px;line-height:1.5;color:#7c7a89;margin:2px 0 0}
.msg-back{display:none}
.msg-history{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#34343e transparent;padding:18px 20px;outline:none}
.msg-messages{display:flex;flex-direction:column;gap:12px;min-height:100%}
.msg-date{align-self:center;font-size:10px;line-height:1.5;color:#777583;padding:5px 9px;background:#ffffff03;border-radius:8px;margin:4px 0}
.msg-message{display:flex;align-items:flex-end;gap:8px;max-width:88%;align-self:flex-start}
.msg-message.is-mine{align-self:flex-end}
.msg-message>.cab-avatar{width:25px;height:25px;flex-basis:25px;font-size:9px}
.msg-bubble{min-width:68px;max-width:100%;padding:10px 12px 7px;border-radius:13px 13px 13px 4px;background:#1a1a21;box-shadow:0 1px 2px #0002;overflow-wrap:anywhere}
.is-mine .msg-bubble{background:#2c253a;border-radius:13px 13px 4px 13px}
.msg-author{display:flex;align-items:center;gap:4px;color:#bab5ce;font-size:10px;font-weight:500;line-height:1.5;margin-bottom:3px}
.msg-author .profile-badge{width:14px;height:14px}
.msg-text{font-size:13px;line-height:1.6;color:#dedce7;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
.msg-message-meta{display:flex;justify-content:flex-end;align-items:center;gap:5px;font-size:9px;color:#777382;line-height:1.5;margin-top:3px}
.is-mine .msg-message-meta{color:#a09aaf}
.msg-receipt{font-size:10px;letter-spacing:-2px;margin-right:2px;color:#aaa2bf}
.msg-receipt.is-read{color:#ddd4f0}
.msg-room-empty{display:flex;align-items:center;justify-content:center;flex-direction:column;flex:1;min-height:100%;gap:12px;padding:35px 20px;text-align:center;color:#797684;font-size:12px;line-height:1.6}
.msg-room-empty>svg{color:#6e687f;opacity:.8}
.msg-room-empty p{max-width:280px;margin:0}
.msg-older{display:block;margin:0 auto 16px;background:#ffffff04;color:#a5a0b3;border:1px solid #ffffff07;border-radius:8px;padding:6px 10px;font:inherit;font-size:11px;cursor:pointer}
.msg-compose-wrap{padding:10px 14px 12px;background:#101013;border-top:1px solid #ffffff07}
.msg-compose{display:flex;align-items:flex-end;gap:9px;padding:7px 8px 7px 13px;border:1px solid #ffffff0c;border-radius:12px;background:#09090c;transition:border-color .2s}
.msg-compose:focus-within{border-color:#ffffff2a}
.msg-compose textarea{display:block;flex:1;width:100%;min-width:0;resize:none;min-height:32px;max-height:112px;overflow-y:auto;padding:6px 0;border:0;background:transparent;font:inherit;font-size:13px;line-height:1.5;color:#e2dfec;outline:none;scrollbar-width:thin}
.msg-compose textarea::placeholder{color:#666370}
.msg-compose textarea:disabled{opacity:.55}
.msg-send{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;padding:0;border:0;border-radius:9px;background:#e6e6e9;color:#222126;cursor:pointer;transition:background .2s,transform .2s}
.msg-send:hover:not(:disabled){background:#fff;transform:translateY(-1px)}
.msg-send:disabled{opacity:.3;cursor:default}
.msg-compose-hint{display:block;min-height:15px;margin:6px 4px 0;font-size:9px;color:#605d6a;line-height:1.5}
.msg-form-error{margin:0 0 8px;font-size:11px;line-height:1.5;color:#c3a5ad}
.msg-connection{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 15px;font-size:11px;color:#a79ba7;background:#1c171c;border-bottom:1px solid #ffffff06}
.msg-connection button{font:inherit;border:0;background:transparent;color:#d0c7d3;cursor:pointer;padding:0}
.messenger [hidden],.msg-nav-count[hidden]{display:none!important}
@media(max-width:1050px){.messenger{grid-template-columns:198px minmax(0,1fr)}.msg-message{max-width:94%}.msg-header{padding-inline:12px}.msg-history{padding-inline:14px}}
@media(max-width:760px){.messenger{grid-template-columns:1fr;height:var(--msg-height,min(700px,calc(100dvh - 160px)));min-height:380px;border-radius:16px}.msg-sidebar{border-right:0}.msg-main{display:none}.messenger.has-room .msg-sidebar{display:none}.messenger.has-room .msg-main{display:flex}.msg-back{display:inline-flex}.msg-add{padding:16px}.msg-room{padding:12px 10px}.msg-roster{padding-inline:9px}.msg-person-name{font-size:13px}.msg-person-preview{font-size:11px}.msg-group-title{font-size:11px}.msg-history{padding:14px 12px}.msg-compose-wrap{padding:9px 10px 10px}.msg-message{max-width:94%}.msg-bubble{padding:9px 11px 6px}.msg-text{font-size:13px}.msg-header{gap:8px;min-height:66px;padding:12px 10px}}
@media(prefers-reduced-motion:reduce){.msg-send:hover:not(:disabled){transform:none}}
.msg-create-group{display:flex;align-items:center;gap:8px;margin:10px 14px 2px;padding:9px 10px;border:1px solid #ffffff0c;border-radius:8px;background:#ffffff03;color:#b7b5c3;font:inherit;font-size:12px;cursor:pointer;text-align:left;transition:background .2s,color .2s}
.msg-create-group:hover{background:#ffffff08;color:#ededf3}
.msg-create-group>span:first-child{font-size:18px;line-height:1;color:#92909f}
.msg-group-label{font-size:12px;color:#a3a3ad;margin:0 0 8px}
.msg-group-choices,.msg-group-members{max-height:230px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#34343e transparent}
.msg-group-choice,.msg-group-member{display:flex;align-items:center;gap:10px;padding:10px 6px;border-bottom:1px solid #ffffff07}
.msg-group-choice{cursor:pointer;border-radius:8px}
.msg-group-choice:hover{background:#ffffff04}
.msg-group-choice input{width:15px;height:15px;accent-color:#b9b2ca;flex-shrink:0}
.msg-group-member .msg-request-action{margin-left:auto}
.msg-leave-group{padding:10px;border:1px solid #ffffff12;border-radius:8px;background:transparent;color:#b7b3c1;font:inherit;font-size:12px;cursor:pointer}
.msg-leave-group:hover{background:#ffffff06;color:#ededf3}
#msgGroupModal [hidden]{display:none!important}
/* Shared identities and quiet chat motion. */
.role-tag{display:inline-flex;align-items:center;flex:0 0 auto;gap:3px;vertical-align:middle;margin-left:3px;padding:2px 5px;border:1px solid #d0b67936;border-radius:5px;background:#d0b6790b;color:#d1bd91;font:500 9px/1.2 Inter,Arial,sans-serif;letter-spacing:.15px;white-space:nowrap;text-transform:none}
.role-tag.role-media{border-color:#a99ad536;background:#a99ad50b;color:#b7aad8}
.header-name-badge>.role-tag{font-size:8px;margin-left:0}.cab-user-name>.role-tag{margin-left:3px}.msg-self-info>.role-tag{display:inline-flex;font-size:8px;color:#d1bd91}.msg-self-info>.role-media{color:#b7aad8}
.msg-author{font-size:10px;margin-bottom:4px;flex-wrap:wrap}.is-mine .msg-author{color:#c1b8d3}.msg-author .role-tag{font-size:8px;padding:2px 4px}
.msg-person-name .role-tag{font-size:8px;padding:2px 4px;margin-left:0}.msg-header-title .role-tag{font-size:8px}
.msg-message{position:relative;max-width:90%}.msg-delete{display:grid;place-items:center;align-self:center;flex:0 0 26px;width:26px;height:26px;padding:0;border:0;border-radius:7px;background:#ffffff04;color:#7e7a89;cursor:pointer;opacity:0;transition:opacity .18s,background .18s,color .18s}
.msg-message:hover .msg-delete,.msg-message:focus-within .msg-delete{opacity:1}.msg-delete:hover{background:#ffffff0b;color:#ded9e6}.msg-delete:focus-visible{opacity:1;outline:1px solid #bdb7ca;outline-offset:2px}
.msg-delete:disabled{opacity:.3;cursor:wait}.is-mine .msg-delete{order:-1}
.msg-compose{box-shadow:none;transition:border-color .2s}
.msg-send{transition:background .2s,transform .2s,opacity .2s}
.msg-typing{display:flex;align-items:center;gap:7px;flex:0 0 26px;min-height:26px;padding:0 20px;font-size:10px;line-height:1.4;color:#a39aac;opacity:0;transform:translateY(3px);transition:opacity .25s,transform .25s;background:#101013}
.msg-typing.is-visible{opacity:1;transform:translateY(0)}.msg-typing-dots{display:flex;align-items:center;gap:3px}.msg-typing-dots i{display:block;width:3px;height:3px;border-radius:50%;background:#aaa0bb;animation:msgTypingDot 1.15s ease-in-out infinite;animation-play-state:paused}.msg-typing.is-visible .msg-typing-dots i{animation-play-state:running}.msg-typing-dots i:nth-child(2){animation-delay:.16s}.msg-typing-dots i:nth-child(3){animation-delay:.32s}
@keyframes msgTypingDot{0%,65%,100%{opacity:.4;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.msg-compose-wrap{position:relative}.msg-sticker-toggle{align-self:center;flex:0 0 28px;width:28px;height:28px}.msg-sticker-toggle[aria-expanded="true"]{color:#d2c6e6;background:#b2a0cd0b}
.msg-sticker-panel{position:absolute;z-index:12;left:14px;bottom:calc(100% + 5px);width:min(350px,calc(100% - 28px));border:1px solid #ffffff16;border-radius:15px;background:#141317;box-shadow:0 14px 45px #0005;padding:12px;max-height:min(390px,65dvh);display:flex;flex-direction:column}
.msg-sticker-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px}.msg-sticker-heading strong{font-size:13px;font-weight:500;color:#e1dce9}.msg-sticker-heading button{font-size:20px;line-height:1}
.msg-sticker-tabs{display:flex;gap:4px;margin-bottom:9px}.msg-sticker-tabs button{padding:7px 9px;border:0;border-radius:7px;background:transparent;color:#87818f;font:inherit;font-size:11px;cursor:pointer}.msg-sticker-tabs button[aria-pressed="true"]{color:#dfd6ea;background:#ffffff08}.msg-sticker-tabs button:hover{background:#ffffff05}.msg-sticker-tabs #msgStickerUpload{margin-left:auto;color:#b7accc}.msg-sticker-tabs button:disabled{opacity:.45}
.msg-sticker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;min-height:70px;overflow:auto;scrollbar-width:thin;scrollbar-color:#39333f transparent}.msg-sticker-cell{position:relative;min-width:0}.msg-sticker-choice{display:grid;place-items:center;width:100%;aspect-ratio:1;padding:7px;border:0;border-radius:11px;background:transparent;cursor:pointer;transition:background .2s,transform .18s}.msg-sticker-choice:hover{background:#ffffff06;transform:translateY(-2px)}.msg-sticker-choice:disabled{opacity:.45;cursor:wait}.msg-sticker-choice .msg-sticker-image{width:100%;height:100%;max-width:66px;max-height:66px}.msg-sticker-choice:focus-visible{outline:1px solid #b6a5cf;outline-offset:-1px}
.msg-sticker-remove{position:absolute;top:0;right:0;width:20px;height:20px;display:grid;place-items:center;padding:0;line-height:1;border:1px solid #ffffff0a;border-radius:6px;background:#201d25;color:#9990a5;font-size:15px;cursor:pointer;opacity:0}.msg-sticker-cell:hover .msg-sticker-remove,.msg-sticker-cell:focus-within .msg-sticker-remove{opacity:1}
.msg-sticker-info{font-size:9px;color:#7c7487;margin:9px 0 2px;line-height:1.6}.msg-sticker-credit{font-size:9px;color:#756d80;text-decoration:none;align-self:flex-start;line-height:1.6}.msg-sticker-credit:hover{color:#aaa0ba}.msg-sticker-grid>.msg-list-empty{grid-column:1/-1}
.msg-sticker-image{display:block;object-fit:contain;max-width:100%;width:160px;height:160px;filter:drop-shadow(0 3px 5px #0002)}.is-sticker .msg-bubble{background:transparent;box-shadow:none;padding:3px}.is-sticker .msg-author{margin-bottom:5px}.is-sticker .msg-message-meta{margin-top:4px}
@media(hover:none){.msg-delete{opacity:.7}.msg-sticker-remove{opacity:1}}
@media(max-width:760px){.msg-typing{padding-inline:15px;font-size:9px;min-height:24px;flex-basis:24px}.msg-sticker-image{width:140px;height:140px}.msg-message{max-width:96%}.msg-header-title .role-tag{font-size:7px}.header-name-badge>.role-tag{font-size:7px;padding:2px 3px}}
@media(prefers-reduced-motion:reduce){.msg-typing-dots i{animation:none;opacity:.7}.msg-compose,.msg-typing,.msg-sticker-choice,.msg-delete{transition:none}.msg-sticker-choice:hover{transform:none}}
.msg-self-info>.msg-self-title{display:flex;align-items:center;gap:4px;min-width:0}.msg-self-title strong{min-width:0;flex:0 1 auto}.msg-self-title .role-tag{font-size:8px;padding:2px 4px;margin-left:0}

.msg-input-wrap{position:relative;display:block;flex:1;min-width:0}
.msg-input-text{position:absolute;inset:0;overflow:hidden;pointer-events:none;user-select:none;background:transparent}
.msg-input-text-inner{box-sizing:border-box;white-space:pre-wrap;overflow-wrap:break-word;word-break:normal}
.msg-input-wrap.is-text-animating textarea{color:transparent;-webkit-text-fill-color:transparent;caret-color:#e2dfec}
.msg-input-wrap.is-text-animating textarea::placeholder{-webkit-text-fill-color:#666370}

.msg-save-sticker{display:flex;align-items:center;justify-content:center;gap:5px;width:max-content;max-width:100%;min-height:29px;margin:7px 0 2px;padding:5px 9px;border:1px solid #ffffff14;border-radius:8px;background:#111114;color:#b9b3c3;font:10px/1.4 Inter,Arial,sans-serif;cursor:pointer;transition:background .2s,border-color .2s,color .2s}.msg-save-sticker-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:13px;height:13px}.msg-save-sticker-icon svg{display:block;width:13px;height:13px}.msg-save-sticker:hover:not(:disabled){color:#ece8f1;border-color:#ffffff2c;background:#19181d}.msg-save-sticker[data-saved=true]{color:#8f899b;background:transparent;border-color:#ffffff0b;cursor:default}.msg-save-sticker[aria-busy=true]{opacity:.5;cursor:wait}@media(prefers-reduced-motion:reduce){.msg-save-sticker{transition:none}}

/* Reveal saving on the image itself without adding space beneath messages. */
.msg-sticker-media{position:relative;width:max-content;max-width:100%;isolation:isolate}
.msg-sticker-media>.msg-sticker-image{transition:filter .24s ease}
.msg-sticker-media>.msg-save-sticker{position:absolute;left:50%;top:50%;z-index:1;max-width:calc(100% - 12px);min-height:32px;margin:0;padding:7px 10px;background:#0e0e11e8;border-color:#ffffff25;color:#e2dce9;white-space:nowrap;opacity:0;pointer-events:none;transform:translate(-50%,calc(-50% + 4px)) scale(.97);transition:opacity .2s ease,transform .24s cubic-bezier(.2,.8,.2,1),background .2s,border-color .2s}
.msg-sticker-media>.msg-save-sticker[data-saved=true]{background:#0e0e11dc;border-color:#ffffff18;color:#c1bacb}
.msg-sticker-media:focus-within>.msg-sticker-image,.msg-sticker-media.is-actions-visible>.msg-sticker-image{filter:brightness(.78) drop-shadow(0 3px 5px #0002)}
.msg-sticker-media:focus-within>.msg-save-sticker,.msg-sticker-media.is-actions-visible>.msg-save-sticker{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}
@media(hover:hover){.msg-sticker-media:hover>.msg-sticker-image{filter:brightness(.78) drop-shadow(0 3px 5px #0002)}.msg-sticker-media:hover>.msg-save-sticker{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}}
@media(prefers-reduced-motion:reduce){.msg-sticker-media>.msg-sticker-image,.msg-sticker-media>.msg-save-sticker{transition:none}}
