@charset "utf-8";

/* ==========================================================================
   1. 全体レイアウト & ベース設定
   ========================================================================== */
#form_area {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 15px;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: #333;
  line-height: 1.6;
  box-sizing: border-box;
}

#form_area *, 
#form_area *::before, 
#form_area *::after {
  box-sizing: border-box;
}


/* ==========================================================================
   2. フォームエリア (#appform)
   ========================================================================== */
#appform {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 30px 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 40px;
}

/* 見出し */
#appform h3 {
  font-size: 1.35rem;
  font-weight: bold;
  color: #1a252c;
  text-align: center;
  margin: 0 0 25px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #0056b3;
}

#appform h4 {
  font-size: 1.2rem;
  font-weight: bold;
  color: #1a252c;
  text-align: center;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #0056b3;
}

/* フォームテーブル */
#appform table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
}

#appform tr {
  border-bottom: 1px solid #eee;
}

#appform th {
  width: 28%;
  padding: 16px 12px 16px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #444;
  vertical-align: top;
  text-align: left;
}

#appform th span {
  font-size: 0.8rem;
  color: #666;
  font-weight: normal;
  display: block;
}

/* 必須マーク（※）の赤色＆横並び固定 */
#appform th span.req,
.req {
  display: inline !important;
  color: #d93025 !important;
  font-weight: bold;
  margin-right: 3px;
  font-size: 0.95rem;
}

/* 区分出しの見出し */
#appform tr.section-title-row {
  border-bottom: none;
}

#appform th.section-title {
  width: 100%;
  background: #f4f7f9;
  color: #0056b3;
  padding: 12px 15px;
  margin-top: 20px;
  border-left: 4px solid #0056b3;
  border-radius: 2px;
  font-size: 1rem;
}

#appform td {
  padding: 12px 0;
  vertical-align: middle;
}

/* フォーム入力要素 */
#appform input[type="text"],
#appform textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-color: #fafafa;
}

#appform input[type="text"]:focus,
#appform textarea:focus {
  outline: none;
  border-color: #0056b3;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

#appform textarea {
  min-height: 90px;
  resize: vertical;
}


/* ==========================================================================
   3. 各種パーツ・コンポーネント
   ========================================================================== */

/* 同意事項カード */
.agree-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 25px 0;
}

.agree-box {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 16px 20px;
  text-align: left;
}

.agree-text {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 12px;
}

.agree-text a {
  color: #0056b3;
  text-decoration: underline;
  font-weight: bold;
}

.agree-check {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border: 1px solid #0056b3;
  border-radius: 4px;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.2s;
  user-select: none;
}

.agree-check:hover {
  background-color: #f0f7ff;
}

.agree-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  accent-color: #0056b3;
  cursor: pointer;
}

.agree-check span {
  font-size: 0.95rem;
  font-weight: bold;
  color: #1e293b;
}

/* メッセージ類 */
#appform p.error-notice {
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
  margin-top: 20px;
  line-height: 1.5;
}

#appform p.error-notice a {
  color: #0056b3;
  text-decoration: underline;
}

#appform p.red {
  background-color: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #c53030;
  padding: 15px;
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 20px 0 30px 0;
}

#appform p.red a {
  color: #c53030;
  text-decoration: underline;
  font-weight: bold;
}

/* ボタンエリア（送信ボタン・リセットボタン） */
.formbtn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.formbtn form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.formbtn input[type="submit"],
.formbtn a.btn-reset {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 48px;
  padding: 0 35px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 24px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.formbtn input[type="submit"] {
  background-color: #0056b3;
  color: #ffffff;
  border: none;
  box-shadow: 0 3px 6px rgba(0, 86, 179, 0.2);
}

.formbtn input[type="submit"]:hover {
  background-color: #004085;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 86, 179, 0.3);
}

.formbtn a.btn-reset {
  background-color: #f1f3f5;
  color: #495057;
  border: 1px solid #ced4da;
}

.formbtn a.btn-reset:hover {
  background-color: #e9ecef;
  color: #212529;
}


/* ==========================================================================
   4. 付随ページ用スタイル (check / thanks / error)
   ========================================================================== */

/* エラー画面 (error.html) */
#appform h4.error-title {
  border-bottom-color: #d93025;
  color: #c53030;
}

.era {
  background-color: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 20px;
  color: #c53030;
  font-weight: bold;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* 確認画面 (check.html) */
.check-note {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
  margin: 10px 0;
}

/* 完了画面 (thanks.html) */
.thanks-msg {
  text-align: center;
  font-size: 1rem;
  color: #475569;
  line-height: 1.8;
  padding: 20px 0;
}

/* 戻るボタン（カプセル型デザインに完全上書き） */
#form_area #appform .backbtn {
  text-align: center !important;
  margin: 30px 0 20px 0 !important;
  display: block !important;
}

#form_area #appform .backbtn a,
#form_area #appform .backbtn a:link,
#form_area #appform .backbtn a:visited {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 48px !important;
  padding: 0 40px !important;
  background-color: #0056b3 !important;
  color: #ffffff !important;
  border-radius: 24px !important;
  font-weight: bold !important;
  font-size: 1rem !important;
  text-decoration: none !important;
  box-shadow: 0 3px 6px rgba(0, 86, 179, 0.2) !important;
  transition: all 0.2s ease !important;
}

#form_area #appform .backbtn a:hover {
  background-color: #004085 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(0, 86, 179, 0.3) !important;
}


/* ==========================================================================
   5. 説明・規約エリア (#description)
   ========================================================================== */
#description {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 25px;
  text-align: left;
}

#description section,
#description address {
  margin-bottom: 25px;
}

#description section:last-child,
#description address {
  margin-bottom: 0;
}

#description h4 {
  font-size: 1.05rem;
  font-weight: bold;
  color: #212529;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 8px;
  margin: 0 0 15px 0;
  text-align: center;
}

#description dl {
  margin: 0 0 15px 0;
}

#description dt {
  font-weight: bold;
  color: #343a40;
  margin-top: 10px;
  font-size: 0.95rem;
  text-align: left;
}

#description dd {
  margin-left: 0;
  font-size: 0.9rem;
  color: #495057;
  line-height: 1.6;
  margin-bottom: 8px;
  text-align: left;
}

#description dl.verti dd {
  padding-left: 1.2rem;
  text-indent: -1.2rem;
}

#description dl.horiz {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  align-items: baseline;
}

#description dl.horiz dt {
  margin-top: 0;
  white-space: nowrap;
}

#description dl.horiz dd {
  margin-bottom: 0;
}

#description address {
  font-style: normal;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 15px;
}

#description address a {
  display: inline-block;
  color: #0056b3;
  text-decoration: underline;
  font-weight: bold;
  margin-top: 5px;
}

#description address p {
  font-size: 0.85rem;
  color: #6c757d;
  margin: 8px 0 0 0;
}


/* ==========================================================================
   6. レスポンシブ対応（スマートフォン表示：768px以下）
   ========================================================================== */
@media screen and (max-width: 768px) {
  #appform {
    padding: 20px 15px;
  }

  #appform table, 
  #appform tbody, 
  #appform tr, 
  #appform th, 
  #appform td {
    display: block;
    width: 100%;
  }

  #appform tr {
    padding: 10px 0;
  }

  #appform th {
    padding: 0 0 6px 0;
  }

  #appform th span {
    display: inline;
    margin-left: 4px;
  }

  #appform td {
    padding: 0 0 10px 0;
  }

  #appform th.section-title {
    margin-top: 10px;
  }

  .formbtn {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .formbtn input[type="submit"],
  .formbtn a.btn-reset {
    width: 100%;
  }

  #description dl.horiz {
    display: block;
  }
  
  #description dl.horiz dt {
    margin-top: 8px;
  }


}