* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b1220;
  color: #f8fafc;
}
.viewer { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; gap: 18px; padding: 22px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
h1, p { margin: 0; }
h1 { font-size: 24px; }
#status { color: #a8b3c7; }
.stage {
  width: 100%;
  min-height: 360px;
  aspect-ratio: 16 / 9;
  border: 1px solid #263244;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #020617;
  color: #94a3b8;
  overflow: hidden;
}
.stage.isPortrait {
  aspect-ratio: 9 / 16;
  width: min(100%, 540px);
  justify-self: center;
}
.stage.isLandscape { aspect-ratio: 16 / 9; }
.stage video,
.stage .liveVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
  transform: none;
}
.controls { display: grid; grid-template-columns: 180px 1fr auto; gap: 10px; }
input, button {
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
}
input { border: 1px solid #334155; background: #111827; color: #f8fafc; }
button { border: 0; background: #14b8a6; color: #05201d; font-weight: 800; cursor: pointer; }
@media (max-width: 720px) {
  .controls, header { grid-template-columns: 1fr; display: grid; }
  .stage { min-height: 240px; }
}
