/* 契約紙本樣式：螢幕與 PDF 共用。契約固定為白紙黑字（深色模式也一樣）。 */
.ct-doc {
  --paper: #ffffff; --ink: #161616; --muted-ink: #555; --rule: #444;
  background: var(--paper); color: var(--ink);
  font-family: "DFKai-SB", "BiauKai", "標楷體", "Noto Serif TC", "PMingLiU", serif;
  font-size: 15px; line-height: 1.9; padding: 40px clamp(18px, 5vw, 56px);
  border: 1px solid #d6d2c8; border-radius: 4px; position: relative; text-align: justify;
}
.ct-doc p { margin: 0 0 4px; }
.ct-title { font-size: 24px; text-align: center; letter-spacing: .3em; margin: 0 0 6px; font-weight: 700; }
.ct-meta { text-align: center; font-size: 12px; color: var(--muted-ink); font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
.ct-center { text-align: center; }
.ct-art { font-size: 15.5px; font-weight: 700; margin: 16px 0 2px; }
.ct-p { text-indent: 2em; }
.ct-p0 { margin-top: 6px !important; }
.ct-item { padding-left: 4em; text-indent: -2em; }
.ct-itin { padding-left: 4em; font-size: 14px; }
.ct-note { font-size: 13px; color: var(--muted-ink); }
.ct-party { border: 1px solid #cfcac0; padding: 8px 14px; margin: 8px 0; }
.ct-party p { margin: 0; }
.ct-party-h { font-weight: 700; }
.ct-party-h2 { font-weight: 700; margin-top: 6px !important; }
.ct-consent { padding-left: 2em; margin: 6px 0; }
.ct-sign-h { font-weight: 700; margin-top: 22px !important; letter-spacing: .4em; }
.ct-sign { border-top: 1px solid #cfcac0; padding: 10px 0 6px; position: relative; }
.ct-sign p { margin: 0; }
.ct-sign.co { min-height: 150px; }
.ct-esign { margin-top: 12px !important; border-top: 1px dashed #cfcac0; padding-top: 8px; }
.fl { border-bottom: 1px solid var(--rule); padding: 0 .35em; font-weight: 700; font-family: "Noto Serif TC", "PMingLiU", serif; }
.fl.empty { font-weight: 400; }
.bx { font-family: "Segoe UI Symbol", "Noto Sans TC", sans-serif; margin: 0 .15em; }
.bx.on { color: #0c3c8c; font-weight: 700; }
.sig { height: 64px; width: auto; max-width: 260px; vertical-align: middle; margin-left: 12px; }
.sig.sm { height: 42px; margin-left: 4px; }
.sig-slot { display: inline-block; min-width: 8em; border-bottom: 1px solid var(--rule); min-height: 1.5em; vertical-align: bottom; }
.sig-wrap { display: inline-block; }
.seal { position: absolute; right: 4%; top: 6px; width: 170px; max-width: 42%; opacity: .92; mix-blend-mode: multiply; pointer-events: none; }

@media (max-width: 480px) {
  .paper-wrap .ct-title { font-size: 20px; letter-spacing: .08em; }
  .paper-wrap .ct-item { padding-left: 2.5em; }
}

/* 電子簽署證明 */
.ct-cert .cert { width: 100%; border-collapse: collapse; font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif; font-size: 13px; line-height: 1.6; margin: 10px 0; }
.ct-cert .cert th, .ct-cert .cert td { border: 1px solid #cfcac0; padding: 6px 10px; text-align: left; vertical-align: top; word-break: break-all; }
.ct-cert .cert th { background: #f4f2ec; width: 9em; font-weight: 500; white-space: nowrap; }
.ct-cert .cert.log th { width: auto; }
.ct-cert .cert.log td:first-child, .ct-cert .cert.log td:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; word-break: normal; }

/* PDF 版面（A4） */
.pdf-host { position: absolute; left: -20000px; top: 0; width: 794px; }
.pdf-stage { position: absolute; left: 0; top: 0; width: 794px; z-index: 9998; }
.pdf-page { width: 794px; height: 1123px; padding: 64px 72px 84px; background: #fff; position: relative; overflow: hidden; box-sizing: border-box; }
.pdf-page.pdf-warm { height: auto; }
.pdf-page .pdf-body { height: 100%; overflow: hidden; border: 0; border-radius: 0; padding: 0; }
.pdf-page .ct-doc { border: 0; padding: 0; }
.pdf-foot { position: absolute; left: 72px; right: 72px; bottom: 36px; display: flex; justify-content: space-between; font: 11px/1.4 "Noto Sans TC", "Microsoft JhengHei", sans-serif; color: #777; border-top: 1px solid #ddd; padding-top: 6px; }
.pdf-perf-seal { position: absolute; right: -58px; top: 44%; width: 116px; opacity: .85; }
