/* ============================================================
   lower.css — 下層ページ共通コンポーネント
   ※ トークン（色・フォント・余白）は common.css の :root を継承
============================================================ */

/* ---------- ページヒーロー（下層FV） ---------- */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + 48px) 0 48px;
  background: var(--color-bg-alt);
  overflow: hidden;
}
@media (min-width: 1024px) { .page-hero { padding: calc(var(--header-h) + 72px) 0 72px; } }
.page-hero__label {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-en); font-size: 13px; letter-spacing: .22em;
  color: var(--color-primary); margin-bottom: 10px;
}
.page-hero__label .c-spark { width: 15px; height: 15px; fill: var(--color-accent); flex: none; }
.page-hero__title {
  font-family: var(--font-heading); font-weight: 700;
  font-size: var(--fs-h1); line-height: var(--lh-heading); letter-spacing: .06em;
  position: relative; z-index: 1;
}
.page-hero__lead { margin-top: var(--sp-2); max-width: 640px; position: relative; z-index: 1; }
.page-hero--photo .page-hero__grid { display: grid; gap: var(--sp-3); align-items: center; position: relative; z-index: 1; }
@media (min-width: 1024px) { .page-hero--photo .page-hero__grid { grid-template-columns: 1.1fr .9fr; gap: var(--sp-5); } }
.page-hero__photo { aspect-ratio: 16 / 9; border-radius: var(--radius-img); overflow: hidden; box-shadow: var(--shadow-card); }

/* ---------- パンくず ---------- */
.breadcrumb { margin-bottom: var(--sp-3); position: relative; z-index: 1; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px 0; font-size: 12px; color: var(--color-text-weak); }
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li + li::before { content: "/"; margin: 0 10px; color: var(--color-line); }
.breadcrumb a { color: var(--color-primary); }
.breadcrumb a:hover { opacity: .7; }

/* ---------- セクション共通 ---------- */
.l-sec { position: relative; padding-block: var(--sp-5); overflow: hidden; }
@media (min-width: 1024px) { .l-sec { padding-block: var(--sp-6); } }
.l-sec--alt { background: var(--color-bg-alt); }
.l-sec--white { background: var(--color-bg-white); }

/* ---------- 写真＋テキスト（交互レイアウト） ---------- */
.media { display: grid; gap: var(--sp-3); align-items: center; position: relative; z-index: 1; }
@media (min-width: 1024px) {
  .media { grid-template-columns: repeat(2, 1fr); gap: var(--sp-5); }
  .media--rev > .media__photo { order: 2; }
}
.media__photo { aspect-ratio: 4 / 3; border-radius: var(--radius-img); overflow: hidden; box-shadow: var(--shadow-card); }
.media__title {
  font-family: var(--font-heading); font-weight: 700;
  font-size: var(--fs-h3); line-height: var(--lh-heading); margin-bottom: var(--sp-2);
}
.media__text p + p { margin-top: 1em; }

/* ---------- こだわり・特徴カード ---------- */
.point-grid { display: grid; gap: var(--sp-3); position: relative; z-index: 1; }
@media (min-width: 1024px) { .point-grid { grid-template-columns: repeat(3, 1fr); } }
.point-card {
  background: var(--color-bg-white); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: var(--sp-3); text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.point-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.point-card__photo { aspect-ratio: 3 / 2; border-radius: var(--radius-card); overflow: hidden; margin-bottom: var(--sp-2); }
.point-card__num { font-family: var(--font-en); font-size: 13px; letter-spacing: .2em; color: var(--color-accent); display: block; margin-bottom: 6px; }
.point-card__title { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-h3); line-height: var(--lh-heading); margin-bottom: 10px; }
.point-card__text { font-size: 14px; text-align: left; }

/* ---------- STEPフロー ---------- */
.flow { display: grid; gap: 18px; max-width: 760px; margin-inline: auto; position: relative; z-index: 1; }
.flow__item {
  position: relative;
  display: grid; grid-template-columns: 56px 1fr; gap: var(--sp-2);
  background: var(--color-bg-white); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: var(--sp-3);
}
.flow__item:not(:last-child)::after {
  content: ""; position: absolute; left: 50%; bottom: -15px; z-index: 1;
  width: 14px; height: 14px; transform: translateX(-50%) rotate(45deg);
  border-right: 3px solid var(--color-secondary); border-bottom: 3px solid var(--color-secondary);
}
.flow__num {
  display: grid; place-items: center; align-self: start;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  font-family: var(--font-en); font-size: 11px; letter-spacing: .08em;
  text-align: center; line-height: 1.3;
}
.flow__num b { font-size: 18px; display: block; }
.flow__title { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-h3); line-height: var(--lh-heading); margin-bottom: 6px; }
.flow__text { font-size: 14px; }
.flow__photo { aspect-ratio: 16 / 7; border-radius: var(--radius-card); overflow: hidden; margin-top: var(--sp-2); }

/* ---------- 汎用テーブル ---------- */
.t-table { background: var(--color-bg-white); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); position: relative; z-index: 1; }
.t-table th, .t-table td { padding: 16px 18px; border-bottom: 1px solid var(--color-line); text-align: left; vertical-align: top; font-size: 14px; }
.t-table tr:last-child th, .t-table tr:last-child td { border-bottom: none; }
.t-table th { width: 30%; background: var(--color-bg-alt); color: var(--color-primary-deep); font-family: var(--font-heading); font-weight: 700; white-space: nowrap; }
@media (max-width: 1023px) { .t-table th { width: 34%; padding: 14px; } .t-table td { padding: 14px; } }

/* ---------- 料金表 ---------- */
.price-block { position: relative; z-index: 1; }
.price-block + .price-block { margin-top: var(--sp-4); }
.price-block__title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-h3);
  margin-bottom: var(--sp-2);
}
.price-block__title::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--color-accent); flex: none; }
.price-table { background: var(--color-bg-white); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-card); }
.price-table th, .price-table td { padding: 14px 18px; border-bottom: 1px solid var(--color-line); font-size: 14px; text-align: left; }
.price-table thead th { background: var(--color-primary); color: #fff; font-family: var(--font-heading); font-weight: 700; border-bottom: none; }
.price-table tbody tr:last-child th, .price-table tbody tr:last-child td { border-bottom: none; }
.price-table tbody th { font-weight: 500; background: var(--color-bg-alt); }
.price-table .price { font-family: var(--font-heading); font-weight: 700; color: var(--color-primary-deep); white-space: nowrap; }
.price-note { margin-top: var(--sp-2); font-size: var(--fs-note); color: var(--color-text-weak); }

/* ---------- 院長・スタッフ ---------- */
.doctor { display: grid; gap: var(--sp-3); position: relative; z-index: 1; }
@media (min-width: 1024px) { .doctor { grid-template-columns: .8fr 1.2fr; gap: var(--sp-5); align-items: start; } }
.doctor__photo { aspect-ratio: 3 / 4; border-radius: var(--radius-img); overflow: hidden; box-shadow: var(--shadow-card); }
.doctor__role { font-size: 13px; color: var(--color-primary); font-weight: 700; letter-spacing: .1em; }
.doctor__name { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-h2); line-height: var(--lh-heading); margin: 4px 0 4px; }
.doctor__name small { font-family: var(--font-en); font-size: 13px; letter-spacing: .18em; color: var(--color-text-weak); margin-left: 12px; }
.doctor__message { margin-top: var(--sp-2); }
.doctor__message p + p { margin-top: 1em; }
.doctor__detail { margin-top: var(--sp-3); }

.staff-grid { display: grid; gap: var(--sp-3); position: relative; z-index: 1; }
@media (min-width: 700px) { .staff-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .staff-grid { grid-template-columns: repeat(3, 1fr); } }
.staff-card { background: var(--color-bg-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; }
.staff-card__photo { aspect-ratio: 4 / 3; }
.staff-card__body { padding: var(--sp-3); }
.staff-card__role { font-size: 12px; color: var(--color-primary); font-weight: 700; letter-spacing: .08em; }
.staff-card__name { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-h3); margin: 2px 0 8px; }
.staff-card__text { font-size: 14px; }

/* ---------- 設備・症例など写真カード ---------- */
.photo-grid { display: grid; gap: var(--sp-3); position: relative; z-index: 1; }
@media (min-width: 700px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
.photo-card { background: var(--color-bg-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; }
.photo-card__photo { aspect-ratio: 4 / 3; }
.photo-card__body { padding: var(--sp-3); }
.photo-card__title { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-h3); margin-bottom: 8px; }
.photo-card__text { font-size: 14px; }

/* ---------- 虫歯の進行（C0〜C4） ---------- */
.caries-grid { display: grid; gap: var(--sp-3); position: relative; z-index: 1; }
@media (min-width: 700px) { .caries-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .caries-grid { grid-template-columns: repeat(5, 1fr); } }
.caries-card { background: var(--color-bg-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; text-align: center; }
.caries-card__photo { aspect-ratio: 1 / 1; }
.caries-card__stage {
  display: inline-block; margin-top: var(--sp-2);
  font-family: var(--font-en); font-size: 15px; letter-spacing: .1em;
  background: var(--color-bg-alt); color: var(--color-primary-deep);
  border-radius: 999px; padding: 2px 16px; font-weight: 700;
}
.caries-card__title { font-family: var(--font-heading); font-weight: 700; font-size: 15px; margin: 8px 0 6px; }
.caries-card__text { font-size: 13px; text-align: left; padding: 0 var(--sp-2) var(--sp-3); }

/* ---------- 患者様の声（カード一覧） ---------- */
.voice-grid { display: grid; gap: var(--sp-3); position: relative; z-index: 1; }
@media (min-width: 700px) { .voice-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .voice-grid { grid-template-columns: repeat(3, 1fr); } }
.voice-card { background: var(--color-bg-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; display: flex; flex-direction: column; }
.voice-card__photo { aspect-ratio: 16 / 9; }
.voice-card__body { padding: var(--sp-3); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.voice-card__title { font-family: var(--font-heading); font-weight: 700; font-size: 16px; line-height: var(--lh-heading); }
.voice-card__text { font-size: 14px; }

/* ---------- FAQ ---------- */
.anchor-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; position: relative; z-index: 1; }
.anchor-nav a {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--color-bg-white); border: 1.5px solid var(--color-primary);
  color: var(--color-primary); border-radius: 999px;
  padding: 9px 22px; font-family: var(--font-heading); font-weight: 700; font-size: 14px;
  transition: background-color .25s ease, color .25s ease;
}
.anchor-nav a::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.anchor-nav a:hover { background: var(--color-primary); color: #fff; opacity: 1; }

.faq-cat { position: relative; z-index: 1; }
.faq-cat + .faq-cat { margin-top: var(--sp-4); }
.faq-cat__title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-h3);
  margin-bottom: var(--sp-2);
}
.faq-cat__title::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--color-accent); flex: none; }
.faq-item { background: var(--color-bg-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; }
.faq-item + .faq-item { margin-top: 12px; }
.faq-item summary {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer; list-style: none;
  padding: 18px 48px 18px 20px; position: relative;
  font-family: var(--font-heading); font-weight: 700; line-height: 1.6;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "Q"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--color-primary); color: #fff; font-family: var(--font-en); font-size: 14px; }
.faq-item summary::after {
  content: ""; position: absolute; right: 20px; top: 26px;
  width: 9px; height: 9px; border-right: 2.4px solid var(--color-primary); border-bottom: 2.4px solid var(--color-primary);
  transform: rotate(45deg); transition: transform .25s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq-item__a { display: flex; gap: 12px; padding: 0 20px 20px; }
.faq-item__a::before { content: "A"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--color-accent); color: #fff; font-family: var(--font-en); font-size: 14px; }
.faq-item__a p { font-size: 14px; }

/* ---------- ブログ一覧・詳細 ---------- */
.blog-list { display: grid; gap: var(--sp-3); position: relative; z-index: 1; }
@media (min-width: 700px) { .blog-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-list { grid-template-columns: repeat(3, 1fr); } }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: var(--sp-4); position: relative; z-index: 1; }
.pagination a, .pagination span {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--color-bg-white); box-shadow: var(--shadow-card);
  font-family: var(--font-en); font-size: 14px; color: var(--color-primary);
}
.pagination .is-current { background: var(--color-primary); color: #fff; }
.pagination a:hover { background: var(--color-bg-alt); opacity: 1; }

.article { position: relative; z-index: 1; max-width: 800px; margin-inline: auto; }
.article__meta { display: flex; align-items: center; gap: 12px; margin-bottom: var(--sp-2); }
.article__meta time { font-family: var(--font-en); font-size: 13px; letter-spacing: .1em; color: var(--color-text-weak); }
.article__title { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-h2); line-height: var(--lh-heading); margin-bottom: var(--sp-3); }
.article__eyecatch { aspect-ratio: 16 / 9; border-radius: var(--radius-img); overflow: hidden; box-shadow: var(--shadow-card); margin-bottom: var(--sp-4); }
.article__body > * + * { margin-top: 1.4em; }
.article__body h2 {
  font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-h3);
  line-height: var(--lh-heading); padding: 12px 16px; margin-top: 2em;
  background: var(--color-bg-alt); border-left: 4px solid var(--color-primary); border-radius: 6px;
}
.article__body h3 { font-family: var(--font-heading); font-weight: 700; font-size: 17px; margin-top: 1.8em; padding-bottom: 6px; border-bottom: 2px solid var(--color-secondary); }
.article__body ul { padding-left: 1.4em; }
.article__body ul li { list-style: disc; margin-top: .4em; }
.article__photo { aspect-ratio: 16 / 9; border-radius: var(--radius-card); overflow: hidden; }
.article__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: var(--sp-5); }

/* ---------- 採用 ---------- */
.job-grid { display: grid; gap: var(--sp-3); position: relative; z-index: 1; }
@media (min-width: 1024px) { .job-grid { grid-template-columns: repeat(3, 1fr); } }
.timeline { max-width: 720px; margin-inline: auto; position: relative; z-index: 1; }
.timeline__item { display: grid; grid-template-columns: 88px 1fr; gap: var(--sp-2); position: relative; padding-bottom: var(--sp-3); }
.timeline__item::before { content: ""; position: absolute; left: 106px; top: 8px; bottom: -4px; width: 2px; background: var(--color-secondary); }
.timeline__item:last-child::before { display: none; }
.timeline__time { font-family: var(--font-en); font-weight: 400; font-size: 15px; letter-spacing: .08em; color: var(--color-primary-deep); text-align: right; padding-right: 26px; position: relative; }
.timeline__time::after { content: ""; position: absolute; right: -24px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--color-accent); z-index: 1; }
.timeline__body { background: var(--color-bg-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: var(--sp-2) var(--sp-3); margin-left: 24px; }
.timeline__title { font-family: var(--font-heading); font-weight: 700; margin-bottom: 4px; }
.timeline__text { font-size: 14px; }

/* ---------- 医院ブロック（複数院版） ---------- */
.clinic-block { position: relative; z-index: 1; }
.clinic-block + .clinic-block { margin-top: var(--sp-5); }
.clinic-block__name {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-h2);
  line-height: var(--lh-heading); margin-bottom: var(--sp-3);
}
.clinic-block__name small { font-family: var(--font-en); font-size: 13px; letter-spacing: .18em; color: var(--color-primary); }
.clinic-block__grid { display: grid; gap: var(--sp-3); }
@media (min-width: 1024px) { .clinic-block__grid { grid-template-columns: repeat(2, 1fr); } }
.clinic-block__map, .clinic-block__photo { aspect-ratio: 16 / 10; border-radius: var(--radius-img); overflow: hidden; box-shadow: var(--shadow-card); }

/* ---------- お問い合わせフォーム ---------- */
.form-wrap { max-width: 760px; margin-inline: auto; background: var(--color-bg-white); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: var(--sp-4) var(--sp-3); position: relative; z-index: 1; }
@media (min-width: 1024px) { .form-wrap { padding: var(--sp-5); } }
.form-row { margin-bottom: var(--sp-3); }
.form-row__label { display: flex; align-items: center; gap: 8px; font-family: var(--font-heading); font-weight: 700; margin-bottom: 8px; }
.form-row__label .req { font-size: 11px; background: var(--color-accent); color: #fff; border-radius: 4px; padding: 1px 8px; font-family: var(--font-body); }
.form-row__label .opt { font-size: 11px; background: var(--color-text-weak); color: #fff; border-radius: 4px; padding: 1px 8px; font-family: var(--font-body); }
.form-row input[type="text"], .form-row input[type="tel"], .form-row input[type="email"], .form-row select, .form-row textarea {
  width: 100%; padding: 13px 16px; font: inherit; color: inherit;
  background: var(--color-bg); border: 1.5px solid var(--color-line); border-radius: 10px;
  transition: border-color .25s ease;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--color-primary); }
.form-row textarea { min-height: 180px; resize: vertical; }
.form-radio { display: flex; flex-wrap: wrap; gap: 10px; }
.form-radio label {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--color-bg); border: 1.5px solid var(--color-line); border-radius: 999px;
  padding: 9px 20px; font-size: 14px; transition: border-color .25s ease, background-color .25s ease;
}
.form-radio label:has(input:checked) { border-color: var(--color-primary); background: var(--color-bg-alt); }
.form-radio input { accent-color: var(--color-primary); }
.form-privacy { text-align: center; font-size: 14px; margin-bottom: var(--sp-3); }
.form-privacy a { color: var(--color-primary); text-decoration: underline; }
.form-submit { text-align: center; }
.form-submit .c-btn { min-width: 280px; border: none; cursor: pointer; }

/* ---------- 汎用 ---------- */
.u-center { text-align: center; }
.u-mt2 { margin-top: var(--sp-2); }
.u-mt3 { margin-top: var(--sp-3); }
.u-mt4 { margin-top: var(--sp-4); }
.lead-center { max-width: 720px; margin-inline: auto; text-align: center; position: relative; z-index: 1; }
.sec-btn { text-align: center; margin-top: var(--sp-4); position: relative; z-index: 1; }

/* ---------- CTAカード（明背景バリアント：お問い合わせページ用） ---------- */
.cta__grid--light .cta__card { background: var(--color-bg-white); border: 1px solid var(--color-line); box-shadow: var(--shadow-card); backdrop-filter: none; }
.cta__grid--light .cta__card-label { color: var(--color-primary); }
.cta__grid--light .cta__card-label svg { fill: var(--color-primary); }
.cta__grid--light .cta__tel { color: var(--color-primary-deep); }
.cta__grid--light .cta__small { color: var(--color-text-weak); }
