/* =========================================================
   ONETTO — ページ固有（トップページ各セクション）スタイル
   ※ 変数・リセット・共通は ルート style.css 側で定義
   ========================================================= */

/* ---------------------------------------------------------
   1. FV（ヒーロー）— .p-fv
   --------------------------------------------------------- */
.p-fv {
  position: relative;
  overflow: hidden;
  background: var(--c-bg);
  display: flex;
  align-items: center;
  /* どの端末でもヘッダーを除いたビューポート全高をFVが占める。
     dvh 非対応ブラウザ向けに vh を先に記述（後勝ちで dvh が優先）。 */
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
}

.p-fv__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* <picture> も背景いっぱいに広げる */
.p-fv__bg picture {
  display: block;
  width: 100%;
  height: 100%;
}

.p-fv__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
}

/* 文字可読性のための左→右グラデーション */
.p-fv::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(255, 255, 255, 0.68) 38%,
    rgba(255, 255, 255, 0.15) 62%,
    rgba(255, 255, 255, 0) 80%
  );
}

.p-fv__inner {
  position: relative;
  z-index: 2;
  /* ※ width:100% は付けない。
     .l-inner（最大幅1120px・左右ガター・中央寄せ）を活かすため。
     付けると本文が画面左端にベタ付きになる。 */
  padding-block: clamp(3rem, 1.5rem + 8vw, 7rem);
}

.p-fv__body {
  max-width: 620px;
}

.p-fv__title {
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.05em; /* トラッキングを若干広げる */
  color: var(--c-navy);
  margin-bottom: 1.25rem;
}

.p-fv__title .is-accent {
  color: var(--c-accent);
}

.p-fv__lead {
  font-size: var(--fs-lead);
  line-height: 1.9;
  color: var(--c-text);
  margin-bottom: 2rem;
}

.p-fv__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: stretch;
}

/* ---------------------------------------------------------
   2. オネットの強み — .p-strength
   --------------------------------------------------------- */
.p-strength {
  background: var(--c-bg);
  padding-block: var(--space-section);
}

.p-strength__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.p-strength__item {
  display: flex;
  flex-direction: column;
  align-items: center;   /* アイコン・見出し・本文を横方向中央に揃える */
  height: 100%;          /* カードの高さを揃える */
  background: var(--c-white);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 1rem + 2vw, 2rem) 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}

/* アイコンを 56px の正方枠の中で天地左右中央に固定。
   SVGごとに viewBox/縦横比が違っても、枠の中心に同じ高さで描画されるため
   見出しの開始位置が必ず横一線に揃う。
   ※ <img width/height> 属性や旧ルールに確実に勝つよう !important を付与。 */
.p-strength__icon {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1.1rem;
  color: var(--c-primary);
}

.p-strength__icon img,
.p-strength__icon svg {
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  max-height: 48px; /* どの比率でも天地48pxに正規化 */
  object-fit: contain;
}

.p-strength__title {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--c-navy);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.p-strength__text {
  font-size: var(--fs-small);
  color: var(--c-text-muted);
  line-height: 1.8;
}

/* ---------------------------------------------------------
   3. 取扱サービス — .p-service
   --------------------------------------------------------- */
.p-service {
  background: var(--c-white);
  padding-block: var(--space-section);
}

.p-service__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.p-service__item {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.p-service__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.p-service__thumb {
  aspect-ratio: 16 / 10;
}

.p-service__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-service__body {
  padding: 1.1rem 1.25rem 1.4rem;
}

.p-service__title {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--c-accent);
  margin-bottom: 0.5rem;
}

.p-service__text {
  font-size: var(--fs-small);
  color: var(--c-text-muted);
  line-height: 1.8;
}

.p-service__more {
  margin-top: clamp(2rem, 1rem + 3vw, 3rem);
  text-align: center;
}

/* ---------------------------------------------------------
   4. 選ばれる理由 — .p-reason
   --------------------------------------------------------- */
.p-reason {
  background: var(--c-white);
  padding-block: var(--space-section);
}

.p-reason__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.p-reason__item {
  position: relative;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 1rem + 2vw, 2rem) 1.25rem;
  box-shadow: var(--shadow);
}

.p-reason__num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-white);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.p-reason__title {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--c-accent);
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.p-reason__text {
  font-size: var(--fs-small);
  color: var(--c-text-muted);
  line-height: 1.8;
}

.p-reason__illust {
  width: 100%;
  max-width: 160px;
  margin: 1rem auto 0; /* 左右 auto でカード内中央に配置 */
  opacity: 0.9;
}

/* ---------------------------------------------------------
   5. お問い合わせCTA — .p-cta
   --------------------------------------------------------- */
.p-cta {
  padding-block: var(--space-section);
  background: var(--c-white);
}

/* 画像なし・中央寄せ1カラム構成 */
.p-cta__box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--c-bg-alt), var(--c-bg));
  border: 1px solid var(--c-border);
  text-align: center;
}

.p-cta__body {
  max-width: 960px; /* タイトルが13インチでも1行に収まる幅 */
  margin-inline: auto;
  padding: clamp(2.5rem, 2rem + 4vw, 4rem) clamp(1.5rem, 1rem + 3vw, 3rem);
}

.p-cta__title {
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--c-navy);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.p-cta__text {
  font-size: var(--fs-body);
  line-height: 1.9;
  color: var(--c-text);
  margin-bottom: 1.75rem;
}

.p-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: stretch;     /* ボタンの高さを右の電話枠に合わせる */
  justify-content: center;  /* ボタン・電話を中央寄せ */
}

/* お問い合わせフォームボタンを電話枠と同じ高さに（縦中央で文字配置） */
.p-cta__actions .c-btn {
  padding-block: 0;
}

/* ---------------------------------------------------------
   6. レスポンシブ（セクション分）
   --------------------------------------------------------- */
@media (min-width: 768px) {
  .p-strength__list {
    grid-template-columns: repeat(2, 1fr);
  }
  .p-service__list,
  .p-reason__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .p-strength__list {
    grid-template-columns: repeat(5, 1fr);
  }
  .p-service__list {
    grid-template-columns: repeat(5, 1fr);
  }
  .p-reason__list {
    grid-template-columns: repeat(4, 1fr);
  }
  .p-fv__title {
    line-height: 1.6;
  }
  /* 13インチ以上ではCTAタイトルを1行に固定 */
  .p-cta__title {
    white-space: nowrap;
  }
}

/* ---------------------------------------------------------
   7. スクロール演出（控えめ・低コスト）
   - JS が .is-anim-ready を <html> に付けたときだけ初期非表示にする
     → JS無効/失敗時はコンテンツが必ず表示される安全設計
   - 動きを減らす設定の端末では一切アニメーションしない
   --------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  /* 単体フェードアップ */
  .is-anim-ready [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .is-anim-ready [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
  }

  /* 子要素を少しずつ遅らせて表示（カード列向け） */
  .is-anim-ready [data-reveal-stagger] > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .is-anim-ready [data-reveal-stagger].is-revealed > * {
    opacity: 1;
    transform: none;
  }
  .is-anim-ready [data-reveal-stagger].is-revealed > *:nth-child(2) { transition-delay: 0.07s; }
  .is-anim-ready [data-reveal-stagger].is-revealed > *:nth-child(3) { transition-delay: 0.14s; }
  .is-anim-ready [data-reveal-stagger].is-revealed > *:nth-child(4) { transition-delay: 0.21s; }
  .is-anim-ready [data-reveal-stagger].is-revealed > *:nth-child(5) { transition-delay: 0.28s; }
}

/* =========================================================
   8. スマートフォン最適化（〜767px）
   ※ PC/タブレットのデザインには影響しない SP 専用調整
   ========================================================= */
@media (max-width: 767px) {

  /* --- FV（ヒーロー） --- */
  .p-fv {
    /* SPは svh で高さを固定し、アドレスバー伸縮による高さジャンプを防ぐ */
    min-height: calc(100svh - var(--header-h));
    align-items: flex-end; /* 文字を下寄せにして上部に家族の写真を見せる */
  }

  .p-fv__bg img {
    object-position: center center; /* SP専用画像(hero-sp.webp)は中央表示 */
  }

  /* SPは横グラデだと右側の文字が読みにくいので、上を明るくする縦グラデに */
  .p-fv::before {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.35) 32%,
      rgba(255, 255, 255, 0.82) 58%,
      rgba(255, 255, 255, 0.95) 100%
    );
  }

  .p-fv__inner {
    padding-block: clamp(2rem, 1rem + 6vw, 3.5rem);
  }

  .p-fv__body {
    max-width: 100%;
  }

  .p-fv__title {
    line-height: 1.5;
  }

  /* CTAボタンは縦積み・全幅でタップしやすく */
  .p-fv__actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  .p-fv__actions .c-btn,
  .p-fv__actions .c-tel {
    width: 100%;
    justify-content: center;
  }

  /* --- 取扱サービス：画像の天地を少し抑えて縦の冗長さを軽減 --- */
  .p-service__thumb {
    aspect-ratio: 16 / 9;
  }

  /* --- お問い合わせCTA：ボタン縦積み・全幅 --- */
  .p-cta__actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  .p-cta__actions .c-btn,
  .p-cta__actions .c-tel {
    width: 100%;
    justify-content: center;
  }
  /* 縦積み時はボタンにも上下パディングを戻して高さを確保 */
  .p-cta__actions .c-btn {
    padding-block: 0.95em;
  }

  /* --- フッター：社名・お問い合わせを見やすく --- */
  .l-footer__form-btn {
    max-width: 100%; /* SPは全幅でタップしやすく */
  }
}

/* =========================================================
   9. 下層ページ共通
   ========================================================= */

/* 狭めコンテナ（FAQ・会社概要・規約・お問い合わせ用） */
.l-inner--narrow {
  width: min(100% - (var(--gutter) * 2), 860px);
}

/* --- ページヘッダー（パンくず＋タイトル＋リード） --- */
.p-pagehead {
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  padding-block: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  text-align: center;
}

.p-pagehead__crumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4em 0.6em;
  font-size: var(--fs-small);
  color: var(--c-text-muted);
  margin-bottom: 1rem;
}

.p-pagehead__crumb a:hover {
  color: var(--c-accent);
}

.p-pagehead__crumb .is-current {
  color: var(--c-text);
}

.p-pagehead__title {
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--c-navy);
}

.p-pagehead__lead {
  max-width: 760px;
  margin: 1rem auto 0;
  font-size: var(--fs-lead);
  line-height: 1.9;
  color: var(--c-text-muted);
}

/* --- ページヒーロー（強みページ等：左コピー＋右画像） --- */
.p-pagehero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(240px, 16rem + 8vw, 380px);
  background: var(--c-bg);
}

.p-pagehero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.p-pagehero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

/* 左→右の白グラデ（左のコピーを読みやすく） */
.p-pagehero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.82) 42%,
    rgba(255, 255, 255, 0.25) 66%,
    rgba(255, 255, 255, 0) 82%
  );
}

.p-pagehero__inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(2rem, 1.5rem + 4vw, 3.5rem);
}

.p-pagehero__crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 0.6em;
  font-size: var(--fs-small);
  color: var(--c-text-muted);
  margin-bottom: 1rem;
}

.p-pagehero__crumb a:hover {
  color: var(--c-accent);
}

.p-pagehero__crumb .is-current {
  color: var(--c-text);
}

.p-pagehero__title {
  font-size: clamp(1.7rem, 1.3rem + 2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.05em;
  color: var(--c-navy);
}

.p-pagehero__lead {
  margin-top: 1.1rem;
  max-width: 36em;
  font-size: var(--fs-lead);
  line-height: 1.9;
  color: var(--c-text);
}

/* --- サービス内容ページ：3列（2行3段）＋ホバー無し --- */
.p-service__list--page {
  grid-template-columns: 1fr;
}

.p-service__list--page .p-service__item {
  cursor: default;
}

/* 遷移先が無いカードなのでホバーの動きを止める */
.p-service__list--page .p-service__item:hover {
  transform: none;
  box-shadow: none;
}

@media (min-width: 768px) {
  .p-service__list--page {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .p-service__list--page {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ページヒーローのスマホ調整：白グラデを広めにして可読性確保 */
@media (max-width: 767px) {
  .p-pagehero {
    min-height: 220px;
  }
  .p-pagehero::before {
    background: linear-gradient(
      100deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.85) 50%,
      rgba(255, 255, 255, 0.45) 80%,
      rgba(255, 255, 255, 0.2) 100%
    );
  }
}

/* 各下層セクションの余白 */
.p-flow,
.p-faq,
.p-company,
.p-contact,
.p-doc-section {
  padding-block: var(--space-section);
}

.p-flow {
  background: var(--c-bg);
}

/* --- ご相談の流れ（ステップ） --- */
.p-flow__list {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.p-flow__item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 1rem 1.25rem;
  background: var(--c-white);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 0.9rem + 1vw, 1.5rem) clamp(1.1rem, 0.9rem + 1.5vw, 1.75rem);
  box-shadow: var(--shadow);
}

.p-flow__num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-accent);
  min-width: 1.6em;
  text-align: center;
  line-height: 1;
}

.p-flow__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--c-bg);
  color: var(--c-primary);
  display: grid;
  place-items: center;
}

.p-flow__icon svg {
  width: 26px;
  height: 26px;
}

.p-flow__title {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--c-navy);
  margin-bottom: 0.25rem;
}

.p-flow__text {
  font-size: var(--fs-small);
  color: var(--c-text-muted);
  line-height: 1.8;
}

/* --- よくある質問（アコーディオン：native details） --- */
.p-faq__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.p-faq__item {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.p-faq__q {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--c-navy);
  line-height: 1.5;
}

.p-faq__q::-webkit-details-marker {
  display: none;
}

.p-faq__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-white);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.p-faq__mark--a {
  background: var(--c-bg);
  color: var(--c-accent);
  border: 1px solid var(--c-border);
}

.p-faq__qtext {
  flex: 1;
}

/* ＋／－トグル */
.p-faq__toggle {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.p-faq__toggle::before,
.p-faq__toggle::after {
  content: "";
  position: absolute;
  background: var(--c-accent);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.p-faq__toggle::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
}

.p-faq__toggle::after {
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
}

.p-faq__item[open] .p-faq__toggle::after {
  opacity: 0;
  transform: translateX(-50%) rotate(90deg);
}

.p-faq__a {
  display: flex;
  gap: 0.75rem;
  padding: 0 1.25rem 1.25rem;
}

.p-faq__atext {
  flex: 1;
  color: var(--c-text);
  line-height: 1.9;
  font-size: var(--fs-body);
}

/* --- 会社概要 --- */
.p-company__philosophy {
  text-align: center;
  margin-bottom: clamp(2rem, 1rem + 3vw, 3rem);
}

.p-company__philosophy-label {
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--c-accent);
  margin-bottom: 0.75rem;
}

.p-company__philosophy-text {
  font-size: clamp(1.1rem, 0.95rem + 0.8vw, 1.4rem);
  font-weight: 700;
  line-height: 1.8;
  color: var(--c-navy);
}

.p-company__table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 3.5rem);
}

.p-company__table th,
.p-company__table td {
  text-align: left;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--c-border);
  font-size: var(--fs-body);
  line-height: 1.8;
  vertical-align: top;
}

.p-company__table th {
  width: 30%;
  white-space: nowrap;
  font-weight: 700;
  color: var(--c-navy);
  background: var(--c-bg);
}

.p-company__access-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--c-navy);
  text-align: center;
  margin-bottom: 1.25rem;
}

.p-company__map {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.p-company__map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* --- 勧誘方針・プライバシーポリシー（構造化ドキュメント） --- */
.p-doc__intro {
  margin-bottom: 2rem;
  line-height: 1.9;
  color: var(--c-text);
}

.p-doc__list {
  list-style: none;
  counter-reset: doc;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.p-doc__item {
  position: relative;
  padding-left: 2.75rem;
}

.p-doc__item::before {
  counter-increment: doc;
  content: counter(doc);
  position: absolute;
  left: 0;
  top: 0.1em;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-white);
  font-size: 0.85rem;
  font-weight: 700;
}

.p-doc__item-title {
  font-size: var(--fs-h3);
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-navy);
  margin-bottom: 0.5rem;
}

.p-doc__item-text {
  font-size: var(--fs-body);
  line-height: 1.9;
  color: var(--c-text);
}

.p-doc__contact {
  margin-top: 2.5rem;
  padding: clamp(1.25rem, 1rem + 1.5vw, 1.75rem);
  background: var(--c-bg);
  border-radius: var(--radius);
}

.p-doc__contact .p-doc__item-title {
  margin-bottom: 0.75rem;
}

.p-doc__date {
  margin-top: 2rem;
  text-align: right;
  font-size: var(--fs-small);
  color: var(--c-text-muted);
}

/* --- 汎用WYSIWYG本文（page.php） --- */
.p-prose {
  line-height: 1.9;
}

.p-prose h2 {
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--c-navy);
  margin: 2rem 0 0.75rem;
}

.p-prose p {
  margin-bottom: 1rem;
}

.p-prose a {
  color: var(--c-accent);
  text-decoration: underline;
}

.p-prose ul,
.p-prose ol {
  margin: 0 0 1rem 1.5rem;
}

.p-prose ul {
  list-style: disc;
}

.p-prose ol {
  list-style: decimal;
}

.p-prose img {
  border-radius: var(--radius-sm);
}

/* --- お問い合わせ --- */
/* セクション全体に薄青背景を敷き、白カードを際立たせる */
.p-contact {
  background: var(--c-bg);
}

/* フォーム → 電話 の縦並び（コンテンツ幅を狭めに） */
.p-contact__stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 680px;
  margin-inline: auto;
}

.p-contact__tel-card,
.p-contact__form-card {
  border-radius: var(--radius);
  padding: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
}

/* フォーム＝主役（白カード＋影） */
.p-contact__form-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow);
}

/* 電話＝補助パネル（薄く・影なし） */
.p-contact__tel-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
}

/* 見出し（中央＋アクセント下線）で締まりを出す */
.p-contact__card-title {
  position: relative;
  padding-bottom: 0.85rem;
  margin-bottom: 1.5rem;
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--c-navy);
  text-align: center;
}

.p-contact__card-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin: 0.7rem auto 0;
  background: var(--c-accent);
  border-radius: 2px;
}

/* 電話カードの上段（電話番号）は中央寄せ */
.p-contact__tel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  color: var(--c-navy);
}

.p-contact__tel svg {
  width: 1.6em;
  height: 1.6em;
  flex-shrink: 0;
  color: var(--c-accent); /* 受話器アイコンを差し色に */
}

.p-contact__tel-num {
  font-size: clamp(1.6rem, 1.3rem + 1.5vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.p-contact__tel-note {
  margin-top: 0.5rem;
  font-size: var(--fs-small);
  color: var(--c-text-muted);
  text-align: center;
}

/* 会社情報リスト（電話カード下段・中央寄せの整列ブロック） */
.p-contact__info {
  max-width: 420px;
  margin: 1.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--c-border);
  display: grid;
  gap: 0.75rem;
  text-align: left;
}

.p-contact__info > div {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 0.75rem;
  font-size: var(--fs-small);
  line-height: 1.7;
}

.p-contact__info dt {
  font-weight: 700;
  color: var(--c-navy);
}

.p-contact__info dd {
  margin: 0;
  color: var(--c-text-muted);
  word-break: break-all;
}

.p-contact__info a:hover {
  color: var(--c-accent);
}

/* Contact Form 7 の最低限の見た目調整 */
.p-contact__form p {
  margin-bottom: 1.15rem;
}

/* 送信ボタンの行は中央寄せ・上に余白 */
.p-contact__form p:has(.wpcf7-submit),
.p-contact__form p:has(input[type="submit"]) {
  margin-top: 1.75rem;
  text-align: center;
}

.p-contact__form label {
  display: block;
  font-weight: 700;
  font-size: var(--fs-small);
  color: var(--c-navy);
  margin-bottom: 0.1rem;
}

.p-contact__form input[type="text"],
.p-contact__form input[type="email"],
.p-contact__form input[type="tel"],
.p-contact__form input[type="url"],
.p-contact__form input[type="number"],
.p-contact__form textarea,
.p-contact__form select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7em 0.9em;
  font: inherit;
  color: var(--c-text);
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
}

.p-contact__form textarea {
  min-height: 9em;
  resize: vertical;
}

.p-contact__form input:focus,
.p-contact__form textarea:focus,
.p-contact__form select:focus {
  outline: 2px solid var(--c-accent);
  outline-offset: 1px;
  border-color: var(--c-accent);
}

.p-contact__form input[type="submit"],
.p-contact__form .wpcf7-submit {
  display: inline-flex;
  width: auto;
  min-width: 240px;
  justify-content: center;
  padding: 1em 2.4em;
  font-weight: 700;
  color: var(--c-white);
  background: var(--c-accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(13, 53, 128, 0.18);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.p-contact__form input[type="submit"]:hover,
.p-contact__form .wpcf7-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* --- フッター下部：規約リンク --- */
.l-footer__bar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.l-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
}

.l-footer__legal a {
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.7);
}

.l-footer__legal a:hover {
  color: var(--c-white);
}

/* --- 下層ページ レスポンシブ --- */
@media (min-width: 768px) {
  .l-footer__bar-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* 会社概要テーブルはスマホで縦積み */
@media (max-width: 600px) {
  .p-company__table th,
  .p-company__table td {
    display: block;
    width: 100%;
    border-bottom: none;
  }
  .p-company__table th {
    padding-bottom: 0.5rem;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  }
  .p-company__table td {
    padding-top: 0.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--c-border);
  }
  /* ステップは番号を省スペース化して横並び維持 */
  .p-flow__item {
    gap: 0.75rem;
    padding-inline: 1rem;
  }
  .p-flow__num {
    font-size: 1.15rem;
    min-width: 1.2em;
  }
  .p-flow__icon {
    width: 44px;
    height: 44px;
  }
  .p-flow__icon svg {
    width: 22px;
    height: 22px;
  }
}

/* =========================================================
   10. 下層ページ スマホ最適化（〜767px）
   ※ PC/タブレットのデザインには影響しない SP 専用調整
   ========================================================= */
@media (max-width: 767px) {

  /* --- ページヘッダー／ヒーロー --- */
  .p-pagehead {
    padding-block: clamp(1.75rem, 1.25rem + 3vw, 2.5rem);
  }
  .p-pagehead__lead,
  .p-pagehero__lead {
    font-size: 0.92rem;
  }
  .p-pagehero__title {
    font-size: clamp(1.45rem, 1.1rem + 3vw, 2rem);
    line-height: 1.45;
  }

  /* --- ご相談の流れ：見出しを少し詰める --- */
  .p-flow__title {
    font-size: 1rem;
  }

  /* --- よくある質問：左右の余白を詰めて文字幅を確保 --- */
  .p-faq__q {
    padding: 0.95rem 1rem;
    gap: 0.6rem;
  }
  .p-faq__a {
    padding: 0 1rem 1.1rem;
    gap: 0.6rem;
  }
  .p-faq__mark {
    width: 24px;
    height: 24px;
    font-size: 0.78rem;
  }

  /* --- 会社概要：経営理念をコンパクトに --- */
  .p-company__philosophy-text {
    font-size: 1.1rem;
  }
  .p-company__access-title {
    font-size: 1.1rem;
  }

  /* --- 勧誘方針・プライバシー：番号と本文の間隔を最適化 --- */
  .p-doc__item {
    padding-left: 2.4rem;
  }
  .p-doc__item::before {
    width: 1.7rem;
    height: 1.7rem;
  }
  .p-doc__item-title {
    font-size: 1.02rem;
  }

  /* --- お問い合わせ：会社情報はラベルを上に積む／送信ボタン全幅 --- */
  .p-contact__info > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .p-contact__info dt {
    font-size: 0.75rem;
    color: var(--c-text-muted);
  }
  .p-contact__info dd {
    color: var(--c-text);
    word-break: normal;
  }
  .p-contact__form input[type="submit"],
  .p-contact__form .wpcf7-submit {
    width: 100%;
    min-width: 0;
  }
}
