.cove-page {
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}

#page-root[data-page="home"] {
  flex: 1;
  display: flex;
  min-height: 0;
}

.cove-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 0;
}

.cove-hint {
  margin: 0;
  text-align: center;
  font-family: "Baloo 2", Nunito, sans-serif;
  font-size: clamp(1.05rem, 2.2vw, 1.55rem);
  font-weight: 800;
  color: #1d4f6e;
}

#cove-stage {
  position: relative;
  width: min(100%, calc((100dvh - 200px) * 1448 / 1086));
  max-height: calc(100dvh - 200px);
  aspect-ratio: 1448 / 1086;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  filter: drop-shadow(0 18px 28px rgba(20, 64, 90, 0.28));
}

#cove-bg,
#cove-3d {
  display: block;
  width: 100%;
  height: 100%;
}

#cove-bg {
  pointer-events: none;
}

#cove-3d {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#cove-fallback {
  position: absolute;
  left: 50%;
  top: 62%;
  width: 22%;
  transform: translate(-50%, -100%);
  transform-origin: bottom center;
  pointer-events: none;
  will-change: left, top, transform;
}

#cove-fallback.is-idle {
  animation: cove-idle-bob 1.6s ease-in-out infinite;
}

#cove-3d.is-ready + #cove-fallback {
  visibility: hidden;
}

#cove-marker {
  position: absolute;
  width: 2.4%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(80, 160, 200, 0.45);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}

@keyframes cove-idle-bob {
  0%,
  100% { transform: translate(-50%, -100%) scale(var(--cove-scale, 1)); }
  50% { transform: translate(-50%, calc(-100% + 1.5%)) scale(calc(var(--cove-scale, 1) * 1.03), calc(var(--cove-scale, 1) * 0.97)); }
}

@media (prefers-reduced-motion: reduce) {
  #cove-fallback.is-idle {
    animation: none;
  }
}
