body {
  font-family: "Yu Gothic", sans-serif;
  background-color: #f4f7f9;
  margin: 0;
  padding: 0;
  color: #333;
}

main {
  max-width: 720px;
  margin: 30px auto;
  background: #ffffff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

main h1 {
  font-size: 1.8em;
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 2px solid #007bff;
  padding-bottom: 10px;
}

form label {
  display: block;
  font-weight: bold;
  margin: 15px 0 5px;
}

form input[type="text"],
form input[type="email"],
form select,
form textarea {
  width: 100%;
  padding: 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #fafafa;
  box-sizing: border-box;
}

form .birth-selects {
  display: flex;
  gap: 10px;
}

.birth-selects select {
  flex: 1;
}

.checkbox-group {
  margin-top: 10px;
}

.checkbox-group label {
  display: block;
  margin: 5px 0;
  font-weight: normal;
  font-weight: bold;
}

.note {
  font-size: 0.9em;
  color: #666;
  margin: 10px 0;
}

button {
  margin-top: 25px;
  padding: 12px;
  background-color: #28a745;
  color: #fff;
  font-size: 1em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
}

button:hover {
  background-color: #218838;
}

.link-button {
  display: inline-block;
  margin: 10px 8px 0 0;
  padding: 8px 14px;
  font-size: 0.95em;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}

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

@media screen and (max-width: 600px) {
  main {
    width: 90%;
    padding: 15px;
  }

  .birth-selects {
    flex-direction: column;
  }
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.popup-box {
  background: #fff;
  max-width: 500px;
  width: 90%;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.popup-box h2 {
  font-size: 1.5em;
  border-bottom: 2px solid #f44336;
  margin-bottom: 10px;
  padding-bottom: 5px;
}

.popup-box p {
  font-size: 0.95em;
  line-height: 1.6;
  color: #333;
}

.popup-box button {
  margin-top: 20px;
  width: 100%;
  padding: 10px;
  font-size: 1em;
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.popup-box button:hover {
  background-color: #d32f2f;
}

.signature-wrapper {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #fff;
  box-sizing: border-box;
  overflow: hidden;
}

.signature-wrapper {
  width: 100%;
  height: 150px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #fff;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

#signature-pad {
  width: 100%;
  height: 100%;
  display: block;
}

.clear-btn {
  font-size: 0.8em;
  padding: 4px 8px;
  margin-left: 10px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  vertical-align: middle;
}

.clear-btn:hover {
  background-color: #c82333;
}


#signature-pad { touch-action: none; }

#signature-pad {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.signature-wrapper {
  overscroll-behavior: contain; /* 画面端の引っぱり更新を抑止 */
}

/* 銀行口座ブロックの横並び */
.bank-selects,
.bank-row {
  display: flex;
  gap: 10px;
}

/* 均等に伸びるように */
.bank-selects > *,
.bank-row > * {
  flex: 1;
}

/* スマホ時は縦並び（既存の birth-selects と同様の挙動） */
@media screen and (max-width: 600px) {
  .bank-selects,
  .bank-row {
    flex-direction: column;
  }
}