.receipt-scanner { --rsc-ink:#102b3a; --rsc-accent:#076b61; color:var(--rsc-ink); font:normal 16px/1.6 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; max-width:720px; margin:32px auto; }
.receipt-scanner *, .receipt-scanner *::before, .receipt-scanner *::after { box-sizing:border-box; }
.receipt-scanner [hidden] { display:none !important; }
.receipt-scanner h2 { font:700 clamp(1.5rem,5vw,2rem)/1.2 system-ui,sans-serif; color:inherit; margin:0 0 20px; letter-spacing:-.025em; }
.receipt-scanner p { margin:0 0 24px; }
.receipt-scanner button { appearance:none; font:600 1rem/1.4 system-ui,sans-serif; min-height:48px; border:2px solid transparent; border-radius:10px; padding:12px 22px; background:var(--rsc-accent); color:#fff; cursor:pointer; white-space:normal; }
.receipt-scanner button:disabled { opacity:.6; cursor:wait; }
.receipt-scanner button:focus-visible { outline:3px solid #e59b19; outline-offset:4px; }
.receipt-scanner .rsc-start-actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.receipt-scanner .rsc-upload { display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:12px 22px; border:2px solid var(--rsc-accent); border-radius:10px; color:var(--rsc-accent); font-weight:600; cursor:pointer; text-align:center; }
.receipt-scanner .rsc-file { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.receipt-scanner .rsc-upload:focus-within { outline:3px solid #e59b19; outline-offset:4px; }
.receipt-scanner .rsc-start,.receipt-scanner .rsc-preview,.receipt-scanner .rsc-success { border:1px solid #d5e0e5; border-radius:20px; padding:clamp(20px,5vw,40px); background:#fff; }
.receipt-scanner .rsc-privacy { font-size:.875rem; color:#4e6370; margin:24px 0 0; }
.receipt-scanner .rsc-camera { position:fixed; inset:0; z-index:999999; background:#000; color:#fff; }
.receipt-scanner video,.receipt-scanner .rsc-overlay { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.receipt-scanner .rsc-overlay { pointer-events:none; }
.receipt-scanner .rsc-close { position:absolute; right:max(20px,env(safe-area-inset-right)); top:max(20px,env(safe-area-inset-top)); background:#152b36e8; border-color:#a1b0b9; }
.receipt-scanner .rsc-camera-controls { position:absolute; bottom:0; left:0; width:100%; padding:24px 20px max(28px,env(safe-area-inset-bottom)); text-align:center; background:linear-gradient(transparent,#000c 25%); }
.receipt-scanner .rsc-camera-status { margin:20px 0; font-weight:600; text-shadow:0 1px 4px #000; }
.receipt-scanner .rsc-manual { background:#fff; color:#102b3a; }
.receipt-scanner .rsc-preview img { display:block; max-width:100%; max-height:65vh; width:auto; margin:0 auto 24px; object-fit:contain; border:1px solid #d5e0e5; }
.receipt-scanner .rsc-edit-canvas { display:block; width:100%; max-height:65vh; object-fit:contain; touch-action:none; background:#111; }
.receipt-scanner .rsc-editor-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:18px; }
.receipt-scanner .rsc-detection-status { display:inline-block; margin:0 0 20px; padding:8px 12px; border-radius:8px; background:#eef3f5; color:#425b67; font-size:.9375rem; }
.receipt-scanner .rsc-detection-status.is-success { background:#e3f5ed; color:#0b674d; }
.receipt-scanner .rsc-detection-status.is-fallback { background:#fff3da; color:#7a5100; }
.receipt-scanner .rsc-actions { display:flex; flex-wrap:wrap; gap:12px; }
.receipt-scanner .rsc-secondary { color:var(--rsc-accent); background:#fff; border-color:var(--rsc-accent); }
.receipt-scanner .rsc-message { margin:18px 8px; overflow-wrap:anywhere; }
.receipt-scanner .rsc-honeypot { position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }
.receipt-scanner.rsc-sending .rsc-send::before { content:""; display:inline-block; width:1em; height:1em; margin-right:10px; vertical-align:-.15em; border:2px solid #ffffff60; border-top-color:#fff; border-radius:50%; animation:rsc-spin 1s linear infinite; }
@keyframes rsc-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .receipt-scanner.rsc-sending .rsc-send::before { animation:none; } }
@media(max-width:480px) { .receipt-scanner { margin:16px auto; } .receipt-scanner .rsc-actions button,.receipt-scanner .rsc-start-actions > * { width:100%; } }
