@font-face {
    font-family: 'check-point';
    src: url('./CP\ Font.woff2') format('woff2');
}

:root {
    --backgroundColor: #f2ece2;
    --backgroundColor-dark: #ebdcc4;
    --size-smartphone: 600px
}

* {
    font-family: "Zen Kaku Gothic New", sans-serif;
}

html {
    scroll-behavior: smooth;
    /* scroll-snap-type: y mandatory; */

    &:has(.modal.is-open) {
        overflow: hidden;
    }
}

dialog {
    position: fixed;
    opacity: 0;
    border: 1px solid #ababab;
    border-radius: .5rem;
    translate: 0 20px;
    overflow: hidden;
    width: 90%;
    max-width: 1350px;
    transition:
        opacity 1s,
        translate 1s,
        overlay 1s allow-discrete,
        display 1s allow-discrete;

    &[open] {
        opacity: 1;
        translate: 0 0;

        @starting-style {
            opacity: 0;
            translate: 0 20px;
        }
    }

    &::backdrop {
        opacity: 0;
        transition: opacity 1s;
    }

    &[open]::backdrop {
        opacity: 1;

        @starting-style {
            opacity: 0;
        }
    }
    & .custom-close-button {
        position: absolute;
        top: 0rem;
        right: 0rem;
        z-index: 9999;
    }
    & .dialog-container{
        padding: 1.5rem;
        overflow: auto;
        height: fit-content;
        max-height: calc(100vh - 4rem);
        & h2,
        & .title{
            text-align: center;
            border-bottom: 1px solid #ccc;
        }
        & p{
            margin-bottom: 1rem;
        }
        & .img-wrapper{
            display: grid;
            grid-template-columns: repeat(auto-fit,minmax(280px, 1fr));
            gap: .5rem;
            & img{
                max-width: 280px;
                height: auto;
            }
        }
    }
}

.modal {
    display: none;
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(204, 204, 204, 0.3);
    transition: .5s;

    & .modal-container {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: block;
        width: 90%;
        height: 90%;
        background-color: #fff;
        border-radius: 1.25rem;
        border: 1px solid #ccc;
        box-shadow: 1px 1px 3px #ababab;
        overflow: hidden;

        & .custom-close-button {
            position: absolute;
            top: 0rem;
            right: 0rem;
            z-index: 9999;
        }
    }

    &.is-open {
        display: block;
        opacity: 1;
        z-index: 999;
        @starting-style {
            /* ここにdisplay:none;は書かない */
            opacity: 0;
        }
    }
}

#loading {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s, visibility 0.6s;

    &.is-hidden {
        opacity: 0;
        visibility: hidden;
    }

    /* スピナー */
    & .spinner {
        width: 50px;
        height: 50px;
        border: 3px solid #eee;
        border-top-color: var(--school-image-color);
        /* 学校カラーに合わせて */
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


.parallax-bg{
  position:absolute;
  inset:-20%;          /* ← 上下左右に20%はみ出させて、動いても隙間が出ないようにする */
  background-size:cover;
  background-position:center;
  will-change:transform;  /* ← GPUアクセラレーションのヒント */
}

.dark-overlay{
  position:absolute;inset:0;
  background:linear-gradient(135deg,rgba(0,0,0,.55) 0%,rgba(0,0,0,.25) 100%);
  z-index:1;
}


.container {
    margin: 0;
    padding: 0;
    width: 100%;
    height: fit-content;
    background-color: var(--backgroundColor);
    /* overflow-x: hidden; */
    & > .jukuchu {
        position: fixed;
        left: 1rem;
        bottom: 1rem;
        display: grid;
        place-items: center;
        width: 100px;
        height: auto;
        z-index: 999;

        & .speech-bubble {
            position: relative;
            top: 10px;
            display: inline-block;
            width: 100px;
            margin-bottom: 12px;
            padding: 8px 4px;
            border: 1px solid var(--backgroundColor-dark);
            border-radius: 9999px;
            background-color: #ffffff;
            text-align: center;
            font-size: 12px;
            font-weight: 400;
            line-height: 1.25;
            color: #000000;

            &::before {
                content: "";
                position: absolute;
                bottom: 0;
                left: 30%;
                border-style: solid;
                border-width: 12px 8.5px 0 8.5px;
                border-color: var(--backgroundColor-dark) transparent transparent;
                translate: -50% 100%;
                transform: skew(21deg);
                transform-origin: top;
            }

            &::after {
                content: "";
                position: absolute;
                bottom: 0;
                left: 30%;
                border-style: solid;
                border-width: 10.3px 7.3px 0 7.3px;
                border-color: #ffffff transparent transparent;
                translate: -50% 100%;
                transform: skew(21deg);
                transform-origin: top;
            }
        }

        & img {
            width: 100%;
            height: auto;
        }
    }

    & nav.header {
        position: absolute;
        top: .75rem;
        left: 1rem;
        display: flex;
        width: calc(100% - 2rem);
        align-items: center;
        justify-content: space-between;
        z-index: 100;
        background-color: #ffffff88;
        /* border-radius: 10rem; */
        padding: 0 1rem;

        & img {
            width: auto;
            height: 70px;
        }

        & .menu-button{
            display: none;
        }
        & .navigation {
            display: flex;
            gap: 1rem;
            list-style: none;

            & li {
                line-height: 2rem;
                width: 5rem;
                text-align: center;
                /* background-color: var(--school-image-color); */
                border-radius: .5rem;
                transition: .3s;
                border: 1px solid transparent;

                & a {
                    color: var(--symbol-red);
                    display: block;
                    text-decoration: none;
                }

                &:hover {
                    /* background-color: #fff; */
                    /* border-color: var(--school-image-color); */

                    & a {
                        color: var(--school-image-color);
                        font-weight: bold;
                    }
                }
            }

        }
    }

    & section {
        position: relative;
        width: 100%;
        height: 100vh;
        scroll-snap-align: start;
        overflow: hidden;
        /* NOW */
        & .now-wrap {
            display: flex;
            gap: 1rem;
            width: 100%;
            height: 100%;
            @media screen and (max-width: 600px) and (orientation: portrait) {
                flex-direction: column;
            }

            & .now-container {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                flex: 1;
                height: 100%;
                @media screen and (max-width: 600px) and (orientation: portrait) {
                    flex-direction: row;
                    height: calc(100% / 3);
                }

                & .now-heading {
                    display: grid;
                    place-items: center;
                    height: 30%;
                    padding-top: 1rem;
                }

                &>div {
                    /* display: grid; */
                    /* place-items: center; */
                    height: 70%;
                    width: 100%;
                    @media screen and (max-width: 600px) and (orientation: portrait) {
                        height: 100%;
                    }

                    & img {
                        display: grid;
                        place-items: center;
                        max-width: 100%;
                        max-height: 100%;
                        object-fit: contain;
                        margin: 0 auto;
                        cursor: pointer;
                        transition: .3s;

                        &:hover {
                            transform: scale(1.1);
                            transform-origin: center;
                        }
                    }

                    &.jukuchu-nice {
                        display: grid;
                        place-items: center;

                        & img {
                            max-width: 300px;
                            max-height: 300px;
                        }

                    }
                }
            }
        }

        &.original{
            & .item-wrapper{
                display: flex!important;
                flex-direction: row!important;
                justify-content: center;
                align-items: start;
                @media (max-width: 600px) and (orientation: portrait) {
                    flex-direction: column!important;
                    & .item{
                        width: 100%;
                        & > img{
                            width: auto!important;
                            height: calc(100% - 1rem)!important;
                        }
                    }
                }
                & .item{
                    flex: 1;
                    position: relative;
                    flex-direction: column!important;
                    flex-wrap: nowrap!important;
                    gap:0;
                    max-width: 630px;
                    max-height: calc(630px + 4rem);
                    & img{
                        cursor: pointer;
                        width: 100%;
                        transition: .3s;
                        &:hover{
                            transform: scale(1.1);
                        }
                    }

                    & .modal{
                        /* position: absolute; */
                        top: 50%;
                        left: 50%;
                        transform: translate(-50%,-50%)!important;
                        background-color: #fff;
                        padding: 2rem;
                        border-radius: .5rem;
                        box-shadow: 0 0 2px #878787;
                        width: auto;
                        height: auto;
                        & .custom-close-button{
                            position: absolute;
                            top: .25rem;
                            right: .25rem;
                            z-index: 9999;
                        }
                        & h5{
                            font-size: 1.75rem;
                            color:var(--symbol-red);
                            font-family: 'check-point';
                            text-align: center;
                            & img{
                                width: 300px;
                                display: block;
                                margin: 0 auto;
                            }
                        }
                        & p{
                            width: auto;
                            font-size: clamp(1rem, 1.25vw, 1.5rem);
                            text-align: left;
                            line-height: 1.6;
                        }
                        &:not(.goods-container) p{
                            word-break: keep-all;
                            text-align: center;
                        }

                        @media screen and (max-width: 600px) and (orientation: portrait) {
                            width: 99%;
                        }

                    }
                    & .goods-container{
                        & .img-container{
                            display: flex;
                            align-items: center;
                            margin-top:2rem;
                            & img{
                                width: calc(100% / 3);
                            }
                        }
                    }
                }
            }
        }

        &:has(.section-symbol) {
            &::after {
                content: '';
            }

            & .background-image {
                position: absolute;
                top: 0;
                width: 80%;
                height: 100%;
                z-index: 1;

                & img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                }
            }

            & .section-symbol {
                position: absolute;
                top: 5%;
                left: 5%;
                max-height: 70%;
                max-width: 40%;
                width: auto;
                height: auto;
                z-index: 2;

                & img {
                    width: 100%;
                    height: auto;
                }
                &.center{
                    top: 50%;
                    left: 50%;
                    transform: translate(-50%,-50%)!important;
                }
            }

            &:is(.choice, .uniform) {
                & .background-image {
                    left: 0;
                }

                & .section-symbol {
                    left: unset;
                    right: 5%;
                }
            }
            &.choice{
                & .header {
                    position: relative;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    flex-wrap: wrap;
                    gap: 2rem;
                    width: 100%;
                    font-family: 'check-point';
                    margin: 0;
                    padding: 2rem 1rem;
                    z-index: 2;

                    & h2 {
                        font-family: inherit;
                        font-size: clamp(1.75rem, 4vw, 4rem);
                        -webkit-text-stroke: 4px var(--school-image-color);
                        paint-order: stroke;
                        color: #fff;
                        margin: 0;
                    }

                    & h3 {
                        font-family: inherit;
                        font-size: clamp(1.5rem, 2vw, 3rem);
                        color: var(--school-image-color);
                        line-height: 1.3;
                        margin: 0;
                        text-align: center;

                        & small {
                            display: block;
                            font-family: inherit;
                            color: #fff;
                            -webkit-text-stroke: 2px var(--school-image-color);
                            paint-order: stroke;

                        }
                    }
                }
                & .choice-example-list{
                    width: 80%;
                    max-width: 700px;
                    background-color: #ffffff80;
                    border-radius: 2rem;
                    color: #fff;
                    z-index: 2;
                    position: absolute;
                    /* top: 50%; */
                    bottom: 5%;
                    left: 50%;
                    transform: translateX(-50%);
                    & ul{
                        padding: 0;
                        margin: 0 auto;
                        width: auto;
                        list-style: none;
                        & li{
                            font-size: clamp(1.25rem, 3vw, 2.5rem);
                            font-weight: bold;
                            text-align: center;
                            text-shadow: 0 0 2px #000;
                        }

                    }
                    & img{
                        width: 100%;
                    }
                    & h4{
                        font-size: 1.25rem;
                        text-align: center;
                        text-shadow: 0 0 2px #000;
;
                        & span{
                            display: inline-block;
                        }
                    }
                }
            }

            &.uniform{
                & .parallax-bg{
                    inset: -10%;
                    background-position: top -10% center;
                }
                & .background-image {
                    background-image: url(../main_img/section/uniform/uniform.jpg);
                    background-size: contain;
                    background-position: left center;
                    background-repeat: no-repeat;
                    @media (max-width: 600px) and (orientation: portrait) {
                        background-image: url(../main_img/section/uniform/uniform_sp.png);
                        background-size: cover;
                        background-position: center;
                    }
                }
                &:not(:has(.dark-overlay)) .section-symbol{
                    transition-duration: 1200ms;
                    top: 50%;
                    right: 0;
                    transform: translateY(-50%) !important;
                    @media screen and (max-width: 600px) and (orientation: portrait) {
                        transform: translateY(10%) !important;
                    }
                }
            }

            &.ryo{
                & .background-image img{
                    @media screen and (max-width: 600px) and (orientation: portrait) {
                        object-position:80%;
                    }
                }
                & .page-next{
                    & .image-container{
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        flex-wrap: wrap;
                        height:100%;
                        & div{
                            position: relative;
                            width: calc(100% / 3);
                            height: 50%;
                            &.introduction{
                                display: grid;
                                place-items: center;
                                text-align: justify;
                                background-color: #fff;
                                padding: 2rem;
                                font-size: clamp(1rem, 1.25vw, 1.5rem);
                            }
                            @media screen and (max-width: 600px) and (orientation: portrait) {
                                width: 50%;
                                height: calc(100% /3);
                                &.introduction{
                                    padding: 1rem;
                                    font-size: .75rem;
                                }
                            }

                            & img{
                                width: 100%;
                                height: 100%;
                                object-fit: cover;
                            }
                            & p{
                                position: absolute;
                                width: 100%;
                                text-align: center;
                                bottom: 0;
                                background-color: #ffffffcc;
                                padding: .75rem;
                            }
                        }
                    }
                }
            }
            & .page-next {


                    & .main {
                        height: calc(100vh - 10rem);

                    }
                }

            &.inquiry-activity {
                & .background-image {
                    right: 0;
                }
                & .section-symbol {
                    cursor: pointer;
                    &:hover img{
                        transition: .3s;
                        transform: scale(1.1);
                    }
                }
            }

            &.full-page {
                & .background-image {
                    left: 0;
                    width: 100%;
                }
            }

            &.donation {
                & .background-image {
                    right: 0;
                }
            }

            &.app-rewuire {
                & .background-image {
                    left: 0;
                    width: 100%;
                }

                & .section-symbol {
                    left: unset;
                    right: 5%;
                }
            }
        }

        & h1 {
            margin: 0;
            font-size: clamp(2rem, 6vw, 6rem);

            &:has(span) {
                font-family: 'check-point';
                font-weight: bold;
                text-align: center;

                /* -webkit-text-stroke: 8px var(--school-image-color); */
                /* paint-order: stroke; */
            }
        }

        &:has(.item-wrapper) {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 2rem 1rem 1rem;

            & h1 {
                font-family: "Anton", sans-serif;
                font-weight: normal;
                color: var(--symbol-red);
            }

            & .item-wrapper {
                flex: 1;
                min-height: 0;
                width: 100%;
                margin: 0 auto;
                display: grid;
                /* 幅に応じて自動で列数が変わる。最小200px確保 */
                grid-template-columns: repeat(auto-fit, minmax(min(350px, 45%), 1fr));
                grid-template-rows: auto;
                align-content: center;
                /* 行全体を縦中央に */
                gap: clamp(0.3rem, 1vw, 1rem);

                & .item {
                    display: flex;
                    flex-direction: row;
                    flex-wrap: wrap;
                    align-items: center;
                    justify-content: center;
                    gap: 1.5rem;
                    padding: 0.4rem;
                    min-height: 0;
                    min-width: 0;

                    & >  img {
                        /* width: min(80%, 20vw, 22dvh); */
                        height: calc(100% - 4rem);
                        max-width: 100%;
                        aspect-ratio: 1 / 1;
                        object-fit: cover;
                        border-radius: 50%;
                        transition: .3s;
                        background-color: #fff;
                        &:hover {
                            border: 2px solid gold;
                            transform: scale(1.1);
                            transform-origin: bottom;
                        }
                    }

                    & p {
                        text-align: center;
                        color: var(--school-image-color);
                        font-size: clamp(1rem, 3vw, 1.5rem);
                        /* width: 7.5em; */
                        transition: .3s;

                        & span {
                            display: inline;
                        }
                    }

                    &[data-href] {
                        cursor: pointer;

                        & img {
                            opacity: .7;
                        }

                        &:hover {
                            & img {
                                transform: scale(1.1);
                                transform-origin: center;
                                opacity: 1;
                                z-index: 2;
                            }
                        }
                    }
                }
            }
        }

        & .link-block-wrapper {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            grid-template-rows: repeat(3, 1fr);
            grid-column-gap: 0px;
            grid-row-gap: 0px;

            & .link-block {
                position: relative;
                display: flex;
                justify-content: center;
                align-items: center;
                color: var(--symbol-red);
                font-size: clamp(1.25rem, 2.75vw, 3.5rem);
                height: calc(100vh / 3);
                border: 2px solid #bbb;
                z-index: 2;
                background-color: var(--backgroundColor);
                font-family: 'check-point';

                &:hover {
                    background-color: #fff;
                }

                & a {
                    font-family: inherit;
                    color: inherit;
                    text-decoration: none;
                }

                &.block-double {
                    grid-area: 1 / 1 / 3 / 2;
                    height: calc(100vh / 3 * 2);
                    align-items: start;
                    padding-top: 2rem;
                    background-color: var(--backgroundColor-dark);
                    z-index: 1;

                    & h2 {
                        font-family: inherit;
                        font-size: clamp(2rem, 6vw, 6rem);
                        -webkit-text-stroke: 10px #ccc;
                        paint-order: stroke;
                        margin: 0;
                        line-height: 1;
                    }
                }

                &:nth-child(2) {
                    grid-area: 1 / 2 / 2 / 3;
                }

                &:nth-child(3) {
                    grid-area: 1 / 3 / 2 / 4;
                }

                &:nth-child(4) {
                    grid-area: 2 / 2 / 3 / 3;
                }

                &:nth-child(5) {
                    grid-area: 2 / 3 / 3 / 4;
                }

                &:nth-child(6) {
                    grid-area: 3 / 1 / 4 / 2;
                }

                &:nth-child(7) {
                    grid-area: 3 / 2 / 4 / 3;
                }

                &:nth-child(8) {
                    grid-area: 3 / 3 / 4 / 4;
                }
                @media screen and (max-width: 600px) and (orientation: portrait) {
                    & a{
                        font-size: 1rem;
                    }
                    &.block-double {
                        grid-area: 1 / 1 / 2 / 3;
                        height: calc(100vh / 3);
                    }
                    &:nth-child(2) {
                        grid-area: 1 / 3 / 2 / 4;
                    }

                    &:nth-child(3) {
                        grid-area: 2 / 1 / 3 / 2;
                    }

                }
                & .img-container {
                    position: absolute;
                    bottom: 0;
                    right: -30%;
                    width: 75%;
                    transform: translateX(40%);

                    & img {
                        width: 100%;
                        height: auto;
                    }
                }
            }
        }
    }



    & .club-modal {
        & h4 {
            position: absolute;
            top: 2rem;
            left: 0;
            width: 100%;
            text-align: center;
            font-family: 'check-point';
            font-size: clamp(2rem, 4vw, 5rem);
            color: var(--symbol-red);
            -webkit-text-stroke: 8px #fff;
            paint-order: stroke;
            z-index: 9998;

            & span {
                display: inline-block;
            }
        }

        & .club-background-image {
            position: absolute;
            top: 0;
            left: 0;
            display: flex;
            width: 100%;
            height: 100%;
            z-index: 0;
            opacity: .5;

            & div {
                width: 50%;
                height: 100%;

                & img {
                    width: 100%;
                    height: 100%;
                    object-fit: contain;
                }
            }

            @media screen and (max-width: 1000px) and (orientation: portrait) {
                flex-direction: column;

                & div {
                    width: 100%;
                    height: 50%;
                }

            }
        }

        & .floating-stage {
            width: 100%;
            height: 100%;
            overflow: hidden;

            & .floating-card {
                position: absolute;
                border-radius: 12px;
                overflow: visible;
                cursor: pointer;
                will-change: transform;

                & img {
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                    display: block;
                    pointer-events: none;
                    user-select: none;
                }

                & .bubble {
                    position: absolute;
                    bottom: calc(100% + 10px);
                    left: 50%;
                    transform: translateX(-50%) scale(0.85);
                    transform-origin: bottom center;
                    background: #fff;
                    text-align: center;
                    color: #222;
                    line-height: 1.5;
                    white-space: nowrap;
                    padding: 6px 10px;
                    border-radius: 8px;
                    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
                    pointer-events: none;
                    opacity: 0;
                    transition: opacity .18s ease, transform .18s ease;
                    z-index: 100;

                    &::after {
                        content: '';
                        position: absolute;
                        top: 100%;
                        left: 50%;
                        transform: translateX(-50%);
                        border: 6px solid transparent;
                        border-top-color: #fff;
                    }
                }

                &:hover .bubble,
                &.active .bubble {
                    opacity: 1;
                    transform: translateX(-50%) scale(1);
                }
            }
        }
    }
}


/*===================== タブレット =====================*/
@media (max-width: 1000px) and (orientation: portrait) {
    .container {
        & section {
            &:has(.section-symbol) {
                & .background-image {
                    width: 100%;
                    height: 75%;
                    /* height: auto; */
                    /* aspect-ratio: 1 /1; */
                }

                & .section-symbol {
                    top: unset!important;
                    bottom: 3rem;
                    left: 1% !important;
                    right: 1% !important;
                    max-width: 100%;
                    width: 98%;
                    height: 50%;
                    &.center{
                        transform: unset!important;
                    }
                    & img {
                        width: 100%;
                        height: 100%;
                        object-fit: contain;
                    }
                }
            }

            & .item-wrapper {
                grid-template-columns: repeat(auto-fit, minmax(min(160px, 45%), 1fr));
            }

            & .item img {
                width: min(100%, 12dvh);
            }
        }
    }
}



/* ===================== スマートフォン =====================*/
@media (max-width: 600px) and (orientation: portrait) {
    .container {
        & .header {
            width: 98%;
            margin-left: 1%;
            justify-content: space-between;

            & .navigation {
                flex-wrap: wrap;
                justify-content: end;
                gap: .25rem .35rem!important;
                & li{
                    font-size:14px;
                    line-height: 1!important;
                }
            }
            /* & .menu-button{
                position: absolute;
                right: .5rem;
                top: 5px;
                display: block !important;
                width: 60px;
                height: 60px;
                border-radius: 50%;
                background-color: var(--school-image-color);
                border-radius: 30px;
                &::before{
                    content: '&#9776;';
                }
                & input{
                    opacity: 0;
                }
            } */
            /* & .navigation {
                display: none!important;
                flex-direction: column;
                background: #eee;
                position: absolute;
                top: 50px;
                left: 0;
                width: 100%;
            }

            /* 開いたとき */
            /* & .navigation.active {
                display: flex!important;
            }  */
        }

        section:has(.item-wrapper) {
            padding: 1rem 0.75rem;

            & .item-wrapper {
                grid-template-columns: 1fr 1fr;
                /* 2列固定 */
                align-content: center;
                gap: 0.4rem;

                & .item {
                    flex-direction: row;
                    /* 横並びに切り替え */
                    justify-content: center;
                    gap: 0;
                    /* gap: 0.6rem; */
                    padding: 0.3rem 0.5rem;

                    & img {
                        /* width: clamp(40px, 12vw, 80px); */
                        width: 80%;
                        height: auto;
                        flex-shrink: 0;
                    }

                    & p {
                        text-align: left;
                        font-size: clamp(0.6rem, 3vw, 0.85rem);

                        & span {
                            display: inline;
                        }

                        /* スマホでは横に続ける */
                    }
                }
            }

            &.original{
                & .item-wrapper{
                    display: flex;
                    flex-direction: column;
                    & .item{
                        flex: 1;
                    }
                }
            }
        }
    }
}




/* ===================== sticky-wrap =====================*/
.sticky-wrap {
    position: relative;
    height: 200dvh;
    scroll-snap-align: none;
    /* wrap自体はスナップ対象外 */

    /* スナップアンカー */
    & .snap-point {
        position: absolute;
        left: 0;
        width: 100%;
        height: 1px;
        scroll-snap-align: start;

        &:nth-child(1) {
            top: 0;
        }

        &:nth-child(2) {
            top: 100vh;
        }
    }

    /* ===== sticky section ===== */
    &>section {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow: hidden;

        &:has(.is-scroll-out) .page-next {
            opacity: 1;
            transition: 1.25s cubic-bezier(0.22, 1, 0.36, 1);

        }
    }

    /* ===== phase（テキストの2セット） ===== */
    & .block-single {
        /* 既存の position: relative はそのまま活きる */
        overflow: hidden;
        /* 退場テキストがはみ出ないよう */
    }

    & .phase {
        position: absolute;
        /* block-single の中央に重ねる（既存の justify/align-items: center と連動） */
        inset: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
        cursor: pointer;

        /* 初期状態：下に隠れている */
        opacity: 0;
        transform: translateY(100%);
        transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);

        /* 表示中 */
        &.is-active {
            opacity: 1;
            transform: translateY(0);
        }

        /* 退場（上に消える） */
        &.is-leaving {
            opacity: 0;
            transform: translateY(-40%);
        }
    }
}


.footer{
    background-color: #000;
    color: #fff;
    text-align: center;
    font-size: 12px;
    padding: .5rem 0;
}






/* 次のページ（下に敷く） */
.page-next {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 1.25s cubic-bezier(0.22, 1, 0.36, 1);
}


/* カバー（scroll-anim でインしてくる要素を含む） */
.page-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    /* アウト後は下のページを操作できるように */
}

/* アウト完了後はポインターイベントを復活 */
.page-cover:has(.is-scroll-out) {
    pointer-events: none;
}