/* Yinyu shared visual shell: one borderless, pointer-transparent layer. */

:root {
  --yinyu-visual-shell-duration: 720ms;
  --yinyu-visual-shell-half-duration: 340ms;
  --yinyu-visual-shell-ease: cubic-bezier(.22, 1, .36, 1);
}

.yinyu-visual-shell {
  position: fixed;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0;
  outline: 0;
  background: radial-gradient(
    ellipse 76% 64% at 50% 46%,
    transparent 0 58%,
    rgba(0, 0, 0, .08) 76%,
    rgba(0, 0, 0, .34) 100%
  );
  pointer-events: none !important;
  -webkit-user-select: none;
  user-select: none;
  contain: layout paint style;
  isolation: isolate;
  transform: translateZ(0);
  will-change: opacity;
}

.yinyu-visual-shell::before,
.yinyu-visual-shell::after {
  content: "";
  position: absolute;
  inset: -8%;
  border: 0;
  outline: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0) scale(1.018);
  transform-origin: 50% 50%;
  will-change: opacity, transform;
  transition:
    opacity var(--yinyu-visual-shell-half-duration) var(--yinyu-visual-shell-ease),
    transform var(--yinyu-visual-shell-duration) var(--yinyu-visual-shell-ease);
}

.yinyu-visual-shell::before {
  background:
    radial-gradient(circle at 18% 18%, rgba(var(--yinyu-visual-shell-from, 157, 184, 207), .24), transparent 44%),
    radial-gradient(circle at 82% 76%, rgba(var(--yinyu-visual-shell-from, 157, 184, 207), .13), transparent 48%);
  opacity: 0;
}

.yinyu-visual-shell::after {
  background:
    radial-gradient(circle at 78% 22%, rgba(var(--yinyu-visual-shell-to, 157, 184, 207), .23), transparent 45%),
    radial-gradient(circle at 20% 78%, rgba(var(--yinyu-visual-shell-to, 157, 184, 207), .12), transparent 49%);
  opacity: .08;
}

.yinyu-visual-shell.is-covering::before {
  opacity: .25;
  transform: translate3d(0, 0, 0) scale(1.008);
}

.yinyu-visual-shell.is-covering::after {
  opacity: 0;
}

.yinyu-visual-shell.is-crossfading::before {
  opacity: 0;
  transform: translate3d(-.35%, .2%, 0) scale(1.024);
}

.yinyu-visual-shell.is-crossfading::after {
  opacity: .27;
  transform: translate3d(0, 0, 0) scale(1.008);
}

.yinyu-visual-shell.is-settling::after,
.yinyu-visual-shell.is-stable::after {
  opacity: .08;
  transform: translate3d(0, 0, 0) scale(1.018);
}

.yinyu-visual-shell.is-page-hidden {
  visibility: hidden;
  opacity: 0;
  transition: none !important;
}

.yinyu-visual-shell.is-page-hidden::before,
.yinyu-visual-shell.is-page-hidden::after {
  opacity: 0 !important;
  transition: none !important;
}

.yinyu-visual-shell.is-mobile {
  background: radial-gradient(
    ellipse 80% 68% at 50% 46%,
    transparent 0 62%,
    rgba(0, 0, 0, .06) 80%,
    rgba(0, 0, 0, .24) 100%
  );
}

.yinyu-visual-shell.is-mobile::before,
.yinyu-visual-shell.is-mobile::after {
  inset: -4%;
  transform: translate3d(0, 0, 0);
  transition-property: opacity;
}

.yinyu-visual-shell.is-mobile.is-covering::before {
  opacity: .16;
}

.yinyu-visual-shell.is-mobile.is-crossfading::after {
  opacity: .17;
}

.yinyu-visual-shell.is-reduced-motion {
  will-change: auto;
}

.yinyu-visual-shell.is-reduced-motion::before,
.yinyu-visual-shell.is-reduced-motion::after {
  transition: none !important;
  transform: none !important;
}

.yinyu-visual-shell.is-reduced-motion::before {
  opacity: 0 !important;
}

.yinyu-visual-shell.is-reduced-motion::after {
  opacity: .05 !important;
}

@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  .yinyu-visual-shell::before,
  .yinyu-visual-shell::after {
    inset: -4%;
    transform: translate3d(0, 0, 0);
    transition-property: opacity;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yinyu-visual-shell,
  .yinyu-visual-shell::before,
  .yinyu-visual-shell::after {
    animation: none !important;
    transition: none !important;
  }
}
