:root {
  --back-color: #fff;
  --point-color : #000;
  --text-color : #000;
  --text-color2: #000;

  --fullHeight : calc(var(--vh)*100);
}
html, body, #wrap {width: 100%; height: var(--fullHeight); overscroll-behavior: none; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-touch-callout: none;  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; background-color: var(--back-color); }
* {user-select: none; -moz-user-select: none; }

body[data-mode="day"] {
  --back-color: #fff;
  --point-color : #9FA0A0;
  --text-color : #fff;
  --text-color2: #000;
  --text-color3: #fff;
}
body[data-mode="night"] {
  --back-color: #1C1819;
  --point-color : #E36B2C;
  --text-color : #170000;
  --text-color2: #E36B2C;
  --text-color3: #E36B2C;
}

body input[type="text"]:-webkit-autofill,
body input[type="text"]:-webkit-autofill:hover,
body input[type="text"]:-webkit-autofill:focus,
body input[type="text"]:-webkit-autofill:active {background: rgba(0,0,0,0); box-shadow: none;}

#timmer {position: fixed; left: 0; top: 0; padding: 10px; color: red; z-index: 99999; pointer-events: none;}
#loadingModal {position: fixed; left: 0; top: 0; width: 100%; height: var(--fullHeight); z-index: 10; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;}
#loadingModal .spinner {width: 48px; height: 48px; display: block;  position: absolute;   left: 50%; top: 50%; transform: translate(-50%, -50%);}
#loadingModal .spinner::before {content: ""; width: 100%; height: 100%; display: block;   border-radius: 50%; background: conic-gradient(#0000 10%, #fff); -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0); animation: spin 1s infinite linear;}
@keyframes spin {
  100% {transform: rotate(1turn);}
}

.btn-wrapper {position: fixed; left: 0; top: 0; z-index: 99999; color: #fff; transform: translate(20px,20px); }
.btn-wrapper a {padding: 5px; background: rgba(0,0,0,0.5);}

/********** intro **********/
#intro {position: fixed; left: 0; top: 0; z-index: 100; width: 100%; height: var(--fullHeight); display: flex; align-items: center; justify-content: center; z-index: 10; background-color: var(--back-color); touch-action: none; z-index: 10;}
#intro .center {text-align: center; font-size: 0;}
#intro .logo {width: 261px; max-width: 80vw; max-height:80svh; aspect-ratio: 1/1.45; margin: auto; background-position: center; background-repeat: no-repeat; background-size: contain;}

#intro .modal {box-shadow: 0 3px 3px rgba(0,0,0,0.25); position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 80%; max-width: 350px; padding: 60px 25px; text-align: center; opacity: 0; background: var(--point-color); color: var(--text-color); touch-action: none;}
#intro .modal .icon {width: 54px; margin: 0 auto;}
#intro .modal .icon svg {width: 100%; stroke: var(--text-color)}
#intro .modal .info {margin-top: 40px; line-height: 1.4;}
#intro .modal .info .ko {font-weight: 600; font-size: 20px; margin-bottom: 0.5em;}
#intro .modal .info .ko {font-weight: 500; font-size: 16px;}

body[data-mode="day"] #intro {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/intro_bg_day.webp); background-size: auto 100%; background-position: center; background-repeat: no-repeat;}
body[data-mode="day"] #intro .logo {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/intro_logo_day.webp);}
body[data-mode="night"] #intro {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/intro_bg_night.webp); background-size: cover; background-position: center; background-repeat: no-repeat;}
body[data-mode="night"] #intro .logo {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/intro_logo_night.webp);}

@media (orientation: landscape) {
  @media screen and (max-width:1024px) {
    #intro .modal {width: fit-content; padding: 40px 30px;}
    #intro .modal .icon {width: 45px;}
  }
}



/********** start modal **********/
.start-modal {width: 100%; height: var(--fullHeight); position: absolute; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 5%; z-index: 10; left: 0; top: 0; z-index: 50;}
.start-modal .text-box {color: var(--text-color3); text-align: center; width: 100%;}
.start-modal .text-box .title {}
.start-modal .text-box .title .ko {font-size: 30px; font-weight: 600;}
.start-modal .text-box .title .en {font-weight: 500; font-size: 20px; margin-top: 18px;}
.start-modal .text-box .input-box {margin: 48px 0;}
.start-modal .text-box .input-box input {appearance: none; border: 1px solid rgba(159,160,160,0.4); height: 37px; padding: 0 20px; font-size: 16px; color: var(--text-color3); background: rgba(0,0,0,0); width: 100%; }
.start-modal .text-box .input-box input::placeholder {color: rgba(255,255,255,0.8);}
.start-modal .text-box .btn-box {}
.start-modal .text-box .btn-box a {display: inline-flex; height: 40px; align-items: center; justify-content: center; background: var(--point-color); font-size: 20px; font-weight: 600; padding: 0 40px; color: var(--text-color);}

body[data-mode="day"] .start-modal {background: rgba(6,1,2,0.80);}
body[data-mode="day"] .start-modal .text-box .input-box input {max-width: 510px; border: 1px solid rgba(159,160,160,0.4);}
body[data-mode="day"] .start-modal .text-box .input-box input::placeholder {color: rgba(255,255,255,0.8);}

body[data-mode="night"] .start-modal {background: rgba(6,1,2,0.4);}
body[data-mode="night"] .start-modal .text-box .input-box input {max-width: 390px; border: 1px solid rgba(227,107,44,0.8);}
body[data-mode="night"] .start-modal .text-box .input-box input::placeholder {color: rgba(227,107,44,0.8);}
@media (orientation: landscape) {
  @media screen and (max-height:350px) {
    .start-modal .text-box .title .ko {font-size: 28px;}
    .start-modal .text-box .title .en {font-size:18px; margin-top: 14px;}
    .start-modal .text-box .input-box {margin: 30px 0;}
  }
}

/********** game **********/
#play {width: 100%; height: var(--fullHeight); position: relative; z-index: 0; touch-action: none;}
#play .game {width: 100%; height: var(--fullHeight); position: relative; z-index: 5; overflow: hidden; user-select: none; touch-action: none;}
#play .game canvas {width: 100%; height: 100%; display: block; touch-action: none; user-select: none; position: absolute; left: 0; top: 0;}
#play .game img {position: absolute; user-select: none; max-width: 15vw; z-index: 1;   }
#play .game #countingTimer {position: absolute; z-index: 15; font-size: 12px; color: #fff; top: 0; left: 50%; transform: translate(-50%, 40px); background: #000; padding: 6px 10px; min-width: 57px; text-align: center; box-shadow: 2px 4px 4px rgba(0,0,0,0.25);}
#play .game #countingTimer.tight {color: var(--point-color); }
#play .background {width: 100%; height: 100%; position: absolute; z-index: 1; left: 0; top: 0; overflow: hidden;}
#play .background .frame {width: 100%; height: 100%; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);}
#play .background .frame span {width: 100%; height: 100%; background-size: cover; background-repeat: no-repeat; display: block;}
#play .ending-feather {position: absolute; top: 0; left: 0; width: 10px; height: 10px;  opacity: 0; pointer-events: none; will-change: transform; font-size: 0; z-index: 20; transform-origin: 50% 50%;}
#play .ending-feather img {width: min(13vw, 13vh); display: block; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 1;}

  /* day  */
body[data-mode="day"] #play .background {  }
body[data-mode="day"] #play .background .outer {width: 100%; height: 100%; position: absolute; left: 0; top: 0; overflow: hidden; background-image: url(https://jxjdreamscape.vstory.ai.kr/img/bg_day_sky2.webp); background-position: center; background-size: cover; background-repeat: no-repeat; -webkit-backface-visibility: hidden; backface-visibility: hidden; filter: blur(2.5px); }
body[data-mode="day"] #play .background .outer .cloud {width: 100%; height: 100%; position: absolute; z-index: 0; background-image: url(https://jxjdreamscape.vstory.ai.kr/img/bg_day_cloud2.webp); background-position: center; background-repeat: no-repeat; background-size: cover; animation: cloudAni 5s linear infinite alternate;}
body[data-mode="day"] #play .background .rolling {width: 200%; height: 100%; animation: infiniteBack 10s infinite linear forwards; display: flex; transform: translate3d(0, 0, 0); -webkit-transform: translate3d(0, 0, 0); -webkit-backface-visibility: hidden; backface-visibility: hidden; will-change: transform; -webkit-perspective: 1000;  perspective: 1000;  -webkit-transform-style: preserve-3d; transform-style: preserve-3d; position: relative; z-index: 1;}
body[data-mode="day"] #play .background .rolling span {width: 50%; height: 100%; background-image: url(https://jxjdreamscape.vstory.ai.kr/img/bg_day_grass.webp); background-position: center; background-size: cover; background-repeat: no-repeat; flex-shrink: 0; display: block; -webkit-backface-visibility: hidden; backface-visibility: hidden;}
body[data-mode="day"] #play .background .frame { transform-origin: 50% 50%; width: 105%; height: 105%;}
body[data-mode="day"] #play .background .frame span { background-image: url(https://jxjdreamscape.vstory.ai.kr/img/frame_day_v2.webp); background-size: auto 105%; background-position: center;  animation: rattle 4s infinite ease-in-out;}

@keyframes cloudAni {
  0%{transform: translate(1%, 1%);}
  30% {transform: translate(1%, 0%);}
  60% {transform: translate(1%, 1%);}
  100%{transform: translate(1%, 0%);}
}
@keyframes infiniteBack {
  0% {transform: translate3d(0, 0, 0);}
  100% {transform: translate3d(-50%, 0, 0);}
}

/* night */
body[data-mode="night"] #play .background span { background-image: url(https://jxjdreamscape.vstory.ai.kr/img/bg_night1.webp); background-position: center; background-repeat: no-repeat; z-index: 1;}
body[data-mode="night"] #play .flashlight { --x:0px; --y:0px; --wid:1px; position: absolute; top: 0; left: 0;  width: 100%; height: 100%; pointer-events: none; background: radial-gradient(circle var(--wid) at var(--x, 50%) var(--y, 50%), transparent var(--range), rgba(0, 0, 0, 0.6) var(--max) ); z-index: 10;}
body[data-mode="night"] #play .flashlight.start {--wid:150px;}
body[data-mode="night"] #play .night-score { position: absolute; z-index: 10; transform: translate(-50%, -50%); font-size: 24px; font-weight: 500; color: #000000; pointer-events: none; -webkit-text-stroke : 1px #E36B2C; }
body[data-mode="night"] #play .ending-feather img { max-width: 200px;}
body[data-mode="night"] #play .ending-feather::before {content:""; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: max(8vw, 8vh); height: max(14vw, 14vh); background: #3A9794; filter: blur(50px); opacity: 0.6; max-width: 200px; max-height: 320px;}

@keyframes rattle {
  0% { transform: translateY(0); }
  3% { transform: translateY(-3px) rotate(0.01deg);  }
  6% { transform: translateY(1px) rotate(-0.01deg);  }
  9% { transform: translateY(-2px) rotate(0deg);  }
  12% {transform: translateY(0px) rotate(0deg);}
  100% { transform: translateY(0); }
}

@media (orientation: portrait){
}
@media screen and (max-width:1024px) {
  #play .game #countingTimer {transform: translate(-50%,26px); }
  #play .ending-feather img {width: max(10vw, 10svh);}
  body[data-mode="night"] #play .ending-feather::before {width: max(10vw, 10vh); height: max(16vw, 16vh);}

  body[data-mode="night"] #play .flashlight {}
  body[data-mode="night"] #play .flashlight.start {--wid: min(25vw, 25vh);}
  body[data-mode="night"] #play .night-score {font-size: 18px;}
}



/********** end modal **********/
.end-modal {position: absolute; left: 0; top: 0; width: 100%; height: var(--fullHeight); z-index: 100;  color: var(--text-color2); opacity: 0;}
.end-modal .ending-title {position: absolute; width: 100%; height: 100%; position: absolute; left: 0; top: 0; z-index: 60; pointer-events: none; opacity: 0;  display: flex; align-items: center; justify-content: center; z-index: 0;}
.end-modal .ending-title span {font-size: 50px; font-weight: 600; opacity: 0;}
.end-modal .modal-wrap {display: flex; justify-content: center; width: 100%; height: 100%; gap: 24px; padding: 16px; align-items: center; opacity: 0; pointer-events: none; background-color: var(--back-color); position: relative; z-index: 2; background-repeat: no-repeat;}
.end-modal .modal-wrap .w-50 {width: calc(50% - 12px); max-width: 560px; }
.end-modal .video-box {display: flex; align-items: center;}
.end-modal .video-box .vod {width: 100%; padding-top: 56.25%; position: relative;}
.end-modal .video-box .vod iframe {position: absolute; width: 100%; height: 100%; left: 50%; top: 50%; transform: translate(-50%,-50%);  }
.end-modal .uesr-info {text-align: center;}
.end-modal .uesr-info .score {display: flex; justify-content: center; gap: 15px; align-items: center; text-align: center; font-weight: 600; font-size: 22px; margin-bottom: 16px;}
.end-modal .uesr-info .score span:nth-child(2) {font-weight: 700; font-size: 42px; }
.end-modal .uesr-info p br {display: none; line-height: 1.4;}
.end-modal .uesr-info p.ko {font-weight: 500; font-size: 16px; }
.end-modal .uesr-info p.en {font-size: 15px; margin-top: 6px; }
.end-modal .uesr-info .input-text {margin-top: 30px; margin-bottom: 26px;}
.end-modal .uesr-info .input-text input {appearance: none; border: 1px solid rgba(0,0,0,0.4); height: 36px; width: 100%; max-width: 355px; padding: 0 12px; text-align: center; font-size: 15px; background-color: rgba(0,0,0,0); color: var(--text-color2);}
.end-modal .uesr-info .input-text input::placeholder {color: var(--text-color2); opacity: 0.8;}
.end-modal .uesr-info .btn-box {display: flex; gap: 19px; justify-content: center; align-items: center;}
.end-modal .uesr-info .btn-box a {display: flex; align-items: center; justify-content: center; text-align: center; background: var(--point-color); color: var(--text-color); box-shadow: 2px 4px 4px rgba(0,0,0,0.25); gap: 5px; font-weight: 600; width: 150px; height: 40px; font-size: 15px; line-height: 1.2;}
.end-modal .uesr-info .btn-box a::before {content:""; width: 24px; height: 24px; background-size: cover; background-position: left center; background-repeat: no-repeat;}
.end-modal .uesr-info .btn-box a.imageDownBtn::before {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/icon_down.svg);}
.end-modal .uesr-info .btn-box a.returnHomeBtn::before {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/icon_replay.svg);}
.end-modal .uesr-info .btn-box a span {width: 58px; text-align: left; }
.end-modal .uesr-info .sns-box {display: flex; justify-content: center; align-items: center; gap: 32px; margin-top: 16px;}
.end-modal .uesr-info .sns-box a {font-size: 1px; width: 48px; height: 48px; color: rgba(0,0,0,0); box-sizing: border-box; background-position: left center; background-size: cover; background-repeat: no-repeat; }
.end-modal .uesr-info .sns-box a.kakao {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/sns_kakao.svg);}
.end-modal .uesr-info .sns-box a.twitter {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/sns_x.svg);}
.end-modal .uesr-info .sns-box a.insta {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/sns_insta.svg);}
.end-modal .uesr-info .sns-box a.snap {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/sns_snapchat.svg);}

body[data-mode="day"] .end-modal .ending-title {background: rgba(255,255,255,0.9);}
body[data-mode="day"] .end-modal .modal-wrap {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/intro_bg_day.webp); background-position: center right;  }
body[data-mode="day"] .end-modal .uesr-info .input-text input {border-color: rgba(0,0,0,0.4);}

body[data-mode="night"] .end-modal .ending-title {background: rgba(0,0,0,0.6);}
body[data-mode="night"] .end-modal .modal-wrap {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/intro_bg_night.webp); background-position: top right; background-size: 116% auto; }
body[data-mode="night"] .end-modal .uesr-info .input-text input {border-color: rgba(227,107,44,0.8);}
body[data-mode="night"] .end-modal .uesr-info .btn-box a::before {background-position: right center;}
body[data-mode="night"] .end-modal .uesr-info .sns-box a {background-position: right center;}


@media (orientation: portrait){
  @media screen and (max-width:1024px){
    .end-modal .modal-wrap {flex-direction: column-reverse; gap: 60px;}
    .end-modal .modal-wrap .w-50 {width: 100%;}

    body[data-mode="night"] .end-modal .modal-wrap {background-size:  cover;}
  }
}
@media (orientation: landscape) {
  @media screen and (max-width:1024px){
    body[data-mode="day"] .end-modal .modal-wrap { background-image: url(https://jxjdreamscape.vstory.ai.kr/img/bg_ending_day.webp); background-size: cover; background-position: center;}
  }
  @media screen and (max-height:350px) {
    .end-modal .uesr-info .score {font-size:20px;}
    .end-modal .uesr-info .score span:nth-child(2) {font-size:38px;}
    .end-modal .uesr-info p.ko {font-size: 15px;}
    .end-modal .uesr-info p.en {font-size: 14px; margin-top: 5px;}
    .end-modal .uesr-info .input-text {margin-top:20px; margin-bottom: 24px;}
    .end-modal .uesr-info .btn-box a {font-size:14px; height:38px;}
    .end-modal .uesr-info .btn-box a::before {width:22px; height:22px;}
    .end-modal .uesr-info .sns-box a {width:44px; height:44px; }
  }
}


/********** capture **********/
#captureImage {width: 430px; height: 430px; padding: 32px 24px; position: absolute; left: 0; top: 0; background-color: var(--back-color); color: var(--text-color2); z-index: -1; overflow: hidden;}
#captureImage .bg {position: absolute; left: 0;  width: 100%; }
#captureImage.day .bg {left: 0; top: 0; transform: translate(74px, -30px);}
#captureImage.night .bg {left: 50%; top: 0; transform: translate(-50%, 0) scaleX(-1); width: 140%;}
#captureImage .wrapper {padding: 0 10px; position: relative; z-index: 1;}
#captureImage .user-name {display: flex; align-items: center; justify-content: start; margin-bottom: 25px; font-size: 22px; height: 52px;}
#captureImage .score {width: 285px; padding: 25px 0; display: flex; gap: 15px; align-items: baseline; font-weight: 500; font-size: 19px; line-height: 1.5; position: relative;}
#captureImage .score::before {content:""; width: 100%; height: 1px; position: absolute; left: 0; bottom: 0; background: var(--point-color);}
#captureImage .score p {position: absolute; top: 0; left: 0; transform: translateY(-50%); font-weight: 500; font-size: 16px; display: flex; align-items: center; gap: 14px;} 
#captureImage .score p::after {content:""; height: 1px; width: 220px; background: var(--point-color); display: block; }
#captureImage .score span {font-weight: 700; font-size: 80px; line-height: 1;}
#captureImage .fly-text {margin-top: 40px; line-height: 1.3; letter-spacing: -0.01em;}
#captureImage .fly-text .ko {font-weight: 500; font-size: 18px;}
#captureImage .fly-text .en {font-weight: 400; font-size: 16px; margin-top: 15px;}

/* #captureImage.day { background-image: url(https://jxjdreamscape.vstory.ai.kr/img/intro_bg_day.webp); background-position: left 74px top 23%; background-size: 100% auto; background-repeat: no-repeat;}
#captureImage.night::before {content:""; width: 100%; height: 100%; position: absolute; left: 0; top: 0; background-image: url(https://jxjdreamscape.vstory.ai.kr/img/intro_bg_night.webp); background-position: center top; background-size: 140% auto; transform: scaleX(-1);} */


/********** easteregg **********/
.easteregg {width: 100%; height: var(--fullHeight); position: fixed; background-color: var(--back-color); left: 0; top: 0; z-index: 11;}
.easteregg .frame {width: auto; height: 100%; aspect-ratio:1/1.783; margin: auto; position: absolute; left: 50%; top: 0; transform:translateX(-50%); z-index: 10;}
.easteregg .frame::before {content:""; width: 100%; height: 100%; position: absolute; left: 0; top: 0; z-index: 1; background-size: 100% auto; background-repeat: no-repeat; background-position: center top 35%; filter: blur(2px);}
.easteregg .frame canvas {display: block; width: 100%; height: 100%; position: relative; z-index: 2;}
.easteregg .bgm-toggle {width: 42px; height: 42px;  background-size: cover; background-repeat: no-repeat; position: absolute; right: 5%; top: 5%; font-size: 1px; color:rgba(0,0,0,0); z-index: 3;}
.easteregg .bgm-toggle[data-play="true"] {background-position: left center;}
.easteregg .bgm-toggle[data-play="false"] {background-position: right center;}

body[data-mode="day"] .easteregg::before {content: ""; position: absolute; background-image: url(https://jxjdreamscape.vstory.ai.kr/img/intro_bg_day.webp); left: 50%; top: 70%; width: 80vw; background-repeat: no-repeat; background-size: cover; transform: translate(-50%, -50%) rotate(71deg); aspect-ratio: 1 / 1.348;}
body[data-mode="day"] .easteregg .frame {background-color: #000;}
body[data-mode="day"] .easteregg .frame::before {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/bg_easteregg_day2.webp); opacity: 0.8; }
body[data-mode="day"] .easteregg .bgm-toggle {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/icon_sound_day.svg);}
body[data-mode="night"] .easteregg::before,
body[data-mode="night"] .easteregg::after {content:""; width: calc((100vw - 56vh)/2); position: absolute;  top: 0; height: 100%; background-image: url(https://jxjdreamscape.vstory.ai.kr/img/easteregg_bg_night.webp); background-repeat: no-repeat; background-size: cover; background-position: center bottom;}
body[data-mode="night"] .easteregg::before {left: 0;}
body[data-mode="night"] .easteregg::after {right: 0; transform: rotate(180deg); }
body[data-mode="night"] .easteregg .frame::before {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/bg_night_v2.webp);  }
body[data-mode="night"] .easteregg .bgm-toggle {background-image: url(https://jxjdreamscape.vstory.ai.kr/img/icon_sound_night.svg);}
@media screen and (max-width:768px) {
  .easteregg .frame {width: 100%; height: 100%; aspect-ratio:unset;  }
}