/* ローディング */
/* ==== ローディング中のスクロール抑止 ==== */
html.is_loading,
body.is_loading {
    overflow: hidden;
}

/* html.is_loading,
body.is_loading {
    overflow: auto;
} */

/* ==== オーバーレイ（出る時も消える時も“ふわっ”） ==== */
#loading_overlay {
    position: fixed;
    inset: 0;
    background: #23b7fe;
    display: grid;
    place-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#loading_overlay.is_show {
    opacity: 1;
    visibility: visible;
}

#loading_overlay.is_hidden {
    opacity: 0;
    visibility: hidden;
}

/* ==== オーバーレイ中身（カードのバウンド） ==== */
.loading_inner {
    display: grid;
    place-items: center;
    gap: 16px;
    text-align: center;
    color: #fff;
}

.loading_card_img {
    width: min(280px, 60vw);
    max-width: 380px;
	border-radius: 10px;
    will-change: transform;
    transform-origin: center bottom;
    animation: card_bounce 1.2s cubic-bezier(.28, .84, .42, 1) infinite;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .1));
}

.loading_card_shadow {
    width: 85%;
    height: 4px;
    margin: 0 auto;
    border-radius: 3px;
	background-color: rgba(0,0,0,0.3);
    box-shadow: 0px 0px 10px rgba(0,0,0,0.3);
    animation: shadow_squash 1.2s ease-in-out infinite;
	filter: blur(10px);
}

.loading_text {
    font-size: 14px;
    opacity: .85;
    letter-spacing: .08em;
}

/* ==== KV本体の“ふわっ” ==== */
#box_page_kv_home {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .8s ease, transform .8s ease;
}

#box_page_kv_home.is_visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==== 動きを減らす設定に配慮 ==== */
@media (prefers-reduced-motion: reduce) {

    .loading_card_img,
    .loading_card_shadow {
        animation: none;
    }

    #loading_overlay,
    #box_page_kv_home {
        transition: none !important;
    }
}

/* ==== キーフレーム ==== */
@keyframes card_bounce {
    0% {
        transform: translateY(0) scale(1) rotate(0deg)
    }

    35% {
        transform: translateY(-18px) scale(1.02) rotate(-1deg)
    }

    55% {
        transform: translateY(0) scale(.98) rotate(.4deg)
    }

    70% {
        transform: translateY(-9px) scale(1.01) rotate(-.3deg)
    }

    100% {
        transform: translateY(0) scale(1) rotate(0deg)
    }
}

@keyframes shadow_squash {
    0% {
        transform: scaleX(1);
        opacity: .85
    }

    35% {
        transform: scaleX(.85);
        opacity: .6
    }

    55% {
        transform: scaleX(1.05);
        opacity: .9
    }

    70% {
        transform: scaleX(.9);
        opacity: .7
    }

    100% {
        transform: scaleX(1);
        opacity: .85
    }
}