:root{--bg:#e1dbc8;--navy:#16283c;--ink:#17283b;--green:#176c59;--line:#b3b0a5;font-family:system-ui,-apple-system,sans-serif;color:var(--ink);background:var(--bg);color-scheme:light}*{box-sizing:border-box}body{margin:0;min-height:100dvh;background:var(--bg);display:flex;flex-direction:column}button,input,textarea{font:inherit}button{border:1px solid #939ba5;border-radius:9px;background:linear-gradient(#fff,#e3e7e9 52%,#c7cdd2);box-shadow:0 2px 0 #929ba3;min-height:44px;padding:8px 11px;color:#152639;font-weight:650;cursor:pointer}button:active{transform:translateY(2px);box-shadow:none}button:disabled{opacity:.42;cursor:default}button.primary,button.green{color:white;border-color:#153b5c;background:linear-gradient(#356f9e,#17486e);box-shadow:0 2px 0 #10334e}button.green{background:linear-gradient(#329c7f,#176c59);border-color:#155b4c;box-shadow:0 2px 0 #124b40}button:focus-visible,input:focus-visible{outline:3px solid #48a7d2;outline-offset:2px}header{background:var(--navy);color:#fff;display:flex;align-items:center;gap:12px;padding:12px 14px;padding-top:max(12px,env(safe-area-inset-top));min-height:70px}header img{width:44px;height:44px;border-radius:8px}header div{flex:1}header strong{font-size:18px}header small{display:block;color:#cad5e1;font-size:10px;letter-spacing:1.6px;margin-top:3px}header button{min-width:44px}nav,.tools,.navigation{display:flex;gap:8px;align-items:center;justify-content:center;flex-wrap:wrap;padding:10px}.toolbar{background:#ffffff49;border-bottom:1px solid #9a998c}.filebar{display:flex;justify-content:space-between;gap:10px;padding:8px 14px;background:#fff9;font-size:13px;border-bottom:1px solid #bbb}#filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}main{flex:1;min-width:0}#welcome{text-align:center;padding:35px 20px;max-width:500px;margin:auto}#welcome img{width:100px;border-radius:18px;box-shadow:0 5px 15px #0003}h1{font-size:25px}p{line-height:1.5}.muted{color:#536171;font-size:13px}#viewer{overflow:auto;max-height:62dvh;min-height:160px;padding:12px;background:#202b3b32;text-align:center;overscroll-behavior:contain}#paper{position:relative;display:inline-block;background:white;box-shadow:0 3px 14px #0004;vertical-align:top}#page{display:block}#overlay{position:absolute;inset:0;touch-action:pan-x pan-y}#overlay.placing{touch-action:none;cursor:crosshair}.navigation,.tools{background:#ffffff60}.navigation input{width:56px;text-align:center}.navigation button{min-width:44px}#status{background:#f8f8f5;color:#32465b;border-top:1px solid #bcbfbf;padding:10px 14px max(10px,env(safe-area-inset-bottom));font-size:13px;overflow-wrap:anywhere}#placement{display:flex;justify-content:center;align-items:center;gap:9px;padding:10px;background:#fdf0be}dialog{border:1px solid #aeb8bf;border-radius:15px;width:min(94vw,560px);max-height:88dvh;overflow:auto;background:#fafafa;color:var(--ink);padding:16px;box-shadow:0 10px 45px #0005}dialog::backdrop{background:#102031aa}.dialoghead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}h2{font-size:18px;margin:0}input,textarea{border:1px solid #a6b0bd;border-radius:7px;min-height:44px;padding:9px;max-width:100%;background:#fff;color:var(--ink)}textarea{width:100%;resize:vertical}form{display:flex;flex-direction:column;gap:12px}label{display:flex;flex-direction:column;gap:5px;font-weight:600}#thumbnailList{display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:10px}.thumb{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:8px;min-width:0}.thumb canvas{max-width:100%;height:auto;background:white}.thumb.selected{outline:3px solid #1976ae;background:#d6eaf5}#results{display:grid;gap:8px;margin-top:10px}#results button{text-align:left;font-weight:500;overflow-wrap:anywhere}#signature{width:100%;height:auto;border:1px solid #a6b0bd;background:#fff;touch-action:none}input[type=color]{width:100%;height:50px}[hidden]{display:none!important}@media(min-width:800px){#workspace{max-width:1100px;margin:auto}#viewer{max-height:70dvh}.toolbar{gap:14px}}
