.top_propose .tpro_det {
    margin-block: 0 0;

    @media (width>=768px) {
        margin-block: 0 24px;
    }
}

.front-best-plan {
    @media (width>=768px) {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 32px;
    }

    & .plan {
        margin-block: 100px 0;
        padding-inline: 24px;
        padding-block: 0 24px;

        border-radius: 6px;
        background-color: #ffffff;
        border: 1px solid #ffffff;

        @media (width>=768px) {
            padding-inline: 32px;
        }

        & .head {
            display: flex;
            flex-direction: column;
            justify-content: center;
            min-height: 100px;
            padding-inline: 32px;
            margin-block: -70px 50px;

            border-radius: 16px 16px 16px 0;
            background-color: #8f3232;
            background-image: url('../img/front/best-plan/head-bg.svg');
            background-repeat: no-repeat;
            background-size: 40px auto;
            background-position: left 16px center;

            color: #ffffff;
            font-size: 14px;
            line-height: 1.8;

            position: relative;

            @media (width >=768px) {
                min-height: 120px;
                background-size: 60px auto;
                font-size: 22px;
            }

            &::before {
                content: "";
                display: block;
                width: 32px;
                aspect-ratio: 1/1;

                border-radius: 0 0 0 8px;
                background-color: #8f3232;
                clip-path: polygon(0% 0%, 0% 100%, 100% 0%);

                position: absolute;
                left: 0;
                top: calc(100% - 1px);
                z-index: 1;
            }

            &::after {
                content: "";
                display: block;
                width: 96px;
                aspect-ratio: 1/1;

                background-image: var(--plan-img);
                background-repeat: no-repeat;
                background-size: contain;
                background-position: center;

                position: absolute;
                right: 0;
                bottom: -32px;
                z-index: 1;
            }

            & span {}
        }

        & .content {
            &>.primary {
                & .badge {
                    width: fit-content;
                    margin-block: 0 8px;
                    padding-block: 8px;
                    padding-inline: 24px;

                    border-radius: 10em;
                    background-color: #b88b5f;
                    color: #ffffff;
                    font-size: 14px;
                    line-height: 1;

                    @media (width>=768px) {
                        font-size: 18px;
                    }
                }

                & .catch {
                    color: var(--plan-color);
                    font-size: 20px;
                    font-weight: 700;
                    line-height: 2;

                    @media (width>=768px) {
                        font-size: 28px;
                    }

                    & .line {
                        background-image: linear-gradient(to top, #ebd9c7, #ebd9c7);
                        background-repeat: no-repeat;
                        background-size: 100% 6px;
                        background-position: bottom 2px left;
                    }

                    & .charm {
                        position: relative;
                        display: inline-block;
                        width: 0;
                        height: 1em;

                        &::before {
                            content: "";
                            display: block;
                            width: 1em;
                            aspect-ratio: 1/1;

                            background-color: var(--plan-color);
                            mask-image: url('../img/front/best-plan/charm.svg');
                            mask-repeat: no-repeat;
                            mask-size: contain;
                            mask-position: center;

                            position: absolute;
                            top: -0.4em;
                        }
                    }

                    & .large {
                        display: block;

                        color: #3f352d;
                        font-size: 24px;

                        @media (width < 768px) {
                            text-align: center;
                        }

                        @media (width>=768px) {
                            font-size: 36px;
                        }
                    }
                }
            }

            &>.secondary {
                padding: 32px;
                border-radius: 16px;
                background-color: #f2eee7;
                color: #3f352d;
                font-size: 18px;
                line-height: 1.8;

                @media (width < 768px) {
                    display: none;
                }
            }
        }

        & .link {
            margin-block: 16px 0;
            text-align: right;

            @media (width>=768px) {
                margin-block: 32px 0;
            }

            & a {
                display: inline-flex;
                align-items: center;
                gap: 8px;

                padding-block: 8px;

                color: #3f352d;
                font-size: 14px;
                font-weight: 700;

                @media (width>=768px) {
                    gap: 16px;
                    font-size: 16px;
                }

                &::after {
                    content: "";
                    display: block;
                    width: 1.3em;
                    aspect-ratio: 1/1;
                    background-image: url('../img/front/best-plan/arrow.png');
                    background-repeat: no-repeat;
                    background-size: contain;
                    background-position: center;

                    @media (width>=768px) {
                        width: 1.5em;
                    }
                }

                &:hover {
                    opacity: 0.7;
                }
            }
        }

        &.plan1 {
            --plan-color: #4f8788;
            --plan-img: url('../img/front/best-plan/plan1.png');
        }

        &.plan2 {
            --plan-color: #7f759a;
            --plan-img: url('../img/front/best-plan/plan2.png');
        }

        &.plan3 {
            --plan-color: #4b85ae;
            --plan-img: url('../img/front/best-plan/plan3.png');
        }

        &.plan4 {
            --plan-color: #aa8075;
            --plan-img: url('../img/front/best-plan/plan4.png');
        }

        @media (width>=768px) {
            &:nth-child(1) {
                flex-basis: 100%;

                & .head {
                    max-width: 480px;

                    &::after {
                        width: 150px;
                        bottom: -50px;
                    }
                }

                & .content {
                    display: flex;
                    gap: 48px;

                    @media (width<=1000px) {
                        flex-wrap: wrap;
                    }

                    &>.primary {
                        flex-basis: 440px;
                        flex-shrink: 0;
                        padding-inline: 16px 0;
                    }

                    &>.secondary {
                        flex-grow: 1;
                    }
                }
            }

            &:nth-child(n + 2) {

                display: flex;
                flex-direction: column;

                flex-basis: calc((100% - (32px * 2)) / 3);
                min-width: 360px;

                & .head {
                    font-size: 18px;

                    &::after {
                        width: 80px;
                    }
                }

                & .content {
                    flex-grow: 1;
                    display: flex;
                    flex-direction: column;

                    &>.primary {
                        & .catch {
                            text-align: center;

                            & .line {
                                &::before {
                                    content: "";
                                    display: block;
                                }
                            }
                        }
                    }

                    &>.secondary {
                        flex-grow: 1;
                        margin-block: 24px 0;
                    }
                }
            }
        }
    }
}
