/* Unified supervision: fleet, persistent castings, grouped controls. */
:root{--bg:#f6f5ef;--paper:#fffefa;--ink:#253c37;--muted:#738174;--line:#dedfd4;--green:#315d4b;--soft:#e8efdf;font-family:'Segoe UI',sans-serif;font-size:13px}
.header{height:76px;padding:0 25px}.brand-word{font-size:22px}.workspace{max-width:none;margin:0;padding:0;display:grid;grid-template-columns:248px minmax(360px,1fr) 310px;gap:0;align-items:stretch;min-height:calc(100vh - 76px)}
.fleet-pane,.action-pane{border:0;border-radius:0;overflow:visible}.fleet-pane{background:#eeefe7;border-right:1px solid var(--line);padding:22px 14px}.fleet-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.fleet-heading button{font-size:10px;padding:5px}.fleet-tools{padding:12px 0;flex-wrap:wrap}.fleet-tools input{width:100%}.fleet-tools button{padding:7px}.chips{gap:4px;max-height:150px;overflow:auto}.chips button{font-size:10px;padding:5px 8px;border-radius:5px}.selection-bar{padding:8px 0;font-size:11px}#group-info{font-size:9px;margin:9px 0 0}.table-scroll{overflow:visible}.fleet-pane table{display:block}.fleet-pane thead{display:block}.fleet-pane thead tr{display:flex;align-items:center}.fleet-pane thead th{background:none;border:0;padding:5px 3px}.fleet-pane thead th:nth-child(n+3){display:none}.fleet-pane tbody{display:block}.fleet-pane tbody tr{display:grid;grid-template-columns:23px minmax(0,1fr) 38px;align-items:center;gap:0 5px;padding:11px 7px;margin:5px 0;border:1px solid transparent;border-radius:7px}.fleet-pane tbody tr.selected{background:var(--paper);border-color:#cbd7bf}.fleet-pane td{border:0;padding:0;min-width:0}.fleet-pane td:first-child{padding:0;width:auto;grid-row:1/3}.fleet-pane td:nth-child(2){grid-column:2;grid-row:1}.fleet-pane td:nth-child(3){grid-column:2;grid-row:2;margin-top:4px;white-space:normal;font-size:9px}.fleet-pane td:nth-child(4){grid-column:3;grid-row:1/3;font-size:10px;color:var(--muted);text-align:right}.device-name{font-size:11px;overflow-wrap:anywhere}.device-sub{font-size:9px;max-width:165px;margin-top:3px;white-space:normal}#fleet-notice{padding:12px 0;font-size:10px}
.casting-pane{min-width:0;padding:27px 22px}.heading{margin-bottom:21px;gap:10px}h1{font-family:'Trebuchet MS',sans-serif;font-size:29px;font-weight:500}.heading .muted{margin:9px 0 0;font-size:11px}.metrics{gap:7px}.metrics strong{font-size:25px;font-weight:500}.metrics span{font-size:10px}.action-content{padding:0}#action-casting{padding:0}.cast-toolbar{gap:5px}.cast-toolbar button{font-size:10px;padding:8px}.hint{font-size:11px}.empty{margin-top:20px}.action-pane{padding:25px 18px;background:var(--paper);border-left:1px solid var(--line)}.action-pane>h2{font-size:18px;margin-bottom:17px}.panel-heading{background:#edf1e5;border:1px solid #dae2ce;border-radius:7px;padding:13px;display:block;margin-bottom:4px}.panel-heading h3{font-size:13px;overflow-wrap:anywhere;margin-bottom:4px}.panel-heading .eyebrow{font-size:9px}.panel-heading .muted{font-size:10px}.action-pane .action-content{padding:18px 0;border-bottom:1px solid var(--line)}.action-content h3{font-size:13px;margin-bottom:10px}.action-pane button{font-size:11px;padding:8px 10px}.action-pane label{font-size:11px;margin:8px 0}.action-pane textarea{min-height:72px;font-size:12px;padding:10px;line-height:1.5}.form-meta{font-size:9px;margin:6px 0 10px;gap:5px}#action-message .eyebrow,#message-preview{display:none}#send-message,#launch-app,#apply-volume,.home-group{width:100%}.action-pane .form-row{gap:6px;margin:0 0 10px}.action-pane .muted{font-size:10px}.action-pane select{font-size:11px;padding:8px;margin-bottom:9px}.action-pane input[type=range]{margin:12px 0}.action-pane p{font-size:11px;line-height:1.6}.action-pane #action-voice{border:0}.action-pane #voice-start{background:#d9e997;border-color:#c4d780;color:#304835}.action-pane #voice-target{font-size:10px}.action-pane #voice-status{font-size:10px;overflow-wrap:anywhere}.home-group{margin-top:7px}.activity-heading{border-top:1px solid var(--line);padding-top:18px;margin-top:18px}#results{margin:0;max-height:210px}.result{font-size:11px;background:#eeefe7}
.grid-stack-item-content{background:#283c34;container-type:inline-size}.cast-head{min-height:53px;flex-wrap:wrap;gap:4px;padding:8px;background:var(--paper)}.cast-name{min-width:70px;font-size:11px;flex:1}.cast-head>button{font-size:9px;padding:3px}.tile-actions{display:flex;gap:1px;margin-left:auto}.cast-head .tile-action{border:0;width:25px;height:27px;padding:4px;display:grid;place-items:center}.tile-action svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.tile-action.active{background:#e3ecd8}.tile-action.live{background:#eed2bf;color:#714323}.cast-foot{background:var(--paper);flex-wrap:wrap}.cast-placeholder{font-size:11px}.cast-head:focus-visible{outline:3px solid #8fbb9d;outline-offset:-3px}.tile-drawer{background:#f1f5e9;color:var(--ink);border-block:1px solid #d3dfc8;position:absolute;top:54px;left:0;right:0;z-index:5;max-height:calc(100% - 90px);overflow:auto;padding:11px;box-shadow:0 5px 12px #14261a30}.tile-drawer[hidden]{display:none}.drawer-heading{display:flex;align-items:center;gap:8px;justify-content:space-between;margin-bottom:8px;font-size:11px}.drawer-heading strong{overflow-wrap:anywhere}.drawer-close{padding:0 6px;font-size:20px;border:0;background:transparent}.tile-drawer button{font-size:10px;padding:7px 9px}.tile-drawer textarea{font-size:12px;min-height:64px;padding:9px;line-height:1.4;margin-bottom:6px}.tile-drawer input[type=range]{margin:12px 0}.tile-drawer output{font-size:11px;display:block}.tile-drawer .hint{font-size:10px;margin:7px 0}.tile-drawer .primary{margin:3px 4px 3px 0}.individual-result{font-size:10px;margin:8px 0 0;overflow-wrap:anywhere}.individual-result.ok{color:var(--green)}.individual-result.error{color:var(--danger)}.tile-drawer [hidden]{display:none!important}
.app-dropdown{margin:8px 0}.app-picker{width:100%;display:flex;align-items:center;gap:7px;text-align:left}.app-picker::after{content:'▾';margin-left:auto}.app-menu{background:white;border:1px solid var(--line);border-radius:6px;padding:7px;margin-top:5px}.app-search{width:100%;font-size:11px!important;padding:8px!important}.app-options{max-height:180px;overflow:auto}.app-menu .app-option{font-size:11px;gap:7px;padding:6px}.app-icon{width:30px;height:30px;flex-basis:30px;border-radius:5px}.app-option small{font-size:9px}#app-picker{min-height:45px;gap:7px;font-size:11px}#app-search{font-size:11px;padding:8px}#app-options{max-height:230px}#app-options .app-option{font-size:11px;padding:6px;gap:7px}#app-menu{padding:6px}.app-option>span:last-child{min-width:0;overflow-wrap:anywhere}
@container(max-width:360px){.cast-name{flex-basis:100%;}.tile-actions{margin-left:0;flex:1}.tile-drawer{top:78px;max-height:calc(100% - 115px)}}
@media(min-width:1700px){.workspace{grid-template-columns:270px minmax(360px,1fr) 330px}.casting-pane{padding:30px}}
@media(max-width:1150px){.workspace{grid-template-columns:210px minmax(300px,1fr) 265px;gap:0}.casting-pane{padding:22px 12px}.action-pane{padding:24px 12px}.fleet-pane{padding:20px 10px}.header{gap:14px}.heading h1{font-size:24px}.org{display:none}.cast-toolbar .toolbar-space{display:none}}
@media(max-width:950px){.workspace{grid-template-columns:200px minmax(0,1fr)}.fleet-pane{grid-row:1/3}.action-pane{grid-column:2;display:grid;grid-template-columns:1fr 1fr;gap:0 20px;border-top:1px solid var(--line)}.action-pane>h2,.panel-heading,.home-group,.action-pane>.hint{grid-column:1/-1}.casting-pane{padding:22px 15px}.cast-head{flex-wrap:wrap}}
@media(max-width:600px){.workspace{display:block}.fleet-pane{margin-bottom:0;padding:15px;border-bottom:1px solid var(--line)}.fleet-pane .table-scroll{max-height:220px;overflow:auto}.fleet-pane tbody tr{margin:0;padding:8px}.fleet-pane .chips{max-height:85px}.fleet-tools{flex-wrap:nowrap}.fleet-tools input{width:auto}.action-pane{display:block;border-left:0;padding:20px}.casting-pane{padding:20px 10px}.header{padding:12px;gap:8px;height:auto}.header .org{display:none}.header .hms-link{font-size:11px;padding-left:6px}.header .brand-word{font-size:20px}.heading .muted{max-width:220px}.tile-drawer{max-height:calc(100% - 90px)}.cast-name{min-width:55px}.cast-head button{font-size:9px}.cast-toolbar button{padding:7px}.metrics{white-space:nowrap}.action-pane .action-content{padding:18px 0}}

/* Keep the primary controls together at common laptop heights. */
.action-pane .action-content{padding:12px 0}.action-pane .hint{font-size:10px;margin:7px 0}.action-pane p{font-size:10px}.action-pane #action-message> .hint{margin-bottom:0}.action-pane .action-content h3{margin-bottom:7px}.action-pane .form-row{margin-bottom:7px}.action-pane #action-apps label,.action-pane #action-message label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.action-pane #app-dropdown{margin:7px 0}.action-pane #voice-target{margin:5px 0}.action-pane #action-voice>p:first-of-type{margin-bottom:7px}.action-pane #volume-status:empty{display:none}.action-pane #read-volume{margin-bottom:7px}.action-pane #voice-status{margin-bottom:0}

/* Both the heading and the video surface are drag handles. */
.cast-grip{color:#7c917d;flex:0 0 15px;font-size:19px;cursor:grab;user-select:none}.cast-head,.cast-stage{touch-action:none;user-select:none}.cast-stage{cursor:grab}.cast-stage:active{cursor:grabbing}.cast-stage video{pointer-events:none}.grid-stack-item-content:fullscreen{width:100vw!important;height:100vh!important;inset:0!important;border-radius:0}.grid-stack-item-content:fullscreen .cast-head,.grid-stack-item-content:fullscreen .cast-stage{cursor:default}.grid-stack-item-content:fullscreen .cast-grip{visibility:hidden}

/* Continuous resize targets on all four edges, above the video drag surface. */
.grid-stack-item>.ui-resizable-handle{z-index:20;touch-action:none}.grid-stack-item>.ui-resizable-e,.grid-stack-item>.ui-resizable-w{width:12px!important;top:18px!important;height:calc(100% - 36px)!important;background:transparent}.grid-stack-item>.ui-resizable-e{right:0!important;cursor:ew-resize}.grid-stack-item>.ui-resizable-w{left:0!important;cursor:ew-resize}.grid-stack-item>.ui-resizable-n,.grid-stack-item>.ui-resizable-s{height:12px!important;left:18px!important;width:calc(100% - 36px)!important;background:transparent}.grid-stack-item>.ui-resizable-n{top:0!important;cursor:ns-resize}.grid-stack-item>.ui-resizable-s{bottom:0!important;cursor:ns-resize}.grid-stack-item>.ui-resizable-e:hover,.grid-stack-item>.ui-resizable-w:hover{background:linear-gradient(90deg,transparent 4px,#8da77c 4px,#8da77c 7px,transparent 7px)}.grid-stack-item>.ui-resizable-n:hover,.grid-stack-item>.ui-resizable-s:hover{background:linear-gradient(transparent 4px,#8da77c 4px,#8da77c 7px,transparent 7px)}.grid-stack-item.ui-resizable-resizing .grid-stack-item-content{border-color:#315d4b;box-shadow:0 0 0 1px #315d4b}.grid-stack-item.ui-resizable-resizing video{pointer-events:none}

/* Per-player commands live below the video. */
.cast-head{min-height:42px;flex-wrap:nowrap}.cast-head .cast-name{flex:1;min-width:0}.cast-head>button{white-space:nowrap;font-size:10px;padding:5px 8px}.cast-foot{min-height:44px;gap:4px;flex-wrap:wrap}.cast-foot .tile-actions{margin-left:auto;gap:2px}.cast-foot .tile-action,.cast-foot .camera-toggle,.cast-foot .listen-toggle{width:28px;height:28px;padding:5px;display:grid;place-items:center;border:0;background:transparent}.cast-foot svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.cast-foot button.active{background:#dce9ce;color:#244d35}.cast-foot .live-status{flex:1;min-width:50px}.cast-foot button[hidden]{display:none!important}.tile-drawer{top:auto!important;bottom:44px;max-height:calc(100% - 90px)!important;box-shadow:0 -4px 12px #14261a25}.cast-foot .tile-action.live{background:#eed2bf;color:#714323}@container(max-width:300px){.cast-foot .live-status{flex-basis:100%}.cast-foot .tile-actions{margin-left:0;flex:1}.tile-drawer{bottom:67px}}

.tile-drawer .listen-toggle{width:28px;height:28px;padding:5px}.tile-drawer .listen-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* Expanded controls occupy their own space below the casting. */
.grid-stack-item-content>.tile-drawer{position:relative!important;inset:auto!important;flex:0 0 auto;max-height:none!important;width:100%;border-radius:0;border-top:1px solid var(--line);box-shadow:none;overflow:visible}.grid-stack-item-content>.tile-drawer[hidden]{display:none}.cast-stage{min-height:70px}

.cast-audio-row{display:grid;grid-template-columns:1fr auto;gap:6px;padding-top:12px;border-top:1px solid var(--line);margin-top:12px}.cast-audio-row input[type=range]{grid-column:1/-1;margin:8px 0}.cast-audio-row .hint{grid-column:1/-1;margin:0}

/* Live health and actionable fleet alerts. */
.fleet-alerts{display:flex;align-items:flex-start;gap:10px;border:1px solid var(--line);border-radius:8px;padding:9px 11px;margin:-8px 0 14px;background:#f8faf5}.fleet-alerts>strong{font-size:10px;white-space:nowrap;padding-top:5px}.fleet-alerts.clear>strong{color:var(--green)}#alert-list{display:flex;flex-wrap:wrap;gap:5px}.alert-chip{font-size:9px;padding:4px 7px;border-radius:12px}.alert-chip.warning{color:#77500a;background:#fff4d4;border-color:#e2ca83}.alert-chip.critical{color:#8f2e2b;background:#fbe8e5;border-color:#e3aaa4}.cast-health{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1px;background:#d8ded8;border-top:1px solid #d8ded8}.cast-health>span{min-width:0;background:#f7f9f4;padding:6px 7px}.cast-health small,.cast-health strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cast-health small{font-size:8px;text-transform:uppercase;letter-spacing:.35px;color:var(--muted);margin-bottom:2px}.cast-health strong{font-size:9px;font-weight:600}.grid-stack-item.has-alert .grid-stack-item-content{border-color:#c56b61;box-shadow:0 0 0 1px #c56b61}
@container(max-width:520px){.cast-health{grid-template-columns:repeat(3,minmax(0,1fr))}.cast-health>span:nth-child(n+4){display:none}}
@media(max-width:600px){.fleet-alerts{display:block}.fleet-alerts>strong{display:block;margin-bottom:6px}.cast-health{grid-template-columns:repeat(2,minmax(0,1fr))}.cast-health>span:nth-child(n+3){display:none}}

/* Horizon exposes 16 system-volume positions (0 through 15) on the test Quest. */
.headset-volume,#volume{height:20px;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(6.666% - 1px),#87968b calc(6.666% - 1px),#87968b 6.666%);background-position:center;background-size:calc(100% - 16px) 7px;background-repeat:no-repeat}

/* XR Agent section: the headset's observatory, embedded (live data, sessions, recording). */
.xragent-section h3{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.xragent-section h3 a{font-size:12px;font-weight:400}
#xragent-frame{display:block;width:100%;height:78vh;min-height:520px;border:1px solid var(--line,#dce3da);border-radius:6px;background:#f0f2ed}
#tab-xragent.live svg{stroke:#c0392b}
@media(min-width:1200px){.workspace.xr-wide{grid-template-columns:210px minmax(300px,1fr) min(640px,45vw)}}
.xragent-picker{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
.xragent-picker .xragent-chip.selected{background:#ddebd9;border-color:#19775f}
.tile-xragent{display:block;width:100%;height:560px;border:1px solid var(--line,#dce3da);border-radius:6px;background:#f0f2ed}
.tile-action.live svg{stroke:#c0392b}
/* XR Agent available: a compatible app runs on the headset right now. */
#tab-xragent,.tile-action[data-command=xragent],.xragent-chip{position:relative}
#tab-xragent.available::after,.tile-action[data-command=xragent].available::after,.xragent-chip.available::after{content:"";position:absolute;top:3px;right:3px;width:8px;height:8px;border-radius:50%;background:#2fa36b;box-shadow:0 0 0 2px #fff;animation:xr-pulse 2s ease-out 3}
@keyframes xr-pulse{0%{box-shadow:0 0 0 2px #fff,0 0 0 2px rgba(47,163,107,.6)}100%{box-shadow:0 0 0 2px #fff,0 0 0 9px rgba(47,163,107,0)}}
