/* 견적 요청서 — 출력·PDF 전용 서류(templates/quote/print.html). 화면에서는 숨기고, 인쇄 때는 이것만 찍는다.
   ⚠️ 이 사이트는 rem 기준값이 화면 폭에 따라 줄어든다 — 종이 크기가 흔들리지 않게 mm·pt 로만 잰다. */
#printDoc{display:none}

@media print{
  /* 왼쪽 위를 스테이플러로 찍으므로 그쪽 여백을 넉넉히 */
  @page{size:A4;margin:14mm 12mm 14mm 16mm}

  /* 요청서가 있는 화면은 요청서만 — 머리·카드·바닥글 등 나머지는 모두 뺀다.
     요청서가 없는 사람(비회원·보류)은 예전 인쇄 그대로 안내 한 줄이 나간다 */
  body:has(> #printDoc) > *:not(#printDoc){display:none !important}
  body:has(> #printDoc){margin:0 !important;padding:0 !important;background:#fff !important;min-width:0 !important}

  #printDoc{display:block !important;color:#1d2433;font-size:9.5pt;line-height:1.5;word-break:keep-all;overflow-wrap:anywhere}
  #printDoc *{box-sizing:border-box}
  #printDoc b{font-weight:700}

  /* 머리말 — 로고 · 서류 이름 · 번호 */
  .pd-hd{display:flex;align-items:flex-end;justify-content:space-between;padding-bottom:3mm;border-bottom:.6mm solid #1d2433}
  .pd-logo{height:9mm;width:auto}
  .pd-doc{text-align:right;line-height:1.3}
  .pd-doc b{display:block;font-size:15pt;font-weight:800;letter-spacing:.1em}
  .pd-doc span{font-size:9pt;color:#555}
  .pd-doc em{font-style:normal;font-weight:700;color:#1d2433}

  .pd-title{margin:5mm 0 1.5mm;font-size:13.5pt;font-weight:800;line-height:1.4;color:#111}
  .pd-meta{display:flex;flex-wrap:wrap;gap:1mm 6mm;margin:0 0 2mm;padding-bottom:2.5mm;border-bottom:.2mm solid #c9ced3;font-size:9pt;color:#555}
  .pd-meta b{color:#111}

  /* 구역 제목 — 번호 동그라미 + 제목 + 옅은 꼬리 */
  .pd-h{display:flex;align-items:baseline;gap:2mm;margin:6mm 0 2mm;font-size:11pt;font-weight:800;color:#111;break-after:avoid}
  .pd-h i{display:inline-flex;align-items:center;justify-content:center;width:5mm;height:5mm;border-radius:50%;
          background:#ff6a13;color:#fff;font-size:8pt;font-style:normal;font-weight:800;transform:translateY(-.3mm);
          -webkit-print-color-adjust:exact;print-color-adjust:exact}
  .pd-h-sub{font-size:9pt;font-weight:500;color:#666}

  /* 항목:내용 표 */
  .pd-kv{width:100%;border-collapse:collapse;border-top:.3mm solid #1d2433}
  .pd-kv th,.pd-kv td{padding:1.6mm 2.5mm;border-bottom:.2mm solid #dde1e5;text-align:left;vertical-align:top;font-size:9.5pt}
  .pd-kv th{width:24mm;background:#f4f5f7;font-weight:600;color:#444;white-space:nowrap;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .pd-kv.is-2 td{width:calc(50% - 24mm)}
  .pd-kv tr{break-inside:avoid}
  .pd-keep{break-inside:avoid}

  .pd-sub{color:#666;font-weight:400}
  .pd-dim{color:#888}
  .pd-files,.pd-works{margin:1mm 0 0;padding:0 0 0 4mm;list-style:disc}
  .pd-files li,.pd-works li{margin:.3mm 0}

  .pd-photos{display:flex;align-items:flex-end;gap:2mm;margin:2.5mm 0 0;break-inside:avoid}
  .pd-photos img{width:32mm;height:32mm;object-fit:cover;border:.2mm solid #dde1e5;border-radius:1mm}
  .pd-more{font-size:9pt;color:#666}

  /* 손님이 쓴 글·비교담 메모 — 서류에서 가장 중요한 글이라 상자로 */
  .pd-box{margin:3mm 0 0;padding:2.5mm 3.5mm;border:.3mm solid #c9ced3;border-left:1mm solid #ff6a13;border-radius:1mm;break-inside:avoid;
          -webkit-print-color-adjust:exact;print-color-adjust:exact}
  .pd-box.is-admin{border-left-color:#8a94a0}
  .pd-box-h{margin:0 0 1mm;font-size:8.5pt;font-weight:700;color:#666}
  .pd-box-t{font-size:10pt;line-height:1.6;color:#111}
  .pd-box-t p{margin:0}

  .pd-note{margin:1.5mm 0 0;font-size:8.5pt;line-height:1.5;color:#666}
  .pd-sum{margin:0 0 2mm;font-size:9.5pt}
  .pd-sub-h{margin:4mm 0 1.5mm;font-size:9.5pt;font-weight:700;break-after:avoid}

  /* 격자 표 — 동 목록·층별 현황. 쪽이 넘어가면 머리 줄이 다시 나온다 */
  .pd-grid{width:100%;border-collapse:collapse;font-size:9pt}
  .pd-grid thead{display:table-header-group}
  .pd-grid th{padding:1.3mm 2mm;background:#f4f5f7;border-top:.3mm solid #1d2433;border-bottom:.2mm solid #c9ced3;font-weight:600;color:#444;
              -webkit-print-color-adjust:exact;print-color-adjust:exact}
  .pd-grid td{padding:1.1mm 2mm;border-bottom:.2mm solid #e4e7ea;text-align:center}
  .pd-grid tr{break-inside:avoid}
  .pd-grid .tal{text-align:left}
  .pd-grid .tar{text-align:right;white-space:nowrap}
  .pd-grid .pd-fl{font-weight:700;white-space:nowrap}
  .pd-dongs tr.is-first td{font-weight:700}

  /* 층별 현황 옆에 건물 그림 — 표가 짧으면 나란히, 그림은 작게 */
  .pd-floor.has-shape{display:flex;gap:5mm;align-items:flex-start}
  .pd-floor.has-shape .pd-grid{flex:1 1 auto}
  .pd-shape{flex:0 0 72mm;margin:0;padding:2mm;border:.2mm solid #dde1e5;border-radius:1mm;text-align:center;break-inside:avoid}
  .pd-shape svg{display:block;width:100% !important;height:auto !important;max-height:80mm}
  .pd-shape figcaption{margin-top:1mm;font-size:7.5pt;color:#888}

  .pd-ft{display:flex;flex-direction:column;gap:.5mm;margin-top:7mm;padding-top:2mm;border-top:.2mm solid #c9ced3;font-size:7.5pt;color:#888;break-inside:avoid}
}
