.scan-launch { width:100%; margin:0 0 12px; min-height:44px; border:1px solid var(--line); border-radius:14px; background:var(--surface); color:var(--ink); font-size:14px; font-weight:750; }
.scan-dialog { width:min(100%,760px); max-width:none; margin:auto auto 0; padding:0; border-radius:26px 26px 0 0; background:var(--surface); color:var(--ink); max-height:94dvh; }
.scan-shell { display:flex; flex-direction:column; height:90dvh; max-height:900px; }
.scan-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 18px 8px; }
.scan-head h2 { margin:0; font-size:25px; }
.scan-body { padding:0 18px 18px; overflow-y:auto; min-height:0; flex:1; }
.scan-body p { line-height:1.45; }
.scan-muted { color:var(--muted); font-size:13px; }
.scan-actions { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.scan-actions button { flex:1 1 120px; min-height:44px; }
.scan-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.scan-card { position:relative; min-width:0; padding:8px; border:1px solid var(--line); border-radius:18px; }
.scan-card:has(input:checked) { border-color:var(--sage); box-shadow:inset 0 0 0 1px var(--sage); }
.scan-card .scan-photo { width:100%; border:0; padding:0; border-radius:12px; overflow:hidden; background:var(--lay); }
.scan-card img { width:100%; aspect-ratio:1; display:block; object-fit:contain; }
.scan-card strong { display:block; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin-top:6px; }
.scan-card small { display:block; color:var(--muted); font-size:12px; margin:3px 0; }
.scan-choose { position:absolute; top:15px; left:15px; z-index:1; padding:5px; border-radius:10px; background:var(--surface); }
.scan-choose input { display:block; width:22px; height:22px; accent-color:var(--hero); margin:0; }
.scan-reject { display:block; border:0; background:none; padding:8px 0; color:var(--muted); font-size:12px; }
.scan-card details summary { cursor:pointer; font-size:12px; color:var(--muted); padding:8px 0; }
.scan-alternate { padding-top:8px; border-top:1px solid var(--line); }
.scan-alternate img { max-height:100px; }
.scan-alternate button { display:block; width:100%; min-height:36px; padding:5px; margin-top:4px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); font-size:12px; }
.scan-footer { padding:10px 18px calc(14px + env(safe-area-inset-bottom,0px)); border-top:1px solid var(--line); background:var(--surface); }
.scan-footer button { min-height:48px; }
.scan-progress { margin:12px 0; padding:14px; background:var(--surface-2); border-radius:14px; }
.scan-progress progress { width:100%; margin-top:10px; accent-color:var(--hero); }
.scan-details { margin:12px 0; color:var(--muted); font-size:13px; }
.scan-details summary { cursor:pointer; min-height:32px; }
.scan-studio { width:100%; max-height:280px; object-fit:contain; display:block; border-radius:18px; background:var(--lay); }
.scan-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:14px 0; }
.scan-fields label { min-width:0; font-size:14px; font-weight:700; }
.scan-fields select { display:block; width:100%; min-height:44px; padding:9px; margin-top:6px; font-size:16px; background:var(--surface-2); border:1px solid var(--line); border-radius:10px; }
.scan-crop { position:relative; width:fit-content; max-width:100%; margin:12px auto; touch-action:none; user-select:none; }
.scan-crop img { display:block; width:auto; max-width:100%; max-height:50dvh; object-fit:contain; }
.scan-region { position:absolute; border:2px solid #fff; box-shadow:0 0 0 1px #222,inset 0 0 0 1px #222; pointer-events:none; background:rgba(255,255,255,.06); }
.scan-sliders { display:grid; grid-template-columns:1fr 1fr; gap:10px; font-size:13px; }
.scan-sliders input { width:100%; }
.scan-groups { display:flex; flex-wrap:wrap; gap:10px; }
.scan-groups label { padding:8px; font-size:14px; }
@media(min-width:600px){ .scan-grid{grid-template-columns:repeat(3,minmax(0,1fr));} }
