/* ==========================================================================
   モバイル用ハンバーガーナビ（全ページ共通・CSS変数非依存）
   860px以下で .site-nav が非表示になるため、代替のドロワーメニューを提供する。
   ========================================================================== */

.mobile-nav-toggle,
.mobile-nav-drawer {
  display: none;
}

@media (max-width: 860px) {
  /* ハンバーガーボタン（ヘッダー右端に固定配置） */
  .mobile-nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: fixed;
    top: 10px;
    right: 16px;
    width: 44px;
    height: 44px;
    z-index: 300;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #1f2933;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  /* 開いている間はハンバーガーを×に変形 */
  .mobile-nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .mobile-nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* 全画面ドロワー */
  .mobile-nav-drawer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: fixed;
    inset: 0;
    z-index: 299; /* 各ページのヘッダー(最大256)・floating-actions(32)・opening(100)より上 */
    background: rgba(255, 255, 255, 0.98);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .mobile-nav-drawer.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-nav-drawer a {
    display: block;
    padding: 16px;
    font-size: 18px;
    color: #1f2933;
    text-decoration: none;
    text-align: center;
  }
}
