/* The camera overlay. Kept here rather than in each template so the three
   screens that scan cannot drift apart. */
.qrscan {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qrscan video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* A target to aim at. Purely a hint: the detector reads the whole frame, so
   a code outside the box still works and nobody is left wondering why their
   careful aim did nothing. */
.qrscan-frame {
  position: absolute;
  width: min(68vw, 300px);
  aspect-ratio: 1;
  border: 3px solid rgba(255, 255, 255, .85);
  border-radius: 18px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45);
}
.qrscan-hint {
  position: absolute;
  top: calc(50% + min(34vw, 150px) + 22px);
  margin: 0;
  color: #fff;
  font: 600 1.05rem/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
}
.qrscan-stop {
  position: absolute;
  bottom: max(28px, env(safe-area-inset-bottom));
  padding: 16px 30px;
  border-radius: 99px;
  border: none;
  background: #fff;
  color: #111;
  font: 700 1.05rem system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* The button that opens it, on whichever screen offers scanning. */
.qrscan-open {
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--sunk);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
}
.qrscan-open[hidden] { display: none; }
