/* Keep the ghost clear of the sparks and preserve the destination's hit area. */
.forest-stage:is([data-scene="treetop"],[data-scene="nyc"]) .connections:has(.discovery.is-revealed) .spirit-wrap {
  --chest-ghost-side: 1;
  translate: calc(var(--chest-ghost-side) * 74px) -43px;
  z-index: 2;
}
.forest-stage:is([data-scene="treetop"],[data-scene="nyc"]) .connections[data-selected="practice"] .spirit-wrap {
  --chest-ghost-side: -1;
}
@media (max-width:680px) {
  .forest-stage:is([data-scene="treetop"],[data-scene="nyc"]) .connections:has(.discovery.is-revealed) .spirit-wrap {
    translate: calc(var(--chest-ghost-side) * 54px) -60px;
  }
}

/* Slightly larger chest bursts, without changing their paths or hit targets. */
@media (prefers-reduced-motion: no-preference) {
  body.motion-enabled .forest-stage[data-scene="nyc"] .connections:not(.still) .discovery.is-revealed .fly { --piece: 17px; }
  body.motion-enabled .forest-stage[data-scene="treetop"] .connections:not(.still) .discovery.is-revealed .fly-1 { --piece: 15px; }
  body.motion-enabled .forest-stage[data-scene="treetop"] .connections:not(.still) .discovery.is-revealed .fly-2 { --piece: 12px; }
  body.motion-enabled .forest-stage[data-scene="treetop"] .connections:not(.still) .discovery.is-revealed .fly-3 { --piece: 13px; }
  body.motion-enabled .forest-stage[data-scene="treetop"] .connections:not(.still) .discovery.is-revealed :is(.fly-4, .fly-5) { --piece: 11px; }
  body.motion-enabled .forest-stage[data-scene="treetop"] .connections:not(.still) .discovery.is-revealed .fly-6 { --piece: 10px; }
}

/* Keep the mobile ghost's full hit target beneath the sticky name strip. */
@media (max-width: 680px) {
  .forest-stage[data-scene="forest"] .chic-doorguide,
  .forest-stage:is([data-scene="treetop"],[data-scene="nyc"]) .connections .spirit-wrap {
    margin-top: var(--phone-ghost-clearance, 0px);
  }
  .forest-stage.phone-ghost-above-scene[data-scene="forest"] .chic-doorguide,
  .forest-stage.phone-ghost-above-scene:is([data-scene="treetop"],[data-scene="nyc"]) .connections .spirit-wrap {
    visibility: hidden;
  }
}

@media (max-width: 680px) {
  .forest-stage[data-scene="forest"] .chic-doorguide .ghost-antlers {
    transform-box: view-box;
    transform-origin: 50% 20%;
    transform: scale(.82);
  }
  /* Keep a deliberate touch drag stable on phones, including hybrid devices. */
  .touch-draggable-ghost:is(.mobile-ghost-dragging,.mobile-ghost-parked) {
    transform: translate(-50%,-50%) !important;
    animation: none !important;
    transition: none !important;
  }
  .mobile-ghost-dragging .guide-bob,.mobile-ghost-parked .guide-bob {
    animation: none !important;
  }
}
