/* ==========================================================================
   sections.css — 各セクションの組み方
   🔴 全幅の断ち切りは「%ベースのフルブリードグリッド」で作る。100vw は使わない
      （100vw はスクロールバー幅を含むため、横スクロールの原因になる）。
   🔴 overflow-x:hidden で横溢れを隠さない。
   🔴 画像は必ず aspect-ratio + object-fit:cover で高さを固定する。
      置換要素は実アスペクト比を行に渡すため、縦長と横長が混ざると
      その行だけ高さが膨らんでレイアウトが崩れる。
   ========================================================================== */

/* ---- 共通 ---------------------------------------------------------------- */
.mg-section__head { margin-bottom: var(--gutter-l); }
.mg-emphasis { font-size: var(--fs-lead); font-weight: 500; color: var(--c-text-head); }
.mg-textlink {
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 500; text-decoration: none;
  /* テキストの下線であってカードのアクセント線ではない（design-v2 §6-11で存置） */
  border-bottom: 1px solid var(--c-gold); padding-bottom: 2px;
}
.mg-textlink::after { content: "→"; font-size: .9em; }
.mg-textlink:hover { border-bottom-color: var(--c-navy); }
.mg-more { margin-top: var(--gutter-m); }
.mg-price-inline { font-family: var(--ff-num); font-weight: 900; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) { .mg-br-pc { display: none; } }

/* 画像ボックスの共通挙動（アスペクト差でレイアウトを壊さない） */
.mg-alt__media img,
.mg-split__media img,
.mg-service__media img,
.mg-hero__main img,
.mg-hero__sub img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- S1 hero：大判ビジュアル -------------------------------------------
   🔴 写真を全幅に敷いて画面を支配させるが、暗面にはしない。
      白 .72 のオーバーレイ＋紺文字で「明るく清潔」を保つ。
   🔴 画面端に接する辺は丸めない（写真は上左右が端に接するので角丸なし）。
   ------------------------------------------------------------------------ */
.mg-hero {
  position: relative;
  display: flex; align-items: center;
  min-height: clamp(560px, 46vw, 780px);
  padding: calc(var(--section-y) * .9) 0;
  background: var(--c-bg);
  overflow: hidden;               /* 縦方向のパララックス用。横溢れ隠しではない */
}
.mg-hero__bg { position: absolute; inset: 0; z-index: 0; }
.mg-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.mg-hero__bg::after {
  content: ""; position: absolute; inset: 0;
  /* 白のオーバーレイ。左ほど濃く＝文字側の可読性を上げ、右は写真を見せる */
  background:
    linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.82) 42%, rgba(255,255,255,.60) 100%),
    linear-gradient(180deg, rgba(255,255,255,0) 62%, rgba(255,255,255,.96) 100%);
}
.mg-hero__inner { position: relative; z-index: 1; width: 100%; }
/* h1 96px は 11文字＋字間で約1100px必要。本文コンテナ1120pxでは足りないので
   ヒーローだけ器を広げる（全幅セクションなので読み幅の制約を受けない）。 */
.mg-hero .mg-container { max-width: 1280px; }
/* 🔴 max-width:62ch は本文サイズ基準（約527px）なので、96pxのh1を4行に折ってしまう。
   見出しはコンテナ幅を使わせ、読み幅の制限はリード文だけに掛ける。 */
/* 🔴 右下に置く小写真の領域には本文を入れない。
      入れると「メールでのお問い合わせ」ボタンや受付時間が写真の下に隠れる（4幅で実測）。 */
.mg-hero__body { max-width: none; padding-right: calc(clamp(160px, 20vw, 260px) + 48px); }
.mg-hero__pills { margin-bottom: var(--gutter-s); }
.mg-hero h1 { font-size: clamp(56px, 7vw, 96px); line-height: 1.28; margin-bottom: .5em; }
.mg-hero__lead { margin-top: 1.2em; max-width: 40em; }
/* ボタンは横並び固定。補足文はボタンの外に出す（中に入れると潰れる） */
.mg-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--gutter-m); }
.mg-hero__hours { margin-top: 10px; font-size: var(--fs-note); color: var(--c-text-sub); }

/* 重なり2組目。オーバーレイの掛からない実像を1枚だけ残す */
.mg-hero__sub {
  position: absolute; right: 0; bottom: calc(var(--section-y) * -.55);
  width: clamp(160px, 20vw, 260px); aspect-ratio: 1 / 1;
  border: 8px solid var(--c-bg); box-shadow: var(--card-shadow);
  margin: 0; z-index: 2;
}
.mg-hero__sub img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 1023px) {
  .mg-hero { min-height: 520px; }
  .mg-hero__bg::after {
    background:
      linear-gradient(90deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.86) 60%, rgba(255,255,255,.70) 100%),
      linear-gradient(180deg, rgba(255,255,255,0) 58%, rgba(255,255,255,.97) 100%);
  }
  .mg-hero__sub { width: 150px; border-width: 6px; bottom: -40px; right: var(--edge); }
  .mg-hero__body { padding-right: calc(150px + 32px); }
}
@media (max-width: 767px) {
  .mg-hero { min-height: 0; padding-bottom: calc(var(--section-y) + 40px); }

  .mg-hero__bg::after {
    background:
      linear-gradient(180deg, rgba(255,255,255,.62) 0%, rgba(255,255,255,.90) 34%, rgba(255,255,255,.97) 100%);
  }
  .mg-hero h1 { font-size: clamp(26px, 7.4vw, 34px); }  /* 8vwだと390pxでちょうど溢れて3行になる */
  .mg-hero__actions .mg-btn { width: 100%; }
  /* SPは重ねる余地が無いので、通常の流れに戻して本文の下へ置く */
  .mg-hero__sub {
    position: static; width: 116px; border-width: 5px;
    margin: var(--gutter-m) 0 0 auto;
  }
  .mg-hero__body { padding-right: 0; }
}

/* ---- S2 実績数字帯 ------------------------------------------------------- */
.mg-stats__head { text-align: center; margin-bottom: var(--gutter-l); font-size: var(--fs-h3); font-weight: 500; letter-spacing: .1em; }
.mg-stat__sub { display: block; margin-top: .3em; font-size: var(--fs-note); color: var(--c-text-invert-sub); }
.mg-stats__note { text-align: center; margin-top: var(--gutter-m); }
.mg-stats__note a { color: var(--c-text-invert); }

/* ---- S4 問題提起（写真＋本文）-------------------------------------------- */
.mg-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--gutter-l); align-items: center; }
.mg-split__media { aspect-ratio: 4 / 3; }
.mg-problem__detail { margin: var(--gutter-l) auto 0; padding: 0; }
.mg-problem__detail h3 { margin-top: var(--gutter-m); }
@media (max-width: 767px) { .mg-split { grid-template-columns: minmax(0, 1fr); gap: var(--gutter-m); } }

/* ---- S5 選ばれる理由（左右交互・カードにしない）-------------------------- */
.mg-alt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gutter-l);
  align-items: center;
  margin-bottom: calc(var(--section-y) * .7);
}
.mg-alt:last-child { margin-bottom: 0; }
.mg-alt__media { aspect-ratio: 10 / 7; }
.mg-alt--flip .mg-alt__media { order: 2; }
.mg-alt--flip .mg-alt__body { order: 1; }
.mg-alt__no {
  display: block; font-size: 40px; color: var(--c-gold);
  line-height: 1; margin-bottom: .2em; letter-spacing: .04em;
}
.mg-alt__body h3 { margin-bottom: .8em; }
@media (max-width: 767px) {
  .mg-alt { grid-template-columns: minmax(0, 1fr); gap: var(--gutter-s); margin-bottom: var(--section-y); }
  .mg-alt--flip .mg-alt__media, .mg-alt--flip .mg-alt__body { order: initial; }
  .mg-alt__no { font-size: 30px; }
}

/* ---- S6 サービス2種 ------------------------------------------------------ */
.mg-services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter-l); }
.mg-service { border: var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--radius); background: var(--c-bg); overflow: hidden; }
.mg-service__media { aspect-ratio: 16 / 9; }
.mg-service__body { padding: var(--card-pad); }
.mg-service__for { display: block; font-size: var(--fs-note); color: var(--c-text-sub); font-family: var(--ff-body); margin-top: .3em; }
@media (max-width: 767px) { .mg-services { grid-template-columns: minmax(0, 1fr); gap: var(--gutter-m); } }

/* ---- S7 料金ダイジェスト ------------------------------------------------- */
.mg-price-table td.is-price { font-size: 21px; color: var(--c-text-head); }
.mg-price-note { display: block; font-size: var(--fs-note); font-family: var(--ff-body); font-weight: 400; color: var(--c-text-sub); margin-top: .3em; white-space: normal; }
.mg-pricebox { margin-top: var(--gutter-m); }
.mg-pricebox h3 { font-size: var(--fs-h3); margin-bottom: .5em; }
.mg-addlist { list-style: none; padding: 0; margin: 0 0 .8em; }
.mg-addlist li {
  display: flex; justify-content: space-between; gap: 1em;
  padding: 12px 0; border-bottom: 1px solid var(--c-rule); margin: 0;
}
.mg-addlist .mg-num { font-weight: 900; color: var(--c-text-head); white-space: nowrap; }

/* ---- S8 施工の流れ（タイムライン）---------------------------------------- */
.mg-timeline { list-style: none; margin: 0; padding: 0; counter-reset: mg-step; }
.mg-timeline__item {
  position: relative; counter-increment: mg-step;
  padding: 0 0 var(--gutter-m) 56px; margin: 0;
}
.mg-timeline__item::before {
  content: counter(mg-step);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--c-navy); color: var(--c-text-invert);
  font-family: var(--ff-num); font-weight: 900; font-size: 15px;
  display: grid; place-items: center;
}
/* 縦線は中立色の区切り。カラーアクセント線ではない */
.mg-timeline__item::after {
  content: ""; position: absolute; left: 17px; top: 40px; bottom: 6px;
  width: 1px; background: var(--c-rule);
}
.mg-timeline__item:last-child { padding-bottom: 0; }
.mg-timeline__item:last-child::after { display: none; }
.mg-timeline__item h3 { margin-bottom: .4em; }
@media (max-width: 767px) { .mg-timeline__item { padding-left: 46px; } .mg-timeline__item::after { left: 14px; } }

/* ---- S9 施工事例のプレースホルダ ----------------------------------------- */
.mg-card__ph {
  aspect-ratio: 3 / 2; background: var(--c-water);
  display: grid; place-items: center;
  color: var(--c-navy-light); font-size: var(--fs-note); letter-spacing: .1em;
}
.mg-card--placeholder { pointer-events: none; }

/* ---- S10 信頼の裏付け ---------------------------------------------------- */
.mg-laurel { margin-bottom: var(--gutter-m); }
.mg-trust-table th[scope="row"] { width: 10em; }
.mg-trust__note { margin-top: var(--gutter-m); }
@media (max-width: 640px) { .mg-trust-table th[scope="row"] { width: auto; } }

/* ---- S11 対応エリア ------------------------------------------------------ */
.mg-arealist {
  list-style: none; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: var(--gutter-m) 0;
}
.mg-arealist li {
  margin: 0; padding: 6px 14px;
  border: 1px solid var(--c-rule); border-radius: var(--radius);
  font-size: var(--fs-note); background: var(--c-bg);
}

/* ---- S13 CTA ------------------------------------------------------------- */
.mg-cta__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter-l); margin-top: var(--gutter-l); }
.mg-cta__col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.mg-cta__label { font-size: var(--fs-note); letter-spacing: var(--tr-label); color: var(--c-text-invert-sub); }
@media (max-width: 767px) {
  .mg-cta__grid { grid-template-columns: minmax(0, 1fr); gap: var(--gutter-m); }
  .mg-cta__col .mg-btn { width: 100%; }
}

/* ---- S12 よくあるご質問（TOPは開いたまま読ませるダイジェスト）------------ */
.mg-qa { margin: 0; }
.mg-qa__item { border-bottom: 1px solid var(--c-rule); padding: 24px 0; }
.mg-qa__item:first-child { border-top: 1px solid var(--c-rule); }
.mg-qa__q {
  font-family: var(--ff-head); font-size: var(--fs-h3); color: var(--c-text-head);
  line-height: var(--lh-heading); font-weight: 600; margin: 0 0 .7em;
  padding-left: 1.6em; position: relative;
}
.mg-qa__q::before {
  content: "Q"; position: absolute; left: 0; top: 0;
  font-family: var(--ff-num); font-weight: 900; color: var(--c-gold); font-size: .9em;
}
.mg-qa__a { margin: 0; padding-left: 1.6em; }
.mg-qa__a p:last-child { margin-bottom: 0; }

/* hero の見出しはコンテナ幅で受ける（左カラム内だと64pxが4行に折れるため） */



/* ---- S3 理念：対症 vs 予防の2カラム対置（面の段差で意味を作る）----------- */
.mg-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter-l); margin-top: var(--gutter-l); }
.mg-compare__head { font-family: var(--ff-head); font-size: var(--fs-h3); margin-bottom: .8em; }
.mg-compare__cure .mg-compare__head { color: var(--c-text-sub); }
.mg-compare__prevent .mg-compare__head { color: var(--c-text-head); }
@media (max-width: 767px) { .mg-compare { grid-template-columns: minmax(0, 1fr); gap: var(--gutter-m); } }

/* ---- S4：本文カード --------------------------------------------------------
   🔴 以前は margin-top:-80px で写真に重ねていたが、このカードは
      「本文＋写真」を含む .mg-split の“後ろ”に置かれているため、
      持ち上げると写真ではなく直前の本文の上に乗り、文字が読めなくなっていた
      （TOP・戸建て・会社概要の3ページで実測）。
      重なりで得られるリズムより、読めることを優先して負のmarginは使わない。 */
.mg-problem__detail { margin: var(--gutter-l) auto 0; padding: var(--card-pad); }
@media (min-width: 1024px) {
  .mg-problem__detail { margin-left: 80px; }
}
/* object-position は mg_photo_pos() の実測値をインラインで当てる（CSSで上書きしない） */

/* ---- S5：番号を主役に ---------------------------------------------------- */
.mg-alt { margin-bottom: 96px; }
.mg-alt__nowrap { display: flex; align-items: baseline; gap: 14px; margin-bottom: .4em; }
.mg-alt__no { font-size: 72px; font-weight: 900; font-family: var(--ff-num); color: var(--c-gold); line-height: 1; margin: 0; }
.mg-alt__tag { font-family: var(--ff-head); font-size: var(--fs-label); letter-spacing: var(--tr-label); color: var(--c-gold-text); }
@media (max-width: 767px) { .mg-alt__no { font-size: 48px; } .mg-alt { margin-bottom: var(--section-y); } }

/* ---- S6：カード全体をリンクにし、右下に円形矢印 -------------------------- */
.mg-service { position: relative; display: block; text-decoration: none; color: inherit; }
.mg-service:hover { color: inherit; }
.mg-service__body { padding: var(--card-pad); padding-right: 96px; }
.mg-service .mg-circlebtn { position: absolute; right: var(--card-pad); bottom: var(--card-pad); }
.mg-service__price { font-family: var(--ff-num); font-weight: 900; font-size: 28px; color: var(--c-text-head); font-variant-numeric: tabular-nums; }
@media (max-width: 767px) { .mg-service__body { padding-right: 76px; } }

/* ---- S7：表の外に大型プライスブロック（枠なし・余白だけ）---------------- */
.mg-bigprice { margin-bottom: var(--gutter-xl); }
.mg-bigprice__num {
  font-family: var(--ff-num); font-weight: 900; font-size: 72px; line-height: 1;
  color: var(--c-navy); font-variant-numeric: tabular-nums;
  display: inline-block; margin-top: .25em;
}
.mg-bigprice__unit { font-size: 24px; font-weight: 500; margin-left: .2em; }
.mg-price-table td.is-price { font-size: 34px; }
@media (max-width: 767px) {
  .mg-bigprice__num { font-size: 52px; }
  .mg-bigprice__unit { font-size: 18px; }
  .mg-price-table td.is-price { font-size: 26px; }
}

/* ---- 集合住宅：管理側と施工側の役割分担 ------------------------------- */
.mg-role-split {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: var(--gutter-l) 0; border-block: 1px solid var(--c-rule);
}
.mg-role-split section { padding: 28px 26px; }
.mg-role-split section + section { border-left: 1px solid var(--c-rule); }
.mg-role-split section > span { display: block; margin-bottom: 10px; color: var(--c-gold-text); font-size: var(--fs-label); font-weight: 700; letter-spacing: .14em; }
.mg-role-split h3 { margin-bottom: 16px; font-size: 22px; }
.mg-role-split ul { margin: 0; }
@media (max-width: 767px) {
  .mg-role-split { grid-template-columns: 1fr; }
  .mg-role-split section { padding: 24px 0; }
  .mg-role-split section + section { border-top: 1px solid var(--c-rule); border-left: 0; }
}

/* ---- S8：番号丸に金のoutlineリング（閉じた形＝上辺線禁止に抵触しない）---- */
.mg-timeline__item { padding-left: 68px; }
.mg-timeline__item::before {
  width: 40px; height: 40px; font-size: 16px;
  outline: 1.5px solid var(--c-gold); outline-offset: 4px;
}
.mg-timeline__item::after { left: 20px; top: 50px; }
@media (max-width: 767px) { .mg-timeline__item { padding-left: 60px; } .mg-timeline__item::after { left: 20px; } }

/* ---- S9：カード右下に円形矢印 -------------------------------------------- */
.mg-card { position: relative; }
.mg-card--link { display: block; text-decoration: none; color: inherit; }
.mg-card .mg-circlebtn { position: absolute; right: 20px; bottom: 20px; }
.mg-card__body { padding-bottom: 84px; }

/* ---- S10：第三者評価だけを月桂冠で囲う専用ブロック ----------------------- */
.mg-award { text-align: center; padding: var(--card-pad); margin-bottom: var(--gutter-l); }
.mg-award__rows { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin-top: 12px; }
.mg-award__row { font-size: var(--fs-body); color: var(--c-text-head); font-weight: 500; }
.mg-laurel { margin-bottom: 0; }
.mg-trust__note { margin-top: var(--gutter-l); }

/* ---- S11：エリアをピルで ------------------------------------------------- */
.mg-arealist { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: var(--gutter-m) 0; min-width: 0; }
.mg-arealist li { margin: 0; padding: 0; border: 0; background: none; min-width: 0; }

/* ---- S13：右半分に作業写真を断ち切りで敷く ------------------------------- */
.mg-cta { position: relative; overflow: hidden; }
.mg-cta__photo { position: absolute; inset: 0 0 0 50%; z-index: 0; }
.mg-cta__photo img { width: 100%; height: 100%; object-fit: cover; }
.mg-cta__photo::after { content: ""; position: absolute; inset: 0; background: rgba(11, 31, 61, .72); }
.mg-cta > .mg-container { position: relative; z-index: 1; }
.mg-cta__tel { font-size: clamp(34px, 5vw, 56px); }
/* 🔴 LINE未設定でも空の列が残らないように、実際の列数に追従させる */
.mg-cta__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gutter-l); margin-top: var(--gutter-l); }
@media (max-width: 1023px) {
  .mg-cta__photo { inset: 0; opacity: .5; }
}
@media (max-width: 767px) {
  .mg-cta__grid { grid-template-columns: minmax(0, 1fr); gap: var(--gutter-m); }
}

/* ---- フッターのロゴ ------------------------------------------------------ */
.mg-footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: .6em; }
.mg-footer__brand img { width: 40px; height: 40px; object-fit: contain; }
.mg-footer__name { margin: 0; }

/* S2 帯：数字を大きくしたので上下を締める */
.mg-stats-band { padding: 80px 0; }
@media (max-width: 767px) { .mg-stats-band { padding: 56px 0; } }

/* 数字帯は本文コンテナ(1120px)より広い枠で受ける（88pxの数字4本を横に並べるため） */
.mg-stats-band .mg-container { max-width: 1400px; }


/* ---- 見出しは「載る器の幅」で上限が決まる ------------------------------
   🔴 --fs-h2 の clamp は本文コンテナ(1120px)を前提にした値。
      狭い器（narrow 760px・S4の分割カラム）にそのまま入れると
      1行あたりの文字数が足りず3行以上に折れる（実測）。器ごとに上限を下げる。
   ------------------------------------------------------------------------ */
.mg-container--narrow h2 { font-size: clamp(30px, 3.2vw, 40px); }
/* S4の見出しは <br> で2行に割ってあり、2行目が21文字。
   1072pxの器に21文字を収めるには48pxが上限（実測）。 */
#mg-problem-head { font-size: clamp(28px, 3.4vw, 48px); }
@media (max-width: 1023px) {
  .mg-container--narrow h2 { font-size: var(--fs-h2); }
  #mg-problem-head { font-size: 30px; }
}
@media (max-width: 767px) {
  #mg-problem-head { font-size: var(--fs-h2); }
}

.mg-section__lead { margin-bottom: var(--gutter-l); }

/* 事例カードの写真。縦長・横長が混在するので枠比を固定して重心で見せる */
.mg-card__media { aspect-ratio: 3 / 2; margin: 0; }
.mg-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ビフォー/アフターもCSS側で制御する（サーバー切り抜きをやめたため） */
.mg-ba__fig { position: relative; }
.mg-ba__fig img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }

/* エリア名の長さでピルが1行/2行に分かれ、カード間で見出しの開始位置がずれる。
   2行分の高さを確保して揃える（実測: さいたま市=2行 / 練馬区・川口市=1行）。 */
.mg-card__meta { min-height: calc((39px * 2) + 8px); align-content: flex-start; }
@media (max-width: 767px) { .mg-card__meta { min-height: 0; } }

/* ---- 下層ページ共通 ------------------------------------------------------ */
.mg-pagehero { padding-bottom: calc(var(--section-y) * .35); }
.mg-pagehero + .mg-section { padding-top: calc(var(--section-y) * .6); }
.mg-pagehero h1 { font-size: clamp(34px, 4.4vw, 60px); line-height: 1.35; margin-bottom: .7em; }
.mg-pagehero .mg-summary { margin-bottom: 0; }
.mg-summary p:last-child { margin-bottom: 0; }

/* ---- 家の断面図（自前SVG）------------------------------------------------
   線幅で主従を作る：外形と床は細く薄い脇役／合流経路は太く濃い主役。 */
.mg-diagram { margin: 0 0 var(--gutter-l); }
.mg-diagram__svg { width: 100%; height: auto; display: block; }
.mg-diagram__frame  { stroke: var(--c-navy-light); stroke-width: 1.5; opacity: .55; }
.mg-diagram__ground { stroke: var(--c-navy-light); stroke-width: 2; opacity: .55; }
.mg-diagram__fixture rect { fill: var(--c-water); stroke: var(--c-navy-light); stroke-width: 1.5; }
/* 🔴 この図の主役。他の線とはっきり差をつける */
.mg-diagram__pipe  { stroke: var(--c-navy); stroke-width: 4; }
.mg-diagram__trunk { stroke: var(--c-navy-deep); stroke-width: 7; }
.mg-diagram__masu ellipse { fill: var(--c-water); stroke: var(--c-navy-deep); stroke-width: 2; }
.mg-diagram__masu .mg-diagram__masu-in { fill: var(--c-navy-deep); stroke: none; }
.mg-diagram__no circle { fill: var(--c-navy); }
.mg-diagram__no text { fill: #fff; }
.mg-diagram__legend ol {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  list-style: none; padding: 0; margin: 0 0 .8em;
}
.mg-diagram__legend li { margin: 0; font-size: var(--fs-body); display: flex; align-items: center; gap: 10px; }
.mg-diagram__key {
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--c-navy); color: #fff;
  font-family: var(--ff-num); font-weight: 900; font-size: var(--fs-label);
}

/* ピル列の直後に見出しが来るときの間隔 */
.mg-pilllist + h3, .mg-pilllist + p + h3 { margin-top: 1.6em; }

/* 断面図はコンテナ幅いっぱいで見せる（半分の幅では「お家丸ごと」が伝わらない） */
.mg-diagram--wide { max-width: var(--container); margin-inline: auto; }
@media (max-width: 767px) {
  /* SPは横に伸ばさず、縦に収まる比率へ切り替える */
  .mg-diagram__svg { min-height: 0; }
  .mg-diagram__legend ol { flex-direction: column; gap: 8px; }
  .mg-diagram__legend li { font-size: var(--fs-note); }
}

/* ---- お問い合わせ -------------------------------------------------------- */
.mg-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gutter-m); }
.mg-way { display: flex; flex-direction: column; gap: 8px; }
.mg-way .mg-cta__label { color: var(--c-gold-text); }
.mg-way__tel { font-family: var(--ff-num); font-weight: 900; font-size: 30px; color: var(--c-navy); text-decoration: none; font-variant-numeric: tabular-nums; }

.mg-form { margin-top: var(--gutter-m); }
.mg-field { margin-bottom: var(--gutter-m); }
.mg-field__label { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--c-text-head); margin-bottom: 8px; }
.mg-field__req {
  font-size: var(--fs-label); letter-spacing: .08em; padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--c-navy); color: #fff;
}
.mg-field__req.is-optional { background: var(--c-bg-alt); color: var(--c-text-sub); }
.mg-form input[type="text"], .mg-form input[type="email"], .mg-form input[type="tel"],
.mg-form input[type="date"], .mg-form select, .mg-form textarea {
  width: 100%; padding: 12px 14px; font-size: var(--fs-body); font-family: inherit;
  border: 1px solid var(--c-rule); border-radius: var(--radius); background: #fff; color: var(--c-text);
}
.mg-form textarea { line-height: 1.8; }
.mg-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.mg-check { display: flex; align-items: center; gap: 6px; }
/* 自動送信よけ。-9999px だと左方向にレイアウトが伸びるので clip で隠す */
.mg-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); white-space: nowrap; }
.mg-formnote { padding: 14px 18px; border: 1px solid var(--c-gold-line); background: var(--c-gold-tint); border-radius: var(--radius); }
.mg-formnote--error { border-color: #E0C9C9; background: #FBF3F3; color: #7A3030; }

/* ---- 法的表記ページ ------------------------------------------------------ */
.mg-legal h2 { font-size: clamp(20px, 2.2vw, 26px); margin-top: 2em; }
.mg-legal h2:first-child { margin-top: 0; }
.mg-legal ul { padding-left: 1.4em; }

/* 第三者評価：プラットフォームごとに行を分ける（並べても出典が分かるように） */
/* 🔴 くらしのマーケットとGoogleを詰めて並べない。行の間に余白を取る */
.mg-award__list { margin: 18px 0 0; display: grid; gap: 18px; }
.mg-award__pair { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 12px; }
.mg-award__src { font-size: var(--fs-note); color: var(--c-text-sub); margin: 0; }
.mg-award__row { margin: 0; }

/* くらしのマーケット由来の第三者評価だけを橙で識別する。 */
.mg-section--kurashi { background: #fff; }
.mg-award--kurashi {
  border: 2px solid var(--mkr-review-orange, #ff5a14);
  background: #fff;
  box-shadow: 0 18px 44px rgba(20, 49, 91, .10);
}
.mg-award--kurashi .mg-laurel svg { stroke: var(--mkr-review-orange, #ff5a14); }
.mg-award--kurashi .mg-award__src { color: var(--mkr-review-orange-deep, #a93400); font-weight: 700; }
.mg-section--kurashi .mg-btn--ghost { border-color: var(--mkr-review-orange, #ff5a14); color: var(--mkr-review-orange-deep, #a93400); }
.mg-section--kurashi .mg-btn--ghost:hover { background: var(--mkr-review-orange-pale, #fff4ee); }

/* 料金ページ：価格を読み終えた位置で、第三者評価を横長の橙面として見せる。 */
.mg-price-review {
  padding: clamp(64px, 7vw, 96px) 0;
  background: var(--mkr-review-orange, #ff5a14);
  color: var(--c-navy-deep);
  overflow: hidden;
}
.mg-price-review__inner {
  display: grid;
  grid-template-columns: minmax(310px, .72fr) minmax(0, 1.28fr);
  align-items: stretch;
  gap: clamp(36px, 5vw, 76px);
}
.mg-price-review__score {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 370px;
  padding: 12px 0;
  color: var(--mkr-deep, #061b35);
}
.mg-price-review__stars {
  margin: 0 0 30px;
  color: #fff;
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .12em;
}
.mg-price-review__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.mg-price-review__facts p { display: flex; flex-direction: column; gap: 9px; margin: 0; }
.mg-price-review__facts strong {
  color: var(--mkr-deep, #061b35);
  font-family: var(--ff-num);
  font-size: clamp(58px, 6vw, 88px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.07em;
  font-variant-numeric: tabular-nums;
}
.mg-price-review__facts span { color: var(--mkr-deep, #061b35); font-size: var(--fs-note); font-weight: 800; letter-spacing: .08em; }
.mg-price-review__platform {
  margin: 38px 0 0;
  padding-top: 22px;
  border-top: 1px solid rgba(6,27,53,.30);
  color: var(--mkr-deep, #061b35);
  font-weight: 800;
  line-height: 1.55;
}
.mg-price-review__platform span { display: block; font-size: var(--fs-label); letter-spacing: .18em; }
.mg-price-review__voice {
  position: relative;
  padding: clamp(38px, 5vw, 66px);
  background: #fff;
  box-shadow: 0 22px 58px rgba(6,27,53,.15);
}
.mg-price-review__voice::after {
  content: "“";
  position: absolute;
  top: 14px;
  right: 28px;
  color: rgba(255,90,20,.11);
  font-family: var(--ff-head);
  font-size: 132px;
  line-height: 1;
  pointer-events: none;
}
.mg-price-review__voice .mg-label { position: relative; z-index: 1; color: var(--mkr-review-orange-deep, #a93400); }
.mg-price-review__voice h2 { position: relative; z-index: 1; margin: 18px 0 24px; font-size: clamp(34px, 4vw, 54px); line-height: 1.45; }
.mg-price-review__summary { position: relative; z-index: 1; max-width: 660px; margin: 0; color: var(--c-text); font-size: var(--fs-body); line-height: 1.95; }
.mg-price-review__voice > a {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--c-rule);
  color: var(--mkr-review-orange-deep, #a93400);
  font-size: var(--fs-note);
  font-weight: 800;
  text-decoration: none;
}
@media (max-width: 900px) {
  .mg-price-review__inner { grid-template-columns: 1fr; gap: 32px; }
  .mg-price-review__score { min-height: 0; padding: 0; }
  .mg-price-review__platform { max-width: 520px; }
}
@media (max-width: 620px) {
  .mg-price-review__stars { margin-bottom: 24px; font-size: 25px; }
  .mg-price-review__facts { gap: 16px; }
  .mg-price-review__facts strong { font-size: 54px; }
  .mg-price-review__voice { padding: 32px 24px; }
  .mg-price-review__voice h2 { font-size: 31px; }
}

/* ---- 事例詳細：前後の事例 ------------------------------------------------
   🔴 円形矢印は使わない（1ページ7個の上限があるため）。
      ラベルには事例のタイトルを出す。「次の事例へ」だけでは何が来るか分からない。 */
.mg-adjacent {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gutter-m); margin-top: var(--gutter-xl);
}
.mg-adjacent__item {
  display: block; padding: var(--card-pad); text-decoration: none; color: inherit;
  border: var(--card-border); box-shadow: var(--card-shadow);
  border-radius: 0 var(--r-dia) 0 var(--r-dia); background: var(--c-bg);
  transition: box-shadow .2s var(--ease);
}
.mg-adjacent__item:hover { box-shadow: 0 18px 40px rgba(20, 49, 91, .10); color: inherit; }
.mg-adjacent__item--next { border-radius: var(--r-dia) 0 var(--r-dia) 0; text-align: right; }
.mg-adjacent__label {
  display: block; font-size: var(--fs-note); letter-spacing: var(--tr-label);
  color: var(--c-gold-text); margin-bottom: .6em;
}
.mg-adjacent__item--prev .mg-adjacent__label::before { content: "← "; }
.mg-adjacent__item--next .mg-adjacent__label::after { content: " →"; }
.mg-adjacent__title {
  display: block; font-family: var(--ff-head); font-size: var(--fs-h3);
  color: var(--c-text-head); line-height: var(--lh-heading);
}
.mg-adjacent__meta { display: block; margin-top: .5em; font-size: var(--fs-note); color: var(--c-text-sub); }
/* 片方しか無いときは幅いっぱいにせず、その側に寄せる */
.mg-adjacent__item--next:only-child { grid-column: 2; }
@media (max-width: 640px) {
  .mg-adjacent { grid-template-columns: minmax(0, 1fr); }
  .mg-adjacent__item--next { text-align: left; border-radius: 0 var(--r-dia) 0 var(--r-dia); }
  .mg-adjacent__item--next:only-child { grid-column: 1; }
}
