.document-scan{box-sizing:border-box;width:min(760px,96vw);max-height:94dvh;overflow:auto;border:1px solid #cbdcdd;border-radius:16px;padding:20px;color:var(--text,#142032);background:var(--card,#fff)}
.document-scan::backdrop{background:rgba(8,20,26,.7)}
.document-scan header,.document-scan footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.document-scan h2{margin:0;font-size:20px}.document-scan p{font-size:14px;line-height:1.5;margin:10px 0}.document-scan button{min-height:44px;touch-action:manipulation}.scan-status{font-size:14px;min-height:24px;margin-bottom:16px}.scan-stage{position:relative;width:fit-content;max-width:calc(100% - 32px);margin:24px auto;background:#16252a;line-height:0}.scan-stage canvas{display:block;width:auto;height:auto;max-width:100%;max-height:46dvh;touch-action:none}.scan-handles{position:absolute;inset:0;pointer-events:none}.scan-handles button{position:absolute;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;border:3px solid #fff;background:#007e69;color:#fff;font-weight:700;pointer-events:auto;touch-action:none;padding:0}.scan-handles button[aria-pressed=true]{background:#1154bb;box-shadow:0 0 0 3px #fff9}.scan-corners,.scan-tools{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.scan-corners button[aria-pressed=true]{outline:2px solid #008572}.document-scan footer{position:sticky;bottom:-20px;padding:12px 0;background:inherit}.document-scan [hidden]{display:none!important}@media(max-width:540px){.document-scan{width:100%;max-width:100%;max-height:100dvh;border-radius:12px 12px 0 0;padding:16px;margin:auto 0 0}.scan-corners button{flex:1;padding:8px 4px}.scan-tools button{flex:1 1 40%}.document-scan footer{bottom:-16px}.scan-stage canvas{max-height:38dvh}}
