/* 初期化 */
a:link, a:visited{text-decoration: none;}
html,body,div,ul,ol,li,dl,dt,dd,form,fieldset,input,textarea,h1,h2,h3,h4,h5,h6,pre,code,p,blockquote,hr,th,td,article,section,aside,nav,figure{margin: 0;padding: 0;}
h1,h2,h3,h4,h5,h6{font-size: 100%;font-weight: normal;}
article,aside,figcaption,figure,footer,header,main,nav,section{display: block;}
fieldset,img,abbr,acronym{border: 0;}
ol,ul{list-style: none;}
table{border-collapse: collapse; border:0;border-spacing: 0;}
th{text-align: left;}
th,td{border:0;}
a img{border: none;}
strong{font-weight: bolder;}
address,caption,code,em,i,b,u,s{font-style: normal;font-weight: normal;text-decoration: none;}
*,*::before,*::after{box-sizing: border-box;}
input,textarea,select,button{margin: 0;}
a:focus{outline: 2px solid var(--focus-color,#005fcc);outline-offset: 2px;}

body {color: #222; font-family: "Noto Sans JP","メイリオ",sans-serif; font-size: 16px; font-weight:500; line-height: 1.8;}
body *{ box-sizing: border-box;}
a { color:#c41521; text-decoration: underline;}
a:hover{ text-decoration: none; }
img{ vertical-align: bottom; }
.container img { max-width: 100%; height: auto;}
.container { padding-left: 16px; padding-right: 16px; position: relative; max-width: 800px; margin-left:auto; margin-right:auto; }

/* お問い合わせフォーム > ヘッダー */
.header { text-align:center; background:#fff; border-bottom:1px solid #f6f6f6; display:flex; height:72px; }
.header .container { display:flex; align-items:center; height:72px; padding:0 0 0 12px; max-width:100%; }
.header .logo img { width:154px; }
.header .code { font-size:10px; margin-top:4px; }

@media (min-width: 1024px){
	.header { height:110px; }
	.header .container{ justify-content: space-between; height:110px; }
	.header .logo img { width:220px; }
	.header .code { font-size:12px; margin-top:6px; }
}

/* お問い合わせフォーム > メイン領域基本 */
.main { margin-top:40px; }
.main p { margin-bottom:16px; }
.main h1 { color:#0068b7; font-size:24px; font-weight:700; line-height:1.4; border-bottom: 2px solid #0068b7; margin-bottom: 24px; padding: 8px 0; }
.required { color:#c41521; font-weight:700; }
.intro { margin-bottom:48px; }

@media (min-width: 768px){
	.main p { margin-bottom:32px; }
	.main h1 { font-size:30px; padding:12px 0; margin-bottom:32px; }
}

@media (min-width: 1024px){
	.main h1 { font-size:32px; }
	.main .required-note { margin-bottom:56px; }
}

/* お問い合わせフォーム > フォーム要素 */
.contactform .form-group { margin-bottom:24px; }
.contactform .label { font-size:16px; font-weight:700; line-height:1.4; border-left: 4px solid #0068b7; display:block; margin-bottom:8px; padding-left:8px;  }
.contactform input[type="text"],
.contactform input[type="email"],
.contactform input[type="tel"],
.contactform input[type="number"],
.contactform textarea,
.contactform select { font-size: 16px; font-family: "メイリオ", "ヒラギノ角ゴ Pro W3", sans-serif; border: 1px solid #999; border-radius: 3px; box-sizing: border-box; padding: 8px 8px; margin:4px 0; }
.contactform input[type="text"],
.contactform input[type="email"],
.contactform input[type="tel"],
.contactform textarea { display:block; width: 100%; }
.contactform .radio-group label,
.contactform .checkbox-group label { cursor:pointer; margin:8px; display:inline-block; }
.contactform .form-confirm { text-align:center; }
.contactform .form-confirm label { cursor:pointer; }
.contactform .form-actions { text-align:center; }
.contactform .form-actions button { cursor:pointer; }
.contactform .btn-submit { -webkit-appearance: none; appearance: none; color:#0068b7; font-size:18px; font-weight:600; text-align:center; background:#fff; border: 2px solid #0068b7; padding:12px 48px; }
.contactform .btn-submit:hover { color: #fff; background-color: #0068b7; transition: all 0.3s ease; }
input#age,
input#postcode { width:240px; }
button#autoAddressBtn { cursor:pointer; }
.contactform .radio-group.vertical label { display: block; }

@media (min-width: 768px){
	.contactform .form-group { margin-bottom:32px; }
	.contactform .label { font-size:18px; margin-bottom:12px; }
	.contactform input[type="text"],
	.contactform input[type="email"],
	.contactform input[type="tel"],
	.contactform input[type="number"],
	.contactform textarea,
	.contactform select { margin:8px 0; }
	.contactform .form-address,
	.contactform .form-lender,
	.contactform .form-visit { margin-bottom:32px; }
	.contactform .form-address .form-group,
	.contactform .form-lender .form-group,
	.contactform .form-visit .form-group { margin-bottom:24px; }
	button#autoAddressBtn { font-size:16px; }
}

@media (min-width: 1024px){
	.contactform .form-group { margin-bottom:48px; }
	.contactform .label { font-size:21px; margin-bottom:24px; padding-left:12px;  }
	.contactform .radio-group label,
	.contactform .checkbox-group label { font-size:18px; }
	.contactform .form-address,
	.contactform .form-lender,
	.contactform .form-visit { margin-bottom:48px; }
}

/* お問い合わせフォーム > フッター */
.site-footer { text-align:center; margin-top:80px; }

/* JavaScript無効時のスタイル */
noscript .message { background-color: #f8d7da; border: 1px solid #f5c6cb;
color: #721c24; padding: 16px; margin: 16px 0; border-radius: 4px; font-weight: 600; }

/* Toast メッセージ表示 */
.toast { font-weight: 600; text-align: center; border-radius: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; min-width: 300px; max-width: 500px; opacity: 0; padding: 16px 20px; pointer-events: none; transition: all 0.3s ease-in-out; }
.toast.show { opacity: 1; pointer-events: auto; }
.toast.success { color: #155724; background-color: #d4edda; border: 1px solid #c3e6cb; }
.toast.error { color: #721c24; background-color: #f8d7da; border: 1px solid #f5c6cb; }
.toast.info { color: #0c5460; background-color: #d1ecf1; border: 1px solid #bee5eb; }

/* 確認画面用のスタイル */
.form-confirm-mode .form-group input,
.form-confirm-mode .form-group textarea,
.form-confirm-mode .form-group select { color: #222 !important; font-weight: 600; cursor: default; border: none !important; pointer-events: none; }

.form-confirm-mode .hint{ display:none; }

/* 確認画面でSELECTの矢印を消す */
.form-confirm-mode .form-group select { -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: none; padding-right: 0; }

.form-confirm-mode .form-group input:focus,
.form-confirm-mode .form-group textarea:focus,
.form-confirm-mode .form-group select:focus { box-shadow: none !important; outline: none !important; }
.form-confirm-mode .radio-group label,
.form-confirm-mode .checkbox-group label { pointer-events: none; }
.form-confirm-mode .radio-group input[type="radio"],
.form-confirm-mode .checkbox-group input[type="checkbox"] { pointer-events: none; }
.form-confirm-mode .btn-auto { display: none; }

.form-confirm-mode input:-webkit-autofill,
.form-confirm-mode textarea:-webkit-autofill,
.form-confirm-mode select:-webkit-autofill {
-webkit-box-shadow: 0 0 0 1000px #ffffff inset !important; box-shadow: 0 0 0 1000px #ffffff inset !important; -webkit-text-fill-color: #000000 !important; transition: background-color 5000s ease-in-out 0s !important; }

/* 確認画面で未選択のラジオボタン・チェックボックスを非表示 */
.form-confirm-mode .radio-group label:not(:has(input:checked)),
.form-confirm-mode .checkbox-group label:not(:has(input:checked)) {
  display: none;
}

/* 完了画面のスタイル */
.completion-screen { text-align: center; background: #f8f9fa; border-radius: 8px; margin: 40px 0; padding: 40px 24px; }
.completion-screen h2 { color: #0068b7; font-size: 28px; font-weight: 700; margin-bottom: 20px; }
.completion-screen .completion-message { font-size: 18px; line-height: 1.6; color: #495057; margin-bottom: 30px; }
.completion-screen .completion-timestamp { font-size: 14px; color: #6c757d; margin-top: 20px; }

/* 送信ボタンの無効状態 */
.btn-submit:disabled { color: #6c757d; cursor: not-allowed; background-color: #e9ecef; border-color: #dee2e6; opacity: 0.6; }
.btn-submit:disabled:hover { color: #6c757d; background-color: #e9ecef; border-color: #dee2e6; }

/* ボタンスタイル */
.btn-confirm,
.btn-submit,
.btn-back { padding: 12px 24px; margin: 8px; border: none; border-radius: 4px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; }
.btn-confirm { color: #fff; background-color: #0068b7; }
.btn-confirm:hover:not(:disabled) { background-color: #0056b3; }
.btn-submit { color: #fff; background-color: #28a745;  }
.btn-submit:hover:not(:disabled) { background-color: #0068b7; }
.btn-back { color: #fff; background-color: #6c757d;  }
.btn-back:hover:not(:disabled) { background-color: #545b62; }

/* ローディングスピナー */
.btn-loading { position: relative; pointer-events: none; }
.btn-loading::before { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid transparent; border-top: 2px solid currentColor; border-radius: 50%; left: 50%; top: 50%; margin-left: -8px; margin-top: -8px; animation: spin 1s linear infinite; }
.btn-loading .btn-text { opacity: 0; }

/* フィールドエラー表示 */
.error-message { color: #dc3545; font-size: 14px; margin-top: 4px; display: none; font-weight: 500; }
input.error,
textarea.error,
select.error { border-color: #dc3545 !important; box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); }

/* フォーム進捗表示（ステッパー） */
.form-stepper { display: flex; align-items: center; justify-content: center; margin: 32px 0 48px 0; padding: 0; }
.form-stepper .stepper-step[data-step="1"] { margin-left: 20px; }
.form-stepper .stepper-step[data-step="3"] { margin-right: 20px; }
.stepper-step { display: flex; flex-direction: column; align-items: center; position: relative; opacity: 1; color: #222; }
.stepper-step:not(.active) { opacity: 0.4; }
.step-number { width: 24px; height: 24px; border-radius: 50%; background: #000; border: 2px solid #000; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.step-label { font-weight: 600; color: #222; text-align: center; white-space: nowrap; }
.stepper-connector { flex-shrink: 0; width: 200px; height: 1px; background: #ccc; margin: 0; position: relative; top: -18px; }

@media (max-width: 767px) {
  .form-stepper { margin: 24px 0 32px 0; padding: 0; }
  .step-number { width: 24px; height: 24px; font-size: 12px; margin-bottom: 6px; }
  .step-label { font-size: 12px; }
  .stepper-connector { width: 80px; }
}
