/* 共通スタイル */
.p-opening {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: -webkit-fill-available; /* iOS Safari対策 */
  z-index: 99999;
  pointer-events: none;
}

.p-opening__bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: -webkit-fill-available; /* iOS Safari対策 */
}

.p-opening__logo {
  position: fixed; /* absoluteからfixedに変更 */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 190px;
  opacity: 0;
  animation: logoFadeInOut 3s ease-out forwards;
  animation-delay: 0.3s;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 1));
  z-index: 1;
}
.p-opening__logo::before {
  content: "";
  position: absolute;
  top: -12%;
  left: -15%;
  width: 130%;
  height: 130%;
  background-color: #fff8;
  filter: blur(15px);
  border-radius: 35%;
  z-index: -1;
}

.p-opening__logo img {
  width: 100%;
  height: auto;
}

/* タイプ1のスタイル */
.p-opening[data-type="type1"] .p-opening__bg svg {
  width: 100%;
  height: 100%;
}

/* タイプ2のスタイル */
.p-opening[data-type="type2"] .p-opening__color {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color_pale01);
  opacity: 1;
  animation: fadeOut 1s ease-out forwards;
  animation-delay: 2.4s;
}

/* 共通アニメーション */
@keyframes logoFadeInOut {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -55%) scale(1);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

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

/* アニメーション完了後に要素を非表示にする */
.p-opening.is-done {
  display: none;
}
