@page { size: A4 portrait; margin: 0; }

.m4-pages { width: 210mm; transform-origin: top left; }
@media screen {
  .m4-pages { transform: scale(var(--k, 1)); margin-left: var(--x, 0px); }
}

.m4-sheet {
  position: relative;
  box-sizing: border-box;
  width: 210mm;
  height: 297mm;
  background: #fff;
  color: #000;
  font-family: var(--font-main);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 6px 24px rgba(0, 0, 0, .3);
}
.m4-sheet rt { font-size: .5em; font-weight: 400; }
.m4-abs { display: block; }

.m4-mk { position: absolute; width: 6mm; height: 6mm; z-index: 1; }

.m4-mk svg { display: block; width: 100%; height: 100%; }
.m4-mk.tl { top: 9mm; left: 9mm; }
.m4-mk.tr { top: 9mm; right: 9mm; }
.m4-mk.bl { bottom: 9mm; left: 9mm; }
.m4-mk.br { bottom: 9mm; right: 9mm; }

.m4-title { font-size: 6.4mm; font-weight: 700; line-height: 2; overflow: visible; white-space: nowrap; }
.m4-cond  { margin-left: 2mm; font-size: 3.4mm; font-weight: 400; line-height: 1.6; color: #333; }

.m4-fields { display: flex; gap: 8mm; align-items: center; }
.m4-fld { display: flex; align-items: center; gap: 2mm; font-size: 6mm; white-space: nowrap; }
.m4-fld b { font-weight: 400; }
.m4-masu { display: flex; align-items: center; }
.m4-masu i { box-sizing: border-box; width: 12mm; height: 12mm; border: .3mm solid #000; }
.m4-masu i + i { border-left: 0; }
.m4-kugiri { padding: 0 1mm; line-height: 1; font-size: 7.2mm; }
.m4-qr { text-align: center; }
.m4-qr svg { display: block; width: 22mm; height: 22mm; }
.m4-qr code { display: block; margin-top: 1mm; font-family: ui-monospace, "Consolas", monospace; font-size: 2.6mm; letter-spacing: 0; white-space: nowrap; }
.m4-headline { height: 0; border-top: .4mm solid #000; }
.m4-toi { font-size: 5mm; line-height: 2; white-space: nowrap; }

.m4-qn { font-family: var(--font-num); font-size: 4.5mm; line-height: 1; white-space: nowrap; }
.m4-qn-shiki { display: flex; align-items: center; }

.m4-shiki {
  display: flex;
  align-items: center;
  font-family: var(--font-num);
  font-size: 7mm;
  line-height: 1;
  white-space: nowrap;
}
.m4-shiki .m4-op { margin: 0 .8mm; }
.m4-mae > span   { display: flex; align-items: center; }
.m4-mae .m4-migi { margin-left: auto; }

.m4-kotei { justify-content: center; }
.m4-kotei .m4-op { margin: 0; }

.m4-kotei.m4-migiyose   { justify-content: flex-end; }
.m4-kotei.m4-hidariyose { justify-content: flex-start; }
.m4-amari-moji { font-family: var(--font-main); }
.m4-box { display: block; overflow: visible; }

.m4-hissan { display: block; overflow: visible; }
.m4-hissan text { font-family: var(--font-num); fill: #000; }
.m4-amari-mei { display: flex; align-items: center; justify-content: flex-end; font-size: 4.2mm; line-height: 1; white-space: nowrap; }

.m4-toi.m4-toi-2 { top: 44.6mm !important; height: 13.4mm !important; font-size: 4.3mm; line-height: 1.5; white-space: normal; word-break: keep-all; }

.m4-qn-bun { font-size: 4.6mm; line-height: 2.2; display: block; }
.m4-bun-abs { overflow: visible; }

.m4-bun { display: block; font-size: 4.6mm; line-height: 2.2; word-break: keep-all; overflow-wrap: anywhere; }
.m4-go { white-space: nowrap; }
.m4-bun-dan .m4-bun { line-height: 1.9; }
.m4-sen { display: block; border-top: .2mm solid #ccc; }
.m4-bun-mei { display: flex; align-items: center; font-size: 4.3mm; line-height: 1.8; white-space: nowrap; }

.m4-tani { display: flex; align-items: center; font-size: 4.6mm; line-height: 1; white-space: nowrap; }
.m4-tani rt { line-height: 1; }
.m4-frac-sen { display: block; }
.m4-ten { display: block; }

.m4-chou-waku { box-sizing: border-box; border: .3mm solid #999; border-radius: 2mm; }

.m4-rei { box-sizing: border-box; border: .35mm solid #000; border-radius: 2mm; padding: 2mm 3.5mm 1.5mm; overflow: visible; }
.m4-rei-bun { font-size: 4mm; line-height: 1.75; margin: 0 0 1mm; word-break: keep-all; overflow-wrap: anywhere; }
.m4-rei-tag { font-weight: 700; margin-right: 2mm; }
.m4-rei-naka { display: grid; grid-template-columns: 106mm 1fr; column-gap: 3mm; align-items: start; }
.m4-rei-zu svg { display: block; }

.m4-rei-zu svg, .m4-rei-zu text { letter-spacing: 0; }
.m4-rei-zu text { font-family: var(--font-main); fill: #000; }
.m4-rei-toki { font-size: 3.3mm; line-height: 1.6; margin: 0 0 .8mm; padding-left: 4.5mm; }
.m4-rei-kotae { display: block; font-size: 3.5mm; line-height: 1.6; font-weight: 700; }
.m4-rei-ans { display: inline-block; white-space: nowrap; }
.m4-qn-toku { font-size: 4.2mm; line-height: 1.8; }
.m4-bun-toku .m4-bun { font-size: 4.2mm; line-height: 1.8; }

.m4-toku-ji { font-size: 4.2mm; }
.m4-chou-mae { display: block; font-size: 4.2mm; line-height: 1.8; word-break: keep-all; overflow-wrap: anywhere; }
.m4-qn-chou { font-size: 4.2mm; line-height: 1.8; }
.m4-bun-chou .m4-bun { font-size: 4.2mm; line-height: 1.8; }

.m4-bun-chou .m4-bun.m4-bun-1gyou { display: block; width: max-content; white-space: nowrap; }

.m4-daimon { display: flex; align-items: center; justify-content: center; }
.m4-daimon-svg { position: absolute; left: 0; top: 0; display: block; }
.m4-daimon-ji { position: relative; font-family: var(--font-num); font-size: 4mm; font-weight: 700; line-height: 1; }

.m4-bun-zu .m4-bun { font-size: 4.1mm; line-height: 1.5; }
.m4-zu { overflow: visible; }
.m4-zu-svg { display: block; overflow: visible; }
.m4-zu-svg text { font-family: var(--font-num); fill: #000; letter-spacing: 0; }
.m4-zu-ji { display: flex; align-items: center; justify-content: center; font-family: var(--font-num); font-size: 3.8mm; line-height: 1; white-space: nowrap; }
.m4-zu-ji rt { line-height: 1; }
.m4-zu-fuda { font-weight: bold; }

.m4-frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 .4mm; line-height: 1; font-family: var(--font-num); }

.m4-frac-n { border-bottom: .3mm solid currentColor; padding: 0 .5mm .2mm; }
.m4-frac-d { padding: .2mm .5mm 0; }

.m4-foot { text-align: center; font-size: 3.2mm; line-height: 1.4; color: #444; white-space: nowrap; }
.m4-kigen:empty::before { content: '\00a0'; }
.m4-site { position: absolute; right: 9mm; bottom: 5mm; font-size: 3mm; line-height: 1; color: #444; white-space: nowrap; }
.m4-site b { color: #000; margin-right: 1.5mm; letter-spacing: .04em; }

.no-consent-print { display: none; }
@media print {
  html, body { background: #fff !important; margin: 0; padding: 0; }
  .no-print { display: none !important; }
  .sheet-stage { padding: 0; overflow: visible; height: auto !important; }
  .m4-pages { transform: none; margin: 0; }
  .m4-sheet { box-shadow: none; margin: 0; break-after: page; page-break-after: always; }
  .m4-pages .m4-sheet:last-child { break-after: auto; page-break-after: auto; }

  body.print-page:not(.may-print) .sheet-stage { display: none !important; }
  body.print-page:not(.may-print) .no-consent-print {
    display: block !important; margin: 20mm 14mm; font-size: 14pt; line-height: 1.7; color: #000;
  }
}
