/* Decorative layers sit behind the interactive, transparent WebGL canvas. */
.garden-stage {
    background: radial-gradient(ellipse at 18% 12%, #fff9d6a8, transparent 42%),
        linear-gradient(180deg, #b7e4f5 0%, #dcf3ee 60%, #e9f4cc 100%);
    border-color: #bedbce;
}
.garden-stage[data-template=reach] {
    background: radial-gradient(ellipse at 15% 8%, #fff6c5, transparent 45%),
        linear-gradient(180deg, #f9d8be, #ffecd9 58%, #e6efca);
}
.garden-stage[data-template=dream] {
    background: radial-gradient(ellipse at 75% 12%, #ffe5f2a3, transparent 45%),
        linear-gradient(180deg, #d3d9fa, #f1e9fa 54%, #e2f0dd);
}
.garden-stage :is(.sky-glow, .sky-stars, .scene-meteors, .stage-hills) {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}
.garden-stage .sky-glow {
    inset: 0;
    opacity: 0;
    background: radial-gradient(ellipse at 78% 16%, #aaa3ff33, transparent 35%),
        radial-gradient(ellipse at 12% 80%, #62dfd42b, transparent 44%),
        radial-gradient(ellipse at 72% 95%, #b0b8ff22, transparent 55%);
}
.garden-stage .scene-sun {
    width: 64px;
    height: 64px;
    top: 9%;
    right: 10%;
    opacity: 1;
    background: radial-gradient(circle at 35% 30%, #fffde3, #ffe8a1 75%);
    box-shadow: 0 0 0 13px #fff5bf24, 0 0 0 28px #fff7cf19, 0 0 65px #fff8c99c;
}
/* A true crescent silhouette: no opaque circle masking the sky. */
.garden-stage .scene-moon {
    width: 76px;
    height: 76px;
    top: 8%;
    right: 9%;
    opacity: 1;
    background: none;
    box-shadow: none;
    filter: drop-shadow(0 0 9px #ffedbd65) drop-shadow(0 0 28px #dadfff55);
}
.garden-stage .scene-moon::after { content: none; }
.garden-stage .scene-moon svg { display: block; width: 100%; height: 100%; }
.garden-stage .sky-stars {
    inset: 0;
    animation: none;
    font-size: 0;
    line-height: 0;
}
.sky-stars i {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: #fff5d8;
    box-shadow: 0 0 6px #e3ecffb3;
    opacity: .55;
    animation: garden-twinkle var(--twinkle) ease-in-out var(--delay) infinite;
}
.sky-stars i:nth-child(3n) { background: #cbefff; box-shadow: 0 0 9px #b5dfff99; }
.sky-stars i:nth-child(7n)::before, .sky-stars i:nth-child(7n)::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2px;
    height: 13px;
    background: linear-gradient(transparent, #fff4ce, transparent);
    transform: translate(-50%, -50%);
}
.sky-stars i:nth-child(7n)::after { transform: translate(-50%, -50%) rotate(90deg); }
.garden-stage .scene-cloud {
    left: -260px;
    right: auto;
    width: 200px;
    height: 37px;
    border-radius: 80px;
    background: linear-gradient(180deg, #ffffffd9, #ffffff80);
    filter: blur(1px);
    opacity: .75;
    transform: none;
    translate: none;
    animation: garden-cloud-cross 76s linear -28s infinite;
}
.garden-stage .scene-cloud::before, .garden-stage .scene-cloud::after {
    content: '';
    position: absolute;
    bottom: 5px;
    background: inherit;
    border-radius: 50%;
    width: 78px;
    height: 62px;
    left: 28px;
}
.garden-stage .scene-cloud::after { width: 100px; height: 78px; left: 74px; bottom: 0; }
.garden-stage .cloud-one { top: 21%; }
.garden-stage .cloud-two { top: 37%; width: 170px; scale: .74; opacity: .5; animation-duration: 105s; animation-delay: -70s; }
.garden-stage .cloud-three { top: 12%; scale: .55; opacity: .42; animation-duration: 124s; animation-delay: -19s; }
.garden-stage .stage-hills {
    bottom: -30%;
    left: -15%;
    width: 130%;
    height: 51%;
    border-radius: 50% 65% 0 0;
    background: linear-gradient(180deg, #a4d4aa80, #b7dcae);
    box-shadow: 0 -17px 0 #c6e5c257;
}
.garden-stage .scene-meteors { inset: 0; overflow: hidden; display: none; }
.scene-meteors i {
    position: absolute;
    top: 10%;
    left: 15%;
    width: 135px;
    height: 2px;
    border-radius: 50%;
    background: linear-gradient(90deg, transparent, #bdeaff80 55%, #fff9e4);
    box-shadow: 0 0 5px #d2e5ff70;
    opacity: 0;
    animation: garden-meteor 23s linear -6s infinite;
}
.scene-meteors i::after {
    content: '';
    position: absolute;
    right: 0;
    top: -1px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff9e7;
    box-shadow: 0 0 9px #deeeff;
}
.scene-meteors i:nth-child(2) { top: 7%; left: 54%; animation-duration: 37s; animation-delay: -19s; }
.scene-meteors i:nth-child(3) { top: 24%; left: 32%; width: 100px; animation-duration: 47s; animation-delay: -31s; }
html[data-garden-mode=night] .garden-stage {
    background: linear-gradient(180deg, #152849 0%, #303d75 45%, #536696 74%, #6da49d 100%);
    border-color: #7797b1;
}
html[data-garden-mode=night] .garden-stage .sky-glow { opacity: 1; }
html[data-garden-mode=night] .garden-stage .scene-sun { display: none; }
html[data-garden-mode=night] .garden-stage .scene-meteors { display: block; }
html[data-garden-mode=night] .garden-stage .scene-cloud {
    background: linear-gradient(180deg, #c1cfff2e, #d3e2ff0a);
    opacity: .6;
}
html[data-garden-mode=night] .garden-stage .cloud-two { opacity: .45; }
html[data-garden-mode=night] .garden-stage .cloud-three { opacity: .4; }
html[data-garden-mode=night] .garden-stage .stage-hills {
    background: linear-gradient(180deg, #77b5ac55, #3c837e99);
    box-shadow: 0 -18px 0 #9bcac224;
}
html[data-garden-mode=night] .garden-tree-page { --ink: #ecf4df; --muted: #c0d4cb; --border: #65828a; }
.garden-stage .fireflies i { background: #faffb4; box-shadow: 0 0 7px 2px #e6ffad65; }
.dialog-open .garden-stage * { animation-play-state: paused; }
@keyframes garden-twinkle {
    0%, 100% { opacity: .3; transform: scale(.7); }
    45% { opacity: 1; transform: scale(1.2); }
    65% { opacity: .65; transform: scale(.9); }
}
@keyframes garden-cloud-cross {
    from { transform: translateX(0); }
    to { transform: translateX(calc(100vw + 540px)); }
}
@keyframes garden-meteor {
    0%, 88% { opacity: 0; transform: translate(0, 0) rotate(28deg); }
    89% { opacity: .9; }
    93% { opacity: 0; transform: translate(320px, 170px) rotate(28deg); }
    100% { opacity: 0; transform: translate(320px, 170px) rotate(28deg); }
}
@media(max-width:800px) {
    .garden-stage .scene-moon { width: 54px; height: 54px; right: 7%; top: 8%; }
    .garden-stage .scene-sun { width: 43px; height: 43px; right: 8%; }
    .garden-stage .scene-cloud { scale: .65; }
    .garden-stage .cloud-two { scale: .5; }
    .garden-stage .cloud-three { display: none; }
    .sky-stars i:nth-child(n+29) { display: none; }
}
@media(prefers-reduced-motion:reduce) {
    .garden-stage * { animation: none !important; }
    .garden-stage .scene-cloud { transform: translateX(25vw); }
    .garden-stage .cloud-two { transform: translateX(80vw); }
    .garden-stage .cloud-three { transform: translateX(60vw); }
    .garden-stage .scene-meteors { display: none !important; }
    .garden-stage .sky-stars i { opacity: .7; }
}
