/* A diffuse tint above the original paper/forest background, below all content. */
body { isolation: isolate; }
.ambient-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}
.ambient-palette {
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(300px, 44vw, 560px);
  height: clamp(260px, 34vw, 430px);
  pointer-events: none;
  filter: blur(48px);
  transform: translate3d(var(--ambient-x, 50vw), var(--ambient-y, 38vh), 0) translate(-50%, -50%);
  transition: opacity 1.2s ease;
}
.ambient-light {
  opacity: 1;
  background:
    radial-gradient(ellipse 43% 47% at 33% 35%,
      rgba(114, 146, 119, .42) 0%,
      rgba(114, 146, 119, .20) 37%,
      rgba(114, 146, 119, 0) 78%),
    radial-gradient(ellipse 41% 45% at 75% 69%,
      rgba(194, 164, 119, .30) 0%,
      rgba(194, 164, 119, .12) 38%,
      rgba(194, 164, 119, 0) 80%);
}
.ambient-dark {
  opacity: 0;
  background:
    radial-gradient(ellipse 45% 50% at 35% 33%,
      rgba(104, 148, 121, .36) 0%,
      rgba(104, 148, 121, .16) 38%,
      rgba(104, 148, 121, 0) 80%),
    radial-gradient(ellipse 42% 46% at 74% 70%,
      rgba(155, 136, 99, .20) 0%,
      rgba(155, 136, 99, .085) 40%,
      rgba(155, 136, 99, 0) 82%);
}
[data-theme="dark"] .ambient-light { opacity: 0; }
[data-theme="dark"] .ambient-dark { opacity: 1; }
@media (max-width: 640px) {
  .ambient-palette { width: min(86vw, 360px); height: 280px; filter: blur(38px); }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-palette { transform: translate3d(50vw, 38vh, 0) translate(-50%, -50%); transition: none; }
}
@media print {
  .ambient-glow { display: none; }
}
