:root{color-scheme:light dark;--bg: #eef2f7;--card: #ffffff;--border: #e3e9f0;--text: #0f172a;--muted: #586579;--accent: #2563eb;--accent-press: #1d4ed8;--on-accent: #ffffff;--warn: #b45309;--warn-bg: #fcf1dd;--ok: #059669;--spot: rgba(37, 99, 235, .16);--spot-line: #2563eb}@media (prefers-color-scheme: dark){:root{--bg: #0f141e;--card: #1a2130;--border: #2a3444;--text: #e9eef6;--muted: #9aa7bc;--accent: #3b82f6;--accent-press: #60a5fa;--warn: #fbbf24;--warn-bg: #3a2e12;--ok: #34d399;--spot: rgba(59, 130, 246, .22);--spot-line: #3b82f6}}*{box-sizing:border-box}html,body{margin:0;height:100%}body{background:var(--bg);color:var(--text);font-family:Segoe UI,system-ui,-apple-system,Helvetica Neue,Arial,sans-serif;font-size:16px;line-height:1.6;-webkit-text-size-adjust:100%}#app{min-height:100dvh;display:flex;flex-direction:column}h1{margin:0 0 8px;font-size:21px;font-weight:600}p{margin:0 0 12px}.muted{color:var(--muted)}.small{font-size:14px}.center{text-align:center}.fineprint{font-size:13px;color:var(--muted);margin-top:16px}.eyebrow{font-size:13px;color:var(--muted);margin:0 0 4px}.doc-title{font-weight:600;margin:0 0 12px}.error{color:#dc2626;font-size:14px}@media (prefers-color-scheme: dark){.error{color:#f87171}}.hint{font-size:13px;color:var(--muted);margin:6px 0 0}.hint.warn{color:var(--warn)}.card{margin:auto;width:100%;max-width:440px;background:var(--card);border:1px solid var(--border);border-radius:14px;padding:28px 24px}.icon-badge{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;font-size:22px;font-weight:700;margin-bottom:14px}.icon-badge.ok{background:var(--ok);color:#fff}.icon-badge.warn{background:var(--warn-bg);color:var(--warn)}.field{display:block;margin:18px 0 0}.field>span{display:block;font-size:14px;color:var(--muted);margin-bottom:6px}.id-input{width:100%;height:52px;padding:0 14px;font-size:20px;letter-spacing:2px;font-variant-numeric:tabular-nums;direction:ltr;text-align:center;border-radius:10px;border:1px solid var(--border);background:var(--bg);color:var(--text)}.id-input:focus-visible{outline:3px solid var(--accent);outline-offset:1px}.btn{min-height:50px;padding:0 20px;border-radius:10px;border:1px solid transparent;font-size:16px;font-weight:600;font-family:inherit;cursor:pointer;background:transparent;color:var(--text);transition:background-color .12s ease,transform .12s ease}.btn.primary{background:var(--accent);color:var(--on-accent)}.btn.primary:active:not([disabled]){background:var(--accent-press);transform:scale(.985)}.btn.ghost{border-color:var(--border)}.btn.wide{width:100%;margin-top:18px}.btn[disabled]{opacity:.45;cursor:default}.btn:focus-visible{outline:3px solid var(--accent);outline-offset:2px}.row{display:flex;gap:10px;justify-content:center;margin-top:14px}.row .btn{flex:1;max-width:180px}.topbar{position:sticky;top:0;z-index:5;background:var(--card);border-bottom:1px solid var(--border);padding:10px 16px;display:flex;flex-direction:column}.topbar-title{font-weight:600;font-size:15px}.topbar-sub{font-size:13px;color:var(--muted)}.doc{flex:1;padding:12px}.pages{display:flex;flex-direction:column;gap:12px}.pageholder{position:relative;background:#fff;border:1px solid var(--border);border-radius:8px;overflow:hidden;line-height:0}.page{display:block;width:100%;height:auto}.spot{position:absolute;background:var(--spot);border:2px dashed var(--spot-line);border-radius:4px;display:grid;place-items:center;pointer-events:none}.spot span{font-size:11px;font-weight:600;line-height:1.2;color:var(--spot-line);background:var(--card);padding:2px 6px;border-radius:4px}.actionbar{position:sticky;bottom:0;background:var(--card);border-top:1px solid var(--border);padding:12px 16px calc(12px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:6px}.actionbar p{margin:0}.signwrap{flex:1;padding:16px;display:flex;flex-direction:column;justify-content:center}.padframe{position:relative;background:#fff;border:1px solid var(--border);border-radius:12px;height:min(46vh,320px);margin-top:10px}.padframe .padline{border-bottom-color:#cbd5e1}.pad{width:100%;height:100%;display:block}.padline{position:absolute;inset-inline:24px;bottom:46px;border-bottom:1px dashed var(--border);pointer-events:none}.spinner{width:30px;height:30px;margin:8px auto 14px;border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.spinner{animation-duration:2s}.btn{transition:none}}
