/* scanner: the live camera, the corner screen and the page preview. Class names start with sc-. */
.sc-body { overflow: hidden; }
.sc-live { position: absolute; inset: 0; background: #111; }
.sc-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sc-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sc-hint { position: absolute; left: 16px; right: 16px; top: 14px; padding: 8px 14px; border-radius: 12px; background: rgba(20, 24, 28, .72); color: #fff; font-weight: 600; text-align: center; }
.sc-flash { position: absolute; left: 14px; bottom: 14px; padding: 5px 12px; border-radius: 999px; background: rgba(20, 24, 28, .72); color: #fff; font-size: 13px; font-weight: 600; }
.sc-flash[data-state="on"] { background: #f28500; color: #1b1b1b; }
.sc-controls {
  flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: #14181c;
}
.sc-controls[hidden] { display: none; }
.sc-side { display: flex; align-items: center; }
.sc-side.right { justify-content: flex-end; }
.sc-shutter { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: #f28500; box-shadow: 0 0 0 3px #14181c inset; cursor: pointer; }
.sc-shutter:disabled { opacity: .4; }
.sc-shutter:active { transform: scale(.95); }
.sc-count { position: relative; width: 52px; height: 64px; padding: 0; border: 2px solid #fff; border-radius: 6px; overflow: hidden; background: #fff; cursor: pointer; }
.sc-count img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-count span { position: absolute; right: -2px; bottom: -2px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: #f28500; color: #1b1b1b; font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.sc-done { min-height: 48px; padding: 0 22px; }
.sc-layer { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: #20262b; color: #fff; }
.sc-layer .dp-bar { background: #14181c; color: #fff; border-color: #14181c; padding-left: 16px; }
.sc-adjust { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; overflow: auto; }
.sc-stage { position: relative; touch-action: none; flex: none; }
.sc-photo, .sc-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.sc-handle {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  background: rgba(242, 133, 0, .35); border: 3px solid #f28500; touch-action: none; cursor: grab;
}
.sc-handle::after { content: ""; position: absolute; inset: -14px; }
.sc-handle.on { background: rgba(242, 133, 0, .7); transform: scale(1.25); }
.sc-handle:focus-visible { outline: 3px solid #fff; }
.sc-note { font-size: 14px; text-align: center; max-width: 340px; color: #e8e8e8; }
.sc-modes { display: flex; gap: 8px; }
.sc-modes .tbl-chip { background: #2d353b; color: #fff; border-color: #4a545b; }
.sc-modes .tbl-chip.on { background: #f28500; color: #1b1b1b; border-color: #f28500; }
.sc-result { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.sc-layer .dp-foot { background: #14181c; border-color: #14181c; }
.sc-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; }
.sc-fb-card { background: var(--surface); color: var(--text); padding: 20px; border-radius: var(--radius); max-width: 360px; }
.sc-fb-card .btn { margin-top: 10px; }
.sc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sc-tile { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; aspect-ratio: 3 / 4; cursor: pointer; }
.sc-tile img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sc-tile span { position: absolute; left: 4px; top: 4px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--btn, #36454f); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
