/* 서식 자동 작성 — 추가 서식(영수증·견적서·거래명세서·차용증·경위서) */
.form .ff-sub { display: block; margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--ink-2); }
.form div[data-k] > .ff-sub:first-child { margin-top: 0; }
.ff-items { display: grid; gap: 8px; }
.ff-item { display: grid; grid-template-columns: 1fr 72px 120px 36px; gap: 6px; }
.ff-items.has-spec .ff-item { grid-template-columns: 1fr 80px 64px 110px 36px; }
.ff-item .ctrl { height: 44px; padding: 0 10px; font-size: 15px; }
.ff-item .ctrl[hidden] { display: none; }
.ff-del { border: 1px solid var(--line); border-radius: var(--r); background: #fff; color: var(--ink-2); font-size: 18px; cursor: pointer; }
.ff-del:hover { color: #c62828; }
#ff-add { margin-top: 8px; }
.help.ff-bad { color: #c62828; font-weight: 600; }
.doc .items th, .doc .items td { width: auto; padding: 5px 4px; font-size: 12px; }
.doc .items th { white-space: nowrap; }
.doc .c { text-align: center; }
.doc .n { text-align: right; white-space: nowrap; }
.doc .party th { width: 30%; }
.doc .party th.vt { width: 22px; padding: 4px 2px; writing-mode: vertical-rl; letter-spacing: .2em; }
.doc table + table, .doc .two + table { margin-top: 10px; }
.doc .two { display: grid; grid-template-columns: 1fr; gap: 10px; }
.doc .two p { margin: 2px 0; }
.doc .lead { font-size: 15px; font-weight: 600; }
.doc .amt { font-weight: 600; }
.doc .small { margin-top: 8px; font-size: 12px; color: #444; }
.doc .terms { margin: 10px 0; padding-left: 18px; list-style: decimal; }
.doc .tall { height: 80px; }
@media (max-width: 720px) {
	.ff-item, .ff-items.has-spec .ff-item { grid-template-columns: 1fr 1fr 36px; }
	.ff-item [data-f="name"] { grid-column: 1 / -1; }
	.ff-items.has-spec .ff-item [data-f="spec"] { grid-column: 1 / -1; }
	.ff-item + .ff-item { padding-top: 10px; border-top: 1px dashed var(--line); }
}

/* .row2 등 display 지정 요소도 서식 전환 시 숨김 */
.form [data-k][hidden] { display: none; }
