/* Killer — scan + code styles (one owner, see docs/PLAN-MULTI-AGENTS.md §3.2). Use the tokens of style.css. */
.screen.scan { background: #000; padding: 0; gap: 0; color: #fff; overflow: hidden; }
.scan-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.scan-top { position: relative; padding: 16px 16px 24px; background: linear-gradient(#000c, #0000); }
.scan-top .title { margin: 0; font-size: 20px; text-align: center; color: #fff; text-shadow: 0 1px 4px #000; }
.scan-frame { position: absolute; left: 50%; top: 44%; width: min(72vw, 46vh); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .5); pointer-events: none; }
.scan-frame i { position: absolute; width: 30px; height: 30px; border: 0 solid var(--accent); }
.scan-frame i:nth-child(1) { left: 0; top: 0; border-width: 4px 0 0 4px; border-top-left-radius: 18px; }
.scan-frame i:nth-child(2) { right: 0; top: 0; border-width: 4px 4px 0 0; border-top-right-radius: 18px; }
.scan-frame i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 4px 4px; border-bottom-left-radius: 18px; }
.scan-frame i:nth-child(4) { right: 0; bottom: 0; border-width: 0 4px 4px 0; border-bottom-right-radius: 18px; }
.scan-bottom { position: absolute; left: 16px; right: 16px; bottom: var(--margin-bottom); display: flex; flex-direction: column; gap: 8px; }
.scan-status { margin: 0 0 4px; min-height: 40px; text-align: center; font-size: 15px; line-height: 1.3; text-shadow: 0 1px 4px #000; display: flex; align-items: flex-end; justify-content: center; }
.screen.scan .btn.scan-code { background: rgba(24, 28, 39, .92); color: #fff; }
.screen.scan .btn.ghost { color: #fff; background: rgba(0, 0, 0, .35); }
.screen.scan.failed .scan-status { color: #ffd5da; font-weight: 600; }
.screen.scan.failed .btn.scan-code { background: var(--accent); color: var(--accent-ink); }
.scan-timer { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: rgba(255, 255, 255, .2); }
.scan-idle { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; }
.scan-idle.run { animation: scan-idle 8s linear forwards; }
@keyframes scan-idle { to { transform: scaleX(0); } }

/* ---- the 4-digit code ---- */
.screen.code { max-width: 420px; margin: 0 auto; width: 100%; }
.code .btn.back { width: auto; min-height: 44px; padding: 0 12px; }
.code-boxes { display: flex; justify-content: center; gap: 10px; }
.code-box { width: 56px; height: 64px; border-radius: var(--radius); background: var(--panel); border: 2px solid var(--panel-2); display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.code-box.on { border-color: var(--accent); }
.keypad { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.key { appearance: none; border: 0; border-radius: var(--radius); min-height: clamp(56px, 8.4vh, 76px); background: var(--panel-2); color: var(--ink); font: inherit; font-size: 26px; font-weight: 700; touch-action: manipulation; }
.key:active:not(:disabled) { transform: scale(.96); }
.key.fn { font-size: 16px; background: var(--panel); }
.key.go { background: var(--accent); color: var(--accent-ink); }
.key:disabled { opacity: .4; }
