.hatch-overlay {
  top: var(--hatch-viewport-top, 0px);
  bottom: auto;
  height: var(--hatch-viewport-height, 100vh);
  height: var(--hatch-viewport-height, 100dvh);
  z-index: 50;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 16px 12px max(16px, env(safe-area-inset-bottom));
  pointer-events: auto;
  overflow-y: auto;
}

.hatch-overlay > img:first-child,
.hatch-overlay .hatch-dragon {
  top: 0;
  width: 100%;
  height: 60%;
}

.hatch-overlay .hatch-card {
  grid-row: 2;
  margin: 0;
  width: min(100%, 440px);
  max-height: 100%;
  overflow-y: auto;
  padding: 14px;
}

.hatch-overlay .hatch-card strong {
  font-size: clamp(28px, 6vw, 48px);
}

.hatch-overlay:not(.hidden) .hatch-card {
  pointer-events: auto;
  opacity: 1;
  animation: none;
}

.hatch-collect-btn {
  margin-top: 6px;
  padding: 10px 32px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffe39a, #d9a441);
  color: #2a1607;
  font: 800 16px Arial, sans-serif;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}

.hatch-collect-btn:active {
  transform: translateY(1px);
}