How do I color code select strings == "↓" from my data frame?

I've created a table with different genes with arrows showing their regulation/effects in different conditions. I want to color code these (i.e., red for downwards arrows and green for upwards arrows) in my gt table. I've tried many syntaxes but nothing seems to work. Can anyone help?

library("gt")
library("rmarkdown")
library("dplyr")

# Create data frame

Microglia_1 = data.frame(
  NREM_duration = c("↑", "↑", "↑", "↑", "NA", "↑", "NA", "NA", "↑", "↑", "NA"),
  Stages_N1_N3 = c("NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA"),
  REM_duration = c("↓", "↓", "↓  ─", " ─", "NA", "↓  ─", "NA", "NA", "↑ ↓", " ─", "NA"),
  Sleep_Cycle = c("NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA"),
  EEG_SWA = c("↑", "↑ ↓", "↑ ↓", "↑", "NA", "↑ ↓", "NA", "NA", "↑", "↑  ─", "NA"),
  Brain_Temp = c("↑", "↑", "↑", "↑", "NA", "↑", "NA", "NA", "↑", "↑  ─", "NA"),
  Sleep_dep = c("↑", "↑", "NA", "↑ ↓", "↑", "NA", "↑", "NA", "↑", "NA", "NA"),
  CSF_AD = c("↑", "↑", "↓", "↑", "NA", "NA", "↑", "NA", "↑", "↑ ↓", "↓"),
  Blood_AD = c("↓", "↑", "NA", "↑", "NA", "NA", "↑", "NA", "↑", "↓", "NA")
)

# Add row names

M1_phenotype = Microglia_1
row.names(M1_phenotype) = c("TNFα", "IL-1β", "IL-2", "IL-6", "IL-7", "IL-15", "CCL2", "CXCL9", "IL-18", "IL-8", "IL-12")

# Create table with gt()

M1_phenotype %>% 
  gt(rownames_to_stub = TRUE) %>%
  tab_header(title = md("**Table 1.** Microglial secreted factors and their effects on sleep"), 
             subtitle = md("*M1 Phenotype*")) %>% 
               opt_align_table_header(align = "left") %>%
  cols_label(
    NREM_duration = md("**NREM Duration**"), 
    Stages_N1_N3 = md("**Stages N1-3**"), 
    REM_duration =  md("**REM Duration**"), 
    Sleep_Cycle = md("**Sleep Cycle Length**"), 
    EEG_SWA = md("**EEG SWA**"), 
    Brain_Temp = md("**Brain Temp**"), 
    Sleep_dep = md("**Sleep Deprivation**"),
    CSF_AD = md("**CSF levels in AD**"), 
    Blood_AD = md("**Blood levels in AD**")) %>% 
  tab_style(cell_text(color = "red", weight = "bold"),
            locations = cell_text(
              column = everything(),
              rows = everything() == "↓"
            ))

library("gt")
library("rmarkdown")
library("dplyr")
library(purrr)

# Create data frame

Microglia_1 <- data.frame(
  NREM_duration = c("↑", "↑", "↑", "↑", "NA", "↑", "NA", "NA", "↑", "↑", "NA"),
  Stages_N1_N3 = c("NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA"),
  REM_duration = c("↓", "↓", "↓  ─", " ─", "NA", "↓  ─", "NA", "NA", "↑ ↓", " ─", "NA"),
  Sleep_Cycle = c("NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA", "NA"),
  EEG_SWA = c("↑", "↑ ↓", "↑ ↓", "↑", "NA", "↑ ↓", "NA", "NA", "↑", "↑  ─", "NA"),
  Brain_Temp = c("↑", "↑", "↑", "↑", "NA", "↑", "NA", "NA", "↑", "↑  ─", "NA"),
  Sleep_dep = c("↑", "↑", "NA", "↑ ↓", "↑", "NA", "↑", "NA", "↑", "NA", "NA"),
  CSF_AD = c("↑", "↑", "↓", "↑", "NA", "NA", "↑", "NA", "↑", "↑ ↓", "↓"),
  Blood_AD = c("↓", "↑", "NA", "↑", "NA", "NA", "↑", "NA", "↑", "↓", "NA")
)

# Add row names

M1_phenotype <- Microglia_1
row.names(M1_phenotype) <- c("TNFα", "IL-1β", "IL-2", "IL-6", "IL-7", "IL-15", "CCL2", "CXCL9", "IL-18", "IL-8", "IL-12")


M1_phenotype_with_styled_arrows <- M1_phenotype |>
  mutate(across(.fns=
                  function(x){
                    map(gsub(
                      x = x ,
                      pattern = fixed("↓"),
                      replacement = "<em style='font-size:25px;color:#FF0000;'>↓</em>"),
                      ~gt::html(as.character(.x)))
                  }))


M1_phenotype_with_styled_arrows %>%
  gt(rownames_to_stub = TRUE) %>%
  tab_header(
    title = md("**Table 1.** Microglial secreted factors and their effects on sleep"),
    subtitle = md("*M1 Phenotype*")
  ) %>%
  opt_align_table_header(align = "left") %>%
  cols_label(
    NREM_duration = md("**NREM Duration**"),
    Stages_N1_N3 = md("**Stages N1-3**"),
    REM_duration = md("**REM Duration**"),
    Sleep_Cycle = md("**Sleep Cycle Length**"),
    EEG_SWA = md("**EEG SWA**"),
    Brain_Temp = md("**Brain Temp**"),
    Sleep_dep = md("**Sleep Deprivation**"),
    CSF_AD = md("**CSF levels in AD**"),
    Blood_AD = md("**Blood levels in AD**")
  )