/* Star Hatchery */

.hatch-card { overflow: hidden; text-align: center; background: radial-gradient(circle at 50% 70%, #fff5d6, #ffffff 60%); }
.wallet { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.wallet .ss-chip { min-height: 48px; font-size: 17px; }
.wallet .spend { color: #9a5a00; background: linear-gradient(145deg, #fff7d6, #ffe9b8); }

.nest { position: relative; display: grid; height: 260px; margin-top: 10px; place-items: center; }
.nest::after { position: absolute; bottom: 18px; left: 50%; width: 220px; height: 34px; border-radius: 50%; background: radial-gradient(#e7c58f, #c9995a); content: ""; transform: translateX(-50%); z-index: 0; }

.egg-btn { position: relative; z-index: 1; padding: 0; cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
.egg-btn svg { width: 170px; height: 210px; overflow: visible; }
.egg-btn.wobble { animation: eggWobble .45s ease; }
.egg-btn.idle { animation: eggIdle 2.4s ease-in-out infinite; }
.egg-btn:disabled { cursor: default; }
.egg-btn .crack { stroke: #6b4a35; stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.flash { position: absolute; z-index: 2; inset: 0; border-radius: 50%; pointer-events: none; animation: flash 1s ease forwards; }
.hatched { position: relative; z-index: 3; animation: popOut .7s cubic-bezier(.2, 1.4, .4, 1); }
.hatched .creature { width: 200px; height: 200px; }
.hatched.bounce .creature { animation: creatureBounce .5s ease; }

.rarity { display: inline-block; padding: 5px 12px; border-radius: 999px; color: #fff; font-size: 13px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }

.empty-nest { color: #8a6a3a; font-size: 18px; font-weight: 900; }

.book-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.book-head h2 { margin: 0; color: #173a7b; font-family: var(--ss-font-head); font-size: 24px; }
.book-grid { display: grid; margin-top: 14px; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.book-slot {
  display: grid;
  padding: 8px 6px 10px;
  justify-items: center;
  gap: 2px;
  cursor: pointer;
  border: 3px solid transparent;
  border-radius: 18px;
  color: #4a6699;
  background: #f4f6fb;
  font-size: 13px;
  font-weight: 900;
}
.book-slot .creature { width: 84px; height: 84px; }
.book-slot.got:hover { transform: translateY(-2px); }
.book-slot.locked { cursor: default; color: #a3b0c8; }
.book-slot small { font-size: 10px; letter-spacing: .8px; text-transform: uppercase; }
.pretend { margin-top: 14px !important; color: #7a8db0; font-size: 13px; font-weight: 800; text-align: center; }

@keyframes eggIdle { 50% { transform: rotate(-3deg) translateY(-4px); } }
@keyframes eggWobble { 20% { transform: rotate(-12deg); } 50% { transform: rotate(10deg); } 80% { transform: rotate(-5deg); } }
@keyframes flash { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(2.2); } }
@keyframes popOut { from { opacity: 0; transform: translateY(40px) scale(.3); } }
@keyframes creatureBounce { 40% { transform: translateY(-16px) scale(1.05, .95); } }

@media (max-width: 640px) {
  .nest { height: 230px; }
  .egg-btn svg { width: 140px; height: 175px; }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .book-slot .creature { width: 68px; height: 68px; }
}
