/* =========================================================
   BEFORE & AFTER（C案）
   SP：〜1023px ／ PC：1024px〜
   角：ページ全体に合わせて角丸なし（カード・ボタンとも四角）
   色：アクセント #F26D00（大きい文字・バー・線）
       小さいオレンジ文字は可読性のため #C25400
   ========================================================= */
.ba,
.ba *,
.ba *::before,
.ba *::after { box-sizing: border-box; }

.ba {
  padding: 72px 0 56px;
  background: #fff;
  color: #333;
  font-family: "Noto Sans JP", sans-serif;
}

.ba__inner {
  display: grid;
  grid-template-areas: "head" "feature" "subhead" "slider" "nav" "note";
  row-gap: 28px;
}

/* ---------- 見出し ---------- */
.ba__head { grid-area: head; position: relative; padding: 0 24px; text-align: center; }
.ba__head > :not(.ba__bg) { position: relative; }
.ba__bg {
  position: absolute; left: 0; right: 0; top: -22px;
  margin: 0;
  font-family: Montserrat, sans-serif; font-weight: 800;
  font-size: 64px; line-height: 1; letter-spacing: .04em;
  color: #F4F5F5;
  pointer-events: none; user-select: none;
}

.ba__eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 0;
  font-family: Montserrat, sans-serif; font-weight: 700;
  font-size: 18px; letter-spacing: .18em; color: #C25400;
}
.ba__eyebrow::before,
.ba__eyebrow::after { content: ""; width: 24px; height: 2px; background: #F26D00; }

.ba__title {
  margin: 10px 0 0;
  font-size: 30px; line-height: 1.35; font-weight: 900; letter-spacing: .02em;
}
.ba__title-em { color: #F26D00; }

.ba__lead { margin: 10px 0 0; font-size: 15px; line-height: 1.7; font-weight: 500; }

/* ---------- スライダー ---------- */
.ba__viewport { grid-area: slider; min-width: 0; }

.ba__track {
  position: relative;
  display: flex; gap: 16px;
  margin: 0; padding: 0 24px; list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 24px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ba__track::-webkit-scrollbar { display: none; }
.ba__track:focus-visible { outline: 2px solid #F26D00; outline-offset: 4px; }

/* ---------- カード（SP） ---------- */
.ba-card {
  flex: 0 0 min(326px, 84vw);
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  border: 1px solid #E4E7E7; border-radius: 0;
  overflow: hidden; background: #fff;
}

.ba-card__photos {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px;
  border-bottom: 1px solid #E4E7E7;
}
.ba-card__photo { position: relative; margin: 0; aspect-ratio: 3 / 4; background: #ECEFEF; }
.ba-card__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ba-card__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 8px 0; text-align: center;
  font-family: Montserrat, sans-serif; font-weight: 700;
  font-size: 13px; letter-spacing: .12em;
  background: rgba(255, 255, 255, .92); color: #555;
}
.ba-card__photo--after .ba-card__label { background: #333; color: #fff; }

.ba-card__body { display: flex; flex-direction: column; padding: 0 18px; }

.ba-card__meta {
  display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 14px 0;
  border-bottom: 1px solid #E4E7E7;
  font-size: 14px;
}
.ba-card__case { font-family: Montserrat, sans-serif; font-weight: 700; letter-spacing: .08em; color: #C25400; }
.ba-card__attr { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.ba-card__attr::before { content: ""; width: 1px; height: 12px; background: #D5DADA; }

.ba-card__main {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #E4E7E7;
}
.ba-card__fat { display: flex; flex-direction: column; gap: 4px; }
.ba-card__fat-label { font-size: 14px; font-weight: 700; }
.ba-card__fat-range { font-family: Montserrat, sans-serif; font-weight: 600; font-size: 17px; color: #555; }

.ba-card__delta {
  margin: 0;
  font-family: Montserrat, sans-serif; font-weight: 800;
  font-size: 40px; line-height: 1; letter-spacing: -.02em;
  color: #F26D00;
}
.ba-card__delta small { margin-left: 2px; font-size: 16px; letter-spacing: 0; }

.ba-card__sub {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0; padding: 12px 0 16px;
  font-size: 14px;
}
.ba-card__sub-label { color: #666; }
.ba-card__sub-value { font-family: Montserrat, sans-serif; font-weight: 600; font-size: 15px; }

/* ---------- 新着（NEW 最新の実績）：スライダーとは別枠で1件 ---------- */
.ba-feature { grid-area: feature; display: flex; flex-direction: column; gap: 14px; padding: 0 24px; }
.ba-card--feature { flex: none; border: 2px solid #F26D00; }

/* グループ見出し（「NEW 最新の実績」「06 これまでの実績」を同じ形にそろえる） */
.ba-group {
  display: flex; align-items: center; gap: 12px;
  margin: 0;
  font-size: 15px; font-weight: 700; letter-spacing: .06em; line-height: 1;
}
.ba-group b {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 52px; padding: 7px 10px 6px;
  background: #333; color: #fff;
  font-family: Montserrat, sans-serif; font-weight: 800; font-size: 14px; letter-spacing: .1em;
}
.ba-group::after { content: ""; flex: 1; height: 1px; background: #E4E7E7; }
.ba-group--new b { background: #F26D00; }
.ba-group--new::after { background: #F26D00; opacity: .35; }

/* スライダーの見出し */
.ba__subhead { grid-area: subhead; margin-top: 20px; margin-bottom: -14px; padding: 0 24px; }

/* 見出し・期間（任意） */
.ba-card__story { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-bottom: 1px solid #E4E7E7; }
.ba-card__catch { margin: 0; font-size: 17px; font-weight: 900; line-height: 1.5; letter-spacing: .02em; }
.ba-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ba-card__tags li {
  padding: 5px 10px 4px;
  border: 1px solid #F26D00; color: #C25400;
  font-size: 12px; font-weight: 700; line-height: 1.2; letter-spacing: .04em;
}

/* ---------- 注記 ---------- */
.ba__note {
  grid-area: note;
  margin: 0; padding: 0 24px;
  font-size: 13px; line-height: 1.6; color: #666;
}

/* ---------- 操作部 ---------- */
.ba__nav {
  grid-area: nav;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.ba__meter { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ba__count { font-family: Montserrat, sans-serif; font-weight: 600; font-size: 14px; letter-spacing: .05em; }
.ba__count-total { color: #737979; }
.ba__bar { display: block; width: 180px; height: 2px; border-radius: 2px; background: #E3E6E6; overflow: hidden; }
.ba__bar-fill { display: block; width: 16.67%; height: 100%; background: #F26D00; transition: width .3s ease; }

.ba__btn {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid #D5DADA; border-radius: 0;
  background: #fff; color: #333;
  cursor: pointer;
  transition: opacity .2s ease, background-color .2s ease;
}
.ba__btn:disabled { opacity: .35; cursor: default; }
.ba__btn:focus-visible { outline: 2px solid #F26D00; outline-offset: 2px; }

/* =========================================================
   PC（1024px〜）
   ========================================================= */
@media (min-width: 1024px) {
  .ba { padding: 140px 0 110px; }

  .ba__inner {
    width: min(1040px, calc(100% - 64px));
    margin: 0 auto;
    grid-template-columns: 1fr auto;
    grid-template-areas: "head head" "feature feature" "subhead nav" "slider slider" "note note";
    align-items: end;
    row-gap: 48px; column-gap: 40px;
  }

  .ba__head { padding: 0; text-align: center; }
  .ba__bg { top: -48px; font-size: 140px; }
  .ba__eyebrow { gap: 16px; font-size: 24px; letter-spacing: .2em; }
  .ba__eyebrow::before, .ba__eyebrow::after { width: 36px; }
  .ba__title { margin-top: 12px; font-size: 44px; line-height: 1.3; }
  .ba__lead { margin-top: 12px; font-size: 17px; }

  .ba__track { gap: 24px; padding: 0; scroll-padding-inline: 0; }

  /* 横型カード */
  .ba-card { flex: 0 0 886px; flex-direction: row; height: 340px; border-radius: 0; }
  .ba-card__photos { flex: 0 0 510px; border-bottom: 0; }
  .ba-card__photo { aspect-ratio: auto; height: 100%; }
  .ba-card__label { padding: 10px 0; font-size: 14px; letter-spacing: .14em; }

  .ba-card__body { flex: 1; justify-content: space-between; padding: 32px 36px; }
  .ba-card__meta { padding: 0; border-bottom: 0; gap: 12px; font-size: 15px; }
  .ba-card__attr { gap: 12px; }
  .ba-card__attr::before { height: 14px; }

  /* 並び：体脂肪率 → 大きな変化量 → Before→After */
  .ba-card__main { flex-direction: column; align-items: flex-start; gap: 6px; padding: 0; border-bottom: 0; }
  .ba-card__fat { display: contents; }
  .ba-card__fat-label { order: 0; font-size: 17px; }
  .ba-card__delta { order: 1; font-size: 56px; letter-spacing: -.03em; }
  .ba-card__delta small { margin-left: 4px; font-size: 20px; }
  .ba-card__fat-range { order: 2; font-size: 28px; font-weight: 700; color: #333; }

  .ba-card__sub { padding: 16px 0 0; border-top: 1px solid #EEF0F0; font-size: 15px; }
  .ba-card__sub-label { font-size: 17px; font-weight: 700; color: #333; }
  .ba-card__sub-value { font-size: 28px; font-weight: 700; }

  .ba__note { margin: -24px 0 0; padding: 0; font-size: 14px; }

  .ba-feature { gap: 18px; padding: 0; }
  .ba-group { font-size: 17px; }
  .ba-group b { min-width: 60px; font-size: 16px; padding: 8px 12px 7px; }
  .ba-card--feature { flex: none; width: 100%; height: auto; min-height: 460px; }
  .ba-card--feature .ba-card__body { justify-content: center; gap: 22px; }
  .ba-card--feature .ba-card__photos { align-self: stretch; }
  .ba-card__story { padding: 0; border-bottom: 0; gap: 12px; }
  .ba-card__catch { font-size: 24px; }
  .ba-card__tags li { font-size: 14px; padding: 6px 12px 5px; }
  .ba-card--feature .ba-card__photos { flex-basis: 600px; }
  .ba-card--feature .ba-card__delta { font-size: 64px; }
  .ba-card--feature .ba-card__fat-range, .ba-card--feature .ba-card__sub-value { font-size: 32px; }
  .ba__subhead { align-self: center; margin: 24px 0 0; padding: 0; }

  /* 操作部：枚数＋バー → 前へ → 次へ */
  .ba__nav { justify-content: flex-end; gap: 12px; padding: 0; }
  .ba__meter { order: 0; align-items: flex-end; margin-right: 8px; }
  .ba__count { font-size: 15px; }
  .ba__bar { width: 160px; }
  .ba__btn { width: 52px; height: 52px; }
  .ba__btn--prev { order: 1; }
  .ba__btn--next { order: 2; border-color: #333; background: #333; color: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  .ba__bar-fill, .ba__btn { transition: none; }
}
