.scan-clean { text-align: start; }
.scan-clean .sc-controls { min-inline-size: 0; padding: 0; border: 0; margin: 0; }
.scan-clean .sc-heading { display: flex; align-items: end; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; margin-bottom: 12px; }
.scan-clean h2, .scan-clean h3 { margin: 0; line-height: 1.25; letter-spacing: -.035em; }
.scan-clean h2 { font-size: 1.35rem; }
.scan-clean h3 { font-size: 1.04rem; margin-bottom: 8px; }
.scan-clean .sc-field { display: grid; gap: 3px; min-width: 0; max-width: 100%; font-size: .83rem; font-weight: 620; }
.scan-clean .sc-heading .sc-field { width: min(100%, 370px); }
.scan-clean .sc-field select { width: 100%; min-width: 0; text-overflow: ellipsis; font-weight: 450; }
.scan-clean .sc-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.scan-clean figure { min-width: 0; margin: 0; }
.scan-clean figcaption { display: flex; align-items: center; justify-content: space-between; gap: 3px; font-size: .84rem; font-weight: 650; }
.scan-clean .sc-enlarge { background: transparent; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; font-size: .78rem; padding: 4px 2px; min-height: 40px; }
.scan-clean .sc-stage { display: grid; place-items: center; background: #edf0ea; border: 1px solid #dee3d9; border-radius: 8px; padding: 8px; height: clamp(150px, 32vw, 365px); }
.scan-clean .sc-stage canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; min-height: 0; min-width: 0; object-fit: contain; box-shadow: 0 1px 4px #242b1d30; }
.scan-clean .sc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; }
.scan-clean .sc-options { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.scan-clean .sc-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 3px; font-size: .93rem; }
.scan-clean .sc-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--red); }
.scan-clean .sc-notice, .scan-clean .sc-error { margin: 8px 0 12px; font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.scan-clean .sc-error { color: #9c2e25; margin-bottom: 0; }
.scan-clean .sc-error:empty { display: none; }
.scan-clean .sc-actions { margin-top: 8px; }
.scan-clean .sc-dialog { width: fit-content; max-width: min(94vw, 1150px); max-height: 90vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg); color: var(--ink); }
.scan-clean .sc-dialog::backdrop { background: #1e251fcc; }
.scan-clean .sc-dialog-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; position: sticky; left: 0; top: -12px; background: var(--bg); padding-block: 4px; }
.scan-clean .sc-dialog-head h3 { margin: 0; }
.scan-clean .sc-full { max-width: 100%; overflow: auto; }
.scan-clean .sc-full canvas { display: block; max-width: none; background: white; }
@media (max-width: 600px) {
  .scan-clean .sc-heading { display: grid; grid-template-columns: minmax(0, 1fr); }
  .scan-clean .sc-heading .sc-field { width: 100%; }
  .scan-clean .sc-comparison { gap: 6px; }
  .scan-clean .sc-stage { height: clamp(135px, 44vw, 235px); padding: 4px; }
  .scan-clean .sc-field select { min-height: 44px; }
  .scan-clean .sc-enlarge { min-height: 44px; }
}
@media (max-width: 380px) {
  .scan-clean .sc-grid { grid-template-columns: minmax(0, 1fr); }
}
