/* ==========================================================
   TOP（top__）… 全画面ヒーロー → MESSAGE → HALL → PLAN → MEMBERSHIP → OFFERING → FLOW
   ※ 色は css/common.css の :root 変数。レスポンシブは元のクラスの直下に書く
   ========================================================== */

/* ---------- ヒーロー（2枚をゆっくり切り替え） ---------- */
.top__hero {
  position: relative;
  height: calc(100vh - var(--bar-h));
  /* 〜1100pxは下部バーの分だけ低くして、V字の下端がバーに隠れないように */
  min-height: 560px;
  overflow: hidden;
  background: var(--color-brand);
}

/* パソコンは白いヘッダーが上にあるので、その下から始める */
@media (min-width: 1101px) {
  .top__hero {
    height: calc(100vh - var(--header-h));
    margin-top: var(--header-h);
  }
}

/* ヒーローの下端：写真の下端が逆三角（▽・中央が下に尖る形）で、両脇に黄緑の三角。最初はプランの上端がこの形にくっつき、スクロールで下がると、お知らせの白が見える。中央に下向きの矢印 */
main.top {
  --hero-edge-h: clamp(36px, 6.25vw, 120px);
  /* V字の部分の高さ（ヒーローの矢印・プランの上端で共有） */
}

.top__hero-edge {
  position: absolute;
  bottom: -1px;
  left: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: var(--hero-edge-h);
  pointer-events: none;
}

.top__hero-edge-white {
  fill: var(--color-white);
  /* お知らせ（白）と同じ色。ヒーローの下端は、いつでも逆三角（▽）に見える */
}

.top__hero-edge-green {
  fill: var(--color-brand-lime);
}

.top__hero-more {
  position: absolute;
  bottom: calc(var(--hero-edge-h) * 0.5);
  left: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  margin-left: -26px;
}

.top__hero-more::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 14px;
  width: 22px;
  height: 22px;
  border-right: 3px solid var(--color-white);
  border-bottom: 3px solid var(--color-white);
  transform: rotate(45deg);
  animation: top-hero-more 1.6s ease-in-out infinite;
}

@keyframes top-hero-more {

  0%,
  100% {
    transform: translateY(0) rotate(45deg);
  }

  50% {
    transform: translateY(8px) rotate(45deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .top__hero-more::before {
    animation: none;
  }
}

.top__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transition: opacity 1.6s ease;
}

.top__slide.is-active {
  opacity: 1;
}

/* 1枚固定。写真は var(--img-fv)。文字が読めるよう、緑ではなく、黒の薄い影だけを下に敷く */
.top__slide--main {
  background-color: var(--color-text);
  background-image: var(--img-fv, url("../wp-content/uploads/2026/10/top-fv-saidan.webp"));
  /* 16:9の写真。祭壇は中央付近なので、低い画面では上の照明側を少し残す程度に上寄り */
  background-position: center 35%;
}

.top__slide--main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 28, 22, 0.6) 0%, rgba(20, 28, 22, 0.38) 40%, rgba(20, 28, 22, 0.04) 80%);
}

.top__slide--main .top__catch::after {
  content: "";
  display: block;
  width: 120px;
  height: 2px;
  margin-top: 28px;
  background: var(--color-gold-light);
}

.top__slide-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1920px;
  /* 1200pxの制限をやめて、画面いっぱい（最大1920px）に */
  padding-inline: clamp(20px, 4vw, 80px);
}

.top__catch {
  margin: 0;
  color: var(--color-white);
  font-size: clamp(45px, 10vw, 110px);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0.05em;
}

@media (max-width: 780px) {
  .top__catch {
    font-size: 38px;
  }
}

.top__slide--main .top__catch {
  font-family: var(--font-mincho);
  font-size: clamp(30px, 7vw, 80px);
  font-weight: 600;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  text-align: left;
  /* 左寄せ */
}

.top__slide-text {
  margin: 30px 0 0;
  color: var(--color-white);
  text-align: left;
}

body.jaf-page main p.top__slide-text {
  margin: 30px 0 0;
  text-align: left;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.top__slide-btn {
  width: min(400px, 100%);
  margin: 20px 0 0;
  /* ボタンも左端にそろえる */
}

/* ---------- NEWS（ヒーローの直下） ---------- */
.top__news {
  padding: 50px 0;
  background: var(--color-white);
}

@media (max-width: 767px) {
  .top__news {
    padding: 36px 0;
  }
}

.top__news-in {
  display: flex;
  align-items: flex-start;
  gap: 50px;
}

@media (max-width: 767px) {
  .top__news-in {
    flex-direction: column;
    gap: 16px;
  }
}

.top__news-head {
  flex: none;
  width: 160px;
  padding-top: 6px;
}

@media (max-width: 767px) {
  .top__news-head {
    width: auto;
    padding-top: 0;
  }
}

.top__news-en {
  display: block;
  margin-bottom: 8px;
  color: var(--color-brand);
  font-family: var(--font-mincho);
  font-size: 18px;
  letter-spacing: 0.1em;
  line-height: 1;
}

.top__news-title {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-brand);
  color: var(--color-brand);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

@media (max-width: 767px) {
  .top__news-title {
    font-size: 22px;
  }
}

.top__news-body {
  flex: 1;
  width: 100%;
}

.top__news-list {
  border-top: 1px dashed var(--color-text);
}

.top__news-more {
  width: 240px;
  margin: 24px 0 0 auto;
  /* パソコンは右寄せ */
}

.top__news-more .common__btn {
  padding-block: 14px;
  font-size: 16px;
}

@media (max-width: 767px) {
  .top__news-more {
    width: 100%;
    max-width: 320px;
    margin: 20px auto 0;
    /* スマホは中央 */
  }
}

.top__news-item {
  border-bottom: 1px dashed var(--color-text);
}

.top__news-link {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 8px;
  transition: background-color 0.3s ease;
}

.top__news-link:hover {
  background: var(--color-brand-pale);
}

@media (max-width: 767px) {
  .top__news-link {
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 14px 4px;
  }
}

.top__news-date {
  flex: none;
  color: var(--color-text-sub);
  font-family: var(--font-num);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.top__news-cat {
  flex: none;
  min-width: 90px;
  padding: 2px 12px;
  border: 1px solid var(--color-brand);
  border-radius: 100px;
  color: var(--color-brand);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
}

.top__news-text {
  flex: 1;
  color: var(--color-text);
  font-size: 16px;
}

@media (max-width: 767px) {
  .top__news-text {
    flex-basis: 100%;
    font-size: 15px;
  }
}

/* ---------- MESSAGE ---------- */
.top__lead {
  margin: 50px 0 0;
  text-align: center;
}

body.jaf-page main p.top__lead {
  margin: 50px 0 0;
  font-size: 18px;
}

@media (max-width: 767px) {
  body.jaf-page main p.top__lead {
    font-size: 15px;
    text-align: left;
  }
}

/* 選ばれる理由：画面いっぱい（余白なし、最大1920px）。写真と文章カードを少し重ね、1つおきに左右を入れ替える */
.top__reason {
  display: grid;
  gap: 56px;
  width: 100%;
  max-width: 1920px;
  margin: 60px auto 0;
  counter-reset: reason;
  /* padding-inline: 20px; */
}

@media (max-width: 767px) {
  .top__reason {
    gap: 44px;
    margin-top: 40px;
  }
}

.top__reason-card {
  counter-increment: reason;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
}

.top__reason-img {
  grid-area: 1 / 1 / 2 / 8;
  align-self: stretch;
  width: 100%;
  height: 280px;
  /* 写真の元の縦横比で高さが決まらないよう固定（縦幅を短く） */
  object-fit: cover;
  border-radius: 0 var(--radius) var(--radius) 0;
  /* 画面の端側（左）は角丸なし、文章カード側（右）だけ角丸 */
}

.top__reason-body {
  position: relative;
  top: 40px;
  /* 写真より少し下にずらす */
  z-index: 1;
  grid-area: 1 / 7 / 2 / 13;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* 高さは4枚で揃える（js/common.js）。中身は縦中央 */
  min-height: 0;
  margin-right: clamp(16px, 4vw, 80px);
  padding: 22px 44px;
  border-radius: var(--radius);
  /* 他のカードと同じ角丸 */
  background: var(--color-white);
  box-shadow: 0 8px 30px var(--color-shadow);
}

/* 偶数番目は左右を入れ替え */
.top__reason-card:nth-child(even) .top__reason-img {
  grid-area: 1 / 6 / 2 / 13;
  border-radius: var(--radius) 0 0 var(--radius);
  /* 偶数番目は写真が右：画面の端側（右）は角丸なし */
}

.top__reason-card:nth-child(even) .top__reason-body {
  grid-area: 1 / 1 / 2 / 7;
  margin-right: 0;
  margin-left: clamp(16px, 4vw, 80px);
}

@media (max-width: 991px) {
  .top__reason-body {
    padding: 32px 36px;
  }
}

/* スマホ：奇数番目は「写真が右・文章カードが左」、偶数番目はその逆。文章カードが写真に少し重なる（写真は画面の端側の角丸なし） */
@media (max-width: 767px) {
  .top__reason {
    gap: 28px;
    margin-top: 32px;
  }

  .top__reason-card .top__reason-img {
    grid-area: 1 / 6 / 2 / 13;
    align-self: stretch;
    min-height: 200px;
    height: auto;
    aspect-ratio: auto;
    border-radius: var(--radius) 0 0 var(--radius) !important;
  }

  .top__reason-card .top__reason-body {
    top: 0;
    grid-area: 1 / 1 / 2 / 9;
    min-height: 0;
    height: auto !important;
    margin: 0 0 0 16px;
    padding: 18px 16px 20px;
  }

  .top__reason-card:nth-child(even) .top__reason-img {
    grid-area: 1 / 1 / 2 / 8;
    border-radius: 0 var(--radius) var(--radius) 0 !important;
  }

  .top__reason-card:nth-child(even) .top__reason-body {
    grid-area: 1 / 5 / 2 / 13;
    margin: 0 16px 0 0;
  }
}

/* 画面に入ったとき、写真と文章カードが左右からお互いに近づいてくる（奇数番目：写真は左から・カードは右から／偶数番目：その逆） */
.top__reason {
  overflow-x: clip;
  /* 動く前の位置で横スクロールが出ないように */
}

.common__approach .top__reason-img,
.common__approach .top__reason-body {
  opacity: 0;
  transition: opacity 0.6s ease, transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.common__approach .top__reason-img {
  transform: translateX(-160px);
}

.common__approach .top__reason-body {
  transform: translateX(160px);
}

.common__approach:nth-child(even) .top__reason-img {
  transform: translateX(160px);
}

.common__approach:nth-child(even) .top__reason-body {
  transform: translateX(-160px);
}

.common__approach.is-visible .top__reason-img,
.common__approach.is-visible .top__reason-body {
  opacity: 1;
  transform: none;
}

@media (max-width: 767px) {
  .common__approach .top__reason-img {
    transform: translateX(60px);
  }

  .common__approach .top__reason-body {
    transform: translateX(-60px);
  }

  .common__approach:nth-child(even) .top__reason-img {
    transform: translateX(-60px);
  }

  .common__approach:nth-child(even) .top__reason-body {
    transform: translateX(60px);
  }

  .common__approach.is-visible .top__reason-img,
  .common__approach.is-visible .top__reason-body {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  .common__approach .top__reason-img,
  .common__approach .top__reason-body {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.top__reason-title {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-gold);
  color: var(--color-brand);
  font-family: var(--font-mincho);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.5;
}

.top__reason-title::before {
  content: "0" counter(reason);
  margin-right: 14px;
  color: var(--color-gold);
  font-size: 0.9em;
  font-weight: 500;
  letter-spacing: 0.1em;
}

@media (max-width: 767px) {
  .top__reason-title {
    margin-bottom: 8px;
    padding-bottom: 8px;
    font-size: 15px;
  }
  .top__reason-title::before {
    display: block;
    margin: 0 0 2px;
  }
}

body.jaf-page main p.top__reason-text {
  margin: 0;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.8;
  text-align: left;
}
@media (max-width: 767px) {
  body.jaf-page main p.top__reason-text {
    font-size: 13px;
    line-height: 1.75;
  }
}

/* ---------- PLAN ---------- */

#plan_info {
  position: relative;
  z-index: 5;
  padding-top: calc(100px + var(--hero-edge-h));
  /* 2026-11-27 TOPのお知らせを削除：プランがヒーローの直下に来るので、V字の高さぶん上へ重ねてヒーローの下端にくっつける
     （お知らせが無いので js/common.js の .top--reveal は付かない） */
  margin-top: calc(-1 * var(--hero-edge-h));
  /* 上端をV字に切り取る（中央が下がる形）。ヒーローの写真の下端にくっつく */
  clip-path: polygon(0 0, 50% var(--hero-edge-h), 100% 0, 100% 100%, 0 100%);
  /* 背景：最初は淡い緑。画面に入ると（.is-visible）一度だけ、ふわっと淡い黄緑〜水色へ移り変わる */
  background: linear-gradient(120deg, #d9f0e3 0%, #eef7df 50%, #def3f0 100%);
  background-size: 300% 300%;
  background-position: 0% 50%;
  transition: background-position 3.5s ease-in-out;
}

#plan_info.is-visible {
  background-position: 100% 50%;
}

/* V字の両脇の黄緑の三角の帯（ヒーローの写真とV字の間に見える）。プランの上端に付いて、一緒に下がる */
#plan_info::before,
#plan_info::after {
  content: "";
  position: absolute;
  top: 0;
  width: 25%;
  height: var(--hero-edge-h);
  background: var(--color-brand-lime);
  pointer-events: none;
  transition: opacity 0.8s ease;
}

/* お知らせが完全に開いたら（js/common.js が .top--open を付ける）、三角はふわっと消える。上に戻して閉じるとまた現れる */
main.top--open #plan_info::before,
main.top--open #plan_info::after {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {

  #plan_info::before,
  #plan_info::after {
    transition: none;
  }
}

#plan_info::before {
  left: 0;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

#plan_info::after {
  right: 0;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

@media (prefers-reduced-motion: reduce) {
  #plan_info {
    transition: none;
  }
}

/* JSが動くときだけ：最初はヒーローとお知らせに重なってくっつき、スクロールに合わせて下がって、お知らせが現れる */
main.top--reveal #plan_info {
  margin-top: calc(-1 * var(--plan-pull, 0px));
  margin-bottom: var(--plan-pull, 0px);
  transform: translateY(var(--plan-shift, 0px));
  will-change: transform;
}

.top__plan-lead {
  margin: 40px 0 0;
  text-align: center;
}

body.jaf-page main p.top__plan-lead {
  margin: 40px 0 0;
  font-size: 18px;
}

@media (max-width: 767px) {
  body.jaf-page main p.top__plan-lead {
    font-size: 15px;
    text-align: left;
  }
}

.top__plan-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
}

@media (max-width: 991px) {
  .top__plan-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .top__plan-list {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* 1枚ずつ独立して現れる：下からせり上がり、少し大きくなりながら濃くなる。同じ行に並ぶカードは、少しずつ時間をずらす */
.top__plan-card.common__pop {
  opacity: 0;
  transform: translateY(70px) scale(0.92);
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.top__plan-card.common__pop.is-visible {
  opacity: 1;
  transform: none;
}

@media (min-width: 992px) {
  .top__plan-card.common__pop:nth-child(3n + 2) {
    transition-delay: 0.12s;
  }

  .top__plan-card.common__pop:nth-child(3n) {
    transition-delay: 0.24s;
  }
}

@media (min-width: 576px) and (max-width: 991px) {
  .top__plan-card.common__pop:nth-child(2n) {
    transition-delay: 0.12s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .top__plan-card.common__pop {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.top__plan-card {
  display: flex;
  flex-direction: column;
}

.top__plan-name {
  margin: 0;
  padding: 13px 20px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(0deg, color-mix(in srgb, var(--plan-color, var(--color-brand)) 82%, #fff) 0%, var(--plan-color, var(--color-brand)) 60%);
  color: var(--color-white);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-align: center;
}

.top__plan-inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 16px;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(0deg, #eeeeee 0%, var(--color-white) 30%);
}

/* 祭壇の写真：カードの幅いっぱいの横長（16:9）。上の帯にくっつけて大きく見せる */
.top__plan-img {
  width: calc(100% + 48px);
  max-width: none;
  margin: 0 -24px 10px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 55%;
}

.top__plan-label {
  display: block;
  width: 150px;
  padding: 3px 20px;
  border: 1px solid var(--plan-color, var(--color-brand));
  border-radius: 100px;
  background: var(--plan-color, var(--color-brand));
  color: var(--color-white);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.top__plan-price {
  margin: 8px 0 0;
  color: var(--plan-color, var(--color-brand));
  font-family: var(--font-num);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
}

body.jaf-page main p.top__plan-price {
  margin: 8px 0 0;
  /* 共通の p の下余白（1em＝34px）で、価格と本体価格の間が空きすぎるのを防ぐ */
}
.top__plan-price span {
  font-size: 0.5em;
}

.top__plan-sub {
  margin: 4px 0 10px;
  color: var(--color-text-sub);
  font-size: 14px;
  text-align: center;
}

body.jaf-page main p.top__plan-sub {
  margin: 4px 0 10px;
}

.top__plan-btn {
  margin-top: auto;
  padding-block: 11px;
  font-size: 15px;
}

.top__plan-card .top__plan-btn {
  border-color: var(--plan-color, var(--color-brand));
  background: var(--plan-color, var(--color-brand));
}

.top__plan-card .top__plan-btn:hover {
  background: var(--color-white);
  color: var(--plan-color, var(--color-brand));
}

body.jaf-page main p.top__plan-note {
  margin: 40px 0 0;
  text-align: center;
}

@media (max-width: 767px) {
  body.jaf-page main p.top__plan-note {
    text-align: left;
    font-size: 14px;
  }
}

/* ---------- VOICE（お客様の声） ---------- */
/* 画面の端から端まで1列に並べる。指のスワイプ／マウスのドラッグで横に動かせる（JSが動けば、触っていないときは自動でゆっくり流れる） */
.top__voice-viewport {
  margin-top: 30px;
  padding-bottom: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
}

.top__voice-viewport::-webkit-scrollbar {
  display: none;
}

.top__voice-viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.top__voice-viewport.is-dragging .top__voice-card {
  pointer-events: none;
}

.top__voice-list {
  display: flex;
  width: max-content;
  padding-left: 24px;
}

.is-loop .top__voice-list {
  padding-left: 0;
}

.top__voice-card {
  position: relative;
  flex: none;
  width: 340px;
  margin-right: 24px;
  padding: 30px 28px 32px;
  border: 1px solid var(--color-brand-mint);
  border-radius: var(--radius);
  background: var(--color-brand-pale);
}

.top__voice-card::before {
  content: "“";
  position: absolute;
  top: 6px;
  right: 18px;
  color: var(--color-brand-mint);
  font-family: var(--font-mincho);
  font-size: 90px;
  line-height: 1;
}

@media (max-width: 767px) {
  .top__voice-card {
    width: 280px;
    margin-right: 16px;
    padding: 24px 18px 26px;
  }
}

.top__voice-who {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.top__voice-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-white);
}

.top__voice-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--color-brand);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.top__voice-name {
  color: var(--color-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.top__voice-name small {
  display: block;
  color: var(--color-text-sub);
  font-size: 13px;
  font-weight: 400;
}

.top__voice-title {
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-brand);
  color: var(--color-brand);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
}

body.jaf-page main p.top__voice-text {
  margin: 0;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 300;
  text-align: left;
}

/* ---------- MEMBERSHIP（「選ばれる理由」と同じ作り：画面いっぱい・写真と文章カードを重ねる・角丸・左右から近づく） ---------- */
.top__member-flex {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  width: 100%;
  max-width: 1920px;
  margin: 70px auto 0;
  overflow-x: clip;
  /* 動く前の位置で横スクロールが出ないように */
}

/* 画面右の固定ボタン（幅54px＋ホバーの動き）が出るパソコン幅では、写真がボタンの下に入らないよう右側を空ける */
@media (min-width: 1101px) {
  .top__member-flex {
    padding-right: 72px;
  }
}

@media (max-width: 767px) {
  .top__member-flex {
    display: flex;
    flex-direction: column;
    margin-top: 40px;
  }
}

/* 写真：右6列。文章カードの背面に回り、1列ぶん重なる */
.top__member-photo {
  position: relative;
  z-index: 1;
  /* 写真は文章カードの背面 */
  grid-area: 1 / 7 / 2 / 13;
  align-self: stretch;
  min-height: 420px;
}

.top__member-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* 文章カード：左7列のうち右の1列が写真に重なる */
.top__member-body {
  position: relative;
  top: 56px;
  /* 写真より少し下にずらす */
  z-index: 2;
  /* 文章カードを写真の前面に出す */
  grid-area: 1 / 1 / 2 / 8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 400px;
  margin-left: clamp(16px, 4vw, 80px);
  padding: 40px 120px 40px 56px;
  border-radius: var(--radius);
  overflow: hidden;
  border-top: 4px solid var(--color-gold);
  background: linear-gradient(135deg, var(--color-white) 0%, var(--color-gold-pale) 60%, var(--color-white) 100%);
  box-shadow: 0 8px 30px var(--color-shadow);
}
/* ゴールドカードのように、現れたあと一度だけ光が横切り、バッジがキラッと光る */
.top__member-body::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 28%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.75) 50%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-130%) skewX(-20deg);
}
.top__member-flex.is-visible .top__member-body::after {
  animation: top-member-shine 1.3s ease-in-out 1.2s 1 both;
}
@keyframes top-member-shine {
  0% {
    opacity: 1;
    transform: translateX(-130%) skewX(-20deg);
  }
  100% {
    opacity: 1;
    transform: translateX(480%) skewX(-20deg);
  }
}
/* 内側に金の細い枠線（上品な飾り） */
.top__member-body::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--color-gold-light);
  border-radius: calc(var(--radius) - 3px);
  pointer-events: none;
}
.top__member-badge {
  position: relative;
  align-self: flex-start;
  margin-bottom: 16px;
  padding: 4px 18px;
  border: 1px solid var(--color-gold);
  border-radius: 100px;
  background: var(--color-gold-pale);
  color: var(--color-gold);
  font-family: var(--font-mincho);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2em;
}
.top__member-badge::after {
  content: "";
  position: absolute;
  top: -14px;
  right: -14px;
  width: 26px;
  height: 26px;
  background: var(--color-gold);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  opacity: 0;
  transform: scale(0);
}
.top__member-flex.is-visible .top__member-badge::after {
  animation: top-member-sparkle 0.9s ease-out 1.5s 1 both;
}
@keyframes top-member-sparkle {
  0% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  40% {
    opacity: 1;
    transform: scale(1.3) rotate(45deg);
  }
  100% {
    opacity: 0;
    transform: scale(0) rotate(90deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .top__member-body::after,
  .top__member-badge::after {
    display: none;
  }
}
.top__member-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}
.top__member-tags li {
  padding: 4px 14px;
  border-radius: 100px;
  background: var(--color-brand);
  color: var(--color-white);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

@media (max-width: 991px) {
  .top__member-body {
    padding: 32px 36px;
  }
}

/* スマホ：写真の下に、文章カードを少し重ねて縦に並べる */
@media (max-width: 767px) {
  .top__member-photo {
    order: 1;
    min-height: 0;
    z-index: 10;
  }
  /* 写真は小さいので、割引の札（会員割引・長寿割引）を写真の上に重ねず、写真の下端に少し重ねて下に出す（写真が札で隠れないように） */
  .top__member-photo img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .top__member-body {
    order: 2;
    top: 0;
    min-height: 0;
    margin: 14px 16px 0;
    padding: 24px 18px 28px;
    z-index: 20;
  }
}

body.jaf-page main p.top__member-text {
  margin: 0 0 24px;
  font-size: 20px;
  font-weight: 300;
  line-height: 1.9;
  text-align: left;
}

@media (max-width: 767px) {
  body.jaf-page main p.top__member-text {
    font-size: 16px;
    text-wrap: pretty;   /* 「す。」だけが次の行に落ちないように */
  }
}

/* 写真の下に重ねる、会員割引・長寿割引の帯（元の画像に入っていた内容を文字で） */
.top__member-offer {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: min(360px, calc(100% - 28px));
  padding: 10px 14px;
  border-top: 3px solid var(--color-gold);
  border-radius: var(--radius);
  background: var(--color-card-veil);
  box-shadow: 0 4px 16px var(--color-shadow);
}
.top__member-offer-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top__member-offer-row--sub {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--color-gold-light);
}
.top__member-offer-label {
  flex: none;
  min-width: 72px;
  padding: 3px 8px;
  border: 1px solid var(--color-gold);
  border-radius: 100px;
  color: var(--color-gold);
  font-family: var(--font-mincho);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.top__member-offer-main {
  color: var(--color-urgent-dark);
  font-family: var(--font-mincho);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 700;
  line-height: 1.1;
}
.top__member-offer-main small {
  font-size: 0.6em;
}
.top__member-offer-desc {
  display: flex;
  flex-direction: column;
  color: var(--color-text);
  font-size: 11px;
  line-height: 1.4;
  text-align: start;
}
.top__member-offer-desc b {
  color: var(--color-urgent-dark);
  font-family: var(--font-mincho);
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 700;
}
.top__member-offer-desc small {
  color: var(--color-text-sub);
  font-size: 10px;
}
@media (max-width: 767px) {
  .top__member-offer {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    margin: -34px 14px 0;
    padding: 10px 12px;
  }
  .top__member-offer-label {
    min-width: 72px;
    padding: 4px 6px;
    font-size: 12px;
  }
  .top__member-offer-row {
    gap: 8px;
  }
}

.top__member-red {
  padding-bottom: 2px;
  background: linear-gradient(var(--color-gold), var(--color-gold)) left bottom / 0 2px no-repeat;
  color: var(--color-brand);
  font-family: var(--font-mincho);
  font-size: 1.5em;
  font-weight: 700;
}

/* カードが現れたあと、下線が左から右へ引かれる */
.top__member-flex.is-visible .top__member-red {
  animation: top-member-underline 1s cubic-bezier(0.4, 0, 0.2, 1) 1s forwards;
}
@keyframes top-member-underline {
  to {
    background-size: 100% 2px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .top__member-red {
    background-size: 100% 2px;
  }
  .top__member-flex.is-visible .top__member-red {
    animation: none;
  }
}

.top__member-btn {
  max-width: 320px;
  margin-top: 20px;
}

/* 画面に入ったとき、文章カードは左から・写真は右から近づいてくる */
.top__member-flex.common__approach .top__member-body,
.top__member-flex.common__approach .top__member-photo {
  opacity: 0;
  transition: opacity 0.6s ease, transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.top__member-flex.common__approach .top__member-body {
  transform: translateX(-160px);
}

.top__member-flex.common__approach .top__member-photo {
  transform: translateX(160px);
}

.top__member-flex.common__approach.is-visible .top__member-body,
.top__member-flex.common__approach.is-visible .top__member-photo {
  opacity: 1;
  transform: none;
}

@media (max-width: 767px) {
  .top__member-flex.common__approach .top__member-body {
    transform: translateX(-60px);
  }

  .top__member-flex.common__approach .top__member-photo {
    transform: translateX(60px);
  }
}

@media (prefers-reduced-motion: reduce) {

  .top__member-flex.common__approach .top__member-body,
  .top__member-flex.common__approach .top__member-photo {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- OFFERING ---------- */
/* 前後が淡い緑・白なので、ここだけ濃い緑の背景にして区切る */
.top__offer {
  background: linear-gradient(45deg, var(--color-brand) 0%, var(--color-brand-light) 100%);
}

.top__offer-text {
  margin: 40px 0 0;
  color: var(--color-white);
  text-align: center;
}

body.jaf-page main p.top__offer-text {
  margin: 40px 0 0;
  color: var(--color-white);
  font-size: 26px;
  font-weight: 300;
}

@media (max-width: 767px) {
  body.jaf-page main p.top__offer-text {
    font-size: 18px;
  }
}

.top__offer-list {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
}

@media (max-width: 767px) {
  .top__offer-list {
    gap: 12px;
  }
}

.top__offer-item {
  width: 280px;
}

.top__offer-item img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px var(--color-shadow);
}

/* ---------- FLOW（縦書きの8ステップを、左から右へ1列に並べて矢印でつなぐ） ---------- */
.top__flow-list {
  display: flex;
  gap: 40px;
  margin-top: 50px;
  padding: 4px 4px 20px;
  overflow-x: auto;
  /* 幅が足りない画面では横にスクロール */
  overflow-y: hidden;
  /* 現れる動きの途中で、縦のスクロールバーが出ないように */
}

@media (max-width: 767px) {
  .top__flow-list {
    margin-top: 36px;
  }
}

/* 横にスクロールできる幅（1100px以下）だけ出す、スワイプの案内。ステップの列の真上に重ね、横にスクロールしたらふわっと消す（画像：scroll-hint-base／scroll-hint-finger） */
.top__flow-wrap {
  position: relative;
}
.top__flow-hint {
  display: none;
}
@media (max-width: 1100px) {
  .top__flow-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: block;
    padding: 12px 18px 8px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 4px 18px var(--color-shadow);
    transform: translate(-50%, -50%);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;   /* 案内の上からでも、リストをスワイプできるように */
  }
  body.jaf-page main p.top__flow-hint {
    margin: 0;
  }
  /* 横にスクロールしたら、ふわっと消す（一度消えたら出さない） */
  .top__flow-hint.is-hidden,
  body.jaf-page main p.top__flow-hint.is-hidden {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 8px));
  }
  .top__flow-list {
    margin-top: 36px;
  }
}
/* スクロール案内の画像：矢印と手と文字（ベース）の上に、人さし指だけを重ねて、指だけを付け根から左右に少し倒す */
.top__flow-hint-pic {
  position: relative;
  display: block;
  width: 150px;
  aspect-ratio: 480 / 500;
}
.top__flow-hint-base,
.top__flow-hint-finger {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.top__flow-hint-finger {
  transform-origin: 44.7% 48%;   /* 指の付け根 */
  animation: top-flow-hint-swing 2.4s ease-in-out infinite;
}
@keyframes top-flow-hint-swing {
  0%, 100% {
    transform: rotate(0deg);
  }
  30% {
    transform: rotate(-5deg);
  }
  70% {
    transform: rotate(5deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .top__flow-hint-finger {
    animation: none;
  }
}

.top__flow-item {
  position: relative;
  display: flex;
  flex: 1 0 96px;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  min-height: 340px;
  padding: 18px 8px 22px;
  border: 1px solid var(--color-brand);
  border-radius: var(--radius);
  background: var(--color-white);
  color: var(--color-brand);
}

/* 次のステップへの矢印（ステップとステップの間） */
.top__flow-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -28px;
  width: 14px;
  height: 14px;
  border-top: 3px solid var(--color-brand-light);
  border-right: 3px solid var(--color-brand-light);
  transform: translateY(-50%) rotate(45deg);
}

.top__flow-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -34px;
  width: 24px;
  height: 3px;
  background: var(--color-brand-light);
  transform: translateY(-50%);
}

.top__flow-num {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-brand);
  color: var(--color-white);
  font-family: var(--font-num);
  font-size: 18px;
  line-height: 36px;
  text-align: center;
}

.top__flow-text {
  flex: 1;
  max-height: 260px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.15em;
  line-height: 1.8;
  writing-mode: vertical-rl;
  /* 縦書き */
}

/* タイムライン：画面に入ったら、1から順に1つずつ素早く現れ、現れたあとに次への矢印が出る */
.common__timeline .top__flow-item {
  opacity: 0;
  transform: translateY(14px);
  /* リストの下の余白(20px)に収まる量だけ動かす */
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i) * 0.22s);
}

.common__timeline .top__flow-item::before,
.common__timeline .top__flow-item::after {
  opacity: 0;
  transition: opacity 0.25s ease;
  transition-delay: calc(var(--i) * 0.22s + 0.2s);
}

.common__timeline.is-visible .top__flow-item {
  opacity: 1;
  transform: none;
}

.common__timeline.is-visible .top__flow-item::before,
.common__timeline.is-visible .top__flow-item::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {

  .common__timeline .top__flow-item,
  .common__timeline .top__flow-item::before,
  .common__timeline .top__flow-item::after {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* TOPの声カードのタイトルリンク（お客様の声の詳細へ）。カード全体を押せるように広げる */
.top__voice-link {
  color: inherit;
}

.top__voice-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.top__voice-link:hover {
  opacity: 0.75;
}

/* ---------- ゴールドのアクセント（ボタンのホバーなど。控えめに） ---------- */
.top__news-more .common__btn:hover,
.top__plan-card .top__plan-btn:hover,
.top__member-btn:hover {
  border-color: var(--color-gold);
}
.top__plan-name {
  border-bottom: 2px solid var(--color-gold-light);
}

/* =====================================================================
   【スイッチ】TOP組合員情報の「葬儀基本料が割引に。」を「葬儀基本料から割引いたします。」に差し替え（2026-12-01 修正02）
   本番の固定ページ本文は貼り直さず、CSSだけで差し替える。
   段落の素の文字は大きさ0で消し、<br> も消す。強調の「割引」（.top__member-red・金色の下線の動きつき）はそのまま残し、
   その前を ::before「対象の方は、／葬儀基本料から」、後ろを ::after「いたします。／参列者用の…」で出す。
   ★ 元に戻すときは、このブロック（ここから下の「ここまで」まで）を消して、functions.php の $ver を上げる
   ===================================================================== */
html body.jaf-page main p.top__member-text.top__member-text {
  font-size: 0;
  line-height: 0;
  letter-spacing: 0;   /* 消した文字にも字間が残り「割引」の前後にすき間ができるため */
}
html body.jaf-page main p.top__member-text br {
  display: none;
}
html body.jaf-page main p.top__member-text.top__member-text::before,
html body.jaf-page main p.top__member-text.top__member-text::after {
  font-size: var(--fs-lead);
  line-height: 1.9;
  letter-spacing: 0.05rem;   /* body の 0.05em（16px基準＝0.8px）と同じ */
  white-space: pre-line;
}
html body.jaf-page main p.top__member-text.top__member-text::before {
  content: "対象の方は、\A葬儀基本料から";
}
html body.jaf-page main p.top__member-text.top__member-text::after {
  content: "いたします。\A参列者用の無料送迎バスもご用意しています。";
}
html body.jaf-page main p.top__member-text .top__member-red {
  font-size: calc(var(--fs-lead) * 1.5);   /* 親が0なので em ではなく元の大きさ（1.5倍）を直接指定 */
  line-height: 1.9;
  letter-spacing: 0.05rem;
}
/* ===== 「葬儀基本料が割引に。」差し替えスイッチ ここまで ===== */
