@charset "UTF-8";
@media screen and (max-width: 768px){
  .pconly{
    display: none !important;
  }
}
@media screen and (min-width: 769px){
  .sponly{
    display: none !important;
  }
}
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;
}

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%;
}

:root {
  --primary-color: #0078D4; /* 落ち着いたビジネスブルー */
  --primary-hover-color: #005a9e;
  --correct-color: #107C10; /* Excelの緑を意識した色 */
  --incorrect-color: #D83B01;
  --bg-color: #F5F5F5; /* 少し暖かみのある白へ */
  --card-bg-color: #ffffff;
  --text-color: #242424; /* 純黒から少し柔らかく */
  --light-text-color: #616161;
  --border-color: #E1E1E1;
  --font-family: 'Inter', 'Noto Sans JP', sans-serif;
}
.app-container {
  width: 100%;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

/* ★★★ 結果画面が中央に来るように調整 ★★★ */
#result-screen.active {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 100;
}
#result-screen .card {
  width: 90%;
  max-width: 550px;
}


.card {
  background-color: var(--card-bg-color);
  border-radius: 12px;
  padding: 30px;
  /* ↓ より繊細な影に変更 */
  box-shadow: 0 2px 4px rgba(0,0,0,0.02), 0 5px 15px rgba(0,0,0,0.06);
  text-align: center;
  border-top: 4px solid var(--primary-color); /* 上部にアクセントラインを追加 */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* カードにマウスを乗せた時に少し浮き上がるエフェクトを追加 */
#top-screen  {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.04), 0 10px 20px rgba(0,0,0,0.08);
}


/* ===== ボタン共通スタイル ===== */
.btn {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  border: 1px solid transparent; /* 境界線を透明に */
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease-out; /* トランジションを包括的に */
  font-family: var(--font-family);
  letter-spacing: 0.5px; /* 文字間を少し広げる */
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 3px 0 #005a9e, 0 4px 8px rgba(0,0,0,0.1);
}
.btn-primary:hover {
  background-color: var(--primary-hover-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #005a9e, 0 6px 12px rgba(0,0,0,0.15);
}
.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #005a9e;
}

.btn-secondary {
  background-color: #f0f0f0;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background-color: #e0e0e0;
}

#start-button {
  width: 100%;
  margin-top: 30px;
}

#start-button:disabled {
  background-color: #BDBDBD;
  color: #FAFAFA;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 3px 0 #9E9E9E;
}


.btn-text {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  padding: 4px;
}
.btn-text:hover {
  text-decoration: underline;
}


/* ===== トップ画面 ===== */
#top-screen .title {
  font-size: 2rem;
  margin-bottom: 10px;
}
#top-screen .description {
  color: var(--light-text-color);
  margin-bottom: 20px; /* ★★★ 修正 ★★★ */
}

.top-buttons-wrapper {
  display: flex;
  gap: 10px; /* ボタン間の間隔を少し狭く */
  margin-bottom: 20px; /* 下マージンも調整 */
  justify-content: center;
}
.top-buttons-wrapper .btn {
  /* ボタンが均等に幅を取るように */
  padding: 3px 6px; /* さらにパディングを小さく */
  font-size: 10px; /* フォントサイズをさらに小さく */
}

.setting-wrapper {
  margin-bottom: 25px;
  text-align: left;
}

.setting-wrapper > label, .setting-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text-color);
}

#difficulty-selector {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.checkbox-wrapper {
  display: flex;
  align-items: center;
}
.checkbox-wrapper label {
  cursor: pointer;
  padding-left: 8px;
}

#question-mode-selector {
  display: flex;
  gap: 10px;
}

.btn-mode {
  flex: 1;
}

.btn-mode.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2); /* 選択されている感を強調 */
}


/* ===== ショートカットキー早見表 ===== */
.shortcut-cheatsheet {
  margin: 30px 0 0;
  text-align: left;
  border-top: 1px solid var(--border-color);
  padding-top: 25px;
}

.cheatsheet-rank {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.2s ease-in-out;
}

.cheatsheet-rank[open] {
  background-color: #fcfcfc;
}

.cheatsheet-header {
  padding: 12px 18px;
  font-weight: bold;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cheatsheet-header::-webkit-details-marker {
  display: none;
}

.cheatsheet-header::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--primary-color);
  transition: transform 0.3s ease-in-out;
}

.cheatsheet-rank[open] .cheatsheet-header::after {
  transform: rotate(45deg);
}

.cheatsheet-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
  padding-left: 18px;
  padding-right: 18px;
}

.cheatsheet-rank[open] .cheatsheet-content {
  max-height: 600px;
  padding-top: 0;
  padding-bottom: 15px;
  overflow-y: auto;
}


.cheatsheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.cheatsheet-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #f0f0f0;
}

.cheatsheet-table tr:last-child td {
  border-bottom: none;
}

.cheatsheet-table td:first-child {
  white-space: nowrap;
  width: 45%;
}

.cheatsheet-table kbd, .modal-content2 kbd { /* ★★★ 修正 ★★★ */
  display: inline-block;
  padding: 3px 7px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  background-color: #f7f7f7;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 0 #ccc;
  margin: 0 2px;
  color: #333;
}


/* ===== ゲーム画面 ===== */
#game-screen.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 40px);
  max-height: calc(100vh - 40px);
}

.game-main-content {
  flex-shrink: 0;
}


.game-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  gap: 15px;
}
#progress-container {
  flex-grow: 1;
  background-color: #e0e0e0;
  border-radius: 10px;
  height: 10px;
  overflow: hidden;
}
#progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color) 0%, #90b8de 100%); /* グラデーションに */
  transition: width 0.5s ease-in-out;
  border-radius: 10px;
}

#game-card {
  padding: 40px;
}

#quiz-container {
  font-size: 2.2rem; /* 少し大きくして視認性UP */
  font-weight: bold;
  margin-bottom: 25px;
  min-height: 50px;
  transition: background-color 0.2s;
  color: #333;
}

#key-display-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60px;
  margin-bottom: 20px;
  gap: 10px;
}

.key-display {
  padding: 12px 20px; /* パディング調整 */
  border: 1px solid #BDBDBD;
  background: linear-gradient(to top, #ECEFF1, #FFFFFF); /* 立体感を出すグラデーション */
  border-radius: 8px;
  box-shadow: 0 4px 0 #B0BEC5, 0 5px 5px rgba(0,0,0,0.1); /* 影をリッチに */
  font-size: 1.6rem; /* フォントサイズ調整 */
  font-weight: bold;
  color: var(--text-color);
  transform: translateY(-2px); /* 少し浮き上がらせる */
}

#result-message {
  font-size: 1.1rem;
  font-weight: bold;
  min-height: 24px;
}

.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 0 10px;
}

#score-display {
  font-size: 1rem;
  font-weight: bold;
  color: var(--light-text-color);
}

/* ===== 解答履歴 ===== */
#answer-history-container {
  flex-grow: 1;
  overflow-y: auto;
  margin-top: 20px;
  padding: 0 10px 10px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}


.history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 1rem;
  background-color: var(--card-bg-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border-left: 5px solid;
  animation: slideUp 0.5s ease-out;
}

.history-row.correct-answer {
  border-left-color: var(--correct-color);
}

.history-row.incorrect-answer {
  border-left-color: var(--incorrect-color);
}

.history-correct {
  font-weight: bold;
}

.history-user {
  color: var(--light-text-color);
}

/* ===== 結果画面 ===== */
.result-title {
  font-size: 1.5rem;
  color: var(--light-text-color);
  margin-bottom: 5px; /* ★★★ 修正 ★★★ */
}
/* ★★★ ここから修正 ★★★ */
#result-datetime {
  color: var(--light-text-color);
  font-size: 1rem;
  margin-bottom: 20px;
}
/* ★★★ ここまで修正 ★★★ */
#final-score {
  font-size: 4rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 20px;
}
.result-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}
.result-buttons .btn {
  flex: 1;
}

/* ★★★ 新設: 結果詳細のスタイル ★★★ */
#result-details-container {
  max-height: 250px;
  overflow-y: auto;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 5px;
  text-align: left;
}

.result-item {
  padding: 8px;
  border-radius: 4px;
  margin-bottom: 5px;
}

.result-item:last-child {
  margin-bottom: 0;
}

.result-item-question {
  font-weight: bold;
  display: block;
  margin-bottom: 4px;
}

.result-item-details {
  font-size: 0.9em;
}

.result-item.incorrect .result-item-details {
  color: var(--incorrect-color);
}

.result-item.correct .result-item-details {
  color: var(--correct-color);
}

/* ★★★ ここから修正 (モーダルスタイル) ★★★ */
.modal {
  display: none; 
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}
.modal.is-open {
  display: flex; 
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s;
}
.modal-content2 {
  position: relative;
  text-align: left;
  width: 90%;
  max-width: 500px;
  animation: slideUp 0.4s ease-out;
}
.modal-close-btn {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close-btn:hover,
.modal-close-btn:focus {
  color: var(--text-color);
}
.modal-content2 h2 {
  text-align: center;
  margin-bottom: 20px;
}
.modal-content2 p {
  margin-bottom: 15px;
  line-height: 1.6;
}
.modal-hr {
  border: none;
  height: 1px;
  background-color: var(--border-color);
  margin: 20px 0;
}
.key-example {
  text-align: center;
  margin-top: 15px;
}
.key-example img {
  max-width: 200px;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.key-example kbd {
  font-size: 1rem;
  padding: 8px 12px;
}
/* ★★★ ここまで修正 ★★★ */


/* ===== アニメーション ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#game-card.correct {
  animation: flash-correct 0.5s ease;
}
#game-card.incorrect {
  animation: shake 0.4s ease;
}

@keyframes flash-correct {
  0%, 100% { background-color: var(--card-bg-color); }
  50% { background-color: #e6ffed; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}



@media screen and (max-width: 768px){
  nav.breadcrumb ol,
  main .en,
  main h1,
  main section table,
  main section h2,
  main section#vision .flex,
  main section#history ul{
    width: 92%;
    max-width: 450px;
  }


}
