/* =========================================================
   ドローン保険 パンフレット（HTML 版）
   - 印刷：A4 縦・余白なし。1 ページ = 1 つの section.page
   - 画面（幅 860px 以上）：A4 の紙を並べて表示
   - 画面（幅 860px 未満・文字拡大時）：紙の枠を外して縦に流す
   文言を直すときは pamphlet.html の本文だけを書き換える。
   はみ出しは tests/test-pamphlet-print.cjs で確かめる。
   ========================================================= */

:root {
  --pm-blue: #1375bb;
  --pm-blue-dark: #0f5f99;
  --pm-blue-pale: #d6e9f7;
  --pm-blue-line: #7fb3dd;
  --pm-yellow-pale: #fbf8d2;
  --pm-red: #e60012;
  --pm-navy: #1d2088;
  --pm-text: #231815;
  --pm-sub: #4a4a4a;
  --pm-paper: #fff;
  --pm-desk: #e9edf1;
  --pm-fs: 11pt;
  --pm-fs-s: 10pt;
  --pm-fs-xs: 7pt;
  --pm-lh: 1.7;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body {
  margin: 0;
  background: var(--pm-desk);
  color: var(--pm-text);
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDGothic", "Yu Gothic", "YuGothic", "Meiryo", sans-serif;
  font-size: var(--pm-fs);
  line-height: var(--pm-lh);
  font-feature-settings: "palt" 0;
}

img { max-width: 100%; height: auto; }

p, ul, ol, dl, h1, h2, h3, h4, figure, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* ---------- 画面だけの操作バー ---------- */
.pm-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid #c9d3dc;
  font-size: 15px;
  line-height: 1.5;
}
.pm-toolbar__title { margin: 0; font-size: 16px; font-weight: 700; flex: 1 1 14em; }
.pm-toolbar__note { flex: 1 1 100%; margin: 0; font-size: 14px; color: var(--pm-sub); }
.pm-toolbar__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 18px;
  border: 2px solid var(--pm-blue);
  border-radius: 6px;
  background: #fff;
  color: var(--pm-blue-dark);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.pm-btn--primary { background: var(--pm-blue); color: #fff; }
.pm-btn:hover { filter: brightness(.95); }
.pm-btn:focus-visible { outline: 3px solid #f5a623; outline-offset: 2px; }
.pm-btn[hidden] { display: none; }

/* ---------- 紙 ---------- */
.pm-doc { padding: 24px 0 48px; }

.page {
  position: relative;
  width: 210mm;
  height: 297mm;
  margin: 0 auto 24px;
  padding: 15mm 14mm 13mm;
  overflow: hidden;
  background: var(--pm-paper);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  font-size: var(--pm-fs);
  line-height: var(--pm-lh);
}

/* 上の青い帯 */
.page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6.5mm;
  background: var(--pm-blue);
}
.page__band {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 1;
  height: 9mm;
  padding: 0 14mm;
  background: var(--pm-blue);
  color: #fff;
  font-size: 17pt;
  font-weight: 700;
  line-height: 9mm;
  text-align: right;
}
.page--band { padding-top: 16mm; }

.page__no {
  position: absolute;
  bottom: 6mm;
  z-index: 2;
  font-size: 12pt;
  font-weight: 700;
  line-height: 1;
}
.page__no--l { left: 7mm; }
.page__no--r { right: 7mm; }

/* ---------- 見出し ---------- */
.pm-h2 {
  position: relative;
  margin: 0 0 4.5mm;
  padding-bottom: 1.6mm;
  border-bottom: 1.3mm solid var(--pm-blue);
  font-size: 18pt;
  font-weight: 700;
  line-height: 1.35;
}
.pm-h2--icon { padding-right: 30mm; }
.pm-h3 {
  margin: 0 0 2mm;
  color: var(--pm-blue);
  font-size: 15.5pt;
  font-weight: 700;
  line-height: 1.4;
}
.pm-h4 {
  margin: 3mm 0 1mm;
  color: var(--pm-blue);
  font-size: var(--pm-fs);
  font-weight: 700;
}

/* 吹き出しの男の子 */
.pm-boy {
  position: absolute;
  right: 0;
  bottom: -14mm;
  width: 24mm;
  z-index: 2;
}

/* ---------- 箇条書き ---------- */
.pm-list > li {
  position: relative;
  padding-left: 1.9em;
}
.pm-list > li + li { margin-top: 1.2mm; }
.pm-list > li::before {
  content: "◆";
  position: absolute;
  left: .2em;
  top: 0;
}
.pm-list--loose > li + li { margin-top: 3.2mm; }
.pm-dots > li { position: relative; padding-left: 1.4em; }
.pm-dots > li::before { content: "・"; position: absolute; left: 0; }
.pm-bullets > li { position: relative; padding-left: 1.4em; }
.pm-bullets > li + li { margin-top: .8mm; }
.pm-bullets > li::before { content: "•"; position: absolute; left: .3em; }
.pm-notes > li { position: relative; padding-left: 2.6em; }
.pm-notes > li > .pm-mark { position: absolute; left: 0; }
.pm-kome { position: relative; padding-left: 1.8em; }
.pm-kome::before { content: "※"; position: absolute; left: 0; }
.pm-nums > li { position: relative; padding-left: 1.8em; }
.pm-nums > li > .pm-mark { position: absolute; left: 0; }
.pm-etc { margin-top: 1mm; text-align: right; font-size: var(--pm-fs-s); }

.pm-em { color: var(--pm-red); }
.pm-small { font-size: var(--pm-fs-s); }
.pm-xs { font-size: var(--pm-fs-xs); }
sup { font-size: .62em; line-height: 0; vertical-align: .6em; }

/* ---------- 枠 ---------- */
.pm-box {
  position: relative;
  z-index: 1;
  padding: 4mm 5mm;
  border: .35mm solid var(--pm-blue-line);
  border-radius: 2.5mm;
  background: #fff;
}
.pm-box + .pm-box { margin-top: 3mm; }

/* 青い見出し帯のある枠 */
.pm-panel {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: .35mm solid var(--pm-blue);
  border-radius: 2mm;
  background: #fff;
}
.pm-panel__head {
  margin: 0;
  padding: .9mm 4mm;
  background: var(--pm-blue);
  color: #fff;
  font-size: var(--pm-fs);
  font-weight: 400;
  line-height: 1.5;
}
.pm-panel__body { padding: 2.2mm 4mm 2.6mm; }
.pm-panel__body + .pm-panel__head { margin-top: 0; }

/* ラベルの帯（ご契約条件） */
.pm-label {
  margin: 4mm 0 2.6mm;
  padding: .6mm 3mm;
  border-radius: 0 2mm 2mm 0;
  background: var(--pm-blue);
  color: #fff;
  font-size: var(--pm-fs);
  font-weight: 400;
  line-height: 1.5;
}
.pm-label:first-of-type { margin-top: 0; }

/* =========================================================
   各ページ
   ========================================================= */

/* ---- 表紙 ---- */
.page--cover { padding: 0; }
.cover__logo { position: absolute; top: 10mm; left: 6mm; width: 46mm; z-index: 2; }
.cover__term {
  position: absolute;
  top: 7.5mm;
  right: 0;
  z-index: 2;
  padding: .8mm 9mm .8mm 7mm;
  border-radius: 3mm 0 0 3mm;
  background: #5bb5e3;
  color: #fff;
  font-size: 13pt;
  line-height: 1.4;
}
.cover__head { position: absolute; top: 25mm; left: 10mm; right: 10mm; z-index: 2; }
.cover__title {
  margin: 0 0 3mm;
  font-size: 48pt;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.15;
}
.cover__sub { margin: 0 0 3mm 4mm; font-size: 17pt; font-weight: 500; line-height: 1.4; }
.cover__url { margin: 0 0 0 4mm; font-size: 13pt; line-height: 1.4; }
.cover__url a { color: inherit; text-decoration: none; }
.cover__photo {
  position: absolute;
  inset: auto 0 0 0;
  height: 82%;
  overflow: hidden;
  clip-path: ellipse(150% 100% at 100% 100%);
}
.cover__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.cover__pet {
  position: absolute;
  right: 6mm;
  bottom: 6mm;
  z-index: 2;
  padding: 1mm 2.5mm;
  border-radius: 1.5mm;
  background: rgba(255, 255, 255, .78);
  font-size: 10.5pt;
  line-height: 1.5;
}

/* ---- 1：特徴 ---- */
.page--p1 { --pm-fs: 13pt; --pm-fs-s: 11pt; }
.page--p2, .page--p3, .page--p4 { --pm-fs: 12pt; --pm-fs-s: 11pt; }
.page--p3 { --pm-lh: 1.6; }
.feat { position: relative; margin-bottom: 8mm; padding-right: 48mm; }
.feat .pm-list > li + li { margin-top: 2.4mm; }
.feat__img { position: absolute; right: -9mm; top: 50%; width: 54mm; transform: translateY(-50%); }
.target-lead { margin: -2mm 0 3mm; color: var(--pm-sub); font-size: var(--pm-fs-s); }
.target .pm-list > li + li { margin-top: 4.2mm; }
.target .pm-notes { margin: 1.6mm 0 0 .4em; }

/* ---- 2：お支払い対象となる事故 ---- */
.acc-lead { margin-bottom: 3mm; }
.acc-lead p + p { margin-top: .6mm; }
.acc-lead__label { color: var(--pm-blue); font-weight: 700; }
.acc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2mm;
  margin-bottom: 3mm;
}
.acc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 1.5mm 1.5mm 2mm;
  border: .35mm solid var(--pm-blue-line);
  border-radius: 2.5mm;
  background: #fff;
  text-align: center;
}
.acc-card img { display: block; width: 100%; aspect-ratio: 252 / 150; object-fit: contain; }
.acc-card figcaption { margin-top: 1mm; font-size: 11pt; font-weight: 700; line-height: 1.35; }
.acc-card figcaption small { font-size: 9pt; font-weight: 700; }

/* ---- 3：ご契約条件 ---- */
.cond { position: relative; }
.cond__img { position: absolute; top: -2mm; right: 2mm; width: 44mm; z-index: 2; }
.cond .pm-list { padding-left: 1mm; }
.pay-table {
  width: 100%;
  margin: 3mm 0 1.5mm;
  border-collapse: collapse;
  font-size: var(--pm-fs);
  line-height: 1.5;
}
.pay-table th,
.pay-table td { padding: 1.2mm 1.5mm; border: .3mm solid var(--pm-blue-line); vertical-align: middle; }
.pay-table .pay-table__way { width: 23%; background: var(--pm-blue-pale); font-weight: 400; text-align: center; }
.pay-table .pay-table__desc { width: 42%; }
.pay-table .pay-table__kind { width: 15%; text-align: center; font-weight: 400; }
.pay-table .pay-table__ok { position: relative; background: var(--pm-yellow-pale); text-align: center; }
.pay-mark { font-size: 15pt; font-weight: 700; line-height: 1; }
.pay-mark--ok { display: inline-block; width: 5.2mm; height: 5.2mm; border: .75mm solid var(--pm-red); border-radius: 50%; font-size: 0; vertical-align: middle; }
.pay-mark--ng { color: var(--pm-navy); font-family: Arial, sans-serif; font-size: 17pt; font-weight: 400; }
.pay-table .pay-table__ok .pm-xs { position: absolute; top: .6mm; right: .8mm; color: var(--pm-text); }
.pay-notes { font-size: var(--pm-fs-s); line-height: 1.5; }
.pay-notes > li { position: relative; padding-left: 3.4em; }
.pay-notes > li > .pm-mark { position: absolute; left: 0; }

/* ---- 4：被保険者 ---- */
.insured { position: relative; z-index: 1; }
.insured .pm-h3 { margin-top: 3.5mm; }
.insured .pm-nums > li + li { margin-top: .4mm; }
.photo-bottom {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 0;
  overflow: hidden;
}
.photo-bottom img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-bottom--fade { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%); mask-image: linear-gradient(to bottom, transparent 0, #000 18%); }
.photo-bottom--woman { height: 47%; }
.photo-bottom--woman img { object-position: 30% 50%; }
.photo-bottom--agri { height: 37%; }
.photo-bottom--agri img { object-position: 50% 40%; }
.photo-bottom--mountain { height: 37%; }
.photo-bottom--mountain img { object-position: 50% 60%; }

/* ---- 5〜7：お支払いする保険金 ---- */
.pay5 .pm-panel__body .pm-list > li + li { margin-top: 1.4mm; }
.formula { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5mm 2.5mm; margin: 1.6mm 0 2.4mm 1mm; }
.formula__box { padding: .2mm 2mm; border: .3mm solid var(--pm-blue); background: var(--pm-blue-pale); }
.pm-section-gap { margin-top: 2.4mm; }
.pay6 .pm-panel__body { padding-bottom: 3.6mm; }
.pay7 .pm-panel__body { padding-top: .9mm; padding-bottom: 1.1mm; font-size: 11pt; line-height: 1.45; }
.lien {
  margin-top: 3mm;
  padding: 2.4mm 4mm 2.6mm;
  border: .35mm solid var(--pm-blue-line);
  border-radius: 2mm;
  font-size: 9.6pt;
  line-height: 1.42;
}
.lien__title { display: flex; align-items: flex-end; gap: 2mm; margin-bottom: 1mm; font-size: 11pt; font-weight: 700; }
.lien__mark { flex: none; width: 6.5mm; height: 6mm; }
.lien__title ruby rt { font-size: 7pt; font-weight: 400; }
.lien p + p { margin-top: .4mm; }
.lien .pm-iroha > li { padding-left: 1.6em; text-indent: -1.6em; }

/* ---- 8・9：お支払いできない場合 ---- */
.page--p8 { --pm-lh: 2; }
.page--p9 { --pm-lh: 1.95; }
.page--p10 .notice { line-height: 2.1; }
.page--p10 .notice .pm-dots { line-height: 1.9; }
.ng .pm-list > li + li { margin-top: 1.6mm; }
.ng-lead { margin-bottom: 3mm; }
.ng-note { margin: 4mm 0 0 1mm; font-size: var(--pm-fs-s); }
.ng9 { position: relative; z-index: 1; }
.ng9 .pm-list > li + li { margin-top: 1.4mm; }
.ng9 .pm-bullets { margin-top: 1.6mm; }

/* ---- 10：ご契約の際のご注意 ---- */
.notice .pm-list > li + li { margin-top: 2mm; }
.notice .pm-dots { margin-top: 1.4mm; font-size: var(--pm-fs-s); }
.notice .pm-dots > li + li { margin-top: 1mm; }
.foot { position: absolute; left: 13mm; right: 13mm; bottom: 13mm; font-size: 10pt; line-height: 1.55; }
.foot__lead { margin-bottom: 2.4mm; }
.foot__row { display: grid; grid-template-columns: 37% 1fr; gap: 3mm; align-items: center; margin-bottom: 2mm; }
.foot__hp { padding: 1mm 2mm; background: var(--pm-blue-pale); }
.foot__hp a { color: inherit; text-decoration: none; }
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
.contact { border: .35mm solid var(--pm-blue); border-radius: 1.5mm; overflow: hidden; }
.contact__head { margin: 0; padding: .4mm 2mm; background: var(--pm-blue); color: #fff; font-size: 9pt; font-weight: 400; text-align: center; }
.contact__body { display: grid; grid-template-columns: 1fr auto; gap: 0 2mm; align-items: end; padding: 1.2mm 2mm 1.6mm; }
.contact__name { grid-column: 1 / -1; color: var(--pm-blue); font-size: 11pt; }
.contact__tel { color: var(--pm-blue); font-size: 11pt; white-space: nowrap; }
.contact__tel a { color: var(--pm-text); font-size: 19pt; font-weight: 700; letter-spacing: .04em; text-decoration: none; }
.contact__hours { font-size: 7.8pt; line-height: 1.4; }
.contact__net { color: var(--pm-red); font-size: 8.6pt; white-space: nowrap; }
.contact__qr { grid-row: 2 / span 2; grid-column: 2; width: 15mm; image-rendering: pixelated; }
.foot__bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; margin-top: 2mm; align-items: end; }
.foot__agency { font-size: 11.5pt; line-height: 1.45; }
.foot__agency small { display: block; font-size: 7.6pt; }
.foot__agency a { color: inherit; text-decoration: none; }
.foot__tmn { font-size: 12pt; font-weight: 700; line-height: 1.3; }
.foot__tmn small { display: block; font-size: 7pt; font-weight: 400; }
.foot__code { margin-top: 1mm; text-align: right; font-size: 9pt; }

/* =========================================================
   画面の幅が狭いとき（スマホ・文字拡大）：紙の枠を外す
   ========================================================= */
@media screen and (max-width: 859.98px) {
  body { font-size: 16px; line-height: 1.75; }
  :root, .page[class] { --pm-fs: 16px; --pm-fs-s: 15px; --pm-fs-xs: 13px; --pm-lh: 1.75; }
  .pm-doc { padding: 0; }
  .page,
  .page--band,
  .page--cover {
    width: auto;
    height: auto;
    margin: 0 0 12px;
    padding: 36px 16px 48px;
    overflow: visible;
    box-shadow: none;
  }
  .page::before { height: 8px; }
  .page__band { position: static; height: auto; margin: -36px -16px 20px; padding: 6px 16px; font-size: 18px; line-height: 1.5; text-align: left; }
  .page__no { bottom: 14px; font-size: 15px; }
  .page__no--l { left: 16px; }
  .page__no--r { right: 16px; }
  .pm-h2 { font-size: 21px; border-bottom-width: 4px; padding-bottom: 6px; margin-bottom: 16px; }
  .pm-h2--icon { padding-right: 76px; }
  .pm-h3 { font-size: 18px; }
  .pm-boy { width: 64px; bottom: -6px; }
  .pm-box, .pm-panel__body { padding: 14px; }
  .pm-panel__head, .pm-label { padding: 4px 14px; font-size: 16px; }
  .pm-label { margin: 18px 0 10px; }

  .cover__logo, .cover__term, .cover__head, .cover__pet { position: static; }
  .page--cover { display: flex; flex-direction: column; padding: 24px 16px 16px; }
  .cover__logo { width: 180px; margin-bottom: 12px; }
  .cover__term { align-self: flex-start; padding: 4px 12px; border-radius: 6px; font-size: 15px; margin-bottom: 12px; }
  .cover__title { font-size: 40px; }
  .cover__sub { margin-left: 0; font-size: 17px; }
  .cover__url { margin-left: 0; font-size: 16px; }
  .cover__url a { text-decoration: underline; }
  .cover__photo { position: static; height: auto; margin: 16px -16px 12px; clip-path: none; }
  .cover__photo img { height: auto; aspect-ratio: 4 / 3; }
  .cover__pet { padding: 0; background: none; font-size: 14px; }

  .feat { padding-right: 0; }
  .feat__img { position: static; display: block; width: min(240px, 70%); margin: 12px auto 0; transform: none; }
  .target-lead { margin-top: 0; }
  .acc-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .acc-card figcaption { font-size: 14px; }
  .acc-card figcaption small { font-size: 12px; }
  .cond__img { position: static; display: block; width: min(220px, 70%); margin: 0 auto 12px; }
  .pay-table, .pay-table tbody, .pay-table tr { display: block; }
  .pay-table { margin: 12px 0; }
  .pay-table tr { display: grid; grid-template-columns: 1fr auto; border: 1px solid var(--pm-blue-line); border-bottom: 0; }
  .pay-table tr:last-child { border-bottom: 1px solid var(--pm-blue-line); }
  .pay-table th, .pay-table td { display: block; border: 0; padding: 8px 10px; }
  .pay-table .pay-table__way, .pay-table .pay-table__desc { grid-column: 1 / -1; width: auto; text-align: left; }
  .pay-table .pay-table__kind { width: auto; text-align: left; border-top: 1px solid var(--pm-blue-line); }
  .pay-table .pay-table__ok { width: 92px; border-top: 1px solid var(--pm-blue-line); }
  .pay-table .pay-table__ok .pm-xs { position: static; margin-left: 4px; }
  .photo-bottom { position: static; height: auto; margin: 20px -16px 0; -webkit-mask-image: none; mask-image: none; }
  .photo-bottom img { height: auto; aspect-ratio: 3 / 2; }
  .pay7 .pm-panel__body { font-size: 16px; line-height: 1.7; }
  .lien { font-size: 15px; line-height: 1.7; }
  .lien__title { font-size: 17px; }
  .lien__title ruby rt { font-size: 11px; }
  .foot { position: static; margin-top: 28px; font-size: 15px; }
  .foot__row, .contacts, .foot__bottom { grid-template-columns: 1fr; }
  .contact__head { font-size: 15px; }
  .contact__name { font-size: 17px; }
  .contact__tel { font-size: 15px; white-space: normal; }
  .contact__tel a { font-size: 24px; }
  .contact__hours, .contact__net { font-size: 14px; white-space: normal; }
  .contact__qr { width: 72px; }
  .foot__agency { font-size: 16px; }
  .foot__agency small, .foot__tmn small, .foot__code { font-size: 13px; }
  .foot__tmn { font-size: 17px; }
}

/* =========================================================
   印刷
   ========================================================= */
@page { size: A4 portrait; margin: 0; }

@media print {
  html, body { background: #fff; }
  .pm-toolbar { display: none !important; }
  .pm-doc { padding: 0; }
  .page {
    margin: 0;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }
  .page:last-child { break-after: auto; page-break-after: auto; }
  a { color: inherit; text-decoration: none; }
}
