* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  background: #0b0e16; color: #e8ecf5;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-user-select: none; user-select: none;
}
#app {
  min-height: 100%;
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px; padding: max(16px, env(safe-area-inset-top)) 16px 16px;
}
#preview-wrap { position: relative; flex: 1; min-height: 0; border-radius: 14px; overflow: hidden; background: #000; }
#preview { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge {
  position: absolute; left: 12px; top: 12px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(0,0,0,.55); font-size: 14px; font-weight: 600;
}
.badge.live { background: #12803a; }
.badge.err { background: #a1242f; }
.warn {
  margin: 0; padding: 10px 12px; border-radius: 10px;
  background: #3a2d0a; color: #ffdf8a; font-size: 14px;
}
.controls { display: flex; gap: 12px; }
.controls button {
  flex: 1; padding: 16px; border: 0; border-radius: 12px;
  font-size: 16px; font-weight: 700; color: #0b0e16; background: #cfd6e6;
}
.controls button.danger { background: #e8707b; color: #1a0608; }
.controls button:active { filter: brightness(.85); }
.hint { margin: 0; text-align: center; color: #8b93a7; font-size: 13px; }
