:root { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
body { margin: 0; background: #f6f7f9; color: #111; }
.container { max-width: 960px; margin: 24px auto; padding: 0 16px; }
h1 { font-size: 1.5rem; margin: 0 0 16px; }
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; margin: 16px 0; }
.hidden { display: none; }
.field { display: grid; gap: 6px; margin: 12px 0; }
.field input { padding: 10px; border: 1px solid #d1d5db; border-radius: 10px; font-size: 1rem; }
.primary { padding: 10px 14px; border: 0; border-radius: 10px; background: #111; color: #fff; cursor: pointer; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.error { color: #b91c1c; margin-top: 10px; }
.muted { color: #6b7280; font-size: 0.95rem; }
.note { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px; margin-top: 10px; }
.exam-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.timer { text-align: right; }
.q { border-top: 1px solid #e5e7eb; padding: 12px 0; }
.q:first-child { border-top: 0; }
.q h4 { margin: 0 0 8px; }
.choices { display: grid; gap: 6px; margin-top: 6px; }
.choice { display: flex; gap: 8px; align-items: flex-start; }
.choice input { margin-top: 3px; }
.score { font-size: 1.2rem; margin: 8px 0 10px; }
.alert { padding: 10px; border-radius: 10px; border: 1px solid #e5e7eb; background: #f9fafb; }
textarea { width: 100%; box-sizing: border-box; padding: 10px; border-radius: 10px; border: 1px solid #d1d5db; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
/* フォント指定：日本語＝メイリオ、英数字＝Consolas */
body {
  font-family:
    Consolas,
    "Meiryo",
    "メイリオ",
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans",
    sans-serif;
}

/* 数値入力・コード的表示は Consolas を明示 */
input[type="text"],
input[type="number"],
.score,
.meta,
.time,
code,
pre {
  font-family: Consolas, "Meiryo", "メイリオ", monospace;
}
/* 注意事項ブロック */
.exam-notice {
  border: 2px solid #c00;
  background: #fff5f5;
  padding: 1em 1.2em;
  margin-bottom: 1.5em;
}

.exam-notice h2 {
  color: #c00;
  margin-top: 0;
  margin-bottom: 0.5em;
  font-size: 1.1em;
}

.exam-notice ul {
  margin: 0;
  padding-left: 1.2em;
}

.exam-notice li {
  color: #c00;
  line-height: 1.6;
  margin-bottom: 0.4em;
}

.exam-notice strong {
  color: #900;
}
/* 結果画面：中央寄せ */
.result-card {
  text-align: center;
}

.result-card .score,
.result-card .alert,
.result-card .note {
  text-align: center;
}

/* 念のため見出しも中央 */
.result-card h2 {
  text-align: center;
}
/* 「答案送信」ボタンをブロック要素にする */
#btnSubmit {
  display: block;
  width: 100%;
  max-width: 400px;   /* 横に広がりすぎないよう制限（不要なら削除可） */
  margin: 2em auto;   /* 上下に余白＋中央寄せ */
  padding: 0.8em 1em;
  font-size: 1.1em;
}
/* 「回答開始」ボタンも「答案送信」と同じ見た目にする */
#btnStart {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 2em auto;
  padding: 0.8em 1em;
  font-size: 1.1em;
}
/* 答案送信直前の注意文だけ中央寄せ */
.actions > .note {
  text-align: center;
}
/* note ブロックを親要素の横幅いっぱいに広げる */
.note {
  width: 100%;
  box-sizing: border-box;
}
/* 試験開始前（セットアップ画面）の note を中央寄せ */
#screen-setup .note {
  text-align: center;
}
