/* PixelD R94 · Single desktop surface + native shell de-duplication.
 * Pure presentation: no interaction with WebRTC, input, encoder, compositor,
 * X11 wallpaper, remote session state or auth. Loaded AFTER R92 CSS.
 */
html:has(body.desktop-view){--aiotor-native-bar:0px!important}
body.desktop-view{padding-top:0!important}
body.desktop-view #aiotorNativeBar,
body.desktop-view #aiotorDesktopBar,
body.desktop-view #aiotorWorkspaceBar{display:none!important;visibility:hidden!important;pointer-events:none!important}
/* Native Wry shells can add an extra 44px navigation spacer. The PixelD
 * server layout already provides its own unified application navigation. */
body.desktop-view .app-shell{margin-top:0!important}

/* Default to exactly one background owner.  PixelD wallpaper is the idle-only
 * placeholder, not a second surface over an active stream or startup splash. */
body.desktop-view:not(.auth-locked) #pixeldWallpaper{
 display:none!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important
}
body.desktop-view:not(.auth-locked).idle-workspace.desktop-ready:not(.session-starting):not(:has(#mainWindowList .pxa-run)) #pixeldWallpaper,
body.desktop-view:not(.auth-locked).closing-to-idle.desktop-ready:not(.session-starting) #pixeldWallpaper{
 display:block!important;opacity:1!important;visibility:visible!important
}
body.desktop-view:not(.auth-locked).session-starting #pixeldWallpaper,
body.desktop-view:not(.auth-locked).surface-transition #pixeldWallpaper,
body.desktop-view:not(.auth-locked).pixeld-frame-handoff #pixeldWallpaper{
 display:none!important;opacity:0!important;visibility:hidden!important
}
/* Startup owns the presentation until the session reaches a ready state.
 * Other wait/transition layers stay out of view; retain compositor surfaces. */
body.desktop-view:not(.auth-locked) #sessionSplash{display:none!important;opacity:0!important;pointer-events:none!important}
body.desktop-view:not(.auth-locked).session-starting:not(.desktop-ready) #sessionSplash{
 display:grid!important;opacity:1!important;pointer-events:none!important;z-index:12!important
}
body.desktop-view:not(.auth-locked) #mediaWait{display:none!important;opacity:0!important;pointer-events:none!important}
body.desktop-view:not(.auth-locked):not(.surface-transition):not(.pixeld-frame-handoff) #pixeldSurfaceShield{
 display:none!important;opacity:0!important;pointer-events:none!important
}
/* If app-list reconciliation still has stale 'idle-workspace', prioritize
 * the actual stream when a running app is visible. Use exactly one transport.
 * This prevents the idle background masking active Blender and other apps. */
body.desktop-view:not(.auth-locked).idle-workspace.desktop-ready:not(.session-starting):has(#mainWindowList .pxa-run) .pixel-stage[data-stream="pixeld"] #pixelCanvas,
body.desktop-view:not(.auth-locked).idle-workspace.desktop-ready:not(.session-starting):has(#mainWindowList .pxa-run) .pixel-stage[data-stream="video"] #linuxVideo{
 opacity:1!important;visibility:visible!important
}
@media(max-width:760px){
 body.desktop-view{padding-top:0!important}
}

/* Definitive startup ownership; outweighs legacy idle-specific rules. */
body.desktop-view.session-starting:not(.auth-locked) #pixelStage #pixeldWallpaper#pixeldWallpaper{display:none!important;opacity:0!important;visibility:hidden!important}

/* PixelD R102 single background: compositor owns the desktop */
html body.desktop-view #pixeldWallpaper#pixeldWallpaper#pixeldWallpaper{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important}
