* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fa;
  color: #18212f;
}
.shell { width: min(1180px, calc(100vw - 32px)); margin: 0 auto; padding: 28px 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; font-weight: 750; }
h2 { font-size: 18px; margin-bottom: 16px; }
.topbar p, .message { color: #667085; margin-top: 6px; }
.panel {
  background: #fff;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}
.narrow { max-width: 420px; }
.form, .toolbar { display: grid; gap: 12px; }
.toolbar { grid-template-columns: 220px auto; align-items: end; margin-bottom: 18px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 650; color: #344054; }
input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
button {
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: #0f766e;
  cursor: pointer;
}
button:disabled { opacity: .45; cursor: not-allowed; }
.ghost { background: #e8eef6; color: #1f2937; }
.hidden { display: none !important; }
.grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; align-items: start; }
.grid .panel:last-child { grid-column: 1 / -1; }
.streamList { display: grid; gap: 10px; }
.streamItem {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d9e0ea;
  border-radius: 8px;
  background: #fbfdff;
}
.streamItem strong { display: block; }
.streamItem span { display: block; color: #667085; font-size: 13px; margin-top: 3px; }
.videoBox {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  border: 1px solid #d9e0ea;
  background: #111827;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #cbd5e1;
}
.videoBox.isPortrait { aspect-ratio: 9 / 16; max-height: 72vh; }
.videoBox.isLandscape { aspect-ratio: 16 / 9; }
.videoBox video,
.videoBox .liveVideo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111827;
  transform: none;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.state { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0; }
.state dt { font-weight: 750; color: #344054; }
.state dd { margin: 0; color: #475467; overflow-wrap: anywhere; }
@media (max-width: 820px) {
  .grid, .toolbar { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
}
