*{box-sizing:border-box;margin:0;padding:0}body{color:#333;background:#f5f5f5;min-height:100vh;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.wrapper{flex-direction:column;align-items:center;gap:1.5rem;max-width:800px;margin:0 auto;padding:2rem 1rem;display:flex}h1{font-size:1.5rem;font-weight:600}.btn{cursor:pointer;border:none;border-radius:.5rem;padding:.75rem 1.5rem;font-size:1rem;font-weight:500;transition:background .2s;display:inline-block}.btn-primary{color:#fff;background:#2563eb}.btn-primary:hover{background:#1d4ed8}.btn-secondary{color:#fff;background:#6b7280}.btn-secondary:hover{background:#4b5563}.btn:disabled{opacity:.5;cursor:not-allowed}.input-row{flex-wrap:wrap;justify-content:center;gap:1rem;display:flex}.input-row input[type=file]{display:none}.camera-container{flex-direction:column;align-items:center;gap:.75rem;width:100%;display:flex}.camera-container.hidden{display:none}.video-wrap{width:100%;max-width:640px;position:relative}.video-wrap video{background:#000;border-radius:.5rem;width:100%;display:block}.video-wrap .overlay{pointer-events:none;border-radius:.5rem;position:absolute;top:0;left:0}.camera-controls{gap:.75rem;display:flex}.camera-status{color:#6b7280;min-height:1.25rem;font-size:.875rem}.camera-status.scanning{color:#2563eb;font-weight:500}.camera-status.found{color:#16a34a;font-weight:500}.status{text-align:center;background:#fff;border-radius:.5rem;width:100%;max-width:400px;padding:1.5rem;box-shadow:0 1px 3px #0000001a}.status.hidden{display:none}.status-text{margin-bottom:.75rem;font-weight:500}progress{border-radius:.25rem;width:100%;height:.5rem}#result{width:100%}#result pre{background:#fff;border-radius:.5rem;padding:1rem;font-size:.875rem;line-height:1.5;overflow-x:auto;box-shadow:0 1px 3px #0000001a}#result .error{color:#dc2626;background:#fef2f2;border-radius:.5rem;padding:1rem}#result .success{background:#f0fdf4;border:1px solid #bbf7d0;border-radius:.5rem;margin-bottom:.5rem;padding:1rem}#preview{flex-direction:column;align-items:center;gap:.5rem;width:100%;display:flex}#preview canvas,#preview img{border-radius:.5rem;max-width:100%;box-shadow:0 1px 3px #0000001a}
