/* フロー全体中央寄せ */
/* フロー全体 */
.request-flow {
    width: 100%;
    max-width: 600px;
    margin: 0 auto; /* 中央寄せ */
    padding: clamp(16px, 2vw, 32px);
    display: flex;
    flex-direction: column;
    --accent: #8b5cf6;
    --line: #ccc;
    --bg: #fff;
    --ring: #c5b4f5;
    box-sizing: border-box; /* padding含めて幅計算 */
    overflow-x: hidden; /* 横スクロール防止 */
}

/* flow-steps を縦並び */
.flow-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    max-width: 600px;
    position: relative;
}

/* Flowタイトル */
.flow-title {
    text-align: center;
}

.flow-title h2 {
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    font-weight: 800;
    margin: 0 0 1rem 0;
}

/* ステップカード */
.flow-step {
    position: relative;
    background: var(--bg);
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 16px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .03),
        0 8px 24px -16px rgba(0, 0, 0, .35);
    z-index: 1;
}

/* ステップ1の後ろの棒は出さない */
.flow-step:first-of-type::before {
    content: none;
}

/* ステップ2以降にだけ縦棒を描画 */
.flow-step+.flow-step::before {
    content: "";
    position: absolute;
    left: 16px;
    top: -40px;
    width: 2px;
    height: 40px;
    background: var(--line);
    z-index: -1;
}

/* ステップ番号 */
.step-index {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    font-weight: 700;
    background: #fff;
    color: var(--accent);
    border: 2px solid var(--ring);
    display: grid;
    place-items: center;
}

/* タイトルと番号横並び */
.step-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    flex-wrap: wrap;
    /* 改行を許可してpを下に */
}

/* タイトル */
.step-head h3 {
    margin: 0;
    font-size: 1.1rem;
}

/* h3直後のpを下段に表示 */
.step-head h3+p {
    flex-basis: 100%;
    margin-top: 4px; /* 元の8pxより少し小さく */
    line-height: 1.6;
}
/* フロー内の段落の余白を調整 */
.flow-step p {
    margin: 2px 0; /* 上下マージンを小さく */
    line-height: 1.5; /* 行間も少し詰める */
}
/* Movieエリア16:9 */
.movieArea {
    display: flex;
    flex-direction: column;
    /* 横並びにならないよう縦積みに */
    gap: 16px;
    /* 上下の余白 */
}

.videoWrapper {
    display: block;
    /* 追加: ブロック表示で縦積み */
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 16px;
}

.videoWrapper img,
.videoWrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 画像はトリミング、動画はサイズに合わせる */
}

.youtubeWrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9比率 */
    margin-top: 16px;
    /* 上余白 */
}

.youtubeWrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* フェーズタイトル用 */
.phase-title h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 16px 0 8px 0;
    color: var(--accent);
}

/* フロー区分ごとの背景色 */
/* 各パネル */
.flow-section {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 32px;
    box-sizing: border-box;
}

/* 個別色 */
.flow-section.equipment {
    background-color: #f9f9ff;
}

/* 機材準備 */
.flow-section.requests {
    background-color: #f0fff4;
}

/* 依頼ステップ */
.flow-section.data-prep {
    background-color: #fff7f0;
}

/* データ準備 */
/* フェーズタイトルをフロー幅いっぱいに */
.phase-title {
    width: 100%;
    /* 親の幅いっぱい */
    padding: 12px 16px;
    border-radius: 8px;
    box-sizing: border-box;
}

/* 個別フェーズ色 */
.audio-phase {
    background-color: #f0f8ff;
    /* 薄いブルー */
}

.illustration-phase {
    background-color: #f0f8ff;
    /* 薄いブルー */
}

.video-phase {
    background-color: #f0f8ff;
    /* 薄いブルー */
}

.equipment-recommend {
    margin-top: 16px;
    text-align: center;
}

.equipment-recommend a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.equipment-recommend a:hover {
    text-decoration: underline;
}