/* 12 ポップでカラフル — 下層ページの装飾。pages-base.css の変数に値を入れ、決まった class をこの案の見た目で作る。
   地は生成り、ページの頭は黄の色面と波、カードは墨色の太い線とずらした影。 */

:root {
  --pg-bg: var(--cream);
  --pg-fg: var(--ink);
  --pg-muted: var(--ink-2);
  --pg-accent: var(--ink);
  --pg-accent-fg: var(--white);
  --pg-line: var(--ink);
  --pg-card-bg: var(--white);
  --pg-radius: 20px;
  --pg-max: 1120px;
  --pg-font-head: var(--font-round);
  --pg-font-body: var(--font-body);
  --pg-pad-top: clamp(40px, 6vw, 96px);
  --pg-pad-side: max(5vw, 20px);
}

.page { position: relative; font-size: 16px; line-height: 1.9; }
.page h3 { font-size: 20px; }

/* ---------- ページの頭（黄の色面を画面幅いっぱいに。下に波） ---------- */
.page > .page-head {
  position: relative;
  max-width: none;
  margin: calc(-1 * var(--pg-pad-top)) calc(-1 * var(--pg-pad-side)) 0;
  padding: clamp(28px, 4.5vw, 64px) calc(var(--pg-pad-side) + max(0px, (100% - var(--pg-max)) / 2)) clamp(60px, 7vw, 100px);
  background: var(--yellow);
}
.page > .page-head + * { margin-top: clamp(56px, 7vw, 96px); }
.page > .page-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(-1 * clamp(30px, 3.6vw, 52px) + 1px);
  height: clamp(30px, 3.6vw, 52px);
  background-color: var(--yellow);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 60' preserveAspectRatio='none'%3E%3Cpath d='M0 28Q180 56 360 28T720 28V0H0Z'/%3E%3C/svg%3E") 0 0 / 720px 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 60' preserveAspectRatio='none'%3E%3Cpath d='M0 28Q180 56 360 28T720 28V0H0Z'/%3E%3C/svg%3E") 0 0 / 720px 100% repeat-x;
  pointer-events: none;
}
.motion .page > .page-head::after { animation: wave-sway 30s linear infinite; }
.page .page-title { font-size: clamp(34px, 5vw, 64px); line-height: 1.42; }
.page .page-lead { font-size: 17px; font-weight: 500; }

/* ページごとのイラストのステッカー（広い画面だけ。飾りなので CSS の背景で） */
@media (min-width: 960px) {
  .page > .page-head { min-height: calc(min(28vw, 330px) * .75 + 140px); padding-right: calc(var(--pg-pad-side) + max(0px, (100% - var(--pg-max)) / 2) + min(32vw, 380px)); }
  .page > .page-head::before {
    content: "";
    position: absolute;
    right: calc(var(--pg-pad-side) + max(0px, (100% - var(--pg-max)) / 2));
    bottom: clamp(56px, 6vw, 84px);
    width: min(28vw, 330px);
    aspect-ratio: 4 / 3;
    background: var(--paper) center / cover no-repeat;
    border: var(--line) solid var(--ink);
    border-radius: 22px;
    box-shadow: var(--shadow);
    rotate: 2.5deg;
  }
  .page--patient-explainer > .page-head::before { background-image: url("/assets/photos/I01.webp"); }
  .page--pricing > .page-head::before { background-image: url("/assets/photos/I03.webp"); rotate: -2.5deg; }
  .page--quality > .page-head::before { background-image: url("/assets/photos/I02.webp"); }
  .page--process > .page-head::before { background-image: url("/assets/photos/F02.webp"); background-size: contain; rotate: -2deg; }
  .page--samples > .page-head::before { background-image: url("/assets/photos/F01.webp"); background-size: contain; }
  .page--ai-policy > .page-head::before { background-image: url("/assets/photos/F03.webp"); background-size: contain; rotate: -2deg; }
  .page--faq > .page-head::before { background-image: url("/assets/photos/I04.webp"); }
  .page--about > .page-head::before { background-image: url("/assets/photos/I02.webp"); rotate: -2deg; }
  .page--contact > .page-head::before { background-image: url("/assets/photos/I03.webp"); }
  .page--privacy > .page-head { min-height: 0; padding-right: calc(var(--pg-pad-side) + max(0px, (100% - var(--pg-max)) / 2)); }
  .page--privacy > .page-head::before { content: none; }
}

/* ---------- 区画の見出し（マーカーの下線。色は区画ごとに変える） ---------- */
.page .section-title {
  font-size: clamp(26px, 3vw, 38px);
  text-decoration-line: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: .36em;
  text-underline-offset: -.2em;
  text-decoration-skip-ink: none;
}
.page .page-section:nth-of-type(3n+2) .section-title { text-decoration-color: var(--sky); }
.page .page-section:nth-of-type(3n) .section-title { text-decoration-color: var(--leaf); }

/* ---------- 段落・注記・画像 ---------- */
.page .prose { font-size: 16px; }
.page .prose a { font-weight: 700; text-decoration-thickness: 2px; }
.page .prose a:hover { background: var(--yellow); }
.page .notice {
  position: relative;
  padding: 22px 24px 18px;
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--ink);
  font-weight: 500;
}
.page .notice::before {
  /* 付箋を留めるテープ */
  content: "";
  position: absolute;
  top: -13px;
  left: 28px;
  width: 84px;
  height: 24px;
  background: var(--sky);
  border: 2px solid var(--ink);
  rotate: -3deg;
}
.page .notice--privacy::before { background: var(--pink); }
.page figure.media { margin-inline: auto; }
.page figure.media img { border: var(--line) solid var(--ink); border-radius: 26px; box-shadow: 8px 8px 0 var(--ink); max-height: 560px; object-fit: cover; }
.page figure.media figcaption { margin-top: 14px; font-size: 13px; font-weight: 500; color: var(--ink-2); }

/* ---------- 料金のカード（共通の形） ---------- */
.page .price-card {
  gap: 16px;
  border: var(--line) solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: transform .45s var(--bounce), box-shadow .3s ease;
}
.page .price-card.is-featured { border-color: var(--ink); box-shadow: 9px 9px 0 var(--ink); }
.page .price-card__name { font-size: 22px; }
.page .price-card__badge {
  padding: 2px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--pink);
  font-family: var(--font-round);
  font-weight: 800;
  font-size: 14px;
}
.page .price-card__ex { font-family: var(--font-round); font-weight: 800; font-size: 20px; }
.page .price-card__in { color: var(--ink); font-weight: 700; font-size: 14.5px; }
.page .price-card__for {
  padding: 12px 16px;
  border: 2px dashed var(--ink);
  border-radius: 14px;
  background: var(--cream);
  font-size: 15px;
}
.page .price-card__for strong { font-family: var(--font-round); font-weight: 800; font-size: 14px; margin-bottom: 2px; }
.page .price-card__includes { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 15px; }
.page .price-card__includes li { position: relative; padding-left: 22px; }
.page .price-card__includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--ink);
}
.page .price-card__terms { font-size: 14.5px; }
.page .price-card__terms dt { font-weight: 700; }
@media (hover: hover) {
  .page .price-card:hover { transform: rotate(-1.4deg) translateY(-4px); box-shadow: 10px 11px 0 var(--ink); }
  .page .price-card:nth-child(even):hover { transform: rotate(1.4deg) translateY(-4px); }
}

/* ---------- 料金のページの作り込み: 値札の形（穴・色の頭・大きな数字） ---------- */
/* 値札は吊り下げたように、長さが違ってもそろえずに上で留める */
.page .pop-tags { gap: clamp(24px, 2.6vw, 36px); padding-top: 14px; align-items: start; }
.page .pop-tag { padding: 0; gap: 0; overflow: visible; background: var(--white); transform-origin: 50% 0; }
.page .pop-tag__head {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 46px clamp(20px, 2.4vw, 30px) 22px;
  border-bottom: var(--line) solid var(--ink);
  border-radius: 21px 21px 0 0;
  background: var(--tag, var(--white));
}
.page .pop-tag__head > * { margin: 0; }
.page .pop-tag__head::before {
  /* 値札の穴 */
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  border-radius: 50%;
  background: var(--cream);
  border: var(--line) solid var(--ink);
}
.page .pop-tag__head::after {
  /* 穴から上に伸びるひも */
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  width: 0;
  height: 32px;
  border-left: var(--line) solid var(--ink);
  rotate: 14deg;
  transform-origin: 50% 100%;
}
.page .pop-tag--sky { --tag: var(--sky); }
.page .pop-tag--yellow { --tag: var(--yellow); }
.page .pop-tag--pink { --tag: var(--pink); }
.page .pop-tag--leaf { --tag: var(--leaf); }
.page .pop-tag--white { --tag: var(--white); }
.page .pop-tag--white .pop-tag__head { border-bottom-style: dashed; }
.page .pop-tag .price-card__price { display: grid; gap: 4px; }
.page .pop-tag .price-card__ex { font-size: 18px; line-height: 1.45; }
.page .pop-num { font-size: clamp(36px, 3.4vw, 46px); letter-spacing: -.01em; line-height: 1.42; }
.page .pop-tag__body { display: flex; flex-direction: column; gap: 16px; flex: 1; padding: 22px clamp(20px, 2.4vw, 30px) 26px; }
.page .pop-tag__col { display: grid; gap: 16px; align-content: start; }
.page .pop-tag__col > * { margin: 0; }
.page .pop-tag .price-card__cta { margin-top: auto; align-self: flex-start; justify-self: start; }
.page .pop-unit { white-space: nowrap; }
.page .pop-tag .price-card__badge {
  position: absolute;
  top: 40px;
  right: 20px;
  padding: 4px 16px;
  border-width: var(--line);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 15px;
  line-height: 1.5;
  white-space: nowrap;
  rotate: 6deg;
}
.page .pop-tag--wide .price-card__name { padding-right: 150px; font-size: 26px; }
.page .pop-tag--wide .pop-num { font-size: clamp(44px, 5vw, 68px); }
@media (hover: hover) {
  .page .pop-tag:hover { transform: rotate(-2deg); box-shadow: 9px 10px 0 var(--ink); }
  .page .pop-tag:nth-child(even):hover { transform: rotate(2deg); }
  .page .pop-tag--wide:hover { transform: rotate(-.8deg); }
}

/* 並べ方: 広い画面はスタンダードを 2 列ぶんの大きな値札に。中くらいはスタンダードを先頭の横長に */
@media (min-width: 1080px) {
  .page .pop-tags { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page .pop-tag--wide { grid-column: span 2; }
  .page .pop-tag--wide .pop-tag__body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; }
  .page .pop-tag--wide .price-card__cta { grid-column: 1 / -1; }
}
@media (min-width: 700px) and (max-width: 1079px) {
  .page .pop-tags { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page .pop-tag--wide { grid-column: 1 / -1; order: -1; }
  .page .pop-tag--wide .pop-tag__body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; }
  .page .pop-tag--wide .price-card__cta { grid-column: 1 / -1; }
}

/* 共通の条件: 小さなカードを敷き詰める */
.page dl.terms-list.pop-terms {
  max-width: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
.page dl.terms-list.pop-terms > div {
  display: block;
  padding: 18px 20px 20px;
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--ink);
}
.page dl.terms-list.pop-terms > div:last-child { border-bottom: var(--line) solid var(--ink); }
.page dl.terms-list.pop-terms dt {
  display: inline-block;
  margin-bottom: 8px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  font-size: 15px;
}
.page dl.terms-list.pop-terms > div:nth-child(3n+2) dt { background: var(--sky); }
.page dl.terms-list.pop-terms > div:nth-child(3n) dt { background: var(--pink); }
.page dl.terms-list.pop-terms dd { font-size: 15px; }

/* 価格の考え方: レシートの形 */
.page .pop-receipt {
  position: relative;
  max-width: 760px;
  display: grid;
  gap: 18px;
  padding: clamp(26px, 3.4vw, 44px) clamp(22px, 3.4vw, 48px);
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: 6px;
  box-shadow: var(--shadow);
  rotate: -.6deg;
}
.page .pop-receipt > * { margin: 0; }
.page .pop-receipt::before {
  /* レシートを留めるテープ */
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 110px;
  height: 26px;
  margin-left: -55px;
  background: var(--leaf);
  border: 2px solid var(--ink);
  rotate: 3deg;
}
.page dl.terms-list.pop-receipt__list { max-width: none; background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0; counter-reset: receipt; }
.page dl.terms-list.pop-receipt__list > div { border-top: 2px dashed var(--ink); padding: 14px 0; counter-increment: receipt; }
.page dl.terms-list.pop-receipt__list > div:last-child { border-bottom: 2px dashed var(--ink); }
.page dl.terms-list.pop-receipt__list dt::before { content: counter(receipt) ". "; }

/* ---------- 条件の一覧（ほかのページ） ---------- */
.page dl.terms-list {
  padding: 4px clamp(18px, 3vw, 32px);
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.page dl.terms-list > div { border-top: 2px dashed var(--ink); }
.page dl.terms-list > div:first-child { border-top: 0; }
.page dl.terms-list > div:last-child { border-bottom: 0; }
.page dl.terms-list dt { font-family: var(--font-round); font-weight: 800; }

/* ---------- 進め方 ---------- */
.page .steps { gap: 18px; }
.page .steps > .step {
  grid-template-columns: 3.4rem minmax(0, 1fr);
  padding: 24px clamp(18px, 3vw, 32px) 26px;
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: 22px;
  box-shadow: var(--shadow);
  transition: transform .45s var(--bounce), box-shadow .3s ease;
}
.page .steps > .step:last-child { border-bottom: var(--line) solid var(--ink); }
.page .steps > .step::before {
  display: grid;
  place-items: center;
  align-self: start;
  justify-self: start;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: var(--yellow);
  border: var(--line) solid var(--ink);
  font-family: var(--font-round);
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
}
.page .steps > .step:nth-child(4n+2)::before { background: var(--sky); }
.page .steps > .step:nth-child(4n+3)::before { background: var(--pink); }
.page .steps > .step:nth-child(4n)::before { background: var(--leaf); }
.page .step__title { font-size: 22px; }
.page .step__weeks {
  justify-self: start;
  padding: 0 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
  font-size: 13.5px;
}
.page .step__ask { padding: 12px 16px; border: 2px dashed var(--ink); border-radius: 14px; background: var(--cream); font-size: 15px; }
.page .step__ask strong { font-family: var(--font-round); font-weight: 800; font-size: 14px; }
@media (hover: hover) {
  .page .steps > .step:hover { transform: rotate(-.8deg) translateY(-3px); box-shadow: 9px 9px 0 var(--ink); }
  .page .steps > .step:nth-child(even):hover { transform: rotate(.8deg) translateY(-3px); }
}

/* ---------- 3 つの確認 ---------- */
.page .checks > .check {
  padding: 24px 26px 26px;
  background: var(--yellow);
  border: var(--line) solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: transform .45s var(--bounce), box-shadow .3s ease;
}
.page .checks > .check:nth-child(2) { background: var(--sky); }
.page .checks > .check:nth-child(3) { background: var(--leaf); }
.page .check__role { font-size: 30px; }
.page .check__who { font-weight: 700; }
.page .check__looks { font-size: 15.5px; }
@media (hover: hover) {
  .page .checks > .check:hover { transform: rotate(-1.4deg) translateY(-4px); box-shadow: 9px 10px 0 var(--ink); }
  .page .checks > .check:nth-child(2):hover { transform: rotate(1.4deg) translateY(-4px); }
}

/* ---------- 納品物 ---------- */
.page ul.deliverables { gap: 12px; }
.page ul.deliverables > li {
  padding: 12px 18px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 16px;
  font-weight: 500;
}

/* ---------- よくある質問 ---------- */
.page .faq { gap: 14px; }
.page details.faq__item {
  padding: 0 clamp(18px, 2.6vw, 28px);
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: 20px;
  box-shadow: 4px 4px 0 var(--ink);
}
.page details.faq__item:last-child { border-bottom: var(--line) solid var(--ink); }
.page details.faq__item[open] { box-shadow: 6px 6px 0 var(--ink); }
.page .faq__item > summary { padding: 18px 3.4em 18px 0; font-family: var(--font-round); font-weight: 800; font-size: 17px; line-height: 1.6; }
.page .faq__item > summary::after {
  top: 50%;
  right: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--ink);
  font-size: 20px;
  line-height: 1;
  transition: transform .4s var(--bounce), background-color .2s ease;
}
.page .faq__item[open] > summary::after { background: var(--pink); transform: rotate(180deg); }
.page .faq__answer { font-size: 15.5px; }

/* ---------- 相談フォーム ---------- */
.page .contact-form label { font-weight: 700; font-size: 15px; }
.page .contact-form input,
.page .contact-form select,
.page .contact-form textarea { min-height: 48px; border: 2px solid var(--ink); border-radius: 14px; background: var(--white); color: var(--ink); }
.page .contact-form :is(input, select, textarea):disabled { background: var(--white); color: var(--ink); border-style: dashed; opacity: 1; cursor: not-allowed; }
.page .contact-form ::placeholder { color: var(--ink-2); opacity: 1; }
.page .contact-form legend { font-family: var(--font-round); font-weight: 800; }

/* ---------- 締めの相談の帯 ---------- */
.page .cta-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(30px, 4.4vw, 60px);
  background: var(--pink);
  border: var(--line) solid var(--ink);
  border-radius: 32px;
  box-shadow: 8px 8px 0 var(--ink);
}
.page .cta-band::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -70px;
  bottom: -80px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: var(--yellow);
  border: var(--line) solid var(--ink);
}
.page .cta-band h2 { font-size: clamp(24px, 3vw, 38px); }
.page .cta-band p { font-weight: 500; }

/* ---------- 下層の登場の動き（pages.js が .motion と .pop-in を付けたときだけ） ---------- */
.motion .pop-in:not(.is-in) { opacity: 0; transform: translateY(22px) scale(.97); }
.motion .pop-in.is-in { animation: pop-in .6s var(--bounce) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes pop-in {
  from { opacity: 0; transform: translateY(22px) scale(.97) rotate(var(--tilt, 0deg)); }
  to { opacity: 1; transform: none; }
}

/* ---------- 狭い画面 ---------- */
@media (max-width: 600px) {
  :root { --pg-pad-top: 32px; --pg-pad-side: 6vw; }
  .page > .page-head { padding-left: 6vw; padding-right: 6vw; }
  .page .page-lead { font-size: 16px; }
  .page .steps > .step { grid-template-columns: 2.6rem minmax(0, 1fr); }
  .page .steps > .step::before { width: 2.6rem; height: 2.6rem; font-size: 18px; }
  .page .pop-tag .price-card__badge { position: static; justify-self: start; rotate: -3deg; font-size: 14px; }
  .page .pop-tag--wide .price-card__name { padding-right: 0; font-size: 22px; }
  .page .cta-band::after { width: 130px; height: 130px; right: -50px; bottom: -56px; }
  .page .pop-receipt { rotate: 0deg; }
}
