* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  background: #F8F8FB;
  color: #000000;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  background: #FFFFFF;
  min-height: 100dvh;
}

/* ヘッダー */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #0017C1;
}

.header__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header__title {
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.03em;
}

.header__subtitle {
  font-size: 11px;
  color: #C5D7FB;
  font-weight: 500;
}

/* ナビ */
.nav {
  display: flex;
  background: #F8F8FB;
  border-bottom: 1px solid #CCCCCC;
}

.nav__link {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #626264;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav__link:hover {
  color: #0017C1;
  background: rgba(52, 96, 251, 0.05);
}

.nav__link--active {
  color: #0017C1;
  border-bottom-color: #0017C1;
}

/* 画面表示制御 */
.screen--hidden {
  display: none;
}

/* スタート画面 */
.start {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  text-align: center;
}

.start__icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #D9E6FF;
  border: 2px solid #C5D7FB;
  border-radius: 16px;
  font-size: 28px;
  font-weight: 800;
  color: #0017C1;
  margin-bottom: 20px;
}

.start__title {
  font-size: 20px;
  font-weight: 800;
  color: #000000;
  margin-bottom: 10px;
}

.start__desc {
  font-size: 14px;
  color: #626264;
  line-height: 1.8;
  max-width: 360px;
  margin-bottom: 32px;
}

.start__btn {
  padding: 14px 48px;
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  background: #0017C1;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.start__btn:hover {
  transform: translateY(-1px);
}

.start__btn:active {
  transform: translateY(0);
}

/* プログレスバー */
.progress {
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress__bar {
  flex: 1;
  height: 6px;
  background: #C5D7FB;
  border-radius: 3px;
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  background: #3460FB;
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress__text {
  font-size: 13px;
  font-weight: 700;
  color: #0017C1;
  white-space: nowrap;
}

/* 問題 */
.question {
  padding: 24px 20px;
}

.question__text {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* 選択肢 */
.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choice {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  background: #FFFFFF;
  border: 1px solid #CCCCCC;
  border-left: 4px solid #C5D7FB;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  font-family: inherit;
  line-height: 1.6;
}

.choice:hover:not(.choice--disabled) {
  border-left-color: #3460FB;
  background: #F8F8FB;
}

.choice--disabled {
  cursor: default;
}

.choice--correct {
  background: #E6F5EC;
  border-color: #197A4B;
  border-left-color: #197A4B;
  color: #197A4B;
}

.choice--wrong {
  background: #FDEEEE;
  border-color: #CE0000;
  border-left-color: #CE0000;
  color: #CE0000;
}

.choice--reveal {
  border-left-color: #197A4B;
  border-color: #197A4B;
}

/* フィードバック */
.feedback {
  padding: 0 20px 24px;
}

.feedback--hidden {
  display: none;
}

.feedback__result {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.feedback__result--correct {
  background: #E6F5EC;
  color: #197A4B;
  border: 1px solid #bbf7d0;
}

.feedback__result--wrong {
  background: #FDEEEE;
  color: #CE0000;
  border: 1px solid #fecaca;
}

.feedback__explanation {
  font-size: 13px;
  line-height: 1.8;
  color: #374151;
  padding: 12px 16px;
  background: #F8F8FB;
  border-radius: 8px;
  border: 1px solid #C5D7FB;
  margin-bottom: 16px;
}

.feedback__btn {
  display: block;
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  background: #0017C1;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}

.feedback__btn:hover {
  background: #000060;
}

/* 結果画面 */
.result {
  padding: 40px 20px;
}

.result__score-box {
  text-align: center;
  padding: 32px 20px;
  background: #D9E6FF;
  border-radius: 16px;
  border: 1px solid #C5D7FB;
  margin-bottom: 24px;
}

.result__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #626264;
  margin-bottom: 8px;
}

.result__score {
  display: block;
  font-size: 48px;
  font-weight: 800;
  color: #0017C1;
  letter-spacing: 0.02em;
}

.result__message {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  margin-top: 12px;
  line-height: 1.6;
}

/* 間違えた問題リスト */
.wrong-list {
  margin-bottom: 24px;
}

.wrong-list__title {
  font-size: 15px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 12px;
  padding-left: 4px;
}

.wrong-item {
  border: 1px solid #CCCCCC;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.wrong-item__question {
  font-size: 13px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 6px;
  line-height: 1.6;
}

.wrong-item__your-answer {
  font-size: 12px;
  color: #CE0000;
  margin-bottom: 4px;
}

.wrong-item__correct {
  font-size: 12px;
  color: #197A4B;
  font-weight: 600;
  margin-bottom: 8px;
}

.wrong-item__explanation {
  font-size: 12px;
  color: #626264;
  line-height: 1.7;
  padding-top: 8px;
  border-top: 1px solid #CCCCCC;
}

/* 結果ボタン */
.result__actions {
  display: flex;
  gap: 10px;
}

.result__btn {
  flex: 1;
  display: block;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
  transition: all 0.15s;
}

.result__btn--primary {
  color: #FFFFFF;
  background: #0017C1;
}

.result__btn--primary:hover {
  transform: translateY(-1px);
}

.result__btn--secondary {
  color: #0017C1;
  background: #D9E6FF;
  border: 1px solid #C5D7FB;
}

.result__btn--secondary:hover {
  background: #C5D7FB;
}

/* スマホ対応 */
@media (max-width: 480px) {
  .header__title {
    font-size: 15px;
  }

  .nav__link {
    font-size: 11px;
    padding: 8px 4px;
  }

  .start {
    padding: 40px 16px;
  }

  .start__title {
    font-size: 20px;
  }

  .start__desc {
    font-size: 13px;
  }

  .question__text {
    font-size: 15px;
  }

  .choice {
    font-size: 13px;
    padding: 12px 14px;
  }

  .result__score {
    font-size: 40px;
  }

  .result__actions {
    flex-direction: column;
  }
}
