/* ========================================
   Flow 1 Page
======================================== */

.c-flowPage {
    background: var(--base-bg);
}

/* ----------------------------------------
   Hero / Intro
---------------------------------------- */
.c-flowIntroCard {
    max-width: 980px;
    margin: 0 auto;
}

/* ----------------------------------------
   Timeline Panel
---------------------------------------- */
.c-flowTimelineWrap {
    border-radius: 72px;
}

.c-flowTimelineWrap__head {
    margin-bottom: 54px;
}

.c-flowTimeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 34px;
    max-width: 980px;
}

.c-flowTimeline::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 42px;
    /* 84pxの丸の中心 */
    width: 2px;
    background: linear-gradient(to bottom,
            rgba(24, 169, 183, 0.15),
            rgba(24, 169, 183, 0.45),
            rgba(24, 169, 183, 0.15));
}

.c-flowStep {
    position: relative;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.c-flowStep__meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 84px;
    padding-top: 0;
}

.c-flowStep__label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--accent);
    text-transform: uppercase;
    opacity: 0.78;
    line-height: 1;
}

.c-flowStep__num {
    width: 84px;
    height: 84px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #20b7c5, #1698a7);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(24, 169, 183, 0.24);
    flex-shrink: 0;
}

.c-flowStep__card {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 30px;
    padding: 30px 32px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.04);
}

.c-flowStep__card--wide {
    padding-bottom: 24px;
}

.c-flowStep__title {
    margin: 0 0 14px;
    font-size: clamp(1.6rem, 2.2vw, 2.2rem);
    line-height: 1.35;
    font-weight: 800;
}

.c-flowStep__text {
    margin: 0;
    color: var(--text-sub);
    line-height: 2.05;
    font-size: 1rem;
}

.c-flowStep__actions {
    margin-top: 22px;
}

/* ----------------------------------------
   Buttons / Links
---------------------------------------- */
.c-flowPillButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(24, 169, 183, 0.2);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.c-flowPillButton:hover {
    transform: translateY(-2px);
    opacity: 0.96;
}

.c-flowTextLink {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.c-flowTextLink:hover {
    text-decoration: underline;
}

/* ----------------------------------------
   Estimate Table
---------------------------------------- */
.c-flowEstimateTableWrap {
    margin-top: 24px;
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.c-flowEstimateTable {
    width: 100%;
}

.c-flowEstimateTable thead th {
    background: #efe94f;
}

.c-flowEstimateTable th,
.c-flowEstimateTable td {
    font-size: 0.95rem;
}

/* ----------------------------------------
   Bottom CTA
---------------------------------------- */
.c-flowBottomCta {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 26px;
    align-items: center;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.82),
            rgba(245, 245, 245, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 34px;
    padding: 28px 30px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.04);
}

.c-flowBottomCta__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    border-radius: 26px;
    background: linear-gradient(180deg, #d8f3f6, #c6ebf0);
    font-size: 3rem;
}

.c-flowBottomCta__sub {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.c-flowBottomCta__title {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2rem);
    line-height: 1.4;
    font-weight: 800;
}

.c-flowBottomCta__text {
    margin: 10px 0 0;
    color: var(--text-sub);
    line-height: 1.9;
}

.c-flowBottomCta__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 62px;
    padding: 0 32px;
    border-radius: 18px;
    background: #ffd400;
    color: #111;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(255, 212, 0, 0.22);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.c-flowBottomCta__button:hover {
    transform: translateY(-2px);
    opacity: 0.96;
}

/* ----------------------------------------
   Responsive
---------------------------------------- */
@media (max-width: 1100px) {
    .c-flowBottomCta {
        grid-template-columns: 1fr;
    }

    .c-flowBottomCta__icon {
        min-height: 86px;
    }
}

@media (max-width: 767px) {
    .c-flowTimelineWrap {
        border-radius: 38px;
    }

    .c-flowTimelineWrap__head {
        margin-bottom: 34px;
    }

    .c-flowTimeline {
        gap: 24px;
    }

    .c-flowTimeline::before {
        left: 31px;
        /* 62pxの丸の中心 */
        top: 10px;
        bottom: 10px;
    }

    .c-flowStep {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .c-flowStep__meta {
        width: 62px;
        gap: 6px;
    }

    .c-flowStep__label {
        font-size: 0.56rem;
    }

    .c-flowStep__num {
        width: 62px;
        height: 62px;
        font-size: 1rem;
    }

    .c-flowStep__card {
        padding: 22px 18px;
        border-radius: 22px;
    }

    .c-flowStep__title {
        font-size: 1.35rem;
    }

    .c-flowStep__text {
        font-size: 0.96rem;
        line-height: 1.95;
    }

    .c-flowEstimateTableWrap {
        margin-top: 18px;
        border-radius: 18px;
    }

    .c-flowBottomCta {
        gap: 18px;
        padding: 22px 18px;
        border-radius: 24px;
    }

    .c-flowBottomCta__icon {
        min-height: 74px;
        border-radius: 18px;
        font-size: 2.2rem;
    }

    .c-flowBottomCta__button {
        width: 100%;
    }
}

/* ========================================
   STEPを丸の中に入れる + 線ズレ解消
======================================== */

/* 左メタのサイズ固定（丸と同サイズ） */
.c-flowStep__meta {
    position: relative;
    z-index: 1;
    width: 84px;
    height: 84px;
}

/* 丸の中を2段構成に */
.c-flowStep__num {
    width: 84px;
    height: 84px;
    border-radius: 999px;
    display: flex;
    flex-direction: column;
    /* ←縦並び */
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: linear-gradient(135deg, #20b7c5, #1698a7);
    color: #fff;
    box-shadow: 0 14px 28px rgba(24, 169, 183, 0.24);
    line-height: 1;
}

/* STEPラベル（丸の中用） */
.c-flowStep__label {
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    opacity: 0.9;
    line-height: 1;
}

/* 番号 */
.c-flowStep__number {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

/* ----------------------------------------
   縦線を丸の中心に完全一致させる
---------------------------------------- */

/* 丸84px → 中心42px */
.c-flowTimeline::before {
    left: 42px !important;
}

/* STEPラベルを外に出してる場合の保険（消す） */
.c-flowStep__meta>.c-flowStep__label {
    display: none;
}


/* ========================================
   微調整（完成度アップ）
======================================== */

/* カードの余白＆質感アップ */
.c-flowStep__card {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.04);
}

/* タイトル締める */
.c-flowStep__title {
    letter-spacing: 0.02em;
}

/* 本文の読みやすさ */
.c-flowStep__text {
    font-size: 1rem;
    line-height: 2.05;
}


/* ========================================
   スマホ
======================================== */
@media (max-width: 767px) {

    .c-flowStep__meta {
        width: 62px;
        height: 62px;
    }

    .c-flowStep__num {
        width: 62px;
        height: 62px;
        gap: 3px;
    }

    .c-flowStep__label {
        font-size: 0.42rem;
    }

    .c-flowStep__number {
        font-size: 1rem;
    }

    /* 丸62px → 中心31px */
    .c-flowTimeline::before {
        left: 31px !important;
    }
}

/* ========================================
   縦線を最後のSTEPで止める
======================================== */

/* 全体に引いていた縦線を消す */
.c-flowPage .c-flowTimeline::before {
    display: none;
}

/* 丸の中心位置とステップ間隔 */
.c-flowPage .c-flowTimeline {
    --flow-line-center: 42px;
    --flow-line-gap: 34px;
}

/* 最後以外のSTEPから、次の丸まで線を引く */
.c-flowPage .c-flowTimeline > .c-flowStep:not(:last-child)::before {
    content: "";
    position: absolute;
    left: var(--flow-line-center);
    top: var(--flow-line-center);
    bottom: calc(
        0px - var(--flow-line-gap) - var(--flow-line-center)
    );
    width: 2px;
    background: linear-gradient(
        to bottom,
        rgba(24, 169, 183, 0.15),
        rgba(24, 169, 183, 0.45),
        rgba(24, 169, 183, 0.15)
    );
    pointer-events: none;
}

/* スマホの丸サイズ・間隔に合わせる */
@media (max-width: 767px) {
    .c-flowPage .c-flowTimeline {
        --flow-line-center: 31px;
        --flow-line-gap: 24px;
    }
}

/* スマホ：STEPは左、説明カードは右 */
@media (max-width: 767px) {
  .c-flowPage .c-flowStep,
  .c-flow2Page .c-flow2Step {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-width: 0;
  }

  .c-flowPage .c-flowStep__meta,
  .c-flow2Page .c-flow2Step__meta,
  .c-flowPage .c-flowStep__num,
  .c-flow2Page .c-flow2Step__num {
    width: 48px;
    height: 48px;
    box-sizing: border-box;
  }

  .c-flowPage .c-flowStep__number,
  .c-flow2Page .c-flow2Step__number {
    font-size: 18px;
  }

  .c-flowPage .c-flowStep__card,
  .c-flow2Page .c-flow2Step__card {
    width: 100%;
    min-width: 0;
    padding: 18px 14px;
    box-sizing: border-box;
    background: #fff;
    border-radius: 18px;
  }

  .c-flowPage .c-flowStep__title,
  .c-flow2Page .c-flow2Step__title {
    font-size: 18px;
    line-height: 1.5;
  }

  .c-flowPage .c-flowStep__text,
  .c-flow2Page .c-flow2Step__text {
    font-size: 14px;
    line-height: 1.85;
  }

  /* 古い線を無効化 */
  .c-flowPage .c-flowTimeline::before,
  .c-flow2Page .c-flow2Timeline::before,
  .c-flow2Page .c-flow2Step__meta::after {
    display: none;
  }

  /* 丸の中心から次の丸の中心まで */
  .c-flowPage .c-flowTimeline > .c-flowStep:not(:last-child)::before,
  .c-flow2Page .c-flow2Step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 23px;
    top: 24px;
    bottom: -48px;
    width: 2px;
    background: rgba(24, 169, 183, 0.28);
    transform: none;
    pointer-events: none;
    z-index: 0;
  }
}

/* スマホ：STEP2の見積り表を横スクロールにする */
@media (max-width: 767px) {
  .c-flowPage .c-flowEstimateTableWrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .c-flowPage .c-flowEstimateTable {
    display: table;
    width: 560px;
    min-width: 560px;
    border-collapse: collapse;
  }

  .c-flowPage .c-flowEstimateTable thead {
    display: table-header-group;
  }

  .c-flowPage .c-flowEstimateTable tbody {
    display: table-row-group;
  }

  .c-flowPage .c-flowEstimateTable tr {
    display: table-row;
  }

  .c-flowPage .c-flowEstimateTable th,
  .c-flowPage .c-flowEstimateTable td {
    display: table-cell;
    width: auto;
    padding: 12px;
    font-size: 13px;
    line-height: 1.7;
    vertical-align: top;
  }
}

/* スマホ：流れの見出しを1行に */
@media (max-width: 767px) {
  .c-flowTimelineWrap__head .c-pageSection__title {
    font-size: clamp(16px, 5vw, 22px);
    line-height: 1.5;
    letter-spacing: 0;
  }
}