/* GriGsi VMCR — split part 5/10 — director audio (listen/mute), record/stream off-air state, phone camera fullscreen. Part of website/css/vmcr.css, cut in original order (2026-09-23); load all 10 vmcr-*.css files together in order, never reorder. */
/* Listen / mute-for-me / mute-for-record-and-stream — director-side audio
   control per camera, independent of the phone operator's own mic switch. */
.vmcr-preview-audiomute-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
}

.vmcr-preview-listen,
.vmcr-preview-mute-dir,
.vmcr-preview-mute-out {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(47, 95, 138, 0.28);
  background: #eef4fa;
  color: #1e4060;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.vmcr-preview-listen:hover,
.vmcr-preview-listen:focus-visible,
.vmcr-preview-mute-dir:hover,
.vmcr-preview-mute-dir:focus-visible,
.vmcr-preview-mute-out:hover,
.vmcr-preview-mute-out:focus-visible {
  background: #dce8f4;
  border-color: rgba(47, 95, 138, 0.5);
  outline: none;
}

.vmcr-preview-listen:active,
.vmcr-preview-mute-dir:active,
.vmcr-preview-mute-out:active {
  transform: translateY(1px);
}

.vmcr-preview-listen i,
.vmcr-preview-mute-dir i,
.vmcr-preview-mute-out i {
  font-size: 0.72rem;
}

.vmcr-preview-listen.is-active {
  background: #d7ebe0;
  border-color: rgba(47, 160, 110, 0.55);
  color: #1d5c3f;
}

.vmcr-preview-mute-dir.is-active {
  background: #ffe9c7;
  border-color: rgba(214, 130, 15, 0.6);
  color: #8a5200;
}

.vmcr-preview-mute-out.is-active {
  background: rgba(180, 35, 24, 0.92);
  border-color: rgba(180, 35, 24, 0.92);
  color: #fff;
}

body.vmcr-dir-page.vmcr-mix-fs .vmcr-preview-listen,
body.vmcr-dir-page.vmcr-mix-fs .vmcr-preview-mute-dir,
body.vmcr-dir-page.vmcr-mix-fs .vmcr-preview-mute-out {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

body.vmcr-dir-page.vmcr-mix-fs .vmcr-preview-listen.is-active {
  background: rgba(46, 125, 90, 0.35);
  border-color: rgba(120, 220, 170, 0.5);
  color: #9eecc0;
}

body.vmcr-dir-page.vmcr-mix-fs .vmcr-preview-mute-dir.is-active {
  background: rgba(214, 130, 15, 0.35);
  border-color: rgba(255, 200, 110, 0.55);
  color: #ffd9a0;
}

/* A camera cut from record/stream needs to read as "off the air" at a glance,
   not just inside its tools row — same treatment as the phone's own mic-off state. */
.vmcr-preview.is-output-muted {
  border-color: rgba(180, 35, 24, 0.95);
  box-shadow: inset 0 0 0 2px rgba(180, 35, 24, 0.6);
}

.vmcr-preview__rot {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.vmcr-preview-rot,
.vmcr-preview-grid,
.vmcr-preview-guidance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(47, 95, 138, 0.28);
  background: #eef4fa;
  color: #1e4060;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.vmcr-preview-rot:hover,
.vmcr-preview-rot:focus-visible,
.vmcr-preview-grid:hover,
.vmcr-preview-grid:focus-visible,
.vmcr-preview-guidance:hover,
.vmcr-preview-guidance:focus-visible {
  background: #dce8f4;
  border-color: rgba(47, 95, 138, 0.5);
  outline: none;
}

.vmcr-preview-rot:active,
.vmcr-preview-grid:active,
.vmcr-preview-guidance:active {
  transform: translateY(1px);
}

.vmcr-preview-rot i,
.vmcr-preview-grid i,
.vmcr-preview-guidance i {
  font-size: 0.72rem;
}

.vmcr-preview-grid.is-active,
.vmcr-preview-grid[aria-pressed="true"],
.vmcr-preview-guidance.is-active,
.vmcr-preview-guidance[aria-pressed="true"] {
  background: #d7ebe0;
  border-color: rgba(47, 160, 110, 0.55);
  color: #1d5c3f;
}

.vmcr-preview-grid-wrap,
.vmcr-preview-guidance-wrap {
  position: relative;
  display: inline-flex;
}

.vmcr-preview-photo-wrap {
  display: inline-flex;
}

.vmcr-preview-photo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(47, 95, 138, 0.28);
  background: #eef4fa;
  color: #1e4060;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.vmcr-preview-photo:hover,
.vmcr-preview-photo:focus-visible {
  background: #dce8f4;
  border-color: rgba(47, 95, 138, 0.5);
  outline: none;
}

.vmcr-preview-photo:active {
  transform: translateY(1px);
}

.vmcr-preview-photo:disabled {
  opacity: 0.55;
  cursor: default;
}

.vmcr-preview-photo i {
  font-size: 0.72rem;
}

.vmcr-pgm-photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  margin-left: 6px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(47, 95, 138, 0.28);
  background: #eef4fa;
  color: #1e4060;
  cursor: pointer;
}

.vmcr-pgm-photo-btn:hover,
.vmcr-pgm-photo-btn:focus-visible {
  background: #dce8f4;
  border-color: rgba(47, 95, 138, 0.5);
  outline: none;
}

.vmcr-pgm-photo-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.vmcr-photo-panel .vmcr-photo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.vmcr-photo-source {
  flex: 1 1 220px;
  min-width: 160px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(47, 95, 138, 0.28);
  background: #fff;
  color: #1e4060;
  font: inherit;
  font-weight: 700;
}

.vmcr-photo-preview {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #0c121c;
  margin-bottom: 10px;
}

.vmcr-photo-preview canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.vmcr-photo-preview canvas.has-frame {
  opacity: 1;
}

.vmcr-photo-preview__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  font-weight: 700;
  pointer-events: none;
}

.vmcr-photo-msg {
  min-height: 1.2em;
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1f6b45;
}

.vmcr-photo-msg.is-error {
  color: #b3261e;
}

.vmcr-photo-drawer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  border-radius: 10px;
  background: rgba(47, 95, 138, 0.06);
}

.vmcr-photo-drawer__empty {
  margin: 8px;
  color: #5b7185;
  font-size: 0.82rem;
}

.vmcr-photo-thumb {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(47, 95, 138, 0.28);
  background: #0c121c;
}

.vmcr-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vmcr-preview-grid-menu {
  z-index: 40;
}

/* Rotate in-place inside locked 16:9 tile — fit with black bars (no fill/crop zoom). */
.vmcr-preview video[data-vmcr-rot="90"],
.vmcr-pvw-video[data-vmcr-rot="90"] {
  transform: rotate(90deg) scale(0.5625);
  transform-origin: center center;
}

.vmcr-preview video[data-vmcr-rot="180"],
.vmcr-pvw-video[data-vmcr-rot="180"] {
  transform: rotate(180deg);
  transform-origin: center center;
}

.vmcr-preview video[data-vmcr-rot="270"],
.vmcr-pvw-video[data-vmcr-rot="270"] {
  transform: rotate(270deg) scale(0.5625);
  transform-origin: center center;
}

.vmcr-preview strong { font-size: 0.92rem; }
.vmcr-preview span { font-size: 0.78rem; color: var(--vmcr-muted); }

.vmcr-preview.is-online { border-color: rgba(47, 160, 110, 0.55); }
.vmcr-preview.is-selected { outline: 2px solid rgba(74, 143, 212, 0.9); outline-offset: 2px; }
.vmcr-preview.is-program { box-shadow: inset 0 0 0 2px #f0b35a; }

.vmcr-preview-stop {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 180, 170, 0.55);
  background: rgba(180, 35, 24, 0.92);
  color: #fff;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 780;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.vmcr-preview-stop i {
  font-size: 0.58rem;
}

.vmcr-preview-stop:hover,
.vmcr-preview-stop:focus-visible {
  background: rgba(210, 45, 30, 0.96);
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 1px;
}

.vmcr-preview-stop:active {
  transform: scale(0.96);
}

.vmcr-preview-stop:disabled,
.vmcr-preview-stop.is-busy {
  opacity: 0.55;
  pointer-events: none;
}

.vmcr-preview-stop[hidden] {
  display: none !important;
}

body.vmcr-dir-page.vmcr-mix-fs .vmcr-preview-stop {
  top: 4px;
  right: 4px;
  min-height: 24px;
  padding: 2px 6px;
  font-size: 0.55rem;
}

.vmcr-controls {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.vmcr-btn.is-active,
#vmcr-hold-btn.is-active {
  background: linear-gradient(180deg, #c45f12 0%, #8a3f08 100%);
  color: #fff !important;
  border-color: rgba(138, 63, 8, 0.45);
}

.vmcr-chip.is-hold {
  background: rgba(240, 179, 90, 0.25);
  border-color: rgba(196, 95, 18, 0.45);
  color: #8a3f08;
}

.vmcr-local-wrap {
  margin: 0 0 14px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(47, 95, 138, 0.28);
  background: #0c121c;
}

.vmcr-local-wrap video,
.vmcr-local-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0c121c;
}

/* Phone camera — full-screen live view */
.vmcr-cam-page.vmcr-cam-live {
  background: #0c121c;
  overflow: hidden;
  height: 100dvh;
  max-height: 100dvh;
}

.vmcr-cam-page.vmcr-cam-live .grigsi-top-bar,
.vmcr-cam-page.vmcr-cam-live .grigsi-top-bar-spacer,
.vmcr-cam-page.vmcr-cam-live .vmcr-cam-setup {
  display: none !important;
}

.vmcr-cam-stage {
  display: none;
}

.vmcr-cam-page.vmcr-cam-live .vmcr-cam-stage,
.vmcr-cam-stage:not([hidden]) {
  display: block;
}

.vmcr-cam-page.vmcr-cam-live .vmcr-cam-stage {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vmcr-cam-picture {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  background: #000;
  overflow: hidden;
}

/* Live stage: always give the top split a real height (video is position:absolute) */
body.vmcr-cam-page.vmcr-cam-live .vmcr-cam-picture {
  flex: 0 0 auto;
  width: 100%;
  min-height: min(36dvh, 240px);
  height: min(44dvh, calc(100vw * 16 / 9));
  max-height: 48dvh;
  background: #000;
}

body.vmcr-cam-page.vmcr-cam-live .vmcr-cam-picture .vmcr-cam-video#vmcr-cam-local {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #000;
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.vmcr-cam-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #000;
  transform: translateZ(0);
}

.vmcr-cam-feed-video {
  z-index: 1;
}

/* Portrait: full picture on top (contain = whole frame), docked controls below */
body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-portrait .vmcr-cam-picture {
  flex: 0 0 auto;
  height: min(44dvh, calc(100vw * 16 / 9));
  max-height: 48dvh;
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-portrait .vmcr-cam-picture .vmcr-cam-video {
  object-fit: contain;
  object-position: center center;
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-portrait .vmcr-cam-comms {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0c121c;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 3;
  padding-bottom: max(2px, env(safe-area-inset-bottom));
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape .vmcr-cam-stage {
  display: block;
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape .vmcr-cam-picture {
  position: absolute;
  inset: 0;
  flex: none;
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: none;
  z-index: 1;
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape .vmcr-cam-picture .vmcr-cam-video,
body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape .vmcr-cam-picture .vmcr-cam-video#vmcr-cam-local {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape .vmcr-cam-chrome--top {
  z-index: 4;
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape .vmcr-cam-comms {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(42dvh, 280px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(0deg, rgba(8, 12, 20, 0.94) 58%, rgba(8, 12, 20, 0.6) 86%, transparent);
  border-top: 0;
  z-index: 5;
  padding-left: max(8px, env(safe-area-inset-left));
  padding-right: max(8px, env(safe-area-inset-right));
  padding-bottom: max(4px, env(safe-area-inset-bottom));
}

/* Compact dock over fullscreen camera — leave most of the frame visible */
body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape .vmcr-cam-tabs {
  padding-top: 4px;
  padding-left: 0;
  padding-right: 0;
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape .vmcr-cam-tabpanes {
  max-height: min(34dvh, 220px);
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape
  .vmcr-cam-tabpanes:has([data-cam-pane="controls"].is-active) {
  max-height: min(36dvh, 240px);
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape .vmcr-cam-pane[data-cam-pane="controls"] .vmcr-cam-meta,
body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape .vmcr-cam-comms .vmcr-cam-meta {
  display: none !important;
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape
  .vmcr-cam-pane[data-cam-pane="controls"].is-active .vmcr-cam-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px 0 4px;
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape .vmcr-cam-ctrl {
  flex-direction: row;
  min-height: 42px;
  padding: 6px 6px;
  font-size: 0.66rem;
  gap: 6px;
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape .vmcr-cam-ctrl i {
  font-size: 0.92rem;
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape .vmcr-cam-ctrl span {
  font-size: 0.64rem;
}

/* Front camera: no preview-only mirror any more — the phone shows exactly the picture it
   sends (Flip mirrors the sent picture itself, see vmcr-join.js), so phone and Director match. */

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape .vmcr-cam-pane-feed {
  min-height: min(18dvh, 120px);
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-landscape .vmcr-cam-pane-video {
  min-height: min(16dvh, 100px);
}

/* Vertical hold → horizontal HD/UHD: 16:9 band on top, comms in black below */
body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-horiz-hold .vmcr-cam-stage {
  background: #000;
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-horiz-hold.vmcr-cam-orient-portrait .vmcr-cam-picture {
  height: auto;
  max-height: min(48dvh, calc(100vw * 9 / 16 + 2px));
  aspect-ratio: 16 / 9;
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-horiz-hold.vmcr-cam-orient-portrait .vmcr-cam-picture .vmcr-cam-video {
  object-fit: contain;
  object-position: center top;
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-horiz-hold.vmcr-cam-orient-portrait .vmcr-cam-chrome--top {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent);
}

body.vmcr-cam-page.vmcr-cam-live.vmcr-cam-horiz-hold .vmcr-cam-ctrl--horiz.is-active,
.vmcr-cam-ctrl--horiz.is-active {
  background: rgba(47, 95, 138, 0.88);
  border-color: rgba(160, 200, 255, 0.55);
  color: #fff;
}

/* HD toggle icon = target orientation (opposite of current send mode) */
.vmcr-cam-horiz-icon {
  display: inline-block;
  line-height: 1;
  transition: transform 0.18s ease;
  transform-origin: center center;
}

.vmcr-cam-horiz-icon.is-landscape {
  transform: rotate(90deg);
}

.vmcr-cam-horiz-icon.is-portrait {
  transform: none;
}

.vmcr-cam-chrome {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(14px, env(safe-area-inset-right));
  color: #fff;
  pointer-events: none;
}

.vmcr-cam-chrome--top {
  top: 0;
  padding-top: max(12px, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent);
}

.vmcr-cam-feed-pill {
  align-self: flex-start;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(47, 95, 138, 0.85);
  border: 1px solid rgba(160, 200, 255, 0.4);
  pointer-events: none;
}

.vmcr-cam-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  padding: 6px 6px 0;
  flex: 0 0 auto;
  background: inherit;
  z-index: 2;
}

.vmcr-cam-tab {
  appearance: none;
  position: relative;
  margin: 0;
  min-height: 2rem;
  padding: 5px 2px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 750;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.vmcr-cam-tab.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(160, 200, 255, 0.4);
}

.vmcr-cam-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  height: 1rem;
  margin-left: 3px;
  padding: 0 3px;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.vmcr-cam-tabpanes {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 8px;
  overflow: hidden;
}

.vmcr-cam-pane {
  flex: 1 1 auto;
  min-height: 0;
  display: none;
  flex-direction: column;
  padding: 6px 0 2px;
  overflow: hidden;
}

.vmcr-cam-pane.is-active {
  display: flex;
}

.vmcr-cam-pane-lead {
  margin: 0;
  padding: 6px 4px;
  font-size: 0.74rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.7);
}

.vmcr-cam-pane-feed {
  position: relative;
  flex: 1 1 auto;
  min-height: min(28dvh, 200px);
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.vmcr-cam-pane-video {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: min(24dvh, 180px);
  height: auto;
  object-fit: contain;
  object-position: center;
  background: #000;
  /* Tiny opacity (not 0) so mobile browsers still decode while waiting for is-live. */
  opacity: 0.02;
  pointer-events: none;
  z-index: 1;
}

.vmcr-cam-pane-video.is-live {
  opacity: 1;
  pointer-events: auto;
}

.vmcr-cam-pane-feed .vmcr-cam-pane-lead {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  margin: 0;
  padding: 12px 14px;
  text-align: center;
  pointer-events: none;
}

.vmcr-cam-pane[data-cam-pane="chat"] .vmcr-comms-feed {
  max-height: none;
  flex: 1 1 auto;
  min-height: 0;
}

.vmcr-cam-pane[data-cam-pane="controls"] {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  gap: 8px;
}

/* Controls replace chat — never float Stop/Mute/… over other tabs */
.vmcr-cam-pane:not([data-cam-pane="controls"]) .vmcr-cam-actions,
.vmcr-cam-pane:not(.is-active) .vmcr-cam-actions,
.vmcr-cam-pane[hidden] .vmcr-cam-actions,
.vmcr-cam-pane[hidden] .vmcr-cam-meta {
  display: none !important;
}

.vmcr-cam-pane[data-cam-pane="controls"].is-active .vmcr-cam-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  flex: 0 0 auto;
  padding: 6px 2px max(6px, env(safe-area-inset-bottom));
  margin: 0;
  background: transparent;
  border-top: 0;
  z-index: 1;
}

.vmcr-comms-feed {
  flex: 1 1 auto;
  min-height: 40px;
  max-height: min(16dvh, 120px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 2px 2px 6px;
}

/* Legacy collapse/expand dock — Controls is a tab now */
.vmcr-cam-comms.is-ctrl-collapsed .vmcr-comms-feed,
.vmcr-cam-comms.is-ctrl-expanded .vmcr-comms-feed {
  max-height: none;
  min-height: 0;
}

.vmcr-comms-msg {
  max-width: 92%;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.vmcr-comms-msg.is-mine {
  align-self: flex-end;
  background: rgba(47, 95, 138, 0.55);
  border-color: rgba(160, 200, 255, 0.28);
}

.vmcr-comms-msg.is-theirs {
  align-self: flex-start;
}

.vmcr-comms-msg__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.62rem;
  opacity: 0.75;
  margin-bottom: 2px;
}

.vmcr-comms-msg__text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.35;
  word-break: break-word;
}

.vmcr-comms-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  flex: 0 0 auto;
  padding-bottom: 2px;
}

.vmcr-comms-compose input {
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.86rem;
}

.vmcr-comms-compose .vmcr-btn {
  min-height: 36px;
  padding: 6px 12px;
}

.vmcr-cam-comms .vmcr-cam-meta {
  flex: 0 0 auto;
  margin: 2px 0 0;
  gap: 4px 10px;
  font-size: 0.65rem;
  line-height: 1.25;
}

.vmcr-cam-comms .vmcr-cam-hint {
  display: none;
}

/* Legacy bottom chrome unused — keep safe if present */
.vmcr-cam-chrome--bottom {
  bottom: 0;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
  pointer-events: auto;
}

.vmcr-cam-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.vmcr-cam-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e5484d;
  box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.25);
  animation: vmcr-cam-pulse 1.4s ease-in-out infinite;
}

@keyframes vmcr-cam-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.vmcr-cam-chrome-status {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.86);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.vmcr-cam-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.78);
}

.vmcr-cam-meta strong {
  color: #fff;
  font-weight: 700;
  margin-left: 4px;
}

.vmcr-cam-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 4px;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.vmcr-cam-actions > .vmcr-frame-guide-wrap {
  display: flex;
  width: 100%;
  min-width: 0;
  align-self: stretch;
}

.vmcr-cam-actions > .vmcr-frame-guide-wrap > .vmcr-cam-ctrl {
  width: 100%;
  flex: 1 1 auto;
}

.vmcr-cam-ctrl {
  appearance: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  min-width: 0;
  padding: 6px 4px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(8px);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
  pointer-events: auto;
}

.vmcr-cam-ctrl i {
  font-size: 0.92rem;
  flex: 0 0 auto;
}

.vmcr-cam-ctrl span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vmcr-cam-ctrl:active {
  transform: scale(0.96);
  background: rgba(0, 0, 0, 0.55);
}

.vmcr-cam-ctrl:disabled,
.vmcr-cam-ctrl.is-busy {
  opacity: 0.55;
  pointer-events: none;
}

.vmcr-cam-ctrl--stop {
  background: rgba(180, 35, 24, 0.88);
  border-color: rgba(255, 180, 170, 0.45);
}

.vmcr-cam-ctrl--stop:active {
  background: rgba(110, 18, 12, 0.95);
}

.vmcr-cam-ctrl.is-active,
.vmcr-cam-ctrl--dark.is-held,
.vmcr-cam-ctrl--mute.is-muted {
  background: rgba(8, 10, 14, 0.92);
  border-color: rgba(255, 255, 255, 0.55);
  color: #f2f2f2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.vmcr-cam-ctrl--mute.is-muted {
  color: #ffd79a;
  border-color: rgba(240, 179, 90, 0.7);
}

.vmcr-cam-ctrl--dark.is-active i,
.vmcr-cam-ctrl--dark.is-held i {
  color: #9aa3ad;
}

.vmcr-cam-ctrl:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.vmcr-cam-blackout {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
  pointer-events: none;
}

.vmcr-cam-page.vmcr-cam-live.is-dark .vmcr-cam-blackout {
  display: block;
}

.vmcr-cam-blackout[hidden] {
  display: none !important;
}

.vmcr-cam-hint {
  margin: 6px 0 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.35;
}

.vmcr-cam-setup {
  width: min(520px, calc(100% - 32px));
}

@media (max-width: 360px) {
  .vmcr-cam-ctrl {
    min-height: 38px;
    font-size: 0.6rem;
    gap: 3px;
    padding: 5px 2px;
  }

  .vmcr-cam-tab {
    font-size: 0.64rem;
    min-height: 2rem;
    padding: 5px 4px;
  }

  .vmcr-cam-comms .vmcr-cam-meta {
    display: none;
  }
}

/* Phone camera — landscape / horizontal filming (not locked to portrait) */
@media (orientation: landscape) {
  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-stage {
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
  }

  /* Fallback if JS orientation class lags — still fullscreen camera */
  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-picture {
    position: absolute;
    inset: 0;
    flex: none;
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: none;
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-picture .vmcr-cam-video,
  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-picture .vmcr-cam-video#vmcr-cam-local {
    object-fit: cover;
    object-position: center;
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-comms {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(42dvh, 280px);
    z-index: 5;
    background: linear-gradient(0deg, rgba(8, 12, 20, 0.94) 58%, rgba(8, 12, 20, 0.6) 86%, transparent);
    border-top: 0;
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
    padding-bottom: max(4px, env(safe-area-inset-bottom));
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-chrome--top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: max(8px, env(safe-area-inset-top));
    z-index: 4;
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-chrome--bottom {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-tab {
    min-height: 2rem;
    font-size: 0.66rem;
    padding: 5px 4px;
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-meta,
  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-comms .vmcr-cam-meta {
    display: none !important;
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-tabpanes {
    max-height: min(34dvh, 220px);
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-tabpanes:has([data-cam-pane="controls"].is-active) {
    max-height: min(36dvh, 240px);
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-actions,
  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-pane[data-cam-pane="controls"].is-active .vmcr-cam-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 6px 0 4px;
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-ctrl {
    min-height: 42px;
    padding: 6px 6px;
    font-size: 0.66rem;
    flex-direction: row;
    gap: 6px;
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-ctrl i {
    font-size: 0.92rem;
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-ctrl span {
    font-size: 0.64rem;
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-comms-feed {
    max-height: min(12dvh, 88px);
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-hint {
    display: none;
  }
}

@media (orientation: landscape) and (max-height: 430px) {
  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-chrome--top {
    padding-top: max(4px, env(safe-area-inset-top));
    padding-bottom: 4px;
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-chrome-status {
    font-size: 0.75rem;
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-meta,
  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-comms .vmcr-cam-meta {
    display: none !important;
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-chrome--bottom {
    padding-top: 6px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-pane-lead {
    font-size: 0.68rem;
    padding: 4px 2px;
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-ctrl {
    flex-direction: row;
    gap: 5px;
    min-height: 40px;
    border-radius: 10px;
    font-size: 0.64rem;
  }

  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-ctrl span {
    font-size: 0.6rem;
  }
}

/* Short portrait phones: hide session meta, keep tabs + actions readable */
@media (orientation: portrait) and (max-height: 720px) {
  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-comms .vmcr-cam-meta {
    display: none;
  }

  .vmcr-cam-page.vmcr-cam-live.vmcr-cam-orient-portrait .vmcr-cam-picture {
    height: min(40dvh, calc(100vw * 16 / 9));
    max-height: 44dvh;
  }
}

@media (orientation: portrait) {
  .vmcr-cam-page.vmcr-cam-live .vmcr-cam-picture .vmcr-cam-video {
    object-fit: contain;
    object-position: center center;
  }
}

.vmcr-hotkeys {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: var(--vmcr-muted);
  line-height: 1.4;
}

.vmcr-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

@media (max-width: 1100px) {
  .vmcr-tools { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

@media (max-width: 900px) {
  .vmcr-tools { grid-template-columns: 1fr; }
}

.vmcr-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Real document-flow row below the video (see .vmcr-preview's grid-template-rows), not an
   overlay on top of the picture — a director asked for the level to read "under the frame,"
   not stacked over it. */
.vmcr-level {
  position: relative;
  grid-row: 2;
  margin: 5px 8px 2px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
  pointer-events: none;
}

.vmcr-level[hidden] {
  display: none !important;
}

.vmcr-level i {
  display: block;
  height: 100%;
  width: 0;
  /* Weak (left) = green, normal (middle) = yellow, hot (right) = red — hard-edged bands (not a
     smooth blend) so the colour you land on reads as a real zone, the way a hardware VU meter
     does, not a gradient guess. */
  background: linear-gradient(
    90deg,
    #2ea043 0%,
    #2ea043 55%,
    #e8c22e 55%,
    #e8c22e 80%,
    #e0433f 80%,
    #e0433f 100%
  );
  transition: width 80ms linear;
}

.vmcr-level.is-hot {
  box-shadow: 0 0 0 1px rgba(240, 179, 90, 0.35);
}

#vmcr-voice-toggle.is-active {
  background: linear-gradient(180deg, #2ea082 0%, #1a5c4a 100%);
  color: #fff !important;
  border-color: rgba(46, 160, 130, 0.45);
}

.vmcr-tools h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.vmcr-media-preview {
  width: 100%;
  margin-top: 12px;
  border-radius: 12px;
  background: #0c121c;
  max-height: 180px;
  object-fit: contain;
}

.vmcr-meta-line {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--vmcr-muted);
  word-break: break-all;
}

.vmcr-meta-line.is-error {
  color: #b42318;
}

.vmcr-preview.is-b {
  box-shadow: inset 0 0 0 2px #4a8fd4;
}

.vmcr-pip-controls {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(47, 95, 138, 0.22);
  background: rgba(255, 255, 255, 0.55);
  flex: 0 0 auto;
}

.vmcr-pip-controls[hidden] {
  display: none !important;
}

.vmcr-pip-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--vmcr-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.vmcr-pip-corners {
  display: inline-flex;
  gap: 4px;
}

.vmcr-pip-corners .vmcr-btn {
  min-width: 2.2rem;
  padding: 6px 8px;
  font-size: 0.95rem;
  line-height: 1;
}

.vmcr-pip-corners .vmcr-btn.is-active {
  background: linear-gradient(180deg, #2f5f8a 0%, #1e4060 100%);
  color: #fff !important;
  border-color: rgba(30, 64, 96, 0.45);
}

.vmcr-pip-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--vmcr-ink);
  white-space: nowrap;
}

.vmcr-pip-size input[type="range"] {
  width: min(120px, 22vw);
  accent-color: var(--vmcr-accent);
}

.vmcr-pip-size strong {
  min-width: 2.4rem;
  font-variant-numeric: tabular-nums;
}

.vmcr-pip-hint {
  display: none !important;
}

.vmcr-program.is-pip-edit,
.vmcr-preview-mon.is-pip-edit {
  cursor: grab;
}

.vmcr-program.is-pip-dragging,
.vmcr-preview-mon.is-pip-dragging {
  cursor: grabbing;
}

.vmcr-program.is-pip-resize-hover,
.vmcr-preview-mon.is-pip-resize-hover,
.vmcr-program.is-pip-resizing,
.vmcr-preview-mon.is-pip-resizing {
  cursor: nwse-resize;
}

.vmcr-program.is-pip-move-hover,
.vmcr-preview-mon.is-pip-move-hover {
  cursor: grab;
}

