/* ============================================================
   quantum.css — camera / mediapipe biometric handshake screen
   ============================================================ */

#quantum-screen { background: #02040a; }

#quantum-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#qp-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  filter: grayscale(0.4) contrast(1.1) brightness(0.7) hue-rotate(120deg);
  opacity: 0.55;
}

#qp-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;          /* MUST match #qp-video so the mesh aligns 1:1 */
  object-position: center;
  transform: scaleX(-1);
}

#qp-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--cyan);
  font-size: 13px;
  text-shadow: 0 0 8px rgba(79,214,255,0.6);
}

.qp-corner {
  position: absolute;
  width: 48px; height: 48px;
  border: 2px solid var(--cyan);
  opacity: 0.7;
}
.qp-corner.tl { top: 28px; left: 28px; border-right: none; border-bottom: none; }
.qp-corner.tr { top: 28px; right: 28px; border-left: none; border-bottom: none; }
.qp-corner.bl { bottom: 28px; left: 28px; border-right: none; border-top: none; }
.qp-corner.br { bottom: 28px; right: 28px; border-left: none; border-top: none; }

#qp-title {
  position: absolute;
  top: 40px; left: 50%; transform: translateX(-50%);
  letter-spacing: 3px;
  font-weight: 700;
  font-size: 15px;
  color: var(--cyan);
  white-space: nowrap;
}
#qp-status {
  position: absolute;
  top: 70px; left: 50%; transform: translateX(-50%);
  letter-spacing: 2px;
  color: var(--green);
  font-size: 12px;
}
#qp-progress {
  position: absolute;
  bottom: 110px; left: 50%; transform: translateX(-50%);
  width: min(440px, 70vw);
  height: 6px;
  background: rgba(79,214,255,0.12);
  border: 1px solid rgba(79,214,255,0.4);
}
#qp-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  box-shadow: 0 0 12px var(--cyan);
  transition: width 0.4s ease;
}
#qp-instruction {
  position: absolute;
  bottom: 70px; left: 50%; transform: translateX(-50%);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #eafffb;
  text-align: center;
  width: 90%;
  animation: qpPulse 1.6s ease-in-out infinite;
}
@keyframes qpPulse { 0%,100% { opacity: 0.7; } 50% { opacity: 1; } }
#qp-readout {
  position: absolute;
  top: 100px; left: 30px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--green-dim);
  white-space: pre;
  opacity: 0.85;
}

.qp-btn {
  position: absolute;
  bottom: 24px; right: 24px;
  pointer-events: auto;
  background: rgba(255,77,94,0.1);
  border: 1px solid var(--red);
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 14px;
  cursor: pointer;
  letter-spacing: 1px;
  z-index: 5;
}
.qp-btn:hover { background: rgba(255,77,94,0.25); }

/* consent prompt card */
#qp-consent {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2,4,10,0.92);
  z-index: 10;
  pointer-events: auto;
}
#qp-consent .card {
  max-width: 520px;
  border: 1px solid var(--cyan);
  background: linear-gradient(180deg, #06121a, #03070c);
  padding: 30px 34px;
  box-shadow: 0 0 50px rgba(79,214,255,0.2);
}
#qp-consent h2 { color: var(--cyan); letter-spacing: 2px; margin-bottom: 14px; font-size: 18px; }
#qp-consent p { color: #a9d6c4; font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
#qp-consent .btn-row { display: flex; gap: 12px; margin-top: 18px; }
#qp-consent button {
  flex: 1;
  font-family: var(--font-mono);
  padding: 12px;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 1px;
  border: 1px solid;
  background: transparent;
}
#qp-allow { border-color: var(--green); color: var(--green); }
#qp-allow:hover { background: rgba(56,255,156,0.15); }
#qp-deny { border-color: var(--muted); color: var(--muted); }
#qp-deny:hover { background: rgba(90,122,108,0.15); }

.qp-success #qp-video { filter: grayscale(0) contrast(1.05) brightness(0.9) hue-rotate(0deg); opacity: 0.7; }
