/* 폼다 디자인 시스템 (tokens + components)
   컨셉: 신뢰감 있는 미니멀 업무 도구. 화이트 + 그레이 + 인디고 포인트. */

:root {
  --point: #4f46e5;
  --point-dark: #4338ca;
  --point-soft: #eef2ff;
  --ink: #1a1a2e;
  --gray: #6b7280;
  --gray-soft: #9ca3af;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --white: #fff;
  --ok: #059669;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-paper: 0 6px 28px rgba(0, 0, 0, .07);
  --maxw: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }  /* 고정 헤더(60px)에 앵커 대상이 가리지 않도록 */

/* 스크롤 등장 애니메이션 (JS 있을 때만 숨김 → 무JS 안전) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;   /* 모바일 가로 오버플로 차단 (sticky 헤더 유지 위해 hidden 대신 clip) */
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---------- 헤더 / nav ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.header-in { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; }
.logo { display: inline-flex; align-items: center; }
.logo-img { height: 28px; width: auto; display: block; }
.logo-text { font-weight: 800; font-size: 21px; color: var(--ink); letter-spacing: -.5px; }
.nav { display: flex; gap: 28px; font-size: 15px; font-weight: 500; color: var(--gray); margin-left: 36px; align-self: stretch; }
.nav a { display: flex; align-items: center; position: relative; transition: color .12s; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--point); border-radius: 2px; transform: scaleX(0); transform-origin: center; transition: transform .18s ease; }
.nav a:hover { color: var(--point); }
.nav a:hover::after { transform: scaleX(1); }
.nav a.on { color: var(--ink); font-weight: 700; }
.nav a.on::after { transform: scaleX(1); }
/* 헤더 검색 - 상단 우측, 열린 박스(자료조사: NN/g·Baymard 권장), 차분한 폭 */
.hdr-search { position: relative; flex: none; width: 240px; margin-left: auto; }
.hdr-search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--gray); pointer-events: none; }
#site-search { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: #f5f6f8;
  padding: 0 12px 0 34px; font-size: 13.5px; color: var(--ink); outline: none; transition: border-color .12s, background .12s; }
#site-search::placeholder { color: #9aa0ac; }
#site-search:focus { border-color: var(--point); background: #fff; }
#site-search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 14px 36px rgba(20, 24, 36, .14); padding: 6px; max-height: 72vh; overflow-y: auto; display: none; z-index: 60; }
.search-results.open { display: block; }
.sr-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; }
.sr-item:hover, .sr-item.on { background: #f5f6f8; }
.sr-ic { flex: none; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; }
.sr-ic svg { width: 22px; height: 22px; }
.sr-tx { display: flex; flex-direction: column; min-width: 0; }
.sr-tx b { font-size: 14px; color: var(--ink); font-weight: 700; }
.sr-tx small { font-size: 12px; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-bd { flex: none; margin-left: auto; align-self: center; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; line-height: 1.5; }
.sr-bd-t { color: #4f46e5; background: #eef0fe; }
.sr-bd-g { color: #0d9488; background: #e6f5f3; }
.sr-empty { padding: 16px 12px; text-align: center; color: var(--gray); font-size: 13px; }
@media (max-width: 720px) {
  .header-in { padding: 8px 18px; height: auto; flex-wrap: wrap; row-gap: 8px; }
  .nav { gap: 18px; font-size: 14px; margin-left: auto; }
  .hdr-search { order: 3; flex-basis: 100%; width: 100%; margin: 2px 0 0; }
  html { scroll-padding-top: 120px; }
}

/* ---------- 레이아웃 ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 20px; }
.crumb { font-size: 13px; color: var(--gray); margin-bottom: 8px; }
.crumb a:hover { color: var(--point); }
.title { font-size: 24px; font-weight: 800; margin-bottom: 4px; letter-spacing: -.4px; }
.subtitle { color: var(--gray); font-size: 14px; margin-bottom: 14px; }

/* ---------- 트러스트 배지 (모두의문서 벤치마크) ---------- */
.trust { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--gray);
  background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; margin-bottom: 18px; }
.trust b { color: var(--ok); font-weight: 700; }

/* ---------- 3단계 흐름 ---------- */
.steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 22px; }
.steps .step { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--gray); font-weight: 600; }
.steps .num { width: 22px; height: 22px; border-radius: 50%; background: var(--point-soft); color: var(--point);
  font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.steps .arrow { color: var(--gray-soft); }

/* ---------- 탭 (모바일) ---------- */
.tabs { display: none; gap: 8px; margin-bottom: 14px; }
.tabs button { flex: 1; padding: 10px; border: 1px solid var(--line); background: var(--white); border-radius: 10px;
  font-weight: 600; color: var(--gray); font-size: 15px; cursor: pointer; }
.tabs button.on { background: var(--point); color: #fff; border-color: var(--point); }

/* ---------- 도구 편집 영역 (워크스페이스 카드) ---------- */
.editor { height: calc(100vh - 150px); min-height: 560px; max-height: 940px;
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 2px 6px rgba(15, 23, 42, .04), 0 18px 44px rgba(15, 23, 42, .12);
  overflow: hidden; }
.cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; }
.pane-input, .pane-preview { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pane-input { border-right: 1px solid var(--line); background: var(--white); }   /* 좌: 흰 입력 */
.pane-preview { background: #e9ecf2; }                                           /* 우: 회색 캔버스 */
.form-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; }

/* 패널 헤더 바 (좌: 입력+샘플/비우기, 우: 미리보기+줌) */
.pane-head { flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; border-bottom: 1px solid var(--line); min-height: 46px; }
.head-actions { display: flex; gap: 8px; }

@media (max-width: 980px) {
  .editor { height: auto; max-height: none; min-height: 0; display: block; }
  .cols { grid-template-columns: 1fr; }
  .pane-input { border-right: none; }
}

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-card); }
.card h2 { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--ink); }
.card h2.mt { margin-top: 18px; }
.field { margin-bottom: 11px; }
.field label { display: block; font-size: 12.5px; color: var(--gray); margin-bottom: 5px; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--point); box-shadow: 0 0 0 3px var(--point-soft); }
.field input:disabled { background: var(--bg); color: var(--gray-soft); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* 입력폼 섹션 구분 + 샘플/비우기 + 선택항목 접기 */
.form-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.mini-btn { font-size: 12.5px; font-weight: 600; color: var(--point); background: var(--point-soft);
  border: 1px solid #c7cdf7; border-radius: 8px; padding: 7px 12px; cursor: pointer; }
.mini-btn.danger { color: var(--gray); background: var(--bg); border-color: var(--line); }
.mini-btn.primary { color: #fff; background: var(--point); border-color: var(--point); }
.mini-btn:hover { filter: brightness(.97); }
.form-sec { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.form-sec h2 { font-size: 13.5px; font-weight: 700; margin-bottom: 12px; color: var(--ink); }
.form-sec .sub { font-size: 12px; font-weight: 700; color: var(--gray); margin-bottom: 8px; }
.form-sec .sub.mt { margin-top: 16px; }
.field-help { font-size: 11.5px; color: var(--gray-soft); line-height: 1.5; margin-top: 6px; }
.profile-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.profile-clear { font-size: 12px; color: var(--gray); background: none; border: none; cursor: pointer; text-decoration: underline; padding: 4px; }
.profile-status { font-size: 12px; color: var(--ok); font-weight: 600; }
.form-opt { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; }
.form-opt > summary { cursor: pointer; font-size: 13px; font-weight: 700; padding: 13px 2px; color: var(--ink); list-style: none; }
.form-opt > summary::-webkit-details-marker { display: none; }
.form-opt > summary::before { content: '▸'; color: var(--gray-soft); margin-right: 7px; }
.form-opt[open] > summary::before { content: '▾'; }
.form-opt[open] { padding-bottom: 14px; }

/* 도장 업로드 */
.seal-upload { display: flex; gap: 8px; align-items: center; }
.seal-btn { flex: 1; text-align: center; padding: 9px 11px; border: 1px dashed var(--line); border-radius: var(--radius-sm);
  color: var(--point); font-weight: 600; font-size: 13.5px; cursor: pointer; background: #fafafa; }
.seal-btn:hover { border-color: var(--point); }
.seal-clear { padding: 9px 12px; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius-sm);
  color: var(--gray); font-size: 13px; cursor: pointer; }
.seal-name { font-size: 12px; color: var(--ok); margin-top: 5px; }

/* 품목 입력 테이블 */
.items { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; table-layout: fixed; }
.items th { text-align: left; color: var(--gray); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 12px; }
.items td { padding: 4px 3px; vertical-align: middle; }
.items input { width: 100%; padding: 9px 11px; font-size: 13.5px; font-family: inherit; color: var(--ink);
  background: #f4f6f8; border: 1.5px solid transparent; border-radius: 10px;
  transition: background .12s, border-color .12s, box-shadow .12s; }
.items input::placeholder { color: var(--gray-soft); }
.items input:focus { outline: none; background: #fff; border-color: var(--point); box-shadow: 0 0 0 3px var(--point-soft); }
.items .del { border: none; background: none; color: var(--gray-soft); cursor: pointer; font-size: 16px;
  width: 26px; height: 26px; border-radius: 7px; line-height: 1; transition: background .12s, color .12s; }
.items .del:hover { background: #fee2e2; color: #ef4444; }
.addrow { width: 100%; padding: 9px; border: 1px dashed var(--line); background: #fafafa; border-radius: var(--radius-sm);
  color: var(--point); font-weight: 600; cursor: pointer; font-size: 14px; }
.addrow:hover { border-color: var(--point); }
.addrow:disabled { opacity: .5; cursor: default; border-style: solid; color: var(--gray-soft); }

/* ---------- 미리보기 (A4 문서) ---------- */
.preview-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 16px; }
.pv-label { font-size: 13px; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 7px; }
.pv-label::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: var(--point); }
.zoom { display: flex; align-items: center; gap: 2px; background: var(--white); border: 1px solid var(--line); border-radius: 9px; padding: 2px; }
.zoom button { width: 30px; height: 28px; border: none; background: none; color: var(--ink); font-size: 16px; font-weight: 700; cursor: pointer; border-radius: 7px; }
.zoom button:hover { background: var(--bg); }
.zoom .zoom-pct { width: auto; padding: 0 8px; font-size: 12.5px; color: var(--gray); min-width: 50px; }
/* A4 한 장이 통째로 보이는 박스(여러 장·확대 시 박스 안에서 스크롤) */
.doc-viewport { flex: 1; min-width: 0; min-height: 0; overflow: auto; padding: 0;
  background: transparent; display: flex; align-items: flex-start; }
.doc-sizer { margin: 0 auto; }   /* 작으면 가운데, 확대로 넓어지면 스크롤 */
.doc-sizer { position: relative; }                       /* 스케일된 페이지의 레이아웃 크기 확보 */
/* 폭은 실제 페이지 크기에 맞춤(A4=794, 명함=620). 794 고정이면 명함에서 가로 스크롤이 생긴다. */
.doc-sizer .doc-pages { position: absolute; top: 0; left: 0; width: max-content; }
.doc-pages > .doc-page { margin-bottom: 20px; box-shadow: 0 6px 22px rgba(15, 23, 42, .16); }
.doc-pages > .doc-page:last-child { margin-bottom: 0; }

/* A4 한 장 (794 x 1123 = A4 @96dpi) */
.doc-page { width: 794px; height: 1123px; background: #fff; color: #111; padding: 56px 52px;
  box-shadow: var(--shadow-paper); overflow: hidden; position: relative; }
.doc-fit { transform-origin: top center; }   /* 뷰어 확대·축소는 app.fitPreview가 .doc-pages 전체에 scale 적용(콘텐츠 자동 축소 아님) */
/* 무료 워터마크(중앙 로고). 프리미엄 제거 훅 = body.fd-premium */
/* 편집 중 미리보기: 옅고 작게(내 숫자 확인 방해 최소화). 다운로드·인쇄 시엔 아래에서 뚜렷하게. */
.doc-wm { position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: url(/assets/logo-wm.png) no-repeat center; background-size: 42%; opacity: .06; }
.doc-page.card .doc-wm { background-size: 46%; z-index: 0; }
/* 명함은 내용(.cd)이 배경 투명이라, 워터마크를 내용 뒤로 깔면 흰 바탕 위·글자 뒤에 은은하게 놓인다 */
.doc-page.card .doc-fit { position: relative; z-index: 1; }
/* 내보내기(PDF·PNG 캡처)·인쇄된 무료본은 워터마크를 뚜렷하게 = 무료본 보호 + 제거 결제 동기 */
#doc.exporting .doc-wm { background-size: 54%; opacity: .16; }
@media print { .doc-wm { background-size: 54%; opacity: .16; } }
body.fd-premium .doc-wm { display: none; }
/* 하단 유입용 URL 라인 */
.doc-url { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; z-index: 5;
  font-size: 9px; letter-spacing: .03em; color: #c2c8d0; pointer-events: none; }
.doc-page.card .doc-url { bottom: 8px; font-size: 7px; }
body.fd-premium .doc-url { display: none; }
/* 장식용 미리보기(홈 히어로·기능·썸네일)는 워터마크·URL 제외 */
.hero-doc .doc-wm, .feat-doc .doc-wm, .thumb-doc .doc-wm,
.hero-doc .doc-url, .feat-doc .doc-url, .thumb-doc .doc-url { display: none; }

/* 표준 견적서 양식 (qt-) */
.qt-title { text-align: center; font-size: 30px; font-weight: 800; letter-spacing: 12px; padding-bottom: 13px;
  border-bottom: 2px solid #1a1a1a; margin-bottom: 14px; }
.qt-title.sm { font-size: 20px; letter-spacing: 8px; padding-bottom: 8px; }
.qt-title.sm span { font-size: 13px; letter-spacing: 0; color: #777; }
.qt-meta { display: flex; justify-content: space-between; font-size: 12px; color: #333; margin-bottom: 16px; }
.qt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 14px; }
.qt-recv { padding-top: 14px; }
.qt-recv-name { font-size: 18px; font-weight: 700; }
.qt-recv-sub { font-size: 12px; color: #777; margin-top: 6px; }
.qt-supplier { border-collapse: collapse; font-size: 12px; min-width: 320px; }
/* 거래명세서: 공급받는자 + 공급자 두 박스 나란히 */
.qt-lead { font-size: 12px; color: #777; margin-bottom: 10px; }
.qt-parties { display: flex; gap: 12px; align-items: stretch; margin-bottom: 14px; }
.qt-parties .qt-supplier { flex: 1; min-width: 0; width: 100%; }
.qt-parties .qt-supplier .v { min-width: 0; }
.qt-supplier td, .qt-supplier th { border: 1px solid #c6cad1; padding: 6px 9px; }
.qt-supplier .qt-side { width: 26px; background: #f5f6f8; font-weight: 700; text-align: center;
  writing-mode: vertical-rl; letter-spacing: 4px; color: #333; }
.qt-supplier .k { background: #f7f8fa; color: #555; font-weight: 600; white-space: nowrap; width: 66px; }
.qt-supplier .v { min-width: 180px; word-break: break-all; }
.qt-supplier .v span { vertical-align: middle; }
.qt-seal { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px;
  border: 1px solid #c00; border-radius: 50%; color: #c00; font-size: 9px; margin-left: 8px; opacity: .7; vertical-align: middle; }
.qt-seal-img { width: 36px; height: 36px; object-fit: contain; margin-left: 8px; vertical-align: middle; }
/* 도장 미등록 시 '(인)' 자리표시는 편집 미리보기에만 노출, 다운로드(캡처)·인쇄에선 제외 */
#doc.exporting .qt-seal { display: none; }
@media print { .qt-seal { display: none; } }
.qt-amount { display: flex; border: 1.5px solid #111; margin-bottom: 16px; }
.qt-amount .k { flex: none; width: 100px; background: #f5f6f8; font-weight: 700; text-align: center; white-space: nowrap;
  padding: 12px 10px; border-right: 1.5px solid #111; display: flex; align-items: center; justify-content: center; }
.qt-amount .v { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; }
.qt-amount .v b { font-size: 17px; }
.qt-amount .v span { font-size: 13px; color: #444; }

.qt-items { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.qt-items col.c-no { width: 7%; } .qt-items col.c-date { width: 9%; } .qt-items col.c-item { width: 33%; } .qt-items col.c-spec { width: 14%; }
.qt-items col.c-qty { width: 10%; } .qt-items col.c-price { width: 18%; } .qt-items col.c-amt { width: 18%; }
/* 영수증: 영수 확인 문구 (기본 레이아웃용) */
.qt-confirm { text-align: center; margin: 16px 0 4px; font-size: 14px; font-weight: 700; color: #111; letter-spacing: 2px; }

/* ===== 영수증 전용 레이아웃 (금액 중심 슬립형) ===== */
.rc-title { text-align: center; font-size: 34px; font-weight: 800; letter-spacing: 16px; padding-bottom: 15px;
  border-bottom: 2px solid #1a1a1a; margin-bottom: 18px; }
.rc-recv { font-size: 18px; font-weight: 700; margin: 4px 0 18px; }
.rc-amount { border: 2.5px solid #111; border-radius: 4px; padding: 22px 24px; text-align: center; margin-bottom: 12px; background: #fafbfc; }
.rc-amount-kr { font-size: 26px; font-weight: 800; letter-spacing: 1px; min-height: 30px; }
.rc-amount-num { font-size: 16px; color: #444; margin-top: 8px; }
.rc-confirm { text-align: center; font-size: 15px; font-weight: 700; letter-spacing: 3px; margin-bottom: 22px; }
.rc-items { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; margin-bottom: 22px; }
.rc-items th { background: #f5f6f8; border: 1px solid #c6cad1; padding: 8px 5px; font-weight: 700; }
.rc-items td { border: 1px solid #e2e4e9; padding: 8px; height: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-items td.l { text-align: left; } .rc-items td.c { text-align: center; } .rc-items td.r { text-align: right; }
.rc-items .qt-er td { color: #bbb; }
.rc-supplier { width: 100%; }
/* 거래명세서: 월일 + 공급가액·세액 분리 (7열, 표준) */
.qt-items.tax col.c-date { width: 9%; } .qt-items.tax col.c-item { width: 25%; } .qt-items.tax col.c-spec { width: 11%; }
.qt-items.tax col.c-qty { width: 8%; } .qt-items.tax col.c-price { width: 15%; }
.qt-items.tax col.c-supply { width: 16%; } .qt-items.tax col.c-tax { width: 16%; }
/* 거래명세서 미수금 정산란 (전잔액·당월거래·입금·미수잔액) */
.qt-balance { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; table-layout: fixed; }
.qt-balance td { border: 1px solid #c6cad1; padding: 8px 10px; }
.qt-balance .k { background: #f5f6f8; font-weight: 600; text-align: center; white-space: nowrap; width: 11%; }
.qt-balance .v { text-align: right; width: 14%; }
.qt-balance .hl { background: #eef2ff; font-weight: 800; color: #111; }

/* 인수자 확인란 */
/* 발주서 납품 조건란 */
.qt-terms { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12px; table-layout: fixed; }
.qt-terms td { border: 1px solid #c6cad1; padding: 8px 10px; }
.qt-terms .k { background: #f5f6f8; font-weight: 600; text-align: center; white-space: nowrap; width: 14%; }
.qt-terms .v { width: 36%; }
.qt-receiver { margin-top: 16px; text-align: right; font-size: 12px; color: #333; }
.qt-receiver .qt-sign { display: inline-block; width: 130px; border-bottom: 1px solid #c6cad1; margin: 0 6px; vertical-align: bottom; }
.qt-items th { background: #f5f6f8; border: 1px solid #c6cad1; padding: 8px 5px; font-weight: 700; }
/* 품목 행은 1줄 고정(긴 텍스트는 …) → 행 높이 일정 = A4 한 장 안에 항상 들어감 */
.qt-items td { border: 1px solid #e2e4e9; padding: 7px 8px; height: 31px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qt-items td.c { text-align: center; } .qt-items td.l { text-align: left; } .qt-items td.r { text-align: right; }
.qt-items .qt-er td { color: #bbb; }

.qt-tot { width: 100%; border-collapse: collapse; margin-top: -1px; }
.qt-tot td { border: 1px solid #c6cad1; padding: 8px 12px; font-size: 13px; }
.qt-tot .k { width: 70%; text-align: right; background: #f7f8fa; font-weight: 600; }
.qt-tot .v { text-align: right; }
.qt-tot .sum td { font-size: 15px; font-weight: 800; background: #eef2ff; }
.qt-validity { margin-top: 14px; font-size: 12px; font-weight: 600; color: #333; }
.qt-note { margin-top: 10px; font-size: 11.5px; color: #555; white-space: pre-wrap; line-height: 1.6; max-height: 84px; overflow: hidden; }

/* ===== 자기소개서 (cover-letter) - 멀티페이지 ===== */
.cl-flow { color: #1a1a1a; }
.cl-head { text-align: center; margin-bottom: 18px; }
.cl-title { font-size: 28px; font-weight: 800; letter-spacing: 12px; padding-bottom: 12px; border-bottom: 2px solid #1a1a1a; }
.cl-meta { font-size: 13px; color: #555; margin-top: 12px; }
.cl-q { font-size: 15px; font-weight: 700; color: #111; background: #f5f6f8; border-left: 3px solid #6366f1; padding: 8px 12px; margin: 20px 0 12px; }
.cl-exp { font-size: 14px; font-weight: 700; color: #1f2430; border-bottom: 1.5px solid #d2d6df; padding-bottom: 5px; margin: 16px 0 9px; }
.cl-p { font-size: 13.5px; line-height: 1.95; color: #222; margin: 0 0 10px; text-align: justify; word-break: keep-all; }
/* 입력폼 문항 블록 */
.q-block { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; background: #fcfcfd; }
.q-row { display: flex; gap: 8px; margin-bottom: 8px; }
.q-head { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 13.5px; font-weight: 600; font-family: inherit; }
/* 문항 삭제 버튼: 기본 버튼 대신 입력칸과 어울리는 정돈된 사각 버튼 (호버 시 빨강) */
.q-row .del { flex: none; width: 42px; align-self: stretch; border: 1px solid var(--line); border-radius: 8px;
  background: var(--white); color: var(--gray-soft); font-size: 17px; line-height: 1; cursor: pointer;
  transition: background .12s, color .12s, border-color .12s; }
.q-row .del:hover { background: #fee2e2; color: #ef4444; border-color: #fecaca; }
.q-body { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 11px; font-size: 13.5px; line-height: 1.7; font-family: inherit; resize: vertical; box-sizing: border-box; }
.q-count { font-size: 11.5px; color: var(--gray); text-align: right; margin-top: 6px; }

/* ===== 명함 (card) - A4 아닌 카드 크기 ===== */
.doc-viewport:has(.doc-page.card) { align-items: center; }   /* 짧은 카드는 미리보기 세로 중앙 */
.doc-page.card { width: 620px; height: 344px; padding: 40px 46px; }
.thumb-doc .doc-page.card { width: 620px; height: 344px; padding: 36px 40px; }
.cd { display: flex; flex-direction: column; height: 100%; }
.cd-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cd-brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; max-width: 65%; }
.cd-logo { height: 40px; max-width: 160px; object-fit: contain; flex: none; }
.cd-company { font-size: 21px; font-weight: 800; color: var(--accent, #1e3a8a); letter-spacing: -0.3px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-slogan { font-size: 11px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; max-width: 35%; min-width: 0; }
.cd-id { margin-top: 28px; display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.cd-name { font-size: 30px; font-weight: 800; color: #111; letter-spacing: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 60%; }
.cd-role { font-size: 13px; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
.cd-divider { height: 2px; width: 46px; background: var(--accent, #1e3a8a); margin: 16px 0; }
.cd-contacts { margin-top: auto; display: flex; flex-direction: column; gap: 7px; }
.cd-line { font-size: 12.5px; color: #333; display: flex; align-items: center; gap: 9px; }
.cd-line b { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 4px; background: var(--accent, #1e3a8a); color: #fff; font-size: 9px; font-weight: 700; flex: none; font-family: Arial, sans-serif; }
/* 카드 색상 선택 스와치 (입력폼) */
.cd-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.cd-sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.cd-sw.on { box-shadow: 0 0 0 2px var(--point); transform: scale(1.08); }

/* ===== 가정통신문·안내문 (notice) ===== */
.nt-page { display: flex; flex-direction: column; min-height: 1011px; }
.nt-reply-block { margin-top: auto; }   /* 절취선·회신란을 페이지 하단(뜯는 부분)에 고정 */
.nt-head { font-size: 24px; font-weight: 800; text-align: center; padding-bottom: 12px; border-bottom: 2px solid #1a1a1a; letter-spacing: 3px; }
.nt-meta { display: flex; justify-content: space-between; font-size: 12px; color: #555; margin: 10px 2px 22px; }
.nt-title { text-align: center; font-size: 20px; font-weight: 700; margin-bottom: 22px; }
.nt-body { font-size: 13.5px; line-height: 2; color: #222; white-space: pre-wrap; overflow-wrap: break-word; min-height: 200px; max-height: 580px; overflow: hidden; }
.nt-date { text-align: center; font-size: 14px; margin: 28px 0 6px; letter-spacing: 1px; }
.nt-sender { text-align: center; font-size: 18px; font-weight: 700; }
.nt-cut { display: flex; align-items: center; gap: 8px; margin: 30px 0 16px; color: #999; font-size: 12px; }
.nt-cut span { white-space: nowrap; }
.nt-cut::before, .nt-cut::after { content: ''; flex: 1; border-top: 1.5px dashed #b3b3b3; }
.nt-reply-confirm { font-size: 13px; text-align: center; margin-bottom: 12px; color: #333; }
.nt-reply-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
.nt-reply-tbl td { border: 1px solid #c6cad1; padding: 10px; }
.nt-reply-tbl .k { background: #f5f6f8; font-weight: 600; text-align: center; white-space: nowrap; width: 13%; }
.nt-reply-tbl .v { width: 20.3%; text-align: center; color: #888; }

/* ===== 증명·증서 (certificate) ===== */
.ct-page { display: flex; flex-direction: column; min-height: 1011px; }   /* A4 콘텐츠 높이 */
.ct-bottom { margin-top: auto; }                                          /* 증명서: 발급기관 하단 고정 */
.ct-sec { width: 80%; margin: 26px auto 0; font-size: 13px; font-weight: 700; background: #f5f6f8; border-left: 3px solid #64748b; padding: 7px 10px; color: #1a1a1a; }
.ct-handover { width: 80%; margin: -1px auto 0; border: 1px solid #c6cad1; padding: 12px 14px; font-size: 12.5px; line-height: 1.9; white-space: pre-wrap; min-height: 88px; max-height: 220px; overflow: hidden; }
.ct-docno { text-align: right; font-size: 12px; color: #555; margin-bottom: 6px; }
.ct-title { text-align: center; font-size: 30px; font-weight: 800; letter-spacing: 16px; margin: 8px 0 42px; }
.ct-info { width: 78%; margin: 0 auto 30px; border-collapse: collapse; font-size: 14px; }
.ct-info td { border: 1px solid #c6cad1; padding: 11px 14px; }
.ct-info .k { background: #f5f6f8; font-weight: 600; width: 30%; text-align: center; color: #555; white-space: nowrap; }
.ct-body { text-align: center; font-size: 15px; line-height: 2; margin: 28px 0 12px; max-height: 210px; overflow: hidden; }
.ct-letter { text-align: left; text-indent: 1.4em; line-height: 2.2; width: 80%; margin: 30px auto 12px; max-height: 232px; overflow: hidden; }
.ct-purpose { text-align: center; font-size: 13px; color: #444; margin-bottom: 8px; }
.ct-date { text-align: center; font-size: 15px; margin-bottom: 0; letter-spacing: 2px; }
.ct-issuer { text-align: center; }
.ct-org { font-size: 18px; font-weight: 700; }
.ct-ceo { font-size: 15px; margin-top: 8px; }
.ct-meta { font-size: 12px; color: #666; margin-top: 8px; }
.ct-signer { text-align: center; font-size: 15px; margin-top: 16px; }
.ct-recipient { text-align: center; font-size: 16px; font-weight: 700; margin-top: 32px; }
.ct-page.flow .ct-bottom { margin-top: 56px; }   /* 사직서: 내용 바로 뒤에 자연스럽게 (하단 절대고정 안 함) */

/* ===== 차용증·위임장 (legal) ===== */
.lg-page { display: flex; flex-direction: column; }
.lg-title { text-align: center; font-size: 30px; font-weight: 800; letter-spacing: 16px; margin: 6px 0 30px; }
.lg-amount { border: 2.5px solid #111; border-radius: 4px; padding: 20px 22px; text-align: center; margin: 0 0 20px; background: #fafbfc; }
.lg-amount-kr { font-size: 25px; font-weight: 800; letter-spacing: 1px; min-height: 30px; }
.lg-amount-num { font-size: 16px; color: #444; margin-top: 8px; }
.lg-body, .lg-lead { font-size: 14.5px; line-height: 1.95; color: #1f2430; margin: 0 0 20px; word-break: keep-all; }
.lg-terms { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 0 0 20px; }
.lg-terms td { border: 1px solid #c6cad1; padding: 10px 14px; }
.lg-terms .k { background: #f5f6f8; font-weight: 600; width: 26%; color: #555; white-space: nowrap; letter-spacing: 1px; }
.lg-sec { font-size: 14px; font-weight: 700; color: #111; border-left: 3px solid var(--accent, #6366f1); padding-left: 10px; margin: 4px 0 12px; }
.lg-special, .lg-content { font-size: 13.5px; line-height: 1.9; color: #222; white-space: pre-wrap; word-break: keep-all;
  border: 1px solid #e2e4e9; border-radius: 6px; padding: 12px 14px; margin-bottom: 20px; background: #fcfcfd; min-height: 56px; max-height: 280px; overflow: hidden; }
.lg-content { margin-bottom: 22px; }
.lg-date { text-align: center; font-size: 15px; letter-spacing: 2px; margin: 14px 0 24px; }
.lg-parties { display: flex; gap: 18px; }
.lg-parties-col { flex-direction: column; gap: 12px; }
.lg-parties-col .lg-party { width: 100%; }
.lg-decl { font-size: 14px; text-align: center; color: #1f2430; margin: 22px 0 18px; word-break: keep-all; }
.lg-signline { text-align: right; font-size: 15.5px; margin-top: 6px; }
.lg-signline .lg-sign { font-weight: 600; }
.lg-signrow { display: flex; justify-content: flex-end; gap: 40px; font-size: 15px; margin-top: 8px; }
.lg-signcell .lg-sign { font-weight: 600; }
.lg-party { flex: 1; min-width: 0; }
.lg-party-t { font-size: 13px; font-weight: 700; color: #333; margin-bottom: 6px; }
.lg-ptbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.lg-ptbl td { border: 1px solid #c6cad1; padding: 7px 10px; }
.lg-ptbl .k { background: #f7f8fa; color: #555; font-weight: 600; width: 38%; white-space: nowrap; letter-spacing: 1px; }
.lg-ptbl .v { word-break: break-all; }
.lg-sign { display: inline-flex; align-items: center; gap: 4px; }

/* ===== 이력서 (resume) ===== */
.rs-title { text-align: center; font-size: 30px; font-weight: 800; letter-spacing: 14px; padding-bottom: 13px; border-bottom: 2px solid #1a1a1a; margin-bottom: 18px; }
.rs-top { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 6px; }
.rs-info-wrap { flex: 1; min-width: 0; }
.rs-info { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rs-info td { border: 1px solid #c6cad1; padding: 8px 10px; }
.rs-info .k { background: #f5f6f8; font-weight: 600; width: 84px; white-space: nowrap; text-align: center; color: #555; }
.rs-photo { width: 108px; height: 144px; flex: none; border: 1px solid #c6cad1; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11px; color: #aaa; overflow: hidden; }
.rs-photo img { width: 100%; height: 100%; object-fit: cover; }
.rs-sec { font-size: 13px; font-weight: 700; background: #f5f6f8; border-left: 3px solid #0ea5e9; padding: 7px 10px; margin-top: 16px; color: #1a1a1a; }
.rs-table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; margin-top: -1px; }
.rs-table th { background: #f5f6f8; border: 1px solid #c6cad1; padding: 7px 5px; font-weight: 700; }
.rs-table td { border: 1px solid #e2e4e9; padding: 7px 8px; height: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-table td.l { text-align: left; } .rs-table td.c { text-align: center; }
.rs-etc { border: 1px solid #e2e4e9; padding: 10px; font-size: 12px; min-height: 56px; max-height: 130px; overflow: hidden; white-space: pre-wrap; line-height: 1.6; margin-top: -1px; }
.rs-page { display: flex; flex-direction: column; min-height: 1011px; }   /* A4 콘텐츠 높이 = 작성자 줄 하단 고정 */
.rs-foot { display: flex; justify-content: space-between; margin-top: auto; padding-top: 22px; font-size: 12.5px; color: #333; }

/* ===== 상장·표창장 (certificate variant award) ===== */
.aw-page { position: relative; min-height: 1011px; border: 2.5px solid #b45309;
  box-shadow: inset 0 0 0 6px #fff, inset 0 0 0 8px #c9962f;
  display: flex; flex-direction: column; padding: 64px 56px; text-align: center;
  background: radial-gradient(circle at 50% 8%, rgba(180,83,9,.05), transparent 55%); }
.aw-page .ct-docno { position: absolute; top: 28px; right: 32px; }
.aw-title { font-family: 'Nanum Myeongjo', 'Batang', 'AppleMyungjo', serif; font-size: 56px; font-weight: 800; letter-spacing: 26px; color: #1a1a1a; margin-top: 64px; }
.aw-flourish { display: flex; align-items: center; justify-content: center; width: 210px; margin: 16px auto 0; color: #b45309; }
.aw-flourish::before, .aw-flourish::after { content: ''; flex: 1; height: 1.5px; background: linear-gradient(90deg, transparent, #c9962f, transparent); }
.aw-flourish span { margin: 0 12px; font-size: 13px; }
.aw-mid { margin-top: 60px; display: flex; flex-direction: column; gap: 30px; }
.aw-sub { font-size: 16px; color: #555; margin-bottom: 12px; letter-spacing: 1px; }
.aw-name { font-family: 'Nanum Myeongjo', 'Batang', 'AppleMyungjo', serif; font-size: 38px; font-weight: 700; letter-spacing: 14px; color: #111; }
.aw-body { font-size: 18px; line-height: 2.2; width: 82%; max-height: 380px; overflow: hidden; margin: 0 auto; color: #222; white-space: pre-wrap; overflow-wrap: break-word; }
.aw-bottom { margin-top: auto; }   /* 수여기관 하단 고정 (제목은 상단 고정, 공적만 가운데서 일정선까지) */
.aw-date { font-size: 17px; letter-spacing: 2px; margin-bottom: 28px; }
.aw-org { font-size: 21px; font-weight: 700; }
.aw-ceo { font-size: 18px; margin-top: 10px; }

/* ===== 텍스트 유틸 도구 (A4 아님) ===== */
/* ===== 급여명세서 (payslip) ===== */
.ps-page { display: flex; flex-direction: column; min-height: 1011px; }
.ps-title { text-align: center; font-size: 28px; font-weight: 800; letter-spacing: 10px; padding-bottom: 12px; border-bottom: 2.5px solid #111; margin-bottom: 6px; }
.ps-page .qt-meta { margin-bottom: 14px; }
.ps-info { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 16px; table-layout: fixed; }
.ps-info td { border: 1px solid #c6cad1; padding: 8px 10px; }
.ps-info .k { background: #f5f6f8; color: #555; font-weight: 600; width: 15%; white-space: nowrap; text-align: center; }
.ps-info .v { width: 35%; word-break: break-all; }
.ps-hours { margin-bottom: 14px; border: 1px solid #c6cad1; border-radius: 3px; padding: 8px 12px; font-size: 12px; color: #333; background: #fafbfc; }
.ps-cols { display: flex; gap: 14px; align-items: flex-start; }
.ps-tbl { flex: 1; width: 50%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
.ps-tbl col.c-amt { width: 42%; }
.ps-tbl th { background: #f5f6f8; border: 1px solid #c6cad1; padding: 8px; font-weight: 700; }
.ps-tbl td { border: 1px solid #e2e4e9; padding: 7px 9px; height: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-tbl td.l { text-align: left; } .ps-tbl td.r { text-align: right; }
.ps-tbl tfoot .sum td { background: #f7f8fa; font-weight: 800; font-size: 13px; border-color: #c6cad1; }
.ps-net { display: flex; align-items: center; gap: 14px; margin-top: 14px; border: 2.5px solid #111; border-radius: 4px; padding: 15px 20px; background: #fafbfc; }
.ps-net-l { font-size: 15px; font-weight: 800; letter-spacing: 2px; white-space: nowrap; }
.ps-net-kr { flex: 1; text-align: right; font-size: 14px; font-weight: 700; color: #333; }
.ps-net-v { font-size: 22px; font-weight: 800; min-width: 140px; text-align: right; }
.ps-sec { font-size: 13px; font-weight: 700; background: #f5f6f8; border-left: 3px solid #64748b; padding: 7px 10px; color: #1a1a1a; margin: 18px 0 0; }
.ps-note { border: 1px solid #c6cad1; border-top: none; padding: 11px 13px; font-size: 12px; line-height: 1.8; white-space: pre-wrap; min-height: 40px; max-height: 150px; overflow: hidden; }
.ps-foot { margin-top: auto; text-align: center; padding-top: 30px; }
.ps-decl { font-size: 13px; color: #333; margin-bottom: 14px; }
.ps-date { font-size: 15px; letter-spacing: 2px; margin-bottom: 10px; }
.ps-issuer { font-size: 17px; font-weight: 700; }
/* 급여명세서 입력폼 보조 (4대보험 자동계산 바 · 비과세 체크) */
.ps-auto-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ps-auto-help { font-size: 12px; color: var(--gray); line-height: 1.5; }
.ps-tf label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #555; white-space: nowrap; cursor: pointer; }
.ps-tf input { width: 15px; height: 15px; accent-color: var(--point); }

/* ===== 지출결의서 (expense) ===== */
.ex-page { display: flex; flex-direction: column; min-height: 1011px; }
.ex-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.ex-title { font-size: 27px; font-weight: 800; letter-spacing: 8px; align-self: center; }
.ex-approval { border-collapse: collapse; font-size: 11px; text-align: center; }
.ex-approval th, .ex-approval td { border: 1px solid #c6cad1; }
.ex-approval th { background: #f5f6f8; font-weight: 700; padding: 4px 12px; min-width: 52px; }
.ex-approval .ex-ap-side { width: 20px; min-width: 20px; padding: 4px 3px; line-height: 1.15; }
.ex-approval td { height: 42px; }
.ex-info { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 14px; table-layout: fixed; }
.ex-info td { border: 1px solid #c6cad1; padding: 8px 10px; }
.ex-info .k { background: #f5f6f8; color: #555; font-weight: 600; width: 15%; text-align: center; white-space: nowrap; }
.ex-info .v span { vertical-align: middle; }
.ex-amount-kr { margin-top: -1px; border: 1px solid #c6cad1; border-top: none; padding: 9px 12px; font-size: 13px; font-weight: 700; text-align: right; }

/* ===== 업무 인수인계서 (handover) ===== */
.ho-page { display: flex; flex-direction: column; min-height: 1011px; }
.ho-title { text-align: center; font-size: 27px; font-weight: 800; letter-spacing: 8px; padding-bottom: 12px; border-bottom: 2.5px solid #111; margin-bottom: 6px; }
.ho-page .qt-meta { margin-bottom: 14px; }
.ho-info { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 16px; table-layout: fixed; }
.ho-info td { border: 1px solid #c6cad1; padding: 8px 10px; }
.ho-info .k { background: #f5f6f8; color: #555; font-weight: 600; width: 15%; text-align: center; white-space: nowrap; }
.ho-sec { margin-top: 14px; font-size: 12.5px; font-weight: 700; background: #f5f6f8; border-left: 3px solid #64748b; padding: 6px 10px; }
.ho-note { border: 1px solid #c6cad1; border-top: none; padding: 9px 11px; font-size: 12px; line-height: 1.8; white-space: pre-wrap; min-height: 36px; max-height: 130px; overflow: hidden; }
.ho-foot { margin-top: auto; text-align: center; padding-top: 26px; }
.ho-decl { font-size: 13px; color: #333; margin-bottom: 14px; }
.ho-date { font-size: 15px; letter-spacing: 2px; margin-bottom: 16px; }
.ho-signrow { display: flex; justify-content: center; gap: 34px; flex-wrap: wrap; font-size: 14px; }
.ho-signcell { display: inline-flex; align-items: center; }
.ho-signcell b { font-weight: 700; margin: 0 4px; }

/* ===== 근로계약서 (contract) ===== */
.ec-page { display: flex; flex-direction: column; min-height: 1011px; font-size: 12px; line-height: 1.7; color: #1a1a1a; }
.ec-title { text-align: center; font-size: 24px; font-weight: 800; letter-spacing: 8px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid #111; }
.ec-intro { margin-bottom: 12px; font-size: 12.5px; }
.ec-clauses { list-style: none; margin: 0; padding: 0; }
.ec-clauses > li { display: flex; gap: 8px; padding: 5px 2px; border-bottom: 1px dotted #dfe2e8; }
.ec-no { flex: none; width: 120px; font-weight: 700; color: #222; }
.ec-val { flex: 1; min-width: 0; word-break: break-word; }
.ec-pay { display: flex; flex-direction: column; gap: 2px; }
.ec-sec { margin-top: 12px; font-size: 12.5px; font-weight: 700; background: #f5f6f8; border-left: 3px solid #64748b; padding: 6px 10px; }
.ec-note { border: 1px solid #c6cad1; border-top: none; padding: 9px 11px; font-size: 11.5px; line-height: 1.7; white-space: pre-wrap; min-height: 32px; max-height: 84px; overflow: hidden; }
.ec-date { text-align: center; margin: 20px 0 12px; font-size: 13px; letter-spacing: 2px; }
.ec-sign { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.ec-party { display: flex; gap: 10px; }
.ec-plabel { flex: none; width: 62px; font-weight: 700; }
.ec-plines { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.ec-signhint { color: #999; font-size: 11px; margin-left: 10px; }
/* 근로계약서 입력폼: 사회보험 체크 */
.ec-ins-row { display: flex; flex-wrap: wrap; gap: 9px 18px; padding: 2px 0; }
.ec-chk { display: inline-flex; align-items: center; font-size: 13px; line-height: 1; color: #444; cursor: pointer; white-space: nowrap; }
.ec-chk input { width: 15px; height: 15px; margin: 0; padding: 0; vertical-align: middle; accent-color: var(--point); }
.ec-chk span { margin-left: 6px; }

.text-tool { margin: 22px 0 8px; }
.tt-wrap { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow-card); }
/* 글자수·정렬: 2단 (높이 정렬, 늘려서 빈칸 만들지 않음) */
.tt-wrap.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
/* 영문이름·주소: 세로 스택 (입력 위 → 결과 아래) */
.tt-wrap.stack { display: block; }
.tt-wrap.stack .tt-side { margin-top: 16px; }
.tt-main, .tt-side, .tt-col { display: flex; flex-direction: column; min-width: 0; }
/* 정렬: 옵션 상단 바 + 입력·결과 동일 높이 2단 */
.tt-align .tt-opts-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding: 2px 0 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tt-opt-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.tt-align-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tt-align .tt-input, .tt-align .tt-output { min-height: 300px; }
.tt-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.tt-bar.sub { margin-top: 14px; }
.tt-bar-label { font-size: 13px; font-weight: 700; color: var(--ink); }
.tt-actions { display: flex; gap: 8px; }
.tt-input { width: 100%; min-height: 320px; resize: vertical; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; font-size: 14px; line-height: 1.7; font-family: inherit; color: var(--ink); background: #fcfcfd; box-sizing: border-box; }
.tt-input:focus { outline: none; border-color: var(--accent, var(--point));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, var(--point)) 14%, #fff); }
.tt-input.short { min-height: 96px; }
.tt-output { background: var(--bg); min-height: 240px; }
.tt-hint { font-size: 12px; color: var(--gray); line-height: 1.6; margin-top: 12px; }

/* 글자수 통계 */
.tt-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tt-stat { background: #f7f8fa; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 3px; }
.tt-stat.main { grid-column: 1 / -1; background: color-mix(in srgb, var(--accent) 8%, #fff);
  border-color: color-mix(in srgb, var(--accent) 28%, #fff); }
.tt-stat .num { font-size: 22px; font-weight: 800; color: var(--ink); }
.tt-stat.main .num { font-size: 30px; color: var(--accent); }
.tt-stat .lbl { font-size: 12px; color: var(--gray); font-weight: 600; }

/* 로마자 결과 */
.tt-out { display: flex; flex-direction: column; gap: 12px; }
.tt-empty { color: var(--gray-soft); font-size: 14px; padding: 36px 10px; text-align: center; }
.tt-row { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.tt-row.big { background: color-mix(in srgb, var(--accent) 7%, #fff); border-color: color-mix(in srgb, var(--accent) 26%, #fff); }
.tt-row-label { font-size: 12px; color: var(--gray); font-weight: 600; margin-bottom: 6px; }
.tt-row-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tt-val { font-size: 19px; font-weight: 700; color: var(--ink); word-break: break-all; }
.tt-row.big .tt-val { color: var(--accent); }
.tt-alts { font-size: 12px; color: var(--gray); margin-top: 7px; }
.tt-copy { font-size: 12px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, #fff);
  border: none; border-radius: 8px; padding: 6px 12px; cursor: pointer; flex: none; }
.tt-copy.done { color: var(--ok); background: #ecfdf5; }

/* 이름 입력 */
.tt-name-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.tt-field label { display: block; font-size: 12.5px; color: var(--gray); margin-bottom: 5px; font-weight: 600; }
.tt-field input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  font-size: 16px; font-family: inherit; box-sizing: border-box; }
.tt-field input:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, #fff); }

/* 정렬 옵션 */
.tt-opts { display: flex; flex-direction: column; gap: 9px; }
.tt-opt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tt-chip { font-size: 12.5px; font-weight: 600; color: var(--gray); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; cursor: pointer; }
.tt-chip input { display: none; }
.tt-chip:has(input:checked) { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, #fff);
  border-color: color-mix(in srgb, var(--accent) 35%, #fff); }
.tt-chk { font-size: 13px; color: var(--ink); display: flex; align-items: center; gap: 8px; cursor: pointer; }
.tt-chk input { width: 16px; height: 16px; accent-color: var(--accent); }
.tt-cnt { font-weight: 600; color: var(--gray); font-size: 12px; }

/* 텍스트 도구 카드 썸네일 (입력→결과 미니뷰) */
.tt-thumb { width: 794px; height: 530px; background: #fff; display: flex; flex-direction: column; padding: 48px 60px; }
.tt-thumb-head { display: flex; align-items: center; gap: 18px; font-size: 44px; font-weight: 800; color: var(--accent); margin-bottom: 20px; }
.tt-thumb-ic { width: 64px; height: 64px; flex: none; }
.tt-thumb-ic svg { width: 100%; height: 100%; }
.tt-thumb-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 36px; }
.ttt-lines { display: flex; flex-direction: column; gap: 24px; }
.ttt-lines i { height: 22px; background: #e9ebf0; border-radius: 7px; display: block; }
.ttt-big { display: flex; align-items: baseline; gap: 20px; justify-content: center; margin-top: 8px; }
.ttt-big .n { font-size: 104px; font-weight: 800; color: var(--accent); }
.ttt-big .u { font-size: 44px; font-weight: 700; color: #444; }
.ttt-io { display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center; }
.ttt-ko { font-size: 60px; font-weight: 800; color: #1a1a1a; line-height: 1.25; }
.ttt-ko.sm { font-size: 46px; }
.ttt-arrow { font-size: 60px; color: var(--accent); font-weight: 700; line-height: 1; }
.ttt-en { font-size: 56px; font-weight: 800; color: var(--accent); line-height: 1.25; }
.ttt-en.sm { font-size: 42px; }
.ttt-cols { display: flex; align-items: center; gap: 36px; justify-content: center; }
.ttt-list { list-style: none; font-size: 40px; font-weight: 700; display: flex; flex-direction: column; gap: 18px; }
.ttt-list.before { color: #aab0bc; }
.ttt-list.after { color: #1a1a1a; }
.ttt-qr { display: flex; align-items: center; justify-content: center; }

/* QR코드 출력 */
.qr-out { display: flex; align-items: center; justify-content: center; min-height: 240px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.qr-out canvas, .qr-out img { display: block; max-width: 100%; height: auto; }
.qr-dl { align-self: center; margin-top: 14px; }
.tt-wrap.stack .tt-side:has(.qr-out) { align-items: center; }

/* 이미지 → PDF */
.i2p-drop { border: 2px dashed color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 4%, #fff); padding: 30px 18px; text-align: center; cursor: pointer;
  transition: background .15s, border-color .15s; }
.i2p-drop:hover, .i2p-drop:focus-visible { outline: none; background: color-mix(in srgb, var(--accent) 8%, #fff); border-color: var(--accent); }
.i2p-drop.over { background: color-mix(in srgb, var(--accent) 12%, #fff); border-color: var(--accent); }
.i2p-drop-ic { width: 40px; height: 40px; color: var(--accent); }
.i2p-drop-t { font-size: 15px; font-weight: 600; color: #222; margin: 8px 0 4px; }
.i2p-drop-t b { color: var(--accent); }
.i2p-drop-s { font-size: 12.5px; color: var(--gray); }
.i2p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; margin-top: 16px; }
.i2p-item { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.i2p-thumb { aspect-ratio: 1; background: #f4f5f8; display: flex; align-items: center; justify-content: center; }
.i2p-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.i2p-item-bar { display: flex; align-items: center; gap: 2px; padding: 5px 6px; }
.i2p-item-bar button { border: none; background: none; cursor: pointer; color: var(--gray); font-size: 13px; line-height: 1;
  padding: 4px 6px; border-radius: 7px; }
.i2p-item-bar button:hover:not(:disabled) { background: var(--bg); color: #111; }
.i2p-item-bar button:disabled { opacity: .3; cursor: default; }
.i2p-idx { flex: 1; text-align: center; font-size: 12px; font-weight: 700; color: var(--accent); }
.i2p-del { margin-left: auto; }
.i2p-del:hover { color: #dc2626 !important; background: #fee2e2 !important; }
.i2p-opts { display: flex; flex-direction: column; gap: 16px; }
.i2p-opt-h { font-size: 12.5px; font-weight: 700; color: #333; margin-bottom: 8px; }
.i2p-opt.off { opacity: .4; pointer-events: none; }
.i2p-make { width: 100%; justify-content: center; margin-top: 18px; padding: 12px; font-size: 15px; }
.i2p-make:disabled { opacity: .5; cursor: default; }

/* 이미지 → PDF 카드 썸네일 */
.ttt-i2p { display: flex; align-items: center; justify-content: center; gap: 30px; }
.ttt-i2p-imgs { position: relative; width: 200px; height: 200px; }
.ttt-ph { position: absolute; width: 150px; height: 150px; border-radius: 14px; background: #d6dae2; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.ttt-ph.p3 { top: 30px; left: 44px; transform: rotate(6deg); }
.ttt-ph.p2 { top: 20px; left: 30px; transform: rotate(-4deg); background: #c3c8d2; }
.ttt-ph.p1 { top: 26px; left: 12px; transform: rotate(-2deg); background: var(--accent);
  display: flex; align-items: center; justify-content: center; }
.ttt-ph.p1 svg { width: 92px; height: 92px; }
.ttt-pdf { width: 150px; height: 186px; border-radius: 14px; background: #fff; border: 3px solid var(--accent);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.ttt-pdf span { font-size: 48px; font-weight: 800; color: var(--accent); letter-spacing: 1px; }
.ttt-idp { display: flex; align-items: center; justify-content: center; gap: 30px; }
.ttt-idp-frame { width: 180px; height: 240px; border: 5px solid var(--accent); border-radius: 12px; background: #9aa4b2; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.ttt-idp-frame svg { width: 150px; height: 150px; margin-bottom: -8px; }
.ttt-idp-tag { font-size: 46px; font-weight: 800; color: var(--accent); }

/* PDF 파일 목록 (합치기·분할) */
.pdf-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.pdf-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #fff; }
.pdf-ic { flex: none; width: 26px; height: 26px; color: #dc2626; }
.pdf-ic svg { width: 100%; height: 100%; }
.pdf-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pdf-name { font-size: 13px; font-weight: 600; color: #222; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdf-sub { font-size: 11.5px; color: var(--gray); }
.pdf-ord { flex: none; display: flex; align-items: center; gap: 2px; }
.pdf-ord button { border: none; background: none; cursor: pointer; color: var(--gray); font-size: 12px; padding: 4px 6px; border-radius: 6px; line-height: 1; }
.pdf-ord button:hover:not(:disabled) { background: var(--bg); color: #111; }
.pdf-ord button:disabled { opacity: .3; cursor: default; }
.pdf-ord .i2p-del:hover { color: #dc2626; background: #fee2e2; }
.ps-range { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit; box-sizing: border-box; }
.ps-range:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, #fff); }

/* 증명사진 규격 맞추기 */
.idp-stage canvas { width: 100%; max-width: 320px; display: block; margin: 0 auto; border-radius: 10px; border: 1px solid var(--line); background: #eef0f4; touch-action: none; cursor: grab; }
.idp-stage canvas:active { cursor: grabbing; }
.idp-zoom { display: flex; align-items: center; gap: 10px; max-width: 320px; margin: 12px auto 4px; font-size: 12px; color: var(--gray); }
.idp-zoom input { flex: 1; accent-color: var(--accent); }

/* ===== 가이드 아티클 ===== */
.article { max-width: 760px; margin: 0 auto; }
.article-head { margin: 6px 0 22px; }
.article-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent, var(--point));
  background: color-mix(in srgb, var(--accent, var(--point)) 12%, #fff); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.article-head h1 { font-size: 30px; font-weight: 800; line-height: 1.32; letter-spacing: -0.01em; }
.article-meta { display: flex; gap: 8px; color: var(--gray); font-size: 13px; margin-top: 12px; }
.article-lead { font-size: 16px; line-height: 1.8; color: var(--ink); margin-top: 18px; }
.article-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 24px 0;
  background: color-mix(in srgb, var(--accent, var(--point)) 7%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent, var(--point)) 24%, #fff); border-radius: 16px; padding: 18px 20px; }
.article-cta-ic { width: 44px; height: 44px; color: var(--accent, var(--point)); background: #fff; border-radius: 12px; padding: 9px; flex: none; }
.article-cta-ic svg { width: 100%; height: 100%; }
.article-cta-body { flex: 1; min-width: 180px; }
.article-cta-body b { font-size: 15px; }
.article-cta-body p { font-size: 13px; color: var(--gray); margin-top: 3px; line-height: 1.5; }
.article-cta .btn-cta { flex: none; background: var(--accent, var(--point)); }
.article-body h2 { font-size: 21px; font-weight: 800; margin: 34px 0 12px; line-height: 1.35; }
.article-body p { font-size: 15.5px; line-height: 1.85; color: #374151; margin: 12px 0; }
.article-body ul, .article-body ol { margin: 12px 0; padding-left: 20px; }
.article-body li { font-size: 15.5px; line-height: 1.8; color: #374151; margin: 8px 0; }
.article-body b { color: var(--ink); font-weight: 700; }
.article-body a { color: var(--accent, var(--point)); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent, var(--point)) 55%, #fff); text-decoration-thickness: 2px; text-underline-offset: 3px; border-bottom: none; transition: text-decoration-color .12s, color .12s; }
.article-body a:hover { text-decoration-color: var(--accent, var(--point)); }
.article-toc { background: #f7f8fa; border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin: 22px 0; }
.article-toc-h { font-size: 13px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.article-toc ul { margin: 0; padding-left: 20px; }
.article-toc li { font-size: 14px; line-height: 1.8; color: #4b5563; }

/* GEO: 상단 핵심 요약(빠른 답변) 박스 */
.answer-box { background: #eef2ff; border: 1px solid #c7cef5; border-left: 4px solid var(--accent, #4f46e5); border-radius: 12px; padding: 18px 22px; margin: 22px 0; }
.answer-box-h { font-size: 12px; font-weight: 800; color: #4338ca; letter-spacing: .02em; margin-bottom: 8px; }
.answer-box-a { font-size: 15.5px; line-height: 1.75; color: var(--ink); margin: 0; font-weight: 500; }
.answer-box-facts { margin: 12px 0 0; padding-left: 20px; }
.answer-box-facts li { font-size: 14px; line-height: 1.85; color: #374151; }

/* E-E-A-T: 참고 자료(출처) 블록 */
.article-sources { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 18px; }
.article-sources-h { font-size: 13px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.article-sources ul { margin: 0; padding-left: 20px; }
.article-sources li { font-size: 13.5px; line-height: 1.9; color: #4b5563; }
.article-sources a { color: var(--point); text-decoration: underline; }
.tbl-scroll { overflow-x: auto; margin: 18px 0; }
.g-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.g-table th, .g-table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.g-table thead th { background: color-mix(in srgb, var(--accent, var(--point)) 9%, #fff); font-weight: 700; color: var(--ink); white-space: nowrap; }
.g-table td b { color: var(--accent, var(--point)); }
.g-faq-block { margin-top: 8px; }
.sibling-title.mt { margin-top: 16px; }

/* 가이드 허브 */
.guide-cat { margin-top: 30px; }
.guide-cat-h { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; color: var(--ink); padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.guide-cat-n { font-size: 12px; font-weight: 700; color: var(--gray); background: #f1f3f5; border-radius: 999px; padding: 1px 9px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.guide-card { display: flex; flex-direction: column; gap: 8px; background: var(--white); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px; box-shadow: var(--shadow-card); border-top: 3px solid var(--accent, var(--point));
  transition: transform .12s, border-color .12s, background .12s, box-shadow .12s; -webkit-tap-highlight-color: transparent; }
.guide-card:hover { transform: translateY(-3px); border-color: var(--accent, var(--point)); box-shadow: 0 12px 26px rgba(15, 23, 42, .1); }
.guide-card:hover .guide-card-go { color: var(--accent, var(--point)); }
.guide-card .guide-card-go { transition: transform .12s; }
.guide-card:hover .guide-card-go { transform: translateX(3px); }
.guide-card:active { transform: translateY(-1px); }
.guide-card-tag { font-size: 11px; font-weight: 700; color: var(--accent, var(--point)); }
.guide-card h3 { font-size: 16px; font-weight: 800; line-height: 1.4; }
.guide-card p { font-size: 13px; color: var(--gray); line-height: 1.55; flex: 1; }
.guide-card-go { font-size: 13px; font-weight: 700; color: var(--accent, var(--point)); }
@media (max-width: 720px) {
  .guide-cat { margin-top: 22px; }
  .guide-grid { gap: 8px; margin-top: 12px; }
  .guide-card { flex-direction: row; align-items: center; gap: 10px; padding: 13px 15px; border-radius: 12px;
    border-top: 1px solid var(--line); border-left: 3px solid var(--accent, var(--point)); box-shadow: none; }
  .guide-card:hover { transform: none; box-shadow: none; }
  .guide-card h3 { font-size: 14.5px; flex: 1; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .guide-card p { display: none; }
  .guide-card-go { flex: none; font-size: 0; }
  .guide-card-go::after { content: "›"; font-size: 22px; font-weight: 700; color: var(--accent, var(--point)); display: inline-block; transition: transform .12s; }
  .guide-card:active { transform: none; background: color-mix(in srgb, var(--accent, var(--point)) 7%, #fff); border-color: var(--accent, var(--point)); }
  .guide-card:active .guide-card-go::after { transform: translateX(3px); }
}
.sec-more { font-size: 13.5px; font-weight: 700; color: var(--point); white-space: nowrap; }
.sec-more:hover { color: var(--point-dark); }

.actions { display: flex; gap: 10px; margin-top: 14px; }
.actions .btn-pdf { flex: 1.7; }
.btn { flex: 1; padding: 13px; border: none; border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer; }

/* 모바일 하단 고정 다운로드 바 */
.mobile-bar { display: none; }
@media (max-width: 980px) {
  .mobile-bar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: #fff; border-top: 1px solid var(--line);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 20px rgba(15, 23, 42, .08); }
  .mobile-bar .btn-pdf { flex: 1.7; }
  .pv-exp { display: none; } /* 미리보기 헤더의 인쇄·PNG·PDF는 하단 고정바로 대체 */
  body:has(.mobile-bar) { padding-bottom: 78px; } /* 바에 가리지 않게 */
}
@media print { .mobile-bar { display: none !important; } }
.btn-primary { background: var(--point); color: #fff; }
.btn-primary:hover { background: var(--point-dark); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--point); color: var(--point); }

/* ---------- 가이드 (프리렌더 본문) - jptcalc식 단일 컬럼 스택 ---------- */
.guide { max-width: 840px; margin: 60px auto 0; }
.guide-title { font-size: 24px; font-weight: 800; text-align: center; letter-spacing: -.4px; margin-bottom: 12px; }
.guide-lead { margin: 0 auto 28px; text-align: center; color: var(--gray); font-size: 15px; line-height: 1.8; }
.guide-cards { display: grid; gap: 16px; }   /* 세로 1열 스택 */
.g-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px; box-shadow: var(--shadow-card); }
.g-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.g-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--point-soft);
  color: var(--point); display: inline-flex; align-items: center; justify-content: center; }
.g-ico svg { width: 21px; height: 21px; display: block; }
.g-card-head h3 { margin: 0; }
.g-card h3 { font-size: 18px; font-weight: 800; }
.g-card p, .g-card li { font-size: 14.5px; color: #374151; line-height: 1.8; margin-bottom: 8px; }
.g-card ul { padding-left: 18px; margin-top: 4px; }
.g-card b { color: var(--ink); }
.g-faq-item { padding: 14px 0; border-top: 1px solid var(--line); }
.g-faq-item:first-child { border-top: none; padding-top: 0; }
.g-faq .faq-q { font-weight: 700; color: var(--ink); margin-bottom: 5px; }

/* 관련 도구 (jptcalc sibling-section 알약 링크) */
.sibling-section { max-width: 840px; margin: 28px auto 0; text-align: left; }
.sibling-group + .sibling-group { margin-top: 18px; }
.sibling-title { font-size: 13px; font-weight: 700; color: var(--gray); margin-bottom: 10px; }
.sibling-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
.sibling-link { padding: 8px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: var(--white); border: 1px solid var(--line); color: var(--gray); transition: border-color .12s, color .12s; }
.sibling-link:hover { border-color: var(--point); color: var(--point); }

/* ---------- 홈: 히어로 (좌우 2단) ---------- */
/* 옅은 인디고 톤으로 히어로 영역을 채워 흰 헤더와 구분, 아래로는 페이지 배경으로 페이드 */
.hero { background: linear-gradient(180deg, #ebeefb 0%, #f1f3fc 45%, var(--bg) 100%); }
.hero-in { max-width: var(--maxw); margin: 0 auto; padding: 64px 24px 60px; display: grid;
  grid-template-columns: 1fr 0.9fr; gap: 48px; align-items: center; }
.hero-copy h1 { font-size: 38px; font-weight: 800; letter-spacing: -.9px; line-height: 1.28; margin-bottom: 16px; }
.hero-copy p { color: var(--gray); font-size: 16.5px; line-height: 1.65; max-width: 480px; }
.hero-cta { display: flex; gap: 10px; margin: 28px 0 18px; flex-wrap: wrap; }
.btn-cta { display: inline-flex; align-items: center; padding: 13px 26px; border-radius: 12px; font-weight: 700; font-size: 16px; }
.btn-cta.sm { padding: 10px 18px; font-size: 14px; align-self: flex-start; }
.btn-cta.primary { background: var(--point); color: #fff; }
.btn-cta.primary:hover { background: var(--point-dark); }
.btn-cta.ghost { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.btn-cta.ghost:hover { border-color: var(--point); color: var(--point); }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--gray);
  background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; }
.badge b { font-style: normal; }

.hero-art { position: relative; display: flex; justify-content: center; }
/* 진짜 A4 한 장 (1:1.414). thumb.js가 794px 페이지를 프레임 폭에 맞춰 스케일 */
.hero-doc { position: relative; width: 380px; max-width: 100%; aspect-ratio: 1 / 1.414; overflow: hidden;
  border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(15, 23, 42, .14); }
.hero-doc .thumb-doc { position: absolute; top: 0; left: 0; width: 794px; transform-origin: top left; transform: scale(.478); pointer-events: none; }
.hero-doc .doc-page { width: 794px; min-height: 1123px; border: none; box-shadow: none; border-radius: 0; padding: 48px 44px; }
.hero-pill { position: absolute; top: -12px; right: 22px; z-index: 2; font-size: 12px; font-weight: 700; color: #fff;
  background: var(--point); border-radius: 999px; padding: 6px 13px; box-shadow: 0 6px 16px rgba(79, 70, 229, .35); }
.hero-chip { position: absolute; bottom: 16px; left: -10px; z-index: 2; font-size: 12.5px; font-weight: 700; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; box-shadow: 0 8px 20px rgba(15, 23, 42, .12); }
@media (max-width: 900px) { .hero-chip { left: 50%; transform: translateX(-50%); } }
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; gap: 32px; padding: 44px 20px 40px; text-align: center; }
  .hero-copy p { margin: 0 auto; } .hero-cta, .badges { justify-content: center; }
  .hero-copy h1 { font-size: 28px; }
}

/* ---------- 섹션 공통 ---------- */
.section-h { font-size: 19px; font-weight: 800; margin: 40px 0 16px; display: flex; align-items: center; gap: 8px; scroll-margin-top: 72px; }
.section-h .more { margin-left: auto; font-size: 13px; color: var(--point); font-weight: 600; }
.home-sec { margin-top: 52px; }
.home-sec-h { font-size: 22px; font-weight: 800; letter-spacing: -.4px; margin-bottom: 20px; }

/* 대표 도구 가로형 카드 */
.feature { display: grid; grid-template-columns: 300px 1fr; gap: 0; background: var(--white);
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
  transition: border-color .12s, box-shadow .12s, transform .12s; }
.feature:hover { border-color: var(--point); box-shadow: 0 14px 34px rgba(79, 70, 229, .12); transform: translateY(-2px); }
/* 회색 캔버스 위에 문서가 여백 두고 떠 있게 (thumb.js 미적용 = feat-doc) */
.feature-thumb { position: relative; overflow: hidden; background: #eef1f5; border-right: 1px solid var(--line);
  aspect-ratio: 1 / 1.05; display: flex; justify-content: center; align-items: flex-start; padding: 20px; }
.feature-thumb .feat-doc { flex: none; transform: scale(.29); transform-origin: top center; pointer-events: none; }
.feature-thumb .feat-doc .doc-page { box-shadow: 0 8px 22px rgba(15, 23, 42, .16); }
.feature-thumb::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 40px;
  background: linear-gradient(rgba(238, 241, 245, 0), #eef1f5); }
.feature-body { padding: 26px 30px; display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.feature-tags { display: flex; gap: 6px; }
.feature-body h3 { font-size: 22px; font-weight: 800; }
.feature-body p { color: var(--gray); font-size: 14.5px; line-height: 1.6; }
.feature-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 18px; margin: 6px 0 2px; width: 100%; }
.feature-list li { font-size: 13.5px; color: var(--ink); position: relative; padding-left: 20px; }
.feature-list li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.feature-meta { width: 100%; margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 4px; }
.fm-target { font-size: 12.5px; color: var(--gray); }
.fm-target b { color: var(--point); font-weight: 700; }
.fm-trust { font-size: 12px; color: var(--gray-soft); }
.feature-body .btn-cta { margin-top: 14px; box-shadow: 0 8px 18px rgba(79, 70, 229, .28); }
.tag.pop { color: #fff; background: var(--point); }
@media (max-width: 720px) { .feature { grid-template-columns: 1fr; } .feature-thumb { aspect-ratio: 4 / 3; border-right: none; border-bottom: 1px solid var(--line); } .feature-list { grid-template-columns: 1fr; } }

.soon-line { margin-top: 14px; font-size: 14px; color: var(--gray); }
.soon-line b { color: var(--ink); font-weight: 600; }

/* 3단계 */
.steps3 { display: flex; align-items: stretch; gap: 12px; }
.step3 { flex: 1; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow-card); }
.step3-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.step3-n { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--point); color: #fff; font-weight: 800; font-size: 16px; box-shadow: 0 6px 14px rgba(79, 70, 229, .3); }
.step3-ico { color: var(--point); opacity: .85; }
.step3-ico svg { width: 26px; height: 26px; display: block; }
.step3 b { display: block; font-size: 16px; margin-bottom: 6px; }
.step3 p { font-size: 14px; color: var(--gray); }
.step3-arrow { display: flex; align-items: center; color: var(--gray-soft); font-size: 22px; font-weight: 700; }
@media (max-width: 720px) { .steps3 { flex-direction: column; } .step3-arrow { transform: rotate(90deg); align-self: center; } }

/* 왜 폼다 */
.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 860px) { .why { grid-template-columns: repeat(2, 1fr); } }
.why-item { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-card); }
.why-item b { display: block; font-size: 16px; margin-bottom: 8px; }
.why-item b::before { content: '✓'; color: var(--ok); font-weight: 800; margin-right: 7px; }
.why-item p { font-size: 13.5px; color: var(--gray); line-height: 1.55; }

/* 카테고리 텍스트형 */
.cat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .cat-list { grid-template-columns: 1fr; } }
.cat-row { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px;
  box-shadow: var(--shadow-card); transition: border-color .12s; }
.cat-row:hover { border-color: var(--point); }
.cat-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cat-row-name { font-weight: 800; font-size: 16px; color: var(--ink); }
.cat-row-name:hover { color: var(--point); }
.cat-more { font-size: 13px; font-weight: 600; color: var(--point); white-space: nowrap; }
.cat-more:hover { text-decoration: underline; }

/* 섹션 헤더 + 범례 */
.home-sec-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.home-sec-head .home-sec-h { margin-bottom: 0; }
.cat-legend { display: flex; gap: 14px; }
.lg { font-size: 12.5px; color: var(--gray); display: inline-flex; align-items: center; gap: 6px; }
.lg::before { content: ''; width: 9px; height: 9px; border-radius: 3px; }
.lg-live::before { background: var(--point); }
.lg-soon::before { background: #fff; border: 1px solid var(--gray-soft); }
.cat-row-tools { display: flex; flex-wrap: wrap; gap: 7px; }
.cat-row-tools .t-live { font-size: 13px; font-weight: 700; color: var(--point); background: var(--point-soft);
  border: 1px solid #c7cdf7; border-radius: 8px; padding: 5px 11px; transition: background .12s; }
.cat-row-tools .t-live:hover { background: var(--point); color: #fff; }
.cat-soon-line { margin-top: 10px; font-size: 12.5px; color: var(--gray-soft); }

/* 예정 도구 그리드 (카테고리 페이지) */
.soon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.soon-card { background: var(--white); border: 1px dashed var(--line); border-radius: 12px; padding: 22px 16px;
  text-align: center; font-weight: 700; color: var(--gray); }
.soon-card span { display: block; margin-top: 6px; font-size: 11px; font-weight: 500; color: var(--gray-soft); }

/* ---------- 도구 카드 그리드 ---------- */
/* 도구 카드 그리드: 작은 A4 카드(폭 상한) + 가운데 정렬 → 적든 많든 크기 일정 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 208px)); justify-content: center; gap: 18px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* 완성 문서 썸네일 카드 (예스폼/비즈폼 톤, 단 빈양식이 아닌 완성본) */
.tool-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
  transition: border-color .12s, transform .12s, box-shadow .12s; }
.tool-card:hover { border-color: var(--accent, var(--point)); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(79, 70, 229, .12); }

/* A4 세로 비율 썸네일 - 페이지를 카드폭에 꽉 채움(스케일은 thumb.js) */
/* 카드 썸네일: 전체 A4 비율(작게) */
.thumb { width: 100%; aspect-ratio: 1.5 / 1; overflow: hidden; position: relative;
  background: #fff; border-bottom: 1px solid var(--line);
  border-top: 4px solid var(--accent, var(--point)); }   /* 문서별 식별 색 바 */
.thumb-doc { position: absolute; top: 0; left: 0; width: 794px; transform-origin: top left;
  transform: scale(.34); pointer-events: none; }
.thumb-doc .doc-page { width: 794px; border: none; box-shadow: none; border-radius: 0; padding: 40px 38px; }
.thumb::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 56px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
.thumb-empty { display: flex; align-items: center; justify-content: center; background: var(--bg);
  color: var(--gray-soft); font-weight: 700; font-size: 14px; }
.thumb-empty::after { display: none; }

.tool-meta { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tool-meta .nm { font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.tool-ic { display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 26px; height: 26px; padding: 4px; border-radius: 8px;
  color: var(--accent, var(--point));
  background: color-mix(in srgb, var(--accent, var(--point)) 12%, #fff); }
.tool-ic svg { width: 100%; height: 100%; }
.tool-meta .de { font-size: 12.5px; color: var(--gray); line-height: 1.5; flex: 1; }
.meta-row { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.tag { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 3px 8px; }
.tag.free { color: var(--ok); background: #ecfdf5; }
.tag.alt { color: var(--point); background: var(--point-soft); }
.tag.soon { color: var(--gray); background: var(--bg); border: 1px solid var(--line); }
.tool-card.is-stub .thumb { background: var(--bg); }
.tool-card.is-stub { box-shadow: none; }
.tool-card.is-stub:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 23, 42, .06); }

/* 빈 양식 스켈레톤 (스텁 썸네일) */
.bl-meta { display: flex; justify-content: flex-end; gap: 10px; margin: 14px 0 18px; }
.bl-meta span { width: 110px; height: 12px; background: #eef0f3; border-radius: 4px; }
.bl-box { height: 84px; border: 1.5px solid #e3e6ea; border-radius: 6px; margin-bottom: 20px; }
.bl-table { display: flex; flex-direction: column; gap: 9px; }
.bl-row { height: 22px; background: #f1f3f5; border-radius: 5px; }
.bl-row.head { background: #e3e6ea; }

/* 스텁 페이지 */
.stub-page { max-width: 560px; margin: 60px auto; text-align: center; background: var(--white);
  border: 1px solid var(--line); border-radius: 20px; padding: 48px 32px; box-shadow: var(--shadow-card); }
.stub-badge { display: inline-block; font-size: 12px; font-weight: 700; color: var(--gray);
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; margin-bottom: 16px; }
.stub-page h1 { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.stub-page p { color: var(--gray); font-size: 15px; line-height: 1.65; margin-bottom: 26px; }
.tool-meta .go { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--point); }
.tool-meta .go.muted { margin-left: 0; color: var(--gray-soft); font-weight: 500; }
.tool-card.soon { pointer-events: none; }

/* ---------- 카테고리 허브 ---------- */
.cat-hero { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; margin-bottom: 8px; }
.cat-hero h1 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.cat-hero p { color: var(--gray); font-size: 15px; max-width: 720px; }
.cat-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cat-badge { font-size: 12.5px; font-weight: 600; color: var(--gray); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.cat-badge:first-child { color: var(--point); background: var(--point-soft); border-color: #c7cdf7; }

.cat-tools-head { margin-bottom: 18px; }
.cat-tools-head .home-sec-h { margin-bottom: 6px; }
.cat-tools-head p { color: var(--gray); font-size: 14.5px; }

/* 문서 선택 허브 카드 - .grid(폭 상한 + 가운데 정렬) 그대로 사용 */
.doc-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
  transition: border-color .12s, transform .12s, box-shadow .12s; }
.doc-card:hover { border-color: var(--point); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(79, 70, 229, .12); }
.doc-card.is-stub { box-shadow: none; }
.doc-card.is-stub .thumb { background: var(--bg); }
.doc-card.is-stub:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 23, 42, .06); }
.doc-card-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; align-items: flex-start; }
.doc-card-body .nm { font-weight: 700; font-size: 16px; }
.doc-card-body .de { font-size: 13px; color: var(--gray); line-height: 1.55; flex: 1; }
.doc-cta { margin-top: 4px; padding: 9px 16px; box-shadow: 0 6px 14px rgba(79, 70, 229, .26); }
.tag.muted-tag { color: var(--gray-soft); background: var(--bg); border: 1px solid var(--line); }

/* 준비중 썸네일 상태 오버레이 */
.thumb-state { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
  font-size: 13px; font-weight: 700; color: var(--gray); background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; box-shadow: 0 4px 12px rgba(15, 23, 42, .08); }

/* 어떤 문서를 써야 할까요 */
.doc-guide { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.dg-item { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; background: var(--white);
  border: 1px solid var(--line); border-top: 3px solid var(--accent, var(--point)); border-radius: 12px; padding: 15px 16px;
  box-shadow: var(--shadow-card); transition: border-color .12s, transform .12s, box-shadow .12s; -webkit-tap-highlight-color: transparent; }
.dg-item:hover { border-color: var(--accent, var(--point)); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(15, 23, 42, .1); }
.dg-item:active { transform: translateY(0); }
.dg-when { font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.dg-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
  color: var(--accent, var(--point)); }
.dg-pick-ic { width: 18px; height: 18px; display: inline-flex; flex: none; color: var(--accent, var(--point)); }
.dg-pick-ic svg { width: 100%; height: 100%; }

/* 처음 사용자 추천 동선 */
.cat-reco { background: var(--point-soft); border: 1px solid #c7cdf7; border-radius: 14px; padding: 16px 18px;
  margin: 18px 0 6px; font-size: 14px; color: var(--ink); line-height: 1.6; }
.cat-reco b { color: var(--point); }
.cat-reco a { color: var(--point); text-decoration: underline; }

/* 준비중 = 작은 리스트 (썸네일 없이, 견적서 카드와 크기 차별화) */
.soon-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 680px) { .soon-list { grid-template-columns: 1fr; } }
.soon-item { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow-card); transition: border-color .12s; }
.soon-item:hover { border-color: var(--gray-soft); }
.soon-item b { font-size: 14.5px; white-space: nowrap; }
.soon-item p { font-size: 12.5px; color: var(--gray); flex: 1; line-height: 1.45; margin: 0; }
.soon-tag { font-size: 11px; font-weight: 700; color: var(--gray-soft); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; white-space: nowrap; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow-card); }
.faq-item .q { font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }
.faq-item .q::before { content: 'Q. '; color: var(--point); }
.faq-item .a { font-size: 13.5px; color: var(--gray); line-height: 1.55; }

/* 작성 가이드 (준비중 카드, 죽은 링크 아님) */
.guide-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 760px) { .guide-list { grid-template-columns: 1fr; } }
.guide-item { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow-card); }
.g-soon { display: inline-block; font-size: 11px; font-weight: 700; color: var(--gray); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; margin-bottom: 10px; }
.guide-item b { display: block; font-size: 15px; margin-bottom: 6px; }
.guide-item p { font-size: 13px; color: var(--gray); line-height: 1.55; }

/* ---------- 신뢰 페이지 ---------- */
.legal-page { max-width: 760px; margin: 0 auto; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px; }
.legal-page h1 { font-size: 26px; margin-bottom: 18px; }
.legal-page h2 { font-size: 18px; margin: 26px 0 10px; }
.legal-page p, .legal-page li { font-size: 15px; color: #374151; margin-bottom: 9px; }
.legal-page ul, .legal-page ol { padding-left: 22px; }
.legal-page li { line-height: 1.6; }
.legal-page .legal-meta { color: var(--gray); font-size: 13px; margin-bottom: 18px; }
.legal-page a { color: var(--point); text-decoration: underline; }

.not-found { max-width: 620px; margin: 44px auto 70px; text-align: center; }
.not-found .hero-cta { justify-content: center; }
.not-found-hero { position: relative; height: 190px; margin-bottom: 6px; }
.not-found-code { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 108px; font-weight: 800; line-height: 1; letter-spacing: -2px;
  background: linear-gradient(135deg, var(--point) 0%, #a78bfa 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf-ic { position: absolute; width: 56px; height: 56px; border-radius: 16px; background: var(--white);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12); display: flex; align-items: center; justify-content: center;
  color: var(--accent, #4f46e5); border: 1px solid var(--line); }
.nf-ic svg { width: 26px; height: 26px; }
.not-found h1 { font-size: 25px; font-weight: 800; margin-bottom: 10px; }
.not-found > p { color: var(--gray); font-size: 15px; margin-bottom: 24px; }
.not-found-sec { margin-top: 40px; text-align: left; }
.not-found-sec h2 { font-size: 14px; font-weight: 700; color: var(--gray); text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: 14px; text-align: center; }
.not-found-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.nf-tool { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); text-align: center;
  font-size: 13.5px; font-weight: 600; color: var(--ink); transition: transform .12s, box-shadow .12s, border-color .12s; }
.nf-tool:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(15, 23, 42, .08); border-color: var(--accent, #4f46e5); }
.nf-tool-ic { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent, #4f46e5) 12%, white); color: var(--accent, #4f46e5); }
.nf-tool-ic svg { width: 20px; height: 20px; }
.not-found-cats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 26px; }
.nf-cat { font-size: 13px; color: var(--gray); padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); }
.nf-cat:hover { color: var(--point); border-color: var(--point); }
@media (max-width: 600px) {
  .not-found-tools { grid-template-columns: repeat(2, 1fr); }
  .not-found-code { font-size: 76px; }
  .nf-ic { width: 44px; height: 44px; }
  .nf-ic svg { width: 20px; height: 20px; }
}

/* ---------- 푸터 ---------- */
.footer { border-top: 1px solid var(--line); background: var(--white); margin-top: 50px; }
.footer-in { max-width: var(--maxw); margin: 0 auto; padding: 28px 20px; color: var(--gray); font-size: 13px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.footer-links a:hover { color: var(--point); }
.footer-note { font-size: 12.5px; color: var(--gray); line-height: 1.6; max-width: 760px; margin-bottom: 10px; }
.footer-copy { color: var(--gray-soft); font-size: 12.5px; }

/* ---------- 반응형 / 인쇄 ---------- */
@media (max-width: 980px) {
  .tabs { display: flex; }
  .pane-input.hide, .pane-preview.hide { display: none; }
  /* 모바일: 고정 높이 해제, 페이지 스크롤 */
  .pane-input, .pane-preview { height: auto; max-height: none; min-height: 0; overflow: visible; }
  .form-scroll { overflow: visible; }
  .tt-wrap.split, .tt-align-cols { grid-template-columns: 1fr; }
  .tt-input, .tt-align .tt-input, .tt-align .tt-output { min-height: 200px; }
  /* 확대 시 박스 안에서 가로로 스크롤(손가락 팬), 세로는 페이지 스크롤에 맡김 */
  .doc-viewport { display: block; height: auto; max-height: none; min-height: 0; padding: 0;
    border: none; background: transparent;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y;
    overscroll-behavior-x: contain; }
  .doc-sizer { margin: 0 auto; }   /* 폭 맞춤이면 가운데, 확대로 넓어지면 좌측부터 스크롤 */
}
@media print {
  body { background: #fff; }
  .header, .crumb, .title, .subtitle, .trust, .steps, .tabs, .pane-input, .actions, .guide, .footer, .no-print { display: none !important; }
  .wrap { padding: 0; max-width: none; }
  .cols { display: block; }
  .preview-wrap { position: static; }
  .doc-viewport { overflow: visible; height: auto !important; }
  .doc-pages { width: auto !important; transform: none !important; }
  .doc-page { box-shadow: none; margin: 0 auto !important; page-break-after: always; }
}

/* ============================================================
   수익화 (painted-door) - 가격 옵션 · 결제 모달 · 카테고리 피드백
   ============================================================ */

/* 도구 페이지: 다운로드 버튼 아래 가격 옵션 */
.fd-pricing { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.fd-price-lead { display: block; font-size: 12px; color: var(--gray); margin-bottom: 7px; }
.fd-price-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.fd-price-btn { flex: 1; min-width: 130px; display: flex; flex-direction: column; gap: 1px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.fd-price-btn:hover { border-color: var(--point); background: var(--point-soft); }
.fd-price-btn .fp-t { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.fd-price-btn .fp-p { font-size: 11.5px; color: var(--gray); }
.fd-price-btn.sub { border-color: color-mix(in srgb, var(--point) 40%, #fff); background: var(--point-soft); }
.fd-price-btn.sub .fp-p { color: var(--point-dark); font-weight: 600; }

/* 모바일 하단바 워터마크 제거 버튼 */
.mobile-bar .btn-buy { flex: .8; background: var(--point-soft); color: var(--point-dark); font-size: 13px; }

/* 결제 painted-door 모달 */
.fd-modal-overlay { position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }
.fd-modal-overlay.on { display: flex; }
body.fd-modal-open { overflow: hidden; }
.fd-modal { position: relative; width: 100%; max-width: 380px; background: var(--white);
  border-radius: 16px; padding: 26px 24px 24px; box-shadow: 0 20px 60px rgba(15, 23, 42, .28);
  animation: fdModalIn .18s ease; }
.fd-modal.fd-modal-wide { max-width: 480px; padding: 30px 30px 28px; }
.fd-modal-wide h3 { font-size: 21px; }
.fd-modal-wide .fd-modal-note { font-size: 13.5px; }
@keyframes fdModalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.fd-modal-x { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border: none;
  background: none; font-size: 24px; line-height: 1; color: var(--gray-soft); cursor: pointer; border-radius: 8px; }
.fd-modal-x:hover { background: var(--bg); color: var(--ink); }
.fd-modal-badge { display: inline-block; font-size: 11px; font-weight: 700; color: var(--point-dark);
  background: var(--point-soft); padding: 3px 9px; border-radius: 999px; margin-bottom: 10px; }
.fd-modal h3 { font-size: 19px; font-weight: 800; color: var(--ink); }
.fd-period { display: flex; gap: 5px; background: var(--bg); padding: 4px; border-radius: 10px; margin: 4px 0 12px; }
.fd-period-opt { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px; border: none; background: none; border-radius: 7px; font-size: 13.5px; font-weight: 700;
  color: var(--gray); cursor: pointer; transition: background .12s, color .12s; }
.fd-period-opt.on { background: var(--white); color: var(--ink); box-shadow: var(--shadow-card); }
.fd-period-opt em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--point-dark);
  background: var(--point-soft); padding: 1px 6px; border-radius: 999px; }
.fd-modal-price { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 2px; }
.fd-modal-price b { font-size: 26px; font-weight: 800; color: var(--ink); }
.fd-modal-price span { font-size: 13px; color: var(--gray); }
.fd-modal-subnote { font-size: 12px; color: var(--point-dark); font-weight: 600; margin: 0 0 12px; }
.fd-modal-subnote:empty { margin: 0 0 14px; }
.fd-modal-feats { list-style: none; display: flex; flex-direction: column; gap: 7px; margin: 0 0 14px; padding: 0; }
.fd-modal-feats li { position: relative; padding-left: 22px; font-size: 13.5px; color: #374151; }
.fd-modal-feats li::before { content: "✓"; position: absolute; left: 2px; color: var(--point); font-weight: 800; }
.fd-modal-note { font-size: 12.5px; line-height: 1.6; color: var(--gray); margin-bottom: 14px; }
.fd-modal-form { display: flex; flex-direction: column; gap: 9px; }
.fd-modal-form input { width: 100%; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px; }
.fd-modal-form input:focus { outline: none; border-color: var(--point);
  box-shadow: 0 0 0 3px var(--point-soft); }
.fd-modal-form .btn { flex: none; }
.fd-modal-done { font-size: 14px; line-height: 1.6; color: var(--ok); font-weight: 600; text-align: center; padding: 14px 0; }
.fd-modal-done.err { color: #dc2626; }

/* 피드백 모달 안의 textarea (결제 모달과 공유하는 .fd-modal-form) */
.fd-modal-form textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; resize: vertical; }
.fd-modal-form textarea:focus { outline: none; border-color: var(--point); box-shadow: 0 0 0 3px var(--point-soft); }
.fd-modal-form textarea.err { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.fd-fb-err { font-size: 12.5px; color: #dc2626; margin: -3px 0 0; }

/* 플로팅 의견 버튼 (전 페이지 우하단) */
.fd-fab { position: fixed; right: 22px; bottom: 22px; z-index: 150;
  display: inline-flex; align-items: center; gap: 7px; padding: 12px 18px 12px 15px;
  background: var(--point); color: #fff; border: none; border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 700; box-shadow: 0 8px 24px rgba(79, 70, 229, .38);
  transition: transform .14s, box-shadow .14s, background .14s; }
.fd-fab:hover { background: var(--point-dark); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(79, 70, 229, .5); }
.fd-fab svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
@media print { .fd-fab { display: none !important; } }
@media (max-width: 980px) {
  .fd-fab { right: 16px; bottom: 16px; padding: 11px 15px; font-size: 13.5px; }
  body:has(.mobile-bar) .fd-fab { bottom: 86px; }   /* 도구 페이지 하단 다운로드 바 위로 */
}
