/* The room light.
 *
 * Chrome throws an amber halo around the viewport when the Claude extension has
 * the tab, and the effect is doing something worth copying: it tells you the
 * surface is live without occupying any of it. This is that, in RCS green.
 *
 * It sits above everything and catches no clicks. The glow hugs the edge and
 * falls off inward, brightest in the corners, because a ring of even thickness
 * reads as a border and a falloff reads as light in a room.
 *
 * ingest.html has always linked this file and it has never existed — so this
 * also quietly fixes a stylesheet that 404'd since the page was written.
 */
.roomlight {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  border-radius: 10px;
  /* Layered inset shadows: a tight bright edge, then two long soft ones. One
     large shadow gives a muddy band; three with different spreads give falloff. */
  box-shadow:
    inset 0 0 0 1px rgba(18, 185, 129, .22),
    inset 0 0 18px rgba(18, 185, 129, .30),
    inset 0 0 55px rgba(18, 185, 129, .16),
    inset 0 0 130px rgba(14, 159, 110, .10);
  animation: roomlight-breathe 6.5s ease-in-out infinite;
}

/* The corners carry more light than the sides, which is what stops it reading
   as a rectangle drawn on top of the page. */
.roomlight::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(70% 55% at 0% 0%,   rgba(18,185,129,.16), transparent 60%),
    radial-gradient(70% 55% at 100% 0%, rgba(18,185,129,.16), transparent 60%),
    radial-gradient(70% 55% at 0% 100%, rgba(18,185,129,.16), transparent 60%),
    radial-gradient(70% 55% at 100% 100%, rgba(18,185,129,.16), transparent 60%);
}

@keyframes roomlight-breathe {
  0%, 100% { opacity: .82; }
  50%      { opacity: 1; }
}

/* Dark surfaces need a little more of it to register at all. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .roomlight {
    box-shadow:
      inset 0 0 0 1px rgba(18, 185, 129, .30),
      inset 0 0 22px rgba(18, 185, 129, .38),
      inset 0 0 70px rgba(18, 185, 129, .20),
      inset 0 0 160px rgba(14, 159, 110, .13);
  }
}
:root[data-theme="dark"] .roomlight {
  box-shadow:
    inset 0 0 0 1px rgba(18, 185, 129, .30),
    inset 0 0 22px rgba(18, 185, 129, .38),
    inset 0 0 70px rgba(18, 185, 129, .20),
    inset 0 0 160px rgba(14, 159, 110, .13);
}

@media (prefers-reduced-motion: reduce) {
  .roomlight { animation: none; opacity: .9; }
}
