@layer components {
  .flash {
    display: flex;
    inset-block-start: calc(var(--block-space) + var(--custom-safe-inset-top));
    inset-inline-start: 50%;
    justify-content: center;
    position: fixed;
    transform: translate(-50%);
    z-index: var(--z-flash);
  }

  /* In the app a notice comes up under the top bar, clear of its field, which stays put. */
  body:not(.public) .flash {
    inset-block-start: calc(var(--top-bar-height) + var(--custom-safe-inset-top));
  }

  /* Over a verdict it comes up at the foot, over the bar, clear of the name and of what the gate is told. */
  body:has(.verdict) .flash {
    inset-block: auto calc(var(--footer-height) + var(--custom-safe-inset-bottom) + var(--block-space));
  }

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