/* =========================================================
   全ページ共通のヘッダーメニュー

   PC  … タイトルを横に並べ、あふれたら横スクロール
   スマホ … ハンバーガーで開閉

   ページごとに CSS が違うので、色・余白・字体はすべてここで指定し、
   各ページの指定を引き継がないようにしている。
   ========================================================= */

.gnav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #141c33;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", YuGothic,
               "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", Arial,
               "メイリオ", Meiryo, sans-serif;
  line-height: 1.5;
  box-shadow: 0 1px 6px rgba(0,0,0,0.18);
}

.gnav_bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
}

.gnav_brand {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 0;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.gnav_brand[aria-current="page"] { color: #7ef0e0; }

/* 一覧を表す小さな四角のしるし */
.gnav_mark {
  display: grid;
  grid-template-columns: 5px 5px;
  gap: 2px;
  flex: none;
}

.gnav_mark i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: #7ef0e0;
}

/* ハンバーガー */
.gnav_btn {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  background: transparent;
  color: rgba(255,255,255,0.9);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.gnav_bars {
  position: relative;
  display: block;
  width: 15px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.gnav_bars::before,
.gnav_bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 15px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.gnav_bars::before { top: -5px; }
.gnav_bars::after { top: 5px; }

/* 開いているあいだは × に変える */
.gnav_btn[aria-expanded="true"] .gnav_bars { background: transparent; }
.gnav_btn[aria-expanded="true"] .gnav_bars::before { top: 0; transform: rotate(45deg); }
.gnav_btn[aria-expanded="true"] .gnav_bars::after { top: 0; transform: rotate(-45deg); }

/* 一覧本体 */
.gnav_list {
  display: none;
  margin: 0;
  padding: 0 0 6px;
  list-style: none;
}

.gnav_list.is_open { display: block; }

.gnav_list li { margin: 0; }

.gnav_list a {
  display: block;
  padding: 11px 14px;
  color: rgba(255,255,255,0.82);
  font-size: 0.85rem;
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.gnav_list a[aria-current="page"] {
  color: #7ef0e0;
  font-weight: 700;
}

/* ---------------- PC ---------------- */

@media screen and (min-width: 800px) {
  .gnav {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
  }

  .gnav_bar { padding: 0; flex: none; }

  .gnav_btn { display: none; }

  /* 開閉の状態にかかわらず、PCでは常に横並びにする */
  .gnav_list,
  .gnav_list.is_open {
    display: flex;
    align-items: center;
    padding: 0;
    overflow-x: auto;
    /* あふれた分は横スクロールで見せる。つまみは邪魔なので隠す */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .gnav_list::-webkit-scrollbar { display: none; }

  .gnav_list li { flex: none; }

  .gnav_list a {
    padding: 14px 11px;
    border-top: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    font-size: 0.82rem;
  }

  .gnav_list a:hover { color: #ffffff; }

  .gnav_list a[aria-current="page"] { border-bottom-color: #7ef0e0; }
}
