@charset "UTF-8";
/* ==================================================================
   め組Inc. — トップページ／フッター 専用スタイル
   ------------------------------------------------------------------
   ・style.css / responsive.css の後に読み込まれます（functions.php）
   ・クラス接頭辞は mg- で統一（既存CSSと衝突しません）
   ・テーマカラー：深い赤 #A31700（ロゴ実測値）／黒／白
================================================================== */

/* ------------------------------------------------------------------
   1. カラー・変数（旧テーマのブルーをブランドカラーへ上書き）
------------------------------------------------------------------ */
:root {
    --mg-red: #a31700;
    --mg-red-deep: #7a1000;
    --mg-red-bright: #cf2100;
    --mg-black: #0b0b0c;
    --mg-ink: #141416;
    --mg-ink2: #1d1d20;
    --mg-white: #ffffff;
    --mg-snow: #f4f4f2;
    --mg-gray: #8b8b90;
    --mg-line-green: #06c755;
    --mg-shell: min(1180px, 86%);
    --mg-ease: cubic-bezier(.16, 1, .3, 1);

    /* 既存テーマ変数の上書き（サイト全体の色味をブランドに合わせる） */
    --color-primary: #a31700;
    --color-sub: #cf2100;
    --color-base: #0b0b0c;
    --gra-blue: linear-gradient(317deg, #7a1000 0%, #cf2100 100%);
    --tb-green: #a31700;
    --tb-green-deep: #7a1000;
    --tb-aqua: #a31700;
    --tb-aqua-deep: #7a1000;
    --tb-aqua-light: #cf2100;
    --tb-aqua-pale: #f9f7f5;
}

/* ------------------------------------------------------------------
   2. 共通パーツ
------------------------------------------------------------------ */
.mg-main {
    background: var(--mg-white);
    color: var(--mg-ink);
    font-family: var(--font-main);
    overflow-x: hidden;
}

.mg-inner {
    width: var(--mg-shell);
    margin-inline: auto;
    position: relative;
    z-index: 2;
}

.mg-br-sp { display: none; }
.mg-br-pc { display: inline; }

/* --- スクロール表示 --- */
.mg-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .9s var(--mg-ease), transform .9s var(--mg-ease);
    will-change: opacity, transform;
}

.mg-reveal.is-shown {
    opacity: 1;
    transform: none;
}

/* --- 英字ラベル --- */
.mg-eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .34em;
    color: var(--mg-red);
    margin: 0 0 22px;
    text-transform: uppercase;
}

.mg-eyebrow::before {
    content: "";
    width: 42px;
    height: 2px;
    background: var(--mg-red);
    flex: none;
}

.mg-eyebrow--light {
    color: #fff;
}

.mg-eyebrow--light::before {
    background: var(--mg-red-bright);
}

/* --- セクション見出し --- */
.mg-sec-head {
    margin-bottom: clamp(40px, 5vw, 72px);
}

.mg-sec-title {
    font-size: clamp(26px, 3.4vw, 46px);
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: .02em;
    margin: 0;
    color: inherit;
}

.mg-sec-lead {
    margin: 24px 0 0;
    max-width: 46em;
    font-size: 15px;
    line-height: 2.1;
    color: #55555c;
}

/* --- ボタン（角を斬り落としたシャープな形） --- */
.mg-btn {
    --mg-btn-bg: var(--mg-red);
    --mg-btn-fg: #fff;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 250px;
    height: 62px;
    padding: 0 30px;
    background: var(--mg-btn-bg);
    color: var(--mg-btn-fg);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .08em;
    text-decoration: none;
    overflow: hidden;
    transition: color .4s var(--mg-ease);
}

.mg-btn span {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.mg-btn span::after {
    content: "";
    width: 22px;
    height: 1px;
    background: currentColor;
    transition: width .4s var(--mg-ease);
}

.mg-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--mg-black);
    transform: translateX(-101%);
    transition: transform .5s var(--mg-ease);
    z-index: 1;
}

.mg-btn:hover {
    color: #fff;
}

.mg-btn:hover::before {
    transform: translateX(0);
}

.mg-btn:hover span::after {
    width: 34px;
}

.mg-btn--outline {
    --mg-btn-bg: transparent;
    --mg-btn-fg: var(--mg-ink);
    border: 1px solid rgba(20, 20, 22, .32);
}

.mg-btn--line {
    --mg-btn-bg: var(--mg-line-green);
    --mg-btn-fg: #fff;
}

/* ------------------------------------------------------------------
   3. ファーストビュー（v3：全面メインビジュアル型）
   ------------------------------------------------------------------
   のちに fv.mp4（動画）へ差し替えても構図が崩れないよう、
   メインビジュアルは画面全面。文字はすべてその上のレイヤー。

   レイヤー構成（z-index）
     0 stage  … 全面の動画／写真＋スクリム＋斜めの赤ライン＋粒子
     1 ghost  … 巨大アウトライン文字 "MEGUMI"
     2 frame  … 画面内の細いフレーム（四隅マーク）
     3 inner  … 見出し／リード／CTA
     4 meta / band / vertical
     6 ticker … ブランドレッドの流れる帯
------------------------------------------------------------------ */
.mg-fv {
    --mg-fv-band: 112px;        /* 下部バンド（数字＋SCROLL）の高さ */
    position: relative;
    width: 100%;
    height: clamp(620px, calc(100vh - 80px), 1000px);
    overflow: hidden;
    background: var(--mg-black);
    color: #fff;
    isolation: isolate;
}

@supports (height: 100svh) {
    .mg-fv { height: clamp(620px, calc(100svh - 80px), 1000px); }
}

.header-bar-fixed ~ .mg-fv { margin-top: 80px; }

/* --- 全面メインビジュアル --- */
.mg-fv__stage {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.mg-fv__media {
    position: absolute;
    inset: -4%;
    background-color: #140300;
    background-image:
        radial-gradient(115% 95% at 76% 22%, #4d0d00 0%, #1c0400 44%, #0b0b0c 100%);
    background-size: cover;
    background-position: center 55%;
    transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.03);
    will-change: transform;
    animation: mg-media-in 2.6s var(--mg-ease) both;
}

.mg-fv__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- YouTube 背景動画（PC・スマホ両対応） --- */
.mg-fv__yt-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.mg-fv__yt-player {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: none;
    max-width: none;
    width: 100vw;
    height: 56.25vw; /* 16:9 ratio */
    min-width: 100%;
    min-height: 100%;
}

@media (max-aspect-ratio: 16/9) {
    .mg-fv__yt-player {
        width: 177.78vh;
        height: 100%;
    }
}
@media (min-aspect-ratio: 16/9) {
    .mg-fv__yt-player {
        width: 100%;
        height: 56.25vw;
    }
}

/* 素材が無いときだけ：斜めに走る赤い光の帯 */
.mg-fv__beam {
    position: absolute;
    inset: -30%;
    background: linear-gradient(115deg, transparent 40%, rgba(207, 33, 0, .34) 50%, transparent 60%);
    animation: mg-beam 9s ease-in-out infinite alternate;
}

/* 文字を読ませるための減光。映像は右上に抜けを残す */
.mg-fv__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(96deg, rgba(11, 11, 12, .9) 0%, rgba(11, 11, 12, .74) 30%, rgba(11, 11, 12, .34) 62%, rgba(11, 11, 12, .16) 100%),
        linear-gradient(to top, rgba(11, 11, 12, .94) 0%, rgba(11, 11, 12, .25) 34%, rgba(11, 11, 12, 0) 62%),
        linear-gradient(to bottom, rgba(11, 11, 12, .6) 0%, rgba(11, 11, 12, 0) 26%);
}

/* 画面を斜めに横切る細い赤ライン（“尖り”のニュアンス） */
.mg-fv__slash {
    position: absolute;
    inset: -20% -10%;
    background-image:
        linear-gradient(107deg, transparent calc(58% - 1px), rgba(207, 33, 0, .85) 58%, transparent calc(58% + 1px)),
        linear-gradient(107deg, transparent calc(61.4% - 1px), rgba(255, 255, 255, .16) 61.4%, transparent calc(61.4% + 1px));
    opacity: 0;
    animation: mg-fade-in 1.4s var(--mg-ease) 1.1s forwards;
    pointer-events: none;
}

/* 粒子ノイズ */
.mg-fv__grain {
    position: absolute;
    inset: 0;
    opacity: .07;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 220px 220px;
}

/* 読み込み時、画面を一度だけ斜めに走る赤いワイプ */
.mg-fv__wipe {
    position: absolute;
    inset: -30% -60%;
    background: linear-gradient(107deg, transparent 46%, rgba(163, 23, 0, .92) 50%, rgba(207, 33, 0, .35) 52%, transparent 56%);
    transform: translateX(-70%);
    animation: mg-wipe 1.6s var(--mg-ease) .1s both;
    pointer-events: none;
}

/* --- 画面内の細いフレーム --- */
.mg-fv__frame {
    position: absolute;
    inset: 26px 3.2%;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, .13);
    pointer-events: none;
    opacity: 0;
    animation: mg-fade-in 1.2s var(--mg-ease) 1.25s forwards;
}

.mg-fv__frame i {
    position: absolute;
    width: 9px;
    height: 9px;
    border: 1px solid var(--mg-red-bright);
}

.mg-fv__frame i:nth-child(1) { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.mg-fv__frame i:nth-child(2) { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.mg-fv__frame i:nth-child(3) { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.mg-fv__frame i:nth-child(4) { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* --- 背景：巨大アウトライン文字 --- */
.mg-fv__ghost {
    position: absolute;
    left: -.03em;
    bottom: -.12em;
    z-index: 1;
    margin: 0;
    font-family: var(--font-eng);
    font-weight: 500;
    font-size: clamp(150px, 22vw, 380px);
    line-height: 1;
    letter-spacing: .02em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, .11);
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
    animation: mg-ghost-in 2.4s var(--mg-ease) .3s both;
}

.mg-fv__ghost span { display: block; }

/* --- 右上：ロケーション情報 --- */
.mg-fv__meta {
    position: absolute;
    top: 52px;
    right: calc(3.2% + 26px);
    z-index: 4;
    display: flex;
    gap: 30px;
    font-family: var(--font-eng);
    font-size: 12.5px;
    letter-spacing: .18em;
    color: rgba(255, 255, 255, .66);
    animation: mg-fade-in 1.2s var(--mg-ease) 1.5s both;
}

.mg-fv__meta span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mg-fv__meta span + span::before {
    content: "";
    width: 4px;
    height: 4px;
    background: var(--mg-red-bright);
    transform: rotate(45deg);
}

/* --- メインコンテンツ --- */
.mg-fv__inner {
    position: relative;
    z-index: 3;
    width: var(--mg-shell);
    margin-inline: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0 var(--mg-fv-band);
}

.mg-fv__eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 28px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3em;
    color: #fff;
    animation: mg-fade-up .9s var(--mg-ease) .55s both;
}

.mg-fv__eyebrow i {
    width: 10px;
    height: 10px;
    background: var(--mg-red-bright);
    animation: mg-pulse 2.6s ease-in-out infinite;
}

.mg-fv__eyebrow-sub {
    color: rgba(255, 255, 255, .58);
    font-weight: 500;
}

.mg-fv__eyebrow-sub::before {
    content: "/";
    margin-right: 14px;
    color: rgba(255, 255, 255, .3);
}

/* 見出し：1文字ずつ立ち上がる */
.mg-fv__title {
    margin: 0;
    font-size: clamp(40px, 7vw, 106px);
    font-weight: 900;
    line-height: 1.14;
    letter-spacing: .01em;
    color: #fff;
    text-shadow: 0 2px 40px rgba(0, 0, 0, .45);
    transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
    will-change: transform;
}

.mg-fv__line {
    display: block;
    overflow: hidden;
    padding-bottom: .04em;
    margin-bottom: -.04em;
    white-space: nowrap;
}

.mg-fv__ch,
.mg-fv__num {
    display: inline-block;
    transform: translateY(112%) skewY(5deg);
    transform-origin: left bottom;
    animation: mg-ch-up 1s var(--mg-ease) calc(.7s + var(--i, 0) * .05s) both;
}

.mg-fv__num {
    font-family: var(--font-eng);
    font-style: italic;
    font-weight: 500;
    font-size: 1.28em;
    line-height: .8;
    color: var(--mg-red-bright);
    margin-right: .06em;
    vertical-align: baseline;
    position: relative;
    top: .04em;
}

.mg-fv__lead {
    margin: 34px 0 0;
    max-width: 40em;
    font-size: clamp(14px, 1.25vw, 17px);
    line-height: 2.1;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .88);
    text-shadow: 0 1px 20px rgba(0, 0, 0, .5);
    animation: mg-fade-up .9s var(--mg-ease) 1.4s both;
}

.mg-fv__lead strong {
    color: #fff;
    font-weight: 900;
    border-bottom: 2px solid var(--mg-red-bright);
    padding-bottom: 2px;
}

.mg-fv__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 16px;
    margin-top: 40px;
    animation: mg-fade-up .9s var(--mg-ease) 1.55s both;
}

.mg-fv__cta .mg-btn:hover::before { background: #fff; }
.mg-fv__cta .mg-btn:hover { color: var(--mg-black); }

.mg-fv__tel {
    display: inline-flex;
    flex-direction: column;
    margin-left: 12px;
    font-family: var(--font-eng);
    font-size: 27px;
    line-height: 1.1;
    letter-spacing: .04em;
    color: #fff;
    text-decoration: none;
    transition: color .4s var(--mg-ease);
}

.mg-fv__tel small {
    font-family: var(--font-main);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .25em;
    color: rgba(255, 255, 255, .6);
    margin-bottom: 4px;
}

.mg-fv__tel:hover { color: var(--mg-red-bright); }

/* --- 下部バンド：3つの数字＋SCROLL --- */
.mg-fv__band {
    position: absolute;
    left: calc((100% - var(--mg-shell)) / 2);
    right: calc((100% - var(--mg-shell)) / 2);
    bottom: 54px;
    z-index: 4;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .18);
    animation: mg-fade-up .9s var(--mg-ease) 1.75s both;
}

.mg-fv__band--scroll-only {
    justify-content: flex-end;
}

.mg-fv__stats {
    display: flex;
    margin: 0;
}

.mg-fv__stats > div {
    padding-right: 34px;
    margin-right: 34px;
    border-right: 1px solid rgba(255, 255, 255, .18);
}

.mg-fv__stats > div:last-child {
    padding-right: 0;
    margin-right: 0;
    border-right: 0;
}

.mg-fv__stats dt {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
    color: rgba(255, 255, 255, .58);
    margin: 0 0 10px;
}

.mg-fv__stats dd {
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.mg-fv__stats b {
    font-family: var(--font-eng), "Noto Serif JP", serif;
    font-weight: 500;
    font-size: 40px;
    line-height: 1;
    color: #fff;
}

.mg-fv__stats i {
    font-style: normal;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, .8);
}

.mg-fv__scroll {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 6px;
    flex: none;
}

.mg-fv__scroll span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .3em;
    color: rgba(255, 255, 255, .6);
    order: 2;
}

.mg-fv__scroll::before {
    content: "";
    position: relative;
    width: 64px;
    height: 1px;
    background: rgba(255, 255, 255, .25);
    order: 1;
}

.mg-fv__scroll::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 24px;
    height: 1px;
    background: var(--mg-red-bright);
    animation: mg-scroll-slide 2s var(--mg-ease) infinite;
}

/* --- 右：縦書き --- */
.mg-fv__vertical {
    position: absolute;
    right: calc(3.2% + 26px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    margin: 0;
    writing-mode: vertical-rl;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5em;
    color: rgba(255, 255, 255, .6);
    animation: mg-fade-in 1.2s var(--mg-ease) 1.6s both;
}

.mg-fv__vertical::after {
    content: "";
    display: block;
    width: 1px;
    height: 44px;
    margin: 18px auto 0;
    background: var(--mg-red-bright);
}

/* --- FV アニメーション定義 --- */
@keyframes mg-ghost-in {
    from { opacity: 0; transform: translateX(70px); }
    to   { opacity: 1; transform: none; }
}

@keyframes mg-media-in {
    from { transform: translate3d(0, 0, 0) scale(1.16); opacity: .55; }
}

@keyframes mg-wipe {
    from { transform: translateX(-70%); opacity: 1; }
    70%  { opacity: 1; }
    to   { transform: translateX(70%); opacity: 0; }
}

@keyframes mg-beam {
    from { transform: translateX(-26%); }
    to   { transform: translateX(26%); }
}

@keyframes mg-ch-up {
    to { transform: translateY(0) skewY(0); }
}

@keyframes mg-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(207, 33, 0, .6); }
    60%      { box-shadow: 0 0 0 10px rgba(207, 33, 0, 0); }
}

@keyframes mg-scroll-slide {
    0%   { transform: translateX(-100%); opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { transform: translateX(64px); opacity: 0; }
}

@keyframes mg-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes mg-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}


/* ------------------------------------------------------------------
   4. CONCEPT
------------------------------------------------------------------ */
.mg-concept {
    position: relative;
    padding: clamp(90px, 11vw, 170px) 0;
    background: var(--mg-black);
    color: #fff;
    overflow: hidden;
}

.mg-concept__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(115deg, #3a0a00 0%, #0b0b0c 58%, #240500 100%);
    background-size: cover;
    background-position: center;
    opacity: .34;
    filter: grayscale(.5) contrast(1.05);
}

.mg-concept::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(11, 11, 12, .96) 0%, rgba(11, 11, 12, .78) 55%, rgba(122, 16, 0, .35) 100%);
}

.mg-concept__inner {
    max-width: 1180px;
}

.mg-concept__title {
    margin: 0 0 40px;
    font-size: clamp(28px, 4.4vw, 62px);
    font-weight: 900;
    line-height: 1.4;
    letter-spacing: .02em;
    padding-left: 26px;
    border-left: 4px solid var(--mg-red-bright);
}

.mg-concept__body {
    max-width: 40em;
    transition-delay: .1s;
}

.mg-concept__body p {
    margin: 0 0 1.9em;
    font-size: 15px;
    line-height: 2.35;
    letter-spacing: .05em;
    color: rgba(255, 255, 255, .82);
}

.mg-concept__punch {
    font-size: clamp(17px, 1.9vw, 24px) !important;
    font-weight: 700;
    color: #fff !important;
    line-height: 1.9 !important;
    margin-bottom: 0 !important;
}

.mg-concept__punch em {
    font-style: normal;
    color: #fff;
    background: linear-gradient(transparent 62%, var(--mg-red) 62%);
    padding: 0 .1em;
}

/* ------------------------------------------------------------------
   5. REASON
------------------------------------------------------------------ */
.mg-reason {
    padding: clamp(80px, 10vw, 150px) 0;
    background: var(--mg-white);
}

.mg-reason__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 2.5vw, 36px);
}

.mg-reason__item {
    --mg-reason-pad: clamp(28px, 2.8vw, 44px);
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--mg-white);
    padding: var(--mg-reason-pad);
    border: 1px solid rgba(20, 20, 22, .1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .04);
    transition: background .45s var(--mg-ease), color .45s var(--mg-ease), box-shadow .45s var(--mg-ease), opacity .9s var(--mg-ease), transform .9s var(--mg-ease);
}

/* --- カード上部の写真 ---------------------------------------------
   /img/megumi/reason-01.jpg 〜 reason-04.jpg を置くと自動で切り替わります。
   未設置の間はブランドカラーのグラデーション（ダミー）が表示されます。
------------------------------------------------------------------ */
.mg-reason__photo {
    display: block;
    position: relative;
    margin: calc(var(--mg-reason-pad) * -1) calc(var(--mg-reason-pad) * -1) clamp(24px, 2.2vw, 32px);
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #1a0400;
    background-image: radial-gradient(125% 125% at 78% 16%, #550e00 0%, #1c0400 48%, #0b0b0c 100%);
    background-size: cover;
    background-position: center;
    transition: filter .6s var(--mg-ease);
}

/* ダミー時のテクスチャ（写真を入れた後は控えめな質感として残ります） */
.mg-reason__photo::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 30px);
}

/* 番号を読ませるための足元の減光 */
.mg-reason__photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 11, 12, .78) 0%, rgba(11, 11, 12, 0) 58%);
}

.mg-reason__item:hover .mg-reason__photo { filter: brightness(1.12) saturate(1.1); }

.mg-reason__item:hover {
    background: var(--mg-black);
    color: #fff;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .14);
}

.mg-reason__item:nth-child(2) { transition-delay: .08s; }
.mg-reason__item:nth-child(3) { transition-delay: .16s; }

.mg-reason__num {
    position: absolute;
    left: var(--mg-reason-pad);
    bottom: clamp(16px, 1.6vw, 22px);
    z-index: 2;
    display: block;
    font-family: var(--font-eng);
    font-size: clamp(40px, 4.4vw, 64px);
    font-weight: 500;
    line-height: 1;
    color: #fff;
    letter-spacing: .02em;
}

.mg-reason__num::after {
    content: "";
    display: block;
    width: 34px;
    height: 2px;
    margin-top: 12px;
    background: var(--mg-red-bright);
}

.mg-reason__title {
    margin: 0 0 18px;
    font-size: clamp(19px, 1.8vw, 26px);
    font-weight: 900;
    letter-spacing: .02em;
    line-height: 1.55;
}

.mg-reason__text {
    margin: 0;
    font-size: 14.5px;
    line-height: 2.15;
    letter-spacing: .04em;
    color: #55555c;
    transition: color .45s var(--mg-ease);
}

.mg-reason__text p {
    margin: 0 0 1em;
}

.mg-reason__text p:last-child {
    margin-bottom: 0;
}

.mg-reason__item:hover .mg-reason__text { color: rgba(255, 255, 255, .8); }

.mg-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0 0;
    padding: 0;
}

.mg-tags li {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
    padding: 6px 12px;
    border: 1px solid var(--mg-red);
    color: var(--mg-red);
    background: rgba(163, 23, 0, .04);
}

.mg-reason__item:hover .mg-tags li {
    border-color: rgba(255, 255, 255, .5);
    color: #fff;
    background: transparent;
}

.mg-reason__link {
    margin: 24px 0 0;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .08em;
}

.mg-reason__link a {
    color: var(--mg-red);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 3px;
}

.mg-reason__item:hover .mg-reason__link a { color: #fff; }

/* 理由カード下部のリンクボタン */
.mg-reason__btn {
    margin-top: auto;
    padding-top: clamp(28px, 3vw, 40px);
}

.mg-reason__btn .mg-btn {
    width: 100%;
    min-width: 0;
    height: 54px;
    font-size: 14px;
    letter-spacing: .08em;
}

.mg-reason__item:hover .mg-reason__btn .mg-btn--outline {
    border-color: rgba(255, 255, 255, .36);
    color: #fff;
}

.mg-reason__item:hover .mg-reason__btn .mg-btn--outline:hover {
    border-color: var(--mg-red-bright);
    color: #fff;
}

.mg-reason__item:hover .mg-reason__btn .mg-btn--outline:hover::before {
    background: var(--mg-red);
}

body.home .mg-reason__item:hover .mg-reason__btn .mg-btn--outline {
    color: #fff;
}

body.home .mg-reason__item:hover .mg-reason__btn .mg-btn--outline:hover {
    color: #fff;
}

/* ------------------------------------------------------------------
   6. SERVICE
------------------------------------------------------------------ */
.mg-service {
    padding: clamp(80px, 10vw, 150px) 0;
    background: var(--mg-ink);
    color: #fff;
}

.mg-service .mg-sec-lead { color: rgba(255, 255, 255, .68); }

.mg-service__main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.mg-service__card {
    position: relative;
    display: block;
    text-decoration: none;
    color: #fff;
    background: var(--mg-ink2);
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%);
}

.mg-service__card:nth-child(2) { transition-delay: .1s; }

.mg-service__photo {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(140deg, #3a0a00, #0b0b0c);
    background-size: cover;
    background-position: center;
    transition: transform .8s var(--mg-ease);
}

.mg-service__body {
    display: block;
    padding: clamp(26px, 2.8vw, 44px);
}

.mg-service__en {
    display: block;
    font-family: var(--font-eng);
    font-size: 13px;
    letter-spacing: .28em;
    color: var(--mg-red-bright);
    margin-bottom: 10px;
}

.mg-service__name {
    display: block;
    font-size: clamp(24px, 2.6vw, 36px);
    font-weight: 900;
    letter-spacing: .04em;
    margin-bottom: 18px;
}

.mg-service__text {
    display: block;
    font-size: 14.5px;
    line-height: 2.15;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .74);
}

.mg-service__sub {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .14);
}

.mg-service__sub li {
    background: var(--mg-ink);
    padding: 22px clamp(12px, 1.3vw, 20px);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.5;
    display: flex;
    align-items: baseline;
    gap: 10px;
    white-space: nowrap;
    transition: background .4s var(--mg-ease), opacity .9s var(--mg-ease), transform .9s var(--mg-ease);
}

.mg-service__sub li:nth-child(7) {
    letter-spacing: 0;
}

.mg-service__sub li:hover { background: var(--mg-red); }

.mg-service__sub li span {
    font-family: var(--font-eng);
    font-size: 13px;
    color: var(--mg-red-bright);
    letter-spacing: .1em;
    flex: none;
    transition: color .4s var(--mg-ease);
}

.mg-service__sub li:hover span { color: #fff; }

/* ------------------------------------------------------------------
   7. PRICE（見積もりの考え方）
------------------------------------------------------------------ */
.mg-price {
    position: relative;
    padding: clamp(96px, 12vw, 190px) 0;
    background: var(--mg-black);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

/* 背景。/img/megumi/price.jpg を置くと写真に切り替わります（未設置時はグラデーション） */
.mg-price__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: #140300;
    background-image: radial-gradient(125% 105% at 84% 10%, #550e00 0%, #1a0400 46%, #0b0b0c 100%);
    background-size: cover;
    background-position: center;
    opacity: .36;
    filter: grayscale(.3) contrast(1.08);
}

/* 写真の上の減光 */
.mg-price__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(11, 11, 12, .95) 0%, rgba(11, 11, 12, .8) 44%, rgba(11, 11, 12, .45) 100%);
}

/* 背景の巨大アウトライン文字 */
.mg-price::before {
    content: "ESTIMATE";
    position: absolute;
    right: -.05em;
    bottom: -.15em;
    z-index: 1;
    font-family: var(--font-eng);
    font-weight: 500;
    font-size: clamp(96px, 16vw, 260px);
    line-height: 1;
    letter-spacing: .02em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, .1);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.mg-price__grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(300px, 420px) 1fr;
    gap: clamp(36px, 5.5vw, 100px);
    align-items: start;
}

.mg-price .mg-eyebrow { color: #fff; }
.mg-price .mg-eyebrow::before { background: var(--mg-red-bright); }

.mg-price__head .mg-sec-title {
    position: relative;
    padding-bottom: 30px;
    color: #fff;
}

/* 見出し下の赤いルール */
.mg-price__head .mg-sec-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 70px;
    height: 3px;
    background: var(--mg-red-bright);
}

.mg-price__btn {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: clamp(30px, 3.4vw, 46px) 0 0 !important;
}

/* 黒地用のアウトラインボタン */
.mg-price .mg-btn--outline {
    --mg-btn-fg: #fff;
    border-color: rgba(255, 255, 255, .38);
}

.mg-price .mg-btn--outline:hover::before { background: #fff; }
body.home .mg-price .mg-btn--outline:hover { color: var(--mg-black); }

/* 本文は 01 / 02 の枠付きブロックとして積む */
.mg-price__body {
    counter-reset: mg-price-n;
    transition-delay: .1s;
}

.mg-price__body p {
    counter-increment: mg-price-n;
    position: relative;
    margin: 0 0 16px;
    padding: clamp(28px, 3vw, 42px) clamp(24px, 2.6vw, 40px) clamp(28px, 3vw, 42px) clamp(66px, 6vw, 96px);
    background: rgba(255, 255, 255, .035);
    border: 1px solid rgba(255, 255, 255, .12);
    border-left: 2px solid var(--mg-red);
    font-size: 15px;
    line-height: 2.25;
    letter-spacing: .05em;
    color: rgba(255, 255, 255, .82);
    transition: background .45s var(--mg-ease), border-color .45s var(--mg-ease), color .45s var(--mg-ease);
}

.mg-price__body p:last-child { margin-bottom: 0; }

.mg-price__body p::before {
    content: counter(mg-price-n, decimal-leading-zero);
    position: absolute;
    left: clamp(22px, 2.2vw, 34px);
    top: clamp(26px, 2.8vw, 40px);
    font-family: var(--font-eng);
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1.3;
    letter-spacing: .04em;
    color: var(--mg-red-bright);
}

.mg-price__body p:hover {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 255, 255, .22);
    border-left-color: var(--mg-red-bright);
    color: #fff;
}

/* ------------------------------------------------------------------
   8. カラーシミュレーター
------------------------------------------------------------------ */
.mg-sim {
    padding: clamp(10px, 2vw, 24px) 0 clamp(90px, 10vw, 150px);
    background: var(--mg-white);
}

.mg-sim__box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: clamp(28px, 4vw, 70px);
    align-items: center;
    padding: clamp(34px, 4vw, 64px);
    background: linear-gradient(115deg, var(--mg-red-deep) 0%, var(--mg-red) 58%, var(--mg-red-bright) 100%);
    color: #fff;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%);
}

.mg-sim__box .mg-eyebrow { color: #fff; }
.mg-sim__box .mg-eyebrow::before { background: #fff; }

.mg-sim__title {
    margin: 0 0 16px;
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 900;
    letter-spacing: .03em;
}

.mg-sim__lead {
    margin: 0;
    font-size: 14.5px;
    line-height: 2.15;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .88);
    max-width: 40em;
}

.mg-sim__btn {
    margin: 0;
    text-align: center;
}

.mg-sim__btn .mg-btn {
    --mg-btn-bg: #fff;
    --mg-btn-fg: var(--mg-red);
}

.mg-sim__btn small {
    display: block;
    margin-top: 12px;
    font-size: 11.5px;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .78);
}

/* ------------------------------------------------------------------
   9. TOPICS
------------------------------------------------------------------ */
.mg-topics {
    padding: clamp(80px, 10vw, 140px) 0 clamp(56px, 7vw, 100px);
    background: var(--mg-white);
}

.mg-topics__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 2.4vw, 38px);
}

.mg-topics__card:nth-child(2) { transition-delay: .08s; }
.mg-topics__card:nth-child(3) { transition-delay: .16s; }

.mg-topics__card a {
    display: block;
    text-decoration: none;
    color: var(--mg-ink);
}

.mg-topics__thumb {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 368 / 376;
    overflow: hidden;
    background: var(--mg-snow);
    margin-bottom: 20px;
}

.mg-topics__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .8s var(--mg-ease);
}

.mg-topics__card a:hover .mg-topics__thumb img { transform: scale(1.06); }

/* アイキャッチ未設定の記事は、ヘッダーと同じロゴを余白付きで表示 */
.mg-topics__noimg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 3.2vw, 44px);
    background: var(--mg-snow);
    border: 1px solid rgba(20, 20, 22, .08);
}

.mg-topics__noimg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .8s var(--mg-ease);
}

.mg-topics__card a:hover .mg-topics__noimg img { transform: scale(1.04); }

/* ロゴも画像も無い場合の最終フォールバック */
.mg-topics__noimg:empty {
    background: linear-gradient(140deg, var(--mg-red-deep), var(--mg-black));
    border: 0;
}

.mg-topics__date {
    display: block;
    font-family: var(--font-eng);
    font-size: 13px;
    letter-spacing: .12em;
    color: var(--mg-red);
    margin-bottom: 8px;
}

.mg-topics__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.8;
    letter-spacing: .03em;
    transition: color .35s var(--mg-ease);
}

.mg-topics__card a:hover .mg-topics__title { color: var(--mg-red); }

.mg-topics__more {
    margin: clamp(40px, 5vw, 64px) 0 0;
    text-align: center;
}

/* ------------------------------------------------------------------
   10. CONTACT
------------------------------------------------------------------ */
.mg-contact {
    position: relative;
    padding: clamp(90px, 11vw, 165px) 0;
    background: var(--mg-black);
    color: #fff;
    overflow: hidden;
}

.mg-contact__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(115deg, #0b0b0c 0%, #2a0700 60%, #4a0c00 100%);
    background-size: cover;
    background-position: center;
    opacity: .38;
    filter: grayscale(.6);
}

.mg-contact::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(115deg, rgba(11, 11, 12, .95) 0%, rgba(11, 11, 12, .8) 50%, rgba(122, 16, 0, .5) 100%);
}

.mg-contact__title {
    margin: 0 0 22px;
    font-size: clamp(24px, 3.6vw, 48px);
    font-weight: 900;
    line-height: 1.45;
    letter-spacing: .02em;
}

.mg-contact__lead {
    margin: 0 0 48px;
    max-width: 44em;
    font-size: 15px;
    line-height: 2.2;
    letter-spacing: .05em;
    color: rgba(255, 255, 255, .82);
}

.mg-contact__methods {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(28px, 5vw, 70px);
    padding: clamp(28px, 3vw, 44px) 0;
    border-top: 1px solid rgba(255, 255, 255, .2);
    border-bottom: 1px solid rgba(255, 255, 255, .2);
}

.mg-contact__label {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .22em;
    color: var(--mg-red-bright);
    margin-bottom: 6px;
}

.mg-contact__tel a {
    display: block;
    font-family: var(--font-eng);
    font-size: clamp(36px, 4.8vw, 62px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: .04em;
    color: #fff;
    text-decoration: none;
}

.mg-contact__note {
    display: block;
    margin-top: 10px;
    font-size: 12.5px;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .7);
}

.mg-contact__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.mg-contact__buttons .mg-btn:hover::before { background: #fff; }
.mg-contact__buttons .mg-btn:hover { color: var(--mg-black); }

.mg-contact__info {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 46px;
    margin: 34px 0 0;
}

.mg-contact__info > div {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.mg-contact__info dt {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .16em;
    color: rgba(255, 255, 255, .55);
}

.mg-contact__info dd {
    margin: 0;
    font-size: 14px;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .92);
}

.mg-contact__caution {
    margin: 26px 0 0;
    font-size: 12.5px;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .6);
}

/* ------------------------------------------------------------------
   11. フッター
------------------------------------------------------------------ */
.footer .mg-footer {
    background: var(--mg-black);
    color: rgba(255, 255, 255, .8);
    padding: clamp(56px, 6.5vw, 96px) 0 40px;
    font-family: var(--font-main);
}

.mg-footer__top {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto minmax(300px, 1.1fr);
    gap: clamp(30px, 4vw, 70px);
    padding-bottom: 46px;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.mg-footer__logo {
    margin: 0 0 22px;
}

.mg-footer__logo img {
    display: block;
    width: 128px;
    height: auto;
}

/* ロゴ画像が未設定のときのテキスト表示 */
.mg-footer__logo--text a {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: .06em;
    color: #fff;
    text-decoration: none;
}

.mg-footer__catch {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .04em;
    color: #fff;
}

.mg-footer__desc {
    margin: 0 0 24px;
    font-size: 13px;
    line-height: 2;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .65);
}

.mg-footer__line {
    min-width: 220px;
    height: 54px;
    font-size: 14px;
}

.mg-footer__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 40px;
}

.mg-footer__menu li {
    margin-bottom: 14px;
    break-inside: avoid;
}

.mg-footer__menu a {
    display: inline-block;
    font-size: 13.5px;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    position: relative;
    padding-left: 16px;
    transition: color .3s var(--mg-ease);
}

.mg-footer__menu a::before {
    content: "";
    position: absolute;
    left: 0;
    top: .62em;
    width: 8px;
    height: 1px;
    background: var(--mg-red-bright);
    transition: width .3s var(--mg-ease);
}

.mg-footer__menu a:hover {
    color: #fff;
}

.mg-footer__menu a:hover::before { width: 12px; }

.mg-footer__company {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .06em;
    color: #fff;
}

.mg-footer__company span {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: .1em;
    color: rgba(255, 255, 255, .55);
}

.mg-footer__dl {
    margin: 0;
    font-size: 13px;
    line-height: 1.95;
}

.mg-footer__dl > div {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dotted rgba(255, 255, 255, .16);
}

.mg-footer__dl dt {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .1em;
    color: rgba(255, 255, 255, .5);
    padding-top: .25em;
}

.mg-footer__dl dd {
    margin: 0;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .85);
}

.mg-footer__dl dd a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .3);
}

.mg-footer__small {
    display: block;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .55);
    letter-spacing: .02em;
}

.mg-footer__caution {
    margin: 16px 0 0;
    font-size: 12px;
    color: var(--mg-red-bright);
    letter-spacing: .04em;
}

.mg-footer__license {
    margin: 30px 0 0;
    font-size: 11.5px;
    line-height: 2.1;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .45);
}

.mg-footer__copy {
    margin: 26px 0 0;
    font-family: var(--font-eng);
    font-size: 12px;
    letter-spacing: .12em;
    color: rgba(255, 255, 255, .5);
}

/* ------------------------------------------------------------------
   12. レスポンシブ
------------------------------------------------------------------ */
@media only screen and (max-width: 1260px) {
    .header-bar-fixed ~ .mg-fv { margin-top: 55px; }

    .mg-fv { height: clamp(600px, calc(100vh - 55px), 940px); }

    @supports (height: 100svh) {
        .mg-fv { height: clamp(600px, calc(100svh - 55px), 940px); }
    }

    .mg-service__sub { grid-template-columns: repeat(3, 1fr); }

    .mg-footer__top { grid-template-columns: 1fr 1fr; }
    .mg-footer__info { grid-column: 1 / -1; }
}

@media only screen and (max-width: 991px) {
    :root { --mg-shell: 88%; }

    .mg-br-sp { display: inline; }

    /* FV：映像を全面のまま、装飾を整理 */
    .mg-fv__scrim {
        background:
            linear-gradient(96deg, rgba(11, 11, 12, .92) 0%, rgba(11, 11, 12, .78) 42%, rgba(11, 11, 12, .42) 100%),
            linear-gradient(to top, rgba(11, 11, 12, .95) 0%, rgba(11, 11, 12, .3) 40%, rgba(11, 11, 12, 0) 66%),
            linear-gradient(to bottom, rgba(11, 11, 12, .65) 0%, rgba(11, 11, 12, 0) 26%);
    }

    .mg-fv__meta { display: none; }

    .mg-fv__frame { inset: 20px 4%; }

    .mg-fv__ghost {
        left: auto;
        right: -.05em;
        bottom: auto;
        top: 16px;
        font-size: clamp(92px, 20vw, 180px);
        -webkit-text-stroke-color: rgba(255, 255, 255, .085);
    }

    .mg-fv__vertical { right: calc(4% + 22px); }

    .mg-reason__list { grid-template-columns: 1fr; }

    .mg-service__main { grid-template-columns: 1fr; }

    .mg-service__sub { grid-template-columns: repeat(2, 1fr); }

    .mg-price__grid { grid-template-columns: 1fr; }

    .mg-sim__box { grid-template-columns: 1fr; }

    .mg-sim__btn { text-align: left; }

    .mg-topics__list { grid-template-columns: 1fr 1fr; }

    .mg-topics__card:nth-child(3) { display: none; }
}

@media only screen and (max-width: 767px) {
    .mg-br-pc { display: none; }

    .header-bar-fixed ~ .mg-fv {
        margin-top: 55px;
    }

    /* FV：スマホのみ 6:4 の横長比率にし、背景の横幅（左右の景色や施工風景）を広く見せる */
    .mg-fv {
        --mg-fv-band: 0px;
        width: 100%;
        height: auto;
        min-height: clamp(240px, 66.67vw, 360px);
        aspect-ratio: 6 / 4;
    }

    @supports (height: 100svh) {
        .mg-fv {
            min-height: clamp(240px, 66.67vw, 360px);
        }
    }

    .mg-fv__frame { display: none; }

    .mg-fv__slash { opacity: 0; animation: none; }

    .mg-fv__ghost { display: none; }

    .mg-fv__scrim {
        background:
            linear-gradient(90deg, rgba(11, 11, 12, .82) 0%, rgba(11, 11, 12, .55) 50%, rgba(11, 11, 12, .15) 100%),
            linear-gradient(to bottom, rgba(11, 11, 12, .35) 0%, rgba(11, 11, 12, 0) 25%);
    }

    .mg-fv__inner {
        padding: 16px 0;
        justify-content: center;
    }

    .mg-fv__eyebrow {
        gap: 8px;
        margin-bottom: 8px;
        font-size: 10px;
        letter-spacing: .2em;
    }

    .mg-fv__eyebrow-sub::before { margin-right: 8px; }

    .mg-fv__title {
        font-size: clamp(24px, 7vw, 34px);
        line-height: 1.25;
    }

    .mg-fv__lead {
        margin-top: 8px;
        font-size: clamp(10.5px, 2.7vw, 12px);
        line-height: 1.6;
        max-width: 90%;
    }

    /* スマホでは要素を少なくするため、無料現地調査・公式LINEボタンを非表示 */
    .mg-fv__cta {
        display: none;
    }

    .mg-fv__band {
        display: none;
    }

    .mg-fv__scroll { display: none; }

    .mg-fv__vertical { display: none; }

    .mg-concept__title { padding-left: 16px; border-left-width: 3px; }

    .mg-service__sub {
        grid-template-columns: repeat(2, 1fr);
    }
    .mg-service__sub li {
        padding: 16px clamp(8px, 2.5vw, 12px);
        font-size: clamp(11.5px, 2.8vw, 12.5px);
        line-height: 1.45;
        letter-spacing: .02em;
        gap: 7px;
        white-space: normal;
        align-items: flex-start;
    }
    .mg-service__sub li span {
        font-size: 12px;
        line-height: 1.45;
    }

    .mg-price__body p { padding-left: 24px; padding-top: 62px; }

    .mg-price__body p::before { font-size: 22px; top: 26px; left: 24px; }

    .mg-topics__list { grid-template-columns: 1fr; }

    .mg-topics__card:nth-child(3) { display: block; }

    .mg-contact__methods { flex-direction: column; align-items: flex-start; gap: 30px; }

    .mg-contact__buttons { width: 100%; }

    .mg-contact__info { flex-direction: column; gap: 12px; }

    .mg-footer__top { grid-template-columns: 1fr; }

    .mg-footer__logo { margin-bottom: 18px; }

    .mg-footer__logo img { width: 96px; }

    .mg-footer__menu { columns: 2; column-gap: 20px; }

    .mg-footer__dl > div { grid-template-columns: 66px 1fr; }
}

/* ------------------------------------------------------------------
   13. アクセシビリティ（アニメーション低減設定）
------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .mg-fv__media,
    .mg-fv__beam,
    .mg-fv__slash,
    .mg-fv__wipe,
    .mg-fv__frame,
    .mg-fv__ghost,
    .mg-fv__meta,
    .mg-fv__eyebrow,
    .mg-fv__eyebrow i,
    .mg-fv__ch,
    .mg-fv__num,
    .mg-fv__lead,
    .mg-fv__cta,
    .mg-fv__band,
    .mg-fv__vertical,
    .mg-fv__scroll::after {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .mg-fv__media { transform: scale(1.03); }

    .mg-fv__wipe { display: none; }

    .mg-reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------------------------
   14. 旧テーマ（T-BASE）由来のフッター指定を打ち消す
------------------------------------------------------------------ */
footer.footer,
.home footer.footer {
    background: var(--mg-black);
    margin-top: 0;
}

.home footer.footer .mg-footer__dl dd a,
footer.footer .mg-footer__dl dd a {
    color: #fff;
}

.home footer.footer .mg-footer__menu a,
footer.footer .mg-footer__menu a {
    color: rgba(255, 255, 255, .8);
}

.home footer.footer .mg-footer__menu a:hover,
footer.footer .mg-footer__menu a:hover {
    color: #fff;
}

.home footer.footer .mg-btn--line,
footer.footer .mg-btn--line {
    color: #fff;
}

/* ------------------------------------------------------------------
   15. 旧テーマ（T-BASE）の `body.home a` による文字色上書きを打ち消す
   ------------------------------------------------------------------
   style.css の `body.home a { color: var(--tb-ink); }` は詳細度が高く
   （0,2,1）、`.mg-btn`（0,1,0）などの色指定を上書きしてしまう。
   その結果トップページのボタン・電話番号・カードのリンク文字が
   すべて #34474e になってしまうため、本来の色に戻す。
------------------------------------------------------------------ */
body.home .mg-btn { color: var(--mg-btn-fg); }
body.home .mg-btn:hover { color: #fff; }
body.home .mg-fv__cta .mg-btn:hover { color: var(--mg-black); }

body.home .mg-fv__tel { color: #fff; }
body.home .mg-fv__tel:hover { color: var(--mg-red-bright); }

body.home .mg-reason__link a { color: var(--mg-red); }
body.home .mg-service__card { color: #fff; }
body.home .mg-topics__card a { color: var(--mg-ink); }
body.home .mg-contact__tel a { color: #fff; }

/* ------------------------------------------------------------------
   16. 記事詳細ページ（サイドバーなし時の1カラム中央揃えレイアウト）
   ------------------------------------------------------------------
   サイドバーウィジェット未設定時に、記事が左側70%に偏って見える問題を解消。
   記事ヘッダーおよびコンテンツエリアを中央配置（max-width: 860px）にし、
   視認性と左右バランスを整える。
------------------------------------------------------------------ */
.single-post .flex_layout.no-sidebar,
.single .flex_layout.no-sidebar {
    display: block;
}

.single-post .post-header,
.single .post-header {
    max-width: 860px;
    margin: 0 auto 2.5em;
}

.single-post .primary.primary-full,
.single-post .primary.no-sidebar-primary,
.single .primary.primary-full,
.single .primary.no-sidebar-primary {
    float: none;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
}

.single-post .secondary:empty,
.single .secondary:empty {
    display: none;
}

/* ------------------------------------------------------------------
   17. ブログ一覧ページ（/blog/）アイキャッチ・日付スタイル調整
   ------------------------------------------------------------------
   ・アイキャッチ未設定時のデフォルト画像をトップのお知らせと同じ
     「余白付きロゴ＋スノー背景」に統一。
   ・日付カラーをトップのお知らせと同じ --mg-red (#a31700) に統一。
------------------------------------------------------------------ */
.article03-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--mg-snow);
    border-radius: var(--tb-radius) var(--tb-radius) 0 0;
}

.article03-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .8s var(--mg-ease);
}

.article03>a:hover .article03-thumbnail img {
    transform: scale(1.06);
}

.article03-noimg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 2.5vw, 36px);
    background: var(--mg-snow);
    border: 1px solid rgba(20, 20, 22, .08);
    box-sizing: border-box;
}

.article03-noimg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .8s var(--mg-ease);
}

.article03>a:hover .article03-noimg img {
    transform: scale(1.04);
}

.article03-date {
    color: var(--mg-red);
    font-family: var(--font-eng);
    letter-spacing: .12em;
}

.article03>a:hover .article03-title {
    color: var(--mg-red);
}

/* 記事詳細の関連記事（article01）のアイキャッチ未設定スタイルも統一 */
.article01-thumbnail {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--mg-snow);
}

.article01-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article01-noimg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--mg-snow);
    border: 1px solid rgba(20, 20, 22, .08);
    box-sizing: border-box;
}

.article01-noimg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ------------------------------------------------------------------
   18. サブページ ヘッダー下画像（サイネージ）の文字フォント調整
   ------------------------------------------------------------------
   ヘッダー（ナビゲーション）と同じ明朝・セリフ系フォントに統一。
   欧文は EB Garamond、和文は Noto Serif JP / 游明朝 で美しく表示。
------------------------------------------------------------------ */
.signage-content,
.signage-content .signage-title,
.signage-content .signage-title.headline-font-type,
.signage-content p.signage-title-sub {
    font-family: "EB Garamond", 'Noto Serif JP', "游明朝", YuMincho, "ヒラギノ明朝 ProN W3", "Hiragino Mincho ProN", serif !important;
}

.signage-content .signage-title {
    letter-spacing: 0.08em;
    font-weight: 500;
}

.signage-content p.signage-title-sub {
    letter-spacing: 0.15em;
    font-family: 'Noto Serif JP', "游明朝", YuMincho, "ヒラギノ明朝 ProN W3", "Hiragino Mincho ProN", serif !important;
}

/* ------------------------------------------------------------------
   19. スマホヘッダー・ナビゲーションのトンマナ統一
   ------------------------------------------------------------------
   旧テーマ（T-BASE）のグリーン（#54c08a）が残っていたハンバーガーボタン
   およびドロワーメニューのアクセントカラーを、め組Inc.のブランドレッド
   （#a31700）に統一。
------------------------------------------------------------------ */
@media only screen and (max-width: 1200px) {
    /* ヘッダーバー：白背景と繊細な境界線 */
    .header-bar {
        background-color: #ffffff !important;
        border-bottom: 1px solid rgba(20, 20, 22, .08);
    }

    /* ハンバーガーメニューボタン（旧グリーンの完全上書き） */
    .global-nav-button:before {
        color: var(--mg-red) !important;
        transition: color .3s var(--mg-ease);
    }

    .global-nav-button.active:before {
        color: var(--mg-red) !important;
    }

    /* ドロワーメニュー（開いたときのスタイル） */
    .header-bar-fixed .global-nav {
        border-top: 1px solid rgba(20, 20, 22, .08);
        box-shadow: 0 14px 35px rgba(0, 0, 0, .12);
        background: #ffffff;
    }

    .global-nav>ul>li>a {
        color: var(--mg-ink) !important;
        font-weight: 700;
        transition: color .3s var(--mg-ease), background .3s var(--mg-ease);
    }

    .global-nav>ul>li>a:hover {
        color: var(--mg-red) !important;
    }

    .global-nav>ul>li.global-menu-contact>a {
        background: var(--mg-red) !important;
        color: #ffffff !important;
    }

    .global-nav>ul>li.global-menu-contact>a:hover {
        background: var(--mg-red-deep) !important;
    }

    .global-nav .menu-item-has-children>a span::before {
        color: var(--mg-gray);
    }

    .global-nav .menu-item-has-children.active>a span::before {
        color: var(--mg-red);
    }
}



/* ------------------------------------------------------------------
   20. 下層ページ共通（mg-page）
   ------------------------------------------------------------------
   料金／代表挨拶／業務内容／ご依頼の流れ／よくある質問／会社概要／お問い合わせ。
   親テーマの .post-content 配下の h2・h3・table・ul の指定を mg-page 内で上書きする。
------------------------------------------------------------------ */
body.page { overflow-x: hidden; }

/* 親テーマの overflow:hidden を外し、CTA帯を画面幅いっぱいに広げる */
.page .post-content { overflow: visible; }

/* 親テーマ page.php には .inner が無く本文が左端に寄るため、同じ幅で中央に寄せる */
.page-template-default .main > .post-header,
.page-template-default .main > .flex_layout {
    width: 84%;
    margin-left: auto;
    margin-right: auto;
}

/* --- サイネージ（ページ上部の画像）をトップと同じ暗さ・赤ラインに --- */
.page .signage { overflow: hidden; }

.page .signage::after {
    background:
        linear-gradient(100deg, rgba(11, 11, 12, .88) 0%, rgba(11, 11, 12, .66) 55%, rgba(163, 23, 0, .45) 100%),
        linear-gradient(to top, rgba(11, 11, 12, .75) 0%, rgba(11, 11, 12, 0) 60%);
}

.page .signage::before {
    content: "";
    position: absolute;
    inset: -20% -10%;
    z-index: 1;
    background-image: linear-gradient(107deg, transparent calc(60% - 1px), rgba(207, 33, 0, .8) 60%, transparent calc(60% + 1px));
    pointer-events: none;
}

/* --- ページタイトル --- */
.page .post-header { margin: 0 auto clamp(40px, 5vw, 64px); }

.page .post-header .post-title {
    position: relative;
    margin: clamp(48px, 6vw, 88px) 0 0;
    padding-bottom: 24px;
    font-family: var(--font-main);
    font-size: clamp(26px, 3.4vw, 44px);
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: .02em;
    color: var(--mg-ink);
}

.page .post-header .post-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 3px;
    background: var(--mg-red);
}

/* --- 本文の土台 --- */
.mg-page {
    font-family: var(--font-main);
    color: var(--mg-ink);
    line-height: 2;
    letter-spacing: .04em;
}

.mg-page a { color: var(--mg-red); }

.post-content .mg-page p {
    margin: 0 0 1.7em;
    font-size: 15px;
    line-height: 2.1;
    color: #45454c;
}

.post-content .mg-page p:last-child { margin-bottom: 0; }

.post-content .mg-page h2,
.post-content .mg-page h3,
.post-content .mg-page h4 {
    margin: 0;
    padding: 0;
    text-align: left;
    color: var(--mg-ink);
}

.post-content .mg-page h4::before { display: none; }

.post-content .mg-page ul,
.post-content .mg-page ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.post-content .mg-page li { margin: 0; line-height: inherit; }

.post-content .mg-page table { margin: 0; }

/* リード文 */
.mg-page__lead {
    max-width: 44em;
    margin: 0 0 clamp(48px, 6vw, 80px);
}

.post-content .mg-page__lead p {
    font-size: clamp(15px, 1.3vw, 17px);
    line-height: 2.2;
    color: var(--mg-ink);
}

.post-content .mg-page__lead p strong {
    font-weight: 900;
    background: linear-gradient(transparent 64%, rgba(163, 23, 0, .18) 64%);
}

/* リード文（強調版）：見出し級のトーンで冒頭を印象づける。現状 SERVICE ページで使用 */
.mg-page__lead--feature {
    max-width: none;
    padding-bottom: clamp(40px, 5vw, 64px);
    margin-bottom: clamp(48px, 6vw, 80px);
    border-bottom: 1px solid rgba(20, 20, 22, .12);
}

.mg-page__lead--feature .mg-eyebrow { margin-bottom: 22px; }

.post-content .mg-page__lead--feature .mg-page__lead-main {
    max-width: 32em;
    margin: 0;
    font-size: clamp(21px, 2.4vw, 30px);
    font-weight: 900;
    line-height: 1.75;
    letter-spacing: .02em;
    color: var(--mg-ink);
}

.post-content .mg-page__lead--feature .mg-page__lead-main strong {
    font-weight: 900;
    color: var(--mg-red);
    background: none;
}

.post-content .mg-page__lead--feature .mg-page__lead-sub {
    max-width: 38em;
    margin: clamp(22px, 2.6vw, 30px) 0 0;
    font-size: 14.5px;
    line-height: 2.15;
    color: #55555c;
}

/* セクション */
.mg-page__sec {
    padding: clamp(48px, 6vw, 88px) 0;
    border-top: 1px solid rgba(20, 20, 22, .12);
}

.mg-page__sec:first-child {
    padding-top: 0;
    border-top: 0;
}

/* 見積もり比較セクション。写真は薄く見せ、文字と対比ボックスの可読性を優先する */
.mg-page__sec--comparison {
    position: relative;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    padding-inline: 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-sizing: border-box;
}

.mg-page__sec--comparison::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, .88) 0%, rgba(255, 255, 255, .78) 52%, rgba(255, 255, 255, .68) 100%);
}

.mg-page__sec--comparison > * {
    position: relative;
    z-index: 1;
    width: min(1063px, 84%);
    margin-inline: auto;
}

.mg-page__head { margin-bottom: clamp(28px, 3.4vw, 44px); }

.mg-page__head .mg-eyebrow { margin-bottom: 16px; }

.post-content .mg-page .mg-page__title {
    font-size: clamp(22px, 2.6vw, 34px);
    font-weight: 900;
    line-height: 1.45;
    letter-spacing: .02em;
}

.mg-page__text { max-width: 46em; }

/* 2カラム（見出し左・本文右） */
.mg-page__split {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: clamp(28px, 5vw, 90px);
    align-items: start;
}

.mg-page__split .mg-page__head { margin-bottom: 0; }

.post-content .mg-page .mg-page__split .mg-page__title { font-size: clamp(22px, 2.2vw, 30px); }

/* 注記 */
.post-content .mg-page__note {
    margin-top: 22px;
    padding-left: 1.3em;
    font-size: 13px;
    line-height: 1.9;
    color: #6b6b72;
    text-indent: -1.3em;
}

/* --- 番号付きステップ（工程・ご依頼の流れ） --- */
.mg-steps { border-top: 1px solid rgba(20, 20, 22, .12); counter-reset: mg-step; }

.post-content .mg-steps > li {
    counter-increment: mg-step;
    position: relative;
    padding: clamp(24px, 2.8vw, 34px) 0 clamp(24px, 2.8vw, 34px) clamp(68px, 7vw, 96px);
    border-bottom: 1px solid rgba(20, 20, 22, .12);
}

.mg-steps > li::before {
    content: counter(mg-step, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: clamp(22px, 2.6vw, 32px);
    font-family: var(--font-eng);
    font-size: clamp(26px, 2.6vw, 34px);
    line-height: 1.3;
    letter-spacing: .04em;
    color: var(--mg-red);
}

.post-content .mg-steps h3 {
    margin: 0 0 8px;
    font-size: clamp(17px, 1.6vw, 20px);
    font-weight: 900;
    line-height: 1.6;
}

.post-content .mg-steps p {
    margin: 0;
    font-size: 14.5px;
    line-height: 2;
    color: #55555c;
}

.post-content .mg-steps p + p { margin-top: .6em; }

.mg-steps__tag {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 10px;
    border: 1px solid var(--mg-red);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    vertical-align: middle;
    color: var(--mg-red);
}

/* --- 対比ボックス（削られる見積もり／め組の見積もり） --- */
.mg-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(20, 20, 22, .12);
    border: 1px solid rgba(20, 20, 22, .12);
}

.mg-compare > div {
    padding: clamp(28px, 3.2vw, 46px);
    background: var(--mg-white);
}

.mg-compare > div:last-child {
    background: var(--mg-black);
    color: #fff;
}

.mg-compare__label {
    display: block;
    margin-bottom: 14px;
    font-family: var(--font-eng);
    font-size: 12.5px;
    letter-spacing: .24em;
    color: var(--mg-red);
}

.mg-compare > div:last-child .mg-compare__label { color: var(--mg-red-bright); }

.post-content .mg-compare h3 {
    margin: 0 0 20px;
    font-size: clamp(18px, 1.8vw, 22px);
    font-weight: 900;
    line-height: 1.5;
    color: inherit;
}

.post-content .mg-compare li {
    position: relative;
    padding: 12px 0 12px 22px;
    border-top: 1px solid rgba(20, 20, 22, .1);
    font-size: 14.5px;
    line-height: 1.9;
    color: #45454c;
}

.post-content .mg-compare > div:last-child li {
    border-top-color: rgba(255, 255, 255, .16);
    color: rgba(255, 255, 255, .86);
}

.mg-compare li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 21px;
    width: 6px;
    height: 6px;
    background: var(--mg-red-bright);
    transform: rotate(45deg);
}

.mg-compare > div:first-child li::before { background: rgba(20, 20, 22, .3); }

/* コーキング補修の数年後の実例 */
.post-content .mg-repair-example {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 48px);
    align-items: center;
    margin: 36px 0 clamp(56px, 7vw, 100px);
    padding: clamp(20px, 3vw, 36px);
    background: #f5f5f4;
    color: var(--mg-ink);
}
.post-content .mg-repair-example img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}
.post-content .mg-repair-example figcaption { margin: 0; font-size: inherit; }
.post-content .mg-repair-example h3 {
    margin: 0 0 20px;
    font-size: clamp(20px, 2.1vw, 27px);
    line-height: 1.5;
    color: inherit;
}
.post-content .mg-repair-example figcaption > p:last-child { margin-bottom: 0; }
@media only screen and (max-width: 767px) {
    .post-content .mg-repair-example { grid-template-columns: 1fr; }
    .post-content .mg-repair-example img { max-width: 320px; margin-inline: auto; }
}

/* 実際の下地補修を3工程で紹介 */
.post-content .mg-repair-process__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2.4vw, 30px);
    padding: 0;
    margin: 28px 0 0;
    list-style: none;
}
.post-content .mg-repair-process__list > li {
    display: block;
    min-width: 0;
    padding: 0;
    margin: 0;
    background: #f5f5f4;
}
.post-content .mg-repair-process__list img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}
.post-content .mg-repair-process__list > li > div { padding: 22px 18px; }
.mg-repair-process__number {
    display: block;
    margin-bottom: 10px;
    font-family: var(--font-eng);
    font-size: 22px;
    font-weight: 700;
    color: var(--mg-red);
}
.post-content .mg-repair-process__list h3 {
    margin: 0 0 12px;
    font-size: clamp(16px, 1.55vw, 20px);
    line-height: 1.65;
    color: var(--mg-ink);
}
.post-content .mg-repair-process__list p { margin: 0; font-size: 14px; line-height: 1.9; }
@media only screen and (max-width: 767px) {
    .post-content .mg-repair-process__list { grid-template-columns: 1fr; }
}

/* --- 資格・タグ --- */
.mg-page .mg-tags { margin-top: 0; }

/* --- 代表挨拶 --- */
.mg-greet {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: clamp(30px, 5vw, 80px);
    align-items: start;
    margin-bottom: clamp(56px, 7vw, 100px);
}

/* 代表写真の代わりに、ヘッダーと共通のロゴを主役にしたブランドパネル */
.mg-greet__photo {
    position: relative;
    overflow: hidden;
    padding: clamp(26px, 3vw, 42px);
    background:
        radial-gradient(110% 90% at 72% 18%, rgba(163, 23, 0, .5) 0%, transparent 56%),
        linear-gradient(145deg, #310800 0%, #170403 46%, #0b0b0c 100%);
    box-sizing: border-box;
}

.mg-greet__photo::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, transparent 0 48%, rgba(255, 255, 255, .055) 48% 48.4%, transparent 48.4% 100%),
        repeating-linear-gradient(115deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 30px);
}

.mg-greet__photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 11, 12, .82) 0%, rgba(11, 11, 12, 0) 50%);
}

.mg-greet__brand {
    position: relative;
    z-index: 1;
    width: min(82%, 260px);
    aspect-ratio: 1;
    margin: 6% auto 0;
    padding: 9px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .2);
    box-shadow: 0 24px 54px rgba(0, 0, 0, .34);
    box-sizing: border-box;
}

.mg-greet__brand img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content .mg-greet__name {
    position: absolute;
    left: clamp(20px, 2.4vw, 30px);
    bottom: clamp(20px, 2.4vw, 30px);
    z-index: 1;
    margin: 0;
    color: #fff;
}

.mg-greet__name small {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-eng);
    font-size: 12px;
    letter-spacing: .24em;
    color: rgba(255, 255, 255, .7);
}

.mg-greet__name b {
    display: block;
    font-size: clamp(22px, 2.2vw, 28px);
    font-weight: 900;
    letter-spacing: .06em;
    line-height: 1.3;
}

.mg-greet__name i {
    display: block;
    margin-top: 6px;
    font-style: normal;
    font-size: 12px;
    letter-spacing: .14em;
    color: rgba(255, 255, 255, .78);
}

.post-content .mg-page .mg-greet__quote {
    margin: 0 0 clamp(24px, 3vw, 36px);
    font-size: clamp(26px, 3.4vw, 44px);
    font-weight: 900;
    line-height: 1.4;
    letter-spacing: .02em;
}

.post-content .mg-page .mg-greet__quote em {
    font-style: normal;
    color: var(--mg-red);
}

.mg-greet__sign {
    margin-top: clamp(28px, 3vw, 40px);
    padding-top: 22px;
    border-top: 1px solid rgba(20, 20, 22, .12);
}

.post-content .mg-greet__sign p {
    margin: 0;
    font-size: 13px;
    letter-spacing: .12em;
    color: #6b6b72;
}

.post-content .mg-greet__sign p b {
    display: block;
    margin-top: 4px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .1em;
    color: var(--mg-ink);
}

/* --- 定義リスト（プロフィール・会社概要） --- */
.mg-dl { border-top: 1px solid rgba(20, 20, 22, .12); }

.mg-dl > div {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(20, 20, 22, .12);
}

.post-content .mg-dl dt {
    margin: 0;
    padding-top: 3px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .18em;
    color: var(--mg-red);
}

.post-content .mg-dl dd {
    margin: 0;
    font-size: 15px;
    line-height: 2;
    color: var(--mg-ink);
}

.post-content .mg-dl dd small {
    display: block;
    font-size: 12.5px;
    color: #6b6b72;
}

.post-content .mg-dl dd a { text-decoration: none; }

/* --- 地図 --- */
.mg-map {
    margin-top: clamp(32px, 4vw, 48px);
    aspect-ratio: 16 / 7;
    background: var(--mg-snow);
    border: 1px solid rgba(20, 20, 22, .1);
}

.mg-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(1) contrast(1.05);
}

/* --- 業務内容：カード上部に写真、下部にタイトル・説明 --- */
.mg-works {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(20px, 2.4vw, 32px);
}

.mg-works > article {
    position: relative;
    background: var(--mg-white);
    border: 1px solid rgba(20, 20, 22, .12);
    overflow: hidden;
    transition: border-color .4s var(--mg-ease);
}

.mg-works > article:hover { border-color: rgba(20, 20, 22, .28); }

/* 写真エリア。/img/megumi/service-01.jpg 〜 service-06.jpg を置くと自動で切り替わる（未設置時はブランドカラーのグラデーション） */
.mg-works__photo {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #1a0400;
    background-image: radial-gradient(125% 125% at 78% 16%, #550e00 0%, #1c0400 48%, #0b0b0c 100%);
    background-size: cover;
    background-position: center;
}

.mg-works__photo::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 30px);
}

.mg-works > article:hover .mg-works__photo { filter: brightness(1.06) saturate(1.08); }

.mg-works__body {
    padding: clamp(24px, 2.6vw, 36px);
}

.post-content .mg-works h3 {
    margin: 0 0 12px;
    font-size: clamp(19px, 1.9vw, 24px);
    font-weight: 900;
    line-height: 1.5;
    color: var(--mg-ink);
}

.post-content .mg-works p {
    margin: 0;
    font-size: 14.5px;
    line-height: 2;
    color: #55555c;
}

.mg-works__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: clamp(28px, 3.4vw, 44px);
    background: rgba(20, 20, 22, .12);
    border: 1px solid rgba(20, 20, 22, .12);
}

.post-content .mg-works__list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: var(--mg-white);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
}

.mg-works__list li span {
    font-family: var(--font-eng);
    font-size: 12px;
    letter-spacing: .1em;
    color: var(--mg-red);
}

/* --- よくある質問（details/summary） --- */
.mg-faq { border-top: 1px solid rgba(20, 20, 22, .12); }

.mg-faq details { border-bottom: 1px solid rgba(20, 20, 22, .12); }

.mg-faq summary {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: clamp(20px, 2.4vw, 28px) 0;
    list-style: none;
    cursor: pointer;
    font-size: clamp(15px, 1.4vw, 17px);
    font-weight: 700;
    line-height: 1.8;
    letter-spacing: .03em;
    color: var(--mg-ink);
    transition: color .3s var(--mg-ease);
}

.mg-faq summary::-webkit-details-marker { display: none; }

.mg-faq summary::before {
    content: "Q";
    flex: none;
    font-family: var(--font-eng);
    font-size: 24px;
    line-height: 1.2;
    color: var(--mg-red);
}

.mg-faq summary::after {
    content: "";
    flex: none;
    width: 12px;
    height: 12px;
    margin: 9px 4px 0 auto;
    border-right: 2px solid var(--mg-ink);
    border-bottom: 2px solid var(--mg-ink);
    transform: rotate(45deg);
    transition: transform .35s var(--mg-ease);
}

.mg-faq details[open] summary::after { transform: rotate(-135deg); margin-top: 14px; }

.mg-faq summary:hover { color: var(--mg-red); }

.mg-faq__a {
    display: flex;
    gap: 18px;
    padding: 0 0 clamp(22px, 2.6vw, 30px);
}

.mg-faq__a::before {
    content: "A";
    flex: none;
    font-family: var(--font-eng);
    font-size: 24px;
    line-height: 1.2;
    color: var(--mg-gray);
}

.post-content .mg-faq__a p {
    margin: 0;
    font-size: 14.5px;
    line-height: 2.1;
    color: #45454c;
}

.post-content .mg-faq__a p + p { margin-top: .8em; }

/* --- お問い合わせ --- */
.mg-ways {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(20, 20, 22, .12);
    border: 1px solid rgba(20, 20, 22, .12);
}

.mg-ways > div {
    display: flex;
    flex-direction: column;
    padding: clamp(28px, 3vw, 40px) clamp(22px, 2.4vw, 34px);
    background: var(--mg-white);
}

.mg-ways__en {
    display: block;
    margin-bottom: 10px;
    font-family: var(--font-eng);
    font-size: 12px;
    letter-spacing: .24em;
    color: var(--mg-red);
}

.post-content .mg-ways h3 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.5;
}

.post-content .mg-ways p {
    margin: 0 0 18px;
    font-size: 13.5px;
    line-height: 1.9;
    color: #55555c;
}

.mg-ways__action { margin-top: auto; }

.mg-ways__tel {
    display: block;
    font-family: var(--font-eng);
    font-size: clamp(26px, 2.4vw, 32px);
    line-height: 1.2;
    letter-spacing: .04em;
    color: var(--mg-ink);
    text-decoration: none;
}

.mg-ways__tel:hover { color: var(--mg-red); }

.post-content .mg-ways__tel + p {
    margin: 8px 0 0;
    font-size: 12px;
}

.mg-ways .mg-btn { width: 100%; min-width: 0; }

.post-content .mg-page #mg-form .mg-page__head .mg-eyebrow{
    justify-content: center;
}
.post-content .mg-page #mg-form .mg-page__title{
    text-align: center;
}
.post-content .mg-page #mg-form .mg-page__text{
    max-width: 100%;
    text-align: center;
}
.post-content .mg-form .wpcf7 form > p:last-of-type{
    text-align: center;
}
.post-content .mg-form .wpcf7 form > p .wpcf7-spinner{
    display: none;
}
.mg-form { max-width: 720px; margin-top: 30px; margin-inline: auto;}

.mg-form .wpcf7 input[type="text"],
.mg-form .wpcf7 input[type="email"],
.mg-form .wpcf7 input[type="tel"],
.mg-form .wpcf7 textarea,
.mg-form .wpcf7 select {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid rgba(20, 20, 22, .18);
    border-radius: 0;
    background: var(--mg-snow);
    font-family: var(--font-main);
    font-size: 15px;
    color: var(--mg-ink);
    box-sizing: border-box;
    transition: border-color .3s var(--mg-ease), background .3s var(--mg-ease);
}

.mg-form .wpcf7 input:focus,
.mg-form .wpcf7 textarea:focus,
.mg-form .wpcf7 select:focus {
    outline: none;
    border-color: var(--mg-red);
    background: #fff;
}

.mg-form .wpcf7 textarea { min-height: 200px; }

.mg-form .wpcf7 label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .06em;
}

.post-content .mg-form .wpcf7 form > p {
    margin: 0 0 26px;
}

.mg-form .wpcf7 label > br { display: none; }

.mg-form .wpcf7 label > .wpcf7-form-control-wrap {
    display: block;
    margin-top: 10px;
    font-weight: 400;
}

.mg-form .wpcf7 label > .required {
    display: inline-block;
    width: auto;
    margin: 0 0 0 8px;
    padding: 2px 6px;
    border-radius: 2px;
    background: var(--mg-red-bright);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .04em;
    vertical-align: 1px;
}

.mg-form .wpcf7 input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 250px;
    height: 62px;
    padding: 0 30px;
    border: 0;
    border-radius: 0;
    background: var(--mg-red);
    color: #fff;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .08em;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
    transition: background .4s var(--mg-ease);
}

.mg-form .wpcf7 input[type="submit"]:hover { background: var(--mg-black); }

.mg-form .wpcf7-not-valid-tip { display: block; margin-top: 6px; font-size: 12px; color: var(--mg-red-bright); }

.mg-form .wpcf7-response-output {
    margin: 24px 0 0;
    padding: 14px 18px;
    border: 1px solid var(--mg-red);
    font-size: 13.5px;
}

/* --- 全ページ共通：末尾のCTA帯 --- */
.mg-page__cta {
    position: relative;
    margin: clamp(64px, 8vw, 120px) calc(50% - 50vw) 0;
    padding: clamp(60px, 7vw, 100px) calc(50vw - 50%);
    background: var(--mg-black);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

.mg-page__cta::before {
    content: "CONTACT";
    position: absolute;
    right: -.05em;
    bottom: -.16em;
    z-index: 0;
    font-family: var(--font-eng);
    font-weight: 500;
    font-size: clamp(90px, 15vw, 240px);
    line-height: 1;
    letter-spacing: .02em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, .1);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.mg-page__cta::after {
    content: "";
    position: absolute;
    inset: -20% -10%;
    z-index: 0;
    background-image: linear-gradient(107deg, transparent calc(58% - 1px), rgba(207, 33, 0, .75) 58%, transparent calc(58% + 1px));
    pointer-events: none;
}

.mg-page__cta-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: clamp(28px, 4vw, 60px);
    align-items: center;
}

.mg-page__cta .mg-eyebrow { color: #fff; margin-bottom: 16px; }
.mg-page__cta .mg-eyebrow::before { background: var(--mg-red-bright); }

.post-content .mg-page__cta h2 {
    margin: 0 0 14px;
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 900;
    line-height: 1.4;
    color: #fff;
}

.post-content .mg-page__cta p {
    margin: 0;
    font-size: 14.5px;
    line-height: 2;
    color: rgba(255, 255, 255, .8);
}

.mg-page__cta-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 280px;
}

.mg-page__cta-tel {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-eng);
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: .04em;
    color: #fff;
    text-decoration: none;
}

.mg-page__cta-tel small {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-main);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .25em;
    color: rgba(255, 255, 255, .6);
}

.mg-page__cta-tel:hover { color: var(--mg-red-bright); }

/* 親テーマが電話リンクを白にしているので戻す */
.post-content .mg-page a[href^='tel:'] { color: var(--mg-ink); }
.post-content .mg-page a[href^='tel:']:hover { color: var(--mg-red-bright); }
.post-content .mg-page .mg-page__cta a[href^='tel:'] { color: #fff; }
.post-content .mg-page .mg-page__cta a[href^='tel:']:hover { color: var(--mg-red-bright); }

.mg-page .mg-btn { color: var(--mg-btn-fg); }
.mg-page .mg-btn:hover { color: #fff; }
.mg-page__cta .mg-btn:hover::before { background: #fff; }
.mg-page .mg-page__cta .mg-btn:hover { color: var(--mg-black); }

/* --- 下層ページ レスポンシブ --- */
@media only screen and (max-width: 991px) {
    .mg-page__split { grid-template-columns: 1fr; gap: 24px; }
    .mg-greet { grid-template-columns: minmax(220px, 300px) 1fr; }
    .mg-works__list { grid-template-columns: repeat(2, 1fr); }
    .mg-ways { grid-template-columns: 1fr; }
    .mg-page__cta-inner { grid-template-columns: 1fr; }
    .mg-page__cta-btns { min-width: 0; flex-direction: row; flex-wrap: wrap; align-items: center; }
    .mg-page__cta-tel { width: 100%; }
}

@media only screen and (max-width: 767px) {
    .mg-compare { grid-template-columns: 1fr; }
    .mg-compare > div { padding: 24px 18px; }
    .mg-greet { grid-template-columns: 1fr; }
    .post-content .mg-page .mg-greet__quote { font-size: 24px; }
    .mg-greet__photo { max-width: 320px; margin-inline: auto; }
    .mg-dl > div { grid-template-columns: 1fr; gap: 6px; padding: 16px 0; }
    .mg-works { grid-template-columns: 1fr; }
    .mg-works > article .mg-works__body { padding: 22px 18px; }
    .mg-works__list { grid-template-columns: 1fr; }
    .post-content .mg-steps > li { padding: 20px 0 20px 48px; }
    .mg-steps > li::before { font-size: 22px; top: 18px; }
    .mg-faq summary { gap: 12px; }
    .mg-faq summary::before { font-size: 20px; }
    .mg-faq__a { gap: 12px; }
    .mg-faq__a::before { font-size: 20px; }
    .mg-ways > div { padding: 24px 18px; }
    .mg-map { aspect-ratio: 4 / 3; }
    .mg-page__cta-tel { font-size: 26px; }
    .mg-page__cta-btns { flex-direction: column; align-items: stretch; }
    .mg-page__cta-btns .mg-btn { width: 100%; }
    .mg-form .wpcf7 input[type="submit"] { width: 100%; }
}

/* 2026-10-08 — 実際の施工写真とFooGallery施工事例ページ */
.mg-gallery-link { display:flex; align-items:center; justify-content:space-between; gap:32px; margin-top:44px; padding:30px 32px; border:1px solid #d9d6d2; background:#f7f6f3; }
.mg-gallery-link .mg-eyebrow { margin:0 0 10px; }
.mg-gallery-link h3, .post-content .mg-page .mg-gallery-link h3 { margin:0 0 10px; padding:0; border:0; font-size:clamp(20px,2vw,26px); line-height:1.5; color:var(--mg-ink); }
.mg-gallery-link h3::before, .mg-gallery-link h3::after { display:none; }
.mg-gallery-link p { margin:0; font-size:14px; line-height:1.8; }
.mg-gallery-link > a { flex-shrink:0; }
.mg-cases__intro { max-width:850px; margin-bottom:32px; }
.post-content .mg-page .mg-cases__lead { font-size:clamp(25px,3vw,38px); font-weight:700; line-height:1.6; margin-bottom:18px; }
.post-content .mg-page .mg-cases__hint { margin-top:16px; color:#666; font-size:13px; }
.mg-cases__nav { margin:32px 0 64px; }
.post-content .mg-page .mg-cases__nav ul { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:0; margin:0; list-style:none; }
.mg-cases__nav a { display:block; padding:14px 16px; border:1px solid #ddd8d4; text-decoration:none; font-size:14px; font-weight:700; line-height:1.7; background:#f7f6f3; }
.mg-cases__nav a:hover { background:#eee7e2; }
.mg-cases__section { scroll-margin-top:110px; padding:0 0 60px; margin:0 0 60px; border-bottom:1px solid #ddd8d4; }
.mg-cases__heading { margin-bottom:28px; }
.post-content .mg-page .mg-cases__heading h2 { padding:0; border:0; margin:0 0 16px; font-size:clamp(24px,2.8vw,34px); line-height:1.5; }
.post-content .mg-page .mg-cases__heading h2::before,.post-content .mg-page .mg-cases__heading h2::after { display:none; }
.mg-cases__heading > p:last-child { max-width:800px; font-size:15px; }
.mg-cases .foogallery { max-width:100%; margin:0 auto; }
.mg-cases .foogallery .fg-caption-title { font-family:var(--font-main); font-size:13px; line-height:1.6; white-space:normal; }
.mg-cases .foogallery .fg-item-inner { border-radius:0; }
.mg-cases__closing { margin:0 0 80px; padding:40px; text-align:center; background:#f7f6f3; }
.post-content .mg-page .mg-cases__closing h2 { margin:0 0 18px; border:0; padding:0; font-size:clamp(21px,2vw,28px); line-height:1.6; }
.mg-cases__closing .mg-btn { margin-top:24px; }
@media(max-width:767px){
 .mg-gallery-link { align-items:flex-start; flex-direction:column; gap:22px; padding:24px 20px; }
 .mg-gallery-link > a { width:100%; }
 .post-content .mg-page .mg-cases__nav ul { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .mg-cases__nav { margin-bottom:44px; }
 .mg-cases__nav a { padding:12px 10px; font-size:12px; }
 .mg-cases__section { padding-bottom:40px; margin-bottom:40px; scroll-margin-top:88px; }
 .mg-cases__closing { padding:28px 20px; }
 .mg-cases__closing .mg-btn { width:100%; margin-top:16px; }
}

/* 施工事例を追加したPCメニュー：ロゴの領域を確保し、1行に収める */
@media(min-width:1201px){
 .header-bar-inner .global-nav { width:calc(100% - 130px); }
 .header-bar-inner .global-nav > ul { display:flex; flex-wrap:nowrap; justify-content:space-between; align-items:center; }
 .header-bar-inner .global-nav > ul > li { float:none; flex:0 0 auto; }
 .header-bar-inner .global-nav > ul > li > a { padding:0 10px; font-size:clamp(14px,1.1vw,16px); white-space:nowrap; }
 .header-bar-inner .global-nav > ul > li.global-menu-contact > a { margin-left:12px; padding-left:26px; padding-right:26px; }
}
@media(max-width:767px){
 .mg-cases .foogallery .fg-caption-title { -webkit-line-clamp:2; }
}

.mg-cases .foogallery .fg-caption { pointer-events:none; }

.mg-service .mg-gallery-link p:not(.mg-eyebrow) { color:#555; }

/* 2026-10-08 業務内容：外壁・屋根塗装を主役に、下地補修を直下の補足に整理 */
.mg-service-primary .mg-page__text { margin-bottom:24px; }
.mg-works--primary > article { display:grid; grid-template-columns:34% minmax(0,1fr); }
.mg-works--primary .mg-works__photo { aspect-ratio:auto; min-height:230px; background-size:contain; background-repeat:no-repeat; background-color:#eeedeb; }
.mg-works--primary .mg-works__photo::before,.mg-works--related .mg-works__photo::before { display:none; }
.mg-works--primary .mg-works__body { padding:26px 24px; }
.mg-service-quality { max-width:1100px; margin-inline:auto; }
.post-content .mg-service-quality .mg-repair-example { grid-template-columns:190px minmax(0,1fr); gap:28px; margin:28px 0 36px; padding:24px; border:1px solid #e0ddda; }
.post-content .mg-service-quality .mg-repair-example img { max-width:190px; margin:0; }
.post-content .mg-service-quality .mg-repair-example h3 { font-size:23px; margin-bottom:14px; }
.post-content .mg-service-quality .mg-repair-example__label { display:inline-block; margin:0 0 14px; padding:5px 10px; color:#fff; background:#654f45; font-size:13px; font-weight:700; line-height:1.7; }
.post-content .mg-service-quality .mg-repair-example figcaption > p:not(.mg-repair-example__label) { font-size:14px; line-height:1.9; }
.post-content .mg-page .mg-service-quality__subtitle { font-size:22px; line-height:1.6; padding:0; margin:0 0 14px; border:0; }
.mg-service-quality__subtitle::before,.mg-service-quality__subtitle::after { display:none; }
.post-content .mg-service-quality .mg-repair-process__list { margin-top:22px; gap:20px; }
.post-content .mg-service-quality .mg-repair-process__list > li { display:grid; grid-template-columns:130px minmax(0,1fr); align-items:start; padding:16px; gap:16px; }
.post-content .mg-service-quality .mg-repair-process__list img { width:130px; max-width:100%; }
.post-content .mg-service-quality .mg-repair-process__list > li > div { padding:0; }
.post-content .mg-service-quality .mg-repair-process__list h4 { font-size:16px; line-height:1.65; margin:0 0 10px; padding:0; border:0; }
.mg-service-quality .mg-repair-process__number { font-size:18px; margin-bottom:8px; }
.post-content .mg-service-quality .mg-repair-process__list p { font-size:12px; line-height:1.8; }
.mg-service-scenes { margin-top:36px; }
.mg-service-scenes__grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
.post-content .mg-service-scenes figure { margin:0; min-width:0; }
.post-content .mg-service-scenes img { display:block; width:100%; height:145px; object-fit:cover; margin:0; }
.post-content .mg-service-scenes figcaption { margin:10px 0 0; font-size:13px; color:#555; text-align:left; line-height:1.7; }
.post-content .mg-service-scenes__note { font-size:13px; color:#666; margin-top:18px; }
.mg-works--related > article { display:grid; grid-template-columns:140px minmax(0,1fr); }
.mg-works--related .mg-works__photo { aspect-ratio:auto; min-height:170px; background-size:contain; background-repeat:no-repeat; background-color:#eeedeb; }
.mg-works--related .mg-works__body { padding:22px; }
.post-content .mg-works--related h3 { font-size:20px; }
@media(min-width:768px) and (max-width:1100px){
 .post-content .mg-service-quality .mg-repair-process__list > li { grid-template-columns:1fr; }
 .post-content .mg-service-quality .mg-repair-process__list img { width:120px; margin-inline:auto; }
}
@media(max-width:767px){
 .mg-works--primary > article { grid-template-columns:1fr; }
 .mg-works--primary .mg-works__photo { height:180px; min-height:0; }
 .mg-works--primary .mg-works__body { padding:22px; }
 .post-content .mg-service-quality .mg-repair-example { grid-template-columns:1fr; gap:20px; padding:20px; }
 .post-content .mg-service-quality .mg-repair-example img { max-width:130px; margin-inline:auto; }
 .post-content .mg-service-quality .mg-repair-example h3 { font-size:20px; }
 .post-content .mg-service-quality .mg-repair-process__list > li { grid-template-columns:104px minmax(0,1fr); padding:16px; gap:16px; }
 .post-content .mg-service-quality .mg-repair-process__list img { width:104px; }
 .post-content .mg-service-quality .mg-repair-process__list p { font-size:13px; }
 .mg-service-scenes__grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 12px; }
 .post-content .mg-service-scenes img { height:116px; }
 .mg-works--related > article { grid-template-columns:100px minmax(0,1fr); }
 .mg-works--related .mg-works__body { padding:18px 16px; }
 .post-content .mg-works--related h3 { font-size:18px; }
 .post-content .mg-works--related p { font-size:13px; }
}

@media(min-width:1101px){
 .post-content .mg-service-quality .mg-repair-process__list > li { grid-template-columns:1fr; }
 .post-content .mg-service-quality .mg-repair-process__list img { width:130px; margin-inline:auto; }
}

/* ------------------------------------------------------------------
   21. 業務内容 v3（mg-sv）／施工事例 v2（mg-wk）
------------------------------------------------------------------ */

/* --- 共通：セクション見出し --- */
.mg-sv-head { margin-bottom: clamp(36px, 4.5vw, 64px); }
.mg-sv-head .mg-eyebrow { margin-bottom: 18px; }
.post-content .mg-page .mg-sv-head__title {
    font-size: clamp(28px, 3.6vw, 48px);
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: .02em;
}
.post-content .mg-page .mg-sv-head__lead {
    max-width: 40em;
    margin: 18px 0 0;
    font-size: 15px;
    line-height: 2.1;
    color: #55555c;
}

/* --- 主力業務：外壁塗装・屋根塗装 --- */
.mg-sv-main { padding: 0 0 clamp(56px, 7vw, 100px); }

.mg-sv-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
}
.mg-sv-feature + .mg-sv-feature { margin-top: clamp(64px, 8vw, 120px); }
.mg-sv-feature.is-reverse .mg-sv-feature__media { order: 2; }

.mg-sv-feature__main {
    position: relative;
    margin: 0;
}
.mg-sv-feature__main::before {
    content: "";
    position: absolute;
    inset: 18px -18px -18px 18px;
    border: 1px solid var(--mg-red);
    z-index: 0;
}
.mg-sv-feature.is-reverse .mg-sv-feature__main::before { inset: 18px 18px -18px -18px; }
.mg-sv-feature__main img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 34px), calc(100% - 34px) 100%, 0 100%);
}

.mg-sv-feature__strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 34px 0 0;
    padding: 0;
    list-style: none;
}
.post-content .mg-page .mg-sv-feature__strip li { margin: 0; }
.mg-sv-feature__strip img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.mg-sv-feature__strip span {
    display: block;
    margin-top: 6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #6b6b72;
}

.mg-sv-feature__num {
    display: block;
    font-family: var(--font-eng);
    font-size: clamp(64px, 7vw, 104px);
    line-height: .9;
    color: transparent;
    -webkit-text-stroke: 1px var(--mg-red);
    margin-bottom: 14px;
}
.post-content .mg-page .mg-sv-feature__body h3 {
    margin: 0 0 18px;
    font-size: clamp(26px, 2.8vw, 38px);
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: .03em;
}
.post-content .mg-page .mg-sv-feature__body > p {
    margin: 0;
    font-size: 15px;
    line-height: 2.1;
    color: #45454c;
}
.mg-sv-points {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(20, 20, 22, .14);
}
.post-content .mg-page .mg-sv-points li {
    position: relative;
    margin: 0;
    padding: 13px 0 13px 20px;
    border-bottom: 1px solid rgba(20, 20, 22, .14);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
}
.mg-sv-points li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 21px;
    width: 6px;
    height: 6px;
    background: var(--mg-red);
    transform: rotate(45deg);
}

/* --- 下地処理（黒帯）--- */
.mg-sv-prep {
    position: relative;
    margin: 0 calc(50% - 50vw);
    padding: clamp(80px, 10vw, 140px) calc(50vw - 50%);
    background: var(--mg-black);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}
.mg-sv-prep::before {
    content: "PREPARATION";
    position: absolute;
    right: -.04em;
    top: -.12em;
    z-index: -1;
    font-family: var(--font-eng);
    font-size: clamp(80px, 13vw, 210px);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, .09);
    white-space: nowrap;
    pointer-events: none;
}
.mg-sv-prep .mg-eyebrow { color: #fff; }
.mg-sv-prep .mg-eyebrow::before { background: var(--mg-red-bright); }
.post-content .mg-page .mg-sv-prep .mg-sv-head__title { color: #fff; }
.post-content .mg-page .mg-sv-prep .mg-sv-head__lead { color: rgba(255, 255, 255, .78); }

/* 他社の参考例 */
.mg-sv-ng {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 4vw, 64px);
    align-items: center;
    padding: clamp(24px, 3vw, 40px);
    border: 1px solid rgba(255, 255, 255, .16);
}
.mg-sv-ng__photo { position: relative; margin: 0; }
.mg-sv-ng__photo img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.mg-sv-ng__badge {
    position: absolute;
    left: 0;
    top: 0;
    padding: 8px 14px;
    background: var(--mg-red);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    color: #fff;
}
.post-content .mg-page .mg-sv-ng__photo figcaption {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, .6);
}
.mg-sv-ng__label {
    display: inline-block;
    margin-bottom: 16px;
    padding: 4px 12px;
    border: 1px solid var(--mg-red-bright);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .14em;
    color: var(--mg-red-bright);
}
.post-content .mg-page .mg-sv-ng h3 {
    margin: 0 0 16px;
    font-size: clamp(21px, 2.2vw, 28px);
    font-weight: 900;
    line-height: 1.5;
    color: #fff;
}
.post-content .mg-page .mg-sv-ng p {
    margin: 0 0 1em;
    font-size: 14.5px;
    line-height: 2.05;
    color: rgba(255, 255, 255, .82);
}
.post-content .mg-page .mg-sv-ng p:last-child { margin-bottom: 0; }

/* め組Inc.の工程（下地補修・シーリング）*/
.mg-sv-proc { margin-top: clamp(56px, 7vw, 96px); }
.post-content .mg-page .mg-sv-proc__title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 28px;
    font-size: clamp(19px, 1.9vw, 24px);
    font-weight: 900;
    color: #fff;
}
.mg-sv-proc__title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, .18);
}
.mg-sv-proc__list {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
    gap: clamp(14px, 1.8vw, 24px);
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: mg-proc;
}
.mg-sv-proc__list.is-4 { --cols: 4; }
.post-content .mg-page .mg-sv-proc__list li {
    counter-increment: mg-proc;
    position: relative;
    margin: 0;
}
.mg-sv-proc__list img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
.mg-sv-proc__list li::before {
    content: counter(mg-proc, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    padding: 6px 10px;
    background: var(--mg-black);
    font-family: var(--font-eng);
    font-size: 15px;
    letter-spacing: .06em;
    color: var(--mg-red-bright);
}
.post-content .mg-page .mg-sv-proc__list h4 {
    margin: 14px 0 6px;
    font-size: 16px;
    font-weight: 900;
    color: #fff;
}
.post-content .mg-page .mg-sv-proc__list p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.9;
    color: rgba(255, 255, 255, .72);
}

/* --- 関連工事 --- */
.mg-sv-related { padding: clamp(80px, 10vw, 140px) 0 clamp(48px, 6vw, 88px); }
.mg-sv-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 2.2vw, 30px);
    margin: 0;
    padding: 0;
    list-style: none;
}
.post-content .mg-page .mg-sv-cards > li { margin: 0; }
.mg-sv-card__photo {
    position: relative;
    overflow: hidden;
    margin: 0;
}
.mg-sv-card__photo img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .8s var(--mg-ease);
}
.mg-sv-cards > li:hover .mg-sv-card__photo img { transform: scale(1.05); }
.mg-sv-card__photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 11, 12, .82) 0%, rgba(11, 11, 12, 0) 55%);
}
.post-content .mg-page .mg-sv-card__photo figcaption {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 16px;
    z-index: 1;
    margin: 0;
    font-size: clamp(17px, 1.6vw, 20px);
    font-weight: 900;
    letter-spacing: .04em;
    color: #fff;
}
.mg-sv-card__photo figcaption small {
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-eng);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: .1em;
    color: var(--mg-red-bright);
}
.post-content .mg-page .mg-sv-cards > li > p {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.95;
    color: #55555c;
}

/* --- 施工事例への導線 --- */
.mg-sv-tocases {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px 40px;
    align-items: center;
    margin: clamp(48px, 6vw, 80px) 0 0;
    padding: clamp(26px, 3vw, 40px);
    border: 1px solid rgba(20, 20, 22, .14);
    border-left: 3px solid var(--mg-red);
}
.post-content .mg-page .mg-sv-tocases h3 {
    margin: 0 0 8px;
    font-size: clamp(18px, 1.8vw, 22px);
    font-weight: 900;
}
.post-content .mg-page .mg-sv-tocases p {
    margin: 0;
    font-size: 14px;
    line-height: 1.9;
    color: #55555c;
}

/* ===================== 施工事例 v2 ===================== */
.mg-wk-intro {
    padding-bottom: clamp(36px, 4.5vw, 56px);
    margin-bottom: clamp(36px, 4.5vw, 56px);
    border-bottom: 1px solid rgba(20, 20, 22, .12);
}
.mg-wk-intro .mg-eyebrow { margin-bottom: 20px; }
.post-content .mg-page .mg-wk-intro__lead {
    margin: 0;
    font-size: clamp(24px, 2.8vw, 36px);
    font-weight: 900;
    line-height: 1.5;
    color: var(--mg-ink);
}
.post-content .mg-page .mg-wk-intro__sub {
    max-width: 40em;
    margin: 18px 0 0;
    font-size: 14.5px;
    line-height: 2.05;
    color: #55555c;
}

.mg-wk-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 clamp(64px, 8vw, 110px);
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(20, 20, 22, .14);
    border-left: 1px solid rgba(20, 20, 22, .14);
}
.post-content .mg-page .mg-wk-nav li {
    margin: 0;
    border-right: 1px solid rgba(20, 20, 22, .14);
    border-bottom: 1px solid rgba(20, 20, 22, .14);
}
.post-content .mg-page .mg-wk-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--mg-ink);
    text-decoration: none;
    transition: background .35s var(--mg-ease), color .35s var(--mg-ease);
}
.mg-wk-nav a span {
    font-family: var(--font-eng);
    font-size: 18px;
    color: var(--mg-red);
}
.mg-wk-nav a::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-3px);
}
.post-content .mg-page .mg-wk-nav a:hover { background: var(--mg-black); color: #fff; }
.mg-wk-nav a:hover span { color: var(--mg-red-bright); }

.mg-wk-cat {
    padding-top: 20px;
    scroll-margin-top: 110px;
}
.mg-wk-cat + .mg-wk-cat { margin-top: clamp(80px, 10vw, 140px); }
.mg-wk-cat__head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 26px;
    align-items: end;
    margin-bottom: clamp(32px, 4vw, 52px);
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(20, 20, 22, .14);
}
.mg-wk-cat__num {
    grid-row: span 2;
    font-family: var(--font-eng);
    font-size: clamp(64px, 7vw, 100px);
    line-height: .85;
    color: transparent;
    -webkit-text-stroke: 1px var(--mg-red);
}
.post-content .mg-page .mg-wk-cat__head h2 {
    margin: 0;
    font-size: clamp(24px, 2.8vw, 36px);
    font-weight: 900;
    line-height: 1.35;
}
.post-content .mg-page .mg-wk-cat__head p {
    margin: 0;
    font-size: 14px;
    line-height: 1.9;
    color: #55555c;
}

/* 事例カード：横長（主力カテゴリ） */
.mg-wk-case {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(26px, 3.6vw, 56px);
    align-items: start;
}
.mg-wk-case + .mg-wk-case {
    margin-top: clamp(48px, 6vw, 80px);
    padding-top: clamp(48px, 6vw, 80px);
    border-top: 1px solid rgba(20, 20, 22, .1);
}
.mg-wk-case__main { margin: 0; }
.mg-wk-case__main img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%);
}
.mg-wk-case__tag {
    display: inline-block;
    margin-bottom: 14px;
    font-family: var(--font-eng);
    font-size: 13px;
    letter-spacing: .16em;
    color: var(--mg-red);
}
.post-content .mg-page .mg-wk-case h3 {
    margin: 0 0 14px;
    font-size: clamp(21px, 2.2vw, 28px);
    font-weight: 900;
    line-height: 1.45;
}
.post-content .mg-page .mg-wk-case__text {
    margin: 0 0 24px;
    font-size: 14.5px;
    line-height: 2;
    color: #45454c;
}

/* 工程サムネイル */
.mg-wk-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.post-content .mg-page .mg-wk-steps li { margin: 0; }
.mg-wk-steps img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: opacity .3s var(--mg-ease);
}
.mg-wk-steps a:hover img,
.mg-wk-case__main a:hover img { opacity: .86; }
.mg-wk-steps span {
    display: block;
    margin-top: 6px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.5;
    color: #6b6b72;
}

/* 事例カード：縦型（その他のカテゴリ・2列） */
.mg-wk-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(36px, 4.5vw, 64px) clamp(24px, 3vw, 44px);
}
.mg-wk-grid .mg-wk-case {
    grid-template-columns: 1fr;
    gap: 22px;
}
.mg-wk-grid .mg-wk-case + .mg-wk-case {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}
.mg-wk-grid .mg-wk-case__main img { aspect-ratio: 3 / 2; }
.mg-wk-grid .mg-wk-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 拡大表示（JSなし：:target） */
.mg-lb {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 4vh 4vw;
}
.mg-lb:target { display: flex; }
.mg-lb__bg {
    position: absolute;
    inset: 0;
    background: rgba(11, 11, 12, .9);
}
.mg-lb figure {
    position: relative;
    margin: 0;
    max-width: 100%;
    max-height: 100%;
}
.mg-lb img {
    display: block;
    max-width: 92vw;
    max-height: 84vh;
    width: auto;
    height: auto;
    object-fit: contain;
}
.post-content .mg-page .mg-lb figcaption {
    margin-top: 10px;
    font-size: 13px;
    text-align: center;
    color: rgba(255, 255, 255, .8);
}
.post-content .mg-page .mg-lb__close {
    position: absolute;
    right: 18px;
    top: 14px;
    z-index: 1;
    font-family: var(--font-eng);
    font-size: 40px;
    line-height: 1;
    color: #fff;
    text-decoration: none;
}

/* --- レスポンシブ（21） --- */
@media only screen and (max-width: 991px) {
    .mg-sv-feature,
    .mg-sv-ng,
    .mg-wk-case { grid-template-columns: 1fr; }
    .mg-sv-feature.is-reverse .mg-sv-feature__media { order: 0; }
    .mg-sv-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mg-sv-proc__list.is-4 { --cols: 2; }
    .mg-wk-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media only screen and (max-width: 767px) {
    .mg-sv-feature__main::before { inset: 10px -10px -10px 10px; }
    .mg-sv-feature.is-reverse .mg-sv-feature__main::before { inset: 10px 10px -10px -10px; }
    .mg-sv-points { grid-template-columns: 1fr; }
    .mg-sv-proc__list { --cols: 1; }
    .mg-sv-proc__list.is-4 { --cols: 2; }
    .mg-sv-cards { grid-template-columns: 1fr; }
    .mg-sv-tocases { grid-template-columns: 1fr; }
    .mg-wk-nav { grid-template-columns: 1fr; }
    .mg-wk-grid { grid-template-columns: 1fr; }
    .mg-wk-steps,
    .mg-wk-grid .mg-wk-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
}

/* WordPressの自動整形で入る空の段落を消す */
.mg-wk p:empty { display: none; }

/* 自動整形で <p> に包まれた閉じるボタンを、画面右上に固定する */
.post-content .mg-page .mg-lb p { position: static; margin: 0; }
.mg-wk-case__main { position: relative; }
.post-content .mg-page .mg-wk-case__main figcaption {
    position: absolute;
    left: 0;
    top: 0;
    padding: 6px 12px;
    background: var(--mg-black);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #fff;
}

/* 拡大表示中は本文エリアを固定ヘッダーより前面に出す（×ボタンが隠れないように） */
.inner:has(.mg-lb:target) { z-index: 10001; }

/* 業務内容：外壁・屋根の番号は明朝系イタリックでタイトルと横並び */
.mg-sv-feature__head {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-bottom: 18px;
}
.mg-sv-feature__num {
    display: inline-block;
    font-family: "EB Garamond", "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
    font-size: clamp(44px, 4.4vw, 60px);
    font-style: italic;
    font-weight: 500;
    line-height: 1;
    color: var(--mg-red);
    -webkit-text-stroke: 0;
    margin-bottom: 0;
}
.post-content .mg-page .mg-sv-feature__head h3 {
    margin: 0;
}

/* 業務内容：施工事例と同じ分類で並べる（塗装以外の工事） */
.mg-sv-proc__list.is-2 { --cols: 4; }
.mg-sv-more { margin: clamp(28px, 3.5vw, 44px) 0 0; text-align: right; }
.post-content .mg-page .mg-sv-more a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid currentColor;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--mg-black);
    text-decoration: none;
    transition: color .3s;
}
.post-content .mg-page .mg-sv-more a::after {
    content: "\2192";
    color: var(--mg-red);
    transition: transform .3s;
}
.post-content .mg-page .mg-sv-more a:hover { color: var(--mg-red); }
.post-content .mg-page .mg-sv-more a:hover::after { transform: translateX(4px); }
.post-content .mg-page .mg-sv-prep .mg-sv-more a { color: #fff; }
.post-content .mg-page .mg-sv-prep .mg-sv-more a::after { color: var(--mg-red-bright); }

.mg-sv-cat {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr);
    gap: clamp(28px, 4vw, 64px);
    align-items: start;
    padding: clamp(36px, 4.5vw, 56px) 0;
    border-top: 1px solid rgba(20, 20, 22, .12);
}
.mg-sv-cat:last-child { border-bottom: 1px solid rgba(20, 20, 22, .12); }
.post-content .mg-page .mg-sv-cat__en {
    margin: 0 0 10px;
    font-family: var(--font-eng);
    font-size: 13px;
    letter-spacing: .18em;
    color: var(--mg-red);
}
.post-content .mg-page .mg-sv-cat__body h3 {
    margin: 0 0 16px;
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 900;
    line-height: 1.4;
}
.post-content .mg-page .mg-sv-cat__body p:not([class]) {
    margin: 0;
    font-size: 14px;
    line-height: 2;
    color: #55555c;
}
.mg-sv-cat .mg-sv-more { text-align: left; margin-top: 24px; }
.mg-sv-cards.is-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 1.6vw, 20px);
}
.post-content .mg-page .mg-sv-cards.is-2 .mg-sv-card__photo figcaption { font-size: 15px; }

/* 施工事例：カテゴリ番号も赤の明朝系イタリックに */
.mg-wk-cat__num {
    font-family: "EB Garamond", "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
    font-size: clamp(48px, 5vw, 72px);
    font-style: italic;
    font-weight: 500;
    line-height: 1;
    color: var(--mg-red);
    -webkit-text-stroke: 0;
}

@media only screen and (max-width: 991px) {
    .mg-sv-cat { grid-template-columns: 1fr; }
}
@media only screen and (max-width: 767px) {
    .mg-sv-proc__list.is-2 { --cols: 2; }
    .post-content .mg-page .mg-sv-cards.is-2 .mg-sv-card__photo figcaption { left: 12px; right: 12px; bottom: 10px; font-size: 13px; }
}

/* FooGallery 拡大表示：親テーマの img { width: 100%; } で縦長・横長の写真が引き伸ばされるのを防ぐ */
.fg-panel .fg-media-image .fg-media-content {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


/* ===== 2026-11-15 全案件共通の直しを貼付（制作標準 08 の3章）：記事の本文の中央寄せ・前の記事／次の記事 ===== */
/* ======================================================================
   TCD STORY：お知らせの記事のページで、本文が左に寄るのを直す（全案件共通）
   2026-11-13 藤村さん「毎回あなたがコーディングすると、この修正が来る」

   原因：single.php は本文を .primary（幅 68.7%・左寄せ）に入れ、右に
   サイドバー（.secondary）を置く作り。エイトリンク案件はウィジェットを
   入れないので .secondary が空になり、本文だけが左に寄って右が空く。

   直し方：サイドバーが空のときだけ、本文の列と記事の見出しを、同じ幅で
   ページの中央に置く。ウィジェットが入っている記事には効かない。
   子テーマの CSS の一番最後（responsive.css があればその最後）に貼る。
   ====================================================================== */
body.single .main > .inner:not(:has(> .flex_layout > .secondary > *)) > .flex_layout {
  display: block;
}
body.single .main > .inner:not(:has(> .flex_layout > .secondary > *)) > .flex_layout > .primary {
  float: none;
  width: 100%;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
body.single .main > .inner:not(:has(> .flex_layout > .secondary > *)) > .flex_layout > .secondary {
  display: none;
}
body.single .main > .inner:not(:has(> .flex_layout > .secondary > *)) > .post-header {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

/* 2026-11-15 追記：本文の幅を 860px にそろえると、題名が2行になるとき言葉の途中で折り返すことがある
   （木村塗装で「…見るチ／ェックポイント」）。文節で折り返す（対応しないブラウザでは今までどおり）。
   text-wrap: balance はスマホで不自然な所で切れたので使わない。 */
body.single .post-header .post-title {
  word-break: auto-phrase;
  line-break: strict;
}

/* 2026-11-16 追記：本文と題名を 860px の中央にすると、PC 幅では、パンくず（ページの列の左）が題名より左にずれる
   （1024px で 51px と 74px。め組・みずき工務店のルームの指摘）。サイドバーが空の記事のページだけ、992px 以上で
   パンくずの列も 860px の中央にそろえる。991px 以下は親テーマの左右の余白のままで、題名とそろう。
   おそうじ日和の記事で 1440・1024・900・375px のすべてで、パンくずと題名の左の端が同じ（282.5・74.5・54.1・22.9px）なのを確かめた。
   入れ子の :has は使えないので、body の :not(:has(…)) で書いている。 */
@media (min-width: 992px) {
  body.single:not(:has(.main > .inner > .flex_layout > .secondary > *)) .header .breadcrumb {
    max-width: 860px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }
}

/* =========================================================
   TCD STORY（tcd041）の記事の最後の「前の記事・次の記事」（.nav-links01）の崩れを直す（全案件共通。2026-11-13）
   子テーマの CSS の一番最後に貼る。色（#ddd）は、その案件の線の色に変えてよい。
   原因：親テーマと子テーマの responsive.css（768px 以下）が a を height:50px・line-height:50px・padding:0 に固定している。
         短い「前の記事」を想定した指定なのに、実際には記事のタイトルが入るので、2行になると枠の外にはみ出し、
         すぐ下のセクション（フッターなど）に重なる。PC でもブラウザの幅を狭めると起きる。
   全部の指定の頭に body を付けている（2026-11-13 追記）：子テーマの CSS が親の responsive.css より先に読まれるサイト
   （おそうじ日和など）でも、親の指定に負けずに効くように。後に読まれるサイト（ウルトランドなど）でも同じように効く。
   ========================================================= */
body .nav-links01 a { overflow-wrap: anywhere; }
body .nav-links01 { margin-bottom: clamp(64px, 7vw, 88px) !important; } /* すぐ下のセクションと見た目で 40px 以上あける */
@media (max-width: 768px) {
	body .nav-links01 { display: block; border: 1px solid #ddd; box-sizing: border-box; } /* 2026-11-15 追記：親テーマの幅 100% に枠線 1px が足され、本文の列より右に 2px はみ出していた（おそうじ日和で測定） */
	body .nav-links01-previous,
	body .nav-links01-next { display: block; float: none; width: 100%; text-align: left; }
	body .nav-links01-previous + .nav-links01-next { border-left: 0; border-top: 1px solid #ddd; }
	body .nav-links01-previous a,
	body .nav-links01-next a { height: auto; line-height: 1.7; padding: 16px 20px 16px 44px; }
	body .nav-links01-next a { padding: 16px 44px 16px 20px; text-align: right; }
	body .nav-links01-previous a::before,
	body .nav-links01-next a::after { top: 50%; margin-top: 0; transform: translateY(-50%); }
	body .nav-links01-previous a::before { left: 16px; }
	body .nav-links01-next a::after { right: 16px; }
}



/* ===== 2026-11-16 全案件共通の直しを貼付（制作標準 08 の3章）：パンくずを見出し帯のすぐ下へ ===== */
/* =========================================================
   TCD STORY（tcd041）のパンくずを、見出し帯の中から見出し帯のすぐ下へ出す（全案件共通。2026-11-16）
   子テーマの CSS の一番最後（responsive.css があればその最後）に貼る。色（#666）は、その案件の文字の色に変えてよい。
   原因：親テーマが .breadcrumb-wrapper を position:absolute; bottom:0 と白の半透明の帯にしていて、
         ヘッダー（.header）の下の端＝見出し帯（.signage）の下の端に重なって出る。
   決まり（制作標準の3章）：パンくずだけで帯を取らない。背景なし・小さな文字。見出し帯の中に入れず、すぐ下から始める。
                            見出し帯の文字は中央揃え。
   おそうじ日和の記事のページで、見出し帯の下の端（100px）からパンくずが始まることを確かめた（2026-11-16）。
   貼った後に必ず見ること（2026-11-16 め組のルームの指摘）：パンくずはヘッダー（.header）の中に残るので、子テーマで .header に
   背景色（暗い色など）を付けているサイトでは、パンくずの後ろがその色の帯になる。そのときは .header .breadcrumb-wrapper の
   background を、すぐ下のページの背景と同じ色にする（帯に見えないように）。
   確かめ方：記事・お知らせ一覧・下層を 1440・1024・390・375px で。パンくずの上の端＝見出し帯の下の端、パンくずの左の端＝本文の左の端、
   パンくずのすぐ下の本文の左の端が貼る前と同じ（回り込みで右に寄っていない）こと。
   「ブログ」の文字は CSS では消えない。tcd-story-blog-label-fix.php（functions.php に貼る）と組で使う。
   ========================================================= */
body .header .breadcrumb-wrapper {
  position: static !important;
  background: none !important;
  height: auto !important;
  overflow: visible !important;
}
body .header .breadcrumb {
  height: auto !important;
  line-height: 1.6 !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important; /* 左右は親テーマのまま（スマホの .breadcrumb-wrapper .inner の padding: 0 6.11% を消さない。2026-11-16 おそうじ日和で、375px で左の端にくっついたため直した） */
  font-size: 12px !important;
  color: #666;
  white-space: normal !important;
  text-align: left;
}
/* 2026-11-16 追記：親テーマの .breadcrumb li { float: left } の回り込みが、高さの固定を外したパンくずの外に出て、
   すぐ下の本文がパンくずの項目の幅の分だけ右に寄った（KIZUNA のご挨拶のページの 375px で、本文の左が 15px→108px）。
   パンくずの中で回り込みを止める。 */
body .header .breadcrumb { display: flow-root; }
body .header .breadcrumb::after { content: ""; display: table; clear: both; }
body .header .breadcrumb a,
body .header .breadcrumb span { color: inherit !important; }
/* 2026-11-16 追記：記事のカテゴリーが「お知らせ」と同じ名前で外れたとき（tcd-story-blog-label-fix.php）、空の項目と矢印を出さない。 */
body .header .breadcrumb li:not(:has(*)) { display: none; }
body .header .breadcrumb li:has(> a > span:empty) { display: none; } /* カテゴリー一覧で一覧へのリンクを空にしたとき（追記2） */
body .signage-content,
body .signage-title,
body .signage-sub-title { text-align: center; }
@media (max-width: 768px) {
  body .header .breadcrumb { font-size: 11px !important; padding-top: 8px !important; padding-bottom: 8px !important; }
}

/* 選んで使う（2026-11-16 みずき工務店のルームの提案）：見出し帯に題名も画像も入っていない記事・一覧では、
   中身のない灰色の帯（PC 50px・スマホ 44px）だけが残る。題名を入れるのが本来の直し方（見出し帯は中央揃えの題名つき）。
   すぐに入れられないときだけ、下のコメントを外して空の帯を消す。消したあとは、パンくずの上の端がヘッダーの下の端より
   上に入り込んでいないか（ヘッダーが固定のサイトで隠れないか）を PC・スマホで測る。
body .signage:not(:has(.signage-content)) { display: none; }
*/
/* め組だけ：ヘッダー（.header）の背景が黒（--color-base）なので、パンくずの後ろだけを、すぐ下のページと同じ白にする（帯に見せない。2026-11-16） */
body .header .breadcrumb-wrapper { background: #fff !important; }
