body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #111;
  color: #fff;
  text-align: center;
}
#viewfinder {
  position: relative;
  width: 100vw;
  height: 60vh;
  background: #000;
  overflow: hidden;
}
video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  border: 2px solid #00ff88;
  border-radius: 50%;
  pointer-events: none;
}
#crosshair::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -10px;
  right: -10px;
  height: 2px;
  background: #00ff88;
}
.controls {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
button {
  padding: 14px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
#startBtn {
  background: #2563eb;
  color: #fff;
}
#baseBtn {
  background: #4b5563;
  color: #fff;
}
#snapBtn {
  background: #10b981;
  color: #000;
  font-size: 18px;
}
#snapBtn:disabled {
  background: #333;
  color: #777;
}
input {
  padding: 8px;
  width: 70px;
  font-size: 16px;
  text-align: center;
  border-radius: 6px;
  border: none;
}
#result {
  font-size: 22px;
  font-weight: bold;
  color: #fbbf24;
  margin-top: 6px;
}
