﻿body.Intro_screen {
    height: 100%;
    overflow: hidden;
}


@media screen and (min-width: 431px) {
    body {
        margin: 0 auto;
    }

    #opening {
        margin: 0 auto;
    }

}





/* 
form#form1 {
    max-width: 430px;
    margin: 0 auto;
    max-height: 100%;
}
*/

/* ✨defaultは main が見える */
#main {
    display: block;
}

/* ✨introが有効なときは intro だけ見える */
body.Intro_screen #main {
    display: none !important;
}

body.Intro_screen #intro {
    display: block !important;
}

/* body overflowも class に任せる */
body.Intro_screen {
    overflow: hidden;
}

body:not(.Intro_screen) {
    overflow: auto;
}


.full-height {
    height: calc(var(--vh, 1vh) * 100);
}


#opening {
    position: relative;
    max-width: 430px;
    margin: 0 auto;
    height: calc(var(--vh, 1vh) * 100); /* 100vhの代替 */
    z-index: 0;
}

#company-name {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: gray;
    font-size: 12px;
    opacity: 0;
    animation: fadeIn 2s forwards;
}

#video-title {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: gray;
    font-size: 12px;
    opacity: 0;
    animation: fadeIn 2s forwards;
}

#message-container {
    font-family: "游明朝", "Yu Mincho", "ヒラギノ明朝 ProN", "Hiragino Mincho ProN", serif;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: black;
    white-space: nowrap;
}

#top-image {
    position: absolute;
    top: 0;
    left: 0;
    /* width: 100%; */
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 10;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.enlarged {
    font-size: 28px;
    font-weight: bold;
}

#split-image {
    position: absolute;
    top: 0;
    left: 0;
    /* width: 100%; */
    /* max-width: 430px; */
    width: 100%;
    max-width: none;
    overflow: hidden;

    height: 100%;
    display: flex;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 10;
}

#left-image, #right-image {
    width: 50%;
    height: 100%;
    vertical-align: top;
    object-fit: cover;
    transition: transform 1s ease-in-out, opacity 1s ease-in-out;
    display: block; /* ←これ超重要 */
}

#left-image {
    object-position: right center;
    transform: translateX(0);
}

#right-image {
    object-position: left center;
    transform: translateX(0);
}

.fade-out {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

#photo-title {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: white;
    font-size: 14px;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
    z-index: 50;
    display: none;
    transition: opacity 0.4s ease;
}

    #photo-title.visible {
        display: block;
        opacity: 1;
    }

    #photo-title.fade-out {
        opacity: 0;
        transition: opacity 0.5s;
    }


#video-title,
#photo-title {
    display: none;
    opacity: 0;
}

    #video-title.visible,
    #photo-title.visible {
        display: block;
        opacity: 1;
    }



#anniversary-message {
    position: absolute;
    top: 16%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 18px;
    font-weight:bold;
    color: #FBF2F4; /* #333; */
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out;
    z-index: 999;
    width: max-content; /* コンテンツ幅に合わせる */
    white-space: nowrap; /* 改行を防ぐ（brタグでのみ改行） */
}

    #anniversary-message.visible {
        opacity: 1;
        visibility: visible;
    }

    #anniversary-message.fade-out {
        opacity: 0;
    }

/* 🎥 フル画面動画（デフォルト非表示） */
#intro-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 430px;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 10;
    display: block; /* ← これ！ none を block に */
    pointer-events: none;
}

#video-title {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: white;
    font-size: 14px;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
    z-index: 50;
    display: none;
    transition: opacity 0.4s ease;
}

    #video-title.visible {
        display: block;
        opacity: 1;
    }

    #video-title.fade-out {
        opacity: 0;
        transition: opacity 0.5s;
    }

.no-scroll {
    overflow: hidden !important;
}

#intro-skip {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 12px;
    opacity: 0.8;
    z-index: 9999;
}
