﻿@charset "UTF-8";
/* =========================================================
   GALLERY PAGE STYLES - FIXED VERSION 3.0
   ========================================================= */

/* ------------------ 1. GALLERY GRID ------------------ */
#gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  padding-bottom: 80px;
}
.thumbnail {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}
.thumbnail:hover {
  transform: scale(1.1);
  z-index: 2;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
@media (max-width: 500px) {
  .thumbnail {
    width: 80px;
    height: 80px;
  }
}
@media (min-width: 1100px) {
  .thumbnail {
    width: 300px;
    height: 300px;
  }
}
@media (min-width: 1600px) {
  .thumbnail {
    width: 500px;
    height: 500px;
  }
}

/* Loading Animation */
.thumb-wrapper {
  position: relative;
  overflow: hidden;
  background: transparent;
  border-radius: 10px;
}
.thumb-wrapper img.thumbnail {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.thumb-wrapper.loaded img.thumbnail {
  opacity: 1;
}
.thumb-wrapper:not(.loaded)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  z-index: 2;
}
.dots {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 40px;
  height: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
  pointer-events: none;
}
.dot {
  width: 8px;
  height: 8px;
  background: #666;
  border-radius: 50%;
  animation: dotBlink 1.4s infinite;
}
.dot:nth-child(2) { animation-delay: .2s; }
.dot:nth-child(3) { animation-delay: .4s; }
@keyframes dotBlink {
  0% { opacity: .3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); }
  100% { opacity: .3; transform: scale(1); }
}
.thumb-wrapper.loaded::before, .thumb-wrapper.loaded .dots {
  display: none !important;
}

/* ------------------ 2. YEAR TABS (年代メニュー) ------------------ */
/* 新規追加: メニュー全体を包む固定エリア */
.gallery-nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #000; /* 背景を黒(またはcategory-menuと同じ色)で統一して隙間を目立たなくする */
  width: 100%;
}

#year-menu {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  padding: 15px 10px 0 10px;
  background: #f4f4f4; /* タブの背景色 */
  flex-wrap: nowrap;
  /* 横スクロールは許可するが、縦は完全に禁止する */
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  /* position: sticky は親の .gallery-nav-wrapper に任せるため削除 */
  position: relative; 
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
  /* スクロールの連鎖を制御（スマホでの操作感向上） */
  overscroll-behavior-x: contain;
}
#year-menu::-webkit-scrollbar {
  display: none;
}
.year-button {
  position: relative;
  background: #222;
  color: #888;
  border: none;
  font-family: 'Zen Antique', serif;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 24px;
  border-radius: 10px 10px 0 0;
  transition: all 0.2s;
  white-space: nowrap;
  margin-bottom: 0;
  box-shadow: inset 0 -2px 5px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}
.year-button:hover {
  background: #333;
  color: #fff;
}
.year-button.active {
  background: #FFA700;
  color: #000;
  font-weight: bold;
  box-shadow: none;
  z-index: 10;
  padding-bottom: 12px;
  margin-bottom: -4px;
}
.year-button.more-btn {
  font-weight: bold;
  letter-spacing: 2px;
  background: #333;
  color: #fff;
}
/* 💡修正: スマホでクローンボタンを押せるように pointer-events: none を削除 */
.year-display-clone {
  /* pointer-events: none;  <-- 削除 */
  cursor: pointer;
}

/* 右側ドロワー (年代用) */
#year-drawer {
  position: fixed;
  top: 0;
  right: -280px; /* 初期状態は画面外 */
  width: 260px;
  height: 100dvh;
  background: #151515;
  border-left: 1px solid #333;
  padding: 20px;
  /* Flexboxで縦並び・スクロール制御 */
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2147483647; /* 最前面 */
  transition: right 0.3s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.3s;
  visibility: hidden;
  box-shadow: none;
  overflow-y: auto; /* 全体をスクロール可能に */
}
#year-drawer.open {
  right: 0;
  visibility: visible;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.7);
}
.drawer-header {
  color: #FFA700;
  font-family: 'Zen Antique', serif;
  font-size: 18px;
  border-bottom: 1px solid #444;
  padding-bottom: 10px;
  margin-bottom: 15px;
  flex-shrink: 0;
}
/* ドロワー内コンテンツ */
#year-drawer-content {
  flex-shrink: 0; /* 縮ませない */
  display: flex;
  flex-direction: column;
  gap: 5px;
}
#year-drawer .year-button {
  width: 100%;
  text-align: left;
  border-radius: 6px;
  background: #2a2a2a;
  margin-bottom: 0;
  padding: 12px 15px;
  box-shadow: none;
  border: 1px solid #333;
}
#year-drawer .year-button.active {
  background: #FFA700;
  color: #000;
  border-color: #FFA700;
}
#year-drawer-close {
  width: 100%;
  padding: 12px;
  background: #000;
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  /* 画面下部配置：スクロール時の末尾へ */
  margin-top: auto; 
  margin-bottom: 40px; /* スマホ用余白 */
  flex-shrink: 0;
}

/* ------------------ 3. CATEGORY MENU (カテゴリーメニュー) ------------------ */
/* 💡重要修正: IDセレクタの # が抜けていたのを修正 */
#category-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 15px 16px;
  background: #000;
  /* 上を細いグレー、下を太いオレンジにしてデザインを繋げる */
  border-top: 1px solid #333; 
  border-bottom: 4px solid #FFA700; 
  position: relative;
  z-index: 1;
  transition: z-index 0s step-end 0.3s;
}

/* リンクコピーボタンのスタイル（他のTagsボタンと統一） */
#share-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #444;
  background: #222;
  color: #eee;
  font-size: 12px;
  cursor: pointer;
  transition: 0.2s;
}

#share-link-btn:hover {
  background: #333;
  border-color: #FFA700;
}

#share-link-btn.copied {
  background: #FFA700;
  color: #000;
  border-color: #FFA700;
}

/* 💡ドロワーが開いている時だけ親ごと最前面へ */
#category-menu.is-open {
  z-index: 2147483647;
  transition: z-index 0s; /* 開くときは即座に上げる */
}

#category-main-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 800px;
}

/* 全リスト表示エリア（PC/SP共通ベース） */
#category-full-list {
  display: none; /* JSで制御 */
  width: 100%;
  max-width: 800px;
  background: #111;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 15px;
  margin-top: 10px;
  box-sizing: border-box;
}

/* グループラベル */
.group-label {
  font-size: 12px;
  color: #5e300d; /* 濃い茶色 */
  font-family: sans-serif;
  letter-spacing: 0.1em;
  font-weight: bold;
  border-bottom: 1px solid #444;
  padding-bottom: 4px;
  margin-bottom: 8px;
  width: 100%;
  text-align: left;
}
.category-group {
  width: 100%;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
}
.category-group:last-child {
  margin-bottom: 0;
}
.group-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.category-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #444;
  background: #222;
  color: #eee;
  font-size: 12px;
  cursor: pointer;
  transition: 0.2s;
  white-space: nowrap;
}
.category-button .cat-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.category-button:hover {
  background: #333;
  border-color: #888;
  transform: translateY(-1px);
}
.category-button.active {
  background: #FFA700;
  color: #000;
  border-color: #000;
  pointer-events: none;
}
#category-select-btn {
  background: #333;
  color: #fff;
  border: 1px solid #666;
  font-weight: bold;
}
#category-select-btn.open {
  background: #444;
  border-color: #FFA700;
  color: #FFA700;
}
#category-select-btn::after {
  content: " ▼";
  font-size: 10px;
  margin-left: 5px;
}
#category-select-btn.open::after {
  content: " ▲";
}

/* --- 💡スマホ用 タグドロワー化 (500px以下) --- */
@media (max-width: 500px) {
  #category-full-list {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100dvh;
    max-width: none;
    background: #151515;
    margin: 0;
    border: none;
    border-right: 1px solid #333;
    z-index: 2147483647; /* 最前面 */
    overflow-y: auto;
    /* Flexboxで下部配置を実現 */
    display: flex !important;
    flex-direction: column;
    /* アニメーションと影 */
    transition: left 0.3s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.3s;
    box-shadow: none;
    padding: 20px;
    padding-bottom: 20px;
    visibility: hidden;
  }
  #category-full-list.active-drawer {
    left: 0;
    visibility: visible;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
  }

  /* 💡新規追加: ドロワー内ヘッダー (Tags menu) */
  .drawer-main-header {
    font-family: 'Zen Antique', serif;
    font-size: 24px;
    color: #FFA700;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 20px;
    width: 100%;
    text-align: left;
    flex-shrink: 0;
  }
  .drawer-main-header .tags-part {
    font-size: 32px;
    color: #F0E68C; /* 薄い黄色/ゴールド */
    margin-right: 5px;
  }

  /* 💡グループラベルの色調整 (黒背景で見やすい色に) */
  .group-label {
    color: #8B4513; /* サドルブラウン */
    font-size: 14px;
    margin-top: 5px;
    border-bottom-color: #333;
  }
  
  /* スマホ用ドロワー閉じるボタン */
  .drawer-close {
    width: 100%;
    padding: 12px;
    background: #000;
    color: #fff;
    border: 1px solid #444;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    /* 画面下部配置：スクロール時の末尾へ */
    margin-top: auto; 
    margin-bottom: 60px; /* 下部ナビと被らないように少し広めに */
    flex-shrink: 0;
  }
  
  /* MENUボタン調整 */
  #category-select-btn::before {
    content: "≡ ";
    font-size: 14px;
    margin-right: 2px;
  }
  #category-select-btn::after { content: ""; margin: 0; }
}
/* PCサイズではドロワー用閉じるボタンを非表示 */
@media (min-width: 501px) {
  .drawer-close {
    display: none !important;
  }
}

/* 不要な要素の非表示 */
#category-drawer, #category-toggle {
  display: none !important;
}

/* ------------------ 4. TAP HINT ------------------ */
#tap-hint {
  display: none;
  font-size: 12px;
  color: #ccc;
  background: rgba(0, 0, 0, 0.6);
  padding: 5px 12px;
  border-radius: 20px;
  margin: 15px auto 5px auto;
  width: fit-content;
  pointer-events: none;
  border: 1px solid #333;
}
@media (max-width: 500px) {
  #tap-hint { display: block; }
}

/* ------------------ 5. MODAL & RESPONSIVE ------------------ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.modal-top-bar {
  flex: 0 0 60px;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 10010;
}
#modal-counter {
  color: #fff;
  font-size: 16px;
  font-family: 'Zen Antique', serif;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.modal-top-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
.modal-main {
  flex: 1;
  position: relative;
  width: 100%;
  padding: 20px 0;
  box-sizing: border-box;
  text-align: center;
}
.modal-bottom-bar {
  z-index: 10010;
  display: flex;
  align-items: center;
}

/* ボタン共通設定 */
.modal button.prev, .modal button.next, .modal button.close,
.modal button.share, .modal button.youtube-toggle, .modal button.rough-toggle {
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.4);
  border: 1.5px solid #fff !important;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  padding: 0;
  pointer-events: auto;
  color: #fff;
  touch-action: manipulation;
  user-select: none;
  position: relative;
}
.modal button:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.15);
}
.modal button svg {
  width: 24px !important;
  height: 24px !important;
  display: block !important;
  fill: currentColor;
}
.modal button.youtube-toggle {
  background: #f00 !important;
  border: none !important;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}
.modal button.youtube-toggle svg {
  fill: #fff !important;
  width: 28px !important;
  height: 28px !important;
}
.modal button.share { width: 40px; height: 40px; }
.modal button.share svg {
  width: 20px !important;
  height: 20px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2px !important;
}
.modal button.share:hover {
  border-color: #0099e5 !important;
  background: rgba(0, 153, 229, 0.2);
  box-shadow: 0 0 15px rgba(0, 153, 229, 0.6);
}
.modal button.rough-toggle:hover, .modal button.rough-toggle.active {
  border-color: #B90003 !important;
  background: rgba(185, 0, 3, 0.2);
  box-shadow: 0 0 10px rgba(185, 0, 3, 0.5);
  transform: scale(1.1);
}
.modal button.rough-toggle svg {
  width: 22px !important;
  height: 22px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2px !important;
}
.modal button.close::before, .modal button.close::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 2px;
  background-color: #fff;
  border-radius: 1px;
}
.modal button.close::before { transform: rotate(45deg); }
.modal button.close::after { transform: rotate(-45deg); }
.modal button.prev::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 12px solid #fff;
  margin-right: 3px;
}
.modal button.next::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #fff;
  margin-left: 3px;
}

/* Share Popup */
.share-container { position: relative; }
.share-popup {
  display: none;
  position: absolute;
  top: 55px;
  right: -10px;
  width: 140px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  padding: 8px 0;
  z-index: 10020;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}
.share-popup.active { display: block; opacity: 1; transform: translateY(0); }
.share-popup::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 24px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
}
.share-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 16px;
  border: none; background: transparent; color: #333; font-size: 13px; font-weight: bold;
  text-decoration: none; cursor: pointer; box-sizing: border-box; font-family: sans-serif;
  transition: background 0.2s;
}
.share-item:hover { background: #f0f0f0; color: #B90003; }
.share-item .icon { width: 20px; text-align: center; font-size: 14px; }
.share-item.x-twitter:hover .icon { color: #000; }
.share-item.facebook:hover .icon { color: #1877F2; }
.share-item.line:hover .icon { color: #06C755; }

/* Modal Info Components */
#modal-info {
  width: 90%;
  max-width: 800px;
  color: #fff;
  text-align: left;
  margin: 0 auto;
}
#modal-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
  border-bottom: 1px solid #444;
  padding-bottom: 8px;
  font-family: 'Zen Antique', serif;
}
#modal-desc { font-size: 13px; line-height: 1.6; color: #ddd; }
.modal-meta {
  font-family: 'Zen Antique', serif; font-size: 13px; color: #aaa;
  margin-bottom: 12px; letter-spacing: 0.05em;
  display: flex; align-items: center; gap: 8px;
}
.meta-divider { color: #555; font-size: 10px; }
#modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.modal-tag-pill {
  display: inline-block; font-size: 11px; color: #aaa; background: #111;
  padding: 4px 12px; border-radius: 999px; border: 1px solid #444;
  white-space: nowrap; letter-spacing: 0.05em; font-family: sans-serif;
}
#modal-video-container {
  display: none; width: 100%; max-width: 800px; aspect-ratio: 16 / 9;
  background: #000; margin: 0 auto 20px auto; box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
#modal-video-container iframe { width: 100%; height: 100%; }

/* Compare Slider */
.image-compare-container {
  position: relative; width: auto; max-width: 100%; margin: 0 auto; line-height: 0;
}
#modal-image, #modal-image-rough {
  display: block; width: auto; max-width: 100%; margin: 0 auto;
  object-fit: contain; box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
#rough-layer {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%; overflow: hidden; display: none;
  clip-path: inset(0 100% 0 0); z-index: 5; pointer-events: none;
}
.image-compare-container.active-rough #rough-layer { display: block; }

.slider-container {
  position: relative;
  margin: 10px auto 20px auto;
  width: 90%;
  max-width: 320px;
  display: flex; align-items: center; gap: 15px;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 20px;
  box-sizing: border-box; /* paddingを含める */
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  opacity: 1;
  transition: opacity 0.3s ease;
  touch-action: manipulation;
  flex-shrink: 0; /* 縮小させない */
}
.image-compare-container.active-rough + .slider-container, #slider-wrapper[style*="flex"] {
  opacity: 1;
}
.slider-label {
  color: #fff; font-size: 12px; font-weight: bold; white-space: nowrap;
}
.compare-slider {
  -webkit-appearance: none;
  width: 100%; /* 親要素いっぱくまで */
  height: 6px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 3px; outline: none; margin: 0;
  touch-action: manipulation;
  cursor: pointer;
}
.compare-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px;
  background: #B90003; border: 2px solid #fff; border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* =========================================
   RESPONSIVE SETTINGS (PC / SP)
   ========================================= */

/* --- PC Responsive (769px+) --- */
@media screen and (min-width: 769px) {
  .info-toggle-btn { display: none !important; }
  #modal-info-content { display: block !important; }
  .modal-main {
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 20px;
    height: 100%;
  }
  .image-compare-container {
    flex: 1 1 auto;
    min-height: 300px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    overflow: hidden;
  }
  #modal-image, #modal-image-rough {
    max-height: 100% !important;
    width: auto; max-width: 100%; object-fit: contain;
  }
  .slider-container, #modal-video-container { flex-shrink: 0; }
  #modal-info {
    flex-shrink: 0; max-height: 30vh; overflow-y: auto;
    margin-top: 10px; padding-bottom: 0; max-width: calc(100% - 200px);
  }
  #modal-video-container { max-width: calc(100% - 200px); }
  
  .modal-bottom-bar {
    position: fixed; top: 50%; left: 0; height: 0; width: 100%;
    transform: translateY(-50%);
    pointer-events: none;
    justify-content: space-between;
  }
  .modal button.prev { position: absolute; left: 30px; pointer-events: auto; width: 60px; height: 60px; }
  .modal button.next { position: absolute; right: 30px; pointer-events: auto; width: 60px; height: 60px; }
}

/* --- SP Responsive (Max 768px) --- */
@media screen and (max-width: 768px) {
  .modal-main {
    overflow-y: auto !important;
    display: block !important;
    padding-bottom: 100px;
  }
  .modal-bottom-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0;
    width: 100%;
    height: 50px !important;
    background: rgba(0, 0, 0, 0.95);
    border-top: 1px solid #333;
    justify-content: space-evenly;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
    pointer-events: auto;
    z-index: 10020;
    transform: none !important;
    top: auto !important;
  }
  .modal button.prev { order: 1; position: static; }
  .modal button.next { order: 2; position: static; }
  
  /* スマホ用ボタンサイズ修正 */
  .modal button.prev, .modal button.next, .modal button.close,
  .modal button.share, .modal button.youtube-toggle, .modal button.rough-toggle {
    width: 36px !important; height: 36px !important;
  }
  .modal button svg { width: 18px !important; height: 18px !important; }
  .modal button.youtube-toggle svg { width: 20px !important; height: 20px !important; }
  .modal button.share svg { width: 16px !important; height: 16px !important; }
  
  .modal button.close::before, .modal button.close::after { width: 16px; }
  .modal button.prev::before { border-width: 6px 10px 6px 0; }
  .modal button.next::before { border-width: 6px 0 6px 10px; }
  
  #modal-image, #modal-image-rough { max-height: 60vh !important; }
  .image-compare-container { margin-bottom: 10px; }
  
  /* 作品情報ボタン（点滅・表示変更） */
  .info-toggle-btn {
    display: block; width: 160px; margin: 10px auto; padding: 8px 0;
    background: #222; color: #fff;
    border: 1px solid #B90003;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    animation: glowRed 2s infinite ease-in-out;
  }
  @keyframes glowRed {
    0% { box-shadow: 0 0 5px rgba(185, 0, 3, 0.2); border-color: #800000; }
    50% { box-shadow: 0 0 15px rgba(185, 0, 3, 0.8); border-color: #B90003; }
    100% { box-shadow: 0 0 5px rgba(185, 0, 3, 0.2); border-color: #800000; }
  }
  
  .info-toggle-btn.active {
    background: #444; border-color: #666; color: #aaa;
    animation: none; box-shadow: none;
  }
  .info-toggle-btn:hover { opacity: 0.8; }
  
  #modal-info-content { display: none; }
  #modal-info-content.active { display: block; animation: fadeInInfo 0.3s ease; }
  
  #modal-title {
    font-size: 14px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    cursor: pointer; border-bottom: 1px dashed #666;
    padding-right: 20px; position: relative; margin-bottom: 15px;
  }
  #modal-title::after {
    content: "▼"; font-size: 10px; position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: #888;
  }
  #modal-title.expanded {
    white-space: normal; word-break: break-all; border-bottom: 1px solid #444;
  }
  #modal-title.expanded::after { content: "▲"; }
}

/* 不要なスクロールバーと影の削除 */
html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}