/* LP（大腸カメラ・胃カメラ）で同じ部品：スマホのメニュー（モーダル）と、FV を過ぎたら右上に出るメニューボタン
   Figma：LP Menu Modal（1672:224371）。幅 390・白 95%・上 16 左右 20 下 80・間 20・閉じる 44px（#d7b56d）・項目 350×62（線 #939393・文字 16px Medium #514c46）
   開閉は右から 0.3秒 Ease Out（lp.js）。PC（768px 以上）では使わない。各 LP の節の見た目は assets/nn/<LP>/style.css */

/* 共通の固定ボタン（template-parts/parts/nn-fixed.php）は LP では出さない。
   LP は自前の固定ボタン（Web予約・LINE予約・TOP と、もう1つの LP への札。各 LP の .s01-float・.s01-side）を使う */
body.nn-lp .nn-fix { display: none !important; }

/* ヘッダーに置く「メニューを開く」ボタン（ボタンの既定の見た目を消す。形は各 LP の CSS） */
.lp-open-btn {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* FV を過ぎたら右上に固定するメニューボタン（スマホだけ） */
.lp-burger { display: none; }
@media (max-width: 767px) {
  .lp-burger {
    position: fixed;
    top: calc(16px + env(safe-area-inset-top));
    right: 10px;
    z-index: 950;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgb(79 73 50 / 0.2);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
  }
  .lp-burger.is-shown { opacity: 1; visibility: visible; }
}
.lp-burger__lines {
  display: block;
  width: 24px;
  height: 14px;
  background:
    linear-gradient(#514c46, #514c46) 0 0 / 100% 1.5px no-repeat,
    linear-gradient(#514c46, #514c46) 0 50% / 100% 1.5px no-repeat,
    linear-gradient(#514c46, #514c46) 0 100% / 100% 1.5px no-repeat;
}

/* モーダル（右から出る。表示中は固定ボタンより手前で、後ろは押せない） */
.lp-menu {
  position: fixed;
  inset: 0;
  z-index: 10000;
  visibility: hidden;
  transition: visibility 0s linear 0.3s;
}
.lp-menu.is-open { visibility: visible; transition: none; }
.lp-menu__overlay {
  position: absolute;
  inset: 0;
  background: rgb(51 51 51 / 0.3);
  opacity: 0;
  transition: opacity 0.3s ease-out;
}
.lp-menu.is-open .lp-menu__overlay { opacity: 1; }
.lp-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
  width: min(390px, 100%);
  padding: calc(16px + env(safe-area-inset-top)) 20px calc(80px + env(safe-area-inset-bottom));
  background: rgb(255 255 255 / 0.95);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
  font-family: "Noto Sans JP", sans-serif;
}
.lp-menu.is-open .lp-menu__panel { transform: none; }
.lp-menu__close {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d7b56d;
  cursor: pointer;
}
.lp-menu__list {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #939393;
}
.lp-menu__list li { margin: 0; }
.lp-menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 12px;
  border-bottom: 1px solid #939393;
  color: #514c46;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.lp-menu__arrow { flex: none; }

/* PC ではモーダルを使わない */
@media (min-width: 768px) {
  .lp-menu { display: none; }
}

/* 動きを減らす設定：開閉を動かさない */
@media (prefers-reduced-motion: reduce) {
  .lp-menu,
  .lp-menu__overlay,
  .lp-menu__panel,
  .lp-burger { transition: none; }
}
