:root {
  color-scheme: dark;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px 40px;
  background: #0b1220;
  color: #e2e8f0;
  line-height: 1.5;
}

h1 {
  margin-bottom: 4px;
}

p {
  color: #94a3b8;
}

.stage-wrap {
  position: relative;
  width: 100%;
  max-width: 1200px;
  aspect-ratio: 1200 / 700;
  margin: 16px 0;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

canvas#stage {
  width: 100%;
  height: 100%;
  display: block;
}

/* Must come before the plain .overlay rule below wins on display, and needs the
   extra attribute selector to out-specificity it: the browser's own default
   [hidden]{display:none} lives in the user-agent stylesheet, which any author rule
   (like .overlay{display:flex}) silently overrides regardless of order otherwise. */
.overlay[hidden] {
  display: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(2, 6, 23, 0.72);
  text-align: center;
  padding: 20px;
}

.overlay h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 40px);
}

.overlay p {
  color: #e2e8f0;
  font-size: 18px;
}

button {
  padding: 12px 28px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

button:disabled {
  background: #334155;
  cursor: default;
}

#cameraStatus {
  font-size: 14px;
  color: #94a3b8;
  min-height: 18px;
}
