@layer components {
  @keyframes appear-then-fade {

    0%,
    100% {
      opacity: 0;
    }

    10%,
    80% {
      opacity: 1;
    }
  }

  .flash {
    display: flex;
    inset-block-start: 1rem;
    inset-inline-start: 50%;
    justify-content: center;
    position: fixed;
    transform: translate(-50%);
    z-index: 100;
  }

  .flash__inner {
    animation: appear-then-fade 3s 300ms both;
    background-color: var(--text);
    border-radius: 4em;
    color: var(--bg);
    display: inline-flex;
    font-size: 1rem;
    inline-size: max-content;
    margin: 0 auto;
    max-inline-size: 90vw;
    padding: 0.7em 1.4em;
  }
}