Can Browser_Mod Popup Cards be formatted?

Is it possible to format a popup card that is called by browser_mod?

I thought I had cracked this, but obviously not. The background card formats fine, but when I click on it to invoke the popup card, the popup is just generic. The “:host…” bit seems to work, but not the “ha-card…” section.

I suspect I’m doing something really dumb, but just wanted a second opinion?

type: custom:button-card
tap_action:
  action: fire-dom-event
  browser_mod:
    service: browser_mod.popup
    data:
      title: Lights
      content:
        type: entities
        entities:
          - entity: light.living_room
            type: simple-entity
            tap_action:
              action: call-service
              service: light.toggle
              data:
                entity_id: light.living_room
            hold_action:
              action: more-info
            card_mod:
              style: |
                :host {
                --card-mod-icon-color:
                {% if states('light.living_room') != 'off' %}
                  #FFBF00
                {% else %}
                  white
                {% endif %}
                }
                ha-card {
                  background-color: transparent;
                  border-radius: 20px;
                  border: solid 1px grey;
                  margin: 20px 0px 0px 0px;
                  size: 30%;}
            state_color: true
entity: ""