/* sign-pdf: styles only it uses, split out of site.css by scripts/split-css.mjs. */
.inline-fields { display: flex; gap: 8px; }
.inline-fields input { min-width: 0; }
.inline-fields input[type="color"] { width: 56px; flex: none; }
.sign-workspace { grid-template-columns: minmax(0, 1fr) 300px; }
.sign-viewer { max-height: 78vh; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--mist); }
.sign-page { position: relative; width: 100%; max-width: 760px; background: #fff; box-shadow: var(--shadow-2); container-type: inline-size; }
.sign-page > canvas { display: block; }
.sign-layer { position: absolute; inset: 0; }
.sign-page-number { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); font-size: 0.75rem; color: var(--slate); background: var(--mist); padding: 0 8px; border-radius: 999px; }
.sign-item { position: absolute; cursor: move; touch-action: none; outline: 1.5px dashed var(--signal); outline-offset: 2px; user-select: none; }
.sign-item:focus-visible { outline-style: solid; }
.sign-item img { display: block; width: 100%; height: auto; pointer-events: none; }
.sign-remove {
    position: absolute; top: -13px; right: -13px; width: 24px; height: 24px; border-radius: 50%; border: 0;
    background: var(--bad); color: #fff; font: 700 15px/24px var(--text); cursor: pointer; padding: 0;
}
.sign-resize { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 3px; background: var(--signal); cursor: nwse-resize; }
.sign-panel { position: sticky; top: 84px; }
.sign-sig-box { display: grid; place-items: center; height: 110px; padding: 8px; border: 2px dashed var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer; font: 600 0.95rem var(--text); color: var(--signal-ink); }
.sign-sig-box:hover { border-color: var(--signal); }
.sign-sig-box img { max-width: 100%; max-height: 92px; }
.sign-dialog { width: min(680px, calc(100vw - 32px)); border: 0; border-radius: var(--r-panel); padding: 22px; box-shadow: var(--shadow-3); }
.sign-dialog::backdrop { background: rgb(15 29 58 / 0.5); }
.sign-dialog > * + * { margin-top: 14px; }
.sign-dialog-head { display: flex; justify-content: space-between; align-items: center; }
.sign-dialog-head h2 { margin: 0; font-size: 1.2rem; }
.sign-pad { display: block; width: 100%; height: auto; aspect-ratio: 3; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff linear-gradient(transparent calc(75% - 1px), var(--line) calc(75% - 1px), var(--line) 75%, transparent 75%); touch-action: none; cursor: crosshair; }
.sign-fonts { display: grid; gap: 8px; margin-top: 10px; }
.sign-font { padding: 4px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.sign-font[aria-checked="true"] { border-color: var(--signal); }
.sign-font canvas { display: block; width: 100%; height: auto; max-height: 90px; object-fit: contain; }
@media (max-width: 900px) { .sign-workspace { grid-template-columns: 1fr; } .sign-panel { position: static; order: -1; } .sign-viewer { max-height: 70vh; } }
