/*
Theme Name: Keisuisanmei
Author: KU Connect
Description: ケイスイの算命学宿命鑑定
Version: 1.0
*/

:root {
  --teal: #F26879;
  --teal-dark: #D14C5D;
  --peach: #F5E9D0;
  --peach-line: #B8872B;
  --cream: #F7F2F2;
  --footer-bg: #FAEEF1;
  --bg: #FFFFFF;
  --card-bg: #FFFFFF;
  --ink: #3A2E28;
  --ink-strong: #14100D;
  --body-text: #7C7067;
  --line: #EDE3D4;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", sans-serif;
  --measure: 1120px;
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans);
  font-size: 15px; line-height: 1.9; -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--cream { background: var(--cream); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal); color: #fff; font-size: 14px; font-weight: 700;
  letter-spacing: .02em; padding: 13px 30px; border-radius: 4px; text-decoration: none;
  border: 1px solid var(--teal); transition: background .2s ease, transform .15s ease;
}
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn--outline { background: transparent; color: var(--teal); }
.btn--outline:hover { background: var(--teal); color: #fff; }
.btn--sm { padding: 9px 22px; font-size: 13px; }

/* 1段目右「ご予約はこちら」のみ金色に（2026-08-08、オーナー依頼） */
#headerCta { background: var(--peach-line); border-color: var(--peach-line); }
#headerCta:hover { background: #9c7024; border-color: #9c7024; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
}
.top-bar { border-bottom: 1px solid var(--line); }
@media (max-width: 899px) { .top-bar { display: none; } }
.top-bar__inner { max-width: var(--measure); margin: 0 auto; padding: 10px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.top-bar__kicker { font-size: 13px; color: var(--teal); font-weight: 700; margin: 0; }
.nav-bar__inner { max-width: var(--measure); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.brand__logo { height: 32px; width: auto; display: block; }
nav.main-nav { display: none; }
@media (min-width: 900px) {
  nav.main-nav { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; flex: 1; justify-content: flex-end; }
  nav.main-nav a { text-decoration: none; font-size: 14px; color: var(--body-text); }
  nav.main-nav a:hover { color: var(--teal); }
  .hamburger { display: none !important; }
}
.hamburger { background: none; border: none; width: 28px; height: 20px; position: relative; cursor: pointer; padding: 0; flex: none; }
.hamburger span { position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); border-radius: 1px; transition: transform .25s ease, opacity .25s ease; }
.hamburger span:nth-child(1){ top:0 } .hamburger span:nth-child(2){ top:9px } .hamburger span:nth-child(3){ top:18px }
.hamburger[aria-expanded="true"] span:nth-child(1){ transform: translateY(9px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2){ opacity:0; }
.hamburger[aria-expanded="true"] span:nth-child(3){ transform: translateY(-9px) rotate(-45deg); }
.mobile-nav { max-height: 0; overflow: hidden; transition: max-height .3s ease; border-top: 1px solid transparent; }
.mobile-nav.is-open { max-height: 320px; border-top-color: var(--line); }
.mobile-nav ul { list-style: none; margin: 0; padding: 4px 24px 16px; display: flex; flex-direction: column; }
.mobile-nav a { display: block; padding: 11px 0; text-decoration: none; font-size: 14px; border-bottom: 1px solid var(--line); color: var(--ink); }
.mobile-nav li:last-child a { border-bottom: none; }
@media (min-width: 900px) { .mobile-nav { display: none; } }

/* ---------- Hero（Hero001.png背景、2026-08-08 メインメニュー直下に配置） ---------- */
.hero {
  position: relative; padding: 0; min-height: 420px; display: flex; align-items: center;
  background-image: url('assets/images/hero-bg.png');
  background-size: 1440px auto; background-position: center center; background-repeat: no-repeat;
}
/* hero__text用のコンテナは、背景画像（1440px幅・中央寄せ）と同じ基準（max-width 1440px・
   中央寄せ）にすることで、画像の実際の左端とテキストの左端を一致させる（2026-08-08、
   オーナー指摘: テキストは画像の中で左側に来てほしい）。
   width:100%が無いとflexアイテムとして中身(hero__text)に合わせて縮んでしまい、
   margin:autoで箱ごと中央寄せされてテキストが中央に見えてしまうため必須 */
.hero .wrap { width: 100%; max-width: 1440px; margin: 0 auto; }
.hero__grid { display: flex; justify-content: flex-start; }
.hero__text {
  max-width: 480px; background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(4px); border-radius: 6px; padding: 32px 30px;
}
.hero__kicker { font-size: 13px; color: var(--teal); font-weight: 700; margin-bottom: 12px; }
.hero__title { font-size: clamp(26px, 5.4vw, 36px); font-weight: 700; line-height: 1.5; color: var(--ink); margin-bottom: 18px; }
.hero__lede { font-size: 14px; color: rgb(184, 135, 43); margin-bottom: 28px; }
.hero__card { border-top: 1px solid var(--line); padding-top: 24px; }
.hero__card h2 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.hero__card p { color: rgb(184, 135, 43); margin-bottom: 20px; }
@media (min-width: 860px) {
  .hero { min-height: 560px; }
  .hero__text { padding: 40px 38px; }
}
@media (max-width: 640px) {
  .hero__text { max-width: 100%; }
  /* 2026-08-16 オーナー依頼で半透明背景を一時非表示（元の設定はhero__textの
     background/backdrop-filterに残置。戻す場合はこの1行を削除するだけでよい） */
  .hero__text { background: transparent; backdrop-filter: none; }
  /* 2026-08-16 オーナー依頼でモバイルのみ文字色を変更 */
  .hero__kicker {
    color: red; display: inline-block; padding: 8px 12px; border-radius: 6px;
    background: color-mix(in srgb, var(--bg) 50%, transparent); backdrop-filter: blur(4px);
  }
  .hero__lede { color: #4b3621; }
  .hero__title { font-size: 22px; }
  .hero__title-br--desktop { display: none; }
  .hero__card { display: none; }
  .hero {
    background-position: calc(50% - 160px) center; background-size: cover;
    align-items: flex-end; min-height: 650px;
  }
}

/* ---------- Hero badge (CREA掲載、front-page.php。2026-09-16オーナー依頼)
   PC/iPad幅=右下、モバイル(640px以下)=やや小さく左上 ---------- */
.hero__badge {
  position: absolute; right: 24px; bottom: 24px; z-index: 5;
  width: 285px; height: 285px; display: block;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .18));
  transition: transform .2s ease;
}
.hero__badge:hover { transform: scale(1.04); }
.hero__badge img { width: 100%; height: 100%; display: block; }
/* 1440px超のワイド画面では背景画像（1440px固定幅、中央寄せ）の右端より外に出ないよう追従させる
   （.heroはフル幅、画像だけ1440pxで中央寄せのため隙間ができる。50% - 720pxで画像の右端を算出） */
@media (min-width: 1441px) {
  .hero__badge { right: calc(50% - 720px + 24px); }
}
@media (max-width: 640px) {
  .hero__badge { width: 195px; height: 195px; top: 53px; left: 16px; right: auto; bottom: auto; }
}

/* ---------- Reserve intro (お問い合わせ / お試し宿命性格鑑定、Header直下) ---------- */
.reserve-intro { padding: 36px 0 0; }
.reserve-intro--spaced { padding-bottom: 60px; }
.reserve-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .reserve-grid { grid-template-columns: repeat(2, 1fr); } }
.reserve-grid--single { max-width: 420px; margin: 0 auto; }
@media (min-width: 640px) { .reserve-grid--single { grid-template-columns: 1fr; } }
.reserve-box {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  border-radius: 6px; border: 1.5px solid; padding: 26px 22px;
}
.reserve-box__title { font-size: 16px; font-weight: 700; }
.reserve-box__img { width: 100%; max-width: 280px; height: auto; }
.reserve-box__img--lg { max-width: 380px; }
.reserve-box__img--sm { max-width: 150px; }
.reserve-box--a { border-color: var(--peach-line); background: color-mix(in srgb, var(--peach) 55%, transparent); }
.reserve-box--a .btn--outline { color: var(--peach-line); border-color: var(--peach-line); }
.reserve-box--a .btn--outline:hover { background: var(--peach-line); color: #fff; }
.reserve-box--b { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 8%, transparent); }

/* ---------- Lede copy (単独コピー文) ---------- */
.lede-copy { text-align: left; width: max-content; max-width: 100%; font-size: clamp(16px, 2.4vw, 19px); font-weight: 700; line-height: 1.9; color: var(--ink); margin: 0 auto; }

/* ---------- Detailed voice (鑑定後のお客様の声、長文) ---------- */
#voice-detailed { background: rgb(247, 242, 242); }
#voice-detailed .card-grid { margin-top: 56px; }
.voice-detail-grid { display: grid; grid-template-columns: 1fr; gap: 28px; max-width: 760px; margin: 0 auto; }
.voice-detail { background: var(--card-bg); border: 1px solid var(--line); border-radius: 6px; padding: 28px 26px; }
.voice-detail__name { font-size: 15px; font-weight: 700; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.voice-detail__body p { font-size: 14px; color: var(--ink-strong); margin-bottom: 1em; }
.voice-detail__body p:last-child { margin-bottom: 0; }

/* ---------- Section heading with dashed rule ---------- */
.section-heading { display: flex; align-items: center; gap: 18px; justify-content: center; margin-bottom: 56px; }
.section-heading::before, .section-heading::after { content: ""; flex: 1; max-width: 120px; border-top: 1px dashed var(--peach-line); }
.section-heading h2 { font-size: clamp(18px, 3vw, 21px); font-weight: 700; white-space: nowrap; }
.section-heading__note { display: inline-block; font-size: 13px; font-weight: 400; color: var(--peach-line); white-space: normal; margin-top: 6px; }
.section-sub { text-align: center; color: var(--body-text); font-size: 14px; margin: -28px 0 44px; }
.section-sub--gold { color: var(--peach-line); font-size: 16px; font-weight: 700; }
.section-sub.section-sub--top-gap { margin-top: 24px; }
.section-sub--left { text-align: left; width: max-content; max-width: 100%; margin-left: auto; margin-right: auto; }

/* ---------- 幅を内容(最長行)に合わせて中央配置しつつ、テキストは左揃えにする汎用クラス ---------- */
.text-left-fit { text-align: left; width: max-content; max-width: 100%; margin-left: auto; margin-right: auto; }

/* ---------- Icon grid (worries / value props) ---------- */
.icon-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 18px; }
@media (min-width: 620px) { .icon-grid--6 { grid-template-columns: repeat(3, 1fr); } .icon-grid--5 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .icon-grid--6 { grid-template-columns: repeat(6, 1fr); } .icon-grid--5 { grid-template-columns: repeat(5, 1fr); } }
.icon-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.icon-circle {
  width: 84px; height: 84px; border-radius: 50%; background: var(--peach);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.icon-circle--plain { background: var(--cream); }
.icon-circle svg { width: 36px; height: 36px; stroke: var(--peach-line); fill: none; stroke-width: 1.5; }
.icon-circle--plain svg { stroke: var(--teal); }
.icon-item span { font-size: 13px; color: var(--body-text); line-height: 1.7; }

.callout {
  margin-top: 40px; text-align: center; background: var(--cream); border: 1px solid var(--line);
  border-radius: 999px; padding: 16px 28px; font-size: 14px; color: var(--body-text);
}
@media (max-width: 600px) { .callout { border-radius: 6px; } }
.callout--left { text-align: center; border-radius: 6px; margin-top: 0; }
.callout--gold { background: color-mix(in srgb, var(--teal) 8%, transparent); border-color: var(--teal); color: rgb(58, 46, 40); margin-bottom: 40px; font-size: 15px; }

/* ---------- Split content (text + image) ---------- */
.split { display: flex; flex-direction: column; gap: 32px; align-items: center; }
.split__text h2, .split__img h2 { font-size: clamp(20px, 3vw, 24px); font-weight: 700; margin-bottom: 18px; }
.intro-logo { height: 40px; width: auto; margin-bottom: 20px; }
.term-underline { text-decoration: underline; text-decoration-color: var(--teal); text-decoration-thickness: 4px; text-underline-offset: 3px; }
.term-underline--gold {
  text-decoration: none; padding: 0 2px; border-radius: 2px;
  background: linear-gradient(transparent 68%, color-mix(in srgb, var(--peach-line) 40%, transparent) 68%);
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.term-underline--pink {
  text-decoration: none; padding: 0 2px; border-radius: 2px;
  background: linear-gradient(transparent 68%, color-mix(in srgb, var(--teal) 40%, transparent) 68%);
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.body-text__img { display: block; width: 100%; max-width: 340px; margin: 24px auto; border-radius: 6px; }
.body-text__break { margin-top: 1.9em; }
.term-badge--gold { display: inline-block; background: var(--peach-line); color: #fff; padding: 1px 9px; border-radius: 4px; font-weight: 700; }
/* コーラル(#ff8471)は本家サイトのde_pinkクラス（page-profile.php等）で使われている配色 */
.term-badge--coral { display: inline-block; background: #ff8471; color: #fff; padding: 1px 9px; border-radius: 4px; font-weight: 700; }

/* ---------- Intro single column（ケイスイ紹介 + 家族イラスト、1カラム） ---------- */
.intro-single { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.intro-single__text { max-width: 640px; text-align: left; }
.intro-image-stack { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 24px auto; }
.intro-image-stack__item { width: 100%; height: auto; display: block; }
.intro-single__gold-lede { color: var(--peach-line); font-size: 18px; font-weight: 700; text-align: center; margin: 0 0 40px; }
.split__text .body-text p { color: var(--body-text); margin-bottom: 1em; }
.split__img img { border-radius: 6px; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
/* 透過イラスト用（写真ではないため角丸トリミングせず、そのままのアスペクト比で表示） */
.split__img--contain img { border-radius: 0; aspect-ratio: auto; object-fit: contain; width: 75%; margin: 0 auto; display: block; }
/* 写真をトリミングせず原寸のアスペクト比のまま表示（幅は列に収まる範囲で自動） */
.split__img--natural img { width: auto; max-width: 100%; aspect-ratio: auto; object-fit: contain; margin: 0 auto; }
/* 小さめの丸型写真（page-profile.phpのプロフィール写真、keisuisanmei.com本家の見せ方に合わせる） */
.split__img--round { text-align: center; }
.split__img--round img { width: 180px; height: 180px; aspect-ratio: 1/1; border-radius: 50%; object-fit: cover; margin: 0 auto; }
.split__img--round .course-card__label { justify-content: center; }
.profile-photo { width: 270px; height: 270px; object-fit: cover; border-radius: 6px; margin: 24px auto 0; display: block; }
.profile-title { font-size: 14px; font-weight: 700; color: var(--body-text); line-height: 1.7; margin: 16px 0 28px; text-align: center; }
/* 文章（body-text）以外を中央揃え（2026-08-08 オーナー依頼） */
#profile .wrap { text-align: center; }
#profile .body-text { text-align: left; }
#profile .body-text p { margin-bottom: 1em; }
@media (min-width: 860px) {
  .split { flex-direction: row; gap: 64px; }
  .split > div { flex: 1 1 50%; }
  .split--reverse { flex-direction: row-reverse; }
}

/* 五行図（算命学とはセクション） */
.sanmei-gogyou-img { width: 100%; max-width: 320px; height: auto; margin: 32px auto; display: block; }

/* ---------- Menu cards ---------- */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 620px) { .card-grid--4 { grid-template-columns: repeat(2, 1fr); } .card-grid--3 { grid-template-columns: repeat(1, 1fr); } .card-grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .card-grid--4 { grid-template-columns: repeat(4, 1fr); } .card-grid--3 { grid-template-columns: repeat(3, 1fr); } .card-grid--2 { grid-template-columns: repeat(2, 1fr); } }
.menu-card { background: var(--card-bg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.menu-card img { aspect-ratio: 4/3; object-fit: cover; }
.menu-card__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.menu-card__body h3 { font-size: 15px; font-weight: 700; line-height: 1.6; }
.menu-card__body p { font-size: 13px; color: var(--body-text); flex: 1; }
.menu-card__body .btn { align-self: flex-start; margin-top: 4px; }
.menu-card--price .menu-card__body { padding: 26px 22px; align-items: flex-start; }
.menu-card__meta { font-size: 14px; font-weight: 700; color: var(--teal); }

/* 鑑定カードのタイトルバー・画像（page-menu.php）
   ゴールドグラデーションは本家keisuisanmei.com/kantei/の実サイトで使われている配色をそのまま使用 */
.menu-card--price { border-color: #bc9d5c; }
.menu-card--price .menu-card__body h3 { background: linear-gradient(180deg, #F0E19D 0%, #C09C4E 100%); color: #fff; text-align: center; padding: 10px 14px; margin: -26px -22px 4px; letter-spacing: .04em; }
.menu-card--price .menu-card__body img { width: 100%; border-radius: 4px; margin: 2px 0; }
.menu-card--price .btn--outline { color: #bc9d5c; border-color: #bc9d5c; }
.menu-card--price .btn--outline:hover { background: #bc9d5c; color: #fff; }
.menu-card--price .menu-card__body .btn { align-self: center; }

/* ---------- Generic page hero (page-menu.php 等の下層ページ見出し) ---------- */
.page-hero { padding: 56px 0 8px; text-align: center; }
.page-hero__title { font-size: clamp(19px, 3vw, 23px); font-weight: 700; }

/* 背景写真つきページヒーロー（page-menu.php等、個別ページのみ適用するモディファイア） */
.page-hero--photo {
  min-height: 240px; display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center; padding: 40px 0;
}
.page-hero__box {
  display: inline-block; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(4px); border-radius: 6px; padding: 16px 28px;
}
@media (min-width: 860px) { .page-hero--photo { min-height: 320px; } }
.gold-text { color: var(--peach-line); }

/* プロフィールページ専用Hero背景（2026-08-16、Frontページのプロフィールセクションとは
   別の画像を使用。モバイルは専用の縦長トリミング画像に差し替え）
   実画像サイズ: PC用1440x540, モバイル用1080x1411。1440px以上は原寸(1440px auto)で
   中央固定表示、1440px未満は幅100%に追従させ、高さはaspect-ratioで画像の縦横比に
   自動追従させることで、どの幅でも画像全体がクロップされず表示される */
.page-hero--profile {
  background-image: url('assets/images/profile-header-banner.jpg');
  background-position: center center; background-repeat: no-repeat;
  background-size: 100% auto; aspect-ratio: 1440 / 540; min-height: 0;
}
@media (min-width: 1440px) {
  .page-hero--profile { background-size: 1440px auto; aspect-ratio: auto; min-height: 540px; }
}
@media (max-width: 640px) {
  .page-hero--profile {
    background-image: url('assets/images/mobile-profile-header-banner.jpg');
    background-size: 100% auto; aspect-ratio: 1080 / 1411; min-height: 0;
  }
}

/* ---------- Testimonials ---------- */
.testi-card { background: var(--card-bg); border: 1px solid var(--line); border-radius: 6px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.testi-head { display: flex; align-items: center; gap: 12px; }
.testi-head img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; }
.testi-head strong { display: block; font-size: 14px; }
.testi-head span { font-size: 12px; color: var(--body-text); }
.testi-card p { font-size: 14px; color: var(--ink-strong); }
.testi-more { text-align: center; margin-top: 34px; }

/* ---------- Final CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; text-align: center; padding: 76px 24px;
  background:
    radial-gradient(420px 260px at 92% 8%, rgba(242,104,121,.16), transparent 70%),
    radial-gradient(420px 260px at 6% 96%, rgba(184,135,43,.16), transparent 70%),
    linear-gradient(180deg, var(--cream), #fff);
}
.cta-band h2 { font-size: clamp(19px, 3vw, 23px); font-weight: 700; line-height: 1.8; margin-bottom: 30px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); padding: 60px 0 26px; }
.footer-simple { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-bottom: 28px; text-align: center; }
.footer-brand__logo { height: 36px; width: auto; display: block; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
.footer-nav a { text-decoration: none; font-size: 13px; color: var(--ink); }
@media (min-width: 720px) {
  .footer-simple { flex-direction: row; justify-content: space-between; text-align: left; }
  .footer-nav ul { justify-content: flex-end; }
}
.footer-banners { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 28px; }
.footer-banners img { width: 100%; max-width: 260px; height: auto; display: block; border-radius: 6px; }
@media (min-width: 620px) { .footer-banners { flex-direction: row; justify-content: center; } }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 20px; text-align: center; font-size: 12px; color: var(--body-text); }
.footer-legal { display: flex; justify-content: center; gap: 24px; margin-top: 12px; }
.footer-legal a { text-decoration: none; font-size: 12px; color: var(--body-text); }

/* ---------- Back to top button（全ページ共通、footer.php） ---------- */
.back-to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: var(--peach-line); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg { width: 16px; height: 16px; fill: currentColor; }
.back-to-top:hover { background: color-mix(in srgb, var(--peach-line) 85%, black); }

/* ---------- Contact page (page-contact.php) ---------- */
.wrap--narrow { max-width: 640px; }
.wrap--body { max-width: 760px; }
.contact-hero { padding: 56px 0 8px; text-align: center; }
.contact-hero__title { font-size: clamp(19px, 3vw, 23px); font-weight: 700; line-height: 1.8; }
.contact-hero__br { display: none; }
@media (max-width: 480px) { .contact-hero__br { display: inline; } }
.contact-intro { text-align: center; font-size: 14px; color: var(--body-text); margin-bottom: 32px; }

.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form__checks {
  display: flex; flex-wrap: wrap; gap: 10px 24px; border: 1px solid var(--line);
  border-radius: 4px; padding: 18px 20px; margin: 0;
}
.contact-form__checks-legend { font-size: 12px; color: var(--body-text); padding: 0 6px; }
.check-item { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check-item input { width: 16px; height: 16px; accent-color: var(--teal); }

.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.form-field .required { color: var(--teal); margin-left: 2px; }
.form-field__hint { font-size: 11px; font-weight: 400; color: var(--body-text); margin-left: 2px; }
.form-field input, .form-field textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--card-bg);
  border: 1px solid var(--line); border-radius: 3px; padding: 11px 14px; width: 100%;
}
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.form-field textarea { resize: vertical; }

.contact-form__note { font-size: 12px; color: var(--body-text); margin: 0; }
.contact-form .btn { align-self: center; border: none; cursor: pointer; margin-top: 8px; }
/* ハニーポット（bot対策）: 人間には見えない位置に隠す。display:noneはbotに無視されやすいため位置ずらしで隠す */
.contact-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form__success { text-align: center; font-size: 15px; color: var(--ink); background: var(--card-bg); border: 1px solid var(--line); border-radius: 6px; padding: 32px 24px; }
.contact-form__errors { background: color-mix(in srgb, var(--teal) 10%, transparent); border: 1px solid var(--teal); border-radius: 4px; padding: 14px 18px; margin-bottom: 20px; }
.contact-form__errors ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.contact-form__errors li { font-size: 13px; color: var(--teal-dark); }

/* ---------- Body text center variant + emphasis line ---------- */
.body-text--center { text-align: center; max-width: 760px; margin: 0 auto; }
.body-text--center p { margin-bottom: 1.1em; }
/* モバイル幅のみ左寄せにする（page-media.php、2026-09-16オーナー依頼。他ページのbody-text--centerには影響しない） */
@media (max-width: 640px) { .body-text--mobile-left { text-align: left; } }
.body-text__emphasis { font-size: 17px; font-weight: 700; color: var(--ink); margin: 1.4em 0; }
.body-text__bold p { font-weight: 700; }
.body-text__left { text-align: left; }
.body-text__left--narrow { max-width: 600px; margin: 1.6em auto 0; }

/* ---------- Worry list (箇条書き) ---------- */
.worry-list { list-style: none; margin: 0 auto 32px; padding: 0; max-width: 640px; display: flex; flex-direction: column; gap: 12px; }
.worry-list li {
  font-size: 14px; color: var(--body-text); padding: 14px 18px; background: #fff;
  border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 4px 12px rgba(58, 46, 40, .08);
  position: relative; padding-left: 32px;
}
.worry-list li::before { content: "■"; position: absolute; left: 12px; font-size: 16px; top: 13px; color: var(--peach-line); font-weight: 700; }

/* ---------- 3-step numbered cards（keisuisanmei.com現行サイトの装飾に合わせた枠+見出し帯+数字浮き出し） ---------- */
.step-grid { display: grid; grid-template-columns: 1fr; gap: 44px 22px; text-align: center; max-width: 760px; margin: 50px auto 0; }
@media (min-width: 720px) { .step-grid { grid-template-columns: repeat(3, 1fr); } }
.step-item { position: relative; border: 1px solid var(--peach-line); border-radius: 6px; background: var(--card-bg); }
.step-item__num { position: absolute; top: -28px; left: 0; right: 0; font-size: 32px; font-weight: 700; color: var(--peach-line); line-height: 1; }
.step-item__head { background: var(--peach); padding: 22px 16px 14px; border-bottom: 2px dashed var(--peach-line); border-radius: 5px 5px 0 0; }
.step-item h3 { font-size: 16px; font-weight: 700; margin: 0; color: var(--ink); }
.step-item p { font-size: 13px; color: var(--body-text); padding: 18px 16px; margin: 0; }

/* ---------- Twin grid (宿命/育ち 2軸) ---------- */
.twin-grid { display: grid; grid-template-columns: 1fr; gap: 18px; margin: 0 auto 32px; max-width: 760px; }
@media (min-width: 640px) { .twin-grid { grid-template-columns: repeat(2, 1fr); } }
.twin-item { background: var(--card-bg); border: 1px solid var(--line); border-radius: 6px; padding: 26px 22px; text-align: center; }
.twin-item h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.twin-item p { font-size: 13px; color: var(--body-text); }

/* ---------- Change list (鑑定後の変化) ---------- */
.change-list { list-style: none; margin: 0 auto; padding: 0; max-width: 640px; display: flex; flex-direction: column; gap: 12px; }
.change-list li {
  font-size: 14px; color: var(--body-text); padding: 14px 18px; background: #fff;
  border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 4px 12px rgba(58, 46, 40, .08);
  position: relative; padding-left: 40px;
}
.change-list li strong { color: var(--ink); }
.change-list__icon { position: absolute; left: 14px; top: 15px; width: 16px; height: 16px; fill: var(--peach-line); }

/* ---------- Testimonial quote card (お客様の声、写真なし版) ---------- */
.testi-card--quote { justify-content: center; }
.testi-card--quote p { font-size: 14px; color: var(--ink-strong); }

/* ---------- Q&A ---------- */
.qa-list { display: flex; flex-direction: column; gap: 16px; }
.qa-item { background: var(--card-bg); border: 1px solid var(--line); border-radius: 4px; padding: 20px 22px; }
.qa-item__q { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.qa-item__q::before { content: "Q. "; color: var(--teal); }
.qa-item__a { font-size: 13px; color: var(--body-text); }
.qa-item__a::before { content: "A. "; color: var(--peach-line); font-weight: 700; }

/* ---------- Legal list (特定商取引法、ホームページ埋め込み版) ---------- */
.legal-list { display: grid; grid-template-columns: 1fr; gap: 4px 20px; font-size: 13px; }
@media (min-width: 640px) { .legal-list { grid-template-columns: 180px 1fr; } }
.legal-list dt { color: var(--body-text); padding: 12px 0 2px; border-top: 1px solid var(--line); }
.legal-list dd { margin: 0; padding: 12px 0 2px; border-top: 1px solid var(--line); color: var(--ink); }
@media (min-width: 640px) { .legal-list dt, .legal-list dd { border-top: 1px solid var(--line); } }
.legal-note { font-size: 11px; color: var(--body-text); margin-top: 14px; }

/* ---------- Legal sections (Privacy Policyページ、page-privacy.php) ---------- */
.legal-sections { display: flex; flex-direction: column; gap: 26px; }
.legal-section h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.legal-section p { font-size: 13px; color: var(--body-text); }

/* ---------- Page hero subtitle (page-courses.php等) ---------- */
.page-hero__sub { font-size: 14px; color: var(--body-text); margin-top: 8px; }

/* ---------- Course card (page-courses.php)
   コーラル(#ff8471)は本家keisuisanmei.com/courses/の実サイトで使われているアクセントカラーをそのまま使用 ---------- */
.course-card { background: var(--card-bg); border: 1px solid #ff8471; border-radius: 6px; padding: 26px 24px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.course-card__title { background: #ff8471; color: #fff; text-align: center; font-size: 16px; font-weight: 700; padding: 10px 14px; margin: -26px -24px 4px; border-radius: 5px 5px 0 0; }
/* 画像は枠内いっぱいに縁なしで表示（keisuisanmei.com本家の見せ方に合わせ、カード上下のpaddingを打ち消して縦横フチなしに） */
.course-card__img { width: calc(100% + 48px); max-width: none; aspect-ratio: 3/2; object-fit: cover; display: block; border-radius: 0; margin: -12px -24px -8px; }
.course-card h3 { font-size: 16px; font-weight: 700; }
.course-card__lede { font-size: 12px; color: var(--body-text); margin-bottom: 6px; }
.course-card__label { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--peach-line); font-weight: 700; letter-spacing: .04em; margin-top: 6px; }
.course-card__label-icon { width: 12px; height: 12px; fill: currentColor; flex-shrink: 0; }
.course-card__list { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.course-card__list li { font-size: 12px; color: var(--body-text); padding-left: 14px; position: relative; }
.course-card__list li::before { content: "-"; position: absolute; left: 0; color: var(--peach-line); }
.course-card__meta { font-size: 12px; color: var(--body-text); }
.course-card__price { font-size: 16px; font-weight: 700; color: var(--teal); margin-bottom: 6px; }
.course-card .btn { align-self: center; }
.course-card .btn--outline { color: #ff8471; border-color: #ff8471; }
.course-card .btn--outline:hover { background: #ff8471; color: #fff; }

/* 一般向け3コースの配色をコース名にちなんだ色に変更（本家は3コースとも同一のコーラルだが、視認性向上のためコース別に差別化） */
.course-card--pearl { border-color: #C9BFA9; }
.course-card--pearl .course-card__title { background: linear-gradient(180deg, #FFFFFF 0%, #E3DCCF 100%); color: var(--ink); }
.course-card--pearl .btn--outline { color: #A89A7A; border-color: #A89A7A; }
.course-card--pearl .btn--outline:hover { background: #A89A7A; color: #fff; }
.course-card--gold { border-color: #bc9d5c; }
.course-card--gold .course-card__title { background: linear-gradient(180deg, #F0E19D 0%, #C09C4E 100%); color: #fff; }
.course-card--gold .btn--outline { color: #bc9d5c; border-color: #bc9d5c; }
.course-card--gold .btn--outline:hover { background: #bc9d5c; color: #fff; }
.course-card--platinum { border-color: #9C9CA1; }
.course-card--platinum .course-card__title { background: linear-gradient(180deg, #DADADD 0%, #8B8B90 100%); color: #fff; }
.course-card--platinum .btn--outline { color: #8B8B90; border-color: #8B8B90; }
.course-card--platinum .btn--outline:hover { background: #8B8B90; color: #fff; }

/* コースセクションのバナー画像（Course_Tamariba.jpg／Course_sanmei.jpg） */
.course-section-banner { width: 100%; height: auto; border-radius: 6px; margin: 16px 0; display: block; }
.course-section-banner--sm { width: 100%; max-width: 330px; margin: 16px auto; }

/* ---------- Reading detail + menu box pairs (page-menu.php)
   HTML order is 説明(reading-detail) → 申し込むBOX(menu-card) so mobile shows that
   sequence naturally; the desktop media query swaps visual order via `order` so the
   box sits left and the description sits right. ---------- */
.kantei-rows { display: flex; flex-direction: column; gap: 40px; }
.kantei-row { display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 110px; }
.reading-detail { padding: 26px 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--card-bg); }
.reading-detail h3 { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
@media (min-width: 860px) {
  .kantei-row { flex-direction: row; align-items: stretch; gap: 32px; }
  .kantei-row .menu-card { order: 1; flex: 0 0 320px; }
  .kantei-row .reading-detail { order: 2; flex: 1; }
}

/* ---------- Blog card (page-blog.php) ---------- */
.blog-card { background: var(--card-bg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.blog-card__thumb { display: block; }
.blog-card__thumb img { aspect-ratio: 16/10; object-fit: cover; }
.blog-card__body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.blog-card__date { font-size: 11px; color: var(--body-text); }
.blog-card__body h3 { font-size: 15px; font-weight: 700; line-height: 1.6; }
.blog-card__body h3 a { text-decoration: none; }
.blog-card__body p { font-size: 13px; color: var(--body-text); }

/* ---------- Media coverage gallery (page-media.php)
   雑誌ページ等の画像はテキストが読めるようクロップせず原寸比率のまま表示する ---------- */
.media-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 640px) { .media-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .media-grid { grid-template-columns: repeat(3, 1fr); } }
.media-card { background: var(--card-bg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.media-card__trigger { display: block; width: 100%; margin: 0; padding: 0; border: none; background: none; cursor: default; }
.media-card img { width: 100%; height: auto; display: block; }
.media-card__caption { padding: 14px 16px; font-size: 13px; color: var(--body-text); text-align: center; }

/* PC/タブレット幅のみ拡大表示に対応（モバイルはタップしても通常表示のまま、main.jsで判定） */
@media (min-width: 641px) {
  .media-card__trigger { cursor: zoom-in; }
}

.media-lightbox {
  position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center;
  background: rgba(20, 16, 13, .88); padding: 40px;
}
.media-lightbox.is-open { display: flex; }
.media-lightbox__img { max-width: 90vw; max-height: 90vh; width: auto; height: auto; border-radius: 6px; display: block; }
.media-lightbox__close {
  position: absolute; top: 20px; right: 24px; width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, .15); color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
}
.media-lightbox__close:hover { background: rgba(255, 255, 255, .28); }

/* ---------- Single post content (single.php) ---------- */
.single-content { font-size: 15px; line-height: 1.9; color: var(--ink); }
.single-content p { margin: 0 0 1.2em; }
.single-content h2 { font-size: 20px; font-weight: 700; margin: 2em 0 .8em; }
.single-content h3 { font-size: 17px; font-weight: 700; margin: 1.8em 0 .6em; }
.single-content ul, .single-content ol { margin: 0 0 1.2em 1.4em; }
.single-content li { margin-bottom: .4em; }
.single-content img { max-width: 100%; height: auto; border-radius: 6px; margin: 1em 0; display: block; }
.single-content a { color: var(--teal); }
.single-content blockquote { border-left: 3px solid var(--peach-line); padding-left: 16px; color: var(--body-text); margin: 1.2em 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
