/* 全体設定 */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  font-family: "Zen Maru Gothic", sans-serif;
  color: #4d4d4d;
  transition: opacity 1s;
  display: flex;
  flex-direction: column;
}

/* フェードイン */
.fade-in { 
  opacity: 0; 
  animation: fadeIn 1s forwards; 
}
@keyframes fadeIn { 
  to { opacity: 1; } 
}

/* 🔹 ナビバー（共通） */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 2px 10px rgba(255, 150, 200, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 2rem;
  z-index: 1000;
  backdrop-filter: blur(6px);
}
.nav-logo { 
  font-size: 1.5rem; 
  color: #ff66b2; 
  font-weight: bold; 
}
.nav-links { 
  list-style: none; 
  display: flex; 
  gap: 1.5rem; 
  margin: 0; 
}
.nav-links a {
  text-decoration: none; 
  color: #ff66b2; 
  font-weight: 600;
  transition: 0.3s;
}
.nav-links a:hover { 
  color: #ff99cc; 
  text-shadow: 0 0 10px rgba(255, 150, 200, 0.4); 
}
.nav-links a.active { 
  border-bottom: 2px solid #ff66b2; 
}

/* ホームヘッダー */
.home-header {
  text-align: center;
  padding: 8rem 2rem 4rem;
  margin-top: 60px;
}
.home-header .logo {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.home-header .catch {
  font-size: 1.2rem;
  color: #777;
}

/* メニューボタン */
.menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto 4rem;
}
.menu-btn {
  display: block;
  width: 100%;
  padding: 1.2rem 2rem;
  background: white;
  border-radius: 2rem;
  color: #ff66b2;
  text-decoration: none;
  text-align: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(255, 150, 200, 0.2);
  transition: all 0.3s;
}
.menu-btn:hover {
  background: #ff66b2;
  color: white;
  box-shadow: 0 4px 15px rgba(255, 150, 200, 0.5);
  transform: translateY(-2px);
}

/* 見出し */
h1, h2 {
  text-align: center;
  color: #ff66b2;
  text-shadow: 1px 1px 8px rgba(255, 150, 200, 0.4);
}

/* ヘッダー */
header {
  padding: 4rem 0 2rem;
}
header .tagline {
  text-align: center;
  font-size: 1.1rem;
  color: #777;
}

/* キャラグリッド */
.character-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 1rem;
  width: 90%;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0;
  justify-items: center;
}

@media (max-width: 1200px) {
  .character-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 768px) {
  .character-grid {
    width: 95%;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .character-grid {
    width: 98%;
    grid-template-columns: repeat(2, 1fr);
  }
}
.character {
  width: 100%;
  max-width: 120px;
  min-width: 80px;
  aspect-ratio: 1;
  margin: 0 auto;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(255, 150, 200, 0.2);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
  opacity: 0.4;
  display: block;
  position: relative;
}

.character.active {
  opacity: 1;
}

.character:hover {
  transform: scale(1.07);
  box-shadow: 0 0 20px rgba(255, 200, 255, 0.6);
  opacity: 1;
}

.character-grid:hover .character:not(:hover):not(.active) {
  opacity: 0.3;
}

.character-grid:hover .character.active:not(:hover) {
  opacity: 0.6;
}

@media (min-width: 1400px) {
  .character {
    max-width: 140px;
  }
}

@media (max-width: 768px) {
  .character {
    max-width: 100px;
  }
}

@media (max-width: 480px) {
  .character {
    max-width: 80px;
  }
}

/* ストーリーセクション */
#story {
  background: rgba(255, 255, 255, 0.5);
  padding: 3rem 1rem;
  text-align: center;
  border-radius: 2rem;
  margin: 3rem auto;
  width: 80%;
}
#story-text {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #555;
  min-height: 100px;
}

/* リンク */
#links {
  text-align: center;
  margin-bottom: 4rem;
}
.link-buttons a {
  display: inline-block;
  margin: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: white;
  border-radius: 2rem;
  color: #ff66b2;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(255, 150, 200, 0.2);
  transition: all 0.3s;
}
.link-buttons a:hover {
  background: #ff66b2;
  color: white;
  box-shadow: 0 4px 15px rgba(255, 150, 200, 0.5);
}

/* モーダル */
#modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
}
#modal.hidden {
  display: none;
}
.modal-content {
  position: relative;
  background: white;
  padding: 2rem;
  border-radius: 1.5rem;
  text-align: center;
  box-shadow: 0 0 30px rgba(255, 180, 220, 0.4);
  animation: fadeInUp 0.6s ease;
}
@keyframes fadeInUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
#modal-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}
#close-modal {
  position: absolute;
  top: 1rem; right: 1.5rem;
  font-size: 2rem;
  color: #ff66b2;
  cursor: pointer;
}

/* 🔹 背景グラデーション */
#background {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  background: linear-gradient(135deg, #e0f7ff, #b3e5fc, #e1f5fe, #b3e5fc, #e0f7ff, #fff9e6, #ffe6f2, #ffeef5, #e0f7ff, #b3e5fc);
  background-size: 400% 400%;
  background-attachment: fixed;
  animation: gradientMove 20s ease infinite;
  z-index: 0;
}
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  40% { background-position: 60% 50%; }
  50% { background-position: 70% 50%; }
  60% { background-position: 80% 50%; }
  100% { background-position: 0% 50%; }
}

/* 🔹 花びら */
#petals {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.petal {
  position: absolute;
  width: 20px;
  height: 20px;
  background-image: url('../images/petal.svg');
  background-size: cover;
  opacity: 0.8;
  animation: fall linear infinite;
}
@keyframes fall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

/* 🔹 メインビジュアル */
.hero {
  position: relative;
  z-index: 10;
  width: 100vw;
  margin: 0;
  padding: 0;
  overflow: hidden;
  margin-top: 0;
}

/* 🔹 トップ画像コンテナ */
.top-image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  will-change: transform;
}

/* 🔹 ヒーロー紹介文 */
.hero-description {
  position: relative;
  z-index: 100;
  width: 90%;
  max-width: 800px;
  margin: 3rem auto 0 auto;
  padding: 0.5rem 3rem 2rem 3rem;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.description-text {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: 1.1rem;
  line-height: 2;
  color: #2c3e50;
  margin: 1.2rem 0;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
}

.description-text:first-child {
  margin-top: 0;
}

.description-text:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .hero-description {
    width: 95%;
    padding: 0.3rem 1.5rem 1.5rem 1.5rem;
    margin: 1.6rem auto 0 auto;
  }
  
  .description-text {
    font-size: 1rem;
    line-height: 1.8;
    margin: 1rem 0;
  }
}

@media (max-width: 480px) {
  .hero-description {
    width: 98%;
    padding: 0.2rem 1rem 1rem 1rem;
    margin: 2rem auto 0 auto;
  }
  
  .description-text {
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0.8rem 0;
  }
}

/* 🔹 CHARACTERセクション */
.characters-section {
  position: relative;
  z-index: 10;
  padding: 4rem 1rem;
  min-height: 100vh;
  background: transparent;
  scroll-margin-top: 0;
}

/* 🔹 LINKSセクション */
.links-section {
  position: relative;
  z-index: 10;
  padding: 4rem 1rem;
  min-height: 100vh;
  background: transparent;
  scroll-margin-top: 0;
}

/* 🔹 キャラクター全体画像 */
.character-full-image {
  width: 90%;
  max-width: 1400px;
  margin: 3rem auto 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.image-slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.image-slider-wrapper {
  display: flex;
  width: 200%;
  transition: transform 0.5s ease-in-out;
  transform: translateX(0);
}

.image-slider-wrapper.initial {
  width: 100%;
}

.character-full-image .slider-image {
  width: 100%;
  flex-shrink: 0;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: block;
}

.character-full-image .slider-image.current {
  width: 100%;
}

.character-full-image .slider-image.next {
  display: none;
}

.character-full-image .slider-image.next.active {
  display: block;
}

/* 🔹 サムネイルコンテナ */
.thumbnail-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.thumbnail-item {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 2px solid transparent;
}

.thumbnail-item:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: #5B9BD5;
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 🔹 画像拡大表示モーダル */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.image-modal.hidden {
  display: none;
}

.image-modal:not(.hidden) {
  opacity: 1;
}

.image-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
}

.image-modal-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.3s;
}

.image-modal-close:hover {
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .character-full-image {
    width: 95%;
  }
}

@media (max-width: 480px) {
  .character-full-image {
    width: 98%;
  }
}

/* 🔹 キャラクターバナー */
.character-banner {
  background: linear-gradient(to right, #4A90E2, #5B9BD5, #6BB6FF, #5B9BD5, #4A90E2);
  padding: 1rem 3rem;
  margin: 0 auto 3rem;
  width: 90%;
  max-width: 1400px;
  border: 4px solid #1a4d7a;
  border-style: double;
  box-shadow: 0 4px 15px rgba(26, 77, 122, 0.3);
  position: relative;
  text-align: center;
}

@media (max-width: 768px) {
  .character-banner {
    width: 95%;
    padding: 1rem 2rem;
  }
}

@media (max-width: 480px) {
  .character-banner {
    width: 98%;
    padding: 1rem 1.5rem;
  }
}

.character-banner::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 2px solid #FFD700;
  pointer-events: none;
}

.banner-text-en {
  color: #FFD700;
  font-size: 2.5rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
  margin-bottom: 0.5rem;
}

.banner-text-jp {
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
}

/* 🔹 LINKSバナー */
.links-banner {
  background: linear-gradient(to right, #4A90E2, #5B9BD5, #6BB6FF, #5B9BD5, #4A90E2);
  padding: 1rem 3rem;
  margin: 0 auto 3rem;
  width: 90%;
  max-width: 1400px;
  border: 4px solid #1a4d7a;
  border-style: double;
  box-shadow: 0 4px 15px rgba(26, 77, 122, 0.3);
  position: relative;
  text-align: center;
}

@media (max-width: 768px) {
  .links-banner {
    width: 95%;
    padding: 1rem 2rem;
  }
}

@media (max-width: 480px) {
  .links-banner {
    width: 98%;
    padding: 1rem 1.5rem;
  }
}

.links-banner::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 2px solid #FFD700;
  pointer-events: none;
}

.links-content {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
}

/* 🔹 リンクグリッド */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

@media (max-width: 768px) {
  .links-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* 🔹 リンクカード */
.link-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #5B9BD5 0%, #6BB6FF 100%);
  border-radius: 1.5rem;
  box-shadow: 0 4px 15px rgba(26, 77, 122, 0.3);
  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.link-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 25px rgba(26, 77, 122, 0.5);
  border-color: #FFD700;
}

.link-card:hover::before {
  opacity: 1;
}

.link-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.link-card:hover .link-icon {
  transform: scale(1.1) rotate(5deg);
}

.link-text {
  flex: 1;
  position: relative;
  z-index: 1;
}

.link-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #FFD700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  font-family: "M PLUS Rounded 1c", sans-serif;
  letter-spacing: 0.05em;
}

.link-description {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-family: "M PLUS Rounded 1c", sans-serif;
}

@media (max-width: 480px) {
  .link-card {
    padding: 1.2rem 1.5rem;
    gap: 1rem;
  }
  
  .link-icon {
    font-size: 2rem;
  }
  
  .link-title {
    font-size: 1.2rem;
  }
  
  .link-description {
    font-size: 0.85rem;
  }
}

.characters-section h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  color: #ff66b2;
  text-shadow: 1px 1px 8px rgba(255, 150, 200, 0.4);
}

.top-image {
  position: relative;
  width: calc(100vw - 2rem);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center top;
  display: block;
  margin: 0 auto;
  padding: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0) translateZ(0);
  z-index: 2;
  will-change: transform;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.top-image-next {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: calc(100vw - 2rem);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center top;
  display: block;
  margin: 0 auto;
  padding: 0;
  z-index: 1;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(100%) translateZ(0);
  will-change: transform;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.top-image-container.sliding .top-image {
  -webkit-transform: translateX(-100%) translateZ(0);
  transform: translateX(-100%) translateZ(0);
}

.top-image-container.sliding .top-image-next {
  -webkit-transform: translateX(0) translateZ(0);
  transform: translateX(0) translateZ(0);
  z-index: 2;
}

/* スライドショー */
.slideshow {
  position: relative;
  width: 70%;
  max-width: 900px;
  aspect-ratio: 16 / 9; /* アスペクト比を固定 */
  overflow: hidden; /* はみ出しを防ぐ */
}
.slideshow img {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 画像をコンテナいっぱいに表示し、位置を完全に揃える */
  object-position: center; /* 画像の中心を揃える */
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.7));
}
.slideshow img.active {
  opacity: 1;
}

.hero-logo {
  font-size: 3.5rem;
  color: #ff66b2;
  text-shadow: 0 0 20px rgba(255, 150, 200, 0.4);
  margin-top: 2rem;
}
.hero-text {
  color: #666;
  font-size: 1.2rem;
}

/* フッター */
footer {
  position: relative;
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  color: #999;
  z-index: 5;
  padding: 1rem 0;
  background: transparent;
  margin-top: auto;
}

/* 🔹 画像切り替えボタン */
.image-switcher {
  position: relative;
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 1rem auto;
  z-index: 100;
}

.image-switch-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
  outline: none;
}

.image-switch-btn:hover {
  background-color: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.7);
}

.image-switch-btn.active {
  background-color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.9);
}

/* 🔹 左上ロゴ */
.top-left-logo {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  z-index: 1500;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.top-logo-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.top-logo-img {
  height: 30px;
  width: auto;
  transition: transform 0.3s ease;
}

.top-logo-img:hover {
  transform: scale(1.1);
}

.top-tbluemem-wrapper {
  display: flex;
  justify-content: flex-start;
}

.top-tbluemem-img {
  height: 18px;
  width: auto;
  transition: transform 0.3s ease;
}

.top-tbluemem-img:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .top-left-logo {
    top: 15px;
    left: 15px;
    gap: 0.25rem;
  }
  
  .top-logo-row {
    gap: 0.25rem;
  }
  
  .top-logo-img {
    height: 25px;
  }
  
  .top-tbluemem-img {
    height: 14px;
  }
}

@media (max-width: 480px) {
  .top-left-logo {
    top: 10px;
    left: 10px;
    gap: 0.2rem;
  }
  
  .top-logo-row {
    gap: 0.2rem;
  }
  
  .top-logo-img {
    height: 20px;
  }
  
  .top-tbluemem-img {
    height: 12px;
  }
}

/* 🔹 ハンバーガーメニューボタン */
.menu-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: rgba(91, 155, 213, 0.5);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(5px);
}

.menu-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.menu-toggle span {
  position: absolute;
  display: block;
  width: 24px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: center;
}

.menu-toggle span:nth-child(1) {
  top: calc(50% - 10px);
  transform: translate(-50%, -50%);
}

.menu-toggle span:nth-child(2) {
  top: 50%;
  transform: translate(-50%, -50%);
}

.menu-toggle span:nth-child(3) {
  top: calc(50% + 10px);
  transform: translate(-50%, -50%);
}

.menu-toggle.active span:nth-child(1) {
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
  top: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.menu-toggle.active {
  background-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.menu-toggle.active:hover {
  transform: none;
  box-shadow: none;
}

/* 🔹 オーバーレイ */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1400;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 🔹 スライドメニュー */
.slide-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 250px;
  height: 100vh;
  background: rgba(91, 155, 213, 0.5);
  border-radius: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 1500;
  transition: right 0.4s ease-out;
  backdrop-filter: blur(10px);
}

.slide-menu.active {
  right: 0;
}

.menu-items {
  list-style: none;
  margin: 0;
  padding: 20px 0;
}

.menu-items li {
  margin: 0;
  padding: 0;
}

.menu-items a {
  display: block;
  padding: 15px 25px;
  color: white;
  text-decoration: none;
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  transition: all 0.3s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-items li:last-child a {
  border-bottom: none;
}

.menu-items a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  padding-left: 30px;
  color: white;
}

