/* 共通｜お問い合わせフォーム（Contact Form 7 の出力に合わせた見た目）。
   色は site.css の変数を使う。フォームの中身は管理画面の Contact Form 7 に貼る（docs/cf7-form.txt） */
.cf-wrap { width: min(1120px, 100% - 40px); }
.cf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.cf-card { padding: 40px 44px 44px; border-radius: 28px; background: rgba(255,255,255,.88); backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.cf-form { --field: #f6f8fc; --err: #c0392b; }
.cf-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.cf-form p { margin: 0; }

/* 入力 → 完了 の段階 */
.cf-steps { display: flex; justify-content: center; gap: 8px; margin: 0 0 26px; padding: 0; list-style: none; font-size: 12px; font-weight: 700; color: #9aa3b8; }
.cf-steps li { display: flex; align-items: center; gap: 8px; }
.cf-steps li + li::before { content: ""; width: 28px; height: 1.5px; background: #d5dbe8; }
.cf-steps li b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #e9edf5; font-family: var(--en); font-size: 11px; }
.cf-steps li.on { color: var(--indigo); }
.cf-steps li.on b { background: var(--indigo); color: #fff; }

/* 相手の切り替え */
.cf-who { margin-bottom: 30px !important; }
.cf-who > legend { font-size: 15px; font-weight: 700; padding: 0; margin-bottom: 12px; }
.cf-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cf-seg input { position: absolute; opacity: 0; pointer-events: none; }
.cf-seg label { position: relative; display: block; cursor: pointer; padding: 18px 20px 18px 54px; border-radius: 20px; border: 1.5px solid var(--line); background: #fff; transition: border-color .25s, box-shadow .25s, background .25s; }
.cf-seg label::before { content: ""; position: absolute; left: 20px; top: 22px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #b9c2d8; background: #fff; transition: .25s; }
.cf-seg b { display: block; font-size: 16px; line-height: 1.5; }
.cf-seg span { display: block; font-size: 12.5px; line-height: 1.7; color: var(--muted); margin-top: 3px; }
.cf-seg input:checked + label { border: 1.5px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--ai) border-box; box-shadow: 0 18px 36px -22px rgba(90, 100, 170, .8); }
.cf-seg input:checked + label::before { border: 6px solid var(--indigo); }
.cf-seg input:focus-visible + label { outline: 3px solid rgba(111, 143, 196, .45); outline-offset: 2px; }

/* 項目のまとまり */
.cf-pane[hidden], .cf-case[hidden] { display: none; }
.cf-grp { padding-top: 26px !important; }
.cf-grp + .cf-grp, .cf-pane + .cf-grp, .cf-grp + .cf-pane .cf-grp:first-child { margin-top: 26px !important; border-top: 1px solid var(--line) !important; }
.cf-grp > legend { padding: 0; font-family: var(--en); font-size: 11px; font-weight: 700; letter-spacing: .22em; color: var(--blue); }
.cf-row { margin-top: 18px; }
.cf-row > label, .cf-row > .cf-lbl { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; line-height: 1.6; margin-bottom: 8px; }
.cf-req, .cf-opt { font-size: 10.5px; font-weight: 700; line-height: 1; padding: 4px 7px; border-radius: 999px; letter-spacing: .06em; }
.cf-req { color: #fff; background: var(--indigo); }
.cf-opt { color: var(--muted); background: #e9edf5; }
.cf-hint { font-size: 12.5px; color: var(--muted); margin: -2px 0 8px !important; line-height: 1.7; }
.cf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.cf-form .wpcf7-form-control-wrap { display: block; }

/* 入力欄 */
.cf-form input[type=text], .cf-form input[type=email], .cf-form input[type=tel], .cf-form select, .cf-form textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); padding: 13px 16px; border-radius: 14px; border: 1.5px solid transparent; background-color: var(--field); box-shadow: inset 0 0 0 1px var(--line); transition: border-color .2s, background .2s, box-shadow .2s; }
.cf-form select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5f8f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; padding-right: 44px; }
.cf-form textarea { min-height: 150px; resize: vertical; line-height: 1.8; }
.cf-form input:focus, .cf-form select:focus, .cf-form textarea:focus { outline: none; background-color: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(111, 143, 196, .18); }
.cf-form ::placeholder { color: #9aa3b8; }

/* 選択肢（チップ）：Contact Form 7 の checkbox / radio（use_label_element） */
.cf-chips .wpcf7-form-control { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-chips .wpcf7-list-item { margin: 0; }
.cf-chips label { position: relative; display: block; cursor: pointer; }
.cf-chips input { position: absolute; opacity: 0; pointer-events: none; }
.cf-chips .wpcf7-list-item-label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; line-height: 1.5; background: #fff; border: 1.5px solid var(--line); transition: .2s; }
.cf-chips .wpcf7-list-item-label::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 5px; border: 1.5px solid #b9c2d8; background: #fff center / 12px no-repeat; transition: .2s; }
.cf-chips.radio .wpcf7-list-item-label::before { border-radius: 50%; }
.cf-chips input:checked + .wpcf7-list-item-label { border-color: var(--indigo); background: #f1f4fb; color: var(--indigo); }
.cf-chips input:checked + .wpcf7-list-item-label::before { border-color: var(--indigo); background-color: var(--indigo); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.cf-chips.radio input:checked + .wpcf7-list-item-label::before { background-image: none; box-shadow: inset 0 0 0 3px #fff; }
.cf-chips input:focus-visible + .wpcf7-list-item-label { outline: 3px solid rgba(111, 143, 196, .45); outline-offset: 2px; }
.cf-chips.stack .wpcf7-form-control { flex-direction: column; align-items: stretch; }
.cf-chips.stack .wpcf7-list-item-label { display: flex; border-radius: 16px; }

/* 同意 */
.cf-agree { margin-top: 30px; padding: 18px 20px; border-radius: 18px; background: var(--field); font-size: 14px; }
.cf-agree .wpcf7-list-item { margin: 0; }
.cf-agree label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 500; }
.cf-agree input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--indigo); flex: none; }
.cf-agree a { color: var(--indigo); }
.cf-agree-link { margin: 6px 0 0 32px !important; font-size: 13px; }

/* スパム対策（Cloudflare Turnstile。フォームに [turnstile] を置いた位置に出る） */
.cf-bot { display: flex; justify-content: center; margin-top: 28px; min-height: 65px; }
.cf-bot + .cf-actions { margin-top: 18px; }

/* 送信ボタン */
.cf-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; }
.cf-form input[type=submit], .cf-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 60px; min-width: 280px; padding: 0 36px; border-radius: 999px; border: 0; cursor: pointer; font: inherit; font-size: 16px; font-weight: 700; letter-spacing: .06em; color: #fff; background: var(--grad); box-shadow: 0 20px 34px -16px rgba(74, 95, 143, .9); text-decoration: none; transition: transform .3s var(--ease), box-shadow .3s; }
.cf-form input[type=submit]:hover, .cf-btn:hover { transform: translateY(-2px); }
.cf-form input[type=submit]:disabled { opacity: .5; cursor: default; transform: none; }
.cf-btn.line { min-width: 0; color: var(--indigo); background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); }
.cf-smallnote { margin-top: 14px !important; text-align: center; font-size: 12.5px; color: var(--muted); }
.cf-form .wpcf7-spinner { display: inline-block; width: 22px; height: 22px; margin: 0 0 0 10px; border-radius: 50%; border: 2.5px solid #d5dbe8; border-top-color: var(--indigo); visibility: hidden; animation: cf-spin .8s linear infinite; }
.cf-form.submitting .wpcf7-spinner { visibility: visible; }
@keyframes cf-spin { to { transform: rotate(360deg); } }

/* エラー・送信結果 */
.cf-form .wpcf7-not-valid { border-color: var(--err) !important; background-color: #fff7f6 !important; }
.cf-form .wpcf7-not-valid-tip { display: block; font-size: 12.5px; font-weight: 500; color: var(--err); margin-top: 6px; }
.cf-form .wpcf7-response-output { margin: 22px 0 0; padding: 14px 18px; border-radius: 14px; font-size: 14px; line-height: 1.7; border: 0; background: #fff7f6; color: var(--err); }
.cf-form .wpcf7-response-output:empty, .cf-form.init .wpcf7-response-output, .cf-form.sent .wpcf7-response-output { display: none; }
.cf-setup { margin: 0; padding: 18px 20px; border-radius: 16px; background: #fff8e6; color: #7a5200; font-size: 14px; }

/* 完了 */
.cf-done { text-align: center; padding: 20px 0 8px; }
.cf-done .ok { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--ai); box-shadow: 0 20px 40px -18px rgba(90, 100, 170, .9); }
.cf-done .ok svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.cf-done h2 { margin: 22px 0 0; font-size: 22px; outline: none; }
.cf-done p { margin: 10px auto 0; max-width: 34em; color: var(--muted); font-size: 15px; }
.cf-done .next { margin-top: 28px; }

/* 右側の案内 */
.cf-side { position: sticky; top: 100px; display: grid; gap: 18px; }
.cf-side .box { padding: 26px 26px 28px; border-radius: 28px; background: rgba(255,255,255,.88); box-shadow: var(--shadow); }
.cf-side h2 { margin: 0; font-size: 16px; line-height: 1.6; }
.cf-side p { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.85; }
.cf-side ol { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: s; }
.cf-side ol li { counter-increment: s; position: relative; padding: 0 0 14px 38px; font-size: 13.5px; line-height: 1.7; }
.cf-side ol li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--en); font-size: 12px; font-weight: 700; color: #fff; background: var(--grad); }
.cf-side ol li:not(:last-child)::after { content: ""; position: absolute; left: 12.5px; top: 30px; bottom: 4px; width: 1px; background: var(--line); }
.cf-side ol b { display: block; font-size: 14px; }
.cf-side .pdf { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 16px; border-radius: 16px; text-decoration: none; background: linear-gradient(120deg, #f2f0ff, #eaf4fc); font-weight: 700; font-size: 14px; line-height: 1.5; color: var(--ink); }
.cf-side .pdf i { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--grad); }
.cf-side .pdf svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cf-side .pdf small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.cf-side .mail { margin-top: 10px; font-family: var(--en); font-size: 13px; }

@media (max-width: 900px) {
  .cf-layout { grid-template-columns: 1fr; }
  .cf-side { position: static; }
}
@media (max-width: 640px) {
  .cf-wrap { width: calc(100% - 32px); }
  .cf-card { padding: 26px 18px 30px; border-radius: 24px; }
  .cf-seg { grid-template-columns: 1fr; gap: 10px; }
  .cf-seg label { padding: 14px 16px 14px 48px; }
  .cf-seg label::before { left: 16px; top: 17px; }
  .cf-two { grid-template-columns: 1fr; }
  .cf-form input[type=submit], .cf-btn { width: 100%; min-width: 0; }
}
