@font-face {
    font-family:MaobvenGolos; font-weight:100 900; font-display:swap;
    src:url('./golos.ttf') format('truetype');
}
.mx_MatrixChat[data-mb-work],html[data-mb-embedded] .mx_Toast_toast {
    --mb-work-page:#f0f1fc; --mb-work-bg:#f9f9ff; --mb-work-sidebar:#f7f7fe; --mb-work-subtle:#eeeefa;
    --mb-work-ink:#11132c; --mb-work-muted:#424973; --mb-work-line:#dadcf1; --mb-work-action:#5652b8;
    --mb-work-on-action:#fff; --mb-work-tint:#e3e1fc; --mb-work-tint-ink:#26245f; --mb-work-field:#cfd2ea;
    --mb-work-bubble:#fcfcff; --mb-work-own:#e7e6fc; --mb-work-shadow:0 3px 6px -4px #3c407150;
    --mb-list-width:clamp(282px,32%,400px); --mb-panel-radius:16px;
}
.mx_MatrixChat[data-mb-work] {
    display:grid !important; grid-template-columns:var(--mb-list-width) minmax(0,1fr); column-gap:8px;
    grid-template-rows:auto auto minmax(0,1fr) auto;
    grid-template-areas:"sync sync" "list title" "list native" "list guard";
    box-sizing:border-box; min-height:0; min-width:0; overflow:hidden; padding:14px 12px 24px 13px;
    background:linear-gradient(120deg,var(--mb-work-page),color-mix(in srgb,var(--mb-work-page) 82%,var(--mb-work-bg)));
    color:var(--mb-work-ink); color-scheme:light; font:400 16px/1.4 MaobvenGolos,system-ui,sans-serif;
}
/* Element mounts notifications outside the chat grid and its palette. */
html[data-mb-embedded] .mx_Toast_toast {
    --cpd-color-text-primary:var(--mb-work-ink);
    --cpd-color-text-secondary:var(--mb-work-muted);
    color-scheme:light; color:var(--mb-work-ink); background:var(--mb-work-bg);
    border:1px solid var(--mb-work-field); border-radius:var(--mb-panel-radius);
    box-shadow:0 4px 16px #38356728; font-family:MaobvenGolos,system-ui,sans-serif;
}
html[data-mb-embedded] .mx_Toast_toast :is(h2,button) {font-family:inherit}
html[data-mb-embedded] .mx_Toast_toast button[data-kind=secondary] {
    background:var(--mb-work-subtle); color:var(--mb-work-ink); border-color:var(--mb-work-field);
}
html[data-mb-embedded] .mx_Toast_toast button[data-kind=primary] {
    background:var(--mb-work-action); color:var(--mb-work-on-action); border-color:var(--mb-work-action);
}
html[data-mb-embedded] .mx_Toast_toast button:is([data-kind=primary],[data-kind=secondary]):hover {
    filter:brightness(.95);
}
html:not([data-mb-embedded]) :is(.cpd-theme-dark,.mx_Theme_dark,.mx_Theme_dark-custom) .mx_MatrixChat[data-mb-work] {
    --mb-work-page:#1b1b2c; --mb-work-bg:#252536; --mb-work-sidebar:#242437; --mb-work-subtle:#313147;
    --mb-work-ink:#f5f3ff; --mb-work-muted:#bdbed6; --mb-work-line:#494960; --mb-work-action:#b4aaff;
    --mb-work-on-action:#21194c; --mb-work-tint:#403b63; --mb-work-tint-ink:#ece8ff; --mb-work-field:#585770;
    --mb-work-bubble:#333345; --mb-work-own:#423d65; color-scheme:dark;
}
#mb-work-shell {display:contents}
#mb-work-shell *,#mb-work-shell *::before,#mb-work-shell *::after {box-sizing:border-box}
#mb-work-shell [hidden] {display:none !important}
#mb-work-shell :is(button,input,summary,textarea) {font-family:inherit}
#mb-work-shell :is(button,input,summary):focus-visible,.mb-direct-reactions :focus-visible {
    outline:3px solid var(--mb-work-action); outline-offset:-3px;
}
#mb-work-shell button svg,#mb-direct-placeholder svg,.mb-chat-searchbox svg {
    display:block; width:22px; height:22px; flex:none;
}
#mb-direct-pane,#mb-direct-placeholder,#mb-group-host,#mb-direct-header {
    min-width:0; min-height:0; background:var(--mb-work-sidebar); border:1px solid var(--mb-work-line);
    border-radius:var(--mb-panel-radius); box-shadow:var(--mb-work-shadow);
}
#mb-direct-pane {
    grid-area:list; overflow:hidden; display:flex; flex-direction:column;
}
#mb-direct-pane>header,#mb-direct-header,#mb-person-picker>header {
    display:flex; align-items:center; justify-content:space-between; gap:12px;
}
#mb-direct-pane>header {padding:18px 16px 15px 17px}
#mb-direct-pane h2,#mb-direct-title,#mb-person-title {color:inherit; margin:0}
#mb-direct-pane h2 {margin-inline-end:auto; font-size:32px; line-height:1.15; font-weight:720; letter-spacing:-.045em}
#mb-work-shell :is(#mb-compose,#mb-chat-security,#mb-direct-header button,#mb-picker-close) {
    display:inline-grid; place-items:center; flex:none; width:48px; height:48px; padding:0; cursor:pointer;
    border:1px solid var(--mb-work-field); border-radius:11px; background:var(--mb-work-bg);
    color:var(--mb-work-ink); box-shadow:var(--mb-work-shadow);
}
#mb-work-shell :is(#mb-compose,#mb-chat-security,#mb-direct-header button,#mb-picker-close) span {display:none}
#mb-work-shell :is(#mb-compose,#mb-chat-security,#mb-direct-header button,#mb-picker-close):hover {background:var(--mb-work-subtle)}
#mb-work-shell #mb-compose svg,#mb-direct-header button svg {width:26px;height:26px}
.mb-chat-searchbox {
    display:flex; align-items:center; gap:11px; flex:none; min-height:42px; margin:0 16px 0 17px;
    height:42px; padding:0 12px; border:1px solid var(--mb-work-line); border-radius:11px; background:var(--mb-work-subtle); color:var(--mb-work-muted);
}
#mb-chat-search {flex:1; appearance:none; min-width:0; width:100%; height:38px; min-height:0; margin:0; padding:0; border:0; border-radius:4px; background:transparent; color:var(--mb-work-ink); font:inherit; font-size:15px}
#mb-chat-search::placeholder,#mb-person-search::placeholder {color:var(--mb-work-muted); opacity:1}
.mb-chat-searchbox:focus-within {outline:2px solid var(--mb-work-action);outline-offset:1px}
#mb-work-shell #mb-chat-search:focus-visible {outline:0}
#mb-chat-tabs {display:flex; align-items:center; flex-wrap:wrap; gap:7px; flex:none; padding:16px 16px 21px 17px}
#mb-chat-tabs button,.mb-direct-reactions button,.mb-direct-reactions summary {
    appearance:none; cursor:pointer; background:var(--mb-work-bg); color:var(--mb-work-ink);
    border:1px solid var(--mb-work-field); border-radius:17px; font:inherit; box-shadow:var(--mb-work-shadow);
}
#mb-chat-tabs button {
    display:inline-flex; align-items:center; justify-content:center; gap:5px; min-height:36px; padding:3px clamp(10px,1.6vw,22px);
    font-size:14px; font-weight:500;
}
#mb-work-shell #mb-chat-tabs svg {display:none}
#mb-chat-tabs button:hover {background:var(--mb-work-subtle)}
#mb-chat-tabs button[aria-pressed=true] {background:var(--mb-work-action);color:var(--mb-work-on-action);border-color:transparent}
#mb-direct-list {min-height:0;overflow:auto;padding:0 6px;scrollbar-width:thin;scrollbar-color:var(--mb-work-field) transparent}
#mb-direct-list .mb-direct-row {
    position:relative; display:flex; align-items:center; gap:17px; width:100%; min-height:85px; padding:11px 10px 11px 13px;
    appearance:none; font:inherit; text-align:start; border:0; border-radius:13px; background:transparent; color:inherit; cursor:pointer;
}
#mb-direct-list .mb-direct-row::after {position:absolute; bottom:0; inset-inline:12px; height:1px; content:""; background:var(--mb-work-line);opacity:.65}
#mb-direct-list .mb-direct-row:hover {background:var(--mb-work-subtle)}
#mb-direct-list .mb-direct-row[aria-current=true] {background:var(--mb-work-tint);box-shadow:var(--mb-work-shadow)}
.mb-work-avatar {
    position:relative; display:inline-grid; place-items:center; flex:none; width:56px; height:56px; border-radius:50%;
    font-weight:620; font-size:18px; background:#e0e0f8; color:#49438d;
}
.mb-work-avatar::before {content:attr(data-initials)}
#mb-direct-list .mb-work-avatar {width:58px;height:58px}
.mb-work-avatar[data-tone="1"] {background:#dbe7fa;color:#3a567f}
.mb-work-avatar[data-tone="2"] {background:#f0deed;color:#7b4969}
.mb-work-avatar[data-tone="3"] {background:#f4e3d9;color:#87553d}
.mb-work-avatar[data-tone="4"] {background:#ddeaeb;color:#376966}
.mb-work-avatar img {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit;opacity:0}
.mb-work-avatar.mb-has-photo img {opacity:1}
.mb-work-avatar.mb-online::after {content:"";position:absolute;bottom:0;right:0;width:13px;height:13px;border-radius:50%;background:#379e50;border:2px solid var(--mb-work-sidebar)}
#mb-work-shell .mb-group-avatar {background:linear-gradient(150deg,#eceaff,#dcdafa);color:#49438e;box-shadow:0 2px 4px #3d3f6b22}
#mb-work-shell .mb-group-avatar svg {width:33px;height:33px}
.mb-row-details,.mb-row-meta,.mb-heading-text {display:flex;min-width:0;flex-direction:column;gap:4px}
.mb-row-details {flex:1}
.mb-work-name,.mb-row-preview {display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.mb-work-name {font-size:19px;font-weight:650;letter-spacing:-.035em}
#mb-work-shell .mb-work-name svg {display:inline-block;vertical-align:middle;width:14px;height:14px;margin-inline-start:6px;fill:currentColor}
.mb-row-preview,.mb-row-meta time {font-size:14px;line-height:1.4;color:var(--mb-work-muted)}
.mb-row-preview {font-size:15px}
.mb-row-meta {align-self:stretch;align-items:flex-end;justify-content:space-between;padding-block:6px;font-variant-numeric:tabular-nums}
.mb-direct-unread,.mb-direct-unread-total {min-width:24px;line-height:24px;padding-inline:6px;border-radius:14px;text-align:center;font-size:13px;font-weight:600;background:var(--mb-work-action);color:var(--mb-work-on-action)}
.mb-direct-unread-total {min-width:19px;line-height:19px;padding-inline:4px}
#mb-chat-tabs [aria-pressed=true] .mb-direct-unread-total {background:var(--mb-work-on-action);color:var(--mb-work-action)}
.mb-list-empty,.mb-index-error {margin:10px 18px;color:var(--mb-work-muted);font-size:14px}
.mb-index-error button,#mb-enable-crypto {border:0;padding:6px;color:var(--mb-work-action);background:none;font:inherit;text-decoration:underline;cursor:pointer}
#mb-connection-slot {grid-area:sync;min-width:0}
#mb-connection-slot:empty,#mb-connection-slot:has(> [hidden]:only-child) {display:none}
#mb-connection-slot:not(:empty) {margin-bottom:6px}
#mb-direct-header {
    grid-area:title; min-height:86px; padding:12px 22px; gap:16px; border-radius:var(--mb-panel-radius) var(--mb-panel-radius) 0 0; box-shadow:none;
}
#mb-direct-header .mb-heading-text {flex:1}
#mb-direct-title {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:26px;letter-spacing:-.045em;line-height:1.22}
#mb-secured-label {display:flex;align-items:center;gap:6px;color:var(--mb-work-muted);font-size:15px}
#mb-secured-label svg {width:14px;height:14px}
#mb-work-shell #mb-direct-header #mb-direct-back {display:none}
#mb-direct-placeholder {
    grid-column:2;grid-row:2/-1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;color:var(--mb-work-muted);
}
#mb-direct-placeholder p {margin:0}
#mb-direct-placeholder svg {width:36px;height:36px}
#mb-group-host {grid-column:1/-1; grid-row:2/-1; overflow:hidden}
#mb-group-host:has(~ #mb-direct-pane) {grid-column:2}
#mb-direct-guard {grid-area:guard;padding:8px 16px;background:var(--mb-work-bg);border:1px solid var(--mb-work-line);border-top:0;border-radius:0 0 var(--mb-panel-radius) var(--mb-panel-radius);color:var(--mb-work-ink)}
#mb-person-picker {width:min(480px,calc(100vw - 24px));max-height:85dvh;padding:20px;border:1px solid var(--mb-work-line);border-radius:16px;background:var(--mb-work-bg);color:var(--mb-work-ink);box-shadow:0 12px 50px #1b164a35;overflow:auto}
#mb-person-picker::backdrop {background:#18172e66}
#mb-person-title {font-size:22px}
#mb-person-search {width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--mb-work-field);border-radius:10px;font:inherit;background:var(--mb-work-subtle);color:var(--mb-work-ink)}
#mb-person-status {font-size:14px;color:var(--mb-work-muted)}
#mb-person-status:empty {display:none}
#mb-person-results {max-height:45dvh;overflow:auto}
#mb-person-results button,#mb-person-more,#mb-work-nav button {display:flex;align-items:center;gap:8px;min-height:42px;padding:6px 8px;font:inherit;color:inherit;background:transparent;border:0;border-radius:8px;cursor:pointer}
#mb-person-results button {width:100%;text-align:start}
#mb-person-results button:hover,#mb-work-nav button:hover,#mb-person-more:hover {background:var(--mb-work-subtle)}
#mb-person-results .mb-work-avatar {width:36px;height:36px;font-size:13px}
.mb-work-utility {display:flex;flex-wrap:wrap;gap:3px;margin:8px 0}
#mb-work-nav button {color:var(--mb-work-muted);font-size:14px}
.mx_MatrixChat[data-mb-work] > :not(#mb-work-shell) {grid-area:native;min-width:0;min-height:0;height:100% !important;max-height:100%;overflow:hidden}
.mx_MatrixChat[data-mb-work] > :not(#mb-work-shell,.mx_RoomView_wrapper):not(:has(.mx_RoomView_wrapper)),
.mx_MatrixChat[data-mb-work] :is(.mx_SpacePanel,.mx_LeftPanel_outerWrapper,.mx_Separator,.mx_RoomHeader,.mx_NewRoomIntro,.mx_RoomPreviewBar_inviter_mxid),
.mx_MatrixChat[data-mb-work] :is([data-panel],.mx_LeftPanel_panel):has(.mx_LeftPanel_outerWrapper),
.mx_MatrixChat[data-mb-work] [role="separator"]:has(.mx_Separator),
.mx_MatrixChat[data-mb-viewing=false] > :not(#mb-work-shell),
.mx_MatrixChat[data-mb-secure=false] .mx_MessageComposer {display:none !important}
.mx_MatrixChat[data-mb-work] :is([data-panel],.mx_LeftPanel_panel):has(.mx_RoomView_wrapper) {flex:1 1 100% !important;width:100% !important;max-width:none !important;min-width:0 !important}
.mx_MatrixChat[data-mb-work][data-mb-viewing=true] > :not(#mb-work-shell) {box-sizing:border-box;background:var(--mb-work-bg);border:1px solid var(--mb-work-line);border-top:0;border-radius:0 0 var(--mb-panel-radius) var(--mb-panel-radius);box-shadow:var(--mb-work-shadow)}
.mx_MatrixChat[data-mb-work][data-mb-secure=false]:has(#mb-direct-guard:not([hidden])) > :not(#mb-work-shell) {border-radius:0}
.mx_MatrixChat[data-mb-work] :is(.mx_RoomView,.mx_RoomView_body,.mx_RoomView_messagePanel,.mx_MessageComposer) {font-family:MaobvenGolos,system-ui,sans-serif;background-color:var(--mb-work-sidebar);color:var(--mb-work-ink)}
html[data-mb-embedded] .mx_MatrixChat[data-mb-work] .mx_RoomView_messagePanel .mx_EventTile {
    --event-tile-state-hover-background:var(--mb-work-subtle);
    --event-tile-bubble-hover-background:var(--mb-work-subtle);
    --event-tile-preview-hover-background:var(--mb-work-subtle);
    --event-tile-state-selected-background:var(--mb-work-tint);
    --event-tile-state-highlight-background:var(--mb-work-tint);
}
html[data-mb-embedded] .mx_RoomView_messagePanel .mx_EventTile :is(.mx_MessageActionBar,[role=toolbar]) {
    --cpd-color-bg-canvas-default:var(--mb-work-bg);
    --cpd-color-bg-subtle-secondary:var(--mb-work-subtle);
    --cpd-color-border-disabled:var(--mb-work-field);
    --cpd-color-icon-secondary:var(--mb-work-muted);
}
.mx_MatrixChat[data-mb-work] [data-mb-text] .mx_EventTile_content {
    box-sizing:border-box;display:block;width:fit-content;max-width:94%;padding:8px 13px;border:1px solid var(--mb-work-line);
    border-radius:14px;background:var(--mb-work-bubble);color:var(--mb-work-ink);overflow-wrap:anywhere;line-height:1.48;box-shadow:var(--mb-work-shadow);
}
.mx_MatrixChat[data-mb-work] [data-mb-own][data-mb-text] .mx_EventTile_content {background:var(--mb-work-own)}
.mx_MatrixChat[data-mb-work] .mx_EventTile_senderDetails {color:var(--mb-work-ink)}
.mx_MatrixChat[data-mb-work] .mx_Username_color {color:inherit}
.mx_MatrixChat[data-mb-work] .mx_MessageComposer {margin:10px 14px;padding:10px 12px;background:var(--mb-work-bg);border:1px solid var(--mb-work-line);border-radius:14px;box-shadow:var(--mb-work-shadow)}
.mx_MatrixChat[data-mb-work] .mx_BasicMessageComposer_input {color:var(--mb-work-ink);font-family:inherit}
.mx_MatrixChat[data-mb-work] .mx_MessageComposer_wrapper {background:var(--mb-work-subtle);border:1px solid var(--mb-work-field);border-radius:11px}
.mx_MatrixChat[data-mb-work] :is(.mx_MessageComposer_sendMessage,[data-testid=sendmessagebtn]) {color:var(--mb-work-on-action);background-color:var(--mb-work-action);border-radius:11px}
#mb-sync-health:not([hidden]) {background:var(--mb-work-subtle);color:var(--mb-work-ink);border-radius:10px}
@media(max-width:700px){
    .mx_MatrixChat[data-mb-work] {grid-template-columns:minmax(0,1fr);grid-template-areas:"sync" "title" "list" "guard";column-gap:0;padding:8px 8px max(8px,env(safe-area-inset-bottom))}
    .mx_MatrixChat[data-mb-selected=true] {grid-template-areas:"sync" "title" "native" "guard"}
    .mx_MatrixChat[data-mb-selected=true] #mb-direct-pane,#mb-direct-placeholder {display:none}
    #mb-group-host:has(~ #mb-direct-pane) {grid-column:1}
    #mb-direct-pane>header {padding:14px 14px 12px}
    #mb-direct-pane h2 {font-size:28px}
    #mb-direct-list .mb-direct-row {min-height:72px;gap:12px}
    #mb-direct-list .mb-work-avatar {width:48px;height:48px}
    #mb-chat-tabs {padding:12px 14px 14px}
    #mb-work-shell #mb-direct-header #mb-direct-back {display:inline-grid}
    #mb-direct-header {min-height:64px;padding:6px;gap:6px}
    #mb-work-shell #mb-direct-header button {width:44px;height:44px}
    #mb-direct-header .mb-work-avatar {width:38px;height:38px;font-size:14px}
    #mb-direct-title {font-size:18px}
    #mb-secured-label {font-size:12px}
    .mx_MatrixChat[data-mb-work] [data-mb-text] .mx_EventTile_line {margin-inline:0;padding-inline:0;min-width:0}
    .mx_MatrixChat[data-mb-work] .mx_RoomView_MessageList {padding-inline:12px}
    .mx_MatrixChat[data-mb-work] .mx_MessageComposer {margin:5px;padding:6px}
}
@media(forced-colors:active){
    #mb-chat-tabs [aria-pressed=true],#mb-direct-list [aria-current=true] {outline:2px solid Highlight}
    .mb-work-avatar,.mb-direct-unread,.mx_MatrixChat[data-mb-work] [data-mb-text] .mx_EventTile_content {border:1px solid CanvasText}
}
/* Element 1.12 supplies localized accessible names in both composer menus. */
:is(.mx_MessageComposer, .mx_MessageComposer_Menu) :is(
    [aria-label="Attachment"], [aria-label="Вложение"], [aria-label="Manus"],
    [aria-label="Voice Message"], [aria-label="Голосовое сообщение"], [aria-label="Häälsõnum"],
    #stickersButton
) { display: none !important; }
#mb-file-notice { margin: 0; padding: .5rem 1rem; color: var(--mb-work-ink); background: var(--mb-work-subtle); }

.mx_MatrixChat[data-mb-work] .mx_RoomView_messagePanel [data-event-id]:not([data-mb-editable])
.mx_MessageActionBar :is([aria-label="Edit"],[aria-label="Редактировать"],[aria-label="Muuda"]),
.mx_MessageContextMenu [data-mb-hide-edit],
.mx_MatrixChat[data-mb-work] .mx_RoomView_messagePanel [data-mb-reaction-event] { display: none !important; }
.mb-direct-reactions, .mb-direct-reaction-counts, .mb-direct-emojis { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.mb-direct-reactions { margin: .15rem .5rem .3rem; padding-inline-start: .25rem; }
.mb-direct-reactions button, .mb-direct-reactions summary {
    box-sizing: border-box; cursor: pointer; color: var(--mb-work-ink); background: var(--mb-work-subtle); border: 1px solid var(--mb-work-line);
    border-radius: 1rem; padding: .2rem .55rem; min-height: 1.8rem; font: inherit; font-size: .85rem;
}
.mb-direct-reactions summary { display: inline-flex; align-items: center; list-style: none; }
.mb-direct-reactions summary::-webkit-details-marker { display: none; }
.mb-direct-reactions details[open] .mb-direct-emojis { margin-block: .2rem; }
.mb-direct-reactions [aria-pressed="true"], .mb-direct-reactions :focus-visible { outline: 2px solid var(--mb-work-action); outline-offset: -2px; }
@media(hover:hover) and (pointer:fine) {
    .mx_RoomView_messagePanel [data-event-id]:not(:hover,:focus-within) > .mb-direct-actions > :is(details:not([open]),button) {opacity:0}
}

.mx_RoomView_messagePanel [data-event-id]:has(.mb-direct-actions) .mx_MessageActionBar :is(
    [aria-label="Reply"],[aria-label="Ответить"],[aria-label="Vasta"],
    [aria-label="Edit"],[aria-label="Редактировать"],[aria-label="Muuda"]
), .mb-direct-actions button[hidden] { display: none !important; }

.mx_MatrixChat[data-mb-mode="direct"] .mx_RoomView_messagePanel [data-mb-initial-encryption] {
    display:none !important;
}
/* Element can replace its root during SSO or reconnect. Keep an unstyled
   authenticated shell out of paint, even before the next readiness message. */
html[data-mb-embedded] {background:#f0f1fc}
html[data-mb-embedded] .mx_MatrixChat:not([data-mb-mode]) {visibility:hidden}
.mx_MatrixChat[data-mb-mode="direct"] .mx_RoomView_messagePanel [data-mb-before-cutoff],
.mx_MatrixChat[data-mb-clipped] .mx_RoomView_messagePanel :is(
    [data-event-id]:not([data-mb-after-cutoff]), .mx_EventTile:not([data-event-id]),
    .mx_EventListSummary, [data-mb-hide-quote] :is(.mx_ReplyTile,.mx_ReplyChain,mx-reply)
) {display:none !important}
