/* Source-relative woodland lights travel with the panorama. The patio apple
   belongs to the visible left apple branch and is cancelled on camera travel. */
.ambient-patio-events,.ambient-wood-events,
.ambient-patio-events *,.ambient-wood-events *{pointer-events:none!important;user-select:none!important}
.ambient-patio-events,.ambient-wood-events{position:absolute;inset:0;overflow:hidden;contain:layout paint;isolation:isolate}
.ambient-patio-events{z-index:9;--apple-x:18%;--apple-top:23%;--apple-fall:43svh}
.ambient-wood-events{z-index:6}
.ambient-patio-events [hidden],.ambient-wood-events [hidden]{display:none!important}
.ambient-apple-event{position:absolute;left:var(--apple-x);top:var(--apple-top);width:clamp(23px,2.3vw,37px);aspect-ratio:60/65}
.ambient-apple-art{position:relative;display:block;width:100%;height:100%;filter:drop-shadow(0 2px 1px #452d2945);transform-origin:50% 85%}
.ambient-apple-shadow{position:absolute;left:-4%;top:calc(var(--apple-fall) + 86%);width:108%;height:18%;border-radius:50%;background:#5f4a3140;filter:blur(2px);opacity:0;transform:scale(.3)}
.ambient-apple-event.is-playing .ambient-apple-art{animation:cq-ambient-apple-fall 3.2s cubic-bezier(.43,.08,.73,.58) both}
.ambient-apple-event.is-playing .ambient-apple-shadow{animation:cq-ambient-apple-shadow 3.2s ease-out both}
@keyframes cq-ambient-apple-fall{
  0%{transform:translate3d(0,0,0) rotate(-13deg);opacity:0}
  5%{opacity:1}
  35%{transform:translate3d(4px,var(--apple-fall),0) rotate(27deg);opacity:1}
  44%{transform:translate3d(6px,calc(var(--apple-fall) - 17px),0) rotate(13deg)}
  53%{transform:translate3d(8px,var(--apple-fall),0) rotate(22deg)}
  60%{transform:translate3d(9px,calc(var(--apple-fall) - 4px),0) rotate(19deg)}
  68%,84%{transform:translate3d(10px,var(--apple-fall),0) rotate(22deg);opacity:1}
  100%{transform:translate3d(10px,var(--apple-fall),0) rotate(22deg);opacity:0}
}
@keyframes cq-ambient-apple-shadow{0%,8%{opacity:0;transform:scale(.3)}35%,84%{opacity:1;transform:scale(1)}44%{opacity:.55;transform:scale(.75)}100%{opacity:0;transform:scale(1)}}
.ambient-leaf-event{position:absolute;left:var(--ambient-source-x,37%);top:var(--ambient-source-y,40%);width:1.35%;min-width:15px;max-width:32px;aspect-ratio:44/66;filter:drop-shadow(0 2px 2px #172b2850)}
.ambient-leaf-event svg{display:block;width:100%;height:100%}
.ambient-leaf-event.is-playing{animation:cq-ambient-leaf-drift 3.2s ease-in-out both}
@keyframes cq-ambient-leaf-drift{0%{opacity:0;transform:translate3d(0,0,0) rotate(-26deg)}14%{opacity:.85}45%{transform:translate3d(22px,25px,0) rotate(22deg)}72%{opacity:.85;transform:translate3d(9px,54px,0) rotate(-17deg)}100%{opacity:0;transform:translate3d(27px,76px,0) rotate(18deg)}}
.ambient-firefly-event{position:absolute;left:var(--ambient-source-x,37%);top:var(--ambient-source-y,40%);width:6%;height:7%}
.ambient-firefly{position:absolute;width:clamp(5px,.45vw,9px);height:clamp(5px,.45vw,9px);border-radius:50%;background:#eaf7b1;box-shadow:0 0 7px 3px #b7f8aa70,0 0 17px 7px #84e9c331;opacity:0}
.ambient-firefly:nth-child(1){left:12%;top:72%;--drift-x:7px;--drift-y:-16px}
.ambient-firefly:nth-child(2){left:72%;top:28%;--drift-x:-9px;--drift-y:-13px}
.ambient-firefly:nth-child(3){left:47%;top:85%;--drift-x:11px;--drift-y:-21px}
.ambient-firefly-event[data-density="1"] .ambient-firefly:nth-child(n+2),.ambient-firefly-event[data-density="2"] .ambient-firefly:nth-child(3){display:none}
.ambient-firefly-event.is-playing .ambient-firefly{animation:cq-ambient-firefly-glide 3.2s ease-in-out both}
@keyframes cq-ambient-firefly-glide{0%{opacity:0;transform:translate3d(0,0,0)}25%,65%{opacity:.85}100%{opacity:0;transform:translate3d(var(--drift-x),var(--drift-y),0)}}
@media(max-width:600px){.ambient-patio-events{--apple-top:23%;--apple-fall:41svh}.ambient-apple-event{width:25px}.ambient-firefly{width:7px;height:7px}}
#journey-app[data-motion="still"] .ambient-patio-events,#journey-app[data-motion="still"] .ambient-wood-events{display:none!important}
@media(prefers-reduced-motion:reduce){.ambient-patio-events,.ambient-wood-events{display:none!important}}
