body {
  margin: 0;
  font-family: sans-serif;
  background-color: #fffafc;
}

/* フォント定義 */
@font-face {
  font-family: 'dokidoki';
  src: url('fonts/DokiDokiFantasia.otf') format('opentype');
}
@font-face {
  font-family: 'utsukushi';
  src: url('fonts/utsukushi.otf') format('opentype');
}
@font-face {
  font-family: 'kusukusuame';
  src: url('fonts/kusukusuame.otf') format('opentype');
}
@font-face {
  font-family: 'mugimaru';
  src: url('fonts/mugimaru.ttf') format('truetype');
}
@font-face {
  font-family: 'bokutachi';
  src: url('fonts/bokutachi.otf') format('opentype');
}
@font-face {
  font-family: 'mushin';
  src: url('fonts/mushin.otf') format('opentype');
}



/* キャラクターエリア全体 */
#characters_area {
  width: 90%;
  max-width: 740px;
  margin: 20px auto;
  background-color: RGB(255, 245, 240);
}

/* タイトル */
h2 {
  text-align: center;
  font-size: 65px;
  font-family: 'dokidoki';
  color: #ffffff;
  background-color: rgba(255, 182, 193, 0.3);
  -webkit-text-stroke: 1px rgba(255, 141, 170, 0.3);
  width: 740px;
  height: 85px;
  margin: 50px auto;
  padding: 30px 0;
}

/* 紹介文 */
#introduce {
  text-align: center;
  display: block;
  margin: 0 auto;
  font-size: 25px;
  font-family: 'bokutachi';
  padding: 5px 0;
}

/* キャラ名表示 */
#note {
  text-align: center;
  margin: 20px auto;
}
#catchphrase {
  display: block;
  margin: 20px auto;
  text-align: center;
}

.chara_intr_name {
  font-size: 65px;
  font-family: 'mushin';
  color: #ffffff;
  -webkit-text-stroke: 1.5px rgba(50, 50, 50, 1);
  margin-bottom: 10px;
}

/* キャラ説明 */
#description_container {
  font-size: 25px;
  line-height: 1.5;
  max-width: 80%;
  margin: 10px auto 30px;
  font-family: 'mushin';
  color: #666666;
  text-align: center;
}

/* 説明文フェードイン */
.fade-text {
  animation: fadeText 0.6s ease;
}
@keyframes fadeText {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* キャラ画像とボタンを横並びに */
.characters_row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: nowrap;
  margin: 30px auto;
  max-width: 100%;
}

/* キャラ画像の枠 */
.characters_stage {
  width: 400px;
  height: 400px;
  background-color: #FDE8D2;
  border: 6px solid #ffffff;
  border-radius: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 画像を入れ替えるコンテナ */
#image_container {
  width: 360px;
  height: 360px;
  position: relative;
}
#image_container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
}

/* アニメーション */
.jump-in {
  animation: jumpIn 0.7s ease-out forwards;
  z-index: 2;
}
.jump-out {
  animation: jumpOut 0.6s ease-in forwards;
  z-index: 1;
}
@keyframes jumpIn {
  0% {
    transform: translateY(200px) scale(0.8);
    opacity: 0;
  }
  40% {
    transform: translateY(-20px) scale(1.05);
    opacity: 1;
  }
  60% {
    transform: translateY(10px) scale(0.97);
  }
  80% {
    transform: translateY(-5px) scale(1.02);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}
@keyframes jumpOut {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  30% {
    transform: translateY(-30px) scale(1.1);
    opacity: 0.8;
  }
  60% {
    transform: translateY(60px) scale(0.9);
    opacity: 0.4;
  }
  100% {
    transform: translateY(100px) scale(0.8);
    opacity: 0;
  }
}

/* ボタンエリア */
.characters_controls_nextback {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  gap: 100px;
}

/* ボタン共通 */
.characters_row .btn_back,
.characters_row .btn_next {
  background-color: #d8c9ec;
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  font-family: "Noto Sans JP", sans-serif;
  padding: 10px 10px;
  border: 3px solid #bca8e0;
  border-radius: 30px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.characters_row .btn_next::after {
  content: "→";
  margin-right: 4px;
  margin-left: 4px;
}
.characters_row .btn_back::before {
  content: "←";
  margin-right: 4px;
  margin-left: 4px;
}
.characters_row .btn_back:hover,
.characters_row .btn_next:hover {
  background-color: #cbb7e4;
  transform: translateY(-2px);
}
.characters_row .btn_next:active,
.characters_row .btn_back:active {
  transform: scale(0.95);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/*以下小さい画面用*/
@media (min-width: 851px) and (max-width:1280px) {
  #characters_area {
    width: 80%;
  }
  
  h2 {
  	width: 100%;
  	font-size: 70px;
  	height: 110px;
  	padding: 10px 0;
  }

.characters_row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1%;
  flex-wrap: nowrap;
  margin: 30px auto;
  max-width: 100%;
} 
  
  

}

/*以下スマホ用css*/

@media(max-width:620px){
  
  h2 {
  	width: 100%;
  	font-size: clamp(60px, 4vw, 70px);

  	height: 100%;
  	padding: 10px 0;
  }
  
  #introduce {
  font-size: 23px;
  
  }
  
  #characters_area {
	width: 100%;

  }
 .characters_stage {
	width: 320px;
 	height: 300px;
 }
 #description_container {
 	font-size: 15px;
 
 }

.characters_row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1%;
  flex-wrap: nowrap;
  margin: 30px auto;
  max-width: 100%;
} 

}

/*以下タブレット用*/
@media (min-width: 621px) and (max-width:850px){
	#characters_area {
	width: 100%;
	
	
	h2 {
		width: 100%;
		font-size: 70px;
		height: 110px;
		padding: 10px 0;
	}
 	
 	.characters_stage {
	width: 350px;
 	height: 350px;
 }

.characters_row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1%;
  flex-wrap: nowrap;
  margin: 30px auto;
  max-width: 100%;
  overflow-x: hidden;
} 

}

/*デバイスが横向きの場合*/
@media (orientation: landscape) {
}



@media(min-width: 416px) and (max-width:480px){

	  h2 {
  	width: 100%;
  	font-size: 40px;
  	height: 100%;
  	padding: 10px 0;
  }
  
  #introduce {
  font-size: 23px;
  
  }
  
  #characters_area {
	width: 100%;
	margin: 9% 0;
  }
 .characters_stage {
	width: 320px;
 	height: 300px;
 }

.characters_row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1%;
  flex-wrap: nowrap;
  margin: 30px auto;
  max-width: 100%;
} 

}



}
