/* 離脱防止の仕掛け：お知らせ帯・ポップアップ・スマホ下部ボタン（inc/engage.php） */

/* ---- お知らせ帯（ヘッダーの中にあり、ヘッダーと一緒に追従する） ---- */
.mvb-ann { position: relative; display: flex; align-items: center; background: #2b2b2b; color: #fff; font-size: 14px; line-height: 1.4; }
.mvb-ann__track { position: relative; flex: 1 1 auto; min-width: 0; height: 40px; overflow: hidden; }
.mvb-ann__item { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 12px;
	color: #fff !important; text-decoration: none !important; font-weight: 700; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .4s, transform .4s, visibility .4s; }
.mvb-ann__item.is-on { opacity: 1; visibility: visible; transform: none; }
.mvb-ann__item b { flex: none; padding: 2px 8px; border-radius: 3px; background: #e5413a; font-size: 12px; letter-spacing: .04em; }
.mvb-ann__item:nth-child(2) b { background: #f5b800; color: #2b2b2b; }
.mvb-ann__item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mvb-ann__item i { flex: none; font-style: normal; color: #f5b800; }
.mvb-ann__item:hover span { text-decoration: underline; }
.mvb-ann__short { display: none; }
.mvb-ann__close { flex: none; width: 40px; height: 40px; border: 0; background: transparent; color: #bbb; font-size: 20px; line-height: 1; cursor: pointer; }
.mvb-ann__close:hover { color: #fff; }
@media (max-width: 800px) {
	.mvb-ann { font-size: 13px; }
	.mvb-ann__long { display: none; }
	.mvb-ann__short { display: block; }
	.mvb-ann__item { justify-content: flex-start; gap: 8px; padding: 0 0 0 12px; }
	.mvb-ann__close { width: 36px; }
}

/* ---- スマホ下部の固定ボタン（テーマのページ用） ---- */
.mvb-dock { display: none; }
@media (max-width: 800px) {
	.mvb-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 990; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px;
		padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); box-shadow: 0 -4px 16px rgba(0,0,0,.12); }
	.mvb-dock a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; border-radius: 8px;
		color: #fff !important; font-size: 16px; font-weight: 800; line-height: 1.2; text-decoration: none !important; }
	.mvb-dock small { font-size: 11px; font-weight: 700; opacity: .9; }
	.mvb-dock__tel { background: #2b2b2b; }
	.mvb-dock__diag { background: #e5413a; }
	.mvb-dock__soudan { background: #06c755; }
	html.has-mvb-dock body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ---- 離脱しそうなときのポップアップ ---- */
.mvb-pop[hidden] { display: none !important; }
.mvb-pop { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.mvb-pop__bg { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .2s; }
.mvb-pop__box { position: relative; width: 100%; max-width: 620px; max-height: calc(100vh - 32px); overflow: auto; padding: 28px 24px 20px; border-radius: 14px;
	background: #fff; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3); transform: translateY(16px) scale(.98); opacity: 0; transition: transform .25s, opacity .25s; }
.mvb-pop.is-in .mvb-pop__bg { opacity: 1; }
.mvb-pop.is-in .mvb-pop__box { transform: none; opacity: 1; }
html.mvb-pop-open { overflow: hidden; }
.mvb-pop__x { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0; background: none; color: #666; font-size: 26px; line-height: 1; cursor: pointer; }
.mvb-pop__eyebrow { margin: 0 0 4px; color: #e5413a; font-size: 14px; font-weight: 800; }
.mvb-pop__title { margin: 0 0 18px; font-size: clamp(19px, 4.6vw, 23px); font-weight: 900; line-height: 1.5; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
.mvb-pop__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 14px; }
.mvb-pop__card { display: flex; flex-direction: column; gap: 6px; padding: 16px 14px; border: 3px solid #2b2b2b; border-radius: 10px; background: #fff;
	color: #2b2b2b !important; text-align: left; text-decoration: none !important; transition: transform .15s; }
.mvb-pop__card:hover { transform: translateY(-2px); }
.mvb-pop__card--diag { border-color: #e5413a; background: #fff6f5; }
.mvb-pop__card--wake { border-color: #f5b800; background: #fffbea; }
.mvb-pop__tag { align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: #2b2b2b; color: #fff; font-size: 12px; font-weight: 800; }
.mvb-pop__card--diag .mvb-pop__tag { background: #e5413a; }
.mvb-pop__card strong { font-size: 18px; line-height: 1.4; }
.mvb-pop__tx { font-size: 14px; line-height: 1.7; color: #444; }
.mvb-pop__go { margin-top: auto; font-weight: 800; color: #b75e37; }
.mvb-pop__sub { margin: 0 0 8px; font-size: 14px; line-height: 1.8; }
.mvb-pop__sub a { font-weight: 700; text-decoration: underline; }
.mvb-pop__later { border: 0; background: none; color: #777; font-size: 14px; text-decoration: underline; cursor: pointer; padding: 8px; font-family: inherit; }
@media (max-width: 600px) {
	.mvb-pop { align-items: flex-end; padding: 0; }
	.mvb-pop__box { max-height: 88vh; border-radius: 16px 16px 0 0; padding: 26px 16px calc(14px + env(safe-area-inset-bottom)); transform: translateY(40px); }
	.mvb-pop__cards { grid-template-columns: 1fr; }
	.mvb-pop__card { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.mvb-ann__item, .mvb-pop__box, .mvb-pop__bg { transition: none; }
}
.mvb-pop .mvb-nw{display:inline-block}
.mvb-ann__item:nth-child(3) b { background: #06c755; color: #fff; }
.mvb-dock__line { background: #06c755 !important; }
.mvb-dock__form { background: #e5413a !important; }
.mvb-pop__line { display: flex; align-items: center; justify-content: center; min-height: 54px; margin: 0 0 10px; border-radius: 10px; background: #06c755; color: #fff !important; font-size: 17px; font-weight: 800; text-decoration: none !important; }
/* トップの相談ブロックの査定フォーム（テーマのボタン2つの代わり） */
.mvb-ctaform { max-width: 980px; margin: 0 auto; text-align: left; }
.mvb-ctaform__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 12px; align-items: end; padding: 18px; border-radius: 12px; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.mvb-ctaform__f { display: block; margin: 0; }
.mvb-ctaform__f span { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 700; color: #2b2b2b; }
.mvb-ctaform__f em { margin-left: 6px; padding: 1px 6px; border-radius: 3px; background: #e5413a; color: #fff; font-style: normal; font-size: 11px; }
.mvb-ctaform__f input, .mvb-ctaform__f select { display: block; width: 100%; min-height: 52px; padding: 10px 12px; border: 2px solid #cfc8cf; border-radius: 6px; background: #fff; font-size: 17px !important; color: #2b2b2b; box-sizing: border-box; }
.mvb-ctaform__f input:focus, .mvb-ctaform__f select:focus { outline: 3px solid #f5b800; border-color: #2b2b2b; }
.mvb-ctaform__btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border: 0; border-radius: 8px; background: #e5413a; color: #fff; font-size: 17px; font-weight: 800; font-family: inherit; white-space: nowrap; cursor: pointer; box-shadow: 0 4px 0 #b32d2e; }
.mvb-ctaform__btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #b32d2e; }
.mvb-ctaform__note { margin: 12px 0 0 !important; font-size: 14px; color: #555; text-align: center; line-height: 1.7; }
.mvb-ctaform__note a { margin-left: 8px; color: #06a04a; font-weight: 700; text-decoration: underline; white-space: nowrap; }
@media (max-width: 800px) {
	.mvb-ctaform__grid { grid-template-columns: 1fr; padding: 16px; }
	.mvb-ctaform__btn { min-height: 58px; font-size: 18px; }
	.mvb-ctaform__note a { display: inline-block; margin: 4px 0 0; }
}
.mvb-ctaform__f span { min-height: 22px; line-height: 22px; }
