/* Tracker hub UI (injected by js/tracker.js) — shared by every page that
   embeds the MotionTracker module. */
#cam { display: none; }
#preview {
  position: fixed; right: 16px; bottom: 16px;
  width: 280px; height: auto;
  border: 2px solid #2c3550; border-radius: 10px;
  background: #000;
  z-index: 110;
}
#preview2 {
  position: fixed; right: 16px; bottom: 248px;
  width: 200px; height: auto;
  border: 2px solid #2c3550; border-radius: 10px;
  background: #000;
  z-index: 110;
}
#status {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  background: rgba(12,16,28,0.85); color: #e8ecf5;
  padding: 10px 18px; border-radius: 8px; font-size: 15px;
  border: 1px solid #2c3550;
  z-index: 110;
}
#debug {
  position: fixed; left: 16px; bottom: 16px;
  background: rgba(12,16,28,0.8); color: #9aa7c7;
  padding: 10px 12px; border-radius: 8px;
  font: 12px/1.5 ui-monospace, monospace; white-space: pre;
  border: 1px solid #2c3550;
  z-index: 110;
}
#controls {
  position: fixed; left: 16px; top: 16px;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
  z-index: 110;
}
#controls select {
  background: rgba(12,16,28,0.85); color: #e8ecf5;
  border: 1px solid #2c3550; border-radius: 8px;
  padding: 6px 10px; font-size: 13px; max-width: 280px;
}
#zoomwrap {
  background: rgba(12,16,28,0.85); color: #9aa7c7;
  border: 1px solid #2c3550; border-radius: 8px;
  padding: 6px 10px; font-size: 12px;
  display: flex; gap: 8px; align-items: center;
}
#diagnostics-controls {
  max-width: 320px;
  padding: 8px 10px;
  border: 1px solid #2c3550;
  border-radius: 8px;
  background: rgba(12,16,28,0.88);
  color: #9aa7c7;
  font-size: 11px;
  line-height: 1.35;
}
#diagnostics-status { margin-bottom: 7px; }
#diagnostics-actions { display: flex; gap: 6px; }
#diagnostics-actions button {
  padding: 5px 8px;
  border: 1px solid #3b4769;
  border-radius: 6px;
  background: #182038;
  color: #dce4f8;
  font: inherit;
  cursor: pointer;
}
#diagnostics-actions button:hover { background: #222d4b; }
#diagnostics-actions button:focus-visible {
  outline: 2px solid #6ea8ff;
  outline-offset: 2px;
}
#diagnostics-actions button:disabled { cursor: wait; opacity: 0.65; }

/* A tracking dropout is a play-stopping setup problem, so it gets a true
   overlay rather than another small status pill. Controls and the mirrored
   camera preview remain above it so the player can follow the directions. */
#tracking-warning {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 72px);
  box-sizing: border-box;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 44%, rgba(36, 16, 37, 0.70), rgba(5, 8, 20, 0.90));
  backdrop-filter: blur(5px);
}
#tracking-warning.hidden { display: none; }
#tracking-warning-card {
  width: min(820px, calc(100vw - 64px));
  padding: clamp(28px, 5vw, 58px) clamp(28px, 6vw, 72px);
  box-sizing: border-box;
  text-align: center;
  border: 3px solid #ff6b7d;
  border-radius: 24px;
  color: #f7f8ff;
  background: rgba(14, 14, 30, 0.94);
  box-shadow: 0 0 0 7px rgba(255, 107, 125, 0.12),
              0 30px 90px rgba(0, 0, 0, 0.55);
}
#tracking-warning-kicker {
  color: #ff9aa7;
  font-size: clamp(14px, 1.6vw, 20px);
  font-weight: 800;
  letter-spacing: 0.18em;
}
#tracking-warning-title {
  margin-top: 8px;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 84px);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: -0.045em;
}
#tracking-warning-action {
  margin-top: clamp(22px, 3vw, 34px);
  color: #ffd166;
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.15;
}
#tracking-warning-detail {
  max-width: 650px;
  margin: 16px auto 0;
  color: #cbd3eb;
  font-size: clamp(16px, 1.8vw, 22px);
  line-height: 1.4;
}

@media (max-width: 720px) {
  #tracking-warning { align-items: start; padding-top: 112px; }
  #tracking-warning-card { width: calc(100vw - 32px); border-radius: 18px; }
  #preview { width: 180px; }
  #status { top: 108px; max-width: calc(100vw - 48px); text-align: center; }
}
.hidden { display: none; }
