/* Keep navigation in the layout so neither the monitor nor a tall remote is covered. */
.source-screen>.dashboard-bottom{position:relative;left:auto;right:auto;bottom:auto;transform:none;width:100%;flex-shrink:0;margin-top:auto;align-self:center}
.source-screen>.content{scrollbar-gutter:stable both-edges}
.source-screen>.content>.source-control-panel>.compact-google-layout{margin-block:0}
.source-screen>.content>.ptz-remote>.compact-google-layout{padding-top:22px}
/* On PC, the monitor and fixed remote share the width without overlapping. */
@media (min-width:768px) {
:root:not(.motv-phone) .source-screen {max-width:none;--console-width:clamp(320px,24vw,360px)}
:root:not(.motv-phone) .source-screen>.topbar {width:min(720px,100%);align-self:center;padding:18px 20px 14px;min-height:84px}
:root:not(.motv-phone) .source-screen>.topbar .location-add-tv {width:50px;height:50px;border:1px solid var(--line);border-radius:14px;background:var(--card-2);display:grid;place-items:center}
:root:not(.motv-phone) .source-screen>.content {position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:safe center;padding:0 20px 12px;overflow-x:hidden;overflow-y:auto}
:root:not(.motv-phone) .source-screen>.content>.source-stage,
:root:not(.motv-phone) .source-screen:has([data-control-panel]:not([hidden])) .source-stage {position:relative;flex:none;display:grid;grid-template-columns:var(--source-width,minmax(0,1fr)) var(--console-width-rendered,var(--console-width));align-items:center;gap:var(--console-gap,12px);margin-left:var(--source-left,0px);width:calc(var(--source-width,100%) + var(--console-width-rendered,0px) + var(--console-gap,0px));height:var(--source-height,100%);min-height:var(--console-height,0px);background:transparent;border-radius:20px;overflow:visible;padding:0}
:root:not(.motv-phone) .source-screen .source-monitor,
:root:not(.motv-phone) .source-screen:has([data-control-panel]:not([hidden])) .source-monitor {position:relative!important;inset:auto;width:100%;height:var(--source-height,100%);transform:none;max-height:none;min-height:0!important;aspect-ratio:auto!important;margin:0!important;border-radius:20px!important;overflow:hidden;background:#000!important}
:root:not(.motv-phone) .source-screen .source-monitor>div:has(+.playlist-preview-controls) {height:calc(100% - 44px);aspect-ratio:auto!important}
:root:not(.motv-phone) .source-screen .playlist-preview-controls {position:absolute!important;bottom:0;left:0;padding-right:12px}
:root:not(.motv-phone) .source-console-dock {position:relative;z-index:4;width:var(--console-width-rendered,var(--console-width));min-width:0;max-height:none;display:flex;flex-direction:column;pointer-events:none}
:root:not(.motv-phone) .source-console {position:relative;box-sizing:border-box;width:var(--console-width);zoom:var(--console-scale,1);min-height:0;display:flex;flex-direction:column;overflow:visible;border:1px solid #ffffff12;border-radius:14px;background:rgba(var(--bg-rgb),.85);box-shadow:0 12px 40px #0004;backdrop-filter:blur(14px);pointer-events:auto}
:root:not(.motv-phone) .source-console>.source-control-panel {order:1;flex:none;padding:20px 18px 16px;margin:0;border-top:1px solid var(--line);border-bottom:0;background:transparent}
:root:not(.motv-phone) .source-console>.source-selector-row {flex:none;margin:0!important;padding:12px 14px;gap:8px}
:root:not(.motv-phone) .source-console .source-selector-row select {padding:10px!important;background:rgba(var(--bg-rgb),.7)!important;border-color:var(--line)!important;min-height:44px}
:root:not(.motv-phone) .source-console .source-selector-row select:focus-visible {outline:2px solid var(--accent);outline-offset:2px}
:root:not(.motv-phone) .source-console .source-tools {display:flex;align-items:center;gap:6px}
:root:not(.motv-phone) .source-console .source-control-toggle {min-height:44px;padding:7px 10px;font-size:10px}
:root:not(.motv-phone) .source-console>[data-source-tvs] {flex:none;min-height:0;overflow:visible;padding:0 14px 14px;scrollbar-width:thin}
:root:not(.motv-phone) .source-console .source-tvs-heading>.eyebrow {font-size:10px}
:root:not(.motv-phone) .source-console .tv-compact-grid {margin:0!important;gap:7px!important}
:root:not(.motv-phone) .source-console .tv-compact-card {min-height:56px;background:rgba(var(--bg-rgb),.35);border-radius:8px}
:root:not(.motv-phone) .source-console .tv-placeholder {opacity:.45}
:root:not(.motv-phone) .source-console .source-presets button {min-height:38px;padding:4px 2px;background:#ffffff08;border-color:#ffffff12;border-radius:10px}
:root:not(.motv-phone) .source-console .source-presets span {font-size:8px}
:root:not(.motv-phone) .source-console .source-presets strong {font-size:13px}
:root:not(.motv-phone) .source-console .source-control-result {line-height:1.5;margin:0 0 8px}
:root:not(.motv-phone) .source-screen>.tabbar {width:min(720px,100%);align-self:center;background:transparent;padding-top:10px;padding-bottom:max(12px,env(safe-area-inset-bottom));border-top:0}
:root:not(.motv-phone) .source-screen .network-statistics {position:absolute;top:12px;left:34px;max-width:calc(100% - var(--console-width) - 80px);max-height:60%;overflow:auto;z-index:5;background:var(--card);box-shadow:0 8px 30px #0004}
}
@media (min-width:768px) and (max-height:740px) {
:root:not(.motv-phone) .source-screen>.topbar {min-height:64px;padding-block:8px}
:root:not(.motv-phone) .source-screen>.topbar .location-add-tv {width:44px;height:44px}
:root:not(.motv-phone) .source-console-dock {max-height:none}
:root:not(.motv-phone) .source-console>.source-control-panel {padding:12px 18px}
:root:not(.motv-phone) .source-console .google-remote:not(.ptz-remote) .compact-rockers .remote-rocker {height:116px}
:root:not(.motv-phone) .source-console .source-presets button {min-height:34px}
}

/* Expand the existing monitor, so its live stream keeps playing uninterrupted. */
.source-fullscreen-toggle{display:none}
@media(min-width:768px){
:root:not(.motv-phone) .source-fullscreen-toggle{position:absolute;top:12px;left:12px;z-index:6;display:grid;place-items:center;width:40px;height:40px;padding:9px;border:1px solid #ffffff24;border-radius:9px;background:#11161bcc;color:#fff;cursor:pointer;touch-action:manipulation}
:root:not(.motv-phone) .source-fullscreen-toggle:hover{background:#28313bea}
:root:not(.motv-phone) .source-fullscreen-toggle:focus-visible{outline:2px solid #78a8ff;outline-offset:3px}
:root:not(.motv-phone) .source-fullscreen-toggle svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
}
.source-fullscreen-toggle .fullscreen-collapse{display:none}
.source-monitor:fullscreen .source-fullscreen-toggle{display:grid}
.source-monitor:fullscreen .fullscreen-expand{display:none}
.source-monitor:fullscreen .fullscreen-collapse{display:block}
.source-screen .source-stage>.source-monitor:fullscreen{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;min-height:0!important;transform:none!important;margin:0!important;border-radius:0!important;aspect-ratio:auto!important;display:block!important;background:#000!important}
.source-monitor:fullscreen::backdrop{background:#000}
.source-screen .source-monitor:fullscreen>div:has(+.playlist-preview-controls){height:calc(100% - 44px);aspect-ratio:auto!important}
.source-screen .source-monitor:fullscreen .playlist-preview-controls{padding:0 12px!important}

/* The page owns scrolling; neither receiver nor PTZ panels create a nested scroller. */
.source-screen .source-console,.source-screen .source-console-dock,.source-screen .source-control-panel,.source-screen .directv-layout{overflow:visible!important;max-height:none!important;flex-shrink:0}

/* Make room for the receiver's second LCD row without shrinking touch targets. */
.source-screen:has(.directv-remote:not([hidden]))>.topbar{padding-top:6px;padding-bottom:6px;min-height:64px}
.source-screen:has(.directv-remote:not([hidden]))>.tabbar{padding-top:5px;padding-bottom:calc(9px + env(safe-area-inset-bottom))}
.source-screen:has(.directv-remote:not([hidden]))>.content{padding-top:0;padding-bottom:2px}
.source-screen .source-console>.directv-remote{padding-top:10px;padding-bottom:6px}
.source-screen .directv-remote .source-control-result:empty{display:none}

/* Keep the controls and the mode dock in the viewport, even on short screens. */
.source-screen>.content:has(>.source-mobile-fit){overflow:hidden!important;scrollbar-gutter:auto}
.source-mobile-fit{box-sizing:border-box;flex:none;width:var(--source-mobile-width,100%);zoom:var(--source-mobile-scale,1);margin-inline:auto}
.source-mobile-fit>.source-control-panel>.compact-google-layout{margin-block:0}
.source-mobile-fit>.ptz-remote>.compact-google-layout{padding-top:22px}
@media(min-width:768px){
:root:not(.motv-phone) .source-screen>.content:has(>.source-stage){overflow:hidden!important;scrollbar-gutter:auto}
}

/* Center the no-camera message across the available content canvas. */
.cameras-screen>.content>.empty-state{width:100%;max-width:720px;box-sizing:border-box;margin-inline:auto;align-self:center;text-align:center}
.cameras-screen>.content:has(>.empty-state:only-child){display:flex;flex-direction:column;justify-content:center}
