* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: #101014;
  overflow: hidden;
  font-family: -apple-system, system-ui, "Segoe UI", sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

#stage { position: fixed; inset: 0; }

/* Both layers are mirrored so the view behaves like a mirror.
   Landmarks are drawn un-mirrored into the canvas and the CSS
   flip below keeps them aligned with the flipped video. */
#video, #canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: scaleX(-1);
}

#video {
  object-fit: cover;
  opacity: 0.35;
  transition: opacity 0.25s ease;
}
#video.hidden { opacity: 0; }

#canvas { z-index: 2; }

#ui {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 5;
  display: flex;
  gap: 8px;
  align-items: center;
}

button {
  background: #1d1d24;
  color: #ececf0;
  border: 1px solid #3a3a46;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 14px;
  cursor: pointer;
}
button:hover { background: #2a2a34; }
button:active { transform: translateY(1px); }

#status {
  color: #8fb6ff;
  font-size: 13px;
  padding-left: 4px;
}

#hint {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  color: #c4c4cc;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.55);
  padding: 9px 16px;
  border-radius: 10px;
  text-align: center;
  max-width: 92vw;
}
#hint b { color: #fff; }
