:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #06111f;
  color: #e8f0ff;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at top right, #0d2844 0, #06111f 40%); }
button, input, select { font: inherit; }
.shell { width: min(1500px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 52px; }
.hero { margin-bottom: 28px; }
.eyebrow, .kicker { color: #62d6ff; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.eyebrow { margin: 0 0 12px; }
.kicker { margin: 0 0 4px; font-size: .75rem; }
h1 { margin: 0; max-width: 1100px; font-size: clamp(2.3rem, 5.8vw, 5rem); line-height: .98; }
h2 { margin: 0; font-size: 1.2rem; }
.lede { max-width: 900px; color: #b7c9e6; font-size: 1.13rem; line-height: 1.55; }
.stage2-link { color: #78dcff; }
.status-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 18px; }
.status-grid article, .panel, .preview-card, .room-card { border: 1px solid #234565; background: rgba(8, 26, 45, .9); border-radius: 16px; }
.status-grid article { padding: 20px; min-height: 102px; }
.status-grid span { display: block; color: #8fb1d8; letter-spacing: .12em; text-transform: uppercase; font-size: .82rem; }
.status-grid strong { display: block; margin-top: 8px; color: #63ef91; font-size: 1.08rem; }
.panel { padding: 20px; margin-bottom: 18px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 18px; }
.form-grid, .device-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
label { color: #b7c9e6; font-size: .88rem; }
input, select { display: block; width: 100%; margin-top: 7px; padding: 12px 13px; color: #eef6ff; background: #04101c; border: 1px solid #315879; border-radius: 10px; }
.controls { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 17px; }
button { border: 1px solid #4b84b7; border-radius: 10px; padding: 12px 17px; color: white; background: #12457a; font-weight: 750; cursor: pointer; }
button:hover:not(:disabled) { filter: brightness(1.15); }
button.secondary { background: #0b2948; }
button.danger { background: #6b2430; border-color: #b95567; }
button:disabled { opacity: .43; cursor: not-allowed; }
.media-stage { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(520px, 1.5fr); gap: 18px; margin-bottom: 18px; }
.preview-card, .room-card { padding: 18px; min-height: 390px; }
.card-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.card-title span { color: #8fb1d8; font-size: .84rem; }
#previewVideo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #020810; border-radius: 12px; }
#previewHint { color: #8fb1d8; }
.participant-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; min-height: 310px; }
.participant-tile { position: relative; min-height: 210px; overflow: hidden; border-radius: 12px; background: #020810; border: 2px solid transparent; }
.participant-tile.speaking { border-color: #62ef99; }
.participant-tile video { width: 100%; height: 100%; min-height: 210px; object-fit: cover; }
.participant-label { position: absolute; left: 9px; bottom: 9px; padding: 6px 9px; border-radius: 7px; background: rgba(0, 0, 0, .72); font-size: .82rem; }
.empty-state { color: #7797ba; align-self: center; justify-self: center; }
.diagnostics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.diagnostics-grid .panel { min-width: 0; }
pre { max-height: 390px; overflow: auto; margin: 15px 0 0; padding: 15px; border-radius: 11px; background: #020a14; color: #cce7ff; font: 13px/1.55 Consolas, monospace; }
.event-panel ol { max-height: 340px; overflow: auto; color: #d0e4ff; line-height: 1.7; }
.event-panel li.error { color: #ff8f9f; }
footer { color: #6f91b5; font-size: .82rem; }
@media (max-width: 1000px) {
  .status-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .device-grid, .media-stage, .diagnostics-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .shell { width: min(100% - 24px, 1500px); }
  .status-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: stretch; flex-direction: column; }
}
