body {
  font-family: 'Share Tech', sans-serif;
  height: auto; /* 固定を解除する */
  min-height: 100vh; /* 画面の高さ以上は確保 */
  padding-bottom: 100px; /* スクロール用の余白 */
}

.animated-title {
  font-size: 2.5rem;
  color: #333;
  text-align: left;
  margin-left: 12px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideIn 1s ease-out forwards;
}

.version {
  font-size: 1.1rem;
  margin-left: 0.2rem;
  color: #888;
}

@keyframes fadeSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tabs {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.tabs button {
  flex: 0 0 auto;
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: 2px solid transparent; /* ボーダーなし */
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  max-width: 150px;
}

.tabs button small {
  color: #eee;
}

.tabs button:hover {
  background-color: #0056b3; /* ホバー時の色 */
}

.tabs button.active {
  background-color: #ff6f61; /* 選択中の色 */
  border-color: #ff6f61; /* 選択中のボーダー色 */
}

/* ギャラリー */
.tab-content {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tab-content[hidden] {
  display: none !important;
}

.tab-content img,
.tab-content video {
  width: calc((100% - 20px) / 3); /* 3列、gap合計20pxならこれくらい */
  height: auto;
  aspect-ratio: 1 / 1; /* 正方形に保つ */
  object-fit: cover;
  cursor: pointer;
}

@media (min-width: 768px) {
  .tab-content img,
  .tab-content video {
    width: calc((100% - 30px) / 7); /* 6列にしてもOK */
  }
}

video {
  pointer-events: auto;
  cursor: pointer;
}

.video-wrapper {
  position: relative;
  width: calc((100% - 20px) / 3);
  cursor: pointer;
}

@media (min-width: 768px) {
  .video-wrapper {
    width: calc((100% - 30px) / 7);
  }
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1, 2);
  font-size: 48px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
  user-select: none;
  text-shadow: 0 0 5px rgba(0,0,0,0.7);
}

/* モーダル */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  z-index: 999;
}

.modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* モーダルコンテンツを相対配置 */
.modal-content {
  max-width: 90%;
  max-height: 90%;
}

.modal-content img {
  width: 100%; /* 画像のサイズを親要素に合わせる */
  height: auto; /* アスペクト比を保ちながら高さを調整 */
}

.modal-content video {
  width: 100%;
  height: auto;
  max-height: 90vh; /* 画面高さの90%くらいに */
  object-fit: contain; /* アスペクト比を崩さずに収める */
}

.modal-description {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center; /* 中央揃え */
    border: 1px solid #333;
    margin: 20px auto 0; /* 上にマージン、左右中央寄せ */
}

.modal-nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background-color: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 0.25em 0.5em;
  cursor: pointer;
  z-index: 10;
}

.modal-nav-button.left {
  left: 10px;
}

.modal-nav-button.right {
  right: 10px;
}

.scroll-indicator {
  position: fixed;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.down-arrow {
  width: 100px;  /* サイズアップ！ */
  height: 100px;
  animation: float 1.5s ease-in-out infinite;
}

/* ゆらゆらアニメーション */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}