/* --- ストーリーセクション全体 --- */
.lifestory{
    font-family: "Zen Maru Gothic", sans-serif;
}
.ph-story-detail {
    padding-bottom: 120px;
    font-family: "Zen Maru Gothic", sans-serif;
    color: #333;
}
.container-1200 { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.container-1100 { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-1000 { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.container-900 { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.container-800 {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- メインビジュアル（MV） --- */
.ph-story-mv {
    width: 100%;
    height: 800px;
    background-image: url('../img/lifestory-bg.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    margin-bottom: 80px;
}
.lifestory02 .ph-story-mv {
    background-image: url('../img/lifestory-bg02.jpg');
}

.ph-story-title-block {
    position: absolute;
    right: 20%;
    bottom: 15%;
    color: #fff;
    text-shadow: 0 0 10px rgba(0,0,0,0.3);
    text-align: right;
}
.lifestory02 .ph-story-title-block{
    right: unset;
    left: 20%;
    text-align: left;
}
.story-label {font-size: 20px;font-weight: 700;text-align: left;width: 80%;margin-left: auto;}
.lifestory02 .story-label{width: 100%;}
.story-main-title {font-size: 50px;font-weight: 700;margin-bottom: 15px;font-family: serif;}
.story-lead {font-size: 22px;line-height: 1.8;}

/* --- 見出しとリスト --- */
.ph-story-h3 {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
    letter-spacing: 2px;
}
.ph-vertical-line {
    width: 1px;
    height: 150px;
    background-color: #212121;
    margin: 0 auto;
}
.client-name { font-weight: 700; margin-bottom: 20px; }

.ph-story-list { list-style: none; padding: 0; margin-bottom: 50px;}
.ph-story-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 15px;
    line-height: 1.8;
    letter-spacing: 2px;
    font-size: 18px;
}

.ph-story-list li::before {
    content: "●";
    color: #b6b591;
    position: absolute;
    left: 0;
    top: 5px;
    font-size: 12px;
}

/* --- 縦書きセクション --- */
.ph-story-vertical {
    margin: 50px 0 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vertical-text-wrap {
    writing-mode: vertical-rl; /* 縦書き設定 */
    text-orientation: mixed;
    height: auto;
    margin: 40px auto;
}

.vertical-text {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.3em;
    line-height: 2.0;
    font-family: serif;
}

/* --- 吹き出しエリア --- */
.ph-story-balloon-area {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-top: 60px;
}

.balloon-content {
    background-color: #fff;
    border: 1px solid #333;
    padding: 30px 90px;
    border-radius: 150px;
    position: relative;
    flex: 1;
}

.balloon-content p {
    font-size: 18px;
    line-height: 2.2;
    margin: 0;
}

.balloon-icon {
    width: 100px;
    flex-shrink: 0;
}

.balloon-icon img { width: 100%; height: auto; }

/* --- レスポンシブ --- */
@media (max-width: 768px) {
    .ph-story-mv { height: 400px;  background-position: -40vw bottom;}
    .vertical-text { font-size: 20px; }
    .ph-story-balloon-area { flex-direction: column-reverse; align-items: center; }
    .balloon-content { border-radius: 30px; padding: 25px; }
    .story-main-title{ font-size: 30px; }
    .story-lead { font-size: 18px; }
    .story-label{width: 60%;}
}

.ph-case-study-flow {
    padding: 100px 0;
    background-color: #f7f9f9;
    font-family: "Zen Maru Gothic", sans-serif;
    color: #333;
}

.container-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.ph-case-h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 50px;
    letter-spacing: 0.1em;
}

/* 提案ブロック */
.ph-proposal-logo { text-align: center; margin-bottom: 40px; }
.ph-proposal-logo img { width: 90px; height: auto; }

/* 共通リストスタイル（使い回し） */
.ph-story-list {
    list-style: none; padding: 0; margin: 0 auto 100px;
}
.ph-story-list li {
    position: relative; padding-left: 20px; margin-bottom: 18px; line-height: 1.8;
}
.ph-story-list li::before {
    content: "●"; color: #b6b591; position: absolute; left: 0; font-size: 12px;
}

/* --- フロー図（重なりと端の形状を完全修正） --- */
.ph-timeline-arrow {
    display: flex;
    align-items: stretch;
    margin-bottom: 60px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.03));
}

.step-item {
    flex: 1;
    background-color: #b2c0be;
    padding: 35px 10px 35px 65px;
    text-align: center;
    position: relative;
    text-align: left;
}

/* 1番目：右だけ凸 */
.step-item.is-start {
    clip-path: polygon(0% 0%, calc(100% - 30px) 0%, 100% 50%, calc(100% - 30px) 100%, 0% 100%);
}

/* 2番目：左が凹、右が凸 */
.step-item.is-middle {
    clip-path: polygon(0% 0%, calc(100% - 30px) 0%, 100% 50%, calc(100% - 30px) 100%, 0% 100%, 30px 50%);
    margin-left: -21px; /* 前のステップの凸部分を覆う */
}

/* 3番目：左が凹、右も凸（ここがご指摘のポイント） */
.step-item.is-end {
    clip-path: polygon(0% 0%, calc(100% - 30px) 0%, 100% 50%, calc(100% - 30px) 100%, 0% 100%, 30px 50%);
    margin-left: -21px;
    margin-right: 0;
}

/* ラベル・タイトル */
.step-label-box span {
    display: inline-block;
    background: #fff;
    border-radius: 20px;
    padding: 2px 30px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #57777d;
}
.step-title { font-size: 18px; font-weight: 700; margin-bottom: 5px; }
.step-desc { font-size: 15px; margin: 0; }

/* 説明文とギャラリー */
.ph-process-lead p {
    text-align: center; line-height: 2.2; font-size: 18px; max-width: 750px; margin: 0 auto 60px; text-align: left;
}
.ph-process-gallery { display: flex; justify-content: space-between; gap: 20px; }
.gallery-img { width: 32%; }
.gallery-img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 20px; }

/* スマホ対応 */
@media (max-width: 768px) {
    .ph-timeline-arrow { flex-direction: column; gap: 15px; }
    .step-item { clip-path: none !important; margin: 0 !important;}
    .ph-process-gallery { flex-direction: column; }
    .gallery-img { width: 100%; }

    .ph-timeline-arrow {
        flex-direction: column;
        gap: 0px; /* ステップ間の隙間 */
        margin-bottom: 40px;
    }

    .step-item {
        margin-left: 0 !important;
        width: 100%;
        height: auto;
        padding: 40px 20px;
        /* スマホ: 下に凸、上に凹の形状に書き換え */
        clip-path: polygon(
            0% 0%, 50% 25px, 100% 0%, 
            100% calc(100% - 25px), 50% 100%, 0% calc(100% - 25px)
        ) !important;
        margin-top: -12px!important; /* 上下の重なりを調整 */
        text-align: center;
    }

    .step-item.is-start {
        margin-top: 0;
        /* 最初は上を平らに */
        clip-path: polygon(
            0% 0%, 100% 0%, 
            100% calc(100% - 25px), 50% 100%, 0% calc(100% - 25px)
        ) !important;
    }

    .step-item.is-end {
        /* 最後は下も尖らせたまま（または平らにお好みで） */
        clip-path: polygon(
            0% 0%, 50% 25px, 100% 0%, 
            100% calc(100% - 25px), 50% 100%, 0% calc(100% - 25px)
        ) !important;
    }

    /* ラベル位置などの微調整 */
    .step-label-box {
        margin-bottom: 10px;
    }
}
/* --- Base Layout --- */
.ph-report {
    padding: 100px 0;
    font-family: "Zen Maru Gothic", sans-serif;
    color: #333;
}
.container-900 {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
/* --- 1. Before/After Area --- */
.ba-labels {
    display: flex;
    justify-content: space-around;
    margin-bottom: 5px;
    color: #57777d;
    font-weight: 700;
    font-size: 18px;
}
.ba-visual {
    display: flex;
    align-items: center;
    gap: 20px;
}
.ba-visual .img-box {
    flex: 1;
}
.ba-visual img {
    width: 100%;
    border-radius: 20px;
    display: block;
}
.ba-arrow {
    width: 70px;
    flex-shrink: 0;
    margin-left: -30px;
    position: relative;
    z-index: -1;
}
/* --- 2. Status Grid (6 Photos) --- */
.status-h3 {
    text-align: center;
    color: #57777d;
    margin: 60px 0 30px;
    font-size: 18px;
    font-weight: 700;
}
.status-grid-6 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.s-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 12px;
}
.s-card p {
    text-align: center;
    font-size: 15px;
    color: #57777d;
    margin-top: 5px;
}
/* --- 3. Estimate Sheet --- */
.ph-estimate{
    max-width: 900px;
    margin: 100px auto;
}
.est-top-bold,
.est-bottom-bold {
    border-top: 3px solid #000;
    margin: 10px 0;
}
/* Header Split (50:50) */
.est-row-split {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
}
.split-item {
    flex: 1;
    display: flex;
    align-items: flex-end;
    border-bottom: 1.5px solid #000;
    padding-bottom: 5px;
    justify-content: space-between;
}
.est-label {
    font-weight: 700;
    font-size: 18px;
    margin-right: 15px;
    white-space: nowrap;
}
.est-text {
    font-size: 18px;
}
/* Total Row */
.est-total-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1.5px solid #000;
    padding-bottom: 5px;
    margin-bottom: 30px;
}
.est-main-label {
    font-size: 18px;
    font-weight: 700;
}
.est-main-price {
    font-size: 42px;
    font-family: "Jost", sans-serif;
    line-height: 1;
    font-weight: 400;
}
.est-main-price small {
    font-size: 16px;
    margin-left: 5px;
    font-family: "Zen Maru Gothic";
}
/* Breakdown Layout */
.est-breakdown-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.breakdown-title {
    width: 50px;
    font-size: 14px;
    font-weight: 700;
    padding-top: 5px;
}
.breakdown-content {
    flex: 1;
}
/* Common Row Style */
.est-content-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1.5px solid #000;
    padding-bottom: 3px;
    margin-bottom: 18px;
}
.row-name {
    font-size: 16px;
    font-weight: 500;
}
.row-price {
    font-size: 26px;
    font-family: "Jost", sans-serif;
    line-height: 1;
    font-weight: 300;
}
.row-price small {
    font-size: 13px;
    margin-left: 5px;
    font-family: "Zen Maru Gothic";
}
/* Memo & Nested List */
.est-memo {
    font-size: 13px;
    margin-bottom: 18px;
    padding-left: 10px;
}
.est-memo p {
    margin-bottom: 10px;
}
.removal-list-group {
    margin-top: 10px;
}
.removal-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 8px;
}
.removal-head {
    font-weight: 700;
    white-space: nowrap;
}
.removal-row-sub {
    display: flex;
    flex-direction: column;
    padding-left: 85px;
    gap: 8px;
}
.removal-item {
    line-height: 1.4;
}
.indent-row {
    justify-content: flex-end;
    gap: 40px;
}
.sub-label {
    font-size: 16px;
}

/* --- Responsive Area --- */
/* --- Responsive Area --- */
@media (max-width: 768px) {
    /* --- 1. Before/After スマホ最適化 --- */
    .ba-labels {
        display: none; /* PC用のラベル横並びを非表示に */
    }

    .ba-visual {
        flex-direction: column;
        gap: 0;
    }

    .ba-visual .img-box {
        width: 100%;
        position: relative;
    }

    /* 画像の上にラベルを強制的に表示させる手法 */
    .ba-visual .img-box::before {
        display: block;
        text-align: center;
        padding-bottom: 8px;
        font-weight: 700;
        font-size: 16px;
        color: #57777d;
    }

    .img-box:first-child::before {
        content: "Before";
        color: #b2c0be; /* PC版のBefore色を継承 */
    }

    .img-box:last-child::before {
        content: "After";
    }

    .ba-arrow {
        width: 60px;
        margin: -10px auto 10px;
        transform: rotate(90deg);
        z-index: -1;
    }

    /* --- 2. 6枚グリッドを2カラムに --- */
    .status-grid-6 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* --- 3. 見積もり図 スマホ最適化 --- */
    .est-row-split {
        flex-direction: column;
        gap: 15px;
    }

    .est-breakdown-container {
        flex-direction: column;
    }

    .breakdown-title {
        width: 100%;
        border-bottom: 1px solid #000;
        padding-bottom: 5px;
        margin-bottom: 10px;
    }

    .est-content-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding-bottom: 8px;
    }

    .row-price {
        align-self: flex-end; /* 金額だけ右寄せにすると見やすい */
    }

    .removal-row {
        flex-direction: column;
        gap: 5px;
    }

    .removal-row-sub {
        padding-left: 15px; /* インデントを浅くして幅を確保 */
        margin-top: 5px;
    }

    .indent-row {
        justify-content: space-between;
        align-items: flex-end;
    }
}

/* --- レイアウトベース --- */
.container-900 { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.container-800 { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* --- ギャラリーセクション --- */
.ph-album-gallery {
    padding: 100px 0;
    background-color: #f7f9f9;
    font-family: "Zen Maru Gothic", sans-serif;
    text-align: center;
}

.album-brand-logo { margin-bottom: 20px; }
.album-brand-logo img { height: 100px; width: auto; }

.album-section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 50px;
}

/* グリッドレイアウト */
.album-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto; /* 2段構成 */
    gap: 20px;
    margin-bottom: 50px;
}

.photo-item img {
    width: 100%;
    border-radius: 20px;
    display: block;
}

/* 上段左：2カラム×1行分 */
.grid-main {
    grid-column: 1 / 3;
}
.grid-main img {
    height: 100%;
    object-fit: cover;
}

/* 上段右：上下余白を出すための設定 */
.grid-side-contain {
    grid-column: 3 / 4;
    display: flex;
    align-items: center; /* 上下中央 */
    justify-content: center;
    background-color: transparent; /* 背景が必要ならここを調整 */
}
.grid-side-contain img {
    width: 100%;
    height: auto; /* 高さを自動にすることで上下に余白ができる */
    object-fit: contain; /* 全体を表示 */
}

/* 下段3枚：1カラムずつ */
.grid-bottom img {
    aspect-ratio: 4/3;
    object-fit: cover;
}

.album-lead-paragraph {
    max-width: 780px;
    margin: 0 auto;
    text-align: left;
}
.album-lead-paragraph p {
    font-size: 18px;
    line-height: 2.2;
    color: #333;
}

/* --- 感想セクション --- */
.ph-testimonial {
    padding: 60px 0 100px;
    background-color: #fff;
    font-family: "Zen Maru Gothic", sans-serif;
}

.testimonial-section-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 40px;
}

.testimonial-content-area {
    max-width: 780px;
    margin: 0 auto;
}
.testimonial-content-area p {
    font-size: 18px;
    line-height: 2.4;
    margin-bottom: 1.5em;
    text-align: justify;
}

/* --- レスポンシブ --- */
@media (max-width: 768px) {
    .album-photo-grid { grid-template-columns: 1fr; }
    .grid-main, .grid-side-contain { grid-column: auto; }
    .grid-side-contain { height: auto; }
}

.ph-action-report {
    padding: 80px 0;
    font-family: "Zen Maru Gothic", sans-serif;
    color: #333;
}

.container-1000 {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.ph-report-flex {
    display: flex;
    gap: 30px;
    align-items: stretch;
}

.ph-report-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.ph-report-col.right{
    flex: 0.7;
}

/* タイトルを枠の外側に配置 */
.ph-report-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #57777d;
    margin-bottom: 20px;
}

/* 背景色ボックス */
.ph-report-box {
    flex: 1;
    border-radius: 25px;
    padding: 40px 35px;
}

.bg-pink { background-color: #ede3e4; }
.bg-mint { background-color: #d8dfde; }

/* リストスタイル */
.ph-report-list {
    list-style: none;
    padding: 0;
    margin-bottom: 40px;
}

.ph-report-list li {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
}

/* 寄付内容の画像・テキスト配置 */
.ph-action-detail {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ph-action-row {
    display: flex;
    align-items: start;
    gap: 15px;
}

/* 2つ目の行は画像を左に */
.ph-action-row.row-reverse {
    flex-direction: row;
}

.ph-action-text {
    flex: 1;
    font-size: 18px;
    line-height: 1.8;
}

.ph-action-img {
    width: 45%;
}

.ph-action-img img {
    width: 100%;
    border-radius: 15px;
    display: block;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .ph-report-flex {
        flex-direction: column;
    }
    .ph-action-row, .ph-action-row.row-reverse {
        flex-direction: column;
        text-align: center;
    }
    .ph-action-img {
        width: 100%;
        max-width: 300px;
    }
}