/* Корневой запрет цепочки прокрутки не даёт Android запустить обновление страницы при вызове архива. */
html.vmesta-chat-pull431,html.vmesta-chat-pull431 body {overscroll-behavior-y:none!important;}
@layer vmesta-component-contract {
html:root body.messages-route #messages-root#messages-root#messages-root :is(.messenger-dialogs-panel,.messenger-chat-list) {overscroll-behavior-y:none!important;}
html:root body #messages-root#messages-root#messages-root :is(.messenger-archive-menu426,.messenger-row-menu-button) {color:var(--theme-accent)!important;background:transparent!important;box-shadow:none!important;}
html:root body #messages-root#messages-root#messages-root :is(.messenger-archive-menu426,.messenger-row-menu-button) :is(.messenger-icon,svg) {color:var(--theme-accent)!important;}
/* Все действия диалогов и архива имеют одну типографику, контурные иконки и яркий акцент. */
html:root body :is(#messages-root#messages-root#messages-root .messenger-chat-menu,#vmesta-archive-popover431#vmesta-archive-popover431#vmesta-archive-popover431) {font:14px/1.4 var(--font-sans,system-ui,sans-serif)!important;background:var(--theme-surface-panel)!important;color:var(--theme-text-primary)!important;border:1px solid var(--theme-divider)!important;border-radius:16px!important;padding:7px!important;box-shadow:0 12px 36px #0005!important;}
html:root body :is(#messages-root#messages-root#messages-root .messenger-chat-menu,#vmesta-archive-popover431#vmesta-archive-popover431#vmesta-archive-popover431) button {display:flex!important;align-items:center!important;gap:10px!important;width:100%!important;min-height:42px!important;padding:10px 12px!important;border:0!important;border-radius:10px!important;background:transparent!important;color:var(--theme-text-primary)!important;text-align:left!important;font:inherit!important;cursor:pointer!important;}
html:root body :is(#messages-root#messages-root#messages-root .messenger-chat-menu,#vmesta-archive-popover431#vmesta-archive-popover431#vmesta-archive-popover431) button:is(:hover,:focus-visible,[aria-checked=true]) {background:var(--theme-surface-control)!important;}
html:root body :is(#messages-root#messages-root#messages-root .messenger-chat-menu,#vmesta-archive-popover431#vmesta-archive-popover431#vmesta-archive-popover431) :is(.messenger-icon,svg) {color:var(--theme-accent)!important;flex:none!important;}
html:root body :is(#messages-root#messages-root#messages-root .messenger-chat-menu,#vmesta-archive-popover431#vmesta-archive-popover431#vmesta-archive-popover431) svg {width:20px!important;height:20px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important;}
html:root body #messages-root#messages-root#messages-root .messenger-chat-menu .is-danger :is(.messenger-icon,svg),html:root body #messages-root#messages-root#messages-root .messenger-chat-menu button.is-danger {color:var(--theme-danger,#ef4444)!important;}
html:root body #vmesta-archive-popover431#vmesta-archive-popover431#vmesta-archive-popover431 {position:fixed!important;inset:auto!important;z-index:2147483000!important;width:260px!important;max-width:calc(100vw - 16px)!important;margin:0!important;box-sizing:border-box!important;}
html:root body #vmesta-archive-popover431::backdrop {background:transparent!important;pointer-events:none!important;}
html:root body #vmesta-archive-popover431 [role=status] {display:block!important;font:12px/1.4 var(--font-sans,system-ui,sans-serif)!important;padding:8px!important;color:var(--theme-text-secondary)!important;}
html:root body #vmesta-archive-popover431 [hidden] {display:none!important;}
/* Возврат из архива занимает ровно размер кнопки, без пустой полосы во всю ширину. */
html:root body #messages-root#messages-root#messages-root .messenger-archive-back426 {display:inline-flex!important;align-items:center!important;align-self:flex-start!important;justify-content:flex-start!important;width:fit-content!important;max-width:100%!important;min-height:36px!important;height:auto!important;padding:8px 12px!important;margin:8px 0!important;gap:8px!important;border-radius:12px!important;color:var(--theme-accent)!important;font:600 13px/1.4 var(--font-sans,system-ui,sans-serif)!important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-tabs {display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin:0 0 10px!important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-tabs button {display:flex!important;align-items:center!important;gap:7px!important;min-height:38px!important;padding:9px 12px!important;border-radius:12px!important;font:600 12px/1.3 var(--font-sans,system-ui,sans-serif)!important;color:var(--theme-text-primary)!important;background:var(--theme-surface-control)!important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-tabs button.is-active {background:var(--theme-surface-active)!important;color:var(--theme-accent)!important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-tabs :is(.messenger-icon,svg,b),html:root body #messages-root#messages-root#messages-root .messenger-archive-back426 :is(.messenger-icon,svg) {color:var(--theme-accent)!important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-tabs svg,html:root body #messages-root#messages-root#messages-root .messenger-archive-back426 svg {width:18px!important;height:18px!important;}
/* Явные ячейки устраняют прежнее правило загрузки, ставившее текст и кольцо в одну колонку. */
html:root body.messages-route #messages-root#messages-root#messages-root .has-file-cards429 .messenger-file-card {grid-template-columns:42px minmax(0,1fr) 36px!important;grid-template-rows:minmax(56px,auto)!important;gap:10px!important;}
html:root body.messages-route #messages-root#messages-root#messages-root .has-file-cards429 .messenger-file-card>.messenger-file-copy431 {grid-column:2!important;grid-row:1!important;min-width:0!important;}
html:root body.messages-route #messages-root#messages-root#messages-root .has-file-cards429 .messenger-file-card>:is(.messenger-icon,.messenger-upload-icon) {grid-column:1!important;grid-row:1!important;width:36px!important;min-width:36px!important;height:36px!important;justify-self:center!important;align-self:center!important;margin:0!important;}
html:root body.messages-route #messages-root#messages-root#messages-root .has-file-cards429 .messenger-file-card>.messenger-file-action-icon {grid-column:3!important;grid-row:1!important;width:36px!important;max-width:36px!important;justify-self:center!important;align-self:center!important;margin:0!important;text-align:center!important;white-space:nowrap!important;font:600 11px/1.2 var(--font-sans,system-ui,sans-serif)!important;}
@media(max-width:767px){html:root body #messages-root#messages-root#messages-root .messenger-archive426 {transition:max-height .26s ease,opacity .2s ease,margin .26s ease,visibility .26s!important;}html:root body #messages-root#messages-root#messages-root .messenger-archive426:not(.is-visible) {visibility:hidden!important;}}
}
