/* Сохранение раздела находится в шапке: стрелка до изменений, галочка после. */
@layer vmesta-component-contract {
html:root body :is(#chat-settings426-modal,#sidebar-customizer-modal,#achievement-showcase-modal) .settings-header-action429.settings-header-action429 {display:grid!important;place-items:center!important;flex:none!important;width:40px!important;min-width:40px!important;height:40px!important;padding:9px!important;border:0!important;border-radius:12px!important;background:var(--theme-surface-control)!important;color:var(--theme-accent)!important;cursor:pointer!important;}
html:root body :is(#chat-settings426-modal,#sidebar-customizer-modal,#achievement-showcase-modal) .settings-header-action429 svg {width:22px!important;height:22px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round!important;stroke-linejoin:round!important;color:inherit!important;}
html:root body :is(#chat-settings426-modal,#sidebar-customizer-modal,#achievement-showcase-modal) .settings-header-action429.has-changes429 {background:var(--theme-action-fill,var(--theme-accent))!important;color:var(--theme-on-action,var(--theme-on-accent))!important;}
html:root body :is(#chat-settings426-modal,#sidebar-customizer-modal,#achievement-showcase-modal) .settings-header-action429:disabled {opacity:.55!important;cursor:wait!important;}
html:root body #chat-settings426-modal [data-status426]:empty {display:none!important;}
html:root body #sidebar-customizer-modal header>div,html:root body #achievement-showcase-modal .achievements-dialog-head>div {flex:1!important;min-width:0!important;}
html:root body #achievement-showcase-modal .achievements-dialog-head {gap:10px!important;}
html:root body #achievement-showcase-modal #achievement-selection-count {display:block!important;font-size:12px!important;color:var(--theme-text-secondary)!important;margin-top:6px!important;}
html:root body #achievement-showcase-dialog-footer[hidden] {display:none!important;}
html:root body #sidebar-customizer-modal footer {justify-content:flex-start!important;}
/* Переключатель сохраняет цвет темы и видимое положение ползунка. */
html:root body :is(#chat-settings426-modal,#cover-chats-pane) .chat-settings426-toggle input[type=checkbox] {appearance:none!important;position:relative!important;width:40px!important;min-width:40px!important;height:23px!important;border:0!important;border-radius:20px!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--theme-text-secondary) 35%,transparent)!important;}
html:root body :is(#chat-settings426-modal,#cover-chats-pane) .chat-settings426-toggle input[type=checkbox]::before {content:none!important;}
html:root body :is(#chat-settings426-modal,#cover-chats-pane) .chat-settings426-toggle input[type=checkbox]::after {content:''!important;display:block!important;position:absolute!important;inset:3px auto auto 3px!important;width:17px!important;height:17px!important;border-radius:50%!important;background:var(--theme-text-primary)!important;transform:translateX(0)!important;transition:transform .18s ease!important;}
html:root body :is(#chat-settings426-modal,#cover-chats-pane) .chat-settings426-toggle input[type=checkbox]:checked::after {transform:translateX(17px)!important;background:var(--theme-text-primary)!important;}
html:root body :is(#chat-settings426-modal,#cover-chats-pane) input:focus-visible {outline:2px solid var(--theme-accent)!important;outline-offset:3px!important;}
/* Меню архива повторяет точки обычных диалогов без квадратной подложки. */
html:root body #messages-root#messages-root#messages-root .messenger-archive-menu426 {display:grid!important;place-items:center!important;background:transparent!important;box-shadow:none!important;border:0!important;}
html:root body #messages-root#messages-root#messages-root :is(.messenger-archive-menu426,.messenger-row-menu-button) {color:var(--theme-text-secondary)!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(:hover,:focus-visible,[aria-expanded=true]) {color:var(--theme-accent)!important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-menu426 svg {width:20px!important;height:20px!important;fill:none!important;stroke:currentColor!important;stroke-width:3!important;stroke-linecap:round!important;}
/* Один размер оболочки документа до отправки и после подтверждения сервера. */
html:root body #messages-root#messages-root#messages-root .messenger-bubble.has-file-cards429:not(.has-media-album) {width:300px!important;max-width:calc(100vw - 90px)!important;min-width:0!important;box-sizing:border-box!important;}
html:root body #messages-root#messages-root#messages-root .has-file-cards429 .messenger-file-card {display:grid!important;grid-template-columns:42px minmax(0,1fr) 30px!important;align-items:center!important;gap:10px!important;min-height:82px!important;width:100%!important;padding:12px!important;box-sizing:border-box!important;}
html:root body #messages-root#messages-root#messages-root .has-file-cards429 .messenger-file-card>span {min-width:0!important;}
html:root body #messages-root#messages-root#messages-root .has-file-cards429 .messenger-file-card strong {display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;overflow-wrap:anywhere!important;line-height:1.3!important;min-height:2.6em!important;}
html:root body #messages-root#messages-root#messages-root .has-file-cards429 .messenger-file-card>:is(svg,.messenger-upload-icon) {width:36px!important;height:36px!important;}
/* Наклон изменяет только локальный фоновый слой, без пересчёта всей страницы. */
html:root body .chat-wallpaper-layer426.is-moving.has-tilt429>div,html:root body .chat-settings426-preview.is-moving.has-tilt429>.chat-settings426-preview-wall {animation:none!important;transform:translate3d(var(--wallpaper-tilt-x429,0px),var(--wallpaper-tilt-y429,0px),0) scale(1.08)!important;transition:transform 110ms linear!important;}
@media(max-width:767px){html:root body #messages-root#messages-root#messages-root .messenger-bubble.has-file-cards429:not(.has-media-album) {width:280px!important;}}
@media(prefers-reduced-motion:reduce){html:root body .chat-wallpaper-layer426.is-moving>div,html:root body .chat-settings426-preview.is-moving>.chat-settings426-preview-wall {animation:none!important;transform:none!important;transition:none!important;}html:root body :is(#chat-settings426-modal,#cover-chats-pane) input::after {transition:none!important;}}
}
