/* お問い合わせページ（page-contact.php）。共通の部品は、ai-page.css・app-page-c.css（apc-*）を使い回す。
   ※ 採用問い合わせ（page-recruit.php）は、旧スタイル（custom.css の wpcf7 系）を使うため、ここでは触らない */
body.page-template-page-contact, body.page-template-page-recruit { background: var(--sh-bg, #f1f2f3); }
body.page-template-page-contact .site-main, body.page-template-page-recruit .site-main { max-width: none !important; width: 100% !important; padding-inline: 0 !important; }
.cpg .ai-hero.cpg-hero { padding-bottom: 40px; }
.cpg .ai-hero__grid { grid-template-columns: 1fr; }
.cpg .ai-hero + .ai-sec.cpg-main { padding-top: 10px; }
.cpg .ai-sec { padding-bottom: 120px; }
.cpg-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 36px; align-items: start; }

/* ---- フォームのカード ---- */
.cpg-card { padding: 44px 48px 40px; border-radius: 32px; background: #fff; box-shadow: 0 20px 56px rgba(0, 48, 64, .12); }
.cpg-q { margin: 0 0 34px; padding: 0; border: 0; min-width: 0; }
fieldset.cpg-q { margin-inline: 0; }
.cpg-q > legend, .cpg-label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 14px; padding: 0; font-size: 17px; font-weight: 700; letter-spacing: .05em; line-height: 1.6; }
.cpg-q > legend b, .cpg-label b { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--apc-grad, linear-gradient(45deg, #e96a8f, #009ada)); color: #fff; font-size: 14px; }
.cpg-q > legend small, .cpg-label small { flex-basis: 100%; padding-left: 38px; font-size: 12px; font-weight: 500; letter-spacing: .04em; color: #6d8089; }
.cpg-req, .cpg-opt { margin-left: 8px; padding: 2px 10px; border-radius: 30px; font-size: 11px; font-weight: 700; letter-spacing: .08em; line-height: 1.6; }
.cpg-req { background: #fff0f4; color: #c0476b; }
.cpg-opt { background: #eef2f5; color: #6d8089; }

/* 相談内容のチップ */
.cpg-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.cpg-chip { position: relative; cursor: pointer; }
.cpg-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cpg-chip span { display: inline-block; padding: 12px 20px; border-radius: 40px; background: #fff; color: #0b4f73; font-size: 14.5px; font-weight: 700; letter-spacing: .04em; box-shadow: inset 0 0 0 1.5px var(--apc-blue, #0599d9); transition: background .3s, color .3s, transform .3s, box-shadow .3s; }
.cpg-chip:hover span { background: #eaf6fc; transform: translateY(-2px); }
.cpg-chip input:checked + span { background: var(--apc-grad, linear-gradient(45deg, #e96a8f, #009ada)); color: #fff; box-shadow: 0 8px 18px rgba(233, 106, 143, .3); }
.cpg-chip input:checked + span::before { content: "✓ "; }
.cpg-chip input:focus-visible + span { outline: 3px solid rgba(5, 153, 217, .5); outline-offset: 3px; }

/* 引き継いだ内容（ツールの結果） */
.cpg-handoff { margin: 0 0 34px; padding: 22px 26px 20px; border-radius: 22px; background: linear-gradient(135deg, #eaf6fc, #fff4f7); box-shadow: inset 0 0 0 1.5px rgba(5, 153, 217, .25); animation: apc-pop .5s ease both; }
.cpg-handoff[hidden] { display: none; }
.cpg-handoff__t { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 14.5px; font-weight: 700; letter-spacing: .05em; }
.cpg-handoff__t span { padding: 2px 12px; border-radius: 30px; background: var(--apc-pink, #e96a8f); color: #fff; font-size: 11px; letter-spacing: .14em; }
.cpg-hand { margin: 0 0 10px; padding: 14px 18px; border-radius: 14px; background: #fff; }
.cpg-hand h3 { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .1em; color: var(--apc-blue, #0599d9); }
.cpg-hand dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 0; font-size: 13.5px; line-height: 1.8; letter-spacing: .03em; }
.cpg-hand dt { font-weight: 700; color: #5b6e77; }
.cpg-hand dd { margin: 0; font-weight: 600; }
.cpg-hand pre { margin: 0; font: inherit; font-size: 13.5px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; font-weight: 600; }
.cpg-handoff__use { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; font-size: 14px; font-weight: 700; letter-spacing: .04em; cursor: pointer; }
.cpg-handoff__use input { width: 20px; height: 20px; accent-color: var(--apc-pink, #e96a8f); }
.cpg-handoff__note { margin: 0; padding-left: 30px; font-size: 12px; letter-spacing: .03em; color: #6d8089; font-weight: 500; }
.cpg-form textarea.cpg-tool, .cpg-tool[hidden] { display: none !important; }

/* 入力欄 */
.cpg-form input[type="text"], .cpg-form input[type="email"], .cpg-form input[type="tel"], .cpg-form textarea { display: block; width: 100%; box-sizing: border-box; padding: 14px 18px; border: 0; border-radius: 14px; background: #f4f9fc; color: var(--sh-ink, #003040); font: inherit; font-size: 15.5px; font-weight: 600; letter-spacing: .03em; line-height: 1.7; box-shadow: inset 0 0 0 1.5px #cfe3ee; outline: none; transition: box-shadow .25s, background .25s; }
.cpg-form textarea { resize: vertical; min-height: 170px; }
.cpg-form input::placeholder, .cpg-form textarea::placeholder { color: #9bb0ba; font-weight: 500; }
.cpg-form input:focus, .cpg-form textarea:focus { background: #fff; box-shadow: inset 0 0 0 2px var(--apc-blue, #0599d9), 0 0 0 4px rgba(5, 153, 217, .15); }
.cpg-form .is-invalid { background: #fff7f9 !important; box-shadow: inset 0 0 0 2px #e0557f !important; }
.cpg-count { margin: 6px 0 0; text-align: right; font-size: 12px; letter-spacing: .06em; color: #8aa3ae; }
.cpg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cpg-f { margin: 0 0 18px; }
.cpg-f label, .cpg-flabel { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 700; letter-spacing: .05em; }
.cpg-flabel { margin-bottom: 8px; }
.cpg-radios { display: flex; flex-wrap: wrap; gap: 10px; }
.cpg-radio { position: relative; cursor: pointer; }
.cpg-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cpg-radio span { display: inline-block; padding: 10px 22px; border-radius: 40px; background: #fff; font-size: 14px; font-weight: 700; letter-spacing: .04em; box-shadow: inset 0 0 0 1.5px #cfe3ee; transition: background .3s, color .3s, box-shadow .3s; }
.cpg-radio:hover span { background: #eaf6fc; }
.cpg-radio input:checked + span { background: #e9f6fd; color: #0b4f73; box-shadow: inset 0 0 0 2px var(--apc-blue, #0599d9); }
.cpg-radio input:focus-visible + span { outline: 3px solid rgba(5, 153, 217, .5); outline-offset: 3px; }
.cpg-hint { margin: 8px 0 0; font-size: 12.5px; line-height: 1.8; letter-spacing: .03em; color: #6d8089; font-weight: 500; }
.cpg-err { margin: 8px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .03em; color: #c0476b; }
.cpg-err[hidden] { display: none; }
.cpg-err::before { content: "！ "; }

/* 送信 */
.cpg-send { margin-bottom: 0; padding-top: 26px; border-top: 1px dashed #cfe3ee; }
.cpg-agree { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 700; letter-spacing: .04em; cursor: pointer; }
.cpg-agree input { width: 22px; height: 22px; accent-color: var(--apc-pink, #e96a8f); }
.cpg .cpg-submit, .cpg .cpg-submit:hover, .cpg .cpg-submit:focus { display: block; width: 100%; margin: 22px 0 0; padding: 20px 24px; border: 0; border-radius: 60px; background: linear-gradient(135deg, #ff2d6f, #ff8a1f); color: #fff; font: inherit; font-size: 18px; font-weight: 700; letter-spacing: .1em; text-align: center; white-space: normal; cursor: pointer; box-shadow: 0 14px 34px rgba(255, 45, 111, .4); transition: transform .3s, box-shadow .3s; }
.cpg .cpg-submit:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(255, 45, 111, .5); }
.cpg .cpg-submit:focus-visible { outline: 3px solid rgba(5, 153, 217, .6); outline-offset: 4px; }
.cpg .cpg-submit span { margin-left: 10px; }

/* サーバーからの、送信結果（エラー）。成功は、cpg-done で見せる */
.cpg .sac-form-message { margin: 0 0 26px; padding: 16px 22px; border-radius: 16px; font-size: 14px; line-height: 1.9; letter-spacing: .04em; font-weight: 600; }
.cpg .sac-form-error { background: #fff0f4; color: #a3274e; box-shadow: inset 0 0 0 1.5px #f1a9bd; }
.cpg .sac-form-error ul { margin: 0; padding-left: 1.2em; }

/* 送信後 */
.cpg-done { padding: 20px 0 6px; text-align: center; }
.cpg-done__ico { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: var(--apc-grad, linear-gradient(45deg, #e96a8f, #009ada)); color: #fff; font-size: 34px; font-weight: 700; box-shadow: 0 12px 30px rgba(233, 106, 143, .35); }
.cpg-done h2 { margin: 0 0 10px; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: .05em; }
.cpg-done p { margin: 0 0 8px; font-size: 15px; line-height: 1.9; letter-spacing: .05em; font-weight: 500; }
.cpg-done__sub { margin-top: 22px !important; font-weight: 700 !important; }
.cpg-done__tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0 22px; text-align: left; }
.cpg .cpg-done__tools a { display: block; padding: 16px 18px; border-radius: 16px; background: #f4f9fc; color: inherit; text-decoration: none; box-shadow: inset 0 0 0 1.5px rgba(5, 153, 217, .25); transition: transform .3s, box-shadow .3s; }
.cpg .cpg-done__tools a:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 48, 64, .12), inset 0 0 0 2px var(--apc-blue, #0599d9); }
.cpg-done__tools small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--apc-pink, #e96a8f); }
.cpg-done__tools b { font-size: 15px; letter-spacing: .04em; }
.cpg-done__back a { color: var(--apc-blue, #0599d9); font-weight: 700; text-decoration: none; }
.cpg-done__back a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---- 右側 ---- */
.cpg-aside { position: sticky; top: 120px; display: grid; gap: 22px; }
.cpg-box { padding: 30px 30px 26px; border-radius: 28px; background: #fff; box-shadow: 0 14px 40px rgba(0, 48, 64, .09); }
.cpg-box__en { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .26em; color: var(--apc-blue, #0599d9); }
.cpg-box h2 { margin: 0 0 14px; font-size: 20px; line-height: 1.6; letter-spacing: .05em; }
.cpg-box__lead { margin: -6px 0 14px; font-size: 13px; line-height: 1.8; letter-spacing: .04em; color: #5b6e77; font-weight: 500; }
.cpg .cpg-tel { display: block; padding: 14px 18px; border-radius: 16px; background: linear-gradient(135deg, #eaf6fc, #fff4f7); color: #0b4f73; font-size: clamp(24px, 2.4vw, 30px); font-weight: 700; letter-spacing: .06em; text-align: center; text-decoration: none; transition: transform .3s, box-shadow .3s; }
.cpg .cpg-tel:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 48, 64, .12); }
.cpg-tools { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.cpg .cpg-tools a { position: relative; display: block; padding: 14px 44px 14px 18px; border-radius: 16px; background: #f4f9fc; color: inherit; text-decoration: none; box-shadow: inset 0 0 0 1.5px rgba(5, 153, 217, .22); transition: transform .3s, box-shadow .3s; }
.cpg .cpg-tools a:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 48, 64, .12), inset 0 0 0 2px var(--apc-blue, #0599d9); }
.cpg-tools small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--apc-pink, #e96a8f); }
.cpg-tools b { display: block; margin: 1px 0 3px; font-size: 15.5px; letter-spacing: .04em; }
.cpg-tools span { display: block; font-size: 12.5px; line-height: 1.7; letter-spacing: .03em; color: #5b6e77; font-weight: 500; }
.cpg-tools i { position: absolute; right: 16px; top: 50%; margin-top: -10px; font-style: normal; font-weight: 700; color: var(--apc-pink, #e96a8f); transition: transform .3s; }
.cpg .cpg-tools a:hover i { transform: translateX(4px); }

@media (max-width: 1024px) {
	.cpg-grid { grid-template-columns: 1fr; }
	.cpg-aside { position: static; }
	.cpg-done__tools { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
	.cpg-card { padding: 30px 22px 28px; }
	.cpg-row { grid-template-columns: 1fr; gap: 0; }
	.cpg-q > legend, .cpg-label { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.cpg-handoff { animation: none; }
	.cpg-chip span, .cpg .cpg-submit, .cpg .cpg-tools a, .cpg .cpg-tel { transition: none; }
}

/* ---- 採用ページ（cpg--recruit）：履歴書の選択欄・補足 ---- */
.cpg-file { position: relative; }
.cpg-file input[type="file"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cpg-file__drop { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 16px; padding: 20px 22px; border-radius: 18px; background: #f4f9fc; border: 2px dashed #b7d5e5; cursor: pointer; transition: background .3s, border-color .3s, transform .3s; }
.cpg-file__drop:hover { background: #eaf6fc; border-color: var(--apc-blue, #0599d9); transform: translateY(-2px); }
.cpg-file__drop i { grid-row: 1 / 3; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--apc-grad, linear-gradient(45deg, #e96a8f, #009ada)); color: #fff; font-size: 14px; font-style: normal; font-weight: 700; letter-spacing: .06em; }
.cpg-file__drop b { font-size: 15.5px; letter-spacing: .05em; }
.cpg-file__drop span { font-size: 13px; line-height: 1.7; letter-spacing: .03em; color: #6d8089; font-weight: 600; word-break: break-all; }
.cpg-file.is-set .cpg-file__drop { background: #e9f6fd; border-style: solid; border-color: var(--apc-blue, #0599d9); }
.cpg-file.is-set .cpg-file__drop span { color: #0b4f73; }
.cpg-file.is-invalid .cpg-file__drop { background: #fff7f9; border-color: #e0557f; }
.cpg-file input:focus-visible + .cpg-file__drop { outline: 3px solid rgba(5, 153, 217, .5); outline-offset: 3px; }
.cpg-hint--warn { margin: 0 0 22px; padding: 10px 16px; border-radius: 12px; background: #fff4f7; color: #a3274e; font-weight: 700; }
.cpg-points { margin: 0; padding: 0; list-style: none; }
.cpg-points li { position: relative; margin-bottom: 8px; padding: 2px 0 2px 24px; font-size: 14px; line-height: 1.9; letter-spacing: .04em; font-weight: 600; }
.cpg-points li::before { content: "✓"; position: absolute; left: 0; color: var(--apc-pink, #e96a8f); font-weight: 700; }
.cpg-box__sub { margin: 16px 0 0; font-size: 12.5px; line-height: 1.8; letter-spacing: .03em; color: #5b6e77; font-weight: 500; }
.cpg-box__sub a { color: var(--apc-blue, #0599d9); font-weight: 700; }
.cpg--recruit .cpg-tools a { padding-top: 12px; padding-bottom: 12px; }
@media (prefers-reduced-motion: reduce) { .cpg-file__drop { transition: none; } }
.cpg-hint a { color: var(--apc-blue, #0599d9); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.cpg-hint a:hover { text-decoration: none; }
