/* ====== 全体レイアウト ====== */
body {
  font-family: system-ui, sans-serif;
  padding: 20px;
  max-width: 700px;
  margin: 0 auto;           /* ✅ ページ全体を中央寄せ */
  background: #f8fafc;
  text-align: center;       /* ✅ 見出しやボタンを中央寄せ */
}

/* ====== 見出し ====== */
h1 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

/* ====== コントロール部分 ====== */
.control {
  margin: 12px 0;
  text-align: left;         /* ✅ ラベル・スライダーは左揃えで自然に */
}

/* ====== ラベルとスライダー ====== */
label {
  display: block;
  margin-bottom: 4px;
}

input[type="range"] {
  width: 100%;
}

/* ====== ボタン ====== */
button {
  margin: 6px 4px;
  padding: 8px 14px;
  border: 1px solid #888;
  border-radius: 6px;
  cursor: pointer;
  background: white;
  transition: background 0.2s ease;
}

button:hover {
  background: #e7eef9;
}

/* ====== スコア・結果表示 ====== */
#quizResult {
  font-weight: bold;
  margin-top: 10px;
  white-space: pre-line;
}

#scoreBoard {
  margin-top: 16px;
  font-size: 1.1rem;
  font-weight: bold;
}

/* ====== 結果表示ボックス ====== */
#result {
  margin-top: 20px;
  background: #eef2ff;
  border-radius: 8px;
  padding: 15px;
  text-align: left;         /* ✅ 結果文は左揃えで読みやすく */
}

/* ====== フィードバック ====== */
#feedback p {
  margin: 4px 0;
}

/* ====== ADSRキャンバス ====== */
#adsrCanvas {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 10px;
  display: block;
  margin-left: auto;
  margin-right: auto;       /* ✅ キャンバスも中央寄せ */
}

.back-button {
  display: inline-block;
  margin-top: 30px;
  padding: 10px 20px;
  font-size: 1rem;
  background-color: #e2e8f0;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}
.back-button:hover {
  background-color: #cbd5e1;
}
