/* Shared by the communication panel and its same-origin room frame. */
:root { --comm-sidebar-width:248px; --comm-icon-rail:60px; --comm-rail-head:54px; }
.comm-panel {width:min(var(--comm-width,800px),calc(100% - var(--shell-safe-left,0px) - var(--shell-safe-right,0px)))}
.comm-header .comm-header-actions {gap:4px}
.comm-navigation {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;flex:none}
.comm-navigation .comm-push-bell {width:44px;height:44px;color:var(--gold-hi);margin-inline-end:4px}
.comm-push-bell[aria-expanded=true] {background:var(--accent-soft)}
.comm-push-hint {grid-column:1 / -1;display:flex;align-items:start;justify-content:space-between;gap:8px;padding:4px 8px 0 14px;background:var(--surface-raised);border-bottom:1px solid var(--steel-hi)}
.comm-push-hint p {margin:6px 0 0;color:var(--txt);font:500 13px/1.45 var(--font-ui)}
.comm-push-settings {padding:0;min-height:44px;color:var(--gold-hi);font:600 13px/1.3 var(--font-ui);text-align:start;cursor:pointer}
.comm-push-settings:hover {text-decoration:underline}
.comm-push-hint > div {display:flex;align-items:baseline;gap:0 12px;flex-wrap:wrap}
.comm-push-hint .comm-icon-button {width:44px;height:44px;flex:none;color:var(--txt-lo)}
.comm-header .comm-room-tools {padding:0;min-height:0;background:transparent;border:0;gap:2px}
.comm-header .comm-room-tools .comm-tool-button {color:var(--txt);white-space:nowrap}
.comm-resize-handle {
  position:absolute;inset:0 auto 0 0;width:9px;z-index:6;cursor:ew-resize;
  touch-action:none;user-select:none;outline:none;
}
.comm-resize-handle::after {
  content:'';position:absolute;top:calc(50% - 18px);left:2px;width:3px;height:36px;
  border-radius:3px;background:var(--steel-hi);
}
.comm-resize-handle:hover::after,.comm-resize-handle:focus-visible::after,
.comm-panel[data-resizing=true] .comm-resize-handle::after {background:var(--gold)}
.comm-panel .comm-voice {isolation:isolate}
.comm-panel[data-resizing=true] iframe {pointer-events:none}
.comm-panel[data-rail=expanded] .ms-inbox {grid-template-columns:var(--comm-sidebar-width) minmax(0,1fr)}
.comm-online-dot {
  display:inline-block; width:8px; height:8px; margin-inline-start:.4em; border-radius:50%;
  background:var(--green,#31a36c); vertical-align:middle; flex:none;
}
.ms-win-info .ms-win-name {display:flex;align-items:center;min-width:0}
.ms-peer-label {overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.ms-chat-avatar {position:relative;display:inline-flex;flex:none}
.comm-panel .ms-inbox[data-compact-rail=true] {
  display:grid;grid-template-columns:var(--comm-icon-rail) minmax(0,1fr);grid-template-rows:minmax(0,1fr)
}
.ms-inbox[data-compact-rail=true] .ms-inbox-list {overflow-x:hidden;scrollbar-gutter:auto;border-inline-end:1px solid var(--steel-hi)}
.ms-inbox[data-compact-rail=true] .ms-rail-toolbar {flex-direction:column;align-items:center;padding:4px 0;gap:2px}
.social-panel .ms-inbox[data-compact-rail=true] .ms-rail-tabs {display:flex;flex-direction:column;gap:2px;flex:none;padding:0;border:0;background:transparent}
.social-panel .ms-inbox[data-compact-rail=true] .page-tab,
.ms-inbox[data-compact-rail=true] .ms-search-toggle,
.ms-inbox[data-compact-rail=true] .ms-person-shortcut,
.ms-inbox[data-compact-rail=true] .ms-chat-item {
  display:grid;place-items:center;position:relative;width:44px;height:44px;min-height:44px;padding:0;margin:0;
}
.ms-inbox[data-compact-rail=true] .page-tab svg {display:block}
.ms-inbox[data-compact-rail=true] :is(.page-tab-short,.page-tab-full,.ms-group-label) {display:none}
.comm-messenger .ms-inbox[data-compact-rail=true] .social-chat-row {
  display:grid;place-items:center;margin:3px auto;width:46px;box-sizing:border-box
}
.ms-inbox[data-compact-rail=true] .ms-chat-item.active {border:0;background:transparent}
.ms-inbox[data-compact-rail=true] .ms-unread-badge {position:absolute;top:0;right:0;font:700 10px/15px var(--font-ui);min-width:15px;height:15px;padding:0 3px}
.ms-inbox[data-compact-rail=true] .social-people {display:grid;justify-items:center;gap:3px;padding:4px 0}
.ms-inbox[data-compact-rail=true] .ms-directory-group {display:grid;gap:3px}
.ms-person-shortcut {border:1px solid transparent;border-radius:8px;background:transparent;color:var(--txt);cursor:pointer}
.ms-person-shortcut:hover {border-color:var(--steel-hi);background:var(--surface-raised)}
.ms-chat-avatar .comm-online-dot,.ms-person-shortcut .comm-online-dot {
  position:absolute;bottom:2px;right:1px;margin:0;box-shadow:0 0 0 2px var(--bg)
}
.ms-person-shortcut .comm-online-dot {right:5px;bottom:5px}
.ms-inbox[data-compact-rail=true] .ms-inbox-note {font-size:0;text-align:center;padding:8px 0}
.ms-inbox[data-compact-rail=true] .ms-inbox-note::before {content:'—';font-size:16px}
.comm-panel[data-rail=collapsed] .comm-support-overlay {left:var(--comm-icon-rail)}
.comm-panel[data-rail=expanded] .comm-support-overlay[data-picker-open=true] {left:var(--comm-sidebar-width)}
.ms-inbox-list,html[data-hub-rail] #sidebar {background:var(--bg);border-color:var(--steel-hi)}
.ms-rail-toolbar,html[data-hub-rail] .sidebar-header {
  align-items:center;box-sizing:border-box;min-height:var(--comm-rail-head);
  padding:5px 10px;gap:8px;background:var(--bg);border-bottom:1px solid var(--steel-hi);
}
html[data-hub-rail] .sidebar-header {flex-direction:row;justify-content:space-between}
html[data-hub-rail] .sidebar-title {font:650 14px/1.35 var(--font-ui);text-transform:none}
html[data-hub-rail=expanded] #sidebar {transition:none}
html[data-hub-rail] #ch-list {scrollbar-gutter:stable}
.comm-messenger .social-chat-row,html[data-hub-rail] #app[data-channels-open=true] #ch-list .ch-item {
  margin:3px 6px;padding:0;border-radius:8px;border:1px solid transparent;
}
.comm-messenger .social-chat-row:has(.ms-chat-item.active),html[data-hub-rail] #app[data-channels-open=true] #ch-list .ch-item.active {
  border-color:var(--gold-lo);background:var(--accent-soft);box-shadow:none;
}
html[data-hub-rail] #app[data-channels-open=true] #ch-list .ch-item {width:calc(100% - 12px);padding:8px 10px}
html[data-hub-rail] #ch-list .ch-icon {width:34px;height:34px;border-radius:50%;border:1px solid var(--gold-lo);background:var(--accent-soft)}
@media(hover:hover) {
  .comm-messenger .social-chat-row:hover,html[data-hub-rail] #app[data-channels-open=true] #ch-list .ch-item:hover {border-color:var(--steel-hi);background:var(--surface-raised)}
}
html[data-hub-rail=expanded] #app[data-channels-open=true] #sidebar {flex:0 0 var(--comm-sidebar-width);width:var(--comm-sidebar-width)}
html[data-hub-rail=expanded] #room-members {flex-basis:calc(var(--comm-sidebar-width) - 64px);width:calc(var(--comm-sidebar-width) - 64px)}
html[data-hub-rail=collapsed] #app[data-room-active] {display:flex;flex-direction:row}
html[data-hub-rail=collapsed] #app[data-room-active] #sidebar {
  display:flex;flex:0 0 var(--comm-icon-rail);width:var(--comm-icon-rail);min-width:0;border-right:1px solid var(--steel-hi)
}
html[data-hub-rail=collapsed] #app[data-room-active] :is(#room-members,#btn-channels,.sidebar-header,.ch-section,.ch-name,.ch-text-only) {display:none}
html[data-hub-rail=collapsed] #app[data-room-active] #ch-list {padding-inline:0;scrollbar-gutter:auto;overflow-x:hidden}
html[data-hub-rail=collapsed] #app[data-room-active] #ch-list .ch-item {
  display:flex;justify-content:center;align-items:center;box-sizing:border-box;width:44px;min-height:44px;padding:0;margin:4px auto
}
html[data-hub-rail=collapsed] #app[data-room-active] .ch-count {position:absolute;bottom:0;right:0;min-width:14px;padding:0 3px;background:var(--bg2);font-size:10px;line-height:14px}
html[data-hub-rail=collapsed] #app[data-room-active] #main {display:flex;width:100%;flex:1;min-width:0}
@media(pointer:coarse) and (min-width:651px) {
  .comm-resize-handle {width:16px}
  .comm-resize-handle::after {left:3px}
}
@media(max-width:650px) {
  .comm-header .comm-room-tools .comm-tool-button {padding-inline:5px}
  .comm-header {gap:2px}
  .comm-panel[data-rail=phone] {width:auto}
}

@media(max-width:420px) {
  .comm-header .comm-tool-button[aria-label="Позвать друга"] {width:44px}
  .comm-header .comm-tool-button[aria-label="Позвать друга"] span {display:none}
}
