.tree-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
}

.tree-stage > img {
  transform-origin: 50% 88%;
}

.hero-art.has-interactive-tree .art-stamp { bottom: 105px; }

.tree-hotspot {
  position: absolute;
  top: var(--hotspot-y);
  left: var(--hotspot-x);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  transform: translate(-20px, -20px);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.tree-hotspot-ai { --hotspot-x: 20%; --hotspot-y: 43%; }
.tree-hotspot-shop { --hotspot-x: 56.5%; --hotspot-y: 20.5%; }
.tree-hotspot-sourcing { --hotspot-x: 77.5%; --hotspot-y: 31%; }
.tree-hotspot-tools { --hotspot-x: 61.5%; --hotspot-y: 64.5%; }

.tree-hotspot-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}

.tree-hotspot-mark::before {
  content: '';
  width: 11px;
  height: 11px;
  border: 2px solid #fffaf0;
  border-radius: 50%;
  background: #b5783e;
  box-shadow: 0 0 0 4px #fbf7e95e, 0 1px 8px #523d2529;
  transition: box-shadow .2s, background .2s;
}

.tree-hotspot-label {
  padding: 5px 8px;
  border: 1px solid #dadbc58c;
  border-radius: 5px;
  background: #faf8efee;
  color: #536049;
  font-size: 9px;
  font-weight: 550;
  line-height: 1.3;
  letter-spacing: .35px;
  box-shadow: 0 2px 10px #38432b07;
  transition: background .2s, border-color .2s;
}

.tree-hotspot-sourcing {
  flex-direction: row-reverse;
  transform: translate(calc(-100% + 20px), -20px);
}

.tree-hotspot-tools .tree-hotspot-mark::before {
  background: #5c7351;
  box-shadow: 0 0 0 4px #edf0dc73, 0 1px 8px #293c2524;
}

.tree-hotspot:hover .tree-hotspot-mark::before,
.tree-hotspot:focus-visible .tree-hotspot-mark::before {
  background: #86613c;
  box-shadow: 0 0 0 6px #fbf7e9a8, 0 1px 10px #523d2529;
}

.tree-hotspot:hover .tree-hotspot-label,
.tree-hotspot:focus-visible .tree-hotspot-label {
  background: #fffdf5;
  border-color: #a9b197;
}

.tree-hotspot:focus-visible {
  outline: 2px solid #5a7151;
  outline-offset: 3px;
  background: #f7f6f259;
}

.tree-controls {
  position: relative;
  z-index: 1;
  max-width: 380px;
  margin: 17px auto 0;
  padding-inline: 7px;
}

.tree-control-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.tree-hint {
  margin: 0;
  color: #808773;
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: .15px;
}

.tree-water-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #ccd4bf;
  border-radius: 22px;
  background: #e9eddf88;
  color: #52694a;
  font-size: 10px;
  line-height: 1.3;
  transition: background .2s, border-color .2s;
}

.tree-water-button:hover {
  background: #e3ead7;
  border-color: #aebb9d;
}

.tree-water-button:focus-visible {
  outline: 2px solid #5a7151;
  outline-offset: 3px;
}

.tree-water-icon {
  width: 13px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tree-feedback {
  min-height: 17px;
  margin: 6px 0 0;
  color: #929783;
  font-size: 9px;
  line-height: 1.7;
  text-align: center;
  letter-spacing: .2px;
}

.tree-particles {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.tree-leaf {
  position: absolute;
  top: var(--leaf-y);
  left: var(--leaf-x);
  width: 6px;
  height: 10px;
  border-radius: 0 70% 0 70%;
  background: #8f9f71;
  opacity: 0;
  animation: tree-leaf-fall 1.25s var(--leaf-delay) ease-out both;
}

.tree-leaf:nth-child(3n) { background: #baab6e; }
.tree-leaf:nth-child(2n) { width: 5px; height: 8px; background: #657e59; }
.tree-stage.is-watered > img { animation: tree-water-sway .95s ease-in-out; }

@keyframes tree-water-sway {
  0%, 100% { transform: rotate(0); }
  24% { transform: rotate(-.75deg); }
  58% { transform: rotate(.65deg); }
  82% { transform: rotate(-.25deg); }
}

@keyframes tree-leaf-fall {
  0% { opacity: 0; transform: translate(0, 0) rotate(-20deg); }
  15% { opacity: .85; }
  100% { opacity: 0; transform: translate(var(--leaf-drift), 70px) rotate(var(--leaf-turn)); }
}

@media (max-width: 980px) and (min-width: 651px) {
  .tree-control-row { gap: 8px; }
  .tree-controls { margin-top: 12px; }
  .tree-hint { font-size: 9px; }
  .tree-water-button { padding-inline: 9px; font-size: 9px; }
  .tree-hotspot-label { padding-inline: 6px; font-size: 8px; }
}

@media (max-width: 650px) {
  .tree-controls { margin-top: 14px; max-width: 345px; padding-inline: 0; }
  .tree-control-row { gap: 11px; }
  .tree-hint { font-size: 9px; }
  .tree-hotspot-label { font-size: 9px; padding: 5px 7px; }
  .tree-hotspot-tools .tree-hotspot-label { font-size: 8px; }
  .tree-feedback { font-size: 8px; }
}

html[lang='en'] .tree-controls { max-width: 395px; }
html[lang='en'] .tree-hint { max-width: 240px; }
html[lang='en'] .tree-hotspot-label { font-size: 8px; letter-spacing: 0; }

@media (prefers-reduced-motion: reduce) {
  .tree-stage.is-watered > img,
  .tree-leaf { animation: none; }
  .tree-hotspot-mark::before,
  .tree-hotspot-label,
  .tree-water-button { transition: none; }
}
