* {
    box-sizing: border-box;
}

body {
    scroll-behavior: smooth;
    font-family: "Meiryo UI", "Noto Sans JP", sans-serif;
}

.o-inner {
    padding-inline: 20px;
    width: 100%;
    margin-inline: auto;
    box-sizing: border-box;

    @media (width >= 640px) {
        width: 976px;
        margin-inline: auto;
    }
}

.section-case-detail {
    margin-top: 48px;
}

.o-title-primary {
    font-size: 28px;
    font-weight: bold;
    line-height: 1.7;

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

.o-title-primary__sub {
    font-size: 20px;
    display: block;

    @media (width >= 640px) {
        display: inline;
        font-size: 28px;
        margin-right: 16px;
    }
}

.o-title-text {
    font-size: 18px;
    line-height: 1.4;
    margin-top: 16px;
    font-weight: 700;

    @media (width >= 640px) {
        font-size: 20px;
    }
}

.mv-image {
    width: 100%;
    margin-top: 40px;
    margin-bottom: 40px;
}

/* case-intro: Figma リフォームショップ紹介ブロック（モバイルファースト） */
.case-intro {
    position: relative;
    background: #f2f2f2;
    margin-top: 24px;
    margin-bottom: 24px;
}

.case-intro__bg {
    position: absolute;
    inset: 0;
    background: #f2f2f2;
    z-index: 0;
}

.case-intro__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 976px;
    margin-inline: auto;
    padding: 24px 16px 32px;
}

.case-intro__left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.case-intro__lead {
    font-size: 14px;
    font-weight: bold;
    color: #222;
    letter-spacing: 0.08em;
    margin: 0;
    line-height: 1.4;
}

.case-intro__title {
    font-size: 22px;
    font-weight: bold;
    color: #ba5d00;
    letter-spacing: 0.12em;
    margin: 0;
    line-height: 1.4;
}

.case-intro__desc {
    font-size: 14px;
    color: #222;
    letter-spacing: 0.04em;
    line-height: 1.7;
    margin: 0;
}

.case-intro__service-box {
    background: #fff;
    padding: 12px 16px 16px;
    margin-top: 8px;
}

.case-intro__service-box-ttl {
    font-size: 14px;
    font-weight: bold;
    color: #222;
    letter-spacing: 0.08em;
    margin: 0 0 12px;
    line-height: 1.4;
}

.case-intro__accent {
    color: #ba5d00;
}

.case-intro__service-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.case-intro__service-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #222;
    letter-spacing: 0.04em;
    line-height: 1.4;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.case-intro__service-item:last-child {
    border-bottom: none;
}

.case-intro__num {
    color: #ba5d00;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

/* SP: 右カラムは縦並び */
.case-intro__right {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-bottom: 16px;

    @media (width >= 640px) {
        flex-direction: column;
        margin-bottom: 0;
    }
}

.case-intro__illust {
    text-align: center;
    width: 100%;
    max-width: 86px;
    margin-inline: auto;
}

.case-intro__illust-img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.case-intro__bubble {
    background-image: url(../img/top/bubble.png);
    width: 184px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

   @media (width >= 640px) {
        padding: 12px 24px 12px 40px;
        background-size: cover;
        width: auto;
        display: block;
    }
}

.case-intro__bubble span {
    color: #ba5d00;
}

.case-intro__bubble-line {
    font-size: 14px;
    font-weight: bold;
    color: #222;
    letter-spacing: 0.08em;
    margin: 0;
    line-height: 1.4;
}

.case-intro__bubble-line + .case-intro__bubble-line {
    margin-top: 4px;
}

.case-intro__consult {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 0;
}

.case-intro__consult-ttl {
    font-size: 14px;
    font-weight: bold;
    color: #ba5d00;
    letter-spacing: 0.04em;
    margin: 0;
    padding-left: 24px;
    position: relative;
    line-height: 1.4;
}

.case-intro__consult-ttl::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #ba5d00;
    font-size: 14px;
}

.case-intro__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: #ba5d00;
    color: #fff !important;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 0.04em;
    line-height: 1.4;
    border: none;
    cursor: pointer;
    margin-top: 0;
    width: 100%;
    box-sizing: border-box;
    max-width: none;
    margin-top: 16px;

    @media (width >= 640px) {
        margin-top: 0;
        box-sizing: content-box;
    }
}

.case-intro__cta:hover {
    background: #a35200;
    color: #fff;

    .case-intro__cta-arrow {
        transform: translateX(10px);
    }
}

.case-intro__cta-badge {
    flex-shrink: 0;
    width: 33px;
    height: 33px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.case-intro__cta-badge-icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.case-intro__cta-badge-text {
    font-size: 11px;
    font-weight: bold;
    color: #ba5d00;
    letter-spacing: 0.04em;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.case-intro__cta-label {
    flex: 1;
    text-align: left;
    font-size: 14px;
    letter-spacing: -1px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1;
    gap: 7px;

    span {
        font-size: 11px;
    }
}

.case-intro__cta-label span {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.04em;
}

.case-intro__cta-arrow {
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.case-intro__cta-arrow img {
    display: block;
    width: 24px;
    max-width: 65px;
    height: 10px;
    filter: brightness(0) invert(1);
}

/* 640px以上: PC・タブレット */
@media (width >= 640px) {
    .case-intro {
        margin-top: 40px;
        margin-bottom: 40px;
    }

    .case-intro__inner {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
        padding: 48px 24px 40px;
    }

    .case-intro__lead {
        font-size: 16px;
    }

    .case-intro__title {
        font-size: 32px;
        letter-spacing: 0.24em;
    }

    .case-intro__desc {
        font-size: 16px;
    }

    .case-intro__service-box {
        padding: 16px 24px;
        margin-top: 11px;
    }

    .case-intro__service-box-ttl {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .case-intro__service-item {
        font-size: 18px;
        gap: 10px;
        padding: 8px 0;
    }

    .case-intro__num {
        font-size: 18px;
    }

    /* PC: 右カラムはイラスト＋吹き出しを横並び、その下に相談・CTA */
    .case-intro__right {
        display: flex;
        flex-direction: row;
        gap: 20px;
        margin-bottom: 30px;
    }

    .case-intro__illust {
        grid-column: 1;
        grid-row: 1;
        width: 86px;
        max-width: none;
        margin-inline: 0;
        text-align: right;
    }

    .case-intro__bubble {
        grid-column: 2;
        grid-row: 1;
    }

    .case-intro__consult {
        grid-column: 1 / -1;
        grid-row: 2;
        gap: 8px;
        margin-bottom: 22px;
    }

    .case-intro__cta {
        grid-column: 1 / -1;
        grid-row: 3;
        padding: 16px 24px;
        font-size: 20px;
        gap: 8px;
        margin-top: 13px;
        max-width: 338px;
        justify-content: flex-start;
    }

    .case-intro__bubble-line {
        font-size: 16px;
    }

    .case-intro__consult-ttl {
        font-size: 18px;
        padding-left: 28px;
        line-height: 1.35;
    }

    .case-intro__consult-ttl::before {
        font-size: 18px;
    }

    .case-intro__cta-badge {
        width: 40px;
        height: 40px;
    }

    .case-intro__cta-badge-text {
        font-size: 13px;
    }

    .case-intro__cta-label {
        font-size: 16px;
        letter-spacing: -0.7px;

        span {
            font-size: 12px;
        }
    }

    .case-intro__cta-arrow img {
        width: 100%;
        max-width: 37px;
    }
}

.section-concept {
    margin-top: 80px;
    padding-bottom: 120px;
}

.first-concept {
    margin-top: 72px;
}

.section-concept__image {
    width: 100%;

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

.section-concept__inner {
    padding-bottom: 72px;
    border-bottom: 1px solid #e6e6e6;
}

.section-concept__title {
    margin-bottom: 16px;
    margin-top: 30px;
}

.section-concept__desc {
    font-size: 16px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.8;
}

.o-concept-box__title {
    font-size: 28px;
    font-weight: 700;
    color: #222;
    line-height: 1.4;
    
    span {
        padding-right: 16px;
        margin-right: 16px;
        border-right: 1px solid #222;
    }

    @media (width >= 640px) {
        font-size: 32px;
    }
}

.c-concept-box__content {
    display: flex;
    flex-direction: column;
    margin-top: 48px;

    p {
        font-size: 14px;
        line-height: 2;
    }

    img {
        width: 100%;
    }

    @media (width >= 640px) {
        flex-direction: row;
        justify-content: space-between;
        gap: 32px;

        p {
            width: 100%;
            max-width: 462px;
        }

        img {
            max-width: 442px;
        }
    }
}

.c-concept-before-after {
    width: 100%;
    margin-top: 48px;
}

.c-concept-before-after-inner {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;

    figure {
        width: 100%;
        background-color: #fff;
        padding: 10px;
        
        img {
            margin-inline: auto;
            display: block;
            object-fit: contain;
            max-width: 100%;
            max-height: 235px;
        }
    }

    @media (width >= 768px) {
        flex-direction: row;

        figure {
            padding: 10px 0;
        }
    }
}

.c-concept-before-after-arrow {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    margin: auto;
    transform: translateY(-150%) rotate(90deg);

    @media (width >= 768px) {
        top: 200px;
        bottom: auto;
        transform: translateY(0) rotate(0);
    }
}

.c-concept-before,
.c-concept-after {
    padding: 48px 20px;
    width: 100%;
    box-sizing: border-box;

    @media (width >= 768px) {
        width: 50%;
        padding: 48px 40px;
    }
}

.c-concept-before {
    background-color: #E6E3DB;
}

.c-concept-after {
    background-color: #F0EDE4;
}

.c-concept-before-after-title {
    font-size: 20px;
    font-weight: bold;
    color: #222;
    margin-bottom: 16px;
}

.c-concept-before-after-subtitle {
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 32px;
    font-weight: 700;
    margin-bottom: 25px;
}

.c-concept-before-after-list {
    list-style: disc;
    padding-left: 9px;
}

.c-concept-before-after-list li {
    font-size: 16px;
    line-height: 1.4;
    color: #222;
    font-weight: 700;
    margin-bottom: 9px;
}

.concept-idea {
    margin-top: 80px;
}

.concept-idea__title {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 30px;
    font-weight: 700;

    @media (width >= 640px) {
        font-size: 32px;
    }
}

.concept-idea__content { 
    text-decoration: none;
    color: #222 !important;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s ease;

    @media (width >= 640px) {
        flex-direction: row;
        justify-content: space-between;
    }
}

.concept-idea__image {
    width: 100%;
    max-width: 442px;
}

.concept-idea__text-box {
    width: 100%;
    max-width: 462px;
}

.concept-idea__subtitle {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 16px;
}

.concept-idea__text {
    font-size: 16px;
    line-height: 2;
}

.cases {
    margin-top: 80px;
}

.cases__title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
}

.cases__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
    max-width: 80%;
    margin-inline: auto;

    @media (width >= 640px) {
        flex-direction: row;
        justify-content: flex-start;
        align-items: stretch;
        height: 190px;
        max-width: 100%;
        margin-inline: 0;
    }
}

.cases__list .cases__item {
    flex: 1;
    min-width: 0;
    transition: all 0.3s ease;

    @media (width >= 640px) {
        flex: 0 0 auto;
    }

    a:hover {
        opacity: 0.6;
    }
}

.cases__list .cases__item--tall {
    flex: 0 0 auto;
}

.cases__list .cases__item img {
    display: block;
    width: 100%;
    height: auto;
}

/* 1枚目のみ幅100%にしない（縦長のまま・高さで揃える） */
.cases__list .cases__item--tall img {
    width: auto;
    max-width: 100%;
    height: auto;
}

@media (width >= 640px) {
    .cases__list .cases__item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .cases__list .cases__item--tall img {
        width: auto;
        height: 100%;
        object-fit: contain;
    }
}

.section-gray {
    background-color: #f9f9f9;
    padding: 80px 0 60px;
    
    @media (width >= 640px) {
        padding: 120px 0 100px;
    }
}

.section-recommend {
    padding: 80px 0 60px;

    @media (width >= 768px) {
        padding: 120px 0 100px;
    }
}

.section-recommend__title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;

    @media (width >= 768px) {
        font-size: 32px;
        margin-bottom: 64px;
    }
}

.section-recommend__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 40px;

    @media (width >= 812px) {
        grid-template-columns: repeat(3, 1fr);
        padding-bottom: 80px;
    }
}

.section-recommend__item {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 4;
    background-color: #fff;
    box-shadow: 0 0 16px 0 rgba(34, 34, 34, 0.15);
    color:#222 !important;
    padding-bottom: 24px;
    gap: 16px;
    transition: all 0.3s ease;
    
    &:hover {
        opacity: 0.8;

        .section-recommend__button img {
            transform: translateX(10px);
        }
    }
}

.section-recommend__item img {
    width: 100%;
}

.section-recommend__text {
    padding: 16px;

    @media (width >= 768px) {
        padding: 24px;
    }
}

.section-recommend__item h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 16px;
    padding-inline: 16px;

    @media (width >= 768px) {
        font-size: 20px;
        padding-inline: 24px;
    }
}

.section-recommend__item p {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 20px;
    padding-inline: 16px;

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

.section-recommend__button {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    background-color: transparent;
    border: none;
    font-size: 14px;
    font-weight: 700;
    padding-inline: 16px;

    img {
        transition: all 0.3s ease;
    }

    span {
        min-width: 80px;
    }

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

.section-recommend__back {
    margin-top: 30px;

    @media (width >= 640px) {
        margin-top: 60px;
        width: 350px;
        margin-inline: auto;
    }
}

.section-recommend__back-link {
    display: block;
    position: relative;
    border: 2px solid #ba5d00;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    color: #ba5d00 !important;

    @media (width >= 640px) {
        padding: 25px 0;
        font-size: 16px;

        &:hover {
            &::before {
                transform: translateY(-50%) translateX(-10px);
            }
        }
    }
}

.section-recommend__back-link::before {
    content: "";
    position: absolute;
    width: 52px;
    height: 10px;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    background-image: url(../img/top/arrow-orange.svg);
    background-size: 52px 10px;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
}

.case-anchor {
    margin-top: 60px;
    padding-bottom: 60px;

    @media (width >= 640px) {
        margin-top: 80px;
        padding-bottom: 110px;
    }
}

.case-anchor__title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 32px;

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

.case-anchor__list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;

    .case-anchor__item {
        width: calc(50% - 12px);
        display: flex;
        flex-direction: column;
        padding-bottom: 10px;
        text-align: center;
        color: #222 !important;
        font-size: 18px;
        font-weight: 700;
        line-height: 1.2;
        background-color: #fff;
        box-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.15);

        > p {
            flex-grow: 1;
            margin-bottom: 4px;
        }

        > img {
            width: 100%;
            margin-bottom: 10px;
        }

        span img {
            transition: all 0.3s ease;
        }
    }


    @media (width >= 640px) {
        flex-direction: row;
        justify-content: space-between;


        .case-anchor__item {
            width: calc(100% / 5 - 24px);
            font-size: 19px;

            span img {
                width: 16px;
                height: 32px;
            }
        }
    }
}

.case-anchor__item:hover {
    span img {
        transform: translateY(10px);
    }
}

.case-anchor__item:not(:nth-child(4)) {
    p {
        padding-top: 10px;
    }
}

.case-list-item {
    display: flex;
    flex-direction: column;
    gap: 40px;

    @media (width >= 640px) {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;

        figure {
            margin-top: 24px;

            @media (width >= 640px) {
                margin-top: 0;
                display: block;
                max-width: 680px;
                height: auto;
                margin-right: calc(50% - 50vw);
            }

            @media (width >= 1500px) {
                max-width: 840px;
            }
        }

        figure img {
            width: 100%;

            @media (width >= 640px) {
                height: auto;
                max-width: 680px;
            }

            @media (width >= 1500px) {
                max-width: 840px;
            }
        }

        &.case-list-item__reverse {
            flex-direction: row-reverse;

            figure {
                margin-right: 0;
                margin-left: calc(50% - 50vw)
            }
        }
    }
}

.case-list-item__text {

    @media (width >= 640px) {
        max-width: 448px;
    }

    h2 {
        font-size: 26px;
        font-weight: 700;
        margin-bottom: 24px;

        @media (width >= 640px) {
            font-size: 32px;
            margin-bottom: 32px;
        }
    }
    
    p {
        font-size: 14px;
        margin-bottom: 28px;
        line-height: 1.6;

        @media (width >= 640px) {
            font-size: 16px;
            margin-bottom: 40px;
        }
    }
}

.case-list-item__button {
    display: block;
    color: #ba5d00 !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    border: 2px solid #ba5d00;
    position: relative;
    padding: 8px 0;

    @media (width >= 640px) {
        padding: 25px 0;
        font-size: 16px;
    }

    &::after {
        content: "";
        position: absolute;
        width: 52px;
        height: 10px;
        right: -16px;
        top: 50%;
        transform: translateY(-50%);
        background-image: url(../img/list/arrow-right.svg);
        background-size: 52px 10px;
        background-repeat: no-repeat;
        transition: all 0.3s ease;
    }

    &:hover {
        &::after {
            transform: translateY(-50%) translateX(10px);
        }
    }
}

.section-case-detail {
    margin-bottom: 80px;
}

.section-otherpages {
    padding: 80px 0;

    @media (width >= 640px) {
        padding: 120px 0;
    }
}

.section-otherpages__title {
    font-size: 28px;
    font-weight: 700;
    color: #222;
    text-align: center;
    margin-bottom: 40px;
    
    @media (width >= 640px) {
        font-size: 32px;
        margin-bottom: 64px;
    }
}

.section-otherpages__list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;

    @media (width >= 640px) {
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: nowrap;
    }
}

.section-otherpages__item {
    display: block;
    transition: all 0.3s ease;
    width: calc(50% - 12px);
    box-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.15);

    @media (width >= 640px) {
        width: calc(100% / 4 - 24px);
    }

    span {
        background-color: #fff;
        font-size: 16px;
        font-weight: 700;
        color: #222 !important;
        text-align: center;
        padding: 10px 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 52px;
        width: 100%;

        @media (width >= 640px) {
            font-size: 20px;
            height: 60px;
        }
    }

    img {
        width: 100%;
    }

    &:hover {
        opacity: 0.8;
    }
}