/* Quiet decoration behind the existing opaque Atlas surfaces. */
body.atlas-ambient {
  isolation:isolate;
  --ambient-leaf:#b9d7b9cc;
  --ambient-water:#aad3d2c4;
  --ambient-warm:#ead3a6bd;
}
body.atlas-ambient[data-theme=mist] {
  --ambient-leaf:#acd2bdc4;
  --ambient-water:#a7cdd5c4;
  --ambient-warm:#d9dfb8b3;
}
body.atlas-ambient[data-theme=night] {
  --ambient-leaf:#3a685aa6;
  --ambient-water:#345d75a6;
  --ambient-warm:#6a604478;
}
.atlas-ambient-background {
  position:fixed;
  inset:0;
  z-index:-1;
  overflow:hidden;
  pointer-events:none;
}
.atlas-ambient-background::before,
.atlas-ambient-background::after {
  content:'';
  position:absolute;
  inset:-15%;
  pointer-events:none;
  animation-play-state:paused;
}
.atlas-ambient-background::before {
  background:radial-gradient(ellipse at 18% 20%,var(--ambient-leaf),transparent 76%),
             radial-gradient(ellipse at 80% 76%,var(--ambient-water),transparent 72%);
  animation:atlas-ambient-drift 24s ease-in-out infinite paused;
}
.atlas-ambient-background::after {
  background:radial-gradient(ellipse at 75% 18%,var(--ambient-warm),transparent 76%),
             radial-gradient(ellipse at 26% 85%,var(--ambient-leaf),transparent 70%);
  animation:atlas-ambient-breathe 24s ease-in-out infinite paused;
}
body[data-ambient-running=true] .atlas-ambient-background::before,
body[data-ambient-running=true] .atlas-ambient-background::after {animation-play-state:running}
@keyframes atlas-ambient-drift {
  0%,100% {transform:translate(-3%,-2%) scale(1.02);opacity:.76}
  50% {transform:translate(4%,3%) scale(1.08);opacity:.18}
}
@keyframes atlas-ambient-breathe {
  0%,100% {transform:translate(3%,2%) scale(1.04);opacity:.12}
  50% {transform:translate(-4%,-3%) scale(1);opacity:.74}
}
body .atlas-ambient-toggle {
  min-height:32px;
  padding:4px 10px;
  border:1px solid var(--atlas-line,#dce3dc);
  border-radius:22px;
  background:var(--atlas-surface,#fffefa);
  color:var(--atlas-muted,#627571);
  font-size:12px;
  white-space:nowrap;
}
body #atlas-theme-controls .atlas-ambient-toggle {
  border-left:1px solid var(--atlas-line,#dce3dc);
  border-radius:0 22px 22px 0;
}
@media(prefers-reduced-motion:reduce) {
  .atlas-ambient-background::before,
  .atlas-ambient-background::after {animation:none!important;transform:none!important;opacity:.35}
}
@media print {
  .atlas-ambient-background,.atlas-ambient-toggle {display:none!important}
}
