.top-actions {
  padding-right: 0;
  gap: 2px;
}

.top-actions .hao-account-mount,
.top-actions .hao-referral-mount {
  position: static;
  z-index: auto;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
}

.top-actions .hao-account-trigger,
.top-actions .hao-referral-trigger {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  box-shadow: none;
  backdrop-filter: none;
  font-family: inherit;
  line-height: 1;
}

.top-actions .hao-account-trigger:hover,
.top-actions .hao-referral-trigger:hover {
  transform: none;
  border-color: transparent;
  background: var(--paper-deep);
  color: var(--ink);
  box-shadow: none;
}

.top-actions .hao-account-trigger:focus-visible,
.top-actions .hao-referral-trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--signal) 55%, transparent);
  outline-offset: 2px;
}

.top-actions .hao-account-trigger-visual {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}

.top-actions .hao-account-trigger svg {
  width: 18px;
  height: 18px;
}

.top-actions .hao-referral-trigger > span:last-child {
  display: none;
}

.top-actions .hao-referral-trigger > span:first-child {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}

.top-actions .hao-referral-trigger > span:first-child::before {
  content: '';
  width: 18px;
  height: 18px;
  background: var(--ink-soft);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 19a6 6 0 0 0-12 0M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8m10-3v6m3-3h-6' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 19a6 6 0 0 0-12 0M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8m10-3v6m3-3h-6' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.top-actions .hao-referral-trigger:hover > span:first-child::before {
  background: var(--ink);
}

.top-actions .hao-account-trigger.is-pro {
  width: auto;
  min-width: 38px;
  padding: 0 8px;
  gap: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--signal) 7%, transparent);
  color: var(--ink);
}

.top-actions .hao-account-trigger.is-pro::after {
  content: 'PRO';
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border: 1px solid color-mix(in srgb, var(--signal) 34%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--signal) 9%, transparent);
  color: var(--signal);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .08em;
}

@media (max-width: 760px) {
  .top-actions .hao-account-mount,
  .top-actions .hao-referral-mount {
    order: 4;
  }

  .top-actions .hao-account-trigger.is-pro {
    padding-inline: 6px;
  }
}
