/* ヘッダー */
.header {
  background-color: rgb(232, 232, 232);
  width: 100%;
  height: 70px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
}

.header__inner {
  padding: 0 20px;
  display: flex;
  align-items: center; /* 縦方向の中央揃え */
  justify-content: space-between; /* 左右の要素を分ける */
  height: inherit;
  position: relative;
}

/* 左側の情報をまとめる */
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
}
.user-info__icon {
  width: 50px;
  height: 50px;
}
.user-info__details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

/* キャラクター情報のテキスト */
.user-info__details p {
  margin: 0; /* デフォルトの余白を削除 */
  font-size: 14px; /* テキストサイズ */
  line-height: 1.5; /* 行間調整 */
  color: #191970; /* テキストカラー */
}

/* ヘッダーのロゴ部分 */
.header__title {
  width: 80px;
}


.header__title img {
  display: block;
  width: 100%;
  height: 100%;
}

/* ヘッダーのナビ部分 */
.header__nav {
  position: absolute;
  right: 0;
  top: 70px; /* headerのheightに合わせて調整 */
  width: 300px;
  background-color: #fff;
  transform: translateX(100%);
  transition: ease .4s;
  /* ★★★ 以下の行を変更 ★★★ */
  height: auto; /* 高さを自動調整に変更 */
  max-height: calc(100vh - 70px); /* 画面の高さを超えないようにする */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  z-index: 9999;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* ナビゲーションに影を追加 */
}
/* ハンバーガーメニュー */
.header__hamburger {
  width: 48px;
  height: 100%;
  position: absolute; /* 追加: 親要素から絶対位置 */
  right: 20px; /* 右端に配置 */
}

.hamburger {
  background-color: transparent; /*buttonタグデフォルトスタイルを打ち消し*/
  border-color: transparent; /*buttonタグデフォルトスタイルを打ち消し*/
  z-index: 9999;
  cursor: pointer;
}

/* ハンバーガーメニューの線 */
.hamburger span {
  width: 100%;
  height: 1px;
  background-color: #383838;
  position: relative;
  transition: ease .4s; /*ハンバーガーメニュークリック時の三本線の動きを遅延*/
  display: block;
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  margin: 8px 0;
}


.hamburger span:nth-child(3) {
  top: 0;
}

/* ハンバーガーメニュークリック後のスタイル */
.header__nav.active {
  transform: translateX(0);
}

.hamburger.active span:nth-child(1) {
  top: 5px;
  transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  top: -13px;
  transform: rotate(-45deg);
}

.nav-items {
  padding-top: 20px;
  padding-bottom: 50px;
  justify-content: center;  /* 横方向に中央揃え */
}

/* ナビのリンク */
.nav-items__item a {
  color: black;
  width: 100%;
  display: block;
  text-align: center;
  font-size: 24px;
  margin-bottom: 15px;
}

.nav-items__item:last-child a {
  margin-bottom: 0;
}

ul {
  list-style-type: none; /* 黒丸を非表示にする */
  padding: 0; /* 左の余白を削除 */
  margin: 0;  /* マージンを削除 */
}


.notification-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: red;
  border-radius: 50%;
  margin-left: 5px;
}

.nav-icon-row {
  display: flex;
  justify-content: center;
  gap: 16px; /* アイコン間の余白 */
  padding: 12px 0;
  border-top: 1px solid rgb(232, 232, 232);
  margin-top: auto;
}

.nav-icon-img {
  width: 32px;
  height: auto;
  display: block;
}

/* ナビゲーションメニューのレスポンシブな高さ調整 */
@media (max-height: 667px) {
  .header__nav {
    height: calc(100vh - 70px);
    max-height: none;
    overflow-y: auto;
  }
}

/* 700px以上の画面では、コンテンツに合わせて高さを自動調整 */
@media (min-height: 668px) {
  .header__nav {
    height: auto;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
}


/* お知らせ通知用 CSS (中略) */
.notification-icon-container {
  position: relative;
  display: block;
  line-height: 0;
}

.notification-badge {
  position: absolute;
  top: 0px; 
  right: 0px; 
  width: 10px;
  height: 10px;
  background-color: red;
  border-radius: 50%;
  border: 1px solid white;
  z-index: 10;
}
.header__hamburger {
  position: relative;
}

.hamburger-badge {
  top: -3px; 
  right: -3px; 
}
/* スクロールエリア用のCSSは別途CSSファイルに追加してください */
.scrolling-ticker {
    width: 100%;
    background-color: #78bfc8;
    color: #202021;
    padding: 5px 0;
    overflow: hidden; 
    font-size: 0.9em;
    white-space: nowrap;
}

.scrolling-ticker__inner {
    /* 修正ポイント: widthの設定を追加 */
    display: inline-block;
    /* この幅を、表示したい全メッセージの合計幅よりも大きく設定します。 */
    /* 例えば、全メッセージが画面の3倍の長さであれば、300%など。 */
    /* ここでは、画面の端から端まで流れるようにするため、自動で幅を確保させます。 */
    
    /* アニメーションの定義 */
    /* duration（20s）はそのまま使えます */
    animation: scroll-left linear infinite;
    animation-duration: 50s;
    
    font-size: 0; 
}
.ticker-item {
    display: inline-block;
    padding: 0 40px;
    font-size: 1rem;
}

@keyframes scroll-left {
    /* 修正ポイント: 0% の値を変更 */
    /* 0% の開始位置を「画面の右端」ではなく、「メッセージコンテナの幅全体」にします。 */
    0% {
        transform: translateX(100%); 
    }
    /* 修正ポイント: 100% の終了位置も変更 */
    /* 終了位置を「メッセージコンテナの幅全体分、左に移動した場所」にします。 */
    100% {
        transform: translateX(-100%);
    }
}