/* 修正 */
.sec_plan .planBox > .item .detail > dt{
    border-radius: 16px 16px 0 0;
}

.sec_plan .planBox > .item .detail > dt span::before{
    content: none;
}

.sec_plan .planBox > .item .detail > dt{
    height: auto;
}

.sec_plan .planBox > .item .detail > dt::before{
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
}

.sec_plan .planBox > .item .detail > dt span{
    padding: 20px 0 24px;
    line-height: 1;
}



/* 新規要素 */

.sec_plan_choice{
    padding: 80px 0 40px;

    @media screen and (max-width: 640px) {
        padding: 80px 20px 40px;
    }

    & h3{
        text-align: center;
        font-family: "hannari";
        font-weight: 400;
        font-size: 0.3rem;
        letter-spacing: 0.15em;

        @media screen and (max-width: 640px) {
        font-size: 0.27rem;
    }
    }

    & p{
        font-family: source-han-serif-japanese, serif;
        font-style: normal;
        font-weight: 400;
        font-size: 0.18rem;
        letter-spacing: 0.11em;
        line-height: 2;
        color: #473933;
        text-align: center;
        margin-top: 0.4rem;
    }

    &.sec_plan_choice02{
        padding: 80px 0 0;

        @media screen and (max-width: 640px) {
            padding: 80px 20px 0;
        }
    }
}

.funeral_plan_box{
    --mincyo: "游明朝", YuMincho, "Hiragino Mincho ProN", "HG明朝E", "ＭＳ Ｐ明朝", "ＭＳ 明朝", serif;

    --plan-color02: #9B9F5B;
    --plan-color03: #CDA949;
    --plan-color04: #B88465;
    --plan-color05: #9D8CAE;

    --plan-arrow02: url('../img/area/arrow_r_02.svg');
    --plan-arrow03: url('../img/area/arrow_r_03.svg');
    --plan-arrow04: url('../img/area/arrow_r_04.svg');
    --plan-arrow05: url('../img/area/arrow_r_05.svg');

    --planlink-color02: #F5F4EB;
    --planlink-color03: #F5EEDA;
    --planlink-color04: #F0E7DF;
    --planlink-color05: #ECEAEF;

    /* デフォルト（01など） */
    --plan-accent: #218A91;
    --plan-arrow-current: url('../img/area/arrow_r_01.svg');
    --planlink: #EBF6F7;

    --plan-layout: calc(100% - 350px);
    --plan-layout100: 100%;

    --plan-column: row;
    --plan-column_sp: column;

    --arrowimg: url('../common/img/plan_arrow_gr.svg');
    --arrowimg-01: url('../common/img/plan_arrow_gry.svg');

    &.funeral_plan04,&.funeral_plan05{
        --members_price_margin: 0 auto;
        --normal_price_margin: 0 0 0 auto;
    }

    /* プラン別：アクセント色だけ上書き */
    &.funeral_plan02{ --plan-accent: var(--plan-color02); }
    &.funeral_plan03{ --plan-accent: var(--plan-color03); }
    &.funeral_plan04{ --plan-accent: var(--plan-color04); }
    &.funeral_plan05{ --plan-accent: var(--plan-color05); }

    /* 矢印 */
    &.funeral_plan02{ --plan-arrow-current: var(--plan-arrow02); }
    &.funeral_plan03{ --plan-arrow-current: var(--plan-arrow03); }
    &.funeral_plan04{ --plan-arrow-current: var(--plan-arrow04); }
    &.funeral_plan05{ --plan-arrow-current: var(--plan-arrow05); }

    /* 矢印 */
    &.funeral_plan02{ --planlink: var(--planlink-color02); }
    &.funeral_plan03{ --planlink: var(--planlink-color03); }
    &.funeral_plan04{ --planlink: var(--planlink-color04); }
    &.funeral_plan05{ --planlink: var(--planlink-color05); }

    &.funeral_plan04{ --planlink: var(--planlink-color04); }
    &.funeral_plan05{ --planlink: var(--planlink-color05); }

    &.funeral_plan04,&.funeral_plan05{ 
        --plan-layout: var(--plan-layout100);
        --plan-column: var(--plan-column_sp);
    }

    &.funeral_plan02{ --arrowimg: var(--arrowimg-01); }
    


}

.funeral_plan_layout_wrapper{
    max-width: 900px;
    margin: 0 auto;

    @media screen and (max-width: 640px) {
        padding: 0 20px;
    }
}


.funeral_plan_box{
    background: #ffffff;
    border-radius: 40px;
    box-sizing: border-box;
    margin-bottom: 40px;
    position: relative;

    @media screen and (max-width: 640px) {
        border-radius: 10px;
    }

    & *{
        box-sizing: border-box;
    }

    & .favtag{
        position: absolute;
        font-family:  var(--mincyo);
        font-size: 18px;
        background: #FFC506;
        text-align: center;
        padding: 10px;
        border-radius: 50%;
        line-height: 1;
        top: -10px;
        left: -30px;
        z-index: 10;

        & b{
            display: block;
            font-weight: normal;
            font-size: 1.2em;
        }

        @media screen and (max-width: 640px) {
            font-size: 15px;
            left: -15px;
        }
    }

    & .funeral_plan_box_wrapper{
        padding: 24px;
        display: flex;
        gap: 20px;
        align-items: stretch;

        @media screen and (max-width: 640px) {
            padding: 0;
        }


        & > figure{
            width: 350px;
        }

        & .funeral_plan_info{
            width: var(--plan-layout);

            @media screen and (max-width: 640px) {
                width: 100%;
            }


            & .funeral_plan_head{
                display: flex;
                align-items: center;
                justify-content: flex-start;
                gap: 10px;
                margin-bottom: 10px;
                background: var(--plan-accent);
                color: #fff;
                padding: 14px 18px;
                line-height: 1;
                border-radius: 10px;
                height: 70px;
                position: relative;

                &::after{
                    position: absolute;
                    content: "";
                    display: block;
                    top: 50%;
                    transform: translateY(-50%);
                    right: 10px;
                    margin: auto 0;
                    width: 40px;
                    height: 40px;
                    opacity: 0.6;
                    background-image: url(../common/img/plan_arrow_gr.svg);
                    background-image: var(--arrowimg);
                    background-repeat: no-repeat;
                    background-position: center;
                    background-size: contain;

                    @media screen and (max-width: 640px) {
                        top: 13px;
                        transform: none;
                    }

                }


                & h3{
                    font-size: 34px;
                    font-weight: 500;
                    border-radius: 16px;
                    margin: 0;
                    white-space: nowrap;
                    font-family: var(--mincyo);
                }

                & dl{
                    margin: 0;
                    text-align: left;

                    & dt{
                        font-size: 16px;
                        font-weight: 700;
                        color: #F9F0D4;
                        margin: 0;
                        line-height: 1.3;
                    }

                    & dd{
                        font-size: 14px;
                        margin: 0;
                        line-height: 1.3;
                    }
                }

                @media screen and (max-width: 640px) {
                    flex-direction: column;
                    margin-bottom: 0;
                    height: auto;
                    padding: 0;
                    gap: 0;

                    & h3{
                        border-radius: 16px 16px 0 0;
                        padding: 16px 0;
                    }

                    & dl{
                        width: 100%;
                        background: var(--planlink);
                        color: #333;
                        padding: 16px 0;
                        text-align: center;

                        & dt{
                            color: #333;
                        }
                    }
                }
            }

            & .funeral_plan_detail{
                padding-bottom: 10px;

                @media screen and (max-width: 640px) {
                    padding: 0px 20px 20px 20px;
                }

                & .funeral_plan_price{
                    display: flex;
                    align-items: baseline;
                    justify-content: center;
                    flex-wrap: nowrap;
                    padding-top: 14px;
                    font-family: var(--mincyo);
                    flex-direction: var(--plan-column);
                    text-align: center;
                    line-height: 1;
                    gap: 10px;
                    margin-bottom: 5px;

                    @media screen and (max-width: 640px) {
                        flex-direction: column;
                    }

                    & .funeral_members_price{
                        font-size: 62px;
                        font-weight: 500;
                        font-family: var(--mincyo);
                        margin: var(--members_price_margin);
                        white-space: nowrap;

                        @media screen and (max-width: 640px) {
                            font-size: 60px;
                            width: 100%;
                            text-align: center;
                        }

                        @media screen and (max-width: 414px) {
                            font-size: 50px;
                        }


                        & span{
                            font-size: 45px;
                            font-weight: 400;
                            position: relative;

                            @media screen and (max-width: 640px) {
                                font-size: 40px;
                            }

                            & i{
                                font-style: normal;
                                position: absolute;
                                top: -14px;
                                left: -6px;
                                font-size: 14px;
                            }
                        }
                    }

                    & .funeral_normal_price{
                        font-size: 26px;
                        font-weight: normal;
                        color: #2b2b2b;
                        line-height: 1;
                        margin: 0 0 0 10px;
                        margin: var(--normal_price_margin);
                        white-space: nowrap;

                        @media screen and (max-width: 640px) {
                            width: 100%;
                            margin: 0;
                            text-align: right;
                        }

                        & span{
                            font-size: 14px;
                            font-weight: bold;
                            color: #5e5e5e;

                            & i{
                                font-style: normal;
                                font-weight: normal;
                            }
                        }
                    }
                }

                & .funeral_plan_option{
                    font-size: 18px;
                    font-weight: bold;
                    color: #2b2b2b;
                    padding-left: 24px;
                    margin-bottom: 15px;
                    text-align: center;

                    & span{
                        position: relative;
                        font-size: 14px;

                        &::before{
                            content: "";
                            position: absolute;
                            left: -24px;
                            top: -2px;
                            width: 20px;
                            height: 20px;
                            border-radius: 999px;
                            background: var(--plan-accent);
                            background-image: url('../img/area/icon_plus.svg');
                            background-position: center;
                            background-repeat: no-repeat;
                            background-size: 10px;
                            color: #fff;
                            font-size: 18px;
                            font-weight: 700;
                            line-height: 24px;
                            text-align: center;
                        }
                    }
                }

                & .funeral_plan_hakodate_area{
                    margin: 0 auto;
                    background: #FFC506;
                    color: #333;
                    font-weight: bold;
                    padding: 6px 30px;
                    margin-bottom: 20px;
                    font-size: 16px;
                    line-height: 1;
                    border-radius: 5px;

                    @media screen and (max-width: 640px) {
                        padding: 6px 10px;
                    }
                }
            }
        }

        & .funeral_plan_image{
            margin: 0;
            border-radius: 10px;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;

            &.sp-image{
                display: none;

                @media screen and (max-width: 640px) {
                    display: block;
                }
            }

            & img{
                width: 100%;
                height: 100%;
                display: block;
                object-fit: cover;
                object-position: center;
            }

            @media screen and (max-width: 640px) {
                display: none;
                padding: 20px 20px 10px 20px;

                &.sp-fiximg{
                    display: block;
                }
            }
        }
    }

    & .funeral_plan_text{
        font-size: 16px;
        line-height: 1.9;
        color: #2b2b2b;
        padding: 0px 24px 24px;
    }

    & .funeral_plan_note{
        font-size: 16px;
        line-height: 1.8;
        color: #2b2b2b;
        border: 1px solid #2b2b2b;
        border-radius: 14px;
        padding: 10px 16px;
        margin: 0px 24px 18px 24px;
        background: #fff;
        text-align: center;
    }

    & .funeral_plan_link{
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        text-decoration: none;
        color: #2b2b2b;
        font-size: 18px;
        font-weight: 700;
        padding: 8px 0;
        background: var(--planlink);
        margin-top: auto;

        &::after{
            content: "";
            width: 34px;
            height: 34px;
            border-radius: 999px;
            background: #ffffff;
            background-image: url('../img/area/detial_link_arrow_r.svg');
            background-position: 14px center;
            background-repeat: no-repeat;
            background-size: 8px;
            border: 1px solid #d9d9d9;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
            line-height: 1;
        }
    }
}

.funeral_plan_meta {
    display: flex;
    gap: 14px;
    flex-wrap: nowrap;

    @media screen and (max-width: 640px) {
        flex-direction: column;
    }

    & dl {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 12px 16px;
        background: #f3f4f5;
        border-radius: 10px;
        gap: 8px;

        @media screen and (max-width: 640px) {
            justify-content: center;
        }

        & dt {
            font-size: 14px;
            font-weight: 700;
            color: #2b2b2b;
            margin: 0;
            white-space: nowrap;
        }

        & dd {
            margin: 0;
            font-size: 16px;
            font-weight: 700;
            color: var(--plan-accent);
            white-space: nowrap;
        }
    }

    /* 日数 */
    & .funeral_plan_meta_day {
        background: #f3f4f5;
        border-radius: 4px;
        width: 100%;

        & dl{
            align-items: center;

            & dd {
                background: var(--plan-accent);
                color: #fff;
                padding: 8px 12px;
                border-radius: 4px;
                font-size: 14px;
                font-weight: 700;
                line-height: 1;
                position: relative;

                @media screen and (max-width: 640px) {
                    font-size: 12px;
                }

                &::after{
                    position: absolute;
                    content: "";
                    width: 8px;
                    height: 2px;
                    top: 50%;
                    left: -8px;
                    transform: translateY(-50%);
                    background: var(--plan-accent);
                }

                &:first-of-type::after{
                    content: none;
                }

                &:last-of-type::after{
                    position: absolute;
                    content: "";
                    width: 8px;
                    height: 16px;
                    background: transparent;
                    background-image: var(--plan-arrow-current);
                    background-position:  -8px center;
                    background-repeat: no-repeat;
                    background-size: 16px;
                    top: 50%;
                    left: -8px;
                    transform: translateY(-50%);
                }
            }
        }

        & .metaday_caution{
            position: relative;
            text-align: center;
            font-size: 14px;
            top: -7px;
        }
    }
}

.sec_plan .planBox > .item .detail > dd .plan_text{
    text-align: center;
    font-size: 14px;
    height: 16px;
    padding-top: 10px;
}