/* A visible atmosphere response, behind readable teacher directions and controls. */
.stage{--scene-noise:0;--scene-calm:1;--scene-glow:#ffd596}
.scene-feedback{position:absolute;inset:0;z-index:-1;pointer-events:none;overflow:hidden}
.scene-feedback-glow,.scene-feedback-mist,.scene-feedback-particles{position:absolute;inset:0;pointer-events:none}
.scene-feedback-glow{background:radial-gradient(ellipse at 14% 72%,var(--scene-glow),transparent 38%),radial-gradient(ellipse at 89% 73%,var(--scene-glow),transparent 34%);opacity:calc(var(--scene-calm)*.36);mix-blend-mode:screen;transition:opacity 1.2s ease;animation:atmosphere-breathe 9s ease-in-out infinite alternate}
.scene-feedback-mist{background:radial-gradient(ellipse at 50% 52%,#d8e4ec77,transparent 75%),linear-gradient(0deg,#192c4ccc,#7d91a077);opacity:calc(var(--scene-noise)*.68);transition:opacity 1.2s ease}
.scene-feedback-particles{opacity:var(--scene-calm);transition:opacity 1.2s ease}
.scene-feedback-particles i{position:absolute;left:var(--x);top:var(--y);width:var(--size);height:var(--size);border-radius:50%;background:var(--scene-glow);box-shadow:0 0 14px 4px var(--scene-glow);opacity:.65;animation:atmosphere-sparkle var(--duration) ease-in-out infinite alternate;animation-delay:var(--delay)}
.stage[data-effect=lamps] .scene-feedback-glow{background:radial-gradient(ellipse at 12% 68%,#ffcc7bbb,transparent 30%),radial-gradient(ellipse at 87% 69%,#ffcc7baa,transparent 28%);opacity:calc(var(--scene-calm)*.72)}
.stage[data-effect=lamps] .scene-feedback-particles{display:none}
.stage[data-effect=city] .scene-feedback-glow{background:linear-gradient(0deg,#ffc39e88,transparent 38%);opacity:calc(var(--scene-calm)*.62)}
.stage[data-effect=city] .scene-feedback-particles i{top:calc(67% + var(--offset));width:5px;height:9px;border-radius:2px;animation-duration:8s;box-shadow:0 0 26px 5px #ffbd81;opacity:.75}
.stage[data-effect=clouds] .scene-feedback-particles i{width:clamp(65px,10vw,150px);height:25px;background:#fff4e5;filter:blur(12px);box-shadow:none;opacity:.18;animation:cloud-float 30s ease-in-out infinite alternate;animation-delay:var(--delay)}
.stage[data-effect=ripples] .scene-feedback-particles i{top:calc(76% + var(--offset));width:clamp(40px,8vw,130px);height:15px;background:transparent;border:1px solid var(--scene-glow);box-shadow:none;opacity:.22;animation:water-shimmer var(--duration) ease-in-out infinite alternate}
.stage[data-effect=rain] .scene-feedback-particles i{width:2px;height:25px;background:#d9eeee;box-shadow:none;opacity:.18;animation:rain-glint var(--duration) ease-in-out infinite alternate}
.stage[data-effect=aurora] .scene-feedback-glow{background:conic-gradient(from 185deg at 50% 0%,transparent 30%,#95eed977 43%,#c5a3ed77 49%,transparent 62%);opacity:calc(var(--scene-calm)*.65)}
.stage[data-state=above] .scene-image{filter:saturate(.38) brightness(.63);animation-play-state:paused}
.stage[data-state=above] .scene-feedback-particles{opacity:calc(var(--scene-calm)*.3)}
.stage[data-state=near] .scene-image{filter:saturate(.85) brightness(.92)}
.stage[data-state=within] .scene-image{filter:saturate(1.08) brightness(1.04)}
#sceneReaction{margin:7px 0 0;padding-top:8px;border-top:1px solid #ffffff24;font-size:12px;font-weight:650;color:#dcece7;opacity:1}
.stage[data-state=above] #sceneReaction{color:#ffdfcc}
.input-status{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.input-status button{border:1px solid #d1eadd88;background:#17314dcc;color:#e3f6eb;border-radius:9px;padding:7px 10px;font:inherit;font-size:12px;cursor:pointer}
.stage[data-input=preview] .input-badge{border-color:#ffd2ae99;color:#ffe0c8;background:#3d2d30dd}
.stage[data-input=live] .input-badge{border-color:#9ccfb6;color:#d0f3dd;background:#143c36dd}
.input-status button:focus-visible{outline:3px solid #c6e6d6;outline-offset:3px}
.stage.reduced .scene-feedback *{animation:none!important}
@keyframes atmosphere-breathe{from{filter:brightness(.9)}to{filter:brightness(1.1)}}
@keyframes atmosphere-sparkle{from{transform:translateY(0);opacity:.25}to{transform:translateY(-8px);opacity:.75}}
@keyframes cloud-float{from{transform:translateX(-15px)}to{transform:translateX(35px)}}
@keyframes water-shimmer{from{transform:scaleX(.8);opacity:.12}to{transform:scaleX(1.3);opacity:.4}}
@keyframes rain-glint{from{opacity:.08;transform:translateY(0)}to{opacity:.22;transform:translateY(10px)}}
@media(prefers-reduced-motion:reduce){.scene-feedback *{animation:none!important}}
@media(max-width:720px){.input-status{max-width:150px;gap:5px}.input-status button{padding:5px 8px}.scene-feedback-particles i{box-shadow:0 0 10px 2px var(--scene-glow)}}

.stage .error{width:min(100%,720px);margin:12px 0 0;padding:9px 12px;color:#fff0e8;background:#582a27ed;border-color:#ffc6b5;font-size:12px}

/* Halloween effects share the sustained-noise response and pause/reduced-motion controls. */
.stage[data-effect=lanterns] .scene-feedback-glow{background:radial-gradient(ellipse at 15% 77%,#ffc476cc,transparent 30%),radial-gradient(ellipse at 85% 77%,#ffc476bb,transparent 30%);opacity:calc(var(--scene-calm)*.75)}
.stage[data-effect=lanterns] .scene-feedback-particles i{top:calc(65% + var(--offset));background:#ffdbac;box-shadow:0 0 18px 5px #eebd70;opacity:.4;animation-duration:9s}
.stage[data-effect=potion] .scene-feedback-glow{background:radial-gradient(ellipse at 16% 80%,#b3dbb9bb,transparent 32%),radial-gradient(ellipse at 86% 75%,#c9b1e9bb,transparent 32%);opacity:calc(var(--scene-calm)*.6)}
.stage[data-effect=potion] .scene-feedback-particles i{top:calc(65% + var(--offset));width:clamp(6px,1vw,12px);height:clamp(6px,1vw,12px);background:transparent;border:1px solid #e4d7ff;box-shadow:0 0 9px #c9b5ed66;animation-duration:8s}
.collection-label{display:block;margin-top:12px}#sceneCollection{margin-bottom:12px}
