/* ============================================================
   top.css — Webサイトトップページ専用スタイル
   依存：common.css（先に読み込むこと）

   ■ z-index 管理表（衝突防止のためここで一元管理）
     200  : .top-nav（sticky ヘッダーナビ）
     1000 : .floating-bar（固定CTAバー）
    10001 : .menu-trigger（ハンバーガーボタン）
    10002 : .sp-nav（全画面メニューオーバーレイ）

   ■ ブランドカラー
     #623ca8 : メインブランドカラー（紫）
     #05a346 : LINE・予約CTAカラー（緑）
     #fdfbf7 : ページ背景・ボックス背景（ベージュ白）

   ============================================================ */

/* ============================================================
   1. 基本設定
   ============================================================ */
html {
  scroll-padding-top: 71px;
  scroll-behavior: smooth;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.75;
  color: #333;
  background-color: #fff;
  padding-bottom: 80px; /* floating-barがコンテンツを隠さないための余白 */
}

/* メインコンテンツ幅（最大850px・流動化） */
.container {
  width: clamp(320px, 95%, 850px);
  padding: 0 16px 16px 16px;
  margin: 0 auto;
}

/* セクション内コンテンツ幅（中央揃え） */
.center-content {
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ============================================================
   2. タイポグラフィ
   ============================================================ */

/* セクション見出し
   構造：<h2><small>ラベル</small>タイトル本文</h2>
   smallはセクションの文脈ラベル、h2本文は読み手への主張 */
h2 {
  font-size: 19px;
  font-weight: bold;
  border-left: 3px solid #623ca8;
  padding: 2px 0 2px 12px;
  margin-top: 60px;
  text-align: left;
  line-height: 1.5;
  letter-spacing: 0.1em;
}
h2::before {
  content: none; /* common.css等で::before が付く場合の無効化保険 */
}
h2 small {
  display: block;
  font-size: 12px;
  font-weight: bold;
  color: #623ca8;
  margin-bottom: 4px;
}

/* h2直下の補足テキスト（例：アクセスセクションの雰囲気文） */
.h2-lead {
  margin-top: 0.5rem;
  margin-left: 0.5em;
  color: #555;
  font-size: 0.9rem;
  text-align: left;
}

.sub-section-label {
  text-align: center;
  line-height: 1.4;
  margin-top: 24px;
  margin-left: 0;
}

/* ブランドカラーで強調するテキスト（引用・小見出し等） */
.message-highlight {
  text-align: center;
  font-weight: bold;
  color: #623ca8;
}

/* ============================================================
   3. 汎用ボックス
   ============================================================ */

/* 共通パディング・角丸 */
.box,
.box-outline {
  padding: 24px 20px;
  margin-top: 30px;
  margin-bottom: 40px;
  border-radius: 24px;
}
/* 塗りつぶしボックス（コンテンツ系） */
.box {
  background: #fdfbf7;
  border: 1px solid #eee;
}
/* 枠線ボックス（強調・引用系） */
.box-outline {
  background: #fffdfb;
  border: 2px solid #f9f6f0;
}

/* 画像：最大550px・中央寄せ・角丸 */
.img-fluid {
  max-width: min(550px, 100%);
  height: auto;
  border-radius: 24px;
  display: block;
  margin: 24px auto;
}

/* ============================================================
   5. sticky ナビゲーション（PC用）
   SP（max-width:480px）では display:none で非表示
   ============================================================ */

.top-nav {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 200; /* ※z-index管理表参照 */
  background-color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid #eee;
  justify-content: center;
  gap: 0;
}
.top-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 30px;
  color: #623ca8;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  border-right: 1px solid #eee;
  transition: background 0.2s;
  line-height: 1.3;
}
.top-nav a:last-child {
  border-right: none;
}
.top-nav a small {
  /* ナビ項目のサブテキスト（例：「オーナーについて」） */
  font-size: 13px;
  color: #888;
  font-weight: normal;
  margin-top: 3px;
}
.top-nav a:hover {
  background: #f9f6ff;
}

/* ============================================================
   6. 症状カード（symptom-grid）
   メインLPへの導線。ボーダー＋矢印でタップ可能を明示
   ============================================================ */

/* グリッドレイアウト：1列最小200px・自動折り返し */
.symptom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 32px;
}

/* カード本体：左揃え・右側に矢印スペースを確保 */
.symptom-card {
  background: #fff;
  border: 1.5px solid #623ca8;
  padding: 14px 40px 14px 16px; /* 右40pxは::after矢印のスペース */
  border-radius: 16px;
  text-align: left;
  text-decoration: none;
  color: #333;
  position: relative;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}
/* 右矢印（タップ可能シグナル） */
.symptom-card::after {
  content: "›";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #623ca8;
  font-size: 24px;
  line-height: 1;
}

.symptom-card:hover,
.symptom-card:active {
  background-color: #f9f6ff;
  transform: translateY(-1px);
}

/* カード内の症状名タグ（例：「腰痛」） */
.card-symptom-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: bold;
  background: #f3efe6;
  color: #623ca8;
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}
/* カード内の説明文 */
.card-symptom-desc {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: #444;
  paint-order: stroke fill;
  -webkit-text-stroke: 4px #fff;
}

/* 腰痛カード：イラスト背景 */
.symptom-card-back-pain {
  min-height: 90px;
  overflow: hidden;
  background-image: url("../images/common/button_back-pain.webp");
  background-repeat: no-repeat;
  background-size: 72px auto;
  background-position: right 25px bottom 2px;
}

/* 肩こり・首こり：イラスト背景 */
.symptom-card-neck-shoulder {
  min-height: 90px;
  overflow: hidden;
  background-image: url("../images/common/button_neck-shoulder.webp");
  background-repeat: no-repeat;
  background-size: 90px auto;
  background-position: right 25px bottom 2px;
}

/* 姿勢・猫背：イラスト背景 */
.symptom-card-posture {
  min-height: 90px;
  overflow: hidden;
  background-image: url("../images/common/button_posture.webp");
  background-repeat: no-repeat;
  background-size: 85px auto;
  background-position: right 30px bottom 3px;
}

/* 不眠・だるさ背景 */
.symptom-card-button_sleep-fatigue {
  min-height: 90px;
  overflow: hidden;
  background-image: url("../images/common/button_sleep-fatigue.webp");
  background-repeat: no-repeat;
  background-size: 69px auto;
  background-position: right 35px bottom 5px;
}

/* 生理痛：イラスト背景 */
.symptom-card-menstrual-headache {
  min-height: 90px;
  overflow: hidden;
  background-image: url("../images/common/button_menstrual-headache.webp");
  background-repeat: no-repeat;
  background-size: 90px auto;
  background-position: right 25px bottom 5px;
}

/* ============================================================
   7. 特長リスト（top_features）
   ============================================================ */

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature-list li {
  margin: 8px 0 20px 0;
  padding-left: 0;
  text-align: left;
}
.feature-list li + li {
  border-top: 1px solid #f0ece6;
  padding-top: 10px;
  margin-top: 0;
}
/* 各特長の小見出し */
.feature-title {
  display: block;
  color: #623ca8;
  font-size: 17px;
  font-weight: bold;
  margin-bottom: 8px;
}

/* ============================================================
   8. アクセスセクション
   ============================================================ */

.access-note {
  font-size: 14px;
  margin: 0;
}
.access-dl {
  margin: 12px 0 8px 4px;
  font-size: 14px;
}
.access-dl dt {
  font-weight: bold;
  color: #623ca8;
  margin-top: 8px;
}
.access-dl dd {
  margin: 2px 0 0 1em;
  line-height: 1.7;
  font-size: 13px;
}
.access-caution {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  text-align: center;
}
/* 店舗外観写真ブロック */
.access-photo {
  background: #f4f2f8;
  margin: 1.6rem 0;
  padding: 20px 5px;
  text-align: center;
  border-radius: 6px;
}
.access-photo img {
  margin: 0 auto;
  border-radius: 10px;
  display: block;
}
.access-small {
  font-size: 13px;
  color: #555;
  margin-top: 0.8rem;
  line-height: 1.6;
  text-align: center;
}

/* Googleマップ埋め込みコンテナ */
.map-container {
  width: 100%;
  margin-top: 20px;
}
.map-iframe {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: 12px;
}
.map-link {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  background: #f0f0f0;
  border-radius: 5px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

/* 営業時間テーブル
   ※月曜列（最終列）を休業日として赤表示 */
.business-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.business-table th,
.business-table td {
  border: 1px solid #eee;
  padding: 8px;
  text-align: center;
}
.business-table th {
  background: #fdfbf7;
}
.business-table th:last-child,
.business-table td:last-child {
  /* 月曜（定休日）列 */
  background: #fff5f5;
  color: #cc0000;
  font-weight: bold;
}

/* ============================================================
   9. CTAセクション（top_contact）
   ============================================================ */

/* CTA縦並びコンテナ */
.cta-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px auto;
  max-width: 360px;
}

/* CTAボタン共通スタイル（デフォルトは緑＝LINE） */
.cta-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 330px;
  margin: 8px auto;
  padding: 16px 20px;
  box-sizing: border-box;
  background-color: #05a346;
  color: #ffffff;
  font-size: 17px;
  font-weight: bold;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 50px;
  border: 1.5px solid #ffffff;
  outline: 2px solid #05a346;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition:
    opacity 0.3s ease,
    transform 0.2s ease;
}
.cta-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}
.cta-button:active {
  transform: translateY(0);
}
/* ボタン内のサブテキスト */
.cta-button .cta-sub {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: normal;
  margin-top: 4px;
}

/* LINE用（緑）：デフォルトと同色のため現状は実質エイリアス
   将来色を変える場合のために維持 */
.cta-line {
  background-color: #05a346;
  outline-color: #05a346;
}
.cta-line .cta-sub {
  color: rgba(255, 255, 255, 0.9);
}

.cta-reserve {
  background-color: #623ca8;
  outline-color: #623ca8;
}

/* サブリンクグループ（症状ページへの導線） */
.sub-link-group {
  margin: 0 auto 8px;
  text-align: center;
}
.sub-link-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.sub-link-pill {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid #623ca8;
  border-radius: 10px;
  color: #623ca8;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.2s;
}
.sub-link-pill:hover {
  background: #f9f6ff;
}

/* ============================================================
   10. フローティングCTA
   スクロール量に関わらず常時表示
   z-index: 1000（※z-index管理表参照）
   ============================================================ */

.floating-cta {
  position: fixed;
  bottom: calc(8px + env(safe-area-inset-bottom)); /* iPhoneホームバー対応 */
  left: 0;
  width: 100%;
  z-index: 1000;
  display: none !important; /* 初期値は強制的に非表示 */
  flex-direction: column;
  align-items: center;
  pointer-events: none; /* コンテナ自体はクリック透過 */
}

/* フローティングボタン本体 */
.floating-cta-button {
  pointer-events: auto;
  display: flex;
  flex-direction: column; /* 縦並びに変更 */
  justify-content: center;
  align-items: center;
  width: 90%;
  max-width: 400px;
  margin: 0 auto;
  padding: 12px 0;
  background-color: rgba(5, 163, 70, 0.95);
  color: #ffffff;
  text-align: center;
  font-size: 16px;
  text-decoration: none;
  line-height: 1.5;
  font-weight: 500;
  border-radius: 50px;
  border: 1.5px solid #ffffff;
  outline: 2.5px solid #05a346;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  -webkit-appearance: none;
  transition:
    opacity 0.3s ease,
    transform 0.2s ease;
}
/* ボタン内のサブテキスト */
.floating-cta-button .cta-sub {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: normal;
  margin-top: 4px;
}
.floating-cta-button:hover,
.floating-cta-button:active {
  opacity: 0.9;
  transform: scale(0.98);
}

/* ============================================================
   11. ハンバーガーメニュー（SP用）
   PC（769px以上）では .menu-trigger を display:none で非表示。
   SP（480px以下）で display:flex に切り替え（@media参照）
   ============================================================ */

/* トリガーボタン（固定表示） */
.menu-trigger {
  position: fixed;
  top: 15px;
  left: 15px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #eee;
  border-radius: 8px;
  z-index: 10001; /* ※z-index管理表参照 */
  display: none; /* PCでは非表示 → SPで@mediaで display:flex に変更 */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
/* ハンバーガー3本線 */
.menu-trigger span {
  display: block;
  width: 25px;
  height: 2px;
  background: #623ca8;
  margin: 2px 0;
}
/* 「MENU」テキスト */
.menu-trigger small {
  font-size: 9px;
  color: #623ca8;
  font-weight: bold;
}

/* 全画面メニューオーバーレイ
   初期は left:-100% で画面外。JSで .is-active を付与して表示 */
.sp-nav {
  position: fixed;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(253, 251, 247, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10002; /* ※z-index管理表参照 */
  transition: left 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}
.sp-nav.is-active {
  left: 0;
}

/* メニュー内コンテンツ幅制御 */
.sp-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
  text-align: center;
  width: 88%;
  max-width: 320px;
}

/* 各メニュー項目リンク */
.menu-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid #f0eee8;
  text-decoration: none;
  width: 100%;
  max-width: 280px;
}
/* メニュー項目メインテキスト */
.menu-main {
  font-size: 16px;
  font-weight: bold;
  color: #623ca8;
  line-height: 1.3;
}
/* メニュー項目サブテキスト */
.menu-sub {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

/* メニューを閉じるボタン */
.menu-close {
  margin-top: 40px;
  background: none;
  border: 1px solid #ccc;
  padding: 8px 24px;
  border-radius: 20px;
  color: #666;
  cursor: pointer;
}

/* ============================================================
   12. Instagramセクション
   ============================================================ */

/* Instagramグラデーションボーダーボタン
   background-clipを使ったCSSテクニックで枠線をグラデーション化 */
.instagram-btn-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60%;
  max-width: 240px;
  margin: 15px auto;
  padding: 4px 14px;
  text-align: center;
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  border-radius: 30px;
  background: transparent;
  border: 2px solid transparent;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)),
    linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  background-origin: border-box;
  background-clip: content-box, border-box;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  box-sizing: border-box;
}
.instagram-btn-outline:hover,
.instagram-btn-outline:active {
  opacity: 0.8;
  transform: scale(0.98);
}

/* ============================================================
   13. 料金
   ============================================================ */

/* キャンペーン価格（ダークパープル太字） */
.campaign-price {
  color: #2e155f;
  font-weight: 700;
}

/* 取り消し線付きの通常価格 */
.normal-price {
  margin-left: 0.5em;
  font-size: 0.9rem;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: #999;
}

/* 料金セクション内の予約補足テキスト */
.price-reserve-note {
  font-size: 13px;
  color: #666;
  text-align: center;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid #f0ece6;
}

/* ============================================================
   14. フッター
   ============================================================ */

/* ============================================================
   15. モバイル最適化（max-width: 480px）
   ============================================================ */

@media (max-width: 480px) {
  html {
    scroll-padding-top: 10px;
  }

  /* コンテナ横パディングを縮小 */
  .container {
    padding: 16px 12px;
  }

  /* ハンバーガーボタンをSPで表示（PCはdisplay:none） */
  .menu-trigger {
    display: flex;
  }
  /* sticky navをSPで非表示（ハンバーガーに集約） */
  .top-nav {
    display: none;
  }

  /* 見出しサイズ縮小 */
  h2 {
    font-size: 16px;
    margin-top: 30px;
  }

  /* 本文・リストの基準フォントサイズ */
  div,
  p,
  li {
    font-size: 15px;
    line-height: 2;
  }
  .access-small {
    font-size: 12px;
  }
  /* menu-closeのbuttonデフォルトフォントをページに合わせる */
  .menu-close {
    font-size: 14px;
    font-family: inherit;
  }

  /* CTAボタンの横余白 */
  .cta-container {
    padding: 0 12px;
  }

  /* ボックスのパディング縮小 */
  .box,
  .box-outline {
    padding: 16px;
    margin-top: 24px;
    margin-bottom: 24px;
  }
  /* SP幅では<br>を改行としてではなくインライン扱いに */
  .box br,
  .box-outline br {
    display: inline;
  }

  /* 特長タイトルサイズ縮小 */
  .feature-title {
    font-size: 15px;
  }

  /* 営業時間テーブル：SP幅で均等レイアウト */
  .business-table {
    font-size: 11px;
    table-layout: fixed;
  }
  .business-table th,
  .business-table td {
    padding: 4px 2px;
  }
  .business-table th:last-child,
  .business-table td:last-child {
    /* SP版はbg薄めに（可読性確保） */
    background: #f9f9f9;
    color: #cc0000;
  }
}
