body:not(.js-enabled) .mobile-menu {
  display: none;
}

.mobile-menu {
  display: none;
  transform: translateX(100%);
  opacity: 0;
  position: fixed;
  top: 0;
  right: 0;
  width: 260px;
  height: 100%;
  background-color: #002f6c;
  color: white;
  flex-direction: column;
  padding: 60px 20px 20px;
  z-index: 11000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

body.js-enabled .mobile-menu.open {
  display: flex;
  transform: translateX(0);
  opacity: 1;
}

/* リスト・リンク */
.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mobile-menu li {
  padding: 10px 0;
}
.mobile-menu a {
  color: white;
  text-decoration: none;
  font-size: var(--font-md);
}

/* ハンバーガー */
.menu-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  z-index: 1010;
  background: none;
  border: none;
}
.menu-icon svg {
  display: block;
  width: 28px;
  height: auto;
  pointer-events: none;
}

/* 閉じるボタン */
.close-menu {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: var(--font-xl);
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  z-index: 1011;
  display: block;
}

/* 背景スクロール固定 */
body.menu-open,
html.menu-open {
  overflow: hidden;
  height: 100%;
}

/* ===============================
修正済み：サブメニュー（ズレ防止対応済み）
=============================== */
.submenu {
  display: none;
  flex-direction: column;
  margin: 0;
  padding-left: 1rem;
  position: relative;
}
.submenu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: var(--font-md);
  cursor: pointer;
}
.submenu-toggle.open + .submenu {
  display: flex;
}

@media (min-width: 768px) {
  .mobile-menu li:hover > .submenu {
    display: flex;
  }
}
