@layer vmesta-component-contract {
/* Кнопки действий сохраняют насыщенный цвет и на устройствах без наведения. */
html:root body #messages-root#messages-root#messages-root :is(.messenger-row-menu-button,.messenger-archive-menu426),
html:root body #messages-root#messages-root#messages-root :is(.messenger-row-menu-button,.messenger-archive-menu426) :is(svg,.messenger-icon) {opacity:1!important;color:var(--theme-accent)!important;}
/* Архив занимает такую же строку, как соседний диалог. Высоту скрытой строки задаёт анимация архива. */
html:root body #messages-root#messages-root#messages-root .messenger-archive426 {position:relative!important;border-radius:1rem!important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive426.is-visible {margin:0 0 .18rem!important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-open426 {min-height:76px!important;height:76px!important;padding:.62rem 2.15rem .62rem .65rem!important;gap:.72rem!important;width:100%!important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-open426>.messenger-icon {width:3.25rem!important;height:3.25rem!important;flex:0 0 3.25rem!important;display:grid!important;place-items:center!important;border-radius:1rem!important;background:var(--theme-surface-active)!important;color:var(--theme-accent)!important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-open426>.messenger-icon svg {width:26px!important;height:26px!important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-open426>span:not(.messenger-icon) {min-width:0!important;gap:4px!important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-open426 small {white-space:nowrap!important;text-overflow:ellipsis!important;overflow:hidden!important;}
html:root body #messages-root#messages-root#messages-root .messenger-archive-menu426 {position:absolute!important;top:.48rem!important;right:.35rem!important;width:1.8rem!important;height:1.8rem!important;margin:0!important;padding:0!important;display:grid!important;place-items:center!important;}
/* Буфер находится в контуре волны, отдельная дорожка больше не занимает место. */
html:root body .audio-buffer426 {display:none!important;}
html:root body :is(.vmesta-track-wave,.global-music-wave,.messenger-voice-wave,.messenger-once-wave,.messenger-recording-trim) .wave-buffer433 {display:block!important;fill:none!important;stroke:color-mix(in srgb,var(--theme-accent) 48%,var(--theme-text-secondary))!important;stroke-width:1.8!important;stroke-linecap:round!important;vector-effect:non-scaling-stroke!important;clip-path:none!important;}
html:root body #global-music-panel .global-music-wave path.wave-buffer433 {stroke:color-mix(in srgb,var(--theme-accent) 48%,var(--theme-text-secondary))!important;clip-path:none!important;}
html:root body .messenger-voice-wave .wave-buffer433 {stroke-width:1.2!important;}
/* Настройки приватности используют переключатели и акцент текущей темы. */
html:root body #messenger-media-privacy-editor#messenger-media-privacy-editor {font-family:var(--font-sans,system-ui,sans-serif)!important;background:var(--theme-surface-panel)!important;color:var(--theme-text-primary)!important;}
html:root body #messenger-media-privacy-editor#messenger-media-privacy-editor :is(header button,.messenger-privacy-symbol) {color:var(--theme-accent)!important;background:var(--theme-surface-control)!important;}
html:root body #messenger-media-privacy-editor#messenger-media-privacy-editor input[role=switch] {appearance:none!important;-webkit-appearance:none!important;position:relative!important;padding:0!important;opacity:1!important;width:38px!important;height:22px!important;flex:0 0 38px!important;min-width:38px!important;border:1px solid var(--theme-divider)!important;background:var(--theme-surface-control)!important;box-shadow:none!important;}
html:root body #messenger-media-privacy-editor#messenger-media-privacy-editor input[role=switch]::before {width:16px!important;height:16px!important;top:2px!important;left:2px!important;background:var(--theme-text-secondary)!important;transform:none!important;}
html:root body #messenger-media-privacy-editor#messenger-media-privacy-editor input[role=switch]:checked {background:var(--theme-accent)!important;border-color:var(--theme-accent)!important;}
html:root body #messenger-media-privacy-editor#messenger-media-privacy-editor input[role=switch]:checked::before {background:var(--theme-on-accent,#fff)!important;transform:translateX(16px)!important;}
html:root body #messenger-media-privacy-editor#messenger-media-privacy-editor input[role=switch]:focus-visible {outline:2px solid var(--theme-accent)!important;outline-offset:3px!important;}
html:root body #messages-root#messages-root#messages-root .messenger-pending-strip>article.is-spoiler>:is(img,video,.messenger-pending-file-icon) {filter:blur(9px)!important;opacity:.65!important;}
html:root body #messages-root#messages-root#messages-root .messenger-pending-attachment-actions .messenger-media-privacy {color:var(--theme-accent)!important;background:var(--theme-surface-active)!important;}
html:root body #messages-root#messages-root#messages-root #messenger-recording-panel.is-spoiler :is(video,.messenger-recording-trim-wave,.messenger-recording-wave) {filter:blur(9px)!important;opacity:.65!important;}
html:root body #messenger-once-viewer#messenger-once-viewer .messenger-once-hint small {color:var(--theme-text-secondary)!important;opacity:1!important;}
html:root body #messenger-once-viewer#messenger-once-viewer .messenger-once-play b {background:var(--theme-surface-panel)!important;color:var(--theme-accent)!important;border:1px solid var(--theme-accent)!important;}
/* Компактное окно одноразового сообщения остаётся по центру затемнённого чата. */
html:root body #messenger-once-viewer#messenger-once-viewer {display:flex!important;align-items:center!important;justify-content:center!important;padding:16px!important;background:rgb(0 0 0/.65)!important;backdrop-filter:blur(8px)!important;}
html:root body #messenger-once-viewer#messenger-once-viewer .messenger-once-stage {display:flex!important;width:min(420px,100%)!important;max-height:calc(100dvh - 32px)!important;gap:16px!important;padding:18px!important;border-radius:22px!important;background:var(--theme-surface-panel)!important;color:var(--theme-text-primary)!important;overflow:auto!important;}
html:root body #messenger-once-viewer#messenger-once-viewer header {width:100%!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:0!important;margin:0!important;background:none!important;color:var(--theme-text-primary)!important;font-size:14px!important;}
html:root body #messenger-once-viewer#messenger-once-viewer .messenger-once-close {width:34px!important;height:34px!important;padding:0!important;display:grid!important;place-items:center!important;flex:none!important;border-radius:10px!important;background:var(--theme-surface-control)!important;color:var(--theme-accent)!important;}
html:root body #messenger-once-viewer#messenger-once-viewer .messenger-once-close svg {width:20px!important;height:20px!important;}
html:root body #messenger-once-viewer#messenger-once-viewer .messenger-once-hint {background:var(--theme-surface-nested)!important;color:var(--theme-text-secondary)!important;font-size:12px!important;margin:0!important;}
html:root body #messenger-once-viewer#messenger-once-viewer .messenger-once-play {background:var(--theme-accent)!important;color:var(--theme-on-accent,#fff)!important;}
html:root body #messenger-once-viewer#messenger-once-viewer .messenger-once-player {max-width:100%!important;}
html:root body #messenger-once-viewer#messenger-once-viewer.is-image .messenger-once-player {width:100%!important;}
html:root body #messenger-once-viewer#messenger-once-viewer.is-video .messenger-once-player {width:min(320px,72vw,50dvh)!important;}
html:root body #messenger-once-viewer#messenger-once-viewer .messenger-once-ring circle {stroke:var(--theme-accent)!important;}
html:root body #messenger-once-viewer#messenger-once-viewer.is-audio .messenger-once-wave svg {width:100%!important;height:28px!important;}
html:root body #messenger-once-viewer#messenger-once-viewer .messenger-once-error {color:var(--theme-text-secondary)!important;}
html:root body .messenger-once-removing433 {pointer-events:none!important;animation:once-row-remove433 .3s ease forwards!important;}
@keyframes once-row-remove433 {to{opacity:0;filter:blur(5px);transform:scale(.95);}}
@media(prefers-reduced-motion:reduce){html:root body .messenger-once-removing433 {animation:none!important;}}
}
