html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: #ffd8ea;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "YuGothic",
    "Meiryo",
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans JP",
    sans-serif;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.28), transparent 38%),
    linear-gradient(180deg, #ffe0ee 0%, #ffbddb 100%);
  background-repeat: no-repeat;
  background-size: cover;
}

.sparkle {
  position: fixed;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: -1;
  animation: twinkle 4s ease-in-out infinite;
}

.s1 {
  width: 10px;
  height: 10px;
  top: 16%;
  left: 18%;
  animation-delay: 0s;
}

.s2 {
  width: 14px;
  height: 14px;
  top: 28%;
  right: 16%;
  animation-delay: 1s;
}

.s3 {
  width: 8px;
  height: 8px;
  bottom: 26%;
  left: 24%;
  animation-delay: 2s;
}

.s4 {
  width: 12px;
  height: 12px;
  bottom: 18%;
  right: 20%;
  animation-delay: 0.5s;
}

.s5 {
  width: 6px;
  height: 6px;
  top: 42%;
  left: 12%;
  animation-delay: 1.6s;
}

.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}

.ghostWrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ghost {
  width: min(128px, 42vw);
  height: auto;
  display: block;
  animation: float 3.2s ease-in-out infinite;
  filter:
    drop-shadow(0 10px 14px rgba(255, 255, 255, 0.22))
    drop-shadow(0 0 10px rgba(255, 244, 248, 0.35));
  will-change: transform;
}

.shadowFrame {
  width: min(130px, 44vw);
  margin-top: 6px;
}

.shadow {
  width: 100%;
  height: auto;
  display: block;
  animation: shrink 3.2s ease-in-out infinite;
  transform-origin: center center;
  opacity: 0.3;
  will-change: transform, opacity;
}

.caption {
  margin: 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  color: rgba(96, 58, 78, 0.82);
  user-select: none;
  text-align: center;
  line-height: 1.4;
  font-weight: 500;
  white-space: nowrap;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.heart {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ff6fa8;
  transform: translateY(1px);
  flex: 0 0 auto;
}

.heartIcon {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(18px) rotate(1deg);
  }
}

@keyframes shrink {
  0%, 100% {
    transform: scaleX(1);
    opacity: 0.3;
  }
  50% {
    transform: scaleX(0.72);
    opacity: 0.18;
  }
}

@keyframes twinkle {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.35;
  }
  50% {
    transform: translateY(-6px) scale(1.12);
    opacity: 0.7;
  }
}

@media (max-width: 480px) {
  .caption {
    font-size: 13px;
    gap: 5px;
  }

  .heart {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ghost,
  .shadow,
  .sparkle {
    animation: none;
  }
}

