main {
  max-width: 800px;
  margin: 3rem auto;
  padding: 1rem;
  font-size: 0.95rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  font-weight: bold;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.6rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

textarea {
  min-height: 260px;
}

button {
  width: 220px;
  margin: 0 auto;
  background: crimson;
  color: #fff;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  opacity: 0.8;
}

.error {
  color: crimson;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

#charCount {
  font-size: 0.85rem;
  font-weight: normal;
  display: block;
  text-align: right;
}

/* モーダル */

/* モーダル背景 */
#confirmModal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

body.modal-open {
  overflow: hidden; /* スクロールバーを非表示にする */
  position: fixed; /* 背景のコンテンツのスクロールを防止する */
  width: 100%; /* レイアウトの幅を維持する */
  top: 0; /* position: fixed; で位置がずれないようにトップを0に設定 */
  left: 0; /* position: fixed; で位置がずれないようにレフトを0に設定 */
}

/* モーダルボックス */
#confirmModal .modal-content {
  background: #fff;
  width: 76%;
  max-width: 500px;
  max-height: 90vh;
  min-height: 60vh;
  margin: 10% auto;
  padding: 2rem;
  border-radius: 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* モーダル内見出し */
#confirmModal h3 {
  margin-top: 0;
  font-size: 1.2rem;
  text-align: center;
}

/* モーダル内のテキスト */
#confirmModal p {
  margin: 1rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* モーダルボタン */
#confirmModal .modal-actions {
  margin-top: 2rem;
  text-align: center;
}

#confirmModal .modal-actions button {
  background: crimson;
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 0.5rem;
}

#confirmModal .modal-actions button:nth-child(2) {
  background-color: #aaa;
}

#confirmModal .modal-actions button:hover {
  opacity: 0.8;
}
/* レスポンシブデザイン */
@media screen and (max-width: 600px) {
  .error {
    display: block;
  }
}
@media screen and (max-width: 550px) {
  #confirmModal .modal-actions button:nth-child(1) {
    margin-bottom: 16px;
  }
}
