/* ページCSS */
body{
  width: 100vw;
  height: 100svh;
  /* background: url(../images/sitae/sitae_pc_5.jpg); */
  background-repeat: repeat-y;
  background-repeat: no-repeat;
  font-family:  'Noto Sans JP','sans-serif','Hiragino Kaku Gothic Pro','Meiryo';
  width: 100%;
  -webkit-text-size-adjust: 100%; /* さらにSafariで文字サイズが自動縮小されるのを防ぐ */
  font-size: 16px; /* 基本フォントサイズを16pxに設定 = 1em設定 */
}

* {
  /* 全ての要素に対してNoto Sans JPフォントを適用し、文字サイズを1emに統一 */
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1em;
  font-weight: 600;
}

:root {
  --bosaiQuizBrown: #39393a;
  --bosaiQuizRed: #ea5520;
  --bosaiQuizYellow: #f3e200;
  --bosaiQuizLightblue: #aaddf7;
}

li{
  list-style: none;
}

a{
  text-decoration: none;
}





/* ********************************** クイズの初期画面 ********************************** */
.quiz-wrapper{
  width: 100vw;
  height: 100svh;
  position: relative;
  background-color: #ffc700;
  z-index: 0; /* 基準を作る */
}

.illustration {
  position: absolute;
  bottom: 0;
  left: 0;
  max-width: 830px;
  width: 100%;
  height: auto;
  z-index: -1; /* ← 背面に送る */
}

#quiz-setup{
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
  z-index: 2;
}

#setup-contents{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 50vh;
  text-align: center;
}

#quiz-container{
  display: none; /* 一旦非表示 */
}

.cloud{
  background-color: var(--bosaiQuizBrown);
  color: white;
  padding: 1.5em 2.5em;
  border-radius: 0.5em;
  margin: 0 auto 2em auto;
  width: fit-content;
  font-size: 2em;
  font-weight: bold;
  position: relative;
  line-height: 1.4em;
}

.cloud:after, .cloud:before {
	top: 90%;
	left: 50%;
	border: solid transparent;
	content: "";
	height: 0;
	width: 0;
	position: absolute;
	pointer-events: none;
}

.cloud:after {
	border-color: rgba(136, 183, 213, 0);
	border-top-color: var(--bosaiQuizBrown);
	border-width: 50px;
	margin-left: -50px;
}

.cloud br{
  display: none;
}




.quiz_ttl{
  display: flex;
}

#setup-contents button{
  padding: 0.3em 2.5em;
  margin-top: 1.4em;
  min-width: 400px;
  font-size: 4em;
  font-weight: bold;
  border-radius: 9999px;
  background-color: var(--bosaiQuizRed);
  border: none;
  outline: none;
  color: white;
  position: relative;
  box-shadow: 0 14px 0 #ca1c30; /* 影の太さ・色 */
  cursor: url(../images/finger.png), auto; /* カスタムカーソル */
}

/* ホバー時 */
#setup-contents button:hover {
  box-shadow: none;
  transform: translateY(5px);
}

#setup-contents .tokucyan{
  position: absolute;
  right: -1.8em;
  bottom: -1.3em;
  pointer-events: none; /* トクちゃん要素はホバー要素に含めない*/
}

#setup-contents .tokucyan img{
  width: 200px !important;
}

.quiz-question-box .tokucyan2{
  position: absolute;
  right: -3em;
  bottom: -5em;
  pointer-events: none; /* トクちゃん要素はホバー要素に含めない*/
}

.quiz-question-box .tokucyan2 img{
  width: 160px ;
}






















/* ********************************** ここから出題画面 ********************************** */
#quiz-container {
  text-align: center;
  width: 90%;
}

.quiz-question-box {
  position: relative;
  background-color: white;
  border: 6px solid black;
  border-radius: 10px;
  padding: 4em 0 2em 0;
  max-width: 800px;
  margin: 0 auto 5em auto;
}

.quiz-question-box .tokucyan{
  position: absolute;
  right: -4em;
  bottom: -3em;
}

.quiz-question-box .tokucyan img{
  width: 140px;
}

.quiz-number {
  position: absolute;
  top: -1em;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2em;
  background-color: var(--bosaiQuizBrown);
  color: white;
  font-weight: bold;
  padding: 0.5em 1em;
  border-radius: 8px;
}

.quiz-text{
  font-size: 3em;
  line-height: 1.25em;
  font-weight: bold;
  margin: 0;
}

.quiz-choices {
  display: flex;
  justify-content: center;
  gap: 2em;
}

.choice {
  font-size: 3em;
  font-weight: bold;
  border: none;
  border-radius: 25px;
  padding: 0.3em 1em;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3em;
  transition: all 0.1s ease;
  cursor: url(../images/finger.png), auto; /* カスタムカーソル */
  max-width: 300px;
}

.choice span {
  font-weight: bold;
  font-size: 0.8em;
}

/* A, B, Cの選択肢色 */
.choice-a {
  background-color: #f86f51;
  color: white;
}
.choice-b {
  background-color: #f4e343;
  color: #333;
}
.choice-c {
  background-color: #b3e0f9;
  color: #333;
}

.choice:hover {
  transform: translateY(3px);
}

.quiz-note {
  color: #333;
  margin: 2em;
  text-align: center;
  line-height: 1.25em;
}










/* ********************************** 解答の後に⚪︎と×のアニメーションを追加 ********************************** */
#feedback{
  display: none; /* 初期状態で非表示 */
  font-size: 100px;
  text-align: center;
  margin: 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-size: 15em;
}



/* 正解アニメーション */
.correct {
  animation: correctFlash 0.5s;
}
/* 不正解アニメーション */
.incorrect {
  animation: incorrectFlash 0.5s;
}

/* 正解アニメーション効果 */
@keyframes correctFlash {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* 不正解アニメーション効果 */
@keyframes incorrectFlash {
  0% { transform: scale(1); }
  50% { transform: scale(0.8); }
  100% { transform: scale(1); }
}

/* ボタンをクリック後は無効にする */
button.disabled {
  pointer-events: none;
  opacity: 0.8;
}

















































/* ********************************** ここから結果画面 ********************************** */
#quiz-container,
.result{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}


/* 共通スタイル */
.question, .result {
  display: none;
}
.active {
  display: block;
}


/* 解答画面前の移行画面 */
#level-message {
  background-color: var(--bosaiQuizBrown);
  width: max-content;
  color: white;
  padding: 1em 2em;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3em;
  font-weight: bold;
  border-radius: 0.5em;
  text-align: center;
  opacity: 0; /* 初期状態では透明（fadeInで表示させる） */
}

/* 表示時アニメーション */
@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -60%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}
.fade-in {
  animation: fadeIn 0.6s ease-in-out forwards;
}

/* 非表示時アニメーション */
@keyframes fadeOut {
  from { opacity: 1; transform: translate(-50%, -50%); }
  to   { opacity: 0; transform: translate(-50%, -60%); }
}
.fade-out {
  animation: fadeOut 0.6s ease-in-out forwards;
}



.connect_text{
  background-color: var(--bosaiQuizBrown);
  color: white;
  border-radius: 0.5em;
  margin: 0 auto;
  padding: 1em;
  width: fit-content;
  font-weight: bold;
  position: relative;
  line-height: 1.5em;
}

.connect_text:after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -120px;
  transform: translateX(-50%);
  border: solid transparent;
  border-width: 40px;
  border-top-color: var(--bosaiQuizBrown);
}

.connect_text .mob{
  display: block;
}








/* ********************************** 結果画面のコメントデザイン ********************************** */
.evaluation {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 80vh;
  border-radius: 2em;
  overflow: auto;
  background-color: rgba(255, 255, 255, 0.8); /* 白 + 80% 不透明 */
  padding: 4em;
  text-align: center;
}



.evaluation .title {
  font-size: 4em;
  font-weight: bolder;
  color: black;
  margin-top: 1em;
}

.evaluation .stars {
  font-size: 2em;
  color: gold;
  margin: 1em;
}

.star-img {
  width: 3em;
  height: auto;
  margin: 0 5px;
  vertical-align: middle;
}

.evaluation .comment {
  background-color: white;
  border: 8px solid var(--bosaiQuizBrown);
  border-radius: 1em;
  text-align: left;
  padding: 50px;
  font-size: 2em;
  line-height: 1.5em;
  font-weight: bold;
  color: var(--bosaiQuizBrown);
}

.score_text{
  font-size: 2em;
  margin: 2em auto;
}

.checkAnswer{
  padding: 1em;
  border: 2px solid black;
  border-radius: 999px;
  margin-bottom: 3em;
  font-size: 1.5em;
}

#answers-list{
  text-align: left;
  font-size: 2em;
}

#answers-list li{
  margin-bottom: 1em;
  line-height: 1.5em;
}

#answers-list li br{
  display: none;
}

#answers-list li .answer {
  display: flex;              /* 横並び */
  align-items: center;        /* 縦位置を中央揃え */
  gap: 0.5em;                 /* テキストと画像の間に少し余白 */
  font-size: 0.9em;
  margin-top: 0.75em;
}

#answers-list li .answer span {
  font-size: 0.8em;
  background-color: var(--bosaiQuizYellow);
  padding: 0.25em 1.5em;
  border-radius: 0.5em;
  display: inline-block;
}

#answers-list li .answer img {
  max-height: 2em;   /* テキストとバランスを合わせたい時に調整 */
  width: auto;
}


#restart-button{
  padding: 0.5em 1em;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 6px 0 goldenrod; /* 影の太さ・色 */
  cursor: url(../images/finger.png), auto; /* カスタムカーソル */
  font-size: 1.5em;
  margin-bottom: 1em;
}

/* ホバー時 */
#restart-button:hover {
  box-shadow: none;
  transform: translateY(5px);
  background-color: black;
  color: white;
}








































