/* The document scanner (docscan.js): full screen over everything, the camera or the photo, then a bar of buttons.
   Used by the portal and by the phone's scan page (/m/docscan.html), so it brings its own fallbacks. */
.docscan { position: fixed; inset: 0; z-index: 60; background: #0b0f11; color: #fff; display: flex; flex-direction: column; }
.docscan > div { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ds-view, .ds-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; }
.ds-view video { width: 100%; height: 100%; object-fit: contain; }
.ds-guide { position: absolute; height: min(80%, 120vw); aspect-ratio: 1 / 1.414; border: 2px dashed rgba(255,255,255,.7); border-radius: 4px; pointer-events: none; }
.ds-msg { max-width: 34ch; margin: 0 16px; font-size: 16px; line-height: 1.45; text-align: center; }
.ds-tip { margin: 0; padding: 10px 16px 0; text-align: center; font-size: 14px; color: #cfd8dc; }
.ds-stage canvas, .ds-quad { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); }
.ds-stage canvas { object-fit: contain; } /* the overlay's viewBox fits the same way (xMidYMid meet), so they line up */
.ds-quad polygon { fill: rgba(45, 189, 182, .14); stroke: #2dbdb6; }
.ds-quad circle { fill: rgba(255,255,255,.9); stroke: #2dbdb6; cursor: grab; }
.ds-strip { display: flex; gap: 8px; padding: 8px 16px; overflow-x: auto; background: #151b1e; flex: none; }
.ds-strip figure { position: relative; margin: 0; flex: none; }
.ds-strip img { display: block; height: 72px; border-radius: 2px; background: #fff; }
.ds-strip figcaption { position: absolute; left: 4px; bottom: 2px; font: 600 11px var(--mono, monospace); color: #000; background: rgba(255,255,255,.85); padding: 0 3px; border-radius: 2px; }
.ds-strip [data-rm] { position: absolute; top: 2px; right: 2px; padding: 0 5px; min-height: 0; line-height: 18px; }
.ds-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; padding: 12px 16px max(14px, env(safe-area-inset-bottom)); background: #151b1e; flex: none; }
.ds-bar .btn { min-height: 40px; }
.ds-bar .ds-shot { min-width: 160px; }
.ds-modes { display: inline-flex; gap: 0; }
.ds-modes label { display: block; cursor: pointer; }
.ds-modes input { position: absolute; opacity: 0; pointer-events: none; }
.ds-modes span { display: inline-block; padding: 9px 12px; background: #fff; color: var(--ink, #0e2a36); border: 1.5px solid #c9d1d4; margin-left: -1.5px; font-size: 13px; font-weight: 500; }
.ds-modes label:first-child span { border-radius: var(--r-sm, 3px) 0 0 var(--r-sm, 3px); margin-left: 0; }
.ds-modes label:last-child span { border-radius: 0 var(--r-sm, 3px) var(--r-sm, 3px) 0; }
.ds-modes input:checked + span { background: var(--accent, #076a76); border-color: var(--accent, #076a76); color: var(--on-accent, #fff); }
.ds-modes input:focus-visible + span { outline: 2px solid #2dbdb6; outline-offset: 2px; }
[data-docscan] .ico, [data-docphone] .ico { width: 15px; height: 15px; margin-right: 4px; vertical-align: -3px; }
/* the PC's "Scan with phone" window: the documents that came back from the phone */
.pd-got { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.pd-got:empty { display: none; }
.pd-got li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.pd-got .ok { color: var(--green, #1f7a3e); }
