:root {
  /* DaVinci Resolve cool blue-grey + Grok accent (grok-public-folder GrokTheme) */
  --booth-bg: #0d0f12;
  --booth-window: #1b1d20;
  --booth-header: #17191c;
  --booth-panel: rgba(25, 27, 32, 0.94);
  --booth-row: #2d2f33;
  --booth-row-hover: #35373b;
  --booth-line: #3c3e43;
  --booth-border: #4a4d53;
  --booth-field: #15171a;
  --booth-ink: #e8eaed;
  --booth-mute: #8a8e94;
  --booth-label: #aeb2b8;
  --booth-accent: #f98b14;
  --booth-accent-dim: rgba(249, 139, 20, 0.28);
  --booth-accent-text: #0f1114;
  --booth-chrome-h: 6.75rem;
  --booth-footer-h: 2.65rem;
  /* Side columns as control handlers; center stage fills between them */
  --booth-left-w: min(15.5rem, 34vw);
  --booth-right-w: min(17.5rem, 44vw);
  font-family:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--booth-bg);
  color: var(--booth-ink);
}

.booth {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
}

.booth-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

/* —— Center stage: full QBPM ecosystem between side handlers —— */
.booth-center-stage {
  position: fixed;
  z-index: 12;
  top: var(--booth-chrome-h);
  bottom: var(--booth-footer-h);
  left: var(--booth-left-w);
  right: var(--booth-right-w);
  display: flex;
  flex-direction: column;
  background: var(--booth-window);
  border-left: 1px solid var(--booth-line);
  border-right: 1px solid var(--booth-line);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  pointer-events: auto;
}
.booth-center-stage[hidden] {
  display: none !important;
}
.booth.booth--hide-left .booth-center-stage {
  left: 0;
  border-left: none;
}
.booth.booth--hide-right .booth-center-stage {
  right: 0;
  border-right: none;
}
/* When QBPM center is open, hide cloud canvas entirely (free GPU/compositor) */
.booth.booth--qbpm-center .booth-canvas {
  visibility: hidden;
  pointer-events: none;
}
.booth.booth--qbpm-center .booth-float-player {
  z-index: 26;
}
.booth.booth--qbpm-center .booth-hud {
  left: calc(var(--booth-left-w) + 0.65rem);
  opacity: 0.85;
}
.booth.booth--hide-left.booth--qbpm-center .booth-hud {
  left: 0.85rem;
}

.booth-center-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  padding: 0.28rem 0.45rem;
  background: linear-gradient(180deg, #1a1c20 0%, var(--booth-header) 100%);
  border-bottom: 1px solid var(--booth-line);
  user-select: none;
}
.booth-center-badge {
  font-size: 0.55rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  padding: 0.14rem 0.4rem;
  border-radius: 3px;
  background: var(--booth-accent);
  color: #0a0a0c;
}
.booth-center-title {
  flex: 1;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--booth-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.booth-center-status {
  max-width: 28vw;
  font-size: 0.58rem;
  color: var(--booth-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.booth-center-status.is-err {
  color: #fca5a5;
}
.booth-center-bar .booth-btn {
  font-size: 0.6rem;
  padding: 0.18rem 0.4rem;
}
.booth-center-bar .booth-btn.is-on,
.booth-center-bar .booth-btn.booth-btn--on {
  border-color: rgba(249, 139, 20, 0.65);
  background: rgba(249, 139, 20, 0.18);
}
.booth-center-frame {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #0a0b0d;
  display: block;
}

@media (max-width: 900px) {
  .booth-center-stage {
    left: 0;
    right: 0;
  }
}

.booth-video {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Floating staged-feed player over canvas */
.booth-float-player {
  position: fixed;
  z-index: 25;
  left: 50%;
  top: calc(var(--booth-chrome-h) + 1.25rem);
  transform: translateX(-50%);
  width: min(48vw, 640px);
  max-width: calc(100vw - 2rem);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--booth-border);
  background: var(--booth-window);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 16px 48px rgba(0, 0, 0, 0.55),
    0 0 32px rgba(249, 139, 20, 0.12);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
}
.booth-float-player[hidden] {
  display: none !important;
}
.booth-float-player.booth-float-player--compact {
  width: min(36vw, 420px);
  opacity: 0.92;
}

.booth-float-titlebar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.4rem 0.35rem 0.55rem;
  background: var(--booth-header);
  border-bottom: 1px solid var(--booth-line);
  cursor: grab;
  user-select: none;
}
.booth-float-titlebar:active {
  cursor: grabbing;
}
.booth-float-badge {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.12rem 0.35rem;
  border-radius: 3px;
  background: var(--booth-accent);
  color: #0a0a0c;
}
.booth-float-title {
  flex: 1;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--booth-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.booth-float-hide {
  appearance: none;
  border: 1px solid var(--booth-line);
  background: var(--booth-row);
  color: var(--booth-ink);
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 3px;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.booth-float-hide:hover {
  background: rgba(248, 113, 113, 0.25);
  border-color: #f87171;
  color: #fecaca;
}

.booth-float-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #000;
  min-height: 8rem;
}
.booth-float-video-wrap video,
.booth-float-video-slot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.booth-float-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
  background: #121418;
  border-top: 1px solid var(--booth-line);
}
.booth-float-controls .booth-btn {
  font-size: 0.68rem;
  padding: 0.28rem 0.55rem;
  min-width: 3.1rem;
}
.booth-float-time {
  margin-left: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.62rem;
  color: var(--booth-mute);
}

/* Chrome icon buttons — column / float visibility */
.booth-chrome-iconbtn {
  appearance: none;
  border: 1px solid var(--booth-line);
  background: var(--booth-row);
  color: var(--booth-mute);
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 3px;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.booth-chrome-iconbtn:hover {
  color: var(--booth-ink);
  border-color: var(--booth-border);
}
.booth-chrome-iconbtn.is-on {
  color: var(--booth-accent);
  border-color: var(--booth-accent-dim);
  background: rgba(249, 139, 20, 0.12);
}
.booth-chrome-iconbtn[hidden] {
  display: none !important;
}

/* Full-canvas mode — side columns collapsed */
.booth.booth--hide-left .booth-feeds {
  display: none !important;
}
.booth.booth--hide-right .booth-panel {
  display: none !important;
}
.booth.booth--hide-left .booth-canvas,
.booth.booth--hide-right .booth-canvas {
  /* canvas already full viewport; columns just stop covering */
}

@media (max-width: 900px) {
  .booth-float-player {
    width: min(92vw, 520px);
    top: calc(var(--booth-chrome-h) + 0.5rem);
  }
}

/* —— Resolve / Grokpool chrome (full-width top menubar) —— */
.booth-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: var(--booth-header);
  border-bottom: 1px solid var(--booth-border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

.booth-chrome-header {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 52px;
  background: var(--booth-header);
  border-bottom: 1px solid var(--booth-line);
}

.booth-chrome-accent {
  width: 3px;
  flex: 0 0 3px;
  background: var(--booth-accent);
}

.booth-chrome-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 0.55rem 0.85rem 0.5rem 0.75rem;
  min-width: 12rem;
}

.booth-chrome-title {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  color: var(--booth-ink);
  line-height: 1.1;
}

.booth-chrome-sub {
  font-size: 0.65rem;
  color: var(--booth-mute);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 28vw;
}

.booth-chrome-monitor {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.75rem;
  padding: 0.4rem 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--booth-label);
}

.booth-mon {
  color: var(--booth-mute);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.booth-mon--status {
  max-width: min(42vw, 28rem);
  color: var(--booth-ink);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.booth-status--err {
  color: #f87171 !important;
}

/* Horizontal page menubar — Resolve workspace tabs */
.booth-menubar {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 2px;
  padding: 0 0.5rem;
  background: #121418;
  border-bottom: 1px solid var(--booth-line);
  overflow-x: auto;
  scrollbar-width: none;
}
.booth-menubar::-webkit-scrollbar {
  display: none;
}

.booth-menutab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--booth-mute);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.55rem 0.85rem 0.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition:
    color 0.12s ease,
    background 0.12s ease,
    border-color 0.12s ease;
}
.booth-menutab:hover {
  color: var(--booth-ink);
  background: rgba(255, 255, 255, 0.03);
}
.booth-menutab.is-active {
  color: var(--booth-ink);
  border-bottom-color: var(--booth-accent);
  background: rgba(249, 139, 20, 0.06);
}

/* Contextual tool strip under menubar */
.booth-toolbar {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  padding: 0.4rem 0.65rem 0.45rem;
  background: var(--booth-window);
  border-bottom: 1px solid var(--booth-line);
  min-height: 2.4rem;
}
.booth-toolbar.is-active {
  display: flex;
}
.booth-toolbar[hidden] {
  display: none !important;
}

.booth-toolbar-hint {
  margin-left: 0.25rem;
  font-size: 0.62rem;
  color: var(--booth-mute);
  letter-spacing: 0.02em;
}

/* legacy alias — JS still uses .booth-bar for inserts */
.booth-bar {
  /* noop container removed; chrome is .booth-chrome */
}

.booth-btn--accent {
  border-color: var(--booth-accent) !important;
  background: rgba(249, 139, 20, 0.18) !important;
  color: var(--booth-ink) !important;
  font-weight: 650;
}

.booth-tier-bar {
  display: flex;
  gap: 0.3rem;
  margin-right: 0.15rem;
}

.booth-tier-bar .booth-btn {
  min-width: 2.1rem;
  padding: 0.32rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.booth-group-title {
  margin: 0.65rem 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--booth-accent);
}

.booth-group-title:first-of-type {
  margin-top: 0.25rem;
}

/* Nested collapsible groups inside Point cloud & depth / Motion */
.booth-subsec {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  margin: 0.35rem 0;
  overflow: visible;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.booth-subsec[open] {
  border-color: rgba(249, 115, 22, 0.22);
}
.booth-subsec.is-disabled {
  opacity: 0.55;
}
.booth-subsec.is-disabled[open] > .booth-subsec-body {
  opacity: 0.72;
}
.booth-subsec-sum {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.55rem;
  user-select: none;
}
.booth-subsec-sum::-webkit-details-marker {
  display: none;
}
.booth-subsec-sum::before {
  content: "▸";
  color: var(--booth-accent);
  font-size: 0.62rem;
  flex-shrink: 0;
  width: 0.7rem;
}
.booth-subsec[open] > .booth-subsec-sum::before {
  content: "▾";
}
.booth-subsec-title {
  flex: 1;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--booth-mute);
}
.booth-subsec[open] > .booth-subsec-sum .booth-subsec-title {
  color: var(--booth-accent);
}
.booth-subsec-sum:hover .booth-subsec-title {
  color: var(--booth-ink);
}
.booth-subsec-sum .booth-switch {
  flex-shrink: 0;
}
.booth-subsec-body {
  padding: 0.15rem 0.55rem 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.booth-slider--toggle {
  grid-template-columns: 1fr auto;
}
.booth-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  grid-column: 1 / -1;
  cursor: pointer;
  margin: 0;
  font-size: 0.72rem;
  color: var(--booth-mute);
}
.booth-toggle-label {
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}
.booth-slider--toggle output {
  display: none;
}
.booth-spatial-check.booth-toggle-row {
  margin: 0.35rem 0;
  color: var(--booth-ink);
}
#booth-sliders {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
#booth-motion-panel-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

#booth-midi-map {
  font-size: 0.62rem;
  line-height: 1.45;
  color: var(--booth-mute);
}

#booth-midi-map span {
  display: block;
}

.booth-btn {
  appearance: none;
  border: 1px solid var(--booth-line);
  border-radius: 3px;
  padding: 0.32rem 0.65rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--booth-ink);
  background: var(--booth-row);
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease;
}

.booth-btn:hover {
  border-color: var(--booth-border);
  background: var(--booth-row-hover);
}

.booth-btn--on {
  border-color: var(--booth-accent);
  background: var(--booth-accent-dim);
  color: #fff;
}

.booth-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.booth-device-select {
  max-width: 9.5rem;
  min-width: 6.5rem;
  font-size: 0.72rem;
  padding: 0.3rem 0.4rem;
}

/* Primary / secondary camera picks in Cameras panel */
.booth-cam-picks {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.45rem 0 0.55rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--booth-line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}
.booth-cam-pick {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  color: var(--booth-mute);
}
.booth-cam-pick .booth-select {
  max-width: none;
  width: 100%;
  min-width: 0;
}

#booth-combine {
  max-width: 7.5rem;
}

.booth-status {
  margin: 0;
  font-size: 0.72rem;
  color: var(--booth-mute);
  font-variant-numeric: tabular-nums;
}

.booth-status--err {
  color: #f87171;
}

.booth-panel {
  position: fixed;
  right: 0;
  top: var(--booth-chrome-h);
  bottom: 0;
  z-index: 15;
  width: var(--booth-right-w);
  height: calc(100dvh - var(--booth-chrome-h));
  max-height: calc(100dvh - var(--booth-chrome-h));
  padding: 0.55rem 0.65rem 1.25rem;
  /* Explicit scrollport — flex children must not eat this */
  display: block;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  pointer-events: auto;
  background: var(--booth-panel);
  border-left: 1px solid var(--booth-line);
  backdrop-filter: blur(12px);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--booth-accent-dim) transparent;
}
.booth-panel::-webkit-scrollbar {
  width: 8px;
}
.booth-panel::-webkit-scrollbar-thumb {
  background: rgba(249, 115, 22, 0.45);
  border-radius: 999px;
}
.booth-panel::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.booth-panel h2 {
  margin: 0 0 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--booth-mute);
}

.booth-camera-panel {
  margin: 0 0 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--booth-line);
}

.booth-camera-summary {
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--booth-accent);
  list-style: none;
  user-select: none;
}

.booth-camera-summary::-webkit-details-marker {
  display: none;
}

.booth-camera-summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}

.booth-camera-panel[open] .booth-camera-summary::before {
  transform: rotate(90deg);
}

.booth-motion-cat {
  grid-column: 1 / -1;
  margin: 0.45rem 0 0.15rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--booth-mute);
}

.booth-motion-cat:first-child {
  margin-top: 0.35rem;
}

.booth-motion-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
}

.booth-motion-btn {
  appearance: none;
  border: 1px solid var(--booth-line);
  border-radius: 5px;
  padding: 0.28rem 0.35rem;
  font: inherit;
  font-size: 0.62rem;
  line-height: 1.25;
  color: var(--booth-ink);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-align: left;
}

.booth-motion-btn:hover {
  border-color: var(--booth-accent-dim);
  background: rgba(249, 115, 22, 0.1);
}

.booth-motion-btn--on {
  border-color: var(--booth-accent);
  background: var(--booth-accent-dim);
  color: #fff;
}

.booth-motion-btn--soon {
  opacity: 0.55;
  border-style: dashed;
}

.booth-motion-btn--soon::after {
  content: " · soon";
  font-size: 0.55rem;
  color: var(--booth-mute);
}

.booth-motion-desc {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.6rem;
  line-height: 1.4;
  color: var(--booth-mute);
}

.booth-motion-desc a {
  color: var(--booth-accent);
}

.booth-motion-params .booth-slider {
  margin-bottom: 0.4rem;
}

.booth-motion-params .booth-group-title {
  margin-top: 0.45rem;
}

.booth-slider {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.5rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.booth-slider label {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  color: var(--booth-mute);
}

.booth-slider input[type="range"] {
  width: 100%;
  accent-color: var(--booth-accent);
}

.booth-slider output {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  color: var(--booth-ink);
  min-width: 2.5rem;
  text-align: right;
}

.booth-midi {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--booth-line);
}

.booth-midi p {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  color: var(--booth-mute);
  line-height: 1.45;
}

.booth-midi-log {
  margin: 0;
  font-size: 0.65rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #86efac;
  min-height: 1.2em;
}

.booth-hud {
  position: fixed;
  left: 0.85rem;
  bottom: 0.85rem;
  z-index: 10;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  color: var(--booth-mute);
  pointer-events: none;
}

.booth-feeds {
  position: fixed;
  left: 0;
  top: var(--booth-chrome-h);
  bottom: 0;
  z-index: 14;
  width: var(--booth-left-w);
  padding: 0.65rem 0.55rem 1rem;
  overflow-y: auto;
  background: var(--booth-panel);
  border-right: 1px solid var(--booth-line);
  backdrop-filter: blur(12px);
}

/* Left column: Collapse / Expand / Stage (mirrors right panel chrome) */
.booth-feeds-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  position: sticky;
  top: 0;
  z-index: 3;
  margin: -0.15rem -0.1rem 0.45rem;
  padding: 0.4rem 0.3rem 0.5rem;
  background: linear-gradient(180deg, rgba(12, 12, 16, 0.98) 60%, rgba(12, 12, 16, 0.88));
  border-bottom: 1px solid var(--booth-line);
  backdrop-filter: blur(10px);
}
.booth-feeds-toolbar .booth-btn {
  flex: 1;
  justify-content: center;
  min-width: 0;
}
.booth-feeds-toolbar-sep {
  flex: 0 0 1px;
  align-self: stretch;
  width: 1px;
  min-height: 1.1rem;
  margin: 0 0.05rem;
  background: var(--booth-line);
  opacity: 0.85;
}
.booth-feeds-toolbar .booth-btn--seg.booth-btn--on,
.booth-panel-toolbar .booth-btn--seg.booth-btn--on {
  border-color: rgba(249, 139, 20, 0.65);
  background: var(--booth-accent-dim);
  color: var(--booth-ink);
}
.booth-panel-toolbar .booth-feeds-toolbar-sep {
  flex: 0 0 1px;
  align-self: stretch;
  width: 1px;
  min-height: 1.1rem;
  margin: 0 0.05rem;
  background: var(--booth-line);
}
.booth-feeds.booth-feeds--stage .booth-section:not([open]) {
  opacity: 0.42;
  filter: saturate(0.7);
}
.booth-feeds.booth-feeds--stage .booth-section[open] {
  opacity: 1;
  filter: none;
  border-color: rgba(249, 115, 22, 0.4);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.08);
}

.booth-feeds h2 {
  margin: 0 0 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--booth-mute);
}

.booth-feed-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

/* Layer group masters: Hand·person vs Hands·crowd */
.booth-layer-groups {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 0.15rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid rgba(167, 139, 250, 0.32);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.12), rgba(249, 115, 22, 0.06));
}
.booth-layer-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--booth-mute);
  user-select: none;
}
.booth-layer-group.is-on {
  color: var(--booth-ink);
}
.booth-layer-group-name {
  font-weight: 650;
  letter-spacing: 0.03em;
  flex: 1;
}
.booth-layer-group-hint {
  font-size: 0.58rem;
  opacity: 0.72;
}
.booth-layer-groups-hint {
  margin: 0 0 0.25rem;
  font-size: 0.58rem;
  color: var(--booth-mute);
  line-height: 1.35;
}
.booth-feed--edge {
  border-color: rgba(167, 139, 250, 0.45);
}
.booth-feed--edge .booth-feed-name {
  color: #c4b5fd;
}

.booth-feed {
  border: 1px solid var(--booth-line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.booth-feed--active {
  border-color: var(--booth-accent);
  box-shadow: 0 0 0 1px var(--booth-accent-dim);
}

.booth-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.3rem 0.4rem;
  font-size: 0.62rem;
  color: var(--booth-mute);
  border-bottom: 1px solid var(--booth-line);
}

.booth-feed-head label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  user-select: none;
}

.booth-feed-head input[type="checkbox"] {
  accent-color: var(--booth-accent);
}

.booth-feed canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}

.booth-feed-stat {
  font-variant-numeric: tabular-nums;
  color: var(--booth-ink);
}

.booth-tools {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--booth-line);
}

.booth-tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.booth-tool {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.35rem 0.5rem;
  align-items: center;
  font-size: 0.68rem;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--booth-line);
}

.booth-tool-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #52525b;
}

.booth-tool-dot--on {
  background: #86efac;
  box-shadow: 0 0 6px rgba(134, 239, 172, 0.55);
}

.booth-tool-dot--warn {
  background: #fbbf24;
}

.booth-tool-name {
  color: var(--booth-ink);
  font-weight: 600;
}

.booth-tool-detail {
  grid-column: 2 / -1;
  color: var(--booth-mute);
  font-size: 0.62rem;
  line-height: 1.35;
}

.booth-select {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0.15rem;
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--booth-line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--booth-ink);
  font: inherit;
  font-size: 0.72rem;
}

@media (max-width: 900px) {
  .booth-feeds {
    display: none;
  }
}

@media (max-width: 720px) {
  .booth-chrome-sub {
    max-width: 40vw;
  }
  .booth-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 42vh;
    max-height: 42vh;
    border-left: none;
    border-top: 1px solid var(--booth-line);
  }
}
/* —— Live video feeds (blank / qbpm rail) —— */
.booth-live-panel {
  margin-top: 0.65rem;
  border-top: 1px solid var(--booth-line);
  padding-top: 0.45rem;
}
.booth-live-summary {
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--booth-mute);
  list-style: none;
}
.booth-live-summary::-webkit-details-marker { display: none; }
.booth-live-host { margin-top: 0.4rem; }

.lvr-hd {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.lvr-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--booth-mute);
}
.lvr-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: var(--booth-accent-dim);
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.lvr-hd .booth-btn { margin-left: auto; padding: 0.2rem 0.45rem; font-size: 0.68rem; }

.lvr-paste-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}
.lvr-paste {
  width: 100%;
  resize: vertical;
  min-height: 2.4rem;
  max-height: 6rem;
  border: 1px solid var(--booth-line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--booth-ink);
  font: inherit;
  font-size: 0.7rem;
  padding: 0.35rem 0.45rem;
}
.lvr-fps-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0 0.45rem;
  flex-wrap: wrap;
}
.lvr-fps-label {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
}
.lvr-fps {
  min-width: 6.5rem;
  font-size: 0.72rem !important;
  padding: 0.2rem 0.35rem !important;
}
.lvr-fps-apply {
  font-size: 0.65rem !important;
}

.lvr-paste:focus {
  outline: none;
  border-color: var(--booth-accent);
}

.lvr-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
  max-height: 5.5rem;
  overflow-y: auto;
}
.lvr-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--booth-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--booth-ink);
  font: inherit;
  font-size: 0.65rem;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
  max-width: 100%;
}
.lvr-tab--on {
  border-color: var(--booth-accent);
  background: var(--booth-accent-dim);
}
.lvr-tab-tag { opacity: 0.7; }
.lvr-tab-x {
  opacity: 0.55;
  padding-left: 0.15rem;
}
.lvr-tab-x:hover { opacity: 1; color: #f87171; }

.lvr-player {
  position: relative;
  min-height: 7rem;
  border: 1px solid var(--booth-line);
  border-radius: 8px;
  background: #050506;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
.lvr-iframe {
  display: block;
  width: 100%;
  height: 9rem;
  border: 0;
  background: #000;
}
.lvr-empty,
.lvr-note,
.lvr-hint {
  margin: 0;
  padding: 0.55rem 0.6rem;
  font-size: 0.68rem;
  color: var(--booth-mute);
  line-height: 1.35;
}
.lvr-note { border-top: 1px solid var(--booth-line); }
.lvr-stage-banner {
  padding: 0.65rem 0.7rem;
  font-size: 0.72rem;
  color: var(--booth-ink);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), transparent);
}
.lvr-stage-banner--idle {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), transparent);
}
.lvr-x-still {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.lvr-x-thumb {
  display: block;
  width: 100%;
  max-height: 9rem;
  object-fit: cover;
  background: #000;
}
.lvr-x-thumb--sm {
  max-height: 3.5rem;
  margin-top: 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--booth-line);
}
.lvr-tab-tag {
  opacity: 0.85;
}

/* —— Live IK + QBPM panel —— */
.booth-ik-stats {
  margin: 0.25rem 0 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  color: var(--booth-ink);
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.14);
  line-height: 1.35;
}

/* —— Hand / spatial resource catalog —— */
.booth-resources {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.booth-resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: min(42vh, 22rem);
  overflow-y: auto;
}
.booth-resource-item {
  padding: 0.4rem 0.45rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--booth-line);
}
.booth-resource-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--booth-ink);
  line-height: 1.25;
}
.booth-resource-tags {
  margin-top: 0.12rem;
  font-size: 0.58rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--booth-mute);
}
.booth-resource-note {
  margin: 0.28rem 0 0.2rem;
  font-size: 0.65rem;
  line-height: 1.35;
  color: var(--booth-label);
}
.booth-resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.booth-resource-link {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--booth-accent-text);
  background: var(--booth-accent-dim);
  border: 1px solid rgba(249, 139, 20, 0.35);
  color: var(--booth-accent);
}
.booth-resource-link:hover {
  background: rgba(249, 139, 20, 0.22);
  border-color: rgba(249, 139, 20, 0.55);
}
.qbpm-panel {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.qbpm-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: flex-end;
}
.qbpm-field {
  flex: 1;
  min-width: 8rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.62rem;
  color: var(--booth-mute);
}
.qbpm-field .booth-input,
.qbpm-url {
  width: 100%;
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--booth-line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--booth-ink);
  font: inherit;
  font-size: 0.72rem;
}
.qbpm-status {
  margin: 0;
  font-size: 0.68rem;
  color: var(--booth-label);
  line-height: 1.35;
}
.qbpm-status.is-err {
  color: #fca5a5;
}
.qbpm-hint {
  margin: 0;
  font-size: 0.58rem;
  color: var(--booth-mute);
  line-height: 1.35;
}
.qbpm-hint--lead {
  font-size: 0.64rem;
  color: var(--booth-label);
  padding: 0.35rem 0.4rem;
  border-radius: 6px;
  background: rgba(249, 139, 20, 0.07);
  border: 1px solid rgba(249, 139, 20, 0.16);
}
.qbpm-hint code {
  font-size: 0.58rem;
  color: #67e8f9;
}
.lvr-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.25rem;
}
.lvr-tools .booth-btn { font-size: 0.68rem; padding: 0.25rem 0.5rem; }

/* Staged video play / pause / stop — directly under Stage */
.lvr-playback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin: 0.15rem 0 0.35rem;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  border: 1px solid var(--booth-line);
  background: rgba(0, 0, 0, 0.25);
  opacity: 0.55;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.lvr-playback--on {
  opacity: 1;
  border-color: rgba(249, 115, 22, 0.4);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(56, 189, 248, 0.06));
}
.lvr-playback .booth-btn {
  font-size: 0.68rem;
  padding: 0.25rem 0.55rem;
  min-width: 3.2rem;
}
.lvr-float-vis {
  min-width: 4.6rem !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}
.lvr-float-vis--hidden {
  opacity: 0.75;
  border-style: dashed !important;
}
.lvr-playback-stat {
  margin-left: auto;
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  color: var(--booth-mute);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.lvr-hint { padding: 0.2rem 0; opacity: 0.85; }

/* —— Boot / loading screen —— */
/* —— Boot wizard —— */
.booth-boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 30%, rgba(249, 139, 20, 0.1), transparent 55%),
    #0d0f12;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.booth-boot--done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.booth-boot-wizard {
  width: min(52rem, 96vw);
  max-height: min(90dvh, 720px);
  overflow: auto;
  border: 1px solid var(--booth-border);
  border-radius: 8px;
  background: var(--booth-window);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.boot-wiz-head {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid var(--booth-line);
  background: var(--booth-header);
}
.boot-wiz-accent {
  width: 3px;
  flex: 0 0 3px;
  background: var(--booth-accent);
}
.boot-wiz-head > div {
  flex: 1;
  padding: 0.85rem 1rem;
}
.boot-wiz-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  color: var(--booth-accent);
}
.boot-wiz-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--booth-ink);
}
.boot-wiz-sub {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  color: var(--booth-mute);
}
.boot-wiz-head > #boot-skip {
  align-self: center;
  margin-right: 0.75rem;
}
.boot-wiz-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.95fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--booth-line);
}
@media (max-width: 900px) {
  .boot-wiz-grid {
    grid-template-columns: 1fr;
  }
}
.boot-wiz-panel {
  padding: 0.85rem 1rem 1rem;
  border-right: 1px solid var(--booth-line);
}
.boot-wiz-panel:last-child {
  border-right: 0;
}
.boot-wiz-h {
  margin: 0 0 0.65rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--booth-label);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.boot-path-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.boot-path-btn {
  appearance: none;
  text-align: left;
  border: 1px solid var(--booth-line);
  border-radius: 3px;
  background: var(--booth-row);
  color: var(--booth-ink);
  padding: 0.5rem 0.55rem 0.5rem 0.65rem;
  cursor: pointer;
  position: relative;
  font: inherit;
}
.boot-path-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
}
.boot-path-btn:hover {
  background: var(--booth-row-hover);
}
.boot-path-btn.is-active {
  border-color: var(--booth-accent-dim);
  background: rgba(249, 139, 20, 0.1);
}
.boot-path-btn.is-active::before {
  background: var(--booth-accent);
}
.boot-path-btn strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 650;
}
.boot-path-btn span {
  display: block;
  font-size: 0.65rem;
  color: var(--booth-mute);
  margin-top: 0.15rem;
  line-height: 1.35;
}
.boot-specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
}
.boot-specs-table th {
  text-align: left;
  color: var(--booth-mute);
  font-weight: 500;
  padding: 0.2rem 0.4rem 0.2rem 0;
  width: 38%;
}
.boot-specs-table td {
  color: var(--booth-ink);
  padding: 0.2rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
}
.boot-muted {
  margin: 0;
  font-size: 0.72rem;
  color: var(--booth-mute);
}
.boot-perf-row {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.65rem;
}
.boot-perf.is-active {
  border-color: var(--booth-accent);
  background: var(--booth-accent-dim);
  color: #fff;
}
.boot-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.55rem;
  font-size: 0.65rem;
  color: var(--booth-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 650;
}
.boot-field .booth-select,
.booth-input {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--booth-ink);
  background: var(--booth-field);
  border: 1px solid var(--booth-line);
  border-radius: 3px;
  padding: 0.4rem 0.5rem;
}
.boot-check {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--booth-ink);
  margin: 0.35rem 0;
  cursor: pointer;
}
.boot-check input {
  margin-top: 0.15rem;
  accent-color: var(--booth-accent);
}
.boot-wiz-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  background: #121418;
}
.boot-wiz-trust {
  margin: 0;
  flex: 1;
  min-width: 12rem;
  font-size: 0.65rem;
  color: var(--booth-mute);
}
.boot-wiz-actions {
  display: flex;
  gap: 0.4rem;
}

/* Nested button groups in tool strips */
.booth-btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-right: 0.65rem;
  margin-right: 0.35rem;
  border-right: 1px solid var(--booth-line);
}
.booth-btn-group:last-of-type {
  border-right: 0;
  margin-right: 0;
  padding-right: 0;
}
.booth-btn-group-label {
  font-size: 0.55rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--booth-mute);
  padding-left: 0.1rem;
}
.booth-btn-group-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

/* Footer */
.booth-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 28;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.85rem;
  padding: 0.25rem 0.65rem 0.25rem 0;
  background: var(--booth-header);
  border-top: 1px solid var(--booth-border);
  font-size: 0.62rem;
  color: var(--booth-mute);
}
.booth-footer-accent {
  width: 3px;
  align-self: stretch;
  background: var(--booth-accent);
  margin-right: 0.35rem;
}
.booth-footer-brand {
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--booth-ink);
}
.booth-footer-sep {
  opacity: 0.4;
}
.booth-footer-msg {
  color: var(--booth-label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40vw;
}
.booth-footer-trust {
  opacity: 0.75;
}
.booth-footer-btn {
  appearance: none;
  margin-left: auto;
  border: 1px solid var(--booth-line);
  background: var(--booth-row);
  color: var(--booth-ink);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  cursor: pointer;
}
.booth-footer-btn:hover {
  border-color: var(--booth-accent-dim);
  color: var(--booth-accent);
}

/* HUD above footer */
.booth-hud {
  bottom: 2.1rem !important;
}

.booth-feed--selected {
  outline: 1px solid var(--booth-accent);
  box-shadow: 0 0 0 1px var(--booth-accent-dim), 0 0 18px rgba(249, 115, 22, 0.2);
}

.booth-depth-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.5rem 0 0.75rem;
}
.booth-depth-modes .booth-group-title {
  flex: 1 0 100%;
  margin-bottom: 0.25rem;
}

/* Spatial mix: Dual + Screen into sphere */
.booth-spatial-mix.booth-subsec {
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.08), rgba(148, 163, 184, 0.06));
  border-color: rgba(52, 211, 153, 0.22);
}
.booth-spatial-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--booth-ink);
  margin: 0.25rem 0;
  cursor: pointer;
}
.booth-spatial-check input {
  accent-color: var(--booth-accent);
}
.booth-spatial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.booth-spatial-actions .booth-btn {
  font-size: 0.68rem;
  padding: 0.28rem 0.55rem;
}

/* —— Collapsible right column + light staging —— */
/* Do not set display:flex on the scrollport — it breaks overflow scroll.
   Sections stack as normal block flow; the panel itself scrolls. */
.booth-panel--staging {
  padding-bottom: 2rem;
}
.booth-panel--staging > .booth-section,
.booth-panel--staging > .booth-panel-toolbar {
  margin-bottom: 0.35rem;
}
.booth-panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  position: sticky;
  top: 0;
  z-index: 3;
  margin: -0.15rem -0.15rem 0.45rem;
  padding: 0.4rem 0.35rem 0.5rem;
  background: linear-gradient(180deg, rgba(12, 12, 16, 0.98) 60%, rgba(12, 12, 16, 0.88));
  border-bottom: 1px solid var(--booth-line);
  backdrop-filter: blur(10px);
}
.booth-btn--tiny {
  font-size: 0.62rem;
  padding: 0.18rem 0.4rem;
  letter-spacing: 0.02em;
}
.booth-section {
  border: 1px solid var(--booth-line);
  border-radius: 10px;
  background: rgba(18, 18, 22, 0.55);
  /* allow section content to contribute to panel scroll height */
  overflow: visible;
  flex: none;
  min-height: 0;
  transition: opacity 0.25s ease, filter 0.25s ease, border-color 0.2s ease;
}
.booth-section[open] {
  border-color: rgba(249, 115, 22, 0.28);
}
.booth-section-sum {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--booth-mute);
  user-select: none;
}
.booth-section-sum::-webkit-details-marker { display: none; }
.booth-section-sum::before {
  content: "▸";
  color: var(--booth-accent);
  font-size: 0.65rem;
  flex-shrink: 0;
  width: 0.75rem;
}
.booth-section[open] > .booth-section-sum::before {
  content: "▾";
}
.booth-section-sum-label {
  flex: 1;
  min-width: 0;
}
.booth-section-sum .booth-switch {
  flex-shrink: 0;
}
.booth-section-sum:hover {
  color: var(--booth-ink);
}
.booth-section-sum:hover .booth-section-sum-label {
  color: var(--booth-ink);
}
.booth-section-body {
  padding: 0.15rem 0.65rem 0.7rem;
  border-top: 1px solid var(--booth-line);
}
/* Main section enable off — stay visible but dimmed when collapsed */
.booth-section.booth-section--off,
.booth-section.is-disabled {
  opacity: 0.42;
  filter: saturate(0.55);
  border-color: rgba(255, 255, 255, 0.06);
}
.booth-section.booth-section--off[open],
.booth-section.is-disabled[open] {
  opacity: 0.5;
}
.booth-panel.booth-panel--light .booth-section:not([open]) {
  opacity: 0.42;
  filter: saturate(0.7);
}
.booth-panel.booth-panel--light .booth-section[open]:not(.booth-section--off) {
  opacity: 1;
  filter: none;
  box-shadow: 0 0 24px rgba(249, 115, 22, 0.08);
}
.booth-panel.booth-panel--light .booth-section.booth-section--off {
  opacity: 0.32;
}

/* Linked devices */
.booth-device-link {
  margin: 0.45rem 0 0.65rem;
  padding: 0.5rem 0.55rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}
.booth-device-link-hd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}
.booth-device-link-hd span {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--booth-ink);
  flex: 1;
}
.booth-device-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 9rem;
  overflow-y: auto;
}
.booth-device-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 0.4rem;
  padding: 0.35rem 0.4rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.68rem;
}
.booth-device-item--offline {
  opacity: 0.45;
}
.booth-device-item-name {
  font-weight: 600;
  color: var(--booth-ink);
}
.booth-device-item-meta {
  color: var(--booth-mute);
  font-size: 0.62rem;
  grid-column: 1 / -1;
}
.booth-device-item-actions {
  display: flex;
  gap: 0.2rem;
  align-items: flex-start;
}
.booth-device-item-actions .booth-btn {
  font-size: 0.6rem;
  padding: 0.12rem 0.32rem;
}
.booth-device-link-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}
.booth-device-link-form select,
.booth-device-link-form input {
  flex: 1 1 6rem;
  min-width: 0;
  font: inherit;
  font-size: 0.68rem;
  padding: 0.28rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--booth-line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--booth-ink);
}

/* Auto-cal badge */
.booth-autocal-badge {
  margin: 0.35rem 0 0.5rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--booth-mute);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(249, 115, 22, 0.08));
  border: 1px solid rgba(0, 240, 255, 0.15);
}
.booth-autocal-badge strong {
  color: #67e8f9;
  font-weight: 650;
}

/* Feeds left column sections */
.booth-feeds .booth-section {
  margin-bottom: 0.45rem;
}
.booth-feeds .booth-section-sum {
  text-transform: none;
  letter-spacing: 0.02em;
}

/* —— Left rail: source / layer on-off toggles (desktop) —— */
.booth-src-toolbar {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
}
.booth-src-toolbar .booth-btn {
  flex: 1;
  justify-content: center;
}
.booth-src-list {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.booth-src-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--booth-line);
  background: rgba(0, 0, 0, 0.28);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  cursor: pointer;
  user-select: none;
}
.booth-src-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--booth-border);
}
.booth-src-row.is-on {
  border-color: rgba(249, 139, 20, 0.45);
  box-shadow: 0 0 0 1px rgba(249, 139, 20, 0.12);
  background: rgba(249, 139, 20, 0.07);
}
.booth-src-row.is-busy {
  opacity: 0.65;
  pointer-events: none;
}
.booth-src-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}
.booth-src-name {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--booth-ink);
  line-height: 1.2;
}
.booth-src-detail {
  font-size: 0.58rem;
  color: var(--booth-mute);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.booth-src-row.is-on .booth-src-detail {
  color: var(--booth-label);
}
.booth-src-hint {
  margin: 0.4rem 0 0;
  font-size: 0.58rem;
  line-height: 1.3;
  color: var(--booth-mute);
}

/* iOS-style switch */
.booth-switch {
  position: relative;
  width: 2.15rem;
  height: 1.2rem;
  flex-shrink: 0;
}
.booth-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.booth-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #3a3d43;
  border: 1px solid var(--booth-line);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.booth-switch-track::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: calc(1.2rem - 4px);
  height: calc(1.2rem - 4px);
  border-radius: 50%;
  background: #d4d6da;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s;
}
.booth-switch input:checked + .booth-switch-track {
  background: var(--booth-accent);
  border-color: rgba(249, 139, 20, 0.85);
  box-shadow: 0 0 10px rgba(249, 139, 20, 0.35);
}
.booth-switch input:checked + .booth-switch-track::after {
  transform: translateX(0.95rem);
  background: #0f1114;
}
.booth-switch input:disabled + .booth-switch-track {
  opacity: 0.45;
}
.booth-switch input:focus-visible + .booth-switch-track {
  outline: 2px solid rgba(249, 139, 20, 0.55);
  outline-offset: 2px;
}

/* Feed layer heads use same switch */
.booth-feed-head .booth-switch {
  width: 1.9rem;
  height: 1.05rem;
}
.booth-feed-head .booth-switch-track::after {
  width: calc(1.05rem - 4px);
  height: calc(1.05rem - 4px);
}
.booth-feed-head .booth-switch input:checked + .booth-switch-track::after {
  transform: translateX(0.85rem);
}
.booth-feed-head label.booth-feed-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
  cursor: pointer;
}
.booth-feed-head label.booth-feed-toggle .booth-feed-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.booth-feed.is-off {
  opacity: 0.55;
}
.booth-feed.is-off canvas {
  filter: grayscale(0.6);
}
