/* The owner-approved pillow scene; the original story artwork stays intact. */
.bed-art { display: none; }
.bed-comfort {
  --light-reach: 3%;
  --light-core: 1%;
  --light-strength: .05;
  --halo-strength: .03;
  --halo-scale: .18;
  position: absolute;
  right: -3vw;
  bottom: 2vh;
  width: min(78vw, 117vh);
  aspect-ratio: 3 / 2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
  isolation: isolate;
  mask-image: radial-gradient(ellipse at 53% 56%, #000 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 53% 56%, #000 40%, transparent 75%);
}
.bed-comfort__dark, .bed-comfort__warm {
  position: absolute;
  inset: 0;
  background: url('/assets/story-pillow-light-20261122.jpg') center / cover no-repeat;
}
.bed-comfort__dark { filter: grayscale(1) brightness(.38); }
.bed-comfort__warm {
  opacity: var(--light-strength);
  mask-image: radial-gradient(ellipse farthest-corner at 76% 64%, #000 var(--light-core), transparent var(--light-reach));
  -webkit-mask-image: radial-gradient(ellipse farthest-corner at 76% 64%, #000 var(--light-core), transparent var(--light-reach));
  animation: comfort-flicker 2.8s ease-in-out infinite;
  animation-play-state: paused;
}
.bed-comfort__halo {
  position: absolute;
  left: 76%;
  top: 64%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe6b28a 0%, #ffc46b36 23%, #eaa04e12 44%, transparent 69%);
  mix-blend-mode: screen;
  opacity: var(--halo-strength);
  transform: translate(-50%, -50%) scale(var(--halo-scale));
}
.bed-comfort.is-glowing .bed-comfort__warm { animation-play-state: running; }
.story-world[data-scene='bed'] .travelling-light { opacity: 0 !important; }
.story-enhanced .story-beat[data-scene='bed'] {
  justify-content: flex-start;
  padding-top: 22vh;
}
.story-beat[data-scene='bed'] .comfort-brighter {
  color: #ffdda2;
  font-style: italic;
}
.comfort-still { display: none; }
.story-world:not(.story-enhanced) .bed-comfort { display: none; }
.story-world:not(.story-enhanced) .comfort-still {
  display: block;
  width: min(90vw, 900px);
  margin: 32px 0 0;
  mask-image: radial-gradient(ellipse at center, #000 45%, transparent 73%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 45%, transparent 73%);
}
.comfort-still img { display: block; width: 100%; height: auto; }
@keyframes comfort-flicker {
  0%, 100% { filter: brightness(.94); }
  38% { filter: brightness(1.1); }
  58% { filter: brightness(.98); }
  78% { filter: brightness(1.06); }
}
@media (max-width: 900px) and (min-height: 600px) {
  .bed-comfort { width: 110vw; right: -5vw; bottom: 14vh; }
  .story-enhanced .story-beat[data-scene='bed'] {
    width: 86%;
    left: 7%;
    align-items: center;
    text-align: center;
    padding-top: 18vh;
  }
}
@media (max-width: 600px) {
  .bed-comfort { width: 144vw; right: -19vw; bottom: 15vh; }
  .story-enhanced .story-beat[data-scene='bed'] { padding-top: 18vh; }
}
@media (max-height: 550px) and (min-width: 601px) {
  .story-enhanced .story-beat[data-scene='bed'] { padding-top: 20vh; }
}
@media (prefers-reduced-motion: reduce) {
  .bed-comfort__warm { animation: none; }
}
