/* ============================================================= Stage */
.stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: .55rem;
  min-height: 0;
}

.terra {
  position: relative;
  min-height: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    inset 0 -60px 120px -50px rgba(0, 0, 0, .8),
    0 30px 70px -40px #000;
  isolation: isolate;
}

/* --- Himmel ------------------------------------------------------- */
.terra__sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    #0c2f4a 0%,
    #17587a 26%,
    #359a9c 52%,
    #86cfb2 70%,
    #f7cf94 86%,
    #f0a768 100%);
}

.terra__sun {
  position: absolute;
  left: 50%;
  bottom: 16%;
  width: min(38vmin, 300px);
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle, #fff5d8 0%, #ffd58a 32%, rgba(255, 190, 110, .5) 55%, transparent 72%);
  filter: blur(2px);
  animation: sunPulse 8s ease-in-out infinite;
}
@keyframes sunPulse { 50% { opacity: .82; transform: scale(1.05); } }

.terra__rays {
  position: absolute;
  left: 50%;
  bottom: 16%;
  width: 180vmax;
  aspect-ratio: 1;
  translate: -50% 50%;
  opacity: .085;
  mix-blend-mode: screen;
  filter: blur(3px);
  background: repeating-conic-gradient(from 0deg,
    rgba(255, 240, 200, .9) 0deg 3deg,
    transparent 3deg 13deg);
  mask-image: radial-gradient(circle, #000 8%, transparent 42%);
  animation: spin 90s linear infinite;
  pointer-events: none;
}
@keyframes spin { to { rotate: 360deg; } }

.terra__cloud {
  position: absolute;
  height: 12%;
  background:
    radial-gradient(closest-side, rgba(255, 255, 255, .72), transparent) 18% 75% / 42% 62% no-repeat,
    radial-gradient(closest-side, rgba(255, 255, 255, .82), transparent) 46% 28% / 46% 100% no-repeat,
    radial-gradient(closest-side, rgba(255, 255, 255, .66), transparent) 80% 78% / 40% 56% no-repeat;
  filter: blur(6px);
  pointer-events: none;
}
.terra__cloud--a { top: 12%; width: 26%; animation: drift 64s linear infinite; }
.terra__cloud--b { top: 26%; width: 18%; opacity: .6; animation: drift 92s linear infinite -30s; }
.terra__cloud--c { top: 6%; width: 32%; opacity: .35; animation: drift 120s linear infinite -70s; }
@keyframes drift { from { left: -35%; } to { left: 115%; } }

.terra__hills {
  position: absolute;
  inset: auto 0 15% 0;
  height: 34%;
  background:
    radial-gradient(60% 100% at 18% 100%, #2a6d5c 0 70%, transparent 71%),
    radial-gradient(52% 92% at 78% 100%, #235c4e 0 70%, transparent 71%),
    radial-gradient(80% 80% at 50% 108%, #1d4f43 0 70%, transparent 71%);
  filter: blur(.4px);
  opacity: .95;
}

/* --- Boden -------------------------------------------------------- */
.terra__ground {
  --wet: 0;
  position: absolute;
  inset: auto 0 0 0;
  height: 17%;
  background: linear-gradient(180deg, #5b3d28 0%, #40291b 40%, #2a1a11 100%);
  box-shadow: inset 0 6px 18px -6px rgba(0, 0, 0, .7);
}
.terra__ground::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 14px;
  background: linear-gradient(180deg, #6f8f4a, #4b6a30 60%, transparent);
  border-radius: 50% 50% 0 0 / 14px 14px 0 0;
}
.terra__ground::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #2b1b10, #170e08);
  opacity: calc(var(--wet) * .72);
  transition: opacity .5s ease;
}

.terra__fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

.terra::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  background: radial-gradient(120% 90% at 50% 45%, transparent 45%, rgba(2, 8, 6, .55) 100%);
}

/* --- Pflanze ------------------------------------------------------ */
.hero {
  position: absolute;
  left: 50%;
  bottom: 17%; /* deckungsgleich mit .terra__ground: die Pflanze steht auf der Grasnarbe */
  translate: -50% 0;
  width: min(46%, 380px);
  aspect-ratio: 4 / 5;
  z-index: 3;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .5));
}
.hero svg { overflow: visible; }
.hero .part {
  opacity: 0;
  transform: scale(.55) translateY(12px);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transition: opacity .7s ease, transform .9s cubic-bezier(.16, 1.3, .3, 1);
}
.hero .part.is-on { opacity: 1; transform: none; }
.hero .sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 5.5s ease-in-out infinite alternate; }
.hero .aura { animation: auraPulse 5s ease-in-out infinite; }
@keyframes auraPulse { 50% { opacity: .6; } }
.hero .orbs circle { animation: orbFloat 4.5s ease-in-out infinite; filter: drop-shadow(0 0 6px #ffd166); }
.hero .orbs circle:nth-child(2) { animation-duration: 6s; animation-delay: -1.5s; }
.hero .orbs circle:nth-child(3) { animation-duration: 5.4s; animation-delay: -3s; }
@keyframes orbFloat { 50% { transform: translateY(-14px); opacity: .55; } }
.hero .sway--slow { animation-duration: 8s; }
.hero .sway--fast { animation-duration: 4s; }
@keyframes sway { from { rotate: -1.6deg; } to { rotate: 1.6deg; } }
.hero.is-splash { animation: splash .5s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes splash { 40% { transform: translate(-50%, 0) scaleY(1.045) scaleX(.975); } }

/* --- Gartenreihe -------------------------------------------------- */
.gardenrow {
  position: absolute;
  inset: auto 0 3.5% 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: .3rem clamp(.2rem, 1vw, .6rem);
  padding: 0 1rem;
  pointer-events: none;
}
.gpot {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: clamp(30px, 4.4vw, 46px);
  animation: potIn .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes potIn { from { opacity: 0; transform: translateY(14px) scale(.6); } }
.gpot__icon {
  width: 100%;
  aspect-ratio: 1;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .55));
  animation: sway 6s ease-in-out infinite alternate;
  transform-origin: 50% 100%;
}
.gpot__n {
  font-family: var(--font-display);
  font-size: .62rem;
  font-weight: 600;
  padding: 0 .35rem;
  border-radius: 999px;
  background: rgba(3, 12, 8, .72);
  color: #d8f5e4;
  font-variant-numeric: tabular-nums;
}

/* --- Gießkanne ---------------------------------------------------- */
.can {
  position: absolute;
  right: clamp(4%, 8%, 12%);
  bottom: 30%;
  width: min(30%, 260px);
  z-index: 5;
  transform-origin: 78% 88%;
  transition: transform .28s cubic-bezier(.3, 1.4, .5, 1), filter .2s;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .55));
}
/* Tülle zeigt zur Pflanze (links) */
.can__svg { width: 100%; height: auto; transform: scaleX(-1); }
.can:hover { transform: translateY(-7px) rotate(-5deg); filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .6)) brightness(1.08); }
.can.is-pouring { transform: translateY(-4px) rotate(-40deg) !important; transition-duration: .12s; }
.can__glow {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 194, 255, .38), transparent 62%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.can:hover .can__glow { opacity: 1; }
.can.is-idle .can__glow { opacity: .55; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 50% { opacity: .95; transform: scale(1.07); } }
.can__label {
  position: absolute;
  left: 50%;
  bottom: -1.9rem;
  translate: -50% 0;
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
  opacity: 0;
  transition: opacity .25s;
  white-space: nowrap;
}
.can:hover .can__label { opacity: 1; }

/* --- Zahlen-Pops -------------------------------------------------- */
.pops { position: absolute; inset: 0; z-index: 7; pointer-events: none; overflow: hidden; }
.pop {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--seed);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .85);
  white-space: nowrap;
  animation: popUp 1.1s cubic-bezier(.2, .8, .3, 1) forwards;
}
.pop--crit {
  font-size: 1.9rem;
  color: var(--crit);
  text-shadow: 0 0 20px rgba(255, 224, 102, .9), 0 2px 10px rgba(0, 0, 0, .9);
  animation: popCrit 1.4s cubic-bezier(.2, .8, .3, 1) forwards;
}
@keyframes popUp {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.7); }
  18% { opacity: 1; transform: translate(-50%, -14px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -84px) scale(.92); }
}
@keyframes popCrit {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.5) rotate(-8deg); }
  16% { opacity: 1; transform: translate(-50%, -18px) scale(1.25) rotate(3deg); }
  100% { opacity: 0; transform: translate(-50%, -120px) scale(1) rotate(0); }
}

.stagehint {
  position: absolute;
  left: 50%;
  top: 7%;
  translate: -50% 0;
  z-index: 7;
  padding: .4rem .9rem;
  border-radius: 999px;
  background: rgba(3, 12, 8, .6);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(6px);
  font-size: .78rem;
  color: rgba(255, 255, 255, .9);
  animation: hintBob 2.6s ease-in-out infinite;
  transition: opacity .4s;
}
.stagehint.is-gone { opacity: 0; }
@keyframes hintBob { 50% { transform: translateY(-5px); } }

/* --- Ticker ------------------------------------------------------- */
.ticker {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: 0 .2rem;
}
.tick {
  display: flex;
  align-items: baseline;
  gap: .35rem;
  padding: .34rem .7rem;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  font-size: .74rem;
}
.tick b {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .84rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.tick span { color: var(--dim); }

@media (max-width: 1000px) {
  /* Schmale Schirme: Pflanze nach links rücken, damit die Kanne sie nicht überdeckt. */
  .hero { width: min(46%, 260px); left: 40%; }
  .can { width: min(34%, 170px); right: 2%; bottom: 26%; }
  .ticker { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .ticker::-webkit-scrollbar { display: none; }
  .tick { flex: none; }
}
