:root {
  color-scheme: dark;
  --bg: #0f1115;
  --panel: #171a21;
  --line: #262a33;
  --text: #e6e6e6;
  --dim: #8b93a5;
  --red: #ef4444;
  --blue: #5b8cff;
  --yellow: #f5c451;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
header h1 { font-size: 16px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-weight: 700; font-size: 13px; white-space: nowrap; }
.badge.live { color: var(--red); }
.badge.wait { color: var(--yellow); }
.badge.off { color: var(--dim); }
main { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 12px 16px; gap: 12px; }
.stage {
  position: relative;
  flex: 1;
  min-height: 240px;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.stage video { width: 100%; height: 100%; object-fit: contain; transform-origin: 0 0; }
.stage .msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--dim); }
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
button {
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}
button:hover { border-color: var(--dim); }
button.on { border-color: var(--blue); color: #b9ccff; }
button.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
button.danger { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
button[hidden] { display: none; }
.stats { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--dim); }
.note { font-size: 13px; padding: 8px 12px; border-radius: 8px; background: #2a2412; color: var(--yellow); }
.note[hidden] { display: none; }
.spacer { flex: 1; }
