.vmsg[hidden],.vmsg [hidden]{display:none!important}
.vmsg{position:fixed;z-index:1100;right:16px;top:82px;bottom:16px;width:min(410px,calc(100vw - 32px));display:flex;flex-direction:column;overflow:hidden;color:var(--vision-text, #f7f6ef);background:var(--vision-surface, #2e2e2b);border:1px solid var(--vision-line, #69685f);border-radius:18px;box-shadow:0 18px 70px rgb(var(--vision-shadow-rgb, 17 17 15) / 0.6000);font:14px/1.45 system-ui,sans-serif;isolation:isolate}
.vmsg *{box-sizing:border-box}.vmsg button,.vmsg input,.vmsg textarea{font:inherit}.vmsg button{cursor:pointer;min-height:40px;border:1px solid var(--vision-line, #69685f);border-radius:10px;background:var(--vision-hover, #45453f);color:var(--vision-text, #f7f6ef);padding:8px 12px}.vmsg button:disabled{opacity:.5;cursor:default}.vmsg button:focus-visible,.vmsg a:focus-visible{outline:2px solid var(--vision-accent, #f5c64f);outline-offset:2px}.vmsg input,.vmsg textarea{width:100%;min-width:0;background:var(--vision-surface, #2e2e2b);color:var(--vision-text, #f7f6ef);border:1px solid var(--vision-line, #69685f);border-radius:10px;padding:10px;outline-color:var(--vision-accent, #f5c64f)}.vmsg a{color:var(--vision-accent, #f5c64f);text-decoration:none}.vmsg-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:16px 18px;border-bottom:1px solid var(--vision-hover, #45453f)}.vmsg-head small{font-size:9px;font-weight:800;letter-spacing:.18em;color:var(--vision-accent, #f5c64f)}.vmsg-head h2{margin:3px 0 0;font-size:22px;line-height:1.15}.vmsg-head button{font-size:24px;line-height:1;padding:5px 12px}.vmsg-tabs{display:flex;gap:8px;padding:10px 16px}.vmsg-tabs button{flex:1}.vmsg-tabs button[aria-pressed=true]{background:var(--vision-accent, #f5c64f);color:var(--vision-surface, #2e2e2b);border-color:var(--vision-accent, #f5c64f);font-weight:800}.vmsg b[data-vmsg-friends-unread], [data-vchat-unread]{border-radius:20px;padding:2px 6px;background:var(--vision-accent, #f5c64f);color:var(--vision-surface, #2e2e2b);font-size:11px}.vmsg-tabs b{margin-left:5px}
.vmsg-contacts{min-height:0;overflow:auto;padding:0 16px 16px}.vmsg-search{display:block;margin:0 0 14px}.vmsg-search span{display:block;font-size:12px;color:var(--vision-soft, #dedbd1);margin-bottom:5px}.vmsg-contact{display:flex;width:100%;align-items:center;gap:12px;text-align:left;margin:0 0 8px!important;padding:12px!important}.vmsg-contact>span:first-child{display:grid;place-items:center;width:38px;height:38px;flex:none;border:1px solid #62704d;border-radius:50%;background:var(--vision-accent-surface, #49412d);color:var(--vision-accent, #f5c64f);font-weight:800}.vmsg-contact>span:nth-child(2){flex:1;min-width:0}.vmsg-contact strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vmsg-contact small{display:block;color:var(--vision-soft, #dedbd1);font-size:11px}.vmsg-contact small.online{color:#65e3b0}.vmsg-contact b{min-width:24px;border-radius:16px;background:var(--vision-accent, #f5c64f);color:var(--vision-surface, #2e2e2b);text-align:center}.vmsg-contacts footer{display:grid;gap:12px;margin-top:18px;padding-top:16px;border-top:1px solid var(--vision-hover, #45453f);font-size:13px}
.vmsg-conversation{display:flex;flex-direction:column;flex:1;min-height:0}.vmsg-person{display:flex;gap:10px;align-items:center;padding:0 16px 10px}.vmsg-person>div{min-width:0}.vmsg-person strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vmsg-person small{font-size:10px;color:var(--vision-soft, #dedbd1)}.vmsg-log{flex:1;min-height:60px;overflow:auto;overscroll-behavior:contain;padding:12px 16px;border-block:1px solid var(--vision-hover, #45453f);background:var(--vision-surface, #2e2e2b)}.vmsg-message{max-width:90%;width:fit-content;margin-bottom:10px;padding:9px 12px;border:1px solid var(--vision-line, #69685f);background:var(--vision-hover, #45453f);border-radius:12px 12px 12px 3px;overflow-wrap:anywhere}.vmsg-message.mine{margin-left:auto;background:var(--vision-accent-surface, #49412d);border-color:var(--vision-accent-surface, #49412d);border-radius:12px 12px 3px 12px}.vmsg-message small{display:flex;gap:12px;justify-content:space-between;color:var(--vision-soft, #dedbd1);font-size:10px}.vmsg-message p{margin:5px 0 0;white-space:pre-wrap;line-height:1.5}.vmsg-empty{margin:28px 6px;text-align:center;color:var(--vision-soft, #dedbd1);font-size:13px}.vmsg-error{margin:0;padding:0 16px;font-size:12px;color:var(--vision-accent, #f5c64f)}.vmsg-error:not(:empty){padding-block:8px}.vmsg-compose{padding:12px 16px}.vmsg-compose label{display:block;font-size:11px;color:var(--vision-soft, #dedbd1);margin-bottom:5px}.vmsg-compose textarea{display:block;resize:none;max-height:100px}.vmsg-quick{display:flex;gap:5px;overflow:auto;padding:0 0 9px}.vmsg-quick button{font-size:10px;white-space:nowrap;min-height:32px;padding:5px 8px}.vmsg-send{display:flex;align-items:center;gap:10px;margin-top:8px}.vmsg-send small{flex:1;color:var(--vision-soft, #dedbd1);font-size:10px}.vmsg-send [type=submit]{background:var(--vision-accent, #f5c64f);color:var(--vision-surface, #2e2e2b);font-weight:800;border-color:var(--vision-accent, #f5c64f)}.vmsg-emojis{display:grid;grid-template-columns:repeat(8,1fr);gap:2px;margin-top:8px}.vmsg-emojis button{padding:4px 0;font-size:20px;border-color:transparent;background:transparent;min-width:0}.vmsg-emojis button:hover{background:var(--vision-line, #69685f)}
@media(max-width:600px){.vmsg{inset:8px;width:auto;height:calc(100dvh - 16px);border-radius:14px}.vmsg-head{padding:12px 16px}.vmsg-quick button{font-size:10px}.vmsg-log{min-height:35px}.vmsg-compose{padding-top:8px}.vmsg-compose textarea{min-height:60px}.vmsg-message{max-width:95%}}
@media(max-height:550px){.vmsg{top:8px;bottom:8px}.vmsg-head{padding:8px 16px}.vmsg-head small,.vmsg-person small,.vmsg-quick,.vmsg-compose label{display:none}.vmsg-tabs{padding-block:5px}.vmsg-compose{padding-block:6px}.vmsg-compose textarea{height:45px;min-height:45px}.vmsg-emojis{position:absolute;bottom:70px;left:16px;right:16px;background:var(--vision-raised, #383835);border:1px solid var(--vision-line, #69685f);border-radius:10px}}
/* Keep the composer inside the visible viewport when the phone keyboard opens. */
.vmsg .vmsg-head h2{color:var(--vision-text,#f7f6ef)}
@media(max-width:600px){
 .vmsg{top:var(--vmsg-top,8px);bottom:auto;height:var(--vmsg-height,calc(100dvh - 16px))}
 .vmsg input,.vmsg textarea{font-size:16px}
 .vmsg button{min-height:44px}
 .vmsg-quick button{font-size:12px}
 .vmsg-emojis{grid-template-columns:repeat(6,minmax(0,1fr))}
 .vmsg.is-compact .vmsg-head{padding:8px 16px}
 .vmsg.is-compact .vmsg-head small,.vmsg.is-compact .vmsg-person small,.vmsg.is-compact .vmsg-quick,.vmsg.is-compact .vmsg-compose label{display:none}
 .vmsg.is-compact .vmsg-tabs{padding-block:5px}
 .vmsg.is-compact .vmsg-compose{padding-block:6px}
 .vmsg.is-compact .vmsg-compose textarea{height:45px;min-height:45px}
 .vmsg.is-compact .vmsg-emojis{position:absolute;bottom:70px;left:16px;right:16px;background:var(--vision-raised,#383835);border:1px solid var(--vision-line,#69685f);border-radius:10px}
}
