/* The image stays still and complete. Only light painted over it can move. */
.artwork-motion-layer {
  position: absolute; z-index: 2; overflow: hidden; pointer-events: none;
  border-radius: inherit; contain: strict;
}
.artwork-motion-layer[hidden] { display: none !important; }
.artwork-motion-plane { position: absolute; pointer-events: none; }
.artwork-motion-glow {
  position: absolute; display: block; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--art-color),.74), rgba(var(--art-color),.20) 28%, rgba(var(--art-color),0) 70%);
  transform: translate(-50%,-50%); opacity: calc(var(--art-strength) * .65);
  animation: artwork-lamplight 8s ease-in-out infinite;
}
.artwork-motion-glow:nth-child(2) { animation-delay: -3.3s; animation-duration: 11s; }
.artwork-motion-particle {
  position: absolute; display: block; width: 2px; height: 2px; border-radius: 50%;
  opacity: 0; background: #ffe2ae; box-shadow: 0 0 5px #ffc87880;
  animation: artwork-ember var(--art-duration,8s) linear var(--art-delay,0s) infinite;
}
.artwork-motion-star { background: #d6e9ff; box-shadow: 0 0 5px #c6e1ff80; animation-name: artwork-starlight; }
.artwork-motion-haze {
  position: absolute; width: 37%; height: 8%; border-radius: 50%; opacity: .07;
  background: radial-gradient(ellipse, #c6e5ef80, #bde0ec00 70%);
  transform: translate(-50%,-50%); animation: artwork-waterlight 14s ease-in-out infinite;
}
.artwork-motion-layer:not([data-motion-state="running"]) .artwork-motion-plane > * { animation-play-state: paused; }
.opening-vista > .artwork-motion-layer { z-index: -2; }
.world-view-actions { grid-column: 2; grid-row: 2; align-self: end; justify-self: end; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.world-landscape-heading { flex-wrap: wrap; }
.world-landscape-heading h2 { flex: 1 1 210px; }
.story-illustration > .story-artwork-motion {
  position: absolute; z-index: 4; left: 16px; top: 16px;
  max-width: calc(100% - 86px); background: #102830eb;
}
.cg-art-views > .cg-artwork-motion { grid-column: 1 / -1; border-top: 1px solid #b4bba340; border-radius: 0 0 8px 8px; }
.artwork-motion-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  min-height: 44px; max-width: 100%; padding: 8px 12px; border: 1px solid #b4bba367;
  border-radius: 8px; color: #e7e2c9; background: #142e34;
  font: 500 12px/1.4 system-ui, sans-serif; cursor: pointer;
}
.artwork-motion-toggle[hidden] { display: none !important; }
.artwork-motion-toggle:hover { background: #2a4141; border-color: #ddc58c; }
.artwork-motion-toggle:focus-visible { outline: 3px solid #f3dba0; outline-offset: 3px; }
.artwork-motion-toggle:disabled { color: #bdc9c1; cursor: default; opacity: .8; }
@keyframes artwork-lamplight {
  0%,100% { opacity: calc(var(--art-strength) * .45); transform: translate(-50%,-50%) scale(.94); }
  50% { opacity: calc(var(--art-strength) * .85); transform: translate(-50%,-50%) scale(1.04); }
}
@keyframes artwork-ember {
  0%,100% { opacity: 0; transform: translate(0,5px); }
  18% { opacity: .44; }
  75% { opacity: .18; }
  95% { opacity: 0; transform: translate(var(--art-drift),-23px); }
}
@keyframes artwork-starlight {
  0%,100% { opacity: .06; transform: scale(.8); }
  50% { opacity: .52; transform: scale(1.1); }
}
@keyframes artwork-waterlight {
  0%,100% { opacity: .055; transform: translate(-52%,-50%); }
  50% { opacity: .14; transform: translate(-48%,-50%); }
}
/* CSS also protects comfort settings before JavaScript observers can run. */
html[data-motion="reduced"] .artwork-motion-layer,
html[data-ambient="off"] .artwork-motion-layer,
html[data-graphics="low"] .artwork-motion-layer { display: none !important; }
@media (prefers-reduced-motion: reduce), (forced-colors: active) {
  .artwork-motion-layer { display: none !important; }
  .artwork-motion-plane > * { animation: none !important; }
}
@media (max-width: 420px) {
  .world-landscape-heading h2 { flex-basis: 100%; }
  .world-landscape-heading .artwork-motion-toggle { margin-right: auto; }
}
@media (max-width: 640px) {
  .world-view-actions { grid-column: 1 / -1; justify-self: start; justify-content: flex-start; }
  .world-view-actions .artwork-motion-toggle { font-size: 11px; padding-inline: 10px; }
  .story-illustration > .story-artwork-motion { left: 11px; top: 11px; font-size: 11px; }
}
