Caddyfile for Drupal 10+

Well, I’ve tested my config based on nginx one, here is the current Caddyfile:

(ssl) {
    tls /opt/homebrew/etc/nginx/_wildcard.local.test+4.pem /opt/homebrew/etc/nginx/_wildcard.local.test+4-key.pem
}

(php-socket) {
    encode zstd gzip
    php_fastcgi unix//tmp/php-fpm.sock
    file_server
}

(drupal) {
    import ssl
    import php-socket

    @hiddenFilesRegexp {
        path_regexp (^|/)\.
    }
    respond @hiddenFilesRegexp 403

    @hiddenPhpFilesRegexp {
        path_regexp \..*/.*\.php$
    }
    respond @hiddenPhpFilesRegexp 403

    @notfoundPhpFiles {
        path /vendor/.*\.php$
    }
    respond @notfoundPhpFiles 404

    @notfoundPhpFilesRegexp {
        path_regexp ^/sites/[^/]+/files/.*\.php$
    }
    respond @notfoundPhpFilesRegexp 404

    @privateDirRegexp {
        path_regexp ^/sites/.*/private/
    }
    respond @privateDirRegexp 403

    @protectedFilesRegexp {
        path_regexp \.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock)|web\.config)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$
    }
    respond protectedFilesRegexp 404

    @static {
		file
		path *.avif *.css *.eot *.gif *.gz *.ico *.jpg *.jpeg *.js *.otf *.pdf *.png *.svg *.ttf *.webp *.woff *.woff2
	}
	header @static Cache-Control "max-age=31536000,public,immutable"

    handle / {
        try_files {path} /index.php?{query}
        rewrite * /index.php
    }
}

drupal-10.local.test {
    root * "/Users/asrob/Sites/{http.request.host.labels.2}/www"
    import drupal
}

I’m not sure how I implement the following:

    # Fighting with Styles? This little gem is amazing.
    location ~ ^/sites/.*/files/(css|js|)styles/ {
        try_files $uri @rewrite;
    }

    # Handle private files through Drupal. Private file's path can come
    # with a language prefix.
    location ~ ^(/[a-z\-]+)?/system/files/ {
        try_files $uri /index.php?$query_string;
    }

    # Enforce clean URLs
    # Removes index.php from urls like www.example.com/index.php/my-page --> www.example.com/my-page
    # Could be done with 301 for permanent or other redirect codes.
    if ($request_uri ~* "^(.*/)index\.php/(.*)") {
        return 307 $1$2;
    }

Or do I skip these because Caddy handles it correctly?