.paper-reveal-layer {
  position: fixed;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

body:has(dialog[open]) > .paper-reveal-layer { visibility: hidden; }

.paper-reveal-layer > canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.paper-notebook,
.paper-annotation {
  position: absolute;
  color: #34787c;
}

:is(.paper-notebook, .paper-annotation).on-dark { color: #d2c6be; }

.paper-notebook {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  opacity: .56;
  animation: paper-reveal-fade 2.9s both;
}

.paper-notebook > span {
  flex: 0 0 1px;
  width: 100%;
  background: currentColor;
  opacity: .55;
  transform-origin: left;
  animation: paper-reveal-rule .62s cubic-bezier(.34, .15, .28, 1) var(--line-delay) both;
}

.paper-annotation {
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .62;
  animation: paper-reveal-fade 2.25s both;
}

.paper-annotation path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: paper-reveal-stroke var(--stroke-duration) ease-out var(--stroke-delay) forwards;
}

@keyframes paper-reveal-fade {
  0%, 61% { opacity: .62; }
  100% { opacity: 0; }
}

@keyframes paper-reveal-rule {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes paper-reveal-stroke {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .paper-notebook, .paper-notebook > span, .paper-annotation, .paper-annotation path {
    animation: none;
  }
  .paper-annotation path { stroke-dashoffset: 0; }
}
