/* ===== PCだけ：メニューを中央固定（SPのフローティング挙動は壊さない） ===== */
@media (min-width: 1024px){

  /* nav を中央寄せにするだけ。SP用の absolute/top-full には触らない */
  #navbarCollapse{
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;

    /* ここ重要：PCでは nav を absolute にしない（＝SPの開閉ロジックを壊さない） */
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;
  }

  /* ul の並びも中央へ */
  #navbarCollapse > ul{
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: fit-content !important;
  }
}
/* ===== PC（lg以上）は横並び固定のまま、メニューを中央揃え ===== */
@media (min-width: 1024px){

  /* nav は static のまま。幅だけ 100% にする */
  #navbarCollapse{
    width: 100% !important;
  }

  /* ul を “中身の幅” にして中央へ */
  #navbarCollapse > ul{
    display: flex !important;
    justify-content: center !important;
    width: fit-content !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}