.scanner-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: #1d1116;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.14);
  transition: box-shadow .2s ease;
}

.scanner-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-guide {
  position: absolute;
  inset: 10%;
  border: 2px solid rgba(99,255,166,.8);
  border-radius: 14px;
  box-shadow: 0 0 0 999px rgba(22,8,14,.2), inset 0 0 18px rgba(20,220,111,.12);
  overflow: hidden;
  pointer-events: none;
}

.scanner-frame.is-full-frame .scanner-guide { inset: 3%; border-color: #f6d860; box-shadow: 0 0 0 999px rgba(22,8,14,.08), inset 0 0 18px rgba(246,216,96,.12); }

.scanner-target-box { position: absolute; z-index: 3; border: 3px solid #35f28c; border-radius: 9px; background: rgba(53,242,140,.12); box-shadow: 0 0 8px #35f28c, 0 0 22px rgba(53,242,140,.75); pointer-events: none; transition: left .1s, top .1s, width .1s, height .1s; }

.scanner-frame.is-detected {
  box-shadow: inset 0 0 0 4px #35f28c, 0 0 24px rgba(53,242,140,.4);
}

.scanner-frame.is-detected .scanner-guide { border-color: #35f28c; }

.scanner-detected {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 86%;
  padding: .6rem .9rem;
  border: 1px solid rgba(142,255,194,.9);
  border-radius: 12px;
  color: #082b19;
  background: rgba(213,255,230,.94);
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,.25);
}

.scanner-detected span { display: block; font-size: .75rem; font-weight: 800; }
.scanner-detected strong { display: block; margin-top: .15rem; font-size: 1.05rem; letter-spacing: .06em; overflow-wrap: anywhere; }
