:root {
  color: #211a16;
  background: #f3eae1;
  font-family: 'Noto Sans TC', 'PingFang TC', sans-serif;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f3eae1;
}

.fortune-preboot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  isolation: isolate;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  box-sizing: border-box;
  place-content: center;
  justify-items: center;
  overflow: hidden;
  padding: 2rem;
  color: #211a16;
  text-align: center;
  background: #f3eae1;
  opacity: 1;
  transition: opacity 180ms ease-out;
}

.fortune-preboot--leaving {
  pointer-events: none;
  opacity: 0;
}

.fortune-preboot__sequence {
  position: relative;
  width: min(22rem, 72vw);
  aspect-ratio: 429 / 420;
  transform-origin: 50% 72%;
  will-change: transform;
}

.fortune-preboot__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  will-change: opacity;
}

.fortune-preboot__frame:first-child {
  opacity: 1;
  visibility: visible;
}

.fortune-preboot__title {
  margin: 0.25rem 0 0;
  color: #211a16;
  font-family: 'Noto Serif TC', 'PingFang TC', serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.fortune-preboot__copy {
  margin: 0.5rem 0 0;
  color: #4a3b30;
  font-family: 'Noto Serif TC', 'PingFang TC', serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.fortune-preboot__dots {
  display: flex;
  margin-top: 0.75rem;
  gap: 0.45rem;
}

.fortune-preboot__dots i {
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 999px;
  background: #cfa352;
  animation: fortune-preboot-dot 1.2s ease-in-out infinite;
}

.fortune-preboot__dots i:nth-child(2) {
  animation-delay: 160ms;
}

.fortune-preboot__dots i:nth-child(3) {
  animation-delay: 320ms;
}

@keyframes fortune-preboot-dot {
  0%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-0.18rem);
  }
}

@media (max-width: 639px) {
  .fortune-preboot__title {
    font-size: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fortune-preboot {
    transition: none;
  }

  .fortune-preboot__dots i {
    animation: none;
  }
}
