/* Camera: the mirrored video, the skeleton drawn over it, the counter and status.
   On a desktop the camera is as tall as the prediction panel beside it; the
   picture fills it, cropped at the edges rather than stretched. */

.stage {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border: 1px solid var(--su-line);
  border-radius: var(--su-radius);
  background: var(--stage);
  align-self: stretch;
}

.stage video {
  display: none;
}

.stage canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pill {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 9px 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 45%, transparent);
  border-radius: var(--su-radius-sm);
  background: color-mix(in srgb, var(--brand) 14%, color-mix(in srgb, var(--su-bg) 85%, transparent));
  font: 600 13px var(--mono);
  transition: background 0.3s;
}

.pill.done {
  border-color: var(--sure);
  background: var(--sure);
}

.status {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  background: var(--stage);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.status[hidden] {
  display: none;
}

.status p {
  margin: 0;
  max-width: 32em;
}

@media (max-width: 860px) {
  .stage {
    min-height: 0;
    height: clamp(180px, 30svh, 320px);
  }
}
