
  /* ========================================================
     ビューア（オーバーレイとUI全体）のスタイル
  ======================================================== */
  .custom-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none; /* 初期状態は非表示 */
    align-items: center;
    justify-content: center;
    overflow: hidden; /* 画面外のスライドを隠す */
    /* スワイプ時のブラウザネイティブな縦スクロール更新などを防ぐ */
    touch-action: pan-y;
  }
  .custom-viewer.is-active {
    display: flex;
  }

  /* オーバーレイ（背景黒・透明度75%） */
  .viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1;
  }

  /* 左右ナビゲーションボタン（常時表示に変更） */
  .viewer-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    opacity: 1; /* 常時表示 */
    z-index: 3;
     text-shadow: 0px 0px 8px rgba(0, 0, 0, 1);
    -webkit-tap-highlight-color: transparent;
  }
  .viewer-nav-btn.prev-btn {
    left: 10px;
    padding: 50px 50px 50px 0px; /* クリック有効範囲（ボタン周囲30px程度） */
  }
  .viewer-nav-btn.next-btn { 
    right: 10px;
    padding: 50px 0px 50px 50px; /* クリック有効範囲（ボタン周囲30px程度） */
  }
  
  /* 最後の要素などで押せない場合は非表示 */
  .viewer-nav-btn.is-hidden { display: none; }

  /* ========================================================
     カルーセル（スライダー）部分のスタイル
  ======================================================== */
  .viewer-track {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    /* JS側で transition を付与してスライドさせます */
    will-change: transform;
  }

  /* 1枚ごとのスライド領域（画面幅100vwを確保） */
  .viewer-slide {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* コンテンツを囲むラッパー（各スライド内に配置） */
  .viewer-content-wrapper {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
  }

  /* 動的コンテンツが入るエリア */
  .viewer-dynamic-content {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* ギャラリー画像のスタイル */
  .viewer-gallery-img {
    border: 5px solid #fff;
    max-width: 100%;
    max-height: calc(90vh - 90px);
    max-height: calc(90dvh - 90px);
    object-fit: contain;
    display: block;
  }

  /* フッター（タイトル・カウント・×ボタン） */
  .viewer-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 8px;
    width: 100%;
  }

  .viewer-info {
    color: #fff;
    flex-grow: 1;
    margin-right: 15px;
  }
  
  .viewer-title {
    font-size: 13px;
    line-height: 1;
    word-break: break-all;
  }
  
  .viewer-counter {
    font-size: 10px;
    color: #ccc;
    margin-top: 4px;
  }

  .viewer-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 10px 10px;
  }

  /* ========================================================
     モーダル専用の内部スタイル
  ======================================================== */
  .custom-modal-content {
    max-width: 100%;
    max-height: calc(90vh - 80px);
    max-height: calc(90dvh - 80px);
    display: flex;
    flex-direction: column;
  }
  .custom-modal-title {
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.2rem;
  }
  .custom-modal-desc {
    overflow-y: auto;
    flex-grow: 1;
    line-height: 1.6;
  }

/* ギャラリーログ（詳細） */
.gallery_log_detail {
  background-color: #fff;
  padding: 30px;
  width: 700px;
  max-height: calc(90vh - 80px);
  max-height: calc(90dvh - 80px);
  /* overflow-y: auto;
  overscroll-behavior: contain; */
  /* padding: 20px; */
}
/* #gallery_log_detail .title {
  font-size: 1.2rem;
  border-bottom: 1px #000 solid;

  margin-top: 0px;
  margin-bottom: 10px;
}
#gallery_log_detail .details {
  text-align: center;
} */

.gallery-log-detail-content {
  overflow-y: auto;
}

.gallery_log_detail a {
  text-decoration: none;
}

.gallery_log_detail img.thumbnail {
  height: 50px;
  margin: 3px 2px;
  border: 1px solid #999;
}

@media all and (min-width:600px){
	/*600px以上で適用する内容*/
  .gallery_log_detail img.thumbnail {
    height: 100px;
    margin: 5px 3px;
  }
}

/* 登場人物（詳細）*/
.charactor_detail {
  background-color: #fff;
  width: 800px;
  max-height: 80vh;
  max-height: 80dvh;
  padding: 10px;
  /* display: flex;
  gap: 20px; */
}

.charactor_detail img.main{
  width: 200px;
  margin: 10px auto;
  border: 1px #999 solid
}

.charactor_detail .details {
  padding: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;

}

.charactor_detail .name{
    font-weight: bold;
    font-size: 1.2rem;
}

.charactor_detail .lines {
  font-size: 1.2em;
  font-family: "Yu Mincho", "Hiragino Mincho Pro", "serif";
  font-weight: 500;
  font-style: oblique;
  color: #666;
  padding-top: 10px;
}

.charactor_detail .status {
  font-size: 0.8em;
}
.charactor_detail .description {
  padding: 15px 10px 10px 10px;
  text-align: left;
  line-height: 1.4;
}

.charactor_detail .image-color {
  height: 10px;
  width: 100%;
  border-radius: 10px 10px 0 0;
}

/* 用語解説（詳細） */
  
.glossary_detail {
  background-color: #fff;
  padding: 30px;
  width: 400px;
}
