/* Clip the atlas first, then light the resulting silhouette. A filter or glow
   on the outer portrait must never be cut back to the atlas's rectangle. */
.portrait[data-portrait-source] {
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.portrait-crop {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: transparent;
  border: 0;
  pointer-events: none;
  /* The small transparent gutter also hides sampling from adjacent atlas tiles.
     A shared contour covers neutral, every expression and both dissolve layers. */
  -webkit-mask-image: linear-gradient(transparent, #000 5% 70%, #0009 86%, transparent 99%), linear-gradient(90deg, transparent, #000 10% 90%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(transparent, #000 5% 70%, #0009 86%, transparent 99%), linear-gradient(90deg, transparent, #000 10% 90%, transparent);
  mask-composite: intersect;
}
