/* Explicit scoped colors resist the host's legacy global button rules. */
html body dialog.offinz-scanner{box-sizing:border-box;width:min(680px,calc(100vw - 24px));max-height:calc(100dvh - 24px);margin:auto;padding:22px;border:1px solid var(--ui-line,#c7cedd);border-radius:20px;background:var(--ui-surface,#fff)!important;color:var(--ui-text,#182238)!important;overflow:auto;overscroll-behavior:contain;box-shadow:0 24px 80px #0006}
.offinz-scanner::backdrop{background:#090f1dd9}
html body .offinz-scanner h2{font-size:22px!important;font-weight:800;line-height:1.3;margin:0 0 10px;color:inherit!important}
html body .offinz-scanner p{font-size:13px;line-height:1.5;color:var(--ui-muted,#536278)!important;overflow-wrap:anywhere;margin:10px 0}
html body .offinz-scanner .offinz-scan-stage{position:relative;max-width:100%;width:fit-content;margin:26px auto;background:#101621!important;touch-action:pan-y}
.offinz-scan-stage canvas{display:block;max-width:100%;max-height:48dvh;width:auto;height:auto;object-fit:contain}
.offinz-scan-stage svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
html body .offinz-scanner button{box-sizing:border-box;min-height:44px;padding:10px 14px;border:1px solid var(--ui-line,#c7cedd)!important;border-radius:12px;background:var(--ui-soft,#f3f5f9)!important;color:var(--ui-text,#182238)!important;font:inherit;font-size:13px;font-weight:700;line-height:1.4;white-space:normal;cursor:pointer;box-shadow:none!important}
html body .offinz-scanner button.offinz-scan-corner{position:absolute;transform:translate(-50%,-50%);width:44px;height:44px;min-width:44px;padding:0;border:2px solid #fff!important;border-radius:50%;background:#5145b5!important;color:#fff!important;touch-action:none;user-select:none}
html body .offinz-scanner [hidden]{display:none!important}
html body .offinz-scanner :focus-visible{outline:3px solid #a996ff!important;outline-offset:3px}
.offinz-scan-tools,.offinz-scan-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.offinz-scan-tools>button,.offinz-scan-actions>button{flex:1 1 140px;min-width:0}
html body .offinz-scanner [data-action=review],html body .offinz-scanner [data-action=use]{background:#5145b5!important;color:#fff!important;border-color:#5145b5!important}
@media(max-width:440px){html body dialog.offinz-scanner{padding:20px}.offinz-scan-stage canvas{max-height:38dvh}.offinz-scan-actions>button{flex-basis:100%}}
