/* 鑑定書（A4×3ページ・印刷/PDF保存対応） */
:root {
  --navy: #0B1726; --paper: #F3EEE3; --shu: #B13A2C; --gold: #A88750; --ink: #1a1c1e;
  --mincho: "Zen Old Mincho", "Noto Serif JP", "Yu Mincho", serif;
  --gothic: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
}
.report { width: 210mm; margin: 0 auto; transform-origin: top center; }
.page {
  position: relative;
  width: 210mm; height: 297mm;
  background: var(--navy) url("img/frame_page.webp") no-repeat center / 100% 100%;
  color: var(--ink); font-family: var(--gothic);
  margin: 0 auto 8mm; overflow: hidden;
}
.page.cover { background-image: url("img/frame_cover.webp"); }
.inner { position: absolute; inset: 24mm 20mm 20mm; display: flex; flex-direction: column; }
.cover .inner { inset: 30mm 22mm 24mm; align-items: center; text-align: center; }

.logo { width: 46mm; margin: 0 auto; display: block; }
.cover .logo { width: 62mm; }
.rule { width: 42mm; height: 1px; background: var(--gold); margin: 5mm auto; }

/* 表紙 */
.cover .kind { font-family: var(--mincho); font-size: 14pt; letter-spacing: .32em; color: var(--navy); margin-left: .32em; }
.cover h1 { font-family: var(--mincho); font-size: 34pt; letter-spacing: .28em; color: var(--navy); margin: 3mm 0 6mm; margin-left: .28em; font-weight: 700; }
.cover .lead { font-family: var(--mincho); font-size: 19pt; line-height: 1.75; color: var(--navy); }
.cover .lead em { font-style: normal; color: var(--shu); }
.cover .sub { font-size: 10.5pt; color: rgba(26,28,30,.7); margin-top: 5mm; }
.cover .en { font-family: Georgia, serif; font-size: 9pt; letter-spacing: .3em; color: var(--gold); margin-top: 8mm; }
.cover .names { font-family: var(--mincho); font-size: 13pt; color: var(--navy); margin-top: 3mm; letter-spacing: .1em; }
.cover-cards { display: flex; gap: 5mm; justify-content: center; margin-top: 8mm; }
.cover-cards .fuda { width: 30mm; }
.cover .issued { position: absolute; left: 0; right: 0; bottom: 0; font-size: 8.5pt; color: rgba(26,28,30,.55); }
.cover .seal { position: absolute; right: 2mm; bottom: 6mm; width: 20mm; }

/* 見出し */
.p-title { font-family: var(--mincho); font-size: 21pt; letter-spacing: .14em; color: var(--navy); text-align: center; font-weight: 700; }
.p-sub { font-family: var(--mincho); font-size: 10.5pt; color: var(--shu); text-align: center; margin-top: 1.4mm; }
.sec { margin-top: 3.4mm; }
.sec-head { display: flex; align-items: center; gap: 3mm; margin-bottom: 2mm; }
.sec-no {
  width: 7mm; height: 7mm; border-radius: 50%; border: 1px solid var(--shu); color: var(--shu);
  font-family: Georgia, serif; font-size: 10pt; display: flex; align-items: center; justify-content: center; flex: none;
}
.sec-name { font-family: var(--mincho); font-size: 13pt; color: var(--navy); letter-spacing: .12em; }

/* 総合所見 */
.soken {
  border: 1px solid var(--shu); padding: 3.4mm 5mm; font-family: var(--mincho);
  font-size: 10.6pt; line-height: 1.75; color: var(--navy); text-align: center;
}

/* 命式表 */
.meishiki-row { display: flex; gap: 5mm; }
.person { flex: 1; }
.person-tag {
  display: inline-block; background: var(--navy); color: var(--paper);
  font-size: 9pt; letter-spacing: .2em; padding: .8mm 4mm; margin-bottom: 2mm;
}
.person.b .person-tag { background: var(--shu); }
table.ms { width: 100%; border-collapse: collapse; font-family: var(--mincho); }
table.ms th, table.ms td { border: .4pt solid rgba(11,23,38,.4); text-align: center; padding: 1.2mm 0; }
table.ms th { font-size: 8.5pt; color: rgba(26,28,30,.65); font-weight: 400; font-family: var(--gothic); }
table.ms td.kanshi { font-size: 13.5pt; color: var(--navy); letter-spacing: .06em; }
table.ms td.kanshi.day { color: var(--shu); }
table.ms td.lbl { font-size: 8.5pt; color: rgba(26,28,30,.65); font-family: var(--gothic); width: 14mm; }
table.ms td.val { font-size: 10pt; }
.gogyo-cell { display: flex; justify-content: space-around; padding: 1mm 0; }
.gogyo-cell span { font-size: 8pt; color: rgba(26,28,30,.6); }
.gogyo-cell b { display: block; font-size: 10pt; line-height: 1; margin-top: .6mm; }

/* 五行図 */
.gogyo-wrap { display: flex; gap: 5mm; }
.gogyo-fig { flex: 1.05; text-align: center; }
.gogyo-fig svg { width: 100%; }
.gb { margin: 1mm auto 0; max-width: 56mm; }
.gb-head, .gb-row { display: grid; grid-template-columns: 6mm 1fr 4mm 1fr 4mm; align-items: center; gap: 1.5mm; }
.gb-head span { font-size: 7.5pt; color: rgba(26,28,30,.55); text-align: center; }
.gb-head span:nth-child(2) { grid-column: 2 / 4; }
.gb-head span:nth-child(3) { grid-column: 4 / 6; }
.gb-row { margin-top: .7mm; }
.gb-el { font-family: var(--mincho); font-size: 8.4pt; text-align: center; }
.gb-track { height: 2mm; background: rgba(26,28,30,.09); display: block; }
.gb-track i { display: block; height: 100%; }
.gb-row b { font-size: 7.5pt; color: rgba(26,28,30,.5); font-weight: 400; text-align: left; }
.gogyo-note { font-size: 7.6pt; color: rgba(26,28,30,.6); line-height: 1.6; margin-top: 1.5mm; }
.gogyo-fig svg { max-width: 44mm; }

/* 縁のかたち3枚 */
.en-list { flex: 1; display: flex; flex-direction: column; gap: 2mm; }
.en-item { display: flex; gap: 2.5mm; align-items: flex-start; border: .5pt solid rgba(168,135,80,.7); padding: 2mm 2.5mm; }
.en-item img { width: 10mm; flex: none; }
.en-item h4 { font-family: var(--mincho); font-size: 10.4pt; color: var(--navy); margin-bottom: 1mm; font-weight: 600; }
.en-item.attract h4 { color: var(--shu); }
.en-item p { font-size: 8.1pt; line-height: 1.62; color: rgba(26,28,30,.8); }

/* 3ページ目 */
.read-item { display: flex; gap: 5mm; align-items: flex-start; padding: 4mm 0; border-bottom: .4pt solid rgba(168,135,80,.6); }
.read-item:last-of-type { border-bottom: 0; }
.read-item img { width: 17mm; flex: none; }
.read-item h4 { font-family: var(--mincho); font-size: 14pt; color: var(--navy); margin-bottom: 1.5mm; font-weight: 600; }
.read-item p { font-size: 10pt; line-height: 1.9; color: rgba(26,28,30,.85); }
.timing { display: flex; gap: 4mm; border: .5pt solid var(--gold); padding: 3.5mm 4mm; margin-top: 4mm; align-items: center; }
.timing .t-label { font-family: var(--mincho); font-size: 11.5pt; color: var(--shu); line-height: 1.5; flex: none; width: 28mm; }
.timing p { font-size: 9.5pt; line-height: 1.85; }
.advice { display: flex; gap: 4mm; border: 1px solid var(--shu); padding: 4mm; margin-top: 4mm; align-items: center; }
.advice img { width: 16mm; flex: none; }
.advice .a-label { font-family: var(--mincho); font-size: 12pt; color: var(--shu); text-align: center; line-height: 1.5; flex: none; width: 22mm; }
.advice ul { list-style: none; }
.advice li { font-size: 9.5pt; line-height: 1.95; }
.advice li::before { content: "◆"; color: var(--gold); font-size: 7pt; margin-right: 2mm; vertical-align: middle; }

.body-p { font-size: 9.6pt; line-height: 1.88; color: rgba(26,28,30,.85); }
.body-p + .body-p { margin-top: 2mm; }
.body-p b { color: var(--shu); font-weight: 600; }
.scene-row { display: flex; gap: 4mm; align-items: flex-start; padding: 2.8mm 0; border-bottom: .4pt dotted rgba(168,135,80,.8); }
.scene-row:last-child { border-bottom: 0; }
.scene-q { font-family: var(--mincho); font-size: 11pt; color: var(--navy); width: 32mm; flex: none; }
.scene-row p { font-size: 9.5pt; line-height: 1.85; color: rgba(26,28,30,.85); }

.pageno { position: absolute; left: 0; right: 0; bottom: 10mm; text-align: center; font-family: Georgia, serif; font-size: 9pt; color: var(--gold); letter-spacing: .3em; }
.pageno::before, .pageno::after { content: "—"; margin: 0 3mm; opacity: .6; }

/* 命式札（表紙） */
.fuda { background: var(--paper); border: .5pt solid var(--gold); text-align: center; padding: 3mm 1mm; }
.fuda.day { border-color: var(--shu); }
.fuda .f-head { font-family: var(--mincho); font-size: 8.5pt; color: rgba(26,28,30,.55); letter-spacing: .15em; }
.fuda .f-kan, .fuda .f-shi { font-family: var(--mincho); font-size: 19pt; color: var(--navy); line-height: 1.2; }
.fuda.day .f-kan, .fuda.day .f-shi { color: var(--shu); }

@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff !important; }
  body::before, body::after { display: none !important; }
  main, header.site, footer, .noprint { display: none !important; }
  .report { display: block !important; width: auto; transform: none !important; margin: 0 !important; }
  .page { margin: 0; page-break-after: always; box-shadow: none; }
  .page:last-child { page-break-after: auto; }
}
@media screen {
  .page { box-shadow: 0 12px 40px rgba(0,0,0,.5); }
  /* zoom はレイアウト自体を縮めるので margin:auto の中央寄せと高さ計算が正しく効く */
  @media (max-width: 840px) { .report { zoom: .44; } }
  @media (max-width: 480px) { .report { zoom: .36; } }
}
