/* かんたん無料査定フォーム（テーマの色と文字の設定を使う） */
.apf { --apf-navy: var(--c-navy, #063d58); --apf-ink: var(--c-ink, #161616); --apf-soft: var(--c-ink-soft, #555a5e); --apf-line: var(--c-line, #e1e1e1); --apf-tint: var(--c-navy-tint, #e5eef3); --apf-teal: var(--c-teal-line, #29c5b6); --apf-danger: var(--c-danger, #c2412d); margin-block: 8px 48px; }
.apf [hidden] { display: none !important; }

.apf-progress { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0 0 32px !important; padding: 0 !important; counter-reset: none; }
.apf-progress li { margin: 0 !important; padding: 12px 8px 10px; border-top: 4px solid var(--apf-line); font-size: 14px; font-weight: 700; color: var(--apf-soft); line-height: 1.5; }
.apf-progress li span { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 6px; border-radius: 50%; background: var(--apf-line); color: var(--apf-ink); font-size: 13px; }
.apf-progress li.is-done { border-top-color: var(--apf-teal); color: var(--apf-ink); }
.apf-progress li.is-done span { background: var(--apf-teal); color: var(--apf-ink); }
.apf-progress li.is-current { border-top-color: var(--apf-navy); color: var(--apf-navy); }
.apf-progress li.is-current span { background: var(--apf-navy); color: #fff; }
@media (max-width: 639px) { .apf-progress li { font-size: 0; padding: 10px 0 0; text-align: center; } .apf-progress li span { font-size: 14px; margin: 0; } .apf-progress li.is-current { font-size: 13px; } .apf-progress li.is-current span { display: grid; margin: 0 auto 4px; } }

.apf-form { border: 1px solid var(--apf-line); border-top: 4px solid var(--apf-navy); padding: clamp(20px, 4vw, 40px); background: #fff; }
.apf-step { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 24px; }
.apf-step__title { padding: 0; margin-bottom: 4px; font-size: clamp(20px, 2.4vw, 24px); font-weight: 700; color: var(--apf-navy); line-height: 1.5; }
.apf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 639px) { .apf-grid { grid-template-columns: 1fr; } }
.apf-field { display: grid; gap: 8px; min-width: 0; }
.apf-label { display: flex; align-items: center; gap: 8px; margin: 0 !important; font-size: 16px; font-weight: 700; }
.apf-req, .apf-opt { font-size: 12px; font-weight: 700; padding: 1px 8px; }
.apf-req { background: var(--apf-danger); color: #fff; }
.apf-opt { background: var(--c-bg-soft, #f4f4f3); color: var(--apf-soft); }
.apf-help { margin: 0 !important; font-size: 14px; color: var(--apf-soft); line-height: 1.7; }
.apf input[type="text"], .apf input[type="email"], .apf input[type="tel"], .apf select, .apf textarea {
	width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid #b9c0c7; border-radius: 2px; background: #fff; font-size: 16px; font-family: inherit; color: var(--apf-ink);
}
.apf textarea { min-height: 120px; line-height: 1.8; }
.apf input:focus, .apf select:focus, .apf textarea:focus { outline: none; border-color: var(--apf-navy); box-shadow: 0 0 0 3px rgba(6, 61, 88, .2); }
.apf-field.is-invalid input, .apf-field.is-invalid select, .apf-field.is-invalid .apf-choice span { border-color: var(--apf-danger); background: #fdf3f1; }
.apf-error { margin: 0 !important; font-size: 14px; font-weight: 700; color: var(--apf-danger); }
.apf-error:empty { display: none; }

.apf-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.apf-choice { position: relative; flex: 1 1 auto; min-width: 0; }
.apf-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.apf-choice span { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 8px 18px; border: 1px solid #b9c0c7; border-radius: 2px; background: #fff; font-weight: 700; text-align: center; line-height: 1.5; cursor: pointer; transition: border-color .15s, background-color .15s; }
.apf-choice:hover span { border-color: var(--apf-navy); }
.apf-choice input:checked + span { border-color: var(--apf-navy); background: var(--apf-tint); box-shadow: inset 0 0 0 1px var(--apf-navy); color: var(--apf-navy); }
.apf-choice input:checked + span::before { content: "✓"; margin-right: 6px; }
.apf-choice input:focus-visible + span { outline: 3px solid var(--c-link, #1a5999); outline-offset: 2px; }
@media (max-width: 639px) { .apf-choice { flex: 1 1 calc(50% - 4px); } }

.apf-inline { display: flex; gap: 8px; align-items: stretch; }
.apf-inline input { flex: 1; }
.apf-unit { display: flex; }
.apf-unit label { position: relative; }
.apf-unit input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.apf-unit span { display: grid; place-items: center; min-width: 60px; height: 100%; min-height: 52px; border: 1px solid #b9c0c7; font-weight: 700; cursor: pointer; }
.apf-unit label + label span { border-left: 0; }
.apf-unit input:checked + span { background: var(--apf-navy); border-color: var(--apf-navy); color: #fff; }
.apf-unit input:focus-visible + span { outline: 3px solid var(--c-link, #1a5999); outline-offset: 2px; }

.apf-agree { padding: 16px 18px; background: var(--c-bg-soft, #f4f4f3); }
.apf-agree label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; cursor: pointer; }
.apf-agree input { width: 22px; height: 22px; accent-color: var(--apf-navy); }
.apf-agree a { color: var(--c-link, #1a5999); text-decoration: underline; }
.apf-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.apf-form-error { margin: 24px 0 0 !important; padding: 14px 16px; background: #fdf3f1; border-left: 4px solid var(--apf-danger); color: var(--apf-danger); font-weight: 700; }
.apf-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--apf-line); }
.apf-nav .btn { min-width: 160px; }
.apf-nav .apf-next, .apf-nav .apf-submit { margin-left: auto; min-width: 240px; }
@media (max-width: 639px) { .apf-nav .btn { min-width: 0; flex: 1; } .apf-nav .apf-next, .apf-nav .apf-submit { flex: 2; min-width: 0; } }

.apf-result { padding: clamp(24px, 5vw, 48px); border: 1px solid var(--apf-line); border-top: 4px solid var(--apf-teal); background: #fff; text-align: center; outline: none; }
.apf-result__eyebrow { margin: 0 !important; font-size: 20px; font-weight: 700; color: var(--apf-navy); }
.apf-result__estimate { margin-top: 24px !important; padding: 24px; background: var(--apf-tint); }
.apf-result__label { margin: 0 !important; font-size: 15px; font-weight: 700; color: var(--apf-soft); }
.apf-result__range { margin: 8px 0 0 !important; font-family: var(--font-num, sans-serif), var(--font-ja, sans-serif); font-size: clamp(32px, 6vw, 52px); font-weight: 600; line-height: 1.2; color: var(--apf-navy); }
.apf-result__range span { white-space: nowrap; }
.apf-result__tilde { margin-inline: .2em; font-size: .7em; }
/* 「万円」などの単位は数字より小さくする。 */
.apf-result__range .price-unit { font-family: var(--font-ja, sans-serif); font-size: max(13px, .42em); font-weight: 700; }
.apf-result__basis { margin: 8px 0 0 !important; font-size: 15px; font-weight: 700; }
.apf-result__note { margin: 12px auto 0 !important; max-width: 40em; font-size: 14px; color: var(--apf-soft); text-align: left; line-height: 1.8; }
.apf-result__text { margin: 24px auto 0 !important; max-width: 36em; line-height: 1.9; }
.apf-result__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.apf-credit { margin-top: 16px !important; font-size: 13px; color: var(--apf-soft); line-height: 1.7; }

/* ==========================================================================
   サイト全体の「無料査定」フキダシとポップアップ
   ========================================================================== */
.apf-bubble {
	position: fixed; right: 20px; bottom: 24px; z-index: 95;
	display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
	transition: opacity .2s, transform .2s;
}
.apf-bubble.is-hidden { opacity: 0; visibility: hidden; transform: translateY(8px); }
.is-menu-open .apf-bubble { display: none; }

.apf-bubble__btn {
	position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 64px; padding: 0 28px;
	border: 0; border-radius: 999px; background: var(--c-orange, #eea617); color: var(--c-ink, #161616);
	font-size: 17px; font-weight: 700; letter-spacing: .06em; font-family: inherit; cursor: pointer;
	box-shadow: 0 8px 24px rgba(6, 61, 88, .3); transition: background-color .2s, transform .2s;
}
.apf-bubble__btn::before {
	content: ""; position: absolute; inset: -4px; border-radius: 999px; border: 2px solid var(--c-orange, #eea617);
	opacity: 0; animation: apf-ring 3.2s ease-out infinite;
}
@keyframes apf-ring {
	0% { transform: scale(1); opacity: .55; }
	70% { transform: scale(1.12); opacity: 0; }
	100% { opacity: 0; }
}
.apf-bubble__btn:hover { background: #d8940f; transform: translateY(-2px); }
.apf-bubble__btn:hover::before { animation: none; }
@media (prefers-reduced-motion: reduce) { .apf-bubble__btn::before { animation: none; } }
.apf-bubble__btn:focus-visible { outline: 3px solid var(--c-teal-line, #29c5b6); outline-offset: 3px; }

.apf-bubble__teaser {
	position: relative; display: flex; align-items: stretch; max-width: 280px;
	background: #fff; border: 1px solid var(--c-line, #e1e1e1); border-top: 3px solid var(--c-teal-line, #29c5b6);
	box-shadow: 0 10px 30px rgba(6, 61, 88, .18);
}
.apf-bubble__teaser.is-in { animation: apf-pop .3s ease-out; }
@keyframes apf-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.apf-bubble__teaser::after {
	content: ""; position: absolute; right: 28px; bottom: -8px; width: 14px; height: 14px;
	background: #fff; border-right: 1px solid var(--c-line, #e1e1e1); border-bottom: 1px solid var(--c-line, #e1e1e1); transform: rotate(45deg);
}
.apf-bubble__teaser-body {
	display: grid; gap: 2px; padding: 14px 8px 14px 16px; border: 0; background: none; font-family: inherit;
	text-align: left; cursor: pointer; color: var(--c-ink, #161616);
}
.apf-bubble__teaser-title { font-size: 15px; font-weight: 700; color: var(--c-navy, #063d58); }
.apf-bubble__teaser-text { font-size: 13px; color: var(--c-ink-soft, #555a5e); }
.apf-bubble__teaser-close {
	flex: none; width: 36px; border: 0; border-left: 1px solid var(--c-line, #e1e1e1); background: none;
	font-size: 18px; line-height: 1; color: var(--c-ink-soft, #555a5e); cursor: pointer;
}
.apf-bubble__teaser-close:hover { background: var(--c-bg-soft, #f4f4f3); }

@media (max-width: 639px) {
	/* スマホでは案内の吹き出しを出さず、ボタンだけにする */
	.apf-bubble__teaser { display: none !important; }
}
@media (max-width: 899px) {
	/* 画面下の固定ボタンの上に置く */
	.apf-bubble { right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); }
	.apf-bubble__btn { min-height: 56px; padding: 0 22px; font-size: 16px; }
	.apf-bubble__teaser { max-width: min(280px, calc(100vw - 32px)); }
}
@media (max-width: 1023px) {
	.single-estate .apf-bubble { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* ポップアップ */
.apf-modal {
	width: min(760px, calc(100vw - 32px)); max-width: none; max-height: min(88vh, 900px);
	margin: auto; padding: 0; border: 0; background: #fff; overflow: hidden;
	box-shadow: 0 24px 60px rgba(6, 61, 88, .3);
}
.apf-modal::backdrop { background: rgba(6, 61, 88, .55); }
.apf-modal__head {
	position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 16px 16px 16px 24px; border-bottom: 1px solid var(--c-line, #e1e1e1); background: var(--c-navy, #063d58); color: #fff;
}
.apf-modal__title { margin: 0 !important; font-size: 18px; font-weight: 700; letter-spacing: .08em; }
.apf-modal__close {
	flex: none; width: 44px; height: 44px; border: 0; border-radius: 2px; background: rgba(255, 255, 255, .15);
	color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
}
.apf-modal__close:hover { background: rgba(255, 255, 255, .3); }
.apf-modal__body { max-height: calc(min(88vh, 900px) - 77px); overflow-y: auto; padding: 24px; -webkit-overflow-scrolling: touch; }
.apf-modal__body .apf { margin-block: 0; }
.apf-modal__body .apf-form { border: 0; padding: 0; }
.apf-modal__body .apf-nav { position: sticky; bottom: -24px; margin-bottom: -24px; padding-bottom: 24px; background: #fff; }
.is-apf-modal-open { overflow: hidden; }

@media (max-width: 639px) {
	.apf-modal { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; }
	.apf-modal__body { max-height: calc(100dvh - 77px); padding: 20px 16px; }
	.apf-modal__body .apf-nav { bottom: -20px; margin-bottom: -20px; padding-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	.apf-bubble__teaser.is-in { animation: none; }
}

/* LINEの相談ボタン（無料査定ボタンの下） */
.apf-bubble__line {
	display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 22px;
	border-radius: 999px; background: #047a37; color: #fff; font-size: 16px; font-weight: 700; letter-spacing: .06em;
	text-decoration: none; box-shadow: 0 6px 20px rgba(6, 199, 85, .32); transition: background-color .2s, transform .2s;
}
.apf-bubble__line:hover { background: #03632c; color: #fff; transform: translateY(-2px); }
.apf-bubble__line:focus-visible { outline: 3px solid var(--c-navy, #063d58); outline-offset: 3px; }
@media (max-width: 899px) { .apf-bubble__line { min-height: 48px; padding: 0 18px; font-size: 15px; } }
