@charset "utf-8";

#splash {
  position: fixed;
  width: 100%;
  height: 100%;
  background: #faf4eb;
  z-index: 9999999;
  text-align:center;
  color:#fff;
}

#splash-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@media print, screen and (min-width: 768px) {
  #splash-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

/* 追加部分: ローディング表示制御 */
#splash, #splash-logo {
  display: none; /* 初期は非表示 */
}

body.loading #splash,
body.loading #splash-logo {
  display: block; /* loadingクラスがある時だけ表示 */
}

/* splash body
---------------------------------------------------- */
body {
  background: #e9b130; /* 初期 */
}

body.appear {
  background: #fff; /* 本サイトの背景色 */
}

body.appear.first-visit {
  background: #fff; /* 初回アクセスだけ白背景 */
}

body.appear.first-visit.animate .splashbg1,
body.appear.first-visit.animate .splashbg2 {
  display: block;
}

/* それ以外は非表示 */
body.appear:not(.first-visit) .splashbg1,
body.appear:not(.first-visit) .splashbg2 {
  display: none;
}

body.appear.animate .splashbg1 {
  animation-name: PageAnime;
  animation-duration: 1.4s;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
  content: "";
  position: fixed;
  z-index: 999;
  width: 100%;
  height: 100vh;
  bottom: 50%;
  left: 0;
  transform: scaleY(1);
  background-color: #e9b130;
}

@keyframes PageAnime {
  0% {
    transform-origin: top;
    transform: scaleY(1);
  }
  100% {
    transform-origin: top;
    transform: scaleY(0);
  }
}

body.appear.animate .splashbg2 {
  animation-name: PageAnime2;
  animation-duration: 1.4s;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
  content: "";
  position: fixed;
  z-index: 999;
  width: 100%;
  height: 100vh;
  top: 50%;
  left: 0;
  transform: scaleY(1);
  background-color: #e9b130;
}

@keyframes PageAnime2 {
  0% {
    transform-origin: bottom;
    transform: scaleY(1);
  }
  100% {
    transform-origin: bottom;
    transform: scaleY(0);
  }
}

#container {
  opacity: 0;
}

body.appear #container {
  animation-name: PageAnimeAppear;
  animation-duration: 1s;
  animation-delay: 0.2s;
  animation-fill-mode: forwards;
  opacity: 0;
}

@keyframes PageAnimeAppear {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}