/* ── SELFIE SCAN SCREENS (loaded after styles.css) ────── */
:root { --scan: #4ADE80; }

.btn-outline { background: transparent; border: 1.5px solid rgba(18,18,18,0.15); color: var(--ink); }
.btn-outline:hover { opacity: 1; border-color: rgba(18,18,18,0.3); }
.sc-btn-row { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
a.skip { text-align: center; text-decoration: underline; color: var(--ink3); margin-top: 14px; }

/* intro */
.sc-guide { width: 170px; height: 208px; margin: 4px auto 20px; display: block; }
.sc-tips { list-style: none; display: grid; gap: 8px; margin: 0 0 20px; padding: 0; }
.sc-tips li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink2); background: var(--bg2); border-radius: var(--radius-sm); padding: 10px 12px; }
.sc-tips li span:first-child { flex: none; }
.sc-privacy { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--ink3); margin-top: 14px; }

/* preview */
.sc-frame { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: #111; }
.sc-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* scanning (dark full-bleed panel; .screen pads 28px 20px 120px) */
.scan-wrap { background: #121212; color: #fff; margin: -28px -20px -120px; padding: 22px 20px 48px; min-height: calc(100dvh - 52px); }
.scan-wrap .eyebrow { color: rgba(255,255,255,.5); }
.scan-wrap h2 { color: #fff; }
.scan-frame { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: #000; margin: 14px 0 16px; }
.scan-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) contrast(1.05); }
.scan-dim { position: absolute; inset: 0; background: radial-gradient(ellipse 42% 36% at 50% 46%, rgba(0,0,0,0) 60%, rgba(0,0,0,.55) 100%); }
.scan-oval { position: absolute; left: 50%; top: 46%; width: 66%; height: 62%; transform: translate(-50%, -50%); border: 1.5px dashed rgba(74,222,128,.75); border-radius: 50% / 46%; animation: scPulse 2.2s ease-in-out infinite; }
@keyframes scPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.scan-corner { position: absolute; width: 22px; height: 22px; border: 2.5px solid var(--scan); }
.scan-corner.tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.scan-corner.tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; }
.scan-corner.bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; }
.scan-corner.br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }
.scan-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--scan); box-shadow: 0 0 18px 4px rgba(74,222,128,.55); animation: scSweep 2.6s ease-in-out infinite; }
@keyframes scSweep { 0% { top: 4%; } 50% { top: 94%; } 100% { top: 4%; } }
.scan-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(74,222,128,.10) 1px, transparent 1px), linear-gradient(90deg, rgba(74,222,128,.10) 1px, transparent 1px); background-size: 28px 28px; mix-blend-mode: screen; opacity: 0; transition: opacity .6s; }
.scan-frame.phase2 .scan-grid { opacity: 1; }
.scan-eye-band { position: absolute; left: 22%; right: 22%; top: 44%; height: 12%; border: 1.5px solid rgba(74,222,128,.9); border-radius: 10px; background: rgba(74,222,128,.08); opacity: 0; transition: opacity .5s; }
.scan-eye-band::before { content: attr(data-label); position: absolute; left: 0; top: -20px; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--scan); }
.scan-frame.phase2 .scan-eye-band { opacity: 1; }
.sc-dot { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--scan); box-shadow: 0 0 8px rgba(74,222,128,.9); opacity: 0; animation: scBlink 1.6s ease-in-out infinite; }
.scan-frame.phase2 .sc-dot { opacity: 1; }
@keyframes scBlink { 0%,100% { transform: scale(.6); opacity: .4; } 50% { transform: scale(1.1); opacity: 1; } }
.scan-readout { position: absolute; left: 12px; bottom: 12px; right: 12px; display: flex; justify-content: space-between; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--scan); letter-spacing: .5px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.scan-steps { display: grid; gap: 6px; }
.scan-step { display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(255,255,255,.4); padding: 7px 0; transition: color .3s; }
.scan-step.active { color: #fff; }
.scan-step.done { color: var(--scan); }
.scan-step .ck { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.18); display: grid; place-items: center; font-size: 11px; flex: none; transition: all .3s; }
.scan-step.active .ck { border-color: var(--scan); border-top-color: transparent; animation: scSpin .8s linear infinite; }
.scan-step.done .ck { background: var(--scan); border-color: var(--scan); color: #063; animation: none; }
@keyframes scSpin { to { transform: rotate(360deg); } }
.scan-bar { height: 4px; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden; margin: 14px 0 4px; }
.scan-bar div { height: 100%; width: 0; background: var(--scan); transition: width .5s ease; }
.scan-foot { font-size: 12px; color: rgba(255,255,255,.45); text-align: center; margin-top: 10px; }

/* reveal */
.ba-slider { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: #111; margin: 14px 0 10px; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.ba-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ba-slider .after { clip-path: inset(0 0 0 50%); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); transform: translateX(-50%); pointer-events: none; }
.ba-handle::after { content: "⇔"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-size: 16px; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.ba-tag { position: absolute; top: 12px; padding: 5px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; pointer-events: none; }
.ba-tag.l { left: 12px; background: rgba(0,0,0,.6); color: #fff; }
.ba-tag.r { right: 12px; background: var(--green); color: #fff; }
.ba-hint { text-align: center; font-size: 12px; color: var(--ink3); margin-bottom: 16px; }
.sc-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 16px; }
.sc-tile { background: var(--bg2); border-radius: var(--radius-sm); padding: 12px; }
.sc-tile .t-label { font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--ink3); }
.sc-tile .t-val { font-family: var(--serif); font-size: 24px; font-weight: 700; margin-top: 2px; line-height: 1.15; }
.sc-tile .t-sub { font-size: 11.5px; color: var(--ink3); margin-top: 2px; }
.sc-tile.good .t-val { color: var(--green); }
.sc-tile.full { grid-column: 1 / -1; }
.t-bar { height: 6px; background: var(--bg3); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.t-bar div { height: 100%; background: var(--ink); border-radius: 99px; width: 0; transition: width 1.2s ease; }
.sc-tile.good .t-bar div { background: var(--green); }
.sc-callout { background: var(--green-soft); border-left: 3px solid var(--green); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 12px 14px; font-size: 14px; margin: 0 0 18px; }
.sc-callout b { color: var(--green); }
.sc-disclaimer { font-size: 11.5px; color: var(--ink3); line-height: 1.5; margin-top: 14px; }

/* fail */
.sc-err { width: 56px; height: 56px; border-radius: 50%; background: var(--bg2); display: grid; place-items: center; margin: 24px auto 16px; font-size: 24px; }

/* in-page selfie camera (scan-camera screen) */
.cam-frame { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: #000; margin: 14px 0 14px; }
.cam-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cam-status { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.7); font-size: 14px; background: #000; }
.cam-status[hidden] { display: none; }
.cam-hint { text-align: center; font-size: 14px; color: rgba(255,255,255,.7); margin: 0 0 16px; }
.cam-shutter { width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; background: transparent; padding: 5px; margin: 0 auto; display: block; cursor: pointer; }
.cam-shutter::before { content: ""; display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; }
.cam-shutter:active::before { transform: scale(.9); }
.cam-shutter:disabled { opacity: .35; cursor: default; }
.cam-links { display: flex; justify-content: center; gap: 28px; margin-top: 18px; }
.cam-links button { background: none; border: 0; padding: 4px; color: rgba(255,255,255,.75); text-decoration: underline; font-size: 14px; font-family: inherit; cursor: pointer; }
