/**
 * Единый фон сцены — dim + scene-overlay + фото на body.
 * View-контейнеры прозрачные; локальные дубли (.rm-view::before и т.д.) отключены.
 */

/* Канонический стек фона (перебивает легаси body::before в styles.css) */
body::before {
    content: '' !important;
    position: fixed !important;
    inset: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
    background:
        var(--scene-dim),
        var(--scene-overlay),
        var(--bg-url, url('/bg-night.jpg')) center / cover no-repeat fixed !important;
}

/* ── Контейнеры прозрачные — фон только через body::before ── */
.main-content,
.main-content::before,
.main-content.agent-chat-active,
[data-mode="light"] .main-content,
.welcome-screen::before {
    background: transparent !important;
    background-color: transparent !important;
}

.main-content::before {
    content: none !important;
    display: none !important;
}

.main-content.agent-chat-active > * {
    position: relative;
    z-index: 1;
}

/* Локальные dim-слои — теперь на body, иначе двойное затемнение */
.rm-view::before,
.tm-view::before {
    content: none !important;
    display: none !important;
}

#home-today-view.htm-view,
#family-presence-view.fpm-view,
#routines-view,
#skills-view,
#agent-settings-hub-view,
#organizer-hub-view,
.tm-view,
.rm-view,
.cab,
.dashboard-view,
.hdb-view,
.dashboard-layout,
.app-container {
    background: transparent !important;
    background-color: transparent !important;
}

#home-today-view.htm-view::before,
#family-presence-view.fpm-view::before,
.cab::before,
.tm-glow,
.family-glow {
    content: none !important;
    display: none !important;
}
