/* The QR-scanner overlay shell — shared between settings.html (scanning a
   hunt team's token) and hunt.html (the audio-recorder task overlay,
   which reuses this same dark full-screen modal chrome rather than
   building its own — see .audio-rec-inner in hunt-style.css). Pulled out
   into its own file rather than living in hunt-style.css (which also has
   a lot of hunt-page-only rules settings.html doesn't want) or being
   copy-pasted inline on settings.html itself, which only guarantees the
   two copies drift apart the next time this needs a change. */
.qr-scan-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 3100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.qr-scan-modal.show {
  display: flex;
}
.qr-scan-modal__inner {
  position: relative;
  width: 100%;
  max-width: 480px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  padding-bottom: 12px;
}
.qr-scan-modal__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.qr-scan-modal__reader {
  width: 100%;
  height: 100%;
}
/* html5-qrcode may wrap the video in its own container div — force that
   wrapper to fill the square too, not just the video inside it, in case
   the library sets it a fixed pixel size rather than 100%. */
.qr-scan-modal__reader > div {
  width: 100% !important;
  height: 100% !important;
}
/* html5-qrcode sizes/positions its own <video> via inline styles at
   runtime, so !important is needed to reliably override it — this is a
   known limitation of the library (see mebjas/html5-qrcode#449), not
   something a normal specificity bump can win against. */
.qr-scan-modal__reader video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}
/* The library's own default scan-region shading/border is plain and
   doesn't match the app's look — hide it and use our own decorative
   frame below instead. Purely cosmetic: doesn't touch the library's
   actual (still-active) scan region underneath.
   Two rules, deliberately overlapping: the first (direct children only)
   works everywhere; the second (:has(), Safari 16.4+) also reaches
   decorative elements nested one level inside a wrapper alongside the
   video, without needing to guess the library's exact class names,
   which risks changing across versions anyway. */
.qr-scan-modal__reader > *:not(video) {
  display: none !important;
}
.qr-scan-modal__reader *:not(video):not(:has(video)) {
  display: none !important;
}
.qr-scan-modal__frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 62%;
  aspect-ratio: 1 / 1;
  border: 3px solid #e07b39;
  border-radius: 16px;
  box-shadow: 0 0 0 2000px rgba(0,0,0,0.35);
  pointer-events: none;
}
.qr-scan-modal__status {
  text-align: center;
  color: #fff;
  font-size: 14px;
  margin: 8px 0 0;
  padding: 0 20px;
}
.qr-scan-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  color: #1c2b4a;
  border: none;
  font-size: 20px;
  line-height: 1;
}