/* 共通ベーススタイル */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Arial", sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 20px;
  background-color: #f9f9f9;
  color: #333;
  box-sizing: border-box;
  text-align: center;
}

h1 {
  font-size: 2rem;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

/* セクション */
.section {
  margin-bottom: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ラジオボタンラベル */
.section label {
  margin-right: 15px;
  font-size: 16px;
}

/* フレックス行（入力フォーム） */
.item-row, .name-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* 入力欄 */
input[type="text"], input[type="number"] {
  padding: 8px;
  font-size: 16px;
  width: 120px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  text-align: center;
}

/* 人数入力だけ特別に幅調整 */
#peopleCount {
  width: 80px;
}

/* ボタン */
button {
  padding: 8px 14px;
  font-size: 14px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

/* 結果エリア */
.total, .per-person, .result {
  font-weight: bold;
  margin-top: 20px;
  font-size: 1.1rem;
  text-align: center;
}

/* 結果リスト */
.result ul {
  list-style-type: none;
  padding: 0;
  margin-top: 10px;
}

.result li {
  margin: 5px 0;
  text-align: center;
}

/* トップページリンク */
a.button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 1rem;
}

a.button:hover {
  background-color: #0056b3;
}

a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #1e70bf;
  text-decoration: underline;
}

p {
  margin: 0.5rem 0;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1rem;
  }

  .item-row, .name-row {
    flex-direction: column;
    align-items: center;
  }

  input[type="text"], input[type="number"], button {
    width: 90%;
    max-width: 300px;
  }

  button {
    margin-top: 5px;
  }
}