input.error, select.error {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

input.success, select.success {
    border-color: #27ae60;
    background-color: #f2fdf2;
}

.error-message {
    color: white;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.success-message {
    color: #27ae60;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}
.agreement.for-hours {
  margin: 0.35rem 0 0 0 !important; /* 縮小上下間距為適當行距 */
  padding-left: 22px;                     /* 保持與說明文字左邊對齊 */
  align-items: center;                    /* 讓圓形 Radio 與文字垂直置中對齊 */
}

/* 讓選項內的文字點擊標籤垂直對齊 */
.agreement.for-hours label {
  cursor: pointer;
  line-height: 1.4;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
}
/* 480px 以下表單防止溢出修復 */
@media screen and (max-width: 480px) {
  /* 1. 表單外層寬度填滿，確保左右有邊距不切邊 */
  .event_section .event_wrap {
    width: 90% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  .form {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 2. 輸入欄位改為上下垂直排列（Label 在上，Input 在下） */
  form .field {
    width: 100% !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.35rem !important;
    margin-bottom: 16px !important;
  }

  /* 3. Label 取消右對齊與固定寬度 */
  form .field label {
    width: 100% !important;
    text-align: left !important;
    font-size: 0.95rem !important;
    margin-bottom: 0.2rem !important;
  }

  /* 4. Input / Select 100% 寬度自適應 */
  form .field input[type="text"],
  form .field input[type="tel"],
  form .field input[type="email"],
  form .field select {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* 5. 同意書條款文字強制換行，避免撐爆寬度 */
  .agreement p {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
  }

  .attest {
    padding-left: 0 !important;
    font-size: 0.85rem !important;
  }

  .form p {
    padding-left: 0 !important;
    font-size: 0.9rem !important;
  }
.agreement.for-hours {
  margin: 0.35rem 0 0 0 !important;
  padding-left: 0;
  align-items: center;
}
}