@charset "UTF-8";
/*
 * 症例(case)の一覧・詳細。
 * PC は 3列 × 3行 = 9件、スマートフォンは1列で上から順に並ぶ(2026-07-28 MTG)。
 * ブレークポイントは legacy CSS に合わせて 480px(#wrapper は 481px 以上で min-width:1200px)。
 * 配色は既存サイトのもの(#499A94 / #417571 / #f8f4ee)をそのまま使う。
 */

/* ---- 施術の絞り込み ---- */
.case-filter {
  max-width: 1080px;
  margin: 0 auto 34px;
  text-align: center;
}

.case-filter__label {
  display: block;
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #6b6f74;
}

.case-filter__control {
  display: inline-block;
  position: relative;
}

/* 右端の三角。select 自身の矢印は環境差が大きいので消して自前で描く */
.case-filter__control::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid #499a94;
  border-bottom: 2px solid #499a94;
  transform: rotate(45deg);
  pointer-events: none;
}

#main article .subpagecontents .case-filter__select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  min-width: 280px;
  max-width: 100%;
  padding: 11px 44px 11px 20px;
  border: 1px solid #499a94;
  border-radius: 5px;
  background: #fff;
  color: #417571;
  font-size: 15px;
  line-height: 1.4;
  font-family: inherit;
  cursor: pointer;
}

#main article .subpagecontents .case-filter__select:focus {
  outline: 2px solid #499a94;
  outline-offset: 1px;
}

.case-filter__reset {
  margin: 10px 0 0;
  font-size: 13px;
}

#main article .subpagecontents .case-filter__reset a {
  color: #417571;
}

/* ---- 一覧 ---- */
#main article .case-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
  max-width: 1080px;
  margin: 0 auto 50px;
  padding: 0;
}

/* 角丸・枠線・色は既存サイトの流儀に合わせる(面は 10px、ボタンは 5px / ピル 20px、主色 #499A94) */
#main article .case-list > li.case-card {
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid #d6d6d6;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#main article .subpagecontents .case-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* カードの施術名は h2 だが、本文の大見出し(二重下線・帯)の装飾は持ち込まない。
 * headings.css の #main article .subpagecontents h2 を上書きするため、
 * クラスを足して詳細度を上げている。 */
#main article .subpagecontents .case-card__title {
  font-size: 17px;
  line-height: 1.5;
  font-weight: 600;
  color: #417571;
  text-align: center;
  margin: 0;
  padding: 14px 14px 10px;
  border: 0;
  background: none;
}

#main article .subpagecontents .case-card__title::after,
#main article .subpagecontents .case-card__title::before {
  display: none !important;
  content: none !important;
}

.case-card__more {
  margin: auto 0 0;
  padding: 10px 14px 14px;
  text-align: right;
  font-size: 13px;
}

#main article .subpagecontents .case-card__more a {
  color: #417571;
  text-decoration: none;
}

#main article .subpagecontents .case-card__more a::after {
  content: " ▶";
  font-size: 10px;
}

/* ---- ビフォー・アフター(正方形2枚を横に並べる) ---- */
.case-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #f8f4ee;
}

/* 片方の写真しか登録されていないとき(本来は2枚そろえる運用)は空きを作らない */
.case-photos--single {
  grid-template-columns: 1fr;
}

.case-photo {
  margin: 0;
  position: relative;
  background: #f8f4ee;
}

/* legacy の `#main article img { max-width:90%; height:auto; padding:0 5% }` は
 * 詳細度 (1,0,1) でクラス指定より強く、そのままだと画像が枠の 90% に縮み、
 * 左右に余白が入って正方形にならない。id を含めて詳細度を上げて打ち消す。 */
#main article .case-photo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  padding: 0;
  margin: 0;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.case-photo figcaption {
  position: absolute;
  left: 0;
  top: 0;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: #fff;
  background: #417571;
}

/* ---- 一覧のページ送り ---- */
.case-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 50px;
}

/* ページ番号は既存のボタン(.css_btn_class)と同じ角丸 5px、
 * 「前へ / 次へ」は記事の前後リンク(#blog_prev_next)と同じピル型 20px・2px 枠にそろえる。 */
#main article .subpagecontents .case-pager a,
.case-pager .case-pager__num {
  min-width: 42px;
  height: 42px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #499a94;
  border-radius: 5px;
  background: #fff;
  color: #417571;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  transition: background-color .3s, color .3s;
}

#main article .subpagecontents .case-pager a:hover {
  background: #499a94;
  color: #fff;
}

.case-pager .case-pager__num.is-current {
  border-color: #499a94;
  background: #499a94;
  color: #fff;
  font-weight: 600;
}

#main article .subpagecontents .case-pager a.case-pager__nav {
  min-width: 0;
  padding: 0 20px;
  border-width: 2px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.case-pager .case-pager__gap {
  color: #9a958c;
  padding: 0 2px;
  font-size: 13px;
}

/* ---- 症例情報の表(一覧・詳細で共通) ---- */
/* 項目数が少なく横スクロールは不要なので、add0.js が付ける包み(.scroll-table)の
 * 横スクロールと最小幅を打ち消し、枠の中で折り返させる。 */
#main article .case-card .scroll-table,
#main article .case-single .scroll-table {
  overflow: visible;
}

#main article .case-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

/* 見出しセルはサイトの表と同じ流儀(#499A94 の面に白文字)にそろえる */
#main article .case-table th,
#main article .case-table td {
  border: 1px solid #e0e0e0;
  padding: 9px 12px;
  text-align: left;
  vertical-align: middle;
}

/* 「副作用・リスク」が入る幅を確保する。折り返しは許す(狭い画面で値と重なるため) */
#main article .case-table th {
  width: 7em;
  font-weight: 600;
  color: #fff;
  background: #499a94;
}

#main article .case-table td {
  background: #fff;
}

/* 費用は判断材料として一番見られる項目なので、数字を大きく出す */
#main article .case-table .case-row--price td {
  font-weight: 700;
  color: #3d7a74;
}

/* 副作用・リスクは長文になりやすいので、行間を広げて読みやすくする */
#main article .case-table .case-row--risk td {
  line-height: 1.8;
  vertical-align: top;
}

/* ---- 詳細 ---- */
.case-single .case-photos {
  max-width: 760px;
  margin: 0 auto 30px;
  gap: 12px;
  background: none;
}

.case-single .case-photo figcaption {
  font-size: 13px;
  padding: 4px 12px;
}

/* 表の幅について:
 * legacy の add0.js が全ての table を <div class="scroll-table"> で包み、
 * layout-fixes.css の `.scroll-table table { min-width: 100% }` が効く。
 * CSS では min-width が max-width より優先されるため、table 側に max-width を
 * 書くだけでは画面幅いっぱいに伸びてしまう。包み側で幅を決め、table の min-width は解除する。 */
#main article .case-single .scroll-table {
  max-width: 760px;
  margin: 0 auto 40px;
}

#main article .case-single .case-table {
  width: 100%;
  min-width: 0;
  max-width: 760px;
  margin: 0 auto 40px;
  font-size: 15px;
  border-bottom: 1px solid #e0e0e0;
}

/* 包まれている場合は外側が余白を持つので、table 側の下余白は消す */
#main article .case-single .scroll-table .case-table {
  margin-bottom: 0;
}

/* ---- 別パターンの写真(詳細のメイン写真の下) ---- */
.case-extra-photos {
  max-width: 760px;
  margin: 0 auto;
}

.case-extra-photos .case-photos {
  margin-bottom: 30px;
}

/* 追加分で片方しか登録されていない組は、ペアの1枚と同じ大きさにそろえる
   (メインと違い全幅にすると、上のペアと比べて不自然に大きく見えるため) */
.case-extra-photos .case-photos--single {
  max-width: calc((100% - 12px) / 2);
}

/* ---- 詳細に出す施術(押すと同じ施術の一覧へ) ---- */
.case-terms {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 760px;
  margin: -20px auto 40px;
}

.case-terms__label {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #6b6f74;
}

#main article .subpagecontents .case-terms__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 100%;
}

#main article .subpagecontents .case-terms__list > li {
  margin: 0;
}

#main article .subpagecontents .case-terms__item {
  display: inline-block;
  padding: 5px 16px;
  border: 1px solid #499a94;
  border-radius: 20px;
  background: #fff;
  color: #417571;
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color .3s, color .3s;
}

#main article .subpagecontents .case-terms__item:hover {
  background: #499a94;
  color: #fff;
}

/* 説明(本文)。見出しを置かない代わりに、罫線と余白で表との区切りを示す */
.case-single .case-description {
  max-width: 760px;
  margin: 0 auto 40px;
  padding-top: 34px;
  border-top: 1px solid #e0e0e0;
}

/* 本文の先頭が大見出しのとき、罫線と近すぎないようにする */
#main article .subpagecontents .case-description > h2:first-child {
  margin-top: 0;
}

/* 前後リンク(legacy CSS で左右に float する)の下に置く */
.case-single .case-nav__back {
  clear: both;
  text-align: center;
  padding-top: 20px;
  margin: 0;
}

/* 記事の前後リンクと同じピル型にそろえる */
#main article .subpagecontents .case-nav__back a {
  display: inline-block;
  padding: 7px 28px;
  border: 2px solid #499a94;
  border-radius: 20px;
  color: #417571;
  font-size: 16px;
  text-decoration: none;
  transition: background-color .3s, color .3s;
}

#main article .subpagecontents .case-nav__back a:hover {
  background: #499a94;
  color: #fff;
}

/* ---- 施術ページなどへの埋め込み([case_photos]) ---- */
.case-embed {
  margin: 40px 0;
}

/* 埋め込みは本文の幅に合わせ、3列のまま少し小さく見せる */
#main article .case-list--embed {
  max-width: 100%;
  margin-bottom: 24px;
  gap: 24px 20px;
}

.case-embed__more {
  text-align: center;
  margin: 0;
}

#main article .subpagecontents .case-embed__more a {
  display: inline-block;
  padding: 7px 28px;
  border: 2px solid #499a94;
  border-radius: 20px;
  color: #417571;
  text-decoration: none;
  transition: background-color .3s, color .3s;
}

#main article .subpagecontents .case-embed__more a:hover {
  background: #499a94;
  color: #fff;
}

/* ============ スマートフォン(480px 以下) ============ */
@media screen and (max-width: 480px) {
  #main article .case-list {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 30px;
  }

  .case-card__title {
    font-size: 16px;
  }

  #main article .case-table {
    font-size: 12px;
  }

  #main article .case-table th {
    width: 6em;
    padding: 7px 10px;
  }

  #main article .case-table td {
    padding: 7px 10px;
  }

  .case-single .case-photos {
    gap: 8px;
  }

  .case-single .case-table {
    font-size: 13px;
  }

  .case-pager {
    gap: 6px;
    margin-bottom: 34px;
  }

  #main article .subpagecontents .case-pager a,
  .case-pager .case-pager__num {
    min-width: 38px;
    height: 38px;
    font-size: 13px;
  }

  #main article .subpagecontents .case-pager a.case-pager__nav {
    padding: 0 14px;
  }

  #main article .subpagecontents .case-filter__select {
    min-width: 0;
    width: 100%;
    font-size: 16px; /* 16px 未満だと iOS で選択時に画面が拡大する */
  }

  .case-filter__control {
    display: block;
  }
}
