.page-hero {
    position: relative;
    height: 40vh;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    margin-top: var(--header-height);
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.6);
}

.page-hero-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
}

.worry-card {
    background: var(--white);
    padding: 0;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
    border: 1px solid var(--border-light);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 画像エリア：大きく表示 */
.worry-card-image {
    width: 100%;
    height: 280px;
    position: relative;
    background-color: var(--bg-pale);
}

.worry-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    z-index: 0;
}

/* グラデーションオーバーレイ：画像下部を白にフェード */
.worry-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #ffffff 100%);
    z-index: 1;
    pointer-events: none;
}

/* テキストエリア：画像に被せるレイアウト */
.worry-card-body {
    padding: 0 1.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

/* 吹き出しスタイル */
.speech-bubble {
    position: relative;
    background: #eef8ff;
    border-radius: 15px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.9rem;
    width: 100%;
    line-height: 1.6;
    margin-top: -3rem;
    /* 画像の上に配置 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 2px solid #fff;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 8px 0 8px;
    border-color: #eef8ff transparent transparent transparent;
}

/* --- カリキュラムリスト (デザイン刷新) --- */
.curriculum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    /* 幅を少し広めに確保 */
    gap: 2rem;
    /* カード間の余白を広げる */
    max-width: 1000px;
    margin: 0 auto;
}

.curriculum-item {
    background: var(--white);
    border-radius: 20px;
    /* 角丸を柔らかく */
    padding: 2.5rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* 柔らかく広がる影 */
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 174, 239, 0.1);
    /* 極薄い青の境界線で清潔感を */
    position: relative;
    overflow: hidden;
}

/* 数字の装飾 (01, 02...) */
.curriculum-num {
    position: absolute;
    top: -15px;
    right: -10px;
    font-family: var(--font-en);
    font-weight: 800;
    font-size: 5rem;
    line-height: 1;
    color: var(--primary);
    opacity: 0.08;
    /* 背景に薄く透かしとして配置 */
    pointer-events: none;
}

/* タイトルエリア */
.curriculum-header {
    margin-bottom: 1.2rem;
    position: relative;
}

.curriculum-en {
    display: block;
    font-family: var(--font-en);
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.curriculum-header h4 {
    font-size: 1.3rem;
    margin-bottom: 0;
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.4;
}

/* 本文 */
.curriculum-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 0;
}

/* アクセントバー（左上の飾り） */
.curriculum-item::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    width: 4px;
    height: 35px;
    background-color: var(--accent);
    /* 黄色のアクセント */
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* スマホ対応 */
@media (max-width: 600px) {
    .curriculum-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .curriculum-item {
        padding: 2rem 1.5rem;
    }

    .curriculum-num {
        font-size: 4rem;
    }
}

/* --- 料金カード --- */
.price-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    max-width: 800px;
    /* 修正箇所: 上部に3remの余白を追加し、見出しとのスペースを確保 */
    margin: 3rem auto 0;
    border: 1px solid var(--border-light);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
}

.price-row:last-child {
    border-bottom: none;
}

.price-label {
    font-weight: 700;
    color: var(--text-light);
    font-size: 1rem;
}

.price-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

.price-highlight {
    font-size: 2rem;
    color: var(--primary);
    font-family: var(--font-en);
    font-weight: 700;
}

.price-sub {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 400;
    margin-left: 0.3rem;
}

/* スマホ対応調整 */
@media (max-width: 600px) {
    .price-card {
        padding: 1.5rem;
    }

    .price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .price-value,
    .price-row div {
        align-self: flex-end;
        text-align: right;
    }

    .worry-card-image {
        height: 200px;
        /* スマホでは画像の高さを少し抑える */
    }
}

/* --- CTA Band (コースページ用) --- */
.cta-band {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 3.5rem 0;
    color: var(--white);
    text-align: center;
}

.cta-band h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.cta-band .btn {
    background-color: var(--white);
    color: var(--primary);
    border: none;
    font-weight: 700;
    padding: 1.2rem 3rem;
}

.cta-band .btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* =========================================
   Trial Form (Final Refined & Scrolling Fixed)
   ========================================= */

/* 全画面レイアウト：スクロールバーを右端に配置 */
.trial-main {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-pale);
    z-index: 9999;
    /* 個別ステップではなく、この親要素でスクロールを管理 */
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

/* 左上の「ホームへ戻る」：画面に固定 */
.back-home-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10010;
}

.back-home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.85rem;
    padding: 8px 20px;
    border-radius: 50px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: all 0.3s;
}

/* プログレスバー：最上部に固定 */
.form-progress-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: #eef2f5;
    z-index: 10002;
}

.form-progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* コンテンツ表示エリア：上下に固定パーツ分の余白を確保 */
.form-card.is-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 5% 140px;
    /* 下部ボタンが重ならないよう広めに設定 */
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    min-height: 100%;
}

/* ステップ制御：内部スクロールを無効化 */
.form-step {
    display: none !important;
    width: 100%;
    /* スクロールを一本化するため max-height と overflow を削除 */
}

.form-step.is-active {
    display: block !important;
}

/* 質問タイトル */
.step-question {
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--text-main);
}

.step-question span {
    display: block;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-en);
}

/* STEP 01: 2x2 グリッド & モバイル最適化 */
.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.choice-item {
    background: #fff;
    border: 2px solid var(--border-light);
    padding: 1.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: center;
    font-weight: 700;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.choice-item:hover {
    border-color: var(--primary);
    background: var(--bg-pale);
}

.choice-item.is-selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* STEP 03: 学校種別選択ボタン */
.school-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.school-type-item {
    background: #fff;
    border: 2px solid var(--border-light);
    padding: 1rem 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: center;
    font-weight: 700;
    transition: all 0.3s;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.school-type-item.is-selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* STEP 03: 学年セレクトボックス */
.select-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

#gradeSelectContainer {
    display: none;
    margin-top: 1.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

#gradeSelectContainer.is-visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.form-input-select {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    text-align: center;
}

.select-wrapper::after {
    content: "";
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-70%) rotate(45deg);
    width: 10px;
    height: 10px;
    border-right: 3px solid var(--primary);
    border-bottom: 3px solid var(--primary);
    pointer-events: none;
}

/* STEP 05: スケジュールブロック */
.schedule-block {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 2rem;
    text-align: left;
}

.schedule-block label {
    font-weight: 800;
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

.time-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.time-chip {
    padding: 0.5rem 0.2rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    text-align: center;
    font-size: 0.8rem;
    cursor: pointer;
    background: #fff;
}

.time-chip.is-selected {
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 700;
}

/* 下部ナビゲーション：最下部に固定 */
.form-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 10005;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* レスポンシブ調整 */
@media (max-width: 600px) {
    .form-card.is-full {
        padding: 80px 20px 120px;
    }

    .step-question {
        font-size: 1.4rem;
    }

    .choice-grid .choice-item {
        font-size: 0.85rem;
        white-space: nowrap;
        padding: 1.2rem 0.4rem;
    }

    .school-type-item {
        font-size: 0.9rem;
        padding: 0.8rem 0.2rem;
    }

    .time-chip-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =========================================
   Instructor/Message Section
   ========================================= */
.instructor-wrapper {
    display: flex;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
    flex-direction: column;
}

.instructor-img-col {
    width: 100%;
    min-height: 250px;
}

.instructor-img-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.instructor-info-col {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 900px) {
    .instructor-wrapper {
        flex-direction: row;
    }

    .instructor-img-col {
        flex: 1;
        min-height: 400px;
    }

    .instructor-info-col {
        flex: 1;
        padding: 3rem;
    }
}

/* =========================================
   Page Hero Mobile Styles
   ========================================= */
@media (max-width: 768px) {
    .page-hero {
        height: 35vh;
        min-height: 280px;
        margin-top: calc(var(--header-height) - 20px);
    }

    .page-title {
        font-size: 2rem;
        letter-spacing: 0.08em;
    }

    .page-subtitle {
        font-size: 0.9rem;
        letter-spacing: 0.15em;
    }
}