@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  * {
    margin: 0;
  }

  html {
    text-size-adjust: 100%;
  }

  body {
    min-height: 100vh;
  }

  img,
  picture,
  svg,
  video,
  canvas {
    display: block;
    max-inline-size: 100%;
    block-size: auto;
  }

  input,
  button,
  textarea,
  select {
    font: inherit;
    color: inherit;
  }

  textarea {
    resize: vertical;
  }

  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    overflow-wrap: break-word;
  }

  :where(ul[role="list"], ol[role="list"]) {
    list-style: none;
    padding: 0;
  }

  :where(button, [type="button"], [type="reset"], [type="submit"]) {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
  }

  :where(dialog) {
    max-inline-size: min(100% - 2rem, 40rem);
    max-block-size: calc(100dvh - 2rem);
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
  }

  :where(dialog)::backdrop {
    background: rgb(0 0 0 / 0.45);
  }

  :target {
    scroll-margin-block: 2ex;
  }

  @media (prefers-reduced-motion: reduce) {
    html:focus-within {
      scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
}
