/* ============================================================
   請求書・領収書の紙（どのテーマでも白い紙に黒い文字。ずぼらにうけおいと同じ）
   ============================================================ */
.paperbox { position: relative; width: 100%; overflow: hidden; }
.paperbox .paper { position: absolute; left: 0; top: 0; transform-origin: 0 0; box-shadow: 0 2px 12px rgba(0, 0, 0, .18); }
#sa-print { display: none; }

.paper { width: 794px; height: 1123px; background: #fff; color: #222; padding: 64px 64px 56px; font-size: 13px; line-height: 1.6; overflow: hidden; letter-spacing: 0; text-align: left;
  font-family: "BIZ UDPGothic", "BIZ UDPゴシック", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif; font-variant-numeric: tabular-nums; color-scheme: light; box-sizing: border-box; }
.paper * { box-sizing: border-box; }
.paper p { margin: 0; }
.dp-title { text-align: center; font-size: 26px; font-weight: 700; letter-spacing: .5em; padding-left: .5em; border-bottom: 3px double #333; width: 260px; margin: 0 auto 18px; }
.dp-meta { text-align: right; font-size: 12px; margin-bottom: 14px; }
.dp-top { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; margin-bottom: 22px; }
.dp-name { font-size: 19px; font-weight: 700; border-bottom: 1px solid #333; padding-bottom: 3px; margin-bottom: 8px; overflow-wrap: anywhere; }
.dp-subj { margin-bottom: 4px; }
.dp-lead { margin: 6px 0 10px !important; }
.dp-big { display: flex; align-items: baseline; gap: 12px; border-bottom: 2px solid #333; padding: 4px 2px; margin-bottom: 6px; }
.dp-big span { font-size: 13px; }
.dp-big b { font-size: 24px; margin-left: auto; }
.dp-big small { font-size: 11px; }
.dp-recamt { display: flex; align-items: baseline; gap: 14px; background: #f2f2f2; border: 1px solid #999; padding: 10px 14px; margin: 6px 0; }
.dp-recamt b { font-size: 26px; margin-left: auto; letter-spacing: .04em; }
.dp-proviso { border-bottom: 1px solid #999; padding: 2px 2px 4px; }
.dp-due { font-size: 12px; }
.dp-from { position: relative; font-size: 12px; padding-top: 4px; overflow-wrap: anywhere; }
.dp-shop { font-size: 15px; font-weight: 700; }
.dp-stamp { position: absolute; right: 0; top: 0; width: 72px; height: 72px; object-fit: contain; opacity: .92; }
.dp-rectax { font-size: 12px; margin: -8px 0 16px; }
.dp-items { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.dp-items th { background: #eee; font-weight: 600; font-size: 12px; border: 1px solid #999; padding: 5px 8px; text-align: left; }
.dp-items td { border: 1px solid #bbb; padding: 6px 8px; overflow-wrap: anywhere; }
.dp-items .n { text-align: right; width: 96px; white-space: nowrap; }
.dp-items th.n { text-align: center; }
.dp-items th:nth-child(2), .dp-items td:nth-child(2) { width: 56px; }
.dp-sum { margin-left: auto; border-collapse: collapse; min-width: 300px; margin-bottom: 18px; }
.dp-sum th { text-align: left; font-weight: 400; padding: 4px 10px; border-bottom: 1px solid #ccc; }
.dp-sum td { text-align: right; padding: 4px 10px; border-bottom: 1px solid #ccc; white-space: nowrap; }
.dp-sum tr.b th, .dp-sum tr.b td { font-weight: 700; font-size: 14px; border-bottom: 1px solid #333; }
.dp-sum tr.s th, .dp-sum tr.s td { font-size: 11px; color: #555; }
.dp-box { border: 1px solid #bbb; padding: 8px 12px; margin-bottom: 12px; font-size: 12px; }
.dp-bh { font-weight: 700; margin-bottom: 2px; }
.dp-sm { font-size: 11px; color: #555; margin-top: 2px; }
.dp-note { white-space: pre-wrap; overflow-wrap: anywhere; }

/* 印刷（PDFに保存）：書類だけをA4いっぱいに */
@page { size: A4; margin: 0; }
@media print {
  body { background: #fff !important; padding: 0 !important; }
  body > *:not(#sa-print) { display: none !important; }
  #sa-print { display: block; }
  #sa-print .paper { width: 210mm; height: 296mm; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
