/* The scan-a-card overlay: a full-screen camera view with a framing square,
   a caption, a message line, and a confirm card. Matches Cala's calm look. */
.scan {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  color: #fff;
}
.scan__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scan__canvas { display: none; }
.scan__file { display: none; }
.scan__frame {
  position: relative;
  width: min(70vw, 260px);
  aspect-ratio: 1 / 1;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.45);
}
.scan__caption,
.scan__msg { position: relative; margin: 0; text-align: center; }
.scan__msg { min-height: 1.2em; color: #ffd9d9; }
.scan__actions,
.scan__confirm-actions { position: relative; display: flex; gap: 12px; }
.scan__photo,
.scan__cancel,
.scan__add,
.scan__back {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font: inherit;
  cursor: pointer;
}
.scan__photo { background: rgba(255, 255, 255, 0.18); color: #fff; }
.scan__cancel { background: rgba(255, 255, 255, 0.12); color: #fff; }
.scan__back { background: #eee; color: #111; }
.scan__confirm {
  position: relative;
  background: #fff;
  color: #111;
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  max-width: 320px;
}
.scan__add { background: #111; color: #fff; }
.scan__q { margin: 0 0 14px; font-size: 1.05rem; }

/* The Scan button lives in the Sharing pop-up, styled to match .modal__invite. */
.modal__scan {
  width: 100%;
  margin-top: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
}
.modal__scan:active { background: #f3f3f3; }
