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

:root {
  --theme-primary: #1a237e;
  --theme-hover: #283593;
  --theme-active: #0d1656;
}

html {
  touch-action: manipulation;
}

body {
  width: 100%;
  height: 100vh;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

.btn-common {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  display: block;
  width: 90%;
  max-width: 360px;
  min-height: 50px;
  color: #fff;
  border: 2px solid var(--theme-primary);
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  border-radius: 5px;
  font-size: 1.3em;
  box-shadow: 1px 1px 2px #ccc;
  margin: 0 auto;
  padding: 8px 16px;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
@media (hover: hover) {
  .btn-common:hover {
    background-color: var(--theme-hover);
    border-color: var(--theme-hover);
  }
}
.btn-common:focus {
  background-color: var(--theme-hover);
  border-color: var(--theme-hover);
}
.btn-common:active {
  background-color: var(--theme-active);
  border-color: var(--theme-active);
}
.btn-common:disabled {
  opacity: 0.65;
  pointer-events: none;
}

.wrap {
  width: 100%;
  height: 100%;
  overflow: auto;
  font-size: 16px;
  text-align: center;
  background-color: #fffffe;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.container {
  position: relative;
  width: 96%;
  max-width: 640px;
  height: 94%;
  padding: 10px;
  background-color: #fff;
  border: 1px solid #ccc;
  box-shadow: 1px 1px 2px #999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

h1 {
  margin-bottom: 40px;
  font-weight: 400;
  font-size: 1.6em;
  line-height: 1.8;
}

h1.top {
  line-height: 1;
}
h1.top img {
  width: 94%;
  border-radius: 5px;
  box-shadow: 1px 1px 2px #999;
}

.modeSelect {
  width: 100%;
}
.modeSelect a {
  margin-bottom: 24px;
}
.modeSelect a:last-child {
  margin-bottom: 0;
}

.startArea {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: scale(0);
  transform-origin: bottom;
  transition: opacity 0.3s, transform 0.3s;
}
.startArea.show {
  opacity: 1;
  transform: scale(1);
}
.startArea.hide {
  display: none;
}

.yearBtns {
  width: 100%;
}
.yearBtns button {
  margin-bottom: 12px;
}
.yearBtns button:last-child {
  margin-bottom: 50px;
}

.homeBtn {
  width: 100%;
}
.homeBtn a {
  background: #333132;
  color: #fff;
  border: none;
}
@media (hover: hover) {
  .homeBtn a:hover {
    background-color: #444;
  }
}
.homeBtn a:focus {
  background-color: #444;
}
.homeBtn a:active {
  background-color: #323934;
}

.quizWrap {
  width: 100%;
  height: 100%;
  overflow: auto;
  opacity: 0;
  transform: scale(0);
  transform-origin: bottom;
  transition: opacity 0.3s, transform 0.3s;
}
.quizWrap.show {
  opacity: 1;
  transform: scale(1);
}
.quizWrap.hide {
  display: none;
}

.quizHeader {
  width: 100%;
  margin-bottom: 30px;
}
.quizHeader .quizTitle {
  font-size: 1.1em;
  margin-bottom: 10px;
  text-align: left;
}
.quizHeader .quizNum-score {
  color: #fff;
  background-color: var(--theme-active);
  padding: 4px 8px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quizArea {
  width: 100%;
  opacity: 0;
  transform: scale(0);
  transform-origin: bottom;
  transition: opacity 0.3s, transform 0.3s;
}
.quizArea.show {
  opacity: 1;
  transform: scale(1);
}
.quizArea.hide {
  display: none;
}

.questionArea {
  font-size: 1.5em;
  margin-bottom: 20px;
  line-height: 1.7;
}

.choiceList {
  width: 100%;
  list-style: none;
  transform: scale(0);
  transform-origin: bottom;
  transition: opacity 0.3s, transform 0.3s;
}
.choiceList.show {
  opacity: 1;
  transform: scale(1);
}
.choiceList.hide {
  display: none;
}
.choiceList li {
  min-height: 50px;
  margin-bottom: 12px;
}
.choiceList li button {
  width: 100%;
  max-width: 480px;
  padding: 10px;
  color: #000;
  background: #fff;
}
@media (hover: hover) {
  .choiceList li button:hover {
    color: #fff;
    background-color: var(--theme-hover);
  }
}
.choiceList li button:focus {
  color: #fff;
  background-color: var(--theme-hover);
}
.choiceList li button:active {
  color: #fff;
  background-color: var(--theme-active);
}

.slide {
  width: 100%;
  max-width: 480px;
  min-height: 240px;
  margin: 0 auto;
  border: 1px solid #666;
  box-shadow: 1px 1px 2px #999;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: scale(0);
  transform-origin: bottom;
  transition: opacity 0.3s, transform 0.3s;
}
.slide.show {
  opacity: 1;
  transform: scale(1);
}
.slide.hide {
  display: none;
}

.judgeText {
  font-size: 1.5em;
  margin-bottom: 24px;
  padding: 4px 12px;
}
.judgeText.correct {
  background-color: #861448;
  color: #fff;
}
.judgeText.incorrect {
  background-color: #f9e4ee;
  color: #333;
}

.correctText {
  font-size: 1.5em;
  margin-bottom: 30px;
}

.resultMsg {
  margin-bottom: 30px;
  font-size: 1.6em;
}

.closeBtn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.3s, transform 0.3s;
}
.closeBtn.show {
  opacity: 1;
  transform: scale(1);
}
.closeBtn.hide {
  display: none;
}
.closeBtn button {
  width: 120px;
  background: #333132;
  border: none;
  padding: 6px;
  font-size: 1.1em;
}
@media (hover: hover) {
  .closeBtn button:hover {
    background-color: #444;
  }
}
.closeBtn button:focus {
  background-color: #444;
}
.closeBtn button:active {
  background-color: #323934;
}