:root {
  color-scheme: dark;
  --bg0: #0b0d10;
  --bg1: #14181f;
  --bg2: #10141a;
  --line: #2a3140;
  --text: #e8edf5;
  --muted: #8b95a8;
  --accent: #3d9a7a;
  --accent-strong: #4db894;
  --danger: #c45c5c;
  --focus: #6eb8ff;
  --radius: 14px;
  --radius-sm: 10px;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 10% -10%, #1a2433 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #16221c 0%, transparent 50%),
    var(--bg0);
  color: var(--text);
}

/* ── App shell ─────────────────────────────────────────────────── */

.app {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.5rem 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 100dvh;
  height: 100dvh;
  box-sizing: border-box;
  overflow: hidden;
}

/* ---------- Header (compact) ---------- */

.exit-btn {
  flex-shrink: 0;
  margin-left: auto;
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

.exit-btn:hover:not(:disabled) {
  color: var(--text);
  border-color: color-mix(in srgb, var(--line) 70%, var(--text));
}

.status {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.status[data-state="recording"] {
  color: var(--danger);
}

.status[data-state="connected"] {
  color: var(--accent);
}

.status[data-state="error"] {
  color: var(--danger);
}

/* ---------- Join panel ---------- */

.panel {
  background: color-mix(in srgb, var(--bg1) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.label.inline {
  margin: 0;
}

.code-input {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0e1218;
  color: var(--text);
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.code-input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.transport-mode {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.85rem;
  margin-bottom: 0.85rem;
}

.transport-mode-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.transport-mode-label .required {
  color: var(--danger);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.transport-btn-group {
  display: flex;
  gap: 6px;
}

.transport-btn {
  padding: 0.25rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 8px;
  opacity: 0.5;
  transition: opacity 0.15s, background 0.15s;
}

.transport-btn:hover {
  opacity: 0.8;
}

.transport-btn.is-active {
  opacity: 1;
}

.transport-btn.is-active[data-mode="p2p"] {
  background: color-mix(in srgb, #3ecf8e 30%, var(--bg1));
  color: #b8f5d4;
  border-color: color-mix(in srgb, #3ecf8e 40%, var(--line));
}

.transport-btn.is-active[data-mode="relay"] {
  background: color-mix(in srgb, #f0b429 30%, var(--bg1));
  color: #ffe6a3;
  border-color: color-mix(in srgb, #f0b429 40%, var(--line));
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #1b222d;
  color: var(--text);
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

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

.btn:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--focus) 40%, var(--line));
}

.btn.primary {
  width: 100%;
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 70%, #000);
  color: #04140f;
}

.btn.danger {
  background: color-mix(in srgb, var(--danger) 22%, #1b222d);
  border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
}

.btn.danger.recording {
  background: var(--danger);
  color: #fff;
  border-color: color-mix(in srgb, var(--danger) 80%, #000);
}

.error {
  margin: 0.75rem 0 0;
  color: var(--danger);
  font-size: 0.9rem;
}

/* ════════════════════════════════════════════════════════════════════
   VIEWER PANEL — 80% video (right) / 20% controls+live (left)
   ════════════════════════════════════════════════════════════════════ */

.viewer-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  gap: 0.5rem;
  /* Shift+hold scrub must not select labels/hints. */
  user-select: none;
}

.viewer-panel[hidden] {
  display: none;
}

/* ── Top bar: stream stats + connection info (compact inline) ── */

.viewer-topbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0 0.25rem;
  min-height: 2rem;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-strong) 60%, transparent);
  animation: live-pulse 2s ease-out infinite;
  flex-shrink: 0;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-strong) 55%, transparent);
  }
  70% {
    box-shadow: 0 0 0 6px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}

/* Compact FPS/bitrate stats */

.stream-stats {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  background: #0e1218;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  white-space: nowrap;
}

.stream-stats[hidden] {
  display: none;
}

.conn-info {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  background: #0e1218;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  white-space: nowrap;
  flex-wrap: wrap;
}

.conn-info[hidden] {
  display: none;
}

.conn-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.conn-badge[data-transport="p2p"] {
  background: color-mix(in srgb, #3ecf8e 28%, #1b222d);
  color: #b8f5d4;
}

.conn-badge[data-transport="relay"] {
  background: color-mix(in srgb, #f0b429 30%, #1b222d);
  color: #ffe6a3;
}

.conn-badge[data-transport="—"] {
  background: #1b222d;
  color: var(--muted);
}

/* ── Main workspace: left sidebar (20%) + video area (80%) ── */

.workspace {
  display: grid;
  grid-template-columns: minmax(180px, 20%) 80%;
  grid-template-rows: 1fr auto;
  gap: 0.5rem;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

/* ── LEFT SIDEBAR (20%): Live video (small) + camera settings ── */

.workspace-sidebar {
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow-y: auto;
  overflow-x: hidden;
  background: color-mix(in srgb, var(--bg1) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem;
  min-width: 0;
}

.workspace-sidebar[hidden] {
  display: none;
}

/* Live video sizing is declared after `.video-shell` so it wins the cascade. */

/* View zoom / rotate / flip — directly under live preview */
.live-view-controls {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex-shrink: 0;
}

.live-view-controls .enhance-row {
  gap: 0.25rem;
}

.live-view-controls .label {
  font-size: 0.7rem;
}

.live-view-controls .orient-btn {
  padding: 0.2rem 0.3rem;
  font-size: 0.68rem;
  min-width: 0;
}

.live-view-controls .playback-orient-btns {
  gap: 0.2rem;
  flex-wrap: wrap;
}

.live-view-controls .transform-buttons .orient-btn {
  flex: 1 1 auto;
}

/* Sidebar record row */
.sidebar-record-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.sidebar-record-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.sidebar-hint {
  flex-basis: 100%;
}

.sidebar-close-btn {
  align-self: flex-end;
  flex-shrink: 0;
}

.sidebar-close-btn[hidden] {
  display: none;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.sidebar-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

/* ── RIGHT MAIN (80%): Playback / review video ── */

.workspace-main {
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

/* ── Bottom bar: playback controls ── */

.workspace-bottom {
  grid-row: 2;
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: color-mix(in srgb, var(--bg1) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5rem 0.65rem;
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
}

.playback-panel-toggle {
  align-self: flex-end;
  flex-shrink: 0;
  padding: 0.25rem 0.5rem;
}

.workspace-bottom.is-collapsed {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  padding: 0.25rem 0.45rem;
}

.workspace-bottom.is-collapsed > :not(.playback-panel-toggle) {
  display: none;
}

.workspace-bottom[hidden] {
  display: none;
}

/* ── Video shells ── */

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  touch-action: none;
  cursor: grab;
  width: 100%;
  height: auto;
  margin: 0 auto;
  flex-shrink: 1;
}

/* Live preview: full sidebar width, strict 16:9 — no max-height letterboxing */
.live-video-shell.video-shell {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  min-height: 0;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  align-self: stretch;
  margin: 0;
  contain: layout paint;
}

.live-video-shell.video-shell.is-sideways {
  aspect-ratio: 9 / 16;
  /* Portrait is tall — cap height and shrink width so 9:16 stays exact */
  max-height: 40vh;
  width: min(100%, calc(40vh * 9 / 16));
  align-self: center;
}

/* Playback / review + Live: landscape by default; `.is-sideways` = portrait after 90°/270°. */
.video-shell.is-sideways {
  aspect-ratio: 9 / 16;
  max-width: 100%;
}

/* When sideways, size the stage as landscape (matching the 16:9 video source)
   so that after CSS rotation it fills the 9:16 container exactly — no black bars. */
.video-shell.is-sideways .video-stage {
  inset: auto;
  left: 50%;
  top: 50%;
  width: calc(100% * 16 / 9);
  height: calc(100% * 9 / 16);
}

/* Playback video: fill the main area (80%) */
.playback-shell.video-shell {
  contain: none;
  background: #000;
  flex: 1 1 0;
  max-height: 100%;
  min-height: 0;
  /* Keep overflow clip + block scroll chaining so wheel zoom stays on the stage */
  overflow: hidden;
  overscroll-behavior: none;
}

.playback-frame {
  flex: 1 1 0;
  min-height: 10rem;
  width: 100%;
  container-type: size;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.playback-frame[hidden] {
  display: none;
}

.playback-shell {
  aspect-ratio: 16 / 9;
  width: min(100cqw, calc(100cqh * 16 / 9));
  height: min(100cqh, calc(100cqw * 9 / 16));
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  flex-shrink: 1;
  align-self: center;
}

.playback-shell.is-sideways {
  aspect-ratio: 9 / 16;
  width: min(100cqw, calc(100cqh * 9 / 16));
  height: min(100cqh, calc(100cqw * 16 / 9));
}

.video-shell.is-dragging {
  cursor: grabbing;
}

.video-shell.is-zoomed {
  cursor: grab;
}

.video-stage {
  position: absolute;
  inset: 0;
  transform-origin: center center;
}

.video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  position: absolute;
  inset: 0;
}

#live-video.video {
  transform: translateZ(0);
}

.scrub-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
  z-index: 2;
  pointer-events: none;
  background: transparent;
  filter: blur(0.35px) contrast(0.985);
}

/* Breaks hardware video overlay so canvas/ImageBitmap readback is not black. */
.video.scrub-readback,
.scrub-capture-video.scrub-readback {
  filter: opacity(0.999);
  transform: translateZ(0.1px);
}

.scrub-capture-video {
  position: fixed;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
  object-fit: contain;
  background: #000;
}

/* ── Record icon ── */

.record-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.record-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
}

.record-btn.recording .record-icon {
  border-radius: 3px;
  background: #fff;
  animation: record-blink 1.2s ease-in-out infinite;
}

@keyframes record-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.record-timer {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  color: #ff8e8e;
  min-width: 3.5rem;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

/* ── Sidebar: camera settings ── */

.enhance-panel {
  display: grid;
  gap: 0.35rem;
}

.camera-sliders {
  display: grid;
  gap: 0.3rem;
}

.camera-advanced {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.15rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.1rem;
}

.settings-title {
  margin: 0.1rem 0 0;
  font-size: 0.85rem;
  font-weight: 650;
}

.enhance-row {
  display: grid;
  grid-template-columns: minmax(2.75rem, 3.75rem) minmax(0, 1fr);
  gap: 0.35rem;
  align-items: center;
  font-size: 0.74rem;
}

.enhance-row.is-disabled {
  opacity: 0.45;
}

.enhance-row.is-disabled .range,
.enhance-row.is-disabled .control-btn {
  pointer-events: none;
}

.enhance-row .label {
  min-width: 0;
  font-variant-numeric: tabular-nums;
  font-size: 0.66rem;
  line-height: 1.15;
  word-break: break-word;
}

.workspace-sidebar .enhance-row.playback-orient-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
}

.workspace-sidebar .enhance-row.playback-orient-row .playback-orient-btns {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.3rem;
  width: 100%;
}

.workspace-sidebar .enhance-row.playback-orient-row .playback-orient-btns .orient-btn,
.workspace-sidebar .enhance-row.playback-orient-row .playback-orient-btns .control-btn {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.iso-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.iso-range {
  flex: 1;
  min-width: 0;
}

.range {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.enhance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.1rem;
}

/* ── Bottom: playback controls ── */

.review-time {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem;
  align-items: center;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: var(--muted);
}

.seek-bar {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.review-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.review-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.frame-record-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  width: 100%;
  box-sizing: border-box;
  min-height: 1.8rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1218;
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.frame-record-info.is-empty {
  opacity: 0.72;
}

.frame-record-info-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
}

.frame-record-info-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  white-space: nowrap;
}

.frame-record-info-label {
  color: color-mix(in srgb, var(--muted) 75%, transparent);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.62rem;
}

.frame-record-info-item > :not(.frame-record-info-label) {
  color: var(--text);
  font-weight: 600;
}

/* ── Buttons ── */

.control-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #1b222d;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.control-btn:hover {
  border-color: color-mix(in srgb, var(--focus) 40%, var(--line));
}

.play-btn {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--accent) 70%, #000);
  background: var(--accent);
  color: #04140f;
  border-radius: var(--radius-sm);
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  min-width: 4.5rem;
}

.play-btn:hover {
  background: var(--accent-strong);
}

.speed-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.playback-orient-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.playback-orient-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.orient-btn.is-active,
.orient-btn[aria-pressed='true'] {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 18%, #1b222d);
  color: var(--text);
}

.orient-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.speed-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.speed-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #1b222d;
  color: var(--text);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.speed-btn.is-active {
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 70%, #000);
  color: #04140f;
}

.review-keys {
  font-size: 0.7rem;
}

#restart-playback-btn {
  min-width: auto;
}

.icon-btn {
  appearance: none;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #1b222d;
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.icon-btn:hover {
  border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
  color: var(--danger);
}

/* ── Recording badge on video ── */

.rec-badge {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(10, 12, 16, 0.72);
  border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--line));
  color: #ffb3b3;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(3px);
}

.rec-badge:not([hidden]) {
  display: inline-flex;
}

.rec-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  animation: record-blink 1.2s ease-in-out infinite;
}

#review-panel.is-live-recording .playback-shell {
  border-color: color-mix(in srgb, var(--danger) 55%, var(--line));
}

/* ── Review column ── */

.review-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1;
  gap: 0.5rem;
  min-width: 0;
  min-height: 0;
}

/* ── Review empty placeholder ── */

.review-empty {
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed;
  gap: 0.9rem;
  min-height: 260px;
  background: color-mix(in srgb, var(--bg1) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
}

.review-empty[hidden] {
  display: none;
}

.review-empty .eyebrow {
  display: inline-flex;
  justify-content: center;
}

.empty-visual {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: #1b222d;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.1rem;
}

.empty-copy {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.column-title {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

/* ════════════════════════════════════════════════════════════════════
   RESPONSIVE — tablet / narrow screens
   ════════════════════════════════════════════════════════════════════ */

@media (max-width: 979px) {
  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }

  .workspace-sidebar {
    grid-row: 1;
    grid-column: 1;
    flex-direction: row;
    flex-wrap: wrap;
    overflow-y: visible;
    gap: 0.4rem;
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
  }

  .workspace-sidebar .live-video-shell.video-shell {
    width: 40%;
    min-width: 160px;
    max-width: 100%;
    max-height: none;
    aspect-ratio: 16 / 9;
  }

  .workspace-sidebar .live-video-shell.video-shell.is-sideways {
    width: min(40%, calc(40vh * 9 / 16));
    min-width: 0;
    max-height: 40vh;
    aspect-ratio: 9 / 16;
  }

  .workspace-sidebar .sidebar-section {
    flex: 1 1 auto;
    min-width: 12rem;
  }

  .workspace-sidebar .enhance-row,
  .workspace-sidebar .enhance-row.playback-orient-row {
    grid-template-columns: minmax(2.75rem, 3.75rem) minmax(0, 1fr);
    font-size: 0.72rem;
    gap: 0.3rem;
  }

  .workspace-sidebar .camera-sliders {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .workspace-sidebar .camera-sliders .enhance-row {
    flex: 1 1 auto;
    min-width: 11rem;
  }

  .workspace-main {
    grid-row: 2;
    grid-column: 1;
  }

  .workspace-bottom {
    grid-row: 3;
    grid-column: 1;
  }

  .app {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .playback-shell {
    max-height: 50vh;
  }
}

@media (max-width: 520px) {

  .review-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .sidebar-section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}