/* =========================
   HEADER — Unified / Stable (250924)
   PC⇔SP 切替・重なり順・色の先祖返り対策
========================= */


/* ベース（共通） */
header .head_con_sp { display: none !important; }   /* PCデフォでSPバーを隠す */
#menuList { position: relative; z-index: 1; }


/* =========================
   HEADER — Unified / Stable
   PC⇔SP 切替・重なり順・色の先祖返り対策
========================= */

/* ベース（共通） */
header .head_con_sp { display: none !important; }   /* PCデフォでSPバーを隠す */
#menuList { position: relative; z-index: 1; }

header {
  padding: 20px 0;
  position: relative;
  background-color: #fff;
}
header h1 {
  text-align: center;
  margin-bottom: 40px;
}

/* 右上ボックス（PC） */
header .head_con {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 1000; /* ロゴより前 */
  clear: both;
}
header .head_con small,
header .head_con a,
header .head_con span,
/* header .head_con td { color: #e4007f; } */
/* header .head_con td { color: #ec5f98; } */
header .head_con td { color: #ec5f98; }

header .head_con p > a:not(.tel-link) {
  display: block;
  width: 47%;
  /* border: 1px solid #e4007f; */
  border: 1px solid #ec5f98;
  text-align: center;
  box-sizing: border-box;
  padding: 8px 0;
  margin: 10px 0;
  float: left;
}
header .head_con p.tel_btn {
  display: block;
  margin: 10px 0;
  border: 1px solid #ec5f98;
  text-align: center;
  box-sizing: border-box;
  padding: 8px 0;
  width: 47%;
  float: right;
}
header .head_con p.tel_btn a {
  margin: 0;
  border: none;
  text-align: center;
  box-sizing: border-box;
  padding: 7px 0;
  float: none;
  display: inline;
}
header .head_con p img { display: inline-block; padding-right: 5px; }

header .head_con th, header .head_con th a { color: #fff !important; }
header .head_con th {
  background-color: #ec5f98;
  padding: 5px 10px;
  font-weight: bold;
  font-size: 14px;
  vertical-align: middle;
}
header .head_con td { font-size: 14px; padding: 10px 0 10px 10px; }
header .head_con td .fa { color: #ec5f98; padding-right: .5em; }
header .head_con td br { display: none; }

/* ナビ（既存） */
header nav ul { margin: auto; padding: 16px 0 10px; text-align: center; }
header nav li { display: inline-block; padding: 0 30px; border-right: 1px solid #ebe9dd; }
header nav li:last-child { border-right: none; }
header nav li a { display: block; }

/* ==============================
   SP（～768px）：電話バー + ハンバーガーを固定
   ============================== */
@media (max-width: 768px) {
  /* PC用ヘッダー非表示 */
  header .head_con { display: none !important; }

  /* 電話バー（固定） */
  header .head_con_sp {
    display: flex !important;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    z-index: 1000;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    padding: 0 12px;
    background-color: #ec5f98;
    padding-top: env(safe-area-inset-top, 0);
    padding-left: calc(12px + env(safe-area-inset-left, 0));
    padding-right: calc(12px + env(safe-area-inset-right, 0));
  }
  /* body { padding-top: calc(42px + env(safe-area-inset-top, 0)); } */
  body { padding-top: calc(42px + 44px + env(safe-area-inset-top, 0)); }
  
  #header h1 { margin-top: 0; }

  /* 電話ボタン */
  header .head_con_sp .tel_btn {
    margin: 0;
    line-height: 60px;
    display: flex;
    align-items: center;
  }
  header .head_con_sp .tel_btn .tel-link {
    color: #fff !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    line-height: 60px;
    font-size: 25px;
  }
  header .head_con_sp .tel_btn::before {
    content: "";
    display: inline-block;
    width: 25px; height: 25px;
    margin-right: 4px;
    background: center/contain no-repeat
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M6.62 10.79a15.05 15.05 0 006.59 6.59l2.2-2.2a1 1 0 011.11-.21c1.2.48 2.54.74 3.93.74a1 1 0 011 1V20a1 1 0 01-1 1C10.61 21 3 13.39 3 4a1 1 0 011-1h3.5a1 1 0 011 1c0 1.39.26 2.73.74 3.93a1 1 0 01-.21 1.11l-2.2 2.2z'/%3E%3C/svg%3E");
    transform: rotate(10deg);
  }

  /* SNS */
  header .head_con_sp ul {
    display: flex;
    gap: 20px;
    margin: 0 0 0 14px;
    padding: 0;
    list-style: none;
  }
  header .head_con_sp ul li a {
    display: block;
    line-height: 42px;
    font-size: 30px;
    padding-left: 8px;
  }

  /* 色の先祖返り/hover固定 */
  #header .head_con_sp,
  #header .head_con_sp a,
  #header .head_con_sp i,
  #header .head_con_sp .fa { color: #fff !important; }
  #header .head_con_sp a:hover { opacity: 1 !important; }

  /* ハンバーガー（#rwdMenuWrap）を電話バー直下に固定 */
  #rwdMenuWrap {
    position: fixed;
    top: calc(60px + env(safe-area-inset-top, 0));
    left: 0; right: 0;
    z-index: 1100;
  }
  #rwdMenuWrap #switchBtnArea {
    position: relative;
    height: 44px;                 /* 既存値維持 */
    background-color: #ec5f98;
  }
  /* メニュー展開領域：全高 */
  /* #rwdMenuWrap ul {
    position: fixed;
    top: calc(42px + 44px + env(safe-area-inset-top, 0));
    left: 0; right: 0; bottom: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1099;
  } */
  #rwdMenuWrap ul {
    position: fixed;
    top: calc(60px + env(safe-area-inset-top, 0)); /* 電話バーだけ */
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1099;
    margin: 0;   /* 余白を完全リセット */
    padding: 0;  /* 余白を完全リセット */
    list-style: none;
  }

  /* SP時のナビ余白（従来値維持） */
  header nav ul { padding: 36px 0 11px; }
  header nav li { padding: 0 20px; }
  
  #menuList ul { 
    display: none !important;       /* ← 画像メニューを非表示 */
  }
  #menuList h1 { 
    display: block; 
    margin: 16px auto 12px;          /* お好みで余白調整 */
  }
}

/* ==============================
   PC（769px～）：従来どおり
   ============================== */
@media (min-width: 769px) {
  header .head_con { display: block !important; }
  header .head_con_sp { display: none !important; position: static !important; }
}

/* ==============================
   レスポンシブ補助（1000px以下）
   ============================== */
@media screen and (max-width: 1000px) {
  header .head_con { top: 0; right: 20px; }
  header .head_con th { display: block; }
  header .head_con td { display: block; padding: 10px 0; }
  header .head_con p > a:not(.tel-link),
  header .head_con p.tel_btn {
    width: 100%;
    margin: 0 0 10px;
  }
}



/* ===== SP：電話バー＋ハンバーガーを1本化 ===== */
@media (max-width: 768px) {
  /* PC右上ボックスは隠す */
  header .head_con { display: none !important; }

  /* 固定バー（1本：42px） */
  .sp-fixed {
    position: fixed;
    top: env(safe-area-inset-top, 0);
    left: 0; right: 0;
    z-index: 1100;
  }
  header .head_con_sp {
    display: flex !important;
    align-items: center;
    gap: 12px;
    height: 60px;
    padding: 0 12px;
    background-color: #ec5f98;
    color: #fff;
    padding-left: calc(12px + env(safe-area-inset-left, 0));
    padding-right: calc(12px + env(safe-area-inset-right, 0));
  }
  header .head_con_sp .tel_btn { margin: 0; line-height: 42px; display: flex; align-items: center; }
  header .head_con_sp .tel_btn .tel-link {
    color: #fff !important; text-decoration: none; font-weight: 600; font-size: 25px;
    display: inline-flex; align-items: center; gap: 10px;
  }

  /* 右端に SNS + ハンバーガー */
  .sp-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
  .sp-right .sp-sns { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0; }
  .sp-right .sp-sns a { color: #fff; font-size: 30px; line-height: 42px; display: block; }

  /* ハンバーガーボタン */
  #switchBtn {
    width: 40px; height: 40px; display: block; position: relative;
    border-radius: 5px; background: #fff;
  }
  #switchBtn span {
    position: absolute; left: 20%; width: 60%; height: 4px; background: #ec5f98;
    border-radius: 5px; transition: all .2s linear;
  }
  #switchBtn span:nth-of-type(1){ top:10px; transform: rotate(0); }
  #switchBtn span:nth-of-type(2){ top:18px; transform: scale(1); }
  #switchBtn span:nth-of-type(3){ bottom:10px; transform: rotate(0); }
  #switchBtn.btnClose span:nth-of-type(1){ top:18px; transform: rotate(-45deg); }
  #switchBtn.btnClose span:nth-of-type(2){ transform: scale(0); }
  #switchBtn.btnClose span:nth-of-type(3){ bottom:18px; transform: rotate(45deg); }

  /* ドロップダウン：バー直下から全高 */
  #spNav {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0) + 60px);
    left: 0; right: 0; bottom: 0;
    overflow: auto; -webkit-overflow-scrolling: touch;
    z-index: 1099;
    display: none;           /* JSで切替 */
  }
  

  /* スペーサ：ロゴが隠れないようにバー分だけ押し下げ */
  .sp-fixed-spacer { height: calc(60px + env(safe-area-inset-top, 0)); }

  /* 2本目のバーや #switchBtnArea に依存しないようリセット */
  #rwdMenuWrap { position: static; background: transparent; }
}

/* PC（769px～）は従来どおり */
@media (min-width: 769px) {
  header .head_con { display: block !important; }
  header .head_con_sp { display: none !important; }
  .sp-fixed, .sp-fixed-spacer, #spNav { display: none; }
}

/* SPメニュー画像の見え方（保険） */
@media (max-width: 768px) { 
  /* バーの高さを変えるときはここだけ変更 */
  /* :root { --spBarH: 60px; } */
  
  #rwdMenuWrap ul {
    position: fixed;
    top: calc(60px + env(safe-area-inset-top, 0)); /* 電話バー直下 */
    left: 0;
    right: 0;
    /* max-height は一旦外す → 自然にリスト分だけになる */
    overflow-y: visible; 
    z-index: 1099;
    margin: 0;
    padding: 0;
    list-style: none;
    background: transparent; /* 背景透明化 */
  }
  /* 画面最下部の“波”だけを固定表示（背景扱い／クリック貫通） */
  #rwdMenuWrap ul::after {
    content: "";
    display: block;
    height: 40px; /* 波画像の高さに合わせる */
    background: url("../images/top_line.png") repeat-x center bottom;
    margin-top: -11px;
    /* opacity: .9; */
  }
  /* 最後の1本線を必ず消す（念のため li 側も同時に） */
  #spNav li:last-child,
  #spNav li:last-child a {
    border-bottom: none !important;
  }
  
  #spNav li a {
    display: block;
    padding: 14px 16px;
    font-size: 18px;
    color: #333;
    background: #fbfaf4;   /* ←各行の背景だけ塗る */
    border-bottom: 1px solid #ebe9dd;
    text-decoration: none;
  }
  #spNav li:last-child a { border-bottom: none; }
  
  
