/* ================================================================
   ハンバーガーメニュー（全ページ共通）
   色は各ページ側で CSS 変数を上書きして切り替える
     --hm-btn-color : ボタン（三本線）の色
     --hm-accent    : ドロワーのアクセント色
     --hm-ink       : ドロワーの文字色
================================================================ */
:root {
  --hm-btn-color: #fff;
  --hm-accent: #c9547a;
  --hm-ink: #1f2547;
}

/* ── ボタン ───────────────────────────── */
.hm-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--hm-btn-color);
  cursor: pointer;
  border-radius: 10px;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.hm-btn span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.hm-btn:focus-visible,
.hm-close:focus-visible,
.hm-link:focus-visible {
  outline: 2px solid var(--hm-accent);
  outline-offset: 2px;
}

/* ── オーバーレイ ─────────────────────── */
.hm-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(10, 14, 36, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility 0s linear .25s;
}

/* ── ドロワー ─────────────────────────── */
.hm-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  width: min(360px, 88vw);
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--hm-ink);
  box-shadow: -12px 0 40px rgba(10, 14, 36, 0.18);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .3s ease, visibility 0s linear .3s;
  font-family: 'Noto Sans JP', sans-serif;
  overflow-y: auto;
}
.hm-open .hm-overlay {
  opacity: 1;
  visibility: visible;
  transition: opacity .25s ease;
}
.hm-open .hm-drawer {
  transform: translateX(0);
  visibility: visible;
  transition: transform .3s ease;
}
body.hm-open { overflow: hidden; }

.hm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.hm-title {
  font-size: 12px;
  letter-spacing: 0.2em;
  font-weight: 500;
  color: var(--hm-accent);
}
.hm-close {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--hm-ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 10px;
}

.hm-list {
  list-style: none;
  padding: 8px 12px;
  margin: 0;
}
.hm-list li { margin: 0; }
.hm-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  color: var(--hm-ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
}
.hm-link::after {
  content: '';
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--hm-accent);
  border-right: 2px solid var(--hm-accent);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.hm-link:hover { color: var(--hm-accent); }
.hm-link[aria-current="page"] { color: var(--hm-accent); }
.hm-link small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.6;
  letter-spacing: 0.04em;
}

.hm-foot { margin-top: auto; padding: 20px 24px 28px; }
.hm-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e0708f, #c9547a);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.hm-line svg { width: 18px; height: 18px; fill: #fff; }

@media (prefers-reduced-motion: reduce) {
  .hm-overlay, .hm-drawer { transition: none; }
}
