/* A4 両面 1 枚の資料（印刷専用レイアウト）。文言は content/health-check.json から build.py が流し込む */
:root {
  --navy: #123b73; --deep: #0e2f5b; --gold: #d4af37; --gold-ink: #7a5f00; --orange: #c2410c;
  --gray: #f3f5f8; --line: #d5dce7; --ink: #0e2f5b; --ink-soft: #46597a;
  --font-head: "Zen Kaku Gothic Antique", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  --font-quote: "Shippori Mincho B1", "Hiragino Mincho ProN", serif;
  --font-num: "Barlow Condensed", sans-serif;
}
@page { size: A4 portrait; margin: 0; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body { margin: 0; background: #dfe4ec; font-family: var(--font-body); color: var(--ink); line-height: 1.7; }
p, ul, ol, figure, h1, h2 { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
.ln { display: block; }

.screen-bar { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: center; padding: 12px 16px; background: #0a1729; color: #fff; font-size: 14px; }
.screen-bar a { color: #fff; text-underline-offset: 4px; padding: 8px 4px; }
.screen-bar a:hover { color: var(--gold); }

.sheet {
  position: relative; width: 210mm; height: 297mm; margin: 8mm auto; padding: 15mm 16mm 13mm;
  background: #fff; overflow: hidden; display: flex; flex-direction: column;
  break-after: page;
}
.sheet:last-of-type { break-after: auto; }
.sheet::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5mm; background: var(--navy); }
.sheet::after { content: ""; position: absolute; left: 0; top: 5mm; width: 60mm; height: 1.2mm; background: var(--gold); }

h1, h2 { font-family: var(--font-head); font-weight: 900; line-height: 1.38; }
.h-logo img { height: 13mm; width: auto; }
.h-logo--back { margin-top: 2.5mm; }
.h-logo--back img { height: 9mm; }

/* 表 */
.sheet--front h1 { margin-top: 7mm; font-size: 32pt; }
.h-sub { margin-top: 4mm; font-family: var(--font-head); font-weight: 900; font-size: 18.5pt; line-height: 1.5; color: var(--gold-ink); }
.h-result { margin-top: 8mm; display: grid; grid-template-columns: 1fr 106mm 1fr; gap: 4mm; align-items: center; }
.h-result figure { position: relative; border-radius: 3mm; overflow: hidden; border: .4mm solid var(--line); }
.h-result figcaption { position: absolute; top: 2mm; right: 2mm; padding: .6mm 2.4mm; border-radius: 1mm; background: var(--gold); color: var(--deep); font-size: 7pt; font-weight: 700; letter-spacing: .04em; }
.h-acts { display: grid; gap: 3mm; }
.h-acts li { padding: 2.4mm 1mm; text-align: center; border: .5mm solid var(--navy); border-radius: 99mm; font-family: var(--font-head); font-weight: 700; font-size: 10.5pt; line-height: 1.3; }
.h-question { margin-top: 8mm; text-align: center; font-family: var(--font-head); font-weight: 900; font-size: 20pt; line-height: 1.5; }
.h-foot { margin-top: auto; padding-top: 5mm; border-top: .5mm solid var(--navy); display: flex; align-items: center; justify-content: space-between; gap: 8mm; }
.h-name { font-family: var(--font-head); font-weight: 900; font-size: 20pt; line-height: 1.3; }
.h-url { font-family: var(--font-num); font-weight: 500; font-size: 13pt; letter-spacing: .04em; color: var(--ink-soft); }
.h-qr { width: 30mm; height: 30mm; image-rendering: pixelated; flex: none; }

/* 裏 */
.sheet--back h2 { margin-top: 6mm; font-size: 30pt; }
.h-sub--gold { margin-top: 7mm; font-size: 20pt; color: var(--navy); }
.h-sub--gold::before { content: ""; display: block; width: 18mm; height: 1.2mm; background: var(--gold); margin-bottom: 4mm; }
.h-pnf { margin-top: 9mm; display: grid; gap: 0; }
.h-pnf li { position: relative; display: grid; grid-template-columns: 34mm 1fr; align-items: center; padding: 6mm 6mm; border: .5mm solid var(--line); background: var(--gray); }
.h-pnf li + li { border-top: 0; }
.h-pnf li:not(:last-child)::after { content: ""; position: absolute; z-index: 1; left: 15mm; bottom: -2.4mm; width: 4mm; height: 4mm; background: var(--gray); border: solid var(--gold); border-width: 0 .9mm .9mm 0; transform: rotate(45deg); }
.h-pnf li:last-child { background: var(--navy); border-color: var(--navy); color: #fff; }
.h-pnf b { font-family: var(--font-num); font-weight: 600; font-size: 26pt; letter-spacing: .08em; color: var(--gold-ink); line-height: 1; }
.h-pnf li:last-child b { color: var(--gold); }
.h-pnf span { font-family: var(--font-head); font-weight: 700; font-size: 14.5pt; line-height: 1.5; }
.h-quote { margin-top: 10mm; text-align: center; }
.h-quote__q { font-family: var(--font-quote); font-weight: 800; font-size: 38pt; line-height: 1.3; color: var(--deep); white-space: nowrap; }
.h-quote__l { margin-top: 3mm; font-size: 12pt; color: var(--ink-soft); }
.h-voices { margin-top: 4mm; display: grid; gap: 2mm; text-align: left; }
.h-voices li { padding: 1.6mm 4mm; border-left: 1mm solid var(--gold); font-size: 10.5pt; }
.h-phil { margin-top: 8mm; text-align: center; font-family: var(--font-quote); font-weight: 800; font-size: 28pt; color: var(--gold-ink); }
.h-foot--back { align-items: flex-end; }
.h-cta { font-family: var(--font-head); font-weight: 900; font-size: 13.5pt; color: var(--orange); margin-bottom: 1mm; }
.h-foot--back .h-name { font-size: 17pt; }
.h-disc { margin-top: 3mm; font-size: 6.8pt; line-height: 1.6; color: var(--ink-soft); }

@media screen and (max-width: 820px) {
  .sheet { transform-origin: top left; margin: 12px 0 0 12px; transform: scale(calc((100vw - 24px) / 794px)); margin-bottom: calc((100vw - 24px) / 794px * 1123px - 1123px + 12px); }
  .sheet { width: 794px; height: 1123px; }
}
@media screen { .sheet { box-shadow: 0 4mm 12mm rgba(14, 47, 91, .2); } }
@media print {
  body { background: #fff; }
  .screen-bar { display: none; }
  .sheet { margin: 0; box-shadow: none; }
}
