/* =========================================================
   price.css
   料金表ページ（/service/price/ と /service/price/parts/）
   ・すべて .price-page の内側だけに効くよう限定
   ・クラス名は price- で始めて、共通の style.css と重ならないようにする
   ========================================================= */

.price-page {
  --pr-ink: #222222;
  --pr-ink-soft: #666666;
  --pr-line: #E2E2E2;
  --pr-ice: #F7F4EE;
  --pr-navy: #1E1B18;
  --pr-gold: #BFA67A;
  --pr-white: #FFFFFF;
  --pr-font-head: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --pr-font-body: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;

  color: var(--pr-ink);
  font-family: var(--pr-font-body);
  line-height: 1.85;
  padding-bottom: 0;
}

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

.price-page h1,
.price-page h2,
.price-page h3 {
  font-family: var(--pr-font-head);
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.02em;
}

.price-page p {
  margin: 0;
}

.price-wrap {
  max-width: var(--container, 1000px);
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------- 見出し ---------- */
.price-head {
  padding: 40px 0 36px;
  border-bottom: 1px solid var(--pr-line);
}

.price-title {
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.5;
}

.price-page .price-lead {
  margin-top: 18px;
  font-size: 15px;
  color: var(--pr-ink-soft);
  text-wrap: pretty;
}

/* ---------- セクション ---------- */
.price-section {
  margin-top: 72px;
}

.price-page .price-h2 {
  font-size: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--pr-ink);
}

.price-page .price-section-lead {
  margin-top: 18px;
  font-size: 15px;
  color: var(--pr-ink-soft);
  text-wrap: pretty;
}

.price-page .price-h3 {
  margin-top: 64px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--pr-ink);
  font-size: 17px;
  color: var(--pr-ink);
}

.price-page .price-h3 + .price-table-wrap {
  margin-top: 8px;
}

/* ---------- 表 ---------- */
.price-table-wrap {
  margin-top: 20px;
  overflow-x: auto;
  /* 横スクロールする表を、キーボードでも操作できるようにする */
  scrollbar-width: thin;
}

.price-table-wrap:focus-visible {
  outline: 2px solid var(--pr-gold);
  outline-offset: 2px;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.price-table th,
.price-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--pr-line);
  text-align: left;
  vertical-align: top;
}

.price-table thead th {
  background: var(--pr-ice);
  font-weight: 700;
  font-size: 14px;
  color: var(--pr-ink);
  white-space: nowrap;
}

.price-table tbody th {
  font-weight: 400;
  color: var(--pr-ink);
  width: 34%;
}

.price-table td.price-val {
  white-space: nowrap;
  text-align: right;
  font-feature-settings: "tnum";
}

/* 見出し行がある表では、見出しを枠（ボタン）の中心に合わせる */
.price-table thead th:last-child {
  text-align: center;
}

.price-table:has(thead) td.price-val {
  text-align: center;
}

.price-table tbody tr:last-child th,
.price-table tbody tr:last-child td {
  border-bottom: none;
}

.price-table .price-note-cell {
  font-size: 13px;
  color: var(--pr-ink-soft);
}

/* プラン比較表（横並び） */
.price-plan-table td,
.price-plan-table thead th {
  text-align: center;
}

.price-plan-table td:first-child,
.price-plan-table th:first-child,
.price-plan-table tbody th {
  text-align: left;
}

.price-plan-table .price-ok {
  color: var(--pr-gold);
  font-weight: 700;
}

.price-plan-table .price-no {
  color: #BBB;
}

/* 金額が未定の表示 */
.price-tbd {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--pr-line);
  border-radius: 3px;
  font-size: 13px;
  color: var(--pr-ink-soft);
  white-space: nowrap;
}

/* ---------- 開閉式（パーツ別） ---------- */
.price-acc {
  margin-top: 16px;
}

.price-acc details {
  border-bottom: 1px solid var(--pr-line);
}

.price-acc summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 28px 4px 24px;
  font-family: var(--pr-font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--pr-ink);
}

.price-acc summary::-webkit-details-marker {
  display: none;
}

.price-acc-count {
  font-family: var(--pr-font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--pr-ink-soft);
  margin-left: auto;
  margin-right: 8px;
}

.price-plus {
  flex-shrink: 0;
  font-family: var(--pr-font-head);
  font-size: 18px;
  color: var(--pr-navy);
  transition: transform 0.3s ease;
}

.price-acc details[open] .price-plus {
  transform: rotate(45deg);
}

/* 開いた中身が文章のときは、下に余白をとって区切り線から離す */
.price-acc-body {
  padding: 0 0 24px;
}

/* 中身が表のときは、表の最後の行で余白をとる */
.price-acc-body:has(.price-table-wrap) {
  padding: 0;
}

.price-acc-body .price-table-wrap {
  margin-top: 0;
}

.price-acc-body .price-table tbody tr:last-child th,
.price-acc-body .price-table tbody tr:last-child td {
  padding-bottom: 22px;
}

/* ---------- 流れ ---------- */
.price-flow {
  margin-top: 28px;
  counter-reset: pr-flow;
  list-style: none;
  padding: 0;
}

.price-flow li {
  position: relative;
  padding: 10px 0 10px 48px;
  font-size: 15px;
  line-height: 1.85;
}

.price-flow li::before {
  counter-increment: pr-flow;
  content: counter(pr-flow, decimal-leading-zero);
  position: absolute;
  left: 2px;
  /* 本文の1行目と同じ位置に置く（上の余白と行の高さをそろえる） */
  top: 10px;
  font-family: var(--pr-font-head);
  font-size: 15px;
  line-height: 1.85;
  color: var(--pr-gold);
}

.price-flow strong {
  font-weight: 700;
}

/* ---------- 注記 ---------- */
.price-notes {
  margin-top: 28px;
  padding: 24px 26px;
  background: var(--pr-ice);
  border-radius: 4px;
}

.price-page .price-notes ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.price-notes li {
  position: relative;
  padding: 6px 0 6px 18px;
  font-size: 13px;
  color: var(--pr-ink-soft);
  text-wrap: pretty;
}

.price-notes li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.35em;
  width: 8px;
  border-top: 1px solid var(--pr-gold);
}

/* ---------- ページ間の案内 ---------- */
.price-switch {
  margin-top: 48px;
  padding: 28px 30px;
  border: 1px solid var(--pr-line);
  border-radius: 4px;
}

.price-switch h2 {
  font-size: 18px;
}

.price-page .price-switch p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--pr-ink-soft);
  text-wrap: pretty;
}

.price-switch-link {
  margin-top: 16px;
}

.price-switch-link a {
  font-size: 14px;
  color: var(--pr-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.price-switch-link a::after {
  content: " →";
  text-decoration: none;
}

/* ---------- CTA ---------- */
.price-cta {
  margin-top: 90px;
  padding: 72px 0;
  background: var(--pr-navy);
  color: #fff;
}

.price-cta h2 {
  font-size: clamp(22px, 3vw, 30px);
  color: #fff;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  word-break: auto-phrase;
}

.price-page .price-cta p {
  margin-top: 20px;
  font-size: 15px;
  color: #C9C2B4;
  text-wrap: pretty;
}

.price-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.price-btn {
  display: inline-block;
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.price-btn:hover {
  opacity: 0.8;
}

.price-page .price-btn--primary {
  background: #fff;
  color: var(--pr-navy);
  border-color: #fff;
}

/* ---------- スマートフォン ---------- */
@media (max-width: 768px) {
  .price-wrap {
    padding: 0 24px;
  }

  .price-table {
    font-size: 14px;
  }

  .price-table th,
  .price-table td {
    padding: 12px 10px;
  }

  .price-table tbody th {
    width: auto;
  }

  /* 項目と金額の2列表は、縦積みにせず横スクロールで見せる */
  .price-plan-table {
    min-width: 560px;
  }
}

@media (max-width: 600px) {
  .price-section {
    margin-top: 56px;
  }

  .price-cta {
    margin-top: 64px;
    padding: 56px 0;
  }

  .price-actions .price-btn {
    flex: 1 1 100%;
    text-align: center;
  }

  .price-notes {
    padding: 20px 18px;
  }

  .price-switch {
    padding: 22px 20px;
  }
}

/* ---------- 操作しやすさのための調整 ---------- */
/* キーボードで開閉するとき、どこを選んでいるかが分かるようにする */
.price-acc summary:focus-visible {
  outline: 2px solid var(--pr-gold);
  outline-offset: -2px;
}

.price-page a:focus-visible,
.price-btn:focus-visible {
  outline: 2px solid var(--pr-gold);
  outline-offset: 2px;
}

/* 指で押しやすい大きさを確保する */
.price-acc summary {
  min-height: 56px;
}

/* 動きを減らす設定にしている方には、アニメーションを出さない */
@media (prefers-reduced-motion: reduce) {
  .price-plus,
  .price-btn {
    transition: none;
  }
}
