/* MAIVERSE 読みやすさ改善（サイト全体）
   テーマは「画面幅に比例して全体を拡大縮小」する作り（root = 2.7vw / 0.916vw）。
   root を上げると rem 指定の枠が画面からはみ出すため、レイアウトはそのままに「読む文字」だけを
   機種の幅に合わせて clamp() で大きくする。対象は全ページを 320〜1440px で自動点検して洗い出したもの。
   PC（1280px以上）は元のデザインのまま。 */

/* ---------- 幅ごとの文字サイズ ---------- */
@media (max-width: 800px) {
	.mvrs-body {
		--mvr-text: clamp(17px, 4.5vw, 19px);   /* 本文 375px→17 / 402px→18 / 430px→19 */
		--mvr-small: clamp(14px, 3.7vw, 16px);  /* 日付・ラベル */
		--mvr-ui: 17px;                          /* 入力欄・ボタン（16px未満だとiPhoneが自動拡大する） */
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
	}
}
@media (min-width: 801px) and (max-width: 1279px) {
	.mvrs-body {
		--mvr-text: clamp(15px, 1.45vw, 17px);
		--mvr-small: clamp(13px, 1.25vw, 15px);
		--mvr-ui: 16px;
	}
}

/* ---------- スマホ・タブレット共通（〜1279px） ---------- */
@media (max-width: 1279px) {

	/* 日付・ラベル・補足 */
	.mvrs-info__date, .mvrs-info__cat, .mvrs-info__tab, .mvrs-info__viewall,
	.mvrs-slide__cat, .mvrs-badge__k, .mvrs-badge__v, .mvrs-numdots__num,
	.mvrs-faq__more span, .mvrs-faqpage__tab, .mvrs-faqpage__tab span, .mvrs-tabs a, .mvrs-tab,
	.mvrs-breadcrumb, .mvrs-breadcrumb a, .mvrs-breadcrumb span,
	.mvrs-btn span, .mvrs-footer__copy, .mvrs-footer__toptext,
	.rq-req-required, .mvrs-kaitori__req, .mvrs-contact__req,
	.mvrs-kaitori__privtx, .mvrs-kaitori__privtx a, .mvrs-contact__privtx, .mvrs-contact__privtx a,
	.mvrs-contact__prophd, .mvrs-contact__propaddr, .mvrs-contact__propkind,
	.mvrs-contact__propaddr span, .mvrs-contact__propkind span,
	.mvrs-chcase__ph, .mvrs-chcase__label, .mvrs-chcase__type, .mvrs-chcase__infoarea, .mvrs-chcase__infoprice,
	.mvrs-chukai__case-morebtn span, .mvrs-chflow__badge,
	.mvrs-news__date, .mvrs-news__badge, .mvrs-news__navlabel, .mvrs-news__catbtn,
	.mvsale-filter__hd, .mvsale-filter__check, .mvsale-filter__check label, .mvsale-filter__check span,
	.mvsale-card__flag, .mvsale-card__kind, .mvsale-card__date,
	.mvrs-card__date, .mvrs-card__status, .mvrs-sale__label, .mvrs-sale__head,
	.mvrs-spslide__status, .mvrs-scard__status, .mvrs-sbadge__k, .mvrs-sbadge__v,
	.mvrs-body main time,
	.entry-date, .date-enacted, .no-comments, .wp-block-latest-posts__post-title, .wp-block-search__button,
	.xw-article-media__body--title,
	.mvb-card__meta, .mvb-card__meta time, .mvb-card__cat, .mvb-article__meta, .mvb-figure__note,
	.mvb-bar__label, .mvb-bar__value, .mvb-toc__list, .mvb-toc__item--h3, .mvb-compare table,
	.mvb-chip, .mvb-tags__list a, .mvb-author__label, .mvb-author__name span {
		font-size: var(--mvr-small) !important;
		line-height: 1.6 !important;
	}

	/* 本文（ラベル指定より後に書いて優先させる） */
	.mvrs-body main p:not([class]), .mvrs-body main li:not([class]),
	.mvrs-body main dd, .mvrs-body main td, .mvrs-body main th, .mvrs-body main .NormalTextRun,
	.mvrs-body main .wp-block-paragraph,
	.mvrs-hero__desc, .mvrs-note__body p, .mvrs-reason__tx, .mvrs-flow__tx,
	.mvrs-proteam__lead, .mvrs-proteam__foot, .mvrs-proteam__left li, .mvrs-proteam__right li,
	.mvrs-acc__q, .mvrs-acc__qt, .mvrs-acc__abox p,
	.mvrs-info__title, .mvrs-slide__title,
	.mvrs-footer__line, .mvrs-footer__link,
	.mvrs-news__content p, .mvrs-news__content li,
	.mvrs-card__excerpt, .mvrs-spslide__excerpt, .mvrs-scard__excerpt,
	.mvrs-company__th, .mvrs-company__td, .mvrs-staff__role,
	.mvrs-chflow__hd, .mvrs-chflow__tx, .xw-article-media__body--text {
		font-size: var(--mvr-text) !important;
		line-height: 1.8 !important;
	}

	/* 入力欄・送信ボタン・相談ボタン */
	.mvrs-body input[type="text"], .mvrs-body input[type="email"], .mvrs-body input[type="tel"],
	.mvrs-body input[type="number"], .mvrs-body input[type="search"], .mvrs-body select, .mvrs-body textarea,
	.mvrs-kaitori__label, .mvrs-contact__label, .rq-req-label, .rq-req-label-text,
	.mvrs-kaitori__agree, .mvrs-contact__agree,
	.mvrs-kaitori__submit, .mvrs-kaitori__submit span, .mvrs-contact__submit, .mvrs-contact__submit span,
	.rq-req-button, .mvrs-cta__btn span, .mvrs-footer__btn span {
		font-size: var(--mvr-ui) !important;
		line-height: 1.5 !important;
	}
	.mvrs-kaitori__label .mvrs-kaitori__req, .mvrs-contact__label .mvrs-contact__req, .rq-req-label .rq-req-required {
		font-size: 13px !important;
	}

	/* 長い英数字・URLで横にはみ出さない */
	.mvrs-body main { overflow-wrap: anywhere; }
}

/* ---------- スマホ（〜800px）だけの調整 ---------- */
@media (max-width: 800px) {
	/* コラム（プラグイン部分） */
	.mvb-top__lead, .mvb-top__more, .mvb-archive__lead,
	.mvb-content, .mvb-content p, .mvb-content li, .mvb-summary__list li,
	.mvb-faq__item dd, .mvb-faq__item dt, .mvb-flow strong, .mvb-flow span,
	.mvb-decision__q, .mvb-decision__b, .mvb-decision__b p, .mvb-box, .mvb-check li,
	.mvb-points strong, .mvb-points span, .mvb-author__bio,
	.mvb-card__title, .mvb-related .mvb-card__title, .mvb-cta__lead, .mvrs-kaitori__agree {
		font-size: var(--mvr-text) !important;
		line-height: 1.85 !important;
	}
	.mvb-top__ja { font-size: 17px !important; }
	.mvb-article__title { font-size: clamp(25px, 6.6vw, 29px) !important; }
	.mvb-content h2, .mvb-faq__title, .mvb-related__title { font-size: clamp(21px, 5.6vw, 24px) !important; }
	.mvb-content h3 { font-size: clamp(19.5px, 5.2vw, 22px) !important; }

	/* 最新情報：省略（…）されていたタイトルを、日付の下に全文表示 */
	.mvrs-info__link { grid-template-columns: auto 1fr auto !important; column-gap: 12px; row-gap: 2px; align-items: center; }
	.mvrs-info__date { grid-column: 1; grid-row: 1; }
	.mvrs-info__cat { grid-column: 2; grid-row: 1; justify-self: start; }
	.mvrs-info__go { grid-column: 3; grid-row: 1 / span 2; }
	.mvrs-info__title { grid-column: 1 / span 2; grid-row: 2; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }

	/* 指で押しやすく（44px以上） */
	.mvrs-spmenu__link, .mvrs-footer__link, .mvrs-info__link, .mvb-chip, .mvb-toc a { min-height: 44px; }
	.mvrs-spmenu__link, .mvrs-footer__link { display: inline-flex; align-items: center; }
}

/* ---------- 改行位置・行のバランス（全幅共通） ---------- */
/* readable.js が句読点・助詞の後ろに改行候補を入れた要素は、それ以外の位置で文字を分けない */
[data-mvb-jp] { word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance; }
/* パンくずは、スクリプトで後から改行位置を変えると表示後に下の内容がずれる（CLS）ため、最初からCSSだけで決める。
   項目の間（＞の前後）で改行し、1つの項目が画面幅を超えるときだけ途中で折り返す */
.mvrs-breadcrumb { word-break: keep-all; overflow-wrap: anywhere; }
/* パンくずの「＞」はアイコンフォント。フォントが届く前は幅0のため、届いた瞬間に行が増えて下の内容がずれていた。
   最初から「＞」1つ分の幅を確保しておく */
.mvrs-breadcrumb i[class*="fa-"] { display: inline-block; width: .9em; text-align: center; }
/* 記事の日付・読む時間・要点などのアイコンも同じ理由で、1文字分の幅を確保（記事のタイトルが後からずれていた） */
.mvb-main i[class*="fa-"] { display: inline-block; width: 1.15em; text-align: center; }
/* 行頭に「ょ」「っ」「ー」などが来ないようにする（禁則処理を厳しめに） */
.mvrs-body main, .mvrs-footer { line-break: strict; }
/* 見出しの「｜」以降は小さめの副題として改行して表示 */
.mvb-ttl, .mvb-ttl__sub { display: block; }
.mvb-ttl__sub { margin-top: .35em; font-size: .62em; line-height: 1.5; font-weight: 700; opacity: .85; }
/* カード型の番号付きリストに、テーマの「・」が左外に付いていた */
.mvb-points > li, .mvb-flow > li, .mvb-steps > li, .mvb-worries > li, .mvb-gcards > li, .mvb-scards > li { list-style: none !important; }
.mvb-points > li::marker, .mvb-flow > li::marker { content: none; }
/* 記事のカテゴリ表示：黒地に濃い灰色で読めなかった */
.mvb-badge, .mvb-badge a { color: #fff !important; font-family: inherit !important; }
/* 監修者欄と、その下の相談ボックスがくっついていた */
.mvb-author + * , .mvb-garticle + .mvb-sec--cta { margin-top: 32px !important; }
/* 目次の小見出し（h3）を一段下げる */
.mvb-toc__item--h3 { padding-left: 1.4em !important; text-indent: -0.9em; }
/* 使っていない「最近のコメント」欄（表示できるコメントはありません）を隠す */
.widget_recent_comments, .wp-block-latest-comments { display: none !important; }
/* 仲介ページの事例カード：「写真」と書かれた灰色の枠を、MAIVERSEのロゴ画像（成約物件と同じもの）にする */
.mvrs-chcase__img { background: #eee url(/wp-content/themes/xwrite-child/images/closing.jpg) center / cover no-repeat !important; }
.mvrs-chcase__ph { display: none !important; }
/* お知らせ本文の箇条書きに「・」が出ていなかった */
.mvrs-news__content ul { list-style: disc; padding-left: 1.4em; }
.mvrs-news__content ul > li { display: list-item; margin: 0 0 .4em; }
/* 見出しは行の長さをそろえ、本文は最後の行が1〜2文字だけになるのを避ける（対応ブラウザのみ） */
.mvrs-body main h1, .mvrs-body main h2, .mvrs-body main h3,
.mvrs-hero__lead, .mvrs-cta__lead, .mvb-hero__badges li { text-wrap: balance; }
/* 一覧カードのタイトルは3行で省略するため、行を詰めて表示する */
.mvrs-body main .mvb-card__title { text-wrap: wrap; }
.mvrs-body main p, .mvrs-body main li, .mvrs-body main dd, .mvrs-body main figcaption,
.mvrs-footer__line { text-wrap: pretty; }

@media (max-width: 800px) {
	/* テーマのスマホ用固定改行は「元の小さい文字」に合わせた位置のため、文字を大きくした今は
	   「意見が／食い違う」「専門家／チーム」のように不自然になる。文中の固定改行は外して自然に折り返す */
	.mvrs-hero__desc br, .mvrs-proteam__lead br.sp-only, .mvrs-proteam__right li br,
	.mvrs-proteam__foot br, .mvrs-note__body br.sp-only,
	.mvrs-flow__tx br:not([class]) ~ br.sp-only { display: none !important; }
	/* 「…ご安心ください。」の後だけは段落の区切りとして残す */
	.mvrs-proteam__lead br.pc-only { display: inline !important; }
	.mvrs-proteam__lead mark { -webkit-box-decoration-break: clone; box-decoration-break: clone; }

	/* フッターメニュー：2列が狭く「お役立ちガイ／ド」と折り返していた */
	.mvrs-footer__nav { width: 100% !important; column-gap: 16px !important; row-gap: 0 !important; padding: 0 4px; box-sizing: border-box; }
	.mvrs-footer__link { word-break: keep-all; }

	/* 幅の狭い機種（〜374px）：ヘッダーの「無料買取査定」ボタンの文字がはみ出していた */
	@media (max-width: 374px) {
		.mvrs-header .mvrs-btn span { font-size: 12px !important; letter-spacing: 0 !important; white-space: nowrap; }
	}

	/* 表：1行ずつのカードにする（横にはみ出して右側の列が見えなくなっていた） */
	.mvb-compare { overflow: visible !important; }
	table.mvb-stack, table.mvb-stack tbody, table.mvb-stack tr, table.mvb-stack th, table.mvb-stack td { display: block; width: auto !important; min-width: 0 !important; }
	table.mvb-stack { min-width: 0 !important; border: 0 !important; }
	table.mvb-stack thead { display: none; }
	table.mvb-stack tr { margin: 0 0 14px; border: 2px solid var(--mvb-border, #ddd); border-radius: 8px; overflow: hidden; background: #fff; }
	table.mvb-stack tbody th { padding: 10px 14px !important; border: 0 !important; background: var(--mvb-black, #2b2b2b) !important; color: #fff !important; white-space: normal !important; text-align: left !important; }
	table.mvb-stack td { padding: 10px 14px !important; border: 0 !important; border-top: 1px solid #eee !important; text-align: left !important; }
	table.mvb-stack--labeled td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 13px; font-weight: 800; color: var(--mvb-muted, #666); }
	table.mvb-stack td.is-good { background: #fffbea; }

	/* フォームの選択欄の幅を入力欄にそろえる */
	.mvrs-body main form select { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }

	/* 画面下に固定ボタン（電話・LINE・査定）があるページは、最下部の著作権表示が隠れないよう余白を足す */
	.mvrs-body:has(.mvb-stickybar) .mvrs-footer { padding-bottom: 96px !important; }

	/* 一覧ページの大見出し（「訳アリ物件コラ／ム」と1文字だけ次の行に落ちていた） */
	.mvrs-archive__title { font-size: clamp(28px, 8.6vw, 40px) !important; line-height: 1.3 !important; }
}

/* ---------- タブレット・小型PC（801〜1279px）だけの調整 ---------- */
@media (min-width: 801px) and (max-width: 1279px) {
	.mvrs-gnav a { font-size: var(--mvr-small) !important; }

	/* 小見出し（タブレットでは12px前後まで縮んでいた） */
	.mvrs-note__title, .mvrs-reason__hd, .mvrs-flow__hd, .mvrs-chukai__pr, .mvrs-chukai__pthd,
	.mvrs-chcase__title, .mvsale-card__title, .mvrs-card__title, .mvrs-slide__title {
		font-size: clamp(16px, 1.65vw, 19px) !important;
		line-height: 1.6 !important;
	}

	/* 文字を大きくした分、PC用の固定改行（<br class="pc-only">）で不自然に折り返すのを防ぐ */
	.mvrs-hero__desc br.pc-only, .mvrs-note__body br.pc-only,
	.mvrs-proteam__lead br.pc-only, .mvrs-proteam__foot br.pc-only { display: none; }

	/* 入力欄の高さを文字に合わせる */
	.mvrs-body input[type="text"], .mvrs-body input[type="email"], .mvrs-body input[type="tel"], .mvrs-body select {
		min-height: 44px; height: auto !important;
	}
}

/* ---------- iPad〜小型ノートPC（801〜1279px）：横並びメニュー（10項目）が入りきらないので三本線メニューに ---------- */
@media (min-width: 801px) and (max-width: 1279px) {
	.mvrs-gnav { display: none !important; }
	.mvrs-header__inner { justify-content: space-between; }
	.mvrs-header__ctas { margin-left: auto; }
	.mvrs-burger { display: inline-flex !important; padding: 0 0 0 12px; }
	.mvrs-burger i { font-size: 28px !important; }
	.mvrs-btn { width: auto !important; min-width: 0 !important; height: auto !important; min-height: 40px; padding: 8px 14px !important; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
	.mvrs-btn span { font-size: 14px !important; line-height: 1.3 !important; }
	.mvrs-spmenu__link { font-size: 18px !important; min-height: 48px; display: inline-flex; align-items: center; }
}
