:root{--bg: #0f172a;--surface: #1e293b;--surface-2: #334155;--text: #f1f5f9;--muted: #94a3b8;--accent: #38bdf8;--danger: #f87171;--radius: 12px}*{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;-webkit-font-smoothing:antialiased}.app{max-width:560px;margin:0 auto;padding:16px 16px 48px}.app-header h1{font-size:1.4rem;margin:0 0 4px}.subtitle{margin:0 0 16px;color:var(--muted);font-size:.85rem}.stage{display:flex;flex-direction:column;gap:16px}.camera-wrap{position:relative;width:100%;aspect-ratio:3 / 4;background:#000;border-radius:var(--radius);overflow:hidden}.camera-video{width:100%;height:100%;object-fit:cover;display:block}.card-overlay{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:90%;aspect-ratio:85.6 / 54;border:3px solid var(--accent);border-radius:10px;box-shadow:0 0 0 9999px #00000059;display:flex;align-items:flex-end;justify-content:center;pointer-events:none}.card-overlay-hint{margin-bottom:8px;padding:4px 8px;background:#0f172abf;border-radius:6px;font-size:.75rem;color:var(--text)}.controls{display:flex;flex-direction:column;gap:12px}.primary-button,.secondary-button{padding:14px 18px;border-radius:10px;font-size:1rem;font-weight:600;border:none;cursor:pointer}.primary-button{background:var(--accent);color:#04222f}.primary-button:disabled{opacity:.5;cursor:not-allowed}.secondary-button{background:var(--surface-2);color:var(--text)}.preview-image{width:100%;border-radius:var(--radius);border:1px solid var(--surface-2)}.spinner{width:36px;height:36px;margin:0 auto;border:4px solid var(--surface-2);border-top-color:var(--accent);border-radius:50%;animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.progress-text{text-align:center;color:var(--muted);font-size:.9rem;margin:0}.error-text{color:var(--danger);font-size:.9rem;margin:0}.result-card{background:var(--surface);border-radius:var(--radius);padding:16px}.result-card h2{margin:0 0 12px;font-size:1rem}.field-list{margin:0;display:flex;flex-direction:column;gap:10px}.field-list div{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--surface-2);padding-bottom:8px}.field-list div:last-child{border-bottom:none;padding-bottom:0}.field-list dt{color:var(--muted);font-size:.85rem}.field-list dd{margin:0;font-weight:600;text-align:right;word-break:break-word}.raw-text{margin:0;white-space:pre-wrap;word-break:break-word;font-size:.85rem;line-height:1.4;color:var(--text);background:var(--bg);padding:12px;border-radius:8px;max-height:280px;overflow:auto}
