/* Google Fonts から読み込む */
@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;700&display=swap');

/* リセット＆ベース */
* { box-sizing: border-box; margin:0; padding:0; }
body {
  font-family:
    /* まず Zen Maru Gothic を優先 */
    'Zen Maru Gothic',
    /* macOS 標準の丸ゴシック */
    'Hiragino Maru Gothic Pro',
    /* Windows 標準の丸ゴシック */
    'Yu Rounded',
    /* Google Fonts の M PLUS Rounded 1c など */
    'M PLUS Rounded 1c',
    /* さらにメイリオ／汎用ゴシックへフォールバック */
    'メイリオ', sans-serif;
  line-height: 1.6;
  line-height: 1.6;
  padding: 20px;
  background: #fafafa;
  color: #333;
  max-width: 800px;    /* コンテンツ幅を制限 */
  margin: 0 auto;      /* 中央寄せ */
}
header { text-align: center; margin-bottom: 20px; }
.header-logo{margin-bottom: 20px}

/* プログレスバー */
#progress { width: 100%; background: #eee; height: 10px; border-radius: 5px; margin-bottom: 20px; }
#progress-bar { height: 100%; background: #4caf50; width: 0%; border-radius: 5px; transition: width 0.3s; }

/* 質問セクション */
.question {
  margin-bottom: 20px;
  padding: 20px; /* 左右のパディングを増やし余裕を確保 */
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.question legend,
.question p {
  font-weight: bold;
  margin-bottom: 8px;
}
.question label {
  display: block;
  margin-bottom: 20px; /* 選択肢間の間隔を広げる */
  cursor: pointer;
}
.question input[type="radio"] {
  width: 20px;   /* ラジオボタンを大きく */
  height: 20px;  /* ラジオボタンを大きく */
  margin-right: 12px; /* ボタンとテキスト間を広げる */
  vertical-align: middle;
}

/* 都道府県セレクト */
#prefContainer select,
#prefecture {
  width: 100%;           /* 幅いっぱいに拡張 */
  max-width: 400px;      /* 最大幅を設定 */
  padding: 12px;         /* タップしやすいパディング */
  font-size: 1rem;       /* 読みやすいフォントサイズ */
  line-height: 1.5;      /* 行間を広げて選択しやすく */
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #fff;
  appearance: none;      /* デフォルト矢印を非表示 */
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%204%205'%3E%3Cpath%20fill='%23666'%20d='M2%205L0%200h4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px 12px; /* アイコンサイズを調整 */
}

/* フォームコントロール */
.form-controls { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
/* 「前へ」リンク風 */
#prevBtn {
  background: none;
  color: #4caf50;
  text-decoration: underline;
  padding: 0;
  font-size: 1rem;
  cursor: pointer;
  border: none;
}
#prevBtn:disabled {
  color: #aaa;
  text-decoration: none;
  cursor: not-allowed;
}

/* 「次へ」ボタン */
#nextBtn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background: #4caf50;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
#nextBtn:disabled { background: #ccc; cursor: not-allowed; }

/* エラーメッセージ */
.form-error { color: #d32f2f; margin-bottom: 10px; }

/* 診断結果 */
#result { margin-top: 30px; text-align: center; }
#result h2 { margin-bottom: 10px; }
#result img { max-width: 100%; border-radius: 8px; margin: 10px 0; }

/* 診断結果のボタン */
#result .result-buttons { margin: 15px 0; }
#result button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background: #1da1f2;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  margin: 0 5px;
}
#result button#retry { background: #4caf50; }

/* フッター */
#footer{
 margin-top: 70px;
 text-align: center; 
}

/* レスポンシブ */
@media (max-width: 600px) {
  .form-controls { flex-direction: column; }
  #nextBtn { width: 100%; margin-top: 8px; }

  /* 診断結果ボタンの縦並び余白 */
  #result .result-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  #result .result-buttons button {
    width: 100%;          /* ボタン幅を揃える */
    margin: 5px 0;        /* 上下マージンを追加 */
  }
}
