@font-face {
    font-family: 'Y_Spotlight';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts-20-12@1.0/Y_Spotlight.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'BBTreeGB';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_nine_@1.1/BBTreeGB.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'PFStardust';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/PFStardust.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'SpoqaHanSansNeo';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2108@1.1/SpoqaHanSansNeo-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'SpoqaHanSansNeo';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2108@1.1/SpoqaHanSansNeo-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Cafe24Ssurround';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2105_2@1.0/Cafe24Ssurround.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

:root {
    --card-border: 30px;
}

html,
body,
.game,
.intro,
.ending,
.reset,
.jjin {
    width: 100%;
    height: 100%;
    /* height: calc(var(--vh, 1vh) * 100); */
    overflow: hidden;
    background-color: #333;
}

::-webkit-scrollbar {
    display: none;
}

.game,
.intro,
.ending,
.reset,
.jjin {
    position: fixed;
}

*,
*:before,
*:after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

p,
div {
    font-family: 'Cafe24Ssurround', sans-serif;
    /* font-weight: bold; */
    color: white;
    font-size: 7px;
    line-height: 1.65;
    word-break: keep-all;
    text-align: left;
    /* -webkit-text-stroke: 0; */
}



h1 {
    font-family: 'PFStardust', sans-serif;
    font-size: 10em;
    font-style: italic;
    color: white;
    line-height: 1.2;
    word-break: keep-all;
    text-align: center;
    font-weight: bold;
    /* -webkit-text-stroke: black 1px; */
    pointer-events: none;
}

h2 {
    font-family: 'Cafe24Ssurround', sans-serif;
    font-size: 5em;
    font-weight: bold;
    color: white;
    line-height: 1.2;
    word-break: keep-all;
    text-align: center;
    width: 100%;
    -webkit-text-stroke: 1px black;
    pointer-events: none;
}


img {
    max-width: 100%;
    pointer-events: none;
}

/*********************************************************************** flip */
/* flip */

.front-side,
.back-side {
    position: absolute;
    width: calc(100% - var(--card-border));
    height: calc(100% - var(--card-border));
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* Safari */
    -moz-backface-visibility: hidden;
    -o-backface-visibility: hidden;
    border-radius: var(--card-border);
    padding: 1em;
}


.android .front-side,
.android .back-side {
    border-radius: unset;
}

.front-side {
    background-color: #333;
}

.back-side {
    background-color: #333;
    color: white;
    transform: rotateY(180deg) translateZ(1px);
    -webkit-transform: rotateY(180deg) translateZ(1px);
}

/******************************************************************** game */
.game .game-back {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: none;
}

.nbg {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* position: relative; */
    position: absolute;
    top: 0;
}

.nbg--status {
    position: absolute;
    top: 50%;
    /* margin-top: -30px; */
    z-index: 2;
    width: 100%;
    height: 10em;
    text-align: center;
    pointer-events: none;
    transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
}

.nbg--status i {
    font-size: 10em;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    position: absolute;
    color: #fff;
}

.nbg--status i.fa-heart {
    right: 0.1em;
}

.nbg--status i.fa-question {
    left: 0.1em;
}

.nbg_love .fa-heart,
.nbg_nope .fa-question {
    opacity: 0.9;
    z-index: 999;
}

.nbg--status .good,
.nbg--status .bad {
    font-family: 'BBTreeGB';
    position: absolute;
    top: 0;
    opacity: 0.7;
    font-size: 10em;
    line-height: 1;
    transition: 0.4 all;
}

.nbg--status .good {
    right: 0.05em;
}

.nbg--status .bad {
    left: 0.05em;
}


.nbg_love .good,
.nbg_nope .bad {
    opacity: 0;
}




.nbg--cards {
    flex-grow: 1;
    text-align: center;
    display: flex;
    justify-content: center;
    z-index: 1;
    padding: 2em;
    box-shadow: inset 0 0 2em 1em #000;
}

.nbg--card {
    display: inline-block;
    width: 80%;
    height: calc(50% - 3em);
    position: absolute;
    will-change: transform;
    transition: all 0.3s ease-in-out;
    cursor: -webkit-grab;
    cursor: -moz-grab;
    cursor: grab;
    background-color: transparent;
    perspective: 1500px;
}

.nbg--card:nth-child(2n) {
    top: calc(50% + 1em);
}

.nbg--card.removed {
    opacity: 0;
}

.moving.nbg--card {
    transition: none;
    cursor: -webkit-grabbing;
    cursor: -moz-grabbing;
    cursor: grabbing;
    z-index: 99 !important;
}

.nbg--card .flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: #ddd;
    padding: calc(var(--card-border) / 3);
    border-radius: calc(var(--card-border) / 1.5);
    text-align: center;
    transition: transform 0.6s ease-out;
    -webkit-transition: transform 0.6s ease-out;
    transform-style: preserve-3d;
    pointer-events: none;
    border: 0.25em solid black;
    box-shadow: 0px 0px 1.5em #000a;
}

.android .nbg--card .flip-inner {
    border-radius: unset;
    border: none;
    box-shadow: none;
}


.nbg--card.back .flip-inner {
    transform: rotateX(180deg) rotateZ(180deg);
    -webkit-transform: rotateX(180deg) rotateZ(180deg);
}

.nbg--card .flip-inner .front-side,
.nbg--card .flip-inner .back-side {
    position: absolute;
    width: calc(100% - var(--card-border) / 1.5);
    height: calc(100% - var(--card-border) / 1.5);
    border-radius: calc(var(--card-border) / 1.5);
}

.nbg--card .flip-inner .front-side {
    overflow: hidden;
}

.android .nbg--card .flip-inner .front-side,
.android .nbg--card .flip-inner .back-side {
    border-radius: unset;
}

/* .nbg--card .flip-inner .front-side {
    background: url(/images/cardback-1.jpg) center no-repeat;
    background-size: cover;
}

.android .nbg--card .flip-inner .front-side {
    background: #333;
} */

.nbg--card img {
    max-width: none;
    height: 100%;
    width: auto;
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
}

.nbg--card img:nth-child(2) {
    opacity: 0;
    transition: opacity 0.5s 0.3s;
}

.nbg--card h2 {
    position: absolute;
    width: calc(100% - var(--card-border) / 1.5);
    bottom: .5em;
    padding: 0 .25em;
    -webkit-text-stroke: black 0.025em;
    opacity: 0;
    transition: opacity 0.5s 0.3s;
}

.nbg--card h3 {
    position: absolute;
    font-size: 2em;
    width: auto;
    top: .5em;
    padding: 0 .25em;
    -webkit-text-stroke: black 0.025em;
    opacity: 0;
    transition: opacity 0.5s 0.3s;
}

.nbg--card h3:nth-child(4) {
    position: absolute;
    width: auto;
    top: .5em;
    right: calc(var(--card-border) / 2);
    padding: 0 .25em;
    -webkit-text-stroke: black 0.025em;
    opacity: 0;
    transition: opacity 0.5s 0.3s;
}

.nbg--card.up h2,
.nbg--card.up h3,
.nbg--card.up img:nth-child(2) {
    opacity: 1;
}



.nbg--card.up h2,
.nbg--card.up img:nth-child(2) {
    opacity: 1;
}


.nbg--card .flip-inner .back-side {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nbg--card p {
    font-size: 2.8em;
    pointer-events: none;
    padding: 1em 1em;
}


/*///////////////////////////////////////////////////////////////// intro */
.intro {
    display: flex;
    align-items: center;
    justify-self: center;
    transition: transform 0.3s ease-in-out;
    -webkit-transition: transform 0.3s ease-in-out;
    background: transparent;
    /* z-index: 99; */
}

.moving.intro {
    transition: none;
}


.intro--card {
    width: 100%;
    height: 100%;
    /* display: flex; */
    justify-content: center;
    align-items: center;
    background: transparent;
    perspective: 1500px;
}

.intro--card .back-side {
    cursor: -webkit-grab;
    cursor: -moz-grab;
    cursor: grab;
}

.intro-inner {
    background: #ddd;
    padding: calc(var(--card-border) / 2);
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    border-radius: var(--card-border);
    /* pointer-events: none; */
}


.android .intro-inner {
    border-radius: unset;
}


.intro.back .intro-inner {
    transform: rotateX(180deg) rotateZ(180deg);
    -webkit-transform: rotateX(180deg) rotateZ(180deg);
}

.intro-inner .logo {
    width: 90%;
}

.intro-inner .mush {
    width: 70%;
    transform-origin: bottom center;
    animation: jump 3s infinite alternate linear;
    pointer-events: none;
}

@keyframes jump {
    from {
        transform: rotateZ(-2deg);
    }

    to {
        transform: rotateZ(-15deg);
    }
}

.intro-inner .front-side,
.intro-inner .back-side {
    display: flex;
    flex-flow: column;
    justify-content: center;
    align-items: center;
    padding: 2em;
}

.intro-inner .front-side {
    background: url(/images/cardback-1.jpg) center;
    background-size: cover;
}


.intro-inner .back-side {
    font-size: 2em;
    justify-content: center;
    cursor: -webkit-grab;
    cursor: -moz-grab;
    cursor: grab;
}

.moving.intro .back-side {
    cursor: -webkit-grabbing;
    cursor: -moz-grabbing;
    cursor: grabbing;
}

.desc li {
    font-size: 3em;
    margin: 1em;
    line-height: 1.6;
}

.play {
    font-weight: bold;
    font-size: 3em;
    margin-top: 1.5em;
}

.angle {
    /* position: absolute; */
    padding: 1em;
    display: flex;
    width: 100%;
    justify-content: space-between;
    font-size: 3em;
}

.full-btn,
.start-btn {
    width: auto;
    color: #fff;
    text-align: center;
    padding: 1em 4em;
    margin: 1em;
    background-color: #075034;
    font-size: 3em;
    cursor: pointer;
}

/* -**********************************************************************ending */

.ending {
    background: #111;
    visibility: hidden;
    opacity: 0;
    transition: opacity 1.5s;
    box-shadow: inset 0 0 2em 1em #000;
}

.ending.end {
    visibility: visible;
    opacity: 1;
}

.ending .front-side h1 {
    font-style: normal;
}

.ending .front-side h2 {
    margin: 1em 0;
}

.ending--card {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border-radius: var(--card-border);
    perspective: 1500px;
}

.ending-inner {
    background: #ddd;
    padding: calc(var(--card-border) / 2);
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 2s;
    transition-delay: 1s;
    transform-style: preserve-3d;
    border-radius: var(--card-border);
    transform: rotateX(-90deg) rotateY(0deg) translateY(200%);
}

.ending.end .ending-inner {
    /* transition: transform 0.6s ease-out; */
    transform: rotateX(0deg) rotateY(1080deg) translateY(0%);
}

.ending.end.back .ending-inner {
    transition: transform 1s ease-out;
}

.ending-inner .front-side {
    background: url(/images/cardback-1.jpg) no-repeat center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-self: center;
    flex-direction: column;
    cursor: pointer;
}

.ending .ending-inner .back-side div,
.ending .ending-inner .back-side p,
.ending .ending-inner .back-side h2 {
    opacity: 0;
    transition: opacity 0.8s 0.8s;
}

.ending.back .ending-inner .back-side div,
.ending.back .ending-inner .back-side p,
.ending.back .ending-inner .back-side h2 {
    opacity: 1;
}

.ending-inner .panning {
    position: absolute;
    width: 100%;
    border-radius: 2em;
    background: linear-gradient(#333 88%, rgba(51, 51, 51, 0));
    overflow: hidden;
    height: 33%;
    z-index: 2;
}

.ending-inner .panning img {
    display: inline;
    max-width: none;
    height: 92%;
}

.ending-inner .panning img:first-child {
    margin-bottom: -9px;
}

.ending-inner .panning img:last-child {
    transform: translateY(-100%);
}

.ending.end .ending-inner .panning img:first-child {
    animation: 75s slideImg1 linear infinite;

}

.ending.end .ending-inner .panning img:last-child {
    animation: 75s slideImg2 linear infinite;
}

.ending .ending-inner .back-side .scroll {
    width: 100%;
}

.ending.back .ending-inner .back-side {
    overflow: hidden;
    padding: 0;

}

.ending.back .ending-inner .back-side .scroll {
    transform: translateY(-60%);
    padding-top: 180%;
    padding-bottom: 180%;
    animation: 28s 0.5s scroll linear;
}

.ending.back .ending-inner .back-side p {
    font-family: 'Y_Spotlight';
    text-align: center;
    font-size: 3em;
}

.reset-btn {
    position: absolute;
    top: 50%;
    bottom: 1em;
    width: 100%;
}

.reset-btn .yes,
.reset-btn .no {
    padding: 0.7em 1em;
    font-size: 1.2em;
    cursor: pointer;
}

.ending.back .reset-btn {
    animation: resetbtn 26s;
}

@keyframes resetbtn {
    0% {
        opacity: 0;
        visibility: hidden;
    }

    95% {
        opacity: 0;
        visibility: hidden;

    }

    100% {
        opacity: 1;
        visibility: visible;
    }
}

@keyframes scroll {
    from {
        transform: translateY(0%);
    }

    to {
        transform: translateY(-60%);
    }
}

@keyframes slideImg1 {
    from {
        transform: translateX(0%);
    }

    to {
        transform: translateX(-100%);
    }
}

@keyframes slideImg2 {
    from {
        transform: translateY(-100%) translateX(100%);
    }

    to {
        transform: translateY(-100%) translateX(0%);
    }
}


.ending.back .ending-inner {
    transform: rotateX(180deg) rotateZ(180deg);
}

/************************************************************************ skip */

.skip {
    display: none;
    position: absolute;
    z-index: 88;
    width: 10em;
    height: 10em;
    border-radius: 100%;
    top: 50%;
    left: 50%;
    background: #333;
    border: 1em solid;
    opacity: 0.5;
    transform: translate(-50%, -50%);
    cursor: pointer;
}

/************************************************************************ rset */

.reset {
    background: #000000ee;
    display: none;
}

.reset-inner {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.alert {
    background: #333;
    padding: 10em;
    border: 0.3em solid #fff;
    position: relative;
    max-width: 85%;
}

.alert p {
    font-family: 'SpoqaHanSansNeo';
    font-size: 3em;
    margin-bottom: 1em;
}

.alert p:nth-child(2) {
    margin-bottom: 0;
    font-family: 'Y_Spotlight';
}

.alert p.reset-ok {
    margin-bottom: 0;
    background: #777;
    text-align: center;
    border: 0.03em solid #fff;
    width: auto;
    cursor: pointer;
}

.alert input {
    font-size: 3em;
    border: 0.03em solid #fff;
    background: #666;
    padding: 0 .5em;
    border-radius: 0.2em;
    margin-bottom: 1em;
    color: #fff;
}

.alert input:focus {
    outline-color: black;
}

.hint.brr {
    animation: brr 0.05s alternate 10;
}

@keyframes brr {
    from {
        transform: translateX(1%);
    }

    to {
        transform: translateX(-1%);
    }
}

.alert span {
    width: 3em;
    height: 3em;
    position: absolute;
    right: 1em;
    top: 1em;
    cursor: pointer;
}

.alert span::before,
.alert span::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 100%;
    height: 0.3em;
    background: #fff;
}

.alert span::after {
    transform: rotateZ(45deg);
}

.alert span::before {
    transform: rotateZ(-45deg);
}

/************************************************************************ jjin */

.jjin {
    background: black;
    display: none;
}

.jjin video {
    opacity: 0;
    width: 100%;
    transition: all 0.7s;
}

.jjin .refrash {
    position: absolute;
    top: 0;
    background: black;
    width: 100%;
    height: 100%;
    display: none;
}


.jjin .refrash .refrash-inner {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.jjin .refrash .refrash-inner h2 {
    display: none;
}

.jjin .refrash .refrash-inner i {
    animation: refrash 15s linear infinite;
}

@keyframes refrash {
    from {
        transform: rotateZ(0deg);
    }

    to {
        transform: rotateZ(360deg);
    }
}

.pc {
    display: none;
    z-index: 30;
}

@media (min-width: 600px) {
    .game,
    .intro,
    .ending,
    .jjin,
    .reset {
        max-width: 580px;
        max-height: 970px;
    }

    .game {
        border-radius: 4em;
    }

    .nbg--cards {
        padding: 4em;
    }

    .nbg--card {
        height: calc(50% - 4em);
    }

    .nbg--card:nth-child(2n) {
        top: calc(50% + 1.5em);
    }

    body {
        display: flex;
        justify-content: center;
        align-items: center;
        background: black;
        background-size: cover;
        background-blend-mode: luminosity;
    }

    .pc {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 1em 2em;
    }

    .pc div {
        font-size: 5em;
        font-family: 'PFStardust';
        display: flex;
        align-items: center;
    }

    .pc img {
        max-height: 2em;
        margin-right: 0.5em;
    }

    .pc a {
        color: #fff;
        text-decoration: none;
    }


}

@media screen and (min-width: 600px) and (max-height: 970px) {
    .intro-inner .front-side {
        padding: 0 12em;
    }

    .nbg--card img {
        width: 100%;
        height: auto;
    }

    .jjin video {
        height: 100%;
    }
}



@media screen and (max-width: 600px) {
    :root {
        --card-border: 15px;
    }

    p,
    div {
        font-size: 5px;
    }
}


@media screen and (max-width: 600px) and (min-aspect-ratio: 10/17) {
    .nbg--card img {
        width: 100%;
        height: auto;
    }
}


.game {
    z-index: 1;
}

.ending {
    z-index: 5;
}

.reset {
    z-index: 10;
}

.jjin {
    z-index: 15;
}

.intro {
    z-index: 20;
}