/* Paper sheets (A4, millimetre based). Used for both preview and print. */
.sheet {
  position: relative;
  width: 210mm;
  height: 297mm;
  background: #fff;
  color: #000;
  overflow: hidden;
  font-family: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "Noto Serif JP", "MS PMincho", "MS Mincho", serif;
  font-size: 10pt;
  line-height: 1.35;
  box-sizing: border-box;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.sheet * { box-sizing: border-box; }
.sheet .inner { position: absolute; left: 15mm; top: 14mm; width: 180mm; }
.sheet table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.sheet td, .sheet th { border: 0.3mm solid #000; padding: 0 1.5mm; vertical-align: middle; font-weight: normal; overflow: hidden; }
.sheet .lbl { font-size: 7pt; color: #000; white-space: nowrap; }
.sheet .fit { overflow: hidden; white-space: nowrap; }
.sheet .fitbox { overflow: hidden; }

/* page 1 top */
.p1-top { display: flex; }
.p1-top .left { width: 145mm; }
.p1-top .right { width: 35mm; position: relative; }
.title-row { height: 12mm; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 2mm 1.5mm 0; }
.title-row .title { font-size: 17pt; letter-spacing: 3mm; }
.title-row .asof { font-size: 9pt; }
.id td { border-bottom-width: 0.3mm; }
.id .furi td { height: 6.5mm; border-bottom: 0.25mm dashed #000; }
.id .name td { height: 18mm; border-top: none; }
.id .birth td { height: 9mm; }
.cell-row { display: flex; align-items: center; gap: 2.5mm; height: 100%; }
.cell-row .lbl { flex: none; }
.cell-row .val { flex: 1; min-width: 0; }
.name .val { font-size: 19pt; }
.furi .val, .afuri .val { font-size: 8.5pt; }
.birth .val { font-size: 10pt; text-align: center; }
.gender .val { font-size: 9.5pt; }

.photo { position: absolute; top: 3mm; left: 3mm; width: 30mm; height: 40mm; border: 0.25mm dashed #000; font-size: 6.5pt; line-height: 1.45; padding: 2mm 1.5mm; }
.photo.has { border: none; padding: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .ph-center { text-align: center; margin-bottom: 1.5mm; }

.addr { margin-top: 0; }
.addr .afuri td.a { height: 6mm; border-bottom: 0.25mm dashed #000; }
.addr .aline td.a { height: 16mm; border-top: none; vertical-align: top; padding-top: 1mm; }
.addr td.tel { vertical-align: top; padding-top: 1mm; font-size: 9pt; }
.addr td.tel .lbl { display: block; margin-bottom: 1mm; }
.addr .aval { font-size: 10.5pt; margin-top: 1mm; }
.addr .zip { font-size: 9pt; }
.addr .note { font-size: 6.5pt; float: right; }
.addr .small { font-size: 7.5pt; }

/* history tables */
.hist { margin-top: 5mm; }
.hist col.y { width: 16mm; }
.hist col.m { width: 10mm; }
.hist th { height: 7mm; font-size: 8pt; text-align: center; letter-spacing: 1mm; }
.hist td { height: 8.5mm; font-size: 10pt; }
.hist td.y, .hist td.m { text-align: center; }
.hist td.y { border-right: 0.25mm dashed #000; }
.hist td.m { border-left: none; }
.hist td.c { text-align: center; letter-spacing: 3mm; }
.hist td.r { text-align: right; padding-right: 8mm; }
.foot-note { margin-top: 1.5mm; font-size: 7pt; }

/* page 2 boxes */
.box { margin-top: 5mm; border: 0.3mm solid #000; }
.box .bh { height: 6mm; padding: 1.2mm 1.5mm 0; font-size: 7pt; }
.box .bb { padding: 1mm 3mm 2mm; font-size: 10pt; line-height: 1.6; white-space: pre-wrap; word-break: break-all; overflow: hidden; }
.box.motive .bb { height: 74mm; }
.box.wish .bb { height: 36mm; }
.sheet .p2 .hist:first-child { margin-top: 0; }

/* watermark */
.wm { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.wm span { position: absolute; white-space: nowrap; transform: rotate(-30deg); transform-origin: left top; font-family: Arial, Helvetica, sans-serif; font-size: 15pt; font-weight: 700; color: rgba(40, 70, 160, 0.13); letter-spacing: 0.5mm; }

/* shokumu keirekisho (flowing document) */
.cv { position: relative; width: 210mm; min-height: 297mm; background: #fff; color: #000; padding: 15mm 15mm 18mm; font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "MS Mincho", serif; font-size: 10pt; line-height: 1.6; overflow: hidden; }
.cv h1 { font-size: 16pt; text-align: center; letter-spacing: 2mm; margin: 0 0 4mm; font-weight: 600; }
.cv .meta { text-align: right; font-size: 9.5pt; margin-bottom: 4mm; }
.cv h2 { font-size: 11pt; margin: 6mm 0 2mm; font-weight: 700; border-bottom: 0.3mm solid #000; padding-bottom: 0.5mm; font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Noto Sans JP", "Meiryo", sans-serif; }
.cv p, .cv .pre { margin: 0; white-space: pre-wrap; word-break: break-all; }
.cv table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 2mm 0 3mm; break-inside: avoid; page-break-inside: avoid; }
.cv th, .cv td { border: 0.3mm solid #000; padding: 1.5mm 2.5mm; vertical-align: top; text-align: left; }
.cv th { background: #e9e9e9; font-weight: 600; font-size: 9.5pt; }
.cv td.period { font-size: 9pt; white-space: pre-line; }
.cv .co { font-weight: 700; }
.cv .co-sub { font-size: 9pt; }
.cv .sub { font-weight: 700; margin-top: 1.5mm; display: block; }
.cv ul { margin: 0; padding-left: 5mm; }
.cv .end { text-align: right; margin-top: 4mm; }
.cv .wm { position: absolute; }
