@charset "UTF-8";

body {
    color: #fff;
    font-family: 'Noto Sans JP';
}

main {
    padding-bottom: 1rem;
}

.bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background-image: url(../img/quiz-avan/back-avan.webp);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

body.is-dai .bg {
    background-image: url(../img/quiz-dai/back-dai.webp);
}

@media screen and (max-height: 1969px) {
    .bg {
        /* 画面天地が1969px以下になったら高さの下限を164.083rem（1969px相当）に固定 */
        background-size: auto 164.083rem;
        background-position: top center;
    }
}

.bg__logo {
    position: fixed;
    top: 0.5rem;
    left: 3.25rem;
    width: 10rem;
    /* 120px on PC */
    z-index: 13;
}

.bg__logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* ================== PC Layout ================== */
.quiz__wrap {
    position: relative;
    width: 89%;
    max-width: 1100px;
    margin: 4rem auto 8rem;
    transform: translateX(1.5%);
}

.timer {
    position: fixed;
    top: 19rem;
    right: 0;
    width: 25rem;
    z-index: 100;
}

.timer img {
    width: 100%;
    display: block;
}

.timer__text {
    position: absolute;
    top: 50%;
    left: 45%;
    transform: translate(-50%, -50%);
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 900;
    display: flex;
    align-items: baseline;
    font-size: 1.5rem;
    white-space: nowrap;
}

.timer__text span:first-child {
    font-size: 4.666rem;
    /* 56px */
    color: #F2CC30;
    margin: 0 0.5rem;
    margin-left: 1.8em;
    /* アキを少し調整 */
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    /* 高さを追加して中心を安定化 */
}

.timer__text span.is-low {
    color: #ff1500 !important;
}

.timer__text span.is-low.count-anim {
    animation: timerPulseLow 1s ease-in-out forwards;
    transform-origin: 50% 70%;
}

@keyframes timerPulseLow {
    0% {
        transform: scale(0.2);
        opacity: 0;
    }

    10% {
        transform: scale(1);
        opacity: 1;
    }

    30% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.timer__sec {
    font-size: 1.5rem;
}

.quiz__title {
    position: absolute;
    top: 7.5rem;
    left: 0;
    width: 47.416rem;
    /* 569px equivalent */
    z-index: 10;
}

.quiz__title-bg img {
    width: 100%;
    display: block;
}

.quiz__title-content {
    position: absolute;
    top: 50%;
    left: 5rem;
    transform: translateY(-50%);
}

.quiz__title-top {
    font-size: 1.333rem;
    /* 16px */
    font-weight: 600;
}

.quiz__title-main {
    font-size: 2rem;
    /* 28px */
    font-weight: 900;
}

.quiz__hero {
    position: absolute;
    top: -6rem;
    right: 6rem;
    width: 47rem;
    z-index: 2;
}

.quiz__hero img {
    width: 100%;
    display: block;
}

.quiz__wrap-bg {
    display: block;
    width: 100%;
}

.quiz__wrap-bg img {
    width: 100%;
    display: block;
}

.quiz {
    position: absolute;
    top: 21.65em;
    left: 50%;
    transform: translate(-51.5%, 0);
    /* Centered vertically maybe adjusted later */
    width: 75rem;
    /* width set previously */
    height: auto;
    z-index: 2;
    padding: 3.25rem 2rem 5rem;


    background-image: url(../img/quiz-avan/quiz-bg.webp);
    background-size: 100% 100%;
}

.quiz__innew-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quiz__innew-wrap.hide {
    opacity: 0.2;
}

.quiz__picture-wrap {
    position: relative;
    width: 66.666rem;
    /* 800px */
    margin-bottom: 1rem;
}

.quiz__picture-base {
    display: block;
    width: 100%;
}

.quiz__picture-base img {
    width: 100%;
}

.quiz__picture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.quiz__picture img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.quiz__text {
    width: 66.666rem;
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1.5;
    text-align: left;
    height: 12rem;
    /* 高さを固定してボタン・フッター位置を安定させる */
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.quiz__buttons {
    width: 66.666rem;
    /* 800px equivalent, same as picture-wrap */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem 0.5rem;
}

.quiz__btn {
    position: relative;
    width: 49.5%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz__btn .btn-off {
    width: 100%;
    display: block;
    transition: none;
}

.quiz__btn .btn-off img {
    width: 100%;
    display: block;
}

.quiz__btn .btn-on {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: none;
}

@media screen and (min-width: 769px) {
    .quiz__btn:hover .btn-off {
        opacity: 0;
        transition: none;
    }

    .quiz__btn:hover .btn-on {
        opacity: 1;
        transition: none;
    }
}

.quiz__btn-text {
    position: absolute;
    font-size: 1.666rem;
    /* 20px */
    font-weight: 900;
    color: #fff;
    z-index: 2;
    top: 50%;
    transform: translateY(-51%);
    line-height: 1.2;
    padding: 0 1.5rem;
}

.quiz__footer {
    width: 75rem;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-top: 4rem;
    margin-bottom: 0;
}

.quiz__q-num {
    position: absolute;
    left: 0;
    bottom: -3em;
    font-size: 1.166rem;
    /* 14px */
    font-weight: 600;
    color: #643C18;
}



.quiz__number {
    position: absolute;
    right: 4rem;
    bottom: -2.25rem;
    width: 8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.quiz__number-back {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    z-index: -1;
    object-fit: contain;
}

.quiz__dumerator {
    font-size: 2.5rem;
    /* 26px */
    font-weight: 900;
    width: 2em;
    text-align: right;
    transform: translateX(-2rem);
}

.quiz__slash {
    font-size: 1.5rem;
    /* 16px */
    margin: 0 0.4rem;
    font-weight: 900;
}

.quiz__denominator {
    font-size: 1.333rem;
    /* 16px */
    font-weight: 600;
    transform: translateY(0.4rem);
    margin-left: auto;
}

.quiz__return {
    position: absolute;
    bottom: 6.6rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.quiz__retire {
    position: relative;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media screen and (min-width: 769px) {
    .quiz__retire:hover .btn-off {
        opacity: 0;
        transition: none;
    }

    .quiz__retire:hover .btn-on {
        opacity: 1;
        transition: none;
    }
}

.quiz__retire .btn-off,
.quiz__retire .btn-off img {
    width: 100%;
    display: block;
}

.quiz__retire .btn-on {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: none;
}

.quiz__retire-text {
    position: absolute;
    font-size: 1.5rem;
    font-weight: 900;
    color: #4a2810;
}


.answer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44rem;
    aspect-ratio: 719 / 538;
    display: none;
    /* JSで切り替え */
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.answer.is-active {
    opacity: 1;
}

.answer__figure,
.answer__text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.answer__figure img,
.answer__text img {
    width: 100%;
    display: none;
    /* デフォルト非表示 */
}

.answer__figure img.answer__correct,
.answer__text img.answer__correct {
    animation: correctAppear 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.answer__figure img.answer__incorrect,
.answer__text img.answer__incorrect {
    animation: incorrectAppear 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes correctAppear {
    0% {
        transform: scale(3);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes incorrectAppear {
    0% {
        transform: scale(0.1);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* タイマーの数字切り替え時のアニメーション */
.timer__text span.count-anim {
    animation: timerImpact 0.2s ease-in;
}

@keyframes timerImpact {
    0% {
        transform: scale(0.2);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0.99;
    }
}

/* ================== SP Layout ================== */
@media screen and (max-width: 768px) {

    .bg {
        background-size: auto 68rem;
        background-position: top center;
        background-repeat: repeat-y;
    }

    .quiz__wrap {
        width: 100%;
        margin: 8.5rem auto 6rem;
        transform: translateX(0);
    }

    .bg__logo {
        width: 10.13rem;
        top: 1.5rem;
        left: 3rem;
    }

    .timer {
        top: 1.75rem;
        right: 0;
        width: 29rem;
    }

    .timer__text {
        font-size: 1.5rem;
        left: 48%;
    }

    .timer__text span:first-child {
        font-size: 6.37rem;
        margin-left: 1.6em;
        margin-top: 0.25em;
        margin-bottom: 0.3em;
    }

    .quiz__title {
        left: 0;
        top: 0.5rem;
        width: 100%;
    }

    .quiz__title-bg img {
        height: 20rem;
    }

    .quiz__title-content {
        left: 8rem;
        top: 50%;
    }

    .quiz__title-top {
        font-size: 2.23rem;
        margin-bottom: 0.3em;
    }

    .quiz__title-main {
        font-size: 3.25rem;
        max-width: 16em;
        /* 22px */
    }

    .quiz__hero {
        margin: 28rem auto 0rem;
        width: 60.91rem;
        /* 382px */
    }

    .quiz__hero_1 {
        top: -7rem;
        right: 6rem;
        margin-top: 20rem;
    }

    .quiz__hero_2 {
        top: -19rem;
        right: 4rem;
        width: 44.91rem;
    }

    .quiz__wrap-bg {
        width: 100%;
        margin-left: 0;
    }

    .quiz {
        top: 27rem;
        left: 50%;
        width: 94%;
        /* margin: 0 auto; */
        height: auto;
        transform: translateX(-50%);
        padding: 2.5rem 2rem 0.5rem;
        background-image: url(../img/quiz-avan/quiz-bg-sp.webp);
    }

    .quiz__picture-wrap {
        width: 53.75rem;
        margin-bottom: 2rem;
    }

    .quiz__picture {
        width: 100%;
        /* 320px */
    }

    .quiz__text {
        width: 53.75rem;
        font-size: 2.55rem;
        line-height: 1.6;
        height: 7.5rem;
        /* SPでも高さを固定 */
        display: flex;
        align-items: center;
        margin-bottom: 2rem;
    }

    .quiz__buttons {
        width: 53.75rem;
        /* same as picture-wrap on SP */
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 1rem 0.5rem;
    }

    .quiz__btn {
        width: 49%;
        height: 9.5rem;
    }

    .quiz__btn .btn-off img {
        height: 10rem;
    }

    .quiz__btn-text {
        font-size: 2.1rem;
        padding: 0 1.5rem;
        /* 13px */
    }

    .quiz__footer {
        width: 100%;
        flex-direction: column;
        align-items: center;
        margin-top: 7rem;
    }

    .quiz__q-num {
        position: absolute;
        left: 0;
        bottom: -1.75em;
        font-size: 1.91rem;
        /* 12px */
    }

    .quiz__number {
        position: absolute;
        bottom: auto;
        right: auto;
        margin-bottom: 7rem;
        width: 11rem;
        height: 10rem;
        transform: translateX(-16%);

    }

    .quiz__dumerator {
        font-size: 4.14rem;
        transform: translate(-3rem, -0.1em);
        /* 26px */
    }

    .quiz__slash,
    .quiz__denominator {
        font-size: 2.55rem;
        /* 16px */
        margin-left: 0.5rem;
    }

    .answer {
        width: 80%;
        top: 50%;
    }

    .quiz__return {
        bottom: 16rem;
    }

    .quiz__retire {
        width: 49.43rem;
        /* 310px */
    }

    .quiz__retire-text {
        font-size: 2.3rem;
    }
}

/* ================== Opening Screen ================== */
.opening {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 500px;
    z-index: 1000;
    background-color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: openingFadeOut 1.2s ease 8.6s forwards;
}

@keyframes openingFadeOut {
    0% {
        opacity: 1;
        visibility: visible;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

.opening__contents {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

/* 縦横比の変化（横長かつ短手）で天井が危険な場合のみスケールダウン */
@media screen and (min-width: 1200px) and (max-height: 900px) {
    .opening__contents {
        transform: scale(0.9);
    }
}

@media screen and (min-width: 1200px) and (max-height: 800px) {
    .opening__contents {
        transform: scale(0.8);
    }
}

@media screen and (min-width: 1200px) and (max-height: 700px) {
    .opening__contents {
        transform: scale(0.7);
    }
}

@media screen and (min-width: 1200px) and (max-height: 600px) {
    .opening__contents {
        transform: scale(0.6);
    }
}

@media screen and (min-width: 1200px) and (max-height: 500px) {
    .opening__contents {
        transform: scale(0.5);
    }
}

.opening__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url(../img/quiz-avan/opening-bg.webp);
    background-repeat: repeat-x;
    background-position: top center;
    background-size: auto 100%;
}

body.is-dai .opening__bg {
    background-image: url(../img/quiz-dai/opening-bg.webp);
}

@media screen and (max-height: 1149px) {
    .opening__bg {
        background-size: auto 1149px;
    }
}

.opening .main-logo__wrapper {
    width: 32rem;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    height: fit-content;
    z-index: 10;
}

.opening .logo-topline,
.opening .logo-bottomline {
    width: 92%;
    margin: 0 auto;
    display: block;
    opacity: 0;
    animation: fadeInLogo 0.6s ease forwards;
    animation-delay: 0.2s;
}

.opening .logo-text1-6 {
    display: flex;
    justify-content: space-between;
    gap: 2%;
    margin: 0.5rem 0;
    width: 91%;
    margin-left: 4%;
}

.opening .logo-text1-6 img {
    max-width: none;
    height: auto;
    animation: bounceIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.opening .logo-text1-6 img:nth-child(1) {
    animation-delay: 0.3s;
    margin-right: -0.8em;
    width: 16.53%;
}

.opening .logo-text1-6 img:nth-child(2) {
    animation-delay: 0.4s;
    margin-right: -0.4em;
    width: 12.85%;
}

.opening .logo-text1-6 img:nth-child(3) {
    animation-delay: 0.5s;
    width: 16.22%;
}

.opening .logo-text1-6 img:nth-child(4) {
    animation-delay: 0.6s;
    width: 18.06%;
}

.opening .logo-text1-6 img:nth-child(5) {
    animation-delay: 0.7s;
    width: 15%;
}

.opening .logo-text1-6 img:nth-child(6) {
    animation-delay: 0.8s;
    width: 17.75%;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    60% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeInLogo {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.opening .main-logo__line2 img,
.opening .main-logo__line3 img,
.opening .main-logo__line4 img {
    width: 65%;
    max-width: none;
    margin: 0.5rem auto;
    opacity: 0;
    animation: fadeInLogo 0.6s ease forwards;
}

.opening .main-logo__line2 img {
    animation-delay: 1.4s;
    width: 65%;
}

.opening .main-logo__line3 img {
    animation-delay: 1.0s;
    width: 93%;
}

.opening .main-logo__line4 img {
    animation-delay: 1.2s;
    width: 94%;
}

.opening .main-logo__line5 img {
    width: 108.5%;
    max-width: none;
    margin: -4.0rem auto 0.5rem -0.75rem;
    opacity: 0;
    animation: wipeInLeft 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 1.6s;
}

@keyframes wipeInLeft {
    0% {
        clip-path: inset(0 100% 0 0);
        opacity: 0;
    }

    1% {
        clip-path: inset(0 100% 0 0);
        opacity: 1;
    }

    100% {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

.opening .main-logo-bird {
    position: absolute;
    top: 14.5%;
    right: -4%;
    width: 28%;
    max-width: none;
    animation: fadeInLogo 0.5s ease both;
    animation-delay: 1.4s;
}

.opening__text {
    width: 120%;
    margin-left: -10%;
    font-size: 3.166rem;
    font-weight: 900;
    color: #fff;
    margin-top: 3rem;
    text-align: center;
}

.opening__text span {
    opacity: 0;
    display: inline-block;
    animation: fadeInLogo 0.2s ease forwards;
}

.opening__text span:nth-child(1) {
    animation-delay: 1.8s;
}

.opening__text span:nth-child(2) {
    animation-delay: 1.85s;
}

.opening__text span:nth-child(3) {
    animation-delay: 1.9s;
}

.opening__text span:nth-child(4) {
    animation-delay: 1.95s;
}

.opening__text span:nth-child(5) {
    animation-delay: 2.0s;
}

.opening__text span:nth-child(6) {
    animation-delay: 2.05s;
}

.opening__text span:nth-child(7) {
    animation-delay: 2.1s;
}

.opening__text span:nth-child(8) {
    animation-delay: 2.15s;
}

.opening__text span:nth-child(9) {
    animation-delay: 2.2s;
}

.opening__text span:nth-child(10) {
    animation-delay: 2.25s;
}

.opening__text span:nth-child(11) {
    animation-delay: 2.3s;
}

.opening {
    --logo-target-translate: -92.5%;
    --logo-target-scale: 0.675;
}

@media screen and (max-width: 768px) {
    .opening {
        --logo-target-translate: -90%;
        --logo-target-scale: 0.85;
    }
}

.opening .main-logo__wrapper {
    width: 32rem;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    height: fit-content;
    z-index: 10;
    /*animation:
        logoMoveUp 0.6s cubic-bezier(0.45, 0, 0.55, 1) 2.6s both,
        logoFadeOut 0.6s ease 5.6s both;
    /* 1つのアニメーションにまとめる*/
    animation: logoCombined 7.2s cubic-bezier(0.45, 0, 0.55, 1) both;
}

.main-logo__line1 {
    margin-bottom: -0.5rem;
}

.main-logo__wrapper h2 {
    margin-bottom: 2.2rem;
}

/*これは使わない
@keyframes logoMoveUp {
    0% {
        transform: translate3d(-50%, -50%,0) scale(1);
    }

    100% {
        transform: translate3d(-50%, -90%,0) scale(0.675);
    }

}

@keyframes logoFadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}*/

@keyframes logoCombined {

    /* 0〜2.6秒：待機 */
    0%,
    31.9% {
        transform: scale(1);
        opacity: 1;
    }

    /* 2.6秒〜3.2秒：上に移動（全体の約10%の期間） */
    41.6% {
        transform: translateY(-40%) scale(0.675);
        opacity: 1;
    }

    /* 3.2秒〜5.6秒：移動後の位置で維持 */
    90.3% {
        transform: translateY(-40%) scale(0.675);
        opacity: 1;
    }

    /* 5.6秒〜6.2秒：フェードアウト */
    100% {
        transform: translateY(-40%) scale(0.675);
        opacity: 0;
        visibility: hidden;
    }
}

.opening__image {
    display: flex;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 50rem;
    z-index: 300;
    pointer-events: none;
    opacity: 0;
    animation:
        imageAppear 1.8s cubic-bezier(0.22, 1, 0.36, 1) 6.8s forwards,
        imageBurst 1.2s ease-in 8.6s forwards;
    /* 3倍ゆっくり */
}

@keyframes imageAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes imageBurst {
    0% {
        transform: translate(-50%, -50%) scale(1);
        filter: blur(0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.8);
        filter: blur(10px);
        opacity: 0;
    }
}

.opening__image img {
    width: 100%;
    display: block;
}

/* ================== Quiz Entry Animations ================== */
.quiz__wrap-bg {
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    /*width: 102%;
    margin-left: -1%;*/
    animation: maskDown 0.4s ease-in 9.4s forwards;
}

@keyframes maskDown {
    0% {
        clip-path: inset(0 0 100% 0);
        opacity: 0;
    }

    100% {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

.quiz__hero,
.quiz__title,
.quiz,
.quiz__return {
    opacity: 0;
    animation: fadeInLogo 0.5s ease 10.2s forwards;
}

.timer {
    transform: translateX(110%);
    animation: timerPop 0.4s ease-out 10.6s forwards;
    /* バウンスなし */
}

@keyframes timerPop {
    0% {
        transform: translateX(110%);
    }

    100% {
        transform: translateX(0);
    }
}

/* ================== Question Transition ================== */
.quiz__innew-wrap {
    position: relative;
    min-height: 48rem;
    transition: opacity 0.5s ease-out;
    /* セット入れ替え時のガタつき防止 */
}

.quiz__set {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    filter: blur(10px);
    transition: opacity 0.4s ease-out 1s, filter 0.4s ease-out 1s;
}

.quiz__set.is-active {
    display: flex;
    opacity: 1;
    filter: blur(0);
}

.quiz__set.is-leaving {
    display: flex;
    opacity: 0;
    filter: blur(10px);
}

.quiz__set.is-entering {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
    filter: blur(0);
}

/* ================== Opening Countdown ================== */
.opening__count {
    position: absolute;
    top: calc(20dvh + 50%);
    /* dvhを使用して20%ほど下げて配置 */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12.5rem;
    z-index: 200;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-origin: center center;
    /* 拡大・縮小の中心を固定 */
}

.opening__count>div {
    position: absolute;
    width: 100%;
    opacity: 0;
    filter: blur(20px);
}

.opening__count-3 {
    position: relative !important;
}

.opening__count>div img {
    width: 100%;
    display: block;
}

@keyframes countSequence {
    0% {
        opacity: 0;
        transform: scale(5);
        filter: blur(20px);
        transform-origin: 50% 70%;
    }

    20% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
        transform-origin: 50% 66%;
        /* 70 - (20 * 0.2) */
    }

    /* ドンッ！と一気に原寸へ */
    70% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
        transform-origin: 50% 56%;
        /* 70 - (20 * 0.7) */
    }

    /* 静止 */
    100% {
        opacity: 0;
        transform: scale(0.75);
        filter: blur(0);
        transform-origin: 50% 50%;
    }

    /* 縮小・消滅 */
}

/* 確認用スタイルを削除 */

/* 3倍ゆっくり：1.8s duration, 1.2s毎のオフセット。イージングを強力に設定 */
.opening__count-3 {
    animation: countSequence 1.8s cubic-bezier(0.16, 1, 0.3, 1) 3.2s forwards;
}

.opening__count-2 {
    animation: countSequence 1.8s cubic-bezier(0.16, 1, 0.3, 1) 4.4s forwards;
}

.opening__count-1 {
    animation: countSequence 1.8s cubic-bezier(0.16, 1, 0.3, 1) 5.6s forwards;
}

@media screen and (max-width: 768px) {
    .opening .main-logo__wrapper {
        width: 50%;
        margin: auto;
        height: fit-content;
    }

    /* logoMoveToTop が CSS変数を参照して自動で調整されます */

    .opening__text {
        width: 140%;
        margin-left: -20%;
        font-size: 3.827rem;
        margin-bottom: 8rem;
        margin-top: 5rem;
    }

    .opening__image {
        width: 93%;
    }

    .opening__count {
        top: calc(20dvh + 50%);
        width: 37%;
        height: auto;
    }

    .opening .main-logo-bird {
        width: 30%;
        top: 11%;
        right: -5%;
    }
}