.comm-panel {position:fixed;z-index:1500;top:var(--shell-top-offset,64px);bottom:var(--shell-bottom-offset,86px);right:var(--shell-safe-right,0px);width:min(800px,calc(100vw - var(--shell-safe-left,0px) - var(--shell-safe-right,0px)));display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--bg2);border:1px solid var(--steel-hi);border-radius:10px 0 0 10px;box-shadow:var(--shadow-panel);overflow:hidden;}
.comm-panel[hidden],.comm-panel [hidden],.social-panel .ms-body[hidden] {display:none!important;}
.comm-header {display:flex;align-items:center;justify-content:space-between;gap:14px;padding:5px 12px 5px 18px;min-height:54px;flex:none;}
.comm-header>div {display:flex;align-items:center;gap:14px;min-width:0;}
.comm-header strong {font-size:16px;color:var(--txt-hi);}
.comm-header span {font-size:11px;color:var(--txt-lo);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.social-tabs {display:flex;gap:4px;flex:none;border-bottom:1px solid var(--steel-hi);padding:0 12px;overflow-x:auto;}
.social-tabs button {flex:1;white-space:nowrap;min-height:44px;padding:9px 12px;color:var(--txt-lo);font:600 12px var(--font-ui);border-bottom:2px solid transparent;}
.social-tabs button[aria-current=page] {color:var(--gold-hi);border-color:var(--gold);}
.comm-voice {display:flex;flex:1;min-height:0;min-width:0;}
.comm-voice .voice-embed-page {position:relative;inset:auto;width:100%;flex:1;border:0;box-shadow:none;}
.comm-support {display:flex;flex:1;min-height:0;min-width:0;}
.comm-support-list {flex:0 0 210px;overflow:auto;border-right:1px solid var(--steel-hi);font-size:12px;}
.comm-support-list h3 {padding:12px;font-size:12px;}
.comm-private {flex:1;min-height:0;overflow:auto;padding:18px;overscroll-behavior:contain;}
.comm-private h2 {font-size:20px;color:var(--txt-hi);margin:0 0 8px;}
.comm-create {display:grid;grid-template-columns:minmax(0,1fr) 170px auto;gap:12px;align-items:end;margin:20px 0;}
.comm-create .pc-field {margin:0;}
.comm-private > .social-empty {margin:0;padding:14px 0;border-top:1px solid var(--steel);font-size:13px;}
.comm-room-card {padding:16px 0;border-top:1px solid var(--steel);font-size:13px;overflow-wrap:anywhere;}
.comm-room-card>div:first-child p {font-size:11px;color:var(--txt-lo);margin:7px 0 12px;}
.comm-manage {padding:14px;background:var(--bg);border:1px solid var(--steel-hi);border-radius:7px;margin-top:14px;}
.comm-manage h3 {font-size:14px;margin:0 0 12px;}
.comm-link {margin:18px 0;padding-top:16px;border-top:1px solid var(--steel);}
.comm-invite {padding:14px 18px;border-block:1px solid var(--gold-lo);font-size:12px;flex:none;max-height:180px;overflow:auto;}
.comm-invite .po-button {margin-right:8px;}
.social-panel {width:min(800px,100vw)!important;max-width:100vw;display:flex;flex-direction:column;top:var(--shell-top-offset,64px);bottom:var(--shell-bottom-offset,86px);right:var(--shell-safe-right,0px);}
.social-panel .social-tabs button {display:flex;align-items:center;justify-content:center;gap:6px;}
.social-panel .social-tabs .ms-unread-badge {display:inline-flex;margin-left:0;}
.social-panel .ms-list {flex:0 0 250px;max-width:45%;width:auto;}
.social-list-hint {padding:10px 12px;font-size:10px;color:var(--txt-lo);}
.social-chat-row {display:flex;align-items:center;border-bottom:1px solid var(--steel);}
.social-chat-row>.ms-chat-item {flex:1;min-width:0;display:flex;gap:10px;padding:12px;}
.social-chat-row .ms-chat-info {display:flex;flex-direction:column;gap:6px;min-width:0;}
.social-chat-row .ms-chat-name {white-space:normal;overflow-wrap:anywhere;font-size:12px;}
.social-chat-row .ms-chat-preview {display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px;font-size:12px;}
.social-pin {width:44px;min-width:44px;min-height:44px;flex:none;color:var(--gold);}
.social-avatar {display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:50%;background:var(--accent-soft);border:1px solid var(--gold-lo);color:var(--gold);font-size:14px;}
.social-conversation {display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;}
.social-conversation .ms-window {flex:1;min-height:0;}
.social-back {display:none;color:var(--txt-lo);font-size:12px;min-height:44px;text-align:left;padding:6px 12px;border-bottom:1px solid var(--steel);}
.social-empty {flex:1;min-width:0;align-self:center;padding:24px;color:var(--txt-lo);font-size:12px;line-height:1.8;}
.social-empty h2 {font-size:20px;color:var(--txt-hi);}
.social-people {padding:18px;overflow:auto;min-height:0;flex:1;font-size:13px;}
.social-people h2 {font-size:20px;color:var(--txt-hi);}
.social-people input,.comm-private input,.comm-private select {min-width:0;min-height:44px;padding:9px 12px;background:var(--bg);border:1px solid var(--steel-hi);border-radius:6px;color:var(--txt);font:inherit;}
.social-person {display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--steel);font-size:13px;}
.social-person>div:not(.pc-actions) {flex:1;min-width:0;overflow-wrap:anywhere;}
.social-person p,.social-person small {font-size:11px;color:var(--txt-lo);margin:4px 0;}
.social-link {font:500 11px var(--font-ui);color:var(--txt-lo);text-decoration:underline;min-height:40px;}
.comm-panel button:focus-visible,.social-panel button:focus-visible {outline:2px solid var(--gold);outline-offset:-3px;}
.comm-panel .po-button,.social-panel .po-button {min-height:44px;}
.comm-panel .po-button.po-primary {background:var(--gold);border-color:var(--gold);color:var(--on-accent);}
.comm-panel .po-button.po-primary:hover:not(:disabled) {background:var(--gold-hi);border-color:var(--gold-hi);}
@media(max-width:650px){
 .comm-panel {border-radius:0;width:100%;left:0;right:0;}
 .comm-header {padding-left:12px;min-height:44px;}
 .comm-header span {font-size:12px;}
 .social-tabs {padding:0 6px;}
 .social-tabs button {padding:8px 6px;font-size:12px;}
 .social-panel .ms-list {width:100%;max-width:none;max-height:none;flex:1;flex-direction:column;gap:0;padding:0;overflow-x:hidden;overflow-y:auto;border:0;}
 .social-panel .ms-group-label {display:block;}
 .social-panel .social-chat-row>.ms-chat-item {width:auto;flex:1 1 0;min-height:64px;border:0;border-radius:0;}
 .social-panel .ms-chat-name {max-width:none;}
 .social-panel .ms-chat-item .ms-unread-badge {position:static;flex:none;}
 .social-panel .social-has-chat>.ms-list {display:none;}
 .social-panel .ms-body:not(.social-has-chat)>.social-empty {display:none;}
 .social-panel .social-back {display:block;}
 .social-chat-row .ms-chat-preview {max-width:230px;}
 .comm-create {grid-template-columns:1fr;}
 .comm-private,.social-people {padding:12px;}
 .social-person {flex-wrap:wrap;}
 .social-person .pc-actions {width:100%;padding-left:46px;}
 .comm-support {flex-direction:column;}
 .comm-support-list {flex:0 0 auto;max-height:130px;border-bottom:1px solid var(--steel-hi);}
}
@media(max-height:520px){.comm-header {min-height:38px;} .social-tabs button {min-height:36px;padding-block:6px;}}

.nav-btn.voice[data-connected=true] .nav-button-symbol {position:relative;}
.nav-btn.voice[data-connected=true] .nav-button-symbol::after {content:'';position:absolute;right:-5px;top:0;width:6px;height:6px;background:var(--green);border-radius:50%;}

/* Support is a text room in the shared rail, not another navigation level. */
.comm-voice {position:relative;}
.comm-support-overlay {position:absolute;z-index:2;inset:0 0 0 64px;background:var(--bg);}
.comm-support-overlay>.ms-window {flex:1;min-width:0;min-height:0;}
.comm-support-overlay .comm-support-list {flex-basis:170px;}
@media(max-width:600px){.comm-support-overlay{left:56px;}.comm-support-overlay .comm-support-list{max-height:112px;}}
.comm-support-overlay[data-picker-open=true]{left:clamp(160px,34vw,220px);}
@media(max-width:600px){.comm-support-overlay[data-picker-open=true]{display:none;}}

/* Touch and iPad inputs retain readable text without triggering viewport zoom. */
@media(max-width:1100px),(pointer:coarse){
 .social-people input,.comm-private input,.comm-private select {min-height:44px;font-size:16px;}
}
.social-panel .social-list-hint,.comm-panel .social-list-hint {font-size:12px;}
.social-person>.social-avatar .identity-avatar,.ms-msg-ava .identity-avatar{width:100%;height:100%;border:0;font-size:inherit}.ms-win-icon.identity-avatar{overflow:hidden}.comm-support-list .ms-chat-item{display:flex;align-items:center;gap:10px;min-width:0}.comm-support-list .ms-chat-item>span:not(.identity-avatar){min-width:0;overflow-wrap:anywhere}

.comm-header {
  min-height:52px;
  padding:4px 12px 4px 18px;
  border-bottom:1px solid var(--steel);
}
.comm-header > div {gap:9px;color:var(--gold);}
.comm-header strong {font-size:18px;letter-spacing:-.025em;}
.comm-tabs {display:grid;grid-template-columns:repeat(var(--page-tabs-columns),minmax(0,1fr));overflow:visible;}
.comm-tabs .page-tab {display:inline-flex;align-items:center;justify-content:center;gap:6px;}
.comm-tabs .ms-unread-badge {display:inline-flex;align-items:center;justify-content:center;}
.comm-room-tools {
  display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;
  min-height:42px;padding:2px 10px;gap:2px 8px;flex:none;
  background:var(--bg2);border-bottom:1px solid var(--steel);
}
.comm-tool-button,.comm-call-button,.comm-icon-button {
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  color:var(--txt);border:1px solid transparent;border-radius:8px;
  background:transparent;font:600 12px var(--font-ui);cursor:pointer;
}
.comm-tool-button {padding:6px 9px;min-height:36px;}
.comm-tool-button[aria-pressed=true],.comm-tool-button[aria-expanded=true] {color:var(--gold-hi);background:var(--accent-soft);}
.comm-icon-button {flex:none;width:44px;height:44px;padding:0;}
.comm-call-button {flex:none;min-height:40px;padding:6px 11px;background:var(--accent-soft);border-color:var(--gold-lo);color:var(--gold-hi);}
.comm-call-button:disabled {opacity:.5;cursor:default;}
.comm-call-controls {
  flex:none;display:flex;align-items:center;gap:4px;min-width:0;
  padding:4px 8px 4px 12px;background:var(--bg2);border-top:1px solid var(--steel-hi);color:var(--txt);
}
.comm-call-floating {
  position:fixed;z-index:1490;right:calc(12px + var(--shell-safe-right,0px));
  bottom:calc(8px + var(--shell-bottom-offset,86px));width:min(340px,calc(100vw - 24px));
  box-sizing:border-box;border:1px solid var(--steel-hi);border-radius:12px;box-shadow:var(--shadow-panel);
}
.comm-return-call {
  display:flex;align-items:center;gap:10px;flex:1;min-width:0;min-height:44px;
  text-align:left;background:transparent;color:var(--green);border:0;cursor:pointer;
}
.comm-return-call span {display:grid;min-width:0;gap:2px;}
.comm-return-call small {font-size:11px;font-weight:600;}
.comm-return-call small[data-reconnecting=true] {color:var(--gold-hi);}
.comm-return-call strong {font-size:13px;color:var(--txt-hi);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.comm-call-controls .comm-icon-button {background:var(--bg);border-color:var(--steel-hi);}
.comm-call-controls .comm-icon-button[aria-pressed=false] {color:var(--gold-hi);border-color:var(--gold-lo);background:var(--accent-soft);}
.comm-call-controls .comm-leave {color:var(--red);}
.comm-call-controls button:focus-visible {outline:2px solid var(--gold);outline-offset:-3px;}
.comm-friend-invite {
  display:flex;align-items:end;gap:8px 12px;flex-wrap:wrap;flex:none;padding:12px 16px;
  border-bottom:1px solid var(--steel-hi);
}
.comm-friend-invite label {flex:1;min-width:120px;margin:0;color:var(--txt);}
.comm-friend-invite select {width:100%;min-height:44px;background:var(--bg);border:1px solid var(--steel-hi);border-radius:7px;color:var(--txt);padding:6px 8px;font:inherit;}
.comm-friend-invite p {width:100%;margin:0;padding:0;font-size:12px;}
.comm-messenger.social-panel {position:relative;inset:auto;flex:1;min-width:0;min-height:0;width:100%!important;max-width:100%;overflow:hidden;}
.comm-messenger .ms-win-info {flex:1;min-width:0;}
.comm-panel .ms-win-name {color:var(--txt-hi);font-weight:700;letter-spacing:normal;}
.comm-panel .ms-win-type {color:var(--txt-lo);}
.comm-panel .ms-messages {overscroll-behavior:contain;}
.comm-panel .ms-input-row {align-items:center;background:var(--bg2);border-color:var(--steel);}
.comm-panel :is(.ms-input,.ms-send-btn), .comm-panel .ms-msg .ms-msg-bubble {clip-path:none;border-radius:8px;}
.comm-panel .ms-input {background:var(--bg);border-color:var(--steel-hi);}
.comm-panel .ms-input:focus {border-color:var(--gold);outline:1px solid var(--gold);outline-offset:-1px;}
.comm-panel .ms-send-btn {width:44px;height:44px;background:var(--surface-raised);color:var(--txt-lo);border-color:var(--steel-hi);}
.comm-panel .ms-send-btn.ready:not(:disabled) {color:var(--on-accent);background:var(--gold);border-color:var(--gold);box-shadow:none;}
.comm-panel .ms-send-btn.ready:hover:not(:disabled) {background:var(--gold-hi);border-color:var(--gold-hi);}
.comm-panel .ms-msg:not(.self,.system) .ms-msg-body {
  display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;justify-items:start;column-gap:8px;
}
.comm-panel .ms-msg-body > :not(.ms-msg-time,.safety-link) {grid-column:1/-1;}
.comm-panel .ms-msg-body > .ms-msg-author {min-height:26px;letter-spacing:normal;}
.comm-panel .ms-msg-body > .safety-link {grid-column:2;padding-inline:4px;}
.comm-messenger .social-chat-row:has(.ms-chat-item.active) {background:var(--accent-soft);box-shadow:inset 3px 0 var(--gold);}
.comm-messenger .social-chat-row > .ms-chat-item.active {border:0;background:transparent;}
@media(hover:hover) {
  .comm-panel .ms-msg-body > .safety-link {min-height:26px;}
  .comm-tool-button:hover,.comm-icon-button:hover,.comm-call-button:hover:not(:disabled) {background:var(--accent-soft);color:var(--gold-hi);}
  .comm-call-controls .comm-leave:hover {border-color:var(--red);color:var(--red);}
}
@media(max-width:650px) {
  .comm-header {min-height:44px;padding:2px 6px 2px 12px;}
  .comm-room-tools {padding:0 6px;min-height:40px;}
  .comm-tool-button {min-height:44px;}
  .comm-friend-invite {padding:9px 12px;}
  .comm-friend-invite select {font-size:16px;}
  .comm-call-floating {right:calc(8px + var(--shell-safe-right,0px));left:calc(8px + var(--shell-safe-left,0px));width:auto;}
  .comm-messenger .ms-body {flex-direction:column;}
  .comm-call-button {min-height:44px;}
}
.comm-person.social-person {
  display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:0 10px;align-items:center;
  padding:12px 0;border-bottom:1px solid var(--steel);
}
.comm-person .comm-person-info p {margin:3px 0 0;}
.comm-person .comm-person-info button {font-weight:650;color:var(--txt-hi);text-align:left;}
.comm-person .comm-person-more {grid-column:2/-1;min-width:0;}
.comm-person-more summary,.comm-contact-actions summary {
  width:fit-content;color:var(--txt-lo);font:500 12px/1.5 var(--font-ui);cursor:pointer;padding:5px 2px;
}
.comm-person-more summary:focus-visible,.comm-contact-actions summary:focus-visible {outline:2px solid var(--gold);outline-offset:2px;}
.comm-person-options {display:flex;align-items:center;gap:4px 12px;flex-wrap:wrap;}
.comm-contact-actions {padding:3px 12px;border-bottom:1px solid var(--steel);flex:none;}
.comm-person-options .safety-actions,.comm-contact-actions .safety-actions {padding:0;border:0;}
@media(max-width:650px) {
  .comm-person-more summary,.comm-contact-actions summary {min-height:28px;}
}
