.stage {
  background: #6eae72;
}

.garden {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tree,
.bush,
.gazebo,
.pot,
.hedge {
  position: absolute;
}

.tree {
  width: 180px;
  height: 150px;
  border-radius: 80px 80px 40px 40px;
  background: #5b9660;
}

.tree::after {
  content: "";
  position: absolute;
  left: 82px;
  bottom: -46px;
  width: 16px;
  height: 52px;
  background: #4e7d52;
  border-radius: 8px;
}

.tree-a { left: 70px; top: 18px; opacity: 0.55; }
.tree-b { left: 230px; top: 46px; width: 120px; height: 100px; opacity: 0.4; }

.hedge {
  left: 0;
  right: 0;
  top: 168px;
  height: 70px;
  background:
    radial-gradient(circle at 40px 40px, #5c9a62 0 34px, transparent 36px),
    radial-gradient(circle at 120px 28px, #67a56a 0 38px, transparent 40px),
    radial-gradient(circle at 210px 42px, #538a5a 0 36px, transparent 38px),
    radial-gradient(circle at 300px 30px, #6aaa6c 0 40px, transparent 42px),
    radial-gradient(circle at 400px 44px, #4f8658 0 34px, transparent 36px),
    radial-gradient(circle at 500px 26px, #63a266 0 42px, transparent 44px),
    radial-gradient(circle at 610px 40px, #578f5e 0 36px, transparent 38px),
    radial-gradient(circle at 720px 28px, #69a86c 0 40px, transparent 42px),
    radial-gradient(circle at 830px 42px, #4e8456 0 36px, transparent 38px),
    radial-gradient(circle at 940px 30px, #62a064 0 42px, transparent 44px),
    radial-gradient(circle at 1060px 40px, #558c5c 0 38px, transparent 40px);
  opacity: 0.85;
}

.ground {
  position: absolute;
  left: 0;
  right: 0;
  top: 230px;
  bottom: 0;
  background: linear-gradient(180deg, #5c9a63 0, #4d8a57 28%, #468252 100%);
}

.gazebo {
  right: 70px;
  top: 36px;
  width: 210px;
  height: 130px;
  opacity: 0.28;
}

.gazebo .roof {
  height: 28px;
  background: #3e6d46;
  border-radius: 6px 6px 0 0;
}

.gazebo .posts {
  display: flex;
  justify-content: space-between;
  padding: 0 18px;
  height: 78px;
}

.gazebo .posts span {
  width: 10px;
  background: #3e6d46;
}

.gazebo .step {
  height: 16px;
  margin: 0 28px 6px;
  background: #3e6d46;
}

.pot {
  left: 250px;
  top: 300px;
  width: 54px;
  height: 70px;
  opacity: 0.35;
}

.pot .leaf {
  width: 46px;
  height: 36px;
  margin: 0 auto;
  background: #3f7a49;
  border-radius: 40px 40px 16px 16px;
}

.pot .vase {
  width: 36px;
  height: 28px;
  margin: -4px auto 0;
  background: #6d9a62;
  border-radius: 4px 4px 10px 10px;
}

.bush-l, .bush-r {
  bottom: 18px;
  width: 160px;
  height: 70px;
  background: #3f7a4c;
  border-radius: 80px 80px 20px 20px;
  opacity: 0.45;
}

.bush-l { left: -20px; }
.bush-r { right: -10px; }

#play {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.prompt {
  position: absolute;
  top: calc(18px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: white;
}

.prompt small {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
}

.prompt strong {
  display: inline-block;
  margin-top: 6px;
  min-width: 280px;
  padding: 8px 28px 12px;
  border-radius: 28px;
  background: #fffdf8;
  color: #2b2118;
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 10px 0 rgba(47, 90, 52, 0.18);
}

.prompt strong.long {
  font-size: 48px;
  letter-spacing: 0;
}

.baskets {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 292px;
  display: flex;
  justify-content: center;
  gap: 22px;
}

.basket {
  width: 214px;
  height: 198px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  opacity: 0;
  transform: translateY(28px) rotate(var(--tilt)) scale(0.92);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s ease;
}

.basket.show {
  opacity: 1;
  transform: translateY(0) rotate(var(--tilt)) scale(1);
}

.basket:nth-child(2) { transition-delay: 0.06s; }
.basket:nth-child(3) { transition-delay: 0.12s; }
.basket:nth-child(4) { transition-delay: 0.18s; }

.basket:active .crate {
  filter: brightness(1.05);
}

.crate {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  background: linear-gradient(180deg, #a56b3c, #7a4a28);
  border: 12px solid #efd0a0;
  box-shadow:
    inset 0 0 0 4px #d7a86a,
    0 12px 0 rgba(40, 70, 44, 0.16);
}

.fruit {
  width: 136px;
  height: 136px;
  display: grid;
  place-items: center;
}

.fruit svg {
  width: 136px;
  height: 136px;
  overflow: visible;
}

.badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: none;
  place-items: center;
  color: white;
  font-size: 26px;
  font-weight: 900;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
}

.basket.is-right .badge,
.basket.is-wrong .badge {
  display: grid;
}

.basket.is-right .badge { background: #3ddc84; }
.basket.is-wrong .badge { background: #ff5d6c; }

.basket.is-right {
  animation: pop 0.45s ease;
}

.basket.is-wrong {
  animation: shake 0.45s ease;
}

.star {
  position: absolute;
  left: 50%;
  top: 46%;
  font-size: 28px;
  pointer-events: none;
  animation: burst 0.7s ease-out forwards;
}

.buddy {
  position: absolute;
  left: calc(16px + var(--safe-left));
  bottom: calc(28px + var(--safe-bottom));
  width: 104px;
  height: 96px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.buddy-bubble {
  width: 96px;
  height: 84px;
  background: white;
  border-radius: 40px;
  box-shadow: 0 8px 0 rgba(40, 70, 44, 0.12);
  display: grid;
  place-items: center;
  position: relative;
}

.buddy-bubble::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: -14px;
  border-width: 16px 12px 0 0;
  border-style: solid;
  border-color: white transparent transparent transparent;
}

.buddy-bubble > span {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyes {
  display: flex;
  gap: 14px;
}

.eyes span {
  width: 12px;
  height: 14px;
  background: #2b2118;
  border-radius: 8px;
}

.smile {
  display: block;
  width: 22px;
  height: 10px;
  margin-top: 6px;
  border-bottom: 4px solid #2b2118;
  border-radius: 0 0 16px 16px;
}

.buddy.happy .smile {
  height: 14px;
  background: #2b2118;
  border: none;
  border-radius: 0 0 14px 14px;
}

.meter {
  position: absolute;
  left: calc(140px + var(--safe-left));
  right: calc(36px + var(--safe-right));
  bottom: calc(22px + var(--safe-bottom));
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  width: 0;
  background: #ffe14a;
  border-radius: inherit;
  transition: width 0.35s ease;
}

#done {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #2f6a3e;
  display: grid;
  place-items: center;
  padding: 28px;
}

.done-card {
  width: min(980px, 100%);
  height: min(560px, 100%);
  background: white;
  border-radius: 40px;
  display: grid;
  grid-template-columns: 200px 1fr 150px;
  align-items: center;
  padding: 18px 18px 18px 8px;
  position: relative;
}

.done-title {
  position: absolute;
  top: 22px;
  left: 220px;
  right: 170px;
  text-align: center;
  font-size: 42px;
  font-weight: 900;
}

.done-fruits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: 2px 4px;
  max-width: 540px;
  margin: 0 auto;
  padding: 56px 8px 0;
}

.done-fruits .fruit,
.done-fruits .fruit svg {
  width: 82px;
  height: 82px;
}

.done-actions {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.round-btn {
  width: 92px;
  height: 92px;
  border: none;
  border-radius: 50%;
  font-size: 40px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.08);
  display: grid;
  place-items: center;
  text-decoration: none;
}

.round-btn:active { transform: scale(0.96); }

.round-btn.again { background: #ffd43b; color: #2b2118; }
.round-btn.next { background: #4dabf7; color: white; }

.cat {
  width: 190px;
  height: 230px;
  align-self: end;
}

@keyframes pop {
  0% { transform: translateY(0) rotate(var(--tilt)) scale(1); }
  40% { transform: translateY(-10px) rotate(var(--tilt)) scale(1.08); }
  100% { transform: translateY(0) rotate(var(--tilt)) scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0) rotate(var(--tilt)); }
  25% { transform: translateX(-10px) rotate(var(--tilt)); }
  75% { transform: translateX(10px) rotate(var(--tilt)); }
}

@keyframes burst {
  to {
    transform: translate(var(--x), var(--y)) scale(1.15);
    opacity: 0;
  }
}
