:root{--bg:#f4f5f7;--card:#ffffff;--ink:#16181d;--sub:#6b7280;--line:#e3e5ea;--brand:#1f4fd8;--brand-ink:#ffffff;--mine:#1f4fd8;--theirs:#d9660a;--ok:#12804a;--danger:#c62828;--kakao:#fee500}*{box-sizing:border-box}body,html{margin:0}body{background:var(--bg);color:var(--ink);font-family:Pretendard,Malgun Gothic,Apple SD Gothic Neo,system-ui,sans-serif;font-size:15px;line-height:1.5;-webkit-text-size-adjust:100%}h1{font-size:22px;margin:0}h2{font-size:16px;margin:0 0 12px}a{color:var(--brand)}.wrap{max-width:980px;margin:0 auto;padding:24px 16px 120px}.top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px;flex-wrap:wrap}.card{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:20px;margin-bottom:16px}.muted{color:var(--sub);font-size:13px}.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.grow{flex:1 1}.err{color:var(--danger);font-size:14px;margin:8px 0 0}.btn,button{font:inherit;cursor:pointer;border-radius:8px;border:1px solid var(--line);background:#fff;color:var(--ink);padding:9px 14px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;white-space:nowrap}.btn:hover,button:hover{background:#f7f8fa}button:disabled{opacity:.5;cursor:not-allowed}.primary{background:var(--brand);border-color:var(--brand);color:var(--brand-ink);font-weight:600}.primary:hover{background:#1a44bd}.kakao{background:var(--kakao);border-color:var(--kakao);color:#191600;font-weight:600}.kakao:hover{background:#f2da00}.ghost-danger{color:var(--danger)}.on{outline:2px solid var(--brand);outline-offset:1px}label.f{display:block;font-size:13px;color:var(--sub);margin-bottom:12px}input[type=file],input[type=password],input[type=text]{display:block;width:100%;margin-top:4px;font:inherit;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink)}.btn:focus-visible,button:focus-visible,input:focus-visible{outline:2px solid var(--brand);outline-offset:2px}.grid2{display:grid;grid-template-columns:1fr 1fr;grid-gap:0 12px;gap:0 12px}@media (max-width:600px){.grid2{grid-template-columns:1fr}}.list{list-style:none;margin:0;padding:0}.list li{border-top:1px solid var(--line)}.list li:first-child{border-top:0}.list a{display:flex;gap:12px;align-items:center;padding:14px 4px;color:inherit;text-decoration:none}.list a:hover{background:#fafbfc}.badge,.list .t{font-weight:600}.badge{font-size:12px;padding:3px 9px;border-radius:999px;white-space:nowrap}.badge.draft{background:#eceef2;color:#4b5563}.badge.sent{background:#fff1e0;color:#a34d00}.badge.completed{background:#e2f5ea;color:var(--ok)}.pages{display:flex;flex-direction:column;gap:14px}.page{position:relative;width:100%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.14)}.page canvas{width:100%;height:100%;display:block}.page .ov,.page canvas{position:absolute;inset:0}.page .ov{touch-action:pan-y}.page .ov.placing{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg fill='%23c62828' stroke='white' stroke-width='1'%3E%3Ccircle cx='16' cy='8' r='6'/%3E%3Cpath d='M13 13h6l2 8H11z'/%3E%3Crect x='6' y='20' width='20' height='6' rx='1.5'/%3E%3Crect x='6' y='28' width='20' height='3'/%3E%3C/g%3E%3C/svg%3E") 16 30,pointer}.pageno{right:6px;bottom:-12px;font-size:11px;color:var(--sub)}.fld,.pageno{position:absolute}.fld{border:1.5px dashed var(--c);background:color-mix(in srgb,var(--c) 10%,transparent);border-radius:4px;display:flex;align-items:center;justify-content:center;color:var(--c);font-size:clamp(9px,1.4vw,13px);font-weight:600;-webkit-user-select:none;-moz-user-select:none;user-select:none;overflow:visible;padding:0;min-height:0;line-height:1.1;text-align:center}.fld.owner{--c:var(--mine)}.fld.counterparty{--c:var(--theirs)}.fld.filled{background:transparent;border-style:solid;border-color:color-mix(in srgb,var(--c) 45%,transparent)}.fld.plain{border:0;background:transparent;pointer-events:none}.fld.edit{cursor:-webkit-grab;cursor:grab;touch-action:none}.fld.stampable,.fld.tap{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg fill='%23c62828' stroke='white' stroke-width='1'%3E%3Ccircle cx='16' cy='8' r='6'/%3E%3Cpath d='M13 13h6l2 8H11z'/%3E%3Crect x='6' y='20' width='20' height='6' rx='1.5'/%3E%3Crect x='6' y='28' width='20' height='3'/%3E%3C/g%3E%3C/svg%3E") 16 30,pointer}.stamp-hint{gap:.3em;color:#c62828;font-weight:700;line-height:1.1;pointer-events:none;background:#fff;padding:3px 8px 3px 3px;border-radius:999px;box-shadow:0 1px 4px rgba(0,0,0,.25);white-space:nowrap}.seal,.stamp-hint{display:inline-flex;align-items:center}.seal{justify-content:center;flex:none;width:1.7em;height:1.7em;border:2px solid #c62828;border-radius:50%}.fld.tap:not(.filled){animation:pulse 1.6s ease-in-out infinite}@keyframes pulse{50%{background:color-mix(in srgb,var(--c) 22%,transparent)}}@media (prefers-reduced-motion:reduce){.fld.tap:not(.filled){animation:none}}.fld img{width:100%;height:100%;object-fit:contain;pointer-events:none;display:block}.fld.t-date img,.fld.t-text img{object-position:left center}.fld .x{top:-11px;right:-11px;width:22px;height:22px;min-height:0;padding:0;border-radius:50%;background:var(--danger);border:0;color:#fff;font-size:13px;line-height:1}.fld .rs,.fld .x{position:absolute}.fld .rs{right:-6px;bottom:-6px;width:14px;height:14px;background:var(--c);border-radius:3px;cursor:nwse-resize;touch-action:none}.toolbar{position:-webkit-sticky;position:sticky;top:0;z-index:20;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin-bottom:14px}.toolbar .dot{width:9px;height:9px;border-radius:50%;display:inline-block}.bottombar{position:fixed;left:0;right:0;bottom:0;z-index:30;background:var(--card);border-top:1px solid var(--line);padding:12px 16px calc(12px + env(safe-area-inset-bottom))}.bottombar .in{max-width:980px;margin:0 auto;display:flex;gap:10px;align-items:center;flex-wrap:wrap}.check{display:flex;gap:8px;align-items:flex-start;font-size:14px;cursor:pointer}.check input{width:18px;height:18px;margin-top:2px}.modal-bg{position:fixed;inset:0;background:rgba(15,18,25,.5);z-index:50;display:flex;align-items:flex-end;justify-content:center}@media (min-width:640px){.modal-bg{align-items:center}}.modal{background:#fff;width:100%;max-width:560px;border-radius:16px 16px 0 0;padding:18px;max-height:92vh;overflow:auto}@media (min-width:640px){.modal{border-radius:16px}}.tabs{display:flex;gap:6px;margin-bottom:12px}.tabs button{flex:1 1}.pad{width:100%;aspect-ratio:5/2;touch-action:none;display:block}.pad,.stamp-prev{border:1px solid var(--line);border-radius:10px;background:#fcfcfd}.stamp-prev{display:flex;justify-content:center;padding:14px}.stamp-grid{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:8px;gap:8px}.stamp-opt{flex-direction:column;gap:6px;padding:14px 6px 10px;min-height:0;font-weight:600;white-space:normal;border-width:2px;background:#f7f7f8}.stamp-empty,.stamp-opt img{width:96px;height:96px;max-width:100%;display:block;object-fit:contain}.stamp-opt img.sample{opacity:.4}.stamp-opt.on{border-color:var(--brand);background:#eef3ff}.seg{display:inline-flex;background:#eceef2;border-radius:10px;padding:3px;gap:2px}.seg button{border:0;background:transparent;min-height:36px;padding:6px 16px;font-weight:600;color:var(--sub)}.seg button.on{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.15)}.choice{display:grid;grid-gap:10px;gap:10px}.choice button{min-height:64px;font-size:18px;font-weight:700;justify-content:center;gap:10px;border-width:2px}.choice button .ico{font-size:22px;color:#c5221b}.choice button.sub{min-height:44px;font-size:14px;font-weight:500;border-width:1px}.choice .reuse img{height:44px;width:70px;object-fit:contain}.big{min-height:48px;font-size:16px;padding:10px 22px}.gate{width:100%;max-width:420px;text-align:center}.gate h1{margin-top:0}.gate input{width:100%;font:inherit;font-size:18px;padding:14px;border:1px solid var(--line);border-radius:10px;margin:8px 0 14px;text-align:center}.gate button{width:100%}.stamp-prev canvas,.stamp-prev img{width:130px;height:130px;object-fit:contain}.events{list-style:none;padding:0;margin:0;font-size:14px}.events li{padding:7px 0;border-top:1px solid var(--line);display:flex;gap:12px;flex-wrap:wrap}.events li:first-child{border-top:0}.events time{color:var(--sub);min-width:150px}.hash{font-size:11.5px;color:var(--sub)}.hash,.linkbox{font-family:ui-monospace,Consolas,monospace;word-break:break-all}.linkbox{font-size:12.5px;background:#f4f5f7;border-radius:8px;padding:10px 12px;margin:10px 0}.center{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px}