/* ===== ハンバーガーボタン ===== */
#hamburger-toggle{
  width:44px; height:44px; padding:0;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  background:none; border:none; cursor:pointer;
  position:relative; z-index:1200;
}
#hamburger-toggle .bar{
  display:block; width:22px; height:1px; background:#2b2b2b;
  transition:transform .25s ease, opacity .18s ease, width .25s ease;
}
#hamburger-toggle .bar:nth-child(2){ width:16px; }
#hamburger-toggle[aria-expanded="true"] .bar:nth-child(1){ transform:translateY(7px) rotate(45deg); width:22px; }
#hamburger-toggle[aria-expanded="true"] .bar:nth-child(2){ opacity:0; }
#hamburger-toggle[aria-expanded="true"] .bar:nth-child(3){ transform:translateY(-7px) rotate(-45deg); width:22px; }

/* ===== 背面オーバーレイ ===== */
#game-menu-overlay{
  position:fixed; inset:0; z-index:1100;
  background:rgba(250,250,248,.5);
  backdrop-filter:blur(2px);
  opacity:0; pointer-events:none;
  transition:opacity .3s ease;
}
#game-menu-overlay.is-open{ opacity:1; pointer-events:auto; }

/* ===== ドロワー本体（初期は画面外・これが無いと常時展開になる）===== */
#game-menu-drawer{
  position:fixed; top:0; right:0; z-index:1150;
  width:min(86vw, 340px); height:100dvh;
  display:flex; flex-direction:column;
  background:rgba(252,252,250,.92);
  backdrop-filter:blur(14px) saturate(1.1);
  border-left:1px solid rgba(0,0,0,.08);
  box-shadow:-20px 0 60px rgba(0,0,0,.06);
  transform:translateX(100%);
  visibility:hidden;
  overscroll-behavior:contain;
  transition:transform .38s cubic-bezier(.22,.61,.36,1), visibility 0s linear .38s;
}
#game-menu-drawer.is-open{
  transform:translateX(0);
  visibility:visible;
  transition:transform .38s cubic-bezier(.22,.61,.36,1), visibility 0s;
}

/* ===== ドロワーヘッダー ===== */
#game-menu-drawer .drawer-header{
  flex:0 0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding:26px 22px 18px;
  border-bottom:1px solid rgba(0,0,0,.08);
}
#game-menu-drawer .drawer-header .label{
  font-size:11px; letter-spacing:.22em; color:#6a6a66; font-weight:400;
}
#hamburger-close{
  width:32px; height:32px; padding:0;
  background:none; border:none; cursor:pointer;
  font-size:20px; line-height:1; color:#6a6a66;
  transition:color .2s ease;
}
#hamburger-close:hover{ color:#23231f; }

/* ===== リスト ===== */
#game-menu-list{
  flex:1 1 auto; overflow-y:auto;
  list-style:none; margin:0; padding:4px 0 48px;
}
#game-menu-list li + li{ border-top:1px solid rgba(0,0,0,.05); }

.game-menu-item{
  width:100%; min-height:52px;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:14px 22px;
  background:none; border:none; text-align:left; cursor:pointer;
  font-family:inherit; font-size:15px; letter-spacing:.04em; color:#23231f;
  transition:background .2s ease, padding-left .2s ease;
}
.game-menu-item:hover,
.game-menu-item:focus-visible{
  background:rgba(0,0,0,.03);
  padding-left:28px;
  outline:none;
}
.game-menu-item.is-disabled{ color:#a5a5a0; cursor:default; }
.game-menu-item.is-disabled:hover{ background:none; padding-left:22px; }

.status-badge{
  flex:0 0 auto;
  font-size:10px; letter-spacing:.12em; color:#8a8a84;
  border:1px solid rgba(0,0,0,.15); border-radius:2px;
  padding:2px 6px;
}

/* ===== ジャンプ先ハイライト ===== */
@keyframes jump-highlight{
  0%  { box-shadow:0 0 0 1px rgba(38,212,168,.9), 0 0 24px rgba(38,212,168,.35); }
  100%{ box-shadow:0 0 0 1px rgba(38,212,168,0),  0 0 24px rgba(38,212,168,0); }
}
.jump-highlight{ animation:jump-highlight 1.4s ease-out; }

/* ===== 背面スクロールロック ===== */
body.menu-open{ overflow:hidden; }

/* ===== モーション低減 ===== */
@media (prefers-reduced-motion: reduce){
  #game-menu-drawer, #game-menu-overlay, .game-menu-item, #hamburger-toggle .bar{
    transition-duration:.01ms;
  }
}
