.ed{z-index:200;background:var(--surface-2);color:var(--ink);grid-template-rows:auto auto minmax(0,1fr);display:grid;position:fixed;top:0;bottom:0;left:0;right:0}.ed[hidden]{display:none!important}body.ed-open{overflow:hidden}.ed-top{height:58px;padding:0 14px;padding-top:env(safe-area-inset-top,0px);background:var(--surface);border-bottom:1px solid var(--line);align-items:center;gap:10px;min-width:0;display:flex}.ed-top .file{align-items:center;gap:10px;min-width:0;display:flex}.ed-top .file>i{color:var(--brand);flex:none;font-size:22px}.ed-top .file b{white-space:nowrap;text-overflow:ellipsis;max-width:32vw;font-size:14px;display:block;overflow:hidden}.ed-top .file small{color:var(--muted);font-size:12px}.ed-status{color:var(--muted);white-space:nowrap;align-items:center;gap:6px;font-size:12px;font-weight:600;display:inline-flex}.ed-status.ok{color:var(--ok)}.ed-status.busy i{animation:1s linear infinite spin}.ed-zoom{border:1px solid var(--line);background:var(--surface);border-radius:11px;align-items:center;display:inline-flex;overflow:hidden}.ed-zoom button{cursor:pointer;width:34px;height:36px;color:var(--ink);background:0 0;border:0}.ed-zoom span{text-align:center;min-width:46px;font-size:12.5px;font-weight:700}.ed-tools{background:var(--surface);border-bottom:1px solid var(--line);scrollbar-width:thin;align-items:center;gap:2px;padding:6px 12px;display:flex;overflow-x:auto}.tb{color:var(--muted);cursor:pointer;white-space:nowrap;background:0 0;border:0;border-radius:10px;flex-direction:column;align-items:center;gap:3px;min-width:58px;padding:6px 9px;font-size:11px;font-weight:600;display:inline-flex}.tb i{color:var(--ink);font-size:16px}.tb:hover{background:var(--surface-2)}.tb.on{background:var(--brand-soft);color:var(--brand)}.tb.on i{color:var(--brand)}.tb-sep{background:var(--line);flex:none;width:1px;height:34px;margin:0 6px}.ed-body{grid-template-columns:168px minmax(0,1fr) 300px;min-height:0;display:grid}.ed-body.no-thumbs{grid-template-columns:minmax(0,1fr) 300px}.ed-thumbs{background:var(--surface);border-right:1px solid var(--line);flex-direction:column;gap:16px;padding:12px;display:flex;overflow-y:auto}.ed-thumb{border:2px solid var(--line);cursor:pointer;background:#fff;border-radius:8px;place-items:center;min-height:80px;display:grid;position:relative}.ed-thumb canvas{border-radius:6px;width:100%;height:auto;display:block}.ed-thumb.on{border-color:var(--brand);box-shadow:0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent)}.ed-thumb .n{background:var(--surface);border:1px solid var(--line);color:var(--muted);border-radius:99px;padding:0 7px;font-size:10px;font-weight:700;position:absolute;bottom:-10px;left:50%;transform:translate(-50%)}.ed-thumb.on .n{background:var(--brand);color:#fff;border-color:var(--brand)}.ed-thumb .ops{gap:3px;display:none;position:absolute;top:4px;right:4px}.ed-thumb:hover .ops{display:flex}.ed-thumb .ops button{border:1px solid var(--line);background:var(--surface);cursor:pointer;width:24px;height:24px;color:var(--ink);border-radius:6px;font-size:11px}.ed-thumb.removed{opacity:.35}.ed-scroll{overscroll-behavior:contain;position:relative;overflow:auto}.ed-pages{flex-direction:column;align-items:center;gap:22px;min-width:-moz-fit-content;min-width:fit-content;padding:26px 20px 120px;display:flex}.ed-page{background:#fff;flex:none;position:relative;box-shadow:0 10px 30px #00000024}.ed-page canvas.pdf{width:100%;height:100%;position:absolute;top:0;bottom:0;left:0;right:0}.ed-page .lay{position:absolute;top:0;bottom:0;left:0;right:0}.ed-page .lay.text{z-index:2}.ed-page .lay.objs{z-index:3}.ed-page .lay.draw{z-index:4;touch-action:none}.ed-page .lay.forms{z-index:5}.ed-page .pnum{color:var(--muted);font-size:11px;font-weight:600;position:absolute;top:-20px;left:0}.ed[data-active-tool=edit] .lay.objs,.ed[data-active-tool=form] .lay.objs{pointer-events:none}.ed[data-active-tool=edit] .lay.objs .obj.sel{pointer-events:auto}.ed:not([data-active-tool=edit]) .lay.text{pointer-events:none}.tl{cursor:text;border-radius:2px;position:absolute}.ed[data-active-tool=edit] .tl:hover{outline:1.5px dashed color-mix(in srgb, var(--brand) 70%, transparent);outline-offset:2px;background:color-mix(in srgb, var(--brand) 6%, transparent)}.tl.sel{outline-offset:2px;outline:2px solid var(--brand)!important}.tl.changed{background:#22c55e14}.tl .cover{position:absolute;top:-2px;bottom:-2px;left:-3px;right:-3px}.tl .live{white-space:pre;transform-origin:0 0;outline:none;min-width:4px;line-height:1.12;position:absolute;top:0;left:0}.tl .move{background:var(--brand);color:#fff;cursor:move;touch-action:none;border-radius:7px;place-items:center;width:24px;height:24px;font-size:12px;display:grid;position:absolute;top:50%;left:-30px;transform:translateY(-50%);box-shadow:0 4px 10px #0003}.ed-fbar{z-index:20;color:#fff;white-space:nowrap;background:#111827;border-radius:11px;align-items:center;gap:2px;margin-top:-10px;padding:4px;font-size:12px;display:flex;position:absolute;transform:translateY(-100%);box-shadow:0 10px 24px #00000047}.ed-fbar button,.ed-fbar select{color:#fff;cursor:pointer;font:inherit;background:0 0;border:0;border-radius:7px;padding:6px 8px;font-size:12px}.ed-fbar button:hover,.ed-fbar button.on{background:#ffffff29}.ed-fbar select{background:#ffffff14;max-width:150px}.ed-fbar select option{color:#111}.ed-fbar input[type=color]{cursor:pointer;background:0 0;border:0;width:26px;height:24px;padding:0}.ed-fbar .sep{background:#fff3;width:1px;height:18px;margin:0 3px}.obj{touch-action:none;position:absolute}.obj.sel{outline:2px solid var(--brand);outline-offset:1px}.obj .h{border:2px solid var(--brand);z-index:2;background:#fff;border-radius:3px;width:11px;height:11px;position:absolute}.obj .h[data-h=nw]{cursor:nwse-resize;top:-7px;left:-7px}.obj .h[data-h=ne]{cursor:nesw-resize;top:-7px;right:-7px}.obj .h[data-h=sw]{cursor:nesw-resize;bottom:-7px;left:-7px}.obj .h[data-h=se]{cursor:nwse-resize;bottom:-7px;right:-7px}.obj .txt{white-space:pre-wrap;word-break:break-word;cursor:move;outline:none;width:100%;min-height:100%;line-height:1.25}.obj.editing .txt{cursor:text}.obj img{pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;display:block}.obj svg{pointer-events:none;width:100%;height:100%;display:block;overflow:visible}.obj.stamp{letter-spacing:.04em;border-style:solid;border-radius:6px;justify-content:center;align-items:center;font-weight:800;display:flex}.obj.note{color:#713f12;background:#facc15;border-radius:6px 6px 6px 0;place-items:center;display:grid;box-shadow:0 3px 8px #00000040;width:26px!important;height:26px!important}.obj.link{background:#2563eb1f;border:1.5px dashed #2563eb}.obj-bar{z-index:21;background:#111827;border-radius:10px;gap:2px;margin-top:-12px;padding:3px;display:flex;position:absolute;transform:translate(-50%,-100%);box-shadow:0 8px 20px #00000040}.obj-bar button{color:#fff;cursor:pointer;background:0 0;border:0;border-radius:7px;width:30px;height:28px}.obj-bar button:hover{background:#ffffff29}.ed-form-field{color:#111;background:#dbeafe8c;border:1px solid #2563eb8c;border-radius:3px;padding:0 4px;font:12px Arimo,Arial,sans-serif;position:absolute}.ed-form-field:focus{background:#dbeafecc;outline:2px solid #2563eb}input.ed-form-field[type=checkbox],input.ed-form-field[type=radio]{accent-color:#2563eb;margin:0;padding:0}.ed-props{background:var(--surface);border-left:1px solid var(--line);flex-direction:column;gap:14px;padding:16px;display:flex;overflow-y:auto}.ed-props h4{text-transform:uppercase;letter-spacing:.07em;color:var(--muted);margin:0;font-size:12px}.ed-props .row2{grid-template-columns:1fr 1fr;gap:8px;display:grid}.ed-detect{background:var(--brand-soft);border:1px solid var(--brand-line);border-radius:12px;gap:10px;padding:12px;font-size:12.5px;display:flex}.ed-detect i{color:var(--brand);margin-top:2px}.ed-swatches{flex-wrap:wrap;gap:6px;display:flex}.ed-swatches button{border:1px solid var(--line);cursor:pointer;border-radius:8px;width:26px;height:26px}.ed-swatches button.on{outline:2px solid var(--brand);outline-offset:2px}.ed-tips{color:var(--muted);gap:8px;font-size:13px;display:grid}.ed-tips div{gap:10px;display:flex}.ed-tips i{color:var(--brand);width:16px;margin-top:3px}.ed-bottom,.ed-sheet-close{display:none}.ed-drop{z-index:30;background:color-mix(in srgb, var(--brand) 12%, transparent);border:3px dashed var(--brand);color:var(--brand);pointer-events:none;place-items:center;font-size:18px;font-weight:700;display:grid;position:absolute;top:0;bottom:0;left:0;right:0}.ed-loading{z-index:25;background:color-mix(in srgb, var(--surface-2) 70%, transparent);place-items:center;display:grid;position:absolute;top:0;bottom:0;left:0;right:0}.ed-menu{z-index:40;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow-lg);border-radius:14px;min-width:200px;padding:6px;position:absolute}.ed-menu button{width:100%;font:inherit;cursor:pointer;color:var(--ink);text-align:left;background:0 0;border:0;border-radius:9px;align-items:center;gap:10px;padding:9px 11px;font-size:14px;display:flex}.ed-menu button:hover{background:var(--surface-2)}.ed-menu button i{width:18px;color:var(--muted)}.sig-tabs{gap:6px;display:flex}.sig-saved{flex-wrap:wrap;gap:8px;display:flex}.sig-saved button{border:1px solid var(--line);cursor:pointer;background:#fff;border-radius:10px;height:54px;padding:4px}.sig-saved img{height:100%}.stamp-grid{grid-template-columns:repeat(2,1fr);gap:8px;display:grid}.stamp-grid button{letter-spacing:.05em;cursor:pointer;background:0 0;border:2px solid;border-radius:8px;padding:10px;font-size:14px;font-weight:800}@media (max-width:980px){.ed-body,.ed-body.no-thumbs{grid-template-columns:minmax(0,1fr)}.ed-thumbs,.ed-tools{display:none}.ed-props{left:0;right:0;bottom:calc(64px + env(safe-area-inset-bottom,0px));border-left:0;border-top:1px solid var(--line);z-index:30;border-radius:18px 18px 0 0;max-height:46vh;padding-top:10px;transition:transform .22s;position:fixed;transform:translateY(110%);box-shadow:0 -12px 30px #00000026}.ed-props.open{transform:none}.ed-sheet-close{background:var(--line);cursor:pointer;border:0;border-radius:99px;align-self:center;width:44px;height:5px;margin-bottom:4px;display:block}.ed-bottom{background:var(--surface);border-top:1px solid var(--line);padding:6px 4px calc(8px + env(safe-area-inset-bottom,0px));z-index:31;grid-template-columns:repeat(5,1fr);display:grid;position:fixed;bottom:0;left:0;right:0}.ed-bottom .tb{min-width:0;padding:6px 2px}.ed-pages{padding:18px 10px 160px}.ed-top{gap:6px;padding:0 10px}.ed-top .file b{max-width:38vw}.ed-hide-m{display:none!important}.ed-fbar{max-width:calc(100vw - 20px);overflow-x:auto}}@media (max-width:520px){.ed-zoom{display:none}}
