/*! AnzenDoc JP — print.css : A4 layout for the six documents.
 * 名簿・編成表 = landscape (named page), others = portrait. Margins 10mm, header repeats.
 */
@page {
  size: A4 portrait;
  margin: 10mm;
}
@page landscape {
  size: A4 landscape;
  margin: 10mm;
}

.doc-sheet {
  background: #fff;
  color: #000;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif;
  font-size: 9pt;
  line-height: 1.45;
  width: 190mm;
  margin: 0 auto;
  padding: 0;
}
.doc-sheet.sheet-roster, .doc-sheet.sheet-subtable { page: landscape; width: 277mm; }

.doc-head { border-bottom: 2px solid #000; padding-bottom: 4mm; margin-bottom: 3mm; }
.doc-head-main { display: flex; align-items: baseline; gap: 3mm; }
.doc-no { font-size: 8pt; border: 1px solid #000; padding: 0 2mm; }
.doc-head h2 { font-size: 15pt; margin: 0; letter-spacing: .08em; }
.doc-title-note { font-size: 9pt; color: #333; }
.doc-meta { width: 100%; border-collapse: collapse; margin-top: 2mm; font-size: 8pt; }
.doc-meta th, .doc-meta td { border: 1px solid #666; padding: 1.2mm 2mm; text-align: left; vertical-align: top; }
.doc-meta th { background: #f0f0f0; font-weight: 600; width: 22mm; white-space: nowrap; }
.doc-confirm { display: flex; align-items: center; gap: 2mm; justify-content: flex-end; margin-top: 1.5mm; font-size: 8pt; }
.confirm-box { display: inline-block; min-width: 26mm; height: 7mm; border: 1px solid #000; text-align: center; font-size: 8pt; line-height: 7mm; }

.doc-summary { display: flex; flex-wrap: wrap; gap: 2mm 6mm; font-size: 8pt; margin-bottom: 2mm; }
.doc-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.doc-table th, .doc-table td {
  border: 1px solid #666; padding: 1mm 1.2mm; font-size: 7.2pt; vertical-align: top;
  overflow-wrap: anywhere; word-break: break-word;
}
.doc-table thead th { background: #ececec; font-weight: 600; text-align: center; }
.doc-table tbody tr { break-inside: avoid; page-break-inside: avoid; }
.doc-table thead { display: table-header-group; }
.doc-table tfoot { display: table-footer-group; }
.doc-table td.num, .doc-table th.num { text-align: right; }
.doc-table .empty { text-align: center; padding: 6mm; }

.roster-table { font-size: 6.4pt; table-layout: fixed; }
.roster-table th, .roster-table td { padding: 0.5mm 0.6mm; font-size: 6.3pt; line-height: 1.25; overflow-wrap: normal; word-break: normal; }
.roster-table col.c-no { width: 6.5mm; }
.roster-table col.c-kana { width: 13mm; }
.roster-table col.c-name { width: 19mm; }
.roster-table col.c-co { width: 19mm; }
.roster-table col.c-ccus { width: 14mm; }
.roster-table col.c-trade { width: 10mm; }
.roster-table col.c-mark { width: 11mm; }
.roster-table col.c-birth { width: 14mm; }
.roster-table col.c-age { width: 6.5mm; }
.roster-table col.c-health { width: 14mm; }
.roster-table col.c-pension { width: 12mm; }
.roster-table col.c-emp { width: 12mm; }
.roster-table col.c-kentai { width: 9mm; }
.roster-table col.c-chutai { width: 9mm; }
.roster-table col.c-e1 { width: 13mm; }
.roster-table col.c-e2 { width: 13mm; }
.roster-table col.c-e3 { width: 13mm; }
.roster-table col.c-e4 { width: 13mm; }
.roster-table col.c-lic { width: 14mm; }
.roster-table col.c-in { width: 13mm; }
.roster-table col.c-acc { width: 15mm; }

.doc-legend { display: flex; flex-wrap: wrap; gap: 1mm 4mm; font-size: 6.8pt; margin-top: 2mm; border: 1px solid #999; padding: 1.5mm 2mm; }
.doc-legend b { margin-right: 1mm; }
.doc-legend span b { display: inline-block; border: 1px solid #000; min-width: 4mm; text-align: center; margin-right: 1mm; }

.doc-form { width: 100%; border-collapse: collapse; margin-bottom: 2.5mm; }
.doc-form th, .doc-form td { border: 1px solid #666; padding: 1.5mm 2mm; font-size: 8pt; text-align: left; vertical-align: top; }
.doc-form th { background: #f0f0f0; font-weight: 600; width: 34mm; min-width: 34mm; white-space: normal; word-break: normal; }
.doc-form td.chk { text-align: center; width: 12mm; }

.doc-note, .doc-mask { font-size: 7pt; color: #333; border: 1px dashed #999; padding: 1.5mm 2mm; margin: 2mm 0; }
.doc-mask { border-style: solid; background: #fafafa; }
.doc-consent-inline { font-size: 7.5pt; margin-top: 2mm; }
.consent-state { display: inline-block; border: 0.4mm solid #000; padding: 0 1.5mm; font-size: 7pt; margin-right: 1mm; }
.consent-state.on { border-color: #000; background: #000; color: #fff; }
.consent-state.off { color: #555; }

.doc-letter { font-size: 9.5pt; }
.letter-to { text-align: left; margin: 4mm 0 6mm; font-size: 10pt; }
.letter-from { text-align: right; margin-bottom: 6mm; }
.doc-letter h3 { text-align: center; letter-spacing: .3em; margin: 4mm 0; font-size: 12pt; }
.letter-note { font-size: 8pt; margin-top: 3mm; }

.doc-foot { margin-top: 3mm; border-top: 1px solid #999; padding-top: 1.5mm; }
.doc-id { font-size: 7pt; color: #444; margin: 0 0 1mm; }
.doc-disclaimer, .doc-consent { font-size: 6.4pt; color: #333; margin: 0 0 .8mm; line-height: 1.35; }

.doc-banner {
  border: 2px solid #b3261e; background: #fff1f0; color: #7a1510; padding: 2mm 3mm; margin-bottom: 3mm;
  font-size: 8pt; display: flex; gap: 3mm; flex-wrap: wrap; align-items: baseline;
}
.doc-banner b { font-size: 9pt; }

/* Free build watermark — printed output only */
@media print {
.is-free .doc-sheet::after {
  content: "SAMPLE";
  position: fixed;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-28deg);
  font-size: 84pt;
  font-weight: 800;
  letter-spacing: .12em;
  color: rgba(180, 85, 42, .16);
  pointer-events: none;
  z-index: 0;
}
.is-free .doc-stamp::before {
  content: "無償版";
  position: fixed;
  right: 8mm;
  bottom: 6mm;
  font-size: 7pt;
  color: rgba(180, 85, 42, .7);
}

.doc-sheet .doc-stamp { display: none; }
}

@page { @top-right { content: none; } }

@media print {
  html, body { background: #fff !important; }
  body { font-size: 9pt; margin: 0; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  .doc-sheet { break-after: page; page-break-after: always; box-shadow: none; border: 0; }
  .doc-sheet:last-child { break-after: auto; page-break-after: auto; }
  .no-print { display: none !important; }
  a { color: #000; text-decoration: none; }
  .doc-table tbody tr { break-inside: avoid; }
}

/* Screen preview of a sheet — same proportions, scaled down */
.preview-shell .doc-sheet { box-shadow: 0 2px 10px rgba(0,0,0,.12); margin-bottom: 14px; }
