:root {
  --bg: #c7b299;         /* サイトの背景色 */
  --phone-width: 420px;  /* PCで表示するときの画面の幅 */
}

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

html {
  background: var(--bg);
  overflow-x: hidden;
}

body {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
}

/* スマホの画面幅で中央に表示 */
.phone {
  width: 100%;
  max-width: var(--phone-width);
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ===== ページ（画像1枚ごとのまとまり） ===== */
.page {
  display: block;
  width: 100%;
}
.page[hidden] { display: none; }   /* 条件を満たすまで隠しておく */

.page img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* 現れるときにふわっと出す */
.page.show {
  animation: fadeUp .8s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== ボタン ===== */
.start-area {
  display: flex;
  justify-content: center;
  padding: 24px 0 56px;
}
.start-area.hidden { display: none; }

.btn-square-pop {
  position: relative;
  display: inline-block;
  max-width: calc(100% - 32px);    /* 長い文字でも画面の端からはみ出さない */
  padding: 0.7em 2.4em;
  font-family: inherit;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.4;
  color: #fff;
  background: #fd9535;
  border: none;
  border-bottom: solid 3px #d27d00;
  border-radius: 6px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), 0 2px 2px rgba(0, 0, 0, .19);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn-square-pop:active {
  border-bottom-color: #fd9535;
  box-shadow: 0 0 2px rgba(0, 0, 0, .3);
}

/* ===== 答えの入力欄 =====
   入力欄の下に「解答」ボタンを置き、どちらも「はじめる」ボタンくらいの大きさで中央にそろえる */
.answer-area {
  display: flex;
  flex-direction: column;          /* 入力欄 → 解答ボタン の縦並び */
  align-items: center;             /* 中央にそろえる */
  gap: 14px;
  padding: 24px 16px 8px;
}
.answer-input {
  width: 280px;
  max-width: 100%;                 /* 画面が狭くてもはみ出さない */
  font-family: inherit;
  font-size: 18px;                 /* ボタンと同じ文字の大きさ（16px 以上なら iPhone で拡大されない） */
  line-height: 1.4;
  padding: 0.7em 1em;              /* ボタンと同じ高さ */
  text-align: center;
  border: 2px solid #4a4a4a;
  border-radius: 6px;
  background: #fff;
  color: #222;
}
.answer-input::placeholder {
  color: #9a9a9a;
}
.answer-input:focus {
  outline: none;
  border-color: #fd9535;
}
/* 「解答」ボタン：「はじめる」ボタンと同じ大きさ・見た目 */
.answer-btn {
  appearance: none;
  font-family: inherit;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.4;
  padding: 0.7em 2.4em;
  border: none;
  border-bottom: solid 3px #d27d00;
  border-radius: 6px;
  background: #fd9535;
  color: #fff;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .2), 0 2px 2px rgba(0, 0, 0, .19);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.answer-btn:active {
  border-bottom-color: #fd9535;
  box-shadow: 0 0 2px rgba(0, 0, 0, .3);
}

/* 正解・不正解の表示 */
.answer-result {
  min-height: 3em;
  padding: 8px 16px 48px;
  text-align: center;
  font-size: 22px;
  font-weight: bold;
}
.answer-result.correct   { color: #1f7a3f; }
.answer-result.incorrect { color: #c0392b; }