:root {color-scheme:light;--bg:#fff;--fg:#25354a;--line:#ccd5df;--soft:#f4f6f9;--link:#275e9e;--control:#7b8898;--blue:#246db0;--orange:#b05c15;--purple:#7650a8;--notice:#fff5e6}
@media(prefers-color-scheme:dark){:root:not([data-theme]){color-scheme:dark;--bg:#121820;--fg:#e0e8f2;--line:#4e5d6d;--soft:#202b38;--link:#a6cbff;--control:#8296ab;--blue:#91c0f1;--orange:#ffbc79;--purple:#c9aff0;--notice:#342a1f}}
:root[data-theme=dark]{color-scheme:dark;--bg:#121820;--fg:#e0e8f2;--line:#4e5d6d;--soft:#202b38;--link:#a6cbff;--control:#8296ab;--blue:#91c0f1;--orange:#ffbc79;--purple:#c9aff0;--notice:#342a1f}
:root[data-theme=warm]{--bg:#fdfaf4;--fg:#302b24;--line:#ded3c2;--soft:#faf6ee;--link:#26678f;--control:#8f7c63;--notice:#fff0d8}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:var(--bg);color:var(--fg);font:16px/1.7 system-ui,sans-serif}main{max-width:960px;margin:auto;padding:24px}h1{font-size:1.8rem;line-height:1.3}h2,legend{font-size:1.15rem;font-weight:650}a{color:var(--link);overflow-wrap:anywhere}p{margin:.8em 0}details,fieldset{border:1px solid var(--line);border-radius:12px;padding:16px;margin:20px 0;min-width:0}summary{cursor:pointer;font-weight:600;min-height:28px}.fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}label{display:block}input[type=number]{display:block;width:100%;margin-top:5px;padding:9px;font:inherit;border:1px solid var(--control);border-radius:6px;background:var(--bg);color:inherit}.switches{margin:20px 0}.switches label{display:flex;align-items:center;gap:10px;min-height:44px}.switches input{flex:0 0 auto;width:20px;height:20px;margin:0}.switches label:has(input:disabled){opacity:.65}.presets{display:flex;flex-wrap:wrap;gap:10px}button{font:inherit;color:inherit;background:var(--soft);border:1px solid var(--control);border-radius:6px;padding:8px 14px;min-height:44px;cursor:pointer}a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible,pre:focus-visible{outline:3px solid var(--link);outline-offset:3px}.hint,figcaption{font-size:.9rem}.result{border:1px solid var(--line);border-radius:12px;background:var(--soft);padding:18px;margin:24px 0}#status{font-size:1.1rem;font-weight:700}#status[data-state=review],#status[data-state=invalid]{color:var(--orange)}figure{margin:16px 0}svg{display:block;width:100%;height:auto}svg text{font:13px system-ui,sans-serif;fill:var(--fg)}.pixel-axis{stroke:var(--control);stroke-width:1.2}.reference-guide{stroke:var(--control);stroke-dasharray:3 3}.observed-point{fill:var(--blue)}.matched-point{fill:var(--orange)}.projected-point{fill:var(--purple)}dl{display:grid;gap:10px;margin:20px 0}.coordinates{grid-template-columns:repeat(2,minmax(0,1fr))}dl>div{border:1px solid var(--line);padding:10px;border-radius:8px;min-width:0}dt{font-size:.9rem}dd{margin:3px 0 0;font-weight:650;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.notice{padding:12px;border-left:3px solid var(--orange);background:var(--notice)}pre{padding:14px;background:var(--soft);border:1px solid var(--line);border-radius:8px;overflow:auto;font-size:.9rem}footer{border-top:1px solid var(--line);margin-top:32px;padding-top:16px;font-size:.9rem}@media(max-width:650px){main{padding:18px}.fields,.metrics{grid-template-columns:1fr}.coordinates{grid-template-columns:1fr 1fr}h1{font-size:1.5rem}fieldset,details,.result{padding:12px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
