:root {
  color-scheme: dark;
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: transparent;
}

body {
  position: fixed;
  inset: 0;
  overscroll-behavior: none;
}

.viewport {
  position: fixed;
  inset: 0;
  isolation: isolate;
}

.world-zone {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  height: 20vh;
  height: 20dvh;
  overflow: hidden;
  contain: strict;
  pointer-events: none;
  background: transparent;
}

.world-entity {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: var(--depth, 1);
  transform: translate3d(var(--x, 0px), var(--y, 0px), 0);
  transition: transform var(--move-duration, 0ms) linear;
  will-change: transform;
}

.entity-shell {
  position: relative;
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
  clip-path: inset(0 0 0 0);
  transition:
    opacity 760ms var(--ease-out-quint),
    transform 760ms var(--ease-out-quint),
    filter 640ms var(--ease-out-quint),
    clip-path 760ms var(--ease-out-quint);
  will-change: opacity, transform, filter, clip-path;
}

.world-entity.is-entering .entity-shell {
  opacity: 0;
  transform: translate3d(0, 12px, 0) scale(0.96);
  filter: blur(7px);
  clip-path: inset(28% 0 0 0);
}

.world-entity.is-leaving .entity-shell {
  opacity: 0;
  transform: translate3d(0, 10px, 0) scale(0.97);
  filter: blur(5px);
  clip-path: inset(18% 0 0 0);
  transition-duration: 620ms;
}

.entity-media {
  display: block;
  width: auto;
  height: var(--entity-height, 12vh);
  max-height: 20vh;
  max-height: 20dvh;
  border: 0;
  outline: 0;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.entity-video {
  background: #000;
}

.entity-image {
  background: transparent;
}

.world-entity.is-ambient .entity-video {
  background: transparent;
}

.world-entity.is-swapping .entity-media {
  opacity: 0.16;
  transition: opacity 110ms ease-out;
}

@media (max-width: 639px) {
  .entity-media {
    max-width: 38vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .world-entity {
    transition-duration: 0ms !important;
  }

  .entity-shell {
    filter: none !important;
    clip-path: none !important;
    transform: none !important;
    transition: opacity 160ms linear !important;
  }
}
