@charset "UTF-8";
@media screen and (max-width: 768px){
  .pconly{
    display: none !important;
  }
}
@media screen and (min-width: 769px){
  .sponly{
    display: none !important;
  }
  #entire{
    border-radius: 10px;
  }
}
nav.breadcrumb{
  display: block;
  background: #f5fdff;
}
nav.breadcrumb ol{
  display: flex;
  flex-wrap: wrap;
  margin: auto;
  width: 90%;
  max-width: 1200px;
  padding: 10px 0;
  list-style: none;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", Roboto, "Droid Sans", "Yu Gothic", Meiryo, "Meiryo UI", sans-serif;
}
nav.breadcrumb ol li{
  position: relative;
  padding-right: 1.5em;
}
nav.breadcrumb ol li::before{
  content: ">";
  position: absolute;
  right: 3px;
}
nav.breadcrumb ol li:last-child::before{
  content: none;
}
.breadcrumb a{
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", Roboto, "Droid Sans", "Yu Gothic", Meiryo, "Meiryo UI", sans-serif;
}

.main{
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", Roboto, "Droid Sans", "Yu Gothic", Meiryo, "Meiryo UI", sans-serif;
  margin: auto;
  width: 90%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  padding: 40px 0 60px;
  flex-wrap: wrap;
}

main{
  width: 73%;
}
aside{
  width: 22%;
  position: sticky;
  top: 100px;
  height: 100%;
}
aside .side-cta{
  position: relative;
  margin-bottom: 10px;
}
aside .side-cta .back{
  width: 100%;
}
aside .side-cta .btn1,
aside .side-cta .btn2{
  position: absolute;
  left: 8%;
  bottom: 10%;
  width: 80%;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
}
aside .side-cta .btn1{
  bottom: 2%;
  width: 57%;
  left: 40%;
}
/* ここまで共通 */


/* START画面 */
#start-screen{
  text-align: center;
}

h1{
  border-radius: 10px;
  background: #0057a3;
  color: white;
  font-size: 36px;
  margin-bottom: 20px;
  padding: 6px;
}

h2{
  font-size: 1.4rem;
  color: #0057a3;
  margin-bottom: 20px;
  font-weight: bold;
}

#start-screen p{
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 30px;
}



/* モードボタン */

#mode-buttons .mode-btn{
  background: #ffffff;
  color: #0057a3;
  border: 2px solid #0057a3;
  border-radius: 12px;
  width: 100%;
  min-width: 300px;
  max-width: 100%;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 18px 0;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
  margin-bottom: 20px;
}

#mode-buttons .mode-btn:hover{
  background: #f0f0f0;
  box-shadow: 0 4px 12px rgba(0, 87, 163, 0.1);
}

#mode-buttons .selected{
  background: #0057a3 !important;
  color: #ffffff !important;
  border: 2px solid #0057a3;
  transform: scale(1.02);
}

#mode-buttons .mode-btn:active{
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}


.hide{
  display: none !important;
}

/* ルール説明 */
#rule-desc{
  background: none;
  border: none;
  border-radius: 10px;
  padding: 15px;
}

/* テキスト表示時だけ色・装飾を付与 */
#rule-desc.active{
  background: linear-gradient(90deg, #078ffb, #2db6d1);
  border: 2px solid #078ffb;
  font-size: 22px;
  color: white;
}

/* スライダー画面 */
#slider-screen{
  background: linear-gradient(90deg, #e3f2fd 0%, #b3e5fc 100%);
  box-shadow: 0 4px 24px rgba(7,143,251,0.10);
  padding: 40px 30px 32px 30px;
  max-width: 420px;
  margin: 40px auto 0 auto;
  text-align: center;
  border: 2px solid #078ffb;
  border-radius: 16px;
}

#slider-screen p{
  font-size: 1.3rem;
  color: #066cc5;
  font-weight: bold;
  margin-bottom: 24px;
}

#question-range{
  width: 80%;
  accent-color: #078ffb;
  margin-bottom: 12px;
  height: 6px;
}

#range-value{
  font-size: 1.5rem;
  color: #035aa6;
  font-weight: bold;
  margin: 0 6px;
}

#quiz-screen{
  background: linear-gradient(120deg, #e3f2fd 0%, #b3e5fc 100%);
  box-shadow: 0 8px 32px rgba(7,143,251,0.13), 0 1.5px 8px rgba(56,249,215,0.08);
  padding: 48px 32px 48px 32px;
  max-width: 720px;
  margin: 48px auto 0 auto;
  border: 2.5px solid #078ffb;
  border-radius: 16px;
  position: relative;
  animation: quizFadeIn 0.7s cubic-bezier(.4,2,.6,1) 1;
  transition: box-shadow 0.3s, border 0.3s;
}
@keyframes quizFadeIn{
  from{
    opacity: 0; 
    transform: translateY(40px) scale(0.98);
  }
  to{
    opacity: 1; 
    transform: translateY(0) scale(1);
  }
}

#progress{
  text-align: right;
  font-weight: bold;
  color: #078ffb;
  margin-bottom: 18px;
  font-size: 1.1rem;
}

#question{
  font-size: 1.5rem;
  margin-bottom: 28px;
  font-weight: 600;
  color: black;
  background: rgb(239 223 223 / 70%);
  padding: 18px 22px;
  box-shadow: 0 2px 8px rgba(7,143,251,0.06);
  transition: background 0.3s;
  border-radius: 10px;
}
#options{
  display: flex;
  flex-direction: column;
  align-items: center;  /* 子要素（button）を中央に */
  width: 100%;
}
#options button{
  background: #ffffff;
  color: #0057a3;
  border: 2px solid #0057a3;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 14px;
  width: 80%;
  max-width: 500px;
  margin: 12px 0;
  transition: background 0.2s, transform 0.2s;
}

#options button:hover{
  background: #f0f0f0;
  transform: scale(1.02);
}

#options button.selected{
  background: #0057a3 !important;
  color: #ffffff !important;
  border: 2px solid #0057a3;
  transform: scale(1.03);
}

#start-btn,#confirm-range-btn, #start-game-btn, #restart-button,
#return-button, #next-button, #submit-command{
  background: #0057a3;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 24px;
  cursor: pointer;
  margin: 20px auto;
  display: block;
  transition: background 0.2s, transform 0.2s;
}

#start-btn:hover,#confirm-range-btn:hover,#start-game-btn:hover, #restart-button:hover,
#return-button:hover, #next-button:hover, #submit-command:hover{
  background: #004080;
  transform: translateY(-2px);
}

#command-input{
  width: calc(100% - 20px);
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  margin-bottom: 10px;
}

.btn.selected{
  background: linear-gradient(90deg, #066cc5, #035aa6) !important;
  border: 2px solid #066cc5;
  box-shadow: 0 0 10px rgba(7,143,251,0.6);
  color: white;
}

#explanation{
  margin-top: 22px;
  font-style: italic;
  color: #035aa6;
  background: #e0f7fa;
  padding: 16px;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(56,249,215,0.08);
}

#command-input-container{
  margin: 24px 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  width: 100%;
}

#command-input-container input{
  background: #181818;
  color: #f8f8f2;
  border: 1.5px solid #444;
  font-family: 'Consolas', 'Menlo', 'Monaco', 'monospace';
  font-size: 1.1rem;
  border-radius: 6px;
  padding: 14px 16px;
  margin: 0 auto 10px auto;
  width: 80%;
  max-width: 400px;
  min-width: 180px;
  display: block;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: border 0.2s, background 0.2s;
}

#command-input-container input:focus{
  border: 1.5px solid #43e97b;
  background: #222;
  outline: none;
  color: #fff;
}

#score-container{
  text-align: center;
}

#score{
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  margin: 15px 0;
}

#result-list{
  max-width: 800px;
  display: block;
  margin: 30px auto 24px auto;
  padding: 12px 28px;
  font-size: 1.1rem;
  background: linear-gradient(90deg, #e3f2fd 0%, #b3e5fc 100%);
  color: #035aa6;
  font-weight: bold;
  border: 2px solid #078ffb;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(7,143,251,0.10);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.about{
  border: 1px solid #0057a3;
  border-radius: 10px;
  margin-bottom: 20px;
  padding: 15px;
}
.about h2{
  font-size: 24px;
  margin-bottom: 15px;
}
.about .flex{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
.about p{
  font-size: 16px !important;
  margin-bottom: 0 !important;
  text-align: left;
}
.about .flex p{
  width: 65%;
}
.about .flex img{
  width: 30%;
  object-fit: cover;
}

@media (max-width: 768px){
  nav.breadcrumb{
    margin: 0;
  }
  .main{
    width: 100%;
    margin-top: 0;
    padding: 0;
  }
  main{
    width: 90%;
    margin: auto;
    max-width: 500px;
  }
  h1#quiz-title{
    font-size: 26px;
    margin-bottom: 20px;
  }
  aside{
    width: 100%;
  }
  aside{
    max-width: 500px;
    margin: auto;
  }
  aside section{
    position: relative;
  }
  aside section > img{
    width: 100%;
  }
  aside a{
    position: absolute;
  }
  aside .btn1{
    top: 39%;
    left: 6%;
    width: 60%;
  }
  aside .btn2{
    top: 72%;
    left: 6%;
    width: 60%;
  }
  aside a img{
    width: 100%;
  }
  /* ここまで共通 */
   #start-screen h1{
    font-size: 20px;
    padding: 8px;
  }
  #start-screen p{
    font-size: 1rem;
  }
  #mode-buttons{
    grid-template-columns: 1fr;
    gap: 16px;
  }
  #mode-buttons .mode-btn{
    width: 100%;
    min-width: unset;
    font-size: 1rem;
    padding: 14px;
  }
  #rule-desc.active{
    font-size: 1rem;
    padding: 12px;
  }
  #slider-screen{
    padding: 24px 16px;
    width: 100%;
    box-sizing: border-box;
  }
  #question-range{
    width: 100%;
  }
  #quiz-screen{
    padding: 24px 16px;
    margin: 24px auto 0 auto;
    width: 100%;
    box-sizing: border-box;
  }
  #quiz-screen h1{
    font-size: 1.5rem;
  }
  #question{
    font-size: 1.1rem;
    padding: 14px;
  }
  #options button{
    width: 100%;
    font-size: 1rem;
    padding: 14px;
  }
  #next-button, #submit-command{
    padding: 12px 24px;
    font-size: 1rem;
  }
  #command-input-container input{
    font-size: 1rem;
    padding: 12px;
    width: 95%;
  }
  #explanation{
    font-size: 1rem;
    padding: 12px;
  }
  #score{
    font-size: 1.5rem;
  }
  #result-list{
    font-size: 1rem;
    padding: 10px 20px;
  }
  .about .flex{
    flex-direction: column-reverse;
  }
  .about .flex p{
    width: 100%;
  }
  .about .flex img{
    width: 100%;
    margin-bottom: 15px;
  }
}