:root {
  color-scheme: dark;
  --ink: #d8f5dc;
  --ink-dim: rgba(181, 232, 188, 0.7);
  --cam-green: #7ef19a;
  --room-dark: #07100d;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--room-dark);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

body {
  touch-action: none;
  user-select: none;
}

.camera-shell {
  position: fixed;
  inset: 0;
  background: #030806;
}

#watch-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  cursor: crosshair;
  image-rendering: auto;
}

.cam-overlay,
.cam-overlay::before,
.cam-overlay::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.cam-overlay::before {
  content: "";
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(205, 255, 213, 0.042) 0,
      rgba(205, 255, 213, 0.042) 1px,
      transparent 1px,
      transparent 5px
    );
  mix-blend-mode: screen;
  opacity: 0.54;
}

.cam-overlay::after {
  content: "";
  background:
    radial-gradient(circle at 50% 46%, transparent 0 46%, rgba(0, 0, 0, 0.38) 76%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(90deg, rgba(126, 241, 154, 0.03), rgba(255, 82, 82, 0.025), rgba(126, 241, 154, 0.025));
  opacity: 0.95;
}

.hud {
  position: fixed;
  z-index: 3;
  color: var(--ink);
  text-shadow: 0 0 8px rgba(126, 241, 154, 0.7);
  font-size: clamp(11px, 1.55vw, 15px);
  line-height: 1.45;
  letter-spacing: 0;
}

.hud-left {
  top: max(18px, env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left));
}

.hud-right {
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  color: var(--ink-dim);
}

.live-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4a4a;
  box-shadow: 0 0 12px rgba(255, 74, 74, 0.9);
  animation: livePulse 1.8s steps(2, end) infinite;
}

.corner {
  position: fixed;
  z-index: 3;
  width: min(16vw, 98px);
  height: min(16vw, 98px);
  border-color: rgba(216, 245, 220, 0.42);
}

.corner-tl {
  top: 18px;
  left: 18px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.corner-tr {
  top: 18px;
  right: 18px;
  border-top: 1px solid;
  border-right: 1px solid;
}

.corner-bl {
  bottom: 18px;
  left: 18px;
  border-bottom: 1px solid;
  border-left: 1px solid;
}

.corner-br {
  right: 18px;
  bottom: 18px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

@keyframes livePulse {
  50% {
    opacity: 0.28;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot {
    animation: none;
  }
}
